PageSourceSearch

https://globaladventuretrekking.com/_next/static/chunks/7040-25a2d1b0fcde3829.js

js globaladventuretrekking.com collected 2026-10-02 19:32:03 UTC 140,213 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7040],{37181:function(e,t,i){"use strict";var n,s,o,a,r,l,h,c,d,u,p,f;let g;i.d(t,{KR:function(){return tm}});let m=(e,t=1e4)=>Math.round(((e=parseFloat(e+"")||0)+Number.EPSILON)*t)/t,v=function(e){if(!(e&&e instanceof Element&&e.offsetParent))return!1;let t=e.scrollHeight>e.clientHeight,i=window.getComputedStyle(e).overflowY,n=-1!==i.indexOf("hidden"),s=-1!==i.indexOf("visible");return t&&!n&&!s},b=function(e,t){return!(!e||e===document.body||t&&e===t)&&(v(e)?e:b(e.parentElement,t))},y=function(e){var t=(new DOMParser).parseFromString(e,"text/html").body;if(t.childElementCount>1){for(var i=document.createElement("div");t.firstChild;)i.appendChild(t.firstChild);return i}return t.firstChild},w=e=>`${e||""}`.split(" ").filter(e=>!!e),x=(e,t,i)=>{e&&w(t).forEach(t=>{e.classList.toggle(t,i||!1)})};class E{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()}}let S={passive:!1};class P{constructor(e,{start:t=()=>!0,move:i=()=>{},end:n=()=>{}}){for(let s of(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,["onPointerStart","onTouchStart","onMove","onTouchEnd","onPointerEnd","onWindowBlur"]))this[s]=this[s].bind(this);this.element.addEventListener("mousedown",this.onPointerStart,S),this.element.addEventListener("touchstart",this.onTouchStart,S),this.element.addEventListener("touchmove",this.onMove,S),this.element.addEventListener("touchend",this.onTouchEnd),this.element.addEventListener("touchcancel",this.onTouchEnd)}onPointerStart(e){if(!e.buttons||0!==e.button)return;let t=new E(e);this.currentPointers.some(e=>e.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(let t of Array.from(e.changedTouches||[]))this.triggerPointerStart(new E(t),e);window.addEventListener("blur",this.onWindowBlur)}onMove(e){let t=this.currentPointers.slice(),i="changedTouches"in e?Array.from(e.changedTouches||[]).map(e=>new E(e)):[new E(e)],n=[];for(let e of i){let t=this.currentPointers.findIndex(t=>t.id===e.id);t<0||(n.push(e),this.currentPointers[t]=e)}n.length&&this.moveCallback(e,this.currentPointers.slice(),t)}onPointerEnd(e){e.buttons>0&&0!==e.button||(this.triggerPointerEnd(e,new E(e)),window.removeEventListener("mousemove",this.onMove),window.removeEventListener("mouseup",this.onPointerEnd),window.removeEventListener("blur",this.onWindowBlur))}onTouchEnd(e){for(let t of Array.from(e.changedTouches||[]))this.triggerPointerEnd(e,new E(t))}triggerPointerStart(e,t){return!!this.startCallback(t,e,this.currentPointers.slice())&&(this.currentPointers.push(e),this.startPointers.push(e),!0)}triggerPointerEnd(e,t){let i=this.currentPointers.findIndex(e=>e.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;){let 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,S),this.element.removeEventListener("touchstart",this.onTouchStart,S),this.element.removeEventListener("touchmove",this.onMove,S),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 C(e,t){return t?Math.sqrt(Math.pow(t.clientX-e.clientX,2)+Math.pow(t.clientY-e.clientY,2)):0}function T(e,t){return t?{clientX:(e.clientX+t.clientX)/2,clientY:(e.clientY+t.clientY)/2}:e}let M=e=>"object"==typeof e&&null!==e&&e.constructor===Object&&"[object Object]"===Object.prototype.toString.call(e),O=(e,...t)=>{let i=t.length;for(let n=0;n<i;n++)Object.entries(t[n]||{}
1).forEach(([t,i])=>{let n=Array.isArray(i)?[]:{};e[t]||Object.assign(e,{[t]:n}),M(i)?Object.assign(e[t],O(n,i)):Array.isArray(i)?Object.assign(e,{[t]:[...i]}):Object.assign(e,{[t]:i})});return e},A=function(e,t){return e.split(".").reduce((e,t)=>"object"==typeof e?e[t]:void 0,t)};class L{constructor(e={}){for(let t of(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),Object.getOwnPropertyNames(Object.getPrototypeOf(this))))t.startsWith("on")&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}setOptions(e){for(let[t,i]of(this.options=e?O({},this.constructor.defaults,e):{},Object.entries(this.option("on")||{})))this.on(t,i)}option(e,...t){let i=A(e,this.options);return i&&"function"==typeof i&&(i=i.call(this,this,...t)),i}optionFor(e,t,i,...n){var s;let o=A(t,e);"string"!=typeof(s=o)||isNaN(s)||isNaN(parseFloat(s))||(o=parseFloat(o)),"true"===o&&(o=!0),"false"===o&&(o=!1),o&&"function"==typeof o&&(o=o.call(this,this,e,...n));let a=A(t,this.options);return a&&"function"==typeof a?o=a.call(this,this,e,...n,o):void 0===o&&(o=a),void 0===o?i:o}cn(e){let t=this.options.classes;return t&&t[e]||""}localize(e,t=[]){e=String(e).replace(/\{\{(\w+).?(\w+)?\}\}/g,(e,t,i)=>{let n="";return i?n=this.option(`${t[0]+t.toLowerCase().substring(1)}.l10n.${i}`):t&&(n=this.option(`l10n.${t}`)),n||(n=e),n});for(let i=0;i<t.length;i++)e=e.split(t[i][0]).join(t[i][1]);return e=e.replace(/\{\{(.*?)\}\}/g,(e,t)=>t)}on(e,t){let i=[];"string"==typeof e?i=e.split(" "):Array.isArray(e)&&(i=e),this.events||(this.events=new Map),i.forEac
1h(e=>{let i=this.events.get(e);i||(this.events.set(e,[]),i=[]),i.includes(t)||i.push(t),this.events.set(e,i)})}off(e,t){let i=[];"string"==typeof e?i=e.split(" "):Array.isArray(e)&&(i=e),i.forEach(e=>{let i=this.events.get(e);if(Array.isArray(i)){let e=i.indexOf(t);e>-1&&i.splice(e,1)}})}emit(e,...t){[...this.events.get(e)||[]].forEach(e=>e(this,...t)),"*"!==e&&this.emit("*",e,...t)}}Object.defineProperty(L,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.0.36"}),Object.defineProperty(L,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{}});class z extends L{constructor(e={}){super(e),Object.defineProperty(this,"plugins",{enumerable:!0,configurable:!0,writable:!0,value:{}})}attachPlugins(e={}){let t=new Map;for(let[i,n]of Object.entries(e)){let e=this.option(i),s=this.plugins[i];s||!1===e?s&&!1===e&&(s.detach(),delete this.plugins[i]):t.set(i,new n(this,e||{}))}for(let[e,i]of t)this.plugins[e]=i,i.attach()}detachPlugins(e){for(let t of e=e||Object.keys(this.plugins)){let e=this.plugins[t];e&&e.detach(),delete this.plugins[t]}return this.emit("detachPlugins"),this}}(h=n||(n={}))[h.Init=0]="Init",h[h.Error=1]="Error",h[h.Ready=2]="Ready",h[h.Panning=3]="Panning",h[h.Mousemove=4]="Mousemove",h[h.Destroy=5]="Destroy";let k=["a","b","c","d","e","f"],R={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"},I='<circle cx="25" cy="25" r="20"></circle>',D='<div class="f-spinner"><svg viewBox="0 0 50 50">'+I+I+"</svg></div>",F=e=>e&&null!==e&&e instanceof Element&&"nodeType"in e,j=(e,t)=>{e&&w(t).forEach(t=>{e.classList.remove(t)})},B=(e,t)=>{e&&w(t).forEach(t=>{e.classList.add(t)})},H={a:1,b:0,c:0,d:1,e:0,f:0},N="mousemove",_="drag",$="content",W="auto",X=null,q=null;class Y extends z{get fits(){return this.contentRect.width-this.contentRect.fitWidth<1&&this.contentRect.height-this.contentRect.fitHeight<1}get isTouchDevice(){return null===q&&(q=window.matchMedia("(hover: none)").matches),q}get isMobile(){return null===X&&(X=/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)),X}get panMode(){return this.options.panMode!==N||this.isTouchDevice?_:N}get panOnlyZoomed(){let e=this.options.panOnlyZoomed;return e===W?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(){let{a:e,b:t}=this.current;return Math.sqrt(e*e+t*t)||1}get targetScale(){let{a:e,b:t}=this.target;return Math.sqrt(e*e+t*t)||1}get minScale(){return this.option("minScale")||1}get fullScale(){let{contentRect:e}=this;return e.fullWidth/e.fitWidth||1}get maxScale(){return this.fullScale*(this.option("maxScale")||1)||1}get coverScale(){let{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(){let e=this.content;return!!(e&&e instanceof HTMLImageElement)&&!e.complete}get isResting(){if(this.isBouncingX||this.isBouncingY)return!1;for(let e of k){let t="e"==e||"f"===e?1e-4:1e-5;if(Math.abs(this.target[e]-this.current[e])>t)return!1}return!(!this.ignoreBounds&&!this.checkBounds().inBounds)}constructor(e,t={},i={}){var s;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:n.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({},H)}),Object.defineProperty(this,"target",{enumerable:!0,configurable:!0,writable:!0,value:Object.assign({},H)}),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 Error("Container Element Not Found");this.container=e,this.initContent(),this.attachPlugins(Object.assign(Object.assign({}
1,Y.Plugins),i)),this.emit("attachPlugins"),this.emit("init");let o=this.content;if(o.addEventListener("load",this.onLoad),o.addEventListener("error",this.onError),this.isContentLoading){if(this.option("spinner")){e.classList.add(this.cn("isLoading"));let t=y(D);!e.contains(o)||o.parentElement instanceof HTMLPictureElement?this.spinner=e.appendChild(t):this.spinner=(null===(s=o.parentElement)||void 0===s?void 0:s.insertBefore(t,o))||null}this.emit("beforeLoad")}else queueMicrotask(()=>{this.enable()})}initContent(){let{container:e}=this,t=this.cn($),i=this.option($)||e.querySelector(`.${t}`);if(i||(i=e.querySelector("img,picture")||e.firstElementChild)&&B(i,t),i instanceof HTMLPictureElement&&(i=i.querySelector("img")),!i)throw Error("No content found");this.content=i}onLoad(){let{spinner:e,container:t,state:i}=this;e&&(e.remove(),this.spinner=null),this.option("spinner")&&t.classList.remove(this.cn("isLoading")),this.emit("afterLoad"),i===n.Init?this.enable():this.updateMetrics()}onError(){this.state!==n.Destroy&&(this.spinner&&(this.spinner.remove(),this.spinner=null),this.stop(),this.detachEvents(),this.state=n.Error,this.emit("error"))}getNextScale(e){let{fullScale:t,targetScale:i,coverScale:n,maxScale:s,minScale:o}=this,a=o;switch(e){case"toggleMax":a=i-o<.5*(s-o)?s:o;break;case"toggleCover":a=i-o<.5*(n-o)?n:o;break;case"toggleZoom":a=i-o<.5*(t-o)?t:o;break;case"iterateZoom":let r=[1,t,s].sort((e,t)=>e-t),l=r.findIndex(e=>e>i+1e-5);a=r[l]||1}return a}attachObserver(){var e;let t=()=>{let{container:e,containerRect:t}=this;return Math.abs(t.width-e.getBoundingClientRect().width)>.1||Math.abs(t.height-e.getBoundingClientRect().height)>.1};this.resizeObserver||void 0===window.ResizeObserver||(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))})),null===(e=this.resizeObserver)||void 0===e||e.observe(this.container)}detachObserver(){var e;null===(e=this.resizeObserver)||void 0===e||e.disconnect()}attachEvents(){let{container:e}=this;e.addEventListener("click",this.onClick,{passive:!1,capture:!1}),e.addEventListener("wheel",this.onWheel,{passive:!1}),this.pointerTracker=new P(e,{start:this.onPointerDown,move:this.onPointerMove,end:this.onPointerUp}),document.addEventListener(N,this.onMouseMove)}detachEvents(){var e;let{container:t}=this;t.removeEventListener("click",this.onClick,{passive:!1,capture:!1}),t.removeEventListener("wheel",this.onWheel,{passive:!1}),null===(e=this.pointerTracker)||void 0===e||e.stop(),this.pointerTracker=null,document.removeEventListener(N,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();let e=this.friction,t=this.option("maxVelocity");for(let i of k)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(let e of k)"e"===e&&this.isBouncingX||"f"===e&&this.isBouncingY||(this.velocity[e]=(1/(1-this.friction)-1)*(this.target[e]-this.current[e]))}checkBounds(e=0,t=0){let{current:i}=this,n=i.e+e,s=i.f+t,o=this.getBounds(),{x:a,y:r}=o,l=a.min,h=a.max,c=r.min,d=r.max,u=0,p=0;return l!==1/0&&n<l?u=l-n:h!==1/0&&n>h&&(u=h-n),c!==1/0&&s<c?p=c-s:d!==1/0&&s>d&&(p=d-s),1e-4>Math.abs(u)&&(u=0),1e-4>Math.abs(p)&&(p=0),Object.assign(Object.assign({},o),{xDiff:u,yDiff:p,inBounds:!u&&!p})}clampTargetBounds(){let{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){let{content:t,contentRect:i}=this,{fitWidth:n,fitHeight:s,fullWidth:o,fullHeight:a}=i,r=o,l=a;
1if(this.option("zoom")||0!==this.angle){let i=!(t instanceof HTMLImageElement)&&("none"===window.getComputedStyle(t).maxWidth||"none"===window.getComputedStyle(t).maxHeight),h=i?o:n,c=i?a:s,d=this.getMatrix(e),u=new DOMPoint(0,0).matrixTransform(d),p=new DOMPoint(0+h,0).matrixTransform(d),f=new DOMPoint(0+h,0+c).matrixTransform(d),g=new DOMPoint(0,0+c).matrixTransform(d),m=Math.abs(f.x-u.x),v=Math.abs(f.y-u.y),b=Math.abs(g.x-p.x),y=Math.abs(g.y-p.y);r=Math.max(m,b),l=Math.max(v,y)}return{contentWidth:r,contentHeight:l}}setEdgeForce(){if(this.ignoreBounds||this.isDragging||this.panMode===N||this.targetScale<this.scale)return this.isBouncingX=!1,void(this.isBouncingY=!1);let{target:e}=this,{x:t,y:i,xDiff:n,yDiff:s}=this.checkBounds(),o=this.option("maxVelocity"),a=this.velocity.e,r=this.velocity.f;0!==n?(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,0!==s?(this.isBouncingY=!0,s*r<=0?r+=.14*s:(r=.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&&(r=Math.max(Math.min(r,o),-1*o))):this.isBouncingY=!1,this.isBouncingX&&(this.velocity.e=a),this.isBouncingY&&(this.velocity.f=r)}enable(){let{content:e}=this,t=new DOMMatrixReadOnly(window.getComputedStyle(e).transform);for(let e of k)this.current[e]=this.target[e]=t[e];this.updateMetrics(),this.attachObserver(),this.attachEvents(),this.state=n.Ready,this.emit("ready")}onClick(e){var t;"click"===e.type&&0===e.detail&&(this.dragOffset.x=0,this.dragOffset.y=0),this.isDragging&&(null===(t=this.pointerTracker)||void 0===t||t.clear(),this.trackingPoints=[],this.startDecelAnim());let i=e.target;if(!i||e.defaultPrevented)return;if(i.hasAttribute("disabled"))return e.preventDefault(),void e.stopPropagation();if((()=>{let e=window.getSelection();return e&&"Range"===e.type})()&&!i.closest("button"))return;let n=i.closest("[data-panzoom-action]"),s=i.closest("[data-panzoom-change]"),o=n||s,a=o&&F(o)?o.dataset:null;if(a){let t=a.panzoomChange,i=a.panzoomAction;if((t||i)&&e.preventDefault(),t){let e={};try{e=JSON.parse(t)}catch(e){console&&console.warn("The given data was not valid JSON")}return void this.applyChange(e)}if(i)return void(this[i]&&this[i]())}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;let r=this.content.getBoundingClientRect(),l=this.dragStart;if(l.time&&!this.canZoomOut()&&(Math.abs(r.x-l.x)>2||Math.abs(r.y-l.y)>2))return;this.dragStart.time=0;let h=t=>{this.option("zoom",e)&&t&&"string"==typeof t&&/(iterateZoom)|(toggle(Zoom|Full|Cover|Max)|(zoomTo(Fit|Cover|Max)))/.test(t)&&"function"==typeof this[t]&&(e.preventDefault(),this[t]({event:e}))},c=this.option("click",e),d=this.option("dblClick",e);d?(this.clicks++,1==this.clicks&&(this.clickTimer=setTimeout(()=>{1===this.clicks?(this.emit("click",e),!e.defaultPrevented&&c&&h(c)):(this.emit("dblClick",e),e.defaultPrevented||h(d)),this.clicks=0,this.clickTimer=null},350))):(this.emit("click",e),!e.defaultPrevented&&c&&h(c))}addTrackingPoint(e){let t=this.trackingPoints.filter(e=>e.time>Date.now()-100);t.push(e),this.trackingPoints=t}onPointerDown(e,t,i){var n;if(!1===this.option("touch",e))return!1;this.pwt=0,this.dragOffset={x:0,y:0,time:0},this.trackingPoints=[];let 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===N&&this.targetScale>1)return e.preventDefault(),e.stopPropagation(),!1;let 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;null===(n=window.getSelection())||void 0===n||n.removeAllRanges()}if("mousedown"===e.type)["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
1("touchStart",e)),!0}onPointerMove(e,t,i){if(!1===this.option("touch",e)||!this.isDragging||t.length<2&&this.panOnlyZoomed&&m(this.targetScale)<=m(this.minScale)||(this.emit("touchMove",e),e.defaultPrevented))return;this.addTrackingPoint(t[0]);let{content:n}=this,s=T(i[0],i[1]),o=T(t[0],t[1]),a=0,r=0;if(t.length>1){let e=n.getBoundingClientRect();a=s.clientX-e.left-.5*e.width,r=s.clientY-e.top-.5*e.height}let l=C(i[0],i[1]),h=C(t[0],t[1]),c=l?h/l:1,d=o.clientX-s.clientX,u=o.clientY-s.clientY;this.dragOffset.x+=d,this.dragOffset.y+=u,this.dragOffset.time=Date.now()-this.dragStart.time;let p=m(this.targetScale)===m(this.minScale)&&this.option("lockAxis");if(p&&!this.lockedAxis){if("xy"===p||"y"===p||"touchmove"===e.type){if(6>Math.abs(this.dragOffset.x)&&6>Math.abs(this.dragOffset.y))return void e.preventDefault();let t=Math.abs(180*Math.atan2(this.dragOffset.y,this.dragOffset.x)/Math.PI);this.lockedAxis=t>45&&t<135?"y":"x",this.dragOffset.x=0,this.dragOffset.y=0,d=0,u=0}else this.lockedAxis=p}if(b(e.target,this.content)&&(p="x",this.dragOffset.y=0),p&&"xy"!==p&&this.lockedAxis!==p&&m(this.targetScale)===m(this.minScale))return;e.cancelable&&e.preventDefault(),this.container.classList.add(this.cn("isDragging"));let f=this.checkBounds(d,u);this.option("rubberband")?("x"!==this.isInfinite&&(f.xDiff>0&&d<0||f.xDiff<0&&d>0)&&(d*=Math.max(0,.5-Math.abs(.75/this.contentRect.fitWidth*f.xDiff))),"y"!==this.isInfinite&&(f.yDiff>0&&u<0||f.yDiff<0&&u>0)&&(u*=Math.max(0,.5-Math.abs(.75/this.contentRect.fitHeight*f.yDiff)))):(f.xDiff&&(d=0),f.yDiff&&(u=0));let g=this.targetScale,v=this.minScale,y=this.maxScale;g<.5*v&&(c=Math.max(c,v)),g>1.5*y&&(c=Math.min(c,y)),"y"===this.lockedAxis&&m(g)===m(v)&&(d=0),"x"===this.lockedAxis&&m(g)===m(v)&&(u=0),this.applyChange({originX:a,originY:r,panX:d,panY:u,scale:c,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=[]),b(e.target,this.content)&&"y"===this.lockedAxis&&(this.trackingPoints=[]),this.emit("touchEnd",e),this.isDragging=!1,this.lockedAxis=!1,this.state!==n.Destroy&&(e.defaultPrevented||this.startDecelAnim()))}startDecelAnim(){var e;let t=this.isScaling;for(let e of(this.rAF&&(cancelAnimationFrame(this.rAF),this.rAF=null),this.isBouncingX=!1,this.isBouncingY=!1,k))this.velocity[e]=0;this.target.e=this.current.e,this.target.f=this.current.f,j(this.container,"is-scaling"),j(this.container,"is-animating"),this.isTicking=!1;let{trackingPoints:i}=this,n=i[0],s=i[i.length-1],o=0,a=0,r=0;s&&n&&(o=s.clientX-n.clientX,a=s.clientY-n.clientY,r=s.time-n.time);let l=(null===(e=window.visualViewport)||void 0===e?void 0:e.scale)||1;1!==l&&(o*=l,a*=l);let h=0,c=0,d=0,u=0,p=this.option("decelFriction"),f=this.targetScale;if(r>0){d=Math.abs(o)>3?o/(r/30):0,u=Math.abs(a)>3?a/(r/30):0;let e=this.option("maxVelocity");e&&(d=Math.max(Math.min(d,e),-1*e),u=Math.max(Math.min(u,e),-1*e))}d&&(h=d/(1/(1-p)-1)),u&&(c=u/(1/(1-p)-1)),("y"===this.option("lockAxis")||"xy"===this.option("lockAxis")&&"y"===this.lockedAxis&&m(f)===this.minScale)&&(h=d=0),("x"===this.option("lockAxis")||"xy"===this.option("lockAxis")&&"x"===this.lockedAxis&&m(f)===this.minScale)&&(c=u=0);let g=this.dragOffset.x,v=this.dragOffset.y,b=this.option("dragMinThreshold")||0;Math.abs(g)<b&&Math.abs(v)<b&&(h=c=0,d=u=0),(this.option("zoom")&&(f<this.minScale-1e-5||f>this.maxScale+1e-5)||t&&!h&&!c)&&(p=.35),this.applyChange({panX:h,panY:c,friction:p}),this.emit("decel",d,u,g,v)}onWheel(e){var t=[-e.deltaX||0,-e.deltaY||0,-e.detail||0].reduce(function(e,t){return Math.abs(t)>Math.abs(e)?t:e});if(this.emit("wheel",e,Math.max(-1,Math.min(1,t))),this.panMode===N||e.defaultPrevented)return;let i=this.option("wheel");"pan"===i?(e.preventDefault(),this.panOnlyZoomed&&!this.canZoomOut()||this.applyChange({panX:-(2*e.deltaX),panY:-(2*e.deltaY),bounce:!1})):"zoom"===i&&!1!==this.option("zoom")&&this.zoomWithWheel(e)}onMouseMove(e){this.panWithMouse(e)}onKeydown(e){"Escape"===e.key&&this.toggleFS()}onResize(){this.updateMetrics(),this.checkBounds().inBounds||this.requestTick()}
1setTransform(){this.emit("beforeTransform");let{current:e,target:t,content:i,contentRect:n}=this,s=Object.assign({},H);for(let i of k){let n="e"==i||"f"===i?1e4:1e5;s[i]=m(e[i],n),Math.abs(t[i]-e[i])<("e"==i||"f"===i?.51:.001)&&(e[i]=t[i])}let{a:o,b:a,c:r,d:l,e:h,f:c}=s,d=`matrix(${o}, ${a}, ${r}, ${l}, ${h}, ${c})`,u=i.parentElement instanceof HTMLPictureElement?i.parentElement:i;if(this.option("transformParent")&&(u=u.parentElement||u),u.style.transform===d)return;u.style.transform=d;let{contentWidth:p,contentHeight:f}=this.calculateContentDim();n.width=p,n.height=f,this.emit("afterTransform")}updateMetrics(e=!1){var t;if(!this||this.state===n.Destroy||this.isContentLoading)return;let i=Math.max(1,(null===(t=window.visualViewport)||void 0===t?void 0:t.scale)||1),{container:s,content:o}=this,a=o instanceof HTMLImageElement,r=s.getBoundingClientRect(),l=getComputedStyle(this.container),h=r.width*i,c=r.height*i,d=parseFloat(l.paddingTop)+parseFloat(l.paddingBottom),u=h-(parseFloat(l.paddingLeft)+parseFloat(l.paddingRight));this.containerRect={width:h,height:c,innerWidth:u,innerHeight:c-d};let p=parseFloat(o.dataset.width||"")||(o instanceof HTMLImageElement?o.naturalWidth:o instanceof SVGElement?o.width.baseVal.value:Math.max(o.offsetWidth,o.scrollWidth))||0,f=parseFloat(o.dataset.height||"")||(o instanceof HTMLImageElement?o.naturalHeight:o instanceof SVGElement?o.height.baseVal.value:Math.max(o.offsetHeight,o.scrollHeight))||0,g=this.option("width",p)||W,v=this.option("height",f)||W,b=g===W,y=v===W;"number"!=typeof g&&(g=p),"number"!=typeof v&&(v=f),b&&(g=v/f*p),y&&(v=f/(p/g));let w=o.parentElement instanceof HTMLPictureElement?o.parentElement:o;this.option("transformParent")&&(w=w.parentElement||w);let x=w.getAttribute("style")||"";w.style.setProperty("transform","none","important"),a&&(w.style.width="",w.style.height=""),w.offsetHeight;let E=o.getBoundingClientRect(),S=E.width*i,P=E.height*i,C=S,T=P;S=Math.min(S,g),P=Math.min(P,v),a?{width:S,height:P}=((e,t,i,n)=>{let s=Math.min(i/e,n/t);return{width:e*=s,height:t*=s}})(g,v,S,P):(S=Math.min(S,g),P=Math.min(P,v));let M=.5*(T-P),O=.5*(C-S);this.contentRect=Object.assign(Object.assign({},this.contentRect),{top:E.top-r.top+M,bottom:r.bottom-E.bottom+M,left:E.left-r.left+O,right:r.right-E.right+O,fitWidth:S,fitHeight:P,width:S,height:P,fullWidth:g,fullHeight:v}),w.style.cssText=x,a&&(w.style.width=`${S}px`,w.style.height=`${P}px`),this.setTransform(),!0!==e&&this.emit("refresh"),this.ignoreBounds||(m(this.targetScale)<m(this.minScale)?this.zoomTo(this.minScale,{friction:0}):this.targetScale>this.maxScale?this.zoomTo(this.maxScale,{friction:0}):this.state===n.Init||this.checkBounds().inBounds||this.requestTick()),this.updateControls()}calculateBounds(){let{contentWidth:e,contentHeight:t}=this.calculateContentDim(this.target),{targetScale:i,lockedAxis:n}=this,{fitWidth:s,fitHeight:o}=this.contentRect,a=0,r=0,l=0,h=0,c=this.option("infinite");if(!0===c||n&&c===n)a=-1/0,l=1/0,r=-1/0,h=1/0;else{let{containerRect:n,contentRect:c}=this,d=m(s*i,1e4),u=m(o*i,1e4),{innerWidth:p,innerHeight:f}=n;if(n.width===d&&(p=n.width),n.width===u&&(f=n.height),e>p){a=-1*(l=.5*(e-p));let t=.5*(c.right-c.left);a+=t,l+=t}if(s>p&&e<p&&(a-=.5*(s-p),l-=.5*(s-p)),t>f){r=-1*(h=.5*(t-f));let e=.5*(c.bottom-c.top);r+=e,h+=e}o>f&&t<f&&(a-=.5*(o-f),l-=.5*(o-f))}return{x:{min:a,max:l},y:{min:r,max:h}}}getBounds(){let e=this.option("bounds");return e!==W?e:this.calculateBounds()}updateControls(){let e=this.container,{panMode:t,contentRect:i,targetScale:n,minScale:s}=this,o=s,a=this.option("click")||!1;a&&(o=this.getNextScale(a));let r=this.canZoomIn(),l=this.canZoomOut(),h=t===_&&!!this.option("touch"),c=l&&h;if(h&&(m(n)<m(s)&&!this.panOnlyZoomed&&(c=!0),(m(i.width,1)>m(i.fitWidth,1)||m(i.height,1)>m(i.fitHeight,1))&&(c=!0)),m(i.width*n,1)<m(i.fitWidth,1)&&(c=!1),t===N&&(c=!1),x(e,this.cn("isDraggable"),c),!this.option("zoom"))return;let d=r&&m(o)>m(n),u=!d&&!c&&l&&m(o)<m(n);for(let t of(x(e,this.cn("canZoomIn"),d),x(e,this.cn("canZoomOut"),u),e.querySelectorAll("[data-panzoom-action]"))){let e=!1,i=!1;switch(t.dataset.panzoomAction){case"zoomIn":r?e=!0:i=!0;break;case"zoomOut":l?e=!0:i=!0;break;case"toggleZoom":case"iterateZoom":r||l?e=!0:i=!0;let n=t.querySelector("g");n&&(n.style.display=r?"":"none")}e?(t.removeAttribute("disabled"),t.removeAttribute("tabindex")):i&&(t.setAttribute("disabled",""),t.setAttribute("tabindex","-1"))}}panTo({x:e=this.target.e,y:t=this.target.f,scale:i=this.targetScale,friction:s=this.option("friction"),angle:o=0,originX:a=0,originY:r=0,flipX:l=!1,flipY:h=!1,ignoreBounds:c=!1}){this.state!==n.Destroy&&this.applyChange({panX:e-this.target.e,panY:t-this.target.f,scale:i/this.targetScale,angle:o,originX:a,originY:r,friction:s,flipX:l,flipY:h,ignoreBounds:c})}applyChange({panX:e=0,panY:t=0,scale:i=1,angle:s=0,originX:o=-this.current.e,originY:a=-this.current.f,friction:r=this.option("friction"),flipX:l=!1,flipY:h=!1,ignoreBounds:c=!1,bounce:d=this.option("bounce")}){let u=this.state;if(u===n.Destroy)return;this.rAF&&(cancelAnimationFrame(this.rAF),this.rAF=null),this.friction=r||0,this.ignoreBounds=c;let{current:p}=this,f=p.e,g=p.f,v=this.getMatrix(this.target),b=(new DOMMatrix).translate(f,g).translate(o,a).translate(e,t);
1if(this.option("zoom")){if(!c){let e=this.targetScale,t=this.minScale,n=this.maxScale;e*i<t&&(i=t/e),e*i>n&&(i=n/e)}b=b.scale(i)}for(let e of(b=b.translate(-o,-a).translate(-f,-g).multiply(v),s&&(b=b.rotate(s)),l&&(b=b.scale(-1,1)),h&&(b=b.scale(1,-1)),k))"e"!==e&&"f"!==e&&(b[e]>this.minScale+1e-5||b[e]<this.minScale-1e-5)?this.target[e]=b[e]:this.target[e]=m(b[e],1e4);(this.targetScale<this.scale||Math.abs(i-1)>.1||this.panMode===N||!1===d)&&!c&&this.clampTargetBounds(),u===n.Init?this.animate():this.isResting||(this.state=n.Panning,this.requestTick())}stop(e=!1){if(this.state===n.Init||this.state===n.Destroy)return;let t=this.isTicking;for(let t of(this.rAF&&(cancelAnimationFrame(this.rAF),this.rAF=null),this.isBouncingX=!1,this.isBouncingY=!1,k))this.velocity[t]=0,"current"===e?this.current[t]=this.target[t]:"target"===e&&(this.target[t]=this.current[t]);this.setTransform(),j(this.container,"is-scaling"),j(this.container,"is-animating"),this.isTicking=!1,this.state=n.Ready,t&&(this.emit("endAnimation"),this.updateControls())}
1requestTick(){this.isTicking||(this.emit("startAnimation"),this.updateControls(),B(this.container,"is-animating"),this.isScaling&&B(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!==N||!e||m(this.targetScale)<=m(this.minScale))return;this.emit("mouseMove",e);let{container:i,containerRect:n,contentRect:s}=this,o=n.width,a=n.height,r=i.getBoundingClientRect(),l=(e.clientX||0)-r.left,h=(e.clientY||0)-r.top,{contentWidth:c,contentHeight:d}=this.calculateContentDim(this.target),u=this.option("mouseMoveFactor");u>1&&(c!==o&&(c*=u),d!==a&&(d*=u));let p=.5*(c-o)-l/o*100/100*(c-o);p+=.5*(s.right-s.left);let f=.5*(d-a)-h/a*100/100*(d-a);f+=.5*(s.bottom-s.top),this.applyChange({panX:p-this.target.e,panY:f-this.target.f,friction:t})}zoomWithWheel(e){if(this.state===n.Destroy||this.state===n.Init)return;let t=Date.now();if(t-this.pwt<45)return void e.preventDefault();this.pwt=t;let i=Math.max(-1,Math.min(1,[-e.deltaX||0,-e.deltaY||0,-e.detail||0].reduce(function(e,t){return Math.abs(t)>Math.abs(e)?t:e}))),{targetScale:s,maxScale:o,minScale:a}=this,r=s*(100+45*i)/100;m(r)<m(a)&&m(s)<=m(a)?(this.cwd+=Math.abs(i),r=a):m(r)>m(o)&&m(s)>=m(o)?(this.cwd+=Math.abs(i),r=o):(this.cwd=0,r=Math.max(Math.min(r,o),a)),this.cwd>this.option("wheelLimit")||(e.preventDefault(),m(r)!==m(s)&&this.zoomTo(r,{event:e}))}canZoomIn(){return this.option("zoom")&&(m(this.contentRect.width,1)<m(this.contentRect.fitWidth,1)||m(this.targetScale)<m(this.maxScale))}canZoomOut(){return this.option("zoom")&&m(this.targetScale)>m(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.getNextScale("toggleZoom"),e)}toggleMax(e){this.zoomTo(this.getNextScale("toggleMax"),e)}toggleCover(e){this.zoomTo(this.getNextScale("toggleCover"),e)}iterateZoom(e){this.zoomTo("next",e)}zoomTo(e=1,{friction:t=W,originX:i=W,originY:s=W,event:o}={}){if(this.isContentLoading||this.state===n.Destroy)return;let{targetScale:a,fullScale:r,maxScale:l,coverScale:h}=this;if(this.stop(),this.panMode===N&&(o=this.pmme||o),o||i===W||s===W){let e=this.content.getBoundingClientRect(),t=this.container.getBoundingClientRect(),n=o?o.clientX:t.left+.5*t.width,a=o?o.clientY:t.top+.5*t.height;i=n-e.left-.5*e.width,s=a-e.top-.5*e.height}let c=1;"number"==typeof e?c=e:"full"===e?c=r:"cover"===e?c=h:"max"===e?c=l:"fit"===e?c=1:"next"===e&&(c=this.getNextScale("iterateZoom")),c=c/a||1,t=t===W?c>1?.15:.25:t,this.applyChange({scale:c,originX:i,originY:s,friction:t}),o&&this.panMode===N&&this.panWithMouse(o,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");let{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");let{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(){let{container:e}=this,t=this.cn("inFullscreen"),i=this.cn("htmlHasFullscreen");e.classList.toggle(t);let 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(n?"enterFS":"exitFS")}getMatrix(e=this.current){let{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!==n.Init&&this.state!==n.Destroy){for(let e of(this.stop("current"),k))this.target[e]=H[e];this.target.a=this.minScale,this.target.d=this.minScale,this.clampTargetBounds(),this.isResting||(this.friction=void 0===e?this.option("friction"):e,this.state=n.Panning,this.requestTick())}}destroy(){this.stop(),this.state=n.Destroy,this.detachEvents(),this.detachObserver();let{container:e,content:t}=this;for(let t of Object.values(this.option("classes")||{}))e.classList.remove(t+"");t&&(t.removeEventListener("load",this.onLoad),t.removeEventListener("error",this.onError)),this.detachPlugins()}}Object.defineProperty(Y,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{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:R}}),Object.defineProperty(Y,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:{}});let V=function(e,t){let i=!0;return(...n)=>{i&&(i=!1,e(...n),setTimeout(()=>{i=!0},t))}},Z=(e,t)=>{let i=[];
1return e.childNodes.forEach(e=>{e.nodeType!==Node.ELEMENT_NODE||t&&!e.matches(t)||i.push(e)}),i};(c=s||(s={}))[c.Init=0]="Init",c[c.Ready=1]="Ready",c[c.Destroy=2]="Destroy";let U=e=>{if("string"==typeof e||e instanceof HTMLElement)e={html:e};else{let t=e.thumb;void 0!==t&&("string"==typeof t&&(e.thumbSrc=t),t instanceof HTMLImageElement&&(e.thumbEl=t,e.thumbElSrc=t.src,e.thumbSrc=t.src),delete e.thumb)}return Object.assign({html:"",el:null,isDom:!1,class:"",customClass:"",index:-1,dim:0,gap:0,pos:0,transition:!1},e)},G=(e={})=>Object.assign({index:-1,slides:[],dim:0,pos:-1},e);class K extends L{constructor(e,t){super(t),Object.defineProperty(this,"instance",{enumerable:!0,configurable:!0,writable:!0,value:e})}attach(){}detach(){}}class J extends K{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){B(e=document.createElement("ul"),this.cn("list")),e.setAttribute("role","tablist");let t=this.instance.container;t.appendChild(e),B(t,this.cn("hasDots")),this.list=e}return e}refresh(){var e;let 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();let o="number"==typeof s&&t>5&&t>=s,a=!this.list||this.isDynamic!==o||this.list.children.length!==t;a&&this.cleanup();let r=this.build();if(x(r,this.cn("isDynamic"),!!o),a)for(let e=0;e<t;e++)r.append(this.createItem(e));let l,h=0;for(let t of[...r.children]){let i=h===this.instance.page;for(let n of(i&&(l=t),x(t,this.cn("isCurrent"),i),null===(e=t.children[0])||void 0===e||e.setAttribute("aria-selected",i?"true":"false"),["isBeforePrev","isPrev","isNext","isAfterNext"]))j(t,this.cn(n));h++}if(l=l||r.firstChild,o&&l){let e=l.previousElementSibling,t=e&&e.previousElementSibling;B(e,this.cn("isPrev")),B(t,this.cn("isBeforePrev"));let i=l.nextElementSibling,n=i&&i.nextElementSibling;B(i,this.cn("isNext")),B(n,this.cn("isAfterNext"))}this.isDynamic=o}createItem(e=0){var t;let i=document.createElement("li");i.setAttribute("role","presentation");let n=y(this.instance.localize(this.option("dotTpl"),[["%d",e+1]]).replace(/\%i/g,e+""));return i.appendChild(n),null===(t=i.children[0])||void 0===t||t.setAttribute("role","tab"),i}cleanup(){this.list&&(this.list.remove(),this.list=null),this.isDynamic=!1,j(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(J,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{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}});let Q="disabled",ee="next",et="prev";class ei extends K{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(){let 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(Q),s.removeAttribute(Q),e.isInfinite||(i<=0&&n.setAttribute(Q,""),i>=t-1&&s.setAttribute(Q,"")))}addBtn(e){var t;let i=this.instance,n=document.createElement("button");n.setAttribute("tabindex","0"),n.setAttribute("title",i.localize(`{{${e.toUpperCase()}}}`)),B(n,this.cn("button")+" "+this.cn(e===ee?"isNext":"isPrev"));let s=i.isRTL?e===ee?et:ee:e;return n.innerHTML=i.localize(this.option(`${s}Tpl`)),n.dataset[`carousel${e?e.match("^[a-z]")?e.charAt(0).toUpperCase()+e.substring(1):e:""}`]="true",null===(t=this.container)||void 0===t||t.appendChild(n),n}build(){let e=this.instance.container,t=this.cn("container"),{container:i,prev:n,next:s}=this;i||(i=e.querySelector("."+t),this.isDom=!!i),i||(B(i=document.createElement("div"),t),e.appendChild(i)),this.container=i,s||(s=i.querySelector("[data-carousel-next]")),s||(s=this.addBtn(ee)),this.next=s,n||(n=i.querySelector("[data-carousel-prev]")),n||(n=this.addBtn(et)),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(ei,"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 en extends K{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(){let{nav:e,target:t}=this;e&&t&&(e.options.initialSlide=t.options.initialPage,e.state===s.Ready?this.onNavReady(e):e.on("ready",this.onNavReady),t.state===s.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;let o=i.target,{nav:a,target:r}=this;if(!a||!r||!o)return;let l=o.closest("[data-index]");if(i.stopPropagation(),i.preventDefault(),!l)return;let h=parseInt(l.dataset.index||"",10)||0,c=r.getPageForSlide(h),d=a.getPageForSlide(h);a.slideTo(d),r.slideTo(c,{friction:(null===(s=null===(n=this.nav)||void 0===n?void 0:n.plugins)||void 0===s?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;let{target:i,nav:n}=this;if(!i||!n||n.state!==s.Ready||i.state!==s.Ready)return;let o=null===(t=null===(e=i.pages[i.page])||void 0===e?void 0:e.slides[0])||void 0===t?void 0:t.index,a=n.getPageForSlide(o);this.markSelectedSlide(o),n.slideTo(a,null===n.prevPage&&null===i.prevPage?{friction:0}:void 0)}markSelectedSlide(e){let t=this.nav;t&&t.state===s.Ready&&(this.selectedIndex=e,[...t.slides].map(t=>{t.el&&t.el.classList[t.index===e?"add":"remove"]("is-nav-selected")}))}attach(){let e=this.options.target,t=this.options.nav;e?this.addAsNavFor(e):t&&this.addAsTargetFor(t)}detach(){let e=this.nav,t=this.target;e&&(e.off("ready",this.onNavReady),e.off("createSlide",this.onNavCreateSlide),e.off("Panzoom.click",this.onNavClick),e.off("Panzoom.touchEnd",this.onNavTouch)),this.nav=null,t&&(t.off("ready",this.onTargetReady),t.off("refresh",this.onTargetChange),t.off("change",this.onTargetChange)),this.target=null}}Object.defineProperty(en,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{friction:.35}});let es="animationend",eo="isSelected",ea="slide";class er extends z{get axis(){return this.isHorizontal?"e":"f"}get isEnabled(){return this.state===s.Ready}get isInfinite(){let e=!1,{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"rtl"===this.option("direction")}get isHorizontal(){return"x"===this.option("axis")}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:s.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}),"string"==typeof e&&(e=document.querySelector(e)),!e||!F(e))throw Error("No Element found");this.container=e,this.slideNext=V(this.slideNext.bind(this),150),this.slidePrev=V(this.slidePrev.bind(this),150),this.userOptions=t,this.userPlugins=i,queueMicrotask(()=>{this.processOptions()})}processOptions(){var e,t;let i=O({},er.defaults,this.userOptions),n="",o=i.breakpoints;if(o&&M(o))for(let[e,t]of Object.entries(o))window.matchMedia(e).matches&&M(t)&&(n+=e,O(i,t));n===this.bp&&this.state!==s.Init||(this.bp=n,this.state===s.Ready&&(i.initialSlide=(null===(t=null===(e=this.pages[this.page])||void 0===e?void 0:e.slides[0])||void 0===t?void 0:t.index)||0),this.state!==s.Init&&this.destroy(),super.setOptions(i),!1===this.option("enabled")?this.attachEvents():setTimeout(()=>{this.init()},0))}
1init(){this.state=s.Init,this.emit("init"),this.attachPlugins(Object.assign(Object.assign({},er.Plugins),this.userPlugins)),this.emit("attachPlugins"),this.initLayout(),this.initSlides(),this.updateMetrics(),this.setInitialPosition(),this.initPanzoom(),this.attachEvents(),this.state=s.Ready,this.emit("ready")}initLayout(){let{container:e}=this,t=this.option("classes");B(e,this.cn("container")),x(e,t.isLTR,!this.isRTL),x(e,t.isRTL,this.isRTL),x(e,t.isVertical,!this.isHorizontal),x(e,t.isHorizontal,this.isHorizontal);let i=this.option("viewport")||e.querySelector(`.${t.viewport}`);i||(B(i=document.createElement("div"),t.viewport),i.append(...Z(e,`.${t.slide}`)),e.prepend(i)),i.addEventListener("scroll",this.onScroll);let n=this.option("track")||e.querySelector(`.${t.track}`);n||(B(n=document.createElement("div"),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(){let{track:e}=this;if(!e)return;let t=[...this.slides],i=[];for(let n of([...Z(e,`.${this.cn(ea)}`)].forEach(e=>{if(F(e)){let t=U({el:e,isDom:!0,index:this.slides.length});i.push(t)}}),[...this.option("slides",[])||[],...t]))i.push(U(n));this.slides=i;for(let e=0;e<this.slides.length;e++)this.slides[e].index=e;
1for(let e of i)this.emit("beforeInitSlide",e,e.index),this.emit("initSlide",e,e.index);this.emit("initSlides")}setInitialPage(){let e=this.option("initialSlide");this.page="number"==typeof e?this.getPageForSlide(e):parseInt(this.option("initialPage",0)+"",10)||0}setInitialPosition(){let{track:e,pages:t,isHorizontal:i}=this;if(!e||!t.length)return;let n=this.page;t[n]||(this.page=n=0);let 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);let e=this.option("Panzoom")||{};this.panzoom=new Y(this.viewport,O({},{content:this.track,zoom:!1,panOnlyZoomed:!1,lockAxis:this.isHorizontal?"x":"y",infinite:this.isInfinite,click:!1,dblClick:!1,touch:e=>!(this.pages.length<2&&!e.options.infinite),bounds:()=>this.getBounds(),maxVelocity:e=>Math.abs(e.target[this.axis]-e.current[this.axis])<2*this.viewportDim?100:0},e)),this.panzoom.on("*",(e,t,...i)=>{this.emit(`Panzoom.${t}`,e,...i)}),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(){let 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=[],{contentDim:t,viewportDim:i}=this,n=this.option("slidesPerPage");n=("auto"===n||t<=i)&&!1!==this.option("fill")?1/0:parseFloat(n+"");let s=0,o=0,a=0;for(let t of this.slides)(!e.length||o+t.dim-i>.05||a>=n)&&(e.push(G()),s=e.length-1,o=0,a=0),e[s].slides.push(t),o+=t.dim+t.gap,a++;return e}processPages(){let e;let t=this.pages,{contentDim:i,viewportDim:n,isInfinite:s}=this,o=this.option("center"),a=this.option("fill"),r=a&&o&&i>n&&!s;if(t.forEach((e,t)=>{var s;for(let[i,n]of(e.index=t,e.pos=(null===(s=e.slides[0])||void 0===s?void 0:s.pos)||0,e.dim=0,e.slides.entries()))e.dim+=n.dim,i<e.slides.length-1&&(e.dim+=n.gap);r&&e.pos+.5*e.dim<.5*n?e.pos=0:r&&e.pos+.5*e.dim>=i-.5*n?e.pos=i-n:o&&(e.pos+=-.5*(n-e.dim))}),t.forEach(e=>{a&&!s&&i>n&&(e.pos=Math.max(e.pos,0),e.pos=Math.min(e.pos,i-n)),e.pos=m(e.pos,1e3),e.dim=m(e.dim,1e3),.1>=Math.abs(e.pos)&&(e.pos=0)}),s)return t;let l=[];return t.forEach(t=>{let i=Object.assign({},t);e&&i.pos===e.pos?(e.dim+=i.dim,e.slides=[...e.slides,...i.slides]):(i.index=l.length,e=i,l.push(i))}),l}getPageFromIndex(e=0){let t=this.pages.length;return e=parseInt((e||0).toString())||0,this.isInfinite?(e%t+t)%t:Math.max(Math.min(e,t-1),0)}getSlideMetrics(e){var t,i;let n=this.isHorizontal?"width":"height",s=0,o=0,a=e.el,r=!(!a||a.parentNode);if(a?s=parseFloat(a.dataset[n]||"")||0:((a=document.createElement("div")).style.visibility="hidden",(this.track||document.body).prepend(a)),B(a,this.cn(ea)+" "+e.class+" "+e.customClass),s)a.style[n]=`${s}px`,a.style["width"===n?"height":"width"]="";else{r&&(this.track||document.body).prepend(a),s=a.getBoundingClientRect()[n]*Math.max(1,(null===(t=window.visualViewport)||void 0===t?void 0:t.scale)||1);let e=a[this.isHorizontal?"offsetWidth":"offsetHeight"];e-1>s&&(s=e)}let l=getComputedStyle(a);return"content-box"===l.boxSizing&&(this.isHorizontal?s+=(parseFloat(l.paddingLeft)||0)+(parseFloat(l.paddingRight)||0):s+=(parseFloat(l.paddingTop)||0)+(parseFloat(l.paddingBottom)||0)),o=parseFloat(l[this.isHorizontal?"marginRight":"marginBottom"])||0,r?null===(i=a.parentElement)||void 0===i||i.removeChild(a):e.el||a.remove(),{dim:m(s,1e3),gap:m(o,1e3)}}getBounds(){let{isInfinite:e,isRTL:t,isHorizontal:i,pages:n}=this,s={min:0,max:0};if(e)s={min:-1/0,max:1/0};else if(n.length){let e=n[0].pos,o=n[n.length-1].pos;s=t&&i?{min:e,max:o}:{min:-1*o,max:-1*e}}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:r,pages:l,slides:h,panzoom:c}=this,d=0,u=0,p=0,f=0;for(let n of(c?f=-1*c.current[this.axis]:l[r]&&(f=l[r].pos||0),e=t?i?"right":"left":"top",i&&t&&(f*=-1),h)){let t=n.el;t?("top"===e?(t.style.right="",t.style.left=""):t.style.top="",n.index!==d?t.style[e]=0===u?"":`${m(u,1e3)}px`:t.style[e]="",p+=n.dim+n.gap,d++):u+=n.dim+n.gap}if(n&&p&&s){let i=getComputedStyle(s),n="padding",r=parseFloat(i[n+(t?"Left":"Top")]);for(let s of(f-=r,o+=r+parseFloat(i[n+(t?"Right":"Bottom")]),h))s.el&&(m(s.pos)<m(o)&&m(s.pos+s.dim+s.gap)<m(f)&&m(f)>m(a-o)&&(s.el.style[e]=`${m(u+p,1e3)}px`),m(s.pos+s.gap)>=m(a-o)&&m(s.pos)>m(f+o)&&m(f)<m(o)&&(s.el.style[e]=`-${m(p,1e3)}px`))}let g,v,b=[...this.inTransition];if(b.length>1&&(g=l[b[0]],v=l[b[1]]),g&&v){let t=0;for(let i of h)i.el?this.inTransition.has(i.index)&&0>g.slides.indexOf(i)&&(i.el.style[e]=`${m(t+(g.pos-v.pos),1e3)}px`):t+=i.dim+i.gap}}createSlideEl(e){let{track:t,slides:i}=this;if(!t||!e||e.el&&e.el.parentNode)return;let n=e.el||document.createElement("div");B(n,this.cn(ea)),B(n,e.class),B(n,e.customClass);let s=e.html;s&&(s instanceof HTMLElement?n.appendChild(s):n.innerHTML=e.html+"");let o=[];
1i.forEach((e,t)=>{e.el&&o.push(t)});let a=e.index,r=null;o.length&&(r=i[o.reduce((e,t)=>Math.abs(t-a)<Math.abs(e-a)?t:e)]);let l=r&&r.el&&r.el.parentNode?r.index<e.index?r.el.nextSibling:r.el:null;t.insertBefore(n,t.contains(l)?l:null),e.el=n,this.emit("createSlide",e)}removeSlideEl(e,t=!1){let i=null==e?void 0:e.el;if(!i||!i.parentNode)return;let n=this.cn(eo);if(i.classList.contains(n)&&(j(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);let s=new CustomEvent(es);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;let a=this.page,{pages:r,panzoom:l}=this;e=parseInt((e||0).toString())||0;let h=this.getPageFromIndex(e);if(!l||!r[h]||r.length<2||Math.abs(((null===(n=null===(i=r[a])||void 0===i?void 0:i.slides[0])||void 0===n?void 0:n.dim)||0)-this.viewportDim)>1)return!1;let c=e>a?1:-1;this.isInfinite&&(0===a&&e===r.length-1&&(c=-1),a===r.length-1&&0===e&&(c=1));let d=r[h].pos*(this.isRTL?1:-1);if(a===h&&1>Math.abs(d-l.target[this.axis]))return!1;this.clearTransitions();let u=l.isResting;B(this.container,this.cn("inTransition"));let p=(null===(s=r[a])||void 0===s?void 0:s.slides[0])||null,f=(null===(o=r[h])||void 0===o?void 0:o.slides[0])||null;this.inTransition.add(f.index),this.createSlideEl(f);let g=p.el,m=f.el;u||t===ea||(t="fadeFast",g=null);let v=this.isRTL?"next":"prev",b=this.isRTL?"prev":"next";return g&&(this.inTransition.add(p.index),p.transition=t,g.addEventListener(es,this.onAnimationEnd),g.classList.add(`f-${t}Out`,`to-${c>0?b:v}`)),m&&(f.transition=t,m.addEventListener(es,this.onAnimationEnd),m.classList.add(`f-${t}In`,`from-${c>0?v:b}`)),l.current[this.axis]=d,l.target[this.axis]=d,l.requestTick(),this.onChange(h),!0}manageSlideVisiblity(){let e=new Set,t=new Set,i=this.getVisibleSlides(parseFloat(this.option("preload",0)+"")||0);for(let n of this.slides)i.has(n)?e.add(n):t.add(n);for(let t of this.inTransition)e.add(this.slides[t]);for(let t of e)this.createSlideEl(t),this.lazyLoadSlide(t);for(let i of t)e.has(i)||this.removeSlideEl(i);this.markSelectedSlides(),this.repositionSlides()}markSelectedSlides(){if(!this.pages[this.page]||!this.pages[this.page].slides)return;let e="aria-hidden",t=this.cn(eo);if(t)for(let i of this.slides){let 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)||(B(n,t),this.emit("selectSlide",i)),n.removeAttribute(e)):(n.classList.contains(t)&&(j(n,t),this.emit("unselectSlide",i)),n.setAttribute(e,"true")))}}flipInfiniteTrack(){let{axis:e,isHorizontal:t,isInfinite:i,isRTL:n,viewportDim:s,contentDim:o}=this,a=this.panzoom;if(!a||!i)return;let r=a.current[e],l=a.target[e]-r,h=0,c=.5*s;n&&t?(r<-c&&(h=-1,r+=o),r>o-c&&(h=1,r-=o)):(r>c&&(h=1,r-=o),r<-o+c&&(h=-1,r+=o)),h&&(a.current[e]=r,a.target[e]=r+l)}lazyLoadImg(e,t){let i=this,n="f-fadeIn",s="is-preloading",o=!1,a=null,r=()=>{o||(o=!0,a&&(a.remove(),a=null),j(t,s),t.complete&&(B(t,n),setTimeout(()=>{j(t,n)},350)),this.option("adaptiveHeight")&&e.el&&this.pages[this.page].slides.indexOf(e)>-1&&(i.updateMetrics(),i.setViewportHeight()),this.emit("load",e))};B(t,s),t.src=t.dataset.lazySrcset||t.dataset.lazySrc||"",delete t.dataset.lazySrc,delete t.dataset.lazySrcset,t.addEventListener("error",()=>{r()}),t.addEventListener("load",()=>{r()}),setTimeout(()=>{let i=t.parentNode;i&&e.el&&(t.complete?r():o||(a=y(D),i.insertBefore(a,t)))},300)}lazyLoadSlide(e){let t=e&&e.el;if(!t)return;let i=new Set,n=Array.from(t.querySelectorAll("[data-lazy-src],[data-lazy-srcset]"));for(let s of(t.dataset.lazySrc&&n.push(t),n.map(e=>{e instanceof HTMLImageElement?i.add(e):e instanceof HTMLElement&&e.dataset.lazySrc&&(e.style.backgroundImage=`url('${e.dataset.lazySrc}')`,delete e.dataset.lazySrc)}),i))this.lazyLoadImg(e,s)}onAnimationEnd(e){var t;let i=e.target,n=i?parseInt(i.dataset.index||"",10)||0:-1,s=this.slides[n],o=e.animationName;if(!i||!s||!o)return;let 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&&(null===(t=this.panzoom)||void 0===t?void 0:t.isResting)&&this.emit
1("settle")}onDecel(e,t=0,i=0,n=0,s=0){if(this.option("dragFree"))return void this.setPageFromPosition();let{isRTL:o,isHorizontal:a,axis:r,pages:l}=this,h=l.length,c=Math.abs(Math.atan2(i,t)/(Math.PI/180)),d=0;if(d=c>45&&c<135?a?0:i:a?t:0,!h)return;let u=this.page,p=o&&a?1:-1,f=e.current[r]*p,{pageIndex:g}=this.getPageFromPosition(f);Math.abs(d)>5?(l[u].dim<document.documentElement["client"+(this.isHorizontal?"Width":"Height")]-1&&(u=g),u=o&&a?d<0?u-1:u+1:d<0?u+1:u-1):u=0===n&&0===s?u:g,this.slideTo(u,{transition:!1,friction:e.option("decelFriction")})}onClick(e){let t,i;let n=e.target,s=n&&F(n)?n.dataset:null;s&&(void 0!==s.carouselPage?(i="slideTo",t=s.carouselPage):void 0!==s.carouselNext?i="slideNext":void 0!==s.carouselPrev&&(i="slidePrev")),i?(e.preventDefault(),e.stopPropagation(),n&&!n.hasAttribute("disabled")&&this[i](t)):this.emit("click",e)}onSlideTo(e){let t=e.detail||0;this.slideTo(this.getPageForSlide(t),{friction:0})}onChange(e,t=0){let 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;null===(e=this.viewport)||void 0===e||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=s.Init,this.prevPage=null,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===s.Destroy)return;e=parseInt((e||0).toString())||0;let n=this.getPageFromIndex(e),{axis:o,isHorizontal:a,isRTL:r,pages:l,panzoom:h}=this,c=l.length,d=r&&a?1:-1;if(!h||!c)return;if(this.page!==n){let t=new Event("beforeChange",{bubbles:!0,cancelable:!0});if(this.emit("beforeChange",t,e),t.defaultPrevented)return}if(this.transitionTo(e,i))return;let u=l[n].pos;if(this.isInfinite){let t=this.contentDim,i=h.target[o]*d;2===c?u+=t*Math.floor(parseFloat(e+"")/2):u=[u,u-t,u+t].reduce(function(e,t){return Math.abs(t-i)<Math.abs(e-i)?t:e})}u*=d,1>Math.abs(h.target[o]-u)||(h.panTo({x:a?u:0,y:a?0:u,friction:t}),this.onChange(n))}slideToClosest(e){if(this.panzoom){let{pageIndex:t}=this.getPageFromPosition();this.slideTo(t,e)}}slideNext(){this.slideTo(this.page+1)}slidePrev(){this.slideTo(this.page-1)}clearTransitions(){this.inTransition.clear(),j(this.container,this.cn("inTransition"));let e=["to-prev","to-next","from-prev","from-next"];for(let t of this.slides){let i=t.el;if(i){i.removeEventListener(es,this.onAnimationEnd),i.classList.remove(...e);let n=t.transition;n&&i.classList.remove(`f-${n}Out`,`f-${n}In`)}}this.manageSlideVisiblity()}addSlide(e,t){var i,n,s,o;let a=this.panzoom,r=(null===(i=this.pages[this.page])||void 0===i?void 0:i.pos)||0,l=(null===(n=this.pages[this.page])||void 0===n?void 0:n.dim)||0,h=this.contentDim<this.viewportDim,c=Array.isArray(t)?t:[t],d=[];for(let e of c)d.push(U(e));this.slides.splice(e,0,...d);for(let e=0;e<this.slides.length;e++)this.slides[e].index=e;for(let e of d)this.emit("beforeInitSlide",e,e.index);if(this.page>=e&&(this.page+=d.length),this.updateMetrics(),a){let t=(null===(s=this.pages[this.page])||void 0===s?void 0:s.pos)||0,i=(null===(o=this.pages[this.page])||void 0===o?void 0:o.dim)||0,n=this.pages.length||1,c=this.isRTL?l-i:i-l,d=this.isRTL?r-t:t-r;h&&1===n?(e<=this.page&&(a.current[this.axis]-=c,a.target[this.axis]-=c),a.panTo({[this.isHorizontal?"x":"y"]:-1*t})):d&&e<=this.page&&(a.target[this.axis]-=d,a.current[this.axis]-=d,a.requestTick())}for(let e of d)this.emit("initSlide",e,e.index)}prependSlide(e){this.addSlide(0,e)}appendSlide(e){this.addSlide(this.slides.length,e)}removeSlide(e){let t=this.slides.length;e=(e%t+t)%t;let i=this.slides[e];if(i){this.removeSlideEl(i,!0),this.slides.splice(e,1);for(let e=0;e<this.slides.length;e++)this.slides[e].index=e;this.updateMetrics(),this.slideTo(this.page,{friction:0,transition:!1}
1),this.emit("destroySlide",i)}}updateMetrics(){let{panzoom:e,viewport:t,track:i,slides:n,isHorizontal:o,isInfinite:a}=this;if(!i)return;let r=o?"width":"height";if(t){let e=Math.max(t[o?"offsetWidth":"offsetHeight"],m(t.getBoundingClientRect()[r],1e3)),i=getComputedStyle(t),n="padding";e-=parseFloat(i[n+(o?"Left":"Top")])+parseFloat(i[n+(o?"Right":"Bottom")]),this.viewportDim=e}let l,h=0;for(let[e,t]of n.entries()){let i=0,s=0;!t.el&&l?(i=l.dim,s=l.gap):({dim:i,gap:s}=this.getSlideMetrics(t),l=t),i=m(i,1e3),s=m(s,1e3),t.dim=i,t.gap=s,t.pos=h,h+=i,(a||e<n.length-1)&&(h+=s)}h=m(h,1e3),this.contentDim=h,e&&(e.contentRect[r]=h,e.contentRect[o?"fullWidth":"fullHeight"]=h),this.pages=this.createPages(),this.pages=this.processPages(),this.state===s.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){void 0===e&&(e=this.page);let n=this.panzoom,s=this.contentDim,o=this.pages[e]||0;if(!o||!n)return e>this.page?-1:1;let a=-1*n.current.e,r=m((a-o.pos)/(1*o.dim),1e3),l=r,h=r;this.isInfinite&&!0!==i&&(l=m((a-o.pos+s)/(1*o.dim),1e3),h=m((a-o.pos-s)/(1*o.dim),1e3));let c=[r,l,h].reduce(function(e,t){return Math.abs(t)<Math.abs(e)?t:e});return t?c:c>1?1:c<-1?-1:c}setViewportHeight(){let{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(e=>{e.el&&(s=Math.max(s,e.el.offsetHeight))})),i.style.height=s?`${s}px`:""}getPageForSlide(e){for(let t of this.pages)for(let i of t.slides)if(i.index===e)return t.index;return -1}getVisibleSlides(e=0){var t;let i=new Set,{panzoom:s,contentDim:o,viewportDim:a,pages:r,page:l}=this;if(a){o=o+(null===(t=this.slides[this.slides.length-1])||void 0===t?void 0:t.gap)||0;let h=0;h=s&&s.state!==n.Init&&s.state!==n.Destroy?-1*s.current[this.axis]:r[l]&&r[l].pos||0,this.isInfinite&&(h-=Math.floor(h/o)*o),this.isRTL&&this.isHorizontal&&(h*=-1);let c=h-a*e,d=h+a*(e+1),u=this.isInfinite?[-1,0,1]:[0];for(let e of this.slides)for(let t of u){let n=e.pos+t*o,s=n+e.dim+e.gap;n<d&&s>c&&i.add(e)}}return i}getPageFromPosition(e){let{viewportDim:t,contentDim:i,slides:n,pages:s,panzoom:o}=this,a=s.length,r=n.length,l=n[0],h=n[r-1],c=this.option("center"),d=0,u=0,p=void 0===e?-1*((null==o?void 0:o.target[this.axis])||0):e;c&&(p+=.5*t),this.isInfinite?(p<l.pos-.5*h.gap&&(p-=i,u=-1),p>h.pos+h.dim+.5*h.gap&&(p-=i,u=1)):p=Math.max(l.pos||0,Math.min(p,h.pos));let f=h,g=n.find(e=>{let t=e.pos-.5*f.gap,i=e.pos+e.dim+.5*e.gap;return f=e,p>=t&&p<i});return g||(g=h),{page:(d=this.getPageForSlide(g.index))+u*a,pageIndex:d}}setPageFromPosition(){let{pageIndex:e}=this.getPageFromPosition();this.onChange(e)}destroy(){if([s.Destroy].includes(this.state))return;this.state=s.Destroy;let{container:e,viewport:t,track:i,slides:n,panzoom:o}=this,a=this.option("classes");for(let[s,r]of(e.removeEventListener("click",this.onClick,{passive:!1,capture:!1}),e.removeEventListener("slideTo",this.onSlideTo),window.removeEventListener("resize",this.onResize),o&&(o.destroy(),this.panzoom=null),n&&n.forEach(e=>{this.removeSlideEl(e)}),this.detachPlugins(),t&&(t.removeEventListener("scroll",this.onScroll),t.offsetParent&&i&&i.offsetParent&&t.replaceWith(...i.childNodes)),Object.entries(a)))"container"!==s&&r&&e.classList.remove(r);this.track=null,this.viewport=null,this.page=0,this.slides=[];let r=this.events.get("ready");this.events=new Map,r&&this.events.set("ready",r)}}Object.defineProperty(er,"Panzoom",{enumerable:!0,configurable:!0,writable:!0,value:Y}),Object.defineProperty(er,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{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"}}}),Object.defineProperty(er,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:{Navigation:ei,Dots:J,Sync:en}});let el=function(e){if(!F(e))return 0;let t=window.scrollY,i=window.innerHeight,n=t+i,s=e.getBoundingClientRect(),o=s.y+t,a=s.height,r=o+a;if(t>r||n<o)return 0;if(t<o&&n>r||o<t&&r>n)return 100;let l=a;return o<t&&(l-=t-o),r>n&&(l-=r-n),Math.round(l/i*100)},eh=!("undefined"==typeof window||!window.document||!window.document.createElement),ec='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])',ed=e=>{if(e&&eh){void 0===g&&document.createElement("div").focus({get preventScroll(){return g=!0,!1}});try{if(g)e.focus({preventScroll:!0});else{let t=window.scrollY||document.body.scrollTop,i=window.scrollX||document.body.scrollLeft;e.focus(),document.body.scrollTo({top:t,left:i,behavior:"auto"})}}catch(e){}}},eu=()=>{let e=document,t,i="",n="",s="";return e.fullscreenEnabled?(i="requestFullscreen",n="exitFullscreen",s="fullscreenElement"):e.webkitFullscreenEnabled&&(i="webkitRequestFullscreen",n="webkitExitFullscreen",s="webkitFullscreenElement"),i&&(t={request:function(t=e.documentElement){return"webkitRequestFullscreen"===i?t[i](Element.ALLOW_KEYBOARD_INPUT):t[i]()},exit:function(){return e[s]&&e[n]()},isFullscreen:function(){return e[s]}}),t},ep={animated:!0,autoFocus:!0,backdropClick:"close",Carousel:{classes:{container:"fancybox__carousel",viewport:"fancybox__viewport",track:"fancybox__track",slide:"fancybox__slide"}},closeButton:"auto",closeExisting:!1,commonCaption:!1,compact:()=>window.matchMedia("(max-width: 578px), (max-height: 578px)").matches,contentClick:"toggleZoom",contentDblClick:!1,defaultType:"image",defaultDisplay:"flex",dragToClose:!0,Fullscreen:{autoStart:!1},groupAll:!1,groupAttr:"data-fancybox",hideClass:"f-fadeOut",hideScrollbar:!0,idle:3500,keyboard:{Escape:"close",Delete:"close",Backspace:"close",PageUp:"next",PageDown:"prev",ArrowUp:"prev",ArrowDown:"next",ArrowRight:"next",ArrowLeft:"prev"},l10n:Object.assign(Object.assign({},R),{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"}),parentEl:null,placeFocusBack:!0,showClass:"f-zoomInUp",startIndex:0,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">\n    <div class="fancybox__backdrop"></div>\n    <div class="fancybox__carousel"></div>\n    <div class="fancybox__footer"></div>\n  </div>'},trapFocus:!0,wheel:"zoom"};(d=o||(o={}))[d.Init=0]="Init",d[d.Ready=1]="Ready",d[d.Closing=2]="Closing",d[d.CustomClosing=3]="CustomClosing",d[d.Destroy=4]="Destroy",(u=a||(a={}))[u.Loading=0]="Loading",u[u.Opening=1]="Opening",u[u.Ready=2]="Ready",u[u.Closing=3]="Closing";let ef="",eg=!1,em=!1,ev=null,eb=()=>{let e="",t="",i=tm.getInstance();if(i){let n=i.carousel,s=i.getSlide();if(n&&s){let o=s.slug||void 0,a=s.triggerEl||void 0;(t=o||i.option("slug")||"")||!a||!a.dataset||(t=a.dataset.fancybox||""),t&&"true"!==t&&(e="#"+t+(!o&&n.slides.length>1?"-"+(s.index+1):""))}}return{hash:e,slug:t,index:1}},ey=()=>{let e=new URL(document.URL).hash,t=e.slice(1).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}},ew=()=>{let{slug:e,index:t}=ey();if(!e)return;let i=document.querySelector(`[data-slug="${e}"]`);if(i&&i.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0})),tm.getInstance())return;let n=document.querySelectorAll(`[data-fancybox="${e}"]`);n.length&&(i=n[t-1])&&i.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0}))},ex=()=>{if(!1===tm.defaults.Hash)return;let e=tm.getInstance();if(!1===(null==e?void 0:e.options.Hash))return;let{slug:t,index:i}=ey(),{slug:n}=eb();e&&(t===n?e.jumpTo(i-1):(eg=!0,e.close())),ew()},eE=()=>{ev&&clearTimeout(ev),queueMicrotask(()=>{ex()})},eS=()=>{window.addEventListener("hashchange",eE,!1),setTimeout(()=>{ex()},500)};eh&&(/complete|interactive|loaded/.test(document.readyState)?eS():document.addEventListener("DOMContentLoaded",eS));let eP="is-zooming-in";class eC extends K{onCreateSlide(e,t,i){let n=this.instance.optionFor(i,"src")||"";i.el&&"image"===i.type&&"string"==typeof n&&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){for(let e of(j(this.instance.container,eP),t.slides)){let t=e.panzoom;t&&e.index!==i&&t.reset(.35)}}onClose(){var e;let t=this.instance,i=t.container,s=t.getSlide();if(!i||!i.parentElement||!s)return;let{el:a,contentEl:r,panzoom:l,thumbElSrc:h}=s;
1if(!a||!h||!r||!l||l.isContentLoading||l.state===n.Init||l.state===n.Destroy)return;l.updateMetrics();let c=this.getZoomInfo(s);if(!c)return;this.instance.state=o.CustomClosing,i.classList.remove(eP),i.classList.add("is-zooming-out"),r.style.backgroundImage=`url('${h}')`;let d=i.getBoundingClientRect();1===((null===(e=window.visualViewport)||void 0===e?void 0:e.scale)||1)&&Object.assign(i.style,{position:"absolute",top:`${i.offsetTop+window.scrollY}px`,left:`${i.offsetLeft+window.scrollX}px`,bottom:"auto",right:"auto",width:`${d.width}px`,height:`${d.height}px`,overflow:"hidden"});let{x:u,y:p,scale:f,opacity:g}=c;if(g){let e=((e,t,i,n)=>{let s=t-e,o=n-i;return t=>i+((t-e)/s*o||0)})(l.scale,f,1,0);l.on("afterTransform",()=>{r.style.opacity=e(l.scale)+""})}l.on("endAnimation",()=>{t.destroy()}),l.target.a=f,l.target.b=0,l.target.c=0,l.target.d=f,l.panTo({x:u,y:p,scale:f,friction:g?.2:.33,ignoreBounds:!0}),l.isResting&&t.destroy()}setImage(e,t){let i=this.instance;e.src=t,this.process(e,t).then(t=>{let{contentEl:n,imageEl:s,thumbElSrc:o,el:r}=e;if(i.isClosing()||!n||!s)return;n.offsetHeight;let l=!!i.isOpeningSlide(e)&&this.getZoomInfo(e);if(this.option("protected")&&r){r.addEventListener("contextmenu",e=>{e.preventDefault()});let e=document.createElement("div");B(e,"fancybox-protected"),n.appendChild(e)}if(o&&l){let s=t.contentRect,r=Math.max(s.fullWidth,s.fullHeight),h=null;!l.opacity&&r>1200&&(B(h=document.createElement("img"),"fancybox-ghost"),h.src=o,n.appendChild(h));let c=()=>{h&&(B(h,"f-fadeFastOut"),setTimeout(()=>{h&&(h.remove(),h=null)},200))};new Promise((e,t)=>{let i=new Image;i.onload=e,i.onerror=t,i.src=o}).then(()=>{i.hideLoading(e),e.state=a.Opening,this.instance.emit("reveal",e),this.zoomIn(e).then(()=>{c(),this.instance.done(e)},()=>{}),h&&setTimeout(()=>{c()},r>2500?800:200)},()=>{i.hideLoading(e),i.revealContent(e)})}else{let n=this.optionFor(e,"initialSize"),s=this.optionFor(e,"zoom"),o={event:i.prevMouseMoveEvent||i.options.event,friction:s?.12:0},a=i.optionFor(e,"showClass")||void 0,r=!0;i.isOpeningSlide(e)&&("full"===n?t.zoomToFull(o):"cover"===n?t.zoomToCover(o):"max"===n?t.zoomToMax(o):r=!1,t.stop("current")),r&&a&&(a=t.isDragging?"f-fadeIn":""),i.hideLoading(e),i.revealContent(e,a)}},()=>{i.setError(e,"{{IMAGE_ERROR}}")})}process(e,t){return new Promise((i,n)=>{var s;let o=this.instance,a=e.el;o.clearContent(e),o.showLoading(e);let r=this.optionFor(e,"content");if("string"==typeof r&&(r=y(r)),!r||!F(r)){if((r=document.createElement("img"))instanceof HTMLImageElement){let i="",n=e.caption;i="string"==typeof n&&n?n.replace(/<[^>]+>/gi,"").substring(0,1e3):`Image ${e.index+1} of ${(null===(s=o.carousel)||void 0===s?void 0:s.pages.length)||1}`,r.src=t||"",r.alt=i,r.draggable=!1,e.srcset&&r.setAttribute("srcset",e.srcset),this.instance.isOpeningSlide(e)&&(r.fetchPriority="high")}e.sizes&&r.setAttribute("sizes",e.sizes)}B(r,"fancybox-image"),e.imageEl=r,o.setContent(e,r,!1),e.panzoom=new Y(a,O({transformParent:!0},this.option("Panzoom")||{},{content:r,width:(t,i)=>o.optionFor(e,"width","auto",i)||"auto",height:(t,i)=>o.optionFor(e,"height","auto",i)||"auto",wheel:()=>{let e=o.option("wheel");return("zoom"===e||"pan"==e)&&e},click:(t,i)=>{var n,s;if(o.isCompact||o.isClosing()||e.index!==(null===(n=o.getSlide())||void 0===n?void 0:n.index)||i&&["A","BUTTON","TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].includes(i.composedPath()[0].nodeName))return!1;let a=!i||i.target&&(null===(s=e.contentEl)||void 0===s?void 0:s.contains(i.target));return o.option(a?"contentClick":"backdropClick")||!1},dblClick:()=>o.isCompact?"toggleZoom":o.option("contentDblClick")||!1,spinner:!1,panOnlyZoomed:!0,wheelLimit:1/0,on:{ready:e=>{i(e)},error:()=>{n()},destroy:()=>{n()}}}))})}zoomIn(e){return new Promise((t,i)=>{let n=this.instance,s=n.container,{panzoom:o,contentEl:r,el:l}=e;o&&o.updateMetrics();let h=this.getZoomInfo(e);if(!(h&&l&&r&&o&&s))return void i();let{x:c,y:d,scale:u,opacity:p}=h,f=()=>{e.state!==a.Closing&&(p&&(r.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=e=>{(e.scale<.99||e.scale>1.01)&&!e.isDragging||(j(s,eP),r.style.opacity="",e.off("endAnimation",g),e.off("touchStart",g),e.off("afterTransform",f),t(e))};o.on("endAnimation",g),o.on("touchStart",g),o.on("afterTransform",f),o.on(["error","destroy"],()=>{i()}),o.panTo({x:c,y:d,scale:u,friction:0,ignoreBounds:!0}),o.stop("current");
1let m={event:"mousemove"===o.panMode?n.prevMouseMoveEvent||n.options.event:void 0},v=this.optionFor(e,"initialSize");B(s,eP),n.hideLoading(e),"full"===v?o.zoomToFull(m):"cover"===v?o.zoomToCover(m):"max"===v?o.zoomToMax(m):o.reset(.172)})}getZoomInfo(e){let{el:t,imageEl:i,thumbEl:n,panzoom:s}=e,a=this.instance,r=a.container;if(!t||!i||!n||!s||3>el(n)||!this.optionFor(e,"zoom")||!r||a.state===o.Destroy||"0"===getComputedStyle(r).getPropertyValue("--f-images-zoom"))return!1;let l=window.visualViewport||null;if(1!==(l?l.scale:1))return!1;let{top:h,left:c,width:d,height:u}=n.getBoundingClientRect(),{top:p,left:f,fitWidth:g,fitHeight:m}=s.contentRect;if(!(d&&u&&g&&m))return!1;let v=s.container.getBoundingClientRect();f+=v.left,p+=v.top;let b=-1*(f+.5*g-(c+.5*d)),y=-1*(p+.5*m-(h+.5*u)),w=this.option("zoomOpacity")||!1;return"auto"===w&&(w=Math.abs(d/u-g/m)>.1),{x:b,y:y,scale:d/g,opacity:w}}attach(){let e=this.instance;e.on("Carousel.change",this.onChange),e.on("Carousel.createSlide",this.onCreateSlide),e.on("Carousel.removeSlide",this.onRemoveSlide),e.on("close",this.onClose)}detach(){let e=this.instance;e.off("Carousel.change",this.onChange),e.off("Carousel.createSlide",this.onCreateSlide),e.off("Carousel.removeSlide",this.onRemoveSlide),e.off("close",this.onClose)}}Object.defineProperty(eC,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{initialSize:"fit",Panzoom:{maxScale:1},protected:!1,zoom:!0,zoomOpacity:"auto"}}),"function"==typeof SuppressedError&&SuppressedError;let eT="html",eM="image",eO="youtube",eA="vimeo",eL="html5video",ez=(e,t={})=>{let i=new URLSearchParams(new URL(e).search),n=new URLSearchParams;for(let[e,s]of[...i,...Object.entries(t)]){let t=s+"";if("t"===e){let e=t.match(/((\d*)m)?(\d*)s?/);e&&n.set("start",60*parseInt(e[2]||"0")+parseInt(e[3]||"0")+"")}else n.set(e,t)}let s=n+"",o=e.match(/#t=((.*)?\d+s)/);return o&&(s+=`#t=${o[1]}`),s},ek=["image","html","ajax","inline","clone","iframe","map","pdf","html5video","youtube","vimeo"];class eR extends K{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);let i=t.iframeEl;i&&(i.onload=i.onerror=null,i.src="//about:blank",t.iframeEl=null);let n=t.contentEl,s=t.placeholderEl;if("inline"===t.type&&n&&s)n.classList.remove("fancybox__content"),"none"!==getComputedStyle(n).getPropertyValue("display")&&(n.style.display="none"),setTimeout(()=>{s&&(n&&s.parentNode&&s.parentNode.insertBefore(n,s),s.remove())},0),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;let o;if(i.type===eL){try{null===(s=null===(n=i.el)||void 0===n?void 0:n.querySelector("video"))||void 0===s||s.pause()}catch(e){}return}i.type===eA?o={method:"pause",value:"true"}:i.type===eO&&(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(e=>{e.el&&(this.resizeIframe(e),this.setAspectRatio(e))})}onMessage(e){try{let t=JSON.parse(e.data);if("https://player.vimeo.com"===e.origin){if("ready"===t.event)for(let t of Array.from(document.getElementsByClassName("fancybox__iframe")))t instanceof HTMLIFrameElement&&t.contentWindow===e.source&&(t.dataset.ready="true")}else if(e.origin.match(/^https:\/\/(www.)?youtube(-nocookie)?.com$/)&&"onReady"===t.event){let e=document.getElementById(t.id);e&&(e.dataset.ready="true")}}catch(e){}}loadAjaxContent(e){let t=this.instance.optionFor(e,"src")||"";this.instance.showLoading(e);let i=this.instance,n=new XMLHttpRequest;i.showLoading(e),n.onreadystatechange=function(){n.readyState===XMLHttpRequest.DONE&&i.state===o.Ready&&(i.hideLoading(e),200===n.status?i.setContent(e,n.responseText):i.setError(e,404===n.status?"{{AJAX_NOT_FOUND}}":"{{AJAX_FORBIDDEN}}"))};let 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(F(e.src))t=e.src;else if("string"==typeof e.src){let i=e.src.split("#",2).pop();t=i?document.getElementById(i):null}if(t){if("clone"===e.type||t.closest(".fancybox__slide")){let i=(t=t.cloneNode(!0)).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){let 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){let{src:t,el:i}=e;if(!t||"string"!=typeof t||!i)return;i.classList.add("is-loading");let n=this.instance,s=document.createElement("iframe");for(let[t,i]of(s.className="fancybox__iframe",s.setAttribute("id",`fancybox__iframe_${n.id}_${e.index}`),Object.entries(this.optionFor(e,"iframeAttr")||{})))s.setAttribute(t,i);s.onerror=()=>{n.setError(e,"{{IFRAME_ERROR}}")},e.iframeEl=s;let o=this.optionFor(e,"preload");if("iframe"!==e.type||!1===o)return s.setAttribute("src",e.src+""),n.setContent(e,s,!1),this.resizeIframe(e),void n.revealContent(e);n.showLoading(e),s.onload=()=>
1{if(!s.src.length)return;let t="true"!==s.dataset.ready;s.dataset.ready="true",this.resizeIframe(e),t?n.revealContent(e):n.hideLoading(e)},s.setAttribute("src",t),n.setContent(e,s,!1)}resizeIframe(e){let{type:t,iframeEl:i}=e;if(t===eO||t===eA)return;let n=null==i?void 0:i.parentElement;if(!i||!n)return;let s=e.autoSize;void 0===s&&(s=this.optionFor(e,"autoSize"));let o=e.width||0,a=e.height||0;o&&a&&(s=!1);let r=n&&n.style;if(!1!==e.preload&&!1!==s&&r)try{let e=window.getComputedStyle(n),t=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight),s=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),l=i.contentWindow;if(l){let e=l.document,i=e.getElementsByTagName(eT)[0],n=e.body;r.width="",n.style.overflow="hidden",o=o||i.scrollWidth+t,r.width=`${o}px`,n.style.overflow="",r.flex="0 0 auto",r.height=`${n.scrollHeight}px`,a=i.scrollHeight+s}}catch(e){}if(o||a){let e={flex:"0 1 auto",width:"",height:""};o&&"auto"!==o&&(e.width=`${o}px`),a&&"auto"!==a&&(e.height=`${a}px`),Object.assign(r,e)}}playVideo(){let e=this.instance.getSlide();if(!e)return;let{el:t}=e;if(!t||!t.offsetParent||!this.optionFor(e,"videoAutoplay"))return;if(e.type===eL)try{let e=t.querySelector("video");if(e){let t=e.play();void 0!==t&&t.then(()=>{}).catch(t=>{e.muted=!0,e.play()})}}catch(e){}if(e.type!==eO&&e.type!==eA)return;let i=()=>{if(e.iframeEl&&e.iframeEl.contentWindow){let t;if("true"===e.iframeEl.dataset.ready)return(t=e.type===eO?{event:"command",func:"playVideo"}:{method:"play",value:"true"})&&e.iframeEl.contentWindow.postMessage(JSON.stringify(t),"*"),void(e.poller=void 0);e.type===eO&&(t={event:"listening",id:e.iframeEl.getAttribute("id")},e.iframeEl.contentWindow.postMessage(JSON.stringify(t),"*"))}e.poller=setTimeout(i,250)};i()}processType(e){if(e.html)return e.type=eT,e.src=e.html,void(e.html="");let t=this.instance.optionFor(e,"src","");if(!t||"string"!=typeof t)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)){let s=this.optionFor(e,eO),{nocookie:o}=s,a=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(n=Object.getOwnPropertySymbols(e);s<n.length;s++)0>t.indexOf(n[s])&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(i[n[s]]=e[n[s]])}return i}(s,["nocookie"]),r=`www.youtube${o?"-nocookie":""}.com`,l=ez(t,a),h=encodeURIComponent(n[2]);e.videoId=h,e.src=`https://${r}/embed/${h}?${l}`,e.thumbSrc=e.thumbSrc||`https://i.ytimg.com/vi/${h}/mqdefault.jpg`,i=eO}else if(n=t.match(/^.+vimeo.com\/(?:\/)?([\d]+)((\/|\?h=)([a-z0-9]+))?(.*)?/)){let s=ez(t,this.optionFor(e,eA)),o=encodeURIComponent(n[1]),a=n[4]||"";e.videoId=o,e.src=`https://player.vimeo.com/video/${o}?${a?`h=${a}${s?"&":""}`:""}${s}`,i=eA}if(!i&&e.triggerEl){let t=e.triggerEl.dataset.type;ek.includes(t)&&(i=t)}i||"string"==typeof t&&("#"===t.charAt(0)?i="inline":(n=t.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i))?(i=eL,e.videoFormat=e.videoFormat||"video/"+("ogv"===n[1]?"ogg":n[1])):t.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)?i=eM: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="map"):(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="map"),i=i||this.instance.option("defaultType"),e.type=i,i===eM&&(e.thumbSrc=e.thumbSrc||e.src)}setContent(e){let t=this.instance.optionFor(e,"src")||"";if(e&&e.type&&t){switch(e.type){case eT:this.instance.setContent(e,t);break;case eL:let 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"map":case eO:case eA:e.preload=!1;case"iframe":this.setIframeContent(e)}this.setAspectRatio(e)}}setAspectRatio(e){let t=e.contentEl;if(!(e.el&&t&&e.type&&[eO,eA,eL].includes(e.type)))return;let i,n=e.width||"auto",s=e.height||"auto";if("auto"===n||"auto"===s){let t=((i=this.optionFor(e,"videoRatio"))+"").match(/(\d+)\s*\/\s?(\d+)/);i=t&&t.length>2?parseFloat(t[1])/parseFloat(t[2]):parseFloat(i+"")}else n&&s&&(i=n/s);if(!i)return;t.style.aspectRatio="",t.style.width="",t.style.height="",t.offsetHeight;let o=t.getBoundingClientRect(),a=o.width||1,r=o.height||1;t.style.aspectRatio=i+"",i<a/r?(s="auto"===s?r:Math.min(r,s),t.style.width="auto",t.style.height=`${s}px`):(n="auto"===n?a:Math.min(a,n),t.style.width=`${n}px`,t.style.height="auto")}attach(){let e=this.instance;e.on("Carousel.beforeInitSlide",this.onBeforeInitSlide),e.on("Carousel.createSlide",this.onCreateSlide),e.on("Carousel.selectSlide",this.onSelectSlide),e.on("Carousel.unselectSlide",this.onUnselectSlide),e.on("Carousel.Panzoom.refresh",this.onRefresh),e.on("done",this.onDone),e.on("clearContent",this.onClearContent),window.addEventListener("message",this.onMessage)}detach(){let e=this.instance;e.off("Carousel.beforeInitSlide",this.onBeforeInitSlide),e.off("Carousel.createSlide",this.onCreateSlide),e.off("Carousel.selectSlide",this.onSelectSlide),e.off("Carousel.unselectSlide",this.onUnselectSlide),e.off("Carousel.Panzoom.refresh",this.onRefresh),e.off("done",this.onDone),e.off("clearContent",this.onClearContent),window.removeEventListener("message",this.onMessage)}}Object.defineProperty(eR,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{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}}">\n  <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}}});let eI="play",eD="pause",eF="ready";class ej extends K{constructor(){super(...arguments),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:eF}),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!==eF}onReady(e){this.option("autoStart")&&(e.isInfinite||e.page<e.pages.length-1)&&this.start()}onChange(){this.removeProgressBar(),this.pause()}onSettle(){this.resume()}onVisibilityChange(){"visible"===document.visibilityState?this.resume():this.pause()}onMouseEnter(){this.inHover=!0,this.pause()}onMouseLeave(){var e;this.inHover=!1,(null===(e=this.instance.panzoom)||void 0===e?void 0:e.isResting)&&this.resume()}onTimerEnd(){let e=this.instance;"play"===this.state&&(e.isInfinite||e.page!==e.pages.length-1?e.
1slideNext():e.slideTo(0))}removeProgressBar(){this.progressBar&&(this.progressBar.remove(),this.progressBar=null)}createProgressBar(){var e;if(!this.option("showProgress"))return null;this.removeProgressBar();let t=this.instance,i=(null===(e=t.pages[t.page])||void 0===e?void 0:e.slides)||[],n=this.option("progressParentEl");if(n||(n=(1===i.length?i[0].el:null)||t.viewport),!n)return null;let s=document.createElement("div");return B(s,"f-progress"),n.prepend(s),this.progressBar=s,s.offsetHeight,s}set(){let e=this,t=e.instance;if(t.pages.length<2||e.timer)return;let i=e.option("timeout");e.state=eI,B(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(){this.timer&&(clearTimeout(this.timer),this.timer=null),this.removeProgressBar()}start(){if(this.set(),this.state!==eF){if(this.option("pauseOnHover")){let e=this.instance.container;e.addEventListener("mouseenter",this.onMouseEnter,!1),e.addEventListener("mouseleave",this.onMouseLeave,!1)}document.addEventListener("visibilitychange",this.onVisibilityChange,!1),this.emit("start")}}stop(){let e=this.state,t=this.instance.container;this.clear(),this.state=eF,t.removeEventListener("mouseenter",this.onMouseEnter,!1),t.removeEventListener("mouseleave",this.onMouseLeave,!1),document.removeEventListener("visibilitychange",this.onVisibilityChange,!1),j(t,"has-autoplay"),e!==eF&&this.emit("stop")}pause(){this.state===eI&&(this.state=eD,this.clear(),this.emit(eD))}resume(){let e=this.instance;if(e.isInfinite||e.page!==e.pages.length-1){if(this.state!==eI){if(this.state===eD&&!this.inHover){let e=new Event("resume",{bubbles:!0,cancelable:!0});this.emit("resume",e),e.defaultPrevented||this.set()}}else this.set()}else this.stop()}toggle(){this.state===eI||this.state===eD?this.stop():this.start()}attach(){let e=this.instance;e.on("ready",this.onReady),e.on("Panzoom.startAnimation",this.onChange),e.on("Panzoom.endAnimation",this.onSettle),e.on("Panzoom.touchMove",this.onChange)}detach(){let e=this.instance;e.off("ready",this.onReady),e.off("Panzoom.startAnimation",this.onChange),e.off("Panzoom.endAnimation",this.onSettle),e.off("Panzoom.touchMove",this.onChange),this.stop()}}Object.defineProperty(ej,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{autoStart:!0,pauseOnHover:!0,progressParentEl:null,showProgress:!0,timeout:3e3}});class eB extends K{constructor(){super(...arguments),Object.defineProperty(this,"ref",{enumerable:!0,configurable:!0,writable:!0,value:null})}onPrepare(e){let t=e.carousel;if(!t)return;let i=e.container;i&&(t.options.Autoplay=O({autoStart:!1},this.option("Autoplay")||{},{pauseOnHover:!1,timeout:this.option("timeout"),progressParentEl:()=>this.option("progressParentEl")||null,on:{start:()=>{e.emit("startSlideshow")},set:t=>{var n;i.classList.add("has-slideshow"),(null===(n=e.getSlide())||void 0===n?void 0:n.state)!==a.Ready&&t.pause()},stop:()=>{i.classList.remove("has-slideshow"),e.isCompact||e.endIdle(),e.emit("endSlideshow")},resume:(t,i)=>{var n,s,o;!i||!i.cancelable||(null===(n=e.getSlide())||void 0===n?void 0:n.state)===a.Ready&&(null===(o=null===(s=e.carousel)||void 0===s?void 0:s.panzoom)||void 0===o?void 0:o.isResting)||i.preventDefault()}}}),t.attachPlugins({Autoplay:ej}),this.ref=t.plugins.Autoplay)}onReady(e){let t=e.carousel,i=this.ref;i&&t&&this.option("playOnStart")&&(t.isInfinite||t.page<t.pages.length-1)&&i.start()}onDone(e,t){let i=this.ref,n=e.carousel;if(!i||!n)return;let s=t.panzoom;s&&s.on("startAnimation",()=>{e.isCurrentSlide(t)&&i.stop()}),e.isCurrentSlide(t)&&i.resume()}onKeydown(e,t){var i;let n=this.ref;n&&t===this.option("key")&&"BUTTON"!==(null===(i=document.activeElement)||void 0===i?void 0:i.nodeName)&&n.toggle()}attach(){let e=this.instance;e.on("Carousel.init",this.onPrepare),e.on("Carousel.ready",this.onReady),e.on("done",this.onDone),e.on("keydown",this.onKeydown)}detach(){let e=this.instance;e.off("Carousel.init",this.onPrepare),e.off("Carousel.ready",this.onReady),e.off("done",this.onDone),e.off("keydown",this.onKeydown)}}Object.defineProperty(eB,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{key:" ",playOnStart:!1,progressParentEl:e=>{var t;return(null===(t=e.instance.container)||void 0===t?void 0:t.querySelector(".fancybox__toolbar [data-fancybox-toggle-slideshow]"))||e.instance.container},timeout:3e3}});let eH={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"};(p=r||(r={}))[p.Init=0]="Init",p[p.Ready=1]="Ready",p[p.Hidden=2]="Hidden";
1let eN="isResting",e_="thumbWidth",e$="thumbHeight",eW="thumbClipWidth",eX=class extends K{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:r.Init})}get isModern(){return"modern"===this.type}onInitSlide(e,t){let i=t.el?t.el.dataset:void 0;i&&(t.thumbSrc=i.thumbSrc||t.thumbSrc||"",t[eW]=parseFloat(i[eW]||"")||t[eW]||0,t[e$]=parseFloat(i.thumbHeight||"")||t[e$]||0),this.addSlide(t)}onInitSlides(){this.build()}onChange(){var e;if(!this.isModern)return;let t=this.container,i=this.instance,n=i.panzoom,s=this.carousel,o=s?s.panzoom:null,a=i.page;if(n&&s&&o){if(n.isDragging){j(t,this.cn(eN));let n=(null===(e=s.pages[a])||void 0===e?void 0:e.pos)||0;n+=i.getProgress(a)*(this[eW]+this.thumbGap);let r=o.getBounds();-1*n>r.x.min&&-1*n<r.x.max&&o.panTo({x:-1*n,friction:.12})}else x(t,this.cn(eN),n.isResting);this.shiftModern()}}onRefresh(){for(let e of(this.updateProps(),this.instance.slides||[]))this.resizeModernSlide(e);this.shiftModern()}isDisabled(){let e=this.option("minCount")||0;if(e){let t=this.instance,i=0;for(let e of t.slides||[])e.thumbSrc&&i++;if(i<e)return!0}return 0>["modern","classic"].indexOf(this.option("type"))}getThumb(e){let t=this.option("thumbTpl")||"";return{html:this.instance.localize(t,[["%i",e.index],["%d",e.index+1],["%s",e.thumbSrc||"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"]])}}addSlide(e){let t=this.carousel;t&&t.addSlide(e.index,this.getThumb(e))}getSlides(){let e=[];
1for(let t of this.instance.slides||[])e.push(this.getThumb(t));return e}resizeModernSlide(e){this.isModern&&(e[e_]=e[eW]&&e[e$]?Math.round(this[e$]*(e[eW]/e[e$])):this[e_])}updateProps(){let e=this.container;if(!e)return;let t=t=>parseFloat(getComputedStyle(e).getPropertyValue("--f-thumb-"+t))||0;this.thumbGap=t("gap"),this.thumbExtraGap=t("extra-gap"),this[e_]=t("width")||40,this[eW]=t("clip-width")||40,this[e$]=t("height")||40}build(){let e=this;if(e.state!==r.Init)return;if(e.isDisabled())return void e.emit("disabled");let t=e.instance,i=t.container,n=e.getSlides(),s=e.option("type");e.type=s;let o=e.option("parentEl"),a=e.cn("container"),l=e.cn("track"),h=null==o?void 0:o.querySelector("."+a);h||(B(h=document.createElement("div"),a),o?o.appendChild(h):i.after(h)),B(h,`is-${s}`),B(i,e.cn("hasThumbs")),e.container=h,e.updateProps();let c=h.querySelector("."+l);c||(B(c=document.createElement("div"),e.cn("track")),h.appendChild(c)),e.track=c;let d=O({},{track:c,infinite:!1,center:!0,fill:"classic"===s,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"}},e.option("Carousel")||{},{Sync:{target:t},slides:n}),u=new t.constructor(h,d);u.on("createSlide",(t,i)=>{e.setProps(i.index),e.emit("createSlide",i,i.el)}),u.on("ready",()=>{e.shiftModern(),e.emit("ready")}),u.on("refresh",()=>{e.shiftModern()}),u.on("Panzoom.click",(t,i,n)=>{e.onClick(n)}),e.carousel=u,e.state=r.Ready}onClick(e){e.preventDefault(),e.stopPropagation();let t=this.instance,{pages:i,page:n}=t,s=e=>{if(e){let t=e.closest("[data-carousel-index]");if(t)return[parseInt(t.dataset.carouselIndex||"",10)||0,t]}return[-1,void 0]},o=(e,t)=>{let i=document.elementFromPoint(e,t);return i?s(i):[-1,void 0]},[a,r]=s(e.target);if(a>-1)return;let l=this[eW],h=e.clientX,c=e.clientY,[d,u]=o(h-l,c),[p,f]=o(h+l,c);u&&f?(a=Math.abs(h-u.getBoundingClientRect().right)<Math.abs(h-f.getBoundingClientRect().left)?d:p)===n&&(a=a===d?p:d):u?a=d:f&&(a=p),a>-1&&i[a]&&t.slideTo(a)}getShift(e){var t;let{instance:i}=this,n=this.carousel;if(!i||!n)return 0;let s=this[e_],o=this[eW],a=this.thumbGap,r=this.thumbExtraGap;if(!(null===(t=n.slides[e])||void 0===t?void 0:t.el))return 0;let l=i.pages.length-1,h=i.getProgress(0),c=i.getProgress(l),d=i.getProgress(e,!1,!0),u=0,p=.5*(s-o)+r+a,f=h<0&&h>-1,g=c>0&&c<1;return 0===e?(u=p*Math.abs(h),g&&1===h&&(u-=p*Math.abs(c))):e===l?(u=-(p*Math.abs(c)*1),f&&-1===c&&(u+=p*Math.abs(h))):u=f||g?-1*p+p*Math.abs(h)+p*(1-Math.abs(c)):p*d,u}setProps(e){var t;if(!this.isModern)return;let{instance:i}=this,n=this.carousel;if(i&&n){let s=null===(t=n.slides[e])||void 0===t?void 0:t.el;if(s&&s.childNodes.length){let t=m(1-Math.abs(i.getProgress(e))),n=m(this.getShift(e));s.style.setProperty("--progress",t?t+"":""),s.style.setProperty("--shift",n+"")}}}shiftModern(){if(!this.isModern)return;let{instance:e,track:t}=this,i=e.panzoom,s=this.carousel;if(!(e&&t&&i&&s)||i.state===n.Init||i.state===n.Destroy)return;for(let t of e.slides)this.setProps(t.index);let o=(this[eW]+this.thumbGap)*(s.slides.length||0);t.style.setProperty("--width",o+"")}cleanup(){this.carousel&&this.carousel.destroy(),this.carousel=null,this.container&&this.container.remove(),this.container=null,this.track&&this.track.remove(),this.track=null,this.state=r.Init,j(this.instance.container,this.cn("hasThumbs"))}attach(){let e=this.instance;e.on("initSlide",this.onInitSlide),e.state===s.Init?e.on("initSlides",this.onInitSlides):this.onInitSlides(),e.on(["change","Panzoom.afterTransform"],this.onChange),e.on("Panzoom.refresh",this.onRefresh)}detach(){let e=this.instance;e.off("initSlide",this.onInitSlide),e.off("initSlides",this.onInitSlides),e.off(["change","Panzoom.afterTransform"],this.onChange),e.off("Panzoom.refresh",this.onRefresh),this.cleanup()}};Object.defineProperty(eX,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:eH});let eq=Object.assign(Object.assign({},eH),{key:"t",showOnStart:!0,parentEl:null}),eY="is-masked",eV="aria-hidden";class eZ extends K{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(){let e=this.ref;return e&&!e.isDisabled()}get isHidden(){return this.hidden}onClick(e,t){t.stopPropagation()}onCreateSlide(e,t){var i,n,s;let o=(null===(s=null===(n=null===(i=this.instance)||void 0===i?void 0:i.carousel)||void 0===n?void 0:n.slides[t.index])||void 0===s?void 0:s.type)||"",a=t.el;if(a&&o){let e=`for-${o}`;["video","youtube","vimeo","html5video"].includes(o)&&(e+=" for-video"),B(a,e)}}onInit(){var e;let t=this,i=t.instance,n=i.carousel;if(t.ref||!n)return;let s=t.option("parentEl")||i.footer||i.container;if(!s)return;let o=O({},t.options,{parentEl:s,classes:{container:"f-thumbs fancybox__thumbs"},Carousel:{Sync:{friction:i.option("Carousel.friction")||0}},on:{ready:e=>{let i=e.container;i&&this.hidden&&(t.refresh(),i.style.transition="none",t.hide(),i.offsetHeight,queueMicrotask(()=>{i.style.transition="",t.show()}))}}});o.Carousel=o.Carousel||{},o.Carousel.on=O((null===(e=t.options.Carousel)||void 0===e?void 0:e.on)||{},{click:this.onClick,createSlide:this.onCreateSlide}),n.options.Thumbs=o,n.attachPlugins({Thumbs:eX}),t.ref=n.plugins.Thumbs,t.option("showOnStart")||(t.ref.state=r.Hidden,t.hidden=!0)}onResize(){var e;let t=null===(e=this.ref)||void 0===e?void 0:e.container;t&&(t.style.maxHeight="")}onKeydown(e,t){let i=this.option("key");i&&i===t&&this.toggle()}toggle(){let e=this.ref;if(e&&!e.isDisabled())return e.state===r.Hidden?(e.state=r.Init,void e.build()):void(this.hidden?this.show():this.hide())}show(){let e=this.ref;if(!e||e.isDisabled())return;let t=e.container;t&&(this.refresh(),t.offsetHeight,t.removeAttribute(eV),t.classList.remove(eY),this.hidden=!1)}
1hide(){let e=this.ref,t=e&&e.container;t&&(this.refresh(),t.offsetHeight,t.classList.add(eY),t.setAttribute(eV,"true")),this.hidden=!0}refresh(){let e=this.ref;if(!e||!e.state)return;let t=e.container,i=(null==t?void 0:t.firstChild)||null;t&&i&&i.childNodes.length&&(t.style.maxHeight=`${i.getBoundingClientRect().height}px`)}attach(){let e=this.instance;e.state===o.Init?e.on("Carousel.init",this.onInit):this.onInit(),e.on("resize",this.onResize),e.on("keydown",this.onKeydown)}detach(){var e;let t=this.instance;t.off("Carousel.init",this.onInit),t.off("resize",this.onResize),t.off("keydown",this.onKeydown),null===(e=t.carousel)||void 0===e||e.detachPlugins(["Thumbs"]),this.ref=null}}Object.defineProperty(eZ,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:eq});let eU={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"}};(f=l||(l={}))[f.Init=0]="Init",f[f.Ready=1]="Ready",f[f.Disabled=2]="Disabled";let eG={tabindex:"-1",width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},eK="has-toolbar",eJ="fancybox__toolbar";class eQ extends K{constructor(){super(...arguments),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:l.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("auto"===s){let e=this.instance.carousel,t=0;if(e)for(let i of e.slides)(i.panzoom||"image"===i.type)&&t++;t||(s=!1)}s||(i=void 0);let o=0,a={left:[],middle:[],right:[]};if(i)for(let e of["left","middle","right"])for(let n of i[e]){let i=this.createEl(n);i&&(null===(t=a[e])||void 0===t||t.push(i),o++)}let r=null;if(o&&(r=this.createContainer()),r){for(let[e,t]of Object.entries(a)){let i=document.createElement("div");for(let n of(B(i,eJ+"__column is-"+e),t))i.appendChild(n);"auto"!==n||"middle"!==e||t.length||(n=!0),r.appendChild(i)}!0===n&&B(r,"is-absolute"),this.state=l.Ready,this.onRefresh()}else this.state=l.Disabled}onClick(e){var t,i;let n=this.instance,s=n.getSlide(),o=null==s?void 0:s.panzoom,a=e.target,r=a&&F(a)?a.dataset:null;if(!r)return;if(void 0!==r.fancyboxToggleThumbs)return e.preventDefault(),e.stopPropagation(),void(null===(t=n.plugins.Thumbs
1)||void 0===t||t.toggle());if(void 0!==r.fancyboxToggleFullscreen)return e.preventDefault(),e.stopPropagation(),void this.instance.toggleFullscreen();if(void 0!==r.fancyboxToggleSlideshow){e.preventDefault(),e.stopPropagation();let t=null===(i=n.carousel)||void 0===i?void 0:i.plugins.Autoplay,s=t.isActive;return o&&"mousemove"===o.panMode&&!s&&o.reset(),void(s?t.stop():t.start())}let l=r.panzoomAction,h=r.panzoomChange;if((h||l)&&(e.preventDefault(),e.stopPropagation()),h){let e={};try{e=JSON.parse(h)}catch(e){}o&&o.applyChange(e)}else l&&o&&o[l]&&o[l]()}onChange(){this.onRefresh()}onRefresh(){if(this.instance.isClosing())return;let e=this.container;if(!e)return;let t=this.instance.getSlide();if(!t||t.state!==a.Ready)return;let i=t&&!t.error&&t.panzoom;for(let t of e.querySelectorAll("[data-panzoom-action]"))i?(t.removeAttribute("disabled"),t.removeAttribute("tabindex")):(t.setAttribute("disabled",""),t.setAttribute("tabindex","-1"));let n=i&&i.canZoomIn(),s=i&&i.canZoomOut();for(let t of e.querySelectorAll('[data-panzoom-action="zoomIn"]'))n?(t.removeAttribute("disabled"),t.removeAttribute("tabindex")):(t.setAttribute("disabled",""),t.setAttribute("tabindex","-1"));for(let t of e.querySelectorAll('[data-panzoom-action="zoomOut"]'))s?(t.removeAttribute("disabled"),t.removeAttribute("tabindex")):(t.setAttribute("disabled",""),t.setAttribute("tabindex","-1"));for(let t of e.querySelectorAll('[data-panzoom-action="toggleZoom"],[data-panzoom-action="iterateZoom"]')){s||n?(t.removeAttribute("disabled"),t.removeAttribute("tabindex")):(t.setAttribute("disabled",""),t.setAttribute("tabindex","-1"));let e=t.querySelector("g");e&&(e.style.display=n?"":"none")}}onDone(e,t){var i;null===(i=t.panzoom)||void 0===i||i.on("afterTransform",()=>{this.instance.isCurrentSlide(t)&&this.onRefresh()}),this.instance.isCurrentSlide(t)&&this.onRefresh()}createContainer(){let e=this.instance.container;if(!e)return null;let t=this.option("parentEl")||e,i=t.querySelector("."+eJ);return i||(B(i=document.createElement("div"),eJ),t.prepend(i)),i.addEventListener("click",this.onClick,{passive:!1,capture:!0}),e&&B(e,eK),this.container=i,i}createEl(e){let t=this.instance,i=t.carousel;if(!i||"toggleFS"===e||"fullscreen"===e&&!eu())return null;let n=null,s=i.slides.length||0,o=0,a=0;for(let e of i.slides)(e.panzoom||"image"===e.type)&&o++,("image"===e.type||e.downloadSrc)&&a++;if(s<2&&["infobar","prev","next"].includes(e))return n;if(void 0!==eU[e]&&!o||"download"===e&&!a)return null;if("thumbs"===e){let e=t.plugins.Thumbs;if(!e||!e.isEnabled)return null}if("slideshow"===e&&(!i.plugins.Autoplay||s<2))return null;if(void 0!==eU[e]){let t=eU[e];(n=document.createElement("button")).setAttribute("title",this.instance.localize(`{{${e.toUpperCase()}}}`)),B(n,"f-button"),t.action&&(n.dataset.panzoomAction=t.action),t.change&&(n.dataset.panzoomChange=JSON.stringify(t.change)),n.appendChild(y(this.instance.localize(t.icon)))}else{let t=(this.option("items")||[])[e];t&&(n=y(this.instance.localize(t.tpl)),"function"==typeof t.click&&n.addEventListener("click",e=>{e.preventDefault(),e.stopPropagation(),"function"==typeof t.click&&t.click.call(this,this,e)}))}let r=null==n?void 0:n.querySelector("svg");if(r)for(let[e,t]of Object.entries(eG))r.getAttribute(e)||r.setAttribute(e,String(t));return n}removeContainer(){let e=this.container;e&&e.remove(),this.container=null,this.state=l.Disabled;let t=this.instance.container;t&&j(t,eK)}attach(){let e=this.instance;e.on("Carousel.initSlides",this.onReady),e.on("done",this.onDone),e.on(["reveal","Carousel.change"],this.onChange),this.onReady(this.instance)}detach(){let e=this.instance;e.off("Carousel.initSlides",this.onReady),e.off("done",this.onDone),e.off(["reveal","Carousel.change"],this.onChange),this.removeContainer()}}Object.defineProperty(eQ,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{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>
1<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}});let e0="with-fancybox",e1="hide-scrollbar",e2="--fancybox-scrollbar-compensate",e5="--fancybox-body-margin",e3="aria-hidden",e4="is-using-tab",e6="is-animated",e8="is-compact",e7="is-loading",e9="is-opening",te="has-caption",tt="disabled",ti="tabindex",tn="download",ts="href",to=e=>"string"==typeof e,ta=function(){var e=window.getSelection();return!!e&&"Range"===e.type},tr,tl=null,th=null,tc=0,td=0,tu=0,tp=0,tf=new Map,tg=0;class tm extends z{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,"startedFs",{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,"caption",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"footer",{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}),tr||(tr=eu()),this.id=t.id||++tg,tf.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({},tm.Plugins),this.userPlugins)),this.emit("init"),this.emit("attachPlugins"),!0===this.option("hideScrollbar")&&(()=>{if(!eh)return;let e=document,t=e.body,i=e.documentElement;if(t.classList.contains(e1))return;let n=window.innerWidth-i.getBoundingClientRect().width,s=parseFloat(window.getComputedStyle(t).marginRight);n<0&&(n=0),i.style.setProperty(e2,`${n}px`),s&&t.style.setProperty(e5,`${s}px`),t.classList.add(e1)})(),this.initLayout(),this.scale();let e=()=>{this.initCarousel(this.userSlides),this.state=o.Ready,this.attachEvents(),this.emit("ready"),setTimeout(()=>{this.container&&this.container.setAttribute(e3,"false")},16)};this.option("Fullscreen.autoStart")&&tr&&!tr.isFullscreen()?tr.request().then(()=>{this.startedFs=!0,e()}).catch(()=>e()):e()}initLayout(){var e,t;let i=this.option("parentEl")||document.body,n=y(this.localize(this.option("tpl.main")||""));if(n){if(n.setAttribute("id",`fancybox-${this.id}`),n.setAttribute("aria-label",this.localize("{{MODAL}}")),n.classList.toggle(e8,this.isCompact),B(n,this.option("mainClass")||""),B(n,e9),this.container=n,this.footer=n.querySelector(".fancybox__footer"),i.appendChild(n),B(document.documentElement,e0),tl&&th||(B(tl=document.createElement("span"),"fancybox-focus-guard"),tl.setAttribute(ti,"0"),tl.setAttribute(e3,"true"),tl.setAttribute("aria-label","Focus guard"),th=tl.cloneNode(),null===(e=n.parentElement)||void 0===e||e.insertBefore(tl,n),null===(t=n.parentElement)||void 0===t||t.append(th)),n.addEventListener("mousedown",e=>{tc=e.pageX,td=e.pageY,j(n,e4)}),this.option("closeExisting"))for(let e of tf.values())e.id!==this.id&&e.close();else this.option("animated")&&(B(n,e6),setTimeout(()=>{this.isClosing()||j(n,e6)},350));
1this.emit("initLayout")}}initCarousel(e){let t=this.container;if(!t)return;let i=t.querySelector(".fancybox__carousel");if(!i)return;let n=this.carousel=new er(i,O({},{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("*",(e,t,...i)=>{this.emit(`Carousel.${t}`,e,...i)}),n.on(["ready","change"],()=>{this.manageCaption()}),this.on("Carousel.removeSlide",(e,t,i)=>{this.clearContent(i),i.state=void 0}),n.on("Panzoom.touchStart",()=>{var e,t;this.isCompact||this.endIdle(),(null===(e=document.activeElement)||void 0===e?void 0:e.closest(".f-thumbs"))&&(null===(t=this.container)||void 0===t||t.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",(e,t)=>{let i=this.getSlide();if(i&&v(i.el))return;let n=this.container;if(n){let e=Math.abs(t.current.f),i=e<1?"":Math.max(.5,Math.min(1,1-e/t.contentRect.fitHeight*1.5));n.style.setProperty("--fancybox-ts",i?"0s":""),n.style.setProperty("--fancybox-opacity",i+"")}}),n.on("Panzoom.touchEnd",(e,t,i)=>{var n;let s=this.getSlide();if(s&&v(s.el)||t.isMobile&&document.activeElement&&-1!==["TEXTAREA","INPUT"].indexOf(null===(n=document.activeElement)||void 0===n?void 0:n.nodeName))return;let o=Math.abs(t.dragOffset.y);"y"===t.lockedAxis&&(o>=200||o>=50&&t.dragOffset.time<300)&&(i&&i.cancelable&&i.preventDefault(),this.close(i,"f-throwOut"+(t.current.f<0?"Up":"Down")))})),n.on("change",e=>{var t;let i=null===(t=this.getSlide())||void 0===t?void 0:t.triggerEl;if(i){let t=new CustomEvent("slideTo",{bubbles:!0,cancelable:!0,detail:e.page});i.dispatchEvent(t)}}),n.on(["refresh","change"],e=>{let t=this.container;if(!t)return;for(let i of t.querySelectorAll("[data-fancybox-current-index]"))i.innerHTML=e.page+1;for(let i of t.querySelectorAll("[data-fancybox-count]"))i.innerHTML=e.pages.length;if(!e.isInfinite){for(let i of t.querySelectorAll("[data-fancybox-next]"))e.page<e.pages.length-1?(i.removeAttribute(tt),i.removeAttribute(ti)):(i.setAttribute(tt,""),i.setAttribute(ti,"-1"));for(let i of t.querySelectorAll("[data-fancybox-prev]"))e.page>0?(i.removeAttribute(tt),i.removeAttribute(ti)):(i.setAttribute(tt,""),i.setAttribute(ti,"-1"))}let i=this.getSlide();if(!i)return;let n=i.downloadSrc||"";for(let e of(n||"image"!==i.type||i.error||!to(i.src)||(n=i.src),t.querySelectorAll("[data-fancybox-download]"))){let t=i.downloadFilename;n?(e.removeAttribute(tt),e.removeAttribute(ti),e.setAttribute(ts,n),e.setAttribute(tn,t||n),e.setAttribute("target","_blank")):(e.setAttribute(tt,""),e.setAttribute(ti,"-1"),e.removeAttribute(ts),e.removeAttribute(tn))}}),this.emit("initCarousel")}attachEvents(){let e=this.container;if(!e)return;e.addEventListener("click",this.onClick,{passive:!1,capture:!1}),e.addEventListener("wheel",this.onWheel,{passive:!1,capture:!1}),document.addEventListener("keydown",this.onKeydown,{passive:!1,capture:!0}),document.addEventListener("visibilitychange",this.onVisibilityChange,!1),document.addEventListener("mousemove",this.onMousemove),this.option("trapFocus")&&document.addEventListener("focus",this.onFocus,!0),window.addEventListener("resize",this.onResize);let t=window.visualViewport;t&&(t.addEventListener("scroll",this.onResize),t.addEventListener("resize",this.onResize))}detachEvents(){let e=this.container;if(!e)return;document.removeEventListener("keydown",this.onKeydown,{passive:!1,capture:!0}),e.removeEventListener("wheel",this.onWheel,{passive:!1,capture:!1}),e.removeEventListener("click",this.onClick,{passive:!1,capture:!1}),document.removeEventListener("mousemove",this.onMousemove),window.removeEventListener("resize",this.onResize);let t=window.visualViewport;t&&(t.removeEventListener("resize",this.onResize),t.removeEventListener("scroll",this.onResize)),document.removeEventListener("visibilitychange",this.onVisibilityChange,!1),document.removeEventListener("focus",this.onFocus,!0)}scale(){let e=this.container;if(!e)return;
1let t=window.visualViewport,i=Math.max(1,(null==t?void 0:t.scale)||1),n="",s="",o="";if(t&&i>1){let e=`${t.offsetLeft}px`,a=`${t.offsetTop}px`;n=t.width*i+"px",s=t.height*i+"px",o=`translate3d(${e}, ${a}, 0) scale(${1/i})`}e.style.transform=o,e.style.width=n,e.style.height=s}onClick(e){var t;let{container:i,isCompact:n}=this;if(!i||this.isClosing())return;!n&&this.option("idle")&&this.resetIdle();let s=e.composedPath()[0];if(s.closest(".fancybox-spinner")||s.closest("[data-fancybox-close]"))return e.preventDefault(),void this.close(e);if(s.closest("[data-fancybox-prev]"))return e.preventDefault(),void this.prev();if(s.closest("[data-fancybox-next]"))return e.preventDefault(),void this.next();if("click"===e.type&&0===e.detail||Math.abs(e.pageX-tc)>30||Math.abs(e.pageY-td)>30)return;let o=document.activeElement;if(ta()&&o&&i.contains(o))return;if(n&&"image"===(null===(t=this.getSlide())||void 0===t?void 0:t.type))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 a=!1;if(s.closest(".fancybox__content")){if(o){if(o.closest("[contenteditable]"))return;s.matches(ec)||o.blur()}if(ta())return;a=this.option("contentClick")}else s.closest(".fancybox__carousel")&&!s.matches(ec)&&(a=this.option("backdropClick"));"close"===a?(e.preventDefault(),this.close(e)):"next"===a?(e.preventDefault(),this.next()):"prev"===a&&(e.preventDefault(),this.prev())}onWheel(e){let t=e.target,i=this.option("wheel",e);t.closest(".fancybox__thumbs")&&(i="slide");let n="slide"===i,s=Math.max(-1,Math.min(1,[-e.deltaX||0,-e.deltaY||0,-e.detail||0].reduce(function(e,t){return Math.abs(t)>Math.abs(e)?t:e}))),o=Date.now();this.pwt&&o-this.pwt<300?n&&e.preventDefault():(this.pwt=o,this.emit("wheel",e,s),e.defaultPrevented||("close"===i?(e.preventDefault(),this.close(e)):"slide"===i&&(b(t)||(e.preventDefault(),this[s>0?"prev":"next"]()))))}onScroll(){window.scrollTo(tu,tp)}onKeydown(e){if(!this.isTopmost())return;this.isCompact||!this.option("idle")||this.isClosing()||this.resetIdle();let t=e.key,i=this.option("keyboard");if(!i)return;let n=e.composedPath()[0],s=document.activeElement&&document.activeElement.classList,o=s&&s.contains("f-button")||n.dataset.carouselPage||n.dataset.carouselIndex;if("Escape"!==t&&!o&&F(n)&&(n.isContentEditable||-1!==["TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].indexOf(n.nodeName))||("Tab"===e.key?B(this.container,e4):j(this.container,e4),e.ctrlKey||e.altKey||e.shiftKey))return;this.emit("keydown",t,e);let a=i[t];a&&"function"==typeof this[a]&&(e.preventDefault(),this[a]())}onResize(){let e=this.container;if(!e)return;let t=this.isCompact;e.classList.toggle(e8,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(){"visible"===document.visibilityState?this.checkFocus():this.endIdle()}manageCloseBtn(e){let t=this.optionFor(e,"closeButton")||!1;if("auto"===t){let e=this.plugins.Toolbar;if(e&&e.state===l.Ready)return}if(!t||!e.contentEl||e.closeBtnEl)return;let i=this.option("tpl.closeButton");if(i){let t=y(this.localize(i));e.closeBtnEl=e.contentEl.appendChild(t),e.el&&B(e.el,"has-close-btn")}}manageCaption(e){var t,i;let n="fancybox__caption",s=this.container;if(!s)return;j(s,te);let 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(let e of(null===(t=this.carousel)||void 0===t?void 0:t.slides)||[])e.captionEl&&(e.captionEl.remove(),e.captionEl=void 0,j(e.el,te),null===(i=e.el)||void 0===i||i.removeAttribute("aria-labelledby"));if(e||(e=this.getSlide()),!e||o&&!this.isCurrentSlide(e))return;let r=e.el,l=this.optionFor(e,"caption","");if(!l)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,r&&!h){let t=n+`_${this.id}_${e.index}`;B(h=document.createElement("div"),n),h.setAttribute("id",t),e.captionEl=r.a
1ppendChild(h),B(r,te),r.setAttribute("aria-labelledby",t)}}else(h=this.caption)||(h=s.querySelector("."+n)),h||((h=document.createElement("div")).dataset.fancyboxCaption="",B(h,n),(this.footer||s).prepend(h)),B(s,te),this.caption=h;h&&(h.innerHTML="",to(l)||"number"==typeof l?h.innerHTML=l+"":l instanceof HTMLElement&&h.appendChild(l))}checkFocus(e){this.focus(e)}focus(e){var t;if(this.ignoreFocusChange)return;let i=document.activeElement||null,n=(null==e?void 0:e.target)||null,s=this.container,o=null===(t=this.carousel)||void 0===t?void 0:t.viewport;if(!s||!o||!e&&i&&s.contains(i))return;let r=this.getSlide(),l=r&&r.state===a.Ready?r.el:null;if(!l||l.contains(i)||s===i)return;e&&e.cancelable&&e.preventDefault(),this.ignoreFocusChange=!0;let h=Array.from(s.querySelectorAll(ec)),c=[],d=null;for(let e of h){let t=!e.offsetParent||!!e.closest('[aria-hidden="true"]'),i=l&&l.contains(e),n=!o.contains(e);if(e===s||(i||n)&&!t){c.push(e);let t=e.dataset.origTabindex;void 0!==t&&t&&(e.tabIndex=parseFloat(t)),e.removeAttribute("data-orig-tabindex"),!e.hasAttribute("autoFocus")&&d||(d=e)}else{let t=void 0===e.dataset.origTabindex?e.getAttribute("tabindex")||"":e.dataset.origTabindex;t&&(e.dataset.origTabindex=t),e.tabIndex=-1}}let u=null;e?(!n||0>c.indexOf(n))&&(u=d||s,c.length&&(i===th?u=c[0]:this.lastFocus!==s&&i!==tl||(u=c[c.length-1]))):u=r&&"image"===r.type?s:d||s,u&&ed(u),this.lastFocus=document.activeElement,this.ignoreFocusChange=!1}next(){let e=this.carousel;e&&e.pages.length>1&&e.slideNext()}prev(){let e=this.carousel;e&&e.pages.length>1&&e.slidePrev()}jumpTo(...e){this.carousel&&this.carousel.slideTo(...e)}isTopmost(){var e;return(null===(e=tm.getInstance())||void 0===e?void 0:e.id)==this.id}animate(e=null,t="",i){if(!e||!t)return void(i&&i());this.stop(e);let n=s=>{s.target===e&&e.dataset.animationName&&(e.removeEventListener("animationend",n),delete e.dataset.animationName,i&&i(),j(e,t))};e.dataset.animationName=t,e.addEventListener("animationend",n),B(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;let n=e.el;if(!n)return;let s=null;if(F(t)?s=t:F(s=y(t+""))||((s=document.createElement("div")).innerHTML=t+""),["img","picture","iframe","video","audio"].includes(s.nodeName.toLowerCase())){let e=document.createElement("div");e.appendChild(s),s=e}F(s)&&e.filter&&!e.error&&(s=s.querySelector(e.filter)),s&&F(s)?(B(s,"fancybox__content"),e.id&&s.setAttribute("id",e.id),n.classList.add(`has-${e.error?"error":e.type||"unknown"}`),n.prepend(s),"none"===s.style.display&&(s.style.display=""),"none"===getComputedStyle(s).getPropertyValue("display")&&(s.style.display=e.display||this.option("defaultDisplay")||"flex"),e.contentEl=s,i&&this.revealContent(e),this.manageCloseBtn(e),this.manageCaption(e)):this.setError(e,"{{ELEMENT_NOT_FOUND}}")}revealContent(e,t){let i=e.el,n=e.contentEl;i&&n&&(this.emit("reveal",e),this.hideLoading(e),e.state=a.Opening,(t=this.isOpeningSlide(e)?void 0===t?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),B(e.el,"is-done"),this.isCurrentSlide(e)&&this.option("autoFocus")&&queueMicrotask(()=>{var t;null===(t=e.panzoom)||void 0===t||t.updateControls(),this.option("autoFocus")&&this.focus()}),this.isOpeningSlide(e)&&(j(this.container,e9),!this.isCompact&&this.option("idle")&&this.setIdle()))}isCurrentSlide(e){let t=this.getSlide();return!(!e||!t)&&t.index===e.index}isOpeningSlide(e){var t,i;return null===(null===(t=this.carousel)||void 0===t?void 0:t.prevPage)&&e&&e.index===(null===(i=this.getSlide())||void 0===i?void 0:i.index)}showLoading(e){e.state=a.Loading;let t=e.el;t&&(B(t,e7),this.emit("loading",e),e.spinnerEl||setTimeout(()=>{if(!this.isClosing()&&!e.spinnerEl&&e.state===a.Loading){let i=y(D);B(i,"fancybox-spinner"),e.spinnerEl=i,t.prepend(i),this.animate(i,"f-fadeIn")}},250))}hideLoading(e){let t=e.el;if(!t)return;let i=e.spinnerEl;this.isClosing()?null==i||i.remove():(j(t,e7),i&&this.animate(i,"f-fadeOut",()=>{i.remove()}
1),e.state===a.Loading&&(this.emit("loaded",e),e.state=a.Ready))}setError(e,t){if(this.isClosing())return;let 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);let n=document.createElement("div");n.classList.add("fancybox-error"),n.innerHTML=this.localize(t||"<p>{{ERROR}}</p>"),this.setContent(e,n)}clearContent(e){if(void 0===e.state)return;this.emit("clearContent",e),e.contentEl&&(e.contentEl.remove(),e.contentEl=void 0);let t=e.el;t&&(j(t,"has-error"),j(t,"has-unknown"),j(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;let t=this.carousel;return(null===(e=null==t?void 0:t.pages[null==t?void 0:t.page])||void 0===e?void 0:e.slides[0])||void 0}close(e,t){if(this.isClosing())return;let i=new Event("shouldClose",{bubbles:!0,cancelable:!0});if(this.emit("shouldClose",i,e),i.defaultPrevented)return;e&&e.cancelable&&(e.preventDefault(),e.stopPropagation());let n=()=>{this.proceedClose(e,t)};this.startedFs&&tr&&tr.isFullscreen()?Promise.resolve(tr.exit()).then(()=>n()):n()}clearIdle(){this.idleTimer&&clearTimeout(this.idleTimer),this.idleTimer=null}setIdle(e=!1){let t=()=>{this.clearIdle(),this.idle=!0,B(this.container,"is-idle"),this.emit("setIdle")};if(this.clearIdle(),!this.isClosing()){if(e)t();else{let e=this.option("idle");e&&(this.idleTimer=setTimeout(t,e))}}}endIdle(){this.clearIdle(),this.idle&&!this.isClosing()&&(this.idle=!1,j(this.container,"is-idle"),this.emit("endIdle"))}resetIdle(){this.endIdle(),this.setIdle()}toggleIdle(){this.idle?this.endIdle():this.setIdle(!0)}toggleFullscreen(){tr&&(tr.isFullscreen()?tr.exit():tr.request().then(()=>{this.startedFs=!0}))}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();let s=this.container,r=this.carousel,l=this.getSlide(),h=l&&this.option("placeFocusBack")?l.triggerEl||this.option("triggerEl"):null;if(h&&(el(h)?ed(h):h.focus()),s&&(j(s,e9),B(s,"is-closing"),s.setAttribute(e3,"true"),this.option("animated")&&B(s,e6),s.style.pointerEvents="none"),r)for(let e of(r.clearTransitions(),null===(i=r.panzoom)||void 0===i||i.destroy(),null===(n=r.plugins.Navigation)||void 0===n||n.detach(),r.slides)){e.state=a.Closing,this.hideLoading(e);let t=e.contentEl;t&&this.stop(t);let i=null==e?void 0:e.panzoom;i&&(i.stop(),i.detachEvents(),i.detachObserver()),this.isCurrentSlide(e)||r.emit("removeSlide",e)}tu=window.scrollX,tp=window.scrollY,window.addEventListener("scroll",this.onScroll),this.emit("close",e),this.state!==o.CustomClosing?(void 0===t&&l&&(t=this.optionFor(l,"hideClass")),t&&l?(this.animate(l.contentEl,t,()=>{r&&r.emit("removeSlide",l)}),setTimeout(()=>{this.destroy()},500)):this.destroy()):setTimeout(()=>{this.destroy()},500)}destroy(){var e;if(this.state===o.Destroy)return;window.removeEventListener("scroll",this.onScroll),this.state=o.Destroy,null===(e=this.carousel)||void 0===e||e.destroy();let t=this.container;t&&t.remove(),tf.delete(this.id);let i=tm.getInstance();i?i.focus():(tl&&(tl.remove(),tl=null),th&&(th.remove(),th=null),j(document.documentElement,e0),(()=>{if(!eh)return;let e=document,t=e.body;t.classList.remove(e1),t.style.setProperty(e5,""),e.documentElement.style.setProperty(e2,"")})(),this.emit("destroy"))}static bind(e,t,i){if(!eh)return;let n,s="",o={};if(void 0===e?n=document.body:to(e)?(n=document.body,s=e,"object"==typeof t&&(o=t||{})):(n=e,to(t)&&(s=t),"object"==typeof i&&(o=i||{})),!n||!F(n))return;s=s||"[data-fancybox]";let a=tm.openers.get(n)||new Map;a.set(s,o),tm.openers.set(n,a),1===a.size&&n.addEventListener("click",tm.fromEvent)}static unbind(e,t){let i,n="";if(to(e)?(i=document.body,n=e):(i=e,to(t)&&(n=t)),!i)return;let s=tm.openers.get(i);s&&n&&s.delete(n),n&&s||(tm.openers.delete(i),i.removeEventListener("click",tm.fromEvent))}static destroy(){let e;for(;e=tm.getInstance();)e.destroy();for(let e of tm.openers.keys())e.removeEventListener("click",tm.fromEvent);tm.openers=new Map}static fromEvent(e){let t,i,n,s;if(e.defaultPrevented||e.button&&0!==e.button||e.ctrlKey||e.metaKey||e.shiftKey)return;let o=e.composedPath()[0],a=o.closest("[data-fancybox-trigger]");if(a){let e=a.dataset.fancyboxTrigger||"";o=document.querySelectorAll(`[data-fancybox="${e}"]`)[parseInt(a.dataset.fancyboxIndex||"",10)||0]||o}if(!(o&&o instanceof Element)||([...tm.openers].reverse().find(([e,a])=>!(!e.contains(o)||![...a].reverse().find(([a,r])=>{let l=o.closest(a);return!!l&&(t=e,i=a,n=l,s=r,!0)}))),!t||!i||!n))return;s=s||{},e.preventDefault(),o=n;let r=[],l=O({},ep,s);l.event=e,l.triggerEl=o,l.delegate=a;let h=l.groupAll,c=l.groupAttr,d=c&&o?o.getAttribute(`${c}`):"";if((!o||d||h)&&(r=[].slice.call(t.querySelectorAll(i))),o&&!h&&(r=d?r.filter(e=>e.getAttribute(`${c}`)===d):[o]),!r.length)return;let u=tm.getInstance();return u&&u.options.triggerEl&&r.indexOf(u.options.triggerEl)>-1?void 0:(o&&(l.startIndex=r.indexOf(o)),tm.fromNodes(r,l))}static fromSelector(e,t,i){let n=null,s="",o={};if(to(e)?(n=document.body,s=e,"object"==typeof t&&(o=t||{})):e instanceof HTMLElement&&to(t)&&(n=e,s=t,"object"==typeof i&&(o=i||{})),!n||!s)return!1;let a=tm.openers.get(n);return!!a&&!!(o=O({},a.get(s)||{},o))&&tm.fromNodes(Array.from(n.querySelectorAll(s)),o)}
1static fromNodes(e,t){t=O({},ep,t||{});let i=[];for(let n of e){let e,s;let o=n.dataset||{},a=o.src||n.getAttribute(ts)||n.getAttribute("currentSrc")||n.getAttribute("src")||void 0,r=t.delegate;r&&i.length===t.startIndex&&(e=r instanceof HTMLImageElement?r:r.querySelector("img:not([aria-hidden])")),e||(e=n instanceof HTMLImageElement?n:n.querySelector("img:not([aria-hidden])")),!e||(s=e.currentSrc||e.src||void 0)||!e.dataset||(s=e.dataset.lazySrc||e.dataset.src||void 0);let l={src:a,triggerEl:n,thumbEl:e,thumbElSrc:s,thumbSrc:s};for(let e in o){let t=o[e]+"";t="false"!==t&&("true"===t||t),l[e]=t}i.push(l)}return new tm(i,t)}static getInstance(e){return e?tf.get(e):Array.from(tf.values()).reverse().find(e=>!e.isClosing()&&e)||null}static getSlide(){var e;return(null===(e=tm.getInstance())||void 0===e?void 0:e.getSlide())||null}static show(e=[],t={}){return new tm(e,t)}static next(){let e=tm.getInstance();e&&e.next()}static prev(){let e=tm.getInstance();e&&e.prev()}static close(e=!0,...t){if(e)for(let e of tf.values())e.close(...t);else{let e=tm.getInstance();e&&e.close(...t)}}}Object.defineProperty(tm,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.0.36"}),Object.defineProperty(tm,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:ep}),Object.defineProperty(tm,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:{Hash:class extends K{onReady(){eg=!1}onChange(e){ev&&clearTimeout(ev);let{hash:t}=eb(),{hash:i}=ey(),n=e.isOpeningSlide(e.getSlide());n&&(ef=i===t?"":i),t&&t!==i&&(ev=setTimeout(()=>{try{if(e.state===o.Ready){let e="replaceState";n&&!em&&(e="pushState",em=!0),window.history[e]({},document.title,window.location.pathname+window.location.search+t)}}catch(e){}},300))}onClose(e){if(ev&&clearTimeout(ev),!eg&&em)return em=!1,eg=!1,void window.history.back();if(!eg)try{window.history.replaceState({},document.title,window.location.pathname+window.location.search+(ef||""))}catch(e){}}attach(){let e=this.instance;e.on("ready",this.onReady),e.on(["Carousel.ready","Carousel.change"],this.onChange),e.on("close",this.onClose)}detach(){let e=this.instance;e.off("ready",this.onReady),e.off(["Carousel.ready","Carousel.change"],this.onChange),e.off("close",this.onClose)}static parseURL(){return ey()}static startFromUrl(){ew()}static destroy(){window.removeEventListener("hashchange",eE,!1)}},Html:eR,Images:eC,Slideshow:eB,Thumbs:eZ,Toolbar:eQ}}),Object.defineProperty(tm,"openers",{enumerable:!0,configurable:!0,writable:!0,value:new Map})},9711:function(){}}]);

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.