1(() => { 2 var __create = Object.create; 3 var __defProp = Object.defineProperty; 4 var __getOwnPropDesc = Object.getOwnPropertyDescriptor; 5 var __getOwnPropNames = Object.getOwnPropertyNames; 6 var __getProtoOf = Object.getPrototypeOf; 7 var __hasOwnProp = Object.prototype.hasOwnProperty; 8 var __commonJS = (cb, mod) => function __require() { 9 return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; 10 }; 11 var __copyProps = (to, from, except, desc) => { 12 if (from && typeof from === "object" || typeof from === "function") { 13 for (let key of __getOwnPropNames(from)) 14 if (!__hasOwnProp.call(to, key) && key !== except) 15 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); 16 } 17 return to; 18 }; 19 var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod)); 20 21
vendor: 14,269 bytes, lines 21-265
21// node_modules/baguettebox.js/dist/baguetteBox.min.js 22 var require_baguetteBox_min = __commonJS({ 23 "node_modules/baguettebox.js/dist/baguetteBox.min.js"(exports, module) { 24 !function(e, t) { 25 "use strict"; 26 typeof define == "function" && define.amd ? define(t) : typeof exports == "object" ? module.exports = t() : e.baguetteBox = t(); 27 }(exports, function() { 28 "use strict"; 29 var r, l, u, c, d, f = '<svg width="44" height="60"><polyline points="30 10 10 30 30 50" stroke="rgba(255,255,255,0.5)" stroke-width="4"stroke-linecap="butt" fill="none" stroke-linejoin="round"/></svg>', g = '<svg width="44" height="60"><polyline points="14 10 34 30 14 50" stroke="rgba(255,255,255,0.5)" stroke-width="4"stroke-linecap="butt" fill="none" stroke-linejoin="round"/></svg>', p = '<svg width="30" height="30"><g stroke="rgb(160,160,160)" stroke-width="4"><line x1="5" y1="5" x2="25" y2="25"/><line x1="5" y1="25" x2="25" y2="5"/></g></svg>', b = {}, v = { captions: true, buttons: "auto", fullScreen: false, noScrollbars: false, bodyClass: "baguetteBox-open", titleTag: false, async: false, preload: 2, animation: "slideIn", afterShow: null, afterHide: null, onChange: null, overlayBackgroundColor: "rgba(0,0,0,.8)" }, m = {}, h = [], o = 0, n = false, i = {}, a = false, y = /.+\.(gif|jpe?g|png|webp)/i, w = {}, k = [], s = null, x = function(e) { 30 e.target.id.indexOf("baguette-img") !== -1 && j(); 31 }, E = function(e) { 32 e.stopPropagation ? e.stopPropagation() : e.cancelBubble = true, D(); 33 }, C = function(e) { 34 e.stopPropagation ? e.stopPropagation() : e.cancelBubble = true, X(); 35 }, B = function(e) { 36 e.stopPropagation ? e.stopPropagation() : e.cancelBubble = true, j(); 37 }, T = function(e) { 38 i.count++, 1 < i.count && (i.multitouch = true), i.startX = e.changedTouches[0].pageX, i.startY = e.changedTouches[0].pageY; 39 }, N = function(e) { 40 if (!a && !i.multitouch) { 41 e.preventDefault ? e.preventDefault() : e.returnValue = false; 42 var t = e.touches[0] || e.changedTouches[0]; 43 40 < t.pageX - i.startX ? (a = true, D()) : t.pageX - i.startX < -40 ? (a = true, X()) : 100 < i.startY - t.pageY && j(); 44 } 45 }, L = function() { 46 i.count--, i.count <= 0 && (i.multitouch = false), a = false; 47 }, A = function() { 48 L(); 49 }, P = function(e) { 50 r.style.display === "block" && r.contains && !r.contains(e.target) && (e.stopPropagation(), Y()); 51 }; 52 function S(e) { 53 if (w.hasOwnProperty(e)) { 54 var t = w[e].galleries; 55 [].forEach.call(t, function(e2) { 56 [].forEach.call(e2, function(e3) { 57 W(e3.imageElement, "click", e3.eventHandler); 58 }), h === e2 && (h = []); 59 }), delete w[e]; 60 } 61 } 62 function F(e) { 63 switch (e.keyCode) { 64 case 37: 65 D(); 66 break; 67 case 39: 68 X(); 69 break; 70 case 27: 71 j(); 72 break; 73 case 36: 74 !function t(e2) { 75 e2 && e2.preventDefault(); 76 return M(0); 77 }(e); 78 break; 79 case 35: 80 !function n2(e2) { 81 e2 && e2.preventDefault(); 82 return M(h.length - 1); 83 }(e); 84 } 85 } 86 function H(e, t) { 87 if (h !== e) { 88 for (h = e, function s2(e2) { 89 e2 = e2 || {}; 90 for (var t2 in v) 91 b[t2] = v[t2], typeof e2[t2] != "undefined" && (b[t2] = e2[t2]); 92 l.style.transition = l.style.webkitTransition = b.animation === "fadeIn" ? "opacity .4s ease" : b.animation === "slideIn" ? "" : "none", b.buttons === "auto" && ("ontouchstart" in window || h.length === 1) && (b.buttons = false); 93 u.style.display = c.style.display = b.buttons ? "" : "none"; 94 try { 95 r.style.backgroundColor = b.overlayBackgroundColor; 96 } catch (n3) { 97 } 98 }(t); l.firstChild; ) 99 l.removeChild(l.firstChild); 100 for (var n2, o2 = [], i2 = [], a2 = k.length = 0; a2 < e.length; a2++) 101 (n2 = J("div")).className = "full-image", n2.id = "baguette-img-" + a2, k.push(n2), o2.push("baguetteBox-figure-" + a2), i2.push("baguetteBox-figcaption-" + a2), l.appendChild(k[a2]); 102 r.setAttribute("aria-labelledby", o2.join(" ")), r.setAttribute("aria-describedby", i2.join(" ")); 103 } 104 } 105 function I(e) { 106 b.noScrollbars && (document.documentElement.style.overflowY = "hidden", document.body.style.overflowY = "scroll"), r.style.display !== "block" && (U(document, "keydown", F), i = { count: 0, startX: null, startY: null }, q(o = e, function() { 107 z(o), V(o); 108 }), R(), r.style.display = "block", b.fullScreen && function t() { 109 r.requestFullscreen ? r.requestFullscreen() : r.webkitRequestFullscreen ? r.webkitRequestFullscreen() : r.mozRequestFullScreen && r.mozRequestFullScreen(); 110 }(), setTimeout(function() { 111 r.className = "visible", b.bodyClass && document.body.classList && document.body.classList.add(b.bodyClass), b.afterShow && b.afterShow(); 112 }, 50), b.onChange && b.onChange(o, k.length), s = document.activeElement, Y(), n = true); 113 } 114 function Y() { 115 b.buttons ? u.focus() : d.focus(); 116 } 117 function j() { 118 b.noScrollbars && (document.documentElement.style.overflowY = "auto", document.body.style.overflowY = "auto"), r.style.display !== "none" && (W(document, "keydown", F), r.className = "", setTimeout(function() { 119 r.style.display = "none", document.fullscreen && function e() { 120 document.exitFullscreen ? document.exitFullscreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.webkitExitFullscreen && document.webkitExitFullscreen(); 121 }(), b.bodyClass && document.body.classList && document.body.classList.remove(b.bodyClass), b.afterHide && b.afterHide(), s && s.focus(), n = false; 122 }, 500)); 123 } 124 function q(t, n2) { 125 var e = k[t], o2 = h[t]; 126 if (e !== void 0 && o2 !== void 0) 127 if (e.getElementsByTagName("img")[0]) 128 n2 && n2(); 129 else { 130 var i2 = o2.imageElement, a2 = i2.getElementsByTagName("img")[0], s2 = typeof b.captions == "function" ? b.captions.call(h, i2) : i2.getAttribute("data-caption") || i2.title, r2 = function d2(e2) { 131 var t2 = e2.href; 132 if (e2.dataset) { 133 var n3 = []; 134 for (var o3 in e2.dataset) 135 o3.substring(0, 3) !== "at-" || isNaN(o3.substring(3)) || (n3[o3.replace("at-", "")] = e2.dataset[o3]); 136 for (var i3 = Object.keys(n3).sort(function(e3, t3) { 137 return parseInt(e3, 10) < parseInt(t3, 10) ? -1 : 1; 138 }), a3 = window.innerWidth * window.devicePixelRatio, s3 = 0; s3 < i3.length - 1 && i3[s3] < a3; ) 139 s3++; 140 t2 = n3[i3[s3]] || t2; 141 } 142 return t2; 143 }(i2), l2 = J("figure"); 144 if (l2.id = "baguetteBox-figure-" + t, l2.innerHTML = '<div class="baguetteBox-spinner"><div class="baguetteBox-double-bounce1"></div><div class="baguetteBox-double-bounce2"></div></div>', b.captions && s2) { 145 var u2 = J("figcaption"); 146 u2.id = "baguetteBox-figcaption-" + t, u2.innerHTML = s2, l2.appendChild(u2); 147 } 148 e.appendChild(l2); 149 var c2 = J("img"); 150 c2.onload = function() { 151 var e2 = document.querySelector("#baguette-img-" + t + " .baguetteBox-spinner"); 152 l2.removeChild(e2), !b.async && n2 && n2(); 153 }, c2.setAttribute("src", r2), c2.alt = a2 && a2.alt || "", b.titleTag && s2 && (c2.title = s2), l2.appendChild(c2), b.async && n2 && n2(); 154 } 155 } 156 function X() { 157 return M(o + 1); 158 } 159 function D() { 160 return M(o - 1); 161 } 162 function M(e, t) { 163 return !n && 0 <= e && e < t.length ? (H(t, b), I(e), true) : e < 0 ? (b.animation && O("left"), false) : e >= k.length ? (b.animation && O("right"), false) : (q(o = e, function() { 164 z(o), V(o); 165 }), R(), b.onChange && b.onChange(o, k.length), true); 166 } 167 function O(e) { 168 l.className = "bounce-from-" + e, setTimeout(function() { 169 l.className = ""; 170 }, 400); 171 } 172 function R() { 173 var e = 100 * -o + "%"; 174 b.animation === "fadeIn" ? (l.style.opacity = 0, setTimeout(function() { 175 m.transforms ? l.style.transform = l.style.webkitTransform = "translate3d(" + e + ",0,0)" : l.style.left = e, l.style.opacity = 1; 176 }, 400)) : m.transforms ? l.style.transform = l.style.webkitTransform = "translate3d(" + e + ",0,0)" : l.style.left = e; 177 } 178 function z(e) { 179 e - o >= b.preload || q(e + 1, function() { 180 z(e + 1); 181 }); 182 } 183 function V(e) { 184 o - e >= b.preload || q(e - 1, function() { 185 V(e - 1); 186 }); 187 } 188 function U(e, t, n2, o2) { 189 e.addEventListener ? e.addEventListener(t, n2, o2) : e.attachEvent("on" + t, function(e2) { 190 (e2 = e2 || window.event).target = e2.target || e2.srcElement, n2(e2); 191 }); 192 } 193 function W(e, t, n2, o2) { 194 e.removeEventListener ? e.removeEventListener(t, n2, o2) : e.detachEvent("on" + t, n2); 195 } 196 function G(e) { 197 return document.getElementById(e); 198 } 199 function J(e) { 200 return document.createElement(e); 201 } 202 return [].forEach || (Array.prototype.forEach = function(e, t) { 203 for (var n2 = 0; n2 < this.length; n2++) 204 e.call(t, this[n2], n2, this); 205 }), [].filter || (Array.prototype.filter = function(e, t, n2, o2, i2) { 206 for (n2 = this, o2 = [], i2 = 0; i2 < n2.length; i2++) 207 e.call(t, n2[i2], i2, n2) && o2.push(n2[i2]); 208 return o2; 209 }), { run: function K(e, t) { 210 return m.transforms = function n2() { 211 var e2 = J("div"); 212 return typeof e2.style.perspective != "undefined" || typeof e2.style.webkitPerspective != "undefined"; 213 }(), m.svg = function o2() { 214 var e2 = J("div"); 215 return e2.innerHTML = "<svg/>", (e2.firstChild && e2.firstChild.namespaceURI) === "http://www.w3.org/2000/svg"; 216 }(), m.passiveEvents = function i2() { 217 var e2 = false; 218 try { 219 var t2 = Object.defineProperty({}, "passive", { get: function() { 220 e2 = true; 221 } }); 222 window.addEventListener("test", null, t2); 223 } catch (n2) { 224 } 225 return e2; 226 }(), function a2() { 227 if (r = G("baguetteBox-overlay")) 228 return l = G("baguetteBox-slider"), u = G("previous-button"), c = G("next-button"), void (d = G("close-button")); 229 (r = J("div")).setAttribute("role", "dialog"), r.id = "baguetteBox-overlay", document.getElementsByTagName("body")[0].appendChild(r), (l = J("div")).id = "baguetteBox-slider", r.appendChild(l), (u = J("button")).setAttribute("type", "button"), u.id = "previous-button", u.setAttribute("aria-label", "Previous"), u.innerHTML = m.svg ? f : "<", r.appendChild(u), (c = J("button")).setAttribute("type", "button"), c.id = "next-button", c.setAttribute("aria-label", "Next"), c.innerHTML = m.svg ? g : ">", r.appendChild(c), (d = J("button")).setAttribute("type", "button"), d.id = "close-button", d.setAttribute("aria-label", "Close"), d.innerHTML = m.svg ? p : "×", r.appendChild(d), u.className = c.className = d.className = "baguetteBox-button", function n2() { 230 var e2 = m.passiveEvents ? { passive: false } : null, t2 = m.passiveEvents ? { passive: true } : null; 231 U(r, "click", x), U(u, "click", E), U(c, "click", C), U(d, "click", B), U(l, "contextmenu", A), U(r, "touchstart", T, t2), U(r, "touchmove", N, e2), U(r, "touchend", L), U(document, "focus", P, true); 232 }(); 233 }(), S(e), function s2(e2, a2) { 234 var t2 = document.querySelectorAll(e2), n2 = { galleries: [], nodeList: t2 }; 235 return w[e2] = n2, [].forEach.call(t2, function(e3) { 236 a2 && a2.filter && (y = a2.filter); 237 var t3 = []; 238 if (t3 = e3.tagName === "A" ? [e3] : e3.getElementsByTagName("a"), (t3 = [].filter.call(t3, function(e4) { 239 if (e4.className.indexOf(a2 && a2.ignoreClass) === -1) 240 return y.test(e4.href); 241 })).length !== 0) { 242 var i2 = []; 243 [].forEach.call(t3, function(e4, t4) { 244 var n3 = function(e5) { 245 e5.preventDefault ? e5.preventDefault() : e5.returnValue = false, H(i2, a2), I(t4); 246 }, o2 = { eventHandler: n3, imageElement: e4 }; 247 U(e4, "click", n3), i2.push(o2); 248 }), n2.galleries.push(i2); 249 } 250 }), n2.galleries; 251 }(e, t); 252 }, show: M, showNext: X, showPrevious: D, hide: j, destroy: function e() { 253 !function n2() { 254 var e2 = m.passiveEvents ? { passive: false } : null, t = m.passiveEvents ? { passive: true } : null; 255 W(r, "click", x), W(u, "click", E), W(c, "click", C), W(d, "click", B), W(l, "contextmenu", A), W(r, "touchstart", T, t), W(r, "touchmove", N, e2), W(r, "touchend", L), W(document, "focus", P, true); 256 }(), function t() { 257 for (var e2 in w) 258 w.hasOwnProperty(e2) && S(e2); 259 }(), W(document, "keydown", F), document.getElementsByTagName("body")[0].removeChild(document.getElementById("baguetteBox-overlay")), w = {}, h = [], o = 0; 260 } }; 261 }); 262 } 263 }); 264 265
vendor: 2,654 bytes, lines 265-341
265// node_modules/ev-emitter/ev-emitter.js 266 var require_ev_emitter = __commonJS({ 267 "node_modules/ev-emitter/ev-emitter.js"(exports, module) { 268 (function(global, factory) { 269 if (typeof define == "function" && define.amd) { 270 define(factory); 271 } else if (typeof module == "object" && module.exports) { 272 module.exports = factory(); 273 } else { 274 global.EvEmitter = factory(); 275 } 276 })(typeof window != "undefined" ? window : exports, function() { 277 "use strict"; 278 function EvEmitter() { 279 } 280 var proto = EvEmitter.prototype; 281 proto.on = function(eventName, listener) { 282 if (!eventName || !listener) { 283 return; 284 } 285 var events = this._events = this._events || {}; 286 var listeners = events[eventName] = events[eventName] || []; 287 if (listeners.indexOf(listener) == -1) { 288 listeners.push(listener); 289 } 290 return this; 291 }; 292 proto.once = function(eventName, listener) { 293 if (!eventName || !listener) { 294 return; 295 } 296 this.on(eventName, listener); 297 var onceEvents = this._onceEvents = this._onceEvents || {}; 298 var onceListeners = onceEvents[eventName] = onceEvents[eventName] || {}; 299 onceListeners[listener] = true; 300 return this; 301 }; 302 proto.off = function(eventName, listener) { 303 var listeners = this._events && this._events[eventName]; 304 if (!listeners || !listeners.length) { 305 return; 306 } 307 var index = listeners.indexOf(listener); 308 if (index != -1) { 309 listeners.splice(index, 1); 310 } 311 return this; 312 }; 313 proto.emitEvent = function(eventName, args) { 314 var listeners = this._events && this._events[eventName]; 315 if (!listeners || !listeners.length) { 316 return; 317 } 318 listeners = listeners.slice(0); 319 args = args || []; 320 var onceListeners = this._onceEvents && this._onceEvents[eventName]; 321 for (var i = 0; i < listeners.length; i++) { 322 var listener = listeners[i]; 323 var isOnce = onceListeners && onceListeners[listener]; 324 if (isOnce) { 325 this.off(eventName, listener); 326 delete onceListeners[listener]; 327 } 328 listener.apply(this, args); 329 } 330 return this; 331 }; 332 proto.allOff = function() { 333 delete this._events; 334 delete this._onceEvents; 335 }; 336 return EvEmitter; 337 }); 338 } 339 }); 340 341
vendor: 4,740 bytes, lines 341-469
341// node_modules/get-size/get-size.js 342 var require_get_size = __commonJS({ 343 "node_modules/get-size/get-size.js"(exports, module) { 344 (function(window2, factory) { 345 if (typeof define == "function" && define.amd) { 346 define(factory); 347 } else if (typeof module == "object" && module.exports) { 348 module.exports = factory(); 349 } else { 350 window2.getSize = factory(); 351 } 352 })(window, function factory() { 353 "use strict"; 354 function getStyleSize(value) { 355 var num = parseFloat(value); 356 var isValid = value.indexOf("%") == -1 && !isNaN(num); 357 return isValid && num; 358 } 359 function noop() { 360 } 361 var logError = typeof console == "undefined" ? noop : function(message) { 362 console.error(message); 363 }; 364 var measurements = [ 365 "paddingLeft", 366 "paddingRight", 367 "paddingTop", 368 "paddingBottom", 369 "marginLeft", 370 "marginRight", 371 "marginTop", 372 "marginBottom", 373 "borderLeftWidth", 374 "borderRightWidth", 375 "borderTopWidth", 376 "borderBottomWidth" 377 ]; 378 var measurementsLength = measurements.length; 379 function getZeroSize() { 380 var size = { 381 width: 0, 382 height: 0, 383 innerWidth: 0, 384 innerHeight: 0, 385 outerWidth: 0, 386 outerHeight: 0 387 }; 388 for (var i = 0; i < measurementsLength; i++) { 389 var measurement = measurements[i]; 390 size[measurement] = 0; 391 } 392 return size; 393 } 394 function getStyle(elem) { 395 var style = getComputedStyle(elem); 396 if (!style) { 397 logError("Style returned " + style + ". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"); 398 } 399 return style; 400 } 401 var isSetup = false; 402 var isBoxSizeOuter; 403 function setup() { 404 if (isSetup) { 405 return; 406 } 407 isSetup = true; 408 var div = document.createElement("div"); 409 div.style.width = "200px"; 410 div.style.padding = "1px 2px 3px 4px"; 411 div.style.borderStyle = "solid"; 412 div.style.borderWidth = "1px 2px 3px 4px"; 413 div.style.boxSizing = "border-box"; 414 var body = document.body || document.documentElement; 415 body.appendChild(div); 416 var style = getStyle(div); 417 isBoxSizeOuter = Math.round(getStyleSize(style.width)) == 200; 418 getSize.isBoxSizeOuter = isBoxSizeOuter; 419 body.removeChild(div); 420 } 421 function getSize(elem) { 422 setup(); 423 if (typeof elem == "string") { 424 elem = document.querySelector(elem); 425 } 426 if (!elem || typeof elem != "object" || !elem.nodeType) { 427 return; 428 } 429 var style = getStyle(elem); 430 if (style.display == "none") { 431 return getZeroSize(); 432 } 433 var size = {}; 434 size.width = elem.offsetWidth; 435 size.height = elem.offsetHeight; 436 var isBorderBox = size.isBorderBox = style.boxSizing == "border-box"; 437 for (var i = 0; i < measurementsLength; i++) { 438 var measurement = measurements[i]; 439 var value = style[measurement]; 440 var num = parseFloat(value); 441 size[measurement] = !isNaN(num) ? num : 0; 442 } 443 var paddingWidth = size.paddingLeft + size.paddingRight; 444 var paddingHeight = size.paddingTop + size.paddingBottom; 445 var marginWidth = size.marginLeft + size.marginRight; 446 var marginHeight = size.marginTop + size.marginBottom; 447 var borderWidth = size.borderLeftWidth + size.borderRightWidth; 448 var borderHeight = size.borderTopWidth + size.borderBottomWidth; 449 var isBorderBoxSizeOuter = isBorderBox && isBoxSizeOuter; 450 var styleWidth = getStyleSize(style.width); 451 if (styleWidth !== false) { 452 size.width = styleWidth + (isBorderBoxSizeOuter ? 0 : paddingWidth + borderWidth); 453 } 454 var styleHeight = getStyleSize(style.height); 455 if (styleHeight !== false) { 456 size.height = styleHeight + (isBorderBoxSizeOuter ? 0 : paddingHeight + borderHeight); 457 } 458 size.innerWidth = size.width - (paddingWidth + borderWidth); 459 size.innerHeight = size.height - (paddingHeight + borderHeight); 460 size.outerWidth = size.width + marginWidth; 461 size.outerHeight = size.height + marginHeight; 462 return size; 463 } 464 return getSize; 465 }); 466 } 467 }); 468 469
vendor: 1,282 bytes, lines 469-507
469// node_modules/desandro-matches-selector/matches-selector.js 470 var require_matches_selector = __commonJS({ 471 "node_modules/desandro-matches-selector/matches-selector.js"(exports, module) { 472 (function(window2, factory) { 473 "use strict"; 474 if (typeof define == "function" && define.amd) { 475 define(factory); 476 } else if (typeof module == "object" && module.exports) { 477 module.exports = factory(); 478 } else { 479 window2.matchesSelector = factory(); 480 } 481 })(window, function factory() { 482 "use strict"; 483 var matchesMethod = function() { 484 var ElemProto = window.Element.prototype; 485 if (ElemProto.matches) { 486 return "matches"; 487 } 488 if (ElemProto.matchesSelector) { 489 return "matchesSelector"; 490 } 491 var prefixes = ["webkit", "moz", "ms", "o"]; 492 for (var i = 0; i < prefixes.length; i++) { 493 var prefix = prefixes[i]; 494 var method = prefix + "MatchesSelector"; 495 if (ElemProto[method]) { 496 return method; 497 } 498 } 499 }(); 500 return function matchesSelector(elem, selector) { 501 return elem[matchesMethod](selector); 502 }; 503 }); 504 } 505 }); 506 507
vendor: 5,360 bytes, lines 507-656
507// node_modules/fizzy-ui-utils/utils.js 508 var require_utils = __commonJS({ 509 "node_modules/fizzy-ui-utils/utils.js"(exports, module) { 510 (function(window2, factory) { 511 if (typeof define == "function" && define.amd) { 512 define([ 513 "desandro-matches-selector/matches-selector" 514 ], function(matchesSelector) { 515 return factory(window2, matchesSelector); 516 }); 517 } else if (typeof module == "object" && module.exports) { 518 module.exports = factory(window2, require_matches_selector()); 519 } else { 520 window2.fizzyUIUtils = factory(window2, window2.matchesSelector); 521 } 522 })(window, function factory(window2, matchesSelector) { 523 "use strict"; 524 var utils = {}; 525 utils.extend = function(a, b) { 526 for (var prop in b) { 527 a[prop] = b[prop]; 528 } 529 return a; 530 }; 531 utils.modulo = function(num, div) { 532 return (num % div + div) % div; 533 }; 534 var arraySlice = Array.prototype.slice; 535 utils.makeArray = function(obj) { 536 if (Array.isArray(obj)) { 537 return obj; 538 } 539 if (obj === null || obj === void 0) { 540 return []; 541 } 542 var isArrayLike = typeof obj == "object" && typeof obj.length == "number"; 543 if (isArrayLike) { 544 return arraySlice.call(obj); 545 } 546 return [obj]; 547 }; 548 utils.removeFrom = function(ary, obj) { 549 var index = ary.indexOf(obj); 550 if (index != -1) { 551 ary.splice(index, 1); 552 } 553 }; 554 utils.getParent = function(elem, selector) { 555 while (elem.parentNode && elem != document.body) { 556 elem = elem.parentNode; 557 if (matchesSelector(elem, selector)) { 558 return elem; 559 } 560 } 561 }; 562 utils.getQueryElement = function(elem) { 563 if (typeof elem == "string") { 564 return document.querySelector(elem); 565 } 566 return elem; 567 }; 568 utils.handleEvent = function(event) { 569 var method = "on" + event.type; 570 if (this[method]) { 571 this[method](event); 572 } 573 }; 574 utils.filterFindElements = function(elems, selector) { 575 elems = utils.makeArray(elems); 576 var ffElems = []; 577 elems.forEach(function(elem) { 578 if (!(elem instanceof HTMLElement)) { 579 return; 580 } 581 if (!selector) { 582 ffElems.push(elem); 583 return; 584 } 585 if (matchesSelector(elem, selector)) { 586 ffElems.push(elem); 587 } 588 var childElems = elem.querySelectorAll(selector); 589 for (var i = 0; i < childElems.length; i++) { 590 ffElems.push(childElems[i]); 591 } 592 }); 593 return ffElems; 594 }; 595 utils.debounceMethod = function(_class, methodName, threshold) { 596 threshold = threshold || 100; 597 var method = _class.prototype[methodName]; 598 var timeoutName = methodName + "Timeout"; 599 _class.prototype[methodName] = function() { 600 var timeout = this[timeoutName]; 601 clearTimeout(timeout); 602 var args = arguments; 603 var _this = this; 604 this[timeoutName] = setTimeout(function() { 605 method.apply(_this, args); 606 delete _this[timeoutName]; 607 }, threshold); 608 }; 609 }; 610 utils.docReady = function(callback) { 611 var readyState = document.readyState; 612 if (readyState == "complete" || readyState == "interactive") { 613 setTimeout(callback); 614 } else { 615 document.addEventListener("DOMContentLoaded", callback); 616 } 617 }; 618 utils.toDashed = function(str) { 619 return str.replace(/(.)([A-Z])/g, function(match, $1, $2) { 620 return $1 + "-" + $2; 621 }).toLowerCase(); 622 }; 623 var console2 = window2.console; 624 utils.htmlInit = function(WidgetClass, namespace) { 625 utils.docReady(function() { 626 var dashedNamespace = utils.toDashed(namespace); 627 var dataAttr = "data-" + dashedNamespace; 628 var dataAttrElems = document.querySelectorAll("[" + dataAttr + "]"); 629 var jsDashElems = document.querySelectorAll(".js-" + dashedNamespace); 630 var elems = utils.makeArray(dataAttrElems).concat(utils.makeArray(jsDashElems)); 631 var dataOptionsAttr = dataAttr + "-options"; 632 var jQuery2 = window2.jQuery; 633 elems.forEach(function(elem) { 634 var attr = elem.getAttribute(dataAttr) || elem.getAttribute(dataOptionsAttr); 635 var options; 636 try { 637 options = attr && JSON.parse(attr); 638 } catch (error) { 639 if (console2) { 640 console2.error("Error parsing " + dataAttr + " on " + elem.className + ": " + error); 641 } 642 return; 643 } 644 var instance = new WidgetClass(elem, options); 645 if (jQuery2) { 646 jQuery2.data(elem, namespace, instance); 647 } 648 }); 649 }); 650 }; 651 return utils; 652 }); 653 } 654 }); 655 656
vendor: 12,968 bytes, lines 656-1007
656// node_modules/outlayer/item.js 657 var require_item = __commonJS({ 658 "node_modules/outlayer/item.js"(exports, module) { 659 (function(window2, factory) { 660 if (typeof define == "function" && define.amd) { 661 define([ 662 "ev-emitter/ev-emitter", 663 "get-size/get-size" 664 ], factory); 665 } else if (typeof module == "object" && module.exports) { 666 module.exports = factory(require_ev_emitter(), require_get_size()); 667 } else { 668 window2.Outlayer = {}; 669 window2.Outlayer.Item = factory(window2.EvEmitter, window2.getSize); 670 } 671 })(window, function factory(EvEmitter, getSize) { 672 "use strict"; 673 function isEmptyObj(obj) { 674 for (var prop in obj) { 675 return false; 676 } 677 prop = null; 678 return true; 679 } 680 var docElemStyle = document.documentElement.style; 681 var transitionProperty = typeof docElemStyle.transition == "string" ? "transition" : "WebkitTransition"; 682 var transformProperty = typeof docElemStyle.transform == "string" ? "transform" : "WebkitTransform"; 683 var transitionEndEvent = { 684 WebkitTransition: "webkitTransitionEnd", 685 transition: "transitionend" 686 }[transitionProperty]; 687 var vendorProperties = { 688 transform: transformProperty, 689 transition: transitionProperty, 690 transitionDuration: transitionProperty + "Duration", 691 transitionProperty: transitionProperty + "Property", 692 transitionDelay: transitionProperty + "Delay" 693 }; 694 function Item(element, layout) { 695 if (!element) { 696 return; 697 } 698 this.element = element; 699 this.layout = layout; 700 this.position = { 701 x: 0, 702 y: 0 703 }; 704 this._create(); 705 } 706 var proto = Item.prototype = Object.create(EvEmitter.prototype); 707 proto.constructor = Item; 708 proto._create = function() { 709 this._transn = { 710 ingProperties: {}, 711 clean: {}, 712 onEnd: {} 713 }; 714 this.css({ 715 position: "absolute" 716 }); 717 }; 718 proto.handleEvent = function(event) { 719 var method = "on" + event.type; 720 if (this[method]) { 721 this[method](event); 722 } 723 }; 724 proto.getSize = function() { 725 this.size = getSize(this.element); 726 }; 727 proto.css = function(style) { 728 var elemStyle = this.element.style; 729 for (var prop in style) { 730 var supportedProp = vendorProperties[prop] || prop; 731 elemStyle[supportedProp] = style[prop]; 732 } 733 }; 734 proto.getPosition = function() { 735 var style = getComputedStyle(this.element); 736 var isOriginLeft = this.layout._getOption("originLeft"); 737 var isOriginTop = this.layout._getOption("originTop"); 738 var xValue = style[isOriginLeft ? "left" : "right"]; 739 var yValue = style[isOriginTop ? "top" : "bottom"]; 740 var x = parseFloat(xValue); 741 var y = parseFloat(yValue); 742 var layoutSize = this.layout.size; 743 if (xValue.indexOf("%") != -1) { 744 x = x / 100 * layoutSize.width; 745 } 746 if (yValue.indexOf("%") != -1) { 747 y = y / 100 * layoutSize.height; 748 } 749 x = isNaN(x) ? 0 : x; 750 y = isNaN(y) ? 0 : y; 751 x -= isOriginLeft ? layoutSize.paddingLeft : layoutSize.paddingRight; 752 y -= isOriginTop ? layoutSize.paddingTop : layoutSize.paddingBottom; 753 this.position.x = x; 754 this.position.y = y; 755 }; 756 proto.layoutPosition = function() { 757 var layoutSize = this.layout.size; 758 var style = {}; 759 var isOriginLeft = this.layout._getOption("originLeft"); 760 var isOriginTop = this.layout._getOption("originTop"); 761 var xPadding = isOriginLeft ? "paddingLeft" : "paddingRight"; 762 var xProperty = isOriginLeft ? "left" : "right"; 763 var xResetProperty = isOriginLeft ? "right" : "left"; 764 var x = this.position.x + layoutSize[xPadding]; 765 style[xProperty] = this.getXValue(x); 766 style[xResetProperty] = ""; 767 var yPadding = isOriginTop ? "paddingTop" : "paddingBottom"; 768 var yProperty = isOriginTop ? "top" : "bottom"; 769 var yResetProperty = isOriginTop ? "bottom" : "top"; 770 var y = this.position.y + layoutSize[yPadding]; 771 style[yProperty] = this.getYValue(y); 772 style[yResetProperty] = ""; 773 this.css(style); 774 this.emitEvent("layout", [this]); 775 }; 776 proto.getXValue = function(x) { 777 var isHorizontal = this.layout._getOption("horizontal"); 778 return this.layout.options.percentPosition && !isHorizontal ? x / this.layout.size.width * 100 + "%" : x + "px"; 779 }; 780 proto.getYValue = function(y) { 781 var isHorizontal = this.layout._getOption("horizontal"); 782 return this.layout.options.percentPosition && isHorizontal ? y / this.layout.size.height * 100 + "%" : y + "px"; 783 }; 784 proto._transitionTo = function(x, y) { 785 this.getPosition(); 786 var curX = this.position.x; 787 var curY = this.position.y; 788 var didNotMove = x == this.position.x && y == this.position.y; 789 this.setPosition(x, y); 790 if (didNotMove && !this.isTransitioning) { 791 this.layoutPosition(); 792 return; 793 } 794 var transX = x - curX; 795 var transY = y - curY; 796 var transitionStyle = {}; 797 transitionStyle.transform = this.getTranslate(transX, transY); 798 this.transition({ 799 to: transitionStyle, 800 onTransitionEnd: { 801 transform: this.layoutPosition 802 }, 803 isCleaning: true 804 }); 805 }; 806 proto.getTranslate = function(x, y) { 807 var isOriginLeft = this.layout._getOption("originLeft"); 808 var isOriginTop = this.layout._getOption("originTop"); 809 x = isOriginLeft ? x : -x; 810 y = isOriginTop ? y : -y; 811 return "translate3d(" + x + "px, " + y + "px, 0)"; 812 }; 813 proto.goTo = function(x, y) { 814 this.setPosition(x, y); 815 this.layoutPosition(); 816 }; 817 proto.moveTo = proto._transitionTo; 818 proto.setPosition = function(x, y) { 819 this.position.x = parseFloat(x); 820 this.position.y = parseFloat(y); 821 }; 822 proto._nonTransition = function(args) { 823 this.css(args.to); 824 if (args.isCleaning) { 825 this._removeStyles(args.to); 826 } 827 for (var prop in args.onTransitionEnd) { 828 args.onTransitionEnd[prop].call(this); 829 } 830 }; 831 proto.transition = function(args) { 832 if (!parseFloat(this.layout.options.transitionDuration)) { 833 this._nonTransition(args); 834 return; 835 } 836 var _transition = this._transn; 837 for (var prop in args.onTransitionEnd) { 838 _transition.onEnd[prop] = args.onTransitionEnd[prop]; 839 } 840 for (prop in args.to) { 841 _transition.ingProperties[prop] = true; 842 if (args.isCleaning) { 843 _transition.clean[prop] = true; 844 } 845 } 846 if (args.from) { 847 this.css(args.from); 848 var h = this.element.offsetHeight; 849 h = null; 850 } 851 this.enableTransition(args.to); 852 this.css(args.to); 853 this.isTransitioning = true; 854 }; 855 function toDashedAll(str) { 856 return str.replace(/([A-Z])/g, function($1) { 857 return "-" + $1.toLowerCase(); 858 }); 859 } 860 var transitionProps = "opacity," + toDashedAll(transformProperty); 861 proto.enableTransition = function() { 862 if (this.isTransitioning) { 863 return; 864 } 865 var duration = this.layout.options.transitionDuration; 866 duration = typeof duration == "number" ? duration + "ms" : duration; 867 this.css({ 868 transitionProperty: transitionProps, 869 transitionDuration: duration, 870 transitionDelay: this.staggerDelay || 0 871 }); 872 this.element.addEventListener(transitionEndEvent, this, false); 873 }; 874 proto.onwebkitTransitionEnd = function(event) { 875 this.ontransitionend(event); 876 }; 877 proto.onotransitionend = function(event) { 878 this.ontransitionend(event); 879 }; 880 var dashedVendorProperties = { 881 "-webkit-transform": "transform" 882 }; 883 proto.ontransitionend = function(event) { 884 if (event.target !== this.element) { 885 return; 886 } 887 var _transition = this._transn; 888 var propertyName = dashedVendorProperties[event.propertyName] || event.propertyName; 889 delete _transition.ingProperties[propertyName]; 890 if (isEmptyObj(_transition.ingProperties)) { 891 this.disableTransition(); 892 } 893 if (propertyName in _transition.clean) { 894 this.element.style[event.propertyName] = ""; 895 delete _transition.clean[propertyName]; 896 } 897 if (propertyName in _transition.onEnd) { 898 var onTransitionEnd = _transition.onEnd[propertyName]; 899 onTransitionEnd.call(this); 900 delete _transition.onEnd[propertyName]; 901 } 902 this.emitEvent("transitionEnd", [this]); 903 }; 904 proto.disableTransition = function() { 905 this.removeTransitionStyles(); 906 this.element.removeEventListener(transitionEndEvent, this, false); 907 this.isTransitioning = false; 908 }; 909 proto._removeStyles = function(style) { 910 var cleanStyle = {}; 911 for (var prop in style) { 912 cleanStyle[prop] = ""; 913 } 914 this.css(cleanStyle); 915 }; 916 var cleanTransitionStyle = { 917 transitionProperty: "", 918 transitionDuration: "", 919 transitionDelay: "" 920 }; 921 proto.removeTransitionStyles = function() { 922 this.css(cleanTransitionStyle); 923 }; 924 proto.stagger = function(delay) { 925 delay = isNaN(delay) ? 0 : delay; 926 this.staggerDelay = delay + "ms"; 927 }; 928 proto.removeElem = function() { 929 this.element.parentNode.removeChild(this.element); 930 this.css({ display: "" }); 931 this.emitEvent("remove", [this]); 932 }; 933 proto.remove = function() { 934 if (!transitionProperty || !parseFloat(this.layout.options.transitionDuration)) { 935 this.removeElem(); 936 return; 937 } 938 this.once("transitionEnd", function() { 939 this.removeElem(); 940 }); 941 this.hide(); 942 }; 943 proto.reveal = function() { 944 delete this.isHidden; 945 this.css({ display: "" }); 946 var options = this.layout.options; 947 var onTransitionEnd = {}; 948 var transitionEndProperty = this.getHideRevealTransitionEndProperty("visibleStyle"); 949 onTransitionEnd[transitionEndProperty] = this.onRevealTransitionEnd; 950 this.transition({ 951 from: options.hiddenStyle, 952 to: options.visibleStyle, 953 isCleaning: true, 954 onTransitionEnd 955 }); 956 }; 957 proto.onRevealTransitionEnd = function() { 958 if (!this.isHidden) { 959 this.emitEvent("reveal"); 960 } 961 }; 962 proto.getHideRevealTransitionEndProperty = function(styleProperty) { 963 var optionStyle = this.layout.options[styleProperty]; 964 if (optionStyle.opacity) { 965 return "opacity"; 966 } 967 for (var prop in optionStyle) { 968 return prop; 969 } 970 }; 971 proto.hide = function() { 972 this.isHidden = true; 973 this.css({ display: "" }); 974 var options = this.layout.options; 975 var onTransitionEnd = {}; 976 var transitionEndProperty = this.getHideRevealTransitionEndProperty("hiddenStyle"); 977 onTransitionEnd[transitionEndProperty] = this.onHideTransitionEnd; 978 this.transition({ 979 from: options.visibleStyle, 980 to: options.hiddenStyle, 981 isCleaning: true, 982 onTransitionEnd 983 }); 984 }; 985 proto.onHideTransitionEnd = function() { 986 if (this.isHidden) { 987 this.css({ display: "none" }); 988 this.emitEvent("hide"); 989 } 990 }; 991 proto.destroy = function() { 992 this.css({ 993 position: "", 994 left: "", 995 right: "", 996 top: "", 997 bottom: "", 998 transition: "", 999 transform: "" 1000 }); 1001 }; 1002 return Item; 1003 }); 1004 } 1005 }); 1006 1007
vendor: 17,843 bytes, lines 1007-1520
1007// node_modules/outlayer/outlayer.js 1008 var require_outlayer = __commonJS({ 1009 "node_modules/outlayer/outlayer.js"(exports, module) { 1010 (function(window2, factory) { 1011 "use strict"; 1012 if (typeof define == "function" && define.amd) { 1013 define([ 1014 "ev-emitter/ev-emitter", 1015 "get-size/get-size", 1016 "fizzy-ui-utils/utils", 1017 "./item" 1018 ], function(EvEmitter, getSize, utils, Item) { 1019 return factory(window2, EvEmitter, getSize, utils, Item); 1020 }); 1021 } else if (typeof module == "object" && module.exports) { 1022 module.exports = factory(window2, require_ev_emitter(), require_get_size(), require_utils(), require_item()); 1023 } else { 1024 window2.Outlayer = factory(window2, window2.EvEmitter, window2.getSize, window2.fizzyUIUtils, window2.Outlayer.Item); 1025 } 1026 })(window, function factory(window2, EvEmitter, getSize, utils, Item) { 1027 "use strict"; 1028 var console2 = window2.console; 1029 var jQuery2 = window2.jQuery; 1030 var noop = function() { 1031 }; 1032 var GUID = 0; 1033 var instances = {}; 1034 function Outlayer(element, options) { 1035 var queryElement = utils.getQueryElement(element); 1036 if (!queryElement) { 1037 if (console2) { 1038 console2.error("Bad element for " + this.constructor.namespace + ": " + (queryElement || element)); 1039 } 1040 return; 1041 } 1042 this.element = queryElement; 1043 if (jQuery2) { 1044 this.$element = jQuery2(this.element); 1045 } 1046 this.options = utils.extend({}, this.constructor.defaults); 1047 this.option(options); 1048 var id = ++GUID; 1049 this.element.outlayerGUID = id; 1050 instances[id] = this; 1051 this._create(); 1052 var isInitLayout = this._getOption("initLayout"); 1053 if (isInitLayout) { 1054 this.layout(); 1055 } 1056 } 1057 Outlayer.namespace = "outlayer"; 1058 Outlayer.Item = Item; 1059 Outlayer.defaults = { 1060 containerStyle: { 1061 position: "relative" 1062 }, 1063 initLayout: true, 1064 originLeft: true, 1065 originTop: true, 1066 resize: true, 1067 resizeContainer: true, 1068 transitionDuration: "0.4s", 1069 hiddenStyle: { 1070 opacity: 0, 1071 transform: "scale(0.001)" 1072 }, 1073 visibleStyle: { 1074 opacity: 1, 1075 transform: "scale(1)" 1076 } 1077 }; 1078 var proto = Outlayer.prototype; 1079 utils.extend(proto, EvEmitter.prototype); 1080 proto.option = function(opts) { 1081 utils.extend(this.options, opts); 1082 }; 1083 proto._getOption = function(option) { 1084 var oldOption = this.constructor.compatOptions[option]; 1085 return oldOption && this.options[oldOption] !== void 0 ? this.options[oldOption] : this.options[option]; 1086 }; 1087 Outlayer.compatOptions = { 1088 initLayout: "isInitLayout", 1089 horizontal: "isHorizontal", 1090 layoutInstant: "isLayoutInstant", 1091 originLeft: "isOriginLeft", 1092 originTop: "isOriginTop", 1093 resize: "isResizeBound", 1094 resizeContainer: "isResizingContainer" 1095 }; 1096 proto._create = function() { 1097 this.reloadItems(); 1098 this.stamps = []; 1099 this.stamp(this.options.stamp); 1100 utils.extend(this.element.style, this.options.containerStyle); 1101 var canBindResize = this._getOption("resize"); 1102 if (canBindResize) { 1103 this.bindResize(); 1104 } 1105 }; 1106 proto.reloadItems = function() { 1107 this.items = this._itemize(this.element.children); 1108 }; 1109 proto._itemize = function(elems) { 1110 var itemElems = this._filterFindItemElements(elems); 1111 var Item2 = this.constructor.Item; 1112 var items = []; 1113 for (var i = 0; i < itemElems.length; i++) { 1114 var elem = itemElems[i]; 1115 var item = new Item2(elem, this); 1116 items.push(item); 1117 } 1118 return items; 1119 }; 1120 proto._filterFindItemElements = function(elems) { 1121 return utils.filterFindElements(elems, this.options.itemSelector); 1122 }; 1123 proto.getItemElements = function() { 1124 return this.items.map(function(item) { 1125 return item.element; 1126 }); 1127 }; 1128 proto.layout = function() { 1129 this._resetLayout(); 1130 this._manageStamps(); 1131 var layoutInstant = this._getOption("layoutInstant"); 1132 var isInstant = layoutInstant !== void 0 ? layoutInstant : !this._isLayoutInited; 1133 this.layoutItems(this.items, isInstant); 1134 this._isLayoutInited = true; 1135 }; 1136 proto._init = proto.layout; 1137 proto._resetLayout = function() { 1138 this.getSize(); 1139 }; 1140 proto.getSize = function() { 1141 this.size = getSize(this.element); 1142 }; 1143 proto._getMeasurement = function(measurement, size) { 1144 var option = this.options[measurement]; 1145 var elem; 1146 if (!option) { 1147 this[measurement] = 0; 1148 } else { 1149 if (typeof option == "string") { 1150 elem = this.element.querySelector(option); 1151 } else if (option instanceof HTMLElement) { 1152 elem = option; 1153 } 1154 this[measurement] = elem ? getSize(elem)[size] : option; 1155 } 1156 }; 1157 proto.layoutItems = function(items, isInstant) { 1158 items = this._getItemsForLayout(items); 1159 this._layoutItems(items, isInstant); 1160 this._postLayout(); 1161 }; 1162 proto._getItemsForLayout = function(items) { 1163 return items.filter(function(item) { 1164 return !item.isIgnored; 1165 }); 1166 }; 1167 proto._layoutItems = function(items, isInstant) { 1168 this._emitCompleteOnItems("layout", items); 1169 if (!items || !items.length) { 1170 return; 1171 } 1172 var queue = []; 1173 items.forEach(function(item) { 1174 var position = this._getItemLayoutPosition(item); 1175 position.item = item; 1176 position.isInstant = isInstant || item.isLayoutInstant; 1177 queue.push(position); 1178 }, this); 1179 this._processLayoutQueue(queue); 1180 }; 1181 proto._getItemLayoutPosition = function() { 1182 return { 1183 x: 0, 1184 y: 0 1185 }; 1186 }; 1187 proto._processLayoutQueue = function(queue) { 1188 this.updateStagger(); 1189 queue.forEach(function(obj, i) { 1190 this._positionItem(obj.item, obj.x, obj.y, obj.isInstant, i); 1191 }, this); 1192 }; 1193 proto.updateStagger = function() { 1194 var stagger = this.options.stagger; 1195 if (stagger === null || stagger === void 0) { 1196 this.stagger = 0; 1197 return; 1198 } 1199 this.stagger = getMilliseconds(stagger); 1200 return this.stagger; 1201 }; 1202 proto._positionItem = function(item, x, y, isInstant, i) { 1203 if (isInstant) { 1204 item.goTo(x, y); 1205 } else { 1206 item.stagger(i * this.stagger); 1207 item.moveTo(x, y); 1208 } 1209 }; 1210 proto._postLayout = function() { 1211 this.resizeContainer(); 1212 }; 1213 proto.resizeContainer = function() { 1214 var isResizingContainer = this._getOption("resizeContainer"); 1215 if (!isResizingContainer) { 1216 return; 1217 } 1218 var size = this._getContainerSize(); 1219 if (size) { 1220 this._setContainerMeasure(size.width, true); 1221 this._setContainerMeasure(size.height, false); 1222 } 1223 }; 1224 proto._getContainerSize = noop; 1225 proto._setContainerMeasure = function(measure, isWidth) { 1226 if (measure === void 0) { 1227 return; 1228 } 1229 var elemSize = this.size; 1230 if (elemSize.isBorderBox) { 1231 measure += isWidth ? elemSize.paddingLeft + elemSize.paddingRight + elemSize.borderLeftWidth + elemSize.borderRightWidth : elemSize.paddingBottom + elemSize.paddingTop + elemSize.borderTopWidth + elemSize.borderBottomWidth; 1232 } 1233 measure = Math.max(measure, 0); 1234 this.element.style[isWidth ? "width" : "height"] = measure + "px"; 1235 }; 1236 proto._emitCompleteOnItems = function(eventName, items) { 1237 var _this = this; 1238 function onComplete() { 1239 _this.dispatchEvent(eventName + "Complete", null, [items]); 1240 } 1241 var count = items.length; 1242 if (!items || !count) { 1243 onComplete(); 1244 return; 1245 } 1246 var doneCount = 0; 1247 function tick() { 1248 doneCount++; 1249 if (doneCount == count) { 1250 onComplete(); 1251 } 1252 } 1253 items.forEach(function(item) { 1254 item.once(eventName, tick); 1255 }); 1256 }; 1257 proto.dispatchEvent = function(type, event, args) { 1258 var emitArgs = event ? [event].concat(args) : args; 1259 this.emitEvent(type, emitArgs); 1260 if (jQuery2) { 1261 this.$element = this.$element || jQuery2(this.element); 1262 if (event) { 1263 var $event = jQuery2.Event(event); 1264 $event.type = type; 1265 this.$element.trigger($event, args); 1266 } else { 1267 this.$element.trigger(type, args); 1268 } 1269 } 1270 }; 1271 proto.ignore = function(elem) { 1272 var item = this.getItem(elem); 1273 if (item) { 1274 item.isIgnored = true; 1275 } 1276 }; 1277 proto.unignore = function(elem) { 1278 var item = this.getItem(elem); 1279 if (item) { 1280 delete item.isIgnored; 1281 } 1282 }; 1283 proto.stamp = function(elems) { 1284 elems = this._find(elems); 1285 if (!elems) { 1286 return; 1287 } 1288 this.stamps = this.stamps.concat(elems); 1289 elems.forEach(this.ignore, this); 1290 }; 1291 proto.unstamp = function(elems) { 1292 elems = this._find(elems); 1293 if (!elems) { 1294 return; 1295 } 1296 elems.forEach(function(elem) { 1297 utils.removeFrom(this.stamps, elem); 1298 this.unignore(elem); 1299 }, this); 1300 }; 1301 proto._find = function(elems) { 1302 if (!elems) { 1303 return; 1304 } 1305 if (typeof elems == "string") { 1306 elems = this.element.querySelectorAll(elems); 1307 } 1308 elems = utils.makeArray(elems); 1309 return elems; 1310 }; 1311 proto._manageStamps = function() { 1312 if (!this.stamps || !this.stamps.length) { 1313 return; 1314 } 1315 this._getBoundingRect(); 1316 this.stamps.forEach(this._manageStamp, this); 1317 }; 1318 proto._getBoundingRect = function() { 1319 var boundingRect = this.element.getBoundingClientRect(); 1320 var size = this.size; 1321 this._boundingRect = { 1322 left: boundingRect.left + size.paddingLeft + size.borderLeftWidth, 1323 top: boundingRect.top + size.paddingTop + size.borderTopWidth, 1324 right: boundingRect.right - (size.paddingRight + size.borderRightWidth), 1325 bottom: boundingRect.bottom - (size.paddingBottom + size.borderBottomWidth) 1326 }; 1327 }; 1328 proto._manageStamp = noop; 1329 proto._getElementOffset = function(elem) { 1330 var boundingRect = elem.getBoundingClientRect(); 1331 var thisRect = this._boundingRect; 1332 var size = getSize(elem); 1333 var offset = { 1334 left: boundingRect.left - thisRect.left - size.marginLeft, 1335 top: boundingRect.top - thisRect.top - size.marginTop, 1336 right: thisRect.right - boundingRect.right - size.marginRight, 1337 bottom: thisRect.bottom - boundingRect.bottom - size.marginBottom 1338 }; 1339 return offset; 1340 }; 1341 proto.handleEvent = utils.handleEvent; 1342 proto.bindResize = function() { 1343 window2.addEventListener("resize", this); 1344 this.isResizeBound = true; 1345 }; 1346 proto.unbindResize = function() { 1347 window2.removeEventListener("resize", this); 1348 this.isResizeBound = false; 1349 }; 1350 proto.onresize = function() { 1351 this.resize(); 1352 }; 1353 utils.debounceMethod(Outlayer, "onresize", 100); 1354 proto.resize = function() { 1355 if (!this.isResizeBound || !this.needsResizeLayout()) { 1356 return; 1357 } 1358 this.layout(); 1359 }; 1360 proto.needsResizeLayout = function() { 1361 var size = getSize(this.element); 1362 var hasSizes = this.size && size; 1363 return hasSizes && size.innerWidth !== this.size.innerWidth; 1364 }; 1365 proto.addItems = function(elems) { 1366 var items = this._itemize(elems); 1367 if (items.length) { 1368 this.items = this.items.concat(items); 1369 } 1370 return items; 1371 }; 1372 proto.appended = function(elems) { 1373 var items = this.addItems(elems); 1374 if (!items.length) { 1375 return; 1376 } 1377 this.layoutItems(items, true); 1378 this.reveal(items); 1379 }; 1380 proto.prepended = function(elems) { 1381 var items = this._itemize(elems); 1382 if (!items.length) { 1383 return; 1384 } 1385 var previousItems = this.items.slice(0); 1386 this.items = items.concat(previousItems); 1387 this._resetLayout(); 1388 this._manageStamps(); 1389 this.layoutItems(items, true); 1390 this.reveal(items); 1391 this.layoutItems(previousItems); 1392 }; 1393 proto.reveal = function(items) { 1394 this._emitCompleteOnItems("reveal", items); 1395 if (!items || !items.length) { 1396 return; 1397 } 1398 var stagger = this.updateStagger(); 1399 items.forEach(function(item, i) { 1400 item.stagger(i * stagger); 1401 item.reveal(); 1402 }); 1403 }; 1404 proto.hide = function(items) { 1405 this._emitCompleteOnItems("hide", items); 1406 if (!items || !items.length) { 1407 return; 1408 } 1409 var stagger = this.updateStagger(); 1410 items.forEach(function(item, i) { 1411 item.stagger(i * stagger); 1412 item.hide(); 1413 }); 1414 }; 1415 proto.revealItemElements = function(elems) { 1416 var items = this.getItems(elems); 1417 this.reveal(items); 1418 }; 1419 proto.hideItemElements = function(elems) { 1420 var items = this.getItems(elems); 1421 this.hide(items); 1422 }; 1423 proto.getItem = function(elem) { 1424 for (var i = 0; i < this.items.length; i++) { 1425 var item = this.items[i]; 1426 if (item.element == elem) { 1427 return item; 1428 } 1429 } 1430 }; 1431 proto.getItems = function(elems) { 1432 elems = utils.makeArray(elems); 1433 var items = []; 1434 elems.forEach(function(elem) { 1435 var item = this.getItem(elem); 1436 if (item) { 1437 items.push(item); 1438 } 1439 }, this); 1440 return items; 1441 }; 1442 proto.remove = function(elems) { 1443 var removeItems = this.getItems(elems); 1444 this._emitCompleteOnItems("remove", removeItems); 1445 if (!removeItems || !removeItems.length) { 1446 return; 1447 } 1448 removeItems.forEach(function(item) { 1449 item.remove(); 1450 utils.removeFrom(this.items, item); 1451 }, this); 1452 }; 1453 proto.destroy = function() { 1454 var style = this.element.style; 1455 style.height = ""; 1456 style.position = ""; 1457 style.width = ""; 1458 this.items.forEach(function(item) { 1459 item.destroy(); 1460 }); 1461 this.unbindResize(); 1462 var id = this.element.outlayerGUID; 1463 delete instances[id]; 1464 delete this.element.outlayerGUID; 1465 if (jQuery2) { 1466 jQuery2.removeData(this.element, this.constructor.namespace); 1467 } 1468 }; 1469 Outlayer.data = function(elem) { 1470 elem = utils.getQueryElement(elem); 1471 var id = elem && elem.outlayerGUID; 1472 return id && instances[id]; 1473 }; 1474 Outlayer.create = function(namespace, options) { 1475 var Layout = subclass(Outlayer); 1476 Layout.defaults = utils.extend({}, Outlayer.defaults); 1477 utils.extend(Layout.defaults, options); 1478 Layout.compatOptions = utils.extend({}, Outlayer.compatOptions); 1479 Layout.namespace = namespace; 1480 Layout.data = Outlayer.data; 1481 Layout.Item = subclass(Item); 1482 utils.htmlInit(Layout, namespace); 1483 if (jQuery2 && jQuery2.bridget) { 1484 jQuery2.bridget(namespace, Layout); 1485 } 1486 return Layout; 1487 }; 1488 function subclass(Parent) { 1489 function SubClass() { 1490 Parent.apply(this, arguments); 1491 } 1492 SubClass.prototype = Object.create(Parent.prototype); 1493 SubClass.prototype.constructor = SubClass; 1494 return SubClass; 1495 } 1496 var msUnits = { 1497 ms: 1, 1498 s: 1e3 1499 }; 1500 function getMilliseconds(time) { 1501 if (typeof time == "number") { 1502 return time; 1503 } 1504 var matches = time.match(/(^\d*\.?\d*)(\w*)/); 1505 var num = matches && matches[1]; 1506 var unit = matches && matches[2]; 1507 if (!num.length) { 1508 return 0; 1509 } 1510 num = parseFloat(num); 1511 var mult = msUnits[unit] || 1; 1512 return num * mult; 1513 } 1514 Outlayer.Item = Item; 1515 return Outlayer; 1516 }); 1517 } 1518 }); 1519 1520
vendor: 6,355 bytes, lines 1520-1676
1520// node_modules/masonry-layout/masonry.js 1521 var require_masonry = __commonJS({ 1522 "node_modules/masonry-layout/masonry.js"(exports, module) { 1523 (function(window2, factory) { 1524 if (typeof define == "function" && define.amd) { 1525 define([ 1526 "outlayer/outlayer", 1527 "get-size/get-size" 1528 ], factory); 1529 } else if (typeof module == "object" && module.exports) { 1530 module.exports = factory(require_outlayer(), require_get_size()); 1531 } else { 1532 window2.Masonry = factory(window2.Outlayer, window2.getSize); 1533 } 1534 })(window, function factory(Outlayer, getSize) { 1535 "use strict"; 1536 var Masonry2 = Outlayer.create("masonry"); 1537 Masonry2.compatOptions.fitWidth = "isFitWidth"; 1538 var proto = Masonry2.prototype; 1539 proto._resetLayout = function() { 1540 this.getSize(); 1541 this._getMeasurement("columnWidth", "outerWidth"); 1542 this._getMeasurement("gutter", "outerWidth"); 1543 this.measureColumns(); 1544 this.colYs = []; 1545 for (var i = 0; i < this.cols; i++) { 1546 this.colYs.push(0); 1547 } 1548 this.maxY = 0; 1549 this.horizontalColIndex = 0; 1550 }; 1551 proto.measureColumns = function() { 1552 this.getContainerWidth(); 1553 if (!this.columnWidth) { 1554 var firstItem = this.items[0]; 1555 var firstItemElem = firstItem && firstItem.element; 1556 this.columnWidth = firstItemElem && getSize(firstItemElem).outerWidth || this.containerWidth; 1557 } 1558 var columnWidth = this.columnWidth += this.gutter; 1559 var containerWidth = this.containerWidth + this.gutter; 1560 var cols = containerWidth / columnWidth; 1561 var excess = columnWidth - containerWidth % columnWidth; 1562 var mathMethod = excess && excess < 1 ? "round" : "floor"; 1563 cols = Math[mathMethod](cols); 1564 this.cols = Math.max(cols, 1); 1565 }; 1566 proto.getContainerWidth = function() { 1567 var isFitWidth = this._getOption("fitWidth"); 1568 var container = isFitWidth ? this.element.parentNode : this.element; 1569 var size = getSize(container); 1570 this.containerWidth = size && size.innerWidth; 1571 }; 1572 proto._getItemLayoutPosition = function(item) { 1573 item.getSize(); 1574 var remainder = item.size.outerWidth % this.columnWidth; 1575 var mathMethod = remainder && remainder < 1 ? "round" : "ceil"; 1576 var colSpan = Math[mathMethod](item.size.outerWidth / this.columnWidth); 1577 colSpan = Math.min(colSpan, this.cols); 1578 var colPosMethod = this.options.horizontalOrder ? "_getHorizontalColPosition" : "_getTopColPosition"; 1579 var colPosition = this[colPosMethod](colSpan, item); 1580 var position = { 1581 x: this.columnWidth * colPosition.col, 1582 y: colPosition.y 1583 }; 1584 var setHeight = colPosition.y + item.size.outerHeight; 1585 var setMax = colSpan + colPosition.col; 1586 for (var i = colPosition.col; i < setMax; i++) { 1587 this.colYs[i] = setHeight; 1588 } 1589 return position; 1590 }; 1591 proto._getTopColPosition = function(colSpan) { 1592 var colGroup = this._getTopColGroup(colSpan); 1593 var minimumY = Math.min.apply(Math, colGroup); 1594 return { 1595 col: colGroup.indexOf(minimumY), 1596 y: minimumY 1597 }; 1598 }; 1599 proto._getTopColGroup = function(colSpan) { 1600 if (colSpan < 2) { 1601 return this.colYs; 1602 } 1603 var colGroup = []; 1604 var groupCount = this.cols + 1 - colSpan; 1605 for (var i = 0; i < groupCount; i++) { 1606 colGroup[i] = this._getColGroupY(i, colSpan); 1607 } 1608 return colGroup; 1609 }; 1610 proto._getColGroupY = function(col, colSpan) { 1611 if (colSpan < 2) { 1612 return this.colYs[col]; 1613 } 1614 var groupColYs = this.colYs.slice(col, col + colSpan); 1615 return Math.max.apply(Math, groupColYs); 1616 }; 1617 proto._getHorizontalColPosition = function(colSpan, item) { 1618 var col = this.horizontalColIndex % this.cols; 1619 var isOver = colSpan > 1 && col + colSpan > this.cols; 1620 col = isOver ? 0 : col; 1621 var hasSize = item.size.outerWidth && item.size.outerHeight; 1622 this.horizontalColIndex = hasSize ? col + colSpan : this.horizontalColIndex; 1623 return { 1624 col, 1625 y: this._getColGroupY(col, colSpan) 1626 }; 1627 }; 1628 proto._manageStamp = function(stamp) { 1629 var stampSize = getSize(stamp); 1630 var offset = this._getElementOffset(stamp); 1631 var isOriginLeft = this._getOption("originLeft"); 1632 var firstX = isOriginLeft ? offset.left : offset.right; 1633 var lastX = firstX + stampSize.outerWidth; 1634 var firstCol = Math.floor(firstX / this.columnWidth); 1635 firstCol = Math.max(0, firstCol); 1636 var lastCol = Math.floor(lastX / this.columnWidth); 1637 lastCol -= lastX % this.columnWidth ? 0 : 1; 1638 lastCol = Math.min(this.cols - 1, lastCol); 1639 var isOriginTop = this._getOption("originTop"); 1640 var stampMaxY = (isOriginTop ? offset.top : offset.bottom) + stampSize.outerHeight; 1641 for (var i = firstCol; i <= lastCol; i++) { 1642 this.colYs[i] = Math.max(stampMaxY, this.colYs[i]); 1643 } 1644 }; 1645 proto._getContainerSize = function() { 1646 this.maxY = Math.max.apply(Math, this.colYs); 1647 var size = { 1648 height: this.maxY 1649 }; 1650 if (this._getOption("fitWidth")) { 1651 size.width = this._getContainerFitWidth(); 1652 } 1653 return size; 1654 }; 1655 proto._getContainerFitWidth = function() { 1656 var unusedCols = 0; 1657 var i = this.cols; 1658 while (--i) { 1659 if (this.colYs[i] !== 0) { 1660 break; 1661 } 1662 unusedCols++; 1663 } 1664 return (this.cols - unusedCols) * this.columnWidth - this.gutter; 1665 }; 1666 proto.needsResizeLayout = function() { 1667 var previousWidth = this.containerWidth; 1668 this.getContainerWidth(); 1669 return previousWidth != this.containerWidth; 1670 }; 1671 return Masonry2; 1672 }); 1673 } 1674 }); 1675 1676
1676// src/js/index.js 1677 var import_baguettebox = __toESM(require_baguetteBox_min()); 1678 var import_masonry_layout = __toESM(require_masonry()); 1679 1680
1680// src/js/seo-block.ts 1681 document.addEventListener("DOMContentLoaded", () => { 1682 const readMoreButtons = [ 1683 ...document.querySelectorAll(".seo-block__read-more") 1684 ]; 1685 readMoreButtons.forEach((button) => button.addEventListener("click", (e) => { 1686 const button2 = e.target; 1687 const body = button2.nextElementSibling; 1688 body.classList.toggle("seo-block__body--visible"); 1689 })); 1690 }); 1691 1692
1692// src/js/index.js 1693 document.addEventListener("DOMContentLoaded", () => { 1694 new import_masonry_layout.default(".latest-posts", { 1695 itemSelector: ".post-preview" 1696 }); 1697 }); 1698 var createOptimisedEvent = (type, name, obj) => { 1699 obj = obj || window; 1700 var running = false; 1701 var func = function() { 1702 if (running) { 1703 return; 1704 } 1705 running = true; 1706 requestAnimationFrame(function() { 1707 obj.dispatchEvent(new CustomEvent(name)); 1708 running = false; 1709 }); 1710 }; 1711 obj.addEventListener(type, func); 1712 }; 1713 createOptimisedEvent("scroll", "optimisedScroll"); 1714 var throttle = (fn, wait) => { 1715 var time = Date.now(); 1716 return function() { 1717 if (time + wait - Date.now() < 0) { 1718 fn(); 1719 time = Date.now(); 1720 } 1721 }; 1722 }; 1723 $(document).ready(function() { 1724 $(".open-menu").click(function() { 1725 $(".menu").addClass("menu--open"); 1726 }); 1727 $(".exit-menu").click(function() { 1728 $(".menu").removeClass("menu--open"); 1729 }); 1730 if (document.querySelector("[data-slides]")) { 1731 !function($2) { 1732 "use strict"; 1733 var slide = $2("[data-slides]"), count = 0, slides = slide.data("slides"), len = slides.length, n = function() { 1734 if (count >= len) { 1735 count = 0; 1736 } 1737 slide.css("background-image", 'url("' + slides[count] + '")').show(0, function() { 1738 setTimeout(n, 1e4); 1739 }); 1740 count++; 1741 }; 1742 n(); 1743 }(jQuery); 1744 } 1745 $(".mobile-nav__toggle").click(function() { 1746 $(".mobile-nav").toggleClass("mobile-nav--open"); 1747 }); 1748 }); 1749 var modalWindow = document.querySelector(".modal-window"); 1750 var featuredModal = document.querySelector(".featured-modal"); 1751 var modals = document.querySelectorAll(".modal"); 1752 var modalToggle = document.querySelectorAll(".modal__toggle"); 1753 function enableFeaturedModal() { 1754 if (featuredModal) { 1755 modalWindow.classList.add("active"); 1756 featuredModal.classList.add("active"); 1757 } 1758 } 1759 function disableModal() { 1760 modalWindow.classList.remove("active"); 1761 modals.forEach((modal) => modal.classList.remove("active")); 1762 } 1763 modalToggle.forEach((modal) => modal.addEventListener("click", disableModal)); 1764 var featuredModalDisplayed = sessionStorage.getItem("featuredModalDisplayed"); 1765 if (!featuredModalDisplayed) { 1766 sessionStorage.setItem("featuredModalDisplayed", "displayed"); 1767 enableFeaturedModal(); 1768 } 1769 document.addEventListener("DOMContentLoaded", () => { 1770 import_baguettebox.default.run(".gallery"); 1771 }); 1772 document.addEventListener("DOMContentLoaded", () => { 1773 const fadeIns = [...document.querySelectorAll(".will-reveal")]; 1774 if (fadeIns.length < 1) 1775 return; 1776 const checkFadeIns = () => { 1777 fadeIns.forEach((el, i) => { 1778 const rect = el.getBoundingClientRect(); 1779 const elemTop = rect.top; 1780 const elemBottom = rect.bottom; 1781 const isVisible = elemTop + 250 < window.innerHeight && elemBottom >= 0; 1782 if (isVisible) { 1783 fadeIns.splice(i, 1); 1784 el.classList.add("will-reveal--revealed"); 1785 } 1786 }); 1787 }; 1788 setTimeout(checkFadeIns, 500); 1789 window.addEventListener("optimisedScroll", throttle(checkFadeIns, 100)); 1790 }); 1791 document.addEventListener("DOMContentLoaded", () => { 1792 const modalWrappers = [...document.querySelectorAll("[data-modal-id]")]; 1793 const modalTriggers = [...document.querySelectorAll("[data-modal-trigger]")]; 1794 if (!modalWrappers.length > 0 || !modalTriggers.length > 0) 1795 return; 1796 document.addEventListener("keydown", (e) => { 1797 if (e.keyCode === 27) 1798 modalWrappers.forEach((wrp) => wrp.classList.remove("active")); 1799 }); 1800 modalTriggers.forEach((trigger) => trigger.addEventListener("click", function() { 1801 const target = document.querySelector(`[data-modal-id="${this.dataset.modalTrigger}"]`); 1802 if (target) 1803 target.classList.toggle("active"); 1804 })); 1805 }); 1806 document.addEventListener("DOMContentLoaded", () => { 1807 const accordionTriggers = [ 1808 ...document.querySelectorAll("[data-accordion-trigger]") 1809 ];
1810 accordionTriggers.forEach((trigger) => { 1811 trigger.addEventListener("click", () => { 1812 const target = document.querySelector(`[data-accordion="${trigger.dataset.accordionTrigger}"]`); 1813 if (target) 1814 $(target).slideToggle(); 1815 }); 1816 }); 1817 }); 1818})(); 1819/*! 1820 * Masonry v4.2.2 1821 * Cascading grid layout library 1822 * https://masonry.desandro.com 1823 * MIT License 1824 * by David DeSandro 1825 */ 1826/*! 1827 * Outlayer v2.1.1 1828 * the brains and guts of a layout library 1829 * MIT license 1830 */ 1831/*! 1832 * baguetteBox.js 1833 * @author feimosi 1834 * @version 1.11.1 1835 * @url https://github.com/feimosi/baguetteBox.js 1836 */ 1837/*! 1838 * getSize v2.0.3 1839 * measure size of elements 1840 * MIT license 1841 */
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.