PageSourceSearch

https://ebad.com/wp-content/cache/asset-cleanup/one/js/item/apd_eb…89b6b8b74003ed9752f46f0f947b8bdc2a49b204.js

js ebad.com collected 2026-10-02 11:36:18 UTC 7,696 bytes, 7 lines download raw bytes

1/*!/wp-content/themes/apd_ebad/js/block-loader.js*/
2(()=>{var __webpack_modules__=({
2"./src/blocks/scripts/block-loader.js":
3/*!********************************************!*\
4  !*** ./src/blocks/scripts/block-loader.js ***!
5  \********************************************/
6(()=>{eval("function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError(\"Cannot call a class as a function\"); }\nfunction _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }\nfunction _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", { writable: !1 }), e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nvar BlockLoader = /*#__PURE__*/function () {\n  function BlockLoader(blockContainer, ClassFunction) {\n    _classCallCheck(this, BlockLoader);\n    if (!blockContainer || !(blockContainer instanceof HTMLElement)) {\n      //throw new Error('Invalid HTML element provided.');\n    }\n    this.pageWrapper = document.querySelector('#main');\n    this.blockContainer = blockContainer;\n    this.ClassFunction = ClassFunction;\n    this.entries = performance.getEntriesByType(\"navigation\");\n    this.pageReloaded = false; //this.entries.some(entry => entry.type === \"reload\");\n\n    this.initAnimation();\n  }\n  return _createClass(BlockLoader, [{\n    key: \"initAnimation\",\n    value: function initAnimation() {\n      var container = this.blockContainer;\n\n      // Immediately initialize the animation\n      new this.ClassFunction(container);\n\n      // Refresh ScrollTrigger if the page was reloaded\n      if (this.pageReloaded) {\n        setTimeout(function () {\n          //  ScrollTrigger.getAll().forEach(trigger => trigger.refresh());\n        }, 200);\n      }\n    }\n  }]);\n}();\nvar blockAnimations = /*#__PURE__*/function () {\n  function blockAnimations(blockContainer, elementClassToAnimate) {\n    var _this = this;\n    var fireOnce = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n    _classCallCheck(this, blockAnimations);\n    // elementToAnimate needs to be a class\n    if (!blockContainer || !(blockContainer instanceof HTMLElement)) {\n      throw new Error('Invalid HTML element provided.');\n    }\n    this.pageWrapper = document.querySelector('#main');\n    this.blockContainer = blockContainer;\n    this.children = this.blockContainer.querySelectorAll(elementClassToAnimate);\n    this.entries = performance.getEntriesByType(\"navigation\");\n    this.pageReloaded = false;\n    this.fireOnce = fireOnce;\n    this.entries.forEach(function (entry) {\n      if (entry.type === \"reload\") {\n        _this.pageReloaded = true;\n      }\n    });\n    this.animateBlock();\n  }\n  return _createClass(blockAnimations, [{\n    key: \"animateBlock\",\n    value: function animateBlock() {\n      var kids = gsap.utils.toArray(this.children),\n        container = this.blockContainer,\n        fireOnce = this.fireOnce;\n      kids.forEach(function (child, index) {\n        var delay = index * 0.256;\n        var tl = gsap.timeline({\n          paused: true,\n          defaults: {\n            duration: 0.6\n          }\n        });\n        tl.fromTo(child, {\n          autoAlpha: 0,\n          y: 40\n        }, {\n          autoAlpha: 1,\n          y: 0,\n          delay: delay\n        }\n        //\"start+=0.4\"\n        );\n        if (child.classList.contains('btn-scanner')) {\n          var buttonScannerInstance = new ButtonScanner(child);\n          tl.call(function () {\n            buttonScannerInstance.startAnimation(child);\n          }, null, \"-=\".concat(0.06));\n        }\n        tl.addLabel('start');\n        ScrollTrigger.create({\n          trigger: container,\n          //markers: true,\n          start: 'top 85%',\n          end: 'bottom bottom',\n          onEnter: function onEnter() {\n            tl.play();\n          }
6,\n          onLeaveBack: function onLeaveBack() {\n            if (!fireOnce) tl.reverse();\n          }\n        });\n      });\n    }\n  }]);\n}();\ndocument.addEventListener('DOMContentLoaded', function () {\n  var masthead = document.querySelector('header#masthead.site-header');\n  if (!masthead) return;\n  var mobileBP = 1140;\n  // prep your header‑hide animation, but immediately set it to \"shown\"\n\n  var showAnim = gsap.from(masthead, {\n    yPercent: -100,\n    paused: true,\n    duration: 0.2\n  }).progress(1);\n\n  // create one ScrollTrigger for the whole page\n  var trigger = ScrollTrigger.create({\n    start: 'top top',\n    end: 'max',\n    onUpdate: function onUpdate(self) {\n      // 1) mobile? always reset to shown\n      if (window.innerWidth < mobileBP) {\n        showAnim.progress(1).pause();\n        gsap.set(masthead, {\n          clearProps: 'transform'\n        });\n        return;\n      }\n\n      // 2) dropdown open? keep header shown\n      if (masthead.querySelector('.dropdown-menu.nav_collapse.show')) {\n        showAnim.progress(1).pause();\n        return;\n      }\n\n      // 3) otherwise run the hide/reveal\n      self.direction < 0 ? showAnim.play() : showAnim.reverse();\n    }\n  });\n\n  // get current scroll value - i hate this\n  var scroll = window.scrollY || window.pageYOffset;\n  // scroll to scroll\n  setTimeout(function () {\n    window.scrollTo({\n      top: scroll + 1,\n      left: 0\n    });\n  }, 50);\n  setTimeout(function () {\n    window.scrollTo({\n      top: scroll,\n      left: 0\n    });\n  }, 120);\n\n  // refresh on resize so the mobile check kicks back in\n  window.addEventListener('resize', function () {\n    return trigger.refresh();\n  });\n  var lazyImages = document.querySelectorAll('.ebad-image-load');\n  if ('IntersectionObserver' in window) {\n    var imageObserver = new IntersectionObserver(function (entries, observer) {\n      entries.forEach(function (entry) {\n        if (entry.isIntersecting) {\n          var img = entry.target;\n          var dataSrc = img.getAttribute('data-src');\n          if (dataSrc) {\n            img.src = dataSrc;\n            img.classList.add('ebad-image-loaded');\n          }\n          observer.unobserve(img);\n        }\n      });\n    });\n    lazyImages.forEach(function (img) {\n      imageObserver.observe(img);\n    });\n  } else {\n    // Fallback for browsers that do not support IntersectionObserver\n    lazyImages.forEach(function (img) {\n      var dataSrc = img.getAttribute('data-src');\n      if (dataSrc) {\n        img.src = dataSrc;\n      }\n    });\n  }\n});\nwindow.BlockLoader = BlockLoader;\nwindow.blockAnimations = blockAnimations;\n\n//# sourceURL=webpack://apd_ebad/./src/blocks/scripts/block-loader.js?")})
6});var __webpack_exports__={};__webpack_modules__["./src/blocks/scripts/block-loader.js"]()})()
7;

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.