1/*! Magnific Popup - v1.1.0 - 2016-02-20 2* http://dimsemenov.com/plugins/magnific-popup/ 3* Copyright (c) 2016 Dmitry Semenov; */ 4!function (a) { 5 "function" == typeof define && define.amd ? define(["jquery"], a) : a("object" == typeof exports ? require("jquery") : window.jQuery || window.Zepto) 6}(function (a) { 7 var b, c, d, e, f, g, h = "Close", i = "BeforeClose", j = "AfterClose", k = "BeforeAppend", l = "MarkupParse", 8 m = "Open", n = "Change", o = "mfp", p = "." + o, q = "mfp-ready", r = "mfp-removing", s = "mfp-prevent-close", 9 t = function () { 10 }, u = !!window.jQuery, v = a(window), w = function (a, c) { 11 b.ev.on(o + a + p, c) 12 }, x = function (b, c, d, e) { 13 var f = document.createElement("div"); 14 return f.className = "mfp-" + b, d && (f.innerHTML = d), e ? c && c.appendChild(f) : (f = a(f), c && f.appendTo(c)), f 15 }, y = function (c, d) { 16 b.ev.triggerHandler(o + c, d), b.st.callbacks && (c = c.charAt(0).toLowerCase() + c.slice(1), b.st.callbacks[c] && b.st.callbacks[c].apply(b, a.isArray(d) ? d : [d])) 17 }, z = function (c) { 18 return c === g && b.currTemplate.closeBtn || (b.currTemplate.closeBtn = a(b.st.closeMarkup.replace("%title%", b.st.tClose)), g = c), b.currTemplate.closeBtn 19 }, A = function () { 20 a.magnificPopup.instance || (b = new t, b.init(), a.magnificPopup.instance = b) 21 }, B = function () { 22 var a = document.createElement("p").style, b = ["ms", "O", "Moz", "Webkit"]; 23 if (void 0 !== a.transition) return !0; 24 for (; b.length;) if (b.pop() + "Transition" in a) return !0; 25 return !1 26 }; 27 t.prototype = { 28 constructor: t, init: function () { 29 var c = navigator.appVersion; 30 b.isLowIE = b.isIE8 = document.all && !document.addEventListener, b.isAndroid = /android/gi.test(c), b.isIOS = /iphone|ipad|ipod/gi.test(c), b.supportsTransition = B(), b.probablyMobile = b.isAndroid || b.isIOS || /(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent), d = a(document), b.popupsCache = {} 31 }, open: function (c) { 32 var e; 33 if (c.isObj === !1) { 34 b.items = c.items.toArray(), b.index = 0; 35 var g, h = c.items; 36 for (e = 0; e < h.length; e++) if (g = h[e], g.parsed && (g = g.el[0]), g === c.el[0]) { 37 b.index = e; 38 break 39 } 40 } else b.items = a.isArray(c.items) ? c.items : [c.items], b.index = c.index || 0; 41 if (b.isOpen) return void b.updateItemHTML(); 42 b.types = [], f = "", c.mainEl && c.mainEl.length ? b.ev = c.mainEl.eq(0) : b.ev = d, c.key ? (b.popupsCache[c.key] || (b.popupsCache[c.key] = {}), b.currTemplate = b.popupsCache[c.key]) : b.currTemplate = {}, b.st = a.extend(!0, {}, a.magnificPopup.defaults, c), b.fixedContentPos = "auto" === b.st.fixedContentPos ? !b.probablyMobile : b.st.fixedContentPos, b.st.modal && (b.st.closeOnContentClick = !1, b.st.closeOnBgClick = !1, b.st.showCloseBtn = !1, b.st.enableEscapeKey = !1), b.bgOverlay || (b.bgOverlay = x("bg").on("click" + p, function () { 43 b.close() 44 }), b.wrap = x("wrap").attr("tabindex", -1).on("click" + p, function (a) { 45 b._checkIfClose(a.target) && b.close() 46 }), b.container = x("container", b.wrap)), b.contentContainer = x("content"), b.st.preloader && (b.preloader = x("preloader", b.container, b.st.tLoading)); 47 var i = a.magnificPopup.modules; 48 for (e = 0; e < i.length; e++) { 49 var j = i[e]; 50 j = j.charAt(0).toUpperCase() + j.slice(1), b["init" + j].call(b) 51 } 52 y("BeforeOpen"), b.st.showCloseBtn && (b.st.closeBtnInside ? (w(l, function (a, b, c, d) { 53 c.close_replaceWith = z(d.type) 54 }), f += " mfp-close-btn-in") : b.wrap.append(z())), b.st.alignTop && (f += " mfp-align-top"), b.fixedContentPos ? b.wrap.css({ 55 overflow: b.st.overflowY, 56 overflowX: "hidden", 57 overflowY: b.st.overflowY 58 }) : b.wrap.css({ 59 top: v.scrollTop(), 60 position: "absolute" 61 }), (b.st.fixedBgPos === !1 || "auto" === b.st.fixedBgPos && !b.fixedContentPos) && b.bgOverlay.css({ 62 height: d.height(), 63 position: "absolute" 64 }), b.st.enableEscapeKey && d.on("keyup" + p, function (a) { 65 27 === a.keyCode && b.close() 66 }), v.on("resize" + p, function () { 67 b.updateSize() 68 }), b.st.closeOnContentClick || (f += " mfp-auto-cursor"), f && b.wrap.addClass(f); 69 var k = b.wH = v.height(), n = {}; 70 if (b.fixedContentPos && b._hasScrollBar(k)) { 71 var o = b._getScrollbarSize(); 72 o && (n.marginRight = o) 73 } 74 b.fixedContentPos && (b.isIE7 ? a("body, html").css("overflow", "hidden") : n.overflow = "hidden"); 75 var r = b.st.mainClass; 76 return b.isIE7 && (r += " mfp-ie7"), r && b._addClassToMFP(r), b.updateItemHTML(), y("BuildControls"), a("html").css(n), b.bgOverlay.add(b.
76wrap).prependTo(b.st.prependTo || a(document.body)), b._lastFocusedEl = document.activeElement, setTimeout(function () { 77 b.content ? (b._addClassToMFP(q), b._setFocus()) : b.bgOverlay.addClass(q), d.on("focusin" + p, b._onFocusIn) 78 }, 16), b.isOpen = !0, b.updateSize(k), y(m), c 79 }, close: function () { 80 b.isOpen && (y(i), b.isOpen = !1, b.st.removalDelay && !b.isLowIE && b.supportsTransition ? (b._addClassToMFP(r), setTimeout(function () { 81 b._close() 82 }, b.st.removalDelay)) : b._close()) 83 }, _close: function () { 84 y(h); 85 var c = r + " " + q + " "; 86 if (b.bgOverlay.detach(), b.wrap.detach(), b.container.empty(), b.st.mainClass && (c += b.st.mainClass + " "), b._removeClassFromMFP(c), b.fixedContentPos) { 87 var e = {marginRight: ""}; 88 b.isIE7 ? a("body, html").css("overflow", "") : e.overflow = "", a("html").css(e) 89 } 90 d.off("keyup" + p + " focusin" + p), b.ev.off(p), b.wrap.attr("class", "mfp-wrap").removeAttr("style"), b.bgOverlay.attr("class", "mfp-bg"), b.container.attr("class", "mfp-container"), !b.st.showCloseBtn || b.st.closeBtnInside && b.currTemplate[b.currItem.type] !== !0 || b.currTemplate.closeBtn && b.currTemplate.closeBtn.detach(), b.st.autoFocusLast && b._lastFocusedEl && a(b._lastFocusedEl).focus(), b.currItem = null, b.content = null, b.currTemplate = null, b.prevHeight = 0, y(j) 91 }, updateSize: function (a) { 92 if (b.isIOS) { 93 var c = document.documentElement.clientWidth / window.innerWidth, d = window.innerHeight * c; 94 b.wrap.css("height", d), b.wH = d 95 } else b.wH = a || v.height(); 96 b.fixedContentPos || b.wrap.css("height", b.wH), y("Resize") 97 }, updateItemHTML: function () { 98 var c = b.items[b.index]; 99 b.contentContainer.detach(), b.content && b.content.detach(), c.parsed || (c = b.parseEl(b.index)); 100 var d = c.type; 101 if (y("BeforeChange", [b.currItem ? b.currItem.type : "", d]), b.currItem = c, !b.currTemplate[d]) { 102 var f = b.st[d] ? b.st[d].markup : !1; 103 y("FirstMarkupParse", f), f ? b.currTemplate[d] = a(f) : b.currTemplate[d] = !0 104 } 105 e && e !== c.type && b.container.removeClass("mfp-" + e + "-holder"); 106 var g = b["get" + d.charAt(0).toUpperCase() + d.slice(1)](c, b.currTemplate[d]); 107 b.appendContent(g, d), c.preloaded = !0, y(n, c), e = c.type, b.container.prepend(b.contentContainer), y("AfterChange") 108 }, appendContent: function (a, c) { 109 b.content = a, a ? b.st.showCloseBtn && b.st.closeBtnInside && b.currTemplate[c] === !0 ? b.content.find(".mfp-close").length || b.content.append(z()) : b.content = a : b.content = "", y(k), b.container.addClass("mfp-" + c + "-holder"), b.contentContainer.append(b.content) 110 }, parseEl: function (c) { 111 var d, e = b.items[c]; 112 if (e.tagName ? e = {el: a(e)} : (d = e.type, e = {data: e, src: e.src}), e.el) { 113 for (var f = b.types, g = 0; g < f.length; g++) if (e.el.hasClass("mfp-" + f[g])) { 114 d = f[g]; 115 break 116 } 117 e.src = e.el.attr("data-mfp-src"), e.src || (e.src = e.el.attr("href")) 118 } 119 return e.type = d || b.st.type || "inline", e.index = c, e.parsed = !0, b.items[c] = e, y("ElementParse", e), b.items[c] 120 }, addGroup: function (a, c) { 121 var d = function (d) { 122 d.mfpEl = this, b._openClick(d, a, c) 123 }; 124 c || (c = {}); 125 var e = "click.magnificPopup"; 126 c.mainEl = a, c.items ? (c.isObj = !0, a.off(e).on(e, d)) : (c.isObj = !1, c.delegate ? a.off(e).on(e, c.delegate, d) : (c.items = a, a.off(e).on(e, d))) 127 }, _openClick: function (c, d, e) { 128 var f = void 0 !== e.midClick ? e.midClick : a.magnificPopup.defaults.midClick; 129 if (f || !(2 === c.which || c.ctrlKey || c.metaKey || c.altKey || c.shift
129Key)) { 130 var g = void 0 !== e.disableOn ? e.disableOn : a.magnificPopup.defaults.disableOn; 131 if (g) if (a.isFunction(g)) { 132 if (!g.call(b)) return !0 133 } else if (v.width() < g) return !0; 134 c.type && (c.preventDefault(), b.isOpen && c.stopPropagation()), e.el = a(c.mfpEl), e.delegate && (e.items = d.find(e.delegate)), b.open(e) 135 } 136 }, updateStatus: function (a, d) { 137 if (b.preloader) { 138 c !== a && b.container.removeClass("mfp-s-" + c), d || "loading" !== a || (d = b.st.tLoading); 139 var e = {status: a, text: d}; 140 y("UpdateStatus", e), a = e.status, d = e.text, b.preloader.html(d), b.preloader.find("a").on("click", function (a) { 141 a.stopImmediatePropagation() 142 }), b.container.addClass("mfp-s-" + a), c = a 143 } 144 }, _checkIfClose: function (c) { 145 if (!a(c).hasClass(s)) { 146 var d = b.st.closeOnContentClick, e = b.st.closeOnBgClick; 147 if (d && e) return !0; 148 if (!b.content || a(c).hasClass("mfp-close") || b.preloader && c === b.preloader[0]) return !0; 149 if (c === b.content[0] || a.contains(b.content[0], c)) { 150 if (d) return !0 151 } else if (e && a.contains(document, c)) return !0; 152 return !1 153 } 154 }, _addClassToMFP: function (a) { 155 b.bgOverlay.addClass(a), b.wrap.addClass(a) 156 }, _removeClassFromMFP: function (a) { 157 this.bgOverlay.removeClass(a), b.wrap.removeClass(a) 158 }, _hasScrollBar: function (a) { 159 return (b.isIE7 ? d.height() : document.body.scrollHeight) > (a || v.height()) 160 }, _setFocus: function () { 161 (b.st.focus ? b.content.find(b.st.focus).eq(0) : b.wrap).focus() 162 }, _onFocusIn: function (c) { 163 return c.target === b.wrap[0] || a.contains(b.wrap[0], c.target) ? void 0 : (b._setFocus(), !1) 164 }, _parseMarkup: function (b, c, d) { 165 var e; 166 d.data && (c = a.extend(d.data, c)), y(l, [b, c, d]), a.each(c, function (c, d) { 167 if (void 0 === d || d === !1) return !0; 168 if (e = c.split("_"), e.length > 1) { 169 var f = b.find(p + "-" + e[0]); 170 if (f.length > 0) { 171 var g = e[1]; 172 "replaceWith" === g ? f[0] !== d[0] && f.replaceWith(d) : "img" === g ? f.is("img") ? f.attr("src", d) : f.replaceWith(a("<img>").attr("src", d).attr("class", f.attr("class"))) : f.attr(e[1], d) 173 } 174 } else b.find(p + "-" + c).html(d) 175 }) 176 }, _getScrollbarSize: function () { 177 if (void 0 === b.scrollbarSize) { 178 var a = document.createElement("div"); 179 a.style.cssText = "width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;", document.body.appendChild(a), b.scrollbarSize = a.offsetWidth - a.clientWidth, document.body.removeChild(a) 180 } 181 return b.scrollbarSize 182 } 183 }, a.magnificPopup = { 184 instance: null, 185 proto: t.prototype, 186 modules: [], 187 open: function (b, c) { 188 return A(), b = b ? a.extend(!0, {}, b) : {}, b.isObj = !0, b.index = c || 0, this.instance.open(b) 189 }, 190 close: function () { 191 return a.magnificPopup.instance && a.magnificPopup.instance.close() 192 }, 193 registerModule: function (b, c) { 194 c.options && (a.magnificPopup.defaults[b] = c.options), a.extend(this.proto, c.proto), this.modules.push(b) 195 }, 196 defaults: { 197 disableOn: 0, 198 key: null, 199 midClick: !1, 200 mainClass: "", 201 preloader: !0, 202 focus: "", 203 closeOnContentClick: !1, 204 closeOnBgClick: !0, 205 closeBtnInside: !0, 206 showCloseBtn: !0, 207 enableEscapeKey: !0, 208 modal: !1, 209 alignTop: !1, 210 removalDelay: 0, 211 prependTo: null, 212 fixedContentPos: "auto", 213 fixedBgPos: "auto", 214 overflowY: "auto", 215 closeMarkup: '<button title="%title%" type="button" class="mfp-close">×</button>', 216 tClose: "Close (Esc)", 217 tLoading: "Loading...", 218 autoFocusLast: !0 219 } 220 }, a.fn.magnificPopup = function (c) { 221 A(); 222 var d = a(this); 223 if ("string" == typeof c) if ("open" === c) { 224 var e, f = u ? d.data("magnificPopup") : d[0].magnificPopup, g = parseInt(arguments[1], 10) || 0; 225 f.items ? e = f.items[g] : (e = d, f.delegate && (e = e.find(f.delegate)), e = e.eq(g)), b._openClick({mfpEl: e}, d, f) 226 } else b.isOpen && b[c].apply(b, Array.prototype.slice.call(arguments, 1)); else c = a.extend(!0, {}, c), u ? d.data("magnificPopup", c) : d[0].magnificPopup = c, b.addGroup(d, c); 227 return d 228 }; 229 var C, D, E, F = "inline", G = function () { 230 E && (D.after(E.addClass(C)).detach(), E = null) 231 }; 232 a.magnificPopup.registerModule(F, { 233 options: {hiddenClass: "hide", markup: "", tNotFound: "Content not found"}, 234 proto: { 235 initInline: function () { 236 b.types.push(F), w(h + "." + F, function () { 237 G() 238 }) 239 }, getInline: function (c, d) { 240 if (G(), c.src) { 241 var e = b.st.inline, f = a(c.src); 242 if (f.length) { 243 var g = f[0].parentNode; 244 g && g.tagName && (D || (C = e.hiddenClass, D = x(C), C = "mfp-" + C), E = f.after(D).detach().removeClass(C)), b.updateStatus("ready") 245 } else b.updateStatus("error", e.tNotFound), f = a("<div>"); 246 return c.inlineElement = f, f 247 } 248 return b.updateStatus("ready"), b._parseMarkup(d, {}, c), d 249 } 250 } 251 }); 252 var H, I = "ajax", J = function () { 253 H && a(document.body).removeClass(H) 254 }, K = function () { 255 J(), b.req && b.req.abort() 256 }; 257 a.magnificPopup.registerModule(I, { 258 options: { 259 settings: null, 260 cursor: "mfp-ajax-cur", 261 tError: '<a href="%url%">The content</a> could not be loaded.' 262 }, proto: { 263 initAjax: function () { 264 b.types.push(I), H = b.st.ajax.cursor, w(h + "." + I, K), w("BeforeChange." + I, K) 265 }, getAjax: function (c) { 266 H && a(document.body).addClass(H), b.updateStatus("loading"); 267 var d = a.extend({ 268 url: c.src, success: function (d, e, f) { 269 var g = {data: d, xhr: f}; 270 y("ParseAjax", g), b.appendContent(a(g.data), I), c.finished = !0, J(), b._setFocus(), setTimeout(function () { 271 b.wrap.addClass(q) 272 }, 16), b.updateStatus("ready"), y("AjaxContentAdded") 273 }, error: function () { 274 J(), c.finished = c.loadError = !0, b.updateStatus("error", b.st.ajax.tError.replace("%url%", c.src)) 275 } 276 }, b.st.ajax.settings); 277 return b.req = a.ajax(d), "" 278 } 279 } 280 }); 281 var L, M = function (c) { 282 if (c.data && void 0 !== c.data.title) return c.data.title;
283 var d = b.st.image.titleSrc; 284 if (d) { 285 if (a.isFunction(d)) return d.call(b, c); 286 if (c.el) return c.el.attr(d) || "" 287 } 288 return "" 289 }; 290 a.magnificPopup.registerModule("image", { 291 options: { 292 markup: '<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>', 293 cursor: "mfp-zoom-out-cur", 294 titleSrc: "title", 295 verticalFit: !0, 296 tError: '<a href="%url%">The image</a> could not be loaded.' 297 }, proto: { 298 initImage: function () { 299 var c = b.st.image, d = ".image"; 300 b.types.push("image"), w(m + d, function () { 301 "image" === b.currItem.type && c.cursor && a(document.body).addClass(c.cursor) 302 }), w(h + d, function () { 303 c.cursor && a(document.body).removeClass(c.cursor), v.off("resize" + p) 304 }), w("Resize" + d, b.resizeImage), b.isLowIE && w("AfterChange", b.resizeImage) 305 }, resizeImage: function () { 306 var a = b.currItem; 307 if (a && a.img && b.st.image.verticalFit) { 308 var c = 0; 309 b.isLowIE && (c = parseInt(a.img.css("padding-top"), 10) + parseInt(a.img.css("padding-bottom"), 10)), a.img.css("max-height", b.wH - c) 310 } 311 }, _onImageHasSize: function (a) { 312 a.img && (a.hasSize = !0, L && clearInterval(L), a.isCheckingImgSize = !1, y("ImageHasSize", a), a.imgHidden && (b.content && b.content.removeClass("mfp-loading"), a.imgHidden = !1)) 313 }, findImageSize: function (a) { 314 var c = 0, d = a.img[0], e = function (f) { 315 L && clearInterval(L), L = setInterval(function () { 316 return d.naturalWidth > 0 ? void b._onImageHasSize(a) : (c > 200 && clearInterval(L), c++, void (3 === c ? e(10) : 40 === c ? e(50) : 100 === c && e(500))) 317 }, f) 318 }; 319 e(1) 320 }, getImage: function (c, d) { 321 var e = 0, f = function () { 322 c && (c.img[0].complete ? (c.img.off(".mfploader"), c === b.currItem && (b._onImageHasSize(c), b.updateStatus("ready")), c.hasSize = !0, c.loaded = !0, y("ImageLoadComplete")) : (e++, 200 > e ? setTimeout(f, 100) : g())) 323 }, g = function () { 324 c && (c.img.off(".mfploader"), c === b.currItem && (b._onImageHasSize(c), b.updateStatus("error", h.tError.replace("%url%", c.src))), c.hasSize = !0, c.loaded = !0, c.loadError = !0) 325 }, h = b.st.image, i = d.find(".mfp-img"); 326 if (i.length) { 327 var j = document.createElement("img"); 328 j.className = "mfp-img", c.el && c.el.find("img").length && (j.alt = c.el.find("img").attr("alt")), c.img = a(j).on("load.mfploader", f).on("error.mfploader", g), j.src = c.src, i.is("img") && (c.img = c.img.clone()), j = c.img[0], j.naturalWidth > 0 ? c.hasSize = !0 : j.width || (c.hasSize = !1) 329 } 330 return b._parseMarkup(d, { 331 title: M(c), 332 img_replaceWith: c.img 333 }, c), b.resizeImage(), c.hasSize ? (L && clearInterval(L), c.loadError ? (d.addClass("mfp-loading"), b.updateStatus("error", h.tError.replace("%url%", c.src))) : (d.removeClass("mfp-loading"), b.updateStatus("ready")), d) : (b.updateStatus("loading"), c.loading = !0, c.hasSize || (c.imgHidden = !0, d.addClass("mfp-loading"), b.findImageSize(c)), d) 334 } 335 } 336 }); 337 var N, O = function () { 338 return void 0 === N && (N = void 0 !== document.createElement("p").style.MozTransform), N 339 }; 340 a.magnificPopup.registerModule("zoom", { 341 options: { 342 enabled: !1, easing: "ease-in-out", duration: 300, opener: function (a) { 343 return a.is("img") ? a : a.find("img") 344 } 345 }, proto: { 346 initZoom: function () { 347 var a, c = b.st.zoom, d = ".zoom"; 348 if (c.enabled && b.supportsTransition) { 349 var e, f, g = c.duration, j = function (a) { 350 var b = a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"), 351 d = "all " + c.duration / 1e3 + "s " + c.easing, e = { 352 position: "fixed", 353 zIndex: 9999, 354 left: 0, 355 top: 0, 356 "-webkit-backface-visibility": "hidden" 357 }, f = "transition"; 358 return e["-webkit-" + f] = e["-moz-" + f] = e["-o-" + f] = e[f] = d, b.css(e), b 359 }, k = function () { 360 b.content.css("visibility", "visible") 361 }; 362 w("BuildControls" + d, function () { 363 if (b._allowZoom()) { 364 if (clearTimeout(e), b.content.css("visibility", "hidden"), a = b._getItemToZoom(), !a) return void k(); 365 f = j(a), f.css(b._getOffset()), b.wrap.append(f), e = setTimeout(function () { 366 f.css(b._getOffset(!0)), e = setTimeout(function () { 367 k(), setTimeout(function () { 368 f.remove(), a = f = null, y("ZoomAnimationEnded") 369 }, 16) 370 }, g) 371 }, 16) 372 } 373 }), w(i + d, function () { 374 if (b._allowZoom()) { 375 if (clearTimeout(e), b.st.removalDelay = g, !a) { 376 if (a = b._getItemToZoom(), !a) return; 377 f = j(a) 378 } 379 f.css(b._getOffset(!0)), b.wrap.append(f), b.content.css("visibility", "hidden"), setTimeout(function () { 380 f.css(b._getOffset()) 381 }, 16) 382 } 383 }), w(h + d, function () { 384 b._allowZoom() && (k(), f && f.remove(), a = null) 385 }) 386 } 387 }, _allowZoom: function () { 388 return "image" === b.currItem.type 389 }, _getItemToZoom: function () { 390 return b.currItem.hasSize ? b.currItem.img : !1 391 }, _getOffset: function (c) { 392 var d; 393 d = c ? b.currItem.img : b.st.zoom.opener(b.currItem.el || b.currItem); 394 var e = d.offset(), f = parseInt(d.css("padding-top"), 10), g = parseInt(d.css("padding-bottom"), 10); 395 e.top -= a(window).scrollTop() - f; 396 var h = {width: d.width(), height: (u ? d.innerHeight() : d[0].offsetHeight) - g - f}; 397 return O() ? h["-moz-transform"] = h.transform = "translate(" + e.left + "px," + e.top + "px)" : (h.left = e.left, h.top = e.top), h 398 } 399 } 400 }); 401 var P = "iframe", Q = "//about:blank", R = function (a) { 402 if (b.currTemplate[P]) { 403 var c = b.currTemplate[P].find("iframe"); 404 c.length && (a || (c[0].src = Q), b.isIE8 && c.css("display", a ? "block" : "none")) 405 } 406 }; 407 a.magnificPopup.registerModule(P, { 408 options: { 409 markup: '<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>', 410 srcAction: "iframe_src", 411 patterns: { 412 youtube: { 413 index: "youtube.com", 414 id: "v=", 415 src: "//www.youtube-nocookie.com/embed/%id%?autoplay=1" 416 }, 417 vimeo: {index: "vimeo.com/", id: "/", src: "//player.vimeo.com/video/%id%?autoplay=1"}, 418 gmaps: {index: "//maps.google.", src: "%id%&output=embed"} 419 } 420 }, proto: { 421 initIframe: function () { 422 b.types.push(P), w("BeforeChange", function (a, b, c) { 423 b !== c && (b === P ? R() : c === P && R(!0)) 424 }), w(h + "." + P, function () { 425 R() 426 }) 427 }, getIframe: function (c, d) { 428 var e = c.src, f = b.st.iframe; 429 a.each(f.patterns, function () { 430 return e.indexOf(this.index) > -1 ? (this.id && (e = "string" == typeof this.id ? e.substr(e.lastIndexOf(this.id
430) + this.id.length, e.length) : this.id.call(this, e)), e = this.src.replace("%id%", e), !1) : void 0 431 }); 432 var g = {}; 433 return f.srcAction && (g[f.srcAction] = e), b._parseMarkup(d, g, c), b.updateStatus("ready"), d 434 } 435 } 436 }); 437 var S = function (a) { 438 var c = b.items.length; 439 return a > c - 1 ? a - c : 0 > a ? c + a : a 440 }, T = function (a, b, c) { 441 return a.replace(/%curr%/gi, b + 1).replace(/%total%/gi, c) 442 }; 443 a.magnificPopup.registerModule("gallery", { 444 options: { 445 enabled: !1, 446 arrowMarkup: '<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>', 447 preload: [0, 2], 448 navigateByImgClick: !0, 449 arrows: !0, 450 tPrev: "Previous (Left arrow key)", 451 tNext: "Next (Right arrow key)", 452 tCounter: "%curr% of %total%" 453 }, proto: { 454 initGallery: function () { 455 var c = b.st.gallery, e = ".mfp-gallery"; 456 return b.direction = !0, c && c.enabled ? (f += " mfp-gallery", w(m + e, function () { 457 c.navigateByImgClick && b.wrap.on("click" + e, ".mfp-img", function () { 458 return b.items.length > 1 ? (b.next(), !1) : void 0 459 }), d.on("keydown" + e, function (a) { 460 37 === a.keyCode ? b.prev() : 39 === a.keyCode && b.next() 461 }) 462 }), w("UpdateStatus" + e, function (a, c) { 463 c.text && (c.text = T(c.text, b.currItem.index, b.items.length)) 464 }), w(l + e, function (a, d, e, f) { 465 var g = b.items.length; 466 e.counter = g > 1 ? T(c.tCounter, f.index, g) : "" 467 }), w("BuildControls" + e, function () { 468 if (b.items.length > 1 && c.arrows && !b.arrowLeft) { 469 var d = c.arrowMarkup, 470 e = b.arrowLeft = a(d.replace(/%title%/gi, c.tPrev).replace(/%dir%/gi, "left")).addClass(s), 471 f = b.arrowRight = a(d.replace(/%title%/gi, c.tNext).replace(/%dir%/gi, "right")).addClass(s); 472 e.click(function () { 473 b.prev() 474 }), f.click(function () { 475 b.next() 476 }), b.container.append(e.add(f)) 477 } 478 }), w(n + e, function () { 479 b._preloadTimeout && clearTimeout(b._preloadTimeout), b._preloadTimeout = setTimeout(function () { 480 b.preloadNearbyImages(), b._preloadTimeout = null 481 }, 16) 482 }), void w(h + e, function () { 483 d.off(e), b.wrap.off("click" + e), b.arrowRight = b.arrowLeft = null 484 })) : !1 485 }, next: function () { 486 b.direction = !0, b.index = S(b.index + 1), b.updateItemHTML() 487 }, prev: function () { 488 b.direction = !1, b.index = S(b.index - 1), b.updateItemHTML() 489 }, goTo: function (a) { 490 b.direction = a >= b.index, b.index = a, b.updateItemHTML() 491 }, preloadNearbyImages: function () { 492 var a, c = b.st.gallery.preload, d = Math.min(c[0], b.items.length), e = Math.min(c[1], b.items.length); 493 for (a = 1; a <= (b.direction ? e : d); a++) b._preloadItem(b.index + a); 494 for (a = 1; a <= (b.direction ? d : e); a++) b._preloadItem(b.index - a) 495 }, _preloadItem: function (c) { 496 if (c = S(c), !b.items[c].preloaded) { 497 var d = b.items[c]; 498 d.parsed || (d = b.parseEl(c)), y("LazyLoad", d), "image" === d.type && (d.img = a('<img class="mfp-img" />').on("load.mfploader", function () { 499 d.hasSize = !0 500 }).on("error.mfploader", function () { 501 d.hasSize = !0, d.loadError = !0, y("LazyLoadError", d) 502 }).attr("src", d.src)), d.preloaded = !0 503 } 504 } 505 } 506 }); 507 var U = "retina"; 508 a.magnificPopup.registerModule(U, { 509 options: { 510 replaceSrc: function (a) { 511 return a.src.replace(/\.\w+$/, function (a) { 512 return "@2x" + a 513 }) 514 }, ratio: 1 515 }, proto: { 516 initRetina: function () { 517 if (window.devicePixelRatio > 1) { 518 var a = b.st.retina, c = a.ratio; 519 c = isNaN(c) ? c() : c, c > 1 && (w("ImageHasSize." + U, function (a, b) { 520 b.img.css({"max-width": b.img[0].naturalWi
vendor: 14,520 bytes, lines 520-816
520dth / c, width: "100%"}) 521 }), w("ElementParse." + U, function (b, d) { 522 d.src = a.replaceSrc(d, c) 523 })) 524 } 525 } 526 } 527 }), A() 528}); 529(function (q, g) { 530 "function" === typeof define && define.amd ? define([], g) : "object" === typeof module && module.exports ? module.exports = g() : q.Rellax = g() 531})("undefined" !== typeof window ? window : global, function () { 532 var q = function (g, u) { 533 function C() { 534 if (3 === a.options.breakpoints.length && Array.isArray(a.options.breakpoints)) { 535 var f = !0, c = !0, b; 536 a.options.breakpoints.forEach(function (a) { 537 "number" !== typeof a && (c = !1); 538 null !== b && a < b && (f = !1); 539 b = a 540 }); 541 if (f && c) return 542 } 543 a.options.breakpoints = [576, 768, 1201]; 544 console.warn("Rellax: You must pass an array of 3 numbers in ascending order to the breakpoints option. Defaults reverted") 545 } 546 547 var a = Object.create(q.prototype), l = 0, v = 0, m = 0, n = 0, d = [], w = !0, 548 A = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.msRequestAnimationFrame || window.oRequestAnimationFrame || function (a) { 549 return setTimeout(a, 1E3 / 60) 550 }, p = null, x = !1; 551 try { 552 var k = Object.defineProperty({}, "passive", { 553 get: function () { 554 x = !0 555 } 556 }); 557 window.addEventListener("testPassive", null, k); 558 window.removeEventListener("testPassive", null, k) 559 } catch (f) { 560 } 561 var D = window.cancelAnimationFrame || window.mozCancelAnimationFrame || 562 clearTimeout, E = window.transformProp || function () { 563 var a = document.createElement("div"); 564 if (null === a.style.transform) { 565 var c = ["Webkit", "Moz", "ms"], b; 566 for (b in c) if (void 0 !== a.style[c[b] + "Transform"]) return c[b] + "Transform" 567 } 568 return "transform" 569 }(); 570 a.options = { 571 speed: -2, 572 verticalSpeed: null, 573 horizontalSpeed: null, 574 breakpoints: [576, 768, 1201], 575 center: !1, 576 wrapper: null, 577 relativeToWrapper: !1, 578 round: !0, 579 vertical: !0, 580 horizontal: !1, 581 verticalScrollAxis: "y", 582 horizontalScrollAxis: "x", 583 callback: function () { 584 } 585 }; 586 u && Object.keys(u).forEach(function (d) { 587 a.options[d] = 588 u[d] 589 }); 590 u && u.breakpoints && C(); 591 g || (g = ".rellax"); 592 k = "string" === typeof g ? document.querySelectorAll(g) : [g]; 593 if (0 < k.length) { 594 a.elems = k; 595 if (a.options.wrapper && !a.options.wrapper.nodeType) if (k = document.querySelector(a.options.wrapper)) a.options.wrapper = k; else { 596 console.warn("Rellax: The wrapper you're trying to use doesn't exist."); 597 return 598 } 599 var F, B = function () { 600 for (var f = 0; f < d.length; f++) a.elems[f].style.cssText = d[f].style; 601 d = []; 602 v = window.innerHeight; 603 n = window.innerWidth; 604 f = a.options.breakpoints; 605 F = n < f[0] ? "xs" : n >= f[0] && n < 606 f[1] ? "sm" : n >= f[1] && n < f[2] ? "md" : "lg"; 607 H(); 608 for (f = 0; f < a.elems.length; f++) { 609 var c = void 0, b = a.elems[f], e = b.getAttribute("data-rellax-percentage"), 610 y = b.getAttribute("data-rellax-speed"), t = b.getAttribute("data-rellax-xs-speed"), 611 g = b.getAttribute("data-rellax-mobile-speed"), h = b.getAttribute("data-rellax-tablet-speed"), 612 k = b.getAttribute("data-rellax-desktop-speed"), 613 l = b.getAttribute("data-rellax-vertical-speed"), 614 m = b.getAttribute("data-rellax-horizontal-speed"), 615 p = b.getAttribute("data-rellax-vertical-scroll-axis"), 616 q = b.getAttribute("data-rellax-horizontal-scroll-axis"), 617 u = b.getAttribute("data-rellax-zindex") || 0, x = b.getAttribute("data-rellax-min"), 618 A = b.getAttribute("data-rellax-max"), C = b.getAttribute("data-rellax-min-x"), 619 D = b.getAttribute("data-rellax-max-x"), E = b.getAttribute("data-rellax-min-y"), 620 L = b.getAttribute("data-rellax-max-y"), r = !0; 621 t || g || h || k ? c = {xs: t, sm: g, md: h, lg: k} : r = !1; 622 t = a.options.wrapper ? a.options.wrapper.scrollTop : window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop; 623 a.options.relativeToWrapper && 624 (t = (window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop) - a.options.wrapper.offsetTop); 625 var z = a.options.vertical ? e || a.options.center ? t : 0 : 0, 626 I = a.options.horizontal ? e || a.options.center ? a.options.wrapper ? a.options.wrapper.scrollLeft : window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft : 0 : 0; 627 t = z + b.getBoundingClientRect().top; 628 g = b.clientHeight || b.offsetHeight || b.scrollHeight; 629 h = I + b.getBoundingClientRect().left; 630 k = b.clientWidth || b.offsetWidth || b.scrollWidth; 631 z = e ? e : (z - t + v) / (g + v); 632 e = e ? e : (I - h + n) / (k + n); 633 a.options.center && (z = e = .5); 634 c = r && null !== c[F] ? Number(c[F]) : y ? y : a.options.speed; 635 l = l ? l : a.options.verticalSpeed; 636 m = m ? m : a.options.horizontalSpeed; 637 p = p ? p : a.options.verticalScrollAxis; 638 q = q ? q : a.options.horizontalScrollAxis; 639 y = J(e, z, c, l, m); 640 b = b.style.cssText; 641 r = ""; 642 if (e = /transform\s*:/i.exec(b)) r = b.slice(e.index), r = (e = r.indexOf(";")) ? " " + r.slice(11, e).replace(/\s/g, "") : " " + r.slice(11).replace(/\s/g, ""); 643 d.push({ 644 baseX: y.x, 645 baseY: y.y, 646 top: t, 647 left: h, 648 height: g, 649 width: k, 650 speed: c, 651 verticalSpeed: l, 652 horizontalSpeed: m, 653 verticalScrollAxis: p, 654 horizontalScrollAxis: q, 655 style: b, 656 transform: r, 657 zindex: u, 658 min: x, 659 max: A, 660 minX: C, 661 maxX: D, 662 minY: E, 663 maxY: L 664 }) 665 } 666 K(); 667 w && (window.addEventListener("resize", B), w = !1, G()) 668 }, H = function () { 669 var d = l, c = m; 670 l = a.options.wrapper ? a.options.wrapper.scrollTop : (document.documentElement || document.body.parentNode || document.body).scrollTop || window.pageYOffset; 671 m = a.options.wrapper ? a.options.wrapper.scrollLeft : (document.documentElement || document.body.parentNode || document.body).scrollLeft || window.pageXOffset; 672 a.options.relativeToWrapper && (l = ((document.documentElement || document.body.parentNode || document.body).scrollTop || window.pageYOffset) - a.options.wrapper.offsetTop); 673 return d != l && a.options.vertical || c != m && a.options.horizontal ? !0 : !1 674 }, J = function (d, c, b, e, g) { 675 var f = {}; 676 d = 100 * (g ? g : b) * (1 - d); 677 c = 100 * (e ? e : b) * (1 - c); 678 f.x = a.options.round ? Math.round(d) : Math.round(100 * d) / 100; 679 f.y = a.options.round ? Math.round(c) : Math.round(100 * c) / 100; 680 return f 681 }, h = function () { 682 window.removeEventListener("resize", h); 683 window.removeEventListener("orientationchange", 684 h); 685 (a.options.wrapper ? a.options.wrapper : window).removeEventListener("scroll", h); 686 (a.options.wrapper ? a.options.wrapper : document).removeEventListener("touchmove", h); 687 p = A(G) 688 }, G = function () { 689 H() && !1 === w ? (K(), p = A(G)) : (p = null, window.addEventListener("resize", h), window.addEventListener("orientationchange", h), (a.options.wrapper ? a.options.wrapper : window).addEventListener("scroll", h, x ? {passive: !0} : !1), (a.options.wrapper ? a.options.wrapper : document).addEventListener("touchmove", h, x ? {passive: !0} : !1)) 690 }, K = function () { 691 for (var f, 692 c = 0; c < a.elems.length; c++) { 693 var b = d[c].verticalScrollAxis.toLowerCase(), e = d[c].horizontalScrollAxis.toLowerCase(); 694 f = -1 != b.indexOf("x") ? l : 0; 695 b = -1 != b.indexOf("y") ? l : 0; 696 var g = -1 != e.indexOf("x") ? m : 0; 697 e = -1 != e.indexOf("y") ? m : 0; 698 f = J((f + g - d[c].left + n) / (d[c].width + n), (b + e - d[c].top + v) / (d[c].height + v), d[c].speed, d[c].verticalSpeed, d[c].horizontalSpeed); 699 e = f.y - d[c].baseY; 700 b = f.x - d[c].baseX; 701 null !== d[c].min && (a.options.vertical && !a.options.horizontal && (e = e <= d[c].min ? d[c].min : e), a.options.horizontal && !a.options.vertical && 702 (b = b <= d[c].min ? d[c].min : b)); 703 null != d[c].minY && (e = e <= d[c].minY ? d[c].minY : e); 704 null != d[c].minX && (b = b <= d[c].minX ? d[c].minX : b); 705 null !== d[c].max && (a.options.vertical && !a.options.horizontal && (e = e >= d[c].max ? d[c].max : e), a.options.horizontal && !a.options.vertical && (b = b >= d[c].max ? d[c].max : b)); 706 null != d[c].maxY && (e = e >= d[c].maxY ? d[c].maxY : e); 707 null != d[c].maxX && (b = b >= d[c].maxX ? d[c].maxX : b); 708 a.elems[c].style[E] = "translate3d(" + (a.options.horizontal ? b : "0") + "px," + (a.options.vertical ? e : "0") + "px," + d[c].zindex + "px) " + d[c].transform 709 } 710 a.options.callback(f) 711 }; 712 a.destroy = function () { 713 for (var f = 0; f < a.elems.length; f++) a.elems[f].style.cssText = d[f].style; 714 w || (window.removeEventListener("resize", B), w = !0); 715 D(p); 716 p = null 717 }; 718 B(); 719 a.refresh = B; 720 return a 721 } 722 console.warn("Rellax: The elements you're trying to select don't exist.") 723 }; 724 return q 725}); 726/*! @license ScrollReveal v4.0.9 727 728 Copyright 2021 Fisssion LLC. 729 730 Licensed under the GNU General Public License 3.0 for 731 compatible open source projects and non-commercial use. 732 733 For commercial sites, themes, projects, and applications, 734 keep your source code private/proprietary by purchasing 735 a commercial license from https://scrollrevealjs.org/ 736*/ 737!function (t, e) { 738 "object" == typeof exports && "undefined" != typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define(e) : (t = "undefined" != typeof globalThis ? globalThis : t || self).Shuffle = e() 739}(this, (function () { 740 "use strict"; 741 var t = {exports: {}}; 742 743 function e() { 744 } 745 746 e.prototype = { 747 on: function (t, e, i) { 748 var s = this.e || (this.e = {}); 749 return (s[t] || (s[t] = [])).push({fn: e, ctx: i}), this 750 }, once: function (t, e, i) { 751 var s = this; 752 753 function n() { 754 s.off(t, n), e.apply(i, arguments) 755 } 756 757 return n._ = e, this.on(t, n, i) 758 }, emit: function (t) { 759 for (var e = [].slice.call(arguments, 1), i = ((this.e || (this.e = {}))[t] || []).slice(), s = 0, n = i.length; s < n; s++) i[s].fn.apply(i[s].ctx, e); 760 return this 761 }, off: function (t, e) { 762 var i = this.e || (this.e = {}), s = i[t], n = []; 763 if (s && e) for (var o = 0, r = s.length; o < r; o++) s[o].fn !== e && s[o].fn._ !== e && n.push(s[o]); 764 return n.length ? i[t] = n : delete i[t], this 765 } 766 }, t.exports = e, t.exports.TinyEmitter = e; 767 768 function i() { 769 } 770 771 function s(t) { 772 return parseFloat(t) || 0 773 } 774 775 class n { 776 constructor(t, e) { 777 this.x = s(t), this.y = s(e) 778 } 779 780 static equals(t, e) { 781 return t.x === e.x && t.y === e.y 782 } 783 } 784 785 class o { 786 constructor(t, e, i, s, n) { 787 this.id = n, this.left = t, this.top = e, this.width = i, this.height = s 788 } 789 790 static intersects(t, e) { 791 return t.left < e.left + e.width && e.left < t.left + t.width && t.top < e.top + e.height && e.top < t.top + t.height 792 } 793 } 794 795 var r = { 796 BASE: "shuffle", 797 SHUFFLE_ITEM: "shuffle-item", 798 VISIBLE: "shuffle-item--visible", 799 HIDDEN: "shuffle-item--hidden" 800 }; 801 let h = 0; 802 803 class l { 804 constructor(t, e) { 805 h += 1, this.id = h, this.element = t, this.isRTL = e, this.isVisible = !0, this.isHidden = !1 806 } 807 808 show() { 809 this.isVisible = !0, this.element.classList.remove(r.HIDDEN), this.element.classList.add(r.VISIBLE), this.element.removeAttribute("aria-hidden") 810 } 811 812 hide() { 813 this.isVisible = !1, this.element.classList.remove(r.VISIBLE), this.element.classList.add(r.HIDDEN), this.element.setAttribute("aria-hidden", !0) 814 } 815 816 init() {
817 this.addClasses([r.SHUFFLE_ITEM, r.VISIBLE]), this.applyCss(l.Css.INITIAL), this.applyCss(this.isRTL ? l.Css.DIRECTION.rtl : l.Css.DIRECTION.ltr), this.scale = l.Scale.VISIBLE, this.point = new n 818 } 819 820 addClasses(t) { 821 t.forEach((t => { 822 this.element.classList.add(t) 823 })) 824 } 825 826 removeClasses(t) { 827 t.forEach((t => { 828 this.element.classList.remove(t) 829 })) 830 } 831 832 applyCss(t) { 833 Object.keys(t).forEach((e => { 834 this.element.style[e] = t[e] 835 })) 836 } 837 838 dispose() { 839 this.removeClasses([r.HIDDEN, r.VISIBLE, r.SHUFFLE_ITEM]), this.element.removeAttribute("style"), this.element = null 840 } 841 } 842 843 l.Css = { 844 INITIAL: {position: "absolute", top: 0, visibility: "visible", willChange: "transform"}, 845 DIRECTION: {ltr: {left: 0}, rtl: {right: 0}}, 846 VISIBLE: {before: {opacity: 1, visibility: "visible"}, after: {transitionDelay: ""}}, 847 HIDDEN: {before: {opacity: 0}, after: {visibility: "hidden", transitionDelay: ""}} 848 }, l.Scale = {VISIBLE: 1, HIDDEN: .001}; 849 let a = null; 850 var d = () => { 851 if (null !== a) return a; 852 const t = document.body || document.documentElement, e = document.createElement("div"); 853 e.style.cssText = "width:10px;padding:2px;box-sizing:border-box;", t.appendChild(e); 854 const {width: i} = window.getComputedStyle(e, null); 855 return a = 10 === Math.round(s(i)), t.removeChild(e), a 856 }; 857 858 function u(t, e) { 859 let i = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : window.getComputedStyle(t, null), 860 n = s(i[e]); 861 return d() || "width" !== e ? d() || "height" !== e || (n += s(i.paddingTop) + s(i.paddingBottom) + s(i.borderTopWidth) + s(i.borderBottomWidth)) : n += s(i.paddingLeft) + s(i.paddingRight) + s(i.borderLeftWidth) + s(i.borderRightWidth), n 862 } 863 864 const m = {reverse: !1, by: null, compare: null, randomize: !1, key: "element"}; 865 866 function c(t, e) { 867 const i = {...m, ...e}, s = Array.from(t); 868 let n = !1; 869 return t.length ? i.randomize ? function (t) { 870 let e = t.length; 871 for (; e;) { 872 e -= 1; 873 const i = Math.floor(Math.random() * (e + 1)), s = t[i]; 874 t[i] = t[e], t[e] = s 875 } 876 return t 877 }(t) : ("function" == typeof i.by ? t.sort(((t, e) => { 878 if (n) return 0; 879 const s = i.by(t[i.key]), o = i.by(e[i.key]); 880 return void 0 === s && void 0 === o ? (n = !0, 0) : s < o || "sortFirst" === s || "sortLast" === o ? -1 : s > o || "sortLast" === s || "sortFirst" === o ? 1 : 0 881 })) : "function" == typeof i.compare && t.sort(i.compare), n ? s : (i.reverse && t.reverse(), t)) : [] 882 } 883 884 const p = {}, f = "transitionend"; 885 let g = 0; 886 887 function _(t) { 888 return !!p[t] && (p[t].element.removeEventListener(f, p[t].listener), p[t] = null, !0) 889 } 890 891 function y(t, e) { 892 const i = (g += 1, f + g), s = t => { 893 t.currentTarget === t.target && (_(i), e(t)) 894 }; 895 return t.addEventListener(f, s), p[i] = {element: t, listener: s}, i 896 } 897 898 function I(t) { 899 return Math.max(...t) 900 } 901 902 function E(t, e, i, s) { 903 let n = t / e; 904 return Math.abs(Math.round(n) - n) < s && (n = Math.round(n)), Math.min(Math.ceil(n), i) 905 } 906 907 function v(t, e, i) { 908 if (1 === e) return t; 909 const s = []; 910 for (let n = 0; n <= i - e; n++) s.push(I(t.slice(n, n + e))); 911 return s 912 } 913 914 function b(t, e) { 915 const i = (s = t, Math.min(...s)); 916 var s; 917 for (let s = 0, n = t.length; s < n; s++) if (t[s] >= i - e && t[s] <= i + e) return s; 918 return 0 919 } 920 921 function T(t, e) { 922 const i = {}; 923 t.forEach((t => { 924 i[t.top] ? i[t.top].push(t) : i[t.top] = [t] 925 })); 926 let s = []; 927 const r = [], h = [];
928 return Object.keys(i).forEach((t => { 929 const n = i[t]; 930 r.push(n); 931 const l = n[n.length - 1], a = l.left + l.width, d = Math.round((e - a) / 2); 932 let u = n, m = !1; 933 if (d > 0) { 934 const t = []; 935 m = n.every((e => { 936 const i = new o(e.left + d, e.top, e.width, e.height, e.id), n = !s.some((t => o.intersects(i, t))); 937 return t.push(i), n 938 })), m && (u = t) 939 } 940 if (!m) { 941 let t; 942 if (n.some((e => s.some((i => { 943 const s = o.intersects(e, i); 944 return s && (t = i), s 945 }))))) { 946 const e = h.findIndex((e => e.includes(t))); 947 h.splice(e, 1, r[e]) 948 } 949 } 950 s = s.concat(u), h.push(u) 951 })), h.flat().sort(((t, e) => t.id - e.id)).map((t => new n(t.left, t.top))) 952 } 953 954 function S(t) { 955 return Array.from(new Set(t)) 956 } 957 958 let C = 0; 959 960 class L extends t.exports { 961 constructor(t) { 962 let e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; 963 super(), this.options = {...L.options, ...e}, this.lastSort = {}, this.group = L.ALL_ITEMS, this.lastFilter = L.ALL_ITEMS, this.isEnabled = !0, this.isDestroyed = !1, this.isInitialized = !1, this._transitions = [], this.isTransitioning = !1, this._queue = []; 964 const i = this._getElementOption(t); 965 if (!i) throw new TypeError("Shuffle needs to be initialized with an element."); 966 this.element = i, this.id = `shuffle_${C}`, C += 1, this._init(), this.isInitialized = !0 967 } 968 969 _init() { 970 if (this.items = this._getItems(), this.sortedItems = this.items, this.options.sizer = this._getElementOption(this.options.sizer), this.element.classList.add(L.Classes.BASE), this._initItems(this.items), "complete" !== document.readyState) { 971 const t = this.layout.bind(this); 972 window.addEventListener("load", (function e() { 973 window.removeEventListener("load", e), t() 974 })) 975 } 976 const t = window.getComputedStyle(this.element, null), e = L.getSize(this.element).width; 977 this._validateStyles(t), this._setColumns(e), this.filter(this.options.group, this.options.initialSort), this._rafId = null, "ResizeObserver" in window && (this._resizeObserver = new ResizeObserver(this._handleResizeCallback.bind(this)), this._resizeObserver.observe(this.element)), this.element.offsetWidth, this.setItemTransitions(this.items), this.element.style.transition = `height ${this.options.speed}ms ${this.options.easing}` 978 } 979 980 _getElementOption(t) { 981 return "string" == typeof t ? this.element.querySelector(t) : t && t.nodeType && 1 === t.nodeType ? t : t && t.jquery ? t[0] : null 982 } 983 984 _validateStyles(t) { 985 "static" === t.position && (this.element.style.position = "relative"), "hidden" !== t.overflow && (this.element.style.overflow = "hidden") 986 } 987 988 _filter() { 989 let t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.lastFilter, 990 e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this.items; 991 const i = this._getFilteredSets(t, e); 992 return this._toggleFilterClasses(i), this.lastFilter = t, "string" == typeof t && (this.group = t), i 993 } 994 995 _getFilteredSets(t, e) { 996 let i = []; 997 const s = []; 998 return t === L.ALL_ITEMS ? i = e : e.forEach((e => { 999 this._doesPassFilter(t, e.element) ? i.push(e) : s.push(e) 1000 })), {visible: i, hidden: s} 1001 } 1002 1003 _doesPassFilter(t, e) { 1004 if ("function" == typeof t) return t.call(e, e, this); 1005 const i = e.dataset[L.FILTER_ATTRIBUTE_KEY], 1006 s = this.options.delimiter ? i.split(this.options.delimiter) : JSON.parse(i); 1007 1008 function n(t) { 1009 return s.includes(t) 1010 } 1011 1012 return Array.isArray(t) ? this.options.filterMode === L.FilterMode.ANY ? t.some(n) : t.every(n) : s.includes(t) 1013 } 1014 1015 _toggleFilterClasses(t) { 1016 let {visible: e, hidden: i} = t; 1017 e.forEach((t => { 1018 t.show() 1019 }
1019)), i.forEach((t => { 1020 t.hide() 1021 })) 1022 } 1023 1024 _initItems(t) { 1025 t.forEach((t => { 1026 t.init() 1027 })) 1028 } 1029 1030 _disposeItems(t) { 1031 t.forEach((t => { 1032 t.dispose() 1033 })) 1034 } 1035 1036 _updateItemCount() { 1037 this.visibleItems = this._getFilteredItems().length 1038 } 1039 1040 setItemTransitions(t) { 1041 const {speed: e, easing: i} = this.options, 1042 s = this.options.useTransforms ? ["transform"] : ["top", "left"], 1043 n = Object.keys(l.Css.HIDDEN.before).map((t => t.replace(/([A-Z])/g, ((t, e) => `-${e.toLowerCase()}`)))), 1044 o = s.concat(n).join(); 1045 t.forEach((t => { 1046 t.element.style.transitionDuration = `${e}ms`, t.element.style.transitionTimingFunction = i, t.element.style.transitionProperty = o 1047 })) 1048 } 1049 1050 _getItems() { 1051 return Array.from(this.element.children).filter((t => t.matches(this.options.itemSelector))).map((t => new l(t, this.options.isRTL))) 1052 } 1053 1054 _mergeNewItems(t) { 1055 const e = Array.from(this.element.children); 1056 return c(this.items.concat(t), {by: t => e.indexOf(t)}) 1057 } 1058 1059 _getFilteredItems() { 1060 return this.items.filter((t => t.isVisible)) 1061 } 1062 1063 _getConcealedItems() { 1064 return this.items.filter((t => !t.isVisible)) 1065 } 1066 1067 _getColumnSize(t, e) { 1068 let i; 1069 return i = "function" == typeof this.options.columnWidth ? this.options.columnWidth(t) : this.options.sizer ? L.getSize(this.options.sizer).width : this.options.columnWidth ? this.options.columnWidth : this.items.length > 0 ? L.getSize(this.items[0].element, !0).width : t, 0 === i && (i = t), i + e 1070 } 1071 1072 _getGutterSize(t) { 1073 let e; 1074 return e = "function" == typeof this.options.gutterWidth ? this.options.gutterWidth(t) : this.options.sizer ? u(this.options.sizer, "marginLeft") : this.options.gutterWidth, e 1075 } 1076 1077 _setColumns() { 1078 let t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : L.getSize(this.element).width; 1079 const e = this._getGutterSize(t), i = this._getColumnSize(t, e); 1080 let s = (t + e) / i; 1081 Math.abs(Math.round(s) - s) < this.options.columnThreshold && (s = Math.round(s)), this.cols = Math.max(Math.floor(s || 0), 1), this.containerWidth = t, this.colWidth = i 1082 } 1083 1084 _setContainerSize() { 1085 this.element.style.height = `${this._getContainerSize()}px` 1086 } 1087 1088 _getContainerSize() { 1089 return I(this.positions) 1090 } 1091 1092 _getStaggerAmount(t) { 1093 return Math.min(t * this.options.staggerAmount, this.options.staggerAmountMax) 1094 } 1095 1096 _dispatch(t) { 1097 let e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; 1098 this.isDestroyed || (e.shuffle = this, this.emit(t, e)) 1099 } 1100 1101 _resetCols() { 1102 let t = this.cols; 1103 for (this.positions = []; t;) t -= 1, this.positions.push(0) 1104 } 1105 1106 _layout(t) { 1107 const e = this._getNextPositions(t); 1108 let i = 0; 1109 t.forEach(((t, s) => { 1110 function o() { 1111 t.applyCss(l.Css.VISIBLE.after) 1112 } 1113 1114 if (n.equals(t.point, e[s]) && !t.isHidden) return t.applyCss(l.Css.VISIBLE.before), void o(); 1115 t.point = e[s], t.scale = l.Scale.VISIBLE, t.isHidden = !1; 1116 const r = this.getStylesForTransition(t, l.Css.VISIBLE.before); 1117 r.transitionDelay = `${this._getStaggerAmount(i)}ms`, this._queue.push({ 1118 item: t, 1119 styles: r, 1120 callback: o 1121 }), i += 1 1122 })) 1123 } 1124 1125 _getNextPositions(t) { 1126 if (this.options.isCentered) { 1127 const e = t.map(((t, e) => { 1128 const i = L.getSize(t.element, !0), s = this._getItemPosition(i); 1129 return new o(s.x, s.y, i.width, i.height, e) 1130 })); 1131 return this.getTransformedPositions(e, this.containerWidth) 1132 } 1133 return t.map((t => this._getItemPosition(L.getSize(t.element, !0)))) 1134 } 1135 1136 _getItemPosition(t) { 1137 return function (t) { 1138 let {itemSize: e, positions: i, gridSize: s, total: o, threshold: r, buffer: h} = t; 1139 const l = E(e.width, s, o, r), a = v(i, l, o), d = b(a, h), u = new n(s * d, a[d]), m = a[d] + e.height; 1140 for (let t = 0; t < l; t++) i[d + t] = m; 1141 return u 1142 }({ 1143 itemSize: t, 1144 positions: this.positions, 1145 gridSize: this.colWidth, 1146 total: this.cols, 1147 threshold: this.options.columnThreshold, 1148 buffer: this.options.buffer 1149 }) 1150 } 1151 1152 getTransformedPositions(t, e) { 1153 return T(t, e) 1154 } 1155 1156 _shrink() { 1157 let t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this._getConcealedItems(), e = 0; 1158 t.forEach((t => { 1159 function i() { 1160 t.applyCss(l.Css.HIDDEN.after) 1161 } 1162 1163 if (t.isHidden) return t.applyCss(l.Css.HIDDEN.before), void i(); 1164 t.scale = l.Scale.HIDDEN, t.isHidden = !0;
1165 const s = this.getStylesForTransition(t, l.Css.HIDDEN.before); 1166 s.transitionDelay = `${this._getStaggerAmount(e)}ms`, this._queue.push({ 1167 item: t, 1168 styles: s, 1169 callback: i 1170 }), e += 1 1171 })) 1172 } 1173 1174 _handleResizeCallback(t) { 1175 if (this.isEnabled && !this.isDestroyed) for (const e of t) Math.round(e.contentRect.width) !== Math.round(this.containerWidth) && (cancelAnimationFrame(this._rafId), this._rafId = requestAnimationFrame(this.update.bind(this))) 1176 } 1177 1178 getStylesForTransition(t, e) { 1179 const i = {...e}; 1180 if (this.options.useTransforms) { 1181 const e = this.options.isRTL ? "-" : "", 1182 s = this.options.roundTransforms ? Math.round(t.point.x) : t.point.x, 1183 n = this.options.roundTransforms ? Math.round(t.point.y) : t.point.y; 1184 i.transform = `translate(${e}${s}px, ${n}px) scale(${t.scale})` 1185 } else this.options.isRTL ? i.right = `${t.point.x}px` : i.left = `${t.point.x}px`, i.top = `${t.point.y}px`; 1186 return i 1187 } 1188 1189 _whenTransitionDone(t, e, i) { 1190 const s = y(t, (t => { 1191 e(), i(null, t) 1192 })); 1193 this._transitions.push(s) 1194 } 1195 1196 _getTransitionFunction(t) { 1197 return e => { 1198 t.item.applyCss(t.styles), this._whenTransitionDone(t.item.element, t.callback, e) 1199 } 1200 } 1201 1202 _processQueue() { 1203 this.isTransitioning && this._cancelMovement(); 1204 const t = this.options.speed > 0, e = this._queue.length > 0; 1205 e && t && this.isInitialized ? this._startTransitions(this._queue) : e ? (this._styleImmediately(this._queue), this._dispatch(L.EventType.LAYOUT)) : this._dispatch(L.EventType.LAYOUT), this._queue.length = 0 1206 } 1207 1208 _startTransitions(t) { 1209 this.isTransitioning = !0; 1210 !function (t, e, s) { 1211 s || ("function" == typeof e ? (s = e, e = null) : s = i); 1212 var n = t && t.length; 1213 if (!n) return s(null, []); 1214 var o = !1, r = new Array(n); 1215 1216 function h(t) { 1217 return function (e, i) { 1218 if (!o) { 1219 if (e) return s(e, r), void (o = !0); 1220 r[t] = i, --n || s(null, r) 1221 } 1222 } 1223 } 1224 1225 t.forEach(e ? function (t, i) { 1226 t.call(e, h(i)) 1227 } : function (t, e) { 1228 t(h(e)) 1229 }) 1230 }(t.map((t => this._getTransitionFunction(t))), this._movementFinished.bind(this)) 1231 } 1232 1233 _cancelMovement() { 1234 this._transitions.forEach(_), this._transitions.length = 0, this.isTransitioning = !1 1235 } 1236 1237 _styleImmediately(t) { 1238 if (t.length) { 1239 const e = t.map((t => t.item.element)); 1240 L._skipTransitions(e, (() => { 1241 t.forEach((t => { 1242 t.item.applyCss(t.styles), t.callback() 1243 })) 1244 })) 1245 } 1246 } 1247 1248 _movementFinished() { 1249 this._transitions.length = 0, this.isTransitioning = !1, this._dispatch(L.EventType.LAYOUT) 1250 } 1251 1252 filter(t, e) { 1253 this.isEnabled && ((!t || t && 0 === t.length) && (t = L.ALL_ITEMS), this._filter(t), this._shrink(), this._updateItemCount(), this.sort(e)) 1254 } 1255 1256 sort() { 1257 let t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.lastSort; 1258 if (!this.isEnabled) return; 1259 this._resetCols(); 1260 const e = c(this._getFilteredItems(), t); 1261 this.sortedItems = e, this._layout(e), this._processQueue(), this._setContainerSize(), this.lastSort = t 1262 } 1263 1264 update() { 1265 let { 1266 recalculateSizes: t = !0, 1267 force: e = !1 1268 } = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; 1269 (this.isEnabled || e) && (t && this._setColumns(), this.sort()) 1270 } 1271 1272 layout() { 1273 this.update({recalculateSizes: !0}) 1274 } 1275 1276 add(t) { 1277 const e = S(t).map((t => new l(t, this.options.isRTL))); 1278 this._initItems(e), this._resetCols(); 1279 const i = c(this._mergeNewItems(e), this.lastSort), s = this._filter(this.lastFilter, i), 1280 n = t => e.includes(t), o = t => { 1281 t.scale = l.Scale.HIDDEN, t.isHidden = !0, t.applyCss(l.Css.HIDDEN.before), t.applyCss(l.Css.HIDDEN.after) 1282 }, r = this._getNextPositions(s.visible); 1283 s.visible.forEach(((t, e) => { 1284 n(t) && (t.point = r[e], o(t), t.applyCss(this.getStylesForTransition(t, {}))) 1285 }
1285)), s.hidden.forEach((t => { 1286 n(t) && o(t) 1287 })), this.element.offsetWidth, this.setItemTransitions(e), this.items = this._mergeNewItems(e), this.filter(this.lastFilter) 1288 } 1289 1290 disable() { 1291 this.isEnabled = !1 1292 } 1293 1294 enable() { 1295 let t = !(arguments.length > 0 && void 0 !== arguments[0]) || arguments[0]; 1296 this.isEnabled = !0, t && this.update() 1297 } 1298 1299 remove(t) { 1300 if (!t.length) return; 1301 const e = S(t), i = e.map((t => this.getItemByElement(t))).filter((t => !!t)); 1302 this._toggleFilterClasses({ 1303 visible: [], 1304 hidden: i 1305 }), this._shrink(i), this.sort(), this.items = this.items.filter((t => !i.includes(t))), this._updateItemCount(), this.once(L.EventType.LAYOUT, (() => { 1306 this._disposeItems(i), e.forEach((t => { 1307 t.parentNode.removeChild(t) 1308 })), this._dispatch(L.EventType.REMOVED, {collection: e}) 1309 })) 1310 } 1311 1312 getItemByElement(t) { 1313 return this.items.find((e => e.element === t)) 1314 } 1315 1316 resetItems() { 1317 this._disposeItems(this.items), this.isInitialized = !1, this.items = this._getItems(), this._initItems(this.items), this.once(L.EventType.LAYOUT, (() => { 1318 this.setItemTransitions(this.items), this.isInitialized = !0 1319 })), this.filter(this.lastFilter) 1320 } 1321 1322 destroy() { 1323 this._cancelMovement(), this._resizeObserver && (this._resizeObserver.unobserve(this.element), this._resizeObserver = null), this.element.classList.remove("shuffle"), this.element.removeAttribute("style"), this._disposeItems(this.items), this.items.length = 0, this.sortedItems.length = 0, this._transitions.length = 0, this.options.sizer = null, this.element = null, this.isDestroyed = !0, this.isEnabled = !1 1324 } 1325 1326 static getSize(t) { 1327 let e = arguments.length > 1 && void 0 !== arguments[1] && arguments[1]; 1328 const i = window.getComputedStyle(t, null); 1329 let s = u(t, "width", i), n = u(t, "height", i); 1330 if (e) { 1331 s += u(t, "marginLeft", i) + u(t, "marginRight", i), n += u(t, "marginTop", i) + u(t, "marginBottom", i) 1332 } 1333 return {width: s, height: n} 1334 } 1335 1336 static _skipTransitions(t, e) { 1337 const i = t.map((t => { 1338 const {style: e} = t, i = e.transitionDuration, s = e.transitionDelay; 1339 return e.transitionDuration = "0ms", e.transitionDelay = "0ms", {duration: i, delay: s} 1340 })); 1341 e(), t[0].offsetWidth, t.forEach(((t, e) => { 1342 t.style.transitionDuration = i[e].duration, t.style.transitionDelay = i[e].delay 1343 })) 1344 } 1345 } 1346 1347 return L.ShuffleItem = l, L.ALL_ITEMS = "all", L.FILTER_ATTRIBUTE_KEY = "groups", L.EventType = { 1348 LAYOUT: "shuffle:layout", 1349 REMOVED: "shuffle:removed" 1350 }, L.Classes = r, L.FilterMode = {ANY: "any", ALL: "all"}, L.options = { 1351 group: L.ALL_ITEMS, 1352 speed: 250, 1353 easing: "cubic-bezier(0.4, 0.0, 0.2, 1)", 1354 itemSelector: "*", 1355 sizer: null, 1356 gutterWidth: 0, 1357 columnWidth: 0, 1358 delimiter: null, 1359 buffer: 0, 1360 columnThreshold: .01, 1361 initialSort: null, 1362 staggerAmount: 15, 1363 staggerAmountMax: 150, 1364 useTransforms: !0, 1365 filterMode: L.FilterMode.ANY, 1366 isCentered: !1, 1367 isRTL: !1, 1368 roundTransforms: !0 1369 }, L.Point = n, L.Rect = o, L.__sorter = c, L.__getColumnSpan = E, L.__getAvailablePositions = v, L.__getShortColumn = b, L.__getCenteredPositions = T, L 1370})); 1371//# sourceMappingURL=shuffle.min.js.map 1372let shortTrans = 300; 1373let longTrans = 500; 1374let enableMobile = false; 1375const Shuffle = window.Shuffle; 1376var ScrollReveal = function () { 1377 "use strict"; 1378 var r = { 1379 delay: 0, 1380 distance: "0", 1381 duration: 600, 1382 easing: "cubic-bezier(0.5, 0, 0, 1)", 1383 interval: 0, 1384 opacity: 0, 1385 origin: "bottom", 1386 rotate: {x: 0, y: 0, z: 0}, 1387 scale: 1, 1388 cleanup: !1, 1389 container: document.documentElement, 1390 desktop: !0, 1391 mobile: !0, 1392 reset: !1, 1393 useDelay: "always", 1394 viewFactor: 0, 1395 viewOffset: {top: 0, right: 0, bottom: 0, left: 0}, 1396 afterReset: function () { 1397 }, 1398 afterReveal: function () { 1399 }, 1400 beforeReset: function () { 1401 }, 1402 beforeReveal: function () { 1403 } 1404 }; 1405 var n = { 1406 success: function () { 1407 document.documentElement.classList.add("sr"), document.body ? document.body.style.height = "100%" : document.addEventListener("DOMContentLoaded", function () { 1408 document.body.style.height = "100%" 1409 }) 1410 }, failure: function () { 1411 return document.documentElement.classList.remove("sr"), { 1412 clean: function () { 1413 }, destroy: function () { 1414 }, reveal: function () { 1415 }, sync: function () { 1416 }, get noop() { 1417 return !0 1418 } 1419 } 1420 } 1421 }; 1422 1423 function o(e) { 1424 return "object" == typeof window.Node ? e instanceof window.Node : null !== e && "object" == typeof e && "number" == typeof e.nodeType && "string" == typeof e.nodeName 1425 } 1426 1427 function u(e, t) { 1428 if (void 0 === t && (t = document), e instanceof Array) return e.filter(o); 1429 if (o(e)) return [e]; 1430 if (n = e, i = Object.prototype.toString.call(n), "object" == typeof window.NodeList ? n instanceof window.NodeList : null !== n && "object" == typeof n && "number" == typeof n.length && /^\[object (HTMLCollection|NodeList|Object)\]$/.test(i) && (0 === n.length || o(n[0]))) return Array.prototype.slice.call(e); 1431 var n, i; 1432 if ("string" == typeof e) try { 1433 var r = t.querySelectorAll(e); 1434 return Array.prototype.slice.call(r) 1435 } catch (e) { 1436 return [] 1437 } 1438 return [] 1439 } 1440 1441 function s(e) { 1442 return null !== e && e instanceof Object && (e.constructor === Object || "[object Object]" === Object.prototype.toString.call(e)) 1443 } 1444 1445 function f(n, i) {
vendor: 20,410 bytes, lines 1446-1873
1446 if (s(n)) return Object.keys(n).forEach(function (e) { 1447 return i(n[e], e, n) 1448 }); 1449 if (n instanceof Array) return n.forEach(function (e, t) { 1450 return i(e, t, n) 1451 }); 1452 throw new TypeError("Expected either an array or object literal.") 1453 } 1454 1455 function h(e) { 1456 for (var t = [], n = arguments.length - 1; 0 < n--;) t[n] = arguments[n + 1]; 1457 if (this.constructor.debug && console) { 1458 var i = "%cScrollReveal: " + e; 1459 t.forEach(function (e) { 1460 return i += "\n â " + e 1461 }), console.log(i, "color: #ea654b;") 1462 } 1463 } 1464 1465 function t() { 1466 var n = this, i = {active: [], stale: []}, t = {active: [], stale: []}, r = {active: [], stale: []}; 1467 try { 1468 f(u("[data-sr-id]"), function (e) { 1469 var t = parseInt(e.getAttribute("data-sr-id")); 1470 i.active.push(t) 1471 }) 1472 } catch (e) { 1473 throw e 1474 } 1475 f(this.store.elements, function (e) { 1476 -1 === i.active.indexOf(e.id) && i.stale.push(e.id) 1477 }), f(i.stale, function (e) { 1478 return delete n.store.elements[e] 1479 }), f(this.store.elements, function (e) { 1480 -1 === r.active.indexOf(e.containerId) && r.active.push(e.containerId), e.hasOwnProperty("sequence") && -1 === t.active.indexOf(e.sequence.id) && t.active.push(e.sequence.id) 1481 }), f(this.store.containers, function (e) { 1482 -1 === r.active.indexOf(e.id) && r.stale.push(e.id) 1483 }), f(r.stale, function (e) { 1484 var t = n.store.containers[e].node; 1485 t.removeEventListener("scroll", n.delegate), t.removeEventListener("resize", n.delegate), delete n.store.containers[e] 1486 }), f(this.store.sequences, function (e) { 1487 -1 === t.active.indexOf(e.id) && t.stale.push(e.id) 1488 }), f(t.stale, function (e) { 1489 return delete n.store.sequences[e] 1490 }) 1491 } 1492 1493 function N(e) { 1494 if (e.constructor !== Array) throw new TypeError("Expected array."); 1495 if (16 === e.length) return e; 1496 if (6 !== e.length) throw new RangeError("Expected array with either 6 or 16 values."); 1497 var t = z(); 1498 return t[0] = e[0], t[1] = e[1], t[4] = e[2], t[5] = e[3], t[12] = e[4], t[13] = e[5], t 1499 } 1500 1501 function z() { 1502 for (var e = [], t = 0; t < 16; t++) t % 5 == 0 ? e.push(1) : e.push(0); 1503 return e 1504 } 1505 1506 function F(e, t) { 1507 for (var n = N(e), i = N(t), r = [], o = 0; o < 4; o++) for (var s = [n[o], n[o + 4], n[o + 8], n[o + 12]], a = 0; a < 4; a++) { 1508 var c = 4 * a, l = [i[c], i[c + 1], i[c + 2], i[c + 3]], 1509 d = s[0] * l[0] + s[1] * l[1] + s[2] * l[2] + s[3] * l[3]; 1510 r[o + c] = d 1511 } 1512 return r 1513 } 1514 1515 function D(e, t) { 1516 var n = z(); 1517 return n[0] = e, n[5] = "number" == typeof t ? t : e, n 1518 } 1519 1520 var S = function () { 1521 var n = {}, i = document.documentElement.style; 1522 1523 function e(e, t) { 1524 if (void 0 === t && (t = i), e && "string" == typeof e) { 1525 if (n[e]) return n[e]; 1526 if ("string" == typeof t[e]) return n[e] = e; 1527 if ("string" == typeof t["-webkit-" + e]) return n[e] = "-webkit-" + e; 1528 throw new RangeError('Unable to find "' + e + '" style property.') 1529 } 1530 throw new TypeError("Expected a string.") 1531 } 1532 1533 return e.clearCache = function () { 1534 return n = {} 1535 }, e 1536 }(); 1537 1538 function p(e) { 1539 var t = window.getComputedStyle(e.node), n = t.position, i = e.config, r = {}, 1540 o = (e.node.getAttribute("style") || "").match(/[\w-]+\s*:\s*[^;]+\s*/gi) || []; 1541 r.computed = o ? o.map(function (e) { 1542 return e.trim() 1543 }).join("; ") + ";" : "", r.generated = o.some(function (e) { 1544 return e.match(/visibility\s?:\s?visible/i) 1545 }) ? r.computed : o.concat(["visibility: visible"]).map(function (e) { 1546 return e.trim() 1547 }).join("; ") + ";"; 1548 var s, a, c, l, d, u, f, h, p, m, y, v, g, b = parseFloat(t.opacity), 1549 w = isNaN(parseFloat(i.opacity)) ? parseFloat(t.opacity) : parseFloat(i.opacity), 1550 E = {computed: b !== w ? "opacity: " + b + ";" : "", generated: b !== w ? "opacity: " + w + ";" : ""}, 1551 j = []; 1552 if (parseFloat(i.distance)) { 1553 var T = "top" === i.origin || "bottom" === i.origin ? "Y" : "X", k = i.distance; 1554 "top" !== i.origin && "left" !== i.origin || (k = /^-/.test(k) ? k.substr(1) : "-" + k); 1555 var O = k.match(/(^-?\d+\.?\d?)|(em$|px$|%$)/g), x = O[0]; 1556 switch (O[1]) { 1557 case"em": 1558 k = parseInt(t.fontSize) * x; 1559 break; 1560 case"px": 1561 k = x; 1562 break; 1563 case"%": 1564 k = "Y" === T ? e.node.getBoundingClientRect().height * x / 100 : e.node.getBoundingClientRect().width * x / 100; 1565 break; 1566 default: 1567 throw new RangeError("Unrecognized or missing distance unit.") 1568 } 1569 "Y" === T ? j.push((c = k, (l = z())[13] = c, l)) : j.push((s = k, (a = z())[12] = s, a)) 1570 } 1571 i.rotate.x && j.push((d = i.rotate.x, u = Math.PI / 180 * d, (f = z())[5] = f[10] = Math.cos(u), f[6] = f[9] = Math.sin(u), f[9] *= -1, f)), i.rotate.y && j.push((h = i.rotate.y, p = Math.PI / 180 * h, (m = z())[0] = m[10] = Math.cos(p), m[2] = m[8] = Math.sin(p), m[2] *= -1, m)), i.rotate.z && j.push((y = i.rotate.z, v = Math.PI / 180 * y, (g = z())[0] = g[5] = Math.cos(v), g[1] = g[4] = Math.sin(v), g[4] *= -1, g)), 1 !== i.scale && (0 === i.scale ? j.push(D(2e-4)) : j.push(D(i.scale))); 1572 var R = {}; 1573 if (j.length) { 1574 R.property = S("transform"), R.computed = { 1575 raw: t[R.property], matrix: function (e) { 1576 if ("string" == typeof e) { 1577 var t = e.match(/matrix(3d)?\(([^)]+)\)/); 1578 if (t) return N(t[2].split(", ").map(parseFloat)) 1579 } 1580 return z() 1581 }(t[R.property]) 1582 }, j.unshift(R.computed.matrix); 1583 var q = j.reduce(F); 1584 R.generated = { 1585 initial: R.property + ": matrix3d(" + q.join(", ") + ");", 1586 final: R.property + ": matrix3d(" + R.computed.matrix.join(", ") + ");" 1587 } 1588 } else R.generated = {initial: "", final: ""}; 1589 var A = {}; 1590 if (E.generated || R.generated.initial) { 1591 A.property = S("transition"), A.computed = t[A.property], A.fragments = []; 1592 var P = i.delay, L = i.duration, M = i.easing; 1593 E.generated && A.fragments.push({ 1594 delayed: "opacity " + L / 1e3 + "s " + M + " " + P / 1e3 + "s", 1595 instant: "opacity " + L / 1e3 + "s " + M + " 0s" 1596 }), R.generated.initial && A.fragments.push({ 1597 delayed: R.property + " " + L / 1e3 + "s " + M + " " + P / 1e3 + "s", 1598 instant: R.property + " " + L / 1e3 + "s " + M + " 0s" 1599 }), A.computed && !A.computed.match(/all 0s|none 0s/) && A.fragments.unshift({ 1600 delayed: A.computed, 1601 instant: A.computed 1602 }); 1603 var I = A.fragments.reduce(function (e, t, n) { 1604 return e.delayed += 0 === n ? t.delayed : ", " + t.delayed, e.instant += 0 === n ? t.instant : ", " + t.instant, e 1605 }, {delayed: "", instant: ""}); 1606 A.generated = {delayed: A.property + ": " + I.delayed + ";", instant: A.property + ": " + I.instant + ";"} 1607 } else A.generated = {delayed: "", instant: ""}; 1608 return {inline: r, opacity: E, position: n, transform: R, transition: A} 1609 } 1610 1611 function m(r, e) { 1612 e.split(";").forEach(function (e) { 1613 var t = e.split(":"), n = t[0], i = t.slice(1); 1614 n && i && (r.style[n.trim()] = i.join(":")) 1615 }) 1616 } 1617 1618 function y(e) { 1619 var i, r = this; 1620 try { 1621 f(u(e), function (e) { 1622 var t = e.getAttribute("data-sr-id"); 1623 if (null !== t) { 1624 i = !0; 1625 var n = r.store.elements[t]; 1626 n.callbackTimer && window.clearTimeout(n.callbackTimer.clock), m(n.node, n.styles.inline.generated), e.removeAttribute("data-sr-id"), delete r.store.elements[t] 1627 } 1628 }) 1629 } catch (e) { 1630 return h.call(this, "Clean failed.", e.message) 1631 } 1632 if (i) try { 1633 t.call(this) 1634 } catch (e) { 1635 return h.call(this, "Clean failed.", e.message) 1636 } 1637 } 1638 1639 function v(n) { 1640 for (var e = [], t = arguments.length - 1; 0 < t--;) e[t] = arguments[t + 1]; 1641 if (s(n)) return f(e, function (e) { 1642 f(e, function (e, t) { 1643 s(e) ? (n[t] && s(n[t]) || (n[t] = {}), v(n[t], e)) : n[t] = e 1644 }) 1645 }), n; 1646 throw new TypeError("Target must be an object literal.") 1647 } 1648 1649 function g(e) { 1650 return void 0 === e && (e = navigator.userAgent), /Android|iPhone|iPad|iPod/i.test(e) 1651 } 1652 1653 var e, b = (e = 0, function () { 1654 return e++ 1655 }); 1656 1657 function w() { 1658 var n = this; 1659 t.call(this), f(this.store.elements, function (e) { 1660 var t = [e.styles.inline.generated]; 1661 e.visible ? (t.push(e.styles.opacity.computed), t.push(e.styles.transform.generated.final), e.revealed = !0) : (t.push(e.styles.opacity.generated), t.push(e.styles.transform.generated.initial), e.revealed = !1), m(e.node, t.filter(function (e) { 1662 return "" !== e 1663 }).join(" ")) 1664 }), f(this.store.containers, function (e) { 1665 var t = e.node === document.documentElement ? window : e.node; 1666 t.addEventListener("scroll", n.delegate), t.addEventListener("resize", n.delegate) 1667 }), this.delegate(), this.initTimeout = null 1668 } 1669 1670 function c(e, t) { 1671 void 0 === t && (t = {}); 1672 var n = t.pristine || this.pristine, 1673 i = "always" === e.config.useDelay || "onload" === e.config.useDelay && n || "once" === e.config.useDelay && !e.seen, 1674 r = e.visible && !e.revealed, o = !e.visible && e.revealed && e.config.reset; 1675 return t.reveal || r ? function (e, t) { 1676 var n = [e.styles.inline.generated, e.styles.opacity.computed, e.styles.transform.generated.final]; 1677 t ? n.push(e.styles.transition.generated.delayed) : n.push(e.styles.transition.generated.instant); 1678 e.revealed = e.seen = !0, m(e.node, n.filter(function (e) { 1679 return "" !== e 1680 }).join(" ")), a.call(this, e, t) 1681 }.call(this, e, i) : t.reset || o ? function (e) { 1682 var t = [e.styles.inline.generated, e.styles.opacity.generated, e.styles.transform.generated.initial, e.styles.transition.generated.instant]; 1683 e.revealed = !1, m(e.node, t.filter(function (e) { 1684 return "" !== e 1685 }).join(" ")), a.call(this, e) 1686 }.call(this, e) : void 0 1687 } 1688 1689 function a(e, t) { 1690 var n = this, i = t ? e.config.duration + e.config.delay : e.config.duration, 1691 r = e.revealed ? e.config.beforeReveal : e.config.beforeReset, 1692 o = e.revealed ? e.config.afterReveal : e.config.afterReset, s = 0; 1693 e.callbackTimer && (s = Date.now() - e.callbackTimer.start, window.clearTimeout(e.callbackTimer.clock)), r(e.node), e.callbackTimer = { 1694 start: Date.now(), 1695 clock: window.setTimeout(function () { 1696 o(e.node), e.callbackTimer = null, e.revealed && !e.config.reset && e.config.cleanup && y.call(n, e.node) 1697 }, i - s) 1698 } 1699 } 1700 1701 function l(e, t) { 1702 if (void 0 === t && (t = this.pristine), !e.visible && e.revealed && e.config.reset) return c.call(this, e, {reset: !0}); 1703 var n = this.store.sequences[e.sequence.id], i = e.sequence.index; 1704 if (n) { 1705 var r = new d(n, "visible", this.store), o = new d(n, "revealed", this.store); 1706 if (n.models = {visible: r, revealed: o}, !o.body.length) { 1707 var s = n.members[r.body[0]], a = this.store.elements[s]; 1708 if (a) return j.call(this, n, r.body[0], -1, t), j.call(this, n, r.body[0], 1, t), c.call(this, a, { 1709 reveal: !0, 1710 pristine: t 1711 }) 1712 } 1713 if (!n.blocked.head && i === [].concat(o.head).pop() && i >= [].concat(r.body).shift()) return j.call(this, n, i, -1, t), c.call(this, e, { 1714 reveal: !0, 1715 pristine: t 1716 }); 1717 if (!n.blocked.foot && i === [].concat(o.foot).shift() && i <= [].concat(r.body).pop()) return j.call(this, n, i, 1, t), c.call(this, e, { 1718 reveal: !0, 1719 pristine: t 1720 }) 1721 } 1722 } 1723 1724 function E(e) { 1725 var t = Math.abs(e); 1726 if (isNaN(t)) throw new RangeError("Invalid sequence interval."); 1727 this.id = b(), this.interval = Math.max(t, 16), this.members = [], this.models = {}, this.blocked = { 1728 head: !1, 1729 foot: !1 1730 } 1731 } 1732 1733 function d(e, i, r) { 1734 var o = this; 1735 this.head = [], this.body = [], this.foot = [], f(e.members, function (e, t) { 1736 var n = r.elements[e]; 1737 n && n[i] && o.body.push(t) 1738 }), this.body.length && f(e.members, function (e, t) { 1739 var n = r.elements[e]; 1740 n && !n[i] && (t < o.body[0] ? o.head.push(t) : o.foot.push(t)) 1741 }) 1742 } 1743 1744 function j(e, t, n, i) { 1745 var r = this, o = ["head", null, "foot"][1 + n], s = e.members[t + n], a = this.store.elements[s]; 1746 e.blocked[o] = !0, setTimeout(function () { 1747 e.blocked[o] = !1, a && l.call(r, a, i) 1748 }, e.interval) 1749 } 1750 1751 function i(e, a, t) { 1752 var c = this; 1753 void 0 === a && (a = {}), void 0 === t && (t = !1); 1754 var l, d = [], n = a.interval || r.interval; 1755 try { 1756 n && (l = new E(n)); 1757 var i = u(e); 1758 if (!i.length) throw new Error("Invalid reveal target."); 1759 f(i.reduce(function (e, t) { 1760 var n = {}, i = t.getAttribute("data-sr-id"); 1761 i ? (v(n, c.store.elements[i]), m(n.node, n.styles.inline.computed)) : (n.id = b(), n.node = t, n.seen = !1, n.revealed = !1, n.visible = !1); 1762 var r = v({}, n.config || c.defaults, a); 1763 if (!r.mobile && g() || !r.desktop && !g()) return i && y.call(c, n), e; 1764 var o, s = u(r.container)[0]; 1765 if (!s) throw new Error("Invalid container."); 1766 return s.contains(t) && (null === (o = function (t) { 1767 var e = [], n = arguments.length - 1; 1768 for (; 0 < n--;) e[n] = arguments[n + 1]; 1769 var i = null; 1770 return f(e, function (e) { 1771 f(e, function (e) { 1772 null === i && e.node === t && (i = e.id) 1773 }) 1774 }), i 1775 }(s, d, c.store.containers)) && (o = b(), d.push({ 1776 id: o, 1777 node: s 1778 })), n.config = r, n.containerId = o, n.styles = p(n), l && (n.sequence = { 1779 id: l.id, 1780 index: l.members.length 1781 }, l.members.push(n.id)), e.push(n)), e 1782 }, []), function (e) { 1783 (c.store.elements[e.id] = e).node.setAttribute("data-sr-id", e.id) 1784 }) 1785 } catch (e) { 1786 return h.call(this, "Reveal failed.", e.message) 1787 } 1788 f(d, function (e) { 1789 c.store.containers[e.id] = {id: e.id, node: e.node} 1790 }), l && (this.store.sequences[l.id] = l), !0 !== t && (this.store.history.push({ 1791 target: e, 1792 options: a 1793 }), this.initTimeout && window.clearTimeout(this.initTimeout), this.initTimeout = window.setTimeout(w.bind(this), 0)) 1794 } 1795 1796 var T, k = Math.sign || function (e) { 1797 return (0 < e) - (e < 0) || +e 1798 }, O = (T = Date.now(), function (e) { 1799 var t = Date.now(); 1800 16 < t - T ? e(T = t) : setTimeout(function () { 1801 return O(e) 1802 }, 0) 1803 }), x = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || O; 1804 1805 function R(e, t) { 1806 for (var n = t ? e.node.clientHeight : e.node.offsetHeight, i = t ? e.node.clientWidth : e.node.offsetWidth, r = 0, o = 0, s = e.node; isNaN(s.offsetTop) || (r += s.offsetTop), isNaN(s.offsetLeft) || (o += s.offsetLeft), s = s.offsetParent;) ; 1807 return {bounds: {top: r, right: o + i, bottom: r + n, left: o}, height: n, width: i} 1808 } 1809 1810 function q(e, t) { 1811 var i = this; 1812 void 0 === e && (e = {type: "init"}), void 0 === t && (t = this.store.elements), x(function () { 1813 var n = "init" === e.type || "resize" === e.type; 1814 f(i.store.containers, function (e) { 1815 n && (e.geometry = R.call(i, e, !0)); 1816 var t = function (e) { 1817 var t, n; 1818 return n = e.node === document.documentElement ? (t = window.pageYOffset, window.pageXOffset) : (t = e.node.scrollTop, e.node.scrollLeft), { 1819 top: t, 1820 left: n 1821 } 1822 }.call(i, e); 1823 e.scroll && (e.direction = {x: k(t.left - e.scroll.left), y: k(t.top - e.scroll.top)}), e.scroll = t 1824 }), f(t, function (e) { 1825 (n || void 0 === e.geometry) && (e.geometry = R.call(i, e)), e.visible = function (e) { 1826 void 0 === e && (e = {}); 1827 var t = this.store.containers[e.containerId]; 1828 if (t) { 1829 var n = Math.max(0, Math.min(1, e.config.viewFactor)), i = e.config.viewOffset, 1830 r = e.geometry.bounds.top + e.geometry.height * n, 1831 o = e.geometry.bounds.right - e.geometry.width * n, 1832 s = e.geometry.bounds.bottom - e.geometry.height * n, 1833 a = e.geometry.bounds.left + e.geometry.width * n, 1834 c = t.geometry.bounds.top + t.scroll.top + i.top, 1835 l = t.geometry.bounds.right + t.scroll.left - i.right, 1836 d = t.geometry.bounds.bottom + t.scroll.top - i.bottom, 1837 u = t.geometry.bounds.left + t.scroll.left + i.left; 1838 return r < d && u < o && c < s && a < l || "fixed" === e.styles.position 1839 } 1840 }.call(i, e) 1841 }), f(t, function (e) { 1842 e.sequence ? l.call(i, e) : c.call(i, e) 1843 }), i.pristine = !1 1844 }) 1845 } 1846 1847 var A, P, L, M, I, C, W, Y, $ = "4.0.9"; 1848 1849 function H(e) { 1850 var t; 1851 if (void 0 === e && (e = {}), void 0 === this || Object.getPrototypeOf(this) !== H.prototype) return new H(e); 1852 if (!H.isSupported()) return h.call(this, "Instantiation failed.", "This browser is not supported."), n.failure(); 1853 try { 1854 t = v({}, C || r, e) 1855 } catch (e) { 1856 return h.call(this, "Invalid configuration.", e.message), n.failure() 1857 } 1858 try { 1859 if (!u(t.container)[0]) throw new Error("Invalid container.") 1860 } catch (e) { 1861 return h.call(this, e.message), n.failure() 1862 } 1863 return !(C = t).mobile && g() || !C.desktop && !g() ? (h.call(this, "This device is disabled.", "desktop: " + C.desktop, "mobile: " + C.mobile), n.failure()) : (n.success(), this.store = { 1864 containers: {}, 1865 elements: {}, 1866 history: [], 1867 sequences: {} 1868 }, this.pristine = !0, A = A || q.bind(this), P = P || function () { 1869 var n = this; 1870 f(this.store.elements, function (e) { 1871 m(e.node, e.styles.inline.generated), e.node.removeAttribute("data-sr-id") 1872 }), f(this.store.containers, function (e) { 1873 var t = e.node === document.documentElement ? window : e.no
1873de; 1874 t.removeEventListener("scroll", n.delegate), t.removeEventListener("resize", n.delegate) 1875 }), this.store = {containers: {}, elements: {}, history: [], sequences: {}} 1876 }.bind(this), L = L || i.bind(this), M = M || y.bind(this), I = I || function () { 1877 var t = this; 1878 f(this.store.history, function (e) { 1879 i.call(t, e.target, e.options, !0) 1880 }), w.call(this) 1881 }.bind(this), Object.defineProperty(this, "delegate", { 1882 get: function () { 1883 return A 1884 } 1885 }), Object.defineProperty(this, "destroy", { 1886 get: function () { 1887 return P 1888 } 1889 }), Object.defineProperty(this, "reveal", { 1890 get: function () { 1891 return L 1892 } 1893 }), Object.defineProperty(this, "clean", { 1894 get: function () { 1895 return M 1896 } 1897 }), Object.defineProperty(this, "sync", { 1898 get: function () { 1899 return I 1900 } 1901 }), Object.defineProperty(this, "defaults", { 1902 get: function () { 1903 return C 1904 } 1905 }), Object.defineProperty(this, "version", { 1906 get: function () { 1907 return $ 1908 } 1909 }), Object.defineProperty(this, "noop", { 1910 get: function () { 1911 return !1 1912 } 1913 }), Y || (Y = this)) 1914 } 1915 1916 return H.isSupported = function () { 1917 return ("transform" in (t = document.documentElement.style) || "WebkitTransform" in t) && ("transition" in (e = document.documentElement.style) || "WebkitTransition" in e); 1918 var e, t 1919 }, Object.defineProperty(H, "debug", { 1920 get: function () { 1921 return W || !1 1922 }, set: function (e) { 1923 return W = "boolean" == typeof e ? e : W 1924 } 1925 }), H(), H 1926}(); 1927 1928var scriptURL = 'https://sdks.shopifycdn.com/buy-button/latest/buy-button-storefront.min.js'; 1929if (window.ShopifyBuy) { 1930 if (window.ShopifyBuy.UI) { 1931 ShopifyBuyInit(); 1932 } else { 1933 loadScript(); 1934 } 1935} else { 1936 loadScript(); 1937} 1938 1939function loadScript() { 1940 var script = document.createElement('script'); 1941 script.async = true; 1942 script.src = scriptURL; 1943 (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(script); 1944 script.onload = ShopifyBuyInit; 1945} 1946 1947function ShopifyBuyInit() { 1948 1949 if (!window.shopifyTexts) { 1950 let texts = { 1951 product: { 1952 text: { 1953 button: 'ADD TO CART', 1954 outOfStock: 'Out of stock', 1955 unavailable: 'Unavailable', 1956 unitPriceAccessibilityLabel: 'Unit price', 1957 unitPriceAccessibilitySeparator: 'per', 1958 regularPriceAccessibilityLabel: 'Regular price', 1959 salePriceAccessibilityLabel: 'Sale price', 1960 }, 1961 }, 1962 modalProduct: { 1963 text: { 1964 button: 'ADD TO CART', 1965 }, 1966 }, 1967 productSet: { 1968 text: { 1969 nextPageButton: 'Next page', 1970 }, 1971 }, 1972 cart: { 1973 text: { 1974 title: 'Cart', 1975 empty: 'Your cart is empty.', 1976 button: 'CHECKOUT', 1977 total: 'SUBTOTAL', 1978 currency: 'CAD', 1979 notice: 'Shipping and discount codes are added at checkout.', 1980 noteDescription: 'Special instructions for seller', 1981 closeAccessibilityLabel: 'Close cart', 1982 }, 1983 }, 1984 lineItem: { 1985 text: { 1986 quantityInputAccessibilityLabel: 'Quantity', 1987 quantityDecrementAccessibilityLabel: 'Reduce item quantity by one', 1988 quantityIncrementAccessibilityLabel: 'Increase item quantity by one', 1989 }, 1990 }, 1991 toggle: { 1992 text: { 1993 title: 'cart', 1994 }, 1995 } 1996 } 1997 }else{ 1998 texts = window.shopifyTexts; 1999 } 2000 2001 2002 var client = ShopifyBuy.buildClient({ 2003 domain: 'ccdc68-2c.myshopify.com', 2004 storefrontAccessToken: '4a2b696b67e825495e30cc72e34ecfa8', 2005 }); 2006 ShopifyBuy.UI.onReady(client).then(function (ui) { 2007 document.querySelectorAll('.shopify-product').forEach((product) => { 2008 2009 product.addEventListener('click', function (e) { 2010 e.preventDefault(); 2011 product.querySelector('button').click(); 2012 }) 2013 2014 ui.createComponent('product', { 2015 id: product.dataset.id, 2016 node: product, 2017 iframe: false, 2018 moneyFormat: '%E2%82%AC %7B%7Bamount_with_comma_separator%7D%7D', 2019 options: { 2020 2021 "product": { 2022 'iframe': false, 2023 "styles": { 2024 "product": { 2025 "@media (min-width: 601px)": { 2026 "max-width": "calc(25% - 20px)", 2027 "margin-left": "20px", 2028 "margin-bottom": "50px" 2029 }, 2030 "text-align": "left" 2031 }, 2032 "title": { 2033 "font-family": "Avant Garde, sans-serif", 2034 "font-weight": "normal" 2035 } 2036 }, 2037 "buttonDestination": "modal", 2038 "contents": { 2039 "options": false 2040 }, 2041 "width": "580px", 2042 "text": texts.product.text 2043 }, 2044 "productSet": { 2045 "styles": { 2046 "products": { 2047 "@media (min-width: 601px)": { 2048 "margin-left": "-20px" 2049 } 2050 } 2051 } 2052 }, 2053 "modalProduct": { 2054 'iframe': false, 2055 "contents": { 2056 "img": false, 2057 "imgWithCarousel": true, 2058 "button": false, 2059 "buttonWithQuantity": true 2060 }, 2061 "styles": { 2062 "product": { 2063 "@media (min-width: 601px)": { 2064 "max-width": "100%", 2065 "margin-left": "0px", 2066 "margin-bottom": "0px" 2067 } 2068 }, 2069 "title": { 2070 "font-family": "Helvetica Neue, sans-serif", 2071 "font-weight": "bold", 2072 "font-size": "26px", 2073 "color": "#000000" 2074 }, 2075 "button": { 2076 "color": '#000', 2077 'font-weight': 'bold', 2078 'text-transform': 'uppercase', 2079 'letter-spacing': 0, 2080 ":hover": { 2081 "background-color": "#9a8fff" 2082 }, 2083 "background-color": "#FF7D00", 2084 ":focus": { 2085 "background-color": "#9a8fff" 2086 } 2087 }, 2088 }, 2089 "text": texts.modalProduct.text 2090 }, 2091 "option": {}, 2092 "cart": { 2093 // 'iframe': false, 2094 "text": texts.cart.text, 2095 "styles": { 2096 "button": { 2097 "color": '#000', 2098 'font-weight': 'bold', 2099 'text-transform': 'uppercase', 2100 'letter-spacing': 0, 2101 ":hover": { 2102 "background-color": "#9a8fff" 2103 }, 2104 "background-color": "#FF7D00", 2105 ":focus": { 2106 "background-color": "#9a8fff" 2107 } 2108 }, 2109 } 2110 }, 2111 "toggle": { 2112 "text": texts.toggle.text, 2113 "styles": { 2114 "toggle": { 2115 "color": '#FFF', 2116 'font-weight': 'bold', 2117 ":hover": { 2118 "background-color": "#9a8fff" 2119 }, 2120 "background-color": "#FF7D00", 2121 ":focus": { 2122 "background-color": "#9a8fff" 2123 } 2124 }, 2125 2126 } 2127 } 2128 }, 2129 }); 2130 }); 2131 2132 }); 2133} 2134 2135jQuery(function ($) { 2136 var orte = document.querySelectorAll('.ort div'); 2137 var rellax = new Rellax('.rellax'); 2138 window.addEventListener('scroll', () => { 2139 let offset = window.innerWidth < 767 ? 100 : 200; 2140 var counter = Math.round(window.scrollY / offset * 5); 2141 var index = 0; 2142 orte.forEach((ort) => ort.style.opacity = 0); 2143 orte.forEach((ort) => { 2144 if (index < counter) { 2145 ort.style.opacity = 1 2146 } 2147 index++; 2148 }); 2149 }); 2150 2151 2152 ScrollReveal().reveal('.reveal:not(.sequence)', { 2153 delay: shortTrans, 2154 scale: 0.95, 2155 duration: longTrans, 2156 mobile: enableMobile, 2157 cleanup: true, reset: false, 2158 }) 2159 2160 ScrollReveal().reveal('.reveal-bg', { 2161 delay: longTrans, 2162 scale: 1, 2163 interval: shortTrans, 2164 distance: '0px', 2165 duration: longTrans, 2166 mobile: enableMobile, 2167 cleanup: true, reset: false, 2168 }) 2169 2170 ScrollReveal().reveal('.reveal-zoom-in', { 2171 delay: shortTrans, 2172 scale: 1.05, 2173 duration: longTrans, 2174 mobile: enableMobile, 2175 cleanup: true, reset: false, 2176 }) 2177 2178 ScrollReveal().reveal('.reveal-zoom-in-sequence', { 2179 delay: shortTrans, 2180 scale: 1.05, 2181 duration: longTrans, 2182 mobile: enableMobile, 2183 interval: 150, 2184 cleanup: true, reset: false, 2185 }) 2186 2187 ScrollReveal().reveal('.reveal.sequence,.reveal-sequence', { 2188 interval: 50, 2189 distance: '25px', 2190 scale: 1, 2191 duration: longTrans, 2192 mobile: enableMobile, 2193 cleanup: true, reset: false, 2194 }); 2195 2196 2197 ScrollReveal().reveal('header ul li, .splash-2025 ul li, footer .bg div', { 2198 interval: 50, 2199 distance: '25px', 2200 scale: 1, 2201 duration: longTrans, 2202 mobile: enableMobile, 2203 cleanup: true, 2204 reset: false, 2205 }); 2206 2207 2208 2209 2210 let timeline = anime({ 2211 targets: '.reveal-special div',
2212 translateY: [".5em", 0], 2213 opacity: [0, 1], 2214 translateZ: 0, 2215 rotateX: [-90, 0], 2216 duration: 1000, 2217 easing: "easeInOutCubic", 2218 delay: (el, i) => 150 * i, 2219 autoplay: false 2220 }) 2221 2222 ScrollReveal().reveal('.reveal-special', { 2223 distance: '0px', // keine Bewegung 2224 opacity: 1, // keine Transparenz-Ãnderung 2225 duration: 0, // keine Dauer 2226 easing: 'linear', 2227 beforeReveal: function(el) { 2228 timeline.play(); 2229 }, 2230 reset: false // nur einmal triggern 2231 }); 2232 document.querySelectorAll('[data-plyr-embed-id]').forEach((playerEl) => { 2233 const player = Plyr.setup([playerEl]); 2234 }); 2235 2236 2237 $(".menu-btn").on("click", function () { 2238 var that = $(this); 2239 if (that.hasClass("is-open")) { 2240 that.removeClass("is-open").addClass("is-closed"); 2241 $('.main-menu').removeClass('show'); 2242 } else { 2243 that.removeClass("is-closed").addClass("is-open"); 2244 $('.main-menu').addClass('show'); 2245 2246 } 2247 }); 2248 2249 2250 $('.popup-youtube').each(function () { 2251 $(this).magnificPopup({ 2252 type: 'iframe' 2253 }); 2254 }) 2255 $('.timetableWidget').each(function () { 2256 const element = this.querySelector('.filter-wrap'); 2257 const sizer = element.querySelector('.js-shuffle-sizer'); 2258 2259 const shuffleInstance = new Shuffle(element, { 2260 itemSelector: '.filter-item', 2261 delimiter: ',', 2262 filterMode: 'all', 2263 sizer: sizer, // could also be a selector: '.js-shuffle-sizer' 2264 }); 2265 2266 let filterTT = []; 2267 let filterArt = []; 2268 2269 let filterFunc = () => { 2270 filterTT = []; 2271 filterArt = []; 2272 this.querySelectorAll('.filter-btn.active').forEach((btn) => {
2273 if (btn.dataset.filter.endsWith('_tt')) { 2274 filterTT.push(btn.dataset.filter); 2275 } else { 2276 filterArt.push(btn.dataset.filter); 2277 } 2278 }); 2279 shuffleInstance.filter((element) => { 2280 var filterItemsAll = (element.dataset.groups).split(','); 2281 var filterItemsTT = []; 2282 var filterItemsArt = []; 2283 2284 filterItemsAll.forEach((item) => { 2285 if (item.endsWith('_tt')) { 2286 filterItemsTT.push(item); 2287 return; 2288 } 2289 2290 filterItemsArt.push(item); 2291 2292 }) 2293 let resTT = false; 2294 if (filterTT.length) { 2295 filterTT.forEach((filter) => { 2296 if (filterItemsTT.includes(filter)) { 2297 resTT = true; 2298 } 2299 }); 2300 } else { 2301 resTT = true; 2302 } 2303 2304 let resArt = false; 2305 if (filterArt.length) { 2306 filterArt.forEach((filter) => { 2307 if (filterItemsArt.includes(filter)) { 2308 resArt = true; 2309 } 2310 }); 2311 } else { 2312 resArt = true; 2313 } 2314 2315 return resArt && resTT; 2316 }); 2317 } 2318 this.querySelector('.reset-filter').addEventListener('click', (e) => { 2319 e.preventDefault(); 2320 this.querySelectorAll('.filter-btn.active').forEach((btn) => { 2321 btn.classList.remove('active'); 2322 }); 2323 2324 shuffleInstance.filter(Shuffle.ALL_ITEMS); 2325 }) 2326 2327 this.querySelectorAll('.filter-btn').forEach((btn) => { 2328 btn.addEventListener('click', (e) => { 2329 e.preventDefault(); 2330 btn.classList.toggle('active'); 2331 filterFunc(); 2332 }) 2333 }) 2334 }) 2335 $('.venueWidget').each(function () { 2336 let map; 2337 let _this = this; 2338 let markers = []; 2339 2340 2341 async function initMap() { 2342 //@ts-ignore 2343 const {Map} = await google.maps.importLibrary("maps"); 2344 2345 var bounds = new google.maps.LatLngBounds(); 2346 2347 map = new Map(_this.querySelector('.map-container'), { 2348 center: {lat: 47.259659, lng: 11.400375}, 2349 2350 zoom: 8, 2351 styles: [ 2352 { 2353 "featureType": "water", 2354 "elementType": "geometry", 2355 "stylers": [ 2356 { 2357 "color": "#e9e9e9" 2358 }, 2359 { 2360 "lightness": 17 2361 } 2362 ] 2363 }, 2364 { 2365 "featureType": "landscape", 2366 "elementType": "geometry", 2367 "stylers": [ 2368 { 2369 "color": "#f5f5f5" 2370 }, 2371 { 2372 "lightness": 20 2373 } 2374 ] 2375 }, 2376 { 2377 "featureType": "road.highway", 2378 "elementType": "geometry.fill", 2379 "stylers": [ 2380 { 2381 "color": "#ffffff" 2382 }, 2383 { 2384 "lightness": 17 2385 } 2386 ] 2387 }, 2388 { 2389 "featureType": "road.highway", 2390 "elementType": "geometry.stroke", 2391 "stylers": [ 2392 { 2393 "color": "#ffffff" 2394 }, 2395 { 2396 "lightness": 29 2397 }, 2398 { 2399 "weight": 0.2 2400 } 2401 ] 2402 }, 2403 { 2404 "featureType": "road.arterial", 2405 "elementType": "geometry", 2406 "stylers": [ 2407 { 2408 "color": "#ffffff" 2409 }, 2410 { 2411 "lightness": 18 2412 } 2413 ] 2414 }, 2415 { 2416 "featureType": "road.local", 2417 "elementType": "geometry", 2418 "stylers": [ 2419 { 2420 "color": "#ffffff" 2421 }, 2422 { 2423 "lightness": 16 2424 } 2425 ] 2426 }, 2427 { 2428 "featureType": "poi", 2429 "elementType": "geometry", 2430 "stylers": [ 2431 { 2432 "color": "#f5f5f5" 2433 }, 2434 { 2435 "lightness": 21 2436 } 2437 ] 2438 }, 2439 { 2440 "featureType": "poi.park", 2441 "elementType": "geometry", 2442 "stylers": [ 2443 { 2444 "color": "#dedede" 2445 }, 2446 { 2447 "lightness": 21 2448 } 2449 ] 2450 }, 2451 { 2452 "elementType": "labels.text.stroke", 2453 "stylers": [ 2454 { 2455 "visibility": "on" 2456 }, 2457 { 2458 "color": "#ffffff" 2459 }, 2460 { 2461 "lightness": 16 2462 } 2463 ] 2464 }, 2465 { 2466 "elementType": "labels.text.fill", 2467 "stylers": [ 2468 { 2469 "saturation": 36 2470 }, 2471 { 2472 "color": "#333333" 2473 }, 2474 { 2475 "lightness": 40 2476 } 2477 ] 2478 }, 2479 { 2480 "elementType": "labels.icon", 2481 "stylers": [ 2482 { 2483 "visibility": "off" 2484 } 2485 ] 2486 }, 2487 { 2488 "featureType": "transit", 2489 "elementType": "geometry", 2490 "stylers": [ 2491 { 2492 "color": "#f2f2f2" 2493 }, 2494 { 2495 "lightness": 19 2496 } 2497 ] 2498 }, 2499 { 2500 "featureType": "administrative", 2501 "elementType": "geometry.fill", 2502 "stylers": [ 2503 { 2504 "color": "#fefefe" 2505 }, 2506 { 2507 "lightness": 20 2508 } 2509 ] 2510 }, 2511 { 2512 "featureType": "administrative", 2513 "elementType": "geometry.stroke", 2514 "stylers": [ 2515 { 2516 "color": "#fefefe" 2517 }, 2518 { 2519 "lightness": 17 2520 }, 2521 { 2522 "weight": 1.2 2523 } 2524 ] 2525 } 2526 ] 2527 }); 2528 2529 let curinfowindow = null; 2530 const markers = []; 2531 let timeOut = 0; 2532 _this.querySelectorAll('.location-item').forEach((location) => { 2533 window.setTimeout(() => { 2534 const myLatLng = {lat: parseFloat(location.dataset.lat), lng: parseFloat(location.dataset.lng)}; 2535 let contentString = location.innerHTML; 2536 2537 contentString = contentString.replace('class="', 'class="h5 '); 2538 const marker = new google.maps.Marker({ 2539 position: myLatLng, 2540 map, 2541 animation: google.maps.Animation.DROP, 2542 title: location.querySelector('h4').textContent, 2543 }); 2544 2545 const icon = { 2546 url: "/wp-content/themes/positive-future/img/location-pin-orange.png?v=2", // url 2547 scaledSize: new google.maps.Size(40, 40), // scaled size 2548 }; 2549 2550 const iconActive = { 2551 url: "/wp-content/themes/positive-future/img/location-pin--active.png?v=2", // url 2552 scaledSize: new google.maps.Size(50, 50), // scaled size 2553 }; 2554 2555 let iconHover = { 2556 url: "/wp-content/themes/positive-future/img/location-pin-orange.png?v=2", // url 2557 scaledSize: new google.maps.Size(50, 50), // scaled size 2558 }; 2559 2560 let isOpen = false;
2561 2562 marker.setIcon(icon) 2563 2564 marker.addListener("click", () => { 2565 location.classList.add('active'); 2566 2567 openMarker(); 2568 2569 }); 2570 2571 marker.addListener("mouseover", () => { 2572 2573 marker.setAnimation(3); 2574 2575 }); 2576 2577 marker.addListener("mouseout", () => { 2578 2579 marker.setAnimation(4); 2580 2581 }); 2582 2583 2584 function openMarker(e) { 2585 2586 if (e) 2587 e.preventDefault(); 2588 2589 _this.querySelectorAll('.location-item.active').forEach((activelocation) => { 2590 if (activelocation !== location) activelocation.classList.remove('active') 2591 }); 2592 2593 markers.forEach((actmarker) => actmarker.setIcon(icon)); 2594 marker.setIcon(iconActive) 2595 isOpen = true; 2596 if (curinfowindow) { 2597 curinfowindow.close(); 2598 } 2599 curinfowindow = new google.maps.InfoWindow({ 2600 content: contentString, 2601 ariaLabel: location.querySelector('h4').textContent, 2602 }); 2603 2604 curinfowindow.open({ 2605 anchor: marker, 2606 map, 2607 }); 2608 2609 google.maps.event.addListener(curinfowindow, 'closeclick', function () { 2610 _this.querySelectorAll('.location-item.active').forEach((activelocation) => { 2611 activelocation.classList.remove('active') 2612 }); 2613 markers.forEach((actmarker) => actmarker.setIcon(icon)); 2614 marker.setIcon(icon); 2615 isOpen = false; 2616 2617 }); 2618 2619 } 2620 2621 location.addEventListener('click', (e) => { 2622 location.classList.add('active'); 2623 2624 openMarker(e); 2625 }) 2626 2627 2628 location.addEventListener('mouseenter', (e) => { 2629 openMarker(e); 2630 }) 2631 2632 location.addEventListener('mouseleave', (e) => { 2633 if (!location.classList.contains('active')) { 2634 _this.querySelectorAll('.location-item.active').forEach((activelocation) => { 2635 activelocation.classList.remove('active') 2636 }); 2637 markers.forEach((actmarker) => actmarker.setIcon(icon)); 2638 2639 if (curinfowindow) { 2640 curinfowindow.close(); 2641 } 2642 2643 isOpen = false; 2644 } 2645 }) 2646 bounds.extend(marker.getPosition()); 2647 2648 markers.push(marker); 2649 }, timeOut); 2650 2651 timeOut = timeOut + 50; 2652 }) 2653 2654 setTimeout(() => { 2655 map.fitBounds(bounds); 2656 }, timeOut + 1) 2657 2658 2659 window.addEventListener('resize', () => { 2660 map.fitBounds(bounds); 2661 }) 2662 2663 } 2664 2665 initMap(); 2666 }) 2667 2668 2669 $('.main-menu a[href*="#"]').on('click', (e) => { 2670 2671 $(".menu-btn").removeClass("is-open").addClass("is-closed"); 2672 $('.main-menu').removeClass('show'); 2673 }) 2674 2675 var lastScrollTop = 0; 2676 2677 var filterbar = document.querySelector('.filter-bar'); 2678 window.addEventListener("scroll", function () { // or window.addEventListener("scroll".... 2679 var st = window.pageYOffset || document.documentElement.scrollTop; // Credits: "https://github.com/qeremy/so/blob/master/so.dom.js#L426" 2680 if (st > lastScrollTop && st > 200 && !jQuery(".menu-btn").hasClass('is-open')) { 2681 document.querySelector('#masthead').classList.add('down'); 2682 document.querySelector('#masthead').classList.remove('up'); 2683 if (filterbar) { 2684 filterbar.classList.add('down'); 2685 filterbar.classList.remove('up'); 2686 } 2687 jQuery(".menu-btn").removeClass("is-open").addClass("is-closed"); 2688 jQuery('.main-menu').removeClass('show'); 2689 } else if (st < lastScrollTop) { 2690 document.querySelector('#masthead').classList.remove('down'); 2691 document.querySelector('#masthead').classList.add('up'); 2692 if (filterbar) { 2693 filterbar.classList.remove('down'); 2694 filterbar.classList.add('up'); 2695 } 2696 } 2697 lastScrollTop = st <= 0 ? 0 : st; 2698 }, false); 2699 2700 2701 $('.collapse').on('shown.bs.collapse', function (e) { 2702 var $card = $(this).closest('.accordion-item'); 2703 $('html,body').animate({ 2704 scrollTop: $card.offset().top - $('#masthead').height() 2705 }, 250); 2706 }); 2707 2708 2709}); // jQuery End 2710 2711 2712
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.