PageSourceSearch

https://ecarla.pl/themes/falcon/assets/js/main.js?v=404dcc91b2aeaa7caa47487d1483e48a

js ecarla.pl collected 2026-10-04 15:21:54 UTC 143,380 bytes, 6 lines download raw bytes

1document.addEventListener("click",function(c){c.target&&c.target.id=="checkout_products_btn"&&(event.preventDefault(),c.target.closest(".checkout-block").classList.toggle("open"))});$(document).on("shown.bs.modal","#saerchModalets",function(c){const e=document.querySelector(".search_query.form-control"),t=document.querySelector(".saved_search__list"),i=document.querySelector(".saved_search__name"),n=document.querySelector(".saved_search"),s=t.querySelectorAll(".saved_search__name").length;if(t&&s>0&&(o(e.value),t.offsetHeight>i.offsetHeight+5)){t.classList.add("showmore"),t.style.height=`${i.offsetHeight}px`;const a=document.createElement("button");a.textContent=`Rozwiń wszystkie (${s})`,a.addEventListener("click",l=>{t.classList.toggle("showmore"),l.target.remove()}),t.insertAdjacentElement("afterend",a)}e.addEventListener("input",function(a){o(a.target.value)});function o(a){a!==""?n.classList.remove("shown"):n.classList.add("shown")}});const b=(c,e=1e4)=>(c=parseFloat(c+"")||0,Math.round((c+Number.EPSILON)*e)/e),je=function(c){if(!(c&&c instanceof Element&&c.offsetParent))return!1;const e=c.scrollHeight>c.clientHeight,t=window.getComputedStyle(c).overflowY,i=t.indexOf("hidden")!==-1,n=t.indexOf("visible")!==-1;return e&&!i&&!n},xe=function(c,e=void 0){return!(!c||c===document.body||e&&c===e)&&(je(c)?c:xe(c.parentElement,e))},H=function(c){var e=new DOMParser().parseFromString(c,"text/html").body;if(e.childElementCount>1){for(var t=document.createElement("div");e.firstChild;)t.appendChild(e.firstChild);return t}return e.firstChild},Ne=c=>`${c||""}`.split(" ").filter(e=>!!e),B=(c,e,t)=>{c&&Ne(e).forEach(i=>{c.classList.toggle(i,t||!1)})};class Q{constructor(e){Object.defineProperty(this,"pageX",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"pageY",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"clientX",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"clientY",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"time",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"nativePointer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.nativePointer=e,this.pageX=e.pageX,this.pageY=e.pageY,this.clientX=e.clientX,this.clientY=e.clientY,this.id=self.Touch&&e instanceof Touch?e.identifier:-1,this.time=Date.now()}}const ee={passive:!1};class Ct{constructor(e,{start:t=()=>!0,move:i=()=>{},end:n=()=>{}}){Object.defineProperty(this,"element",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"startCallback",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"moveCallback",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"endCallback",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"currentPointers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"startPointers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),this.element=e,this.startCallback=t,this.moveCallback=i,this.endCallback=n;for(const s of["onPointerStart","onTouchStart","onMove","onTouchEnd","onPointerEnd","onWindowBlur"])this[s]=this[s].bind(this);this.element.addEventListener("mousedown",this.onPointerStart,ee),this.element.addEventListener("touchstart",this.onTouchStart,ee),this.element.addEventListener("touchmove",this.onMove,ee),this.element.addEventListener("touchend",this.onTouchEnd),this.element.addEventListener("touchcancel",this.onTouchEnd)}onPointerStart(e){if(!e.buttons||e.button!==0)return;const t=new Q(e);this.currentPointers.some(i=>i.id===t.id)||this.triggerPointerStart(t,e)&&(window.addEventListener("mousemove",this.onMove),window.addEventListener("mouseup",this.onPointerEnd),window.addEventListener("blur",this.onWindowBlur))}onTouchStart(e){for(const t of Array.from(e.changedTouches||[]))this.triggerPointerStart(new Q(t),e);window.addEventListener("blur",this.onWindowBlur)}onMove(e){const t=this.currentPointers.slice(),i="changedTouches"in e?Array.from(e.changedTouches||[]).map(s=>new Q(s)):[new Q(e)],n=[];for(const s of i){const o=this.currentPointers.findIndex(a=>a.id===s.id);o<0||(n.push(s),this.currentPointers[o]=s)}n.length&&this.moveCallback(e,this.currentPointers.slice(),t)}onPointerEnd(e){e.buttons>0&&e.button!==0||(this.triggerPointerEnd(e,new Q(e)),window.removeEventListener("mousemove",this.onMove),window.removeEventListener("mouseup",this.onPointerEnd),window.removeEventListener("blur",this.onWindowBlur))}onTouchEnd(e){for(const t of Array.from(e.changedTouches||[]))this.triggerPointerEnd(e,new Q(t))}triggerPointerStart(e,t){return!!this.startCallback(t,e,this.currentPointers.slice())&&(this.currentPointers.push(e),this.startPointers.push(e),!0)}triggerPointerEnd(e,t){const i=this.currentPointers.findIndex(n=>n.id===t.id);i<0||(this.currentPointers.splice(i,1),this.startPointers.splice(i,1),this.endCallback(e,t,this.currentPointers.slice()))}onWindowBlur(){this.clear()}clear(){for(;this.currentPointers.length;){const e=this.currentPointers[this.currentPointers.length-1];this.currentPointers.splice(this.currentPointers.length-1,1),this.startPointers.splice(this.currentPointers.length-1,1),this.endCallback(new Event("touchend",{bubbles:!0,cancelable:!0,clientX:e.clientX,clientY:e.clientY}),e,this.currentPointers.slice())}}stop(){this.element.removeEventListener("mousedown",this.onPointerStart,ee),this.element.removeEventListener("touchstart",this.onTouchStart,ee),this.element.removeEventListener("touchmove",this.onMove,ee),this.element.removeEventListener("touchend",this.onTouchEnd),this.element.removeEventListener("touchcancel",this.onTouchEnd),window.removeEventListener("mousemove",this.onMove),window.removeEventListener("mouseup",this.onPointerEnd),window.removeEventListener("blur",this.onWindowBlur)}}function We(c,e){return e?Math.sqrt(Math.pow(e.clientX-c.clientX,2)+Math.pow(e.clientY-c.
1clientY,2)):0}function Xe(c,e){return e?{clientX:(c.clientX+e.clientX)/2,clientY:(c.clientY+e.clientY)/2}:c}const He=c=>typeof c=="object"&&c!==null&&c.constructor===Object&&Object.prototype.toString.call(c)==="[object Object]",z=(c,...e)=>{const t=e.length;for(let i=0;i<t;i++){const n=e[i]||{};Object.entries(n).forEach(([s,o])=>{const a=Array.isArray(o)?[]:{};c[s]||Object.assign(c,{[s]:a}),He(o)?Object.assign(c[s],z(a,o)):Array.isArray(o)?Object.assign(c,{[s]:[...o]}):Object.assign(c,{[s]:o})})}return c},Pe=function(c,e){return c.split(".").reduce((t,i)=>typeof t=="object"?t[i]:void 0,e)};class Ee{constructor(e={}){Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"events",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),this.setOptions(e);for(const t of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))t.startsWith("on")&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}setOptions(e){this.options=e?z({},this.constructor.defaults,e):{};for(const[t,i]of Object.entries(this.option("on")||{}))this.on(t,i)}option(e,...t){let i=Pe(e,this.options);return i&&typeof i=="function"&&(i=i.call(this,this,...t)),i}optionFor(e,t,i,...n){let s=Pe(t,e);var o;typeof(o=s)!="string"||isNaN(o)||isNaN(parseFloat(o))||(s=parseFloat(s)),s==="true"&&(s=!0),s==="false"&&(s=!1),s&&typeof s=="function"&&(s=s.call(this,this,e,...n));let a=Pe(t,this.options);return a&&typeof a=="function"?s=a.call(this,this,e,...n,s):s===void 0&&(s=a),s===void 0?i:s}cn(e){const t=this.options.classes;return t&&t[e]||""}localize(e,t=[]){e=String(e).replace(/\{\{(\w+).?(\w+)?\}\}/g,(i,n,s)=>{let o="";return s?o=this.option(`${n[0]+n.toLowerCase().substring(1)}.l10n.${s}`):n&&(o=this.option(`l10n.${n}`)),o||(o=i),o});for(let i=0;i<t.length;i++)e=e.split(t[i][0]).join(t[i][1]);return e=e.replace(/\{\{(.*?)\}\}/g,(i,n)=>n)}on(e,t){let i=[];typeof e=="string"?i=e.split(" "):Array.isArray(e)&&(i=e),this.events||(this.events=new Map),i.forEac
1h(n=>{let s=this.events.get(n);s||(this.events.set(n,[]),s=[]),s.includes(t)||s.push(t),this.events.set(n,s)})}off(e,t){let i=[];typeof e=="string"?i=e.split(" "):Array.isArray(e)&&(i=e),i.forEach(n=>{const s=this.events.get(n);if(Array.isArray(s)){const o=s.indexOf(t);o>-1&&s.splice(o,1)}})}emit(e,...t){[...this.events.get(e)||[]].forEach(i=>i(this,...t)),e!=="*"&&this.emit("*",e,...t)}}Object.defineProperty(Ee,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.0.28"}),Object.defineProperty(Ee,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{}});class _e extends Ee{constructor(e={}){super(e),Object.defineProperty(this,"plugins",{enumerable:!0,configurable:!0,writable:!0,value:{}})}attachPlugins(e={}){const t=new Map;for(const[i,n]of Object.entries(e)){const s=this.option(i),o=this.plugins[i];o||s===!1?o&&s===!1&&(o.detach(),delete this.plugins[i]):t.set(i,new n(this,s||{}))}for(const[i,n]of t)this.plugins[i]=n,n.attach()}detachPlugins(e){e=e||Object.keys(this.plugins);for(const t of e){const i=this.plugins[t];i&&i.detach(),delete this.plugins[t]}return this.emit("detachPlugins"),this}}var P;(function(c){c[c.Init=0]="Init",c[c.Error=1]="Error",c[c.Ready=2]="Ready",c[c.Panning=3]="Panning",c[c.Mousemove=4]="Mousemove",c[c.Destroy=5]="Destroy"})(P||(P={}));const _=["a","b","c","d","e","f"],dt={PANUP:"Move up",PANDOWN:"Move down",PANLEFT:"Move left",PANRIGHT:"Move right",ZOOMIN:"Zoom in",ZOOMOUT:"Zoom out",TOGGLEZOOM:"Toggle zoom level",TOGGLE1TO1:"Toggle zoom level",ITERATEZOOM:"Toggle zoom level",ROTATECCW:"Rotate counterclockwise",ROTATECW:"Rotate clockwise",FLIPX:"Flip horizontally",FLIPY:"Flip vertically",FITX:"Fit horizontally",FITY:"Fit vertically",RESET:"Reset",TOGGLEFS:"Toggle fullscreen"},Tt={content:null,width:"auto",height:"auto",panMode:"drag",touch:!0,dragMinThreshold:3,lockAxis:!1,mouseMoveFactor:1,mouseMoveFriction:.12,zoom:!0,pinchToZoom:!0,panOnlyZoomed:"auto",minScale:1,maxScale:2,friction:.25,dragFriction:.35,decelFriction:.05,click:"toggleZoom",dblClick:!1,wheel:"zoom",wheelLimit:7,spinner:!0,bounds:"auto",infinite:!1,rubberband:!0,bounce:!0,maxVelocity:75,transformParent:!1,classes:{content:"f-panzoom__content",isLoading:"is-loading",canZoomIn:"can-zoom_in",canZoomOut:"can-zoom_out",isDraggable:"is-draggable",isDragging:"is-dragging",inFullscreen:"in-fullscreen",htmlHasFullscreen:"with-panzoom-in-fullscreen"},l10n:dt},$e='<div class="f-spinner"><svg viewBox="0 0 50 50"><circle cx="25" cy="25" r="20"></circle><circle cx="25" cy="25" r="20"></circle></svg></div>',L=c=>c&&c!==null&&c instanceof Element&&"nodeType"in c,T=(c,e)=>{c&&Ne(e).forEach(t=>{c.classList.remove(t)})},w=(c,e)=>{c&&Ne(e).forEach(t=>{c.classList.add(t)})},he={a:1,b:0,c:0,d:1,e:0,f:0},Mt=1e5,de=1e4,k="mousemove",qe="drag",Ye="content";let Ce=null,Te=null;class J extends _e{get fits(){return this.contentRect.width-this.contentRect.fitWidth<1&&this.contentRect.height-this.contentRect.fitHeight<1}get isTouchDevice(){return Te===null&&(Te=window.matchMedia("(hover: none)").matches),Te}get isMobile(){return Ce===null&&(Ce=/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)),Ce}get panMode(){return this.options.panMode!==k||this.isTouchDevice?qe:k}get panOnlyZoomed(){const e=this.options.panOnlyZoomed;return e==="auto"?this.isTouchDevice:e}get isInfinite(){return this.option("infinite")}get angle(){return 180*Math.atan2(this.current.b,this.current.a)/Math.PI||0}get targetAngle(){return 180*Math.atan2(this.target.b,this.target.a)/Math.PI||0}get scale(){const{a:e,b:t}=this.current;return Math.sqrt(e*e+t*t)||1}get targetScale(){const{a:e,b:t}=this.target;return Math.sqrt(e*e+t*t)||1}get minScale(){return this.option("minScale")||1}get fullScale(){const{contentRect:e}=this;return e.fullWidth/e.fitWidth||1}get maxScale(){return this.fullScale*(this.option("maxScale")||1)||1}get coverScale(){const{containerRect:e,contentRect:t}=this,i=Math.max(e.height/t.fitHeight,e.width/t.fitWidth)||1;return Math.min(this.fullScale,i)}get isScaling(){return Math.abs(this.targetScale-this.scale)>1e-5&&!this.isResting}get isContentLoading(){const e=this.content;return!!(e&&e instanceof HTMLImageElement)&&!e.complete}get isResting(){if(this.isBouncingX||this.isBouncingY)return!1;for(const e of _){const t=e=="e"||e==="f"?1e-4:1e-5;
vendor: 4,105 bytes, line 1
1if(Math.abs(this.target[e]-this.current[e])>t)return!1}return!(!this.ignoreBounds&&!this.checkBounds().inBounds)}constructor(e,t={},i={}){var n;if(super(t),Object.defineProperty(this,"pointerTracker",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"resizeObserver",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"updateTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"clickTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"rAF",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"isTicking",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"ignoreBounds",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"isBouncingX",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"isBouncingY",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"clicks",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"trackingPoints",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"pwt",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"cwd",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"pmme",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"friction",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:P.Init}),Object.defineProperty(this,"isDragging",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"content",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"spinner",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"containerRect",{enumerable:!0,configurable:!0,writable:!0,value:{width:0,height:0,innerWidth:0,innerHeight:0}}),Object.defineProperty(this,"contentRect",{enumerable:!0,configurable:!0,writable:!0,value:{top:0,right:0,bottom:0,left:0,fullWidth:0,fullHeight:0,fitWidth:0,fitHeight:0,width:0,height:0}}),Object.defineProperty(this,"dragStart",{enumerable:!0,configurable:!0,writable:!0,value:{x:0,y:0,top:0,left:0,time:0}}),Object.defineProperty(this,"dragOffset",{enumerable:!0,configurable:!0,writable:!0,value:{x:0,y:0,time:0}}),Object.defineProperty(this,"current",{enumerable:!0,configurable:!0,writable:!0,value:Object.assign({},he)}),Object.defineProperty(this,"target",{enumerable:!0,configurable:!0,writable:!0,value:Object.assign({},he)}),Object.defineProperty(this,"velocity",{enumerable:!0,configurable:!0,writable:!0,value:{a:0,b:0,c:0,d:0,e:0,f:0}}),Object.defineProperty(this,"lockedAxis",{enumerable:!0,configurable:!0,writable:!0,value:!1}),!e)throw new Error("Container Element Not Found");this.container=e,this.initContent(),this.attachPlugins(Object.assign(Object.assign({},J.Plugins),i)),this.emit("attachPlugins"),this.emit("init");const s=this.content;if(s.addEventListener("load",this.onLoad),s.addEventListener("error",this.onError),this.isContentLoading){if(this.option("spinner")){e.classList.add(this.cn("isLoading"));const o=H($e);!e.contains(s)||s.parentElement instanceof HTMLPictureElement?this.spinner=e.appendChild(o):this.spinner=((n=s.parentElement)===null||n===void 0?void 0:n.insertBefore(o,s))||null}this.emit("beforeLoad")}else queueMicrotask(()=>{this.enable()})}initContent(){const{container:e}=this,t=this.cn(Ye);let i=this.option(Ye)||e.querySelector(`.${t}`);if(i||(i=e.querySelector("img,picture")||e.firstElementChild,i&&w(i,t)),i instanceof HTMLPictureElement&&(i=i.querySelector("img")),!i)throw new Error("No content found");this.content=i}onLoad(){const{spinner:e,container:t,state:i}=this;e&&(e.remove(),this.spinner=null),this.option("spinner")&&t.classList.remove(this.cn("isLoading")),this.emit
1("afterLoad"),i===P.Init?this.enable():this.updateMetrics()}onError(){this.state!==P.Destroy&&(this.spinner&&(this.spinner.remove(),this.spinner=null),this.stop(),this.detachEvents(),this.state=P.Error,this.emit("error"))}attachObserver(){var e;const t=()=>{const{container:i,containerRect:n}=this;return Math.abs(n.width-i.getBoundingClientRect().width)>.1||Math.abs(n.height-i.getBoundingClientRect().height)>.1};this.resizeObserver||window.ResizeObserver===void 0||(this.resizeObserver=new ResizeObserver(()=>{this.updateTimer||(t()?(this.onResize(),this.isMobile&&(this.updateTimer=setTimeout(()=>{t()&&this.onResize(),this.updateTimer=null},500))):this.updateTimer&&(clearTimeout(this.updateTimer),this.updateTimer=null))})),(e=this.resizeObserver)===null||e===void 0||e.observe(this.container)}detachObserver(){var e;(e=this.resizeObserver)===null||e===void 0||e.disconnect()}attachEvents(){const{container:e}=this;e.addEventListener("click",this.onClick,{passive:!1,capture:!1}),e.addEventListener("wheel",this.onWheel,{passive:!1}),this.pointerTracker=new Ct(e,{start:this.onPointerDown,move:this.onPointerMove,end:this.onPointerUp}),document.addEventListener(k,this.onMouseMove)}detachEvents(){var e;const{container:t}=this;t.removeEventListener("click",this.onClick,{passive:!1,capture:!1}),t.removeEventListener("wheel",this.onWheel,{passive:!1}),(e=this.pointerTracker)===null||e===void 0||e.stop(),this.pointerTracker=null,document.removeEventListener(k,this.onMouseMove),document.removeEventListener("keydown",this.onKeydown,!0),this.clickTimer&&(clearTimeout(this.clickTimer),this.clickTimer=null),this.updateTimer&&(clearTimeout(this.updateTimer),this.updateTimer=null)}animate(){this.setTargetForce();const e=this.friction,t=this.option("maxVelocity");for(const i of _)e?(this.velocity[i]*=1-e,t&&!this.isScaling&&(this.velocity[i]=Math.max(Math.min(this.velocity[i],t),-1*t)),this.current[i]+=this.velocity[i]):this.current[i]=this.target[i];this.setTransform(),this.setEdgeForce(),!this.isResting||this.isDragging?this.rAF=requestAnimationFrame(()=>this.animate()):this.stop("current")}setTargetForce(){for(const e of _)e==="e"&&this.isBouncingX||e==="f"&&this.isBouncingY||(this.velocity[e]=(1/(1-this.friction)-1)*(this.target[e]-this.current[e]))}checkBounds(e=0,t=0){const{current:i}=this,n=i.e+e,s=i.f+t,o=this.getBounds(),{x:a,y:l}=o,r=a.min,h=a.max,d=l.min,u=l.max;let f=0,p=0;return r!==1/0&&n<r?f=r-n:h!==1/0&&n>h&&(f=h-n),d!==1/0&&s<d?p=d-s:u!==1/0&&s>u&&(p=u-s),Math.abs(f)<1e-4&&(f=0),Math.abs(p)<1e-4&&(p=0),Object.assign(Object.assign({},o),{xDiff:f,yDiff:p,inBounds:!f&&!p})}clampTargetBounds(){const{target:e}=this,{x:t,y:i}=this.getBounds();t.min!==1/0&&(e.e=Math.max(e.e,t.min)),t.max!==1/0&&(e.e=Math.min(e.e,t.max)),i.min!==1/0&&(e.f=Math.max(e.f,i.min)),i.max!==1/0&&(e.f=Math.min(e.f,i.max))}calculateContentDim(e=this.current){const{content:t,contentRect:i}=this,{fitWidth:n,fitHeight:s,fullWidth:o,fullHeight:a}=i;let l=o,r=a;if(this.option("zoom")||this.angle!==0){const h=!(t instanceof HTMLImageElement)&&(window.getComputedStyle(t).maxWidth==="none"||window.getComputedStyle(t).maxHeight==="none"),d=h?o:n,u=h?a:s,f=this.getMatrix(e),p=new DOMPoint(0,0).matrixTransform(f),g=new DOMPoint(0+d,0).matrixTransform(f),m=new DOMPoint(0+d,0+u).matrixTransform(f),v=new DOMPoint(0,0+u).matrixTransform(f),y=Math.abs(m.x-p.x),x=Math.abs(m.y-p.y),S=Math.abs(v.x-g.x),N=Math.abs(v.y-g.y);l=Math.max(y,S),r=Math.max(x,N)}return{contentWidth:l,contentHeight:r}}setEdgeForce(){if(this.ignoreBounds||this.isDragging||this.panMode===k||this.targetScale<this.scale)return this.isBouncingX=!1,void(this.isBouncingY=!1);const{target:e}=this,{x:t,y:i,xDiff:n,yDiff:s}=this.checkBounds(),o=this.option("maxVelocity");let a=this.velocity.e,l=this.velocity.f;n!==0?(this.isBouncingX=!0,n*a<=0?a+=.14*n:(a=.14*n,t.min!==1/0&&(this.target.e=Math.max(e.e,t.min)),t.max!==1/0&&(this.target.e=Math.min(e.e,t.max))),o&&(a=Math.max(Math.min(a,o),-1*o))):this.isBouncingX=!1,s!==0?(this.isBouncingY=!0,s*l<=0?l+=.14*s:(l=.14*s,i.min!==1/0&&(this.target.f=Math.max(e.f,i.min)),i.max!==1/0&&(this.target.f=Math.min(e.f,i.max))),o&&(l=Math.max(Math.min(l,o),-1*o))):this.isBouncingY=!1,this.isBouncingX&&(this.velocity.e=a
1),this.isBouncingY&&(this.velocity.f=l)}enable(){const{content:e}=this,t=new DOMMatrixReadOnly(window.getComputedStyle(e).transform);for(const i of _)this.current[i]=this.target[i]=t[i];this.updateMetrics(),this.attachObserver(),this.attachEvents(),this.state=P.Ready,this.emit("ready")}onClick(e){var t;e.type==="click"&&e.detail===0&&(this.dragOffset.x=0,this.dragOffset.y=0),this.isDragging&&((t=this.pointerTracker)===null||t===void 0||t.clear(),this.trackingPoints=[],this.startDecelAnim());const i=e.target;if(!i||e.defaultPrevented)return;if(i.hasAttribute("disabled"))return e.preventDefault(),void e.stopPropagation();if((()=>{const f=window.getSelection();return f&&f.type==="Range"})()&&!i.closest("button"))return;const n=i.closest("[data-panzoom-action]"),s=i.closest("[data-panzoom-change]"),o=n||s,a=o&&L(o)?o.dataset:null;if(a){const f=a.panzoomChange,p=a.panzoomAction;if((f||p)&&e.preventDefault(),f){let g={};try{g=JSON.parse(f)}catch{console&&console.warn("The given data was not valid JSON")}return void this.applyChange(g)}if(p)return void(this[p]&&this[p]())}if(Math.abs(this.dragOffset.x)>3||Math.abs(this.dragOffset.y)>3)return e.preventDefault(),void e.stopPropagation();if(i.closest("[data-fancybox]"))return;const l=this.content.getBoundingClientRect(),r=this.dragStart;if(r.time&&!this.canZoomOut()&&(Math.abs(l.x-r.x)>2||Math.abs(l.y-r.y)>2))return;this.dragStart.time=0;const h=f=>{this.option("zoom",e)&&f&&typeof f=="string"&&/(iterateZoom)|(toggle(Zoom|Full|Cover|Max)|(zoomTo(Fit|Cover|Max)))/.test(f)&&typeof this[f]=="function"&&(e.preventDefault(),this[f]({event:e}))},d=this.option("click",e),u=this.option("dblClick",e);u?(this.clicks++,this.clicks==1&&(this.clickTimer=setTimeout(()=>{this.clicks===1?(this.emit("click",e),!e.defaultPrevented&&d&&h(d)):(this.emit("dblClick",e),e.defaultPrevented||h(u)),this.clicks=0,this.clickTimer=null},350))):(this.emit("click",e),!e.defaultPrevented&&d&&h(d))}addTrackingPoint(e){const t=this.trackingPoints.filter(i=>i.time>Date.now()-100);t.push(e),this.trackingPoints=t}onPointerDown(e,t,i){var n;if(this.option("touch",e)===!1)return!1;this.pwt=0,this.dragOffset={x:0,y:0,time:0},this.trackingPoints=[];const s=this.content.getBoundingClientRect();if(this.dragStart={x:s.x,y:s.y,top:s.top,left:s.left,time:Date.now()},this.clickTimer)return!1;if(this.panMode===k&&this.targetScale>1)return e.preventDefault(),e.stopPropagation(),!1;const o=e.composedPath()[0];if(!i.length){if(["TEXTAREA","OPTION","INPUT","SELECT","VIDEO","IFRAME"].includes(o.nodeName)||o.closest("[contenteditable],[data-selectable],[data-draggable],[data-clickable],[data-panzoom-change],[data-panzoom-action]"))return!1;(n=window.getSelection())===null||n===void 0||n.removeAllRanges()}if(e.type==="mousedown")["A","BUTTON"].includes(o.nodeName)||e.preventDefault();else if(Math.abs(this.velocity.a)>.3)return!1;return this.target.e=this.current.e,this.target.f=this.current.f,this.stop(),this.isDragging||(this.isDragging=!0,this.addTrackingPoint(t),this.emit("touchStart",e)),!0}onPointerMove(e,t,i){if(this.option("touch",e)===!1||!this.isDragging||t.length<2&&this.panOnlyZoomed&&b(this.targetScale)<=b(this.minScale)||(this.emit("touchMove",e),e.defaultPrevented))return;this.addTrackingPoint(t[0]);const{content:n}=this,s=Xe(i[0],i[1]),o=Xe(t[0],t[1]);let a=0,l=0;if(t.length>1){const x=n.getBoundingClientRect();a=s.clientX-x.left-.5*x.width,l=s.clientY-x.top-.5*x.height}const r=We(i[0],i[1]),h=We(t[0],t[1]);let d=r?h/r:1,u=o.clientX-s.clientX,f=o.clientY-s.clientY;this.dragOffset.x+=u,this.dragOffset.y+=f,this.dragOffset.time=Date.now()-this.dragStart.time;let p=b(this.targetScale)===b(this.minScale)&&this.option("lockAxis");if(p&&!this.lockedAxis)if(p==="xy"||p==="y"||e.type==="touchmove"){if(Math.abs(this.dragOffset.x)<6&&Math.abs(this.dragOffset.y)<6)return void e.preventDefault();const x=Math.abs(180*Math.atan2(this.dragOffset.y,this.dragOffset.x)/Math.PI);this.lockedAxis=x>45&&x<135?"y":"x",this.dragOffset.x=0,this.dragOffset.y=0,u=0,f=0}else this.lockedAxis=p;if(xe(e.target,this.content)&&(p="x",this.dragOffset.y=0),p&&p!=="xy"&&this.lockedAxis!==p&&b(this.targetScale)===b(this.minScale))return;e.cancelable&&e.preventDefault(),this.container.classList.add(this.cn("isDragging"));const g=this.checkBounds(u,f);this.option("rubberband")?(this.isInfinite!=="x"&&(g.xDiff>0&&u<0||g.xDiff<0&&u>0)&&(u*=Math.max(0,.5-Math.abs(.75/this.contentRect.fitWidth*g.xDiff))),this.isInfinite!=="y"&&(g.yDiff>0&&f<0||g.yDiff<0&&f>0)&&(f*=Math.max(0,.5-Math.abs(.75/this.contentRect.fitHeight*g.yDiff)))):(g.xDiff&&(u=0),g.yDiff&&(f=0));const m=this.targetScale,v=this.minScale,y=this.maxScale;m<.5*v&&(d=Math.max(d,v)),m>1.5*y&&(d=Math.min(d,y)),this.lockedAxis==="y"&&b(m)===b(v)&&(u=0),this.lockedAxis==="x"&&b(m)===b(v)&&(f=0),this.applyChange({originX:a,originY:l,panX:u,panY:f,scale:d,friction:this.option("dragFriction"),ignoreBounds:!0})}onPointerUp(e,t,i){if(i.length)return this.dragOffset.x=0,this.dragOffset.y=0,void(this.trackingPoints=[]);this.container.classList.remove(this.cn("isDragging")),this.isDragging&&(this.addTrackingPoint(t),this.panOnlyZoomed&&this.contentRect.width-this.contentRect.fitWidth<1&&this.contentRect.height-this.contentRect.fitHeight<1&&(this.trackingPoints=[]),xe(e.target,this.content)&&this.lockedAxis==="y"&&(this.trackingPoints=[]),this.emit
1("touchEnd",e),this.isDragging=!1,this.lockedAxis=!1,this.state!==P.Destroy&&(e.defaultPrevented||this.startDecelAnim()))}startDecelAnim(){var e;const t=this.isScaling;this.rAF&&(cancelAnimationFrame(this.rAF),this.rAF=null),this.isBouncingX=!1,this.isBouncingY=!1;for(const x of _)this.velocity[x]=0;this.target.e=this.current.e,this.target.f=this.current.f,T(this.container,"is-scaling"),T(this.container,"is-animating"),this.isTicking=!1;const{trackingPoints:i}=this,n=i[0],s=i[i.length-1];let o=0,a=0,l=0;s&&n&&(o=s.clientX-n.clientX,a=s.clientY-n.clientY,l=s.time-n.time);const r=((e=window.visualViewport)===null||e===void 0?void 0:e.scale)||1;r!==1&&(o*=r,a*=r);let h=0,d=0,u=0,f=0,p=this.option("decelFriction");const g=this.targetScale;if(l>0){u=Math.abs(o)>3?o/(l/30):0,f=Math.abs(a)>3?a/(l/30):0;const x=this.option("maxVelocity");x&&(u=Math.max(Math.min(u,x),-1*x),f=Math.max(Math.min(f,x),-1*x))}u&&(h=u/(1/(1-p)-1)),f&&(d=f/(1/(1-p)-1)),(this.option("lockAxis")==="y"||this.option("lockAxis")==="xy"&&this.lockedAxis==="y"&&b(g)===this.minScale)&&(h=u=0),(this.option("lockAxis")==="x"||this.option("lockAxis")==="xy"&&this.lockedAxis==="x"&&b(g)===this.minScale)&&(d=f=0);const m=this.dragOffset.x,v=this.dragOffset.y,y=this.option("dragMinThreshold")||0;Math.abs(m)<y&&Math.abs(v)<y&&(h=d=0,u=f=0),(this.option("zoom")&&(g<this.minScale-1e-5||g>this.maxScale+1e-5)||t&&!h&&!d)&&(p=.35),this.applyChange({panX:h,panY:d,friction:p}),this.emit("decel",u,f,m,v)}onWheel(e){var t=[-e.deltaX||0,-e.deltaY||0,-e.detail||0].reduce(function(s,o){return Math.abs(o)>Math.abs(s)?o:s});const i=Math.max(-1,Math.min(1,t));if(this.emit("wheel",e,i),this.panMode===k||e.defaultPrevented)return;const n=this.option("wheel");n==="pan"?(e.preventDefault(),this.panOnlyZoomed&&!this.canZoomOut()||this.applyChange({panX:2*-e.deltaX,panY:2*-e.deltaY,bounce:!1})):n==="zoom"&&this.option("zoom")!==!1&&this.zoomWithWheel(e)}onMouseMove(e){this.panWithMouse(e)}onKeydown(e){e.key==="Escape"&&this.toggleFS()}onResize(){this.updateMetrics(),this.checkBounds().inBounds||this.requestTick()}setTransform(){this.emit("beforeTransform");const{current:e,target:t,content:i,contentRect:n}=this,s=Object.assign({},he);for(const m of _){const v=m=="e"||m==="f"?de:Mt;s[m]=b(e[m],v),Math.abs(t[m]-e[m])<(m=="e"||m==="f"?.51:.001)&&(e[m]=t[m])}let{a:o,b:a,c:l,d:r,e:h,f:d}=s,u=`matrix(${o}, ${a}, ${l}, ${r}, ${h}, ${d})`,f=i.parentElement instanceof HTMLPictureElement?i.parentElement:i;if(this.option("transformParent")&&(f=f.parentElement||f),f.style.transform===u)return;f.style.transform=u;const{contentWidth:p,contentHeight:g}=this.calculateContentDim();n.width=p,n.height=g,this.emit("afterTransform")}updateMetrics(e=!1){var t;if(!this||this.state===P.Destroy||this.isContentLoading)return;const i=Math.max(1,((t=window.visualViewport)===null||t===void 0?void 0:t.scale)||1),{container:n,content:s}=this,o=s instanceof HTMLImageElement,a=n.getBoundingClientRect(),l=getComputedStyle(this.container);let r=a.width*i,h=a.height*i;const d=parseFloat(l.paddingTop)+parseFloat(l.paddingBottom),u=r-(parseFloat(l.paddingLeft)+parseFloat(l.paddingRight)),f=h-d;this.containerRect={width:r,height:h,innerWidth:u,innerHeight:f};let p=this.option("width")||"auto",g=this.option("height")||"auto";p==="auto"&&(p=parseFloat(s.dataset.width||"")||(C=>{let F=0;return F=C instanceof HTMLImageElement?C.naturalWidth:C instanceof SVGElement?C.width.baseVal.value:Math.max(C.offsetWidth,C.scrollWidth),F||0})(s)),g==="auto"&&(g=parseFloat(s.dataset.height||"")||(C=>{let F=0;return F=C instanceof HTMLImageElement?C.naturalHeight:C instanceof SVGElement?C.height.baseVal.value:Math.max(C.offsetHeight,C.scrollHeight),F||0})(s));let m=s.parentElement instanceof HTMLPictureElement?s.parentElement:s;this.option("transformParent")&&(m=m.parentElement||m);const v=m.getAttribute("style")||"";m.style.setProperty("transform","none","important"),o&&(m.style.width="",m.style.height=""),m.offsetHeight;const y=s.getBoundingClientRect();let x=y.width*i,S=y.height*i,N=0,q=0;o&&(Math.abs(p-x)>1||Math.abs(g-S)>1)&&({width:x,height:S,top:N,left:q}=((C,F,se,oe)=>{const Se=se/oe;return Se>C/F?(se=C,oe=C/Se):(se=F*Se,oe=F),{width:se,height:oe,top:.5*(F-oe),left:.5*(C-se)}})(x,S,p,g)),this.contentRect=Object.assign(Object.assign({},this.contentRect),{top:y.top-a.top+N,bottom:a.bottom-y.bottom+N,left:y.left-a.left+q,right:a.right-y.right+q,fitWidth:x,fitHeight:S,width:x,height:S,fullWidth:p,fullHeight:g}),m.style.cssText=v,o&&(m.style.width=`${x}px`,m.style.height=`${S}
1px`),this.setTransform(),e!==!0&&this.emit("refresh"),this.ignoreBounds||(b(this.targetScale)<b(this.minScale)?this.zoomTo(this.minScale,{friction:0}):this.targetScale>this.maxScale?this.zoomTo(this.maxScale,{friction:0}):this.state===P.Init||this.checkBounds().inBounds||this.requestTick()),this.updateControls()}calculateBounds(){const{contentWidth:e,contentHeight:t}=this.calculateContentDim(this.target),{targetScale:i,lockedAxis:n}=this,{fitWidth:s,fitHeight:o}=this.contentRect;let a=0,l=0,r=0,h=0;const d=this.option("infinite");if(d===!0||n&&d===n)a=-1/0,r=1/0,l=-1/0,h=1/0;else{let{containerRect:u,contentRect:f}=this,p=b(s*i,de),g=b(o*i,de),{innerWidth:m,innerHeight:v}=u;if(u.width===p&&(m=u.width),u.width===g&&(v=u.height),e>m){r=.5*(e-m),a=-1*r;let y=.5*(f.right-f.left);a+=y,r+=y}if(s>m&&e<m&&(a-=.5*(s-m),r-=.5*(s-m)),t>v){h=.5*(t-v),l=-1*h;let y=.5*(f.bottom-f.top);l+=y,h+=y}o>v&&t<v&&(a-=.5*(o-v),r-=.5*(o-v))}return{x:{min:a,max:r},y:{min:l,max:h}}}getBounds(){const e=this.option("bounds");return e!=="auto"?e:this.calculateBounds()}updateControls(){const e=this,t=e.container,{panMode:i,contentRect:n,fullScale:s,targetScale:o,coverScale:a,maxScale:l,minScale:r}=e;let h={toggleMax:o-r<.5*(l-r)?l:r,toggleCover:o-r<.5*(a-r)?a:r,toggleZoom:o-r<.5*(s-r)?s:r}[e.option("click")||""]||r,d=e.canZoomIn(),u=e.canZoomOut(),f=i===qe&&!!this.option("touch"),p=u&&f;if(f&&(b(o)<b(r)&&!this.panOnlyZoomed&&(p=!0),(b(n.width,1)>b(n.fitWidth,1)||b(n.height,1)>b(n.fitHeight,1))&&(p=!0)),b(n.width*o,1)<b(n.fitWidth,1)&&(p=!1),i===k&&(p=!1),B(t,this.cn("isDraggable"),p),!this.option("zoom"))return;let g=d&&b(h)>b(o),m=!g&&!p&&u&&b(h)<b(o);B(t,this.cn("canZoomIn"),g),B(t,this.cn("canZoomOut"),m);for(const v of t.querySelectorAll('[data-panzoom-action="zoomIn"]'))d?(v.removeAttribute("disabled"),v.removeAttribute("tabindex")):(v.setAttribute("disabled",""),v.setAttribute("tabindex","-1"));for(const v of t.querySelectorAll('[data-panzoom-action="zoomOut"]'))u?(v.removeAttribute("disabled"),v.removeAttribute("tabindex")):(v.setAttribute("disabled",""),v.setAttribute("tabindex","-1"));for(const v of t.querySelectorAll('[data-panzoom-action="toggleZoom"],[data-panzoom-action="iterateZoom"]')){d||u?(v.removeAttribute("disabled"),v.removeAttribute("tabindex")):(v.setAttribute("disabled",""),v.setAttribute("tabindex","-1"));const y=v.querySelector("g");y&&(y.style.display=d?"":"none")}}panTo({x:e=this.target.e,y:t=this.target.f,scale:i=this.targetScale,friction:n=this.option("friction"),angle:s=0,originX:o=0,originY:a=0,flipX:l=!1,flipY:r=!1,ignoreBounds:h=!1}){this.state!==P.Destroy&&this.applyChange({panX:e-this.target.e,panY:t-this.target.f,scale:i/this.targetScale,angle:s,originX:o,originY:a,friction:n,flipX:l,flipY:r,ignoreBounds:h})}applyChange({panX:e=0,panY:t=0,scale:i=1,angle:n=0,originX:s=-this.current.e,originY:o=-this.current.f,friction:a=this.option("friction"),flipX:l=!1,flipY:r=!1,ignoreBounds:h=!1,bounce:d=this.option("bounce")}){const u=this.state;if(u===P.Destroy)return;this.rAF&&(cancelAnimationFrame(this.rAF),this.rAF=null),this.friction=a||0,this.ignoreBounds=h;const{current:f}=this,p=f.e,g=f.f,m=this.getMatrix(this.target);let v=new DOMMatrix().translate(p,g).translate(s,o).translate(e,t);if(this.option("zoom")){if(!h){const y=this.targetScale,x=this.minScale,S=this.maxScale;y*i<x&&(i=x/y),y*i>S&&(i=S/y)}v=v.scale(i)}v=v.translate(-s,-o).translate(-p,-g).multiply(m),n&&(v=v.rotate(n)),l&&(v=v.scale(-1,1)),r&&(v=v.scale(1,-1));for(const y of _)y!=="e"&&y!=="f"&&(v[y]>this.minScale+1e-5||v[y]<this.minScale-1e-5)?this.target[y]=v[y]:this.target[y]=b(v[y],de);(this.targetScale<this.scale||Math.abs(i-1)>.1||this.panMode===k||d===!1)&&!h&&this.clampTargetBounds(),u===P.Init?this.animate():this.isResting||(this.state=P.Panning,this.requestTick())}stop(e=!1){if(this.state===P.Init||this.state===P.Destroy)return;const t=this.isTicking;this.rAF&&(cancelAnimationFrame(this.rAF),this.rAF=null),this.isBouncingX=!1,this.isBouncingY=!1;for(const i of _)this.velocity[i]=0,e==="current"?this.current[i]=this.target[i]:e==="target"&&(this.target[i]=this.current[i]);this.setTransform(),T(this.container,"is-scaling"),T(this.container,"is-animating"),this.isTicking=!1,this.state=P.Ready,t&&(this.emit
1("endAnimation"),this.updateControls())}requestTick(){this.isTicking||(this.emit("startAnimation"),this.updateControls(),w(this.container,"is-animating"),this.isScaling&&w(this.container,"is-scaling")),this.isTicking=!0,this.rAF||(this.rAF=requestAnimationFrame(()=>this.animate()))}panWithMouse(e,t=this.option("mouseMoveFriction")){if(this.pmme=e,this.panMode!==k||!e||b(this.targetScale)<=b(this.minScale))return;this.emit("mouseMove",e);const{container:i,containerRect:n,contentRect:s}=this,o=n.width,a=n.height,l=i.getBoundingClientRect(),r=(e.clientX||0)-l.left,h=(e.clientY||0)-l.top;let{contentWidth:d,contentHeight:u}=this.calculateContentDim(this.target);const f=this.option("mouseMoveFactor");f>1&&(d!==o&&(d*=f),u!==a&&(u*=f));let p=.5*(d-o)-r/o*100/100*(d-o);p+=.5*(s.right-s.left);let g=.5*(u-a)-h/a*100/100*(u-a);g+=.5*(s.bottom-s.top),this.applyChange({panX:p-this.target.e,panY:g-this.target.f,friction:t})}zoomWithWheel(e){if(this.state===P.Destroy||this.state===P.Init)return;const t=Date.now();if(t-this.pwt<45)return void e.preventDefault();this.pwt=t;var i=[-e.deltaX||0,-e.deltaY||0,-e.detail||0].reduce(function(r,h){return Math.abs(h)>Math.abs(r)?h:r});const n=Math.max(-1,Math.min(1,i)),{targetScale:s,maxScale:o,minScale:a}=this;let l=s*(100+45*n)/100;b(l)<b(a)&&b(s)<=b(a)?(this.cwd+=Math.abs(n),l=a):b(l)>b(o)&&b(s)>=b(o)?(this.cwd+=Math.abs(n),l=o):(this.cwd=0,l=Math.max(Math.min(l,o),a)),this.cwd>this.option("wheelLimit")||(e.preventDefault(),b(l)!==b(s)&&this.zoomTo(l,{event:e}))}canZoomIn(){return this.option("zoom")&&(b(this.contentRect.width,1)<b(this.contentRect.fitWidth,1)||b(this.targetScale)<b(this.maxScale))}canZoomOut(){return this.option("zoom")&&b(this.targetScale)>b(this.minScale)}zoomIn(e=1.25,t){this.zoomTo(this.targetScale*e,t)}zoomOut(e=.8,t){this.zoomTo(this.targetScale*e,t)}zoomToFit(e){this.zoomTo("fit",e)}zoomToCover(e){this.zoomTo("cover",e)}zoomToFull(e){this.zoomTo("full",e)}zoomToMax(e){this.zoomTo("max",e)}toggleZoom(e){this.zoomTo(this.targetScale-this.minScale<.5*(this.fullScale-this.minScale)?"full":"fit",e)}toggleMax(e){this.zoomTo(this.targetScale-this.minScale<.5*(this.maxScale-this.minScale)?"max":"fit",e)}toggleCover(e){this.zoomTo(this.targetScale-this.minScale<.5*(this.coverScale-this.minScale)?"cover":"fit",e)}iterateZoom(e){this.zoomTo("next",e)}zoomTo(e=1,{friction:t="auto",originX:i="auto",originY:n="auto",event:s}={}){if(this.isContentLoading||this.state===P.Destroy)return;const{targetScale:o}=this;this.stop();let a=1;if(this.panMode===k&&(s=this.pmme||s),s||i==="auto"||n==="auto"){const d=this.content.getBoundingClientRect(),u=this.container.getBoundingClientRect(),f=s?s.clientX:u.left+.5*u.width,p=s?s.clientY:u.top+.5*u.height;i=f-d.left-.5*d.width,n=p-d.top-.5*d.height}const l=this.fullScale,r=this.maxScale,h=this.coverScale;if(typeof e=="number")a=e/o||1;else if(e==="full")a=l/o||1;else if(e==="cover")a=h/o||1;else if(e==="max")a=r/o||1;else if(e==="fit")a=1/o||1;else if(e==="next"){let d=[1,l,r].sort((f,p)=>f-p),u=d.findIndex(f=>f>o+1e-5);a=d[u]/o||1/o}t=t==="auto"?a>1?.15:.25:t,this.applyChange({scale:a,originX:i,originY:n,friction:t}),s&&this.panMode===k&&this.panWithMouse(s,t)}rotateCCW(){this.applyChange({angle:-90})}rotateCW(){this.applyChange({angle:90})}flipX(){this.applyChange({flipX:!0})}flipY(){this.applyChange({flipY:!0})}fitX(){this.stop("target");const{containerRect:e,contentRect:t,target:i}=this;this.applyChange({panX:.5*e.width-(t.left+.5*t.fitWidth)-i.e,panY:.5*e.height-(t.top+.5*t.fitHeight)-i.f,scale:e.width/t.fitWidth/this.targetScale,originX:0,originY:0,ignoreBounds:!0})}fitY(){this.stop("target");const{containerRect:e,contentRect:t,target:i}=this;this.applyChange({panX:.5*e.width-(t.left+.5*t.fitWidth)-i.e,panY:.5*e.innerHeight-(t.top+.5*t.fitHeight)-i.f,scale:e.height/t.fitHeight/this.targetScale,originX:0,originY:0,ignoreBounds:!0})}toggleFS(){const{container:e}=this,t=this.cn("inFullscreen"),i=this.cn("htmlHasFullscreen");e.classList.toggle(t);const n=e.classList.contains(t);n?(document.documentElement.classList.add(i),document.addEventListener("keydown",this.onKeydown,!0)):(document.documentElement.classList.remove(i),document.removeEventListener("keydown",this.onKeydown,!0)),this.updateMetrics(),this.emit
1(n?"enterFS":"exitFS")}getMatrix(e=this.current){const{a:t,b:i,c:n,d:s,e:o,f:a}=e;return new DOMMatrix([t,i,n,s,o,a])}reset(e){if(this.state!==P.Init&&this.state!==P.Destroy){this.stop("current");for(const t of _)this.target[t]=he[t];this.target.a=this.minScale,this.target.d=this.minScale,this.clampTargetBounds(),this.isResting||(this.friction=e===void 0?this.option("friction"):e,this.state=P.Panning,this.requestTick())}}destroy(){this.stop(),this.state=P.Destroy,this.detachEvents(),this.detachObserver();const{container:e,content:t}=this,i=this.option("classes")||{};for(const n of Object.values(i))e.classList.remove(n+"");t&&(t.removeEventListener("load",this.onLoad),t.removeEventListener("error",this.onError)),this.detachPlugins()}}Object.defineProperty(J,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:Tt}),Object.defineProperty(J,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:{}});const Ve=function(c,e){let t=!0;return(...i)=>{t&&(t=!1,c(...i),setTimeout(()=>{t=!0},e))}},Ze=(c,e)=>{let t=[];return c.childNodes.forEach(i=>{i.nodeType!==Node.ELEMENT_NODE||e&&!i.matches(e)||t.push(i)}),t},Ot={viewport:null,track:null,enabled:!0,slides:[],axis:"x",transition:"fade",preload:1,slidesPerPage:"auto",initialPage:0,friction:.12,Panzoom:{decelFriction:.12},center:!0,infinite:!0,fill:!0,dragFree:!1,adaptiveHeight:!1,direction:"ltr",classes:{container:"f-carousel",viewport:"f-carousel__viewport",track:"f-carousel__track",slide:"f-carousel__slide",isLTR:"is-ltr",isRTL:"is-rtl",isHorizontal:"is-horizontal",isVertical:"is-vertical",inTransition:"in-transition",isSelected:"is-selected"},l10n:{NEXT:"Next slide",PREV:"Previous slide",GOTO:"Go to slide #%d"}};var M;(function(c){c[c.Init=0]="Init",c[c.Ready=1]="Ready",c[c.Destroy=2]="Destroy"})(M||(M={}));const Me=c=>{if(typeof c=="string"||c instanceof HTMLElement)c={html:c};else{const e=c.thumb;e!==void 0&&(typeof e=="string"&&(c.thumbSrc=e),e instanceof HTMLImageElement&&(c.thumbEl=e,c.thumbElSrc=e.src,c.thumbSrc=e.src),delete c.thumb)}return Object.assign({html:"",el:null,isDom:!1,class:"",customClass:"",index:-1,dim:0,gap:0,pos:0,transition:!1},c)},At=(c={})=>Object.assign({index:-1,slides:[],dim:0,pos:-1},c);class D extends Ee{constructor(e,t){super(t),Object.defineProperty(this,"instance",{enumerable:!0,configurable:!0,writable:!0,value:e})}attach(){}detach(){}}const Lt={classes:{list:"f-carousel__dots",isDynamic:"is-dynamic",hasDots:"has-dots",dot:"f-carousel__dot",isBeforePrev:"is-before-prev",isPrev:"is-prev",isCurrent:"is-current",isNext:"is-next",isAfterNext:"is-after-next"},dotTpl:'<button type="button" data-carousel-page="%i" aria-label="{{GOTO}}"><span class="f-carousel__dot" aria-hidden="true"></span></button>',dynamicFrom:11,maxCount:1/0,minCount:2};class ut extends D{constructor(){super(...arguments),Object.defineProperty(this,"isDynamic",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"list",{enumerable:!0,configurable:!0,writable:!0,value:null})}onRefresh(){this.refresh()}build(){let e=this.list;if(!e){e=document.createElement("ul"),w(e,this.cn("list")),e.setAttribute("role","tablist");const t=this.instance.container;t.appendChild(e),w(t,this.cn("hasDots")),this.list=e}return e}refresh(){var e;const t=this.instance.pages.length,i=Math.min(2,this.option("minCount")),n=Math.max(2e3,this.option("maxCount")),s=this.option("dynamicFrom");if(t<i||t>n)return void this.cleanup();const o=typeof s=="number"&&t>5&&t>=s,a=!this.list||this.isDynamic!==o||this.list.children.length!==t;a&&this.cleanup();const l=this.build();if(B(l,this.cn("isDynamic"),!!o),a)for(let d=0;d<t;d++)l.append(this.createItem(d));let r,h=0;for(const d of[...l.children]){const u=h===this.instance.page;u&&(r=d),B(d,this.cn("isCurrent"),u),(e=d.children[0])===null||e===void 0||e.setAttribute("aria-selected",u?"true":"false");for(const f of["isBeforePrev","isPrev","isNext","isAfterNext"])T(d,this.cn(f));h++}if(r=r||l.firstChild,o&&r){const d=r.previousElementSibling,u=d&&d.previousElementSibling;w(d,this.cn("isPrev")),w(u,this.cn("isBeforePrev"));const f=r.nextElementSibling,p=f&&f.nextElementSibling;w(f,this.cn("isNext")),w(p,this.cn("isAfterNext"))}this.isDynamic=o}createItem(e=0){var t;const i=document.createElement("li");i.setAttribute("role","presentation");const n=H(this.instance.localize(this.option("dotTpl"),[["%d",e+1]]).replace(/\%i/g,e+""));return i.appendChild(n),(t=i.children[0])===null||t===void 0||t.setAttribute("role","tab"),i}cleanup(){this.list&&(this.list.remove(),this.list=null),this.isDynamic=!1,T(this.instance.container,this.cn("hasDots"))}attach(){this.instance.on(["refresh","change"],this.onRefresh)}detach(){this.instance.off(["refresh","change"],this.onRefresh),this.cleanup()}}Object.defineProperty(ut,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:Lt});const ue="disabled",fe="next",Ue="prev";class ft extends D{constructor(){super(...arguments),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"prev",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"next",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"isDom",{enumerable:!0,configurable:!0,writable:!0,value:!1})}onRefresh(){const e=this.instance,t=e.pages.length,i=e.page;if(t<2)return void this.cleanup();this.build();let n=this.prev,s=this.next;n&&s&&(n.removeAttribute(ue),s.removeAttribute(ue),e.isInfinite||(i<=0&&n.setAttribute(ue,""),i>=t-1&&s.setAttribute(ue,"")))}addBtn(e){var t;const i=this.instance,n=document.createElement("button");n.setAttribute("tabindex","0"),n.setAttribute("title",i.localize(`{{${e.toUpperCase()}}}`)),w(n,this.cn("button")+" "+this.cn(e===fe?"isNext":"isPrev"));const s=i.isRTL?e===fe?Ue:fe:e;var o;return n.innerHTML=i.localize(this.option(`${s}Tpl`)),n.dataset[`carousel${o=e,o?o.match("^[a-z]")?o.charAt(0).toUpperCase()+o.substring(1):o:""}`]="true",(t=this.container)===null||t===void 0||t.appendChild(n),n}build(){const e=this.instance.container,t=this.cn("container");let{container:i,prev:n,next:s}=this;i||(i=e.querySelector("."+t),this.isDom=!!i),i||(i=document.createElement("div"),w(i,t),e.appendChild(i)),this.container=i,s||(s=i.querySelector("[data-carousel-next]")),s||(s=this.addBtn(fe)),this.next=s,n||(n=i.querySelector("[data-carousel-prev]")),n||(n=this.addBtn(Ue)),this.prev=n}cleanup(){this.isDom||(this.prev&&this.prev.remove(),this.next&&this.next.remove(),this.container&&this.container.remove()),this.prev=null,this.next=null,this.container=null,this.isDom=!1}attach(){this.instance.on(["refresh","change"],this.onRefresh)}detach(){this.instance.off(["refresh","change"],this.onRefresh),this.cleanup()}}Object.defineProperty(ft,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{classes:{container:"f-carousel__nav",button:"f-button",isNext:"is-next",isPrev:"is-prev"},nextTpl:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" tabindex="-1"><path d="M9 3l9 9-9 9"/></svg>
1',prevTpl:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" tabindex="-1"><path d="M15 3l-9 9 9 9"/></svg>'}});class pt extends D{constructor(){super(...arguments),Object.defineProperty(this,"selectedIndex",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"target",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"nav",{enumerable:!0,configurable:!0,writable:!0,value:null})}addAsTargetFor(e){this.target=this.instance,this.nav=e,this.attachEvents()}addAsNavFor(e){this.nav=this.instance,this.target=e,this.attachEvents()}attachEvents(){const{nav:e,target:t}=this;e&&t&&(e.options.initialSlide=t.options.initialPage,e.state===M.Ready?this.onNavReady(e):e.on("ready",this.onNavReady),t.state===M.Ready?this.onTargetReady(t):t.on("ready",this.onTargetReady))}onNavReady(e){e.on("createSlide",this.onNavCreateSlide),e.on("Panzoom.click",this.onNavClick),e.on("Panzoom.touchEnd",this.onNavTouch),this.onTargetChange()}onTargetReady(e){e.on("change",this.onTargetChange),e.on("Panzoom.refresh",this.onTargetChange),this.onTargetChange()}onNavClick(e,t,i){this.onNavTouch(e,e.panzoom,i)}onNavTouch(e,t,i){var n,s;if(Math.abs(t.dragOffset.x)>3||Math.abs(t.dragOffset.y)>3)return;const o=i.target,{nav:a,target:l}=this;if(!a||!l||!o)return;const r=o.closest("[data-index]");if(i.stopPropagation(),i.preventDefault(),!r)return;const h=parseInt(r.dataset.index||"",10)||0,d=l.getPageForSlide(h),u=a.getPageForSlide(h);a.slideTo(u),l.slideTo(d,{friction:((s=(n=this.nav)===null||n===void 0?void 0:n.plugins)===null||s===void 0?void 0:s.Sync.option("friction"))||0}),this.markSelectedSlide(h)}onNavCreateSlide(e,t){t.index===this.selectedIndex&&this.markSelectedSlide(t.index)}onTargetChange(){var e,t;const{target:i,nav:n}=this;if(!i||!n||n.state!==M.Ready||i.state!==M.Ready)return;const s=(t=(e=i.pages[i.page])===null||e===void 0?void 0:e.slides[0])===null||t===void 0?void 0:t.index,o=n.getPageForSlide(s);this.markSelectedSlide(s),n.slideTo(o,n.prevPage===null&&i.prevPage===null?{friction:0}:void 0)}markSelectedSlide(e){const t=this.nav;t&&t.state===M.Ready&&(this.selectedIndex=e,[...t.slides].map(i=>{i.el&&i.el.classList[i.index===e?"add":"remove"]("is-nav-selected")}))}attach(){const e=this;let t=e.options.target,i=e.options.nav;t?e.addAsNavFor(t):i&&e.addAsTargetFor(i)}detach(){const e=this,t=e.nav,i=e.target;t&&(t.off("ready",e.onNavReady),t.off("createSlide",e.onNavCreateSlide),t.off("Panzoom.click",e.onNavClick),t.off("Panzoom.touchEnd",e.onNavTouch)),e.nav=null,i&&(i.off("ready",e.onTargetReady),i.off("refresh",e.onTargetChange),i.off("change",e.onTargetChange)),e.target=null}}Object.defineProperty(pt,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{friction:.35}});const zt={Navigation:ft,Dots:ut,Sync:pt},pe="animationend",Ge="isSelected",ge="slide";class K extends _e{get axis(){return this.isHorizontal?"e":"f"}get isEnabled(){return this.state===M.Ready}get isInfinite(){let e=!1;const{contentDim:t,viewportDim:i,pages:n,slides:s}=this,o=s[0];return n.length>=2&&o&&t+o.dim>=i&&(e=this.option("infinite")),e}get isRTL(){return this.option("direction")==="rtl"}get isHorizontal(){return this.option("axis")==="x"}constructor(e,t={},i={}){if(super(),Object.defineProperty(this,"bp",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(this,"lp",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"userOptions",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"userPlugins",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:M.Init}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"prevPage",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"viewport",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"track",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"slides",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"pages",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"panzoom",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"inTransition",{enumerable:!0,configurable:!0,writable:!0,value:new Set}),Object.defineProperty(this,"contentDim",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"viewportDim",{enumerable:!0,configurable:!0,writable:!0,value:0}),typeof e=="string"&&(e=document.querySelector(e)),!e||!L(e))throw new Error("No Element found");this.container=e,this.slideNext=Ve(this.slideNext.bind(this),150),this.slidePrev=Ve(this.slidePrev.bind(this),150),this.userOptions=t,this.userPlugins=i,queueMicrotask(()=>{this.processOptions()})}processOptions(){var e,t;const i=z({},K.defaults,this.userOptions);let n="";const s=i.breakpoints;if(s&&He(s))for(const[o,a]of Object.entries(s))window.matchMedia(o).matches&&He(a)&&(n+=o,z(i,a));n===this.bp&&this.state!==M.Init||(this.bp=n,this.state===M.Ready&&(i.initialSlide=((t=(e=this.pages[this.page])===null||e===void 0?void 0:e.slides[0])===null||t===void 0?void 0:t.index)||0),this.state!==M.Init&&this.destroy(),super.setOptions(i),this.option("enabled")===!1?this.attachEvents():setTimeout(()=>{this.init()},0))}
vendor: 1,336 bytes, line 1
1init(){this.state=M.Init,this.emit("init"),this.attachPlugins(Object.assign(Object.assign({},K.Plugins),this.userPlugins)),this.emit("attachPlugins"),this.initLayout(),this.initSlides(),this.updateMetrics(),this.setInitialPosition(),this.initPanzoom(),this.attachEvents(),this.state=M.Ready,this.emit("ready")}initLayout(){const{container:e}=this,t=this.option("classes");w(e,this.cn("container")),B(e,t.isLTR,!this.isRTL),B(e,t.isRTL,this.isRTL),B(e,t.isVertical,!this.isHorizontal),B(e,t.isHorizontal,this.isHorizontal);let i=this.option("viewport")||e.querySelector(`.${t.viewport}`);i||(i=document.createElement("div"),w(i,t.viewport),i.append(...Ze(e,`.${t.slide}`)),e.prepend(i)),i.addEventListener("scroll",this.onScroll);let n=this.option("track")||e.querySelector(`.${t.track}`);n||(n=document.createElement("div"),w(n,t.track),n.append(...Array.from(i.childNodes))),n.setAttribute("aria-live","polite"),i.contains(n)||i.prepend(n),this.viewport=i,this.track=n,this.emit("initLayout")}initSlides(){const{track:e}=this;if(!e)return;const t=[...this.slides],i=[];[...Ze(e,`.${this.cn(ge)}`)].forEach(n=>{if(L(n)){const s=Me({el:n,isDom:!0,index:this.slides.length});i.push(s)}});for(let n of[...this.option("slides",[])||[],...t]){const s=Me(n);i.push(s)}this.slides=i;for(let n=0;n<this.slides.length;n++)this.slides[n].index=n;
1for(const n of i)this.emit("beforeInitSlide",n,n.index),this.emit("initSlide",n,n.index);this.emit("initSlides")}setInitialPage(){const e=this.option("initialSlide");this.page=typeof e=="number"?this.getPageForSlide(e):parseInt(this.option("initialPage",0)+"",10)||0}setInitialPosition(){const{track:e,pages:t,isHorizontal:i}=this;if(!e||!t.length)return;let n=this.page;t[n]||(this.page=n=0);const s=(t[n].pos||0)*(this.isRTL&&i?1:-1),o=i?`${s}px`:"0",a=i?"0":`${s}px`;e.style.transform=`translate3d(${o}, ${a}, 0) scale(1)`,this.option("adaptiveHeight")&&this.setViewportHeight()}initPanzoom(){this.panzoom&&(this.panzoom.destroy(),this.panzoom=null);const e=this.option("Panzoom")||{};this.panzoom=new J(this.viewport,z({},{content:this.track,zoom:!1,panOnlyZoomed:!1,lockAxis:this.isHorizontal?"x":"y",infinite:this.isInfinite,click:!1,dblClick:!1,touch:t=>!(this.pages.length<2&&!t.options.infinite),bounds:()=>this.getBounds(),maxVelocity:t=>Math.abs(t.target[this.axis]-t.current[this.axis])<2*this.viewportDim?100:0},e)),this.panzoom.on("*",(t,i,...n)=>{this.emit(`Panzoom.${i}`,t,...n)}),this.panzoom.on("decel",this.onDecel),this.panzoom.on("refresh",this.onRefresh),this.panzoom.on("beforeTransform",this.onBeforeTransform),this.panzoom.on("endAnimation",this.onEndAnimation)}attachEvents(){const e=this.container;e&&(e.addEventListener("click",this.onClick,{passive:!1,capture:!1}),e.addEventListener("slideTo",this.onSlideTo)),window.addEventListener("resize",this.onResize)}createPages(){let e=[];const{contentDim:t,viewportDim:i}=this;let n=this.option("slidesPerPage");n=(n==="auto"||t<=i)&&this.option("fill")!==!1?1/0:parseFloat(n+"");let s=0,o=0,a=0;for(const l of this.slides)(!e.length||o+l.dim-i>.05||a>=n)&&(e.push(At()),s=e.length-1,o=0,a=0),e[s].slides.push(l),o+=l.dim+l.gap,a++;return e}processPages(){const e=this.pages,{contentDim:t,viewportDim:i,isInfinite:n}=this,s=this.option("center"),o=this.option("fill"),a=o&&s&&t>i&&!n;if(e.forEach((h,d)=>{var u;h.index=d,h.pos=((u=h.slides[0])===null||u===void 0?void 0:u.pos)||0,h.dim=0;for(const[f,p]of h.slides.entries())h.dim+=p.dim,f<h.slides.length-1&&(h.dim+=p.gap);a&&h.pos+.5*h.dim<.5*i?h.pos=0:a&&h.pos+.5*h.dim>=t-.5*i?h.pos=t-i:s&&(h.pos+=-.5*(i-h.dim))}),e.forEach((h,d)=>{o&&!n&&t>i&&(h.pos=Math.max(h.pos,0),h.pos=Math.min(h.pos,t-i)),h.pos=b(h.pos,1e3),h.dim=b(h.dim,1e3),Math.abs(h.pos)<=.1&&(h.pos=0)}),n)return e;const l=[];let r;return e.forEach(h=>{const d=Object.assign({},h);r&&d.pos===r.pos?(r.dim+=d.dim,r.slides=[...r.slides,...d.slides]):(d.index=l.length,r=d,l.push(d))}),l}getPageFromIndex(e=0){const t=this.pages.length;let i;return e=parseInt((e||0).toString())||0,i=this.isInfinite?(e%t+t)%t:Math.max(Math.min(e,t-1),0),i}getSlideMetrics(e){var t,i;const n=this.isHorizontal?"width":"height";let s=0,o=0,a=e.el;const l=a&&!a.parentNode;if(a?s=parseFloat(a.dataset[n]||"")||0:(a=document.createElement("div"),a.style.visibility="hidden",(this.track||document.body).prepend(a)),w(a,this.cn(ge)+" "+e.class+" "+e.customClass),s)a.style[n]=`${s}px`,a.style[n==="width"?"height":"width"]="";else{l&&(this.track||document.body).prepend(a);const h=Math.max(1,((t=window.visualViewport)===null||t===void 0?void 0:t.scale)||1);s=a.getBoundingClientRect()[n]*h}const r=getComputedStyle(a);return r.boxSizing==="content-box"&&(this.isHorizontal?(s+=parseFloat(r.paddingLeft)||0,s+=parseFloat(r.paddingRight)||0):(s+=parseFloat(r.paddingTop)||0,s+=parseFloat(r.paddingBottom)||0)),o=parseFloat(r[this.isHorizontal?"marginRight":"marginBottom"])||0,l?(i=a.parentElement)===null||i===void 0||i.removeChild(a):e.el||a.remove(),{dim:b(s,1e3),gap:b(o,1e3)}}getBounds(){const{isInfinite:e,isRTL:t,isHorizontal:i,pages:n}=this;let s={min:0,max:0};if(e)s={min:-1/0,max:1/0};else if(n.length){const o=n[0].pos,a=n[n.length-1].pos;s=t&&i?{min:o,max:a}:{min:-1*a,max:-1*o}}return{x:i?s:{min:0,max:0},y:i?{min:0,max:0}:s}}repositionSlides(){let e,{isHorizontal:t,isRTL:i,isInfinite:n,viewport:s,viewportDim:o,contentDim:a,page:l,pages:r,slides:h,panzoom:d}=this,u=0,f=0,p=0,g=0;d?g=-1*d.current[this.axis]:r[l]&&(g=r[l].pos||0),e=t?i?"right":"left":"top",i&&t&&(g*=-1);for(const x of h){const S=x.el;
1S?(e==="top"?(S.style.right="",S.style.left=""):S.style.top="",x.index!==u?S.style[e]=f===0?"":`${b(f,1e3)}px`:S.style[e]="",p+=x.dim+x.gap,u++):f+=x.dim+x.gap}if(n&&p&&s){let x=getComputedStyle(s),S="padding",N=t?"Right":"Bottom",q=parseFloat(x[S+(t?"Left":"Top")]);g-=q,o+=q,o+=parseFloat(x[S+N]);for(const C of h)C.el&&(b(C.pos)<b(o)&&b(C.pos+C.dim+C.gap)<b(g)&&b(g)>b(a-o)&&(C.el.style[e]=`${b(f+p,1e3)}px`),b(C.pos+C.gap)>=b(a-o)&&b(C.pos)>b(g+o)&&b(g)<b(o)&&(C.el.style[e]=`-${b(p,1e3)}px`))}let m,v,y=[...this.inTransition];if(y.length>1&&(m=r[y[0]],v=r[y[1]]),m&&v){let x=0;for(const S of h)S.el?this.inTransition.has(S.index)&&m.slides.indexOf(S)<0&&(S.el.style[e]=`${b(x+(m.pos-v.pos),1e3)}px`):x+=S.dim+S.gap}}createSlideEl(e){const{track:t,slides:i}=this;if(!t||!e||e.el&&e.el.parentNode)return;const n=e.el||document.createElement("div");w(n,this.cn(ge)),w(n,e.class),w(n,e.customClass);const s=e.html;s&&(s instanceof HTMLElement?n.appendChild(s):n.innerHTML=e.html+"");const o=[];i.forEach((h,d)=>{h.el&&o.push(d)});const a=e.index;let l=null;o.length&&(l=i[o.reduce((h,d)=>Math.abs(d-a)<Math.abs(h-a)?d:h)]);const r=l&&l.el&&l.el.parentNode?l.index<e.index?l.el.nextSibling:l.el:null;t.insertBefore(n,t.contains(r)?r:null),e.el=n,this.emit("createSlide",e)}removeSlideEl(e,t=!1){const i=e.el;if(!i||!i.parentNode)return;const n=this.cn(Ge);if(i.classList.contains(n)&&(T(i,n),this.emit("unselectSlide",e)),e.isDom&&!t)return i.removeAttribute("aria-hidden"),i.removeAttribute("data-index"),void(i.style.left="");this.emit("removeSlide",e);const s=new CustomEvent(pe);i.dispatchEvent(s),e.el&&(e.el.remove(),e.el=null)}transitionTo(e=0,t=this.option("transition")){var i,n,s,o;if(!t)return!1;const a=this.page,{pages:l,panzoom:r}=this;e=parseInt((e||0).toString())||0;const h=this.getPageFromIndex(e);if(!r||!l[h]||l.length<2||Math.abs((((n=(i=l[a])===null||i===void 0?void 0:i.slides[0])===null||n===void 0?void 0:n.dim)||0)-this.viewportDim)>1)return!1;const d=e>a?1:-1,u=l[h].pos*(this.isRTL?1:-1);if(a===h&&Math.abs(u-r.target[this.axis])<1)return!1;this.clearTransitions();const f=r.isResting;w(this.container,this.cn("inTransition"));const p=((s=l[a])===null||s===void 0?void 0:s.slides[0])||null,g=((o=l[h])===null||o===void 0?void 0:o.slides[0])||null;this.inTransition.add(g.index),this.createSlideEl(g);let m=p.el,v=g.el;f||t===ge||(t="fadeFast",m=null);const y=this.isRTL?"next":"prev",x=this.isRTL?"prev":"next";return m&&(this.inTransition.add(p.index),p.transition=t,m.addEventListener(pe,this.onAnimationEnd),m.classList.add(`f-${t}Out`,`to-${d>0?x:y}`)),v&&(g.transition=t,v.addEventListener(pe,this.onAnimationEnd),v.classList.add(`f-${t}In`,`from-${d>0?y:x}`)),r.current[this.axis]=u,r.target[this.axis]=u,r.requestTick(),this.onChange(h),!0}manageSlideVisiblity(){const e=new Set,t=new Set,i=this.getVisibleSlides(parseFloat(this.option("preload",0)+"")||0);for(const n of this.slides)i.has(n)?e.add(n):t.add(n);for(const n of this.inTransition)e.add(this.slides[n]);for(const n of e)this.createSlideEl(n),this.lazyLoadSlide(n);for(const n of t)e.has(n)||this.removeSlideEl(n);this.markSelectedSlides(),this.repositionSlides()}markSelectedSlides(){if(!this.pages[this.page]||!this.pages[this.page].slides)return;const e="aria-hidden";let t=this.cn(Ge);if(t)for(const i of this.slides){const n=i.el;n&&(n.dataset.index=`${i.index}`,n.classList.contains("f-thumbs__slide")?this.getVisibleSlides(0).has(i)?n.removeAttribute(e):n.setAttribute(e,"true"):this.pages[this.page].slides.includes(i)?(n.classList.contains(t)||(w(n,t),this.emit("selectSlide",i)),n.removeAttribute(e)):(n.classList.contains(t)&&(T(n,t),this.emit("unselectSlide",i)),n.setAttribute(e,"true")))}}flipInfiniteTrack(){const e=this.panzoom;if(!e||!this.isInfinite)return;const t=this.option("axis")==="x"?"e":"f",{viewportDim:i,contentDim:n}=this;let s=e.current[t],o=e.target[t]-s,a=0,l=.5*i,r=n;this.isRTL&&this.isHorizontal?(s<-l&&(a=-1,s+=r),s>r-l&&(a=1,s-=r)):(s>l&&(a=1,s-=r),s<-r+l&&(a=-1,s+=r)),a&&(e.current[t]=s,e.target[t]=s+o)}lazyLoadSlide(e){const t=this,i=e&&e.el;if(!i)return;const n=new Set,s="f-fadeIn";i.querySelectorAll("[data-lazy-srcset]").forEach(l=>{l instanceof HTMLImageElement&&n.add(l)});let o=Array.from(i.querySelectorAll("[data-lazy-src]"));i.dataset.lazySrc&&o.push(i),o.map(l=>{l instanceof HTMLImageElement?n.add(l):L(l)&&(l.style.backgroundImage=`url('${l.dataset.lazySrc||""}')`,delete l.dataset.lazySrc)});const a=(l,r,h)=>{h&&(h.remove(),h=null),r.complete&&(r.classList.add(s),setTimeout(()=>{r.classList.remove(s)},350),r.style.visibility=""),this.option("adaptiveHeight")&&l.el&&this.pages[this.page].slides.indexOf(l)>
1-1&&(t.updateMetrics(),t.setViewportHeight()),this.emit("load",l)};for(const l of n){let r=null;l.src=l.dataset.lazySrcset||l.dataset.lazySrc||"",delete l.dataset.lazySrc,delete l.dataset.lazySrcset,l.style.visibility="hidden",l.addEventListener("error",()=>{a(e,l,r)}),l.addEventListener("load",()=>{a(e,l,r)}),setTimeout(()=>{l.parentNode&&e.el&&(l.complete?a(e,l,r):(r=H($e),l.parentNode.insertBefore(r,l)))},300)}}onAnimationEnd(e){var t;const i=e.target,n=i?parseInt(i.dataset.index||"",10)||0:-1,s=this.slides[n],o=e.animationName;if(!i||!s||!o)return;const a=!!this.inTransition.has(n)&&s.transition;a&&o.substring(0,a.length+2)===`f-${a}`&&this.inTransition.delete(n),this.inTransition.size||this.clearTransitions(),n===this.page&&(!((t=this.panzoom)===null||t===void 0)&&t.isResting)&&this.emit("settle")}onDecel(e,t=0,i=0,n=0,s=0){const{isRTL:o,isHorizontal:a,axis:l,pages:r}=this,h=r.length,d=Math.abs(Math.atan2(i,t)/(Math.PI/180));let u=0;if(u=d>45&&d<135?a?0:i:a?t:0,!h)return;const f=this.option("dragFree");let p=this.page,g=o&&a?1:-1;const m=e.target[l]*g,v=e.current[l]*g;let{pageIndex:y}=this.getPageFromPosition(m),{pageIndex:x}=this.getPageFromPosition(v);f?this.onChange(y):(Math.abs(u)>5?(r[p].dim<document.documentElement["client"+(this.isHorizontal?"Width":"Height")]-1&&(p=x),p=o&&a?u<0?p-1:p+1:u<0?p+1:p-1):p=n===0&&s===0?p:x,this.slideTo(p,{transition:!1,friction:e.option("decelFriction")}))}onClick(e){const t=e.target,i=t&&L(t)?t.dataset:null;let n,s;i&&(i.carouselPage!==void 0?(s="slideTo",n=i.carouselPage):i.carouselNext!==void 0?s="slideNext":i.carouselPrev!==void 0&&(s="slidePrev")),s?(e.preventDefault(),e.stopPropagation(),t&&!t.hasAttribute("disabled")&&this[s](n)):this.emit("click",e)}onSlideTo(e){const t=e.detail||0;this.slideTo(this.getPageForSlide(t),{friction:0})}onChange(e,t=0){const i=this.page;this.prevPage=i,this.page=e,this.option("adaptiveHeight")&&this.setViewportHeight(),e!==i&&(this.markSelectedSlides(),this.emit("change",e,i,t))}onRefresh(){let e=this.contentDim,t=this.viewportDim;this.updateMetrics(),this.contentDim===e&&this.viewportDim===t||this.slideTo(this.page,{friction:0,transition:!1})}onScroll(){var e;(e=this.viewport)===null||e===void 0||e.scroll(0,0)}onResize(){this.option("breakpoints")&&this.processOptions()}onBeforeTransform(e){this.lp!==e.current[this.axis]&&(this.flipInfiniteTrack(),this.manageSlideVisiblity()),this.lp=e.current.e}onEndAnimation(){this.inTransition.size||this.emit("settle")}reInit(e=null,t=null){this.destroy(),this.state=M.Init,this.userOptions=e||this.userOptions,this.userPlugins=t||this.userPlugins,this.processOptions()}slideTo(e=0,{friction:t=this.option("friction"),transition:i=this.option("transition")}={}){if(this.state===M.Destroy)return;e=parseInt((e||0).toString())||0;const n=this.getPageFromIndex(e),{axis:s,isHorizontal:o,isRTL:a,pages:l,panzoom:r}=this,h=l.length,d=a&&o?1:-1;if(!r||!h)return;if(this.page!==n){const f=new Event("beforeChange",{bubbles:!0,cancelable:!0});if(this.emit("beforeChange",f,e),f.defaultPrevented)return}if(this.transitionTo(e,i))return;let u=l[n].pos;if(this.isInfinite){const f=this.contentDim,p=r.target[s]*d;h===2?u+=f*Math.floor(parseFloat(e+"")/2):u=[u,u-f,u+f].reduce(function(g,m){return Math.abs(m-p)<Math.abs(g-p)?m:g})}u*=d,Math.abs(r.target[s]-u)<1||(r.panTo({x:o?u:0,y:o?0:u,friction:t}),this.onChange(n))}slideToClosest(e){if(this.panzoom){const{pageIndex:t}=this.getPageFromPosition(this.panzoom.current[this.isHorizontal?"e":"f"]);this.slideTo(t,e)}}slideNext(){this.slideTo(this.page+1)}slidePrev(){this.slideTo(this.page-1)}clearTransitions(){this.inTransition.clear(),T(this.container,this.cn("inTransition"));const e=["to-prev","to-next","from-prev","from-next"];for(const t of this.slides){const i=t.el;if(i){i.removeEventListener(pe,this.onAnimationEnd),i.classList.remove(...e);const n=t.transition;n&&i.classList.remove(`f-${n}Out`,`f-${n}In`)}}this.manageSlideVisiblity()}addSlide(e,t){var i,n,s,o;const a=this.panzoom,l=((i=this.pages[this.page])===null||i===void 0?void 0:i.pos)||0,r=((n=this.pages[this.page])===null||n===void 0?void 0:n.dim)||0,h=this.contentDim<this.viewportDim;let d=Array.isArray(t)?t:[t];const u=[];for(const f of d)u.push(Me(f));this.slides.splice(e,0,...u);for(let f=0;f<this.slides.length;f++)this.slides[f].index=f;
1for(const f of u)this.emit("beforeInitSlide",f,f.index);if(this.page>=e&&(this.page+=u.length),this.updateMetrics(),a){const f=((s=this.pages[this.page])===null||s===void 0?void 0:s.pos)||0,p=((o=this.pages[this.page])===null||o===void 0?void 0:o.dim)||0,g=this.pages.length||1,m=this.isRTL?r-p:p-r,v=this.isRTL?l-f:f-l;h&&g===1?(e<=this.page&&(a.current[this.axis]-=m,a.target[this.axis]-=m),a.panTo({[this.isHorizontal?"x":"y"]:-1*f})):v&&e<=this.page&&(a.target[this.axis]-=v,a.current[this.axis]-=v,a.requestTick())}for(const f of u)this.emit("initSlide",f,f.index)}prependSlide(e){this.addSlide(0,e)}appendSlide(e){this.addSlide(this.slides.length,e)}removeSlide(e){const t=this.slides.length;e=(e%t+t)%t,this.removeSlideEl(this.slides[e],!0),this.slides.splice(e,1);for(let i=0;i<this.slides.length;i++)this.slides[i].index=i;this.updateMetrics(),this.slideTo(this.page,{friction:0,transition:!1})}updateMetrics(){const{panzoom:e,viewport:t,track:i,slides:n,isHorizontal:s,isInfinite:o}=this;if(!i)return;const a=s?"width":"height",l=s?"offsetWidth":"offsetHeight";if(t){let d=Math.max(t[l],b(t.getBoundingClientRect()[a],1e3)),u=getComputedStyle(t),f="padding",p=s?"Right":"Bottom";d-=parseFloat(u[f+(s?"Left":"Top")])+parseFloat(u[f+p]),this.viewportDim=d}let r,h=0;for(const[d,u]of n.entries()){let f=0,p=0;!u.el&&r?(f=r.dim,p=r.gap):({dim:f,gap:p}=this.getSlideMetrics(u),r=u),f=b(f,1e3),p=b(p,1e3),u.dim=f,u.gap=p,u.pos=h,h+=f,(o||d<n.length-1)&&(h+=p)}h=b(h,1e3),this.contentDim=h,e&&(e.contentRect[a]=h,e.contentRect[this.axis==="e"?"fullWidth":"fullHeight"]=h),this.pages=this.createPages(),this.pages=this.processPages(),this.state===M.Init&&this.setInitialPage(),this.page=Math.max(0,Math.min(this.page,this.pages.length-1)),this.manageSlideVisiblity(),this.emit("refresh")}getProgress(e,t=!1,i=!1){e===void 0&&(e=this.page);const n=this,s=n.panzoom,o=n.contentDim,a=n.pages[e]||0;if(!a||!s)return e>this.page?-1:1;let l=-1*s.current.e,r=b((l-a.pos)/(1*a.dim),1e3),h=r,d=r;this.isInfinite&&i!==!0&&(h=b((l-a.pos+o)/(1*a.dim),1e3),d=b((l-a.pos-o)/(1*a.dim),1e3));let u=[r,h,d].reduce(function(f,p){return Math.abs(p)<Math.abs(f)?p:f});return t?u:u>1?1:u<-1?-1:u}setViewportHeight(){const{page:e,pages:t,viewport:i,isHorizontal:n}=this;if(!i||!t[e])return;let s=0;n&&this.track&&(this.track.style.height="auto",t[e].slides.forEach(o=>{o.el&&(s=Math.max(s,o.el.offsetHeight))})),i.style.height=s?`${s}px`:""}getPageForSlide(e){for(const t of this.pages)for(const i of t.slides)if(i.index===e)return t.index;return-1}getVisibleSlides(e=0){var t;const i=new Set;let{contentDim:n,viewportDim:s,pages:o,page:a}=this;n=n+((t=this.slides[this.slides.length-1])===null||t===void 0?void 0:t.gap)||0;let l=0;l=this.panzoom&&this.panzoom.state!==P.Init&&this.panzoom.state!==P.Destroy?-1*this.panzoom.current[this.axis]:o[a]&&o[a].pos||0,this.isInfinite&&(l-=Math.floor(l/n)*n),this.isRTL&&this.isHorizontal&&(l*=-1);const r=l-s*e,h=l+s*(e+1),d=this.isInfinite?[-1,0,1]:[0];for(const u of this.slides)for(const f of d){const p=u.pos+f*n,g=p+u.dim+u.gap;p<h&&g>r&&i.add(u)}return i}getPageFromPosition(e){var t;const{viewportDim:i,contentDim:n}=this,s=this.pages.length,o=this.slides.length,a=this.slides[o-1];let l=0,r=0,h=0;const d=this.option("center");d&&(e+=.5*i),this.isInfinite||(e=Math.max(((t=this.slides[0])===null||t===void 0?void 0:t.pos)||0,Math.min(e,a.pos)));const u=n+a.gap;h=Math.floor(e/u)||0,e-=h*u;let f=a,p=this.slides.find(g=>{const m=e+(f&&!d?.5*f.dim:0);return f=g,g.pos<=m&&g.pos+g.dim+g.gap>m});return p||(p=a),r=this.getPageForSlide(p.index),l=r+h*s,{page:l,pageIndex:r}}destroy(){if([M.Destroy].includes(this.state))return;this.state=M.Destroy;const{container:e,viewport:t,track:i,slides:n,panzoom:s}=this,o=this.option("classes");e.removeEventListener("click",this.onClick,{passive:!1,capture:!1}),e.removeEventListener("slideTo",this.onSlideTo),window.removeEventListener("resize",this.onResize),s&&(s.destroy(),this.panzoom=null),n&&n.forEach(l=>{this.removeSlideEl(l)}),this.detachPlugins(),t&&(t.removeEventListener("scroll",this.onScroll),t.offsetParent&&i&&i.offsetParent&&t.replaceWith(...i.childNodes));for(const[l,r]of Object.entries(o))l!=="container"&&r&&e.classList.remove(r);this.track=null,this.viewport=null,this.page=0,this.slides=[];const a=this.events.get("ready");this.events=new Map,a&&this.events.set("ready",a)}}Object.defineProperty(K,"Panzoom",{enumerable:!0,configurable:!0,writable:!0,value:J}),Object.defineProperty(K,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:Ot}),Object.defineProperty(K,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:zt});const gt=function(c){if(!L(c))return 0;const e=window.scrollY,t=window.innerHeight,i=e+t,n=c.getBoundingClientRect(),s=n.y+e,o=n.height,a=s+o;if(e>a||i<s)return 0;if(e<s&&i>a||s<e&&a>i)return 100;let l=o;s<e&&(l-=e-s),a>i&&(l-=a-i);const r=l/t*100;return Math.round(r)},ce=!(typeof window>"u"||!window.document||!window.document.createElement);let Oe;const Ae=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden]):not(.fancybox-focus-guard)","iframe","object","embed","video","audio","[contenteditable]",'[tabindex]:not
1([tabindex^="-"]):not([disabled]):not([aria-hidden])'].join(","),Ke=c=>{if(c&&ce){Oe===void 0&&document.createElement("div").focus({get preventScroll(){return Oe=!0,!1}});try{if(Oe)c.focus({preventScroll:!0});else{const e=window.scrollY||document.body.scrollTop,t=window.scrollX||document.body.scrollLeft;c.focus(),document.body.scrollTo({top:e,left:t,behavior:"auto"})}}catch{}}},Be={dragToClose:!0,hideScrollbar:!0,Carousel:{classes:{container:"fancybox__carousel",viewport:"fancybox__viewport",track:"fancybox__track",slide:"fancybox__slide"}},contentClick:"toggleZoom",contentDblClick:!1,backdropClick:"close",animated:!0,idle:3500,showClass:"f-zoomInUp",hideClass:"f-fadeOut",commonCaption:!1,parentEl:null,startIndex:0,l10n:Object.assign(Object.assign({},dt),{CLOSE:"Close",NEXT:"Next",PREV:"Previous",MODAL:"You can close this modal content with the ESC key",ERROR:"Something Went Wrong, Please Try Again Later",IMAGE_ERROR:"Image Not Found",ELEMENT_NOT_FOUND:"HTML Element Not Found",AJAX_NOT_FOUND:"Error Loading AJAX : Not Found",AJAX_FORBIDDEN:"Error Loading AJAX : Forbidden",IFRAME_ERROR:"Error Loading Page",TOGGLE_ZOOM:"Toggle zoom level",TOGGLE_THUMBS:"Toggle thumbnails",TOGGLE_SLIDESHOW:"Toggle slideshow",TOGGLE_FULLSCREEN:"Toggle full-screen mode",DOWNLOAD:"Download"}),tpl:{closeButton:'<button data-fancybox-close class="f-button is-close-btn" title="{{CLOSE}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" tabindex="-1"><path d="M20 20L4 4m16 0L4 20"/></svg></button>',main:`<div class="fancybox__container" role="dialog" aria-modal="true" aria-label="{{MODAL}}" tabindex="-1">
2    <div class="fancybox__backdrop"></div>
3    <div class="fancybox__carousel"></div>
4    <div class="fancybox__footer"></div>
5  </div>`},groupAll:!1,groupAttr:"data-fancybox",defaultType:"image",defaultDisplay:"block",autoFocus:!0,trapFocus:!0,placeFocusBack:!0,closeButton:"auto",keyboard:{Escape:"close",Delete:"close",Backspace:"close",PageUp:"next",PageDown:"prev",ArrowUp:"prev",ArrowDown:"next",ArrowRight:"next",ArrowLeft:"prev"},Fullscreen:{autoStart:!1},compact:()=>window.matchMedia("(max-width: 578px), (max-height: 578px)").matches,wheel:"zoom"};var O,A;(function(c){c[c.Init=0]="Init",c[c.Ready=1]="Ready",c[c.Closing=2]="Closing",c[c.CustomClosing=3]="CustomClosing",c[c.Destroy=4]="Destroy"})(O||(O={})),function(c){c[c.Loading=0]="Loading",c[c.Opening=1]="Opening",c[c.Ready=2]="Ready",c[c.Closing=3]="Closing"}(A||(A={}));const mt=()=>{queueMicrotask(()=>{(()=>{const{slug:c,index:e}=I.parseURL(),t=E.getInstance();if(t&&t.option("Hash")!==!1){const i=t.carousel;if(c&&i){for(let o of i.slides)if(o.slug&&o.slug===c)return i.slideTo(o.index);if(c===t.option("slug"))return i.slideTo(e-1);const n=t.getSlide(),s=n&&n.triggerEl&&n.triggerEl.dataset;if(s&&s.fancybox===c)return i.slideTo(e-1)}I.hasSilentClose=!0,t.close()}I.startFromUrl()})()})};class I extends D{constructor(){super(...arguments),Object.defineProperty(this,"origHash",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(this,"timer",{enumerable:!0,configurable:!0,writable:!0,value:null})}onChange(){const e=this.instance,t=e.carousel;this.timer&&clearTimeout(this.timer);const i=e.getSlide();if(!t||!i)return;const n=e.isOpeningSlide(i),s=new URL(document.URL).hash;let o,a=i.slug||void 0,l=i.triggerEl||void 0;o=a||this.instance.option("slug"),!o&&l&&l.dataset&&(o=l.dataset.fancybox);let r="";o&&o!=="true"&&(r="#"+o+(!a&&t.slides.length>1?"-"+(i.index+1):"")),n&&(this.origHash=s!==r?s:""),r&&s!==r&&(this.timer=setTimeout(()=>{try{e.state===O.Ready&&window.history[n?"pushState":"replaceState"]({},document.title,window.location.pathname+window.location.search+r)}catch{}},300))}onClose(){if(this.timer&&clearTimeout(this.timer),I.hasSilentClose!==!0)try{window.history.replaceState({},document.title,window.location.pathname+window.location.search+(this.origHash||""))}catch{}}attach(){const e=this.instance;e.on(["Carousel.ready","Carousel.change"],this.onChange),e.on("close",this.onClose)}detach(){const e=this.instance;e.off(["Carousel.ready","Carousel.change"],this.onChange),e.off("close",this.onClose)}static parseURL(){const e=window.location.hash.slice(1),t=e.split("-"),i=t[t.length-1],n=i&&/^\+?\d+$/.test(i)&&parseInt(t.pop()||"1",10)||1;return{hash:e,slug:t.join("-"),index:n}}static startFromUrl(){if(I.hasSilentClose=!1,E.getInstance()||E.defaults.Hash===!1)return;const{hash:e,slug:t,index:i}=I.parseURL();if(!t)return;let n=document.querySelector(`[data-slug="${e}"]`);if(n&&n.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0})),E.getInstance())return;const s=document.querySelectorAll(`[data-fancybox="${t}"]`);s.length&&(n=s[i-1],n&&n.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0})))}static destroy(){window.removeEventListener("hashchange",mt,!1)}}function Je(){window.addEventListener("hashchange",mt,!1),setTimeout(()=>{I.startFromUrl()},500)}Object.defineProperty(I,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(I,"hasSilentClose",{enumerable:!0,configurable:!0,writable:!0,value:!1}),ce&&(/complete|interactive|loaded/.test(document.readyState)?Je():document.addEventListener("DOMContentLoaded",Je));const me="is-zooming-in";class vt extends D{onCreateSlide(e,t,i){const n=this.instance.optionFor(i,"src")||"";i.el&&i.type==="image"&&typeof n=="string"&&this.setImage(i,n)}onRemoveSlide(e,t,i){i.panzoom&&i.panzoom.destroy(),i.panzoom=void 0,i.imageEl=void 0}onChange(e,t,i,n){T(this.instance.container,me);for(const s of t.slides){const o=s.panzoom;o&&s.index!==i&&o.reset(.35)}}onClose(){var e;const t=this.instance,i=t.container,n=t.getSlide();if(!i||!i.parentElement||!n)return;const{el:s,contentEl:o,panzoom:a,thumbElSrc:l}=n;
5if(!s||!l||!o||!a||a.isContentLoading||a.state===P.Init||a.state===P.Destroy)return;a.updateMetrics();let r=this.getZoomInfo(n);if(!r)return;this.instance.state=O.CustomClosing,i.classList.remove(me),i.classList.add("is-zooming-out"),o.style.backgroundImage=`url('${l}')`;const h=i.getBoundingClientRect();(((e=window.visualViewport)===null||e===void 0?void 0:e.scale)||1)===1&&Object.assign(i.style,{position:"absolute",top:`${window.scrollY}px`,left:`${window.scrollX}px`,bottom:"auto",right:"auto",width:`${h.width}px`,height:`${h.height}px`,overflow:"hidden"});const{x:d,y:u,scale:f,opacity:p}=r;if(p){const g=((m,v,y,x)=>{const S=v-m,N=x-y;return q=>y+((q-m)/S*N||0)})(a.scale,f,1,0);a.on("afterTransform",()=>{o.style.opacity=g(a.scale)+""})}a.on("endAnimation",()=>{t.destroy()}),a.target.a=f,a.target.b=0,a.target.c=0,a.target.d=f,a.panTo({x:d,y:u,scale:f,friction:p?.2:.33,ignoreBounds:!0}),a.isResting&&t.destroy()}setImage(e,t){const i=this.instance;e.src=t,this.process(e,t).then(n=>{const{contentEl:s,imageEl:o,thumbElSrc:a,el:l}=e;if(i.isClosing()||!s||!o)return;s.offsetHeight;const r=!!i.isOpeningSlide(e)&&this.getZoomInfo(e);if(this.option("protected")&&l){l.addEventListener("contextmenu",u=>{u.preventDefault()});const d=document.createElement("div");w(d,"fancybox-protected"),s.appendChild(d)}if(a&&r){const d=n.contentRect,u=Math.max(d.fullWidth,d.fullHeight);let f=null;!r.opacity&&u>1200&&(f=document.createElement("img"),w(f,"fancybox-ghost"),f.src=a,s.appendChild(f));const p=()=>{f&&(w(f,"f-fadeFastOut"),setTimeout(()=>{f&&(f.remove(),f=null)},200))};(h=a,new Promise((g,m)=>{const v=new Image;v.onload=g,v.onerror=m,v.src=h})).then(()=>{i.hideLoading(e),e.state=A.Opening,this.instance.emit("reveal",e),this.zoomIn(e).then(()=>{p(),this.instance.done(e)},()=>{}),f&&setTimeout(()=>{p()},u>2500?800:200)},()=>{i.hideLoading(e),i.revealContent(e)})}else{const d=this.optionFor(e,"initialSize"),u=this.optionFor(e,"zoom"),f={event:i.prevMouseMoveEvent||i.options.event,friction:u?.12:0};let p=i.optionFor(e,"showClass")||void 0,g=!0;i.isOpeningSlide(e)&&(d==="full"?n.zoomToFull(f):d==="cover"?n.zoomToCover(f):d==="max"?n.zoomToMax(f):g=!1,n.stop("current")),g&&p&&(p=n.isDragging?"f-fadeIn":""),i.hideLoading(e),i.revealContent(e,p)}var h},()=>{i.setError(e,"{{IMAGE_ERROR}}")})}process(e,t){return new Promise((i,n)=>{var s;const o=this.instance,a=e.el;o.clearContent(e),o.showLoading(e);let l=this.optionFor(e,"content");if(typeof l=="string"&&(l=H(l)),!l||!L(l)){if(l=document.createElement("img"),l instanceof HTMLImageElement){let r="",h=e.caption;r=typeof h=="string"&&h?h.replace(/<[^>]+>/gi,"").substring(0,1e3):`Image ${e.index+1} of ${(s=o.carousel)===null||s===void 0?void 0:s.pages.length}`,l.src=t||"",l.alt=r,l.draggable=!1,e.srcset&&l.setAttribute("srcset",e.srcset),this.instance.isOpeningSlide(e)&&(l.fetchPriority="high")}e.sizes&&l.setAttribute("sizes",e.sizes)}w(l,"fancybox-image"),e.imageEl=l,o.setContent(e,l,!1),e.panzoom=new J(a,z({transformParent:!0},this.option("Panzoom")||{},{content:l,width:o.optionFor(e,"width","auto"),height:o.optionFor(e,"height","auto"),wheel:()=>{const r=o.option("wheel");return(r==="zoom"||r=="pan")&&r},click:(r,h)=>{var d,u;if(o.isCompact||o.isClosing()||e.index!==((d=o.getSlide())===null||d===void 0?void 0:d.index))return!1;if(h){const p=h.composedPath()[0];if(["A","BUTTON","TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].includes(p.nodeName))return!1}let f=!h||h.target&&((u=e.contentEl)===null||u===void 0?void 0:u.contains(h.target));return o.option(f?"contentClick":"backdropClick")||!1},dblClick:()=>o.isCompact?"toggleZoom":o.option("contentDblClick")||!1,spinner:!1,panOnlyZoomed:!0,wheelLimit:1/0,on:{ready:r=>{i(r)},error:()=>{n()},destroy:()=>{n()}}}))})}zoomIn(e){return new Promise((t,i)=>{const n=this.instance,s=n.container,{panzoom:o,contentEl:a,el:l}=e;o&&o.updateMetrics();const r=this.getZoomInfo(e);if(!(r&&l&&a&&o&&s))return void i();const{x:h,y:d,scale:u,opacity:f}=r,p=()=>{e.state!==A.Closing&&(f&&(a.style.opacity=Math.max(Math.min(1,1-(1-o.scale)/(1-u)),0)+""),o.scale>=1&&o.scale>o.targetScale-.1&&t(o))},g=y=>{(y.scale<.99||y.scale>1.01)&&!y.isDragging||(T(s,me),a.style.opacity="",y.off("endAnimation",g),y.off("touchStart",g),y.off("afterTransform",p),t(y))};o.on("endAnimation",g),o.on("touchStart",g),o.on("afterTransform",p),o.on(["error","destroy"],()=>{i()}
5),o.panTo({x:h,y:d,scale:u,friction:0,ignoreBounds:!0}),o.stop("current");const m={event:o.panMode==="mousemove"?n.prevMouseMoveEvent||n.options.event:void 0},v=this.optionFor(e,"initialSize");w(s,me),n.hideLoading(e),v==="full"?o.zoomToFull(m):v==="cover"?o.zoomToCover(m):v==="max"?o.zoomToMax(m):o.reset(.172)})}getZoomInfo(e){var t;const{el:i,imageEl:n,thumbEl:s,panzoom:o}=e;if(!i||!n||!s||!o||gt(s)<3||!this.optionFor(e,"zoom")||this.instance.state===O.Destroy||(((t=window.visualViewport)===null||t===void 0?void 0:t.scale)||1)!==1)return!1;let{top:a,left:l,width:r,height:h}=s.getBoundingClientRect(),{top:d,left:u,fitWidth:f,fitHeight:p}=o.contentRect;if(!(r&&h&&f&&p))return!1;const g=o.container.getBoundingClientRect();u+=g.left,d+=g.top;const m=-1*(u+.5*f-(l+.5*r)),v=-1*(d+.5*p-(a+.5*h)),y=r/f;let x=this.option("zoomOpacity")||!1;return x==="auto"&&(x=Math.abs(r/h-f/p)>.1),{x:m,y:v,scale:y,opacity:x}}attach(){const e=this,t=e.instance;t.on("Carousel.change",e.onChange),t.on("Carousel.createSlide",e.onCreateSlide),t.on("Carousel.removeSlide",e.onRemoveSlide),t.on("close",e.onClose)}detach(){const e=this,t=e.instance;t.off("Carousel.change",e.onChange),t.off("Carousel.createSlide",e.onCreateSlide),t.off("Carousel.removeSlide",e.onRemoveSlide),t.off("close",e.onClose)}}Object.defineProperty(vt,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{initialSize:"fit",Panzoom:{maxScale:1},protected:!1,zoom:!0,zoomOpacity:"auto"}}),typeof SuppressedError=="function"&&SuppressedError;const Le="html",Qe="image",ze="map",W="youtube",V="vimeo",ae="html5video",et=(c,e={})=>{const t=new URL(c),i=new URLSearchParams(t.search),n=new URLSearchParams;for(const[a,l]of[...i,...Object.entries(e)]){let r=l.toString();a==="t"?n.set("start",parseInt(r).toString()):n.set(a,r)}let s=n.toString(),o=c.match(/#t=((.*)?\d+s)/);return o&&(s+=`#t=${o[1]}`),s},kt={ajax:null,autoSize:!0,iframeAttr:{allow:"autoplay; fullscreen",scrolling:"auto"},preload:!0,videoAutoplay:!0,videoRatio:16/9,videoTpl:`<video class="fancybox__html5video" playsinline controls controlsList="nodownload" poster="{{poster}}">
6  <source src="{{src}}" type="{{format}}" />Sorry, your browser doesn't support embedded videos.</video>`,videoFormat:"",vimeo:{byline:1,color:"00adef",controls:1,dnt:1,muted:0},youtube:{controls:1,enablejsapi:1,nocookie:1,rel:0,fs:1}},Rt=["image","html","ajax","inline","clone","iframe","map","pdf","html5video","youtube","vimeo"];class bt extends D{onBeforeInitSlide(e,t,i){this.processType(i)}onCreateSlide(e,t,i){this.setContent(i)}onClearContent(e,t){t.xhr&&(t.xhr.abort(),t.xhr=null);const i=t.iframeEl;i&&(i.onload=i.onerror=null,i.src="//about:blank",t.iframeEl=null);const n=t.contentEl,s=t.placeholderEl;if(t.type==="inline"&&n&&s)n.classList.remove("fancybox__content"),n.style.display!=="none"&&(n.style.display="none"),s.parentNode&&s.parentNode.insertBefore(n,s),s.remove(),t.contentEl=void 0,t.placeholderEl=void 0;else for(;t.el&&t.el.firstChild;)t.el.removeChild(t.el.firstChild)}onSelectSlide(e,t,i){i.state===A.Ready&&this.playVideo()}onUnselectSlide(e,t,i){var n,s;if(i.type===ae){try{(s=(n=i.el)===null||n===void 0?void 0:n.querySelector("video"))===null||s===void 0||s.pause()}catch{}return}let o;i.type===V?o={method:"pause",value:"true"}:i.type===W&&(o={event:"command",func:"pauseVideo"}),o&&i.iframeEl&&i.iframeEl.contentWindow&&i.iframeEl.contentWindow.postMessage(JSON.stringify(o),"*"),i.poller&&clearTimeout(i.poller)}onDone(e,t){e.isCurrentSlide(t)&&!e.isClosing()&&this.playVideo()}onRefresh(e,t){t.slides.forEach(i=>{i.el&&(this.resizeIframe(i),this.setAspectRatio(i))})}onMessage(e){try{let t=JSON.parse(e.data);if(e.origin==="https://player.vimeo.com"){if(t.event==="ready")for(let i of Array.from(document.getElementsByClassName("fancybox__iframe")))i instanceof HTMLIFrameElement&&i.contentWindow===e.source&&(i.dataset.ready="true")}else if(e.origin.match(/^https:\/\/(www.)?youtube(-nocookie)?.com$/)&&t.event==="onReady"){const i=document.getElementById(t.id);i&&(i.dataset.ready="true")}}catch{}}loadAjaxContent(e){const t=this.instance.optionFor(e,"src")||"";this.instance.showLoading(e);const i=this.instance,n=new XMLHttpRequest;i.showLoading(e),n.onreadystatechange=function(){n.readyState===XMLHttpRequest.DONE&&i.state===O.Ready&&(i.hideLoading(e),n.status===200?i.setContent(e,n.responseText):i.setError(e,n.status===404?"{{AJAX_NOT_FOUND}}":"{{AJAX_FORBIDDEN}}"))};const s=e.ajax||null;n.open(s?"POST":"GET",t+""),n.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),n.setRequestHeader("X-Requested-With","XMLHttpRequest"),n.send(s),e.xhr=n}setInlineContent(e){let t=null;if(L(e.src))t=e.src;else if(typeof e.src=="string"){const i=e.src.split("#",2).pop();t=i?document.getElementById(i):null}if(t){if(e.type==="clone"||t.closest(".fancybox__slide")){t=t.cloneNode(!0);const i=t.dataset.animationName;i&&(t.classList.remove(i),delete t.dataset.animationName);let n=t.getAttribute("id");n=n?`${n}--clone`:`clone-${this.instance.id}-${e.index}`,t.setAttribute("id",n)}else if(t.parentNode){const i=document.createElement("div");i.classList.add("fancybox-placeholder"),t.parentNode.insertBefore(i,t),e.placeholderEl=i}this.instance.setContent(e,t)}else this.instance.setError(e,"{{ELEMENT_NOT_FOUND}}")}setIframeContent(e){const{src:t,el:i}=e;if(!t||typeof t!="string"||!i)return;i.classList.add("is-loading");const n=this.instance,s=document.createElement("iframe");s.className="fancybox__iframe",s.setAttribute("id",`fancybox__iframe_${n.id}_${e.index}`);for(const[a,l]of Object.entries(this.optionFor(e,"iframeAttr")||{}))s.setAttribute(a,l);s.onerror=()=>{n.setError(e,"{{IFRAME_ERROR}}")},e.iframeEl=s;const o=this.optionFor(e,"preload");if(e.type!=="iframe"||o===!1)return s.setAttribute("src",e.src+""),n.setContent(e,s,!1),this.resizeIframe(e),void n.revealContent(e);n.showLoading(e),s.onload=()=>
6{if(!s.src.length)return;const a=s.dataset.ready!=="true";s.dataset.ready="true",this.resizeIframe(e),a?n.revealContent(e):n.hideLoading(e)},s.setAttribute("src",t),n.setContent(e,s,!1)}resizeIframe(e){const{type:t,iframeEl:i}=e;if(t===W||t===V)return;const n=i==null?void 0:i.parentElement;if(!i||!n)return;let s=e.autoSize;s===void 0&&(s=this.optionFor(e,"autoSize"));let o=e.width||0,a=e.height||0;o&&a&&(s=!1);const l=n&&n.style;if(e.preload!==!1&&s!==!1&&l)try{const r=window.getComputedStyle(n),h=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),d=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom),u=i.contentWindow;if(u){const f=u.document,p=f.getElementsByTagName(Le)[0],g=f.body;l.width="",g.style.overflow="hidden",o=o||p.scrollWidth+h,l.width=`${o}px`,g.style.overflow="",l.flex="0 0 auto",l.height=`${g.scrollHeight}px`,a=p.scrollHeight+d}}catch{}if(o||a){const r={flex:"0 1 auto",width:"",height:""};o&&o!=="auto"&&(r.width=`${o}px`),a&&a!=="auto"&&(r.height=`${a}px`),Object.assign(l,r)}}playVideo(){const e=this.instance.getSlide();if(!e)return;const{el:t}=e;if(!t||!t.offsetParent||!this.optionFor(e,"videoAutoplay"))return;if(e.type===ae)try{const n=t.querySelector("video");if(n){const s=n.play();s!==void 0&&s.then(()=>{}).catch(o=>{n.muted=!0,n.play()})}}catch{}if(e.type!==W&&e.type!==V)return;const i=()=>{if(e.iframeEl&&e.iframeEl.contentWindow){let n;if(e.iframeEl.dataset.ready==="true")return n=e.type===W?{event:"command",func:"playVideo"}:{method:"play",value:"true"},n&&e.iframeEl.contentWindow.postMessage(JSON.stringify(n),"*"),void(e.poller=void 0);e.type===W&&(n={event:"listening",id:e.iframeEl.getAttribute("id")},e.iframeEl.contentWindow.postMessage(JSON.stringify(n),"*"))}e.poller=setTimeout(i,250)};i()}processType(e){if(e.html)return e.type=Le,e.src=e.html,void(e.html="");const t=this.instance.optionFor(e,"src","");if(!t||typeof t!="string")return;let i=e.type,n=null;if(n=t.match(/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(?:watch\?(?:.*&)?v=|v\/|u\/|shorts\/|embed\/?)?(videoseries\?list=(?:.*)|[\w-]{11}|\?listType=(?:.*)&list=(?:.*))(?:.*)/i)){const s=this.optionFor(e,W),{nocookie:o}=s,a=function(d,u){var f={};for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&u.indexOf(p)<0&&(f[p]=d[p]);if(d!=null&&typeof Object.getOwnPropertySymbols=="function"){var g=0;for(p=Object.getOwnPropertySymbols(d);g<p.length;g++)u.indexOf(p[g])<0&&Object.prototype.propertyIsEnumerable.call(d,p[g])&&(f[p[g]]=d[p[g]])}return f}(s,["nocookie"]),l=`www.youtube${o?"-nocookie":""}.com`,r=et(t,a),h=encodeURIComponent(n[2]);e.videoId=h,e.src=`https://${l}/embed/${h}?${r}`,e.thumbSrc=e.thumbSrc||`https://i.ytimg.com/vi/${h}/mqdefault.jpg`,i=W}else if(n=t.match(/^.+vimeo.com\/(?:\/)?([\d]+)((\/|\?h=)([a-z0-9]+))?(.*)?/)){const s=et(t,this.optionFor(e,V)),o=encodeURIComponent(n[1]),a=n[4]||"";e.videoId=o,e.src=`https://player.vimeo.com/video/${o}?${a?`h=${a}${s?"&":""}`:""}${s}`,i=V}if(!i&&e.triggerEl){const s=e.triggerEl.dataset.type;Rt.includes(s)&&(i=s)}i||typeof t=="string"&&(t.charAt(0)==="#"?i="inline":(n=t.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i))?(i=ae,e.videoFormat=e.videoFormat||"video/"+(n[1]==="ogv"?"ogg":n[1])):t.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)?i=Qe:t.match(/\.(pdf)((\?|#).*)?$/i)&&(i="pdf")),(n=t.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:(?:(?:maps\/(?:place\/(?:.*)\/)?\@(.*),(\d+.?\d+?)z))|(?:\?ll=))(.*)?/i))?(e.src=`https://maps.google.${n[1]}/?ll=${(n[2]?n[2]+"&z="+Math.floor(parseFloat(n[3]))+(n[4]?n[4].replace(/^\//,"&"):""):n[4]+"").replace(/\?/,"&")}&output=${n[4]&&n[4].indexOf("layer=c")>0?"svembed":"embed"}`,i=ze):(n=t.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:maps\/search\/)(.*)/i))&&(e.src=`https://maps.google.${n[1]}/maps?q=${n[2].replace("query=","q=").replace("api=1","")}&output=embed`,i=ze),i=i||this.instance.option("defaultType"),e.type=i,i===Qe&&(e.thumbSrc=e.thumbSrc||e.src)}setContent(e){const t=this.instance.optionFor(e,"src")||"";if(e&&e.type&&t){switch(e.type){case Le:this.instance.setContent(e,t);break;case ae:const i=this.option("videoTpl");i&&this.instance.setContent(e,i.replace(/\{\{src\}\}/gi,t+"").replace(/\{\{format\}\}/gi,this.optionFor(e,"videoFormat")||"").replace(/\{\{poster\}\}/gi,e.poster||e.thumbSrc||""));break;case"inline":case"clone":this.setInlineContent(e);break;case"ajax":this.loadAjaxContent(e);break;case"pdf":case ze:case W:case V:e.preload=!1;case"iframe":this.setIframeContent(e)}this.setAspectRatio(e)}}setAspectRatio(e){const t=e.contentEl;if(!(e.el&&t&&e.type&&[W,V,ae].includes(e.type)))return;let i,n=e.width||"auto",s=e.height||"auto";if(n==="auto"||s==="auto"){i=this.optionFor(e,"videoRatio");const r=(i+"").match(/(\d+)\s*\/\s?(\d+)/);i=r&&r.length>2?parseFloat(r[1])/parseFloat(r[2]):parseFloat(i+"")}else n&&s&&(i=n/s);if(!i)return;t.style.aspectRatio="",t.style.width="",t.style.height="",t.offsetHeight;const o=t.getBoundingClientRect(),a=o.width||1,l=o.height||1;t.style.aspectRatio=i+"",i<a/l?(s=s==="auto"?l:Math.min(l,s),t.style.width="auto",t.style.height=`${s}px`):(n=n==="auto"?a:Math.min(a,n),t.style.width=`${n}px`,t.style.height="auto")}attach(){const e=this,t=e.instance;t.on("Carousel.beforeInitSlide",e.onBeforeInitSlide),t.on("Carousel.createSlide",e.onCreateSlide),t.on("Carousel.selectSlide",e.onSelectSlide),t.on("Carousel.unselectSlide",e.onUnselectSlide),t.on("Carousel.Panzoom.refresh",e.onRefresh),t.on("done",e.onDone),t.on("clearContent",e.onClearContent),window.addEventListener("message",e.onMessage)}detach(){const e=this,t=e.instance;t.off("Carousel.beforeInitSlide",e.onBeforeInitSlide),t.off("Carousel.createSlide",e.onCreateSlide),t.off("Carousel.selectSlide",e.onSelectSlide),t.off("Carousel.unselectSlide",e.onUnselectSlide),t.off("Carousel.Panzoom.refresh",e.onRefresh),t.off("done",e.onDone),t.off("clearContent",e.onClearContent),window.removeEventListener("message",e.onMessage)}}Object.defineProperty(bt,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:kt});const ve="play",be="pause",re="ready";class yt extends D{constructor(){super(...arguments),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:re}),Object.defineProperty(this,"inHover",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"timer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"progressBar",{enumerable:!0,configurable:!0,writable:!0,value:null})}get isActive(){return this.state!==re}onReady(e){this.option("autoStart")&&(e.isInfinite||e.page<e.pages.length-1)&&this.start()}onChange(){var e;!((e=this.instance.panzoom)===null||e===void 0)&&e.isResting||(this.removeProgressBar(),this.pause())}onSettle(){this.resume()}onVisibilityChange(){document.visibilityState==="visible"?this.resume():this.pause()}onMouseEnter(){this.inHover=!0,this.pause()}onMouseLeave(){var e;this.inHover=!1,!((e=this.instance.panzoom)===null||e===void 0)&&e.isResting&&this.resume()}onTimerEnd(){const e=this.instance;this.state==="play"&&(e.isInfinite||e.page!==e.pages.length-1?e.
6slideNext():e.slideTo(0))}removeProgressBar(){this.progressBar&&(this.progressBar.remove(),this.progressBar=null)}createProgressBar(){var e;if(!this.option("showProgress"))return null;this.removeProgressBar();const t=this.instance,i=((e=t.pages[t.page])===null||e===void 0?void 0:e.slides)||[];let n=this.option("progressParentEl");if(n||(n=(i.length===1?i[0].el:null)||t.viewport),!n)return null;const s=document.createElement("div");return w(s,"f-progress"),n.prepend(s),this.progressBar=s,s.offsetHeight,s}set(){const e=this,t=e.instance;if(t.pages.length<2||e.timer)return;const i=e.option("timeout");e.state=ve,w(t.container,"has-autoplay");let n=e.createProgressBar();n&&(n.style.transitionDuration=`${i}ms`,n.style.transform="scaleX(1)"),e.timer=setTimeout(()=>{e.timer=null,e.inHover||e.onTimerEnd()},i),e.emit("set")}clear(){const e=this;e.timer&&(clearTimeout(e.timer),e.timer=null),e.removeProgressBar()}start(){const e=this;if(e.set(),e.state!==re){if(e.option("pauseOnHover")){const t=e.instance.container;t.addEventListener("mouseenter",e.onMouseEnter,!1),t.addEventListener("mouseleave",e.onMouseLeave,!1)}document.addEventListener("visibilitychange",e.onVisibilityChange,!1),e.emit("start")}}stop(){const e=this,t=e.state,i=e.instance.container;e.clear(),e.state=re,i.removeEventListener("mouseenter",e.onMouseEnter,!1),i.removeEventListener("mouseleave",e.onMouseLeave,!1),document.removeEventListener("visibilitychange",e.onVisibilityChange,!1),T(i,"has-autoplay"),t!==re&&e.emit("stop")}pause(){const e=this;e.state===ve&&(e.state=be,e.clear(),e.emit(be))}resume(){const e=this,t=e.instance;if(t.isInfinite||t.page!==t.pages.length-1)if(e.state!==ve){if(e.state===be&&!e.inHover){const i=new Event("resume",{bubbles:!0,cancelable:!0});e.emit("resume",i),i.defaultPrevented||e.set()}}else e.set();else e.stop()}toggle(){this.state===ve||this.state===be?this.stop():this.start()}attach(){const e=this,t=e.instance;t.on("ready",e.onReady),t.on("Panzoom.startAnimation",e.onChange),t.on("Panzoom.endAnimation",e.onSettle),t.on("Panzoom.touchMove",e.onChange)}detach(){const e=this,t=e.instance;t.off("ready",e.onReady),t.off("Panzoom.startAnimation",e.onChange),t.off("Panzoom.endAnimation",e.onSettle),t.off("Panzoom.touchMove",e.onChange),e.stop()}}Object.defineProperty(yt,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{autoStart:!0,pauseOnHover:!0,progressParentEl:null,showProgress:!0,timeout:3e3}});class wt extends D{constructor(){super(...arguments),Object.defineProperty(this,"ref",{enumerable:!0,configurable:!0,writable:!0,value:null})}onPrepare(e){const t=e.carousel;if(!t)return;const i=e.container;i&&(t.options.Autoplay=z({autoStart:!1},this.option("Autoplay")||{},{pauseOnHover:!1,timeout:this.option("timeout"),progressParentEl:()=>this.option("progressParentEl")||null,on:{start:()=>{e.emit("startSlideshow")},set:n=>{var s;i.classList.add("has-slideshow"),((s=e.getSlide())===null||s===void 0?void 0:s.state)!==A.Ready&&n.pause()},stop:()=>{i.classList.remove("has-slideshow"),e.isCompact||e.endIdle(),e.emit("endSlideshow")},resume:(n,s)=>{var o,a,l;!s||!s.cancelable||((o=e.getSlide())===null||o===void 0?void 0:o.state)===A.Ready&&(!((l=(a=e.carousel)===null||a===void 0?void 0:a.panzoom)===null||l===void 0)&&l.isResting)||s.preventDefault()}}}),t.attachPlugins({Autoplay:yt}),this.ref=t.plugins.Autoplay)}onReady(e){const t=e.carousel,i=this.ref;i&&t&&this.option("playOnStart")&&(t.isInfinite||t.page<t.pages.length-1)&&i.start()}onDone(e,t){const i=this.ref,n=e.carousel;if(!i||!n)return;const s=t.panzoom;s&&s.on("startAnimation",()=>{e.isCurrentSlide(t)&&i.stop()}),e.isCurrentSlide(t)&&i.resume()}onKeydown(e,t){var i;const n=this.ref;n&&t===this.option("key")&&((i=document.activeElement)===null||i===void 0?void 0:i.nodeName)!=="BUTTON"&&n.toggle()}attach(){const e=this,t=e.instance;t.on("Carousel.init",e.onPrepare),t.on("Carousel.ready",e.onReady),t.on("done",e.onDone),t.on("keydown",e.onKeydown)}detach(){const e=this,t=e.instance;t.off("Carousel.init",e.onPrepare),t.off("Carousel.ready",e.onReady),t.off("done",e.onDone),t.off("keydown",e.onKeydown)}}Object.defineProperty(wt,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{key:" ",playOnStart:!1,progressParentEl:c=>{var e;return((e=c.instance.container)===null||e===void 0?void 0:e.querySelector(".fancybox__toolbar [data-fancybox-toggle-slideshow]"))||c.instance.container},timeout:3e3}});const xt={classes:{container:"f-thumbs f-carousel__thumbs",viewport:"f-thumbs__viewport",track:"f-thumbs__track",slide:"f-thumbs__slide",isResting:"is-resting",isSelected:"is-selected",isLoading:"is-loading",hasThumbs:"has-thumbs"},minCount:2,parentEl:null,thumbTpl:'<button class="f-thumbs__slide__button" tabindex="0" type="button" aria-label="{{GOTO}}" data-carousel-index="%i"><img class="f-thumbs__slide__img" data-lazy-src="{{%s}}" alt="" /></button>',type:"modern"};var X;(function(c){c[c.Init=0]="Init",c[c.Ready=1]="Ready",c[c.Hidden=2]="Hidden"})(X||(X={}));
vendor: 3,009 bytes, line 6
6const tt="isResting",ye="thumbWidth",te="thumbHeight",j="thumbClipWidth";let Et=class extends D{constructor(){super(...arguments),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:"modern"}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"track",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"carousel",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"thumbWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbClipWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbHeight",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbGap",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbExtraGap",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:X.Init})}get isModern(){return this.type==="modern"}onInitSlide(c,e){const t=e.el?e.el.dataset:void 0;t&&(e.thumbSrc=t.thumbSrc||e.thumbSrc||"",e[j]=parseFloat(t[j]||"")||e[j]||0,e[te]=parseFloat(t.thumbHeight||"")||e[te]||0),this.addSlide(e)}onInitSlides(){this.build()}onChange(){var c;if(!this.isModern)return;const e=this.container,t=this.instance,i=t.panzoom,n=this.carousel,s=n?n.panzoom:null,o=t.page;if(i&&n&&s){if(i.isDragging){T(e,this.cn(tt));let a=((c=n.pages[o])===null||c===void 0?void 0:c.pos)||0;a+=t.getProgress(o)*(this[j]+this.thumbGap);let l=s.getBounds();-1*a>l.x.min&&-1*a<l.x.max&&s.panTo({x:-1*a,friction:.12})}else B(e,this.cn(tt),i.isResting);this.shiftModern()}}onRefresh(){this.updateProps();for(const c of this.instance.slides||[])this.resizeModernSlide(c);this.shiftModern()}isDisabled(){const c=this.option("minCount")||0;if(c){const t=this.instance;let i=0;for(const n of t.slides||[])n.thumbSrc&&i++;if(i<c)return!0}const e=this.option("type");return["modern","classic"].indexOf(e)<0}getThumb(c){const e=this.option("thumbTpl")||"";return{html:this.instance.localize(e,[["%i",c.index],["%d",c.index+1],["%s",c.thumbSrc||"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"]])}}addSlide(c){const e=this.carousel;e&&e.addSlide(c.index,this.getThumb(c))}getSlides(){const c=[];for(const e of this.instance.slides||[])c.push(this.getThumb(e));return c}resizeModernSlide(c){this.isModern&&(c[ye]=c[j]&&c[te]?Math.round(this[te]*(c[j]/c[te])):this[ye])}updateProps(){const c=this.container;if(!c)return;const e=t=>parseFloat(getComputedStyle(c).getPropertyValue("--f-thumb-"+t))||0;this.thumbGap=e("gap"),this.thumbExtraGap=e("extra-gap"),this[ye]=e("width")||40,this[j]=e("clip-width")||40,this[te]=e("height")||40}build(){const c=this;if(c.state!==X.Init||c.isDisabled())return;const e=c.instance,t=e.container,i=c.getSlides(),n=c.option("type");c.type=n;const s=document.createElement("div");
6w(s,c.cn("container")),w(s,`is-${n}`);const o=c.option("parentEl");o?o.appendChild(s):t.after(s),w(t,c.cn("hasThumbs")),c.container=s,c.updateProps();const a=document.createElement("div");w(a,c.cn("track")),s.appendChild(a),c.track=a;const l=z({},{track:a,infinite:!1,center:!0,fill:n==="classic",dragFree:!0,slidesPerPage:1,transition:!1,preload:.25,friction:.12,Panzoom:{maxVelocity:0},Dots:!1,Navigation:!1,classes:{container:"f-thumbs",viewport:"f-thumbs__viewport",track:"f-thumbs__track",slide:"f-thumbs__slide"}},c.option("Carousel")||{},{Sync:{target:e},slides:i}),r=new e.constructor(s,l);r.on("createSlide",(h,d)=>{c.setProps(d.index),c.emit("createSlide",d,d.el)}),r.on("ready",()=>{c.shiftModern(),c.emit("ready")}),r.on("refresh",()=>{c.shiftModern()}),r.on("Panzoom.click",(h,d,u)=>{c.onClick(u)}),c.carousel=r,c.state=X.Ready}onClick(c){c.preventDefault(),c.stopPropagation();const e=this.instance,{pages:t,page:i}=e,n=g=>{if(g){const m=g.closest("[data-carousel-index]");if(m)return[parseInt(m.dataset.carouselIndex||"",10)||0,m]}return[-1,void 0]},s=(g,m)=>{const v=document.elementFromPoint(g,m);return v?n(v):[-1,void 0]};let[o,a]=n(c.target);if(o>-1)return;const l=this[j],r=c.clientX,h=c.clientY;let[d,u]=s(r-l,h),[f,p]=s(r+l,h);u&&p?(o=Math.abs(r-u.getBoundingClientRect().right)<Math.abs(r-p.getBoundingClientRect().left)?d:f,o===i&&(o=o===d?f:d)):u?o=d:p&&(o=f),o>-1&&t[o]&&e.slideTo(o)}getShift(c){var e;const t=this,{instance:i}=t,n=t.carousel;if(!i||!n)return 0;const s=t[ye],o=t[j],a=t.thumbGap,l=t.thumbExtraGap;if(!(!((e=n.slides[c])===null||e===void 0)&&e.el))return 0;const r=.5*(s-o),h=i.pages.length-1;let d=i.getProgress(0),u=i.getProgress(h),f=i.getProgress(c,!1,!0),p=0,g=r+l+a;const m=d<0&&d>-1,v=u>0&&u<1;return c===0?(p=g*Math.abs(d),v&&d===1&&(p-=g*Math.abs(u))):c===h?(p=g*Math.abs(u)*-1,m&&u===-1&&(p+=g*Math.abs(d))):m||v?(p=-1*g,p+=g*Math.abs(d),p+=g*(1-Math.abs(u))):p=g*f,p}setProps(c){const e=this;if(!e.isModern)return;const{instance:t}=e,i=e.carousel;if(t&&i){const n=i.slides[c].el;if(n&&n.childNodes.length){let s=b(1-Math.abs(t.getProgress(c))),o=b(e.getShift(c));n.style.setProperty("--progress",s?s+"":""),n.style.setProperty("--shift",o+"")}}}shiftModern(){const c=this;if(!c.isModern)return;const{instance:e,track:t}=c,i=e.panzoom,n=c.carousel;if(!(e&&t&&i&&n)||i.state===P.Init||i.state===P.Destroy)return;for(const o of e.slides)c.setProps(o.index);let s=(c[j]+c.thumbGap)*(n.slides.length||0);t.style.setProperty("--width",s+"")}cleanup(){const c=this;c.carousel&&c.carousel.destroy(),c.carousel=null,c.container&&c.container.remove(),c.container=null,c.track&&c.track.remove(),c.track=null,c.state=X.Init,T(c.instance.container,c.cn("hasThumbs"))}attach(){const c=this,e=c.instance;e.on("initSlide",c.onInitSlide),e.state===M.Init?e.on("initSlides",c.onInitSlides):c.onInitSlides(),e.on(["change","Panzoom.afterTransform"],c.onChange),e.on("Panzoom.refresh",c.onRefresh)}detach(){const c=this,e=c.instance;e.off("initSlide",c.onInitSlide),e.off("initSlides",c.onInitSlides),e.off(["change","Panzoom.afterTransform"],c.onChange),e.off("Panzoom.refresh",c.onRefresh),c.cleanup()}};Object.defineProperty(Et,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:xt});const It=Object.assign(Object.assign({},xt),{key:"t",showOnStart:!0,parentEl:null}),it="is-masked",nt="aria-hidden";class St extends D{constructor(){super(...arguments),Object.defineProperty(this,"ref",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"hidden",{enumerable:!0,configurable:!0,writable:!0,value:!1})}get isEnabled(){const e=this.ref;return e&&!e.isDisabled()}get isHidden(){return this.hidden}onClick(e,t){t.stopPropagation()}onCreateSlide(e,t){var i,n,s;const o=((s=(n=(i=this.instance)===null||i===void 0?void 0:i.carousel)===null||n===void 0?void 0:n.slides[t.index])===null||s===void 0?void 0:s.type)||"",a=t.el;if(a&&o){let l=`for-${o}`;["video","youtube","vimeo","html5video"].includes(o)&&(l+=" for-video"),w(a,l)}}onInit(){var e;const t=this,i=t.instance,n=i.carousel;if(t.ref||!n)return;const s=t.option("parentEl")||i.footer||i.container;if(!s)return;const o=z({},t.options,{parentEl:s,classes:{container:"f-thumbs fancybox__thumbs"},Carousel:{Sync:{friction:i.option("Carousel.friction")||0}},on:{ready:a=>{const l=a.container;l&&this.hidden&&(t.refresh(),l.style.transition="none",t.hide(),l.offsetHeight,queueMicrotask(()=>{l.style.transition="",t.show()}))}}});o.Carousel=o.Carousel||{},o.Carousel.on=z(((e=t.options.Carousel)===null||e===void 0?void 0:e.on)||{},{click:this.onClick,createSlide:this.onCreateSlide}),n.options.Thumbs=o,n.attachPlugins({Thumbs:Et}),t.ref=n.plugins.Thumbs,t.option("showOnStart")||(t.ref.state=X.Hidden,t.hidden=!0)}onResize(){var e;const t=(e=this.ref)===null||e===void 0?void 0:e.container;t&&(t.style.maxHeight="")}onKeydown(e,t){const i=this.option("key");i&&i===t&&this.toggle()}toggle(){const e=this.ref;if(e&&!e.isDisabled())return e.state===X.Hidden?(e.state=X.Init,void e.build()):void(this.hidden?this.show():this.hide())}show(){const e=this.ref;if(!e||e.isDisabled())return;const t=e.container;t&&(this.refresh(),t.offsetHeight,t.removeAttribute(nt),t.classList.remove(it),this.hidden=!1)}
6hide(){const e=this.ref,t=e&&e.container;t&&(this.refresh(),t.offsetHeight,t.classList.add(it),t.setAttribute(nt,"true")),this.hidden=!0}refresh(){const e=this.ref;if(!e||!e.state)return;const t=e.container,i=(t==null?void 0:t.firstChild)||null;t&&i&&i.childNodes.length&&(t.style.maxHeight=`${i.getBoundingClientRect().height}px`)}attach(){const e=this,t=e.instance;t.state===O.Init?t.on("Carousel.init",e.onInit):e.onInit(),t.on("resize",e.onResize),t.on("keydown",e.onKeydown)}detach(){var e;const t=this,i=t.instance;i.off("Carousel.init",t.onInit),i.off("resize",t.onResize),i.off("keydown",t.onKeydown),(e=i.carousel)===null||e===void 0||e.detachPlugins(["Thumbs"]),t.ref=null}}Object.defineProperty(St,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:It});const ke={panLeft:{icon:'<svg><path d="M5 12h14M5 12l6 6M5 12l6-6"/></svg>',change:{panX:-100}},panRight:{icon:'<svg><path d="M5 12h14M13 18l6-6M13 6l6 6"/></svg>',change:{panX:100}},panUp:{icon:'<svg><path d="M12 5v14M18 11l-6-6M6 11l6-6"/></svg>',change:{panY:-100}},panDown:{icon:'<svg><path d="M12 5v14M18 13l-6 6M6 13l6 6"/></svg>',change:{panY:100}},zoomIn:{icon:'<svg><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M11 8v6M8 11h6"/></svg>',action:"zoomIn"},zoomOut:{icon:'<svg><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M8 11h6"/></svg>',action:"zoomOut"},toggle1to1:{icon:'<svg><path d="M3.51 3.07c5.74.02 11.48-.02 17.22.02 1.37.1 2.34 1.64 2.18 3.13 0 4.08.02 8.16 0 12.23-.1 1.54-1.47 2.64-2.79 2.46-5.61-.01-11.24.02-16.86-.01-1.36-.12-2.33-1.65-2.17-3.14 0-4.07-.02-8.16 0-12.23.1-1.36 1.22-2.48 2.42-2.46Z"/><path d="M5.65 8.54h1.49v6.92m8.94-6.92h1.49v6.92M11.5 9.4v.02m0 5.18v0"/></svg>',action:"toggleZoom"},toggleZoom:{icon:'<svg><g><line x1="11" y1="8" x2="11" y2="14"></line></g><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M8 11h6"/></svg>',action:"toggleZoom"},iterateZoom:{icon:'<svg><g><line x1="11" y1="8" x2="11" y2="14"></line></g><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M8 11h6"/></svg>',action:"iterateZoom"},rotateCCW:{icon:'<svg><path d="M15 4.55a8 8 0 0 0-6 14.9M9 15v5H4M18.37 7.16v.01M13 19.94v.01M16.84 18.37v.01M19.37 15.1v.01M19.94 11v.01"/></svg>',action:"rotateCCW"},rotateCW:{icon:'<svg><path d="M9 4.55a8 8 0 0 1 6 14.9M15 15v5h5M5.63 7.16v.01M4.06 11v.01M4.63 15.1v.01M7.16 18.37v.01M11 19.94v.01"/></svg>',action:"rotateCW"},flipX:{icon:'<svg style="stroke-width: 1.3"><path d="M12 3v18M16 7v10h5L16 7M8 7v10H3L8 7"/></svg>',action:"flipX"},flipY:{icon:'<svg style="stroke-width: 1.3"><path d="M3 12h18M7 16h10L7 21v-5M7 8h10L7 3v5"/></svg>',action:"flipY"},fitX:{icon:'<svg><path d="M4 12V6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v6M10 18H3M21 18h-7M6 15l-3 3 3 3M18 15l3 3-3 3"/></svg>',action:"fitX"},fitY:{icon:'<svg><path d="M12 20H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h6M18 14v7M18 3v7M15 18l3 3 3-3M15 6l3-3 3 3"/></svg>',action:"fitY"},reset:{icon:'<svg><path d="M20 11A8.1 8.1 0 0 0 4.5 9M4 5v4h4M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"/></svg>',action:"reset"},toggleFS:{icon:'<svg><g><path d="M14.5 9.5 21 3m0 0h-6m6 0v6M3 21l6.5-6.5M3 21v-6m0 6h6"/></g><g><path d="m14 10 7-7m-7 7h6m-6 0V4M3 21l7-7m0 0v6m0-6H4"/></g></svg>',action:"toggleFS"}};var G;(function(c){c[c.Init=0]="Init",c[c.Ready=1]="Ready",c[c.Disabled=2]="Disabled"})(G||(G={}));const Dt={absolute:"auto",display:{left:["infobar"],middle:[],right:["iterateZoom","slideshow","fullscreen","thumbs","close"]},enabled:"auto",items:{infobar:{tpl:'<div class="fancybox__infobar" tabindex="-1"><span data-fancybox-current-index></span>/<span data-fancybox-count></span></div>'},download:{tpl:'<a class="f-button" title="{{DOWNLOAD}}" data-fancybox-download href="javasript:;"><svg><path d="M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2M7 11l5 5 5-5M12 4v12"/></svg></a>'},prev:{tpl:'<button class="f-button" title="{{PREV}}" data-fancybox-prev><svg><path d="m15 6-6 6 6 6"/></svg></button>'},next:{tpl:'<button class="f-button" title="{{NEXT}}" data-fancybox-next><svg><path d="m9 6 6 6-6 6"/></svg></button>'},slideshow:{tpl:'<button class="f-button" title="{{TOGGLE_SLIDESHOW}}" data-fancybox-toggle-slideshow><svg><g><path d="M8 4v16l13 -8z"></path></g><g>
6<path d="M8 4v15M17 4v15"/></g></svg></button>'},fullscreen:{tpl:'<button class="f-button" title="{{TOGGLE_FULLSCREEN}}" data-fancybox-toggle-fullscreen><svg><g><path d="M4 8V6a2 2 0 0 1 2-2h2M4 16v2a2 2 0 0 0 2 2h2M16 4h2a2 2 0 0 1 2 2v2M16 20h2a2 2 0 0 0 2-2v-2"/></g><g><path d="M15 19v-2a2 2 0 0 1 2-2h2M15 5v2a2 2 0 0 0 2 2h2M5 15h2a2 2 0 0 1 2 2v2M5 9h2a2 2 0 0 0 2-2V5"/></g></svg></button>'},thumbs:{tpl:'<button class="f-button" title="{{TOGGLE_THUMBS}}" data-fancybox-toggle-thumbs><svg><circle cx="5.5" cy="5.5" r="1"/><circle cx="12" cy="5.5" r="1"/><circle cx="18.5" cy="5.5" r="1"/><circle cx="5.5" cy="12" r="1"/><circle cx="12" cy="12" r="1"/><circle cx="18.5" cy="12" r="1"/><circle cx="5.5" cy="18.5" r="1"/><circle cx="12" cy="18.5" r="1"/><circle cx="18.5" cy="18.5" r="1"/></svg></button>'},close:{tpl:'<button class="f-button" title="{{CLOSE}}" data-fancybox-close><svg><path d="m19.5 4.5-15 15M4.5 4.5l15 15"/></svg></button>'}},parentEl:null},Ft={tabindex:"-1",width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"};class Pt extends D{constructor(){super(...arguments),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:G.Init}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null})}onReady(e){var t;if(!e.carousel)return;let i=this.option("display"),n=this.option("absolute"),s=this.option("enabled");if(s==="auto"){const r=this.instance.carousel;let h=0;if(r)for(const d of r.slides)(d.panzoom||d.type==="image")&&h++;h||(s=!1)}s||(i=void 0);let o=0;const a={left:[],middle:[],right:[]};if(i)for(const r of["left","middle","right"])for(const h of i[r]){const d=this.createEl(h);d&&((t=a[r])===null||t===void 0||t.push(d),o++)}let l=null;if(o&&(l=this.createContainer()),l){for(const[r,h]of Object.entries(a)){const d=document.createElement("div");w(d,"fancybox__toolbar__column is-"+r);for(const u of h)d.appendChild(u);n!=="auto"||r!=="middle"||h.length||(n=!0),l.appendChild(d)}n===!0&&w(l,"is-absolute"),this.state=G.Ready,this.onRefresh()}else this.state=G.Disabled}onClick(e){var t,i;const n=this.instance,s=n.getSlide(),o=s==null?void 0:s.panzoom,a=e.target,l=a&&L(a)?a.dataset:null;if(!l)return;if(l.fancyboxToggleThumbs!==void 0)return e.preventDefault(),e.stopPropagation(),void((t=n.plugins.Thumbs)===null||t===void 0||t.toggle());if(l.fancyboxToggleFullscreen!==void 0)return e.preventDefault(),e.stopPropagation(),void this.instance.toggleFullscreen();if(l.fancyboxToggleSlideshow!==void 0){e.preventDefault(),e.stopPropagation();const d=(i=n.carousel)===null||i===void 0?void 0:i.plugins.Autoplay;let u=d.isActive;return o&&o.panMode==="mousemove"&&!u&&o.reset(),void(u?d.stop():d.start())}const r=l.panzoomAction,h=l.panzoomChange;if((h||r)&&(e.preventDefault(),e.stopPropagation()),h){let d={};try{d=JSON.parse(h)}catch{}o&&o.applyChange(d)}else r&&o&&o[r]&&o[r]()}onChange(){this.onRefresh()}onRefresh(){if(this.instance.isClosing())return;const e=this.container;if(!e)return;const t=this.instance.getSlide();if(!t||t.state!==A.Ready)return;const i=t&&!t.error&&t.panzoom;for(const o of e.querySelectorAll("[data-panzoom-action]"))i?(o.removeAttribute("disabled"),o.removeAttribute("tabindex")):(o.setAttribute("disabled",""),o.setAttribute("tabindex","-1"));let n=i&&i.canZoomIn(),s=i&&i.canZoomOut();for(const o of e.querySelectorAll('[data-panzoom-action="zoomIn"]'))n?(o.removeAttribute("disabled"),o.removeAttribute("tabindex")):(o.setAttribute("disabled",""),o.setAttribute("tabindex","-1"));for(const o of e.querySelectorAll('[data-panzoom-action="zoomOut"]'))s?(o.removeAttribute("disabled"),o.removeAttribute("tabindex")):(o.setAttribute("disabled",""),o.setAttribute("tabindex","-1"));for(const o of e.querySelectorAll('[data-panzoom-action="toggleZoom"],[data-panzoom-action="iterateZoom"]')){s||n?(o.removeAttribute("disabled"),o.removeAttribute("tabindex")):(o.setAttribute("disabled",""),o.setAttribute("tabindex","-1"));const a=o.querySelector("g");a&&(a.style.display=n?"":"none")}}onDone(e,t){var i;(i=t.panzoom)===null||i===void 0||i.on("afterTransform",()=>{this.instance.isCurrentSlide(t)&&this.onRefresh()}),this.instance.isCurrentSlide(t)&&this.onRefresh()}createContainer(){const e=this.instance.container;if(!e)return null;const t=this.option("parentEl")||e,i=document.createElement("div");return w(i,"fancybox__toolbar"),t.prepend(i),i.addEventListener("click",this.onClick,{passive:!1,capture:!0}),e&&w(e,"has-toolbar"),this.container=i,i}createEl(e){const t=this.instance,i=t.carousel;if(!i||e==="toggleFS"||e==="fullscreen"&&!t.fsAPI)return null;let n=null;const s=i.slides.length||0;let o=0,a=0;for(const r of i.slides)(r.panzoom||r.type==="image")&&o++,(r.type==="image"||r.downloadSrc)&&a++;if(s<2&&["infobar","prev","next"].includes(e))return n;if(ke[e]!==void 0&&!o||e==="download"&&!a)return null;if(e==="thumbs"){const r=t.plugins.Thumbs;if(!r||!r.isEnabled)return null}if(e==="slideshow"&&(!i.plugins.Autoplay||s<2))return null;if(ke[e]!==void 0){const r=ke[e];n=document.createElement("button"),n.setAttribute("title",this.instance.localize(`{{${e.toUpperCase()}}}`)),w(n,"f-button"),r.action&&(n.dataset.panzoomAction=r.action),r.change&&(n.dataset.panzoomChange=JSON.stringify(r.change)),n.appendChild(H(this.instance.localize(r.icon)))}else{const r=(this.option("items")||[])[e];r&&(n=H(this.instance.localize(r.tpl)),typeof r.click=="function"&&n.addEventListener("click",h=>{h.preventDefault(),h.stopPropagation(),typeof r.click=="function"&&r.click.call(this,this,h)}))}const l=n==null?void 0:n.querySelector("svg");if(l)for(const[r,h]of Object.entries(Ft))l.getAttribute(r)||l.setAttribute(r,String(h));return n}
6removeContainer(){const e=this.container;e&&e.remove(),this.container=null,this.state=G.Disabled;const t=this.instance.container;t&&T(t,"has-toolbar")}attach(){const e=this,t=e.instance;t.on("Carousel.initSlides",e.onReady),t.on("done",e.onDone),t.on(["reveal","Carousel.change"],e.onChange),e.onReady(e.instance)}detach(){const e=this,t=e.instance;t.off("Carousel.initSlides",e.onReady),t.off("done",e.onDone),t.off(["reveal","Carousel.change"],e.onChange),e.removeContainer()}}Object.defineProperty(Pt,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:Dt});const jt={Hash:I,Html:bt,Images:vt,Slideshow:wt,Thumbs:St,Toolbar:Pt},st="with-fancybox",Re="hide-scrollbar",ot="--fancybox-scrollbar-compensate",at="--fancybox-body-margin",Ie="is-using-tab",De="is-animated",rt="is-compact",lt="is-loading",we="has-caption",ie="disabled",Z="tabindex",ct="download",Fe="href",ne="src",Y=c=>typeof c=="string",ht=function(){var c=window.getSelection();return c&&c.type==="Range"};let R=null,U=null;const le=new Map;let Ht=0;class E extends _e{get isIdle(){return this.idle}get isCompact(){return this.option("compact")}constructor(e=[],t={},i={}){super(t),Object.defineProperty(this,"userSlides",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"userPlugins",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"idle",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"idleTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"clickTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"pwt",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"ignoreFocusChange",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:O.Init}),Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"footer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"carousel",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"lastFocus",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"prevMouseMoveEvent",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"fsAPI",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.fsAPI=(()=>{let n,s="",o="",a="";return document.fullscreenEnabled?(s="requestFullscreen",o="exitFullscreen",a="fullscreenElement"):document.webkitFullscreenEnabled&&(s="webkitRequestFullscreen",o="webkitExitFullscreen",a="webkitFullscreenElement"),s&&(n={request:function(l){return s==="webkitRequestFullscreen"?l[s](Element.ALLOW_KEYBOARD_INPUT):l[s]()},exit:function(){return document[a]&&document[o]()},isFullscreen:function(){return document[a]}}),n})(),this.id=t.id||++Ht,le.set(this.id,this),this.userSlides=e,this.userPlugins=i,queueMicrotask(()=>{this.init()})}init(){if(this.state===O.Destroy)return;this.state=O.Init,this.attachPlugins(Object.assign(Object.assign({},E.Plugins),this.userPlugins)),this.emit("init"),this.emit("attachPlugins"),this.option("hideScrollbar")===!0&&(()=>{if(!ce)return;const i=document,n=i.body,s=i.documentElement;if(n.classList.contains(Re))return;let o=window.innerWidth-s.getBoundingClientRect().width;const a=parseFloat(window.getComputedStyle(n).marginRight);o<0&&(o=0),s.style.setProperty(ot,`${o}px`),a&&n.style.setProperty(at,`${a}px`),n.classList.add(Re)})(),this.initLayout(),this.scale();const e=()=>{this.initCarousel(this.userSlides),this.state=O.Ready,this.attachEvents(),this.emit("ready"),setTimeout(()=>{this.container&&this.container.setAttribute("aria-hidden","false")},16)},t=this.fsAPI;this.option("Fullscreen.autoStart")&&t&&!t.isFullscreen()?t.request(this.container).then(()=>e()).catch(()=>e()):e()}initLayout(){var e,t;const i=this.option("parentEl")||document.body,n=H(this.localize(this.option("tpl.main")||""));n&&(n.setAttribute("id",`fancybox-${this.id}`),n.setAttribute("aria-label",this.localize("{{MODAL}}")),n.classList.toggle(rt,this.isCompact),w(n,this.option("mainClass")||""),this.container=n,this.footer=n.querySelector(".fancybox__footer"),i.appendChild(n),w(document.documentElement,st),R&&U||(R=document.createElement("span"),w(R,"fancybox-focus-guard"),R.setAttribute(Z,"0"),R.setAttribute("aria-hidden","true"),R.setAttribute("aria-label","Focus guard"),U=R.cloneNode(),(e=n.parentElement)===null||e===void 0||e.insertBefore(R,n),(t=n.parentElement)===null||t===void 0||t.append(U)),n.addEventListener("mousedown",()=>{T(n,Ie)}),this.option("animated")&&(w(n,De),setTimeout(()=>{this.isClosing()||T(n,De)}
6,350)),this.emit("initLayout"))}initCarousel(e){const t=this.container;if(!t)return;const i=t.querySelector(".fancybox__carousel");if(!i)return;const n=this.carousel=new K(i,z({},{slides:e,transition:"fade",Panzoom:{lockAxis:this.option("dragToClose")?"xy":"x",infinite:!!this.option("dragToClose")&&"y"},Dots:!1,Navigation:{classes:{container:"fancybox__nav",button:"f-button",isNext:"is-next",isPrev:"is-prev"}},initialPage:this.option("startIndex"),l10n:this.option("l10n")},this.option("Carousel")||{}));n.on("*",(s,o,...a)=>{this.emit(`Carousel.${o}`,s,...a)}),n.on(["ready","change"],()=>{this.manageCaption()}),this.on("Carousel.removeSlide",(s,o,a)=>{this.clearContent(a),a.state=void 0}),n.on("Panzoom.touchStart",()=>{var s,o;this.isCompact||this.endIdle(),!((s=document.activeElement)===null||s===void 0)&&s.closest(".f-thumbs")&&((o=this.container)===null||o===void 0||o.focus())}),n.on("settle",()=>{this.idleTimer||this.isCompact||!this.option("idle")||this.setIdle(),this.option("autoFocus")&&!this.isClosing&&this.checkFocus()}),this.option("dragToClose")&&(n.on("Panzoom.afterTransform",(s,o)=>{const a=this.getSlide();if(a&&je(a.el))return;const l=this.container;if(l){const r=Math.abs(o.current.f),h=r<1?"":Math.max(.5,Math.min(1,1-r/o.contentRect.fitHeight*1.5));l.style.setProperty("--fancybox-ts",h?"0s":""),l.style.setProperty("--fancybox-opacity",h+"")}}),n.on("Panzoom.touchEnd",(s,o,a)=>{var l;const r=this.getSlide();if(r&&je(r.el)||o.isMobile&&document.activeElement&&["TEXTAREA","INPUT"].indexOf((l=document.activeElement)===null||l===void 0?void 0:l.nodeName)!==-1)return;const h=Math.abs(o.dragOffset.y);o.lockedAxis==="y"&&(h>=200||h>=50&&o.dragOffset.time<300)&&(a&&a.cancelable&&a.preventDefault(),this.close(a,"f-throwOut"+(o.current.f<0?"Up":"Down")))})),n.on("change",s=>{var o;let a=(o=this.getSlide())===null||o===void 0?void 0:o.triggerEl;if(a){const l=new CustomEvent("slideTo",{bubbles:!0,cancelable:!0,detail:s.page});a.dispatchEvent(l)}}),n.on(["refresh","change"],s=>{const o=this.container;if(!o)return;for(const r of o.querySelectorAll("[data-fancybox-current-index]"))r.innerHTML=s.page+1;for(const r of o.querySelectorAll("[data-fancybox-count]"))r.innerHTML=s.pages.length;if(!s.isInfinite){for(const r of o.querySelectorAll("[data-fancybox-next]"))s.page<s.pages.length-1?(r.removeAttribute(ie),r.removeAttribute(Z)):(r.setAttribute(ie,""),r.setAttribute(Z,"-1"));for(const r of o.querySelectorAll("[data-fancybox-prev]"))s.page>0?(r.removeAttribute(ie),r.removeAttribute(Z)):(r.setAttribute(ie,""),r.setAttribute(Z,"-1"))}const a=this.getSlide();if(!a)return;let l=a.downloadSrc||"";l||a.type!=="image"||a.error||!Y(a[ne])||(l=a[ne]);for(const r of o.querySelectorAll("[data-fancybox-download]")){const h=a.downloadFilename;l?(r.removeAttribute(ie),r.removeAttribute(Z),r.setAttribute(Fe,l),r.setAttribute(ct,h||l),r.setAttribute("target","_blank")):(r.setAttribute(ie,""),r.setAttribute(Z,"-1"),r.removeAttribute(Fe),r.removeAttribute(ct))}}),this.emit("initCarousel")}attachEvents(){const e=this,t=e.container;if(!t)return;t.addEventListener("click",e.onClick,{passive:!1,capture:!1}),t.addEventListener("wheel",e.onWheel,{passive:!1,capture:!1}),document.addEventListener("keydown",e.onKeydown,{passive:!1,capture:!0}),document.addEventListener("visibilitychange",e.onVisibilityChange,!1),document.addEventListener("mousemove",e.onMousemove),e.option("trapFocus")&&document.addEventListener("focus",e.onFocus,!0),window.addEventListener("resize",e.onResize);const i=window.visualViewport;i&&(i.addEventListener("scroll",e.onResize),i.addEventListener("resize",e.onResize))}detachEvents(){const e=this,t=e.container;if(!t)return;document.removeEventListener("keydown",e.onKeydown,{passive:!1,capture:!0}),t.removeEventListener("wheel",e.onWheel,{passive:!1,capture:!1}),t.removeEventListener("click",e.onClick,{passive:!1,capture:!1}),document.removeEventListener("mousemove",e.onMousemove),window.removeEventListener("resize",e.onResize);const i=window.visualViewport;i&&(i.removeEventListener("resize",e.onResize),i.removeEventListener("scroll",e.onResize)),document.removeEventListener("visibilitychange",e.onVisibilityChange,!1),document.removeEventListener("focus",e.onFocus,!0)}scale(){const e=this.container;if(!e)return;
6const t=window.visualViewport,i=Math.max(1,(t==null?void 0:t.scale)||1);let n="",s="",o="";if(t&&i>1){let a=`${t.offsetLeft}px`,l=`${t.offsetTop}px`;n=t.width*i+"px",s=t.height*i+"px",o=`translate3d(${a}, ${l}, 0) scale(${1/i})`}e.style.transform=o,e.style.width=n,e.style.height=s}onClick(e){var t,i;const{container:n,isCompact:s}=this;if(!n||this.isClosing())return;!s&&this.option("idle")&&this.resetIdle();const o=e.composedPath()[0];if(o.closest(".f-spinner")||o.closest("[data-fancybox-close]"))return e.preventDefault(),void this.close(e);if(o.closest("[data-fancybox-prev]"))return e.preventDefault(),void this.prev();if(o.closest("[data-fancybox-next]"))return e.preventDefault(),void this.next();const a=document.activeElement;if(ht()&&a&&n.contains(a)||o===((t=this.carousel)===null||t===void 0?void 0:t.container))return;if(s&&((i=this.getSlide())===null||i===void 0?void 0:i.type)==="image")return void(this.clickTimer?(clearTimeout(this.clickTimer),this.clickTimer=null):this.clickTimer=setTimeout(()=>{this.toggleIdle(),this.clickTimer=null},350));if(this.emit("click",e),e.defaultPrevented)return;let l=!1;if(o.closest(".fancybox__content")){if(a){if(a.closest("[contenteditable]"))return;o.matches(Ae)||a.blur()}if(ht())return;l=this.option("contentClick")}else o.closest(".fancybox__carousel")&&!o.matches(Ae)&&(l=this.option("backdropClick"));l==="close"?(e.preventDefault(),this.close(e)):l==="next"?(e.preventDefault(),this.next()):l==="prev"&&(e.preventDefault(),this.prev())}onWheel(e){const t=e.target;let i=this.option("wheel",e);t.closest(".fancybox__thumbs")&&(i="slide");const n=i==="slide",s=[-e.deltaX||0,-e.deltaY||0,-e.detail||0].reduce(function(l,r){return Math.abs(r)>Math.abs(l)?r:l}),o=Math.max(-1,Math.min(1,s)),a=Date.now();this.pwt&&a-this.pwt<300?n&&e.preventDefault():(this.pwt=a,this.emit("wheel",e,o),e.defaultPrevented||(i==="close"?(e.preventDefault(),this.close(e)):i==="slide"&&(xe(t)||(e.preventDefault(),this[o>0?"prev":"next"]()))))}onKeydown(e){if(!this.isTopmost())return;this.isCompact||!this.option("idle")||this.isClosing()||this.resetIdle();const t=e.key,i=this.option("keyboard");if(!i)return;const n=e.composedPath()[0],s=document.activeElement&&document.activeElement.classList,o=s&&s.contains("f-button")||n.dataset.carouselPage||n.dataset.carouselIndex;if(t!=="Escape"&&!o&&L(n)&&(n.isContentEditable||["TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].indexOf(n.nodeName)!==-1)||(e.key==="Tab"?w(this.container,Ie):T(this.container,Ie),e.ctrlKey||e.altKey||e.shiftKey))return;this.emit("keydown",t,e);const a=i[t];a&&typeof this[a]=="function"&&(e.preventDefault(),this[a]())}onResize(){const e=this.container;if(!e)return;const t=this.isCompact;e.classList.toggle(rt,t),this.manageCaption(this.getSlide()),this.isCompact?this.clearIdle():this.endIdle(),this.scale(),this.emit("resize")}onFocus(e){this.isTopmost()&&this.checkFocus(e)}onMousemove(e){this.prevMouseMoveEvent=e,!this.isCompact&&this.option("idle")&&this.resetIdle()}onVisibilityChange(){document.visibilityState==="visible"?this.checkFocus():this.endIdle()}manageCloseBtn(e){const t=this.optionFor(e,"closeButton")||!1;if(t==="auto"){const n=this.plugins.Toolbar;if(n&&n.state===G.Ready)return}if(!t||!e.contentEl||e.closeBtnEl)return;const i=this.option("tpl.closeButton");if(i){const n=H(this.localize(i));e.closeBtnEl=e.contentEl.appendChild(n),e.el&&w(e.el,"has-close-btn")}}manageCaption(e=void 0){var t,i;const n="fancybox__caption",s=this.container;if(!s)return;T(s,we);const o=this.isCompact||this.option("commonCaption"),a=!o;if(this.caption&&this.stop(this.caption),a&&this.caption&&(this.caption.remove(),this.caption=null),o&&!this.caption)for(const d of((t=this.carousel)===null||t===void 0?void 0:t.slides)||[])d.captionEl&&(d.captionEl.remove(),d.captionEl=void 0,T(d.el,we),(i=d.el)===null||i===void 0||i.removeAttribute("aria-labelledby"));if(e||(e=this.getSlide()),!e||o&&!this.isCurrentSlide(e))return;const l=e.el;let r=this.optionFor(e,"caption","");if(!r)return void(o&&this.caption&&this.animate(this.caption,"f-fadeOut",()=>{this.caption&&(this.caption.innerHTML="")}));let h=null;if(a){if(h=e.captionEl||null,l&&!h){const d=n+`_${this.id}_${e.index}`;h=document.createElement("div"),w(h,n),h.setAttribute("id",d),e.captionEl=l.appendChild(h),w(l,we),l.setAttribute("aria-labelledby",d)}}else h=this.caption,h||(h=s.querySelector("."+n)),!h&&(h=document.createElement("div"),h.dataset.fancyboxCaption="",w(h,n),(this.footer||s).prepend(h)),w(s,we),this.caption=h;h&&(h.innerHTML="",Y(r)||typeof r=="number"?h.innerHTML=r+"":r instanceof HTMLElement&&h.appendChild(r))}checkFocus(e){this.focus(e)}focus(e){var t;if(this.ignoreFocusChange)return;const i=document.activeElement||null,n=(e==null?void 0:e.target)||null,s=this.container,o=this.getSlide();if(!s||!(!((t=this.carousel)===null||t===void 0)&&t.viewport)||!e&&i&&s.contains(i))return;const a=o&&o.state===A.Ready?o.el:null;if(!a||a.contains(i)||s===i)return;e&&e.cancelable&&e.preventDefault(),this.ignoreFocusChange=!0;const l=Array.from(s.querySelectorAll(Ae));let r=[],h=null;for(let u of l){const f=!u.offsetParent||!!u.closest('[aria-hidden="true"]'),p=a&&a.contains(u),g=!this.carousel.viewport.contains(u);if(u===s||(p||g)&&!f){r.push(u);const m=u.dataset.origTabindex;m!==void 0&&m&&(u.tabIndex=parseFloat(m)),u.removeAttribute("data-orig-tabindex"),!u.hasAttribute("autoFocus")&&h||(h=u)}else{const m=u.dataset.origTabindex===void 0?u.getAttribute("tabindex")||"":u.dataset.origTabindex;m&&(u.dataset.origTabindex=m),u.tabIndex=-1}}let d=null;e?(!n||r.indexOf(n)<0)&&(d=h||s,r.length&&(i===U?d=r[0]:this.lastFocus!==s&&i!==R||(d=r[r.length-1]))):d=o&&o.type==="image"?s:h||s,d&&Ke(d),this.lastFocus=document.activeElement,this.ignoreFocusChange=!1}
6next(){const e=this.carousel;e&&e.pages.length>1&&e.slideNext()}prev(){const e=this.carousel;e&&e.pages.length>1&&e.slidePrev()}jumpTo(...e){this.carousel&&this.carousel.slideTo(...e)}isTopmost(){var e;return((e=E.getInstance())===null||e===void 0?void 0:e.id)==this.id}animate(e=null,t="",i){if(!e||!t)return void(i&&i());this.stop(e);const n=s=>{s.target===e&&e.dataset.animationName&&(e.removeEventListener("animationend",n),delete e.dataset.animationName,i&&i(),T(e,t))};e.dataset.animationName=t,e.addEventListener("animationend",n),w(e,t)}stop(e){e&&e.dispatchEvent(new CustomEvent("animationend",{bubbles:!1,cancelable:!0,currentTarget:e}))}setContent(e,t="",i=!0){if(this.isClosing())return;const n=e.el;if(!n)return;let s=null;if(L(t)?s=t:(s=H(t+""),L(s)||(s=document.createElement("div"),s.innerHTML=t+"")),["img","picture","iframe","video","audio"].includes(s.nodeName.toLowerCase())){const o=document.createElement("div");o.appendChild(s),s=o}L(s)&&e.filter&&!e.error&&(s=s.querySelector(e.filter)),s&&L(s)?(w(s,"fancybox__content"),e.id&&s.setAttribute("id",e.id),s.style.display!=="none"&&getComputedStyle(s).getPropertyValue("display")!=="none"||(s.style.display=e.display||this.option("defaultDisplay")||"flex"),n.classList.add(`has-${e.error?"error":e.type||"unknown"}`),n.prepend(s),e.contentEl=s,i&&this.revealContent(e),this.manageCloseBtn(e),this.manageCaption(e)):this.setError(e,"{{ELEMENT_NOT_FOUND}}")}revealContent(e,t){const i=e.el,n=e.contentEl;i&&n&&(this.emit("reveal",e),this.hideLoading(e),e.state=A.Opening,(t=this.isOpeningSlide(e)?t===void 0?this.optionFor(e,"showClass"):t:"f-fadeIn")?this.animate(n,t,()=>{this.done(e)}):this.done(e))}done(e){this.isClosing()||(e.state=A.Ready,this.emit("done",e),w(e.el,"is-done"),this.isCurrentSlide(e)&&this.option("autoFocus")&&queueMicrotask(()=>{var t;(t=e.panzoom)===null||t===void 0||t.updateControls(),this.option("autoFocus")&&(this.option("autoFocus")?this.focus():this.checkFocus())}),this.isOpeningSlide(e)&&!this.isCompact&&this.option("idle")&&this.setIdle())}isCurrentSlide(e){const t=this.getSlide();return!(!e||!t)&&t.index===e.index}isOpeningSlide(e){var t,i;return((t=this.carousel)===null||t===void 0?void 0:t.prevPage)===null&&e.index===((i=this.getSlide())===null||i===void 0?void 0:i.index)}showLoading(e){e.state=A.Loading;const t=e.el;t&&(w(t,lt),this.emit("loading",e),e.spinnerEl||setTimeout(()=>{if(!this.isClosing()&&!e.spinnerEl&&e.state===A.Loading){let i=H($e);e.spinnerEl=i,t.prepend(i),this.animate(i,"f-fadeIn")}},250))}hideLoading(e){const t=e.el;if(!t)return;const i=e.spinnerEl;this.isClosing()?i==null||i.remove():(T(t,lt),i&&this.animate(i,"f-fadeOut",()=>{i.remove()}
6),e.state===A.Loading&&(this.emit("loaded",e),e.state=A.Ready))}setError(e,t){if(this.isClosing())return;const i=new Event("error",{bubbles:!0,cancelable:!0});if(this.emit("error",i,e),i.defaultPrevented)return;e.error=t,this.hideLoading(e),this.clearContent(e);const n=document.createElement("div");n.classList.add("fancybox-error"),n.innerHTML=this.localize(t||"<p>{{ERROR}}</p>"),this.setContent(e,n)}clearContent(e){if(e.state===void 0)return;this.emit("clearContent",e),e.contentEl&&(e.contentEl.remove(),e.contentEl=void 0);const t=e.el;t&&(T(t,"has-error"),T(t,"has-unknown"),T(t,`has-${e.type||"unknown"}`)),e.closeBtnEl&&e.closeBtnEl.remove(),e.closeBtnEl=void 0,e.captionEl&&e.captionEl.remove(),e.captionEl=void 0,e.spinnerEl&&e.spinnerEl.remove(),e.spinnerEl=void 0}getSlide(){var e;const t=this.carousel;return((e=t==null?void 0:t.pages[t==null?void 0:t.page])===null||e===void 0?void 0:e.slides[0])||void 0}close(e,t){if(this.isClosing())return;const i=new Event("shouldClose",{bubbles:!0,cancelable:!0});if(this.emit("shouldClose",i,e),i.defaultPrevented)return;e&&e.cancelable&&(e.preventDefault(),e.stopPropagation());const n=this.fsAPI,s=()=>{this.proceedClose(e,t)};n&&n.isFullscreen()===this.container?Promise.resolve(n.exit()).then(()=>s()):s()}clearIdle(){this.idleTimer&&clearTimeout(this.idleTimer),this.idleTimer=null}setIdle(e=!1){const t=()=>{this.clearIdle(),this.idle=!0,w(this.container,"is-idle"),this.emit("setIdle")};if(this.clearIdle(),!this.isClosing())if(e)t();else{const i=this.option("idle");i&&(this.idleTimer=setTimeout(t,i))}}endIdle(){this.clearIdle(),this.idle&&!this.isClosing()&&(this.idle=!1,T(this.container,"is-idle"),this.emit("endIdle"))}resetIdle(){this.endIdle(),this.setIdle()}toggleIdle(){this.idle?this.endIdle():this.setIdle(!0)}toggleFullscreen(){const e=this.fsAPI;e&&(e.isFullscreen()?e.exit():this.container&&e.request(this.container))}isClosing(){return[O.Closing,O.CustomClosing,O.Destroy].includes(this.state)}proceedClose(e,t){var i,n;this.state=O.Closing,this.clearIdle(),this.detachEvents();const s=this.container,o=this.carousel,a=this.getSlide(),l=a&&this.option("placeFocusBack")?a.triggerEl||this.option("triggerEl"):null;if(l&&(gt(l)?Ke(l):l.focus()),s&&(w(s,"is-closing"),s.setAttribute("aria-hidden","true"),this.option("animated")&&w(s,De),s.style.pointerEvents="none"),o){o.clearTransitions(),(i=o.panzoom)===null||i===void 0||i.destroy(),(n=o.plugins.Navigation)===null||n===void 0||n.detach();for(const r of o.slides){r.state=A.Closing,this.hideLoading(r);const h=r.contentEl;h&&this.stop(h);const d=r==null?void 0:r.panzoom;d&&(d.stop(),d.detachEvents(),d.detachObserver()),this.isCurrentSlide(r)||o.emit("removeSlide",r)}}this.emit("close",e),this.state!==O.CustomClosing?(t===void 0&&a&&(t=this.optionFor(a,"hideClass")),t&&a?(this.animate(a.contentEl,t,()=>{o&&o.emit("removeSlide",a)}),setTimeout(()=>{this.destroy()},500)):this.destroy()):setTimeout(()=>{this.destroy()},500)}destroy(){var e;if(this.state===O.Destroy)return;this.state=O.Destroy,(e=this.carousel)===null||e===void 0||e.destroy();const t=this.container;t&&t.remove(),le.delete(this.id);const i=E.getInstance();i?i.focus():(R&&(R.remove(),R=null),U&&(U.remove(),U=null),T(document.documentElement,st),(()=>{if(!ce)return;const n=document,s=n.body;s.classList.remove(Re),s.style.setProperty(at,""),n.documentElement.style.setProperty(ot,"")})(),this.emit("destroy"))}static bind(e,t,i){if(!ce)return;let n,s="",o={};if(e===void 0?n=document.body:Y(e)?(n=document.body,s=e,typeof t=="object"&&(o=t||{})):(n=e,Y(t)&&(s=t),typeof i=="object"&&(o=i||{})),!n||!L(n))return;s=s||"[data-fancybox]";const a=E.openers.get(n)||new Map;a.set(s,o),E.openers.set(n,a),a.size===1&&n.addEventListener("click",E.fromEvent)}static unbind(e,t){let i,n="";if(Y(e)?(i=document.body,n=e):(i=e,Y(t)&&(n=t)),!i)return;const s=E.openers.get(i);s&&n&&s.delete(n),n&&s||(E.openers.delete(i),i.removeEventListener("click",E.fromEvent))}static destroy(){let e;for(;e=E.getInstance();)e.destroy();for(const t of E.openers.keys())t.removeEventListener("click",E.fromEvent);E.openers=new Map}static fromEvent(e){if(e.defaultPrevented||e.button&&e.button!==0||e.ctrlKey||e.metaKey||e.shiftKey)return;let t=e.composedPath()[0];const i=t.closest("[data-fancybox-trigger]");if(i){const p=i.dataset.fancyboxTrigger||"",g=document.querySelectorAll(`[data-fancybox="${p}"]`),m=parseInt(i.dataset.fancyboxIndex||"",10)||0;t=g[m]||t}if(!(t&&t instanceof Element))return;let n,s,o,a;if([...E.openers].reverse().find(([p,g])=>!(!p.contains(t)||![...g].reverse().find(([m,v])=>{let y=t.closest(m);return!!y&&(n=p,s=m,o=y,a=v,!0)}))),!n||!s||!o)return;a=a||{},e.preventDefault(),t=o;let l=[],r=z({},Be,a);r.event=e,r.triggerEl=t,r.delegate=i;const h=r.groupAll,d=r.groupAttr,u=d&&t?t.getAttribute(`${d}`):"";if((!t||u||h)&&(l=[].slice.call(n.querySelectorAll(s))),t&&!h&&(l=u?l.filter(p=>p.getAttribute(`${d}`)===u):[t]),!l.length)return;const f=E.getInstance();return f&&f.options.triggerEl&&l.indexOf(f.options.triggerEl)>-1?void 0:(t&&(r.startIndex=l.indexOf(t)),E.fromNodes(l,r))}static fromSelector(e,t,i){let n=null,s="",o={};if(Y(e)?(n=document.body,s=e,typeof t=="object"&&(o=t||{})):e instanceof HTMLElement&&Y(t)&&(n=e,s=t,typeof i=="object"&&(o=i||{})),!n||!s)return!1;const a=E.openers.get(n);return!!a&&(o=z({},a.get(s)||{},o),!!o&&E.fromNodes(Array.from(n.querySelectorAll(s)),o))}
6static fromNodes(e,t){t=z({},Be,t||{});const i=[];for(const n of e){const s=n.dataset||{},o=s[ne]||n.getAttribute(Fe)||n.getAttribute("currentSrc")||n.getAttribute(ne)||void 0;let a;const l=t.delegate;let r;l&&i.length===t.startIndex&&(a=l instanceof HTMLImageElement?l:l.querySelector("img:not([aria-hidden])")),a||(a=n instanceof HTMLImageElement?n:n.querySelector("img:not([aria-hidden])")),a&&(r=a.currentSrc||a[ne]||void 0,!r&&a.dataset&&(r=a.dataset.lazySrc||a.dataset[ne]||void 0));const h={src:o,triggerEl:n,thumbEl:a,thumbElSrc:r,thumbSrc:r};for(const d in s){let u=s[d]+"";u=u!=="false"&&(u==="true"||u),h[d]=u}i.push(h)}return new E(i,t)}static getInstance(e){return e?le.get(e):Array.from(le.values()).reverse().find(t=>!t.isClosing()&&t)||null}static getSlide(){var e;return((e=E.getInstance())===null||e===void 0?void 0:e.getSlide())||null}static show(e=[],t={}){return new E(e,t)}static next(){const e=E.getInstance();e&&e.next()}static prev(){const e=E.getInstance();e&&e.prev()}static close(e=!0,...t){if(e)for(const i of le.values())i.close(...t);else{const i=E.getInstance();i&&i.close(...t)}}}Object.defineProperty(E,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.0.28"}),Object.defineProperty(E,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:Be}),Object.defineProperty(E,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:jt}),Object.defineProperty(E,"openers",{enumerable:!0,configurable:!0,writable:!0,value:new Map});$(window).scroll(function(){$(this).scrollTop()>150?$(".header-top").addClass("sticky_active"):$(".header-top").removeClass("sticky_active")});E.bind("[data-fancybox]",{showClass:!1,hideClass:!1,dragToClose:!1,closeButton:"top",Thumbs:!1,Toolbar:!1,Carousel:{Dots:!0,Panzoom:{touch:!0},friction:0},Image:{zoom:!1,fit:"contain"}});$(document).ready(function(){$("#carriersmore").on("click",function(){$("#carriers > a").removeClass("collapsed"),$("#carriers > .product_single__expand__content").addClass("show")})});prestashop.on("updateCart",()=>{$("#saerchModalets").modal("hide")});typeof window.tooltipsLoad<"u"&&(window.matchMedia("only screen and (max-width: 760px)").matches?(window.addEventListener("scroll",window.tooltipsLoad,{passive:!0}),window.addEventListener("click",window.tooltipsLoad,{passive:!0}),window.addEventListener("mouseenter",window.tooltipsLoad,{passive:!0}),window.addEventListener("mouseleave",window.tooltipsLoad,{passive:!0})):window.tooltipsLoad());

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.