1/* 2 * Custom code goes here. 3 * A template should always ship with an empty custom.js 4 */ 5 6/*! lazysizes - v5.3.0 */ 7!(function (e) { 8 var t = (function (u, D, f) { 9 'use strict' 10 var k, H 11 if ( 12 ((function () { 13 var e 14 var t = { 15 lazyClass: 'lazyload', 16 loadedClass: 'lazyloaded', 17 loadingClass: 'lazyloading', 18 preloadClass: 'lazypreload', 19 errorClass: 'lazyerror', 20 autosizesClass: 'lazyautosizes', 21 fastLoadedClass: 'ls-is-cached', 22 iframeLoadMode: 0, 23 srcAttr: 'data-src', 24 srcsetAttr: 'data-srcset', 25 sizesAttr: 'data-sizes', 26 minSize: 40, 27 customMedia: {}, 28 init: true, 29 expFactor: 1.5, 30 hFac: 0.8, 31 loadMode: 2, 32 loadHidden: true, 33 ricTimeout: 0, 34 throttleDelay: 125, 35 } 36 H = u.lazySizesConfig || u.lazysizesConfig || {} 37 for (e in t) { 38 if (!(e in H)) { 39 H[e] = t[e] 40 } 41 } 42 })(), 43 !D || !D.getElementsByClassName) 44 ) { 45 return { init: function () {}, cfg: H, noSupport: true } 46 } 47 var O = D.documentElement, 48 i = u.HTMLPictureElement, 49 P = 'addEventListener', 50 $ = 'getAttribute', 51 q = u[P].bind(u), 52 I = u.setTimeout, 53 U = u.requestAnimationFrame || I, 54 o = u.requestIdleCallback, 55 j = /^picture$/i, 56 r = ['load', 'error', 'lazyincluded', '_lazyloaded'], 57 a = {}, 58 G = Array.prototype.forEach, 59 J = function (e, t) { 60 if (!a[t]) { 61 a[t] = new RegExp('(\\s|^)' + t + '(\\s|$)') 62 } 63 return a[t].test(e[$]('class') || '') && a[t] 64 }, 65 K = function (e, t) { 66 if (!J(e, t)) { 67 e.setAttribute('class', (e[$]('class') || '').trim() + ' ' + t) 68 } 69 }, 70 Q = function (e, t) { 71 var a 72 if ((a = J(e, t))) { 73 e.setAttribute('class', (e[$]('class') || '').replace(a, ' ')) 74 } 75 }, 76 V = function (t, a, e) { 77 var i = e ? P : 'removeEventListener' 78 if (e) { 79 V(t, a) 80 } 81 r.forEach(function (e) { 82 t[i](e, a) 83 }) 84 }, 85 X = function (e, t, a, i, r) { 86 var n = D.createEvent('Event') 87 if (!a) { 88 a = {} 89 } 90 a.instance = k 91 n.initEvent(t, !i, !r) 92 n.detail = a 93 e.dispatchEvent(n) 94 return n 95 }, 96 Y = function (e, t) { 97 var a 98 if (!i && (a = u.picturefill || H.pf)) { 99 if (t && t.src && !e[$]('srcset')) { 100 e.setAttribute('srcset', t.src) 101 } 102 a({ reevaluate: true, elements: [e] }) 103 } else if (t && t.src) { 104 e.src = t.src 105 } 106 }, 107 Z = function (e, t) { 108 return (getComputedStyle(e, null) || {})[t] 109 }, 110 s = function (e, t, a) { 111 a = a || e.offsetWidth 112 while (a < H.minSize && t && !e._lazysizesWidth) { 113 a = t.offsetWidth 114 t = t.parentNode 115 } 116 return a 117 }, 118 ee = (function () { 119 var a, i 120 var t = [] 121 var r = [] 122 var n = t 123 var s = function () { 124 var e = n 125 n = t.length ? r : t 126 a = true 127 i = false 128 while (e.length) { 129 e.shift()() 130 } 131 a = false 132 } 133 var e = function (e, t) { 134 if (a && !t) { 135 e.apply(this, arguments) 136 } else { 137 n.push(e) 138 if (!i) { 139 i = true 140 ;(D.hidden ? I : U)(s) 141 } 142 } 143 } 144 e._lsFlush = s 145 return e 146 })(), 147 te = function (a, e) { 148 return e 149 ? function () { 150 ee(a) 151 } 152 : function () { 153 var e = this 154 var t = arguments 155 ee(function () { 156 a.apply(e, t) 157 }) 158 } 159 }, 160 ae = function (e) { 161 var a 162 var i = 0 163 var r = H.throttleDelay 164 var n = H.ricTimeout 165 var t = function () { 166 a = false 167 i = f.now() 168 e() 169 } 170 var s = 171 o && n > 49 172 ? function () { 173 o(t, { timeout: n }) 174 if (n !== H.ricTimeout) { 175 n = H.ricTimeout 176 } 177 } 178 : te(function () { 179 I(t) 180 }, true) 181 return function (e) { 182 var t 183 if ((e = e === true)) { 184 n = 33 185 } 186 if (a) { 187 return 188 } 189 a = true 190 t = r - (f.now() - i) 191 if (t < 0) { 192 t = 0 193 } 194 if (e || t < 9) { 195 s() 196 } else { 197 I(s, t) 198 } 199 } 200 }, 201 ie = function (e) { 202 var t, a 203 var i = 99 204 var r = function () { 205 t = null 206 e() 207 } 208 var n = function () { 209 var e = f.now() - a 210 if (e < i) { 211 I(n, i - e) 212 } else { 213 ;(o || r)(r) 214 } 215 } 216 return function () { 217 a = f.now() 218 if (!t) { 219 t = I(n, i) 220 } 221 } 222 }, 223 e = (function () { 224 var v, m, c, h, e 225 var y, z, g, p, C, b, A 226 var n = /^img$/i 227 var d = /^iframe$/i 228 var E = 'onscroll' in u && !/(gle|ing)bot/.test(navigator.userAgent) 229 var _ = 0 230 var w = 0 231 var M = 0 232 var N = -1 233 var L = function (e) { 234 M-- 235 if (!e || M < 0 || !e.target) { 236 M = 0 237 } 238 } 239 var x = function (e) { 240 if (A == null) { 241 A = Z(D.body, 'visibility') == 'hidden' 242 } 243 return A || !(Z(e.parentNode, 'visibility') == 'hidden' && Z(e, 'visibility') == 'hidden') 244 } 245 var W = function (e, t) { 246 var a 247 var i = e 248 var r = x(e) 249 g -= t 250 b += t 251 p -= t 252 C += t 253 while (r && (i = i.offsetParent) && i != D.body && i != O) { 254 r = (Z(i, 'opacity') || 1) > 0 255 if (r && Z(i, 'overflow') != 'visible') { 256 a = i.getBoundingClientRect() 257 r = C > a.left && p < a.right && b > a.top - 1 && g < a.bottom + 1 258 } 259 } 260 return r 261 } 262 var t = function () { 263 var e, t, a, i, r, n, s, o, l, u, f, c 264 var d = k.elements 265 if ((h = H.loadMode) && M < 8 && (e = d.length)) { 266 t = 0 267 N++ 268 for (; t < e; t++) { 269 if (!d[t] || d[t]._lazyRace) { 270 continue 271 } 272 if (!E || (k.prematureUnveil && k.prematureUnveil(d[t]))) { 273 R(d[t]) 274 continue 275 } 276 if (!(o = d[t][$]('data-expand')) || !(n = o * 1)) { 277 n = w 278 } 279 if (!u) { 280 u = !H.expand || H.expand < 1 ? (O.clientHeight > 500 && O.clientWidth > 500 ? 500 : 370) : H.expand 281 k._defEx = u 282 f = u * H.expFactor 283 c = H.hFac 284 A = null 285 if (w < f && M < 1 && N > 2 && h > 2 && !D.hidden) { 286 w = f 287 N = 0 288 } else if (h > 1 && N > 1 && M < 6) { 289 w = u 290 } else { 291 w = _ 292 } 293 } 294 if (l !== n) { 295 y = innerWidth + n * c
296 z = innerHeight + n 297 s = n * -1 298 l = n 299 } 300 a = d[t].getBoundingClientRect() 301 if ( 302 (b = a.bottom) >= s && 303 (g = a.top) <= z && 304 (C = a.right) >= s * c && 305 (p = a.left) <= y && 306 (b || C || p || g) && 307 (H.loadHidden || x(d[t])) && 308 ((m && M < 3 && !o && (h < 3 || N < 4)) || W(d[t], n)) 309 ) { 310 R(d[t]) 311 r = true 312 if (M > 9) { 313 break 314 } 315 } else if ( 316 !r && 317 m && 318 !i && 319 M < 4 && 320 N < 4 && 321 h > 2 && 322 (v[0] || H.preloadAfterLoad) && 323 (v[0] || (!o && (b || C || p || g || d[t][$](H.sizesAttr) != 'auto'))) 324 ) { 325 i = v[0] || d[t] 326 } 327 } 328 if (i && !r) { 329 R(i) 330 } 331 } 332 } 333 var a = ae(t) 334 var S = function (e) { 335 var t = e.target 336 if (t._lazyCache) { 337 delete t._lazyCache 338 return 339 } 340 L(e) 341 K(t, H.loadedClass) 342 Q(t, H.loadingClass) 343 V(t, B) 344 X(t, 'lazyloaded') 345 } 346 var i = te(S) 347 var B = function (e) { 348 i({ target: e.target }) 349 } 350 var T = function (e, t) { 351 var a = e.getAttribute('data-load-mode') || H.iframeLoadMode 352 if (a == 0) { 353 e.contentWindow.location.replace(t) 354 } else if (a == 1) { 355 e.src = t 356 } 357 } 358 var F = function (e) { 359 var t 360 var a = e[$](H.srcsetAttr) 361 if ((t = H.customMedia[e[$]('data-media') || e[$]('media')])) { 362 e.setAttribute('media', t) 363 } 364 if (a) { 365 e.setAttribute('srcset', a) 366 } 367 } 368 var s = te(function (t, e, a, i, r) { 369 var n, s, o, l, u, f 370 if (!(u = X(t, 'lazybeforeunveil', e)).defaultPrevented) { 371 if (i) { 372 if (a) { 373 K(t, H.autosizesClass) 374 } else { 375 t.setAttribute('sizes', i) 376 } 377 } 378 s = t[$](H.srcsetAttr) 379 n = t[$](H.srcAttr) 380 if (r) { 381 o = t.parentNode 382 l = o && j.test(o.nodeName || '') 383 } 384 f = e.firesLoad || ('src' in t && (s || n || l)) 385 u = { target: t } 386 K(t, H.loadingClass) 387 if (f) { 388 clearTimeout(c) 389 c = I(L, 2500) 390 V(t, B, true) 391 } 392 if (l) { 393 G.call(o.getElementsByTagName('source'), F) 394 } 395 if (s) { 396 t.setAttribute('srcset', s) 397 } else if (n && !l) { 398 if (d.test(t.nodeName)) { 399 T(t, n) 400 } else { 401 t.src = n 402 } 403 } 404 if (r && (s || l)) { 405 Y(t, { src: n }) 406 } 407 } 408 if (t._lazyRace) { 409 delete t._lazyRace 410 } 411 Q(t, H.lazyClass) 412 ee(function () { 413 var e = t.complete && t.naturalWidth > 1 414 if (!f || e) { 415 if (e) { 416 K(t, H.fastLoadedClass) 417 } 418 S(u) 419 t._lazyCache = true 420 I(function () { 421 if ('_lazyCache' in t) { 422 delete t._lazyCache 423 } 424 }, 9) 425 } 426 if (t.loading == 'lazy') { 427 M-- 428 } 429 }, true) 430 }) 431 var R = function (e) { 432 if (e._lazyRace) { 433 return 434 } 435 var t 436 var a = n.test(e.nodeName) 437 var i = a && (e[$](H.sizesAttr) || e[$]('sizes')) 438 var r = i == 'auto' 439 if ((r || !m) && a && (e[$]('src') || e.srcset) && !e.complete && !J(e, H.errorClass) && J(e, H.lazyClass)) { 440 return 441 } 442 t = X(e, 'lazyunveilread').detail 443 if (r) { 444 re.updateElem(e, true, e.offsetWidth) 445 } 446 e._lazyRace = true 447 M++ 448 s(e, t, r, i, a) 449 } 450 var r = ie(function () { 451 H.loadMode = 3 452 a() 453 }) 454 var o = function () { 455 if (H.loadMode == 3) { 456 H.loadMode = 2 457 } 458 r() 459 } 460 var l = function () { 461 if (m) { 462 return 463 } 464 if (f.now() - e < 999) { 465 I(l, 999) 466 return 467 } 468 m = true 469 H.loadMode = 3 470 a() 471 q('scroll', o, true) 472 } 473 return { 474 _: function () { 475 e = f.now() 476 k.elements = D.getElementsByClassName(H.lazyClass) 477 v = D.getElementsByClassName(H.lazyClass + ' ' + H.preloadClass) 478 q('scroll', a, true) 479 q('resize', a, true) 480 q('pageshow', function (e) { 481 if (e.persisted) { 482 var t = D.querySelectorAll('.' + H.loadingClass) 483 if (t.length && t.forEach) { 484 U(function () { 485 t.forEach(function (e) { 486 if (e.complete) { 487 R(e) 488 } 489 }) 490 }) 491 } 492 } 493 }) 494 if (u.MutationObserver) { 495 new MutationObserver(a).observe(O, { childList: true, subtree: true, attributes: true }) 496 } else { 497 O[P]('DOMNodeInserted', a, true) 498 O[P]('DOMAttrModified', a, true) 499 setInterval(a, 999) 500 } 501 q('hashchange', a, true) 502 ;['focus', 'mouseover', 'click', 'load', 'transitionend', 'animationend'].forEach(function (e) { 503 D[P](e, a, true) 504 }) 505 if (/d$|^c/.test(D.readyState)) { 506 l() 507 } else { 508 q('load', l) 509 D[P]('DOMContentLoaded', a) 510 I(l, 2e4) 511 } 512 if (k.elements.length) { 513 t() 514 ee._lsFlush() 515 } else { 516 a() 517 } 518 }, 519 checkElems: a, 520 unveil: R, 521 _aLSL: o, 522 } 523 })(), 524 re = (function () { 525 var a 526 var n = te(function (e, t, a, i) { 527 var r, n, s 528 e._lazysizesWidth = i 529 i += 'px' 530 e.setAttribute('sizes', i)
531 if (j.test(t.nodeName || '')) { 532 r = t.getElementsByTagName('source') 533 for (n = 0, s = r.length; n < s; n++) { 534 r[n].setAttribute('sizes', i) 535 } 536 } 537 if (!a.detail.dataAttr) { 538 Y(e, a.detail) 539 } 540 }) 541 var i = function (e, t, a) { 542 var i 543 var r = e.parentNode 544 if (r) { 545 a = s(e, r, a) 546 i = X(e, 'lazybeforesizes', { width: a, dataAttr: !!t }) 547 if (!i.defaultPrevented) { 548 a = i.detail.width 549 if (a && a !== e._lazysizesWidth) { 550 n(e, r, i, a) 551 } 552 } 553 } 554 } 555 var e = function () { 556 var e 557 var t = a.length 558 if (t) { 559 e = 0 560 for (; e < t; e++) { 561 i(a[e]) 562 } 563 } 564 } 565 var t = ie(e) 566 return { 567 _: function () { 568 a = D.getElementsByClassName(H.autosizesClass) 569 q('resize', t) 570 }, 571 checkElems: t, 572 updateElem: i, 573 } 574 })(), 575 t = function () { 576 if (!t.i && D.getElementsByClassName) { 577 t.i = true 578 re._() 579 e._() 580 } 581 } 582 return ( 583 I(function () { 584 H.init && t() 585 }), 586 (k = { cfg: H, autoSizer: re, loader: e, init: t, uP: Y, aC: K, rC: Q, hC: J, fire: X, gW: s, rAF: ee }) 587 ) 588 })(e, e.document, Date) 589 ;((e.lazySizes = t), 'object' == typeof module && module.exports && (module.exports = t)) 590})('undefined' != typeof window ? window : {}) 591;('function' != typeof Object.assign && 592 Object.defineProperty(Object, 'assign', { 593 value: function (a) { 594 if (null == a) throw new TypeError('Cannot convert undefined or null to object') 595 for (var b, c = Object(a), d = 1; d < arguments.length; d++) 596 if (((b = arguments[d]), null != b)) 597 for (var e in b) Object.prototype.hasOwnProperty.call(b, e) && (c[e] = b[e]) 598 return c 599 }, 600 writable: !0, 601 configurable: !0, 602 }), 603 'function' != typeof Array.from && 604 (Array.from = function (a) { 605 return [].slice.call(a) 606 })) 607var buildElement = function (a) { 608 var b = document.implementation.createHTMLDocument('') 609 return ((b.body.innerHTML = a), Array.from(b.body.children)[0]) 610 }, 611 triggerEvent = function (a, b) { 612 var c = document.createEvent('HTMLEvents') 613 ;(c.initEvent(b, !0, !1), a.dispatchEvent(c)) 614 }, 615 definePinchZoom = function () { 616 var a = Math.min, 617 b = Math.max, 618 c = Math.abs, 619 d = function (a, b) { 620 ;((this.el = a), 621 (this.zoomFactor = 1), 622 (this.lastScale = 1), 623 (this.offset = { x: 0, y: 0 }), 624 (this.initialOffset = { x: 0, y: 0 }), 625 (this.options = Object.assign({}, this.defaults, b)), 626 this.setupMarkup(), 627 this.bindEvents(), 628 this.update(), 629 this.isImageLoaded(this.el) && (this.updateAspectRatio(), this.setupOffsets()), 630 this.enable()) 631 }, 632 e = function (c, a) { 633 return c + a 634 }, 635 f = function (a, b) { 636 return a > b - 0.01 && a < b + 0.01 637 } 638 d.prototype = { 639 defaults: { 640 tapZoomFactor: 2, 641 zoomOutFactor: 1.3, 642 animationDuration: 300, 643 maxZoom: 4, 644 minZoom: 0.5, 645 draggableUnzoomed: !0, 646 lockDragAxis: !1, 647 setOffsetsOnce: !1, 648 use2d: !0, 649 zoomStartEventName: 'pz_zoomstart', 650 zoomUpdateEventName: 'pz_zoomupdate', 651 zoomEndEventName: 'pz_zoomend', 652 dragStartEventName: 'pz_dragstart', 653 dragUpdateEventName: 'pz_dragupdate', 654 dragEndEventName: 'pz_dragend', 655 doubleTapEventName: 'pz_doubletap', 656 verticalPadding: 0, 657 horizontalPadding: 0, 658 onZoomStart: null, 659 onZoomEnd: null, 660 onZoomUpdate: null, 661 onDragStart: null, 662 onDragEnd: null, 663 onDragUpdate: null, 664 onDoubleTap: null, 665 }, 666 handleDragStart: function (a) { 667 ;(triggerEvent(this.el, this.options.dragStartEventName), 668 'function' == typeof this.options.onDragStart && this.options.onDragStart(this, a), 669 this.stopAnimation(), 670 (this.lastDragPosition = !1), 671 (this.hasInteraction = !0), 672 this.handleDrag(a)) 673 }, 674 handleDrag: function (a) { 675 var b = this.getTouches(a)[0] 676 ;(this.drag(b, this.lastDragPosition), 677 (this.offset = this.sanitizeOffset(this.offset)), 678 (this.lastDragPosition = b)) 679 }, 680 handleDragEnd: function () { 681 ;(triggerEvent(this.el, this.options.dragEndEventName), 682 'function' == typeof this.options.onDragEnd && this.options.onDragEnd(this, event), 683 this.end()) 684 }, 685 handleZoomStart: function (a) { 686 ;(triggerEvent(this.el, this.options.zoomStartEventName), 687 'function' == typeof this.options.onZoomStart && this.options.onZoomStart(this, a), 688 this.stopAnimation(), 689 (this.lastScale = 1), 690 (this.nthZoom = 0), 691 (this.lastZoomCenter = !1), 692 (this.hasInteraction = !0)) 693 }, 694 handleZoom: function (a, b) { 695 var c = this.getTouchCenter(this.getTouches(a)), 696 d = b / this.lastScale 697 ;((this.lastScale = b), 698 (this.nthZoom += 1), 699 3 < this.nthZoom && (this.scale(d, c), this.drag(c, this.lastZoomCenter)), 700 (this.lastZoomCenter = c)) 701 }, 702 handleZoomEnd: function () { 703 ;(triggerEvent(this.el, this.options.zoomEndEventName), 704 'function' == typeof this.options.onZoomEnd && this.options.onZoomEnd(this, event), 705 this.end()) 706 }, 707 handleDoubleTap: function (a) { 708 var b = this.getTouches(a)[0], 709 c = 1 < this.zoomFactor ? 1 : this.options.tapZoomFactor, 710 d = this.zoomFactor, 711 e = function (a) { 712 this.scaleTo(d + a * (c - d), b) 713 }.bind(this) 714 this.hasInteraction || 715 ((this.isDoubleTap = !0), 716 d > c && (b = this.getCurrentZoomCenter()), 717 this.animate(this.options.animationDuration, e, this.swing), 718 triggerEvent(this.el, this.options.doubleTapEventName), 719 'function' == typeof this.options.onDoubleTap && this.options.onDoubleTap(this, a)) 720 },
721 computeInitialOffset: function () { 722 this.initialOffset = { 723 x: -c(this.el.offsetWidth * this.getInitialZoomFactor() - this.container.offsetWidth) / 2, 724 y: -c(this.el.offsetHeight * this.getInitialZoomFactor() - this.container.offsetHeight) / 2, 725 } 726 }, 727 resetOffset: function () { 728 ;((this.offset.x = this.initialOffset.x), (this.offset.y = this.initialOffset.y)) 729 }, 730 isImageLoaded: function (a) { 731 return 'IMG' === a.nodeName 732 ? a.complete && 0 !== a.naturalHeight 733 : Array.from(a.querySelectorAll('img')).every(this.isImageLoaded) 734 }, 735 setupOffsets: function () { 736 ;(this.options.setOffsetsOnce && this._isOffsetsSet) || 737 ((this._isOffsetsSet = !0), this.computeInitialOffset(), this.resetOffset()) 738 }, 739 sanitizeOffset: function (c) { 740 var d = this.el.offsetWidth * this.getInitialZoomFactor() * this.zoomFactor, 741 e = this.el.offsetHeight * this.getInitialZoomFactor() * this.zoomFactor, 742 f = d - this.getContainerX() + this.options.horizontalPadding, 743 g = e - this.getContainerY() + this.options.verticalPadding, 744 h = b(f, 0), 745 i = b(g, 0), 746 j = a(f, 0) - this.options.horizontalPadding, 747 k = a(g, 0) - this.options.verticalPadding 748 return { x: a(b(c.x, j), h), y: a(b(c.y, k), i) } 749 }, 750 scaleTo: function (a, b) { 751 this.scale(a / this.zoomFactor, b) 752 }, 753 scale: function (a, b) { 754 ;((a = this.scaleZoomFactor(a)), 755 this.addOffset({ x: (a - 1) * (b.x + this.offset.x), y: (a - 1) * (b.y + this.offset.y) }), 756 triggerEvent(this.el, this.options.zoomUpdateEventName), 757 'function' == typeof this.options.onZoomUpdate && this.options.onZoomUpdate(this, event)) 758 }, 759 scaleZoomFactor: function (c) { 760 var d = this.zoomFactor 761 return ( 762 (this.zoomFactor *= c), 763 (this.zoomFactor = a(this.options.maxZoom, b(this.zoomFactor, this.options.minZoom))), 764 this.zoomFactor / d 765 ) 766 }, 767 canDrag: function () { 768 return this.options.draggableUnzoomed || !f(this.zoomFactor, 1) 769 }, 770 drag: function (a, b) { 771 b && 772 (this.options.lockDragAxis 773 ? c(a.x - b.x) > c(a.y - b.y) 774 ? this.addOffset({ x: -(a.x - b.x), y: 0 }) 775 : this.addOffset({ y: -(a.y - b.y), x: 0 }) 776 : this.addOffset({ y: -(a.y - b.y), x: -(a.x - b.x) }), 777 triggerEvent(this.el, this.options.dragUpdateEventName), 778 'function' == typeof this.options.onDragUpdate && this.options.onDragUpdate(this, event)) 779 }, 780 getTouchCenter: function (a) { 781 return this.getVectorAvg(a) 782 }, 783 getVectorAvg: function (a) { 784 return { 785 x: 786 a 787 .map(function (a) { 788 return a.x 789 }) 790 .reduce(e) / a.length, 791 y: 792 a 793 .map(function (a) { 794 return a.y 795 }) 796 .reduce(e) / a.length, 797 } 798 }, 799 addOffset: function (a) { 800 this.offset = { x: this.offset.x + a.x, y: this.offset.y + a.y } 801 }, 802 sanitize: function () { 803 this.zoomFactor < this.options.zoomOutFactor 804 ? this.zoomOutAnimation() 805 : this.isInsaneOffset(this.offset) && this.sanitizeOffsetAnimation() 806 }, 807 isInsaneOffset: function (a) { 808 var b = this.sanitizeOffset(a) 809 return b.x !== a.x || b.y !== a.y 810 }, 811 sanitizeOffsetAnimation: function () { 812 var a = this.sanitizeOffset(this.offset), 813 b = { x: this.offset.x, y: this.offset.y }, 814 c = function (c) { 815 ;((this.offset.x = b.x + c * (a.x - b.x)), (this.offset.y = b.y + c * (a.y - b.y)), this.update()) 816 }.bind(this) 817 this.animate(this.options.animationDuration, c, this.swing) 818 }, 819 zoomOutAnimation: function () { 820 if (1 !== this.zoomFactor) { 821 var a = this.zoomFactor, 822 b = this.getCurrentZoomCenter(), 823 c = function (c) { 824 this.scaleTo(a + c * (1 - a), b) 825 }.bind(this) 826 this.animate(this.options.animationDuration, c, this.swing) 827 } 828 }, 829 updateAspectRatio: function () { 830 ;(this.unsetContainerY(), this.setContainerY(this.container.parentElement.offsetHeight)) 831 }, 832 getInitialZoomFactor: function () { 833 var b = this.container.offsetWidth / this.el.offsetWidth, 834 c = this.container.offsetHeight / this.el.offsetHeight 835 return a(b, c) 836 }, 837 getAspectRatio: function () { 838 return this.el.offsetWidth / this.el.offsetHeight 839 }, 840 getCurrentZoomCenter: function () { 841 var a = this.offset.x - this.initialOffset.x, 842 b = -1 * this.offset.x - a / (1 / this.zoomFactor - 1), 843 c = this.offset.y - this.initialOffset.y, 844 d = -1 * this.offset.y - c / (1 / this.zoomFactor - 1) 845 return { x: b, y: d } 846 }, 847 getTouches: function (a) { 848 var b = this.container.getBoundingClientRect(), 849 c = document.documentElement.scrollTop || document.body.scrollTop, 850 d = document.documentElement.scrollLeft || document.body.scrollLeft, 851 e = b.top + c, 852 f = b.left + d 853 return Array.prototype.slice.call(a.touches).map(function (a) {
854 return { x: a.pageX - f, y: a.pageY - e } 855 }) 856 }, 857 animate: function (a, b, c, d) { 858 var e = new Date().getTime(), 859 f = function () { 860 if (this.inAnimation) { 861 var g = new Date().getTime() - e, 862 h = g / a 863 g >= a 864 ? (b(1), d && d(), this.update(), this.stopAnimation(), this.update()) 865 : (c && (h = c(h)), b(h), this.update(), requestAnimationFrame(f)) 866 } 867 }.bind(this) 868 ;((this.inAnimation = !0), requestAnimationFrame(f)) 869 }, 870 stopAnimation: function () { 871 this.inAnimation = !1 872 }, 873 swing: function (a) { 874 return -Math.cos(a * Math.PI) / 2 + 0.5 875 }, 876 getContainerX: function () { 877 return this.container.offsetWidth 878 }, 879 getContainerY: function () { 880 return this.container.offsetHeight 881 }, 882 setContainerY: function (a) { 883 return (this.container.style.height = a + 'px') 884 }, 885 unsetContainerY: function () { 886 this.container.style.height = null 887 }, 888 setupMarkup: function () { 889 ;((this.container = buildElement('<div class="pinch-zoom-container"></div>')), 890 this.el.parentNode.insertBefore(this.container, this.el), 891 this.container.appendChild(this.el), 892 (this.container.style.overflow = 'hidden'), 893 (this.container.style.position = 'relative'), 894 (this.el.style.webkitTransformOrigin = '0% 0%'), 895 (this.el.style.mozTransformOrigin = '0% 0%'), 896 (this.el.style.msTransformOrigin = '0% 0%'), 897 (this.el.style.oTransformOrigin = '0% 0%'), 898 (this.el.style.transformOrigin = '0% 0%'), 899 (this.el.style.position = 'absolute')) 900 }, 901 end: function () { 902 ;((this.hasInteraction = !1), this.sanitize(), this.update()) 903 }, 904 bindEvents: function () { 905 var a = this 906 ;(g(this.container, this), 907 window.addEventListener('resize', this.update.bind(this)), 908 Array.from(this.el.querySelectorAll('img')).forEach(function (b) { 909 b.addEventListener('load', a.update.bind(a)) 910 }), 911 'IMG' === this.el.nodeName && this.el.addEventListener('load', this.update.bind(this))) 912 }, 913 update: function (a) { 914 this.updatePlaned || 915 ((this.updatePlaned = !0), 916 window.setTimeout( 917 function () { 918 ;((this.updatePlaned = !1), 919 a && 'resize' === a.type && (this.updateAspectRatio(), this.setupOffsets()), 920 a && 'load' === a.type && (this.updateAspectRatio(), this.setupOffsets())) 921 var b = this.getInitialZoomFactor() * this.zoomFactor, 922 c = -this.offset.x / b, 923 d = -this.offset.y / b, 924 e = 'scale3d(' + b + ', ' + b + ',1) translate3d(' + c + 'px,' + d + 'px,0px)', 925 f = 'scale(' + b + ', ' + b + ') translate(' + c + 'px,' + d + 'px)', 926 g = function () { 927 this.clone && (this.clone.parentNode.removeChild(this.clone), delete this.clone) 928 }.bind(this) 929 !this.options.use2d || this.hasInteraction || this.inAnimation 930 ? ((this.is3d = !0), 931 g(), 932 (this.el.style.webkitTransform = e), 933 (this.el.style.mozTransform = f), 934 (this.el.style.msTransform = f), 935 (this.el.style.oTransform = f), 936 (this.el.style.transform = e)) 937 : (this.is3d && 938 ((this.clone = this.el.cloneNode(!0)), 939 (this.clone.style.pointerEvents = 'none'), 940 this.container.appendChild(this.clone), 941 window.setTimeout(g, 200)), 942 (this.el.style.webkitTransform = f), 943 (this.el.style.mozTransform = f), 944 (this.el.style.msTransform = f), 945 (this.el.style.oTransform = f), 946 (this.el.style.transform = f), 947 (this.is3d = !1)) 948 }.bind(this), 949 0, 950 )) 951 }, 952 enable: function () { 953 this.enabled = !0 954 }, 955 disable: function () { 956 this.enabled = !1 957 }, 958 } 959 var g = function (a, b) { 960 var c = null, 961 d = 0, 962 e = null, 963 f = null, 964 g = function (a, d) { 965 c !== a && 966 (c && !a && ('zoom' === c ? b.handleZoomEnd(d) : 'drag' === c ? b.handleDragEnd(d) : void 0), 967 'zoom' === a ? b.handleZoomStart(d) : 'drag' === a ? b.handleDragStart(d) : void 0) 968 c = a 969 }, 970 h = function (a) { 971 2 === d ? g('zoom') : 1 === d && b.canDrag() ? g('drag', a) : g(null, a) 972 }, 973 i = function (a) { 974 return Array.from(a).map(function (a) { 975 return { x: a.pageX, y: a.pageY } 976 }) 977 }, 978 j = function (c, a) { 979 var d, 980 e, 981 b = Math.sqrt 982 return ((d = c.x - a.x), (e = c.y - a.y), b(d * d + e * e)) 983 }, 984 k = function (a, b) { 985 var c = j(a[0], a[1]), 986 d = j(b[0], b[1]) 987 return d / c 988 }, 989 l = function (a) { 990 ;(a.stopPropagation(), a.preventDefault()) 991 }, 992 m = function (a) { 993 var f = new Date().getTime() 994 1 < d && (e = null) 995 300 > f - e 996 ? (l(a), 997 b.handleDoubleTap(a), 998 'zoom' === c ? b.handleZoomEnd(a) : 'drag' === c ? b.handleDragEnd(a) : void 0) 999 : (b.isDoubleTap = !1) 1000 1 === d && (e = f) 1001 }, 1002 n = !0 1003 ;(a.addEventListener('touchstart', function (a) { 1004 b.enabled && ((n = !0), (d = a.touches.length), m(a)) 1005 }), 1006 a.addEventListener('touchmove', function (a) { 1007 b.enabled && 1008 !b.isDoubleTap && 1009 (n 1010 ? (h(a), c && l(a), (f = i(a.touches))) 1011 : ('zoom' === c 1012 ? 2 == f.length && 2 == a.touches.length && b.handleZoom(a, k(f, i(a.touches))) 1013 : 'drag' === c 1014 ? b.handleDrag(a) 1015 : void 0,
1016 c && (l(a), b.update())), 1017 (n = !1)) 1018 }), 1019 a.addEventListener('touchend', function (a) { 1020 b.enabled && ((d = a.touches.length), h(a)) 1021 })) 1022 } 1023 return d 1024 }, 1025 PinchZoom = definePinchZoom() 1026 1027$(document).ready(function () { 1028 $('#search_widget-btn, .search_widget-btn').on('click', function () { 1029 $('.search_widget-btn').attr('disabled', true) 1030 $('#search_widget').addClass('active') 1031 $('body').addClass('search-active') 1032 $('body').css('padding-right', '12px') 1033 $('.fader').addClass('active') 1034 }) 1035 1036 $('.close-search').on('click', function () { 1037 closeSearch() 1038 }) 1039 1040 $('.fader').on('click', function () { 1041 closeSearch() 1042 }) 1043 1044 function closeSearch() { 1045 $('#search_widget').removeClass('active') 1046 $('body').removeClass('search-active') 1047 $('body').css('padding-right', '0px') 1048 $('.fader').removeClass('active') 1049 $('.search_widget-btn').attr('disabled', false) 1050 } 1051}) 1052 1053$(document).ready(function () { 1054 $('.menu-icon').click(function () { 1055 $('.nav-icon1,.nav-icon2,.nav-icon3,.nav-icon4').toggleClass('open') 1056 }) 1057 1058 $('.allow-collapse').on('click', function (e) { 1059 e.preventDefault() 1060 $($(this).attr('href')).collapse('toggle') 1061 }) 1062 1063 $('#mobile_top_menu_wrapper .menu-tab-a').on('click', function (e) { 1064 e.preventDefault() 1065 $($(this).find('.custom-collapse').attr('data-target-custom')).toggleClass('active') 1066 $('#mobile_top_menu_wrapper').toggleClass('active-hide') 1067 $(this).parent().toggleClass('active') 1068 $('#mobile_top_menu_wrapper #top-menu > .category:not(.active)').hide() 1069 $('#mobile_top_menu_wrapper .js-top-menu-bottom').hide() 1070 1071 if ($(this).hasClass('dropdown-item')) { 1072 $('#mobile_top_menu_wrapper #top-menu > .category.active').removeClass('active') 1073 $('#mobile_top_menu_wrapper #top-menu > .category:not(.active)').show() 1074 $('#mobile_top_menu_wrapper .js-top-menu-bottom').show() 1075 } 1076 }) 1077}) 1078 1079$(document).ready(function () { 1080 $('.owl-carousel .owl-item img').on('click', function () { 1081 // console.log('test') 1082 }) 1083}) 1084 1085$(document).ready(function () { 1086 $('.close-modal-product').on('click', function () { 1087 $('.js-product-images-modal').click() 1088 }) 1089 1090 $('.more-comments').on('click', function () { 1091 $('.product-comments-list-wrapper').addClass('show-more') 1092 }) 1093}) 1094 1095$(document).ready(function () { 1096 $('.toggle-filter-mobile').on('click', function () { 1097 $('#search_filters').toggleClass('show') 1098 $('.toggle-filter-style').attr('is_active', function (index, attr) { 1099 return attr == 'true' ? 'false' : 'true' 1100 }) 1101 }) 1102 1103 prestashop.on('updateProductList', function (e) { 1104 if (document.querySelector('.toggle-filter-style[is_active="true"]')) { 1105 $('#search_filters').addClass('show') 1106 } 1107 1108 $('.toggle-filter-mobile').off() 1109 $('.toggle-filter-mobile').on('click', function () { 1110 $('#search_filters').toggleClass('show') 1111 $('.toggle-filter-style').attr('is_active', function (index, attr) { 1112 return attr == 'true' ? 'false' : 'true' 1113 }) 1114 }) 1115 }) 1116 1117 var mobileViewport = window.matchMedia('screen and (max-width: 767px)') 1118 1119 $('.layer').on('click', function () { 1120 if (mobileViewport.matches) { 1121 setTimeout(function () { 1122 if (!document.querySelector('.pinch-zoom-container')) { 1123 var el = document.getElementById('allow-pinch') 1124 var pinch = new PinchZoom(el, { 1125 draggableUnzoomed: false, 1126 }) 1127 } 1128 }, 500) 1129 } 1130 }) 1131}) 1132 1133$(document).ready(function () { 1134 $('.owl-carousel').owlCarousel({ 1135 loop: true, 1136 margin: 10, 1137 nav: true, 1138 responsive: { 1139 0: { 1140 items: 3, 1141 }, 1142 400: { 1143 items: 4, 1144 }, 1145 600: { 1146 items: 4, 1147 }, 1148 1000: { 1149 items: 5, 1150 }, 1151 }, 1152 }) 1153 1154 $('.voucher-delete').click() 1155 function isSiteLangEn() { 1156 return prestashop.language.code == 'en' 1157 } 1158 1159 function initFacetToggling() { 1160 $('.facet-container .facet-label .custom-checkbox').click(function () { 1161 $(this).siblings('a').click() 1162 }) 1163 } 1164 function initFacetCollapsing() { 1165 collapseText = prestashop.language.iso_code == 'gb' ? 'collapse' : 'zwiÅ' 1166 expandText = prestashop.language.iso_code == 'gb' ? 'expand' : 'rozwiÅ' 1167 $('.facet-toggle').each(function () { 1168 $(this) 1169 .find('p') 1170 .text($(this).siblings('ul').hasClass('in') ? collapseText : expandText) 1171 }) 1172 $('.facet-toggle').click(function () { 1173 if ($(this).find('p').text() == collapseText) { 1174 $(this).find('p').text(expandText) 1175 } else { 1176 $(this).find('p').text(collapseText) 1177 } 1178 }) 1179 } 1180 1181 initFacetToggling() 1182 initFacetCollapsing() 1183 prestashop.on('updateProductList', function (e) { 1184 initFacetToggling() 1185 initFacetCollapsing() 1186 }) 1187}) 1188 1189 1190 1191// (function () { 1192// function hidePrzelewy24InstallmentWidget() { 1193// var widget = document.querySelector('.js-przelewy24-installment-widget-max') 1194// if (!widget) { 1195// return 1196// } 1197// var container = widget.closest('.installment-widget-max') || widget 1198// container.style.display = 'none' 1199// } 1200// 1201// if (document.readyState === 'loading') { 1202// document.addEventListener('DOMContentLoaded', hidePrzelewy24InstallmentWidget) 1203// } else { 1204// hidePrzelewy24InstallmentWidget() 1205// } 1206// 1207// if (window.MutationObserver) { 1208// var observer = new MutationObserver(function () { 1209// hidePrzelewy24InstallmentWidget() 1210// }) 1211// observer.observe(document.body, { childList: true, subtree: true }) 1212// } 1213// })() 1214// ;(function () { 1215// var billToDifferentState = null 1216// 1217// function applyCheckoutAddressVisibility(forceShowDelivery) { 1218// var checkbox = document.getElementById('bill-to-different-address') 1219// var deliveryBlock = document.getElementById('thecheckout-address-delivery') 1220// var invoiceBlock = document.getElementById('thecheckout-address-invoice') 1221// 1222// if (!deliveryBlock || !invoiceBlock) { 1223// return 1224// } 1225// 1226// var showDelivery = 1227// typeof forceShowDelivery === 'boolean' 1228// ? forceShowDelivery 1229// : billToDifferentState !== null 1230// ? billToDifferentState 1231// : checkbox && checkbox.checked 1232// if (checkbox) { 1233// checkbox.checked = !!showDelivery 1234// } 1235// document.body.classList.toggle('tc-billing-same', !showDelivery) 1236// if (showDelivery) { 1237// deliveryBlock.style.display = '' 1238// invoiceBlock.style.display = '' 1239// } else { 1240// deliveryBlock.style.display = 'none' 1241// invoiceBlock.style.display = 'block' 1242// } 1243// invoiceBlock.style.display = 'block' 1244// } 1245//
1246// function bindCheckoutAddressToggle() { 1247// function handleBillToDifferentAddress(event) { 1248// if (!event || !event.target || event.target.id !== 'bill-to-different-address') { 1249// return 1250// } 1251// var desired = !!event.target.checked 1252// billToDifferentState = desired 1253// if (typeof event.stopImmediatePropagation === 'function') { 1254// event.stopImmediatePropagation() 1255// } 1256// applyCheckoutAddressVisibility(desired) 1257// setTimeout(function () { 1258// applyCheckoutAddressVisibility(desired) 1259// }, 0) 1260// setTimeout(function () { 1261// applyCheckoutAddressVisibility(desired) 1262// }, 50) 1263// setTimeout(function () { 1264// applyCheckoutAddressVisibility(desired) 1265// }, 200) 1266// if (typeof window.modifyAddressSelection === 'function') { 1267// window.modifyAddressSelection('invoice') 1268// } 1269// } 1270// 1271// document.addEventListener('change', handleBillToDifferentAddress, true) 1272// if (window.jQuery) { 1273// var $ = window.jQuery 1274// $('body').off('change', '[data-link-action=x-bill-to-different-address]') 1275// $('body').on('change', '[data-link-action=x-bill-to-different-address]', function (event) { 1276// handleBillToDifferentAddress(event) 1277// return false 1278// }) 1279// } else { 1280// document.addEventListener('change', function (event) { 1281// if (event.target && event.target.id === 'bill-to-different-address') { 1282// applyCheckoutAddressVisibility() 1283// } 1284// }) 1285// } 1286// applyCheckoutAddressVisibility() 1287// setTimeout(applyCheckoutAddressVisibility, 50) 1288// setTimeout(applyCheckoutAddressVisibility, 200) 1289// } 1290// 1291// if (document.readyState === 'loading') { 1292// document.addEventListener('DOMContentLoaded', bindCheckoutAddressToggle) 1293// } else { 1294// bindCheckoutAddressToggle() 1295// } 1296// 1297// if (window.MutationObserver) { 1298// var checkoutObserver = new MutationObserver(function () { 1299// applyCheckoutAddressVisibility() 1300// setTimeout(applyCheckoutAddressVisibility, 50) 1301// }) 1302// var checkoutRoot = document.getElementById('checkout') || document.body 1303// checkoutObserver.observe(checkoutRoot, { childList: true, subtree: true }) 1304// } 1305// })()
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.