PageSourceSearch

https://www.berresbrothers.com/cdn/shop/t/51/assets/theme.js?v=113943240014183885911778488306

js berresbrothers.com collected 2026-09-26 16:01:41 UTC 303,440 bytes, 44 lines download raw bytes

1var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__typeError=msg=>{throw TypeError(msg)},__commonJS=(cb,mod)=>function(){return mod||(0,cb[__getOwnPropNames(cb)[0]])((mod={exports:{}}).exports,mod),mod.exports},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toESM=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__accessCheck=(obj,member,msg)=>member.has(obj)||__typeError("Cannot "+msg),__privateGet=(obj,member,getter)=>(__accessCheck(obj,member,"read from private field"),getter?getter.call(obj):member.get(obj)),__privateAdd=(obj,member,value)=>member.has(obj)?__typeError("Cannot add the same private member more than once"):member instanceof WeakSet?member.add(obj):member.set(obj,value),__privateSet=(obj,member,value,setter)=>(__accessCheck(obj,member,"write to private field"),setter?setter.call(obj,value):member.set(obj,value),value),__privateMethod=(obj,member,method)=>(__accessCheck(obj,member,"access private method"),method),require_fastdom=__commonJS({"node_modules/fastdom/fastdom.js"(exports,module){(function(win){"use strict";var debug=function(){},raf=win.requestAnimationFrame||win.webkitRequestAnimationFrame||win.mozRequestAnimationFrame||win.msRequestAnimationFrame||function(cb){return setTimeout(cb,16)};function FastDom(){var self=this;self.reads=[],self.writes=[],self.raf=raf.bind(win),debug("initialized",self)}FastDom.prototype={constructor:FastDom,runTasks:function(tasks){debug("run tasks");for(var task;task=tasks.shift();)task()},measure:function(fn,ctx){debug("measure");var task=ctx?fn.bind(ctx):fn;return this.reads.push(task),scheduleFlush(this),task},mutate:function(fn,ctx){debug("mutate");var task=ctx?fn.bind(ctx):fn;return this.writes.push(task),scheduleFlush(this),task},clear:function(task){return debug("clear",task),remove(this.reads,task)||remove(this.writes,task)},extend:function(props){if(debug("extend",props),typeof props!="object")throw new Error("expected object");var child=Object.create(this);return mixin(child,props),child.fastdom=this,child.initialize&&child.initialize(),child},catch:null};function scheduleFlush(fastdom6){fastdom6.scheduled||(fastdom6.scheduled=!0,fastdom6.raf(flush.bind(null,fastdom6)),debug("flush scheduled"))}function flush(fastdom6){debug("flush");var writes=fastdom6.writes,reads=fastdom6.reads,error;try{debug("flushing reads",reads.length),fastdom6.runTasks(reads),debug("flushing writes",writes.length),fastdom6.runTasks(writes)}catch(e){error=e}if(fastdom6.scheduled=!1,(reads.length||writes.length)&&scheduleFlush(fastdom6),error)if(debug("task errored",error.message),fastdom6.catch)fastdom6.catch(error);else throw error}function remove(array,item){var index=array.indexOf(item);return!!~index&&!!array.splice(index,1)}function mixin(target,source){for(var key in source)source.hasOwnProperty(key)&&(target[key]=source[key])}var exports2=win.fastdom=win.fastdom||new FastDom;typeof define=="function"?define(function(){return exports2}):typeof module=="object"&&(module.exports=exports2)})(typeof window<"u"?window:typeof exports<"u"?exports:globalThis)}}),require_ev_emitter=__commonJS({"node_modules/ev-emitter/ev-emitter.js"(exports,module){(function(global,factory){typeof define=="function"&&define.amd?define(factory):typeof module=="object"&&module.exports?module.exports=factory():global.EvEmitter=factory()})(typeof window<"u"?window:exports,function(){"use strict";function EvEmitter(){}var proto=EvEmitter.prototype;return proto.on=function(eventName,listener){if(!(!eventName||!listener)){var events=this._events=this._events||{},listeners=events[eventName]=events[eventName]||[];return listeners.indexOf(listener)==-1&&listeners.push(listener),this}},proto.once=function(eventName,listener){if(!(!eventName||!listener)){this.on(eventName,listener);var onceEvents=this._onceEvents=this._onceEvents||{}
1,onceListeners=onceEvents[eventName]=onceEvents[eventName]||{};return onceListeners[listener]=!0,this}},proto.off=function(eventName,listener){var listeners=this._events&&this._events[eventName];if(!(!listeners||!listeners.length)){var index=listeners.indexOf(listener);return index!=-1&&listeners.splice(index,1),this}},proto.emitEvent=function(eventName,args){var listeners=this._events&&this._events[eventName];if(!(!listeners||!listeners.length)){listeners=listeners.slice(0),args=args||[];for(var onceListeners=this._onceEvents&&this._onceEvents[eventName],i=0;i<listeners.length;i++){var listener=listeners[i],isOnce=onceListeners&&onceListeners[listener];isOnce&&(this.off(eventName,listener),delete onceListeners[listener]),listener.apply(this,args)}return this}},proto.allOff=function(){delete this._events,delete this._onceEvents},EvEmitter})}}),require_get_size=__commonJS({"node_modules/get-size/get-size.js"(exports,module){(function(window2,factory){typeof define=="function"&&define.amd?define(factory):typeof module=="object"&&module.exports?module.exports=factory():window2.getSize=factory()})(window,function(){"use strict";function getStyleSize(value){var num=parseFloat(value),isValid=value.indexOf("%")==-1&&!isNaN(num);return isValid&&num}function noop(){}var logError=typeof console>"u"?noop:function(message){console.error(message)},measurements=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],measurementsLength=measurements.length;function getZeroSize(){for(var size={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},i=0;i<measurementsLength;i++){var measurement=measurements[i];size[measurement]=0}return size}function getStyle(elem){var style=getComputedStyle(elem);return style||logError("Style returned "+style+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),style}var isSetup=!1,isBoxSizeOuter;function setup(){if(!isSetup){isSetup=!0;var div=document.createElement("div");div.style.width="200px",div.style.padding="1px 2px 3px 4px",div.style.borderStyle="solid",div.style.borderWidth="1px 2px 3px 4px",div.style.boxSizing="border-box";var body=document.body||document.documentElement;body.appendChild(div);var style=getStyle(div);isBoxSizeOuter=Math.round(getStyleSize(style.width))==200,getSize.isBoxSizeOuter=isBoxSizeOuter,body.removeChild(div)}}function getSize(elem){if(setup(),typeof elem=="string"&&(elem=document.querySelector(elem)),!(!elem||typeof elem!="object"||!elem.nodeType)){var style=getStyle(elem);if(style.display=="none")return getZeroSize();var size={};size.width=elem.offsetWidth,size.height=elem.offsetHeight;for(var isBorderBox=size.isBorderBox=style.boxSizing=="border-box",i=0;i<measurementsLength;i++){var measurement=measurements[i],value=style[measurement],num=parseFloat(value);size[measurement]=isNaN(num)?0:num}var paddingWidth=size.paddingLeft+size.paddingRight,paddingHeight=size.paddingTop+size.paddingBottom,marginWidth=size.marginLeft+size.marginRight,marginHeight=size.marginTop+size.marginBottom,borderWidth=size.borderLeftWidth+size.borderRightWidth,borderHeight=size.borderTopWidth+size.borderBottomWidth,isBorderBoxSizeOuter=isBorderBox&&isBoxSizeOuter,styleWidth=getStyleSize(style.width);styleWidth!==!1&&(size.width=styleWidth+(isBorderBoxSizeOuter?0:paddingWidth+borderWidth));var styleHeight=getStyleSize(style.height);return styleHeight!==!1&&(size.height=styleHeight+(isBorderBoxSizeOuter?0:paddingHeight+borderHeight)),size.innerWidth=size.width-(paddingWidth+borderWidth),size.innerHeight=size.height-(paddingHeight+borderHeight),size.outerWidth=size.width+marginWidth,size.outerHeight=size.height+marginHeight,size}}return getSize})}}),require_matches_selector=__commonJS({"node_modules/desandro-matches-selector/matches-selector.js"(exports,module){(function(window2,factory){"use strict";typeof define=="function"&&define.amd?define(factory):typeof module=="object"&&module.exports?module.exports=factory():window2.matchesSelector=factory()})(window,function(){"use strict";var matchesMethod=(function(){var ElemProto=window.Element.prototype;if(ElemProto.matches)return"matches";if(ElemProto.matchesSelector)return"matchesSelector";for(var prefixes=["webkit","moz","ms","o"],i=0;i<prefixes.length;i++){var prefix=prefixes[i],method=prefix+"MatchesSelector";if(ElemProto[method])return method}})();return function(elem,selector){return elem[matchesMethod](selector)}})}}),require_utils=__commonJS({"node_modules/fizzy-ui-utils/utils.js"(exports,module){(function(window2,factory){typeof define=="function"&&define.amd?define(["desandro-matches-selector/matches-selector"],function(matchesSelector){return factory(window2,matchesSelector)}):typeof module=="object"&&module.exports?module.exports=factory(window2,require_matches_selector()):window2.fizzyUIUtils=factory(window2,window2.matchesSelector)})(window,function(window2,matchesSelector){"use strict";var utils={};utils.extend=function(a,b){for(var prop in b)a[prop]=b[prop];return a},utils.modulo=function(num,div){return(num%div+div)%div};var arraySlice=Array.prototype.slice;
1utils.makeArray=function(obj){if(Array.isArray(obj))return obj;if(obj==null)return[];var isArrayLike=typeof obj=="object"&&typeof obj.length=="number";return isArrayLike?arraySlice.call(obj):[obj]},utils.removeFrom=function(ary,obj){var index=ary.indexOf(obj);index!=-1&&ary.splice(index,1)},utils.getParent=function(elem,selector){for(;elem.parentNode&&elem!=document.body;)if(elem=elem.parentNode,matchesSelector(elem,selector))return elem},utils.getQueryElement=function(elem){return typeof elem=="string"?document.querySelector(elem):elem},utils.handleEvent=function(event2){var method="on"+event2.type;this[method]&&this[method](event2)},utils.filterFindElements=function(elems,selector){elems=utils.makeArray(elems);var ffElems=[];return elems.forEach(function(elem){if(elem instanceof HTMLElement){if(!selector){ffElems.push(elem);return}matchesSelector(elem,selector)&&ffElems.push(elem);for(var childElems=elem.querySelectorAll(selector),i=0;i<childElems.length;i++)ffElems.push(childElems[i])}}),ffElems},utils.debounceMethod=function(_class,methodName,threshold){threshold=threshold||100;var method=_class.prototype[methodName],timeoutName=methodName+"Timeout";_class.prototype[methodName]=function(){var timeout=this[timeoutName];clearTimeout(timeout);var args=arguments,_this=this;this[timeoutName]=setTimeout(function(){method.apply(_this,args),delete _this[timeoutName]},threshold)}},utils.docReady=function(callback){var readyState=document.readyState;readyState=="complete"||readyState=="interactive"?setTimeout(callback):document.addEventListener("DOMContentLoaded",callback)},utils.toDashed=function(str){return str.replace(/(.)([A-Z])/g,function(match,$1,$2){return $1+"-"+$2}).toLowerCase()};var console2=window2.console;return utils.htmlInit=function(WidgetClass,namespace){utils.docReady(function(){var dashedNamespace=utils.toDashed(namespace),dataAttr="data-"+dashedNamespace,dataAttrElems=document.querySelectorAll("["+dataAttr+"]"),jsDashElems=document.querySelectorAll(".js-"+dashedNamespace),elems=utils.makeArray(dataAttrElems).concat(utils.makeArray(jsDashElems)),dataOptionsAttr=dataAttr+"-options",jQuery=window2.jQuery;elems.forEach(function(elem){var attr=elem.getAttribute(dataAttr)||elem.getAttribute(dataOptionsAttr),options;try{options=attr&&JSON.parse(attr)}catch(error){console2&&console2.error("Error parsing "+dataAttr+" on "+elem.className+": "+error);return}var instance=new WidgetClass(elem,options);jQuery&&jQuery.data(elem,namespace,instance)})})},utils})}}),require_cell=__commonJS({"node_modules/flickity/js/cell.js"(exports,module){(function(window2,factory){typeof define=="function"&&define.amd?define(["get-size/get-size"],function(getSize){return factory(window2,getSize)}):typeof module=="object"&&module.exports?module.exports=factory(window2,require_get_size()):(window2.Flickity=window2.Flickity||{},window2.Flickity.Cell=factory(window2,window2.getSize))})(window,function(window2,getSize){"use strict";function Cell(elem,parent){this.element=elem,this.parent=parent,this.create()}var proto=Cell.prototype;return proto.create=function(){this.element.style.position="absolute",this.element.setAttribute("aria-hidden","true"),this.x=0,this.shift=0},proto.destroy=function(){this.unselect(),this.element.style.position="";var side=this.parent.originSide;this.element.style[side]="",this.element.removeAttribute("aria-hidden")},proto.getSize=function(){this.size=getSize(this.element)},proto.setPosition=function(x){this.x=x,this.updateTarget(),this.renderPosition(x)},proto.updateTarget=proto.setDefaultTarget=function(){var marginProperty=this.parent.originSide=="left"?"marginLeft":"marginRight";this.target=this.x+this.size[marginProperty]+this.size.width*this.parent.cellAlign},proto.renderPosition=function(x){var side=this.parent.originSide;this.element.style[side]=this.parent.getPositionValue(x)},proto.select=function(){this.element.classList.add("is-selected"),this.element.removeAttribute("aria-hidden")},proto.unselect=function(){this.element.classList.remove("is-selected"),this.element.setAttribute("aria-hidden","true")},proto.wrapShift=function(shift){this.shift=shift,this.renderPosition(this.x+this.parent.slideableWidth*shift)},proto.remove=function(){this.element.parentNode.removeChild(this.element)},Cell})}}),require_slide=__commonJS({"node_modules/flickity/js/slide.js"(exports,module){(function(window2,factory){typeof define=="function"&&define.amd?define(factory):typeof module=="object"&&module.exports?module.exports=factory():(window2.Flickity=window2.Flickity||{},window2.Flickity.Slide=factory())})(window,function(){"use strict";function Slide(parent){this.parent=parent,this.isOriginLeft=parent.originSide=="left",this.cells=[],this.outerWidth=0,this.height=0}var proto=Slide.prototype;return proto.addCell=function(cell){if(this.cells.push(cell),this.outerWidth+=cell.size.outerWidth,this.height=Math.max(cell.size.outerHeight,this.height),this.cells.length==1){this.x=cell.x;var beginMargin=this.isOriginLeft?"marginLeft":"marginRight";this.firstMargin=cell.size[beginMargin]}},proto.updateTarget=function(){var endMargin=this.isOriginLeft?"marginRight":"marginLeft",lastCell=this.getLastCell(),lastMargin=lastCell?lastCell.size[endMargin]:0,slideWidth=this.outerWidth-(this.firstMargin+lastMargin);this.target=this.x+this.firstMargin+slideWidth*this.parent.cellAlign},proto.getLastCell=function(){return this.cells[this.cells.length-1]}
1,proto.select=function(){this.cells.forEach(function(cell){cell.select()})},proto.unselect=function(){this.cells.forEach(function(cell){cell.unselect()})},proto.getCellElements=function(){return this.cells.map(function(cell){return cell.element})},Slide})}}),require_animate=__commonJS({"node_modules/flickity/js/animate.js"(exports,module){(function(window2,factory){typeof define=="function"&&define.amd?define(["fizzy-ui-utils/utils"],function(utils){return factory(window2,utils)}):typeof module=="object"&&module.exports?module.exports=factory(window2,require_utils()):(window2.Flickity=window2.Flickity||{},window2.Flickity.animatePrototype=factory(window2,window2.fizzyUIUtils))})(window,function(window2,utils){"use strict";var proto={};return proto.startAnimation=function(){this.isAnimating||(this.isAnimating=!0,this.restingFrames=0,this.animate())},proto.animate=function(){this.applyDragForce(),this.applySelectedAttraction();var previousX=this.x;if(this.integratePhysics(),this.positionSlider(),this.settle(previousX),this.isAnimating){var _this=this;requestAnimationFrame(function(){_this.animate()})}},proto.positionSlider=function(){var x=this.x;this.options.wrapAround&&this.cells.length>1&&(x=utils.modulo(x,this.slideableWidth),x-=this.slideableWidth,this.shiftWrapCells(x)),this.setTranslateX(x,this.isAnimating),this.dispatchScrollEvent()},proto.setTranslateX=function(x,is3d){x+=this.cursorPosition,x=this.options.rightToLeft?-x:x;var translateX=this.getPositionValue(x);this.slider.style.transform=is3d?"translate3d("+translateX+",0,0)":"translateX("+translateX+")"},proto.dispatchScrollEvent=function(){var firstSlide=this.slides[0];if(firstSlide){var positionX=-this.x-firstSlide.target,progress=positionX/this.slidesWidth;this.dispatchEvent("scroll",null,[progress,positionX])}},proto.positionSliderAtSelected=function(){this.cells.length&&(this.x=-this.selectedSlide.target,this.velocity=0,this.positionSlider())},proto.getPositionValue=function(position){return this.options.percentPosition?Math.round(position/this.size.innerWidth*1e4)*.01+"%":Math.round(position)+"px"},proto.settle=function(previousX){var isResting=!this.isPointerDown&&Math.round(this.x*100)==Math.round(previousX*100);isResting&&this.restingFrames++,this.restingFrames>2&&(this.isAnimating=!1,delete this.isFreeScrolling,this.positionSlider(),this.dispatchEvent("settle",null,[this.selectedIndex]))},proto.shiftWrapCells=function(x){var beforeGap=this.cursorPosition+x;this._shiftCells(this.beforeShiftCells,beforeGap,-1);var afterGap=this.size.innerWidth-(x+this.slideableWidth+this.cursorPosition);this._shiftCells(this.afterShiftCells,afterGap,1)},proto._shiftCells=function(cells,gap,shift){for(var i=0;i<cells.length;i++){var cell=cells[i],cellShift=gap>0?shift:0;cell.wrapShift(cellShift),gap-=cell.size.outerWidth}},proto._unshiftCells=function(cells){if(!(!cells||!cells.length))for(var i=0;i<cells.length;i++)cells[i].wrapShift(0)},proto.integratePhysics=function(){this.x+=this.velocity,this.velocity*=this.getFrictionFactor()},proto.applyForce=function(force){this.velocity+=force},proto.getFrictionFactor=function(){return 1-this.options[this.isFreeScrolling?"freeScrollFriction":"friction"]},proto.getRestingPosition=function(){return this.x+this.velocity/(1-this.getFrictionFactor())},proto.applyDragForce=function(){if(!(!this.isDraggable||!this.isPointerDown)){var dragVelocity=this.dragX-this.x,dragForce=dragVelocity-this.velocity;this.applyForce(dragForce)}},proto.applySelectedAttraction=function(){var dragDown=this.isDraggable&&this.isPointerDown;if(!(dragDown||this.isFreeScrolling||!this.slides.length)){var distance=this.selectedSlide.target*-1-this.x,force=distance*this.options.selectedAttraction;this.applyForce(force)}},proto})}}),require_flickity=__commonJS({"node_modules/flickity/js/flickity.js"(exports,module){(function(window2,factory){if(typeof define=="function"&&define.amd)define(["ev-emitter/ev-emitter","get-size/get-size","fizzy-ui-utils/utils","./cell","./slide","./animate"],function(EvEmitter,getSize,utils,Cell,Slide,animatePrototype){return factory(window2,EvEmitter,getSize,utils,Cell,Slide,animatePrototype)});else if(typeof module=="object"&&module.exports)module.exports=factory(window2,require_ev_emitter(),require_get_size(),require_utils(),require_cell(),require_slide(),require_animate());else{var _Flickity=window2.Flickity;window2.Flickity=factory(window2,window2.EvEmitter,window2.getSize,window2.fizzyUIUtils,_Flickity.Cell,_Flickity.Slide,_Flickity.animatePrototype)}})(window,function(window2,EvEmitter,getSize,utils,Cell,Slide,animatePrototype){"use strict";var jQuery=window2.jQuery,getComputedStyle2=window2.getComputedStyle,console2=window2.console;function moveElements(elems,toElem){for(elems=utils.makeArray(elems);elems.length;)toElem.appendChild(elems.shift())}var GUID=0,instances={};function Flickity10(element,options){var queryElement=utils.getQueryElement(element);if(!queryElement){console2&&console2.error("Bad element for Flickity: "+(queryElement||element));return}if(this.element=queryElement,this.element.flickityGUID){var instance=instances[this.element.flickityGUID];return instance&&instance.option(options),instance}jQuery&&(this.$element=jQuery(this.element)),this.options=utils.extend({},this.constructor.defaults),this.option(options),this._create()}Flickity10.defaults={accessibility:!0,cellAlign:"center",freeScrollFriction:.075,friction:.28,namespaceJQueryEvents:!0,percentPosition:!0,resize:!0,selectedAttraction:.025,setGallerySize:!0},Flickity10.createMethods=[];var proto=Flickity10.prototype;utils.extend(proto,EvEmitter.prototype),proto._create=function(){var id=this.guid=++GUID;this.element.flickityGUID=id,instances[id]=this,this.selectedIndex=0,this.restingFrames=0,this.x=0,this.velocity=0,this.originSide=this.options.rightToLeft?"right":"left",this.viewport=document.createElement("div"),this.viewport.className="flickity-viewport",this._createSlider(),(this.options.resize||this.options.watchCSS)&&window2.addEventListener("resize",this);for(var eventName in this.options.on){var listener=this.options.on[eventName];this.on(eventName,listener)}Flickity10.createMethods.forEach(function(method){this[method]()},this),this.options.watchCSS?this.watchCSS():this.activate()},proto.option=function(opts){utils.extend(this.options,opts)},proto.activate=function(){if(!this.isActive){this.isActive=!0,this.element.classList.add("flickity-enabled"),this.options.rightToLeft&&this.element.classList.add("flickity-rtl"),this.get
1Size();var cellElems=this._filterFindCellElements(this.element.children);moveElements(cellElems,this.slider),this.viewport.appendChild(this.slider),this.element.appendChild(this.viewport),this.reloadCells(),this.options.accessibility&&(this.element.tabIndex=0,this.element.addEventListener("keydown",this)),this.emitEvent("activate"),this.selectInitialIndex(),this.isInitActivated=!0,this.dispatchEvent("ready")}},proto._createSlider=function(){var slider=document.createElement("div");slider.className="flickity-slider",slider.style[this.originSide]=0,this.slider=slider},proto._filterFindCellElements=function(elems){return utils.filterFindElements(elems,this.options.cellSelector)},proto.reloadCells=function(){this.cells=this._makeCells(this.slider.children),this.positionCells(),this._getWrapShiftCells(),this.setGallerySize()},proto._makeCells=function(elems){var cellElems=this._filterFindCellElements(elems),cells=cellElems.map(function(cellElem){return new Cell(cellElem,this)},this);return cells},proto.getLastCell=function(){return this.cells[this.cells.length-1]},proto.getLastSlide=function(){return this.slides[this.slides.length-1]},proto.positionCells=function(){this._sizeCells(this.cells),this._positionCells(0)},proto._positionCells=function(index){index=index||0,this.maxCellHeight=index&&this.maxCellHeight||0;var cellX=0;if(index>0){var startCell=this.cells[index-1];cellX=startCell.x+startCell.size.outerWidth}for(var len=this.cells.length,i=index;i<len;i++){var cell=this.cells[i];cell.setPosition(cellX),cellX+=cell.size.outerWidth,this.maxCellHeight=Math.max(cell.size.outerHeight,this.maxCellHeight)}this.slideableWidth=cellX,this.updateSlides(),this._containSlides(),this.slidesWidth=len?this.getLastSlide().target-this.slides[0].target:0},proto._sizeCells=function(cells){cells.forEach(function(cell){cell.getSize()})},proto.updateSlides=function(){if(this.slides=[],!!this.cells.length){var slide=new Slide(this);this.slides.push(slide);var isOriginLeft=this.originSide=="left",nextMargin=isOriginLeft?"marginRight":"marginLeft",canCellFit=this._getCanCellFit();this.cells.forEach(function(cell,i){if(!slide.cells.length){slide.addCell(cell);return}var slideWidth=slide.outerWidth-slide.firstMargin+(cell.size.outerWidth-cell.size[nextMargin]);canCellFit.call(this,i,slideWidth)||(slide.updateTarget(),slide=new Slide(this),this.slides.push(slide)),slide.addCell(cell)},this),slide.updateTarget(),this.updateSelectedSlide()}},proto._getCanCellFit=function(){var groupCells=this.options.groupCells;if(groupCells){if(typeof groupCells=="number"){var number=parseInt(groupCells,10);return function(i){return i%number!==0}}}else return function(){return!1};var percentMatch=typeof groupCells=="string"&&groupCells.match(/^(\d+)%$/),percent=percentMatch?parseInt(percentMatch[1],10)/100:1;return function(i,slideWidth){return slideWidth<=(this.size.innerWidth+1)*percent}},proto._init=proto.reposition=function(){this.positionCells(),this.positionSliderAtSelected()},proto.getSize=function(){this.size=getSize(this.element),this.setCellAlign(),this.cursorPosition=this.size.innerWidth*this.cellAlign};var cellAlignShorthands={center:{left:.5,right:.5},left:{left:0,right:1},right:{right:0,left:1}};return proto.setCellAlign=function(){var shorthand=cellAlignShorthands[this.options.cellAlign];this.cellAlign=shorthand?shorthand[this.originSide]:this.options.cellAlign},proto.setGallerySize=function(){if(this.options.setGallerySize){var height=this.options.adaptiveHeight&&this.selectedSlide?this.selectedSlide.height:this.maxCellHeight;this.viewport.style.height=height+"px"}},proto._getWrapShiftCells=function(){if(this.options.wrapAround){this._unshiftCells(this.beforeShiftCells),this._unshiftCells(this.afterShiftCells);var gapX=this.cursorPosition,cellIndex=this.cells.length-1;this.beforeShiftCells=this._getGapCells(gapX,cellIndex,-1),gapX=this.size.innerWidth-this.cursorPosition,this.afterShiftCells=this._getGapCells(gapX,0,1)}},proto._getGapCells=function(gapX,cellIndex,increment){for(var cells=[];gapX>0;){var cell=this.cells[cellIndex];if(!cell)break;cells.push(cell),cellIndex+=increment,gapX-=cell.size.outerWidth}return cells},proto._containSlides=function(){if(!(!this.options.contain||this.options.wrapAround||!this.cells.length)){var isRightToLeft=this.options.rightToLeft,beginMargin=isRightToLeft?"marginRight":"marginLeft",endMargin=isRightToLeft?"marginLeft":"marginRight",contentWidth=this.slideableWidth-this.getLastCell().size[endMargin],isContentSmaller=contentWidth<this.size.innerWidth,beginBound=this.cursorPosition+this.cells[0].size[beginMargin],endBound=contentWidth-this.size.innerWidth*(1-this.cellAlign);
1this.slides.forEach(function(slide){isContentSmaller?slide.target=contentWidth*this.cellAlign:(slide.target=Math.max(slide.target,beginBound),slide.target=Math.min(slide.target,endBound))},this)}},proto.dispatchEvent=function(type,event2,args){var emitArgs=event2?[event2].concat(args):args;if(this.emitEvent(type,emitArgs),jQuery&&this.$element){type+=this.options.namespaceJQueryEvents?".flickity":"";var $event=type;if(event2){var jQEvent=new jQuery.Event(event2);jQEvent.type=type,$event=jQEvent}this.$element.trigger($event,args)}},proto.select=function(index,isWrap,isInstant){if(this.isActive&&(index=parseInt(index,10),this._wrapSelect(index),(this.options.wrapAround||isWrap)&&(index=utils.modulo(index,this.slides.length)),!!this.slides[index])){var prevIndex=this.selectedIndex;this.selectedIndex=index,this.updateSelectedSlide(),isInstant?this.positionSliderAtSelected():this.startAnimation(),this.options.adaptiveHeight&&this.setGallerySize(),this.dispatchEvent("select",null,[index]),index!=prevIndex&&this.dispatchEvent("change",null,[index]),this.dispatchEvent("cellSelect")}},proto._wrapSelect=function(index){var len=this.slides.length,isWrapping=this.options.wrapAround&&len>1;if(!isWrapping)return index;var wrapIndex=utils.modulo(index,len),delta=Math.abs(wrapIndex-this.selectedIndex),backWrapDelta=Math.abs(wrapIndex+len-this.selectedIndex),forewardWrapDelta=Math.abs(wrapIndex-len-this.selectedIndex);!this.isDragSelect&&backWrapDelta<delta?index+=len:!this.isDragSelect&&forewardWrapDelta<delta&&(index-=len),index<0?this.x-=this.slideableWidth:index>=len&&(this.x+=this.slideableWidth)},proto.previous=function(isWrap,isInstant){this.select(this.selectedIndex-1,isWrap,isInstant)},proto.next=function(isWrap,isInstant){this.select(this.selectedIndex+1,isWrap,isInstant)},proto.updateSelectedSlide=function(){var slide=this.slides[this.selectedIndex];slide&&(this.unselectSelectedSlide(),this.selectedSlide=slide,slide.select(),this.selectedCells=slide.cells,this.selectedElements=slide.getCellElements(),this.selectedCell=slide.cells[0],this.selectedElement=this.selectedElements[0])},proto.unselectSelectedSlide=function(){this.selectedSlide&&this.selectedSlide.unselect()},proto.selectInitialIndex=function(){var initialIndex=this.options.initialIndex;if(this.isInitActivated){this.select(this.selectedIndex,!1,!0);return}if(initialIndex&&typeof initialIndex=="string"){var cell=this.queryCell(initialIndex);if(cell){this.selectCell(initialIndex,!1,!0);return}}var index=0;initialIndex&&this.slides[initialIndex]&&(index=initialIndex),this.select(index,!1,!0)},proto.selectCell=function(value,isWrap,isInstant){var cell=this.queryCell(value);if(cell){var index=this.getCellSlideIndex(cell);this.select(index,isWrap,isInstant)}},proto.getCellSlideIndex=function(cell){for(var i=0;i<this.slides.length;i++){var slide=this.slides[i],index=slide.cells.indexOf(cell);if(index!=-1)return i}},proto.getCell=function(elem){for(var i=0;i<this.cells.length;i++){var cell=this.cells[i];if(cell.element==elem)return cell}},proto.getCells=function(elems){elems=utils.makeArray(elems);var cells=[];return elems.forEach(function(elem){var cell=this.getCell(elem);cell&&cells.push(cell)},this),cells},proto.getCellElements=function(){return this.cells.map(function(cell){return cell.element})},proto.getParentCell=function(elem){var cell=this.getCell(elem);return cell||(elem=utils.getParent(elem,".flickity-slider > *"),this.getCell(elem))},proto.getAdjacentCellElements=function(adjCount,index){if(!adjCount)return this.selectedSlide.getCellElements();index=index===void 0?this.selectedIndex:index;var len=this.slides.length;if(1+adjCount*2>=len)return this.getCellElements();for(var cellElems=[],i=index-adjCount;i<=index+adjCount;i++){var slideIndex=this.options.wrapAround?utils.modulo(i,len):i,slide=this.slides[slideIndex];slide&&(cellElems=cellElems.concat(slide.getCellElements()))}return cellElems},proto.queryCell=function(selector){if(typeof selector=="number")return this.cells[selector];if(typeof selector=="string"){if(selector.match(/^[#.]?[\d/]/))return;selector=this.element.querySelector(selector)}return this.getCell(selector)},proto.uiChange=function(){this.emitEvent("uiChange")},proto.childUIPointerDown=function(event2){event2.type!="touchstart"&&event2.preventDefault(),this.focus()},proto.onresize=function(){this.watchCSS(),this.resize()},utils.debounceMethod(Flickity10,"onresize",150),proto.resize=function(){if(this.isActive){this.get
1Size(),this.options.wrapAround&&(this.x=utils.modulo(this.x,this.slideableWidth)),this.positionCells(),this._getWrapShiftCells(),this.setGallerySize(),this.emitEvent("resize");var selectedElement=this.selectedElements&&this.selectedElements[0];this.selectCell(selectedElement,!1,!0)}},proto.watchCSS=function(){var watchOption=this.options.watchCSS;if(watchOption){var afterContent=getComputedStyle2(this.element,":after").content;afterContent.indexOf("flickity")!=-1?this.activate():this.deactivate()}},proto.onkeydown=function(event2){var isNotFocused=document.activeElement&&document.activeElement!=this.element;if(!(!this.options.accessibility||isNotFocused)){var handler=Flickity10.keyboardHandlers[event2.keyCode];handler&&handler.call(this)}},Flickity10.keyboardHandlers={37:function(){var leftMethod=this.options.rightToLeft?"next":"previous";this.uiChange(),this[leftMethod]()},39:function(){var rightMethod=this.options.rightToLeft?"previous":"next";this.uiChange(),this[rightMethod]()}},proto.focus=function(){var prevScrollY=window2.pageYOffset;this.element.focus({preventScroll:!0}),window2.pageYOffset!=prevScrollY&&window2.scrollTo(window2.pageXOffset,prevScrollY)},proto.deactivate=function(){this.isActive&&(this.element.classList.remove("flickity-enabled"),this.element.classList.remove("flickity-rtl"),this.unselectSelectedSlide(),this.cells.forEach(function(cell){cell.destroy()}),this.element.removeChild(this.viewport),moveElements(this.slider.children,this.element),this.options.accessibility&&(this.element.removeAttribute("tabIndex"),this.element.removeEventListener("keydown",this)),this.isActive=!1,this.emitEvent("deactivate"))},proto.destroy=function(){this.deactivate(),window2.removeEventListener("resize",this),this.allOff(),this.emitEvent("destroy"),jQuery&&this.$element&&jQuery.removeData(this.element,"flickity"),delete this.element.flickityGUID,delete instances[this.guid]},utils.extend(proto,animatePrototype),Flickity10.data=function(elem){elem=utils.getQueryElement(elem);var id=elem&&elem.flickityGUID;return id&&instances[id]},utils.htmlInit(Flickity10,"flickity"),jQuery&&jQuery.bridget&&jQuery.bridget("flickity",Flickity10),Flickity10.setJQuery=function(jq){jQuery=jq},Flickity10.Cell=Cell,Flickity10.Slide=Slide,Flickity10})}}),require_unipointer=__commonJS({"node_modules/unipointer/unipointer.js"(exports,module){(function(window2,factory){typeof define=="function"&&define.amd?define(["ev-emitter/ev-emitter"],function(EvEmitter){return factory(window2,EvEmitter)}):typeof module=="object"&&module.exports?module.exports=factory(window2,require_ev_emitter()):window2.Unipointer=factory(window2,window2.EvEmitter)})(window,function(window2,EvEmitter){"use strict";function noop(){}function Unipointer(){}var proto=Unipointer.prototype=Object.create(EvEmitter.prototype);proto.bindStartEvent=function(elem){this._bindStartEvent(elem,!0)},proto.unbindStartEvent=function(elem){this._bindStartEvent(elem,!1)},proto._bindStartEvent=function(elem,isAdd){isAdd=isAdd===void 0?!0:isAdd;var bindMethod=isAdd?"addEventListener":"removeEventListener",startEvent="mousedown";"ontouchstart"in window2?startEvent="touchstart":window2.PointerEvent&&(startEvent="pointerdown"),elem[bindMethod](startEvent,this)},proto.handleEvent=function(event2){var method="on"+event2.type;this[method]&&this[method](event2)},proto.getTouch=function(touches){for(var i=0;i<touches.length;i++){var touch=touches[i];if(touch.identifier==this.pointerIdentifier)return touch}},proto.onmousedown=function(event2){var button=event2.button;button&&button!==0&&button!==1||this._pointerDown(event2,event2)},proto.ontouchstart=function(event2){this._pointerDown(event2,event2.changedTouches[0])},proto.onpointerdown=function(event2){this._pointerDown(event2,event2)},proto._pointerDown=function(event2,pointer){event2.button||this.isPointerDown||(this.isPointerDown=!0,this.pointerIdentifier=pointer.pointerId!==void 0?pointer.pointerId:pointer.identifier,this.pointerDown(event2,pointer))},proto.pointerDown=function(event2,pointer){this._bindPostStartEvents(event2),this.emitEvent("pointerDown",[event2,pointer])};var postStartEvents={mousedown:["mousemove","mouseup"],touchstart:["touchmove","touchend","touchcancel"],pointerdown:["pointermove","pointerup","pointercancel"]};return proto._bindPostStartEvents=function(event2){if(event2){var events=postStartEvents[event2.type];
1events.forEach(function(eventName){window2.addEventListener(eventName,this)},this),this._boundPointerEvents=events}},proto._unbindPostStartEvents=function(){this._boundPointerEvents&&(this._boundPointerEvents.forEach(function(eventName){window2.removeEventListener(eventName,this)},this),delete this._boundPointerEvents)},proto.onmousemove=function(event2){this._pointerMove(event2,event2)},proto.onpointermove=function(event2){event2.pointerId==this.pointerIdentifier&&this._pointerMove(event2,event2)},proto.ontouchmove=function(event2){var touch=this.getTouch(event2.changedTouches);touch&&this._pointerMove(event2,touch)},proto._pointerMove=function(event2,pointer){this.pointerMove(event2,pointer)},proto.pointerMove=function(event2,pointer){this.emitEvent("pointerMove",[event2,pointer])},proto.onmouseup=function(event2){this._pointerUp(event2,event2)},proto.onpointerup=function(event2){event2.pointerId==this.pointerIdentifier&&this._pointerUp(event2,event2)},proto.ontouchend=function(event2){var touch=this.getTouch(event2.changedTouches);touch&&this._pointerUp(event2,touch)},proto._pointerUp=function(event2,pointer){this._pointerDone(),this.pointerUp(event2,pointer)},proto.pointerUp=function(event2,pointer){this.emitEvent("pointerUp",[event2,pointer])},proto._pointerDone=function(){this._pointerReset(),this._unbindPostStartEvents(),this.pointerDone()},proto._pointerReset=function(){this.isPointerDown=!1,delete this.pointerIdentifier},proto.pointerDone=noop,proto.onpointercancel=function(event2){event2.pointerId==this.pointerIdentifier&&this._pointerCancel(event2,event2)},proto.ontouchcancel=function(event2){var touch=this.getTouch(event2.changedTouches);touch&&this._pointerCancel(event2,touch)},proto._pointerCancel=function(event2,pointer){this._pointerDone(),this.pointerCancel(event2,pointer)},proto.pointerCancel=function(event2,pointer){this.emitEvent("pointerCancel",[event2,pointer])},Unipointer.getPointerPoint=function(pointer){return{x:pointer.pageX,y:pointer.pageY}},Unipointer})}}),require_unidragger=__commonJS({"node_modules/unidragger/unidragger.js"(exports,module){(function(window2,factory){typeof define=="function"&&define.amd?define(["unipointer/unipointer"],function(Unipointer){return factory(window2,Unipointer)}):typeof module=="object"&&module.exports?module.exports=factory(window2,require_unipointer()):window2.Unidragger=factory(window2,window2.Unipointer)})(window,function(window2,Unipointer){"use strict";function Unidragger(){}var proto=Unidragger.prototype=Object.create(Unipointer.prototype);proto.bindHandles=function(){this._bindHandles(!0)},proto.unbindHandles=function(){this._bindHandles(!1)},proto._bindHandles=function(isAdd){isAdd=isAdd===void 0?!0:isAdd;for(var bindMethod=isAdd?"addEventListener":"removeEventListener",touchAction=isAdd?this._touchActionValue:"",i=0;i<this.handles.length;i++){var handle=this.handles[i];this._bindStartEvent(handle,isAdd),handle[bindMethod]("click",this),window2.PointerEvent&&(handle.style.touchAction=touchAction)}},proto._touchActionValue="none",proto.pointerDown=function(event2,pointer){var isOkay=this.okayPointerDown(event2);isOkay&&(this.pointerDownPointer={pageX:pointer.pageX,pageY:pointer.pageY},event2.preventDefault(),this.pointerDownBlur(),this._bindPostStartEvents(event2),this.emitEvent("pointerDown",[event2,pointer]))};var cursorNodes={TEXTAREA:!0,INPUT:!0,SELECT:!0,OPTION:!0},clickTypes={radio:!0,checkbox:!0,button:!0,submit:!0,image:!0,file:!0};return proto.okayPointerDown=function(event2){var isCursorNode=cursorNodes[event2.target.nodeName],isClickType=clickTypes[event2.target.type],isOkay=!isCursorNode||isClickType;return isOkay||this._pointerReset(),isOkay},proto.pointerDownBlur=function(){var focused=document.activeElement,canBlur=focused&&focused.blur&&focused!=document.body;canBlur&&focused.blur()},proto.pointerMove=function(event2,pointer){var moveVector=this._dragPointerMove(event2,pointer);this.emitEvent("pointerMove",[event2,pointer,moveVector]),this._dragMove(event2,pointer,moveVector)},proto._dragPointerMove=function(event2,pointer){var moveVector={x:pointer.pageX-this.pointerDownPointer.pageX,y:pointer.pageY-this.pointerDownPointer.pageY};return!this.isDragging&&this.hasDragStarted(moveVector)&&this._dragStart(event2,pointer),moveVector},proto.hasDragStarted=function(moveVector){return Math.abs(moveVector.x)>3||Math.abs(moveVector.y)>3},proto.pointerUp=function(event2,pointer){this.emitEvent("pointerUp",[event2,pointer]),this._dragPointerUp(event2,pointer)},proto._dragPointerUp=function(event2,pointer){this.isDragging?this._dragEnd(event2,pointer):this._staticClick(event2,pointer)},proto._dragStart=function(event2,pointer){this.isDragging=!0,this.isPreventing
1Clicks=!0,this.dragStart(event2,pointer)},proto.dragStart=function(event2,pointer){this.emitEvent("dragStart",[event2,pointer])},proto._dragMove=function(event2,pointer,moveVector){this.isDragging&&this.dragMove(event2,pointer,moveVector)},proto.dragMove=function(event2,pointer,moveVector){event2.preventDefault(),this.emitEvent("dragMove",[event2,pointer,moveVector])},proto._dragEnd=function(event2,pointer){this.isDragging=!1,setTimeout((function(){delete this.isPreventingClicks}).bind(this)),this.dragEnd(event2,pointer)},proto.dragEnd=function(event2,pointer){this.emitEvent("dragEnd",[event2,pointer])},proto.onclick=function(event2){this.isPreventingClicks&&event2.preventDefault()},proto._staticClick=function(event2,pointer){this.isIgnoringMouseUp&&event2.type=="mouseup"||(this.staticClick(event2,pointer),event2.type!="mouseup"&&(this.isIgnoringMouseUp=!0,setTimeout((function(){delete this.isIgnoringMouseUp}).bind(this),400)))},proto.staticClick=function(event2,pointer){this.emitEvent("staticClick",[event2,pointer])},Unidragger.getPointerPoint=Unipointer.getPointerPoint,Unidragger})}}),require_drag=__commonJS({"node_modules/flickity/js/drag.js"(exports,module){(function(window2,factory){typeof define=="function"&&define.amd?define(["./flickity","unidragger/unidragger","fizzy-ui-utils/utils"],function(Flickity10,Unidragger,utils){return factory(window2,Flickity10,Unidragger,utils)}):typeof module=="object"&&module.exports?module.exports=factory(window2,require_flickity(),require_unidragger(),require_utils()):window2.Flickity=factory(window2,window2.Flickity,window2.Unidragger,window2.fizzyUIUtils)})(window,function(window2,Flickity10,Unidragger,utils){"use strict";utils.extend(Flickity10.defaults,{draggable:">1",dragThreshold:3}),Flickity10.createMethods.push("_createDrag");var proto=Flickity10.prototype;utils.extend(proto,Unidragger.prototype),proto._touchActionValue="pan-y";var isTouch="createTouch"in document,isTouchmoveScrollCanceled=!1;proto._createDrag=function(){this.on("activate",this.onActivateDrag),this.on("uiChange",this._uiChangeDrag),this.on("deactivate",this.onDeactivateDrag),this.on("cellChange",this.updateDraggable),isTouch&&!isTouchmoveScrollCanceled&&(window2.addEventListener("touchmove",function(){}),isTouchmoveScrollCanceled=!0)},proto.onActivateDrag=function(){this.handles=[this.viewport],this.bindHandles(),this.updateDraggable()},proto.onDeactivateDrag=function(){this.unbindHandles(),this.element.classList.remove("is-draggable")},proto.updateDraggable=function(){this.options.draggable==">1"?this.isDraggable=this.slides.length>1:this.isDraggable=this.options.draggable,this.isDraggable?this.element.classList.add("is-draggable"):this.element.classList.remove("is-draggable")},proto.bindDrag=function(){this.options.draggable=!0,this.updateDraggable()},proto.unbindDrag=function(){this.options.draggable=!1,this.updateDraggable()},proto._uiChangeDrag=function(){delete this.isFreeScrolling},proto.pointerDown=function(event2,pointer){if(!this.isDraggable){this._pointerDownDefault(event2,pointer);return}var isOkay=this.okayPointerDown(event2);isOkay&&(this._pointerDownPreventDefault(event2),this.pointerDownFocus(event2),document.activeElement!=this.element&&this.pointerDownBlur(),this.dragX=this.x,this.viewport.classList.add("is-pointer-down"),this.pointerDownScroll=getScrollPosition(),window2.addEventListener("scroll",this),this._pointerDownDefault(event2,pointer))},proto._pointerDownDefault=function(event2,pointer){this.pointerDownPointer={pageX:pointer.pageX,pageY:pointer.pageY},this._bindPostStartEvents(event2),this.dispatchEvent("pointerDown",event2,[pointer])};var focusNodes={INPUT:!0,TEXTAREA:!0,SELECT:!0};proto.pointerDownFocus=function(event2){var isFocusNode=focusNodes[event2.target.nodeName];isFocusNode||this.focus()},proto._pointerDownPreventDefault=function(event2){var isTouchStart=event2.type=="touchstart",isTouchPointer=event2.pointerType=="touch",isFocusNode=focusNodes[event2.target.nodeName];!isTouchStart&&!isTouchPointer&&!isFocusNode&&event2.preventDefault()},proto.hasDragStarted=function(moveVector){return Math.abs(moveVector.x)>this.options.dragThreshold},proto.pointerUp=function(event2,pointer){delete this.isTouchScrolling,this.viewport.classList.remove("is-pointer-down"),this.dispatchEvent("pointerUp",event2,[pointer]),this._dragPointerUp(event2,pointer)},proto.pointerDone=function(){window2.removeEventListener("scroll",this),delete this.pointerDownScroll},proto.dragStart=function(event2,pointer){this.isDraggable&&(this.dragStartPosition=this.x,this.startAnimation(),window2.removeEventListener("scroll",this),this.dispatchEvent("dragStart",event2,[pointer]))},proto.pointerMove=function(event2,pointer){var moveVector=this._dragPointerMove(event2,pointer);this.dispatchEvent("pointerMove",event2,[pointer,moveVector]),this._dragMove(event2,pointer,moveVector)},proto.dragMove=function(event2,pointer,moveVector){if(this.isDraggable){event2.preventDefault(),this.previousDragX=this.dragX;var direction=this.options.rightToLeft?-1:1;this.options.wrapAround&&(moveVector.x%=this.slideableWidth);var dragX=this.dragStartPosition+moveVector.x*direction;if(!this.options.wrapAround&&this.slides.length){var originBound=Math.max(-this.slides[0].target,this.dragStartPosition);dragX=dragX>originBound?(dragX+originBound)*.5:dragX;var endBound=Math.min(-this.getLastSlide().target,this.dragStartPosition);dragX=dragX<endBound?(dragX+endBound)*.5:dragX}this.dragX=dragX,this.dragMoveTime=new Date,this.dispatchEvent("dragMove",event2,[pointer,moveVector])}},proto.dragEnd=function(event2,pointer){if(this.isDraggable){this.options.freeScroll&&(this.isFreeScrolling=!0);var index=this.dragEndRestingSelect();if(this.options.freeScroll&&!this.options.wrapAround){var restingX=this.getRestingPosition();this.isFreeScrolling=-restingX>this.slides[0].target&&-restingX<this.getLastSlide().target}else!this.options.freeScroll&&index==this.selectedIndex&&(index+=this.dragEndBoostSelect());delete this.previousDragX,this.isDragSelect=this.options.wrapAround,this.select(index),delete this.isDragSelect,this.dispatchEvent("dragEnd",event2,[pointer])}},proto.dragEndRestingSelect=function(){var restingX=this.getRestingPosition(),distance=Math.abs(this.getSlideDistance(-restingX,this.selectedIndex)),positiveResting=this._getClosestResting(restingX,distance,1),negativeResting=this._getClosestResting(restingX,distance,-1),index=
1positiveResting.distance<negativeResting.distance?positiveResting.index:negativeResting.index;return index},proto._getClosestResting=function(restingX,distance,increment){for(var index=this.selectedIndex,minDistance=1/0,condition=this.options.contain&&!this.options.wrapAround?(function(dist,minDist){return dist<=minDist}):function(dist,minDist){return dist<minDist};condition(distance,minDistance)&&(index+=increment,minDistance=distance,distance=this.getSlideDistance(-restingX,index),distance!==null);)distance=Math.abs(distance);return{distance:minDistance,index:index-increment}},proto.getSlideDistance=function(x,index){var len=this.slides.length,isWrapAround=this.options.wrapAround&&len>1,slideIndex=isWrapAround?utils.modulo(index,len):index,slide=this.slides[slideIndex];if(!slide)return null;var wrap=isWrapAround?this.slideableWidth*Math.floor(index/len):0;return x-(slide.target+wrap)},proto.dragEndBoostSelect=function(){if(this.previousDragX===void 0||!this.dragMoveTime||new Date-this.dragMoveTime>100)return 0;var distance=this.getSlideDistance(-this.dragX,this.selectedIndex),delta=this.previousDragX-this.dragX;return distance>0&&delta>0?1:distance<0&&delta<0?-1:0},proto.staticClick=function(event2,pointer){var clickedCell=this.getParentCell(event2.target),cellElem=clickedCell&&clickedCell.element,cellIndex=clickedCell&&this.cells.indexOf(clickedCell);this.dispatchEvent("staticClick",event2,[pointer,cellElem,cellIndex])},proto.onscroll=function(){var scroll=getScrollPosition(),scrollMoveX=this.pointerDownScroll.x-scroll.x,scrollMoveY=this.pointerDownScroll.y-scroll.y;(Math.abs(scrollMoveX)>3||Math.abs(scrollMoveY)>3)&&this._pointerDone()};function getScrollPosition(){return{x:window2.pageXOffset,y:window2.pageYOffset}}return Flickity10})}}),require_prev_next_button=__commonJS({"node_modules/flickity/js/prev-next-button.js"(exports,module){(function(window2,factory){typeof define=="function"&&define.amd?define(["./flickity","unipointer/unipointer","fizzy-ui-utils/utils"],function(Flickity10,Unipointer,utils){return factory(window2,Flickity10,Unipointer,utils)}):typeof module=="object"&&module.exports?module.exports=factory(window2,require_flickity(),require_unipointer(),require_utils()):factory(window2,window2.Flickity,window2.Unipointer,window2.fizzyUIUtils)})(window,function(window2,Flickity10,Unipointer,utils){"use strict";var svgURI="http://www.w3.org/2000/svg";function PrevNextButton(direction,parent){this.direction=direction,this.parent=parent,this._create()}PrevNextButton.prototype=Object.create(Unipointer.prototype),PrevNextButton.prototype._create=function(){this.isEnabled=!0,this.isPrevious=this.direction==-1;var leftDirection=this.parent.options.rightToLeft?1:-1;this.isLeft=this.direction==leftDirection;var element=this.element=document.createElement("button");element.className="flickity-button flickity-prev-next-button",element.className+=this.isPrevious?" previous":" next",element.setAttribute("type","button"),this.disable(),element.setAttribute("aria-label",this.isPrevious?"Previous":"Next");var svg=this.createSVG();element.appendChild(svg),this.parent.on("select",this.update.bind(this)),this.on("pointerDown",this.parent.childUIPointerDown.bind(this.parent))},PrevNextButton.prototype.activate=function(){this.bindStartEvent(this.element),this.element.addEventListener("click",this),this.parent.element.appendChild(this.element)},PrevNextButton.prototype.deactivate=function(){this.parent.element.removeChild(this.element),this.unbindStartEvent(this.element),this.element.removeEventListener("click",this)},PrevNextButton.prototype.createSVG=function(){var svg=document.createElementNS(svgURI,"svg");svg.setAttribute("class","flickity-button-icon"),svg.setAttribute("viewBox","0 0 100 100");var path=document.createElementNS(svgURI,"path"),pathMovements=getArrowMovements(this.parent.options.arrowShape);return path.setAttribute("d",pathMovements),path.setAttribute("class","arrow"),this.isLeft||path.setAttribute("transform","translate(100, 100) rotate(180) "),svg.appendChild(path),svg};function getArrowMovements(shape){return typeof shape=="string"?shape:"M "+shape.x0+",50 L "+shape.x1+","+(shape.y1+50)+" L "+shape.x2+","+(shape.y2+50)+" L "+shape.x3+",50  L "+shape.x2+","+(50-shape.y2)+" L "+shape.x1+","+(50-shape.y1)+" Z"}PrevNextButton.prototype.handleEvent=utils.handleEvent,PrevNextButton.prototype.onclick=function(){if(this.isEnabled){this.parent.uiChange();var method=this.isPrevious?"previous":"next";this.parent[method]()}},PrevNextButton.prototype.enable=function(){this.isEnabled||(this.element.disabled=!1,this.isEnabled=!0)},PrevNextButton.prototype.disable=function(){this.isEnabled&&(this.element.disabled=!0,this.isEnabled=!1)},PrevNextButton.prototype.update=function(){var slides=this.parent.slides;if(this.parent.options.wrapAround&&slides.length>1){this.enable();return}
1var lastIndex=slides.length?slides.length-1:0,boundIndex=this.isPrevious?0:lastIndex,method=this.parent.selectedIndex==boundIndex?"disable":"enable";this[method]()},PrevNextButton.prototype.destroy=function(){this.deactivate(),this.allOff()},utils.extend(Flickity10.defaults,{prevNextButtons:!0,arrowShape:{x0:10,x1:60,y1:50,x2:70,y2:40,x3:30}}),Flickity10.createMethods.push("_createPrevNextButtons");var proto=Flickity10.prototype;return proto._createPrevNextButtons=function(){this.options.prevNextButtons&&(this.prevButton=new PrevNextButton(-1,this),this.nextButton=new PrevNextButton(1,this),this.on("activate",this.activatePrevNextButtons))},proto.activatePrevNextButtons=function(){this.prevButton.activate(),this.nextButton.activate(),this.on("deactivate",this.deactivatePrevNextButtons)},proto.deactivatePrevNextButtons=function(){this.prevButton.deactivate(),this.nextButton.deactivate(),this.off("deactivate",this.deactivatePrevNextButtons)},Flickity10.PrevNextButton=PrevNextButton,Flickity10})}}),require_page_dots=__commonJS({"node_modules/flickity/js/page-dots.js"(exports,module){(function(window2,factory){typeof define=="function"&&define.amd?define(["./flickity","unipointer/unipointer","fizzy-ui-utils/utils"],function(Flickity10,Unipointer,utils){return factory(window2,Flickity10,Unipointer,utils)}):typeof module=="object"&&module.exports?module.exports=factory(window2,require_flickity(),require_unipointer(),require_utils()):factory(window2,window2.Flickity,window2.Unipointer,window2.fizzyUIUtils)})(window,function(window2,Flickity10,Unipointer,utils){"use strict";function PageDots(parent){this.parent=parent,this._create()}PageDots.prototype=Object.create(Unipointer.prototype),PageDots.prototype._create=function(){this.holder=document.createElement("ol"),this.holder.className="flickity-page-dots",this.dots=[],this.handleClick=this.onClick.bind(this),this.on("pointerDown",this.parent.childUIPointerDown.bind(this.parent))},PageDots.prototype.activate=function(){this.setDots(),this.holder.addEventListener("click",this.handleClick),this.bindStartEvent(this.holder),this.parent.element.appendChild(this.holder)},PageDots.prototype.deactivate=function(){this.holder.removeEventListener("click",this.handleClick),this.unbindStartEvent(this.holder),this.parent.element.removeChild(this.holder)},PageDots.prototype.setDots=function(){var delta=this.parent.slides.length-this.dots.length;delta>0?this.addDots(delta):delta<0&&this.removeDots(-delta)},PageDots.prototype.addDots=function(count){for(var fragment=document.createDocumentFragment(),newDots=[],length=this.dots.length,max=length+count,i=length;i<max;i++){var dot=document.createElement("li");dot.className="dot",dot.setAttribute("aria-label","Page dot "+(i+1)),fragment.appendChild(dot),newDots.push(dot)}this.holder.appendChild(fragment),this.dots=this.dots.concat(newDots)},PageDots.prototype.removeDots=function(count){var removeDots=this.dots.splice(this.dots.length-count,count);removeDots.forEach(function(dot){this.holder.removeChild(dot)},this)},PageDots.prototype.updateSelected=function(){this.selectedDot&&(this.selectedDot.className="dot",this.selectedDot.removeAttribute("aria-current")),this.dots.length&&(this.selectedDot=this.dots[this.parent.selectedIndex],this.selectedDot.className="dot is-selected",this.selectedDot.setAttribute("aria-current","step"))},PageDots.prototype.onTap=PageDots.prototype.onClick=function(event2){var target=event2.target;if(target.nodeName=="LI"){this.parent.uiChange();var index=this.dots.indexOf(target);this.parent.select(index)}},PageDots.prototype.destroy=function(){this.deactivate(),this.allOff()},Flickity10.PageDots=PageDots,utils.extend(Flickity10.defaults,{pageDots:!0}),Flickity10.createMethods.push("_createPageDots");var proto=Flickity10.prototype;return proto._createPageDots=function(){this.options.pageDots&&(this.pageDots=new PageDots(this),this.on("activate",this.activatePageDots),this.on("select",this.updateSelectedPageDots),this.on("cellChange",this.updatePageDots),this.on("resize",this.updatePageDots),this.on("deactivate",this.deactivatePageDots))},proto.activatePageDots=function(){this.pageDots.activate()},proto.updateSelectedPageDots=function(){this.pageDots.updateSelected()},proto.updatePageDots=function(){this.pageDots.setDots()},proto.deactivatePageDots=function(){this.pageDots.deactivate()},Flickity10.PageDots=PageDots,Flickity10})}}),require_player=__commonJS({"node_modules/flickity/js/player.js"(exports,module){(function(window2,factory){typeof define=="function"&&define.amd?define(["ev-emitter/ev-emitter","fizzy-ui-utils/utils","./flickity"],function(EvEmitter,utils,Flickity10){return factory(EvEmitter,utils,Flickity10)}):typeof module=="object"&&module.exports?module.exports=factory(require_ev_emitter(),require_utils(),require_flickity()):factory(window2.EvEmitter,window2.fizzyUIUtils,window2.Flickity)})(window,function(EvEmitter,utils,Flickity10){"use strict";function Player(parent){this.parent=parent,this.state="stopped",this.onVisibilityChange=this.visibilityChange.bind(this),this.onVisibilityPlay=this.visibilityPlay.bind(this)}Player.prototype=Object.create(EvEmitter.prototype),Player.prototype.play=function(){if(this.state!="playing"){var isPageHidden=document.hidden;if(isPageHidden){document.addEventListener("visibilitychange",this.onVisibilityPlay);return}this.state="playing",document.addEventListener("visibilitychange",this.onVisibilityChange),this.tick()}},Player.prototype.tick=function(){if(this.state=="playing"){var time=this.parent.options.autoPlay;time=typeof time=="number"?time:3e3;var _this=this;this.clear(),this.timeout=setTimeout(function(){_this.parent.next(!0),_this.tick()},time)}},Player.prototype.stop=function(){this.state="stopped",this.clear(),document.removeEventListener("visibilitychange",this.onVisibilityChange)},Player.prototype.clear=function(){clearTimeout(this.timeout)},Player.prototype.pause=function(){this.state=="playing"&&(this.state="paused",this.clear())},Player.prototype.unpause=function(){this.state=="paused"&&this.play()},Player.prototype.visibilityChange=function(){var isPageHidden=document.hidden;this[isPageHidden?"pause":"unpause"]()},Player.prototype.visibilityPlay=function(){this.play(),document.removeEventListener("visibilitychange",this.onVisibilityPlay)},utils.extend(Flickity10.defaults,{pauseAutoPlayOnHover:!0}),Flickity10.createMethods.push("_createPlayer");var proto=Flickity10.prototype;return proto._createPlayer=function(){this.player=new Player(this),this.on("activate",this.activatePlayer),this.on("uiChange",this.stopPlayer),this.on("pointerDown",this.stopPlayer),this.on("deactivate",this.deactivatePlayer)},proto.activatePlayer=function(){this.options.autoPlay&&(this.player.play(),this.element.addEventListener("mouseenter",this))},proto.playPlayer=function(){this.player.play()},proto.stopPlayer=function(){this.player.stop()},proto.pausePlayer=function(){this.player.pause()},proto.unpausePlayer=function(){this.player.unpause()},proto.deactivatePlayer=function(){this.player.stop(),this.element.removeEventListener("mouseenter",this)},proto.onmouseenter=function(){this.options.pauseAutoPlayOnHover&&(this.player.pause(),this.element.addEventListener("mouseleave",this))},proto.onmouseleave=function(){this.player.unpause(),this.element.removeEventListener("mouseleave",this)},Flickity10.Player=Player,Flickity10})}}),require_add_remove_cell=__commonJS({"node_modules/flickity/js/add-remove-cell.js"(exports,module){(function(window2,factory){typeof define=="function"&&define.amd?define(["./flickity","fizzy-ui-utils/utils"],function(Flickity10,utils){return factory(window2,Flickity10,utils)}):typeof module=="object"&&module.exports?module.exports=factory(window2,require_flickity(),require_utils()):factory(window2,window2.Flickity,window2.fizzyUIUtils)})(window,function(window2,Flickity10,utils){"use strict";function getCellsFragment(cells){var fragment=document.createDocumentFragment();
1return cells.forEach(function(cell){fragment.appendChild(cell.element)}),fragment}var proto=Flickity10.prototype;return proto.insert=function(elems,index){var cells=this._makeCells(elems);if(!(!cells||!cells.length)){var len=this.cells.length;index=index===void 0?len:index;var fragment=getCellsFragment(cells),isAppend=index==len;if(isAppend)this.slider.appendChild(fragment);else{var insertCellElement=this.cells[index].element;this.slider.insertBefore(fragment,insertCellElement)}if(index===0)this.cells=cells.concat(this.cells);else if(isAppend)this.cells=this.cells.concat(cells);else{var endCells=this.cells.splice(index,len-index);this.cells=this.cells.concat(cells).concat(endCells)}this._sizeCells(cells),this.cellChange(index,!0)}},proto.append=function(elems){this.insert(elems,this.cells.length)},proto.prepend=function(elems){this.insert(elems,0)},proto.remove=function(elems){var cells=this.getCells(elems);if(!(!cells||!cells.length)){var minCellIndex=this.cells.length-1;cells.forEach(function(cell){cell.remove();var index=this.cells.indexOf(cell);minCellIndex=Math.min(index,minCellIndex),utils.removeFrom(this.cells,cell)},this),this.cellChange(minCellIndex,!0)}},proto.cellSizeChange=function(elem){var cell=this.getCell(elem);if(cell){cell.getSize();var index=this.cells.indexOf(cell);this.cellChange(index)}},proto.cellChange=function(changedCellIndex,isPositioningSlider){var prevSelectedElem=this.selectedElement;this._positionCells(changedCellIndex),this._getWrapShiftCells(),this.setGallerySize();var cell=this.getCell(prevSelectedElem);cell&&(this.selectedIndex=this.getCellSlideIndex(cell)),this.selectedIndex=Math.min(this.slides.length-1,this.selectedIndex),this.emitEvent("cellChange",[changedCellIndex]),this.select(this.selectedIndex),isPositioningSlider&&this.positionSliderAtSelected()},Flickity10})}}),require_lazyload=__commonJS({"node_modules/flickity/js/lazyload.js"(exports,module){(function(window2,factory){typeof define=="function"&&define.amd?define(["./flickity","fizzy-ui-utils/utils"],function(Flickity10,utils){return factory(window2,Flickity10,utils)}):typeof module=="object"&&module.exports?module.exports=factory(window2,require_flickity(),require_utils()):factory(window2,window2.Flickity,window2.fizzyUIUtils)})(window,function(window2,Flickity10,utils){"use strict";Flickity10.createMethods.push("_createLazyload");var proto=Flickity10.prototype;proto._createLazyload=function(){this.on("select",this.lazyLoad)},proto.lazyLoad=function(){var lazyLoad=this.options.lazyLoad;if(lazyLoad){var adjCount=typeof lazyLoad=="number"?lazyLoad:0,cellElems=this.getAdjacentCellElements(adjCount),lazyImages=[];
1cellElems.forEach(function(cellElem){var lazyCellImages=getCellLazyImages(cellElem);lazyImages=lazyImages.concat(lazyCellImages)}),lazyImages.forEach(function(img){new LazyLoader(img,this)},this)}};function getCellLazyImages(cellElem){if(cellElem.nodeName=="IMG"){var lazyloadAttr=cellElem.getAttribute("data-flickity-lazyload"),srcAttr=cellElem.getAttribute("data-flickity-lazyload-src"),srcsetAttr=cellElem.getAttribute("data-flickity-lazyload-srcset");if(lazyloadAttr||srcAttr||srcsetAttr)return[cellElem]}var lazySelector="img[data-flickity-lazyload], img[data-flickity-lazyload-src], img[data-flickity-lazyload-srcset]",imgs=cellElem.querySelectorAll(lazySelector);return utils.makeArray(imgs)}function LazyLoader(img,flickity){this.img=img,this.flickity=flickity,this.load()}return LazyLoader.prototype.handleEvent=utils.handleEvent,LazyLoader.prototype.load=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this);var src=this.img.getAttribute("data-flickity-lazyload")||this.img.getAttribute("data-flickity-lazyload-src"),srcset=this.img.getAttribute("data-flickity-lazyload-srcset");this.img.src=src,srcset&&this.img.setAttribute("srcset",srcset),this.img.removeAttribute("data-flickity-lazyload"),this.img.removeAttribute("data-flickity-lazyload-src"),this.img.removeAttribute("data-flickity-lazyload-srcset")},LazyLoader.prototype.onload=function(event2){this.complete(event2,"flickity-lazyloaded")},LazyLoader.prototype.onerror=function(event2){this.complete(event2,"flickity-lazyerror")},LazyLoader.prototype.complete=function(event2,className){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this);var cell=this.flickity.getParentCell(this.img),cellElem=cell&&cell.element;this.flickity.cellSizeChange(cellElem),this.img.classList.add(className),this.flickity.dispatchEvent("lazyLoad",event2,cellElem)},Flickity10.LazyLoader=LazyLoader,Flickity10})}}),require_js=__commonJS({"node_modules/flickity/js/index.js"(exports,module){(function(window2,factory){typeof define=="function"&&define.amd?define(["./flickity","./drag","./prev-next-button","./page-dots","./player","./add-remove-cell","./lazyload"],factory):typeof module=="object"&&module.exports&&(module.exports=factory(require_flickity(),require_drag(),require_prev_next_button(),require_page_dots(),require_player(),require_add_remove_cell(),require_lazyload()))})(window,function(Flickity10){return Flickity10})}}),require_flickity_fade=__commonJS({"node_modules/flickity-fade/flickity-fade.js"(exports,module){(function(window2,factory){typeof define=="function"&&define.amd?define(["flickity/js/index","fizzy-ui-utils/utils"],factory):typeof module=="object"&&module.exports?module.exports=factory(require_js(),require_utils()):factory(window2.Flickity,window2.fizzyUIUtils)})(exports,function(Flickity10,utils){var Slide=Flickity10.Slide,slideUpdateTarget=Slide.prototype.updateTarget;Slide.prototype.updateTarget=function(){if(slideUpdateTarget.apply(this,arguments),!!this.parent.options.fade){var slideTargetX=this.target-this.x,firstCellX=this.cells[0].x;this.cells.forEach(function(cell){var targetX=cell.x-firstCellX-slideTargetX;cell.renderPosition(targetX)})}},Slide.prototype.setOpacity=function(alpha){this.cells.forEach(function(cell){cell.element.style.opacity=alpha})};var proto=Flickity10.prototype;Flickity10.createMethods.push("_createFade"),proto._createFade=function(){this.fadeIndex=this.selectedIndex,this.prevSelectedIndex=this.selectedIndex,this.on("select",this.onSelectFade),this.on("dragEnd",this.onDragEndFade),this.on("settle",this.onSettleFade),this.on("activate",this.onActivateFade),this.on("deactivate",this.onDeactivateFade)};var updateSlides=proto.updateSlides;proto.updateSlides=function(){updateSlides.apply(this,arguments),this.options.fade&&this.slides.forEach(function(slide,i){var alpha=i==this.selectedIndex?1:0;slide.setOpacity(alpha)},this)},proto.onSelectFade=function(){this.fadeIndex=Math.min(this.prevSelectedIndex,this.slides.length-1),this.prevSelectedIndex=this.selectedIndex},proto.onSettleFade=function(){if(delete this.didDragEnd,!!this.options.fade){this.selectedSlide.setOpacity(1);var fadedSlide=this.slides[this.fadeIndex];fadedSlide&&this.fadeIndex!=this.selectedIndex&&this.slides[this.fadeIndex].setOpacity(0)}},proto.onDragEndFade=function(){this.didDragEnd=!0},proto.onActivateFade=function(){this.options.fade&&this.element.classList.add("is-fade")},proto.onDeactivateFade=function(){this.options.fade&&(this.element.classList.remove("is-fade"),this.slides.forEac
1h(function(slide){slide.setOpacity("")}))};var positionSlider=proto.positionSlider;proto.positionSlider=function(){if(!this.options.fade){positionSlider.apply(this,arguments);return}this.fadeSlides(),this.dispatchScrollEvent()};var positionSliderAtSelected=proto.positionSliderAtSelected;proto.positionSliderAtSelected=function(){this.options.fade&&this.setTranslateX(0),positionSliderAtSelected.apply(this,arguments)},proto.fadeSlides=function(){if(!(this.slides.length<2)){var indexes=this.getFadeIndexes(),fadeSlideA=this.slides[indexes.a],fadeSlideB=this.slides[indexes.b],distance=this.wrapDifference(fadeSlideA.target,fadeSlideB.target),progress=this.wrapDifference(fadeSlideA.target,-this.x);progress=progress/distance,fadeSlideA.setOpacity(1-progress),fadeSlideB.setOpacity(progress);var fadeHideIndex=indexes.a;this.isDragging&&(fadeHideIndex=progress>.5?indexes.a:indexes.b);var isNewHideIndex=this.fadeHideIndex!=null&&this.fadeHideIndex!=fadeHideIndex&&this.fadeHideIndex!=indexes.a&&this.fadeHideIndex!=indexes.b;isNewHideIndex&&this.slides[this.fadeHideIndex].setOpacity(0),this.fadeHideIndex=fadeHideIndex}},proto.getFadeIndexes=function(){return!this.isDragging&&!this.didDragEnd?{a:this.fadeIndex,b:this.selectedIndex}:this.options.wrapAround?this.getFadeDragWrapIndexes():this.getFadeDragLimitIndexes()},proto.getFadeDragWrapIndexes=function(){var distances=this.slides.map(function(slide,i){return this.getSlideDistance(-this.x,i)},this),absDistances=distances.map(function(distance2){return Math.abs(distance2)}),minDistance=Math.min.apply(Math,absDistances),closestIndex=absDistances.indexOf(minDistance),distance=distances[closestIndex],len=this.slides.length,delta=distance>=0?1:-1;return{a:closestIndex,b:utils.modulo(closestIndex+delta,len)}},proto.getFadeDragLimitIndexes=function(){for(var dragIndex=0,i=0;i<this.slides.length-1;i++){var slide=this.slides[i];if(-this.x<slide.target)break;dragIndex=i}return{a:dragIndex,b:dragIndex+1}},proto.wrapDifference=function(a,b){var diff=b-a;if(!this.options.wrapAround)return diff;var diffPlus=diff+this.slideableWidth,diffMinus=diff-this.slideableWidth;return Math.abs(diffPlus)<Math.abs(diff)&&(diff=diffPlus),Math.abs(diffMinus)<Math.abs(diff)&&(diff=diffMinus),diff};var _getWrapShiftCells=proto._getWrapShiftCells;proto._getWrapShiftCells=function(){this.options.fade||_getWrapShiftCells.apply(this,arguments)};var shiftWrapCells=proto.shiftWrapCells;return proto.shiftWrapCells=function(){this.options.fade||shiftWrapCells.apply(this,arguments)},Flickity10})}}),require_photoswipe=__commonJS({"node_modules/photoswipe/dist/photoswipe.js"(exports,module){(function(root,factory){typeof define=="function"&&define.amd?define(factory):typeof exports=="object"?module.exports=factory():root.PhotoSwipe=factory()})(exports,function(){"use strict";var PhotoSwipe2=function(template,UiClass,items,options){var framework={features:null,bind:function(target,type,listener,unbind){var methodName=(unbind?"remove":"add")+"EventListener";type=type.split(" ");for(var i=0;i<type.length;i++)type[i]&&target[methodName](type[i],listener,!1)},isArray:function(obj){return obj instanceof Array},createEl:function(classes,tag){var el=document.createElement(tag||"div");return classes&&(el.className=classes),el},getScrollY:function(){var yOffset=window.pageYOffset;return yOffset!==void 0?yOffset:document.documentElement.scrollTop},unbind:function(target,type,listener){framework.bind(target,type,listener,!0)},removeClass:function(el,className){var reg=new RegExp("(\\s|^)"+className+"(\\s|$)");el.className=el.className.replace(reg," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")},addClass:function(el,className){framework.hasClass(el,className)||(el.className+=(el.className?" ":"")+className)},hasClass:function(el,className){return el.className&&new RegExp("(^|\\s)"+className+"(\\s|$)").test(el.className)},getChildByClass:function(parentEl,childClassName){for(var node=parentEl.firstChild;node;){if(framework.hasClass(node,childClassName))return node;node=node.nextSibling}},arraySearch:function(array,value,key){for(var i=array.length;i--;)if(array[i][key]===value)return i;return-1},extend:function(o1,o2,preventOverwrite){for(var prop in o2)if(o2.hasOwnProperty(prop)){if(preventOverwrite&&o1.hasOwnProperty(prop))continue;o1[prop]=o2[prop]}},easing:{sine:{out:function(k){return Math.sin(k*(Math.PI/2))},inOut:function(k){return-(Math.cos(Math.PI*k)-1)/2}},cubic:{out:function(k){return--k*k*k+1}}},detectFeatures:function(){if(framework.features)return framework.features;var helperEl=framework.createEl(),helperStyle=helperEl.style,vendor="",features={};if(features.oldIE=document.all&&!document.addEventListener,features.touch="ontouchstart"in window,window.requestAnimationFrame&&(features.raf=window.requestAnimationFrame,features.caf=window.cancelAnimationFrame),features.pointerEvent=!!window.PointerEvent||navigator.msPointerEnabled,!features.pointerEvent){var ua=navigator.userAgent;if(/iP(hone|od)/.test(navigator.platform)){var v=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);v&&v.length>0&&(v=parseInt(v[1],10),v>=1&&v<8&&(features.isOldIOSPhone=!0))}var match=ua.match(/Android\s([0-9\.]*)/),androidversion=match?match[1]:0;androidversion=parseFloat(androidversion),androidversion>=1&&(androidversion<4.4&&(features.isOldAndroid=!0),features.androidVersion=androidversion),features.isMobileOpera=/opera mini|o
1pera mobi/i.test(ua)}for(var styleChecks=["transform","perspective","animationName"],vendors=["","webkit","Moz","ms","O"],styleCheckItem,styleName,i=0;i<4;i++){vendor=vendors[i];for(var a=0;a<3;a++)styleCheckItem=styleChecks[a],styleName=vendor+(vendor?styleCheckItem.charAt(0).toUpperCase()+styleCheckItem.slice(1):styleCheckItem),!features[styleCheckItem]&&styleName in helperStyle&&(features[styleCheckItem]=styleName);vendor&&!features.raf&&(vendor=vendor.toLowerCase(),features.raf=window[vendor+"RequestAnimationFrame"],features.raf&&(features.caf=window[vendor+"CancelAnimationFrame"]||window[vendor+"CancelRequestAnimationFrame"]))}if(!features.raf){var lastTime=0;features.raf=function(fn){var currTime=new Date().getTime(),timeToCall=Math.max(0,16-(currTime-lastTime)),id=window.setTimeout(function(){fn(currTime+timeToCall)},timeToCall);return lastTime=currTime+timeToCall,id},features.caf=function(id){clearTimeout(id)}}return features.svg=!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,framework.features=features,features}};framework.detectFeatures(),framework.features.oldIE&&(framework.bind=function(target,type,listener,unbind){type=type.split(" ");for(var methodName=(unbind?"detach":"attach")+"Event",evName,_handleEv=function(){listener.handleEvent.call(listener)},i=0;i<type.length;i++)if(evName=type[i],evName)if(typeof listener=="object"&&listener.handleEvent){if(!unbind)listener["oldIE"+evName]=_handleEv;else if(!listener["oldIE"+evName])return!1;target[methodName]("on"+evName,listener["oldIE"+evName])}else target[methodName]("on"+evName,listener)});var self=this,DOUBLE_TAP_RADIUS=25,NUM_HOLDERS=3,_options={allowPanToNext:!0,spacing:.12,bgOpacity:1,mouseUsed:!1,loop:!0,pinchToClose:!0,closeOnScroll:!0,closeOnVerticalDrag:!0,verticalDragRange:.75,hideAnimationDuration:333,showAnimationDuration:333,showHideOpacity:!1,focus:!0,escKey:!0,arrowKeys:!0,mainScrollEndFriction:.35,panEndFriction:.35,isClickableElement:function(el){return el.tagName==="A"},getDoubleTapZoom:function(isMouseClick,item){return isMouseClick||item.initialZoomLevel<.7?1:1.33},maxSpreadZoom:1.33,modal:!0,scaleMode:"fit"};framework.extend(_options,options);var _getEmptyPoint=function(){return{x:0,y:0}},_isOpen,_isDestroying,_closedByScroll,_currentItemIndex,_containerStyle,_containerShiftIndex,_currPanDist=_getEmptyPoint(),_startPanOffset=_getEmptyPoint(),_panOffset=_getEmptyPoint(),_upMoveEvents,_downEvents,_globalEventHandlers,_viewportSize={},_currZoomLevel,_startZoomLevel,_translatePrefix,_translateSufix,_updateSizeInterval,_itemsNeedUpdate,_currPositionIndex=0,_offset={},_slideSize=_getEmptyPoint(),_itemHolders,_prevItemIndex,_indexDiff=0,_dragStartEvent,_dragMoveEvent,_dragEndEvent,_dragCancelEvent,_transformKey,_pointerEventEnabled,_isFixedPosition=!0,_likelyTouchDevice,_modules=[],_requestAF,_cancelAF,_initalClassName,_initalWindowScrollY,_oldIE,_currentWindowScrollY,_features,_windowVisibleSize={},_renderMaxResolution=!1,_orientationChangeTimeout,_registerModule=function(name,module2){framework.extend(self,module2.publicMethods),_modules.push(name)},_getLoopedId=function(index){var numSlides=_getNumItems();return index>numSlides-1?index-numSlides:index<0?numSlides+index:index},_listeners={},_listen=function(name,fn){return _listeners[name]||(_listeners[name]=[]),_listeners[name].push(fn)},_shout=function(name){var listeners=_listeners[name];if(listeners){var args=Array.prototype.slice.call(arguments);args.shift();for(var i=0;i<listeners.length;i++)listeners[i].apply(self,args)}},_getCurrentTime=function(){return new Date().getTime()},_applyBgOpacity=function(opacity){_bgOpacity=opacity,self.bg.style.opacity=opacity*_options.bgOpacity},_applyZoomTransform=function(styleObj,x,y,zoom,item){(!_renderMaxResolution||item&&item!==self.currItem)&&(zoom=zoom/(item?item.fitRatio:self.currItem.fitRatio)),styleObj[_transformKey]=_translatePrefix+x+"px, "+y+"px"+_translateSufix+" scale("+zoom+")"},_applyCurrentZoomPan=function(allowRenderResolution){_currZoomElementStyle&&(allowRenderResolution&&(_currZoomLevel>self.currItem.fitRatio?_renderMaxResolution||(_setImageSize(self.currItem,!1,!0),_renderMaxResolution=!0):_renderMaxResolution&&(_setImageSize(self.currItem),_renderMaxResolution=!1)),_applyZoomTransform(_currZoomElementStyle,_panOffset.x,_panOffset.
1y,_currZoomLevel))},_applyZoomPanToItem=function(item){item.container&&_applyZoomTransform(item.container.style,item.initialPosition.x,item.initialPosition.y,item.initialZoomLevel,item)},_setTranslateX=function(x,elStyle){elStyle[_transformKey]=_translatePrefix+x+"px, 0px"+_translateSufix},_moveMainScroll=function(x,dragging){if(!_options.loop&&dragging){var newSlideIndexOffset=_currentItemIndex+(_slideSize.x*_currPositionIndex-x)/_slideSize.x,delta2=Math.round(x-_mainScrollPos.x);(newSlideIndexOffset<0&&delta2>0||newSlideIndexOffset>=_getNumItems()-1&&delta2<0)&&(x=_mainScrollPos.x+delta2*_options.mainScrollEndFriction)}_mainScrollPos.x=x,_setTranslateX(x,_containerStyle)},_calculatePanOffset=function(axis,zoomLevel){var m=_midZoomPoint[axis]-_offset[axis];return _startPanOffset[axis]+_currPanDist[axis]+m-m*(zoomLevel/_startZoomLevel)},_equalizePoints=function(p1,p22){p1.x=p22.x,p1.y=p22.y,p22.id&&(p1.id=p22.id)},_roundPoint=function(p3){p3.x=Math.round(p3.x),p3.y=Math.round(p3.y)},_mouseMoveTimeout=null,_onFirstMouseMove=function(){_mouseMoveTimeout&&(framework.unbind(document,"mousemove",_onFirstMouseMove),framework.addClass(template,"pswp--has_mouse"),_options.mouseUsed=!0,_shout("mouseUsed")),_mouseMoveTimeout=setTimeout(function(){_mouseMoveTimeout=null},100)},_bindEvents=function(){framework.bind(document,"keydown",self),_features.transform&&framework.bind(self.scrollWrap,"click",self),_options.mouseUsed||framework.bind(document,"mousemove",_onFirstMouseMove),framework.bind(window,"resize scroll orientationchange",self),_shout("bindEvents")},_unbindEvents=function(){framework.unbind(window,"resize scroll orientationchange",self),framework.unbind(window,"scroll",_globalEventHandlers.scroll),framework.unbind(document,"keydown",self),framework.unbind(document,"mousemove",_onFirstMouseMove),_features.transform&&framework.unbind(self.scrollWrap,"click",self),_isDragging&&framework.unbind(window,_upMoveEvents,self),clearTimeout(_orientationChangeTimeout),_shout("unbindEvents")},_calculatePanBounds=function(zoomLevel,update){var bounds=_calculateItemSize(self.currItem,_viewportSize,zoomLevel);return update&&(_currPanBounds=bounds),bounds},_getMinZoomLevel=function(item){return item||(item=self.currItem),item.initialZoomLevel},_getMaxZoomLevel=function(item){return item||(item=self.currItem),item.w>0?_options.maxSpreadZoom:1},_modifyDestPanOffset=function(axis,destPanBounds,destPanOffset,destZoomLevel){return destZoomLevel===self.currItem.initialZoomLevel?(destPanOffset[axis]=self.currItem.initialPosition[axis],!0):(destPanOffset[axis]=_calculatePanOffset(axis,destZoomLevel),destPanOffset[axis]>destPanBounds.min[axis]?(destPanOffset[axis]=destPanBounds.min[axis],!0):destPanOffset[axis]<destPanBounds.max[axis]?(destPanOffset[axis]=destPanBounds.max[axis],!0):!1)},_setupTransforms=function(){if(_transformKey){var allow3dTransform=_features.perspective&&!_likelyTouchDevice;_translatePrefix="translate"+(allow3dTransform?"3d(":"("),_translateSufix=_features.perspective?", 0px)":")";return}_transformKey="left",framework.addClass(template,"pswp--ie"),_setTranslateX=function(x,elStyle){elStyle.left=x+"px"},_applyZoomPanToItem=function(item){var zoomRatio=item.fitRatio>1?1:item.fitRatio,s=item.container.style,w=zoomRatio*item.w,h=zoomRatio*item.h;s.width=w+"px",s.height=h+"px",s.left=item.initialPosition.x+"px",s.top=item.initialPosition.y+"px"},_applyCurrentZoomPan=function(){if(_currZoomElementStyle){var s=_currZoomElementStyle,item=self.currItem,zoomRatio=item.fitRatio>1?1:item.fitRatio,w=zoomRatio*item.w,h=zoomRatio*item.h;s.width=w+"px",s.height=h+"px",s.left=_panOffset.x+"px",s.top=_panOffset.y+"px"}}},_onKeyDown=function(e){var keydownAction="";_options.escKey&&e.keyCode===27?keydownAction="close":_options.arrowKeys&&(e.keyCode===37?keydownAction="prev":e.keyCode===39&&(keydownAction="next")),keydownAction&&!e.ctrlKey&&!e.altKey&&!e.shiftKey&&!e.metaKey&&(e.preventDefault?e.preventDefault():e.returnValue=!1,self[keydownAction]())},_onGlobalClick=function(e){e&&(_moved||_zoomStarted||_mainScrollAnimating||_verticalDragInitiated)&&(e.preventDefault(),e.stopPropagation())},_updatePageScrollOffset=function(){self.setScrollOffset(0,framework.getScrollY())},_animations={},_numAnimations=0,_stopAnimation=function(name){_animations[name]&&(_animations[name].raf&&_cancelAF(_animations[name].raf),_numAnimations--,delete _animations[name])},_registerStartAnimation=function(name){_animations[name]&&_stopAnimation(name),_animations[name]||(_numAnimations++,_animations[name]={})},_stopAllAnimations=function(){for(var prop in _animations)_animations.hasOwnProperty(prop)&&_stopAnimation(prop)},_animateProp=function(name,b,endProp,d,easingFn,onUpdate,onComplete){var startAnimTime=_getCurrentTime(),t;_registerStartAnimation(name);var animloop=function(){if(_animations[name]){if(t=_getCurrentTime()-startAnimTime,t>=d){_stopAnimation(name),onUpdate(endProp),onComplete&&onComplete();return}onUpdate((endProp-b)*easingFn(t/d)+b),_animations[name].raf=_requestAF(animloop)}};animloop()}
1,publicMethods={shout:_shout,listen:_listen,viewportSize:_viewportSize,options:_options,isMainScrollAnimating:function(){return _mainScrollAnimating},getZoomLevel:function(){return _currZoomLevel},getCurrentIndex:function(){return _currentItemIndex},isDragging:function(){return _isDragging},isZooming:function(){return _isZooming},setScrollOffset:function(x,y){_offset.x=x,_currentWindowScrollY=_offset.y=y,_shout("updateScrollOffset",_offset)},applyZoomPan:function(zoomLevel,panX,panY,allowRenderResolution){_panOffset.x=panX,_panOffset.y=panY,_currZoomLevel=zoomLevel,_applyCurrentZoomPan(allowRenderResolution)},init:function(){if(!(_isOpen||_isDestroying)){var i;self.framework=framework,self.template=template,self.bg=framework.getChildByClass(template,"pswp__bg"),_initalClassName=template.className,_isOpen=!0,_features=framework.detectFeatures(),_requestAF=_features.raf,_cancelAF=_features.caf,_transformKey=_features.transform,_oldIE=_features.oldIE,self.scrollWrap=framework.getChildByClass(template,"pswp__scroll-wrap"),self.container=framework.getChildByClass(self.scrollWrap,"pswp__container"),_containerStyle=self.container.style,self.itemHolders=_itemHolders=[{el:self.container.children[0],wrap:0,index:-1},{el:self.container.children[1],wrap:0,index:-1},{el:self.container.children[2],wrap:0,index:-1}],_itemHolders[0].el.style.display=_itemHolders[2].el.style.display="none",_setupTransforms(),_globalEventHandlers={resize:self.updateSize,orientationchange:function(){clearTimeout(_orientationChangeTimeout),_orientationChangeTimeout=setTimeout(function(){_viewportSize.x!==self.scrollWrap.clientWidth&&self.updateSize()},500)},scroll:_updatePageScrollOffset,keydown:_onKeyDown,click:_onGlobalClick};var oldPhone=_features.isOldIOSPhone||_features.isOldAndroid||_features.isMobileOpera;for((!_features.animationName||!_features.transform||oldPhone)&&(_options.showAnimationDuration=_options.hideAnimationDuration=0),i=0;i<_modules.length;i++)self["init"+_modules[i]]();if(UiClass){var ui=self.ui=new UiClass(self,framework);ui.init()}_shout("firstUpdate"),_currentItemIndex=_currentItemIndex||_options.index||0,(isNaN(_currentItemIndex)||_currentItemIndex<0||_currentItemIndex>=_getNumItems())&&(_currentItemIndex=0),self.currItem=_getItemAt(_currentItemIndex),(_features.isOldIOSPhone||_features.isOldAndroid)&&(_isFixedPosition=!1),template.setAttribute("aria-hidden","false"),_options.modal&&(_isFixedPosition?template.style.position="fixed":(template.style.position="absolute",template.style.top=framework.getScrollY()+"px")),_currentWindowScrollY===void 0&&(_shout("initialLayout"),_currentWindowScrollY=_initalWindowScrollY=framework.getScrollY());var rootClasses="pswp--open ";for(_options.mainClass&&(rootClasses+=_options.mainClass+" "),_options.showHideOpacity&&(rootClasses+="pswp--animate_opacity "),rootClasses+=_likelyTouchDevice?"pswp--touch":"pswp--notouch",rootClasses+=_features.animationName?" pswp--css_animation":"",rootClasses+=_features.svg?" pswp--svg":"",framework.addClass(template,rootClasses),self.updateSize(),_containerShiftIndex=-1,_indexDiff=null,i=0;i<NUM_HOLDERS;i++)_setTranslateX((i+_containerShiftIndex)*_slideSize.x,_itemHolders[i].el.style);_oldIE||framework.bind(self.scrollWrap,_downEvents,self),_listen("initialZoomInEnd",function(){self.setContent(_itemHolders[0],_currentItemIndex-1),self.setContent(_itemHolders[2],_currentItemIndex+1),_itemHolders[0].el.style.display=_itemHolders[2].el.style.display="block",_options.focus&&template.focus(),_bindEvents()}),self.setContent(_itemHolders[1],_currentItemIndex),self.updateCurrItem(),_shout("afterInit"),_isFixedPosition||(_updateSizeInterval=setInterval(function(){!_numAnimations&&!_isDragging&&!_isZooming&&_currZoomLevel===self.currItem.initialZoomLevel&&self.updateSize()},1e3)),framework.addClass(template,"pswp--visible")}},close:function(){_isOpen&&(_isOpen=!1,_isDestroying=!0,_shout("close"),_unbindEvents(),_showOrHide(self.currItem,null,!0,self.destroy))},destroy:function(){_shout("destroy"),_showOrHideTimeout&&clearTimeout(_showOrHideTimeout),template.setAttribute("aria-hidden","true"),template.className=_initalClassName,_updateSizeInterval&&clearInterval(_updateSizeInterval),framework.unbind(self.scrollWrap,_downEvents,self),framework.unbind(window,"scroll",self),_stopDragUpdateLoop(),_stopAllAnimations(),_listeners=null},panTo:function(x,y,force){force||(x>_currPanBounds.min.x?x=_currPanBounds.min.x:x<_currPanBounds.max.x&&(x=_currPanBounds.max.x),y>_currPanBounds.min.y?y=_currPanBounds.min.y:y<_currPanBounds.max.y&&(y=_currPanBounds.max.y)),_panOffset.x=x,_panOffset.
1y=y,_applyCurrentZoomPan()},handleEvent:function(e){e=e||window.event,_globalEventHandlers[e.type]&&_globalEventHandlers[e.type](e)},goTo:function(index){index=_getLoopedId(index);var diff=index-_currentItemIndex;_indexDiff=diff,_currentItemIndex=index,self.currItem=_getItemAt(_currentItemIndex),_currPositionIndex-=diff,_moveMainScroll(_slideSize.x*_currPositionIndex),_stopAllAnimations(),_mainScrollAnimating=!1,self.updateCurrItem()},next:function(){self.goTo(_currentItemIndex+1)},prev:function(){self.goTo(_currentItemIndex-1)},updateCurrZoomItem:function(emulateSetContent){if(emulateSetContent&&_shout("beforeChange",0),_itemHolders[1].el.children.length){var zoomElement=_itemHolders[1].el.children[0];framework.hasClass(zoomElement,"pswp__zoom-wrap")?_currZoomElementStyle=zoomElement.style:_currZoomElementStyle=null}else _currZoomElementStyle=null;_currPanBounds=self.currItem.bounds,_startZoomLevel=_currZoomLevel=self.currItem.initialZoomLevel,_panOffset.x=_currPanBounds.center.x,_panOffset.y=_currPanBounds.center.y,emulateSetContent&&_shout("afterChange")},invalidateCurrItems:function(){_itemsNeedUpdate=!0;for(var i=0;i<NUM_HOLDERS;i++)_itemHolders[i].item&&(_itemHolders[i].item.needsUpdate=!0)},updateCurrItem:function(beforeAnimation){if(_indexDiff!==0){var diffAbs=Math.abs(_indexDiff),tempHolder;if(!(beforeAnimation&&diffAbs<2)){self.currItem=_getItemAt(_currentItemIndex),_renderMaxResolution=!1,_shout("beforeChange",_indexDiff),diffAbs>=NUM_HOLDERS&&(_containerShiftIndex+=_indexDiff+(_indexDiff>0?-NUM_HOLDERS:NUM_HOLDERS),diffAbs=NUM_HOLDERS);for(var i=0;i<diffAbs;i++)_indexDiff>0?(tempHolder=_itemHolders.shift(),_itemHolders[NUM_HOLDERS-1]=tempHolder,_containerShiftIndex++,_setTranslateX((_containerShiftIndex+2)*_slideSize.x,tempHolder.el.style),self.setContent(tempHolder,_currentItemIndex-diffAbs+i+1+1)):(tempHolder=_itemHolders.pop(),_itemHolders.unshift(tempHolder),_containerShiftIndex--,_setTranslateX(_containerShiftIndex*_slideSize.x,tempHolder.el.style),self.setContent(tempHolder,_currentItemIndex+diffAbs-i-1-1));if(_currZoomElementStyle&&Math.abs(_indexDiff)===1){var prevItem=_getItemAt(_prevItemIndex);prevItem.initialZoomLevel!==_currZoomLevel&&(_calculateItemSize(prevItem,_viewportSize),_setImageSize(prevItem),_applyZoomPanToItem(prevItem))}_indexDiff=0,self.updateCurrZoomItem(),_prevItemIndex=_currentItemIndex,_shout("afterChange")}}},updateSize:function(force){if(!_isFixedPosition&&_options.modal){var windowScrollY=framework.getScrollY();if(_currentWindowScrollY!==windowScrollY&&(template.style.top=windowScrollY+"px",_currentWindowScrollY=windowScrollY),!force&&_windowVisibleSize.x===window.innerWidth&&_windowVisibleSize.y===window.innerHeight)return;_windowVisibleSize.x=window.innerWidth,_windowVisibleSize.y=window.innerHeight,template.style.height=_windowVisibleSize.y+"px"}if(_viewportSize.x=self.scrollWrap.clientWidth,_viewportSize.y=self.scrollWrap.clientHeight,_updatePageScrollOffset(),_slideSize.x=_viewportSize.x+Math.round(_viewportSize.x*_options.spacing),_slideSize.y=_viewportSize.y,_moveMainScroll(_slideSize.x*_currPositionIndex),_shout("beforeResize"),_containerShiftIndex!==void 0){for(var holder,item,hIndex,i=0;i<NUM_HOLDERS;i++)holder=_itemHolders[i],_setTranslateX((i+_containerShiftIndex)*_slideSize.x,holder.el.style),hIndex=_currentItemIndex+i-1,_options.loop&&_getNumItems()>2&&(hIndex=_getLoopedId(hIndex)),item=_getItemAt(hIndex),item&&(_itemsNeedUpdate||item.needsUpdate||!item.bounds)?(self.cleanSlide(item),self.setContent(holder,hIndex),i===1&&(self.currItem=item,self.updateCurrZoomItem(!0)),item.needsUpdate=!1):holder.index===-1&&hIndex>=0&&self.setContent(holder,hIndex),item&&item.container&&(_calculateItemSize(item,_viewportSize),_setImageSize(item),_applyZoomPanToItem(item));_itemsNeedUpdate=!1}_startZoomLevel=_currZoomLevel=self.currItem.initialZoomLevel,_currPanBounds=self.currItem.bounds,_currPanBounds&&(_panOffset.x=_currPanBounds.center.x,_panOffset.y=_currPanBounds.center.y,_applyCurrentZoomPan(!0)),_shout("resize")},zoomTo:function(destZoomLevel,centerPoint,speed,easingFn,updateFn){centerPoint&&(_startZoomLevel=_currZoomLevel,_midZoomPoint.x=Math.abs(centerPoint.x)-_panOffset.x,_midZoomPoint.y=Math.abs(centerPoint.y)-_panOffset.
1y,_equalizePoints(_startPanOffset,_panOffset));var destPanBounds=_calculatePanBounds(destZoomLevel,!1),destPanOffset={};_modifyDestPanOffset("x",destPanBounds,destPanOffset,destZoomLevel),_modifyDestPanOffset("y",destPanBounds,destPanOffset,destZoomLevel);var initialZoomLevel=_currZoomLevel,initialPanOffset={x:_panOffset.x,y:_panOffset.y};_roundPoint(destPanOffset);var onUpdate=function(now){now===1?(_currZoomLevel=destZoomLevel,_panOffset.x=destPanOffset.x,_panOffset.y=destPanOffset.y):(_currZoomLevel=(destZoomLevel-initialZoomLevel)*now+initialZoomLevel,_panOffset.x=(destPanOffset.x-initialPanOffset.x)*now+initialPanOffset.x,_panOffset.y=(destPanOffset.y-initialPanOffset.y)*now+initialPanOffset.y),updateFn&&updateFn(now),_applyCurrentZoomPan(now===1)};speed?_animateProp("customZoomTo",0,1,speed,easingFn||framework.easing.sine.inOut,onUpdate):onUpdate(1)}},MIN_SWIPE_DISTANCE=30,DIRECTION_CHECK_OFFSET=10,_gestureStartTime,_gestureCheckSpeedTime,p={},p2={},delta={},_currPoint={},_startPoint={},_currPointers=[],_startMainScrollPos={},_releaseAnimData,_posPoints=[],_tempPoint={},_isZoomingIn,_verticalDragInitiated,_oldAndroidTouchEndTimeout,_currZoomedItemIndex=0,_centerPoint=_getEmptyPoint(),_lastReleaseTime=0,_isDragging,_isMultitouch,_zoomStarted,_moved,_dragAnimFrame,_mainScrollShifted,_currentPoints,_isZooming,_currPointsDistance,_startPointsDistance,_currPanBounds,_mainScrollPos=_getEmptyPoint(),_currZoomElementStyle,_mainScrollAnimating,_midZoomPoint=_getEmptyPoint(),_currCenterPoint=_getEmptyPoint(),_direction,_isFirstMove,_opacityChanged,_bgOpacity,_wasOverInitialZoom,_isEqualPoints=function(p1,p22){return p1.x===p22.x&&p1.y===p22.y},_isNearbyPoints=function(touch0,touch1){return Math.abs(touch0.x-touch1.x)<DOUBLE_TAP_RADIUS&&Math.abs(touch0.y-touch1.y)<DOUBLE_TAP_RADIUS},_calculatePointsDistance=function(p1,p22){return _tempPoint.x=Math.abs(p1.x-p22.x),_tempPoint.y=Math.abs(p1.y-p22.y),Math.sqrt(_tempPoint.x*_tempPoint.x+_tempPoint.y*_tempPoint.y)},_stopDragUpdateLoop=function(){_dragAnimFrame&&(_cancelAF(_dragAnimFrame),_dragAnimFrame=null)},_dragUpdateLoop=function(){_isDragging&&(_dragAnimFrame=_requestAF(_dragUpdateLoop),_renderMovement())},_canPan=function(){return!(_options.scaleMode==="fit"&&_currZoomLevel===self.currItem.initialZoomLevel)},_closestElement=function(el,fn){return!el||el===document||el.getAttribute("class")&&el.getAttribute("class").indexOf("pswp__scroll-wrap")>-1?!1:fn(el)?el:_closestElement(el.parentNode,fn)},_preventObj={},_preventDefaultEventBehaviour=function(e,isDown){return _preventObj.prevent=!_closestElement(e.target,_options.isClickableElement),_shout("preventDragEvent",e,isDown,_preventObj),_preventObj.prevent},_convertTouchToPoint=function(touch,p3){return p3.x=touch.pageX,p3.y=touch.pageY,p3.id=touch.identifier,p3},_findCenterOfPoints=function(p1,p22,pCenter){pCenter.x=(p1.x+p22.x)*.5,pCenter.y=(p1.y+p22.y)*.5},_pushPosPoint=function(time,x,y){if(time-_gestureCheckSpeedTime>50){var o=_posPoints.length>2?_posPoints.shift():{};o.x=x,o.y=y,_posPoints.push(o),_gestureCheckSpeedTime=time}},_calculateVerticalDragOpacityRatio=function(){var yOffset=_panOffset.y-self.currItem.initialPosition.y;return 1-Math.abs(yOffset/(_viewportSize.y/2))},_ePoint1={},_ePoint2={},_tempPointsArr=[],_tempCounter,_getTouchPoints=function(e){for(;_tempPointsArr.length>0;)_tempPointsArr.pop();return _pointerEventEnabled?(_tempCounter=0,_currPointers.forEach(function(p3){_tempCounter===0?_tempPointsArr[0]=p3:_tempCounter===1&&(_tempPointsArr[1]=p3),_tempCounter++})):e.type.indexOf("touch")>-1?e.touches&&e.touches.length>0&&(_tempPointsArr[0]=_convertTouchToPoint(e.touches[0],_ePoint1),e.touches.length>1&&(_tempPointsArr[1]=_convertTouchToPoint(e.touches[1],_ePoint2))):(_ePoint1.x=e.pageX,_ePoint1.y=e.pageY,_ePoint1.id="",_tempPointsArr[0]=_ePoint1),_tempPointsArr},_panOrMoveMainScroll=function(axis,delta2){var panFriction,overDiff=0,newOffset=_panOffset[axis]+delta2[axis],startOverDiff,dir=delta2[axis]>0,newMainScrollPosition=_mainScrollPos.x+delta2.x,mainScrollDiff=_mainScrollPos.x-_startMainScrollPos.x,newPanPos,newMainScrollPos;if(newOffset>_currPanBounds.min[axis]||newOffset<_currPanBounds.max[axis]?panFriction=_options.panEndFriction:panFriction=1,newOffset=_panOffset[axis]+delta2[axis]*panFriction,(_options.allowPanToNext||_currZoomLevel===self.currItem.initialZoomLevel)&&(_currZoomElementStyle?_direction==="h"&&axis==="x"&&!_zoomStarted&&(dir?(newOffset>_currPanBounds.min[axis]&&(panFriction=_options.panEndFriction,overDiff=_currPanBounds.min[axis]-newOffset,startOverDiff=_currPanBounds.min[axis]-_startPanOffset[axis]),(startOverDiff<=0||mainScrollDiff<0)&&_getNumItems()>1?(newMainScrollPos=newMainScrollPosition,mainScrollDiff<0&&newMainScrollPosition>
1_startMainScrollPos.x&&(newMainScrollPos=_startMainScrollPos.x)):_currPanBounds.min.x!==_currPanBounds.max.x&&(newPanPos=newOffset)):(newOffset<_currPanBounds.max[axis]&&(panFriction=_options.panEndFriction,overDiff=newOffset-_currPanBounds.max[axis],startOverDiff=_startPanOffset[axis]-_currPanBounds.max[axis]),(startOverDiff<=0||mainScrollDiff>0)&&_getNumItems()>1?(newMainScrollPos=newMainScrollPosition,mainScrollDiff>0&&newMainScrollPosition<_startMainScrollPos.x&&(newMainScrollPos=_startMainScrollPos.x)):_currPanBounds.min.x!==_currPanBounds.max.x&&(newPanPos=newOffset))):newMainScrollPos=newMainScrollPosition,axis==="x"))return newMainScrollPos!==void 0&&(_moveMainScroll(newMainScrollPos,!0),newMainScrollPos===_startMainScrollPos.x?_mainScrollShifted=!1:_mainScrollShifted=!0),_currPanBounds.min.x!==_currPanBounds.max.x&&(newPanPos!==void 0?_panOffset.x=newPanPos:_mainScrollShifted||(_panOffset.x+=delta2.x*panFriction)),newMainScrollPos!==void 0;_mainScrollAnimating||_mainScrollShifted||_currZoomLevel>self.currItem.fitRatio&&(_panOffset[axis]+=delta2[axis]*panFriction)},_onDragStart=function(e){if(!(e.type==="mousedown"&&e.button>0)){if(_initialZoomRunning){e.preventDefault();return}if(!(_oldAndroidTouchEndTimeout&&e.type==="mousedown")){if(_preventDefaultEventBehaviour(e,!0)&&e.preventDefault(),_shout("pointerDown"),_pointerEventEnabled){var pointerIndex=framework.arraySearch(_currPointers,e.pointerId,"id");pointerIndex<0&&(pointerIndex=_currPointers.length),_currPointers[pointerIndex]={x:e.pageX,y:e.pageY,id:e.pointerId}}var startPointsList=_getTouchPoints(e),numPoints=startPointsList.length;_currentPoints=null,_stopAllAnimations(),(!_isDragging||numPoints===1)&&(_isDragging=_isFirstMove=!0,framework.bind(window,_upMoveEvents,self),_isZoomingIn=_wasOverInitialZoom=_opacityChanged=_verticalDragInitiated=_mainScrollShifted=_moved=_isMultitouch=_zoomStarted=!1,_direction=null,_shout("firstTouchStart",startPointsList),_equalizePoints(_startPanOffset,_panOffset),_currPanDist.x=_currPanDist.y=0,_equalizePoints(_currPoint,
1startPointsList[0]),_equalizePoints(_startPoint,_currPoint),_startMainScrollPos.x=_slideSize.x*_currPositionIndex,_posPoints=[{x:_currPoint.x,y:_currPoint.y}],_gestureCheckSpeedTime=_gestureStartTime=_getCurrentTime(),_calculatePanBounds(_currZoomLevel,!0),_stopDragUpdateLoop(),_dragUpdateLoop()),!_isZooming&&numPoints>1&&!_mainScrollAnimating&&!_mainScrollShifted&&(_startZoomLevel=_currZoomLevel,_zoomStarted=!1,_isZooming=_isMultitouch=!0,_currPanDist.y=_currPanDist.x=0,_equalizePoints(_startPanOffset,_panOffset),_equalizePoints(p,startPointsList[0]),_equalizePoints(p2,startPointsList[1]),_findCenterOfPoints(p,p2,_currCenterPoint),_midZoomPoint.x=Math.abs(_currCenterPoint.x)-_panOffset.x,_midZoomPoint.y=Math.abs(_currCenterPoint.y)-_panOffset.y,_currPointsDistance=_startPointsDistance=_calculatePointsDistance(p,p2))}}},_onDragMove=function(e){if(e.preventDefault(),_pointerEventEnabled){var pointerIndex=framework.arraySearch(_currPointers,e.pointerId,"id");if(pointerIndex>-1){var p3=_currPointers[pointerIndex];p3.x=e.pageX,p3.y=e.pageY}}if(_isDragging){var touchesList=_getTouchPoints(e);if(!_direction&&!_moved&&!_isZooming)if(_mainScrollPos.x!==_slideSize.x*_currPositionIndex)_direction="h";else{var diff=Math.abs(touchesList[0].x-_currPoint.x)-Math.abs(touchesList[0].y-_currPoint.y);Math.abs(diff)>=DIRECTION_CHECK_OFFSET&&(_direction=diff>0?"h":"v",_currentPoints=touchesList)}else _currentPoints=touchesList}},_renderMovement=function(){if(_currentPoints){var numPoints=_currentPoints.length;if(numPoints!==0)if(_equalizePoints(p,_currentPoints[0]),delta.x=p.x-_currPoint.x,delta.y=p.y-_currPoint.y,_isZooming&&numPoints>1){if(_currPoint.x=p.x,_currPoint.y=p.y,!delta.x&&!delta.y&&_isEqualPoints(_currentPoints[1],p2))return;_equalizePoints(p2,_currentPoints[1]),_zoomStarted||(_zoomStarted=!0,_shout("zoomGestureStarted"));var pointsDistance=_calculatePointsDistance(p,p2),zoomLevel=_calculateZoomLevel(pointsDistance);zoomLevel>self.currItem.initialZoomLevel+self.currItem.initialZoomLevel/15&&(_wasOverInitialZoom=!0);var zoomFriction=1,minZoomLevel=_getMinZoomLevel(),maxZoomLevel=_getMaxZoomLevel();if(zoomLevel<minZoomLevel)if(_options.pinchToClose&&!_wasOverInitialZoom&&_startZoomLevel<=self.currItem.initialZoomLevel){var minusDiff=minZoomLevel-zoomLevel,percent=1-minusDiff/(minZoomLevel/1.2);_applyBgOpacity(percent),_shout("onPinchClose",percent),_opacityChanged=!0}else zoomFriction=(minZoomLevel-zoomLevel)/minZoomLevel,zoomFriction>1&&(zoomFriction=1),zoomLevel=minZoomLevel-zoomFriction*(minZoomLevel/3);else zoomLevel>maxZoomLevel&&(zoomFriction=(zoomLevel-maxZoomLevel)/(minZoomLevel*6),zoomFriction>1&&(zoomFriction=1),zoomLevel=maxZoomLevel+zoomFriction*minZoomLevel);zoomFriction<0&&(zoomFriction=0),_currPointsDistance=pointsDistance,_findCenterOfPoints(p,p2,_centerPoint),_currPanDist.x+=_centerPoint.x-_currCenterPoint.x,_currPanDist.y+=_centerPoint.y-_currCenterPoint.y,_equalizePoints(_currCenterPoint,_centerPoint),_panOffset.x=_calculatePanOffset("x",zoomLevel),_panOffset.y=_calculatePanOffset("y",zoomLevel),_isZoomingIn=zoomLevel>_currZoomLevel,_currZoomLevel=zoomLevel,_applyCurrentZoomPan()}else{if(!_direction||(_isFirstMove&&(_isFirstMove=!1,Math.abs(delta.x)>=DIRECTION_CHECK_OFFSET&&(delta.x-=_currentPoints[0].x-_startPoint.x),Math.abs(delta.y)>=DIRECTION_CHECK_OFFSET&&(delta.y-=_currentPoints[0].y-_startPoint.y)),_currPoint.x=p.x,_currPoint.y=p.y,delta.x===0&&delta.y===0))return;if(_direction==="v"&&_options.closeOnVerticalDrag&&!_canPan()){_currPanDist.y+=delta.y,_panOffset.y+=delta.y;var opacityRatio=_calculateVerticalDragOpacityRatio();_verticalDragInitiated=!0,_shout("onVerticalDrag",opacityRatio),_applyBgOpacity(opacityRatio),_applyCurrentZoomPan();return}_pushPosPoint(_getCurrentTime(),p.x,p.y),_moved=!0,_currPanBounds=self.currItem.bounds;var mainScrollChanged=_panOrMoveMainScroll("x",delta);mainScrollChanged||(_panOrMoveMainScroll("y",delta),_roundPoint(_panOffset),_applyCurrentZoomPan())}}},_onDragRelease=function(e){if(_features.isOldAndroid){if(_oldAndroidTouchEndTimeout&&e.type==="mouseup")return;e.type.indexOf("touch")>-1&&(clearTimeout(_oldAndroidTouchEndTimeout),_oldAndroidTouchEndTimeout=setTimeout(function(){_oldAndroidTouchEndTimeout=0},600))}_shout("pointerUp"),_preventDefaultEventBehaviour(e,!1)&&e.preventDefault();var releasePoint;if(_pointerEventEnabled){var pointerIndex=framework.arraySearch(_currPointers,e.pointerId,"id");if(pointerIndex>-1)if(releasePoint=_currPointers.splice(pointerIndex,1)[0],navigator.msPointerEnabled){var MSPOINTER_TYPES={4:"mouse",2:"touch",3:"pen"};releasePoint.type=MSPOINTER_TYPES[e.pointerType],releasePoint.type||(releasePoint.type=e.pointerType||"mouse")}else releasePoint.type=e.pointerType||"mouse"}var touchList=_getTouchPoints(e),gestureType,numPoints=touchList.length;if(e.type==="mouseup"&&(numPoints=0),numPoints===2)return _currentPoints=null,!0;numPoints===1&&_equalizePoints(_startPoint,touchList[0]),numPoints===0&&!_direction&&!_mainScrollAnimating&&(releasePoint||(e.type==="mouseup"?releasePoint={x:e.pageX,y:e.pageY,type:"mouse"}:e.changedTouches&&e.changedTouches[0]&&(releasePoint={x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY,type:"touch"})),_shout("touchRelease",e,releasePoint));var releaseTimeDiff=-1;if(numPoints===0&&(_isDragging=!1,framework.unbind(window,_upMoveEvents,self),_stopDragUpdateLoop(),_isZooming?releaseTimeDiff=0:_lastReleaseTime!==-1&&(releaseTimeDiff=_getCurrentTime()-_lastReleaseTime)),_lastReleaseTime=numPoints===1?_getCurrentTime():-1,releaseTimeDiff!==-1&&releaseTimeDiff<150?gestureType="zoom":gestureType="swipe",_isZooming&&numPoints<2&&(_isZooming=!1,numPoints===1&&(gestureType="zoomPointerUp"),_shout("zoomGestureEnded")),_currentPoints=null,!(!_moved&&!_zoomStarted&&!_mainScrollAnimating&&!_verticalDragInitiated)){if(_stopAllAnimations(),_releaseAnimData||(_releaseAnimData=_initDragReleaseAnimationData()),_releaseAnimData.calculateSwipeSpeed("x"),_verticalDragInitiated){var opacityRatio=_calculateVerticalDragOpacityRatio();if(opacityRatio<_options.verticalDragRange)self.close();
1else{var initalPanY=_panOffset.y,initialBgOpacity=_bgOpacity;_animateProp("verticalDrag",0,1,300,framework.easing.cubic.out,function(now){_panOffset.y=(self.currItem.initialPosition.y-initalPanY)*now+initalPanY,_applyBgOpacity((1-initialBgOpacity)*now+initialBgOpacity),_applyCurrentZoomPan()}),_shout("onVerticalDrag",1)}return}if((_mainScrollShifted||_mainScrollAnimating)&&numPoints===0){var itemChanged=_finishSwipeMainScrollGesture(gestureType,_releaseAnimData);if(itemChanged)return;gestureType="zoomPointerUp"}if(!_mainScrollAnimating){if(gestureType!=="swipe"){_completeZoomGesture();return}!_mainScrollShifted&&_currZoomLevel>self.currItem.fitRatio&&_completePanGesture(_releaseAnimData)}}},_initDragReleaseAnimationData=function(){var lastFlickDuration,tempReleasePos,s={lastFlickOffset:{},lastFlickDist:{},lastFlickSpeed:{},slowDownRatio:{},slowDownRatioReverse:{},speedDecelerationRatio:{},speedDecelerationRatioAbs:{},distanceOffset:{},backAnimDestination:{},backAnimStarted:{},calculateSwipeSpeed:function(axis){_posPoints.length>1?(lastFlickDuration=_getCurrentTime()-_gestureCheckSpeedTime+50,tempReleasePos=_posPoints[_posPoints.length-2][axis]):(lastFlickDuration=_getCurrentTime()-_gestureStartTime,tempReleasePos=_startPoint[axis]),s.lastFlickOffset[axis]=_currPoint[axis]-tempReleasePos,s.lastFlickDist[axis]=Math.abs(s.lastFlickOffset[axis]),s.lastFlickDist[axis]>20?s.lastFlickSpeed[axis]=s.lastFlickOffset[axis]/lastFlickDuration:s.lastFlickSpeed[axis]=0,Math.abs(s.lastFlickSpeed[axis])<.1&&(s.lastFlickSpeed[axis]=0),s.slowDownRatio[axis]=.95,s.slowDownRatioReverse[axis]=1-s.slowDownRatio[axis],s.speedDecelerationRatio[axis]=1},calculateOverBoundsAnimOffset:function(axis,speed){s.backAnimStarted[axis]||(_panOffset[axis]>_currPanBounds.min[axis]?s.backAnimDestination[axis]=_currPanBounds.min[axis]:_panOffset[axis]<_currPanBounds.max[axis]&&(s.backAnimDestination[axis]=_currPanBounds.max[axis]),s.backAnimDestination[axis]!==void 0&&(s.slowDownRatio[axis]=.7,s.slowDownRatioReverse[axis]=1-s.slowDownRatio[axis],s.speedDecelerationRatioAbs[axis]<.05&&(s.lastFlickSpeed[axis]=0,s.backAnimStarted[axis]=!0,_animateProp("bounceZoomPan"+axis,_panOffset[axis],s.backAnimDestination[axis],speed||300,framework.easing.sine.out,function(pos){_panOffset[axis]=pos,_applyCurrentZoomPan()}))))},calculateAnimOffset:function(axis){s.backAnimStarted[axis]||(s.speedDecelerationRatio[axis]=s.speedDecelerationRatio[axis]*(s.slowDownRatio[axis]+s.slowDownRatioReverse[axis]-s.slowDownRatioReverse[axis]*s.timeDiff/10),s.speedDecelerationRatioAbs[axis]=Math.abs(s.lastFlickSpeed[axis]*s.speedDecelerationRatio[axis]),s.distanceOffset[axis]=s.lastFlickSpeed[axis]*s.speedDecelerationRatio[axis]*s.timeDiff,_panOffset[axis]+=s.distanceOffset[axis])},panAnimLoop:function(){if(_animations.zoomPan&&(_animations.zoomPan.raf=_requestAF(s.panAnimLoop),s.now=_getCurrentTime(),s.timeDiff=s.now-s.lastNow,s.lastNow=s.now,s.calculateAnimOffset("x"),s.calculateAnimOffset("y"),_applyCurrentZoomPan(),s.calculateOverBoundsAnimOffset("x"),s.calculateOverBoundsAnimOffset("y"),s.speedDecelerationRatioAbs.x<.05&&s.speedDecelerationRatioAbs.y<.05)){_panOffset.x=Math.round(_panOffset.x),_panOffset.y=Math.round(_panOffset.y),_applyCurrentZoomPan(),_stopAnimation("zoomPan");return}}};return s},_completePanGesture=function(animData){if(animData.calculateSwipeSpeed("y"),_currPanBounds=self.currItem.bounds,animData.backAnimDestination={},animData.backAnimStarted={},Math.abs(animData.lastFlickSpeed.x)<=.05&&Math.abs(animData.lastFlickSpeed.y)<=.05)return animData.speedDecelerationRatioAbs.x=animData.speedDecelerationRatioAbs.y=0,animData.calculateOverBoundsAnimOffset("x"),animData.calculateOverBoundsAnimOffset("y"),!0;_registerStartAnimation("zoomPan"),animData.lastNow=_getCurrentTime(),animData.panAnimLoop()},_finishSwipeMainScrollGesture=function(gestureType,_releaseAnimData2){var itemChanged;_mainScrollAnimating||(_currZoomedItemIndex=_currentItemIndex);var itemsDiff;if(gestureType==="swipe"){var totalShiftDist=_currPoint.x-_startPoint.x,isFastLastFlick=_releaseAnimData2.lastFlickDist.x<10;totalShiftDist>MIN_SWIPE_DISTANCE&&(isFastLastFlick||_releaseAnimData2.lastFlickOffset.x>20)?itemsDiff=-1:totalShiftDist<-MIN_SWIPE_DISTANCE&&(isFastLastFlick||_releaseAnimData2.lastFlickOffset.x<-20)&&(itemsDiff=1)}var nextCircle;itemsDiff&&(_currentItemIndex+=itemsDiff,_currentItemIndex<0?(_currentItemIndex=_options.loop?_getNumItems()-1:0,nextCircle=!0):_currentItemIndex>=_getNumItems()&&(_currentItemIndex=_options.loop?0:_getNumItems()-1,nextCircle=!0),(!nextCircle||_options.loop)&&(_indexDiff+=itemsDiff,_currPositionIndex-=itemsDiff,itemChanged=!0));var animateToX=_slideSize.x*_currPositionIndex,animateToDist=Math.abs(animateToX-_mainScrollPos.x),finishAnimDuration;return!itemChanged&&animateToX>_mainScrollPos.x!=_releaseAnimData2.lastFlickSpeed.x>0?finishAnimDuration=333:(finishAnimDuration=Math.abs(_releaseAnimData2.lastFlickSpeed.x)>0?animateToDist/Math.abs(_releaseAnimData2.lastFlickSpeed.x):333,finishAnimDuration=Math.min(finishAnimDuration,400),finishAnimDuration=Math.max(finishAnimDuration,250)),_currZoomedItemIndex===_currentItemIndex&&(itemChanged=!1),_mainScrollAnimating=!0,_shout("mainScrollAnimStart"),_animateProp("mainScroll",_mainScrollPos.x,animateToX,finishAnimDuration,framework.easing.cubic.out,_moveMainScroll,function(){_stopAllAnimations(),_mainScrollAnimating=!1,_currZoomedItemIndex=-1,(itemChanged||_currZoomedItemIndex!==_currentItemIndex)&&self.updateCurrItem(),_shout("mainScrollAnimComplete")}
1),itemChanged&&self.updateCurrItem(!0),itemChanged},_calculateZoomLevel=function(touchesDistance){return 1/_startPointsDistance*touchesDistance*_startZoomLevel},_completeZoomGesture=function(){var destZoomLevel=_currZoomLevel,minZoomLevel=_getMinZoomLevel(),maxZoomLevel=_getMaxZoomLevel();_currZoomLevel<minZoomLevel?destZoomLevel=minZoomLevel:_currZoomLevel>maxZoomLevel&&(destZoomLevel=maxZoomLevel);var destOpacity=1,onUpdate,initialOpacity=_bgOpacity;return _opacityChanged&&!_isZoomingIn&&!_wasOverInitialZoom&&_currZoomLevel<minZoomLevel?(self.close(),!0):(_opacityChanged&&(onUpdate=function(now){_applyBgOpacity((destOpacity-initialOpacity)*now+initialOpacity)}),self.zoomTo(destZoomLevel,0,200,framework.easing.cubic.out,onUpdate),!0)};_registerModule("Gestures",{publicMethods:{initGestures:function(){var addEventNames=function(pref,down,move,up,cancel){_dragStartEvent=pref+down,_dragMoveEvent=pref+move,_dragEndEvent=pref+up,cancel?_dragCancelEvent=pref+cancel:_dragCancelEvent=""};_pointerEventEnabled=_features.pointerEvent,_pointerEventEnabled&&_features.touch&&(_features.touch=!1),_pointerEventEnabled?navigator.msPointerEnabled?addEventNames("MSPointer","Down","Move","Up","Cancel"):addEventNames("pointer","down","move","up","cancel"):_features.touch?(addEventNames("touch","start","move","end","cancel"),_likelyTouchDevice=!0):addEventNames("mouse","down","move","up"),_upMoveEvents=_dragMoveEvent+" "+_dragEndEvent+" "+_dragCancelEvent,_downEvents=_dragStartEvent,_pointerEventEnabled&&!_likelyTouchDevice&&(_likelyTouchDevice=navigator.maxTouchPoints>1||navigator.msMaxTouchPoints>1),self.likelyTouchDevice=_likelyTouchDevice,_globalEventHandlers[_dragStartEvent]=_onDragStart,_globalEventHandlers[_dragMoveEvent]=_onDragMove,_globalEventHandlers[_dragEndEvent]=_onDragRelease,_dragCancelEvent&&(_globalEventHandlers[_dragCancelEvent]=_globalEventHandlers[_dragEndEvent]),_features.touch&&(_downEvents+=" mousedown",_upMoveEvents+=" mousemove mouseup",_globalEventHandlers.mousedown=_globalEventHandlers[_dragStartEvent],_globalEventHandlers.mousemove=_globalEventHandlers[_dragMoveEvent],_globalEventHandlers.mouseup=_globalEventHandlers[_dragEndEvent]),_likelyTouchDevice||(_options.allowPanToNext=!1)}}});var _showOrHideTimeout,_showOrHide=function(item,img,out,completeFn){_showOrHideTimeout&&clearTimeout(_showOrHideTimeout),_initialZoomRunning=!0,_initialContentSet=!0;var thumbBounds;item.initialLayout?(thumbBounds=item.initialLayout,item.initialLayout=null):thumbBounds=_options.getThumbBoundsFn&&_options.getThumbBoundsFn(_currentItemIndex);var duration=out?_options.hideAnimationDuration:_options.showAnimationDuration,onComplete=function(){_stopAnimation("initialZoom"),out?(self.template.removeAttribute("style"),self.bg.removeAttribute("style")):(_applyBgOpacity(1),img&&(img.style.display="block"),framework.addClass(template,"pswp--animated-in"),_shout("initialZoom"+(out?"OutEnd":"InEnd"))),completeFn&&completeFn(),_initialZoomRunning=!1};if(!duration||!thumbBounds||thumbBounds.x===void 0){_shout("initialZoom"+(out?"Out":"In")),_currZoomLevel=item.initialZoomLevel,_equalizePoints(_panOffset,item.initialPosition),_applyCurrentZoomPan(),template.style.opacity=out?0:1,_applyBgOpacity(1),duration?setTimeout(function(){onComplete()},duration):onComplete();return}var startAnimation=function(){var closeWithRaf=_closedByScroll,fadeEverything=!self.currItem.src||self.currItem.loadError||_options.showHideOpacity;item.miniImg&&(item.miniImg.style.webkitBackfaceVisibility="hidden"),out||(_currZoomLevel=thumbBounds.w/item.w,_panOffset.x=thumbBounds.x,_panOffset.y=thumbBounds.y-_initalWindowScrollY,self[fadeEverything?"template":"bg"].style.opacity=.001,_applyCurrentZoomPan()),_registerStartAnimation("initialZoom"),out&&!closeWithRaf&&framework.removeClass(template,"pswp--animated-in"),fadeEverything&&(out?framework[(closeWithRaf?"remove":"add")+"Class"](template,"pswp--animate_opacity"):setTimeout(function(){framework.addClass(template,"pswp--animate_opacity")},30)),_showOrHideTimeout=setTimeout(function(){if(_shout("initialZoom"+(out?"Out":"In")),!out)_currZoomLevel=item.initialZoomLevel,_equalizePoints(_panOffset,item.initialPosition),_applyCurrentZoomPan(),_applyBgOpacity(1),fadeEverything?template.style.opacity=1:_applyBgOpacity(1),_showOrHideTimeout=setTimeout(onComplete,duration+20);else{var destZoomLevel=thumbBounds.w/item.w,initialPanOffset={x:_panOffset.x,y:_panOffset.
1y},initialZoomLevel=_currZoomLevel,initalBgOpacity=_bgOpacity,onUpdate=function(now){now===1?(_currZoomLevel=destZoomLevel,_panOffset.x=thumbBounds.x,_panOffset.y=thumbBounds.y-_currentWindowScrollY):(_currZoomLevel=(destZoomLevel-initialZoomLevel)*now+initialZoomLevel,_panOffset.x=(thumbBounds.x-initialPanOffset.x)*now+initialPanOffset.x,_panOffset.y=(thumbBounds.y-_currentWindowScrollY-initialPanOffset.y)*now+initialPanOffset.y),_applyCurrentZoomPan(),fadeEverything?template.style.opacity=1-now:_applyBgOpacity(initalBgOpacity-now*initalBgOpacity)};closeWithRaf?_animateProp("initialZoom",0,1,duration,framework.easing.cubic.out,onUpdate,onComplete):(onUpdate(1),_showOrHideTimeout=setTimeout(onComplete,duration+20))}},out?25:90)};startAnimation()},_items,_tempPanAreaSize={},_imagesToAppendPool=[],_initialContentSet,_initialZoomRunning,_controllerDefaultOptions={index:0,errorMsg:'<div class="pswp__error-msg"><a href="%url%" target="_blank">The image</a> could not be loaded.</div>',forceProgressiveLoading:!1,preload:[1,1],getNumItemsFn:function(){return _items.length}},_getItemAt,_getNumItems,_initialIsLoop,_getZeroBounds=function(){return{center:{x:0,y:0},max:{x:0,y:0},min:{x:0,y:0}}},_calculateSingleItemPanBounds=function(item,realPanElementW,realPanElementH){var bounds=item.bounds;bounds.center.x=Math.round((_tempPanAreaSize.x-realPanElementW)/2),bounds.center.y=Math.round((_tempPanAreaSize.y-realPanElementH)/2)+item.vGap.top,bounds.max.x=realPanElementW>_tempPanAreaSize.x?Math.round(_tempPanAreaSize.x-realPanElementW):bounds.center.x,bounds.max.y=realPanElementH>_tempPanAreaSize.y?Math.round(_tempPanAreaSize.y-realPanElementH)+item.vGap.top:bounds.center.y,bounds.min.x=realPanElementW>_tempPanAreaSize.x?0:bounds.center.x,bounds.min.y=realPanElementH>_tempPanAreaSize.y?item.vGap.top:bounds.center.y},_calculateItemSize=function(item,viewportSize,zoomLevel){if(item.src&&!item.loadError){var isInitial=!zoomLevel;if(isInitial&&(item.vGap||(item.vGap={top:0,bottom:0}),_shout("parseVerticalMargin",item)),_tempPanAreaSize.x=viewportSize.x,_tempPanAreaSize.y=viewportSize.y-item.vGap.top-item.vGap.bottom,isInitial){var hRatio=_tempPanAreaSize.x/item.w,vRatio=_tempPanAreaSize.y/item.h;item.fitRatio=hRatio<vRatio?hRatio:vRatio;var scaleMode=_options.scaleMode;scaleMode==="orig"?zoomLevel=1:scaleMode==="fit"&&(zoomLevel=item.fitRatio),zoomLevel>1&&(zoomLevel=1),item.initialZoomLevel=zoomLevel,item.bounds||(item.bounds=_getZeroBounds())}return zoomLevel?(_calculateSingleItemPanBounds(item,item.w*zoomLevel,item.h*zoomLevel),isInitial&&zoomLevel===item.initialZoomLevel&&(item.initialPosition=item.bounds.center),item.bounds):void 0}else return item.w=item.h=0,item.initialZoomLevel=item.fitRatio=1,item.bounds=_getZeroBounds(),item.initialPosition=item.bounds.center,item.bounds},_appendImage=function(index,item,baseDiv,img,preventAnimation,keepPlaceholder){item.loadError||img&&(item.imageAppended=!0,_setImageSize(item,img,item===self.currItem&&_renderMaxResolution),baseDiv.appendChild(img),keepPlaceholder&&setTimeout(function(){item&&item.loaded&&item.placeholder&&(item.placeholder.style.display="none",item.placeholder=null)},500))},_preloadImage=function(item){item.loading=!0,item.loaded=!1;var img=item.img=framework.createEl("pswp__img","img"),onComplete=function(){item.loading=!1,item.loaded=!0,item.loadComplete?item.loadComplete(item):item.img=null,img.onload=img.onerror=null,img=null};return img.onload=onComplete,img.onerror=function(){item.loadError=!0,onComplete()},img.src=item.src,img},_checkForError=function(item,cleanUp){if(item.src&&item.loadError&&item.container)return cleanUp&&(item.container.innerHTML=""),item.container.innerHTML=_options.errorMsg.replace("%url%",item.src),!0},_setImageSize=function(item,img,maxRes){if(item.src){img||(img=item.container.lastChild);var w=maxRes?item.w:Math.round(item.w*item.fitRatio),h=maxRes?item.h:Math.round(item.h*item.fitRatio);item.placeholder&&!item.loaded&&(item.placeholder.style.width=w+"px",item.placeholder.style.height=h+"px"),img.style.width=w+"px",img.style.height=h+"px"}},_appendImagesPool=function(){if(_imagesToAppendPool.length){for(var poolItem,i=0;i<_imagesToAppendPool.length;i++)poolItem=_imagesToAppendPool[i],poolItem.holder.index===poolItem.index&&_appendImage(poolItem.index,poolItem.item,poolItem.baseDiv,poolItem.img,!1,poolItem.clearPlaceholder);_imagesToAppendPool=[]}};_registerModule("Controller",{publicMethods:{lazyLoadItem:function(index){
1index=_getLoopedId(index);var item=_getItemAt(index);!item||(item.loaded||item.loading)&&!_itemsNeedUpdate||(_shout("gettingData",index,item),item.src&&_preloadImage(item))},initController:function(){framework.extend(_options,_controllerDefaultOptions,!0),self.items=_items=items,_getItemAt=self.getItemAt,_getNumItems=_options.getNumItemsFn,_initialIsLoop=_options.loop,_getNumItems()<3&&(_options.loop=!1),_listen("beforeChange",function(diff){var p3=_options.preload,isNext=diff===null?!0:diff>=0,preloadBefore=Math.min(p3[0],_getNumItems()),preloadAfter=Math.min(p3[1],_getNumItems()),i;for(i=1;i<=(isNext?preloadAfter:preloadBefore);i++)self.lazyLoadItem(_currentItemIndex+i);for(i=1;i<=(isNext?preloadBefore:preloadAfter);i++)self.lazyLoadItem(_currentItemIndex-i)}),_listen("initialLayout",function(){self.currItem.initialLayout=_options.getThumbBoundsFn&&_options.getThumbBoundsFn(_currentItemIndex)}),_listen("mainScrollAnimComplete",_appendImagesPool),_listen("initialZoomInEnd",_appendImagesPool),_listen("destroy",function(){for(var item,i=0;i<_items.length;i++)item=_items[i],item.container&&(item.container=null),item.placeholder&&(item.placeholder=null),item.img&&(item.img=null),item.preloader&&(item.preloader=null),item.loadError&&(item.loaded=item.loadError=!1);_imagesToAppendPool=null})},getItemAt:function(index){return index>=0&&_items[index]!==void 0?_items[index]:!1},allowProgressiveImg:function(){return _options.forceProgressiveLoading||!_likelyTouchDevice||_options.mouseUsed||screen.width>1200},setContent:function(holder,index){_options.loop&&(index=_getLoopedId(index));var prevItem=self.getItemAt(holder.index);prevItem&&(prevItem.container=null);var item=self.getItemAt(index),img;if(!item){holder.el.innerHTML="";return}_shout("gettingData",index,item),holder.index=index,holder.item=item;var baseDiv=item.container=framework.createEl("pswp__zoom-wrap");if(!item.src&&item.html&&(item.html.tagName?baseDiv.appendChild(item.html):baseDiv.innerHTML=item.html),_checkForError(item),_calculateItemSize(item,_viewportSize),item.src&&!item.loadError&&!item.loaded){if(item.loadComplete=function(item2){if(_isOpen){if(holder&&holder.index===index){if(_checkForError(item2,!0)){item2.loadComplete=item2.img=null,_calculateItemSize(item2,_viewportSize),_applyZoomPanToItem(item2),holder.index===_currentItemIndex&&self.updateCurrZoomItem();return}item2.imageAppended?!_initialZoomRunning&&item2.placeholder&&(item2.placeholder.style.display="none",item2.placeholder=null):_features.transform&&(_mainScrollAnimating||_initialZoomRunning)?_imagesToAppendPool.push({item:item2,baseDiv,img:item2.img,index,holder,clearPlaceholder:!0}):_appendImage(index,item2,baseDiv,item2.img,_mainScrollAnimating||_initialZoomRunning,!0)}item2.loadComplete=null,item2.img=null,_shout("imageLoadComplete",index,item2)}},framework.features.transform){var placeholderClassName="pswp__img pswp__img--placeholder";placeholderClassName+=item.msrc?"":" pswp__img--placeholder--blank";var placeholder=framework.createEl(placeholderClassName,item.msrc?"img":"");item.msrc&&(placeholder.src=item.msrc),_setImageSize(item,placeholder),baseDiv.appendChild(placeholder),item.placeholder=placeholder}item.loading||_preloadImage(item),self.allowProgressiveImg()&&(!_initialContentSet&&_features.transform?_imagesToAppendPool.push({item,baseDiv,img:item.img,index,holder}):_appendImage(index,item,baseDiv,item.img,!0,!0))}else item.src&&!item.loadError&&(img=framework.createEl("pswp__img","img"),img.style.opacity=1,img.src=item.src,_setImageSize(item,img),_appendImage(index,item,baseDiv,img,!0));!_initialContentSet&&index===_currentItemIndex?(_currZoomElementStyle=baseDiv.style,_showOrHide(item,img||item.img)):_applyZoomPanToItem(item),holder.el.innerHTML="",holder.el.appendChild(baseDiv)},cleanSlide:function(item){item.img&&(item.img.onload=item.img.onerror=null),item.loaded=item.loading=item.img=item.imageAppended=!1}}});var tapTimer,tapReleasePoint={},_dispatchTapEvent=function(origEvent,releasePoint,pointerType){var e=document.createEvent("CustomEvent"),eDetail={origEvent,target:origEvent.target,releasePoint,pointerType:pointerType||"touch"};e.initCustomEvent("pswpTap",!0,!0,eDetail),origEvent.target.dispatchEvent(e)};_registerModule("Tap",{publicMethods:{initTap:function(){_listen("firstTouchStart",self.onTa
1pStart),_listen("touchRelease",self.onTapRelease),_listen("destroy",function(){tapReleasePoint={},tapTimer=null})},onTapStart:function(touchList){touchList.length>1&&(clearTimeout(tapTimer),tapTimer=null)},onTapRelease:function(e,releasePoint){if(releasePoint&&!_moved&&!_isMultitouch&&!_numAnimations){var p0=releasePoint;if(tapTimer&&(clearTimeout(tapTimer),tapTimer=null,_isNearbyPoints(p0,tapReleasePoint))){_shout("doubleTap",p0);return}if(releasePoint.type==="mouse"){_dispatchTapEvent(e,releasePoint,"mouse");return}var clickedTagName=e.target.tagName.toUpperCase();if(clickedTagName==="BUTTON"||framework.hasClass(e.target,"pswp__single-tap")){_dispatchTapEvent(e,releasePoint);return}_equalizePoints(tapReleasePoint,p0),tapTimer=setTimeout(function(){_dispatchTapEvent(e,releasePoint),tapTimer=null},300)}}}});var _wheelDelta;_registerModule("DesktopZoom",{publicMethods:{initDesktopZoom:function(){_oldIE||(_likelyTouchDevice?_listen("mouseUsed",function(){self.setupDesktopZoom()}):self.setupDesktopZoom(!0))},setupDesktopZoom:function(onInit){_wheelDelta={};var events="wheel mousewheel DOMMouseScroll";_listen("bindEvents",function(){framework.bind(template,events,self.handleMouseWheel)}),_listen("unbindEvents",function(){_wheelDelta&&framework.unbind(template,events,self.handleMouseWheel)}),self.mouseZoomedIn=!1;var hasDraggingClass,updateZoomable=function(){self.mouseZoomedIn&&(framework.removeClass(template,"pswp--zoomed-in"),self.mouseZoomedIn=!1),_currZoomLevel<1?framework.addClass(template,"pswp--zoom-allowed"):framework.removeClass(template,"pswp--zoom-allowed"),removeDraggingClass()},removeDraggingClass=function(){hasDraggingClass&&(framework.removeClass(template,"pswp--dragging"),hasDraggingClass=!1)};_listen("resize",updateZoomable),_listen("afterChange",updateZoomable),_listen("pointerDown",function(){self.mouseZoomedIn&&(hasDraggingClass=!0,framework.addClass(template,"pswp--dragging"))}),_listen("pointerUp",removeDraggingClass),onInit||updateZoomable()},handleMouseWheel:function(e){if(_currZoomLevel<=self.currItem.fitRatio)return _options.modal&&(!_options.closeOnScroll||_numAnimations||_isDragging?e.preventDefault():_transformKey&&Math.abs(e.deltaY)>2&&(_closedByScroll=!0,self.close())),!0;if(e.stopPropagation(),_wheelDelta.x=0,"deltaX"in e)e.deltaMode===1?(_wheelDelta.x=e.deltaX*18,_wheelDelta.y=e.deltaY*18):(_wheelDelta.x=e.deltaX,_wheelDelta.y=e.deltaY);else if("wheelDelta"in e)e.wheelDeltaX&&(_wheelDelta.x=-.16*e.wheelDeltaX),e.wheelDeltaY?_wheelDelta.y=-.16*e.wheelDeltaY:_wheelDelta.y=-.16*e.wheelDelta;else if("detail"in e)_wheelDelta.y=e.detail;else return;_calculatePanBounds(_currZoomLevel,!0);var newPanX=_panOffset.x-_wheelDelta.x,newPanY=_panOffset.y-_wheelDelta.y;(_options.modal||newPanX<=_currPanBounds.min.x&&newPanX>=_currPanBounds.max.x&&newPanY<=_currPanBounds.min.y&&newPanY>=_currPanBounds.max.y)&&e.preventDefault(),self.panTo(newPanX,newPanY)},toggleDesktopZoom:function(centerPoint){centerPoint=centerPoint||{x:_viewportSize.x/2+_offset.x,y:_viewportSize.y/2+_offset.y};var doubleTapZoomLevel=_options.getDoubleTapZoom(!0,self.currItem),zoomOut=_currZoomLevel===doubleTapZoomLevel;self.mouseZoomedIn=!zoomOut,self.zoomTo(zoomOut?self.currItem.initialZoomLevel:doubleTapZoomLevel,centerPoint,333),framework[(zoomOut?"remove":"add")+"Class"](template,"pswp--zoomed-in")}}});var _historyDefaultOptions={history:!0,galleryUID:1},_historyUpdateTimeout,_hashChangeTimeout,_hashAnimCheckTimeout,_hashChangedByScript,_hashChangedByHistory,_hashReseted,_initialHash,_historyChanged,_closedFromURL,_urlChangedOnce,_windowLoc,_supportsPushState,_getHash=function(){return _windowLoc.hash.substring(1)},_cleanHistoryTimeouts=function(){_historyUpdateTimeout&&clearTimeout(_historyUpdateTimeout),_hashAnimCheckTimeout&&clearTimeout(_hashAnimCheckTimeout)},_parseItemIndexFromURL=function(){var hash=_getHash(),params={};if(hash.length<5)return params;var i,vars=hash.split("&");for(i=0;i<vars.length;i++)if(vars[i]){var pair=vars[i].split("=");pair.length<2||(params[pair[0]]=pair[1])}if(_options.galleryPIDs){var searchfor=params.pid;for(params.pid=0,i=0;i<_items.length;i++)if(_items[i].pid===searchfor){params.pid=i;break}}else params.pid=parseInt(params.pid,10)-1;return params.pid<0&&(params.pid=0),params},_updateHash=function(){if(_hashAnimCheckTimeout&&clearTimeout(_hashAnimCheckTimeout),_numAnimations||_isDragging){_hashAnimCheckTimeout=setTimeout(_updateHash,500);return}_hashChangedByScript?clearTimeout(_hashChangeTimeout):_hashChangedByScript=!0;var pid=_currentItemIndex+1,item=_getItemAt(_currentItemIndex);item.hasOwnProperty("pid")&&(pid=item.pid);var newHash=_initialHash+"&gid="+_options.galleryUID+"&pid="+pid;_historyChanged||_windowLoc.hash.indexOf(newHash)===-1&&(_urlChangedOnce=!0);var newURL=_windowLoc.href.split("#")[0]+"#"+newHash;_supportsPushState?"#"+newHash!==window.location.hash&&history[_historyChanged?"replaceState":"pushState"]("",document.title,newURL):_historyChanged?_windowLoc.replace(newURL):_windowLoc.hash=newHash,_historyChanged=!0,_hashChangeTimeout=setTimeout(function(){_hashChangedByScript=!1},60)};_registerModule("History",{publicMethods:{initHistory:function(){if(framework.extend(_options,_historyDefaultOptions,!0),!!_options.history){_windowLoc=window.location,_urlChangedOnce=!1,_closedFromURL=!1,_historyChanged=!1,_initialHash=_getHash(),_supportsPushState="pushState"in history,_initialHash.indexOf("gid=")>-1&&(_initialHash=_initialHash.split("&gid=")[0],_initialHash=_initialHash.split("?gid=")[0]),_listen("afterChange",self.updateURL),_listen("unbindEvents",function(){framework.unbind(window,"hashchange",self.onHashChange)});var returnToOriginal=function(){_hashReseted=!0,_closedFromURL||(_urlChangedOnce?history.back():_initialHash?_windowLoc.hash=_initialHash:_supportsPushState?history.pushState("",document.title,_windowLoc.pathname+_windowLoc.search):_windowLoc.hash=""),_cleanHistoryTimeouts()};_listen("unbindEvents",function(){_closedByScroll&&returnToOriginal()}),_listen("destroy",function(){_hashReseted||returnToOriginal()}),_listen("firstUpdate",function(){_currentItemIndex=_parseItemIndexFromURL().pid});var index=_initialHash.indexOf("pid=");index>-1&&(_initialHash=_initialHash.substring(0,index),_initialHash.slice(-1)==="&"&&(_initialHash=_initialHash.slice(0,-1))),setTimeout(function(){_isOpen&&framework.bind(window,"hashchange",self.onHashChange)},40)}},onHashChange:function(){if(_getHash()===_initialHash){_closedFromURL=!0,self.close();return}_hashChangedByScript||(_hashChangedByHistory=!0,self.goTo(_parseItemIndexFromURL().pid),_hashChangedByHistory=!1)},updateURL:function(){_cleanHistoryTimeouts(),!_hashChangedByHistory&&(_historyChanged?_historyUpdateTimeout=setTimeout(_updateHash,800):_updateHash())}}}),framework.extend(self,publicMethods)};return PhotoSwipe2})}}),animationQueue={},Animation=class{static slideUp(element,callback,propertyToAnimate="height"){element.style[propertyToAnimate]=`${element.scrollHeight}px`,element.offsetHeight,element.style[propertyToAnimate]=0,animationQueue[element.i
1d]&&(element.removeEventListener("transitionend",animationQueue[element.id]),delete animationQueue[element.id]);const transitionEnded=event2=>{event2.propertyName==="height"&&(element.removeEventListener("transitionend",transitionEnded),(callback||(()=>{}))())};element.addEventListener("transitionend",transitionEnded)}static slideDown(element,callback,propertyToAnimate="height"){element.style[propertyToAnimate]=`${element.scrollHeight}px`;const transitionEnded=event2=>{if(event2.propertyName===propertyToAnimate){let defaultValue="auto";propertyToAnimate==="max-height"&&(defaultValue="none"),element.style[propertyToAnimate]=defaultValue,element.removeEventListener("transitionend",transitionEnded),delete animationQueue[element.id],(callback||(()=>{}))()}};element.addEventListener("transitionend",transitionEnded),animationQueue[element.id]=transitionEnded}},Dom=class _Dom{static getSiblings(element,filter,includeSelf=!1){let siblings=[],currentElement=element;for(;currentElement=currentElement.previousElementSibling;)(!filter||currentElement.matches(filter))&&siblings.push(currentElement);for(includeSelf&&siblings.push(element),currentElement=element;currentElement=currentElement.nextElementSibling;)(!filter||currentElement.matches(filter))&&siblings.push(currentElement);return siblings}static deepQuerySelector(root,selector){let element=root.querySelector(selector);if(element)return element;for(const template of root.querySelectorAll("template"))if(element=_Dom.deepQuerySelector(template.content,selector),element)return element;return null}};function Delegate(root){this.listenerMap=[{},{}],root&&this.root(root),this.handle=Delegate.prototype.handle.bind(this),this._removedListeners=[]}Delegate.prototype.root=function(root){const listenerMap=this.listenerMap;let eventType;if(this.rootElement){for(eventType in listenerMap[1])listenerMap[1].hasOwnProperty(eventType)&&this.rootElement.removeEventListener(eventType,this.handle,!0);for(eventType in listenerMap[0])listenerMap[0].hasOwnProperty(eventType)&&this.rootElement.removeEventListener(eventType,this.handle,!1)}if(!root||!root.addEventListener)return this.rootElement&&delete this.rootElement,this;this.rootElement=root;for(eventType in listenerMap[1])listenerMap[1].hasOwnProperty(eventType)&&this.rootElement.addEventListener(eventType,this.handle,!0);for(eventType in listenerMap[0])listenerMap[0].hasOwnProperty(eventType)&&this.rootElement.addEventListener(eventType,this.handle,!1);return this},Delegate.prototype.captureForType=function(eventType){return["blur","error","focus","load","resize","scroll"].indexOf(eventType)!==-1},Delegate.prototype.on=function(eventType,selector,handler,useCapture){let root,listenerMap,matcher,matcherParam;if(!eventType)throw new TypeError("Invalid event type: "+eventType);if(typeof selector=="function"&&(useCapture=handler,handler=selector,selector=null),useCapture===void 0&&(useCapture=this.captureForType(eventType)),typeof handler!="function")throw new TypeError("Handler must be a type of Function");return root=this.rootElement,listenerMap=this.listenerMap[useCapture?1:0],listenerMap[eventType]||(root&&root.addEventListener(eventType,this.handle,useCapture),listenerMap[eventType]=[]),selector?/^[a-z]+$/i.test(selector)?(matcherParam=selector,matcher=matchesTag):/^#[a-z0-9\-_]+$/i.test(selector)?(matcherParam=selector.slice(1),matcher=matchesId):(matcherParam=selector,matcher=Element.prototype.matches):(matcherParam=null,matcher=matchesRoot.bind(this)),listenerMap[eventType].push({selector,handler,matcher,matcherParam}),this},Delegate.prototype.off=function(eventType,selector,handler,useCapture){let i,listener,listenerMap,listenerList,singleEventType;if(typeof selector=="function"&&(useCapture=handler,handler=selector,selector=null),useCapture===void 0)return this.off(eventType,selector,handler,!0),this.off(eventType,selector,handler,!1),this;if(listenerMap=this.listenerMap[useCapture?1:0],!eventType){for(singleEventType in listenerMap)listenerMap.hasOwnProperty(singleEventType)&&this.off(singleEventType,selector,handler);return this}if(listenerList=listenerMap[eventType],!listenerList||!listenerList.length)return this;for(i=listenerList.length-1;i>=0;i--)listener=listenerList[i],(!selector||selector===listener.selector)&&(!handler||handler===listener.handler)&&(this._removedListeners.push(listener),listenerList.splice(i,1));return listenerList.length||(delete listenerMap[eventType],this.rootElement&&this.rootElement.removeEventListener(eventType,this.handle,useCapture)),this},Delegate.prototype.handle=function(event2){let i,l;const type=event2.type;
1let root,phase,listener,returned,listenerList=[],target;const eventIgnore="ftLabsDelegateIgnore";if(event2[eventIgnore]===!0)return;switch(target=event2.target,target.nodeType===3&&(target=target.parentNode),target.correspondingUseElement&&(target=target.correspondingUseElement),root=this.rootElement,phase=event2.eventPhase||(event2.target!==event2.currentTarget?3:2),phase){case 1:listenerList=this.listenerMap[1][type];break;case 2:this.listenerMap[0]&&this.listenerMap[0][type]&&(listenerList=listenerList.concat(this.listenerMap[0][type])),this.listenerMap[1]&&this.listenerMap[1][type]&&(listenerList=listenerList.concat(this.listenerMap[1][type]));break;case 3:listenerList=this.listenerMap[0][type];break}let toFire=[];for(l=listenerList.length;target&&l;){for(i=0;i<l&&(listener=listenerList[i],!!listener);i++)target.tagName&&["button","input","select","textarea"].indexOf(target.tagName.toLowerCase())>-1&&target.hasAttribute("disabled")?toFire=[]:listener.matcher.call(target,listener.matcherParam,target)&&toFire.push([event2,target,listener]);if(target===root||(l=listenerList.length,target=target.parentElement||target.parentNode,target instanceof HTMLDocument))break}let ret;for(i=0;i<toFire.length;i++)if(!(this._removedListeners.indexOf(toFire[i][2])>-1)&&(returned=this.fire.apply(this,toFire[i]),returned===!1)){toFire[i][0][eventIgnore]=!0,toFire[i][0].preventDefault(),ret=!1;break}return ret},Delegate.prototype.fire=function(event2,target,listener){return listener.handler.call(target,event2,target)};function matchesTag(tagName,element){return tagName.toLowerCase()===element.tagName.toLowerCase()}function matchesRoot(selector,element){return this.rootElement===window?element===document||element===document.documentElement||element===window:this.rootElement===element}function matchesId(id,element){return id===element.id}Delegate.prototype.destroy=function(){this.off(),this.root()};var main_default=Delegate,CollapsibleManager=class{constructor(){this.domDelegate=new main_default(document.body),this._attachListeners()}_attachListeners(){this.domDelegate.on("click",'[data-action="toggle-collapsible"]:not([disabled])',this._toggleCollapsible.bind(this)),document.addEventListener("collapsible:toggle",this._toggleCollapsible.bind(this))}_toggleCollapsible(event2,target){!target&&event2.detail&&(target=document.querySelector(`[aria-controls="${event2.detail.id}"]`));const isOpen=target.getAttribute("aria-expanded")==="true",parentCollapsible=target.parentNode;isOpen?this._close(parentCollapsible):this._open(parentCollapsible),target.getAttribute("data-close-siblings")!=="false"&&Dom.getSiblings(parentCollapsible).forEach(collapsibleToClose=>this._close(collapsibleToClose))}_open(collapsible){let toggleButton=collapsible.querySelector("[aria-controls]");if(!toggleButton||toggleButton.getAttribute("aria-expanded")==="true")return;let collapsibleContent=collapsible.querySelector(`#${toggleButton.getAttribute("aria-controls")}`);toggleButton.setAttribute("aria-expanded","true"),collapsibleContent.hasAttribute("aria-hidden")&&collapsibleContent.setAttribute("aria-hidden","false"),Animation.slideDown(collapsibleContent,()=>{toggleButton.hasAttribute("data-collapsible-force-overflow")&&(collapsibleContent.style.overflow="visible");let autofocusElement=collapsibleContent.querySelector("[autofocus]");autofocusElement&&autofocusElement.focus()})}_close(collapsible){let toggleButton=collapsible.querySelector("[aria-controls]");if(!toggleButton||toggleButton.getAttribute("aria-expanded")==="false")return;let collapsibleContent=collapsible.querySelector(`#${toggleButton.getAttribute("aria-controls")}`);toggleButton.hasAttribute("data-collapsible-force-overflow")&&(collapsibleContent.style.overflow="hidden"),collapsibleContent.hasAttribute("aria-hidden")&&collapsibleContent.setAttribute("aria-hidden","true"),toggleButton.setAttribute("aria-expanded","false"),Animation.slideUp(collapsibleContent)}},CountrySelector=class{constructor(countrySelect,provinceSelect){this.countrySelect=countrySelect,this.provinceSelect=provinceSelect,this.countrySelect&&this.provinceSelect&&(this._attachListeners(),this._initSelectors())}destroy(){this.countrySelect&&this.countrySelect.removeEventListener("change",this._onCountryChangedListener)}_initSelectors(){const defaultCountry=this.countrySelect.getAttribute("data-default");if(defaultCountry){for(let i=0;i!==this.countrySelect.options.length;++i)if(this.countrySelect.options[i].text===defaultCountry){this.countrySelect.selectedIndex=i;break}}else this.countrySelect.selectedIndex=0;let event2=new Event("change",{bubbles:!0});this.countrySelect.dispatchEvent(event2);const defaultProvince=this.provinceSelect.getAttribute("data-default");if(defaultProvince){for(let i=0;i!==this.provinceSelect.options.length;++i)if(this.provinceSelect.options[i].text===defaultProvince){this.provinceSelect.selectedIndex=i;break}}}_attachListeners(){this._onCountryChangedListener=this._onCountryChanged.bind(this),this.countrySelect.addEventListener("change",this._onCountryChangedListener)}_onCountryChanged(){const selectedOption=this.countrySelect.options[this.countrySelect.selectedIndex];if(!selectedOption)return;let provinces=JSON.parse(selectedOption.getAttribute("data-provinces")||"[]");if(this.provinceSelect.innerHTML="",provinces.length===0){this.provinceSelect.closest(".form__input-wrapper").style.display="none";return}
1provinces.forEach(data=>{this.provinceSelect.options.add(new Option(data[1],data[0]))}),this.provinceSelect.closest(".form__input-wrapper").style.display="block"}},Responsive=class{static matchesBreakpoint(breakpoint){switch(breakpoint){case"phone":return window.matchMedia("screen and (max-width: 640px)").matches;case"tablet":return window.matchMedia("screen and (min-width: 641px) and (max-width: 1023px)").matches;case"tablet-and-up":return window.matchMedia("screen and (min-width: 641px)").matches;case"pocket":return window.matchMedia("screen and (max-width: 1023px)").matches;case"lap":return window.matchMedia("screen and (min-width: 1024px) and (max-width: 1279px)").matches;case"lap-and-up":return window.matchMedia("screen and (min-width: 1024px)").matches;case"desk":return window.matchMedia("screen and (min-width: 1280px)").matches;case"widescreen":return window.matchMedia("screen and (min-width: 1440px)").matches;case"supports-hover":return window.matchMedia("(hover: hover) and (pointer: fine)").matches}}static getCurrentBreakpoint(){if(window.matchMedia("screen and (max-width: 640px)").matches)return"phone";if(window.matchMedia("screen and (min-width: 641px) and (max-width: 1023px)").matches)return"tablet";if(window.matchMedia("screen and (min-width: 1024px) and (max-width: 1279px)").matches)return"lap";if(window.matchMedia("screen and (min-width: 1280px)").matches)return"desk"}},DesktopNavigation=class{constructor(element,navigationLayout,openTrigger){this.element=element,this.delegateElement=new main_default(this.element),this.delegateRoot=new main_default(document.documentElement),this.useInlineNavigation=navigationLayout==="inline",this.isNavigationVisible=this.useInlineNavigation,this.openTrigger=openTrigger,Responsive.matchesBreakpoint("supports-hover")||(this.openTrigger="click"),this.openItems=[],this.dropdownActivationTimeouts={},this.dropdownDeactivationTimeouts={},this.DROPDOWN_TIMEOUT=100,this._attachListeners(),this.useInlineNavigation&&this._setupInlineNavigation()}destroy(){this.delegateElement.off(),this.delegateRoot.off()}onBlockSelect(event2){this.useInlineNavigation||this._openNavigation(),Dom.getSiblings(event2.target.parentNode,".is-dropdown-open").forEach(openItem=>{this._deactivateDropdown(event2,openItem.querySelector('[data-type="menuitem"][aria-haspopup]'))}),this._activateDropdown(event2,event2.target.previousElementSibling)}onBlockDeselect(event2){this.useInlineNavigation||this._closeNavigation(),this._deactivateDropdown(event2,event2.target.parentNode)}_attachListeners(){this.delegateElement.on("focusout",this._onFocusOut.bind(this)),this.delegateRoot.on("click",this._onClick.bind(this)),this.delegateElement.on("click",'[data-action="toggle-menu"]',this._toggleNavigation.bind(this)),this.openTrigger==="hover"?(this.delegateElement.on("focusin",'[data-type="menuitem"][aria-haspopup]',this._activateDropdown.bind(this)),this.delegateElement.on("mouseover",'[data-type="menuitem"][aria-haspopup]',this._activateDropdown.bind(this)),this.delegateElement.on("mouseover",'[data-type="menu"][aria-hidden="false"]',this._blockDropdownDeactivation.bind(this)),this.delegateElement.on("focusout",".is-dropdown-open",this._deactivateDropdown.bind(this)),this.delegateElement.on("mouseout",".is-dropdown-open",this._deactivateDropdown.bind(this))):this.delegateElement.on("click",'[data-type="menuitem"][aria-haspopup]',this._toggleDropdown.bind(this))}_onFocusOut(event2){event2.relatedTarget!==null&&!this.element.contains(event2.relatedTarget)&&this._closeNavigation()}_onClick(event2){this.element.contains(event2.target)||this._closeNavigation()}_openNavigation(){this.useInlineNavigation||(this.element.querySelector('[data-action="toggle-menu"]').setAttribute("aria-expanded","true"),this.element.querySelector('[data-type="menu"]').setAttribute("aria-hidden","false"),this.isNavigationVisible=!0)}_closeNavigation(){this.useInlineNavigation||(this.element.querySelector('[data-action="toggle-menu"]').setAttribute("aria-expanded","false"),this.element.querySelector('[data-type="menu"]').setAttribute("aria-hidden","true")),this.isNavigationVisible=!1,this.openTrigger==="click"&&this.openItems.slice(0).forEac
1h(item=>{this._deactivateDropdown(event,item)})}_toggleNavigation(event2){this.isNavigationVisible?this._closeNavigation():this._openNavigation()}_toggleDropdown(event2,target){target.getAttribute("aria-expanded")==="false"&&event2.preventDefault(),target.getAttribute("aria-expanded")==="true"?target.getAttribute("href")==="#"&&(event2.preventDefault(),this._deactivateDropdown(event2,target.closest(".is-dropdown-open"))):this._activateDropdown(event2,target)}_activateDropdown(event2,target){this.openTrigger==="click"&&this.openItems.slice(0).forEach(item=>{item.contains(target)||this._deactivateDropdown(event2,item)});let menuToOpen=Dom.getSiblings(target,"[aria-hidden]")[0],callback=()=>{if(target.setAttribute("aria-expanded","true"),target.parentNode.classList.add("is-dropdown-open"),menuToOpen.setAttribute("aria-hidden","false"),this.openTrigger==="hover"&&this.dropdownDeactivationTimeouts[menuToOpen.id]&&(clearTimeout(this.dropdownDeactivationTimeouts[menuToOpen.id]),delete this.dropdownDeactivationTimeouts[menuToOpen.id]),this.useInlineNavigation){let windowWidth=window.innerWidth,shouldOpenLeft=!1;menuToOpen.querySelectorAll(".nav-dropdown").forEach(subSubMenu=>{subSubMenu.getBoundingClientRect().right>windowWidth&&(shouldOpenLeft=!0)}),shouldOpenLeft&&menuToOpen.classList.add("nav-dropdown--inverse")}target.closest('[data-type="menu"]').classList.add("nav-dropdown--glued"),menuToOpen.classList.contains("mega-menu")&&this._setupMegaMenu(menuToOpen),this.openTrigger==="click"&&this.openItems.push(target.parentNode)};if(this.openTrigger==="click")callback();else{for(let toDeactivate in this.dropdownActivationTimeouts)this.dropdownActivationTimeouts.hasOwnProperty(toDeactivate)&&(clearTimeout(this.dropdownActivationTimeouts[toDeactivate]),delete this.dropdownActivationTimeouts[toDeactivate]);callback()}}_deactivateDropdown(event2,target){if(this.openTrigger==="hover"&&target.contains(event2.relatedTarget))return;let menuToClose=target.querySelector("[aria-hidden]"),callback=()=>{if(target.classList.remove("is-dropdown-open"),target.querySelector('[data-type="menuitem"]').setAttribute("aria-expanded","false"),target.querySelector("[aria-hidden]").setAttribute("aria-hidden","true"),target.closest('[data-type="menu"]').classList.remove("nav-dropdown--glued"),this.openTrigger==="click"){target.querySelectorAll(".is-dropdown-open").forEach(item=>{this._deactivateDropdown(event2,item);let index2=this.openItems.indexOf(item);index2>-1&&this.openItems.splice(index2,1)});let index=this.openItems.indexOf(target);index>-1&&this.openItems.splice(index,1)}};this.openTrigger==="click"?callback():this.dropdownDeactivationTimeouts[menuToClose.id]=setTimeout(()=>{callback(),delete this.dropdownDeactivationTimeouts[menuToClose.id]},this.DROPDOWN_TIMEOUT)}_blockDropdownDeactivation(event2,target){if(this.dropdownDeactivationTimeouts[target.id]!==void 0){clearTimeout(this.dropdownDeactivationTimeouts[target.id]),delete this.dropdownDeactivationTimeouts[target.id];for(let toDeactivate in this.dropdownActivationTimeouts)this.dropdownActivationTimeouts.hasOwnProperty(toDeactivate)&&(clearTimeout(this.dropdownActivationTimeouts[toDeactivate]),delete this.dropdownActivationTimeouts[toDeactivate])}}_setupMegaMenu(megaMenu){if(!this.useInlineNavigation){let navDropdownWidth=megaMenu.closest(".nav-dropdown").clientWidth;megaMenu.style.maxWidth=Math.min(1400-navDropdownWidth,parseInt(window.innerWidth-navDropdownWidth-80))+"px"}}_setupInlineNavigation(){this.element.querySelectorAll(".mega-menu").forEach(megaMenu=>{megaMenu.closest(".nav-bar__item").classList.add("nav-bar__item--static")}),"MutationObserver"in window&&(this.dropdownMenuObserver=new MutationObserver(mutationList=>{mutationList.forEach(mutation=>{mutation.target.getAttribute("aria-hidden")==="false"&&mutation.target.style.setProperty("--distance-to-top",`${mutation.target.getBoundingClientRect().top}px`)})}),this.element.querySelectorAll(".nav-dropdown .nav-dropdown").forEach(item=>{this.dropdownMenuObserver.observe(item,{attributes:!0,attributeFilter:["aria-hidden"]})}))}},CollectionFilterDrawer=class{constructor(options){this.element=document.getElementById("mobile-collection-filters"),this.delegateRoot=new main_default(document.documentElement),this.options=options,this.isOpen=!1,this.element&&this._attachListeners()}destroy(){this.delegateRoot.off()}_attachListeners(){this.delegateRoot.on("click",'[aria-controls="mobile-collection-filters"][data-action="open-drawer"]',this.open.bind(this)),this.delegateRoot.on("click",'#mobile-collection-filters [data-action="close-drawer"]',this.close.bind(this)),document.addEventListener("collection-filter:close",this.close.bind(this)),document.addEventListener("click",this._detectOutsideClick.bind(this)),window.addEventListener("resize",this._computeDrawerHeight.bind(this))}open(event2){event2&&event2.stopPropagation(),this._computeDrawerHeight(),this.isOpen=!0,document.querySelector('[aria-controls="mobile-collection-filters"]').setAttribute("aria-expanded","true"),document.getElementById("mobile-collection-filters").setAttribute("aria-hidden","false"),document.documentElement.classList.add("is-locked")}close(event2){event2&&event2.stopPropagation(),this.isOpen=!1,document.querySelector('[aria-controls="mobile-collection-filters"]').setAttribute("aria-expanded","fal
1se"),document.getElementById("mobile-collection-filters").setAttribute("aria-hidden","true"),document.documentElement.classList.remove("is-locked")}_computeDrawerHeight(){document.getElementById("mobile-collection-filters").querySelector(".collection-drawer").style.maxHeight=`${window.innerHeight}px`}_detectOutsideClick(event2){this.isOpen&&!event2.target.closest(".collection-drawer__inner")&&this.close()}},ExitPopup=class{constructor(element){this.element=element,this.delegateElement=new main_default(this.element),this.rootDelegateElement=new main_default(document.body),this.options=JSON.parse(element.getAttribute("data-popup-settings")),this.hasOpenOnceInCurrentPage=!1;try{window.location.hash==="#exit-popup"&&window.theme.pageType!=="captcha"&&this._openPopup()}catch{}this._attachListeners()}destroy(){this.delegateElement.off()}_attachListeners(){this._onKeyPressedListener=this._onKeyPressed.bind(this),Responsive.matchesBreakpoint("supports-hover")&&(this.delegateElement.on("click",'[data-action="close-popup"]',this._closePopup.bind(this)),document.body.addEventListener("mouseleave",()=>{this.hasOpenOnceInCurrentPage||(!this.options.showOnlyOnce||this.options.showOnlyOnce&&localStorage.getItem("themeExitPopup")===null)&&this._openPopup()}),this._clickOutsideListener=this._checkClickOutside.bind(this))}_openPopup(){window.theme.isNewsletterPopupOpen||(this.element.setAttribute("aria-hidden","false"),localStorage.setItem("themeExitPopup","true"),this.hasOpenOnceInCurrentPage=!0,window.theme.isExitPopupOpen=!0,this.delegateElement.on("click",this._clickOutsideListener),this.rootDelegateElement.on("keyup",this._onKeyPressedListener))}_closePopup(){this.element.setAttribute("aria-hidden","true"),window.theme.isExitPopupOpen=!1,this.delegateElement.off("click",this._clickOutsideListener),this.rootDelegateElement.off("keyup",this._onKeyPressedListener)}_checkClickOutside(event2){(!this.element.contains(event2.target)||this.element===event2.target)&&this._closePopup()}_onKeyPressed(event2){event2.key==="Escape"&&this._closePopup()}},LoadingBar=class{constructor(){this.element=document.querySelector(".loading-bar"),this.element&&(document.addEventListener("theme:loading:start",this._onLoadingStart.bind(this)),document.addEventListener("theme:loading:end",this._onLoadingEnd.bind(this)),this.element.addEventListener("transitionend",this._onTransitionEnd.bind(this)))}_onLoadingStart(){this.element.classList.add("is-visible"),this.element.style.transform="scaleX(0.4)"}_onLoadingEnd(){this.element.style.transform="scaleX(1)",this.element.classList.add("is-finished")}_onTransitionEnd(event2){event2.propertyName==="transform"&&this.element.classList.contains("is-finished")&&(this.element.classList.remove("is-visible"),this.element.classList.remove("is-finished"),this.element.style.transform="scaleX(0)")}},Accessibility=class{static trapFocus(container,namespace){this.listeners=this.listeners||{};let elementToFocus=container.querySelector("[autofocus]")||container;container.setAttribute("tabindex","-1"),elementToFocus.focus(),this.listeners[namespace]=event2=>{container!==event2.target&&!container.contains(event2.target)&&elementToFocus.focus()},document.addEventListener("focusin",this.listeners[namespace])}static removeTrapFocus(container,namespace){container&&container.removeAttribute("tabindex"),document.removeEventListener("focusin",this.listeners[namespace])}static clearTrapFocus(){for(let key in this.listeners)this.listeners.hasOwnProperty(key)&&document.removeEventListener("focusin",this.listeners[key]);this.listeners={}}},Cart=class{constructor(element,options){this.element=element,this.delegateElement=new main_default(this.element),this.delegateRoot=new main_default(document.documentElement),this.options=options,this.element&&(this.miniCartElement=this.element.querySelector(".mini-cart"),this.isMiniCartOpen=!1,window.theme.pageType!=="cart"&&this.miniCartElement&&(this.miniCartToggleElement=this.element.querySelector(`[aria-controls="${this.miniCartElement.id}"]`),this._checkMiniCartScrollability()),this.itemCount=window.theme.cartCount,this._attachListeners())}destroy(){this.delegateElement.off(),this.delegateRoot.off(),window.removeEventListener("resize",this._calculateMiniCartHeightListener)}_attachListeners(){this._calculateMiniCartHeightListener=this._calculateMiniCartHeight.bind(this),window.theme.pageType!=="cart"&&window.theme.cartType!=="page"&&(this.delegateElement.on("click",'[data-action="toggle-mini-cart"]',this._toggleMiniCart.bind(this)),this.delegateElement.on("keyup",this._checkMiniCartClose.bind(this)),this.delegateRoot.on("click",this._onWindowClick.bind(this),!0),window.addEventListener("resize",this._calculateMiniCartHeightListener)),this.delegateRoot.on("click",'[data-action="decrease-quantity"]',this._updateQuantity.bind(this)),this.delegateRoot.on("click",'[data-action="increase-quantity"]',this._updateQuantity.bind(this)),this.delegateRoot.on("change",".quantity-selector:not(.quantity-selector--product) .quantity-selector__value",this._updateQuantity.bind(this)),this.delegateRoot.on("keyup",".quantity-selector:not(.quantity-selector--product) .quantity-selector__value",this._updateQuantitySize.bind(this)),this.delegateRoot.on("key
1down",".quantity-selector__value",this._blockEnterKey.bind(this)),this.delegateRoot.on("product:added",this._onProductAdded.bind(this)),this.delegateRoot.on("cart:refresh",this._onCartRefresh.bind(this))}_toggleMiniCart(event2){event2&&event2.preventDefault(),this.isMiniCartOpen?this._closeMiniCart():this._openMiniCart()}_openMiniCart(){this.miniCartToggleElement.setAttribute("aria-expanded","true"),Responsive.getCurrentBreakpoint()==="phone"&&this.miniCartToggleElement.querySelector(".header__cart-icon").setAttribute("aria-expanded","true"),this.miniCartElement.setAttribute("aria-hidden","false"),this.isMiniCartOpen=!0,this._calculateMiniCartHeight(),Accessibility.trapFocus(this.miniCartElement,"mini-cart"),document.documentElement.classList.add("is-locked")}_closeMiniCart(){this.miniCartToggleElement.setAttribute("aria-expanded","false"),Responsive.getCurrentBreakpoint()==="phone"&&(this.miniCartToggleElement.querySelector(".header__cart-icon").setAttribute("aria-expanded","false"),this.miniCartElement.style.maxHeight=""),this.miniCartElement.setAttribute("aria-hidden","true"),this.isMiniCartOpen=!1,document.documentElement.classList.remove("is-locked")}_checkMiniCartClose(event2){this.isMiniCartOpen&&event2.key==="Escape"&&this._closeMiniCart()}_calculateMiniCartHeight(){if(Responsive.getCurrentBreakpoint()==="phone")if(this.isMiniCartOpen){let headerGroupHeight=0;Array.from(document.querySelectorAll(".shopify-section-group-header-group")).forEach(item=>{item.classList.contains("shopify-section--announcement-bar")&&window.scrollY>item.clientHeight||(headerGroupHeight+=item.clientHeight)});let maxHeight=window.innerHeight-headerGroupHeight;this.miniCartElement.style.maxHeight=`${maxHeight}px`;let miniCartContentElement=this.miniCartElement.querySelector(".mini-cart__content"),miniCartRecapElement=this.miniCartElement.querySelector(".mini-cart__recap");miniCartRecapElement&&(miniCartContentElement.style.maxHeight=`${maxHeight-miniCartRecapElement.clientHeight}px`)}else this.miniCartElement.style.maxHeight="",this.miniCartElement.querySelector(".mini-cart__content").style.maxHeight="";else this.miniCartElement.style.maxHeight="",this.miniCartElement.querySelector(".mini-cart__content").style.maxHeight=""}_updateQuantity(event2,target){let parsedQuantity=1;target.tagName==="INPUT"?parsedQuantity=parseInt(target.value):parsedQuantity=parseInt(target.getAttribute("data-quantity")),document.dispatchEvent(new CustomEvent("theme:loading:start")),fetch(`${window.routes.cartChangeUrl}.js`,{body:JSON.stringify({line:target.getAttribute("data-line"),quantity:parsedQuantity}),credentials:"same-origin",method:"POST",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}).then(response=>{response.ok?theme.pageType==="cart"?window.location.reload():response.json().then(content=>{this.itemCount=content.item_count,this._rerender(!1).then(()=>{document.dispatchEvent(new CustomEvent("theme:loading:end"))})}):response.json().then(content=>{let messageElement=document.createElement("div");messageElement.className="cart__status-message cart__status-message--header",messageElement.innerHTML=`<div class="alert alert--error"><p class="container">${content.description}</p></div>`,document.querySelector(".header")?.append(messageElement),Animation.slideDown(messageElement),setTimeout(function(){Animation.slideUp(messageElement,()=>{messageElement.remove()})},5500),this._rerender(!1).then(()=>{document.dispatchEvent(new CustomEvent("theme:loading:end"))})})}),event2.preventDefault()}_updateQuantitySize(event2,target){target.style.setProperty("--quantity-input-characters-count",`${target.value.toString().length}ch`),target.setAttribute("size",Math.max(target.value.length,2))}_blockEnterKey(event2){if(event2.key==="Enter")return!1}_rerender(scrollToTop=!0){let url="";if(window.theme.pageType!=="cart")url=`${window.routes.cartUrl}?section_id=mini-cart`;else{const cartSection=document.querySelector('[data-section-type="cart"]');url=`${window.routes.cartUrl}?section_id=${cartSection.getAttribute("data-section-id")}`}return fetch(url,{credentials:"same-origin",method:"GET",headers:{"Cache-Control":"no-cache"}}).then(content=>{content.text().then(html=>{let myDiv=document.createElement("div");
1if(myDiv.innerHTML=html,myDiv=myDiv.firstElementChild,myDiv.firstElementChild&&myDiv.firstElementChild.hasAttribute("data-item-count")&&(this.itemCount=parseInt(myDiv.firstElementChild.getAttribute("data-item-count"))),this.element.querySelector(".header__cart-count").textContent=this.itemCount,window.theme.cartType!=="page")if(window.theme.pageType!=="cart"){let tempElement=document.createElement("div");tempElement.innerHTML=html;let miniCartItemListElement=this.miniCartElement.querySelector(".mini-cart__line-item-list"),scrollPosition=null;miniCartItemListElement&&(scrollPosition=miniCartItemListElement.scrollTop),this.miniCartElement.innerHTML=tempElement.querySelector(".mini-cart").innerHTML;let newMiniCartItemListElement=this.miniCartElement.querySelector(".mini-cart__line-item-list");newMiniCartItemListElement&&scrollPosition!==null&&(newMiniCartItemListElement.scrollTop=scrollPosition),this._checkMiniCartScrollability(),this._calculateMiniCartHeight(),this.element.dispatchEvent(new CustomEvent("cart:rerendered"))}else{let tempElement=document.createElement("div");tempElement.innerHTML=html;let originalCart=document.querySelector('[data-section-type="cart"]');originalCart.innerHTML=tempElement.querySelector('[data-section-type="cart"]').innerHTML,scrollToTop&&window.scrollTo({top:0,behavior:"smooth"}),this.element.dispatchEvent(new CustomEvent("cart:rerendered",{bubbles:!0}))}})})}_checkMiniCartScrollability(){let miniCartItemList=this.miniCartElement.querySelector(".mini-cart__line-item-list");miniCartItemList&&miniCartItemList.scrollHeight>miniCartItemList.clientHeight&&miniCartItemList.classList.add("is-scrollable")}_onProductAdded(event2){this.itemCount+=event2.detail.quantity,this._onCartRefresh().then(()=>{if(window.theme.pageType!=="cart"&&event2.detail.productAdded){if(window.theme.cartType==="drawer"&&!this.options.useStickyHeader&&(window.scrollTo({top:0,behavior:"smooth"}),window.addEventListener("scrollend",()=>this._calculateMiniCartHeight())),window.theme.cartType==="message"&&event2.detail.button){const originalMessage=event2.detail.button.innerHTML;event2.detail.button.innerHTML=window.languages.productAddedShort,setTimeout(()=>{event2.detail.button.innerHTML=originalMessage},1500)}window.theme.pageType!=="cart"&&window.theme.cartType==="drawer"&&this._openMiniCart()}})}_onCartRefresh(event2){let scrollToTop=!0;return event2&&event2.detail&&(scrollToTop=event2.detail.scrollToTop),this._rerender(scrollToTop).then(()=>{document.dispatchEvent(new CustomEvent("theme:loading:end"))})}_onWindowClick(event2){this.miniCartElement&&this.isMiniCartOpen&&!this.element.contains(event2.target)&&this._closeMiniCart()}},MobileNavigation=class{constructor(element){this.element=element,this.delegateElement=new main_default(this.element),this.delegateRoot=new main_default(document.documentElement),this.mobileMenuElement=this.element.querySelector(".mobile-menu"),this.mobileMenuToggleElement=this.element.querySelector(`[aria-controls="${this.mobileMenuElement.id}"]`),this.isOpen=!1,this._attachListeners()}destroy(){this.delegateElement.off(),this.delegateRoot.off(),window.removeEventListener("resize",this._calculatMaxHeightListener)}_attachListeners(){this._calculatMaxHeightListener=this._calculateMaxHeight.bind(this),this.delegateElement.on("click",'[data-action="toggle-menu"]',this._toggleMenu.bind(this)),this.delegateElement.on("click",'[data-action="open-panel"]',this._openPanel.bind(this)),this.delegateElement.on("click",'[data-action="close-panel"]',this._closePanel.bind(this)),this.delegateRoot.on("click",this._onWindowClick.bind(this)),window.addEventListener("resize",this._calculatMaxHeightListener)}_toggleMenu(){this.isOpen=!this.isOpen,this.mobileMenuToggleElement.setAttribute("aria-expanded",this.isOpen?"true":"false"),this.mobileMenuElement.setAttribute("aria-hidden",this.isOpen?"false":"true"),this.isOpen?(this._calculateMaxHeight(),document.documentElement.classList.add("is-locked")):(this.mobileMenuElement.style.maxHeight="",this.element.querySelectorAll(".mobile-menu__panel.is-open").forEach(item=>{item.classList.remove("is-open")}),document.documentElement.classList.remove("is-locked"))}
1_openPanel(event2,target){target.setAttribute("aria-expanded","true"),this.element.querySelector(`#${target.getAttribute("aria-controls")}`).classList.add("is-open")}_closePanel(event2,target){let panelToClose=target.closest(".mobile-menu__panel.is-open");panelToClose.classList.remove("is-open"),this.element.querySelector(`[aria-controls="${panelToClose.id}"]`).setAttribute("aria-expanded","false")}_calculateMaxHeight(){this.isOpen&&(this.mobileMenuElement.style.maxHeight=`${window.innerHeight-document.querySelector(".header").getBoundingClientRect().bottom}px`)}_onWindowClick(event2){this.isOpen&&!this.element.contains(event2.target)&&this._toggleMenu()}},ModalManager=class{constructor(){this.domDelegate=new main_default(document.body),this.activeModalsQueue=[];let activeModal=document.querySelector('.modal[aria-hidden="false"]');activeModal&&this.activeModalsQueue.push(activeModal),this._attachListeners()}_attachListeners(){this._onKeyPressedListener=this._onKeyPressed.bind(this),this.domDelegate.on("click",'[data-action="open-modal"]',this._openModal.bind(this)),this.domDelegate.on("click",'[data-action="close-modal"]',this._closeModal.bind(this)),document.addEventListener("modal:close",this._closeModal.bind(this)),this._clickOutsideListener=this._checkClickOutside.bind(this),this.activeModalsQueue.length>0&&(document.documentElement.classList.add("is-locked"),this.domDelegate.on("click",this._clickOutsideListener))}_openModal(event2,target){let modal=document.querySelector(`#${target.getAttribute("aria-controls")}`);if(modal){if(modal.tagName==="DIALOG")modal.showModal(),this.activeModalsQueue.push(modal),modal.setAttribute("aria-hidden","false");else{let onOpen=event3=>{event3.propertyName==="visibility"&&(modal.removeEventListener("transitionend",onOpen),Accessibility.trapFocus(modal,"modal"+modal.id),this.activeModalsQueue.push(modal))};modal.addEventListener("transitionend",onOpen),modal.setAttribute("aria-hidden","false")}return document.documentElement.classList.add("is-locked"),this.domDelegate.on("click",this._clickOutsideListener),this.domDelegate.on("keyup",this._onKeyPressedListener),!1}}_closeModal(){if(this.activeModalsQueue.length>0){let modalToClose=this.activeModalsQueue.pop();if(modalToClose.tagName==="DIALOG")modalToClose.close(),modalToClose.setAttribute("aria-hidden","true");else{let onClose=event2=>{event2.propertyName==="visibility"&&(modalToClose.removeEventListener("transitionend",onClose),Accessibility.removeTrapFocus(modalToClose,"modal"+modalToClose.id),modalToClose.dispatchEvent(new CustomEvent("modal:closed")))};modalToClose.addEventListener("transitionend",onClose),modalToClose.setAttribute("aria-hidden","true")}document.documentElement.classList.remove("is-locked"),this.domDelegate.off("click",this._clickOutsideListener),this.domDelegate.off("keyup",this._onKeyPressedListener)}}_checkClickOutside(event2){if(this.activeModalsQueue.length===0)return;let modalToClose=this.activeModalsQueue[this.activeModalsQueue.length-1];modalToClose&&(!modalToClose.contains(event2.target)||modalToClose===event2.target)&&this._closeModal()}_onKeyPressed(event2){event2.key==="Escape"&&this._closeModal()}},NewsletterPopup=class{constructor(element){this.element=element,this.delegateElement=new main_default(this.element),this.rootDelegateElement=new main_default(document.body),this.options=JSON.parse(element.getAttribute("data-popup-settings"));try{window.location.hash==="#newsletter-popup"&&window.theme.pageType!=="captcha"?this._openPopup():(!this.options.showOnlyOnce||this.options.showOnlyOnce&&localStorage.getItem("themePopup")===null)&&setTimeout(this._openPopup.bind(this),this.options.apparitionDelay*1e3)}catch{}this._attachListeners()}destroy(){this.delegateElement.off()}_attachListeners(){this._onKeyPressedListener=this._onKeyPressed.bind(this),this.delegateElement.on("click",'[data-action="close-popup"]',this._closePopup.bind(this)),this._clickOutsideListener=this._checkClickOutside.bind(this)}_openPopup(){window.theme.isExitPopupOpen||(this.element.setAttribute("aria-hidden","false"),localStorage.setItem("themePopup","true"),window.theme.isNewsletterPopupOpen=!0,this.delegateElement.on("click",this._clickOutsideListener),this.rootDelegateElement.on("keyup",this._onKeyPressedListener))}_closePopup(){this.element.setAttribute("aria-hidden","true"),window.theme.isNewsletterPopupOpen=!1,this.delegateElement.off("click"),this.rootDelegateElement.off("keyup",this._onKeyPressedListener)}_checkClickOutside(event2){(!this.element.contains(event2.target)||this.element===event2.target)&&this._closePopup()}_onKeyPressed(event2){event2.key==="Escape"&&this._closePopup()}},import_fastdom=__toESM(require_fastdom()),OverflowScroller=class{constructor(element,options){element&&(this.element=element,this.options=options,this.lastKnownY=window.scrollY,this.currentTop=0,this.initialTopOffset=options.offsetTop||parseInt(window.getComputedStyle(this.element).top),this._attachListeners())}destroy(){window.removeEventListener("scroll",this._checkPositionListener)}_attachListeners(){this._checkPositionListener=this._checkPosition.bind(this),window.addEventListener("scroll",this._checkPositionListener)}_checkPosition(){import_fastdom.default.measure(()=>
1{let bounds=this.element.getBoundingClientRect(),maxTop=bounds.top+window.scrollY-this.element.offsetTop+this.initialTopOffset,minTop=this.element.clientHeight-window.innerHeight+(this.options.offsetBottom||0);window.scrollY<this.lastKnownY?this.currentTop-=window.scrollY-this.lastKnownY:this.currentTop+=this.lastKnownY-window.scrollY,this.currentTop=Math.min(Math.max(this.currentTop,-minTop),maxTop,this.initialTopOffset),this.lastKnownY=window.scrollY}),import_fastdom.default.mutate(()=>{this.element.style.top=`${this.currentTop}px`})}},PopoverManager=class{constructor(){this.delegateElement=new main_default(document.body),this.delegateRoot=new main_default(document.documentElement),this.activePopover=null,this._attachListeners()}_attachListeners(){this._onLooseFocusListener=this._onLooseFocus.bind(this),this.delegateElement.on("click",'[data-action="toggle-popover"]',this._togglePopover.bind(this)),this.delegateElement.on("click",'[data-action="show-popover-panel"]',this._showPanel.bind(this)),this.delegateRoot.on("click",this._onWindowClick.bind(this)),document.addEventListener("popover:close",this._closeActivePopover.bind(this)),window.addEventListener("resize",this._windowResized.bind(this))}_togglePopover(event2,target){let hasActivePopover=this.activePopover!==null,previousActivePopoverId=this.activePopover?this.activePopover.id:null;target.hasAttribute("data-follow-link")&&Responsive.matchesBreakpoint(target.getAttribute("data-follow-link"))||(hasActivePopover&&this._closeActivePopover(),(!hasActivePopover||hasActivePopover&&target.getAttribute("aria-controls")!==previousActivePopoverId)&&this._openPopover(target),event2.preventDefault())}_closeActivePopover(){this.activePopover.setAttribute("aria-hidden","true"),document.querySelector(`[aria-controls="${this.activePopover.id}"]`).setAttribute("aria-expanded","false"),this.activePopover.removeEventListener("focusout",this._onLooseFocusListener),this.activePopover=null}_openPopover(target){let element=document.getElementById(target.getAttribute("aria-controls"));if(target.setAttribute("aria-expanded","true"),element.setAttribute("aria-hidden","false"),Responsive.getCurrentBreakpoint()==="phone")element.style.height=`${window.innerHeight-document.querySelector(".header").getBoundingClientRect().bottom}px`;else{element.style.height="";let panelList=element.querySelector(".popover__panel-list");panelList&&(panelList.style.height=`${panelList.clientHeight}px`)}this.activePopover=element,this.activePopover.addEventListener("focusout",this._onLooseFocusListener)}_showPanel(event2,target){if(!this.activePopover)return;this.activePopover.querySelectorAll(".popover__panel").forEach(panel=>{panel.id===target.getAttribute("aria-controls")?(panel.classList.add("is-selected"),panel.closest(".popover__panel-list").style.height=`${panel.clientHeight}px`):panel.classList.remove("is-selected")})}_onWindowClick(event2){event2.target.getAttribute("data-action")==="toggle-popover"||event2.target.closest('[data-action="toggle-popover"]')||this.activePopover&&!this.activePopover.contains(event2.target)&&this._closeActivePopover()}_onLooseFocus(event2){this.activePopover&&event2.relatedTarget!==null&&!this.activePopover.contains(event2.relatedTarget)&&this._closeActivePopover()}_windowResized(){Responsive.getCurrentBreakpoint()==="phone"&&this.activePopover&&(this.activePopover.style.height=`${window.innerHeight-document.querySelector(".header").getBoundingClientRect().bottom}px`)}},import_fastdom2=__toESM(require_fastdom()),ProductItemColorSwatch=class{constructor(element){this.element=element,this.delegateElement=new main_default(this.element),this._attachListeners(),this.recalculateSwatches()}destroy(){this.delegateElement.off(),window.removeEventListener("resize",this._recalculateSwatchesListener)}recalculateSwatches(){import_fastdom2.default.measure(()=>{this.element.querySelectorAll(".product-item__swatch-list").forEach(swatchList=>{const currentWidth=swatchList.clientWidth,maxAllowedWidth=parseInt(Math.min(currentWidth,200)),maxFit=Math.floor(maxAllowedWidth/30);import_fastdom2.default.mutate(()=>{let colorSwatches=swatchList.querySelectorAll(".color-swatch");
1colorSwatches.forEach((colorSwatch,index)=>{colorSwatch.classList.remove("color-swatch--view-more"),maxFit===index+1&&maxFit!==colorSwatches.length&&colorSwatch.classList.add("color-swatch--view-more")})})})})}_attachListeners(){this._recalculateSwatchesListener=this.recalculateSwatches.bind(this),this.delegateElement.on("change",".product-item__swatch-list .color-swatch__radio",this._colorChanged.bind(this)),window.addEventListener("resize",this._recalculateSwatchesListener)}_colorChanged(event2,target){const productItem=target.closest(".product-item"),variantUrl=target.getAttribute("data-variant-url");productItem.querySelector(".product-item__image-wrapper").setAttribute("href",variantUrl),productItem.querySelector(".product-item__title").setAttribute("href",variantUrl);let originalImageElement=productItem.querySelector(".product-item__primary-image");if(target.hasAttribute("data-image-url")&&target.getAttribute("data-media-id")!==originalImageElement.getAttribute("data-media-id")){let newImageElement=document.createElement("img");newImageElement.className="product-item__primary-image",newImageElement.setAttribute("data-media-id",target.getAttribute("data-media-id")),newImageElement.setAttribute("src",target.getAttribute("data-image-url")),originalImageElement.parentNode.style.paddingBottom=`${100/newImageElement.getAttribute("data-image-aspect-ratio")}%`,originalImageElement.parentNode.replaceChild(newImageElement,originalImageElement)}}},CACHE_EVICTION_TIME=1e3*60*5,_preloadedHtml,_delegate,_intersectionObserver,_form,_selectedVariant,_VariantPicker_instances,getActiveOptionValues_fn,getOptionValuesFromOption_fn,onOptionChanged_fn,onOptionPreload_fn,onIntersection_fn,renderForCombination_fn,createHashKeyForHtml_fn,_VariantPicker=class extends HTMLElement{constructor(){super(...arguments),__privateAdd(this,_VariantPicker_instances),__privateAdd(this,_delegate,new main_default(document.body)),__privateAdd(this,_intersectionObserver,new IntersectionObserver(__privateMethod(this,_VariantPicker_instances,onIntersection_fn).bind(this))),__privateAdd(this,_form),__privateAdd(this,_selectedVariant)}async connectedCallback(){__privateSet(this,_selectedVariant,JSON.parse(this.querySelector("script[data-variant]")?.textContent||"{}")),__privateSet(this,_form,document.forms[this.getAttribute("form-id")]),__privateGet(this,_delegate).on("change",`input[data-option-position][form="${this.getAttribute("form-id")}"], select[data-option-position][form="${this.getAttribute("form-id")}"]`,__privateMethod(this,_VariantPicker_instances,onOptionChanged_fn).bind(this)),__privateGet(this,_delegate).on("pointerenter",`input[data-option-position][form="${this.getAttribute("form-id")}"]:not(:checked) + label`,__privateMethod(this,_VariantPicker_instances,onOptionPreload_fn).bind(this),!0),__privateGet(this,_delegate).on("touchstart",`input[data-option-position][form="${this.getAttribute("form-id")}"]:not(:checked) + label`,__privateMethod(this,_VariantPicker_instances,onOptionPreload_fn).bind(this),!0),__privateGet(this,_intersectionObserver).observe(this)}disconnectedCallback(){__privateGet(this,_delegate).off(),__privateGet(this,_intersectionObserver).unobserve(this)}get selectedVariant(){return __privateGet(this,_selectedVariant)}get productHandle(){return this.getAttribute("handle")}get updateUrl(){return this.hasAttribute("update-url")}async selectCombination({optionValues,productChange}){const previousVariant=this.selectedVariant,newContent=document.createRange().createContextualFragment(await __privateMethod(this,_VariantPicker_instances,renderForCombination_fn).call(this,optionValues));if(!productChange){const newVariantPicker=Dom.deepQuerySelector(newContent,`${this.tagName}[form-id="${this.getAttribute("form-id")}"]`),newVariant=JSON.parse(newVariantPicker.querySelector("script[data-variant]")?.textContent||"{}");if(__privateSet(this,_selectedVariant,newVariant),__privateGet(this,_form).id.value=__privateGet(this,_selectedVariant)?.id,__privateGet(this,_form).id.dispatchEvent(new Event("change",{bubbles:!0})),this.updateUrl&&__privateGet(this,_selectedVariant)?.id){const newUrl=new URL(window.location.href);newUrl.searchParams.set("variant",__privateGet(this,_selectedVariant).id),window.history.replaceState({path:newUrl.toString()},"",newUrl.toString())}__privateGet(this,_form).dispatchEvent(new CustomEvent("variant:change",{bubbles:!0,detail:{formId:__privateGet(this,_form).id,variant:__privateGet(this,_selectedVariant),previousVariant}})),__privateGet(this,_form).dispatchEvent(new CustomEvent("variant:changed",{bubbles:!0,detail:{formId:__privateGet(this,_form).id,variant:__privateGet(this,_selectedVariant),previousVariant}}))}__privateGet(this,_form).dispatchEvent(new CustomEvent("product:rerender",{detail:{htmlFragment:newContent,productChange}})),Shopify?.PaymentButton?.init()}};_preloadedHtml=new WeakMap,_delegate=new WeakMap,_intersectionObserver=new WeakMap,_form=new WeakMap,_selectedVariant=new WeakMap,_VariantPicker_instances=new WeakSet,getActiveOptionValues_fn=function(){return Array.from(__privateGet(this,_form).elements).filter(item=>item.matches('input[data-option-position]:checked, input[data-option-position][type="hidden"], select[data-option-position]')).sort((a,b)=>parseInt(a.getAttribute("data-option-position"))-parseInt(b.getAttribute("data-option-position"))).map(input=>input.value)},getOptionValuesFromOption_fn=function(input){return[input,...Array.from(__privateGet(this,_form).elements).filter(item=>item.matches(`input[data-option-position]:not([name="${input.name}"]):checked, input[data-option-position]:not([name="${input.name}"])[type="hidden"], select[data-option-position]`))].sort((a,b)=>parseInt(a.getAttribute("data-option-position"))-parseInt(b.getAttribute("data-option-position"))).map(input2=>input2.value)},onOptionChanged_fn=async function(event2){event2.target.name.includes("option")&&(event2.target.tagName==="SELECT"&&event2.target.selectedOptions[0].hasAttribute("data-update-url")&&(window.location.href=event2.target.selectedOptions[0].dataset.updateUrl),this.selectCombination({optionValues:__privateMethod(this,_VariantPicker_instances,getActiveOptionValues_fn).c
1all(this),productChange:event2.target.hasAttribute("data-product-url")}))},onOptionPreload_fn=function(event2,target){__privateMethod(this,_VariantPicker_instances,renderForCombination_fn).call(this,__privateMethod(this,_VariantPicker_instances,getOptionValuesFromOption_fn).call(this,target.control))},onIntersection_fn=function(entries){const prerenderOptions=()=>{Array.from(__privateGet(this,_form).elements).filter(item=>item.matches('input[data-option-position]:not(:checked), input[data-option-position][type="hidden"]')).forEach(input=>{__privateMethod(this,_VariantPicker_instances,renderForCombination_fn).call(this,__privateMethod(this,_VariantPicker_instances,getOptionValuesFromOption_fn).call(this,input))})};entries[0].isIntersecting&&(window.requestIdleCallback?window.requestIdleCallback(prerenderOptions,{timeout:2e3}):prerenderOptions())},renderForCombination_fn=async function(optionValues){const optionValuesAsString=optionValues.join(","),hashKey=__privateMethod(this,_VariantPicker_instances,createHashKeyForHtml_fn).call(this,optionValuesAsString);let productUrl=`${Shopify.routes.root}products/${this.productHandle}`;for(const optionValue of optionValues){const inputForOptionValue=Array.from(__privateGet(this,_form).elements).find(item=>item.matches(`input[value="${optionValue}"]`));if(inputForOptionValue?.dataset.productUrl){productUrl=inputForOptionValue.dataset.productUrl;break}}if(!__privateGet(_VariantPicker,_preloadedHtml).has(hashKey)){const sectionQueryParam=this.getAttribute("context")==="quick_buy"?"":`&section_id=${this.getAttribute("section-id")}`,promise=new Promise(async resolve=>{resolve(await(await fetch(`${productUrl}?option_values=${optionValuesAsString}${sectionQueryParam}`)).text())});__privateGet(_VariantPicker,_preloadedHtml).set(hashKey,{htmlPromise:promise,timestamp:Date.now()}),__privateGet(_VariantPicker,_preloadedHtml).size>100&&__privateGet(_VariantPicker,_preloadedHtml).delete(Array.from(__privateGet(_VariantPicker,_preloadedHtml).keys())[0])}return __privateGet(_VariantPicker,_preloadedHtml).get(hashKey).htmlPromise},createHashKeyForHtml_fn=function(optionValuesAsString){return`${optionValuesAsString}-${this.getAttribute("section-id")}`},__privateAdd(_VariantPicker,_preloadedHtml,new Map);var VariantPicker=_VariantPicker;window.customElements.get("variant-picker")||window.customElements.define("variant-picker",VariantPicker);var ProductModel=class{constructor(element){this.element=element,this.delegateElement=new main_default(this.element),this.delegateRoot=new main_default(document.documentElement),this._attachListeners();let stylesheet=document.createElement("link");stylesheet.rel="stylesheet",stylesheet.href="https://cdn.shopify.com/shopifycloud/model-viewer-ui/assets/v1.0/model-viewer-ui.css",document.head.appendChild(stylesheet),window.Shopify.loadFeatures([{name:"model-viewer-ui",version:"1.0",onLoad:this._setupModelViewerUI.bind(this)},{name:"shopify-xr",version:"1.0"}])}destroy(){}_attachListeners(){this.element.querySelector("model-viewer").addEventListener("shopify_model_viewer_ui_toggle_play",()=>{this.element.dispatchEvent(new CustomEvent("model:played",{bubbles:!0}))}),this.element.querySelector("model-viewer").addEventListener("shopify_model_viewer_ui_toggle_pause",()=>{this.element.dispatchEvent(new CustomEvent("model:paused",{bubbles:!0}))})}hasBeenSelected(isInitialLoading){Responsive.matchesBreakpoint("supports-hover")&&!isInitialLoading&&this.modelUi.play()}hasBeenDeselected(){this.modelUi.pause()}_setupModelViewerUI(){this.modelElement=this.element.querySelector("model-viewer"),this.modelUi=new window.Shopify.ModelViewerUI(this.modelElement)}},ProductVideo=class{constructor(element,enableVideoLooping){switch(this.element=element,this.delegateElement=new main_default(this.element),this.enableVideoLooping=enableVideoLooping,this.player=null,this.element.getAttribute("data-media-type")){case"video":let stylesheet=document.createElement("link");stylesheet.rel="stylesheet",stylesheet.href="https://cdn.shopify.com/shopifycloud/shopify-plyr/v1.0/shopify-plyr.css",document.head.appendChild(stylesheet),window.Shopify.loadFeatures([{name:"video-u
1i",version:"1.0",onLoad:this._setupHtml5Video.bind(this)}]);break;case"external_video":this._setupExternalVideo();break}}destroy(){this.player&&this.player.destroy()}hasBeenSelected(isInitialLoading){Responsive.matchesBreakpoint("supports-hover")&&!isInitialLoading&&this.play()}hasBeenDeselected(){this.pause()}play(){switch(this.element.getAttribute("data-media-type")){case"video":this.player.play();break;case"external_video":this.element.getAttribute("data-media-host")==="youtube"?this.player.playVideo():this.player.player(),this.element.focus();break}}pause(){switch(this.element.getAttribute("data-media-type")){case"video":this.player.pause();break;case"external_video":this.element.getAttribute("data-media-host")==="youtube"?this.player.pauseVideo():this.player.pause();break}}_setupHtml5Video(){this.player=new Shopify.Plyr(this.element.querySelector("video"),{controls:["play","progress","mute","volume","play-large","fullscreen"],loop:{active:this.enableVideoLooping},hideControlsOnPause:!0,clickToPlay:!0,iconUrl:"//cdn.shopify.com/shopifycloud/shopify-plyr/v1.0/shopify-plyr.svg",tooltips:{controls:!1,seek:!0}}),this.player.on("play",()=>{this.element.dispatchEvent(new CustomEvent("video:played",{bubbles:!0}))}),this.player.on("pause",()=>{this.element.dispatchEvent(new CustomEvent("video:paused",{bubbles:!0}))})}_setupExternalVideo(){this.element.getAttribute("data-media-host")==="youtube"?this._loadYouTubeScript().then(this._setupYouTubePlayer.bind(this)):this.element.getAttribute("data-media-host")==="vimeo"&&this._loadVimeoScript().then(this._setupVimeoPlayer.bind(this))}_setupYouTubePlayer(){let playerLoadingInterval=setInterval(()=>{window.YT!==void 0&&window.YT.Player!==void 0&&(this.player=new YT.Player(this.element.querySelector("iframe"),{videoId:this.element.getAttribute("data-video-id"),events:{onStateChange:event2=>{event2.data===0&&this.enableVideoLooping&&event2.target.seekTo(0)}}}),clearInterval(playerLoadingInterval))},50)}_loadYouTubeScript(){return new Promise((resolve,reject)=>{const script=document.createElement("script");document.body.appendChild(script),script.onload=resolve,script.onerror=reject,script.async=!0,script.src="//www.youtube.com/iframe_api"})}_setupVimeoPlayer(){let playerLoadingInterval=setInterval(()=>{window.Vimeo!==void 0&&window.Vimeo.Player!==void 0&&(this.player=new Vimeo.Player(this.element.querySelector("iframe")),clearInterval(playerLoadingInterval))},50)}_loadVimeoScript(){return new Promise((resolve,reject)=>{const script=document.createElement("script");document.body.appendChild(script),script.onload=resolve,script.onerror=reject,script.async=!0,script.src="//player.vimeo.com/api/player.js"})}},import_flickity_fade=__toESM(require_flickity_fade()),import_photoswipe=__toESM(require_photoswipe());function _typeof(obj){"@babel/helpers - typeof";return _typeof=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(obj2){return typeof obj2}:function(obj2){return obj2&&typeof Symbol=="function"&&obj2.constructor===Symbol&&obj2!==Symbol.prototype?"symbol":typeof obj2},_typeof(obj)}var HAS_DOM_2=(typeof HTMLElement>"u"?"undefined":_typeof(HTMLElement))==="object";function isDOMElement(obj){return HAS_DOM_2?obj instanceof HTMLElement:obj&&_typeof(obj)==="object"&&obj!==null&&obj.nodeType===1&&typeof obj.nodeName=="string"}function addClasses(el,classNames){classNames.forEach(function(className){el.classList.add(className)})}function removeClasses(el,classNames){classNames.forEach(function(className){el.classList.remove(className)})}var RULES=".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}";function injectBaseStylesheet(){if(!document.querySelector(".drift-base-styles")){var styleEl=document.createElement("style");styleEl.type="text/css",styleEl.classList.add("drift-base-styles"),styleEl.appendChild(document.createTextNode(RULES));var head=document.head;head.insertBefore(styleEl,head.firstChild)}}function throwIfMissing(){throw new Error("Missing parameter")}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}
1),Constructor}var BoundingBox=(function(){function BoundingBox2(options){_classCallCheck(this,BoundingBox2),this.isShowing=!1;var _options$namespace=options.namespace,namespace=_options$namespace===void 0?null:_options$namespace,_options$zoomFactor=options.zoomFactor,zoomFactor=_options$zoomFactor===void 0?throwIfMissing():_options$zoomFactor,_options$containerEl=options.containerEl,containerEl=_options$containerEl===void 0?throwIfMissing():_options$containerEl;this.settings={namespace,zoomFactor,containerEl},this.openClasses=this._buildClasses("open"),this._buildElement()}return _createClass(BoundingBox2,[{key:"_buildClasses",value:function(suffix){var classes=["drift-".concat(suffix)],ns=this.settings.namespace;return ns&&classes.push("".concat(ns,"-").concat(suffix)),classes}},{key:"_buildElement",value:function(){this.el=document.createElement("div"),addClasses(this.el,this._buildClasses("bounding-box"))}},{key:"show",value:function(zoomPaneWidth,zoomPaneHeight){this.isShowing=!0,this.settings.containerEl.appendChild(this.el);var style=this.el.style;style.width="".concat(Math.round(zoomPaneWidth/this.settings.zoomFactor),"px"),style.height="".concat(Math.round(zoomPaneHeight/this.settings.zoomFactor),"px"),addClasses(this.el,this.openClasses)}},{key:"hide",value:function(){this.isShowing&&this.settings.containerEl.removeChild(this.el),this.isShowing=!1,removeClasses(this.el,this.openClasses)}},{key:"setPosition",value:function(percentageOffsetX,percentageOffsetY,triggerRect){var pageXOffset=window.pageXOffset,pageYOffset=window.pageYOffset,inlineLeft=triggerRect.left+percentageOffsetX*triggerRect.width-this.el.clientWidth/2+pageXOffset,inlineTop=triggerRect.top+percentageOffsetY*triggerRect.height-this.el.clientHeight/2+pageYOffset;inlineLeft<triggerRect.left+pageXOffset?inlineLeft=triggerRect.left+pageXOffset:inlineLeft+this.el.clientWidth>triggerRect.left+triggerRect.width+pageXOffset&&(inlineLeft=triggerRect.left+triggerRect.width-this.el.clientWidth+pageXOffset),inlineTop<triggerRect.top+pageYOffset?inlineTop=triggerRect.top+pageYOffset:inlineTop+this.el.clientHeight>triggerRect.top+triggerRect.height+pageYOffset&&(inlineTop=triggerRect.top+triggerRect.height-this.el.clientHeight+pageYOffset),this.el.style.left="".concat(inlineLeft,"px"),this.el.style.top="".concat(inlineTop,"px")}}]),BoundingBox2})();function _classCallCheck2(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _defineProperties2(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass2(Constructor,protoProps,staticProps){return protoProps&&_defineProperties2(Constructor.prototype,protoProps),staticProps&&_defineProperties2(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Constructor}var Trigger=(function(){function Trigger2(){var options=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};_classCallCheck2(this,Trigger2),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 _options$el=options.el,el=_options$el===void 0?throwIfMissing():_options$el,_options$zoomPane=options.zoomPane,zoomPane=_options$zoomPane===void 0?throwIfMissing():_options$zoomPane,_options$sourceAttrib=options.sourceAttribute,sourceAttribute=_options$sourceAttrib===void 0?throwIfMissing():_options$sourceAttrib,_options$handleTouch=options.handleTouch,handleTouch=_options$handleTouch===void 0?throwIfMissing():_options$handleTouch,_options$onShow=options.onShow,onShow=_options$onShow===void 0?null:_options$onShow,_options$onHide=options.onHide,onHide=_options$onHide===void 0?null:_options$onHide,_options$hoverDelay=options.hoverDelay,hoverDelay=_options$hoverDelay===void 0?0:_options$hoverDelay,_options$touchDelay=options.touchDelay,touchDelay=_options$touchDelay===void 0?0:_options$touchDelay,_options$hoverBoundin=options.hoverBoundingBox,hoverBoundingBox=_options$hoverBoundin===void 0?throwIfMissing():_options$hoverBoundin,_options$touchBoundin=options.touchBoundingBox,touchBoundingBox=_options$touchBoundin===void 0?throwIfMissing():_options$touchBoundin,_options$namespace=options.namespace,namespace=_options$namespace===void 0?null:_options$namespace,_options$zoomFactor=options.zoomFactor,zoomFactor=_options$zoomFactor===void 0?throwIfMissing():_options$zoomFactor,_options$boundingBoxC=options.boundingBoxContainer,boundingBoxContainer=_options$boundingBoxC===void 0?throwIfMissing():_options$boundingBoxC,_options$passive=options.passive,passive=_options$passive===void 0?!1:_options$passive;this.settings={el,zoomPane,sourceAttribute,handleTouch,onShow,onHide,hoverDelay,touchDelay,hoverBoundingBox,touchBoundingBox,namespace,zoomFactor,boundingBoxContainer,passive},(this.settings.hoverBoundingBox||this.settings.touchBoundingBox)&&(this.boundingBox=new BoundingBox({namespace:this.settings.namespace,zoomFactor:this.settings.zoomFactor,containerEl:this.settings.boundingBoxContainer})),this.enabled=!0,this._bindEvents()}return _createClass2(Trigger2,[{key:"_preventDefault",value:function(event2){event2.preventDefault()}},{key:"_preventDefaultAllowTouchScroll",value:function(event2){(!this.settings.touchDelay||!this._isTouchEvent(event2)||this.isShowing)&&event2.preventDefault()}},{key:"_isTouchEvent",value:function(event2){return!!event2.touches}},{key:"_bindEvents",value:function(){this.settings.el.addEventListener("mouseenter",this._handleEntry),this.settings.el.addEventListener("mouseleave",this._hide),this.settings.el.addEventListener("mousemove",this._handleMovement);var isPassive={passive:this.settings.passive};this.settings.handleTouch?(this.settings.el.addEventListener("touchstart",this._handleEntry,isPassive),this.settings.el.addEventListener("touchend",this._hide),this.settings.el.addEventListener("touchmove",this._handleMovement,isPassive)):(this.settings.el.addEventListener("touchstart",this._preventDefault,isPassive),this.settings.el.addEventListener("touchend",this._preventDefault),this.settings.el.addEventListener("touchmove",this._preventDefault,isPassive))}},{key:"_unbindEvents",value: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))}},{key:"_handleEntry",value:function(e){this._preventDefaultAllowTouchScroll(e),this._lastMovement=e,e.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()}},{key:"_show",value:function(){if(this.enabled){var onShow=this.settings.onShow;if(onShow&&typeof onShow=="function"&&onShow(),this.settings.zoomPane.show(this.settings.el.getAttribute(this.settings.sourceAttribute),this.settings.el.clientWidth,this.settings.el.clientHeight),this._lastMovement){var touchActivated=this._lastMovement.touches;(touchActivated&&this.settings.touchBoundingBox||!touchActivated&&this.settings.hoverBoundingBox)&&this.boundingBox.show(this.settings.zoomPane.el.clientWidth,this.settings.zoomPane.el.clientHeight)}this._handleMovement()}}},{key:"_hide",value:function(e){e&&this._preventDefaultAllowTouchScroll(e),this._lastMovement=null,this.entryTimeout&&clearTimeout(this.entryTimeout),this.boundingBox&&this.boundingBox.hide();var onHide=this.settings.onHide;onHide&&typeof onHide=="function"&&onHide(),this.settings.zoomPane.hide()}},{key:"_handleMovement",value:function(e){if(e)this._preventDefaultAllowTouchScroll(e),this._lastMovement=e;else if(this._lastMovement)e=this._lastMovement;else return;var movementX,movementY;if(e.touches){var firstTouch=e.touches[0];movementX=firstTouch.clientX,movementY=firstTouch.clientY}else movementX=e.clientX,movementY=e.clientY;var el=this.settings.el,rect=el.getBoundingClientRect(),offsetX=movementX-rect.left,offsetY=movementY-rect.top,percentageOffsetX=offsetX/this.settings.el.clientWidth,percentageOffsetY=offsetY/this.settings.el.clientHeight;this.boundingBox&&this.boundingBox.setPosition(percentageOffsetX,percentageOffsetY,rect),this.settings.zoomPane.setPosition(percentageOffsetX,percentageOffsetY,rect)}},{key:"isShowing",get:function(){return this.settings.zoomPane.isShowing}}]),Trigger2})();function _classCallCheck3(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _defineProperties3(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass3(Constructor,protoProps,staticProps){return protoProps&&_defineProperties3(Constructor.prototype,protoProps),staticProps&&_defineProperties3(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}
1),Constructor}var ZoomPane=(function(){function ZoomPane2(){var options=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(_classCallCheck3(this,ZoomPane2),this.HAS_ANIMATION=!1,typeof document<"u"){var divStyle=document.createElement("div").style;this.HAS_ANIMATION="animation"in divStyle||"webkitAnimation"in divStyle}this._completeShow=this._completeShow.bind(this),this._completeHide=this._completeHide.bind(this),this._handleLoad=this._handleLoad.bind(this),this.isShowing=!1;var _options$container=options.container,container=_options$container===void 0?null:_options$container,_options$zoomFactor=options.zoomFactor,zoomFactor=_options$zoomFactor===void 0?throwIfMissing():_options$zoomFactor,_options$inline=options.inline,inline=_options$inline===void 0?throwIfMissing():_options$inline,_options$namespace=options.namespace,namespace=_options$namespace===void 0?null:_options$namespace,_options$showWhitespa=options.showWhitespaceAtEdges,showWhitespaceAtEdges=_options$showWhitespa===void 0?throwIfMissing():_options$showWhitespa,_options$containInlin=options.containInl
1ine,containInline=_options$containInlin===void 0?throwIfMissing():_options$containInlin,_options$inlineOffset=options.inlineOffsetX,inlineOffsetX=_options$inlineOffset===void 0?0:_options$inlineOffset,_options$inlineOffset2=options.inlineOffsetY,inlineOffsetY=_options$inlineOffset2===void 0?0:_options$inlineOffset2,_options$inlineContai=options.inlineContainer,inlineContainer=_options$inlineContai===void 0?document.body:_options$inlineContai;this.settings={container,zoomFactor,inline,namespace,showWhitespaceAtEdges,containInline,inlineOffsetX,inlineOffsetY,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()}return _createClass3(ZoomPane2,[{key:"_buildClasses",value:function(suffix){var classes=["drift-".concat(suffix)],ns=this.settings.namespace;return ns&&classes.push("".concat(ns,"-").concat(suffix)),classes}},{key:"_buildElement",value:function(){this.el=document.createElement("div"),addClasses(this.el,this._buildClasses("zoom-pane"));var loaderEl=document.createElement("div");addClasses(loaderEl,this._buildClasses("zoom-pane-loader")),this.el.appendChild(loaderEl),this.imgEl=document.createElement("img"),this.el.appendChild(this.imgEl)}},{key:"_setImageURL",value:function(imageURL){this.imgEl.setAttribute("src",imageURL)}},{key:"_setImageSize",value:function(triggerWidth,triggerHeight){this.img
1El.style.width="".concat(triggerWidth*this.settings.zoomFactor,"px"),this.imgEl.style.height="".concat(triggerHeight*this.settings.zoomFactor,"px")}},{key:"setPosition",value:function(percentageOffsetX,percentageOffsetY,triggerRect){var imgElWidth=this.imgEl.offsetWidth,imgElHeight=this.imgEl.offsetHeight,elWidth=this.el.offsetWidth,elHeight=this.el.offsetHeight,centreOfContainerX=elWidth/2,centreOfContainerY=elHeight/2,targetImgXToBeCentre=imgElWidth*percentageOffsetX,targetImgYToBeCentre=imgElHeight*percentageOffsetY,left=centreOfContainerX-targetImgXToBeCentre,top=centreOfContainerY-targetImgYToBeCentre,differenceBetweenContainerWidthAndImgWidth=elWidth-imgElWidth,differenceBetweenContainerHeightAndImgHeight=elHeight-imgElHeight,isContainerLargerThanImgX=differenceBetweenContainerWidthAndImgWidth>0,isContainerLargerThanImgY=differenceBetweenContainerHeightAndImgHeight>0,minLeft=isContainerLargerThanImgX?differenceBetweenContainerWidthAndImgWidth/2:0,minTop=isContainerLargerThanImgY?differenceBetweenContainerHeightAndImgHeight/2:0,maxLeft=isContainerLargerThanImgX?differenceBetweenContainerWidthAndImgWidth/2:differenceBetweenContainerWidthAndImgWidth,maxTop=isContainerLargerThanImgY?differenceBetweenContainerHeightAndImgHeight/2:differenceBetweenContainerHeightAndImgHeight;if(this.el.parentElement===this.settings.inlineContainer){var scrollX=window.pageXOffset,scrollY=window.pageYOffset,inlineLeft=triggerRect.left+percentageOffsetX*triggerRect.width-elWidth/2+this.settings.inlineOffsetX+scrollX,inlineTop=triggerRect.top+percentageOffsetY*triggerRect.height-elHeight/2+this.settings.inlineOffsetY+scrollY;this.settings.containInline&&(inlineLeft<triggerRect.left+scrollX?inlineLeft=triggerRect.left+scrollX:inlineLeft+elWidth>triggerRect.left+triggerRect.width+scrollX&&(inlineLeft=triggerRect.left+triggerRect.width-elWidth+scrollX),inlineTop<triggerRect.top+scrollY?inlineTop=triggerRect.top+scrollY:inlineTop+elHeight>triggerRect.top+triggerRect.height+scrollY&&(inlineTop=triggerRect.top+triggerRect.height-elHeight+scrollY)),this.el.style.left="".concat(inlineLeft,"px"),this.el.style.top="".concat(inlineTop,"px")}this.settings.showWhitespaceAtEdges||(left>minLeft?left=minLeft:left<maxLeft&&(left=maxLeft),top>minTop?top=minTop:top<maxTop&&(top=maxTop)),this.imgEl.style.transform="translate(".concat(left,"px, ").concat(top,"px)"),this.imgEl.style.webkitTransform="translate(".concat(left,"px, ").concat(top,"px)")}},{key:"_removeListenersAndResetClasses",value: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),removeClasses(this.el,this.openClasses),removeClasses(this.el,this.closingClasses)}},{key:"show",value:function(imageURL,triggerWidth,triggerHeight){this._removeListenersAndResetClasses(),this.isShowing=!0,addClasses(this.el,this.openClasses),this.imgEl.getAttribute("src")!=imageURL&&(addClasses(this.el,this.loadingClasses),this.imgEl.addEventListener("load",this._handleLoad),this._setImageURL(imageURL)),this._setImageSize(triggerWidth,triggerHeight),this._isInline?this._showInline():this._showInContainer(),this.HAS_ANIMATION&&(this.el.addEventListener("animationend",this._completeShow),this.el.addEventListener("webkitAnimationEnd",this._completeShow),addClasses(this.el,this.openingClasses))}},{key:"_showInline",value:function(){this.settings.inlineContainer.appendChild(this.el),addClasses(this.el,this.inlineClasses)}},{key:"_showInContainer",value:function(){this.settings.container.appendChild(this.el)}},{key:"hide",value:function(){this._removeListenersAndResetClasses(),this.isShowing=!1,this.HAS_ANIMATION?(this.el.addEventListener("animationend",this._completeHide),this.el.addEventListener("webkitAnimationEnd",this._completeHide),addClasses(this.el,this.closingClasses)):(removeClasses(this.el,this.openClasses),removeClasses(this.el,this.inlineClasses))}},{key:"_completeShow",value:function(){this.el.removeEventListener("animationend",this._completeShow),this.el.removeEventListener("webkitAnimationEnd",this._completeShow),removeClasses(this.el,this.openingClasses)}},{key:"_completeHide",value:function(){this.el.removeEventListener("animationend",this._completeHide),this.el.removeEventListener("webkitAnimationEnd",this._completeHide),removeClasses(this.el,this.openClasses),removeClasses(this.el,this.closingClasses),removeClasses(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,{key:"_handleLoad",value:function(){this.imgEl.removeEventListener("load",this._handleLoad),removeClasses(this.el,this.loadingClasses)}},{key:"_isInline",get:function(){var inline=this.settings.inline;return inline===!0||typeof inline=="number"&&window.innerWidth<=inline}}]),ZoomPane2})();function _classCallCheck4(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _defineProperties4(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass4(Constructor,protoProps,staticProps){return protoProps&&_defineProperties4(Constructor.prototype,protoProps),staticProps&&_defineProperties4(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Constructor}var Drift=(function(){function Drift2(triggerEl){var options=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(_classCallCheck4(this,Drift2),this.VERSION="1.5.1",this.triggerEl=triggerEl,this.destroy=this.destroy.bind(this),!isDOMElement(this.triggerEl))throw new TypeError("`new Drift` requires a DOM element as its first argument.");var namespace=options.namespace||null,showWhitespaceAtEdges=options.showWhitespaceAtEdges||!1,containInl
1ine=options.containInline||!1,inlineOffsetX=options.inlineOffsetX||0,inlineOffsetY=options.inlineOffsetY||0,inlineContainer=options.inlineContainer||document.body,sourceAttribute=options.sourceAttribute||"data-zoom",zoomFactor=options.zoomFactor||3,paneContainer=options.paneContainer===void 0?document.body:options.paneContainer,inlinePane=options.inlinePane||375,handleTouch="handleTouch"in options?!!options.handleTouch:!0,onShow=options.onShow||null,onHide=options.onHide||null,injectBaseStyles="injectBaseStyles"in options?!!options.injectBaseStyles:!0,hoverDelay=options.hoverDelay||0,touchDelay=options.touchDelay||0,hoverBoundingBox=options.hoverBoundingBox||!1,touchBoundingBox=options.touchBoundingBox||!1,boundingBoxContainer=options.boundingBoxContainer||document.body,passive=options.passive||!1;if(inlinePane!==!0&&!isDOMElement(paneContainer))throw new TypeError("`paneContainer` must be a DOM element when `inlinePane !== true`");if(!isDOMElement(inlineContainer))throw new TypeError("`inlineContainer` must be a DOM element");this.settings={namespace,showWhitespaceAtEdges,containInline,inlineOffsetX,inlineOffsetY,inlineContainer,sourceAttribute,zoomFactor,paneContainer,inlinePane,handleTouch,onShow,onHide,injectBaseStyles,hoverDelay,touchDelay,hoverBoundingBox,touchBoundingBox,boundingBoxContainer,passive},this.settings.injectBaseStyles&&injectBaseStylesheet(),this._buildZoomPane(),this._buildTrigger()}return _createClass4(Drift2,[{key:"_buildZoomPane",value:function(){this.zoomPane=new ZoomPane({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})}},{key:"_buildTrigger",value:function(){this.trigger=new Trigger({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})}},{key:"setZoomImageURL",value:function(imageURL){this.zoomPane._setImageURL(imageURL)}},{key:"disable",value:function(){this.trigger.enabled=!1}},{key:"enable",value:function(){this.trigger.enabled=!0}},{key:"destroy",value:function(){this.trigger._hide(),this.trigger._unbindEvents()}},{key:"isShowing",get:function(){return this.zoomPane.isShowing}},{key:"zoomFactor",get:function(){return this.settings.zoomFactor},set:function(zf){this.settings.zoomFactor=zf,this.zoomPane.settings.zoomFactor=zf,this.trigger.settings.zoomFactor=zf,this.boundingBox.settings.zoomFactor=zf}}]),Drift2})();Object.defineProperty(Drift.prototype,"isShowing",{get:function(){return this.isShowing}}),Object.defineProperty(Drift.prototype,"zoomFactor",{get:function(){return this.zoomFactor},set:function(value){this.zoomFactor=value}}),Drift.prototype.setZoomImageURL=Drift.prototype.setZoomImageURL,Drift.prototype.disable=Drift.prototype.disable,Drift.prototype.enable=Drift.prototype.enable,Drift.prototype.destroy=Drift.prototype.destroy;var import_fastdom3=__toESM(require_fastdom()),ProductGallery=class{constructor(element,options){this.element=element,this.delegateElement=new main_default(this.element),this.viewInSpaceElement=this.element.querySelector("[data-shopify-xr]"),this.options=options,this.media={},this.previouslySelectedMedia=null,this._createCarousel(),this._createZoom(),this._attachListeners()}destroy(){this.flickityInstance&&this.flickityInstance.destroy();for(let mediaId in this.media)this.media.hasOwnProperty(mediaId)&&this.media[mediaId].destroy()}_attachListeners(){this.delegateElement.on("model:played",this._disableDrag.bind(this)),this.delegateElement.on("video:played",this._disableDrag.bind(this)),this.delegateElement.on("model:paused",this._enableDrag.bind(this)),this.delegateElement.on("video:paused",this._enableDrag.bind(this)),this.options.enableImageZoom&&(window.addEventListener("resize",this._handleZoomForMediaQuery.bind(this)),this.delegateElement.on("click",".product-gallery__image",this._openMobileZoom.bind(this)),this.delegateElement.on("click",".psw
1p__button",this._doPswpAction.bind(this)));let lastWidth=window.innerWidth;window.addEventListener("resize",()=>{window.innerWidth!==lastWidth&&this.flickityInstance&&(this.flickityInstance.resize(),lastWidth=window.innerWidth)})}variantHasChanged(newVariant){if(document.getElementsByClassName("wcp_vd_table").length!=0&&document.getElementById("vdtable")!=null){var source=document.getElementById("vdtable").innerHTML,template=Handlebars.compile(source);if(document.getElementsByClassName("wcp_vd_table")[0]!=null&&document.getElementsByClassName("wcp_vd_table")[0].innerText!=""){var context=JSON.parse(document.getElementsByClassName("wcp_vd_table")[0].innerText),vdtable=[];vdtable.vdtable=context["wpd_"+newVariant.id],vdtable.vdtable.forEach(function(arrayItem){arrayItem.Price=arrayItem.Price.replace(/<\/?span[^>]*>/g,"")});var html=template(vdtable);try{document.getElementById("wcp_vd_table").innerHTML=html}catch{console.log("VD div not found")}}else try{document.getElementById("wcp_vd_table").innerHTML=""}catch{console.log("VD div not found")}}let shouldReload=!1;import_fastdom3.default.mutate(()=>{this.productGalleryCellsElements.forEach((cell,imageIndex)=>{if(cell.hasAttribute("data-group-name")){let groupName=cell.getAttribute("data-group-name");this.options.productOptions.forEach((option,optionIndex)=>{option.toLowerCase()===groupName&&(newVariant[`option${optionIndex+1}`].toLowerCase()===cell.getAttribute("data-group-value")||newVariant.featured_media&&newVariant.featured_media.id===parseInt(cell.getAttribute("data-media-id"))?(cell.classList.remove("is-filtered"),this.productThumbnailsCellsElements[imageIndex].classList.remove("is-filtered")):(cell.classList.add("is-filtered"),this.productThumbnailsCellsElements[imageIndex].classList.add("is-filtered")))}),shouldReload=!0}}),shouldReload&&(this.flickityInstance.deactivate(),this.flickityInstance.activate()),Responsive.matchesBreakpoint("lap-and-up")&&this.element.querySelectorAll(".product-gallery__carousel-item").forEach(sli
1de=>{slide.classList.remove("product-gallery__carousel-item--hidden")}),this.flickityInstance&&newVariant&&newVariant.featured_media&&this.flickityInstance.selectCell(`[data-media-id="${newVariant.featured_media.id}"]`)})}_createCarousel(){if(this.productGalleryElement=this.element.querySelector(".product-gallery__carousel"),this.productGalleryCellsElements=this.productGalleryElement?this.productGalleryElement.querySelectorAll(".product-gallery__carousel-item"):[],this.productGalleryElement&&(this.productGalleryCellsElements.forEach(item=>{switch(item.getAttribute("data-media-type")){case"external_video":case"video":this.media[item.getAttribute("data-media-id")]=new ProductVideo(item,this.options.enableVideoLooping);break;case"model":this.media[item.getAttribute("data-media-id")]=new ProductModel(item);break}}),parseInt(this.productGalleryElement.getAttribute("data-media-count"))>1)){let filteredCells=[].slice.call(this.productGalleryCellsElements).filter(item=>!item.classList.contains("is-filtered")),initialIndex=0;filteredCells.forEach((item,index)=>{item.getAttribute("data-media-id")===this.productGalleryElement.getAttribute("data-initial-media-id")&&(initialIndex=index)});let firstSlide=filteredCells[initialIndex];firstSlide.classList.add("is-selected"),this.productGalleryElement.style.height=`${firstSlide.clientHeight}px`,this.flickityInstance=new import_flickity_fade.default(this.productGalleryElement,{accessibility:!1,prevNextButtons:!1,pageDots:!1,resize:!1,adaptiveHeight:!0,draggable:!Responsive.matchesBreakpoint("supports-hover"),fade:this.options.galleryTransitionEffect==="fade",cellSelector:".product-gallery__carousel-item:not(.is-filtered)",initialIndex,on:{ready:()=>{setTimeout(()=>{this.productGalleryElement.style.height=null},1e3)}}})}this.productThumbnailsListElement=this.element.querySelector(".product-gallery__thumbnail-list"),this.delegateElement.on("click",".product-gallery__thumbnail",this._onThumbnailClicked.bind(this)),this.productThumbnailsListElement&&this.flickityInstance&&(this.productThumbnailsCellsElements=this.productThumbnailsListElement.querySelectorAll(".product-gallery__thumbnail"),this.flickityInstance.on("select",this._onGallerySlideChanged.bind(this)),this.options.galleryTransitionEffect==="fade"?this.flickityInstance.on("select",this._onGallerySlideSettled.bind(this)):this.flickityInstance.on("settle",this._onGallerySlideSettled.bind(this)),this._onGallerySlideChanged(!1),this._onGallerySlideSettled())}_createZoom(){if(this.options.enableImageZoom&&Responsive.matchesBreakpoint("lap-and-up")){this.driftObjects=[];let zoomWrapper=this.element.querySelector(".product__zoom-wrapper");this.element.querySelectorAll(".product-gallery__image").forEach(image=>{this.driftObjects.push(new Drift(image,{containInline:this.options.zoomEffect==="outside",inlinePane:window.innerWidth<1024?!0:this.options.zoomEffect!=="outside",hoverBoundingBox:this.options.zoomEffect==="outside",handleTouch:!1,inlineOffsetY:window.innerWidth<1024?-85:0,paneContainer:zoomWrapper}))})}}_openMobileZoom(){let pswpElement=this.element.querySelector(".pswp");if(!pswpElement||!Responsive.matchesBreakpoint("pocket"))return;let filteredItems=this.element.querySelectorAll('.product-gallery__carousel-item:not(.is-filtered)[data-media-type="image"]'),defaultIndex=0,items=[];filteredItems.forEach((filteredItem,index)=>{let image=filteredItem.querySelector(".product-gallery__image");items.push({src:image.getAttribute("data-zoom"),w:parseInt(image.getAttribute("data-zoom-width")),h:parseInt(image.getAttribute("data-zoom-width"))*(image.height/image.width),msrc:image.currentSrc}),filteredItem.classList.contains("is-selected")&&(defaultIndex=index)});const prevNextElement=pswpElement.querySelector(".pswp__prev-next");prevNextElement.style.display=items.length>1?"flex":"none",this.photoSwipeInstance=new import_photoswipe.default(pswpElement,!1,items,{index:defaultIndex,closeOnVerticalDrag:!1,closeOnScroll:!1,history:!1,showHideOpacity:!0,pinchToClose:!1,maxSpreadZoom:1,showAnimationDuration:!1,allowPanToNext:!1});let originalUpdateSize=this.photoSwipeInstance.updateSize,lastWidth=null;this.photoSwipeInstance.updateSize=function(){(lastWidth===null||lastWidth!==window.innerWidth)&&originalUpdateSize(this,arguments),lastWidth=window.innerWidth},this.photoSwipeInstance.listen("destroy",()=>{this.photoSwipeInstance=null}),this.photoSwipeInstance.listen("beforeChange",()=>{let currentItem=this.element.querySelector(".pswp__pagination-current"),paginationCount=this.element.querySelector(".pswp__pagination-count");currentItem.textContent=this.photoSwipeInstance.getCurrentIndex()+1,paginationCount.textContent=this.photoSwipeInstance.options.getNumItemsFn()}),this.photoSwipeInstance.init()}_doPswpAction(event2,element){this.photoSwipeInstance&&(element.classList.contains("pswp__button--close")?this.photoSwipeInstance.close():element.classList.contains("pswp__button--arrow--left")?this.photoSwipeInstance.prev():element.classList.contains("pswp__button--arrow--right")&&this.photoSwipeInstance.next())}_handleZoomForMediaQuery(){Responsive.matchesBreakpoint("lap-and-up")&&this.photoSwipeInstance&&(this.photoSwipeInstance.close(),this.photoSwipeInstance=null)}_onGallerySlideChanged(animate=!0){let previousNavElement=null,newNavElement=null;
1if(this.productThumbnailsCellsElements.forEach(item=>{item.classList.contains("is-nav-selected")&&(previousNavElement=item),item.getAttribute("data-media-id")===this.flickityInstance.selectedElement.getAttribute("data-media-id")&&(newNavElement=item)}),previousNavElement.classList.remove("is-nav-selected"),newNavElement.classList.add("is-nav-selected"),Responsive.matchesBreakpoint("pocket")){let scrollX=newNavElement.offsetLeft-(this.productThumbnailsListElement.parentNode.clientWidth-newNavElement.clientWidth)/2;this.productThumbnailsListElement.parentNode.scrollTo({left:scrollX,behavior:animate?"smooth":"auto"})}else{let scrollY=newNavElement.offsetTop-(this.productThumbnailsListElement.clientHeight-newNavElement.clientHeight)/2;this.productThumbnailsListElement.scrollTo({top:scrollY,behavior:animate?"smooth":"auto"})}}_onGallerySlideSettled(){this._handleMedia(this.flickityInstance.selectedElement),Responsive.matchesBreakpoint("lap-and-up")&&this.element.querySelectorAll(".product-gallery__carousel-item:not(.is-selected)").forEach(sli
1de=>{slide.classList.add("product-gallery__carousel-item--hidden")})}_onThumbnailClicked(event2,target){event2.preventDefault(),this.flickityInstance&&(this.flickityInstance.selectCell(`[data-media-id="${target.getAttribute("data-media-id")}"]`),Responsive.matchesBreakpoint("lap-and-up")&&this.element.querySelectorAll(".product-gallery__carousel-item").forEach(slide=>{slide.classList.remove("product-gallery__carousel-item--hidden")}))}_disableDrag(){this.flickityInstance.options.draggable=!1,this.flickityInstance.updateDraggable()}_enableDrag(){this.flickityInstance.options.draggable=!Responsive.matchesBreakpoint("supports-hover"),this.flickityInstance.updateDraggable()}_handleMedia(item){let isInitialLoading=this.previouslySelectedMedia===null;if(this.previouslySelectedMedia&&this.previouslySelectedMedia!==item){switch(this.previouslySelectedMedia.getAttribute("data-media-type")){case"video":case"external_video":case"model":this.media[this.previouslySelectedMedia.getAttribute("data-media-id")].hasBeenDeselected()}this.previouslySelectedMedia.getAttribute("data-media-type")==="model"&&this.viewInSpaceElement&&this.viewInSpaceElement.setAttribute("data-shopify-model3d-id",this.viewInSpaceElement.getAttribute("data-shopify-model3d-default-id"))}switch(item.getAttribute("data-media-type")){case"video":case"external_video":case"model":this.media[item.getAttribute("data-media-id")].hasBeenSelected(isInitialLoading),this.element.querySelector(".product-gallery__carousel").classList.remove("product-gallery__carousel--zoomable");break;case"image":this.element.querySelector(".product-gallery__carousel").classList.add("product-gallery__carousel--zoomable");break}item.getAttribute("data-media-type")==="model"&&this.viewInSpaceElement&&this.viewInSpaceElement.setAttribute("data-shopify-model3d-id",item.getAttribute("data-media-id")),this.previouslySelectedMedia=item}},QuantityPicker=class extends HTMLElement{constructor(){super(),this.inputElement=this.querySelector('[name="quantity"]'),this.delegateElement=new main_default(this),this._attachListeners()}_attachListeners(){this.delegateElement.on("click",'[data-action="decrease-picker-quantity"]',this._onDecrease.bind(this)),this.delegateElement.on("click",'[data-action="increase-picker-quantity"]',this._onIncrease.bind(this)),this.delegateElement.on("change",this._onInputValueChanged.bind(this)),this.delegateElement.on("focusout",this._onInputFocusOut.bind(this))}_onDecrease(){this.inputElement.stepDown(),this.inputElement.dispatchEvent(new Event("change",{bubbles:!0}))}_onIncrease(){this.inputElement.stepUp(),this.inputElement.dispatchEvent(new Event("change",{bubbles:!0}))}_onInputValueChanged(event2){let value=event2.target.value;value!==""&&isNaN(value)&&(event2.target.value=this.inputElement.min||1),this.inputElement.checkValidity()||this.inputElement.stepDown()}_onInputFocusOut(event2){this.inputElement.checkValidity()||this.inputElement.stepDown()}};window.customElements.get("quantity-picker")||window.customElements.define("quantity-picker",QuantityPicker);var Form=class _Form{static serialize(form){function stringKey(key,value){let beginBracket=key.lastIndexOf("[");if(beginBracket===-1){let hash2={};return hash2[key]=value,hash2}let newKey=key.substr(0,beginBracket),newValue={};return newValue[key.substring(beginBracket+1,key.length-1)]=value,stringKey(newKey,newValue)}let hash={};for(let i=0,len=form.elements.length;i<len;i++){let formElement=form.elements[i];if(!(formElement.name===""||formElement.disabled)&&formElement.name&&!formElement.disabled&&(formElement.checked||/select|textarea/i.test(formElement.nodeName)||/hidden|text|search|tel|url|email|password|datetime|date|month|week|time|datetime-local|number|range|c
1olor/i.test(formElement.type))){let stringKeys=stringKey(formElement.name,formElement.value);hash=_Form.extend(hash,stringKeys)}}return hash}static extend(){let extended={},i=0,merge=function(obj){for(let prop in obj)obj.hasOwnProperty(prop)&&(Object.prototype.toString.call(obj[prop])==="[object Object]"?extended[prop]=_Form.extend(extended[prop],obj[prop]):extended[prop]=obj[prop])};for(;i<arguments.length;i++)merge(arguments[i]);return extended}},ShippingEstimator=class{constructor(element,options){element&&(this.element=element,this.delegateElement=new main_default(this.element),this.options=options,this.countrySelector=new CountrySelector(this.element.querySelector('[name="country"]'),this.element.querySelector('[name="province"]')),this._attachListeners())}destroy(){this.delegateElement.off("click"),this.countrySelector.destroy()}_attachListeners(){this.delegateElement.on("click",'[data-action="estimate-shipping"]',this._fetchRates.bind(this))}_fetchRates(){document.dispatchEvent(new CustomEvent("theme:loading:start")),this.options.singleProduct?this._fetchRatesForProduct():this._fetchRatesForCart()}_fetchRatesForCart(){let country=this.element.querySelector('[name="country"]').value,province=this.element.querySelector('[name="province"]').value,zip=this.element.querySelector('[name="zip"]').value;fetch(`${window.routes.cartUrl}/shipping_rates.json?shipping_address[zip]=${zip}&shipping_address[country]=${country}&shipping_address[province]=${province}`,{credentials:"same-origin",method:"GET"}).then(response=>{document.dispatchEvent(new CustomEvent("theme:loading:end")),response.json().then(result=>{this._formatResults(response.ok,result)})})}_fetchRatesForProduct(){let cartCookie=this._getCookie("cart"),tempCookieValue="temp-cart-cookie___"+Date.now()+parseInt(Math.random()*1e3),fakeCookieValue="fake-cart-cookie___"+Date.now()+parseInt(Math.random()*1e3);if(cartCookie||(this._updateCartCookie(tempCookieValue),cartCookie=this._getCookie("cart")),cartCookie.length<32)return;this._updateCartCookie(fakeCookieValue);const formElement=document.querySelector('form[action*="/cart/add"]');fetch(`${window.routes.cartAddUrl}.js`,{body:JSON.stringify(Form.serialize(formElement)),credentials:"same-origin",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"},method:"POST"}).then(response=>{response.json().then(()=>{let country=this.element.querySelector('[name="country"]').value,province=this.element.querySelector('[name="province"]').value,zip=this.element.querySelector('[name="zip"]').value;fetch(`${window.routes.cartUrl}/shipping_rates.json?shipping_address[zip]=${zip}&shipping_address[country]=${country}&shipping_address[province]=${province}`,{credentials:"same-origin",method:"GET"}).then(response2=>{document.dispatchEvent(new CustomEvent("theme:loading:end")),response2.json().then(result=>{this._formatResults(response2.ok,result)}),this._updateCartCookie(cartCookie)}).catch(()=>{this._updateCartCookie(cartCookie)})}).catch(()=>{this._updateCartCookie(cartCookie),document.dispatchEvent(new CustomEvent("theme:loading:end"))})})}_formatResults(isOk,results){let resultsElement=this.element.querySelector(".shipping-estimator__results");if(resultsElement.innerHTML="",isOk){let shippingRates=results.shipping_rates;if(shippingRates.length===0)resultsElement.innerHTML=`<p>${window.languages.shippingEstimatorNoResults}</p>`;else{shippingRates.length===1?resultsElement.innerHTML=`<p>${window.languages.shippingEstimatorOneResult}</p>`:resultsElement.innerHTML=`<p>${window.languages.shippingEstimatorMultipleResults.replace("{{count}}",shippingRates.length)}</p>`;let listRatesHtml="";shippingRates.forEach(item=>{const formatter=new Intl.NumberFormat(Shopify.locale,{style:"currency",currency:item.currency});listRatesHtml+=`<li>${item.name}: ${formatter.format(item.price)}</li>`}),resultsElement.innerHTML+=`<ul>${listRatesHtml}</ul>`}}else{resultsElement.innerHTML=`<p>${window.languages.shippingEstimatorErrors}</p>`;let errorHtml="";Object.keys(results).forEach(function(key){errorHtml+=`<li class="alert__list-item">${key} ${results[key]}</li>`}),resultsElement.innerHTML+=`<ul>${errorHtml}</ul>`}resultsElement.style.display="block"}_getCookie(name){let value=`; ${document.cookie}`,parts=value.split("; "+name+"=");if(parts.length===2)return parts.pop().split(";").shift()}_updateCartCookie(value){let date=new Date;date.setTime(date.getTime()+14*864e5),document.cookie=`cart=${value}; expires=${date.toUTCString()}; path=/`}},ValuePicker=class{constructor(id,options={}){this.id=id,this.delegateRoot=new main_default(document.documentElement),this.isOpen=!1,this.togglerElement=document.querySelector(`[data-action="open-value-picker"][aria-controls="${this.id}"]`),this.onSelect=options.onValueSelect||(()=>{}),this._attachListeners()}destroy(){this.delegateRoot.off()}_attachListeners(){this.delegateRoot.on("click",`[data-action="open-value-picker"][aria-controls="${this.id}"]`,this._toggle.bind(this)),this.delegateRoot.on("click",`[data-action="close-value-picker"][aria-controls="${this.id}"]`,this._toggle.bind(this)),this.delegateRoot.on("click",`#${this.id} [data-action="select-value"]`,this._selectValue.bind(this)),this.delegateRoot.on("click",this._detectOutsideClick.bind(this),!0),this.delegateRoot.on("focusout",`#${this.id}`,this._onFocusOut.bind(this))}_toggle(event2){this.isOpen?this._close(event2):this._open(event2)}_open(){if(document.querySelector(`[data-action="open-value-picker"][aria-controls="${this.id}"]`).setAttribute("aria-expanded","true"),document.getElementById(this.id).setAttribute("aria-hidden","false"),Responsive.matchesBreakpoint("phone")){let headerElement=document.querySelector(".shopify-section__header");headerElement.style.zIndex="3"}this.isOpen=!0,document.documentElement.classList.add("is-locked")}_close(){document.querySelector(`[data-action="open-value-picker"][aria-controls="${this.id}
1"]`).setAttribute("aria-expanded","false"),document.getElementById(this.id).setAttribute("aria-hidden","true");let headerElement=document.querySelector(".shopify-section__header");headerElement.style.zIndex="",this.isOpen=!1,document.documentElement.classList.remove("is-locked")}_selectValue(event2,target){this.onSelect(target.getAttribute("data-value")),this._close()}_onFocusOut(event2){document.getElementById(this.id).contains(event2.relatedTarget)||this._close()}_detectOutsideClick(event2){!this.isOpen||this.togglerElement===event2.target||this.togglerElement.contains(event2.target)||!event2.target.closest(".value-picker__inner")&&this.isOpen&&this._close(event2)}},AccountSection=class{constructor(element){this.element=element,this.domDelegate=new main_default(this.element),this.element.querySelectorAll('[action*="/account/addresses"]').forEach(addressForm=>{new CountrySelector(addressForm.querySelector('[name="address[country]"]'),addressForm.querySelector('[name="address[province]"]'))}),this.pageSelector=new ValuePicker("account-selector")}_onUnload(){this.pageSelector.destroy()}},AnnouncementBarSection=class{constructor(element){this.element=element,this.domDelegate=new main_default(this.element),this.options=JSON.parse(this.element.getAttribute("data-section-settings")),this.isOpen=!1,this.options.showNewsletter?document.documentElement.style.setProperty("--announcement-bar-button-width",this.element.querySelector(".announcement-bar__button").clientWidth+"px"):document.documentElement.style.removeProperty("--announcement-bar-button-width"),this._attachListeners()}onSelect(){this.options.showNewsletter&&!this.isOpen&&this._toggleNewsletter()}onDeselect(){this.options.showNewsletter&&this.isOpen&&this._toggleNewsletter()}onUnload(){this.domDelegate.off()}_attachListeners(){this.domDelegate.on("click",'[data-action="toggle-newsletter"]',this._toggleNewsletter.bind(this)),this.domDelegate.on("keyup",this._handleKey.bind(this))}_toggleNewsletter(){let togglerElement=this.element.querySelector(".announcement-bar__button"),newsletterElement=this.element.querySelector(".announcement-bar__newsletter");togglerElement.getAttribute("aria-expanded")==="false"?(togglerElement.setAttribute("aria-expanded","true"),newsletterElement.setAttribute("aria-hidden","false"),Animation.slideDown(newsletterElement,()=>{Accessibility.trapFocus(newsletterElement,"announcement-bar")})):(togglerElement.setAttribute("aria-expanded","false"),newsletterElement.setAttribute("aria-hidden","true"),Animation.slideUp(newsletterElement),Accessibility.removeTrapFocus(newsletterElement,"announcement-bar")),this.isOpen=!this.isOpen}_handleKey(event2){event2.key==="Escape"&&this.isOpen&&this._toggleNewsletter()}},BlogSection=class{constructor(element){if(this.element=element,this.blogTagSelector=new ValuePicker("blog-tag-selector"),Shopify.designMode){let elementToAdd=this.element.querySelector(".page__header");elementToAdd&&(document.querySelector(".blog-container").previousElementSibling.remove(),document.querySelector(".blog-container").insertAdjacentElement("beforebegin",elementToAdd))}}onUnload(){this.blogTagSelector.destroy()}},BlogPostSection=class{constructor(element){if(this.element=element,Shopify.designMode){let elementToAdd=this.element.querySelector(".page__header");elementToAdd&&(document.querySelector(".blog-container").previousElementSibling.remove(),document.querySelector(".blog-container").insertAdjacentElement("beforebegin",elementToAdd))}}},BlogSidebarSection=class{constructor(element){this.element=element,window.theme.pageType==="blog"&&this._fixItemsPerRow()}_fixItemsPerRow(){this.element.querySelectorAll(".blog-sidebar__item").length===0?(document.querySelector(".blog-container").classList.add("blog-container--without-sidebar"),document.querySelectorAll(".shopify-section__blog-posts .block-list__item").forEach(function(item){item.classList.contains("1/2--lap-and-up")&&(item.classList.remove("1/2--lap-and-up"),item.classList.add("1/3--lap-and-up"))})):(document.querySelector(".blog-container").classList.remove("blog-container--without-sidebar"),document.querySelectorAll(".shopify-section__blog-posts .block-list__item").forEach(function(item){item.classList.contains("1/3--lap-and-up")&&(item.classList.remove("1/3--lap-and-up"),item.classList.add("1/2--lap-and-up"))}))}},ProductSection=class{constructor(element){this.element=element,this.delegateElement=new main_default(this.element),this.options=JSON.parse(this.element.getAttribute("data-section-settings")),this.productGallery=new ProductGallery(this.element,this.options),this.options.isQuickView&&window.Shopify.PaymentButton&&Shopify.PaymentButton.init(),this.options.showShippingEstimator&&(this.shippingEstimator=new ShippingEstimator(this.element.querySelector(".shipping-estimator"),{singleProduct:!0}));let productInfoElement=this.element.querySelector(".product-block-list__item--info .card");productInfoElement&&(this.element.querySelector(".product-block-list__wrapper").style.minHeight=`${productInfoElement.clientHeight}px`,window.ResizeObserver&&(this.productInfoResizeObserver=new ResizeObserver(event2=>{event2[0].contentBoxSize?this.element.querySelector(".product-block-list__wrapper").style.minHeight=`${event2[0].contentBoxSize[0].blockSize}px`:this.element.querySelector(".product-block-list__wrapper").style.minHeight=`${event2[0].contentRect.height}px`}),this.productInfoResizeObserver.observe(productInfoElement)),this.options.infoOverflowScroll&&(this.infoOverflowScroller=new OverflowScroller(productInfoElement,{offsetTop:document.documentElement.style.getPropertyValue("--header-is-sticky")*parseInt(document.documentElement.style.getPropertyValue("--header-height")+30),offsetBottom:30}))),this._attachListeners()}onUnload(){this.productGallery.destroy(),this.options.showShippingEstimator&&this.shippingEstimator.destroy(),this.options.infoOverflowScroll&&this.infoOverflowScroller.destroy(),window.ResizeObserver&&this.productInfoResizeObserver&&this.productInfoResizeObserver.disconnect(),this.delegateElement.off(),this.element.removeEventListener("variant:change",this._onVariantChangedListener)}_attachListeners(){this._onVariantChangedListener=this._onVariantChanged.bind(this),this.element.addEventListener("variant:change",this._onVariantChangedListener)}_onVariantChanged(event2){this.productGallery.variantHasChanged(event2.detail.variant)}},CartSection=class{constructor(element){this.element=element,this.domDelegate=new main_default(this.element),this.delegateRoot=new main_default(document.documentElement),this.options=JSON.parse(this.element.getAttribute("data-section-settings")),this.options.showShippingEstimator&&(this.shippingEstimator=new ShippingEstimator(this.element.querySelector(".shipping-estimator"),{singleProduct:!1})),this._attachListeners(),this._enforceMinimumHeight()}onUnload(){this.options.showShippingEstimator&&this.shippingEstimator.destroy()}_attachListeners(){this.domDelegate.on("click",'[data-action="save-note"]',this._saveNote.bind(this)),this.domDelegate.on("click",'[data-secondary-action="open-quick-view"]',this._openQuickView.bind(this)),this.delegateRoot.on("cart:rerendered",this._onCartRerendered.bind(this))}_saveNote(){let noteValue=this.element.querySelector('[name="note"]').value;fetch(`${window.routes.cartUrl}/update.js`,{body:JSON.stringify({note:noteValue}),credentials:"same-origin",method:"POST",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}),this.element.querySelector(".cart-recap__note-edit").classList.toggle("is-visible",noteValue!==""),document.dispatchEvent(new CustomEvent("collapsible:toggle",{detail:{id:"order-note"}}))}_openQuickView(event2,target){let modal=document.getElementById(target.getAttribute("aria-controls"));modal.classList.add("is-loading"),fetch(`${target.getAttribute("data-product-url")}`,{credentials:"same-origin",method:"GET"}).then(response=>{response.text().then(content=>{const fragment=document.createRange().createContextualFragment(content),modalContent=Dom.deepQuerySelector(fragment,'[data-section-type="product-quick-view"]');modal.querySelector(".modal__inner").replaceChildren(modalContent),modal.classList.remove("is-loading");let modalProductSection=new ProductSection(modalContent),doCleanUp=()=>{modalProductSection.onUnload(),modal.removeEventListener("modal:closed",doCleanUp)};modal.addEventListener("modal:closed",doCleanUp)})})}_enforceMinimumHeight(){let cartWrapperElement=this.element.querySelector(".cart-wrapper"),cartRecapScrollerElement=this.element.querySelector(".cart-recap__scroller");cartWrapperElement&&cartRecapScrollerElement&&(cartWrapperElement.style.minHeight=`${cartRecapScrollerElement.clientHeight}px`,window.ResizeObserver&&new ResizeObserver(entries=>
1{for(let entry of entries)cartWrapperElement.style.minHeight=`${parseInt(entry.contentRect.height)}px`}).observe(cartRecapScrollerElement))}_onCartRerendered(){this.options.showShippingEstimator&&(this.shippingEstimator.destroy(),this.shippingEstimator=new ShippingEstimator(this.element.querySelector(".shipping-estimator"),{singleProduct:!1})),this._enforceMinimumHeight()}},import_flickity=__toESM(require_js()),CollectionListSection=class{constructor(element){this.element=element;const collectionListElement=this.element.querySelector(".collection-list");this.flickityInstance=new import_flickity.default(collectionListElement,{watchCSS:!0,prevNextButtons:!0,draggable:!window.matchMedia("(-moz-touch-enabled: 0), (hover: hover)").matches,pageDots:!1,resize:!1,cellAlign:collectionListElement.childElementCount<6?"center":"left",contain:!0,groupCells:!0});let lastWidth=window.innerWidth;window.addEventListener("resize",()=>{window.innerWidth!==lastWidth&&(this.flickityInstance.resize(),lastWidth=window.innerWidth)})}onUnload(){this.flickityInstance.destroy()}onBlockSelect(event2){this.flickityInstance.isActive&&this.flickityInstance.selectCell(parseInt(event2.target.getAttribute("data-collection-index")),null,event2.detail.load)}},import_fastdom4=__toESM(require_fastdom()),CollectionSection=class{constructor(element){this.element=element,this.delegateElement=new main_default(this.element),this.options=JSON.parse(this.element.getAttribute("data-section-settings")),this.currentUrl=new URL(window.location.href),this.mobileFilterDrawer=new CollectionFilterDrawer(this.options),this.displayByValuePicker=new ValuePicker("display-by-selector",{onValueSelect:this._showingCountChanged.bind(this)}),this.sortByValuePicker=new ValuePicker("sort-by-selector",{onValueSelect:this._sortByChanged.bind(this)}),this.productItemColorSwatch=new ProductItemColorSwatch(this.element),window.theme.pageType==="search"&&this._loadContentResults(),window.addEventListener("popstate",()=>{this.currentUrl=new URL(window.location.href),this._reload(!1)}),this._attachListeners()}onUnload(){this.delegateElement.off(),this.mobileFilterDrawer.destroy(),this.displayByValuePicker.destroy(),this.sortByValuePicker.destroy(),this.productItemColorSwatch.destroy()}onSelect(event2){Shopify.designMode&&event2.detail.load&&(this.element.querySelector(`.collection__layout-button[data-layout-mode="${this.options.defaultLayout}"]`).click(),this._showingCountChanged(this.options.defaultProductsPerPage))}_attachListeners(){this.delegateElement.on("click",'[data-action="change-layout"]',this._changeLayout.bind(this)),this.delegateElement.on("change","#mobile-sort-by, #desktop-sort-by",this._sortByChanged.bind(this)),this.delegateElement.on("change","#showing-count",this._showingCountChanged.bind(this)),this.delegateElement.on("click",".pagination [data-page]",this._paginationPageChanged.bind(this)),this.delegateElement.on("click",'[data-secondary-action="open-quick-view"]',this._openQuickView.bind(this)),this.delegateElement.on("change",'[name^="filter."]',this._onFilterChanged.bind(this)),this.delegateElement.on("click",'[data-action="clear-filters"]',this._onFiltersCleared.bind(this))}_openQuickView(event2,target){let productUrl=new URL(`${window.location.origin}${target.getAttribute("data-product-url")}`);if(Responsive.matchesBreakpoint("phone")||Responsive.matchesBreakpoint("tablet"))return window.location.href=productUrl.href,!1;let modal=document.getElementById(target.getAttribute("aria-controls"));modal.classList.add("is-loading"),fetch(productUrl.href,{credentials:"same-origin",method:"GET"}).then(response=>{response.text().then(content=>{const fragment=document.createRange().createContextualFragment(content),modalContent=Dom.deepQuerySelector(fragment,'[data-section-type="product-quick-view"]');modal.querySelector(".modal__inner").replaceChildren(modalContent),modal.classList.remove("is-loading");let modalProductSection=new ProductSection(modalContent),doCleanUp=()=>{modalProductSection.onUnload(),modal.removeEventListener("modal:closed",doCleanUp)};modal.addEventListener("modal:closed",doCleanUp)})})}_changeLayout(event2,target){if(target.classList.contains("is-selected"))return;const newLayoutMode=target.getAttribute("data-layout-mode");fetch(`${window.routes.cartUrl}/update.js`,{body:JSON.stringify({attributes:{collection_layout:newLayoutMode}}),credentials:"same-origin",method:"POST",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}),import_fastdom4.default.mutate(()=>{Dom.getSiblings(target,".is-selected").forEach(button=>button.classList.remove("is-selected")),target.classList.add("is-selected"),this.element.querySelectorAll(".product-item").forEach(item=>{newLayoutMode==="grid"?item.className=`product-item product-item--vertical ${this.options.gridClasses}`:item.className="product-item product-item--list"}),this.productItemColorSwatch.recalculateSwatches()})}
1_sortByChanged(value){this.currentUrl.searchParams.set("sort_by",value),this.currentUrl.searchParams.delete("page"),this._reload(!0)}_showingCountChanged(value){this.currentUrl.searchParams.delete("page"),fetch(`${window.routes.cartUrl}/update.js`,{body:JSON.stringify({attributes:{collection_products_per_page:value}}),credentials:"same-origin",method:"POST",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}).then(()=>{this._reload(!0)})}_paginationPageChanged(event2,target){event2.preventDefault(),this.currentUrl.searchParams.set("page",parseInt(target.getAttribute("data-page"))),this._reload(!0)}_onFilterChanged(event2,target){const formData=new FormData(target.closest("form")),searchParamsAsString=new URLSearchParams(formData).toString();this.currentUrl=new URL(`${window.location.pathname}?${searchParamsAsString}`,window.location.origin),this._reload(!0)}_onFiltersCleared(event2,target){this.currentUrl=new URL(target.getAttribute("data-url"),window.location.origin),this._reload(!0)}_reload(pushState){this.abortController&&this.abortController.abort(),pushState&&window.history.pushState({path:this.currentUrl.toString()},"",this.currentUrl.toString()),document.dispatchEvent(new CustomEvent("theme:loading:start"));const computedStyles=window.getComputedStyle(document.documentElement);let sectionUrl="";this.currentUrl.search?sectionUrl=`${this.currentUrl.pathname}/${this.currentUrl.search}&section_id=${this.element.getAttribute("data-section-id")}`:sectionUrl=`${this.currentUrl.pathname}?section_id=${this.element.getAttribute("data-section-id")}`;try{return this.abortController=new AbortController,fetch(sectionUrl,{credentials:"same-origin",method:"GET",signal:this.abortController.signal}).then(response=>{response.text().then(content=>{let tempElement=document.createElement("div");tempElement.innerHTML=content,this.element.querySelector(".collection__dynamic-part").innerHTML=tempElement.querySelector(".collection__dynamic-part").innerHTML;let desktopFilters=this.element.querySelector("#desktop-filters-form"),mobileFilters=this.element.querySelector("#mobile-collection-filters"),previousMobileScrollTop=0;mobileFilters&&(previousMobileScrollTop=mobileFilters.querySelector(".collection-drawer__inner").scrollTop),desktopFilters&&(Array.from(this.element.querySelectorAll(".collection__filter-group-name[aria-controls]")).forEach(groupName=>{let newGroup=tempElement.querySelector(`[aria-controls="${groupName.getAttribute("aria-controls")}"]`);newGroup&&(groupName.getAttribute("aria-expanded")==="true"?(newGroup.setAttribute("aria-expanded","true"),newGroup.nextElementSibling.setAttribute("aria-hidden","false"),newGroup.nextElementSibling.style.height="auto",newGroup.nextElementSibling.style.overflow="visible"):(newGroup.setAttribute("aria-expanded","false"),newGroup.nextElementSibling.setAttribute("aria-hidden","true"),newGroup.nextElementSibling.style=""))}),desktopFilters.innerHTML=tempElement.querySelector("#desktop-filters-form").innerHTML,mobileFilters.innerHTML=tempElement.querySelector("#mobile-collection-filters").innerHTML,mobileFilters.querySelector(".collection-drawer__inner").scrollTop=previousMobileScrollTop,this.mobileFilterDrawer._computeDrawerHeight()),this.productItemColorSwatch.recalculateSwatches();const elementOffset=this.element.querySelector(".collection").getBoundingClientRect().top-25-parseInt(computedStyles.getPropertyValue("--header-is-sticky"))*parseInt(computedStyles.getPropertyValue("--header-height"));elementOffset<0&&window.scrollBy({top:elementOffset,behavior:"smooth"});const countJson=JSON.parse(tempElement.querySelector("[data-collection-products-count]").innerHTML);let showingProductsCount=this.element.querySelector(".collection__products-count-showing");showingProductsCount&&(showingProductsCount.innerHTML=countJson.showingCount),this.element.querySelector(".collection__products-count-total").innerHTML=countJson.productsCount,document.dispatchEvent(new CustomEvent("theme:loading:end"))})})}catch{}}_loadContentResults(){let currentUrl=new URL(window.location.href);fetch(`${window.routes.searchUrl}?section_id=search-content&q=${currentUrl.searchParams.get("q")}&type=article,page`,{credentials:"same-origin"}).then(response=>{response.text().then(content=>{let linkSearchResults=this.element.querySelector(".link-search-results"),fakeDiv=document.createElement("div");fakeDiv.innerHTML=content,linkSearchResults&&content.trim()!==""&&(linkSearchResults.innerHTML=fakeDiv.firstElementChild.innerHTML,linkSearchResults.style.display="block")})})}},import_flickity2=__toESM(require_js()),FeaturedCollectionSection=class{constructor(element){if(this.element=element,this.delegateElement=new main_default(this.element),this.options=JSON.parse(this.element.getAttribute("data-section-settings")),!this.options.stackable){this.flickityInstance=new import_flickity2.default(this.element.querySelector(".product-list"),{watchCSS:!0,pageDots:!1,prevNextButtons:!0,contain:!0,resize:!1,groupCells:!0,cellAlign:"left",draggable:!window.matchMedia("(-moz-touch-enabled: 0), (hover: hover)").matches});let lastWidth=window.innerWidth;window.addEventListener("resize",()=>{window.innerWidth!==lastWidth&&(this.flickityInstance.resize(),lastWidth=window.innerWidth)})}this.productItemColorSwatch=new ProductItemColorSwatch(this.element),this._fixSafari(),this._attachListeners()}onUnload(){this.options.stackable||this.flickityInstance.destroy(),window.removeEventListener("resize",this._fixSafariListener),this.delegateElement.off("change"),this.productItemColorSwatch.destroy(),this.resizeObserver&&this.resizeObserver.disconnect()}_attachListeners(){this._fixSafariListener=this._fixSafari.bind(this),window.addEventListener("resize",this._fixSafariListener),this.delegateElement.on("click",'[data-secondary-action="open-quick-view"]',this._openQuickView.bind(this)),window.ResizeObserver&&this.flickityInstance&&(this.resizeObserver=new ResizeObserver(()=>{this.flickityInstance.resize()}),this.element.querySelectorAll(".product-item").forEach(item=>{this.resizeObserver.observe(item)}))}_fixSafari(){const userAgent=window.navigator.userAgent.toLowerCase();if(userAgent.includes("safari")&&(userAgent.includes("version/10.1")||userAgent.includes("version/10.3")||userAgent.includes("version/11.0"))){const isPhone=Responsive.matchesBreakpoint("phone");this.element.querySelectorAll(".product-item__image-wrapper .aspect-ratio, .product-item__image-wrapper .placeholder-svg").forEach(image=>{isPhone?image.parentNode.style.height=null:image.parentNode.style.height=`${image.clientHeight}px`})}}_openQuickView(event2,target){let productUrl=new URL(`${window.location.origin}${target.getAttribute("data-product-url")}`);
1if(Responsive.matchesBreakpoint("phone")||Responsive.matchesBreakpoint("tablet"))return window.location.href=productUrl.href,!1;let modal=document.getElementById(target.getAttribute("aria-controls"));modal.classList.add("is-loading"),fetch(productUrl.href,{credentials:"same-origin",method:"GET"}).then(response=>{response.text().then(content=>{const fragment=document.createRange().createContextualFragment(content),modalContent=Dom.deepQuerySelector(fragment,'[data-section-type="product-quick-view"]');modal.querySelector(".modal__inner").replaceChildren(modalContent),modal.classList.remove("is-loading");let modalProductSection=new ProductSection(modalContent),doCleanUp=()=>{modalProductSection.onUnload(),modal.removeEventListener("modal:closed",doCleanUp)};modal.addEventListener("modal:closed",doCleanUp)})})}},GiftCardSection=class{constructor(container){this.element=container,this.delegateElement=new main_default(this.element),this._createQrCode(),this._attachListeners()}onUnload(){this.delegateElement.off()}_createQrCode(){document.querySelectorAll(".gift-card__qr").forEach(qrCodeElement=>{new QRCode(qrCodeElement,{text:qrCodeElement.getAttribute("data-identifier"),width:200,height:200})})}_attachListeners(){this.delegateElement.on("click",'[data-action="print"]',this._print.bind(this)),this.delegateElement.on("click",'[data-action="select-code"]',this._selectCode.bind(this))}_print(){window.print()}_selectCode(event2,element){element.select()}},FooterSection=class{constructor(element){this.element=element,this.localeValuePicker=new ValuePicker("footer-locale-picker"),this.currencyValuePicker=new ValuePicker("footer-currency-picker"),this._setupCollapsibles(),this._attachListeners()}onUnload(){window.removeEventListener("resize",this._setupCollapsiblesListener),this.localeValuePicker.destroy(),this.currencyValuePicker.destroy()}_attachListeners(){this._setupCollapsiblesListener=this._setupCollapsibles.bind(this),window.addEventListener("resize",this._setupCollapsiblesListener)}_setupCollapsibles(){let collapsibleToggles=this.element.querySelectorAll('[data-action="toggle-collapsible"]'),isPhone=Responsive.matchesBreakpoint("phone");collapsibleToggles.forEach(collapsibleToggle=>{isPhone?collapsibleToggle.removeAttribute("disabled"):(collapsibleToggle.setAttribute("disabled","disabled"),document.getElementById(collapsibleToggle.getAttribute("aria-controls")).style.height="")})}},SearchBar=class{constructor(element){this.element=element,this.delegateElement=new main_default(this.element),this.headerElement=this.element.closest(".header"),this.searchBarElement=this.element.querySelector(".search-bar"),this.inputElement=this.element.querySelector('[name="q"]'),this.searchMenuElement=this.element.querySelector(".search-bar__menu-wrapper"),this.searchResultsElement=this.element.querySelector(".search-bar__results"),this.closeButtonElement=this.element.querySelector(".search-bar__close-button"),this.productTypeFilter="",this.isSearchOpen=!1,this._attachListeners()}destroy(){this.delegateElement.off()}_attachListeners(){this.delegateElement.on("click",'[data-action="clear-input"]',this._clearInput.bind(this)),this.delegateElement.on("click",'[data-action="unfix-search"]',this._unfixMobileSearch.bind(this)),this.delegateElement.on("focusin",'[name="q"]',this._onInputFocus.bind(this)),document.addEventListener("click",this._onFocusOut.bind(this)),this.delegateElement.on("keydown",'[name="q"]',this._handleTab.bind(this)),this.delegateElement.on("input",'[name="q"]',this._debounce(this._doSearch.bind(this),250)),this.delegateElement.on("change","#search-product-type",this._productTypeChanged.bind(this)),this.delegateElement.on("submit",this._onFormSubmit.bind(this)),window.addEventListener("pageshow",event2=>{event2.persisted&&(this._clearInput(),this.isSearchOpen&&this.toggleMobileSearch())})}toggleMobileSearch(){this.isSearchOpen?(this.headerElement.classList.remove("header--search-expanded"),this.element.classList.remove("is-visible")):(this.headerElement.classList.add("header--search-expanded"),this.element.classList.add("is-visible")),this.isSearchOpen=!this.isSearchOpen}_unfixMobileSearch(){this.element.classList.remove("is-fixed"),this.closeButtonElement.style.width="",this.searchBarElement.classList.remove("is-expanded"),this.searchResultsElement.setAttribute("aria-hidden","true"),this.inputElement.classList.remove("is-filled"),document.documentElement.classList.remove("is-locked"),this.searchMenuElement&&this.searchMenuElement.setAttribute("aria-hidden","true")}_clearInput(){this.inputElement.value="",this.inputElement.classList.remove("is-filled"),this.searchResultsElement.setAttribute("aria-hidden","true"),this.searchMenuElement&&this.searchMenuElement.setAttribute("aria-hidden","false")}_onInputFocus(){this.element.classList.add("is-fixed"),this.closeButtonElement.style.width=`${this.closeButtonElement.firstElementChild.offsetWidth}px`,document.documentElement.classList.add("is-locked"),this.inputElement.value===""?(this.searchMenuElement&&this.searchMenuElement.setAttribute("aria-hidden","false"),this.searchResultsElement.setAttribute("aria-hidden","true")):(this.searchMenuElement&&this.searchMenuElement.setAttribute("aria-hidden","true"),this.searchResultsElement.setAttribute("aria-hidden","false"),this.inputElement.classList.add("is-filled"),this.searchBarElement.classList.add("is-expanded")),this.searchMenuElement&&this.searchBarElement.classList.add("is-expanded")}_onFocusOut(event2){Responsive.matchesBreakpoint("phone")||Responsive.matchesBreakpoint("phone")||event2.target.classList.contains("search-bar__input")||event2.target.closest(".search-bar__inner")||setTimeout(()=>{this.element.classList.remove("is-fixed"),document.documentElement.classList.remove("is-locked"),this.element.contains(event2.relatedTarget)||(this.searchMenuElement&&this.searchMenuElement.setAttribute("aria-hidden","true"),this.searchResultsElement.setAttribute("aria-hidden","true"),this.searchBarElement.classList.remove("is-expanded"))},150)}_handleTab(event2){if(event2.key!=="Tab")return;let firstFocusableElement=this.searchResultsElement.querySelector("a");firstFocusableElement&&(firstFocusableElement.focus(),event2.preventDefault())}_doSearch(){let currentInput=this.inputElement.value;if(this.lastInputValue=currentInput,currentInput==="")this.searchMenuElement?this.searchMenuElement.setAttribute("aria-hidden","false"):this.searchBarElement.classList.remove("is-expanded"),this.searchResultsElement.setAttribute("aria-hidden","true");else{this.searchMenuElement&&this.searchMenuElement.setAttribute("aria-hidden","true"),this.searchResultsElement.setAttribute("aria-hidden","false"),this.searchBarElement.classList.add("is-expanded","is-loading");let queryOptions={method:"GET",credentials:"same-origin"},url=`${window.Shopify.routes.root}search${this._supportsPredictiveApi()?"/suggest":""}`,productQuery=`${this.productTypeFilter!==""?`product_type:${this.productTypeFilter} AND `:""}${encodeURIComponent(this.lastInputValue)}`,queries=[fetch(`${url}?section_id=predictive-search&q=${productQuery}&resources[limit]=3&resources[limit_scope]=each&resources[options][fields]=title,product_type,variants.title,variants.sku,vendor`,queryOptions)];Promise.all(queries).then(responses=>{this.lastInputValue===currentInput&&Promise.all(responses.map(response=>response.text().then(responseAsText=>{let div=document.createElement("div");return div.innerHTML=responseAsText,div.querySelector(".search-ajax").innerHTML}))).then(contents=>{this.searchBarElement.classList.remove("is-loading");let searchContent=document.createElement("div");searchContent.innerHTML=contents.join("").trim();let viewAll=searchContent.querySelector(".search-bar__view-all");viewAll&&searchContent.insertAdjacentElement("beforeend",viewAll),this.searchBarElement.querySelector(".search-bar__results-inner").innerHTML=searchContent.innerHTML})})}}_supportsPredictiveApi(){return JSON.parse(document.getElementById("shopify-features").innerHTML).predictiveSearch}_productTypeChanged(event2,target){target.closest(".search-bar__filter").querySelector(".search-bar__filter-active").innerText=target.options[target.selectedIndex].innerText,this.productTypeFilter=target.value,this.inputElement.value!==""&&this._doSearch()}_onFormSubmit(event2){let cloneNode=this.inputElement.cloneNode();cloneNode.setAttribute("type","hidden"),cloneNode.value="",this.productTypeFilter!==""&&(cloneNode.value+=`product_type:${this.productTypeFilter}`,this.inputElement.value!==""&&(cloneNode.value+=" AND ")),cloneNode.value+=this.inputElement.value,this.inputElement.removeAttribute("name"),this.inputElement.insertAdjacentElement("afterend",cloneNode)}_debounce(fn,delay){let timer=null;return(...args)=>{clearTimeout(timer),timer=setTimeout(()=>{fn.apply(this,args)},delay)}}},HeaderSection=class{constructor(element){this.element=element,this.delegateElement=new main_default(this.element),this.options=JSON.parse(this.element.getAttribute("data-section-settings")),this.searchBar=new SearchBar(this.element.querySelector(".header__search-bar-wrapper")),this.cart=new Cart(this.element.querySelector(".header__action-item--cart"),{useStickyHeader:this.options.useStickyHeader});let desktopNavigationElement=this.element.querySelector(this.options.navigationLayout==="inline"?".nav-bar":".header__desktop-nav");desktopNavigationElement&&(this.desktopNavigation=new DesktopNavigation(desktopNavigationElement,this.options.navigationLayout,this.options.desktopOpenTrigger));let mobileNavigationElement=this.element.querySelector(".header__mobile-nav");mobileNavigationElement&&(this.mobileNavigation=new MobileNavigation(mobileNavigationElement)),this._setupCssVariables(),this._attachListeners()}onUnload(){this.searchBar.destroy(),this.cart.destroy(),this.desktopNavigation&&this.desktopNavigation.destroy(),this.mobileNavigation&&this.mobileNavigation.destroy(),window.removeEventListener("resize",this._setupCssVariablesListener)}onBlockSelect(event2){this.desktopNavigation&&this.desktopNavigation.onBlockSelect(event2)}onBlockDeselect(event2){this.desktopNavigation&&this.desktopNavigation.onBlockDeselect(event2)}_attachListeners(){this._setupCssVariablesListener=this._setupCssVariables.bind(this),window.addEventListener("resize",this._setupCssVariablesListener),this.delegateElement.on("click",'[data-action="toggle-search"]',this._toggleMobileSearch.bind(this))}_setupCssVariables(){document.documentElement.style.setProperty("--header-height",this.element.parentNode.clientHeight+"px")}_toggleMobileSearch(event2){this.searchBar.toggleMobileSearch(),event2.preventDefault()}},LoginSection=class{constructor(element){this.element=element,this.domDelegate=new main_default(this.element),this.customerLoginForm=this.element.querySelector("#customer_login"),this.recoverPasswordForm=this.element.querySelector("#recover_customer_password"),this.domDelegate.on("click",'[data-action="toggle-login-form"]',this._showRecoverPassword.bind(this))}_showRecoverPassword(){this.customerLoginForm.style.display==="block"?(this.customerLoginForm.style.display="none",this.recoverPasswordForm.style.display="block"):(this.customerLoginForm.style.display="block",this.recoverPasswordForm.style.display="none")}},MapSection=class{constructor(element){this.element=element,this.delegateElement=new main_default(this.element),this.options=JSON.parse(element.getAttribute("data-section-settings")),this.mapPositions=[],this.desktopMarkers=[],this.desktopMapElement=null,this.mobileMarkers=[],this.mobileMapElements=[],this.options.apiKey&&this.options.mapAddresses.length>0&&this._loadScript().then(this._initMaps.bind(this)),this._attachListeners()}onUnload(){this.delegateElement.off("click"),this.options.apiKey&&this.options.mapAddresses.length>0&&google.maps.event.clearInstanceListeners(window)}onBlockSelect(event2){this._showStore(event2.target)}_attachListeners(){this.delegateElement.on("click",'[data-action="toggle-store"]',(event2,target)=>{this._showStore(target.closest(".map__store-item"))})}_showStore(storeItem){let toggleButton=storeItem.querySelector('[data-action="toggle-store"]');if(Responsive.getCurrentBreakpoint()!=="phone"&&toggleButton.getAttribute("aria-expanded")==="true")return;toggleButton.getAttribute("aria-expanded")==="true"?(toggleButton.setAttribute("aria-expanded","fal
1se"),Animation.slideUp(storeItem.querySelector(".map__store-collapsible"))):(toggleButton.setAttribute("aria-expanded","true"),Animation.slideDown(storeItem.querySelector(".map__store-collapsible"))),Dom.getSiblings(storeItem).forEach(storeItemToClose=>{storeItemToClose.querySelector('[data-action="toggle-store"]').setAttribute("aria-expanded","false"),Animation.slideUp(storeItemToClose.querySelector(".map__store-collapsible"))});let storeIndex=parseInt(storeItem.getAttribute("data-store-index"));this.desktopMapElement.panTo(this.mapPositions[storeIndex]),this.desktopMarkers.forEach((marker,index)=>{marker.setMap(this.desktopMapElement),index===storeIndex?marker.icon.fillColor=this.options.markerActiveColor:marker.icon.fillColor=this.options.markerColor})}_loadScript(){return new Promise((resolve,reject)=>{const script=document.createElement("script");document.body.appendChild(script),script.onload=resolve,script.onerror=reject,script.async=!0,script.src=`https://maps.googleapis.com/maps/api/js?key=${this.options.apiKey}`})}_initMaps(){const mapOptions={zoom:this.options.zoom,draggable:this.options.draggableMap,clickableIcons:!1,scrollwheel:this.options.draggableMap,disableDoubleClickZoom:!0,disableDefaultUI:!this.options.showMapControls,styles:JSON.parse(this.element.querySelector("[data-gmap-style]").innerHTML)};this.desktopMapElement=new google.maps.Map(this.element.querySelector(".map__map-container--desktop .map__gmap"),mapOptions),this.mobileMapElements=[],this.element.querySelectorAll(".map__map-container--mobile .map__gmap").forEach((item,index)=>{this.mobileMapElements[index]=new google.maps.Map(item,mapOptions)}),this._geocodeAddresses(),google.maps.event.addDomListener(window,"resize",()=>{const desktopCenter=this.desktopMapElement.getCenter();google.maps.event.trigger(this.desktopMapElement,"resize"),this.desktopMapElement.setCenter(desktopCenter),this.mobileMapElements.forEach(mobileMap=>{const mobileCenter=mobileMap.getCenter();google.maps.event.trigger(mobileMap,"resize"),mobileMap.setCenter(mobileCenter)})})}_onMarkerClicked(address){window.open(`https://www.google.com/maps/search/?api=1&query=${address}`,"_blank")}_geocodeAddresses(){let geocoder=new google.maps.Geocoder;this.options.mapAddresses.forEach((address,index)=>{geocoder.geocode({address},(results,status)=>{if(status!==google.maps.GeocoderStatus.OK)Shopify.designMode;else{const position=results[0].geometry.location;this.mapPositions[index]=position,this.desktopMarkers[index]=new google.maps.Marker({map:index===0?this.desktopMapElement:null,position,icon:{path:"M12.5,0 C6.388889,0 0,4.7304348 0,12.5217391 C0,19.8956522 11.111111,31.1652174 11.527778,31.5826087 C11.805556,31.8608696 12.083333,32 12.5,32 C12.916667,32 13.194444,31.8608696 13.472222,31.5826087 C13.888889,31.1652174 25,19.8956522 25,12.5217391 C25,4.7304348 18.611111,0 12.5,0 Z M12,16 C9.733333,16 8,14.2666667 8,12 C8,9.7333333 9.733333,8 12,8 C14.266667,8 16,9.7333333 16,12 C16,14.2666667 14.266667,16 12,16 Z",fillColor:index===0?this.options.markerActiveColor:this.options.markerColor,fillOpacity:1,anchor:new google.maps.Point(12,30),strokeWeight:0}}),this.mobileMarkers[index]=new google.maps.Marker({map:this.mobileMapElements[index],position,icon:{path:"M12.5,0 C6.388889,0 0,4.7304348 0,12.5217391 C0,19.8956522 11.111111,31.1652174 11.527778,31.5826087 C11.805556,31.8608696 12.083333,32 12.5,32 C12.916667,32 13.194444,31.8608696 13.472222,31.5826087 C13.888889,31.1652174 25,19.8956522 25,12.5217391 C25,4.7304348 18.611111,0 12.5,0 Z M12,16 C9.733333,16 8,14.2666667 8,12 C8,9.7333333 9.733333,8 12,8 C14.266667,8 16,9.7333333 16,12 C16,14.2666667 14.266667,16 12,16 Z",fillColor:this.options.markerActiveColor,fillOpacity:1,anchor:new google.maps.Point(12,30),strokeWeight:0}}),this.desktopMarkers[index].addListener("click",this._onMarkerClicked.bind(this,address)),this.mobileMarkers[index].addListener("click",this._onMarkerClicked.bind(this,address)),index===0&&this.desktopMapElement.setCenter(position),this.mobileMapElements[index].setCenter(position)}})})}},MinimalHeaderSection=class{constructor(element){this.element=element,this._setupCssVariables(),this._attachListeners()}onUnload(){window.removeEventListener("resize",this._setupCssVariablesListener)}_attachListeners(){this._setupCssVariablesListener=this._setupCssVariables.bind(this),window.addEventListener("resize",this._setupCssVariablesListener)}_setupCssVariables(){document.documentElement.style.setProperty("--header-height",this.element.parentNode.clientHeight+"px")}},QuickLinksSection=class{constructor(element){this.element=element,Shopify.designMode&&this.element.classList.remove("hidden-lap-and-up")}},PopupsSection=class{constructor(element){element.querySelectorAll("[data-popup-type]").forEach(popup=>{popup.getAttribute("data-popup-type")==="exit"?this.exitPopup=new ExitPopup(popup):popup.getAttribute("data-popup-type")==="newsletter"&&(this.newsletterPopup=new NewsletterPopup(popup))})}onUnload(){this.exitPopup&&this.exitPopup.destroy(),this.newsletterPopup&&this.newsletterPopup.destroy()}onBlockSelect(event2){event2.target.getAttribute("data-popup-type")==="exit"&&this.exitPopup?this.exitPopup._openPopup():event2.target.getAttribute("data-popup-type")==="newsletter"&&this.newsletterPopup&&this.newsletterPopup._openPopup()}onBlockDeselect(){this.exitPopup&&this.exitPopup._closePopup(),this.newsletterPopup&&this.newsletterPopup._closePopup()}},import_flickity3=__toESM(require_js()),ProductRecommendationsSection=class{constructor(element){this.element=element,this.delegateElement=new main_default(this.element),this.options=JSON.parse(this.element.getAttribute("data-section-settings")),this.options.useRecommendations?this._loadRecommendations().then(this._createSlideshow.bind(this)):this._createSlideshow(),this.productItemColorSwatch=new ProductItemColorSwatch(this.element),this._fixSafari(),this._attachListeners()}onUnload(){this.options.stackable||this.flickityInstance.destroy(),window.removeEventListener("resize",this._fixSafariListener),this.delegateElement.off("change"),this.productItemColorSwatch.destroy(),this.resizeObserver&&this.resizeObserver.disconnect()}_attachListeners(){this._fixSafariListener=this._fixSafari.bind(this),window.addEventListener("resize",this._fixSafariListener),this.delegateElement.on("click",'[data-secondary-action="open-quick-view"]',this._openQuickView.bind(this))}_fixSafari(){const userAgent=window.navigator.userAgent.toLowerCase();if(userAgent.includes("safari")&&(userAgent.includes("version/10.1")||userAgent.includes("version/10.3")||userAgent.includes("version/11.0"))){const isPhone=Responsive.matchesBreakpoint("phone");this.element.querySelectorAll(".product-item__image-wrapper .aspect-ratio, .product-item__image-wrapper .placeholder-svg").forEach(image=>{isPhone?image.parentNode.style.height=null:image.parentNode.style.height=`${image.clientHeight}px`})}}_loadRecommendations(){const url=`${window.routes.productRecommendationsUrl}?section_id=${this.element.getAttribute("data-section-id")}&product_id=${this.options.productId}&limit=${this.options.recommendationsCount}`;return fetch(url).then(response=>response.text().then(content=>{let container=document.createElement("div");container.innerHTML=content,this.element.querySelector(".product-recommendations").innerHTML=container.querySelector(".product-recommendations").innerHTML,this.productItemColorSwatch.recalculateSwatches()}))}_createSlideshow(){if(!this.options.stackable){this.flickityInstance=new import_flickity3.default(this.element.querySelector(".product-list"),{watchCSS:!0,pageDots:!1,prevNextButtons:!0,contain:!0,resize:!1,groupCells:!0,cellAlign:"left",draggable:!window.matchMedia("(-moz-touch-enabled: 0), (hover: hover)").matches});let lastWidth=window.innerWidth;window.addEventListener("resize",()=>{window.innerWidth!==lastWidth&&(this.flickityInstance.resize(),lastWidth=window.innerWidth)})}window.ResizeObserver&&this.flickityInstance&&(this.resizeObserver=new ResizeObserver(()=>{this.flickityInstance.resize()}),this.element.querySelectorAll(".product-item").forEach(item=>{this.resizeObserver.observe(item)}))}_openQuickView(event2,target){let productUrl=new URL(`${window.location.origin}${target.getAttribute("data-product-url")}`);
1if(Responsive.matchesBreakpoint("phone")||Responsive.matchesBreakpoint("tablet"))return window.location.href=productUrl.href,!1;let modal=document.getElementById(target.getAttribute("aria-controls"));modal.classList.add("is-loading"),fetch(productUrl.href,{credentials:"same-origin",method:"GET"}).then(response=>{response.text().then(content=>{const fragment=document.createRange().createContextualFragment(content),modalContent=Dom.deepQuerySelector(fragment,'[data-section-type="product-quick-view"]');modal.querySelector(".modal__inner").replaceChildren(modalContent),modal.classList.remove("is-loading");let modalProductSection=new ProductSection(modalContent),doCleanUp=()=>{modalProductSection.onUnload(),modal.removeEventListener("modal:closed",doCleanUp)};modal.addEventListener("modal:closed",doCleanUp)})})}},import_flickity4=__toESM(require_js()),RecentlyViewedProductsSection=class{constructor(element){this.element=element,this.delegateElement=new main_default(this.element),this.options=JSON.parse(this.element.getAttribute("data-section-settings")),this.productItemColorSwatch=new ProductItemColorSwatch(this.element),this._fetchProducts(),this._attachListeners()}onUnload(){this.flickityInstance&&this.flickityInstance.destroy(),this.productItemColorSwatch.destroy(),this.resizeObserver&&this.resizeObserver.disconnect()}_attachListeners(){this.delegateElement.on("click",'[data-secondary-action="open-quick-view"]',this._openQuickView.bind(this))}_fetchProducts(){const queryString=this._getSearchQueryString();queryString!==""&&fetch(`${window.routes.searchUrl}?section_id=${this.element.getAttribute("data-section-id")}&type=product&q=${queryString}`,{credentials:"same-origin",method:"GET"}).then(response=>{response.text().then(content=>{let tempElement=document.createElement("div");tempElement.innerHTML=content,this.element.querySelector(".recently-viewed-products-placeholder").innerHTML=tempElement.querySelector('[data-section-type="recently-viewed-products"] .recently-viewed-products-placeholder').innerHTML,this.element.parentNode.style.display="block",this.productItemColorSwatch.recalculateSwatches(),this.flickityInstance=new import_flickity4.default(this.element.querySelector(".product-list"),{watchCSS:!0,pageDots:!1,prevNextButtons:!0,contain:!0,resize:!1,groupCells:!0,cellAlign:"left",draggable:!window.matchMedia("(-moz-touch-enabled: 0), (hover: hover)").matches});let lastWidth=window.innerWidth;window.addEventListener("resize",()=>{window.innerWidth!==lastWidth&&(this.flickityInstance.resize(),lastWidth=window.innerWidth)}),window.ResizeObserver&&this.flickityInstance&&(this.resizeObserver=new ResizeObserver(()=>{this.flickityInstance.resize()}),this.element.querySelectorAll(".product-item").forEach(item=>{this.resizeObserver.observe(item)}))})})}_getSearchQueryString(){let items=JSON.parse(localStorage.getItem("recentlyViewedProducts")||"[]");return items.includes(this.options.currentProductId)&&items.splice(items.indexOf(this.options.currentProductId),1),items.map(item=>"id:"+item).join(" OR ")}_openQuickView(event2,target){let productUrl=new URL(`${window.location.origin}${target.getAttribute("data-product-url")}`);if(Responsive.matchesBreakpoint("phone")||Responsive.matchesBreakpoint("tablet"))return window.location.href=productUrl.href,!1;let modal=document.getElementById(target.getAttribute("aria-controls"));modal.classList.add("is-loading"),fetch(productUrl.href,{credentials:"same-origin",method:"GET"}).then(response=>{response.text().then(content=>{const fragment=document.createRange().createContextualFragment(content),modalContent=Dom.deepQuerySelector(fragment,'[data-section-type="product-quick-view"]');modal.querySelector(".modal__inner").replaceChildren(modalContent),modal.classList.remove("is-loading");let modalProductSection=new ProductSection(modalContent),doCleanUp=()=>{modalProductSection.onUnload(),modal.removeEventListener("modal:closed",doCleanUp)};modal.addEventListener("modal:closed",doCleanUp)})})}},SectionContainer=class{constructor(){this.constructors=[],this.instances=[],this._attachListeners()}_attachListeners(){document.addEventListener("shopify:section:load",this._onSectionLoad.bind(this)),document.addEventListener("shopify:section:unload",this._onSectionUnload.bind(this)),document.addEventListener("shopify:section:select",this._onSelect.bind(this)),document.addEventListener("shopify:section:deselect",this._onDeselect.bind(this)),document.addEventListener("shopify:section:reorder",this._onReorder.bind(this)),document.addEventListener("shopify:block:select",this._onBlockSelect.bind(this)),document.addEventListener("shopify:block:deselect",this._onBlockDeselect.bind(this))}register(type,constructor){this.constructors[type]=constructor,document.querySelectorAll(`[data-section-type=${type}]`).forEach(container=>{this._createInstance(container,constructor)})}_findInstance(array,key,value){for(let i=0;i<array.length;
1i++)if(array[i][key]===value)return array[i]}_removeInstance(array,key,value){let i=array.length;for(;i--;)if(array[i][key]===value){array.splice(i,1);break}return array}_onSectionLoad(event2){let container=event2.target.querySelector("[data-section-id]");container&&this._createInstance(container)}_onSectionUnload(event2){let instance=this._findInstance(this.instances,"id",event2.detail.sectionId);instance&&(typeof instance.onUnload=="function"&&instance.onUnload(event2),this.instances=this._removeInstance(this.instances,"id",event2.detail.sectionId))}_onSelect(event2){let instance=this._findInstance(this.instances,"id",event2.detail.sectionId);instance&&typeof instance.onSelect=="function"&&instance.onSelect(event2)}_onDeselect(event2){let instance=this._findInstance(this.instances,"id",event2.detail.sectionId);instance&&typeof instance.onDeselect=="function"&&instance.onDeselect(event2)}_onReorder(event2){let instance=this._findInstance(this.instances,"id",event2.detail.sectionId);instance&&typeof instance.onReorder=="function"&&instance.onReorder(event2)}_onBlockSelect(event2){let instance=this._findInstance(this.instances,"id",event2.detail.sectionId);instance&&typeof instance.onBlockSelect=="function"&&instance.onBlockSelect(event2)}_onBlockDeselect(event2){let instance=this._findInstance(this.instances,"id",event2.detail.sectionId);instance&&typeof instance.onBlockDeselect=="function"&&instance.onBlockDeselect(event2)}_createInstance(container,constructor){let id=container.getAttribute("data-section-id"),type=container.getAttribute("data-section-type");if(constructor=constructor||this.constructors[type],typeof constructor>"u")return;let instance=Object.assign(new constructor(container),{id,type,container});this.instances.push(instance)}},import_flickity_fade2=__toESM(require_flickity_fade()),SlideshowSection=class{constructor(element){this.element=element,this.options=JSON.parse(this.element.getAttribute("data-section-settings")),this.flickityInstance=new import_flickity_fade2.default(element.querySelector(".slideshow"),{pageDots:this.options.pageDots,prevNextButtons:this.options.prevNextButtons,wrapAround:!0,dragThreshold:12,resize:!1,draggable:">1",fade:this.options.transitionEffect==="fade",setGallerySize:this.options.setGallerySize,adaptiveHeight:this.options.adaptiveHeight,autoPlay:this.options.autoPlay?this.options.cycleSpeed:!1});let lastWidth=window.innerWidth;window.addEventListener("resize",()=>{window.innerWidth!==lastWidth&&(this.flickityInstance.resize(),lastWidth=window.innerWidth)})}onUnload(){this.flickityInstance.destroy()}onBlockSelect(event2){this.flickityInstance.isActive&&(this.flickityInstance.selectCell(parseInt(event2.target.getAttribute("data-block-index")),!1,event2.detail.load),this.flickityInstance.pausePlayer())}onBlockDeselect(){this.flickityInstance.isActive&&this.flickityInstance.unpausePlayer()}},import_flickity5=__toESM(require_js()),TextWithIconsSection=class{constructor(element){this.flickityInstance=new import_flickity5.default(element.querySelector(".text-with-icons"),{pageDots:!0,prevNextButtons:!1,wrapAround:!0,autoPlay:5e3,resize:!1,watchCSS:!0});let lastWidth=window.innerWidth;window.addEventListener("resize",()=>{window.innerWidth!==lastWidth&&(this.flickityInstance.resize(),lastWidth=window.innerWidth)})}onUnload(){this.flickityInstance.destroy()}onBlockSelect(event2){this.flickityInstance.isActive&&(this.flickityInstance.selectCell(parseInt(event2.target.getAttribute("data-block-index")),!1,event2.detail.load),this.flickityInstance.pausePlayer())}onBlockDeselect(){this.flickityInstance.isActive&&this.flickityInstance.unpausePlayer()}},VideoSection=class{constructor(element){this.element=element,this.domDelegate=new main_default(this.element),this.options=JSON.parse(this.element.getAttribute("data-section-settings")),this._attachListeners()}onUnload(){this.domDelegate.off("click")}_attachListeners(){this.domDelegate.on("click",'[data-action="play-video"]',this._playVideo.bind(this))}_playVideo(event2,target){let iframe=target.querySelector("iframe");iframe.src=iframe.getAttribute("data-src"),target.classList.add("is-playing")}},import_fastdom5=__toESM(require_fastdom()),import_flickity6=__toESM(require_js()),_chromiumMajorVersionInUserAgent=null,_allowQueryString,_allowExternalLinks,_useWhitelist,_delayOnHover=65,_lastTouchTimestamp,_mouseoverTimer,_preloadedList=new Set,DELAY_TO_NOT_BE_CONSIDERED_A_TOUCH_INITIATED_ACTION=1111;
1init();function init(){if(!document.createElement("link").relList.supports("prefetch"))return;const handleVaryAcceptHeader="instantVaryAccept"in document.body.dataset||"Shopify"in window,chromiumUserAgentIndex=navigator.userAgent.indexOf("Chrome/");if(chromiumUserAgentIndex>-1&&(_chromiumMajorVersionInUserAgent=parseInt(navigator.userAgent.substring(chromiumUserAgentIndex+7))),handleVaryAcceptHeader&&_chromiumMajorVersionInUserAgent&&_chromiumMajorVersionInUserAgent<110)return;const mousedownShortcut="instantMousedownShortcut"in document.body.dataset;_allowQueryString="instantAllowQueryString"in document.body.dataset,_allowExternalLinks="instantAllowExternalLinks"in document.body.dataset,_useWhitelist="instantWhitelist"in document.body.dataset;const eventListenersOptions={capture:!0,passive:!0};let useMousedown=!1,useMousedownOnly=!1,useViewport=!1;if("instantIntensity"in document.body.dataset){const intensity=document.body.dataset.instantIntensity;if(intensity.startsWith("mousedown"))useMousedown=!0,intensity=="mousedown-only"&&(useMousedownOnly=!0);else if(intensity.startsWith("viewport")){const isNavigatorConnectionSaveDataEnabled=navigator.connection&&navigator.connection.saveData,isNavigatorConnectionLike2g=navigator.connection&&navigator.connection.effectiveType&&navigator.connection.effectiveType.includes("2g");!isNavigatorConnectionSaveDataEnabled&&!isNavigatorConnectionLike2g&&(intensity=="viewport"?document.documentElement.clientWidth*document.documentElement.clientHeight<45e4&&(useViewport=!0):intensity=="viewport-all"&&(useViewport=!0))}else{const milliseconds=parseInt(intensity);isNaN(milliseconds)||(_delayOnHover=milliseconds)}}if(useMousedownOnly||document.addEventListener("touchstart",touchstartListener,eventListenersOptions),useMousedown?mousedownShortcut||document.addEventListener("mousedown",mousedownListener,eventListenersOptions):document.addEventListener("mouseover",mouseoverListener,eventListenersOptions),mousedownShortcut&&document.addEventListener("mousedown",mousedownShortcutListener,eventListenersOptions),useViewport){let requestIdleCallbackOrFallback=window.requestIdleCallback;requestIdleCallbackOrFallback||(requestIdleCallbackOrFallback=callback=>{callback()}),requestIdleCallbackOrFallback(function(){const intersectionObserver=new IntersectionObserver(entries=>{entries.forEach(entry=>{if(entry.isIntersecting){const anchorElement=entry.target;intersectionObserver.unobserve(anchorElement),preload(anchorElement.href)}})});document.querySelectorAll("a").forEach(anchorElement=>{isPreloadable(anchorElement)&&intersectionObserver.observe(anchorElement)})},{timeout:1500})}}function touchstartListener(event2){_lastTouchTimestamp=performance.now();const anchorElement=event2.target.closest("a");isPreloadable(anchorElement)&&preload(anchorElement.href,"high")}function mouseoverListener(event2){if(performance.now()-_lastTouchTimestamp<DELAY_TO_NOT_BE_CONSIDERED_A_TOUCH_INITIATED_ACTION||!("closest"in event2.target))return;const anchorElement=event2.target.closest("a");isPreloadable(anchorElement)&&(anchorElement.addEventListener("mouseout",mouseoutListener,{passive:!0}),_mouseoverTimer=setTimeout(()=>{preload(anchorElement.href,"high"),_mouseoverTimer=void 0},_delayOnHover))}function mousedownListener(event2){const anchorElement=event2.target.closest("a");isPreloadable(anchorElement)&&preload(anchorElement.href,"high")}function mouseoutListener(event2){event2.relatedTarget&&event2.target.closest("a")==event2.relatedTarget.closest("a")||_mouseoverTimer&&(clearTimeout(_mouseoverTimer),_mouseoverTimer=void 0)}function mousedownShortcutListener(event2){if(performance.now()-_lastTouchTimestamp<DELAY_TO_NOT_BE_CONSIDERED_A_TOUCH_INITIATED_ACTION)return;const anchorElement=event2.target.closest("a");if(event2.which>1||event2.metaKey||event2.ctrlKey||!anchorElement)return;anchorElement.addEventListener("click",function(event3){event3.detail!=1337&&event3.preventDefault()},{capture:!0,passive:!1,once:!0});const customEvent=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1,detail:1337});anchorElement.dispatchEvent(customEvent)}function isPreloadable(anchorElement){if(!(!anchorElement||!anchorElement.href)&&!(_useWhitelist&&!("instant"in anchorElement.dataset))&&!(anchorElement.origin!=location.origin&&(!(_allowExternalLinks||"instant"in anchorElement.dataset)||!_chromiumMajorVersionInUserAgent))&&["http:","https:"].includes(anchorElement.protocol)&&!(anchorElement.protocol=="http:"&&location.protocol=="https:")&&!(!_allowQueryString&&anchorElement.search&&!("instant"in anchorElement.dataset))&&!(anchorElement.hash&&anchorElement.pathname+anchorElement.search==location.pathname+location.search)&&!("noInstant"in anchorElement.dataset))return!0}function preload(url,fetchPriority="auto"){if(_preloadedList.has(url))return;const linkElement=document.createElement("link");linkElement.rel="prefetch",linkElement.href=url,linkElement.fetchPriority=fetchPriority,linkElement.as="document",document.head.appendChild(linkElement),_preloadedList.add(url)}var PriceRange=class extends HTMLElement{connectedCallback(){this.rangeLowerBound=this.querySelector(".price-range__range-group input:first-child"),this.rangeHigherBound=this.querySelector(".price-range__range-group input:last-child"),this.textInputLowerBound=this.querySelector(".price-range__input:first-child input"),this.textInputHigherBound=this.querySelector(".price-range__input:last-child input"),this.textInputLowerBound.addEventListener("focus",()=>this.textInputLowerBound.select()),this.textInputHigherBound.addEventListener("focus",()=>this.textInputHigherBound.select()),this.textInputLowerBound.addEventListener("change",event2=>{event2.target.value=Math.max(Math.min(parseInt(event2.target.value),parseInt(this.textInputHigherBound.value||event2.target.max)-1),event2.target.min),this.rangeLowerBound.value=event2.target.value,this.rangeLowerBound.parentElement.style.setProperty("--range-min",`${parseInt(this.rangeLowerBound.value)/parseInt(this.rangeLowerBound.max)*100}%`)}),this.textInputHigherBound.addEventListener("change",event2=>{event2.target.value=Math.min(Math.max(parseInt(event2.target.value),parseInt(this.textInputLowerBound.value||event2.target.min)+1),event2.target.max),this.rangeHigherBound.value=event2.target.value,this.rangeHigherBound.parentElement.style.setProperty("--range-max",`${parseInt(this.rangeHigherBound.value)/parseInt(this.rangeHigherBound.max)*100}%`)}),this.rangeLowerBound.addEventListener("change",event2=>{this.textInputLowerBound.value=event2.target.value,this.textInputLowerBound.dispatchEvent(new Event("change",{bubbles:!0}))}),this.rangeHigherBound.addEventListener("change",event2=>{this.textInputHigherBound.value=event2.target.value,this.textInputHigherBound.dispatchEvent(new Event("change",{bubbles:!0}))}),this.rangeLowerBound.addEventListener("input",event2=>{this.dispatchEvent(new CustomEvent("collection:abort-loading",{bubbles:!0})),event2.target.value=Math.min(parseInt(event2.target.value),parseInt(this.textInputHigherBound.value||event2.target.max)-1),event2.target.parentElement.style.setProperty("--range-min",`${parseInt(event2.target.value)/parseInt(event2.target.max)*100}%`),this.textInputLowerBound.value=event2.target.value}),this.rangeHigherBound.addEventListener("input",event2=>{this.dispatchEvent(new CustomEvent("collection:abort-loading",{bubbles:!0})),event2.target.value=Math.max(parseInt(event2.target.value),parseInt(this.textInputLowerBound.value||event2.target.min)+1),event2.target.parentElement.style.setProperty("--range-max",`${parseInt(event2.target.value)/parseInt(event2.target.max)*100}%`),this.textInputHigherBound.value=event2.target.value})}};window.customElements.define("price-range",PriceRange);var import_flickity_fade3=__toESM(require_flickity_fade()),ProductRecommendations=class extends HTMLElement{constructor(){super(),this._isLoaded=!1,this.delegateElement=new main_default(this)}connectedCallback(){this._loadRecommendations()}_loadRecommendations(){if(this._isLoaded)return;this._isLoaded=!0;const section=this.closest(".shopify-section"),intent=this.getAttribute("intent")||"related",url=`${Shopify.routes.root}recommendations/products?product_id=${this.getAttribute("product")}&limit=${this.getAttribute("limit")||4}&section_id=${this.getAttribute("section-id")}&intent=${intent}`;fetch(url).then(response=>{response.text().then(text=>{const tempDiv=new DOMParser().parseFromString(text,"text/html"),productRecommendationsElement=tempDiv.querySelector("product-recommendations");productRecommendationsElement.childElementCount>0?(this.replaceChildren(...document.importNode(productRecommendationsElement,!0).childNodes),this.flickityInstance=new import_flickity_fade3.default(this.querySelector(".complementary-product-list"),{pageDots:!1,watchCSS:!0,groupCells:2,cellAlign:"left",prevNextButtons:!0,wrapAround:!0,dragThreshold:12,percentPosition:!0,resize:!1,draggable:">1"})):intent==="related"?section.remove():this.remove()})})}};window.customElements.get("product-recommendations")||window.customElements.define("product-recommendations",ProductRecommendations);var PrivacyBanner=class extends HTMLElement{constructor(){super(),this.domDelegate=new main_default(this),window.Shopify.loadFeatures([{name:"consent-tracking-api",version:"0.1",onLoad:this._setupCookieBar.bind(this)}]),this.domDelegate.on("click",'[data-action="accept-terms"]',this._acceptCookieBarTerms.bind(this)),this.domDelegate.on("click",'[data-action="decline-terms"]',this._declineCookieBarTerms.bind(this))}connectedCallback(){this.closest(".shopify-section").addEventListener("shopify:section:select",()=>this.setAttribute("aria-hidden","false")),this.closest(".shopify-section").addEventListener("shopify:section:deselect",()=>this.setAttribute("aria-hidden","true"))}_setupCookieBar(){try{window.Shopify.customerPrivacy.shouldShowGDPRBanner()&&this.setAttribute("aria-hidden","false")}catch{}}_acceptCookieBarTerms(){window.Shopify.customerPrivacy.setTrackingConsent(!0,()=>this.setAttribute("aria-hidden","true"))}_declineCookieBarTerms(){window.Shopify.customerPrivacy.setTrackingConsent(!1,()=>this.setAttribute("aria-hidden","true"))}};window.customElements.get("privacy-banner")||window.customElements.define("privacy-banner",PrivacyBanner);var GiftCardRecipient=class extends HTMLElement{connectedCallback(){const properties=Array.from(this.querySelectorAll('[name*="properties"]')),checkboxPropertyName="properties[__shopify_send_gift_card_to_recipient]";this.recipientCheckbox=properties.find(input=>input.name===checkboxPropertyName),this.recipientOtherProperties=properties.filter(input=>input.name!==checkboxPropertyName),this.recipientFieldsContainer=this.querySelector(".gift-card-recipient__fields"),this.recipientCheckbox?.addEventListener("change",this._synchronizeProperties.bind(this)),this.offsetProperty=this.querySelector('[name="properties[__shopify_offset]"]'),this.offsetProperty&&(this.offsetProperty.value=new Date().getTimezoneOffset().toString()),this.recipientSendOnProperty=this.querySelector('[name="properties[Send on]"]');const minDate=new Date,maxDate=new Date;maxDate.setDate(minDate.getDate()+90),this.recipientSendOnProperty?.setAttribute("min",this._formatDate(minDate)),this.recipientSendOnProperty?.setAttribute("max",this._formatDate(maxDate)),this._synchronizeProperties()}
1_synchronizeProperties(){this.recipientOtherProperties.forEach(property=>property.disabled=!this.recipientCheckbox.checked),this.recipientFieldsContainer.classList.toggle("js:hidden",!this.recipientCheckbox.checked)}_formatDate(date){const offset=date.getTimezoneOffset();return new Date(date.getTime()-offset*60*1e3).toISOString().split("T")[0]}};window.customElements.get("gift-card-recipient")||window.customElements.define("gift-card-recipient",GiftCardRecipient);var _abortController,_ProductRerender_instances,onRerender_fn,ProductRerender=class extends HTMLElement{constructor(){super(...arguments),__privateAdd(this,_ProductRerender_instances),__privateAdd(this,_abortController)}connectedCallback(){__privateSet(this,_abortController,new AbortController),(!this.id||!this.hasAttribute("observe-form"))&&console.warn('The <product-rerender> requires an ID to identify the element to re-render, and an "observe-form" attribute referencing to the form to monitor.'),document.forms[this.getAttribute("observe-form")]?.addEventListener("product:rerender",__privateMethod(this,_ProductRerender_instances,onRerender_fn).bind(this),{signal:__privateGet(this,_abortController).signal})}disconnectedCallback(){__privateGet(this,_abortController).abort()}};_abortController=new WeakMap,_ProductRerender_instances=new WeakSet,onRerender_fn=function(event2){const matchingElement=Dom.deepQuerySelector(event2.detail.htmlFragment,`#${this.id}`);if(!matchingElement)return;const focusedElement=document.activeElement;if(!this.hasAttribute("allow-partial-rerender")||event2.detail.productChange?this.replaceWith(matchingElement):["product-meta","payment-terms","variant-selector","volume-pricing","buy-buttons","store-pickup","liquid"].forEach(blockType=>{this.querySelectorAll(`[data-block-type="${blockType}"]`).forEach(element=>{const matchingBlock=matchingElement.querySelector(`[data-block-type="${blockType}"][data-block-id="${element.getAttribute("data-block-id")}"]`);if(matchingBlock)if(blockType==="buy-buttons")element.querySelector(".product-form__payment-container").replaceWith(matchingBlock.querySelector(".product-form__payment-container"));else if(blockType==="variant-selector"){const previousQuantity=element.querySelector('[name="quantity"]')?.value;if(element.replaceWith(matchingBlock),previousQuantity){const quantityInput=matchingBlock.querySelector('[name="quantity"]');quantityInput.value=previousQuantity,quantityInput.dispatchEvent(new Event("change",{bubbles:!0}))}}else element.replaceWith(matchingBlock)})}),focusedElement.id){const element=document.getElementById(focusedElement.id);this.contains(element)&&element.focus()}},window.customElements.get("product-rerender")||window.customElements.define("product-rerender",ProductRerender);var ProgressBar=class extends HTMLElement{connectedCallback(){new IntersectionObserver(this._onBecameVisible.bind(this)).observe(this)}_onBecameVisible(entries){if(entries[0].isIntersecting){const stockCountdownProgress=Math.min(Math.max(this.getAttribute("data-variant-inventory")/parseInt(this.getAttribute("data-stock-countdown-max"))*100,0),100);this.firstElementChild.style.width=`${stockCountdownProgress}%`}}};window.customElements.get("progress-bar")||window.customElements.define("progress-bar",ProgressBar);var _onClickListener,_BuyButton_instances,addToCart_fn,showAlert_fn,BuyButton=class extends HTMLElement{constructor(){super(...arguments),__privateAdd(this,_BuyButton_instances),__privateAdd(this,_onClickListener,__privateMethod(this,_BuyButton_instances,addToCart_fn).bind(this))}connectedCallback(){this.addEventListener("click",__privateGet(this,_onClickListener))}disconnectedCallback(){this.removeEventListener("click",__privateGet(this,_onClickListener))}};_onClickListener=new WeakMap,_BuyButton_instances=new WeakSet,addToCart_fn=function(event2){event2.preventDefault(),event2.stopPropagation(),event2.target.setAttribute("disabled","disabled"),document.dispatchEvent(new CustomEvent("theme:loading:start"));const formElement=event2.target.closest('form[action*="/cart/add"]');fetch(`${window.routes.cartAddUrl}.js`,{body:JSON.stringify(Form.serialize(formElement)),credentials:"same-origin",method:"POST",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}).then(response=>{event2.target.removeAttribute("disabled");let element=document.querySelector(".header"),sectionType=event2.target.closest("[data-section-type]")?.getAttribute("data-section-type");if((sectionType==="product"||sectionType==="product-quick-view")&&(element=event2.target.closest(".product-form")),element||(element=document.body),this.dispatchEvent(new CustomEvent("product:added",{bubbles:!0,detail:{button:event2.target,variant:null,quantity:parseInt(formElement.querySelector('[name="quantity"]').value),productAdded:response.ok}})),response.ok){if(theme.pageType==="cart"||window.theme.cartType==="page"){window.location.href=window.routes.cartUrl;return}window.theme.cartType==="drawer"&&document.dispatchEvent(new CustomEvent("modal:close")),window.theme.cartType==="message"&&__privateMethod(this,_BuyButton_instances,showAlert_fn).call(this,window.languages.productAdded,"success",element)}else response.json().then(content=>{__privateMethod(this,_BuyButton_instances,showAlert_fn).call(this,content.description,"error",element)}),document.dispatchEvent(new CustomEvent("theme:loading:end"))}),event2.preventDefault()},showAlert_fn=function(message,type,afterElement){let cssModifier=afterElement.closest("[data-section-type]").getAttribute("data-section-type"),messageElement=document.createElement("div");messageElement.className=`cart__status-message cart__status-message--${cssModifier}`,messageElement.innerHTML=`<div class="alert ${type==="success"?"alert--success":"alert--error"}"><p ${cssModifier==="header"?'class="container"':""}>${message}</p></div>`,afterElement.append(messageElement),Animation.slideDown(messageElement),setTimeout(function(){Animation.slide
1Up(messageElement,()=>{messageElement.remove()})},5500)},window.customElements.get("buy-button")||window.customElements.define("buy-button",BuyButton),(function(){const bootTheme=()=>{window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=function(callback,thisArg){thisArg=thisArg||window;for(var i=0;i<this.length;i++)callback.call(thisArg,this[i],i,this)}),new CollapsibleManager,new LoadingBar,new ModalManager,new PopoverManager;let sections=new SectionContainer;sections.register("account",AccountSection),sections.register("announcement-bar",AnnouncementBarSection),sections.register("blog",BlogSection),sections.register("blog-sidebar",BlogSidebarSection),sections.register("blog-post",BlogPostSection),sections.register("cart",CartSection),sections.register("collection-list",CollectionListSection),sections.register("collection",CollectionSection),sections.register("featured-collection",FeaturedCollectionSection),sections.register("footer",FooterSection),sections.register("gift-card",GiftCardSection),sections.register("header",HeaderSection),sections.register("login",LoginSection),sections.register("map",MapSection),sections.register("minimal-header",MinimalHeaderSection),sections.register("popups",PopupsSection),sections.register("product-recommendations",ProductRecommendationsSection),sections.register("product",ProductSection),sections.register("quick-links",QuickLinksSection),sections.register("recently-viewed-products",RecentlyViewedProductsSection),sections.register("slideshow",SlideshowSection),sections.register("text-with-icons",TextWithIconsSection),sections.register("video",VideoSection),(function(){document.querySelectorAll(".rte table").forEach(table=>{table.outerHTML='<div class="table-wrapper">'+table.outerHTML+"</div>"}),document.querySelectorAll(".rte iframe").forEach(iframe=>{(iframe.src.indexOf("youtube")!==-1||iframe.src.indexOf("youtu.be")!==-1||iframe.src.indexOf("vimeo")!==-1)&&(iframe.outerHTML='<div class="video-wrapper">'+iframe.outerHTML+"</div>",iframe.src=iframe.src)})})(),(function(){let touchingCarousel=!1,touchStartCoords;document.body.addEventListener("touchstart",function(e){let flickitySliderElement=e.target.closest(".flickity-slider");if(flickitySliderElement)if(import_flickity6.default.data(flickitySliderElement.closest(".flickity-enabled")).isDraggable)touchingCarousel=!0;else{touchingCarousel=!1;return}else{touchingCarousel=!1;return}touchStartCoords={x:e.touches[0].pageX,y:e.touches[0].pageY}}),document.body.addEventListener("touchmove",function(e){if(!(touchingCarousel&&e.cancelable))return;let moveVector={x:e.touches[0].pageX-touchStartCoords.x,y:e.touches[0].pageY-touchStartCoords.y};Math.abs(moveVector.x)>8&&e.preventDefault()},{passive:!1})})(),(function(){new main_default(document.body).on("click",".expandable-content__toggle",(item,expandableButton)=>{let parentSection=expandableButton.closest(".expandable-content");if(parentSection.getAttribute("aria-expanded")==="true"){parentSection.setAttribute("aria-expanded","false"),parentSection.style["max-height"]=`${parentSection.offsetHeight}px`,parentSection.offsetHeight,parentSection.style["max-height"]=null;let expandableText=expandableButton.querySelector(".expandable-content__toggle-text");expandableText.innerHTML=expandableText.getAttribute("data-view-more");let parentCard=parentSection.closest(".card");if(parentCard){let amountToScroll=parentCard.getBoundingClientRect().top-15-parseInt(getComputedStyle(document.documentElement).getPropertyValue("--header-height"));window.scrollBy({top:amountToScroll,behavior:"smooth"})}}else{parentSection.setAttribute("aria-expanded","true"),expandableButton.previousElementSibling&&(expandableButton.previousElementSibling.style["margin-bottom"]=`${parseInt(expandableButton.clientHeight)}px`),Animation.slideDown(parentSection,null,"max-height");let expandableText=expandableButton.querySelector(".expandable-content__toggle-text");expandableText.innerHTML=expandableText.getAttribute("data-view-less")}});let processCollapsibles=()=>{document.querySelectorAll(".expandable-content[aria-expanded]").forEach(function(item){item.scrollHeight>item.clientHeight?item.classList.add("expandable-content--expandable"):item.setAttribute("aria-expanded","true")})};document.addEventListener("shopify:section:load",function(event2){processCollapsibles()}),processCollapsibles()})(),(function(){if(Responsive.getCurrentBreakpoint()==="phone"){let autoFocusedElements=document.querySelectorAll("input[autofocus]");for(let i=0;i<autoFocusedElements.length;i++)autoFocusedElements[i].blur(),autoFocusedElements[i].removeAttribute("autofocus")}})(),(function(){new main_default(document.body).on("click",'[href^="#"], [data-href]',(event2,target)=>{const selector=target.hasAttribute("href")?target.getAttribute("href"):target.getAttribute("data-href");if(selector==="#"||selector==="#main")return;let element=null;try{element=document.querySelector(selector)}catch{return}
1let offset=parseInt(target.getAttribute("data-offset")||0),toTop=0;for(;element.offsetParent.tagName!=="BODY";)toTop+=element.offsetTop,element=element.offsetParent;toTop+=element.offsetTop,window.scrollTo({behavior:"smooth",top:toTop-offset}),event2.preventDefault()})})(),(function(){function handleFirstTab(event2){event2.key==="Tab"&&(document.body.classList.add("is-tabbing"),window.removeEventListener("keydown",handleFirstTab))}window.addEventListener("keydown",handleFirstTab)})(),(function(){let documentDelegate=new main_default(document.body);documentDelegate.on("keyup","input, textarea",(event2,target)=>{target.classList.toggle("is-filled",target.value!=="")}),documentDelegate.on("change","select",(event2,target)=>{target.parentNode.classList.toggle("is-filled",target.value!=="")})})(),(function(){let links=document.links;import_fastdom5.default.mutate(()=>{for(let i=0,linksLength=links.length;i<linksLength;i++)links[i].hostname!==window.location.hostname&&(links[i].target="_blank",links[i].relList.add("noopener"),links[i].setAttribute("aria-describedby","a11y-new-window-message"))})})()};if("fetch"in window&&"assign"in Object)bootTheme();else{let scriptEl=document.createElement("script");scriptEl.src="//cdn.polyfill.io/v3/polyfill.min.js?unknown=polyfill&features=fetch,Element.prototype.closest,Element.prototype.matches,Element.prototype.remove,Element.prototype.classList,Array.prototype.includes,String.prototype.includes,Object.assign,CustomEvent,URL,DOMTokenList",scriptEl.async=!1,scriptEl.onload=()=>{bootTheme()},document.head.appendChild(scriptEl)}})();/*! Bundled license information:
2
3get-size/get-size.js:
4  (*!
5   * getSize v2.0.3
6   * measure size of elements
7   * MIT license
8   *)
9
10unipointer/unipointer.js:
11  (*!
12   * Unipointer v2.4.0
13   * base class for doing one thing with pointer event
14   * MIT license
15   *)
16
17unidragger/unidragger.js:
18  (*!
19   * Unidragger v2.4.0
20   * Draggable base class
21   * MIT license
22   *)
23
24flickity/js/index.js:
25  (*!
26   * Flickity v2.2.2
27   * Touch, responsive, flickable carousels
28   *
29   * Licensed GPLv3 for open source use
30   * or Flickity Commercial License for commercial use
31   *
32   * https://flickity.metafizzy.co
33   * Copyright 2015-2021 Metafizzy
34   *)
35
36photoswipe/dist/photoswipe.js:
37  (*! PhotoSwipe - v4.1.3 - 2019-01-08
38  * http://photoswipe.com
39  * Copyright (c) 2019 Dmitry Semenov; *)
40
41instant.page/instantpage.js:
42  (*! instant.page v5.2.0 - (C) 2019-2023 Alexandre Dieulot - https://instant.page/license *)
43*/
44//# sourceMappingURL=/cdn/shop/t/51/assets/theme.js.map?v=113943240014183885911778488306

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.