! function (t) {
function e(i) {
if (n[i]) return n[i].exports;
var o = n[i] = {
i: i,
l: false,
exports: {}
};
return t[i].call(o.exports, o, o.exports, e), o.l = true, o.exports
}
var n = {};
return e.m = t, e.c = n, e.d = function (t, n, getter) {
if (!e.o(t, n)) Object.defineProperty(t, n, {
configurable: false,
enumerable: true,
get: getter
})
}, e.n = function (t) {
var getter = t && t.__esModule ? function e() {
return t["default"]
} : function e() {
return t
};
return e.d(getter, "a", getter), getter
}, e.o = function (t, e) {
return Object.prototype.hasOwnProperty.call(t, e)
}, e.p = "/Content/BundledScripts/", e(e.s = 12036)
}({
112: function (t, e, n) {
"use strict";
function i() {
throw new Error("setTimeout has not been defined")
}
function o() {
throw new Error("clearTimeout has not been defined")
}
function a(t) {
if (p === setTimeout) return setTimeout(t, 0);
if ((p === i || !p) && setTimeout) return p = setTimeout, setTimeout(t, 0);
try {
return p(t, 0)
} catch (e) {
try {
return p.call(null, t, 0)
} catch (e) {
return p.call(this, t, 0)
}
}
}
function s(t) {
if (m === clearTimeout) return clearTimeout(t);
if ((m === o || !m) && clearTimeout) return m = clearTimeout, clearTimeout(t);
try {
return m(t)
} catch (e) {
try {
return m.call(null, t)
} catch (e) {
return m.call(this, t)
}
}
}
function u() {
if (v && y) {
if (v = false, y.length) g = y.concat(g);
else w = -1;
if (g.length) l()
}
}
function l() {
if (!v) {
var t = a(u);
v = true;
for (var e = g.length; e;) {
for (y = g, g = []; ++w < e;)
if (y) y[w].run();
w = -1, e = g.length
}
y = null, v = false, s(t)
}
}
function c(t, e) {
this.fun = t, this.array = e
}
function f() {}
var h = t.exports = {},
p, m;
! function () {
try {
if ("function" == typeof setTimeout) p = setTimeout;
else p = i
} catch (t) {
p = i
}
try {
if ("function" == typeof clearTimeout) m = clearTimeout;
else m = o
} catch (t) {
m = o
}
}();
var g = [],
v = false,
y, w = -1;
h.nextTick = function (t) {
var e = new Array(arguments.length - 1);
if (arguments.length > 1)
for (var n = 1; n < arguments.length; n++) e[n - 1] = arguments[n];
if (g.push(new c(t, e)), 1 === g.length && !v) a(l)
}, c.prototype.run = function () {
this.fun.apply(null, this.array)
}, h.title = "browser", h.browser = true, h.env = {}, h.argv = [], h.version = "", h.versions = {}, h.on = f, h.addListener = f, h.once = f, h.off = f, h.removeListener = f, h.removeAllListeners = f, h.emit = f, h.prependListener = f, h.prependOnceListener = f, h.listeners = function (t) {
return []
}, h.binding = function (t) {
throw new Error("process.binding is not supported")
}, h.cwd = function () {
return "/"
}, h.chdir = function (t) {
throw new Error("process.chdir is not supported")
}, h.umask = function () {
return 0
}
},
12036: function (t, e, n) {
"use strict";
n(12037), n(12125)
},
12037: function (t, e, n) {
"use strict";
n(12038)
},
12038: function (t, e, n) {
"use strict";
n(12039), n(12040), n(507), n(12041), n(12042), n(12044), n(12045), n(12046), n(12047), n(903), n(921), n(12048), n(12056), n(12057), n(12059), n(12061), n(12062), n(12063), n(12064), n(282), n(12065), n(12073), n(12074), n(12076), n(12077), n(12079), n(12083), n(12084), n(12086), n(12087), n(12088), n(12089), n(943), n(12090), n(12091), n(12092), n(12093), n(12094), n(12095), n(12096), n(12098), n(12099), n(12102), n(12103), n(12104), n(12106), n(12108), n(12109), n(12118), n(12119), n(12120)
},
12039: function (t, e, n) {
"use strict";
function i() {
if (window && document && "complete" !== document.readyState) {
var t = document.body;
if (t && t.classList && "function" == typeof t.classList.add && "function" == typeof t.classList.remove && "function" == typeof t.appendChild && "function" == typeof document.createElement && "function" == typeof window.addEventListener) {
var e = "u-disable-duration";
t.classList.add(e);
var styleNode = document.createElement("style");
styleNode.innerHTML = ".u-disable-duration * {transition-duration: 0s !important;}", t.appendChild(styleNode), window.addEventListener("load", (function () {
t.classList.remove(e)
}))
}
}
}
i()
},
12040: function (t, e, n) {
"use strict";
if (!("CSS" in window)) window.CSS = {};
if (!("supports" in window.CSS)) "use strict", window.CSS._cacheSupports = {}, window.CSS.supports = function (t, e) {
function n(t, e) {
var style = document.createElement("div").style;
if (void 0 === e) {
var n = function (t, e) {
var n = t.split(e);
if (n.length > 1) return n.map((function (t, index, e) {
return index % 2 == 0 ? t + e[index + 1] : ""
})).filter(Boolean)
},
i = n(t, /([)])\s*or\s*([(])/gi);
if (i) return i.some((function (t) {
return window.CSS.supports(t)
}));
var o = n(t, /([)])\s*and\s*([(])/gi);
if (o) return o.every((function (t) {
return window.CSS.supports(t)
}));
style.cssText = t.replace("(", "").replace(/[)]$/, "")
} else style.cssText = t + ":" + e;
return !!style.length
}
var i = [t, e].toString();
if (i in window.CSS._cacheSupports) return window.CSS._cacheSupports[i];
else return window.CSS._cacheSupports[i] = n(t, e)
}
},
12041: function (t, e, n) {
"use strict";
function i(t) {
if (this.prevMode = "", this.resizeTimeout = 50, this.sheet = {
XS: 340,
SM: 540,
MD: 720,
LG: 940,
XL: 1140,
XXL: 1320
}, this.mediaMax = {
XS: 575,
SM: 767,
MD: 991,
LG: 1199
}, this.modes = ["XL", "LG", "MD", "SM", "XS"], this.defaultMode = "XL", document.body.classList.contains("u-xxl-mode")) this.mediaMax.XXL = 1399, this.defaultMode = "XXL", this.modes.splice(0, 0, "XXL");
this._handlers = [], this.modes.forEach((function (t) {
var e = document.body.style.getPropertyValue("--theme-sheet-width-" + t.toLowerCase());
if (e = parseFloat(e), Number.isFinite(e)) this.sheet[t] = e
}), this), this.init(t || [])
}
var ResponsiveMenu = n(922),
o = n(15);
Object.defineProperty(i.prototype, "mode", {
get: function () {
var t = (document.documentElement || document.body).clientWidth || window.innerWidth;
if (this.scrolbar) document.documentElement.setAttribute("style", "overflow-y:hidden"), t = (document.documentElement || document.body).clientWidth || window.innerWidth, document.documentElement.removeAttribute("style");
for (var e in this.mediaMax)
if (this.mediaMax.hasOwnProperty(e))
if (t <= this.mediaMax[e]) return e;
return this.defaultMode
}
}), i.prototype.init = function init(t) {
o(function () {
this.update(true), this.scrolbar = !!(document.body && document.body.clientWidth !== document.body.scrollWidth)
}.bind(this)), o(window).on("resize", function () {
this.update(true)
}.bind(this)), t.forEach((function (t) {
this._handlers.push(new t(this))
}), this);
var e = new CustomEvent("np.responsive.init", {
detail: {
prevMode: this.prevMode,
mode: this.mode
}
});
document.dispatchEvent(e), this.update()
}, i.prototype.update = function update(t) {
var e = function () {
var t = this.mode;
if (t !== this.prevMode || this.getContentWidth() < this.sheet[t]) {
this._handlers.forEach((function (t) {
if ("function" == typeof t.onResponsiveBefore) t.onResponsiveBefore()
})), this.responsiveClass(o("html")), this._handlers.forEach((function (t) {
if ("function" == typeof t.onResponsiveAfter) t.onResponsiveAfter()
}));
var e = new CustomEvent("np.responsive.changed", {
detail: {
prevMode: this.prevMode,
mode: t
}
});
document.dispatchEvent(e), this.prevMode = t
}
this._handlers.forEach((function (t) {
if ("function" == typeof t.onResponsiveResize) t.onResponsiveResize()
}))
}.bind(this);
if (t) clearTimeout(this._timeoutId), this._timeoutId = setTimeout(e, this.resizeTimeout);
else e()
}, i.prototype.responsiveClass = function t(e) {
var removeList = Object.keys(this.sheet).map((function (t) {
return "u-responsive-" + t.toLowerCase()
})).join(" ");
e.removeClass(removeList), e.addClass("u-responsive-" + this.mode.toLowerCase())
}, i.prototype.getContentWidth = function () {
return o(".u-body section:first").parent().width()
}, o((function () {
window._responsive = new i([ResponsiveMenu]), o(document).on("click", "[data-href]:not(.u-back-to-top), [data-post-link]", (function (t) {
if (!t.isDefaultPrevented()) {
var e = o(this),
url = e.attr("data-href") || e.attr("data-post-link"),
n = e.attr("data-target") || "",
i = o(e).parents("body").find("header") && o(e).parents("body").find("header").hasClass("u-sticky"),
a = url && (url.startsWith("#") || url.indexOf("#") > -1 && url.indexOf(window.location.href.split("#")[0]) > -1);
if (i && a && window._npScrollAnchor) {
var s = url.split("#")[1] || "",
u = o("#" + s);
if (u.length) window._npScrollAnchor.scroll(u)
} else if (n) window.open(url, n);
else try {
window.location.href = url
} catch (t) {
console.warn("Incorrect url: " + url)
}
}
}))
}))
},
12042: function (t, e, n) {
"use strict";
function i() {
return {
submit: function (t) {
t.preventDefault();
t.stopPropagation();
var form = m(this);
form.find('input[type="submit"]').prop("disabled", true); // Desabilita do botão de submit
var url = form.attr("action");
var e = form.attr("source");
var n = form.attr("method") || "POST";
var i = "";
if (h(form), ("email" === e || "customphp" === e) && "true" === form.attr("redirect"))
i = form.attr("redirect-url") && !m.isNumeric(form.attr("redirect-url")) ? form.attr("redirect-url") : form.attr("redirect-address");
if ("email" === e && !m(form).find('input[name="npspec-referer"]').length)
m(form).append('');
var o = document.location && document.location.protocol;
var u;
if (navigator.userAgent && navigator.userAgent.match(/firefox|fxios/i) && "file:" === o)
FormMessage.showError(form, "The page is opened as a file on disk and sending emails is not supported.\n" + "Sending emails works only for pages opened from the domain.");
else {
var services = form.find('input[name="formServices"]');
var l = Const.formActionUrl + "v2/form/process";
var c = url === l;
let sendFrom = 'contato@ameris.com.br';
let nomeContato = form.find("input[name=name]").val();
let sendTo = form.find("input[name=email]").val();
let sendSubject = 'Formulário de Contato : [' + nomeContato + ']';
let sendText = 'Corpo de email:' + "\n" + "Mensagem enviada por:" + nomeContato + "\n" + "Email de Contato:" + sendTo;
let textArea = form.find("textarea").val();
let sendHtml = '' + textArea + '';
let sendUrl = 'https://lwf715duuc.execute-api.sa-east-1.amazonaws.com/default/ameris_sendmail';
var data = JSON.stringify({
to: sendFrom,
from: sendFrom,
subject: sendSubject,
text: sendText,
html: sendHtml
});
if (services.length) {
s(form, {
url: sendUrl,
method: "POST",
redirectAddress: i,
data: data,
showSuccess: c,
success: function () {
if (!c) {
a(form, {
url: url,
method: n,
redirectAddress: i
})
}
},
error: function(xhr, ajaxOptions, thrownError) {
alert("xhr " + xhr.status);
alert("error " + thrownError);
}
});
}
else {
a(form, {
url: url,
method: n,
redirectAddress: i
})
}
}
},
click: function (t) {
t.preventDefault();
t.stopPropagation();
m(this).find(".u-form-send-success").hide();
m(this).find(".u-form-send-error").hide();
var form = m(this).closest("form");
if (o(form), !g.signatureValidation(form)) {
return FormMessage.showError(form, "The Signature field is required"), void 0;
}
if (!c(form)) {
return FormMessage.showError(form, "The File field is required"), void 0;
}
if (!f(form)) {
return FormMessage.showError(form, "Unable to submit the contact form. Please accept the cookie consent for the correct recaptcha functioning."), void 0;
}
else {
return g.addSignatureFiles(form), form.find('input[type="submit"]').click(), void 0;
}
}
}
}
function o(form) {
form.find(".u-form-checkbox-group").each((function () {
var t = m(this),
e = t.find("input"),
n = e.length,
i = n > 0 ? e[0] : null,
o;
if (e.attr("required") || t.attr("data-required")) {
e.removeAttr("required"), t.attr("data-required", "required");
for (var a = false, s = 0; s < n; s++)
if (e[s].checked) {
a = true;
break
} var u = !a ? "At least one checkbox must be selected." : "";
i.setCustomValidity(u)
}
}))
}
function a(form, t) {
if (/list-manage[1-9]?.com/i.test(t.url)) return u(form, t.url), void 0;
s(form, {
url: t.url,
method: t.method,
redirectAddress: t.redirectAddress,
success: l,
showSuccess: true
})
}
function s(form, t) {
var e = function () {
m.ajax({
type: t.method,
url: t.url,
data: t.data,
dataType: "json",
processData: false,
contentType: false,
})
.done((function (data, e) {
if (data && (data.success || data.ok || "success" === e) || !data && "success" === e) {
if (t.showSuccess) {
FormMessage.showSuccess(form);
}
if (t.redirectAddress) {
setTimeout((function () {
window.location.replace(t.redirectAddress);
}), 2e3);
}
else {
t.success(form);
}
}
else {
data = data || {};
FormMessage.showError(form, data.error, data.errorId, data.email);
}
}))
.fail((function (jqXHR, textStatus, errorThrown) {
console.log(jqXHR.responseText);
console.log('Error occurred: '+ jqXHR.statusText + ' ' + jqXHR.status);
FormMessage.showError(form);
}))
};
if (void 0 !== window.recaptchaObject) {
window.recaptchaObject.executeContact(e);
}
else {
e();
}
}
function u(form, url) {
var t = form.find("input[name=name]").val(),
email = form.find("input[name=email]").val(),
data = {
Email: email,
EMAIL: email
};
if (t) data.Name = t, data.FNAME = t;
var e = form.find("input, textarea");
m.each(e, (function (index, t) {
var e = m(t).attr("name"),
n = m(t).val();
if (e && n) data[e.toUpperCase()] = n
}));
var n = (url = url.replace("/post?", "/post-json?") + "&c=?").indexOf("u=") + 2;
n = url.substring(n, url.indexOf("&", n));
var i = url.indexOf("id=") + 3;
i = url.substring(i, url.indexOf("&", i)), data["b_" + n + "_" + i] = "", m.ajax({
url: url,
data: data,
dataType: "jsonp"
}).done((function (t) {
var e;
if ("success" === t.result || /already/.test(t.msg)) FormMessage.showSuccess(form), l(form);
else FormMessage.showError(form, t.msg)
})).fail((function () {
FormMessage.showError(form)
}))
}
function l(form) {
var dialog = new Dialog(form);
setTimeout((function () {
dialog.close()
}), 2e3)
}
function c(form) {
var t = form.find('input[type="file"][required]');
if (!t.length) return true;
else return t.toArray().every((function (input) {
return input.files.length
}))
}
function f(form) {
var t = form.hasClass("u-form-custom-backend"),
e = form.find('input[name="recaptchaResponse"]'),
n = form.parents("body").find(".u-cookies-consent"),
i = document.cookie && document.cookie.indexOf("u-gdpr-cookie=true") > -1;
if (t) return true;
if (n.length && e.length && !i) return false;
else return true
}
function h(form) {
var t;
form.find("input[type=tel]").each((function () {
var t = m(this),
e = t.parents(".iti").find(".iti__selected-flag").attr("title") || "";
t.val(e + " " + t.val())
}))
}
function p(form) {
var services;
if (form.find('input[name="formServices"]').length) {
var t = Const.formActionUrl + "v2/form/process",
e = form.attr("action") === t;
s(form, {
url: t,
method: "POST",
redirectAddress: "",
showSuccess: e,
success: function () {}
})
}
}
var m = n(15),
Dialog = n(279),
g = n(12043),
FormMessage = n(3436),
Const = n(3437);
m((function () {
var form = new i;
window.serviceRequest = p, m("form.u-form-vertical:not(.u-form-custom-backend), form.u-form-horizontal:not(.u-form-custom-backend)").submit(form.submit), m(".u-form .u-btn-submit").click(form.click)
})), window.MailChimpForm = i
},
12043: function (t, e, n) {
"use strict";
function i(t) {
var e = JSON.parse(t.getAttribute("data-canvas-default-options") || "{}");
a(t, e)
}
function o(t) {
var e, n = t.clone().get(0),
i = JSON.parse(n.getAttribute("data-canvas-default-options") || "{}");
return a(n, i), n.toDataURL()
}
function a(t, e) {
var n = t.getContext("2d");
n.clearRect(0, 0, e.width, e.height), n.lineWidth = e.lineWidth, n.strokeStyle = e.strokeStyle, n.fillStyle = e.fillStyle, n.fillRect(0, 0, e.width, e.height), n.beginPath(), n.moveTo(e.signatureLine.startX, e.signatureLine.startY), n.lineTo(e.signatureLine.endX, e.signatureLine.endY), n.stroke()
}
function s(t, fileName) {
for (var e = t.split(","), n = e[0].match(/:(.*?);/)[1], i = atob(e[1]), o = i.length, a = new Uint8Array(o); o--;) a[o] = i.charCodeAt(o);
var s = new Blob([a], {
type: n
});
return new File([s], fileName)
}
var u = t.exports = {};
u.signatureValidation = function t(form) {
var e = form.find("canvas"),
n, data;
if (!e.length) return true;
if (!e.attr("data-required")) return true;
else return o(e) !== e.get(0).toDataURL()
}, u.addSignatureFiles = function t(form) {
form.find(".u-form-signature canvas").each((function () {
var t = $(this).get(0),
e, n = s(t.toDataURL(), "signature.png"),
o = form.find(".u-form-signature-file");
if (o.length) o.remove();
var file = $('');
form.append(file);
var a = new DataTransfer;
a.items.add(n), file[0].files = a.files, i(t)
}))
}
},
12044: function (t, e, n) {
"use strict";
var i = n(654).evaluate,
o = n(655);
$((function () {
function t(t) {
var form;
$(t && t.target).closest("form").each((function (index, form) {
var t = new o(form).getScope();
$(form).find("[data-expression]").each((function () {
var e = $(this),
n = e.closest(".u-form-calc").find(".u-calc-input");
try {
var o = e.attr("data-expression"),
a = i(o, t);
e.text(a), n.val(a)
} catch (t) {
e.text(0), n.val(0)
}
}))
}))
}
$("body").on("input", "input[type=number][name]", t), $("body").on("change", "input[type=range][name], input[type=radio][name], input[type=checkbox][name], select[name]", t)
}))
},
12045: function (t, e, n) {
"use strict";
function i() {
$(".u-form input[type=file]").change((function () {
var form = $(this).closest(".u-form");
l(form), c(form)
}))
}
function o() {
$(".u-form .u-upload-button").click((function (t) {
t.stopPropagation(), t.preventDefault(), $(this).closest(".u-form").find('input[type="file"]').click()
}))
}
function a() {
$(".u-form").on("click", ".u-file-remove", (function (t) {
t.stopPropagation(), t.preventDefault();
var e = $(this),
form = e.closest(".u-form"),
n = e.closest(".u-file-item"),
i = parseFloat(n.attr("data-i"));
if (Number.isFinite(i)) f(form, i), c(form)
}))
}
function s() {
$(".u-form").on("reset", (function () {
var form = $(this).closest(".u-form"),
input = form.find('input[type="file"]').get(0);
if (input) input.files = (new DataTransfer).files, c(form)
}))
}
function u() {
$('.u-form input[type="file"]').each((function () {
var t = $(this),
e = t.attr("accept");
if (e in FormFileAccept) e = FormFileAccept[e];
t.attr("accept", e)
}))
}
function l(form) {
var input = form.find('input[type="file"]').get(0),
t = [];
if (input)
if (Array.from(input.files).forEach((function (file, e) {
if (file.size > h || e >= p) t.push({
i: e,
name: file.name
})
})), t.length) {
f(form, t.map((function (t) {
return t.i
})));
var e = '"{files}" file(s) size exceeds maximum limit.',
n = t.map((function (t) {
return t.name
})).join(", ");
FormMessage.showError(form, e.replace(/\{files\}/, n))
}
}
function c(form) {
form.find(".u-file-list .u-file-item:not(.u-file-template)").remove();
var input = form.find('input[type="file"]').get(0),
t = form.find(".u-file-template");
if (input) Array.from(input.files).forEach((function (file, e) {
var n = t.clone();
n.removeClass("u-file-template"), n.find(".u-file-name").text(file.name), n.attr("data-i", e), form.find(".u-file-list").append(n)
}))
}
function f(form, index) {
var input = form.find('input[type="file"]').get(0),
t = new DataTransfer;
if (input) {
if (!Array.isArray(index)) index = [index];
Array.from(input.files).forEach((function (file, e) {
if (!index.includes(e)) t.items.add(file)
})), input.files = t.files
}
}
var FormFileAccept = n(659),
FormMessage = n(3436),
h = 10 * 1024 * 1024,
p = 10;
$((function () {
i(), o(), a(), s(), u()
}))
},
12046: function (t, e, n) {
"use strict";
function i(el) {
var video;
el.find(".u-video .embed-responsive-item").each((function () {
if (this.matches("video")) this.pause();
else if (this.matches("iframe")) {
var t = this.getAttribute("src") || this.getAttribute("data-src");
this.setAttribute("src", t.replace(/autoplay=1?/gi, ""))
}
}))
}
function o(t) {
var video;
(t.hasClass("u-video") ? t : t.find(".u-video")).find(".embed-responsive-item[data-autoplay]").each((function () {
a(s(this).closest(".u-video"))
}))
}
function a(video) {
if (!video.closest(".u-dialog-block:not(.u-dialog-open)").length) {
var t = video.find("iframe"),
e = t.attr("data-src") || t.attr("src"),
n = video.find("video");
if (e) video.addClass("active"), e += (-1 === e.indexOf("?") ? "?" : "&") + "autoplay=1", t.attr("src", e);
else if (n.length) {
video.addClass("active");
var i = n[0];
if (i.paused) i.play();
else i.pause()
}
}
}
var s = n(15);
s(document).on("click", ".u-video-poster, .u-video video", (function (t) {
var e, video;
t.preventDefault(), a(s(this).closest(".u-video"))
})), s((function () {
s(".u-video-background .u-video-poster, .u-video-background .u-video video").each((function () {
a(s(this).closest(".u-video"))
})), s(".u-video .embed-responsive-item:not(.lazyloading, .lazyloaded) + .u-video-poster").each((function () {
var t = this.getAttribute("data-src");
if (t) this.style.backgroundImage = "url(" + t + ")";
o(s(this).closest(".u-video"))
}))
})), s(document).on("opened.np.dialog", ".u-dialog-block", (function (t) {
o(s(t.currentTarget))
})), s(document).on("closed.np.dialog", ".u-dialog-block", (function (t) {
i(s(t.currentTarget))
}))
},
12047: function (t, e, n) {
"use strict";
function i(t) {
this._audioElement = t.querySelector("audio"), this._playButton = t.querySelector(".player-play-btn"), this._playIcon = this._playButton.querySelector(".player-icon-play"), this._pauseIcon = this._playButton.querySelector(".player-icon-pause"), this._progress = t.querySelector(".u-player-progress"), this._playerCurrentTime = t.querySelector(".player-time-current"), this._progressFilled = t.querySelector(".u-player-progress-filled"), this._progressFilled.style.flexBasis = "auto", this._playerDuration = t.querySelector(".player-time-duration"), this._mousedown = false
}
var o = n(15);
i.prototype.build = function t() {
this.setTimes(), this.initPlayerEvents(), this.initProgressEvents()
}, i.prototype.initProgressEvents = function t() {
this._progress.addEventListener("click", this.scrub.bind(this)), this._progress.addEventListener("mousemove", function (t) {
if (this._mousedown) this.scrub(t)
}.bind(this)), this._progress.addEventListener("mousedown", (function () {
this._mousedown = true
})), this._progress.addEventListener("mouseup", (function () {
this._mousedown = false
}))
}, i.prototype.initPlayerEvents = function t() {
this._audioElement.addEventListener("timeupdate", function () {
this.progressUpdate(), this.setTimes()
}.bind(this)), this._audioElement.addEventListener("loadedmetadata", function () {
this.setTimes()
}.bind(this)), this._playButton.addEventListener("click", function () {
if ("false" === this._playButton.dataset.playing) {
var t = this._audioElement.play();
if (void 0 !== t) t.then(function () {
this._playButton.dataset.playing = "true", this._playIcon.classList.add("u-hidden"), this._pauseIcon.classList.remove("u-hidden")
}.bind(this)).catch((function () {}))
} else if ("true" === this._playButton.dataset.playing) this._audioElement.pause(), this._playButton.dataset.playing = "false", this._pauseIcon.classList.add("u-hidden"), this._playIcon.classList.remove("u-hidden")
}.bind(this)), this._audioElement.addEventListener("ended", function () {
this._playButton.dataset.playing = "false", this._pauseIcon.classList.add("u-hidden"), this._playIcon.classList.remove("u-hidden"), this._progressFilled.style.flexBasis = "0%", this._audioElement.currentTime = 0
}.bind(this))
}, i.prototype.progressUpdate = function t() {
var e = this._audioElement.currentTime / this._audioElement.duration * 100;
this._progressFilled.style.flexBasis = e + "%"
}, i.prototype.scrub = function t(e) {
this._audioElement.currentTime = e.offsetX / this._progress.offsetWidth * this._audioElement.duration
}, i.prototype.setTimes = function t() {
if (this._audioElement.duration) {
var e = new Date(1e3 * this._audioElement.currentTime);
this._playerCurrentTime.textContent = e.toISOString().substring(14, 19);
var n = new Date(1e3 * this._audioElement.duration);
this._playerDuration.textContent = n.toISOString().substring(14, 19)
}
}, o(window).on("load", (function () {
o(".u-audio").each((function () {
var t;
new i(o(this).get(0)).build()
}))
}))
},
12048: function (t, e, n) {
"use strict";
var i = n(15),
o = n(12049);
i((function () {
(new o).init()
}))
},
12049: function (t, e, n) {
"use strict";
function i() {
this.galleries = null, this._pswpElement = null, this._listeners = [], this._onItemClick = this.onItemClick.bind(this)
}
var Utils = n(12050),
o = n(12051),
a = n(12052),
s = n(12053),
u = n(15),
l = n(12054),
c = n(12055);
t.exports = i, Object.defineProperty(i.prototype, "pswpElement", {
get: function () {
if (!this._pswpElement) this._pswpElement = u(".pswp")[0];
if (!this._pswpElement) {
var t = u(a.PSWP_TEMPLATE).appendTo(".u-body");
this._pswpElement = t[0]
}
return this._pswpElement
}
}), i.prototype.init = function () {
this.initGallery(), this.subscribe(), this.checkHashUrl()
}, i.prototype.initGallery = function () {
var t = {};
u(a.LIGHTBOX_SELECTOR).each((function (t) {
u(this).attr("data-pswp-uid", t + 1)
})), u(a.GALLERY_ITEM_SELECTOR).each((function () {
var e = this.closest(a.LIGHTBOX_SELECTOR);
if (e && this !== e) {
var n = e.getAttribute("data-pswp-uid"),
gallery = t[n];
if (!gallery) gallery = {
dom: e,
items: []
};
this.setAttribute("data-pswp-item-id", gallery.items.length), this.setAttribute("data-gallery-uid", n), gallery.items.push(this), t[n] = gallery
}
})), this.galleries = t
}, i.prototype.subscribe = function () {
for (var t = Object.keys(this.galleries), e = 0; e < t.length; e++)
for (var id = t[e], gallery = this.galleries[id], n = 0; n < gallery.items.length; n++) {
var i = gallery.items[n];
u(i).on("click", this._onItemClick)
}
}, i.prototype.onItemClick = function (t) {
var e = t.currentTarget;
if (!e.matches("[data-href]")) {
t.preventDefault(), t.stopPropagation(), t.returnValue = false;
var index = e.getAttribute("data-pswp-item-id"),
n = e.getAttribute("data-gallery-uid"),
gallery = this.galleries[n];
if (gallery && index >= 0) this.openOnClick(index, gallery)
}
}, i.prototype.listen = function (t, e) {
this._listeners.push({
event: t,
func: e
})
}, i.prototype.checkHashUrl = function () {
var t = Utils.parseHash();
if (t.pid && t.gid) this.openFromUrl(t.pid, this.galleries[t.gid])
}, i.prototype.openOnClick = function (index, gallery) {
var t = gallery.dom.getAttribute("data-pswp-uid");
o.gallery(gallery, (function (items) {
var e = this.buildOptions(t, items);
e.index = parseFloat(index), e.showPreviews = gallery.dom.classList.contains("u-product-control"), this.showPswp(items, e)
}), this)
}, i.prototype.openFromUrl = function (index, gallery) {
var t = gallery.dom.getAttribute("data-pswp-uid");
o.gallery(gallery, (function (items) {
var e = this.buildOptions(t, items);
if (e.showAnimationDuration = 0, e.index = parseFloat(index) - 1, e.showPreviews = gallery.dom.classList.contains("u-product-control"), e.galleryPIDs)
for (var n = 0; n < items.length; n++)
if (items[n].pid == index) {
e.index = n;
break
} this.showPswp(items, e)
}), this)
}, i.prototype.showPswp = function (items, t) {
if (Number.isFinite(t.index)) {
var e = new l(this.pswpElement, c, items, t);
s.init(e, t), this._listeners.forEach((function (t) {
e.listen(t.event, t.func)
})), e.init()
}
}, i.prototype.buildOptions = function (t, items) {
var e;
return {
galleryUID: t,
getThumbBoundsFn: function (index) {
var t = window.pageYOffset || document.documentElement.scrollTop,
rect = items[index].el.getBoundingClientRect();
return {
x: rect.left,
y: rect.top + t,
w: rect.width
}
},
addCaptionHTMLFn: function (t, e, n) {
if (n) return e.children[0].innerHTML = "
", true;
if (!t.title) return e.children[0].innerHTML = "", false;
var html = t.title;
if (t.desc) html += " " + t.desc + "";
return e.children[0].innerHTML = html, true
},
showHideOpacity: true,
history: window.location === window.parent.location
}
}, window.Lightbox = i
},
12050: function (t, e, n) {
"use strict";
var Utils;
(t.exports = {}).parseHash = function t() {
var hash = window.location.hash.substring(1),
e = {};
if (hash.length < 5) return e;
for (var n = hash.split("&"), i = 0; i < n.length; i++)
if (n[i]) {
var o = n[i].split("=");
if (!(o.length < 2)) e[o[0]] = o[1]
} if (e.gid) e.gid = parseInt(e.gid, 10);
return e
}
},
12051: function (t, e, n) {
"use strict";
function i(t) {
return new Promise((function (e, n) {
if (t.is(".u-background-effect ~ .u-container-layout")) i(t.prev(".u-background-effect").find(".u-background-effect-image")).then((function (t) {
e(t)
}), n);
else if (t.is("img")) {
var a = t[0].naturalWidth || t.attr("data-image-width") || t.attr("imgwidth") || t.width(),
s = t[0].naturalHeight || t.attr("data-image-height") || t.attr("imgheight") || t.height();
e({
el: t[0],
src: t.attr("src"),
msrc: t.attr("src"),
w: parseFloat(a),
h: parseFloat(s)
})
} else if (t.is(".u-video")) e({
el: t[0],
html: t.find(".u-background-video").get(0).outerHTML
});
else if (t.is(".u-gallery-item")) i(t.find(".u-back-slide")).then((function (t) {
e(t)
}), n);
else if (t.is(".u-back-slide")) i(t.find(".u-back-image")).then((function (n) {
var i = t.siblings(".u-over-slide"),
o = t.closest(".u-gallery").is(".u-layout-thumbnails");
if (i.length && !o) n.title = i.find(".u-gallery-heading").html(), n.desc = i.find(".u-gallery-text").html();
e(n)
}), n);
else o(t).then((function (n) {
e({
el: t[0],
src: n.src,
msrc: n.src,
w: n.width,
h: n.height
})
}), n)
}))
}
function o(t) {
var e = t.css("background-image"),
n = e.match(/url\(['"]?(.+?)['"]?\)/);
return new Promise((function (t, i) {
if (n) {
var o = new Image;
o.onload = t.bind(null, o), o.onerror = o.onabort = i, o.src = n[1]
} else i(new Error("Invalid source: " + e))
}))
}
var a = n(15),
s;
(t.exports = {}).gallery = function gallery(gallery, t, e) {
e = e || null;
var n = gallery.items.map((function (t) {
return i(t = a(t))
}));
Promise.all(n).then(t.bind(e), console.log)
}
},
12052: function (t, e, n) {
"use strict";
var i = t.exports = {};
i.LIGHTBOX_SELECTOR = ".u-lightbox", i.GALLERY_ITEM_SELECTOR = [".u-image:not(.u-carousel-thumbnail-image):not(.u-background-effect-image)", ".u-gallery-item", ".u-background-effect ~ .u-container-layout"].join(", "), i.PSWP_TEMPLATE = '
\n' + ' \n' + '
\n' + '
\n' + ' \n' + ' \n' + ' \n' + "
\n" + '
\n' + '
\n ' + ' \n' + ' \n' + ' \n' + ' \n' + ' \n' + '
\n' + '
\n' + '
\n' + ' \n' + "
\n" + "
\n" + "
\n" + "
\n" + '
\n' + ' \n' + "
\n" + ' \n' + ' \n' + ' ' + '
\n' + ' \n' + "
\n" + "
\n" + "
\n" + "
"
},
12053: function (t, e, n) {
"use strict";
function i(gallery, selector) {
var t = gallery.scrollWrap,
e = t.querySelector(selector),
n;
t.querySelector(".pswp__caption").style.display = "none", e.style.display = ""
}
function o(gallery, selector) {
var t = gallery.scrollWrap,
e = t.querySelector(selector),
n;
t.querySelector(".pswp__caption").style.display = "", e.style.display = "none"
}
function add(gallery, selector) {
var t = gallery.scrollWrap,
items = gallery.items,
e = t.querySelector(selector);
items.forEach((function (t) {
var preview = t.msrc,
n = document.createElement("img");
n.setAttribute("src", preview), n.addEventListener("click", (function () {
gallery.goTo(items.indexOf(t))
})), e.appendChild(n)
}))
}
function remove(gallery, selector) {
var t, e;
gallery.scrollWrap.querySelector(selector).innerHTML = ""
}
function a(gallery, selector) {
var t = gallery.scrollWrap,
e, preview = gallery.currItem.msrc,
n, i;
t.querySelector(selector).querySelectorAll("img").forEach((function (t) {
var e, n = "active";
if (t.getAttribute("src") === preview) t.classList.add(n), t.scrollIntoView({
behavior: "smooth"
});
else t.classList.remove(n)
}))
}
var s;
t.exports.init = function init(gallery, t) {
var e = false;
gallery.listen("gettingData", (function () {
if (!e) {
if (e = true, t.showPreviews) i(gallery, "[data-previews]");
else o(gallery, "[data-previews]");
add(gallery, "[data-previews]")
}
})), gallery.listen("close", (function () {
remove(gallery, "[data-previews]")
})), gallery.listen("afterChange", (function () {
a(gallery, "[data-previews]")
}))
}
},
12054: function (t, e, n) {
"use strict";
var i, o;
/*! PhotoSwipe - v4.1.3 - 2019-01-08
* http://photoswipe.com
* Copyright (c) 2019 Dmitry Semenov; */
! function (a, factory) {
if (true) !(void 0 !== (o = "function" == typeof (i = factory) ? i.call(e, n, e, t) : i) && (t.exports = o));
else if ("object" == typeof e) t.exports = factory();
else a.PhotoSwipe = factory()
}(this, (function () {
var t = function (template, t, items, e) {
var n = {
features: null,
bind: function (t, type, e, n) {
var i = (n ? "remove" : "add") + "EventListener";
type = type.split(" ");
for (var o = 0; o < type.length; o++)
if (type[o]) t[i](type[o], e, false)
},
isArray: function (t) {
return t instanceof Array
},
createEl: function (t, e) {
var el = document.createElement(e || "div");
if (t) el.className = t;
return el
},
getScrollY: function () {
var t = window.pageYOffset;
return void 0 !== t ? t : document.documentElement.scrollTop
},
unbind: function (t, type, e) {
n.bind(t, type, e, true)
},
removeClass: function (el, t) {
var e = new RegExp("(\\s|^)" + t + "(\\s|$)");
el.className = el.className.replace(e, " ").replace(/^\s\s*/, "").replace(/\s\s*$/, "")
},
addClass: function (el, t) {
if (!n.hasClass(el, t)) el.className += (el.className ? " " : "") + t
},
hasClass: function (el, t) {
return el.className && new RegExp("(^|\\s)" + t + "(\\s|$)").test(el.className)
},
getChildByClass: function (t, e) {
for (var i = t.firstChild; i;) {
if (n.hasClass(i, e)) return i;
i = i.nextSibling
}
},
arraySearch: function (t, e, n) {
for (var i = t.length; i--;)
if (t[i][n] === e) return i;
return -1
},
extend: function (t, e, n) {
for (var i in e)
if (e.hasOwnProperty(i)) {
if (n && t.hasOwnProperty(i)) continue;
t[i] = e[i]
}
},
easing: {
sine: {
out: function (t) {
return Math.sin(t * (Math.PI / 2))
},
inOut: function (t) {
return -(Math.cos(Math.PI * t) - 1) / 2
}
},
cubic: {
out: function (t) {
return --t * t * t + 1
}
}
},
detectFeatures: function () {
if (n.features) return n.features;
var t, e = n.createEl().style,
i = "",
o = {};
if (o.oldIE = document.all && !document.addEventListener, o.touch = "ontouchstart" in window, window.requestAnimationFrame) o.raf = window.requestAnimationFrame, o.caf = window.cancelAnimationFrame;
if (o.pointerEvent = !!window.PointerEvent || navigator.msPointerEnabled, !o.pointerEvent) {
var a = navigator.userAgent;
if (/iP(hone|od)/.test(navigator.platform)) {
var s = navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);
if (s && s.length > 0)
if ((s = parseInt(s[1], 10)) >= 1 && s < 8) o.isOldIOSPhone = true
}
var u = a.match(/Android\s([0-9\.]*)/),
l = u ? u[1] : 0;
if ((l = parseFloat(l)) >= 1) {
if (l < 4.4) o.isOldAndroid = true;
o.androidVersion = l
}
o.isMobileOpera = /opera mini|opera mobi/i.test(a)
}
for (var c = ["transform", "perspective", "animationName"], f = ["", "webkit", "Moz", "ms", "O"], h, p, m = 0; m < 4; m++) {
i = f[m];
for (var g = 0; g < 3; g++)
if (h = c[g], p = i + (i ? h.charAt(0).toUpperCase() + h.slice(1) : h), !o[h] && p in e) o[h] = p;
if (i && !o.raf)
if (i = i.toLowerCase(), o.raf = window[i + "RequestAnimationFrame"], o.raf) o.caf = window[i + "CancelAnimationFrame"] || window[i + "CancelRequestAnimationFrame"]
}
if (!o.raf) {
var v = 0;
o.raf = function (t) {
var e = (new Date).getTime(),
n = Math.max(0, 16 - (e - v)),
id = window.setTimeout((function () {
t(e + n)
}), n);
return v = e + n, id
}, o.caf = function (id) {
clearTimeout(id)
}
}
return o.svg = !!document.createElementNS && !!document.createElementNS("http://www.w3.org/2000/svg", "svg").createSVGRect, n.features = o, o
}
};
if (n.detectFeatures(), n.features.oldIE) n.bind = function (t, type, e, n) {
type = type.split(" ");
for (var i = (n ? "detach" : "attach") + "Event", o, a = function () {
e.handleEvent.call(e)
}, s = 0; s < type.length; s++)
if (o = type[s])
if ("object" == typeof e && e.handleEvent) {
if (!n) e["oldIE" + o] = a;
else if (!e["oldIE" + o]) return false;
t[i]("on" + o, e["oldIE" + o])
} else t[i]("on" + o, e)
};
var i = this,
o = 25,
a = 3,
s = {
allowPanToNext: true,
spacing: .12,
bgOpacity: 1,
mouseUsed: false,
loop: true,
pinchToClose: true,
closeOnScroll: true,
closeOnVerticalDrag: true,
verticalDragRange: .75,
hideAnimationDuration: 333,
showAnimationDuration: 333,
showHideOpacity: false,
focus: true,
escKey: true,
arrowKeys: true,
mainScrollEndFriction: .35,
panEndFriction: .35,
isClickableElement: function (el) {
return "A" === el.tagName
},
getDoubleTapZoom: function (t, e) {
if (t) return 1;
else return e.initialZoomLevel < .7 ? 1 : 1.33
},
maxSpreadZoom: 1.33,
modal: true,
scaleMode: "fit"
};
n.extend(s, e);
var u = function () {
return {
x: 0,
y: 0
}
},
l, c, f, h, p, m, g = {
x: 0,
y: 0
},
v = {
x: 0,
y: 0
},
y = {
x: 0,
y: 0
},
w, b, C, S = {},
x, A, _, T, E, I, k = 0,
M = {},
L = {
x: 0,
y: 0
},
P, O, B = 0,
F, N, U, z, H, $, Y = true,
W, V = [],
G, j, K, Z, X, J, tt, nt = {},
rt = false,
ot, at = function (t, e) {
n.extend(i, e.publicMethods), V.push(t)
},
st = function (index) {
var t = wn();
if (index > t - 1) return index - t;
else if (index < 0) return t + index;
return index
},
ut = {},
lt = function (t, e) {
if (!ut[t]) ut[t] = [];
return ut[t].push(e)
},
ct = function (t) {
var e = ut[t];
if (e) {
var n = Array.prototype.slice.call(arguments);
n.shift();
for (var o = 0; o < e.length; o++) e[o].apply(i, n)
}
},
ft = function () {
return (new Date).getTime()
},
dt = function (t) {
Le = t, i.bg.style.opacity = t * s.bgOpacity
},
ht = function (t, e, n, o, a) {
if (!rt || a && a !== i.currItem) o /= a ? a.fitRatio : i.currItem.fitRatio;
t[H] = _ + e + "px, " + n + "px" + T + " scale(" + o + ")"
},
pt = function (t) {
if (xe) {
if (t)
if (x > i.currItem.fitRatio) {
if (!rt) En(i.currItem, false, true), rt = true
} else if (rt) En(i.currItem), rt = false;
ht(xe, y.x, y.y, x)
}
},
mt = function (t) {
if (t.container) ht(t.container.style, t.initialPosition.x, t.initialPosition.y, t.initialZoomLevel, t)
},
gt = function (t, e) {
e[H] = _ + t + "px, 0px" + T
},
vt = function (t, e) {
if (!s.loop && e) {
var n = h + (L.x * k - t) / L.x,
i = Math.round(t - Se.x);
if (n < 0 && i > 0 || n >= wn() - 1 && i < 0) t = Se.x + i * s.mainScrollEndFriction
}
Se.x = t, gt(t, p)
},
yt = function (t, e) {
var n = _e[t] - M[t];
return v[t] + g[t] + n - n * (e / A)
},
wt = function (t, e) {
if (t.x = e.x, t.y = e.y, e.id) t.id = e.id
},
bt = function (t) {
t.x = Math.round(t.x), t.y = Math.round(t.y)
},
Ct = null,
St = function () {
if (Ct) n.unbind(document, "mousemove", St), n.addClass(template, "pswp--has_mouse"), s.mouseUsed = true, ct("mouseUsed");
Ct = setTimeout((function () {
Ct = null
}), 100)
},
xt = function () {
if (n.bind(document, "keydown", i), tt.transform) n.bind(i.scrollWrap, "click", i);
if (!s.mouseUsed) n.bind(document, "mousemove", St);
n.bind(window, "resize scroll orientationchange", i), ct("bindEvents")
},
At = function () {
if (n.unbind(window, "resize scroll orientationchange", i), n.unbind(window, "scroll", C.scroll), n.unbind(document, "keydown", i), n.unbind(document, "mousemove", St), tt.transform) n.unbind(i.scrollWrap, "click", i);
if (ue) n.unbind(window, w, i);
clearTimeout(ot), ct("unbindEvents")
},
_t = function (t, update) {
var e = xn(i.currItem, S, t);
if (update) Ce = e;
return e
},
Tt = function (t) {
if (!t) t = i.currItem;
return t.initialZoomLevel
},
Dt = function (t) {
if (!t) t = i.currItem;
return t.w > 0 ? s.maxSpreadZoom : 1
},
kt = function (t, e, n, o) {
if (o === i.currItem.initialZoomLevel) return n[t] = i.currItem.initialPosition[t], true;
else if (n[t] = yt(t, o), n[t] > e.min[t]) return n[t] = e.min[t], true;
else if (n[t] < e.max[t]) return n[t] = e.max[t], true;
return false
},
Mt = function () {
if (H) {
var t = tt.perspective && !W;
return _ = "translate" + (t ? "3d(" : "("), T = tt.perspective ? ", 0px)" : ")", void 0
}
H = "left", n.addClass(template, "pswp--ie"), gt = function (t, e) {
e.left = t + "px"
}, mt = function (t) {
var e = t.fitRatio > 1 ? 1 : t.fitRatio,
n = t.container.style,
i = e * t.w,
o = e * t.h;
n.width = i + "px", n.height = o + "px", n.left = t.initialPosition.x + "px", n.top = t.initialPosition.y + "px"
}, pt = function () {
if (xe) {
var t = xe,
e = i.currItem,
n = e.fitRatio > 1 ? 1 : e.fitRatio,
o = n * e.w,
a = n * e.h;
t.width = o + "px", t.height = a + "px", t.left = y.x + "px", t.top = y.y + "px"
}
}
},
Lt = function (t) {
var e = "";
if (s.escKey && 27 === t.keyCode) e = "close";
else if (s.arrowKeys)
if (37 === t.keyCode) e = "prev";
else if (39 === t.keyCode) e = "next";
if (e)
if (!(t.ctrlKey || t.altKey || t.shiftKey || t.metaKey)) {
if (t.preventDefault) t.preventDefault();
else t.returnValue = false;
i[e]()
}
},
Pt = function (t) {
if (t)
if (fe || ce || Ae || ie) t.preventDefault(), t.stopPropagation()
},
Ot = function () {
i.setScrollOffset(0, n.getScrollY())
},
Bt = {},
Rt = 0,
Ft = function (t) {
if (Bt[t]) {
if (Bt[t].raf) j(Bt[t].raf);
Rt--, delete Bt[t]
}
},
Nt = function (t) {
if (Bt[t]) Ft(t);
if (!Bt[t]) Rt++, Bt[t] = {}
},
Ut = function () {
for (var t in Bt)
if (Bt.hasOwnProperty(t)) Ft(t)
},
qt = function (t, e, n, d, i, o, a) {
var s = ft(),
u;
Nt(t);
var l = function () {
if (Bt[t]) {
if ((u = ft() - s) >= d) {
if (Ft(t), o(n), a) a();
return
}
o((n - e) * i(u / d) + e), Bt[t].raf = G(l)
}
};
l()
},
zt = {
shout: ct,
listen: lt,
viewportSize: S,
options: s,
isMainScrollAnimating: function () {
return Ae
},
getZoomLevel: function () {
return x
},
getCurrentIndex: function () {
return h
},
isDragging: function () {
return ue
},
isZooming: function () {
return ye
},
setScrollOffset: function (t, e) {
M.x = t, J = M.y = e, ct("updateScrollOffset", M)
},
applyZoomPan: function (t, e, n, i) {
y.x = e, y.y = n, x = t, pt(i)
},
init: function () {
if (!l && !c) {
var e;
i.framework = n, i.template = template, i.bg = n.getChildByClass(template, "pswp__bg"), K = template.className, l = true, tt = n.detectFeatures(), G = tt.raf, j = tt.caf, H = tt.transform, X = tt.oldIE, i.scrollWrap = n.getChildByClass(template, "pswp__scroll-wrap"), i.container = n.getChildByClass(i.scrollWrap, "pswp__container"), p = i.container.style, i.itemHolders = P = [{
el: i.container.children[0],
wrap: 0,
index: -1
}, {
el: i.container.children[1],
wrap: 0,
index: -1
}, {
el: i.container.children[2],
wrap: 0,
index: -1
}], P[0].el.style.display = P[2].el.style.display = "none", Mt(), C = {
resize: i.updateSize,
orientationchange: function () {
clearTimeout(ot), ot = setTimeout((function () {
if (S.x !== i.scrollWrap.clientWidth) i.updateSize()
}), 500)
},
scroll: Ot,
keydown: Lt,
click: Pt
};
var o = tt.isOldIOSPhone || tt.isOldAndroid || tt.isMobileOpera;
if (!tt.animationName || !tt.transform || o) s.showAnimationDuration = s.hideAnimationDuration = 0;
for (e = 0; e < V.length; e++) i["init" + V[e]]();
if (t) {
var u;
(i.ui = new t(i, n)).init()
}
if (ct("firstUpdate"), h = h || s.index || 0, isNaN(h) || h < 0 || h >= wn()) h = 0;
if (i.currItem = yn(h), tt.isOldIOSPhone || tt.isOldAndroid) Y = false;
if (template.setAttribute("aria-hidden", "false"), s.modal)
if (!Y) template.style.position = "absolute", template.style.top = n.getScrollY() + "px";
else template.style.position = "fixed";
if (void 0 === J) ct("initialLayout"), J = Z = n.getScrollY();
var f = "pswp--open ";
if (s.mainClass) f += s.mainClass + " ";
if (s.showHideOpacity) f += "pswp--animate_opacity ";
for (f += W ? "pswp--touch" : "pswp--notouch", f += tt.animationName ? " pswp--css_animation" : "", f += tt.svg ? " pswp--svg" : "", n.addClass(template, f), i.updateSize(), m = -1, B = null, e = 0; e < a; e++) gt((e + m) * L.x, P[e].el.style);
if (!X) n.bind(i.scrollWrap, b, i);
if (lt("initialZoomInEnd", (function () {
if (i.setContent(P[0], h - 1), i.setContent(P[2], h + 1), P[0].el.style.display = P[2].el.style.display = "block", s.focus) template.focus();
xt()
})), i.setContent(P[1], h), i.updateCurrItem(), ct("afterInit"), !Y) E = setInterval((function () {
if (!Rt && !ue && !ye && x === i.currItem.initialZoomLevel) i.updateSize()
}), 1e3);
n.addClass(template, "pswp--visible")
}
},
close: function () {
if (l) l = false, c = true, ct("close"), At(), fn(i.currItem, null, true, i.destroy)
},
destroy: function () {
if (ct("destroy"), cn) clearTimeout(cn);
if (template.setAttribute("aria-hidden", "true"), template.className = K, E) clearInterval(E);
n.unbind(i.scrollWrap, b, i), n.unbind(window, "scroll", i), Fe(), Ut(), ut = null
},
panTo: function (t, e, n) {
if (!n) {
if (t > Ce.min.x) t = Ce.min.x;
else if (t < Ce.max.x) t = Ce.max.x;
if (e > Ce.min.y) e = Ce.min.y;
else if (e < Ce.max.y) e = Ce.max.y
}
y.x = t, y.y = e, pt()
},
handleEvent: function (t) {
if (t = t || window.event, C[t.type]) C[t.type](t)
},
goTo: function (index) {
var diff = (index = st(index)) - h;
B = diff, h = index, i.currItem = yn(h), k -= diff, vt(L.x * k), Ut(), Ae = false, i.updateCurrItem()
},
next: function () {
i.goTo(h + 1)
},
prev: function () {
i.goTo(h - 1)
},
updateCurrZoomItem: function (t) {
if (t) ct("beforeChange", 0);
if (P[1].el.children.length) {
var e = P[1].el.children[0];
if (n.hasClass(e, "pswp__zoom-wrap")) xe = e.style;
else xe = null
} else xe = null;
if (Ce = i.currItem.bounds, A = x = i.currItem.initialZoomLevel, y.x = Ce.center.x, y.y = Ce.center.y, t) ct("afterChange")
},
invalidateCurrItems: function () {
I = true;
for (var t = 0; t < a; t++)
if (P[t].item) P[t].item.needsUpdate = true
},
updateCurrItem: function (t) {
if (0 !== B) {
var e = Math.abs(B),
n;
if (!(t && e < 2)) {
if (i.currItem = yn(h), rt = false, ct("beforeChange", B), e >= a) m += B + (B > 0 ? -a : a), e = a;
for (var o = 0; o < e; o++)
if (B > 0) n = P.shift(), P[a - 1] = n, m++, gt((m + 2) * L.x, n.el.style), i.setContent(n, h - e + o + 1 + 1);
else n = P.pop(), P.unshift(n), m--, gt(m * L.x, n.el.style), i.setContent(n, h + e - o - 1 - 1);
if (xe && 1 === Math.abs(B)) {
var s = yn(O);
if (s.initialZoomLevel !== x) xn(s, S), En(s), mt(s)
}
B = 0, i.updateCurrZoomItem(), O = h, ct("afterChange")
}
}
},
updateSize: function (t) {
if (!Y && s.modal) {
var e = n.getScrollY();
if (J !== e) template.style.top = e + "px", J = e;
if (!t && nt.x === window.innerWidth && nt.y === window.innerHeight) return;
nt.x = window.innerWidth, nt.y = window.innerHeight, template.style.height = nt.y + "px"
}
if (S.x = i.scrollWrap.clientWidth, S.y = i.scrollWrap.clientHeight, Ot(), L.x = S.x + Math.round(S.x * s.spacing), L.y = S.y, vt(L.x * k), ct("beforeResize"), void 0 !== m) {
for (var o, u, l, c = 0; c < a; c++) {
if (o = P[c], gt((c + m) * L.x, o.el.style), l = h + c - 1, s.loop && wn() > 2) l = st(l);
if ((u = yn(l)) && (I || u.needsUpdate || !u.bounds)) {
if (i.cleanSlide(u), i.setContent(o, l), 1 === c) i.currItem = u, i.updateCurrZoomItem(true);
u.needsUpdate = false
} else if (-1 === o.index && l >= 0) i.setContent(o, l);
if (u && u.container) xn(u, S), En(u), mt(u)
}
I = false
}
if (A = x = i.currItem.initialZoomLevel, Ce = i.currItem.bounds) y.x = Ce.center.x, y.y = Ce.center.y, pt(true);
ct("resize")
},
zoomTo: function (t, e, i, o, a) {
if (e) A = x, _e.x = Math.abs(e.x) - y.x, _e.y = Math.abs(e.y) - y.y, wt(v, y);
var s = _t(t, false),
u = {};
kt("x", s, u, t), kt("y", s, u, t);
var l = x,
c = y.x,
f = y.y;
bt(u);
var h = function (e) {
if (1 === e) x = t, y.x = u.x, y.y = u.y;
else x = (t - l) * e + l, y.x = (u.x - c) * e + c, y.y = (u.y - f) * e + f;
if (a) a(e);
pt(1 === e)
};
if (i) qt("customZoomTo", 0, 1, i, o || n.easing.sine.inOut, h);
else h(1)
}
},
Ht = 30,
$t = 10,
Yt, Wt, Vt = {},
Gt = {},
jt = {},
Kt = {},
Zt = {},
Xt = [],
Jt = {},
Qt, te = [],
ee = {},
ne, ie, re, oe = 0,
ae = {
x: 0,
y: 0
},
se = 0,
ue, le, ce, fe, pe, ge, ve, ye, we, be, Ce, Se = {
x: 0,
y: 0
},
xe, Ae, _e = {
x: 0,
y: 0
},
Te = {
x: 0,
y: 0
},
Ee, Ie, ke, Le, Pe, Oe = function (t, e) {
return t.x === e.x && t.y === e.y
},
Be = function (t, e) {
return Math.abs(t.x - e.x) < o && Math.abs(t.y - e.y) < o
},
Re = function (t, e) {
return ee.x = Math.abs(t.x - e.x), ee.y = Math.abs(t.y - e.y), Math.sqrt(ee.x * ee.x + ee.y * ee.y)
},
Fe = function () {
if (pe) j(pe), pe = null
},
Ne = function () {
if (ue) pe = G(Ne), nn()
},
Ue = function () {
return !("fit" === s.scaleMode && x === i.currItem.initialZoomLevel)
},
qe = function (el, t) {
if (!el || el === document) return false;
if (el.getAttribute("class") && el.getAttribute("class").indexOf("pswp__scroll-wrap") > -1) return false;
if (t(el)) return el;
else return qe(el.parentNode, t)
},
ze = {},
$e = function (t, e) {
return ze.prevent = !qe(t.target, s.isClickableElement), ct("preventDragEvent", t, e, ze), ze.prevent
},
Ye = function (t, e) {
return e.x = t.pageX, e.y = t.pageY, e.id = t.identifier, e
},
We = function (t, e, n) {
n.x = .5 * (t.x + e.x), n.y = .5 * (t.y + e.y)
},
Ve = function (t, e, n) {
if (t - Wt > 50) {
var i = te.length > 2 ? te.shift() : {};
i.x = e, i.y = n, te.push(i), Wt = t
}
},
Ge = function () {
var t = y.y - i.currItem.initialPosition.y;
return 1 - Math.abs(t / (S.y / 2))
},
je = {},
Ke = {},
Ze = [],
Xe, Je = function (t) {
for (; Ze.length > 0;) Ze.pop();
if (!$)
if (t.type.indexOf("touch") > -1) {
if (t.touches && t.touches.length > 0)
if (Ze[0] = Ye(t.touches[0], je), t.touches.length > 1) Ze[1] = Ye(t.touches[1], Ke)
} else je.x = t.pageX, je.y = t.pageY, je.id = "", Ze[0] = je;
else Xe = 0, Xt.forEach((function (t) {
if (0 === Xe) Ze[0] = t;
else if (1 === Xe) Ze[1] = t;
Xe++
}));
return Ze
},
Qe = function (t, e) {
var n, o = 0,
a = y[t] + e[t],
u, l = e[t] > 0,
c = Se.x + e.x,
f = Se.x - Jt.x,
h, p;
if (a > Ce.min[t] || a < Ce.max[t]) n = s.panEndFriction;
else n = 1;
if (a = y[t] + e[t] * n, s.allowPanToNext || x === i.currItem.initialZoomLevel) {
if (!xe) p = c;
else if ("h" === Ee && "x" === t && !ce)
if (l) {
if (a > Ce.min[t]) n = s.panEndFriction, o = Ce.min[t] - a, u = Ce.min[t] - v[t];
if ((u <= 0 || f < 0) && wn() > 1) {
if (p = c, f < 0 && c > Jt.x) p = Jt.x
} else if (Ce.min.x !== Ce.max.x) h = a
} else {
if (a < Ce.max[t]) n = s.panEndFriction, o = a - Ce.max[t], u = v[t] - Ce.max[t];
if ((u <= 0 || f > 0) && wn() > 1) {
if (p = c, f > 0 && c < Jt.x) p = Jt.x
} else if (Ce.min.x !== Ce.max.x) h = a
} if ("x" === t) {
if (void 0 !== p)
if (vt(p, true), p === Jt.x) ge = false;
else ge = true;
if (Ce.min.x !== Ce.max.x)
if (void 0 !== h) y.x = h;
else if (!ge) y.x += e.x * n;
return void 0 !== p
}
}
if (!Ae)
if (!ge)
if (x > i.currItem.fitRatio) y[t] += e[t] * n
},
tn = function (t) {
if (!("mousedown" === t.type && t.button > 0)) {
if (gn) return t.preventDefault(), void 0;
if (!re || "mousedown" !== t.type) {
if ($e(t, true)) t.preventDefault();
if (ct("pointerDown"), $) {
var e = n.arraySearch(Xt, t.pointerId, "id");
if (e < 0) e = Xt.length;
Xt[e] = {
x: t.pageX,
y: t.pageY,
id: t.pointerId
}
}
var o = Je(t),
a = o.length;
if (ve = null, Ut(), !ue || 1 === a) ue = Ie = true, n.bind(window, w, i), ne = Pe = ke = ie = ge = fe = le = ce = false, Ee = null, ct("firstTouchStart", o), wt(v, y), g.x = g.y = 0, wt(Kt, o[0]), wt(Zt, Kt), Jt.x = L.x * k, te = [{
x: Kt.x,
y: Kt.y
}], Wt = Yt = ft(), _t(x, true), Fe(), Ne();
if (!ye && a > 1 && !Ae && !ge) A = x, ce = false, ye = le = true, g.y = g.x = 0, wt(v, y), wt(Vt, o[0]), wt(Gt, o[1]), We(Vt, Gt, Te), _e.x = Math.abs(Te.x) - y.x, _e.y = Math.abs(Te.y) - y.y, we = be = Re(Vt, Gt)
}
}
},
en = function (t) {
if (t.preventDefault(), $) {
var e = n.arraySearch(Xt, t.pointerId, "id");
if (e > -1) {
var i = Xt[e];
i.x = t.pageX, i.y = t.pageY
}
}
if (ue) {
var o = Je(t);
if (!Ee && !fe && !ye)
if (Se.x !== L.x * k) Ee = "h";
else {
var diff = Math.abs(o[0].x - Kt.x) - Math.abs(o[0].y - Kt.y);
if (Math.abs(diff) >= $t) Ee = diff > 0 ? "h" : "v", ve = o
}
else ve = o
}
},
nn = function () {
if (ve) {
var t = ve.length;
if (0 !== t)
if (wt(Vt, ve[0]), jt.x = Vt.x - Kt.x, jt.y = Vt.y - Kt.y, ye && t > 1) {
if (Kt.x = Vt.x, Kt.y = Vt.y, !jt.x && !jt.y && Oe(ve[1], Gt)) return;
if (wt(Gt, ve[1]), !ce) ce = true, ct("zoomGestureStarted");
var e = Re(Vt, Gt),
n = un(e);
if (n > i.currItem.initialZoomLevel + i.currItem.initialZoomLevel / 15) Pe = true;
var o = 1,
a = Tt(),
u = Dt();
if (n < a)
if (s.pinchToClose && !Pe && A <= i.currItem.initialZoomLevel) {
var l, c = 1 - (a - n) / (a / 1.2);
dt(c), ct("onPinchClose", c), ke = true
} else {
if ((o = (a - n) / a) > 1) o = 1;
n = a - o * (a / 3)
}
else if (n > u) {
if ((o = (n - u) / (6 * a)) > 1) o = 1;
n = u + o * a
}
if (o < 0) o = 0;
we = e, We(Vt, Gt, ae), g.x += ae.x - Te.x, g.y += ae.y - Te.y, wt(Te, ae), y.x = yt("x", n), y.y = yt("y", n), ne = n > x, x = n, pt()
} else {
if (!Ee) return;
if (Ie) {
if (Ie = false, Math.abs(jt.x) >= $t) jt.x -= ve[0].x - Zt.x;
if (Math.abs(jt.y) >= $t) jt.y -= ve[0].y - Zt.y
}
if (Kt.x = Vt.x, Kt.y = Vt.y, 0 === jt.x && 0 === jt.y) return;
if ("v" === Ee && s.closeOnVerticalDrag)
if (!Ue()) {
g.y += jt.y, y.y += jt.y;
var f = Ge();
return ie = true, ct("onVerticalDrag", f), dt(f), pt(), void 0
} var h;
if (Ve(ft(), Vt.x, Vt.y), fe = true, Ce = i.currItem.bounds, !Qe("x", jt)) Qe("y", jt), bt(y), pt()
}
}
},
rn = function (t) {
if (tt.isOldAndroid) {
if (re && "mouseup" === t.type) return;
if (t.type.indexOf("touch") > -1) clearTimeout(re), re = setTimeout((function () {
re = 0
}), 600)
}
if (ct("pointerUp"), $e(t, false)) t.preventDefault();
var e;
if ($) {
var o = n.arraySearch(Xt, t.pointerId, "id");
if (o > -1)
if (e = Xt.splice(o, 1)[0], navigator.msPointerEnabled) {
var a = {
4: "mouse",
2: "touch",
3: "pen"
};
if (e.type = a[t.pointerType], !e.type) e.type = t.pointerType || "mouse"
} else e.type = t.pointerType || "mouse"
}
var u = Je(t),
l, c = u.length;
if ("mouseup" === t.type) c = 0;
if (2 === c) return ve = null, true;
if (1 === c) wt(Zt, u[0]);
if (0 === c && !Ee && !Ae) {
if (!e)
if ("mouseup" === t.type) e = {
x: t.pageX,
y: t.pageY,
type: "mouse"
};
else if (t.changedTouches && t.changedTouches[0]) e = {
x: t.changedTouches[0].pageX,
y: t.changedTouches[0].pageY,
type: "touch"
};
ct("touchRelease", t, e)
}
var f = -1;
if (0 === c)
if (ue = false, n.unbind(window, w, i), Fe(), ye) f = 0;
else if (-1 !== se) f = ft() - se;
if (se = 1 === c ? ft() : -1, -1 !== f && f < 150) l = "zoom";
else l = "swipe";
if (ye && c < 2) {
if (ye = false, 1 === c) l = "zoomPointerUp";
ct("zoomGestureEnded")
}
if (ve = null, fe || ce || Ae || ie) {
if (Ut(), !Qt) Qt = on();
if (Qt.calculateSwipeSpeed("x"), !ie) {
if ((ge || Ae) && 0 === c) {
var h;
if (sn(l, Qt)) return;
l = "zoomPointerUp"
}
if (!Ae) {
if ("swipe" !== l) return ln(), void 0;
if (!ge && x > i.currItem.fitRatio) an(Qt)
}
} else {
var p;
if (Ge() < s.verticalDragRange) i.close();
else {
var m = y.y,
g = Le;
qt("verticalDrag", 0, 1, 300, n.easing.cubic.out, (function (t) {
y.y = (i.currItem.initialPosition.y - m) * t + m, dt((1 - g) * t + g), pt()
})), ct("onVerticalDrag", 1)
}
}
}
},
on = function () {
var t, e, i = {
lastFlickOffset: {},
lastFlickDist: {},
lastFlickSpeed: {},
slowDownRatio: {},
slowDownRatioReverse: {},
speedDecelerationRatio: {},
speedDecelerationRatioAbs: {},
distanceOffset: {},
backAnimDestination: {},
backAnimStarted: {},
calculateSwipeSpeed: function (n) {
if (te.length > 1) t = ft() - Wt + 50, e = te[te.length - 2][n];
else t = ft() - Yt, e = Zt[n];
if (i.lastFlickOffset[n] = Kt[n] - e, i.lastFlickDist[n] = Math.abs(i.lastFlickOffset[n]), i.lastFlickDist[n] > 20) i.lastFlickSpeed[n] = i.lastFlickOffset[n] / t;
else i.lastFlickSpeed[n] = 0;
if (Math.abs(i.lastFlickSpeed[n]) < .1) i.lastFlickSpeed[n] = 0;
i.slowDownRatio[n] = .95, i.slowDownRatioReverse[n] = 1 - i.slowDownRatio[n], i.speedDecelerationRatio[n] = 1
},
calculateOverBoundsAnimOffset: function (t, e) {
if (!i.backAnimStarted[t]) {
if (y[t] > Ce.min[t]) i.backAnimDestination[t] = Ce.min[t];
else if (y[t] < Ce.max[t]) i.backAnimDestination[t] = Ce.max[t];
if (void 0 !== i.backAnimDestination[t])
if (i.slowDownRatio[t] = .7, i.slowDownRatioReverse[t] = 1 - i.slowDownRatio[t], i.speedDecelerationRatioAbs[t] < .05) i.lastFlickSpeed[t] = 0, i.backAnimStarted[t] = true, qt("bounceZoomPan" + t, y[t], i.backAnimDestination[t], e || 300, n.easing.sine.out, (function (e) {
y[t] = e, pt()
}))
}
},
calculateAnimOffset: function (t) {
if (!i.backAnimStarted[t]) i.speedDecelerationRatio[t] = i.speedDecelerationRatio[t] * (i.slowDownRatio[t] + i.slowDownRatioReverse[t] - i.slowDownRatioReverse[t] * i.timeDiff / 10), i.speedDecelerationRatioAbs[t] = Math.abs(i.lastFlickSpeed[t] * i.speedDecelerationRatio[t]), i.distanceOffset[t] = i.lastFlickSpeed[t] * i.speedDecelerationRatio[t] * i.timeDiff, y[t] += i.distanceOffset[t]
},
panAnimLoop: function () {
if (Bt.zoomPan)
if (Bt.zoomPan.raf = G(i.panAnimLoop), i.now = ft(), i.timeDiff = i.now - i.lastNow, i.lastNow = i.now, i.calculateAnimOffset("x"), i.calculateAnimOffset("y"), pt(), i.calculateOverBoundsAnimOffset("x"), i.calculateOverBoundsAnimOffset("y"), i.speedDecelerationRatioAbs.x < .05 && i.speedDecelerationRatioAbs.y < .05) return y.x = Math.round(y.x), y.y = Math.round(y.y), pt(), Ft("zoomPan"), void 0
}
};
return i
},
an = function (t) {
if (t.calculateSwipeSpeed("y"), Ce = i.currItem.bounds, t.backAnimDestination = {}, t.backAnimStarted = {}, Math.abs(t.lastFlickSpeed.x) <= .05 && Math.abs(t.lastFlickSpeed.y) <= .05) return t.speedDecelerationRatioAbs.x = t.speedDecelerationRatioAbs.y = 0, t.calculateOverBoundsAnimOffset("x"), t.calculateOverBoundsAnimOffset("y"), true;
Nt("zoomPan"), t.lastNow = ft(), t.panAnimLoop()
},
sn = function (t, e) {
var o, a, u;
if (!Ae) oe = h;
if ("swipe" === t) {
var l = Kt.x - Zt.x,
c = e.lastFlickDist.x < 10;
if (l > Ht && (c || e.lastFlickOffset.x > 20)) a = -1;
else if (l < -Ht && (c || e.lastFlickOffset.x < -20)) a = 1
}
if (a) {
if ((h += a) < 0) h = s.loop ? wn() - 1 : 0, u = true;
else if (h >= wn()) h = s.loop ? 0 : wn() - 1, u = true;
if (!u || s.loop) B += a, k -= a, o = true
}
var f = L.x * k,
p = Math.abs(f - Se.x),
m;
if (!o && f > Se.x != e.lastFlickSpeed.x > 0) m = 333;
else m = Math.abs(e.lastFlickSpeed.x) > 0 ? p / Math.abs(e.lastFlickSpeed.x) : 333, m = Math.min(m, 400), m = Math.max(m, 250);
if (oe === h) o = false;
if (Ae = true, ct("mainScrollAnimStart"), qt("mainScroll", Se.x, f, m, n.easing.cubic.out, vt, (function () {
if (Ut(), Ae = false, oe = -1, o || oe !== h) i.updateCurrItem();
ct("mainScrollAnimComplete")
})), o) i.updateCurrItem(true);
return o
},
un = function (t) {
return 1 / be * t * A
},
ln = function () {
var t = x,
e = Tt(),
o = Dt();
if (x < e) t = e;
else if (x > o) t = o;
var a = 1,
s, u = Le;
if (ke && !ne && !Pe && x < e) return i.close(), true;
if (ke) s = function (t) {
dt((a - u) * t + u)
};
return i.zoomTo(t, 0, 200, n.easing.cubic.out, s), true
};
at("Gestures", {
publicMethods: {
initGestures: function () {
var t = function (t, e, move, n, i) {
if (F = t + e, N = t + move, U = t + n, i) z = t + i;
else z = ""
};
if (($ = tt.pointerEvent) && tt.touch) tt.touch = false;
if ($)
if (navigator.msPointerEnabled) t("MSPointer", "Down", "Move", "Up", "Cancel");
else t("pointer", "down", "move", "up", "cancel");
else if (tt.touch) t("touch", "start", "move", "end", "cancel"), W = true;
else t("mouse", "down", "move", "up");
if (w = N + " " + U + " " + z, b = F, $ && !W) W = navigator.maxTouchPoints > 1 || navigator.msMaxTouchPoints > 1;
if (i.likelyTouchDevice = W, C[F] = tn, C[N] = en, C[U] = rn, z) C[z] = C[U];
if (tt.touch) b += " mousedown", w += " mousemove mouseup", C.mousedown = C[F], C.mousemove = C[N], C.mouseup = C[U];
if (!W) s.allowPanToNext = false
}
}
});
var cn, fn = function (t, e, o, a) {
if (cn) clearTimeout(cn);
var u;
if (gn = true, mn = true, t.initialLayout) u = t.initialLayout, t.initialLayout = null;
else u = s.getThumbBoundsFn && s.getThumbBoundsFn(h);
var l = o ? s.hideAnimationDuration : s.showAnimationDuration,
c = function () {
if (Ft("initialZoom"), !o) {
if (dt(1), e) e.style.display = "block";
n.addClass(template, "pswp--animated-in"), ct("initialZoom" + (o ? "OutEnd" : "InEnd"))
} else i.template.removeAttribute("style"), i.bg.removeAttribute("style");
if (a) a();
gn = false
};
if (l && u && void 0 !== u.x) {
var p;
(function () {
var e = f,
a = !i.currItem.src || i.currItem.loadError || s.showHideOpacity;
if (t.miniImg) t.miniImg.style.webkitBackfaceVisibility = "hidden";
if (!o) x = u.w / t.w, y.x = u.x, y.y = u.y - Z, i[a ? "template" : "bg"].style.opacity = .001, pt();
if (Nt("initialZoom"), o && !e) n.removeClass(template, "pswp--animated-in");
if (a)
if (o) n[(e ? "remove" : "add") + "Class"](template, "pswp--animate_opacity");
else setTimeout((function () {
n.addClass(template, "pswp--animate_opacity")
}), 30);
cn = setTimeout((function () {
if (ct("initialZoom" + (o ? "Out" : "In")), !o) {
if (x = t.initialZoomLevel, wt(y, t.initialPosition), pt(), dt(1), a) template.style.opacity = 1;
else dt(1);
cn = setTimeout(c, l + 20)
} else {
var i = u.w / t.w,
s = {
x: y.x,
y: y.y
},
f = x,
h = Le,
p = function (t) {
if (1 === t) x = i, y.x = u.x, y.y = u.y - J;
else x = (i - f) * t + f, y.x = (u.x - s.x) * t + s.x, y.y = (u.y - J - s.y) * t + s.y;
if (pt(), a) template.style.opacity = 1 - t;
else dt(h - t * h)
};
if (e) qt("initialZoom", 0, 1, l, n.easing.cubic.out, p, c);
else p(1), cn = setTimeout(c, l + 20)
}
}), o ? 25 : 90)
})()
} else if (ct("initialZoom" + (o ? "Out" : "In")), x = t.initialZoomLevel, wt(y, t.initialPosition), pt(), template.style.opacity = o ? 0 : 1, dt(1), l) setTimeout((function () {
c()
}), l);
else c()
},
dn, hn = {},
pn = [],
mn, gn, vn = {
index: 0,
errorMsg: '
"].join("")
}
function u(t, e, n) {
var i = e.currentMonth,
r = e.currentYear,
o = e.dateSelected,
a = e.maxDate,
s = e.minDate,
u = e.showAllDates,
d = e.days,
l = e.disabledDates,
c = e.startDay,
f = e.weekendIndices,
h = e.events,
p = e.getRange ? e.getRange() : {},
m = +p.start,
v = +p.end,
y = g(new Date(t).setDate(1)),
w = y.getDay() - c,
D = w < 0 ? 7 : 0;
y.setMonth(y.getMonth() + 1), y.setDate(0);
var b = y.getDate(),
q = [],
C = D + 7 * ((w + b) / 7 | 0);
C += (w + b) % 7 ? 7 : 0;
for (var S = 1; S <= C; S++) {
var x = (S - 1) % 7,
A = d[x],
_ = S - (w >= 0 ? w : 7 + w),
T = new Date(r, i, _),
E = h[+T],
I = _ < 1 || _ > b,
k = I ? _ < 1 ? -1 : 1 : 0,
M = I && !u,
L = M ? "" : T.getDate(),
P = +T == +o,
O = x === f[0] || x === f[1],
B = m !== v,
F = "qs-square " + A;
E && !M && (F += " qs-event"), I && (F += " qs-outside-current-month"), !u && I || (F += " qs-num"), P && (F += " qs-active"), (l[+T] || e.disabler(T) || O && e.noWeekends || s && +T < +s || a && +T > +a) && !M && (F += " qs-disabled"), +g(new Date) == +T && (F += " qs-current"), +T === m && v && B && (F += " qs-range-start"), +T > m && +T < v && (F += " qs-range-middle"), +T === v && m && B && (F += " qs-range-end"), M && (F += " qs-empty", L = ""), q.push('
' + L + "
")
}
var R = d.map((function (t) {
return '
' + t + "
"
})).concat(q);
return R.unshift('
'), R.push("
"), R.join("")
}
function l(t, e) {
var n = t.overlayPlaceholder,
i = t.overlayButton;
return ['