PageSourceSearch

https://www.boody.co.uk/cdn/shop/t/305/assets/module-hero-carousel.js?v=172962501569976905851785857950

js boody.co.uk collected 2026-09-25 21:48:07 UTC 8,298 bytes, 2 lines download raw bytes

1(()=>{"use strict";var e={3951(e,t,r){function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function o(e,t,r){return(t=function(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const n=(e,...t)=>t.length>=e.length?e(...t):n.bind(void 0,e,...t),s=n((e,t)=>Array.isArray(t)?t.map(e):e(t)),l=(n((e,t)=>Array.isArray(t)?t.filter(e):e(t)?t:void 0),(e,...t)=>e.bind(void 0,...t)),a=(...e)=>function(t){return e.reduce((e,t)=>t.apply(this,[e]),t)},c=n((e,t)=>t[e]),u=(n((e,t)=>t<e),n((e,t,r)=>(r[e]=t,r)),(e,t,r)=>e(r)?u(e,t,t(r)):r),p=(n((e,t)=>t/e),n((e,t)=>t*e),n((e,t)=>-1!==e.indexOf(t)),n((e,t)=>e<0?t[t.length+e]:t[e])),h=(a((p(1),p(-1)),n((e,t)=>t+e)(1)),e=>Array.prototype.slice.call(e));n((e,t)=>s(t=>(t.classList.add(e),t),t)),n((e,t)=>s(t=>e.appendChild(t),t)),n((e,t,r)=>(r.style[e]=t,r))("display","none"),n((e,t)=>getComputedStyle(t)[e]),c("clientHeight"),n((e,t)=>t.classList.contains(e));const f=(e,t)=>t.getAttribute(e),d=(n(f),n((e,t,r)=>(r.setAttribute(e,t),r))),b=(n((e,t)=>{t.removeAttribute(e)}),n((e,t)=>f("data-"+e,t))),v=(n((e,t,r)=>d("data-"+e,t,r)),(e,t,r,i)=>(i.addEventListener(e,t,r),i)),y=(e,t,r,i)=>(i.removeEventListener(e,t,r),i),g=(e,t)=>{const r=["matches","matchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","webkitMatchesSelector"];for(const i of r)if("function"==typeof t[i])return t[i](e);return!1},m=(n((e,t,r)=>s(l(v,e,t,{}),r)),n((e,t,r)=>s(l(y,e,t,{}),r)),n((e,t,r)=>s(l(v,e,t,{passive:!0}),r)),n((e,t,r)=>s(l(v,e,t,!0),r)),n((e,t)=>u(t=>t&&!g(e,t)&&t.parentNode,e=>e.parentNode===document?null:e.parentNode,t.parentNode)),(e,t,r,i)=>v(e,e=>{const o=u(e=>e&&e!==document&&!g(r,e)&&e.parentNode,e=>e.parentNode,e.target);o!==document&&g(r,o)&&t.apply(i,[e])},{},i)),w=(n((e,t,r,i)=>s(l(m,e,t,r),i)),n((e,t)=>s(t=>(t.classList.remove(e),t),t)),n((e,t)=>s(t=>(t.classList.toggle(e),t),t)),(e,t=document)=>t.querySelector(e)),O=(e,t=document)=>h(t.querySelectorAll(e));a(c("children"),h),c("parentNode"),c("offsetTop"),c("value"),"undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iPad|iPhone|iPod/.test(window.navigator.platform)||"MacIntel"===navigator.platform&&navigator);var j=r(5156),P=r(3752),A=r(5982),S=r(1340),E=r(7529);function k(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,i)}return r}function x(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?k(Object(r),!0).forEach(function(t){o(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}const C=class{constructor(e,t,r){this.element=e,this.selector=e.getAttribute("data-selector")||"js-carousel-swiper",this.type=e.getAttribute("data-type")||null,this.swiper=null,this.setOptions(t||{},r),this.initCarousel()}setOptions(e,t){const{navigation:r,pagination:i,scrollbar:o}=e||{},n={prevEl:w(".js-carousel-prev",this.element),nextEl:w(".js-carousel-next",this.element)},s=w(".js-carousel-pagination",this.element),l=w(".js-carousel-scrollbar",this.element);let a={};t.thumbnail&&(a={thumbs:{swiper:w(t.thumbnail),multipleActiveThumbs:!1}}),this.options=x(x({},e),{},{navigation:t.navigation&&x(x({},r),n),pagination:t.pagination&&x(x({},i),{},{el:s}),scrollbar:t.scrollbar&&x(x({},o),{},{el:l}),lazy:e.lazy||!0,keyboard:{enabled:t.keyboard||!1,onlyInViewport:t.onlyInViewport||!0}},a)}initCarousel(){if("native"===this.type){const e=O(`.${this.selector}`);if(!e.length)return;if(e.length>1)return void console.error("Swiper: Multiple instances of the same selector are not supported",e);this.swiper=new j.A(`.${this.selector}`,x({modules:[P.A,A.A,S.A,E.A]},this.options))}else{var e;let t=0;if(this.swiper=w(`.${this.selector}`,this.element),null!==(e=this.swiper)&&void 0!==e&&e.initialize&&this.swiper)this.initSwiper();else{const e=setInterval(()=>{var r;t++,t>5&&clearInterval(e),null!==(r=this.swiper)&&void 0!==r&&r.initialize&&(clearInterval(e),this.initSwiper())},300)}}}initSwiper(){var e;this.swiper&&null!==(e=this.swiper)&&void 0!==e&&e.initialize&&(Object.assign(this.swiper,this.options),this.swiper.initialize())}};function I(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,i)}return r}function L(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?I(Object(r),!0).forEach(function(t){o(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):I(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}const N="video-player",D="data-use-video";class z extends HTMLElement{constructor(){super(),this.carousel=w("carousel-swiper",this),this.videoPlayers=O(N,this),this.type=this.carousel.getAttribute("data-type")||null,this.config=this.carousel.getAttribute("data-config")?JSON.parse(b("config",this.carousel)):null,this.options=this.carousel.getAttribute("data-options")?JSON.parse(b("options",this.carousel)):null,this.initCarousel()}initCarousel(){const e=setInterval(()=>{this.carousel.instance&&this.carousel.instance.swiper&&(clearInterval(e),this.swiper=this.carousel.instance.swiper,this.config&&this.options&&(this.options=L(L({},this.options),{},{on:{init:()=>{var e;const t=null===(e=this.carousel)||void 0===e||null===(e=e.swiper)||void 0===e?void 0:e.slides[0];if(t&&t.hasAttribute(D)){const e=O(N,t);e.length>0&&e.forEach(e=>{var t;e.isLoaded?e.options.autoplay?e.play():e.pause():1===(null===(t=this.carousel)||void 0===t||null===(t=t.swiper)||void 0===t?void 0:t.slides.length)?e.init():e.initWhenVisible()})}},slideChange:()=>{var e;const t=(null===(e=this.carousel)||void 0===e||null===(e=e.swiper)||void 0===e?void 0:e.activeIndex)||0,r=this.carousel.swiper.slides[t],i=this.carousel.swiper.slides.filter((e,r)=>r!==t);if(i.length>0&&i.forEach(e=>{if(e.hasAttribute(D)){const t=O(N,e);t.length>0&&t.forEach(e=>e.pause())}}),r&&r.hasAttribute(D)){const e=O(N,r);e.length>0&&e.forEach(e=>{e.isLoaded?e.options.autoplay?e.play():e.pause():e.initWhenVisible()})}}}}),this.instance=new C(this.carousel,this.options,this.config)))},100)}}customElements.get("hero-carousel")||customElements.define("hero-carousel",z)}};const t={};function r(i){const o=t[i];if(void 0!==o)return o.exports;const n=t[i]={exports:{}};return e[i](n,n.exports,r),n.exports}r.m=e,(()=>{const e=[];r.O=(t,i,o,n)=>{if(i){n=n||0;for(var s=e.length;s>0&&e[s-1][2]>n;s--)e[s]=e[s-1];return void(e[s]=[i,o,n])}let l=1/0;for(s=0;s<e.length;s++){let[i,o,n]=e[s],c=!0;for(var a=0;a<i.length;a++)(!1&n||l>=n)&&Object.keys(r.O).every(e=>r.O[e](i[a]))?i.splice(a--,1):(c=!1,n<l&&(l=n));if(c){e.splice(s--,1);const r=o();void 0!==r&&(t=r)}}return t}})(),r.d=(e,t)=>{if(Array.isArray(t))for(var i=0;i<t.length;){var o=t[i++],n=t[i++];r.o(e,o)?0===n&&i++:Object.defineProperty(e,o,0===n?{enumerable:!0,value:t[i++]}:{enumerable:!0,get:n})}else for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.j=3719,(()=>{const e={3719:0};r.O.j=t=>0===e[t];const t=(t,i)=>{let[o,n,s]=i;var l,a,c=0;if(o.some(t=>0!==e[t])){for(l in n)r.o(n,l)&&(r.m[l]=n[l]);if(s)var u=s(r)}for(t&&t(i);c<o.length;c++)r.o(e,a=o[c])&&e[a]&&e[a][0](),e[a]=0;return r.O(u)},i=self.webpackChunkgamma=self.webpackChunkgamma||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})();let i=r.O(void 0,[6979],()=>r(3951));i=r.O(i)})();
2//# sourceMappingURL=module-hero-carousel.js.map

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.