PageSourceSearch

https://www.accessorize.com/on/demandware.static/Sites-accessorize…/v1790316381825/js/product/imageCarousel.js

js accessorize.com collected 2026-09-25 15:04:51 UTC 11,336 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkmnsn=self.webpackChunkmnsn||[]).push([[4208,5275],{6692:function(e,t,i){i.r(t),i.d(t,{default:function(){return f}});var o=i(91076),n=i(16730),s=i(8207),r=i(43047);function l(e){return l="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},l(e)}function a(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,u(o.key),o)}}function u(e){var t=function(e){if("object"!=l(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=l(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==l(t)?t:t+""}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(h=function(){return!!e})()}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(u,e);var t,i,o=function(e){var t=h();return function(){var i,o=d(e);if(t){var n=d(this).constructor;i=Reflect.construct(o,arguments,n)}else i=o.apply(this,arguments);return function(e,t){if(t&&("object"==l(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,i)}}(u);function u(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),o.apply(this,arguments)}return t=u,i=[{key:"initCache",value:function(){this.prev=this.element.querySelector(r.CAROUSEL_PREV_SELECTOR),this.next=this.element.querySelector(r.CAROUSEL_NEXT_SELECTOR),this.bullets=this.element.querySelector(r.CAROUSEL_PAGINATION_SELECTOR),this.optionsDefault={modules:[n.Vx,n.dK,n.Ij,n.Jq],navigation:{nextEl:this.prev,prevEl:this.next},pagination:{el:this.bullets,type:"bullets",clickable:!0},watchOverflow:!0,on:{lock:this.lockCarousel.bind(this,!0),unlock:this.lockCarousel.bind(this,!1)},a11y:{prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide"}}}},{key:"bindEvents",value:function(){this.carousel.on("observerUpdate",this.onUpdate.bind(this)),s.J.on("update:carou
1sel",this.onUpdate,this),s.J.on("description:changed",this.onUpdate,this),s.J.on("rollover:toggle",this.toggleCarousel,this),s.J.on("rollover:state:closed",this.toggleCarousel,this)}},{key:"initState",value:function(){this.updateConfig(),this.carousel=this.createCarousel()}},{key:"createCarousel",value:function(){return new n.Ay(this.element,this.config)}},{key:"updateConfig",value:function(){this.options&&(this.config=Object.assign(this.optionsDefault,this.options.options))}},{key:"reInitCarousel",value:function(){this.carousel.destroy(),this.carousel=this.createCarousel()}},{key:"onUpdate",value:function(e){this.updateConfig(),this.carousel&&this.carousel.initialized&&this.reInitCarousel(),this.carousel.navigation.update(),this.carousel.pagination.render(),this.carousel.pagination.update(),!1!==e&&this.carousel.slideToLoop(0)}},{key:"onUpdated",value:function(){this.reInit()}},{key:"destroy",value:function(){this.carousel.initialized&&this.carousel.destroy(),this.carousel.off("observerUpdate",this.onUpdate),s.J.off("update:carou
1sel",this.onUpdate),s.J.off("description:changed",this.onUpdate)}},{key:"lockCarousel",value:function(e){this.element.classList.toggle("h-swiper-locked",e)}},{key:"toggleCarousel",value:function(e){var t,i,o,n;e&&null!==(t=this.carousel)&&void 0!==t&&t.el.parentElement.classList.contains(r.CAROUSEL_RECOMMENDATIONS)?null!==(i=this.carousel)&&void 0!==i&&i.el.closest(r.ROLLOVER_ELEMENT_SELECTOR)||(null===(o=this.carousel)||void 0===o?void 0:o.el.closest(r.CAROUSEL_RECOMMENDATIONS_SELECTOR))!==e.target.closest(r.CAROUSEL_RECOMMENDATIONS_SELECTOR)||this.carousel.disable():null!==(n=this.carousel)&&void 0!==n&&n.el.closest(r.CAROUSEL_RECOMMENDATIONS_SELECTOR)&&this.carousel.enable()}}],i&&a(t.prototype,i),Object.defineProperty(t,"prototype",{writable:!1}),u}(o.A)},21637:function(e,t,i){i.r(t),i.d(t,{default:function(){return b}});var o=i(6692),n=i(57128),s=i(8207),r=i(75451),l=i(44396),a=i(43047),u=i(6554);function c(e){return c="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},c(e)}function h(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,d(o.key),o)}}function d(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=c(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,i){var o=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=v(e)););return e}(e,t);if(o){var n=Object.getOwnPropertyDescriptor(o,t);return n.get?n.get.call(arguments.length<3?e:i):n.value}},f.apply(null,arguments)}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(p=function(){return!!e})()}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(d,e);var t,i,o=function(e){var t=p();return function(){var i,o=v(e);if(t){var n=v(this).constructor;i=Reflect.construct(o,arguments,n)}else i=o.apply(this,arguments);return function(e,t){if(t&&("object"==c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,i)}}(d);function d(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),o.apply(this,arguments)}return t=d,(i=[{key:"initCache",value:function(){f(v(d.prototype),"initCache",this).call(this),this.carouselEvents(),this.debounceTime=300,this.videoPips=this.element.querySelector(a.CAROUSEL_VIDEO_PIPS_SELECTOR),this.videoPlayer=this.element.querySelector(a.VIDEO_PLAYER_SELECTOR)}},{key:"initState",value:function(){if(u.B.is("medium only"))return!1;f(v(d.prototype),"initState",this).call(this),this.hasVideoPlayed=!1,this.isReadyToPlay=!1,this.isZoomActive=!1,this.handleScroll=(0,l.s)(this.handleCarouselScroll.bind(this),this.debounceTime)}},{key:"afterInit",value:function(){if(this.options.isVideo&&this.carousel&&"thumbs"in this.carousel&&this.carousel.thumbs.swiper){var e=this.carousel.thumbs.swiper.el;e&&(this.selectors.videoPlayer=e.querySelector(a.VIDEO_PLAYER_SELECTOR),this.selectors.videoPlayer&&(0,r.on)("ended",this.selectors.videoPlayer,this.onEnd.bind(this)))}}},{key:"onEnd",value:function(){this.hasVideoPlayed=!1}
1},{key:"createCarousel",value:function(){if(this.config.thumbsConfiguration){var e=this.createThumbs();this.config=Object.assign(this.config,{thumbs:{swiper:e}})}return new n.A(this.element,this.config)}},{key:"createThumbs",value:function(){return new n.A(a.SWIPER_CUSTOM_PAGINATION_CONTAINER_SELECTOR,this.config.thumbsConfiguration)}},{key:"bindEvents",value:function(){if(u.B.is("medium only"))return!1;f(v(d.prototype),"bindEvents",this).call(this),this.carouselEvents(),(0,r.on)("click",this.videoPips,this.scroll.bind(this)),this.videoPlayer&&(0,r.on)("loadeddata",this.videoPlayer,this.onUpdate.bind(this)),u.B.is("small only")||(0,r.on)("load",window,function(){s.J.emit("update:carousel")})}},{key:"handleCarouselScroll",value:function(){this.options.isVideo&&(this.slideActive=this.getActiveSlide(),this.isVideoSlide=this.slideActive?this.slideActive.querySelector(a.VIDEO_SELECTOR):null,this.isVideoSlide||this.hasVideoPlayed||(this.isReadyToPlay=!0),this.isVideoSlide&&!this.hasVideoPlayed&&this.isReadyToPlay&&(s.J.emit("video:play",{source:"imageCarouselScroll"}),this.hasVideoPlayed=!0,this.isReadyToPlay=!1),!this.isVideoSlide&&this.hasVideoPlayed&&(s.J.emit("video:stop"),this.hasVideoPlayed=!1,this.isReadyToPlay=!0))}},{key:"carouselEvents",value:function(){this.optionsDefault.on.setTranslate=this.setTranslate,this.optionsDefault.on.slideChangeTransitionStart=this.onChangeStart.bind(this),this.optionsDefault.on.slideChangeTransitionEnd=this.onChangeEnd.bind(this),this.optionsDefault.on.scroll=this.handleScroll}},{key:"setTranslate",value:function(){s.J.emit("image:carousel:scroll")}},{key:"getActiveSlide",value:function(){return this.element.querySelector(a.CAROUSEL_SLIDE_ACTIVE_SELECTOR)}},{key:"onChangeStart",value:function(){this.isZoomActive=this.element.querySelector(a.ZOOM_WRAP_SELECTOR),this.slideActive=this.getActiveSlide(),this.isVideoSlide=this.slideActive?this.slideActive.querySelector(a.VIDEO_SELECTOR):null,this.isZoomActive&&s.J.emit("zoom:close"),this.options.isVideo&&!this.hasVideoPlayed&&this.isVideoSlide&&(s.J.emit("video:play"),this.hasVideoPlayed=!0,this.hideElement(this.bullets))}},{key:"onChangeEnd",value:function(){s.J.emit("tile.image:updated",this.slideActive),this.options.isVideo&&this.hasVideoPlayed&&!this.isVideoSlide&&(s.J.emit("video:stop"),this.hasVideoPlayed=!1,this.showElement(this.bullets))}},{key:"scroll",value:function(){this.carousel.slideToLoop(this.options.videoIndex-1)}},{key:"onUpdated",value:function(){if(u.B.is("medium only"))return!1;f(v(d.prototype),"onUpdate",this).call(this),this.carouselEvents(),this.options.isVideo&&this.hasVideoPlayed&&(s.J.emit("video:stop"),this.hasVideoPlayed=!1)}},{key:"destroy",value:function(){f(v(d.prototype),"destroy",this).call(this),this.carousel.off("slideChangeTransitionStart",this.onChangeStart),this.carousel.off("slideChangeTransitionEnd",this.onChangeEnd),this.carousel.off("scroll",this.handleScroll),this.videoPips&&(0,r.AU)("click",this.videoPips,this.scroll),this.selectors.videoPlayer&&(0,r.AU)("ended",this.selectors.videoPlayer,this.onEnd),this.videoPlayer&&(0,r.AU)("loadeddata",this.videoPlayer,this.onUpdate)}}])&&h(t.prototype,i),Object.defineProperty(t,"prototype",{writable:!1}),d}(o.default)}}]);

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.