1(function(__wpcc){__wpcc.d=__wpcc.d||{},__wpcc.d.scope={},__wpcc.d.createTemplateTagFirstArg=function(a){return a.raw=a},__wpcc.d.createTemplateTagFirstArgWithRaw=function(a,b){return a.raw=b,a},__wpcc.d.getGlobal=function(a){a=[typeof globalThis=="object"&&globalThis,a,typeof window=="object"&&window,typeof self=="object"&&self,typeof global=="object"&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object")},__wpcc.d.global=__wpcc.d.getGlobal(this);var g;typeof g=="undefined"&&(g=function(){}),g.p=""}).call(window,window.__wpcc=window.__wpcc||{}),(function(__wpcc){var r=function(a){return h?a instanceof HTMLElement:a&&typeof a=="object"&&a!==null&&a.nodeType===1&&typeof a.nodeName=="string"},t=function(a,b){b.forEach(function(c){a.classList.add(c)})},u=function(a,b){b.forEach(function(c){a.classList.remove(c)})},x=function(){throw Error("Missing parameter")},y=function(a){this.isShowing=!1;var b=a.namespace===void 0?null:a.namespace,c=a.zoomFactor===void 0?x():a.zoomFactor;a=a.containerEl===void 0?x():a.containerEl,this.settings={namespace:b,zoomFactor:c,containerEl:a},this.openClasses=this._buildClasses("open"),this._buildElement()},z=function(a){a=a===void 0?{}:a,this._show=this._show.bind(this),this._hide=this._hide.bind(this),this._handleEntry=this._handleEntry.bind(this),this._handleMovement=this._handleMovement.bind(this);var b=a.el===void 0?x():a.el,c=a.zoomPane===void 0?x():a.zoomPane,e=a.sourceAttribute===void 0?x():a.sourceAttribute,f=a.handleTouch===void 0?x():a.handleTouch,q=a.onShow===void 0?null:a.onShow,k=a.onHide===void 0?null:a.onHide,v=a.hoverDelay===void 0?0:a.hoverDelay,w=a.touchDelay===void 0?0:a.touchDelay,l=a.hoverBoundingBox===void 0?x():a.hoverBoundingBox,m=a.touchBoundingBox===void 0?x():a.touchBoundingBox,n=a.namespace===void 0?null:a.namespace,p=a.zoomFactor===void 0?x():a.zoomFactor,B=a.boundingBoxContainer===void 0?x():a.boundingBoxContainer;this.settings={el:b,zoomPane:c,sourceAttribute:e,handleTouch:f,onShow:q,onHide:k,hoverDelay:v,touchDelay:w,hoverBoundingBox:l,touchBoundingBox:m,namespace:n,zoomFactor:p,boundingBoxContainer:B,passive:a.passive===void 0?!1:a.passive},(this.settings.hoverBoundingBox||this.settings.touchBoundingBox)&&(this.boundingBox=new y({namespace:this.settings.namespace,zoomFactor:this.settings.zoomFactor,containerEl:this.settings.boundingBoxContainer})),this.enabled=!0,this._bindEvents()},A=function(a){if(a=a===void 0?{}:a,this.HAS_ANIMATION=!1,typeof document!="undefined"){var b=document.createElement("div").style;this.HAS_ANIMATION="animation"in b||"webkitAnimation"in b}this._completeShow=this._completeShow.bind(this),this._completeHide=this._completeHide.bind(this),this._handleLoad=this._handleLoad.bind(this),this.isShowing=!1,b=a.container===void 0?null:a.container;var c=a.zoomFactor===void 0?x():a.zoomFactor,e=a.inline===void 0?x():a.inline,f=a.namespace===void 0?null:a.namespace,q=a.showWhitespaceAtEdges===void 0?x():a.showWhitespaceAtEdges,k=a.containInline===void 0?x():a.containInline;this.settings={container:b,zoomFactor:c,inline:e,namespace:f,showWhitespaceAtEdges:q,containInline:k,inlineOffsetX:a.inlineOffsetX===void 0?0:a.inlineOffsetX,inlineOffsetY:a.inlineOffsetY===void 0?0:a.inlineOffsetY,inlineContainer:a.inlineContainer===void 0?document.body:a.inlineContainer},this.openClasses=this._buildClasses("open"),this.openingClasses=this._buildClasses("opening"),this.closingClasses=this._buildClasses("closing"),this.inlineClasses=this._buildClasses("inline"),this.loadingClasses=this._buildClasses("loading"),this._buildElement()},C=function(a,b){if(b=b===void 0?{}:b,this.VERSION="1.5.1",this.triggerEl=a,this.destroy=this.destroy.bind(this),!r(this.triggerEl))throw new TypeError("`new Drift` requires a DOM element as its first argument.");a=b.namespace||null;var c=b.showWhitespaceAtEdges||!1,e=b.containInline||!1,f=b.inlineOffsetX||0,q=b.inlineOffsetY||0,k=b.inlineContainer||document.body,v=b.sourceAttribute||"data-zoom",w=b.zoomFactor||3,l=b.paneContainer===void 0?document.body:b.paneContainer,m=b.inlinePane||375,n="handleTouch"in b?!!b.handleTouch:!0,p=b.onShow||null,B=b.onHide||null,D="injectBaseStyles"in b?!!b.injectBaseStyles:!0,E=b.hoverDelay||0,F=b.touchDelay||0,G=b.hoverBoundingBox||!1,H=b.touchBoundingBox||!1,I=b.boundingBoxContainer||document.body;if(b=b.passive||!1,m!==!0&&!r(l))throw new TypeError("`paneContainer` must be a DOM element when `inl
1inePane !== true`");if(!r(k))throw new TypeError("`inlineContainer` must be a DOM element");this.settings={namespace:a,showWhitespaceAtEdges:c,containInline:e,inlineOffsetX:f,inlineOffsetY:q,inlineContainer:k,sourceAttribute:v,zoomFactor:w,paneContainer:l,inlinePane:m,handleTouch:n,onShow:p,onHide:B,injectBaseStyles:D,hoverDelay:E,touchDelay:F,hoverBoundingBox:G,touchBoundingBox:H,boundingBoxContainer:I,passive:b},this.settings.injectBaseStyles&&!document.querySelector(".drift-base-styles")&&(b=document.createElement("style"),b.type="text/css",b.classList.add("drift-base-styles"),b.appendChild(document.createTextNode(".drift-bounding-box,.drift-zoom-pane{position:absolute;pointer-events:none}@keyframes noop{0%{zoom:1}}@-webkit-keyframes noop{0%{zoom:1}}.drift-zoom-pane.drift-open{display:block}.drift-zoom-pane.drift-closing,.drift-zoom-pane.drift-opening{animation:noop 1ms;-webkit-animation:noop 1ms}.drift-zoom-pane{overflow:hidden;width:100%;height:100%;top:0;left:0}.drift-zoom-pane-loader{display:none}.drift-zoom-pane img{position:absolute;display:block;max-width:none;max-height:none}")),a=document.head,a.insertBefore(b,a.firstChild)),this._buildZoomPane(),this._buildTrigger()},h=typeof HTMLElement=="object";y.prototype._buildClasses=function(a){var b=["drift-"+a],c=this.settings.namespace;return c&&b.push(c+"-"+a),b},y.prototype._buildElement=function(){this.el=document.createElement("div"),t(this.el,this._buildClasses("bounding-box"))},y.prototype.show=function(a,b){this.isShowing=!0,this.settings.containerEl.appendChild(this.el);var c=this.el.style;c.width=Math.round(a/this.settings.zoomFactor)+"px",c.height=Math.round(b/this.settings.zoomFactor)+"px",t(this.el,this.openClasses)},y.prototype.hide=function(){this.isShowing&&this.settings.containerEl.removeChild(this.el),this.isShowing=!1,u(this.el,this.openClasses)},y.prototype.setPosition=function(a,b,c){var e=window.pageXOffset,f=window.pageYOffset;a=c.left+a*c.width-this.el.clientWidth/2+e,b=c.top+b*c.height-this.el.clientHeight/2+f,a<c.left+e?a=c.left+e:a+this.el.clientWidth>c.left+c.width+e&&(a=c.left+c.width-this.el.clientWidth+e),b<c.top+f?b=c.top+f:b+this.el.clientHeight>c.top+c.height+f&&(b=c.top+c.height-this.el.clientHeight+f),this.el.style.left=a+"px",this.el.style.top=b+"px"},z.prototype._preventDefault=function(a){a.preventDefault()},z.prototype._preventDefaultAllowTouchScroll=function(a){this.settings.touchDelay&&this._isTouchEvent(a)&&!this.isShowing||a.preventDefault()},z.prototype._isTouchEvent=function(a){return!!a.touches},z.prototype._bindEvents=function(){this.settings.el.addEventListener("mouseenter",this._handleEntry),this.settings.el.addEventListener("mouseleave",this._hide),this.settings.el.addEventListener("mousemove",this._handleMovement);var a={passive:this.settings.passive};this.settings.handleTouch?(this.settings.el.addEventListener("touchstart",this._handleEntry,a),this.settings.el.addEventListener("touchend",this._hide),this.settings.el.addEventListener("touchmove",this._handleMovement,a)):(this.settings.el.addEventListener("touchstart",this._preventDefault,a),this.settings.el.addEventListener("touchend",this._preventDefault),this.settings.el.addEventListener("touchmove",this._preventDefault,a))},z.prototype._unbindEvents=function(){this.settings.el.removeEventListener("mouseenter",this._handleEntry),this.settings.el.removeEventListener("mouseleave",this._hide),this.settings.el.removeEventListener("mousemove",this._handleMovement),this.settings.handleTouch?(this.settings.el.removeEventListener("touchstart",this._handleEntry),this.settings.el.removeEventListener("touchend",this._hide),this.settings.el.removeEventListener("touchmove",this._handleMovement)):(this.settings.el.removeEventListener("touchstart",this._preventDefault),this.settings.el.removeEventListener("touchend",this._preventDefault),this.settings.el.removeEventListener("touchmove",this._preventDefault))},z.prototype._handleEntry=function(a){this._preventDefaultAllowTouchScroll(a),this._lastMovement=a,a.type=="mouseenter"&&this.settings.hoverDelay?this.entryTimeout=setTimeout(this._show,this.settings.hoverDelay):this.settings.touchDelay?this.entryTimeout=setTimeout(this._show,this.settings.touchDelay):this._show()},z.prototype._show=function(){if(this.enabled){var a=this.settings.onShow;a&&typeof a=="function"&&a(),this.settings.zoomPane.show(this.settings.el.getAttribute(this.settings.sourceAttribute),this.settings.el.clientWidth,this.settings.el.clientHeight),this._lastMovement&&((a=this._lastMovement.touches)&&this.settings.touchBoundingBox||!a&&this.settings.hoverBoundingBox)&&this.boundingBox.show(this.settings.zoomPane.el.clientWidth,this.settings.zoomPane.el.clientHeight),this._handleMovement()}},z.prototype._hide=function(a){a&&this._preventDefaultAllowTouchScroll(a),this._lastMovement=null,this.entryTimeout&&clearTimeout(this.entryTimeout),this.boundingBox&&this.boundingBox.hide(),(a=this.settings.onHide)&&t
1ypeof a=="function"&&a(),this.settings.zoomPane.hide()},z.prototype._handleMovement=function(a){if(a)this._preventDefaultAllowTouchScroll(a),this._lastMovement=a;else if(this._lastMovement)a=this._lastMovement;else return;if(a.touches){a=a.touches[0];var b=a.clientX,c=a.clientY}else b=a.clientX,c=a.clientY;a=this.settings.el.getBoundingClientRect(),b=(b-a.left)/this.settings.el.clientWidth,c=(c-a.top)/this.settings.el.clientHeight,this.boundingBox&&this.boundingBox.setPosition(b,c,a),this.settings.zoomPane.setPosition(b,c,a)},__wpcc.d.global.Object.defineProperties(z.prototype,{isShowing:{configurable:!0,enumerable:!0,get:function(){return this.settings.zoomPane.isShowing}}}),A.prototype._buildClasses=function(a){var b=["drift-"+a],c=this.settings.namespace;return c&&b.push(c+"-"+a),b},A.prototype._buildElement=function(){this.el=document.createElement("div"),t(this.el,this._buildClasses("zoom-pane"));var a=document.createElement("div");t(a,this._buildClasses("zoom-pane-loader")),this.el.appendChild(a),this.imgEl=document.createElement("img"),this.el.appendChild(this.imgEl)},A.prototype._setImageURL=function(a){this.imgEl.setAttribute("src",a)},A.prototype._setImageSize=function(a,b){this.imgEl.style.width=a*this.settings.zoomFactor+"px",this.imgEl.style.height=b*this.settings.zoomFactor+"px"},A.prototype.setPosition=function(a,b,c){var e=this.imgEl.offsetWidth,f=this.imgEl.offsetHeight,q=this.el.offsetWidth,k=this.el.offsetHeight,v=q/2-e*a,w=k/2-f*b,l=q-e,m=k-f,n=0<l,p=0<m;f=n?l/2:0,e=p?m/2:0,l=n?l/2:l,m=p?m/2:m,this.el.parentElement===this.settings.inlineContainer&&(p=window.pageXOffset,n=window.pageYOffset,a=c.left+a*c.width-q/2+this.settings.inlineOffsetX+p,b=c.top+b*c.height-k/2+this.settings.inlineOffsetY+n,this.settings.containInline&&(a<c.left+p?a=c.left+p:a+q>c.left+c.width+p&&(a=c.left+c.width-q+p),b<c.top+n?b=c.top+n:b+k>c.top+c.height+n&&(b=c.top+c.height-k+n)),this.el.style.left=a+"px",this.el.style.top=b+"px"),this.settings.showWhitespaceAtEdges||(v>f?v=f:v<l&&(v=l),w>e?w=e:w<m&&(w=m)),this.imgEl.style.transform="translate("+v+"px, "+w+"px)",this.imgEl.style.webkitTransform="translate("+v+"px, "+w+"px)"},A.prototype._removeListenersAndResetClasses=function(){this.el.removeEventListener("animationend",this._completeShow),this.el.removeEventListener("animationend",this._completeHide),this.el.removeEventListener("webkitAnimationEnd",this._completeShow),this.el.removeEventListener("webkitAnimationEnd",this._completeHide),u(this.el,this.openClasses),u(this.el,this.closingClasses)},A.prototype.show=function(a,b,c){this._removeListenersAndResetClasses(),this.isShowing=!0,t(this.el,this.openClasses),this.imgEl.getAttribute("src")!=a&&(t(this.el,this.loadingClasses),this.imgEl.addEventListener("load",this._handleLoad),this._setImageURL(a)),this._setImageSize(b,c),this._isInline?this._showInline():this._showInContainer(),this.HAS_ANIMATION&&(this.el.addEventListener("animationend",this._completeShow),this.el.addEventListener("webkitAnimationEnd",this._completeShow),t(this.el,this.openingClasses))},A.prototype._showInline=function(){this.settings.inlineContainer.appendChild(this.el),t(this.el,this.inlineClasses)},A.prototype._showInContainer=function(){this.settings.container.appendChild(this.el)},A.prototype.hide=function(){this._removeListenersAndResetClasses(),this.isShowing=!1,this.HAS_ANIMATION?(this.el.addEventListener("animationend",this._completeHide),this.el.addEventListener("webkitAnimationEnd",this._completeHide),t(this.el,this.closingClasses)):(u(this.el,this.openClasses),u(this.el,this.inlineClasses))},A.prototype._completeShow=function(){this.el.removeEventListener("animationend",this._completeShow),this.el.removeEventListener("webkitAnimationEnd",this._completeShow),u(this.el,this.openingClasses)},A.prototype._completeHide=function(){this.el.removeEventListener("animationend",this._completeHide),this.el.removeEventListener("webkitAnimationEnd",this._completeHide),u(this.el,this.openClasses),u(this.el,this.closingClasses),u(this.el,this.inlineClasses),this.el.style.left="",this.el.style.top="",this.el.parentElement===this.settings.container?this.settings.container.removeChild(this.el):this.el.parentElement===this.settings.inlineContainer&&this.settings.inlineContainer.removeChild(this.el)}
1,A.prototype._handleLoad=function(){this.imgEl.removeEventListener("load",this._handleLoad),u(this.el,this.loadingClasses)},__wpcc.d.global.Object.defineProperties(A.prototype,{_isInline:{configurable:!0,enumerable:!0,get:function(){var a=this.settings.inline;return a===!0||typeof a=="number"&&window.innerWidth<=a}}}),C.prototype._buildZoomPane=function(){this.zoomPane=new A({container:this.settings.paneContainer,zoomFactor:this.settings.zoomFactor,showWhitespaceAtEdges:this.settings.showWhitespaceAtEdges,containInline:this.settings.containInline,inline:this.settings.inlinePane,namespace:this.settings.namespace,inlineOffsetX:this.settings.inlineOffsetX,inlineOffsetY:this.settings.inlineOffsetY,inlineContainer:this.settings.inlineContainer})},C.prototype._buildTrigger=function(){this.trigger=new z({el:this.triggerEl,zoomPane:this.zoomPane,handleTouch:this.settings.handleTouch,onShow:this.settings.onShow,onHide:this.settings.onHide,sourceAttribute:this.settings.sourceAttribute,hoverDelay:this.settings.hoverDelay,touchDelay:this.settings.touchDelay,hoverBoundingBox:this.settings.hoverBoundingBox,touchBoundingBox:this.settings.touchBoundingBox,namespace:this.settings.namespace,zoomFactor:this.settings.zoomFactor,boundingBoxContainer:this.settings.boundingBoxContainer,passive:this.settings.passive})},C.prototype.setZoomImageURL=function(a){this.zoomPane._setImageURL(a)},C.prototype.disable=function(){this.trigger.enabled=!1},C.prototype.enable=function(){this.trigger.enabled=!0},C.prototype.destroy=function(){this.trigger._hide(),this.trigger._unbindEvents()},__wpcc.d.global.Object.defineProperties(C.prototype,{isShowing:{configurable:!0,enumerable:!0,get:function(){return this.zoomPane.isShowing}},zoomFactor:{configurable:!0,enumerable:!0,get:function(){return this.settings.zoomFactor},set:function(a){this.settings.zoomFactor=a,this.zoomPane.settings.zoomFactor=a,this.trigger.settings.zoomFactor=a,this.boundingBox.settings.zoomFactor=a}}}),Object.defineProperty(C.prototype,"isShowing",{get:function(){return this.isShowing}}),Object.defineProperty(C.prototype,"zoomFactor",{get:function(){return this.zoomFactor},set:function(a){this.zoomFactor=a}}),C.prototype.setZoomImageURL=C.prototype.setZoomImageURL,C.prototype.disable=C.prototype.disable,C.prototype.enable=C.prototype.enable,C.prototype.destroy=C.prototype.destroy,window.Drift=C}).call(window,window.__wpcc=window.__wpcc||{});export default window.Drift; 2//# sourceMappingURL=/cdn/shop/t/68/assets/vendor.drift-zoom.js.map?v=58010873367620907491785919691
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.