1function escapeRegExp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function isEmpty(e){return null==e||e.hasOwnProperty("length")&&0===e.length||e.constructor===Object&&0===Object.keys(e).length}function setCookie(e,t,i,n,s){Number.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},Number.isInteger(i)||(i=0),Number.isInteger(n)||(n=0),Number.isInteger(s)||(s=0);var o="";if(i||n||s){var a=new Date;a.setTime(a.getTime()+24*i*60*60*1e3+60*n*60*1e3+60*s*1e3),o="expires="+a.toUTCString()}document.cookie=e+"="+t+"; "+o}function getCookie(e){let t=e+"=",i=document.cookie.split(";");for(let e=0;e<i.length;e++){let n=i[e];for(;" "===n.charAt(0);)n=n.substring(1);if(0==n.indexOf(t))return n.substring(t.length,n.length)}return!1}function checkCookie(e,t){var i=getCookie(e);return!1!==i&&void 0!==typeof t?i===t:!1!==i}!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).window=e.window||{})}(this,(function(e){"use strict";const t=(e,t=1e4)=>(e=parseFloat(e+"")||0,Math.round((e+Number.EPSILON)*t)/t),i=function(e){if(!(e&&e instanceof Element&&e.offsetParent))return!1;const t=e.scrollHeight>e.clientHeight,i=window.getComputedStyle(e).overflowY,n=-1!==i.indexOf("hidden"),s=-1!==i.indexOf("visible");return t&&!n&&!s},n=function(e,t=void 0){return!(!e||e===document.body||t&&e===t)&&(i(e)?e:n(e.parentElement,t))},s=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},o=e=>`${e||""}`.split(" ").filter((e=>!!e)),a=(e,t,i)=>{e&&o(t).forEach((t=>{e.classList.toggle(t,i||!1)}))};class r{constructor(e){Object.defineProperty(this,"pageX",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"pageY",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"clientX",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"clientY",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"time",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"nativePointer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.nativePointer=e,this.pageX=e.pageX,this.pageY=e.pageY,this.clientX=e.clientX,this.clientY=e.clientY,this.id=self.Touch&&e instanceof Touch?e.identifier:-1,this.time=Date.now()}}const l={passive:!1};class c{constructor(e,{start:t=()=>!0,move:i=()=>{},end:n=()=>{}}){Object.defineProperty(this,"element",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"startCallback",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"moveCallback",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"endCallback",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"currentPointers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"startPointers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),this.element=e,this.startCallback=t,this.moveCallback=i,this.endCallback=n;for(const e of["onPointerStart","onTouchStart","onMove","onTouchEnd","onPointerEnd","onWindowBlur"])this[e]=this[e].bind(this);this.element.addEventListener("mousedown",this.onPointerStart,l),this.element.addEventListener("touchstart",this.onTouchStart,l),this.element.addEventListener("touchmove",this.onMove,l),this.element.addEventListener("touchend",this.onTouchEnd),this.element.addEventListener("touchcancel",this.onTouchEnd)}onPointerStart(e){if(!e.buttons||0!==e.button)return;const t=new r(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(const t of Array.from(e.changedTouches||[]))this.triggerPointerStart(new r(t),e);window.addEventListener("blur",this.onWindowBlur)}onMove(e){const t=this.currentPointers.slice(),i="changedTouches"in e?Array.from(e.changedTouches||[]).map((e=>new r(e))):[new r(e)],n=[];for(const e of i){const 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 r(e)),window.removeEventListener("mousemove",this.onMove),window.removeEventListener("mouseup",this.onPointerEnd),window.removeEventListener("blur",this.onWindowBlur))}onTouchEnd(e){for(const t of Array.from(e.changedTouches||[]))this.triggerPointerEnd(e,new r(t))}triggerPointerStart(e,t){return!!this.startCallback(t,e,this.currentPointers.slice())&&(this.currentPointers.push(e),this.startPointers.push(e),!0)}triggerPointerEnd(e,t){const i=this.currentPointers.findIndex((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;){const e=this.currentPointers[this.currentPointers.length-1];this.currentPointers.splice(this.currentPointers.length-1,1),this.startPointers.splice(this.currentPointers.length-1,1),this.endCallback(new Event("touchend",{bubbles:!0,cancelable:!0,clientX:e.clientX,clientY:e.clientY}),e,this.currentPointers.slice())}}stop(){this.element.removeEventListener("mousedown",this.onPointerStart,l),this.element.removeEventListener("touchstart",this.onTouchStart,l),this.element.removeEventListener("touchmove",this.onMove,l),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 h(e,t){return t?Math.sqrt(Math.pow(t.clientX-e.clientX,2)+Math.pow(t.clientY-e.clientY,2)):0}function d(e,t){return t?{clientX:(e.clientX+t.clientX)/2,clientY:(e.clientY+t.clientY)/2}:e}const u=e=>"object"==typeof e&&null!==e&&e.constructor===Object&&"[object Object]"===Object.prototype.toString.call(e),p=(e,...t)=>{const i=t.length;for(let n=0;n<i;n++){const i=t[n]||{};
1Object.entries(i).forEach((([t,i])=>{const n=Array.isArray(i)?[]:{};e[t]||Object.assign(e,{[t]:n}),u(i)?Object.assign(e[t],p(n,i)):Array.isArray(i)?Object.assign(e,{[t]:[...i]}):Object.assign(e,{[t]:i})}))}return e},g=function(e,t){return e.split(".").reduce(((e,t)=>"object"==typeof e?e[t]:void 0),t)};class f{constructor(e={}){Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"events",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),this.setOptions(e);for(const e of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))e.startsWith("on")&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}setOptions(e){this.options=e?p({},this.constructor.defaults,e):{};for(const[e,t]of Object.entries(this.option("on")||{}))this.on(e,t)}option(e,...t){let i=g(e,this.options);return i&&"function"==typeof i&&(i=i.call(this,this,...t)),i}optionFor(e,t,i,...n){let s=g(t,e);var o;"string"!=typeof(o=s)||isNaN(o)||isNaN(parseFloat(o))||(s=parseFloat(s)),"true"===s&&(s=!0),"false"===s&&(s=!1),s&&"function"==typeof s&&(s=s.call(this,this,e,...n));let a=g(t,this.options);return a&&"function"==typeof a?s=a.call(this,this,e,...n,s):void 0===s&&(s=a),void 0===s?i:s}cn(e){const 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.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=>{const i=this.events.get(e);if(Array.isArray(i)){const 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(f,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.0.36"}),Object.defineProperty(f,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{}});class m extends f{constructor(e={}){super(e),Object.defineProperty(this,"plugins",{enumerable:!0,configurable:!0,writable:!0,value:{}})}attachPlugins(e={}){const t=new Map;for(const[i,n]of Object.entries(e)){const 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(const[e,i]of t)this.plugins[e]=i,i.attach()}detachPlugins(e){e=e||Object.keys(this.plugins);for(const t of e){const e=this.plugins[t];e&&e.detach(),delete this.plugins[t]}return this.emit("detachPlugins"),this}}var v;!function(e){e[e.Init=0]="Init",e[e.Error=1]="Error",e[e.Ready=2]="Ready",e[e.Panning=3]="Panning",e[e.Mousemove=4]="Mousemove",e[e.Destroy=5]="Destroy"}(v||(v={}));const b=["a","b","c","d","e","f"],y={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"},w={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:y},x='<circle cx="25" cy="25" r="20"></circle>',S='<div class="f-spinner"><svg viewBox="0 0 50 50">'+x+x+"</svg></div>",E=e=>e&&null!==e&&e instanceof Element&&"nodeType"in e,C=(e,t)=>{e&&o(t).forEach((t=>{e.classList.remove(t)}))},T=(e,t)=>{e&&o(t).forEach((t=>{e.classList.add(t)}))},P={a:1,b:0,c:0,d:1,e:0,f:0},M=1e4,O="mousemove",k="drag",L="content",A="auto";let R=null,j=null;class z extends m{get fits(){return this.contentRect.width-this.contentRect.fitWidth<1&&this.contentRect.height-this.contentRect.fitHeight<1}get isTouchDevice(){return null===j&&(j=window.matchMedia("(hover: none)").matches),j}get isMobile(){return null===R&&(R=/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)),R}get panMode(){return this.options.panMode!==O||this.isTouchDevice?k:O}get panOnlyZoomed(){const e=this.options.panOnlyZoomed;return e===A?this.isTouchDevice:e}get isInfinite(){return this.option("infinite")}get angle(){return 180*Math.atan2(this.current.b,this.current.a)/Math.PI||0}get targetAngle(){return 180*Math.atan2(this.target.b,this.target.a)/Math.PI||0}get scale(){const{a:e,b:t}=this.current;return Math.sqrt(e*e+t*t)||1}get targetScale(){const{a:e,b:t}=this.target;return Math.sqrt(e*e+t*t)||1}get minScale(){return this.option("minScale")||1}get fullScale(){const{contentRect:e}=this;return e.fullWidth/e.fitWidth||1}get maxScale(){return this.fullScale*(this.option("maxScale")||1)||1}get coverScale(){const{containerRect:e,contentRect:t}=this,i=Math.max(e.height/t.fitHeight,e.width/t.fitWidth)||1;return Math.min(this.fullScale,i)}get isScaling(){return Math.abs(this.targetScale-this.scale)>1e-5&&!this.isResting}get isContentLoading(){const e=this.content;return!!(e&&e instanceof HTMLImageElement)&&!e.complete}get isResting(){if(this.isBouncingX||this.isBouncingY)return!1;for(const e of b){const t="e"==e||"f"===e?1e-4:1e-5;
1if(Math.abs(this.target[e]-this.current[e])>t)return!1}return!(!this.ignoreBounds&&!this.checkBounds().inBounds)}constructor(e,t={},i={}){var n;if(super(t),Object.defineProperty(this,"pointerTracker",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"resizeObserver",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"updateTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"clickTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"rAF",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"isTicking",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"ignoreBounds",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"isBouncingX",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"isBouncingY",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"clicks",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"trackingPoints",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"pwt",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"cwd",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"pmme",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"friction",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:v.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({},P)}),Object.defineProperty(this,"target",{enumerable:!0,configurable:!0,writable:!0,value:Object.assign({},P)}),Object.defineProperty(this,"velocity",{enumerable:!0,configurable:!0,writable:!0,value:{a:0,b:0,c:0,d:0,e:0,f:0}}),Object.defineProperty(this,"lockedAxis",{enumerable:!0,configurable:!0,writable:!0,value:!1}),!e)throw new Error("Container Element Not Found");this.container=e,this.initContent(),this.attachPlugins(Object.assign(Object.assign({},z.Plugins),i)),this.emit("attachPlugins"),this.emit("init");const 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"));const t=s(S);!e.contains(o)||o.parentElement instanceof HTMLPictureElement?this.spinner=e.appendChild(t):this.spinner=(null===(n=o.parentElement)||void 0===n?void 0:n.insertBefore(t,o))||null}this.emit("beforeLoad")}else queueMicrotask((()=>{this.enable()}))}initContent(){const{container:e}=this,t=this.cn(L);let i=this.option(L)||e.querySelector(`.${t}`);if(i||(i=e.querySelector("img,picture")||e.firstElementChild,i&&T(i,t)),i instanceof HTMLPictureElement&&(i=i.querySelector("img")),!i)throw new Error("No content found");this.content=i}onLoad(){const{spinner:e,container:t,state:i}=this;e&&(e.remove(),this.spinner=null),this.option("spinner")&&t.classList.remove(this.cn("isLoading")),this.emit
1("afterLoad"),i===v.Init?this.enable():this.updateMetrics()}onError(){this.state!==v.Destroy&&(this.spinner&&(this.spinner.remove(),this.spinner=null),this.stop(),this.detachEvents(),this.state=v.Error,this.emit("error"))}getNextScale(e){const{fullScale:t,targetScale:i,coverScale:n,maxScale:s,minScale:o}=this;let 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 e=[1,t,s].sort(((e,t)=>e-t)),r=e.findIndex((e=>e>i+1e-5));a=e[r]||1}return a}attachObserver(){var e;const t=()=>{const{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(){const{container:e}=this;e.addEventListener("click",this.onClick,{passive:!1,capture:!1}),e.addEventListener("wheel",this.onWheel,{passive:!1}),this.pointerTracker=new c(e,{start:this.onPointerDown,move:this.onPointerMove,end:this.onPointerUp}),document.addEventListener(O,this.onMouseMove)}detachEvents(){var e;const{container:t}=this;t.removeEventListener("click",this.onClick,{passive:!1,capture:!1}),t.removeEventListener("wheel",this.onWheel,{passive:!1}),null===(e=this.pointerTracker)||void 0===e||e.stop(),this.pointerTracker=null,document.removeEventListener(O,this.onMouseMove),document.removeEventListener("keydown",this.onKeydown,!0),this.clickTimer&&(clearTimeout(this.clickTimer),this.clickTimer=null),this.updateTimer&&(clearTimeout(this.updateTimer),this.updateTimer=null)}animate(){this.setTargetForce();const e=this.friction,t=this.option("maxVelocity");for(const i of b)e?(this.velocity[i]*=1-e,t&&!this.isScaling&&(this.velocity[i]=Math.max(Math.min(this.velocity[i],t),-1*t)),this.current[i]+=this.velocity[i]):this.current[i]=this.target[i];this.setTransform(),this.setEdgeForce(),!this.isResting||this.isDragging?this.rAF=requestAnimationFrame((()=>this.animate())):this.stop("current")}setTargetForce(){for(const e of b)"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){const{current:i}=this,n=i.e+e,s=i.f+t,o=this.getBounds(),{x:a,y:r}=o,l=a.min,c=a.max,h=r.min,d=r.max;let u=0,p=0;return l!==1/0&&n<l?u=l-n:c!==1/0&&n>c&&(u=c-n),h!==1/0&&s<h?p=h-s:d!==1/0&&s>d&&(p=d-s),Math.abs(u)<1e-4&&(u=0),Math.abs(p)<1e-4&&(p=0),Object.assign(Object.assign({},o),{xDiff:u,yDiff:p,inBounds:!u&&!p})}clampTargetBounds(){const{target:e}=this,{x:t,y:i}=this.getBounds();t.min!==1/0&&(e.e=Math.max(e.e,t.min)),t.max!==1/0&&(e.e=Math.min(e.e,t.max)),i.min!==1/0&&(e.f=Math.max(e.f,i.min)),i.max!==1/0&&(e.f=Math.min(e.f,i.max))}calculateContentDim(e=this.current){const{content:t,contentRect:i}=this,{fitWidth:n,fitHeight:s,fullWidth:o,fullHeight:a}=i;let r=o,l=a;if(this.option("zoom")||0!==this.angle){const i=!(t instanceof HTMLImageElement||"none"!==window.getComputedStyle(t).maxWidth&&"none"!==window.getComputedStyle(t).maxHeight),c=i?o:n,h=i?a:s,d=this.getMatrix(e),u=new DOMPoint(0,0).matrixTransform(d),p=new DOMPoint(0+c,0).matrixTransform(d),g=new DOMPoint(0+c,0+h).matrixTransform(d),f=new DOMPoint(0,0+h).matrixTransform(d),m=Math.abs(g.x-u.x),v=Math.abs(g.y-u.y),b=Math.abs(f.x-p.x),y=Math.abs(f.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===O||this.targetScale<this.scale)return this.isBouncingX=!1,void(this.isBouncingY=!1);const{target:e}=this,{x:t,y:i,xDiff:n,yDiff:s}=this.checkBounds(),o=this.option("maxVelocity");let a=this.velocity.e,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
1),this.isBouncingY&&(this.velocity.f=r)}enable(){const{content:e}=this,t=new DOMMatrixReadOnly(window.getComputedStyle(e).transform);for(const e of b)this.current[e]=this.target[e]=t[e];this.updateMetrics(),this.attachObserver(),this.attachEvents(),this.state=v.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());const i=e.target;if(!i||e.defaultPrevented)return;if(i.hasAttribute("disabled"))return e.preventDefault(),void e.stopPropagation();if((()=>{const e=window.getSelection();return e&&"Range"===e.type})()&&!i.closest("button"))return;const n=i.closest("[data-panzoom-action]"),s=i.closest("[data-panzoom-change]"),o=n||s,a=o&&E(o)?o.dataset:null;if(a){const t=a.panzoomChange,i=a.panzoomAction;if((t||i)&&e.preventDefault(),t){let i={};try{i=JSON.parse(t)}catch(e){console&&console.warn("The given data was not valid JSON")}return void this.applyChange(i)}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;const 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;const c=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}))},h=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&&h&&c(h)):(this.emit("dblClick",e),e.defaultPrevented||c(d)),this.clicks=0,this.clickTimer=null}),350))):(this.emit("click",e),!e.defaultPrevented&&h&&c(h))}addTrackingPoint(e){const 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=[];const s=this.content.getBoundingClientRect();if(this.dragStart={x:s.x,y:s.y,top:s.top,left:s.left,time:Date.now()},this.clickTimer)return!1;if(this.panMode===O&&this.targetScale>1)return e.preventDefault(),e.stopPropagation(),!1;const o=e.composedPath()[0];if(!i.length){if(["TEXTAREA","OPTION","INPUT","SELECT","VIDEO","IFRAME"].includes(o.nodeName)||o.closest("[contenteditable],[data-selectable],[data-draggable],[data-clickable],[data-panzoom-change],[data-panzoom-action]"))return!1;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("touchStart",e)),!0}onPointerMove(e,i,s){if(!1===this.option("touch",e))return;if(!this.isDragging)return;if(i.length<2&&this.panOnlyZoomed&&t(this.targetScale)<=t(this.minScale))return;if(this.emit("touchMove",e),e.defaultPrevented)return;this.addTrackingPoint(i[0]);const{content:o}=this,a=d(s[0],s[1]),r=d(i[0],i[1]);let l=0,c=0;if(i.length>1){const e=o.getBoundingClientRect();l=a.clientX-e.left-.5*e.width,c=a.clientY-e.top-.5*e.height}const u=h(s[0],s[1]),p=h(i[0],i[1]);let g=u?p/u:1,f=r.clientX-a.clientX,m=r.clientY-a.clientY;this.dragOffset.x+=f,this.dragOffset.y+=m,this.dragOffset.time=Date.now()-this.dragStart.time;let v=t(this.targetScale)===t(this.minScale)&&this.option("lockAxis");if(v&&!this.lockedAxis)if("xy"===v||"y"===v||"touchmove"===e.type){if(Math.abs(this.dragOffset.x)<6&&Math.abs(this.dragOffset.y)<6)return void e.preventDefault();const 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,f=0,m=0}else this.lockedAxis=v;if(n(e.target,this.content)&&(v="x",this.dragOffset.y=0),v&&"xy"!==v&&this.lockedAxis!==v&&t(this.targetScale)===t(this.minScale))return;e.cancelable&&e.preventDefault(),this.container.classList.add(this.cn("isDragging"));const b=this.checkBounds(f,m);this.option("rubberband")?("x"!==this.isInfinite&&(b.xDiff>0&&f<0||b.xDiff<0&&f>0)&&(f*=Math.max(0,.5-Math.abs(.75/this.contentRect.fitWidth*b.xDiff))),"y"!==this.isInfinite&&(b.yDiff>0&&m<0||b.yDiff<0&&m>0)&&(m*=Math.max(0,.5-Math.abs(.75/this.contentRect.fitHeight*b.yDiff)))):(b.xDiff&&(f=0),b.yDiff&&(m=0));const y=this.targetScale,w=this.minScale,x=this.maxScale;y<.5*w&&(g=Math.max(g,w)),y>
11.5*x&&(g=Math.min(g,x)),"y"===this.lockedAxis&&t(y)===t(w)&&(f=0),"x"===this.lockedAxis&&t(y)===t(w)&&(m=0),this.applyChange({originX:l,originY:c,panX:f,panY:m,scale:g,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=[]),n(e.target,this.content)&&"y"===this.lockedAxis&&(this.trackingPoints=[]),this.emit("touchEnd",e),this.isDragging=!1,this.lockedAxis=!1,this.state!==v.Destroy&&(e.defaultPrevented||this.startDecelAnim()))}startDecelAnim(){var e;const i=this.isScaling;this.rAF&&(cancelAnimationFrame(this.rAF),this.rAF=null),this.isBouncingX=!1,this.isBouncingY=!1;for(const e of b)this.velocity[e]=0;this.target.e=this.current.e,this.target.f=this.current.f,C(this.container,"is-scaling"),C(this.container,"is-animating"),this.isTicking=!1;const{trackingPoints:n}=this,s=n[0],o=n[n.length-1];let a=0,r=0,l=0;o&&s&&(a=o.clientX-s.clientX,r=o.clientY-s.clientY,l=o.time-s.time);const c=(null===(e=window.visualViewport)||void 0===e?void 0:e.scale)||1;1!==c&&(a*=c,r*=c);let h=0,d=0,u=0,p=0,g=this.option("decelFriction");const f=this.targetScale;if(l>0){u=Math.abs(a)>3?a/(l/30):0,p=Math.abs(r)>3?r/(l/30):0;const e=this.option("maxVelocity");e&&(u=Math.max(Math.min(u,e),-1*e),p=Math.max(Math.min(p,e),-1*e))}u&&(h=u/(1/(1-g)-1)),p&&(d=p/(1/(1-g)-1)),("y"===this.option("lockAxis")||"xy"===this.option("lockAxis")&&"y"===this.lockedAxis&&t(f)===this.minScale)&&(h=u=0),("x"===this.option("lockAxis")||"xy"===this.option("lockAxis")&&"x"===this.lockedAxis&&t(f)===this.minScale)&&(d=p=0);const m=this.dragOffset.x,v=this.dragOffset.y,y=this.option("dragMinThreshold")||0;Math.abs(m)<y&&Math.abs(v)<y&&(h=d=0,u=p=0),(this.option("zoom")&&(f<this.minScale-1e-5||f>this.maxScale+1e-5)||i&&!h&&!d)&&(g=.35),this.applyChange({panX:h,panY:d,friction:g}),this.emit("decel",u,p,m,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}));const i=Math.max(-1,Math.min(1,t));if(this.emit("wheel",e,i),this.panMode===O)return;if(e.defaultPrevented)return;const n=this.option("wheel");"pan"===n?(e.preventDefault(),this.panOnlyZoomed&&!this.canZoomOut()||this.applyChange({panX:2*-e.deltaX,panY:2*-e.deltaY,bounce:!1})):"zoom"===n&&!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()}setTransform(){this.emit("beforeTransform");const{current:e,target:i,content:n,contentRect:s}=this,o=Object.assign({},P);for(const n of b){const s="e"==n||"f"===n?M:1e5;o[n]=t(e[n],s),Math.abs(i[n]-e[n])<("e"==n||"f"===n?.51:.001)&&(e[n]=i[n])}let{a:a,b:r,c:l,d:c,e:h,f:d}=o,u=`matrix(${a}, ${r}, ${l}, ${c}, ${h}, ${d})`,p=n.parentElement instanceof HTMLPictureElement?n.parentElement:n;if(this.option("transformParent")&&(p=p.parentElement||p),p.style.transform===u)return;p.style.transform=u;const{contentWidth:g,contentHeight:f}=this.calculateContentDim();s.width=g,s.height=f,this.emit("afterTransform")}updateMetrics(e=!1){var i;if(!this||this.state===v.Destroy)return;if(this.isContentLoading)return;const n=Math.max(1,(null===(i=window.visualViewport)||void 0===i?void 0:i.scale)||1),{container:s,content:o}=this,a=o instanceof HTMLImageElement,r=s.getBoundingClientRect(),l=getComputedStyle(this.container);let c=r.width*n,h=r.height*n;const d=parseFloat(l.paddingTop)+parseFloat(l.paddingBottom),u=c-(parseFloat(l.paddingLeft)+parseFloat(l.paddingRight)),p=h-d;this.containerRect={width:c,height:h,innerWidth:u,innerHeight:p};const g=parseFloat(o.dataset.width||"")||(e=>{let t=0;return t=e instanceof HTMLImageElement?e.naturalWidth:e instanceof SVGElement?e.width.baseVal.value:Math.max(e.offsetWidth,e.scrollWidth),t||0})(o),f=parseFloat(o.dataset.height||"")||(e=>{let t=0;return t=e instanceof HTMLImageElement?e.naturalHeight:e instanceof SVGElement?e.height.baseVal.value:Math.max(e.offsetHeight,e.scrollHeight),t||0})(o);let m=this.option("width",g)||A,b=this.option("height",f)||A;const y=m===A,w=b===A;"number"!=typeof m&&(m=g),"number"!=typeof b&&(b=f),y&&(m=g*(b/f)),w&&(b=f/(g/m));let x=o.parentElement instanceof HTMLPictureElement?o.parentElement:o;this.option("transformParent")&&(x=x.parentElement||x);const S=x.getAttribute("style")||"";x.style.setProperty("transform","none","important"),a&&(x.style.width="",x.style.height=""),x.offsetHeight;const E=o.getBoundingClientRect();let C=E.width*n,T=E.height*n,P=C,M=T;C=Math.min(C,m),T=Math.min(T,b),a?({width:C,height:T}=((e,t,i,n)=>{const s=i/e,o=n/t,a=Math.min(s,o);return{width:e*=a,height:t*=a}})(m,b,C,T)):(C=Math.min(C,m),T=Math.min(T,b));let O=.5*(M-T),k=.5*(P-C);this.contentRect=Object.assign(Object.assign({},this.contentRect),{top:E.top-r.top+O,bottom:r.bottom-E.bottom+O,left:E.left-r.left+k,right:r.right-E.right+k,fitWidth:C,fitHeight:T,width:C,height:T,fullWidth:m,fullHeight:b}),x.style.cssText=S,a&&(x.style.width=`${C}px`,x.style.height=`${T}
1px`),this.setTransform(),!0!==e&&this.emit("refresh"),this.ignoreBounds||(t(this.targetScale)<t(this.minScale)?this.zoomTo(this.minScale,{friction:0}):this.targetScale>this.maxScale?this.zoomTo(this.maxScale,{friction:0}):this.state===v.Init||this.checkBounds().inBounds||this.requestTick()),this.updateControls()}calculateBounds(){const{contentWidth:e,contentHeight:i}=this.calculateContentDim(this.target),{targetScale:n,lockedAxis:s}=this,{fitWidth:o,fitHeight:a}=this.contentRect;let r=0,l=0,c=0,h=0;const d=this.option("infinite");if(!0===d||s&&d===s)r=-1/0,c=1/0,l=-1/0,h=1/0;else{let{containerRect:s,contentRect:d}=this,u=t(o*n,M),p=t(a*n,M),{innerWidth:g,innerHeight:f}=s;if(s.width===u&&(g=s.width),s.width===p&&(f=s.height),e>g){c=.5*(e-g),r=-1*c 2;let t=.5*(d.right-d.left);r+=t,c+=t}if(o>g&&e<g&&(r-=.5*(o-g),c-=.5*(o-g)),i>f){h=.5*(i-f),l=-1*h;let e=.5*(d.bottom-d.top);l+=e,h+=e}a>f&&i<f&&(r-=.5*(a-f),c-=.5*(a-f))}return{x:{min:r,max:c},y:{min:l,max:h}}}getBounds(){const e=this.option("bounds");return e!==A?e:this.calculateBounds()}updateControls(){const e=this,i=e.container,{panMode:n,contentRect:s,targetScale:o,minScale:r}=e;let l=r,c=e.option("click")||!1;c&&(l=e.getNextScale(c));let h=e.canZoomIn(),d=e.canZoomOut(),u=n===k&&!!this.option("touch"),p=d&&u;if(u&&(t(o)<t(r)&&!this.panOnlyZoomed&&(p=!0),(t(s.width,1)>t(s.fitWidth,1)||t(s.height,1)>t(s.fitHeight,1))&&(p=!0)),t(s.width*o,1)<t(s.fitWidth,1)&&(p=!1),n===O&&(p=!1),a(i,this.cn("isDraggable"),p),!this.option("zoom"))return;let g=h&&t(l)>t(o),f=!g&&!p&&d&&t(l)<t(o);a(i,this.cn("canZoomIn"),g),a(i,this.cn("canZoomOut"),f);for(const e of i.querySelectorAll("[data-panzoom-action]")){let t=!1,i=!1;switch(e.dataset.panzoomAction){case"zoomIn":h?t=!0:i=!0;break;case"zoomOut":d?t=!0:i=!0;break;case"toggleZoom":case"iterateZoom":h||d?t=!0:i=!0;const n=e.querySelector("g");n&&(n.style.display=h?"":"none")}t?(e.removeAttribute("disabled"),e.removeAttribute("tabindex")):i&&(e.setAttribute("disabled",""),e.setAttribute("tabindex","-1"))}}panTo({x:e=this.target.e,y:t=this.target.f,scale:i=this.targetScale,friction:n=this.option("friction"),angle:s=0,originX:o=0,originY:a=0,flipX:r=!1,flipY:l=!1,ignoreBounds:c=!1}){this.state!==v.Destroy&&this.applyChange({panX:e-this.target.e,panY:t-this.target.f,scale:i/this.targetScale,angle:s,originX:o,originY:a,friction:n,flipX:r,flipY:l,ignoreBounds:c})}applyChange({panX:e=0,panY:i=0,scale:n=1,angle:s=0,originX:o=-this.current.e,originY:a=-this.current.f,friction:r=this.option("friction"),flipX:l=!1,flipY:c=!1,ignoreBounds:h=!1,bounce:d=this.option("bounce")}){const u=this.state;if(u===v.Destroy)return;this.rAF&&(cancelAnimationFrame(this.rAF),this.rAF=null),this.friction=r||0,this.ignoreBounds=h;const{current:p}=this,g=p.e,f=p.f,m=this.getMatrix(this.target);let y=(new DOMMatrix).translate(g,f).translate(o,a).translate(e,i);if(this.option("zoom")){if(!h){const e=this.targetScale,t=this.minScale,i=this.maxScale;e*n<t&&(n=t/e),e*n>i&&(n=i/e)}y=y.scale(n)}y=y.translate(-o,-a).translate(-g,-f).multiply(m),s&&(y=y.rotate(s)),l&&(y=y.scale(-1,1)),c&&(y=y.scale(1,-1));for(const e of b)"e"!==e&&"f"!==e&&(y[e]>this.minScale+1e-5||y[e]<this.minScale-1e-5)?this.target[e]=y[e]:this.target[e]=t(y[e],M);(this.targetScale<this.scale||Math.abs(n-1)>.1||this.panMode===O||!1===d)&&!h&&this.clampTargetBounds(),u===v.Init?this.animate():this.isResting||(this.state=v.Panning,this.requestTick())}stop(e=!1){if(this.state===v.Init||this.state===v.Destroy)return;const t=this.isTicking;this.rAF&&(cancelAnimationFrame(this.rAF),this.rAF=null),this.isBouncingX=!1,this.isBouncingY=!1;for(const t of b)this.velocity[t]=0,"current"===e?this.current[t]=this.target[t]:"target"===e&&(this.target[t]=this.current[t]);this.setTransform(),C(this.container,"is-scaling"),C(this.container,"is-animating"),this.isTicking=!1,this.state=v.Ready,t&&(this.emit
2("endAnimation"),this.updateControls())}requestTick(){this.isTicking||(this.emit("startAnimation"),this.updateControls(),T(this.container,"is-animating"),this.isScaling&&T(this.container,"is-scaling")),this.isTicking=!0,this.rAF||(this.rAF=requestAnimationFrame((()=>this.animate())))}panWithMouse(e,i=this.option("mouseMoveFriction")){if(this.pmme=e,this.panMode!==O||!e)return;if(t(this.targetScale)<=t(this.minScale))return;this.emit("mouseMove",e);const{container:n,containerRect:s,contentRect:o}=this,a=s.width,r=s.height,l=n.getBoundingClientRect(),c=(e.clientX||0)-l.left,h=(e.clientY||0)-l.top;let{contentWidth:d,contentHeight:u}=this.calculateContentDim(this.target);const p=this.option("mouseMoveFactor");p>1&&(d!==a&&(d*=p),u!==r&&(u*=p));let g=.5*(d-a)-c/a*100/100*(d-a);g+=.5*(o.right-o.left);let f=.5*(u-r)-h/r*100/100*(u-r);f+=.5*(o.bottom-o.top),this.applyChange({panX:g-this.target.e,panY:f-this.target.f,friction:i})}zoomWithWheel(e){if(this.state===v.Destroy||this.state===v.Init)return;const i=Date.now();if(i-this.pwt<45)return void e.preventDefault();this.pwt=i;var n=[-e.deltaX||0,-e.deltaY||0,-e.detail||0].reduce((function(e,t){return Math.abs(t)>Math.abs(e)?t:e}));const s=Math.max(-1,Math.min(1,n)),{targetScale:o,maxScale:a,minScale:r}=this;let l=o*(100+45*s)/100;t(l)<t(r)&&t(o)<=t(r)?(this.cwd+=Math.abs(s),l=r):t(l)>t(a)&&t(o)>=t(a)?(this.cwd+=Math.abs(s),l=a):(this.cwd=0,l=Math.max(Math.min(l,a),r)),this.cwd>this.option("wheelLimit")||(e.preventDefault(),t(l)!==t(o)&&this.zoomTo(l,{event:e}))}canZoomIn(){return this.option("zoom")&&(t(this.contentRect.width,1)<t(this.contentRect.fitWidth,1)||t(this.targetScale)<t(this.maxScale))}canZoomOut(){return this.option("zoom")&&t(this.targetScale)>t(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=A,originX:i=A,originY:n=A,event:s}={}){if(this.isContentLoading||this.state===v.Destroy)return;const{targetScale:o,fullScale:a,maxScale:r,coverScale:l}=this;if(this.stop(),this.panMode===O&&(s=this.pmme||s),s||i===A||n===A){const e=this.content.getBoundingClientRect(),t=this.container.getBoundingClientRect(),o=s?s.clientX:t.left+.5*t.width,a=s?s.clientY:t.top+.5*t.height;i=o-e.left-.5*e.width,n=a-e.top-.5*e.height}let c=1;"number"==typeof e?c=e:"full"===e?c=a:"cover"===e?c=l:"max"===e?c=r:"fit"===e?c=1:"next"===e&&(c=this.getNextScale("iterateZoom")),c=c/o||1,t=t===A?c>1?.15:.25:t,this.applyChange({scale:c,originX:i,originY:n,friction:t}),s&&this.panMode===O&&this.panWithMouse(s,t)}rotateCCW(){this.applyChange({angle:-90})}rotateCW(){this.applyChange({angle:90})}flipX(){this.applyChange({flipX:!0})}flipY(){this.applyChange({flipY:!0})}fitX(){this.stop("target");const{containerRect:e,contentRect:t,target:i}=this;this.applyChange({panX:.5*e.width-(t.left+.5*t.fitWidth)-i.e,panY:.5*e.height-(t.top+.5*t.fitHeight)-i.f,scale:e.width/t.fitWidth/this.targetScale,originX:0,originY:0,ignoreBounds:!0})}fitY(){this.stop("target");const{containerRect:e,contentRect:t,target:i}=this;this.applyChange({panX:.5*e.width-(t.left+.5*t.fitWidth)-i.e,panY:.5*e.innerHeight-(t.top+.5*t.fitHeight)-i.f,scale:e.height/t.fitHeight/this.targetScale,originX:0,originY:0,ignoreBounds:!0})}toggleFS(){const{container:e}=this,t=this.cn("inFullscreen"),i=this.cn("htmlHasFullscreen");e.classList.toggle(t);const n=e.classList.contains(t);n?(document.documentElement.classList.add(i),document.addEventListener("keydown",this.onKeydown,!0)):(document.documentElement.classList.remove(i),document.removeEventListener("keydown",this.onKeydown,!0)),this.updateMetrics(),this.emit(n?"enterFS":"exitFS")}getMatrix(e=this.current){const{a:t,b:i,c:n,d:s,e:o,f:a}=e;return new DOMMatrix([t,i,n,s,o,a])}reset(e){if(this.state!==v.Init&&this.state!==v.Destroy){this.stop("current");for(const e of b)this.target[e]=P[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=v.Panning,this.requestTick())}}
2destroy(){this.stop(),this.state=v.Destroy,this.detachEvents(),this.detachObserver();const{container:e,content:t}=this,i=this.option("classes")||{};for(const t of Object.values(i))e.classList.remove(t+"");t&&(t.removeEventListener("load",this.onLoad),t.removeEventListener("error",this.onError)),this.detachPlugins()}}Object.defineProperty(z,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:w}),Object.defineProperty(z,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:{}});const I=function(e,t){let i=!0;return(...n)=>{i&&(i=!1,e(...n),setTimeout((()=>{i=!0}),t))}},F=(e,t)=>{let i=[];return e.childNodes.forEach((e=>{e.nodeType!==Node.ELEMENT_NODE||t&&!e.matches(t)||i.push(e)})),i};var D;!function(e){e[e.Init=0]="Init",e[e.Ready=1]="Ready",e[e.Destroy=2]="Destroy"}(D||(D={}));const _=e=>{if("string"==typeof e||e instanceof HTMLElement)e={html:e};else{const 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)},B=(e={})=>Object.assign({index:-1,slides:[],dim:0,pos:-1},e);class $ extends f{constructor(e,t){super(t),Object.defineProperty(this,"instance",{enumerable:!0,configurable:!0,writable:!0,value:e})}attach(){}detach(){}}class H extends ${constructor(){super(...arguments),Object.defineProperty(this,"isDynamic",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"list",{enumerable:!0,configurable:!0,writable:!0,value:null})}onRefresh(){this.refresh()}build(){let e=this.list;if(!e){e=document.createElement("ul"),T(e,this.cn("list")),e.setAttribute("role","tablist");const t=this.instance.container;t.appendChild(e),T(t,this.cn("hasDots")),this.list=e}return e}refresh(){var e;const t=this.instance.pages.length,i=Math.min(2,this.option("minCount")),n=Math.max(2e3,this.option("maxCount")),s=this.option("dynamicFrom");if(t<i||t>n)return void this.cleanup();const o="number"==typeof s&&t>5&&t>=s,r=!this.list||this.isDynamic!==o||this.list.children.length!==t;r&&this.cleanup();const l=this.build();if(a(l,this.cn("isDynamic"),!!o),r)for(let e=0;e<t;e++)l.append(this.createItem(e));let c,h=0;for(const t of[...l.children]){const i=h===this.instance.page;i&&(c=t),a(t,this.cn("isCurrent"),i),null===(e=t.children[0])||void 0===e||e.setAttribute("aria-selected",i?"true":"false");for(const e of["isBeforePrev","isPrev","isNext","isAfterNext"])C(t,this.cn(e));h++}if(c=c||l.firstChild,o&&c){const e=c.previousElementSibling,t=e&&e.previousElementSibling;T(e,this.cn("isPrev")),T(t,this.cn("isBeforePrev"));const i=c.nextElementSibling,n=i&&i.nextElementSibling;T(i,this.cn("isNext")),T(n,this.cn("isAfterNext"))}this.isDynamic=o}createItem(e=0){var t;const i=document.createElement("li");i.setAttribute("role","presentation");const n=s(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,C(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(H,"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}});const N="disabled",q="next",W="prev";class X extends ${constructor(){super(...arguments),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"prev",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"next",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"isDom",{enumerable:!0,configurable:!0,writable:!0,value:!1})}onRefresh(){const e=this.instance,t=e.pages.length,i=e.page;if(t<2)return void this.cleanup();this.build();let n=this.prev,s=this.next;n&&s&&(n.removeAttribute(N),s.removeAttribute(N),e.isInfinite||(i<=0&&n.setAttribute(N,""),i>=t-1&&s.setAttribute(N,"")))}addBtn(e){var t;const i=this.instance,n=document.createElement("button");n.setAttribute("tabindex","0"),n.setAttribute("title",i.localize(`{{${e.toUpperCase()}}}`)),T(n,this.cn("button")+" "+this.cn(e===q?"isNext":"isPrev"));const s=i.isRTL?e===q?W:q:e;var o;return n.innerHTML=i.localize(this.option(`${s}Tpl`)),n.dataset[`carousel${o=e,o?o.match("^[a-z]")?o.charAt(0).toUpperCase()+o.substring(1):o:""}`]="true",null===(t=this.container)||void 0===t||t.appendChild(n),n}build(){const e=this.instance.container,t=this.cn("container");let{container:i,prev:n,next:s}=this;i||(i=e.querySelector("."+t),this.isDom=!!i),i||(i=document.createElement("div"),T(i,t),e.appendChild(i)),this.container=i,s||(s=i.querySelector("[data-carousel-next]")),s||(s=this.addBtn(q)),this.next=s,n||(n=i.querySelector("[data-carousel-prev]")),n||(n=this.addBtn(W)),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(X,"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>
2',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 Y extends ${constructor(){super(...arguments),Object.defineProperty(this,"selectedIndex",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"target",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"nav",{enumerable:!0,configurable:!0,writable:!0,value:null})}addAsTargetFor(e){this.target=this.instance,this.nav=e,this.attachEvents()}addAsNavFor(e){this.nav=this.instance,this.target=e,this.attachEvents()}attachEvents(){const{nav:e,target:t}=this;e&&t&&(e.options.initialSlide=t.options.initialPage,e.state===D.Ready?this.onNavReady(e):e.on("ready",this.onNavReady),t.state===D.Ready?this.onTargetReady(t):t.on("ready",this.onTargetReady))}onNavReady(e){e.on("createSlide",this.onNavCreateSlide),e.on("Panzoom.click",this.onNavClick),e.on("Panzoom.touchEnd",this.onNavTouch),this.onTargetChange()}onTargetReady(e){e.on("change",this.onTargetChange),e.on("Panzoom.refresh",this.onTargetChange),this.onTargetChange()}onNavClick(e,t,i){this.onNavTouch(e,e.panzoom,i)}onNavTouch(e,t,i){var n,s;if(Math.abs(t.dragOffset.x)>3||Math.abs(t.dragOffset.y)>3)return;const o=i.target,{nav:a,target:r}=this;if(!a||!r||!o)return;const l=o.closest("[data-index]");if(i.stopPropagation(),i.preventDefault(),!l)return;const c=parseInt(l.dataset.index||"",10)||0,h=r.getPageForSlide(c),d=a.getPageForSlide(c);a.slideTo(d),r.slideTo(h,{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(c)}onNavCreateSlide(e,t){t.index===this.selectedIndex&&this.markSelectedSlide(t.index)}onTargetChange(){var e,t;const{target:i,nav:n}=this;if(!i||!n)return;if(n.state!==D.Ready||i.state!==D.Ready)return;const s=null===(t=null===(e=i.pages[i.page])||void 0===e?void 0:e.slides[0])||void 0===t?void 0:t.index,o=n.getPageForSlide(s);this.markSelectedSlide(s),n.slideTo(o,null===n.prevPage&&null===i.prevPage?{friction:0}:void 0)}markSelectedSlide(e){const t=this.nav;t&&t.state===D.Ready&&(this.selectedIndex=e,[...t.slides].map((t=>{t.el&&t.el.classList[t.index===e?"add":"remove"]("is-nav-selected")})))}attach(){const e=this;let t=e.options.target,i=e.options.nav;t?e.addAsNavFor(t):i&&e.addAsTargetFor(i)}detach(){const e=this,t=e.nav,i=e.target;t&&(t.off("ready",e.onNavReady),t.off("createSlide",e.onNavCreateSlide),t.off("Panzoom.click",e.onNavClick),t.off("Panzoom.touchEnd",e.onNavTouch)),e.nav=null,i&&(i.off("ready",e.onTargetReady),i.off("refresh",e.onTargetChange),i.off("change",e.onTargetChange)),e.target=null}}Object.defineProperty(Y,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{friction:.35}});const V={Navigation:X,Dots:H,Sync:Y},Z="animationend",U="isSelected",G="slide";class K extends m{get axis(){return this.isHorizontal?"e":"f"}get isEnabled(){return this.state===D.Ready}get isInfinite(){let e=!1;const{contentDim:t,viewportDim:i,pages:n,slides:s}=this,o=s[0];return n.length>=2&&o&&t+o.dim>=i&&(e=this.option("infinite")),e}get isRTL(){return"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:D.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||!E(e))throw new Error("No Element found");this.container=e,this.slideNext=I(this.slideNext.bind(this),150),this.slidePrev=
2I(this.slidePrev.bind(this),150),this.userOptions=t,this.userPlugins=i,queueMicrotask((()=>{this.processOptions()}))}processOptions(){var e,t;const i=p({},K.defaults,this.userOptions);let n="";const s=i.breakpoints;if(s&&u(s))for(const[e,t]of Object.entries(s))window.matchMedia(e).matches&&u(t)&&(n+=e,p(i,t));n===this.bp&&this.state!==D.Init||(this.bp=n,this.state===D.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!==D.Init&&this.destroy(),super.setOptions(i),!1===this.option("enabled")?this.attachEvents():setTimeout((()=>{this.init()}),0))}init(){this.state=D.Init,this.emit("init"),this.attachPlugins(Object.assign(Object.assign({},K.Plugins),this.userPlugins)),this.emit("attachPlugins"),this.initLayout(),this.initSlides(),this.updateMetrics(),this.setInitialPosition(),this.initPanzoom(),this.attachEvents(),this.state=D.Ready,this.emit("ready")}initLayout(){const{container:e}=this,t=this.option("classes");T(e,this.cn("container")),a(e,t.isLTR,!this.isRTL),a(e,t.isRTL,this.isRTL),a(e,t.isVertical,!this.isHorizontal),a(e,t.isHorizontal,this.isHorizontal);let i=this.option("viewport")||e.querySelector(`.${t.viewport}`);i||(i=document.createElement("div"),T(i,t.viewport),i.append(...F(e,`.${t.slide}`)),e.prepend(i)),i.addEventListener("scroll",this.onScroll);let n=this.option("track")||e.querySelector(`.${t.track}`);n||(n=document.createElement("div"),T(n,t.track),n.append(...Array.from(i.childNodes))),n.setAttribute("aria-live","polite"),i.contains(n)||i.prepend(n),this.viewport=i,this.track=n,this.emit("initLayout")}initSlides(){const{track:e}=this;if(!e)return;const t=[...this.slides],i=[];[...F(e,`.${this.cn(G)}`)].forEach((e=>{if(E(e)){const t=_({el:e,isDom:!0,index:this.slides.length});i.push(t)}}));for(let e of[...this.option("slides",[])||[],...t])i.push(_(e));this.slides=i;for(let e=0;e<this.slides.length;e++)this.slides[e].index=e;
2for(const e of i)this.emit("beforeInitSlide",e,e.index),this.emit("initSlide",e,e.index);this.emit("initSlides")}setInitialPage(){const e=this.option("initialSlide");this.page="number"==typeof e?this.getPageForSlide(e):parseInt(this.option("initialPage",0)+"",10)||0}setInitialPosition(){const{track:e,pages:t,isHorizontal:i}=this;if(!e||!t.length)return;let n=this.page;t[n]||(this.page=n=0);const s=(t[n].pos||0)*(this.isRTL&&i?1:-1),o=i?`${s}px`:"0",a=i?"0":`${s}px`;e.style.transform=`translate3d(${o}, ${a}, 0) scale(1)`,this.option("adaptiveHeight")&&this.setViewportHeight()}initPanzoom(){this.panzoom&&(this.panzoom.destroy(),this.panzoom=null);const e=this.option("Panzoom")||{};this.panzoom=new z(this.viewport,p({},{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(){const e=this.container;e&&(e.addEventListener("click",this.onClick,{passive:!1,capture:!1}),e.addEventListener("slideTo",this.onSlideTo)),window.addEventListener("resize",this.onResize)}createPages(){let e=[];const{contentDim:t,viewportDim:i}=this;let n=this.option("slidesPerPage");n=("auto"===n||t<=i)&&!1!==this.option("fill")?1/0:parseFloat(n+"");let s=0,o=0,a=0;for(const t of this.slides)(!e.length||o+t.dim-i>.05||a>=n)&&(e.push(B()),s=e.length-1,o=0,a=0),e[s].slides.push(t),o+=t.dim+t.gap,a++;return e}processPages(){const e=this.pages,{contentDim:i,viewportDim:n,isInfinite:s}=this,o=this.option("center"),a=this.option("fill"),r=a&&o&&i>n&&!s;if(e.forEach(((e,t)=>{var s;e.index=t,e.pos=(null===(s=e.slides[0])||void 0===s?void 0:s.pos)||0,e.dim=0;for(const[t,i]of e.slides.entries())e.dim+=i.dim,t<e.slides.length-1&&(e.dim+=i.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))})),e.forEach((e=>{a&&!s&&i>n&&(e.pos=Math.max(e.pos,0),e.pos=Math.min(e.pos,i-n)),e.pos=t(e.pos,1e3),e.dim=t(e.dim,1e3),Math.abs(e.pos)<=.1&&(e.pos=0)})),s)return e;const l=[];let c;return e.forEach((e=>{const t=Object.assign({},e);c&&t.pos===c.pos?(c.dim+=t.dim,c.slides=[...c.slides,...t.slides]):(t.index=l.length,c=t,l.push(t))})),l}getPageFromIndex(e=0){const t=this.pages.length;let i;return e=parseInt((e||0).toString())||0,i=this.isInfinite?(e%t+t)%t:Math.max(Math.min(e,t-1),0),i}getSlideMetrics(e){var i,n;const s=this.isHorizontal?"width":"height";let o=0,a=0,r=e.el;const l=!(!r||r.parentNode);if(r?o=parseFloat(r.dataset[s]||"")||0:(r=document.createElement("div"),r.style.visibility="hidden",(this.track||document.body).prepend(r)),T(r,this.cn(G)+" "+e.class+" "+e.customClass),o)r.style[s]=`${o}px`,r.style["width"===s?"height":"width"]="";else{l&&(this.track||document.body).prepend(r),o=r.getBoundingClientRect()[s]*Math.max(1,(null===(i=window.visualViewport)||void 0===i?void 0:i.scale)||1);let e=r[this.isHorizontal?"offsetWidth":"offsetHeight"];e-1>o&&(o=e)}const c=getComputedStyle(r);return"content-box"===c.boxSizing&&(this.isHorizontal?(o+=parseFloat(c.paddingLeft)||0,o+=parseFloat(c.paddingRight)||0):(o+=parseFloat(c.paddingTop)||0,o+=parseFloat(c.paddingBottom)||0)),a=parseFloat(c[this.isHorizontal?"marginRight":"marginBottom"])||0,l?null===(n=r.parentElement)||void 0===n||n.removeChild(r):e.el||r.remove(),{dim:t(o,1e3),gap:t(a,1e3)}}getBounds(){const{isInfinite:e,isRTL:t,isHorizontal:i,pages:n}=this;let s={min:0,max:0};if(e)s={min:-1/0,max:1/0};else if(n.length){const 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:i,isRTL:n,isInfinite:s,viewport:o,viewportDim:a,contentDim:r,page:l,pages:c,slides:h,panzoom:d}=this,u=0,p=0,g=0,f=0;d?f=-1*d.current[this.axis]:c[l]&&(f=c[l].pos||0),e=i?n?"right":"left":"top",n&&i&&(f*=-1);for(const i of h){const n=i.el;n?("top"===e?(n.style.right="",n.style.left=""):n.style.top="",i.index!==u?n.style[e]=0===p?"":`${t(p,1e3)}px`:n.style[e]="",g+=i.dim+i.gap,u++):p+=i.dim+i.gap}if(s&&g&&o){let n=getComputedStyle(o),s="padding",l=i?"Right":"Bottom",c=parseFloat(n[s+(i?"Left":"Top")]);f-=c,a+=c,a+=parseFloat(n[s+l]);for(const i of h)i.el&&(t(i.pos)<t(a)&&t(i.pos+i.dim+i.gap)<t(f)&&t(f)>t(r-a)&&(i.el.style[e]=`${t(p+g,1e3)}px`),t(i.pos+i.gap)>=t(r-a)&&t(i.pos)>t(f+a)&&t(f)<t(a)&&(i.el.style[e]=`-${t(g,1e3)}px`))}let m,v,b=[...this.inTransition];if(b.length>1&&(m=c[b[0]],v=c[b[1]]),m&&v){let i=0;for(const n of h)n.el?this.inTransition.has(n.index)&&m.slides.indexOf(n)<0&&(n.el.style[e]=`${t(i+(m.pos-v.pos),1e3)}px`):i+=n.dim+n.gap}}createSlideEl(e){const{track:t,slides:i}=this;if(!t||!e)return;if(e.el&&e.el.parentNode)return;const n=e.el||document.createElement("div");T(n,this.cn(G)),T(n,e.class),T(n,e.customClass);const s=e.html;s&&(s instanceof HTMLElement?n.appendChild(s):n.innerHTML=e.html+"");const o=[];
2i.forEach(((e,t)=>{e.el&&o.push(t)}));const a=e.index;let r=null;o.length&&(r=i[o.reduce(((e,t)=>Math.abs(t-a)<Math.abs(e-a)?t:e))]);const 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){const i=null==e?void 0:e.el;if(!i||!i.parentNode)return;const n=this.cn(U);if(i.classList.contains(n)&&(C(i,n),this.emit("unselectSlide",e)),e.isDom&&!t)return i.removeAttribute("aria-hidden"),i.removeAttribute("data-index"),void(i.style.left="");this.emit("removeSlide",e);const s=new CustomEvent(Z);i.dispatchEvent(s),e.el&&(e.el.remove(),e.el=null)}transitionTo(e=0,t=this.option("transition")){var i,n,s,o;if(!t)return!1;const a=this.page,{pages:r,panzoom:l}=this;e=parseInt((e||0).toString())||0;const c=this.getPageFromIndex(e);if(!l||!r[c]||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 h=e>a?1:-1;this.isInfinite&&(0===a&&e===r.length-1&&(h=-1),a===r.length-1&&0===e&&(h=1));const d=r[c].pos*(this.isRTL?1:-1);if(a===c&&Math.abs(d-l.target[this.axis])<1)return!1;this.clearTransitions();const u=l.isResting;T(this.container,this.cn("inTransition"));const p=(null===(s=r[a])||void 0===s?void 0:s.slides[0])||null,g=(null===(o=r[c])||void 0===o?void 0:o.slides[0])||null;this.inTransition.add(g.index),this.createSlideEl(g);let f=p.el,m=g.el;u||t===G||(t="fadeFast",f=null);const v=this.isRTL?"next":"prev",b=this.isRTL?"prev":"next";return f&&(this.inTransition.add(p.index),p.transition=t,f.addEventListener(Z,this.onAnimationEnd),f.classList.add(`f-${t}Out`,`to-${h>0?b:v}`)),m&&(g.transition=t,m.addEventListener(Z,this.onAnimationEnd),m.classList.add(`f-${t}In`,`from-${h>0?v:b}`)),l.current[this.axis]=d,l.target[this.axis]=d,l.requestTick(),this.onChange(c),!0}manageSlideVisiblity(){const e=new Set,t=new Set,i=this.getVisibleSlides(parseFloat(this.option("preload",0)+"")||0);for(const n of this.slides)i.has(n)?e.add(n):t.add(n);for(const t of this.inTransition)e.add(this.slides[t]);for(const t of e)this.createSlideEl(t),this.lazyLoadSlide(t);for(const 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;const e="aria-hidden";let t=this.cn(U);if(t)for(const i of this.slides){const n=i.el;n&&(n.dataset.index=`${i.index}`,n.classList.contains("f-thumbs__slide")?this.getVisibleSlides(0).has(i)?n.removeAttribute(e):n.setAttribute(e,"true"):this.pages[this.page].slides.includes(i)?(n.classList.contains(t)||(T(n,t),this.emit("selectSlide",i)),n.removeAttribute(e)):(n.classList.contains(t)&&(C(n,t),this.emit("unselectSlide",i)),n.setAttribute(e,"true")))}}flipInfiniteTrack(){const{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,c=0,h=.5*s;n&&t?(r<-h&&(c=-1,r+=o),r>o-h&&(c=1,r-=o)):(r>h&&(c=1,r-=o),r<-o+h&&(c=-1,r+=o)),c&&(a.current[e]=r,a.target[e]=r+l)}lazyLoadImg(e,t){const i=this,n="f-fadeIn",o="is-preloading";let a=!1,r=null;const l=()=>{a||(a=!0,r&&(r.remove(),r=null),C(t,o),t.complete&&(T(t,n),setTimeout((()=>{C(t,n)}),350)),this.option("adaptiveHeight")&&e.el&&this.pages[this.page].slides.indexOf(e)>-1&&(i.updateMetrics(),i.setViewportHeight()),this.emit("load",e))};T(t,o),t.src=t.dataset.lazySrcset||t.dataset.lazySrc||"",delete t.dataset.lazySrc,delete t.dataset.lazySrcset,t.addEventListener("error",(()=>{l()})),t.addEventListener("load",(()=>{l()})),setTimeout((()=>{const i=t.parentNode;i&&e.el&&(t.complete?l():a||(r=s(S),i.insertBefore(r,t)))}),300)}lazyLoadSlide(e){const t=e&&e.el;if(!t)return;const i=new Set;let n=Array.from(t.querySelectorAll("[data-lazy-src],[data-lazy-srcset]"));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)}));for(const t of i)this.lazyLoadImg(e,t)}onAnimationEnd(e){var t;const i=e.target,n=i?parseInt(i.dataset.index||"",10)||0:-1,s=this.slides[n],o=e.animationName;if(!i||!s||!o)return;const a=!!this.inTransition.has(n)&&s.transition;a&&o.substring(0,a.length+2)===`f-${a}`&&this.inTransition.delete(n),this.inTransition.size||this.clearTransitions(),n===this.page&&(null===(t=this.panzoom)||void 0===t?void 0:t.isResting)&&this.emit
2("settle")}onDecel(e,t=0,i=0,n=0,s=0){if(this.option("dragFree"))return void this.setPageFromPosition();const{isRTL:o,isHorizontal:a,axis:r,pages:l}=this,c=l.length,h=Math.abs(Math.atan2(i,t)/(Math.PI/180));let d=0;if(d=h>45&&h<135?a?0:i:a?t:0,!c)return;let u=this.page,p=o&&a?1:-1;const g=e.current[r]*p;let{pageIndex:f}=this.getPageFromPosition(g);Math.abs(d)>5?(l[u].dim<document.documentElement["client"+(this.isHorizontal?"Width":"Height")]-1&&(u=f),u=o&&a?d<0?u-1:u+1:d<0?u+1:u-1):u=0===n&&0===s?u:f,this.slideTo(u,{transition:!1,friction:e.option("decelFriction")})}onClick(e){const t=e.target,i=t&&E(t)?t.dataset:null;let n,s;i&&(void 0!==i.carouselPage?(s="slideTo",n=i.carouselPage):void 0!==i.carouselNext?s="slideNext":void 0!==i.carouselPrev&&(s="slidePrev")),s?(e.preventDefault(),e.stopPropagation(),t&&!t.hasAttribute("disabled")&&this[s](n)):this.emit("click",e)}onSlideTo(e){const t=e.detail||0;this.slideTo(this.getPageForSlide(t),{friction:0})}onChange(e,t=0){const i=this.page;this.prevPage=i,this.page=e,this.option("adaptiveHeight")&&this.setViewportHeight(),e!==i&&(this.markSelectedSlides(),this.emit("change",e,i,t))}onRefresh(){let e=this.contentDim,t=this.viewportDim;this.updateMetrics(),this.contentDim===e&&this.viewportDim===t||this.slideTo(this.page,{friction:0,transition:!1})}onScroll(){var e;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=D.Init,this.prevPage=null,this.userOptions=e||this.userOptions,this.userPlugins=t||this.userPlugins,this.processOptions()} 3slideTo(e=0,{friction:t=this.option("friction"),transition:i=this.option("transition")}={}){if(this.state===D.Destroy)return;e=parseInt((e||0).toString())||0;const n=this.getPageFromIndex(e),{axis:s,isHorizontal:o,isRTL:a,pages:r,panzoom:l}=this,c=r.length,h=a&&o?1:-1;if(!l||!c)return;if(this.page!==n){const t=new Event("beforeChange",{bubbles:!0,cancelable:!0});if(this.emit("beforeChange",t,e),t.defaultPrevented)return}if(this.transitionTo(e,i))return;let d=r[n].pos;if(this.isInfinite){const t=this.contentDim,i=l.target[s]*h;2===c?d+=t*Math.floor(parseFloat(e+"")/2):d=[d,d-t,d+t].reduce((function(e,t){return Math.abs(t-i)<Math.abs(e-i)?t:e}))}d*=h,Math.abs(l.target[s]-d)<1||(l.panTo({x:o?d:0,y:o?0:d,friction:t}),this.onChange(n))}slideToClosest(e){if(this.panzoom){const{pageIndex:t}=this.getPageFromPosition();this.slideTo(t,e)}}slideNext(){this.slideTo(this.page+1)}slidePrev(){this.slideTo(this.page-1)}clearTransitions(){this.inTransition.clear(),C(this.container,this.cn("inTransition"));const e=["to-prev","to-next","from-prev","from-next"];for(const t of this.slides){const i=t.el;if(i){i.removeEventListener(Z,this.onAnimationEnd),i.classList.remove(...e);const n=t.transition;n&&i.classList.remove(`f-${n}Out`,`f-${n}In`)}}this.manageSlideVisiblity()}addSlide(e,t){var i,n,s,o;const a=this.panzoom,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,c=this.contentDim<this.viewportDim;let h=Array.isArray(t)?t:[t];const d=[];for(const e of h)d.push(_(e));this.slides.splice(e,0,...d);for(let e=0;e<this.slides.length;e++)this.slides[e].index=e;for(const e of d)this.emit("beforeInitSlide",e,e.index);if(this.page>=e&&(this.page+=d.length),this.updateMetrics(),a){const 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,h=this.isRTL?l-i:i-l,d=this.isRTL?r-t:t-r;c&&1===n?(e<=this.page&&(a.current[this.axis]-=h,a.target[this.axis]-=h),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(const 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){const t=this.slides.length;e=(e%t+t)%t;const 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}
3),this.emit("destroySlide",i)}}updateMetrics(){const{panzoom:e,viewport:i,track:n,slides:s,isHorizontal:o,isInfinite:a}=this;if(!n)return;const r=o?"width":"height",l=o?"offsetWidth":"offsetHeight";if(i){let e=Math.max(i[l],t(i.getBoundingClientRect()[r],1e3)),n=getComputedStyle(i),s="padding",a=o?"Right":"Bottom";e-=parseFloat(n[s+(o?"Left":"Top")])+parseFloat(n[s+a]),this.viewportDim=e}let c,h=0;for(const[e,i]of s.entries()){let n=0,o=0;!i.el&&c?(n=c.dim,o=c.gap):(({dim:n,gap:o}=this.getSlideMetrics(i)),c=i),n=t(n,1e3),o=t(o,1e3),i.dim=n,i.gap=o,i.pos=h,h+=n,(a||e<s.length-1)&&(h+=o)}h=t(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===D.Init&&this.setInitialPage(),this.page=Math.max(0,Math.min(this.page,this.pages.length-1)),this.manageSlideVisiblity(),this.emit("refresh")}getProgress(e,i=!1,n=!1){void 0===e&&(e=this.page);const s=this,o=s.panzoom,a=s.contentDim,r=s.pages[e]||0;if(!r||!o)return e>this.page?-1:1;let l=-1*o.current.e,c=t((l-r.pos)/(1*r.dim),1e3),h=c,d=c;this.isInfinite&&!0!==n&&(h=t((l-r.pos+a)/(1*r.dim),1e3),d=t((l-r.pos-a)/(1*r.dim),1e3));let u=[c,h,d].reduce((function(e,t){return Math.abs(t)<Math.abs(e)?t:e}));return i?u:u>1?1:u<-1?-1:u}setViewportHeight(){const{page:e,pages:t,viewport:i,isHorizontal:n}=this;if(!i||!t[e])return;let s=0;n&&this.track&&(this.track.style.height="auto",t[e].slides.forEach((e=>{e.el&&(s=Math.max(s,e.el.offsetHeight))}))),i.style.height=s?`${s}px`:""}getPageForSlide(e){for(const t of this.pages)for(const i of t.slides)if(i.index===e)return t.index;return-1}getVisibleSlides(e=0){var t;const i=new Set;let{panzoom:n,contentDim:s,viewportDim:o,pages:a,page:r}=this;if(o){s=s+(null===(t=this.slides[this.slides.length-1])||void 0===t?void 0:t.gap)||0;let l=0;l=n&&n.state!==v.Init&&n.state!==v.Destroy?-1*n.current[this.axis]:a[r]&&a[r].pos||0,this.isInfinite&&(l-=Math.floor(l/s)*s),this.isRTL&&this.isHorizontal&&(l*=-1);const c=l-o*e,h=l+o*(e+1),d=this.isInfinite?[-1,0,1]:[0];for(const e of this.slides)for(const t of d){const n=e.pos+t*s,o=n+e.dim+e.gap;n<h&&o>c&&i.add(e)}}return i}getPageFromPosition(e){const{viewportDim:t,contentDim:i,slides:n,pages:s,panzoom:o}=this,a=s.length,r=n.length,l=n[0],c=n[r-1],h=this.option("center");let d=0,u=0,p=0,g=void 0===e?-1*((null==o?void 0:o.target[this.axis])||0):e;h&&(g+=.5*t),this.isInfinite?(g<l.pos-.5*c.gap&&(g-=i,p=-1),g>c.pos+c.dim+.5*c.gap&&(g-=i,p=1)):g=Math.max(l.pos||0,Math.min(g,c.pos));let f=c,m=n.find((e=>{const t=e.pos-.5*f.gap,i=e.pos+e.dim+.5*e.gap;return f=e,g>=t&&g<i}));return m||(m=c),u=this.getPageForSlide(m.index),d=u+p*a,{page:d,pageIndex:u}}setPageFromPosition(){const{pageIndex:e}=this.getPageFromPosition();this.onChange(e)}destroy(){if([D.Destroy].includes(this.state))return;this.state=D.Destroy;const{container:e,viewport:t,track:i,slides:n,panzoom:s}=this,o=this.option("classes");e.removeEventListener("click",this.onClick,{passive:!1,capture:!1}),e.removeEventListener("slideTo",this.onSlideTo),window.removeEventListener("resize",this.onResize),s&&(s.destroy(),this.panzoom=null),n&&n.forEach((e=>{this.removeSlideEl(e)})),this.detachPlugins(),t&&(t.removeEventListener("scroll",this.onScroll),t.offsetParent&&i&&i.offsetParent&&t.replaceWith(...i.childNodes));for(const[t,i]of Object.entries(o))"container"!==t&&i&&e.classList.remove(i);this.track=null,this.viewport=null,this.page=0,this.slides=[];const a=this.events.get("ready");this.events=new Map,a&&this.events.set("ready",a)}}Object.defineProperty(K,"Panzoom",{enumerable:!0,configurable:!0,writable:!0,value:z}),Object.defineProperty(K,"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(K,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:V}
3);const J=function(e){if(!E(e))return 0;const 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)return 100;if(o<t&&r>n)return 100;let l=a;o<t&&(l-=t-o),r>n&&(l-=r-n);const c=l/i*100;return Math.round(c)},Q=!("undefined"==typeof window||!window.document||!window.document.createElement);let ee;const te=["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([tabindex^="-"]):not([disabled]):not([aria-hidden])'].join(","),ie=e=>{if(e&&Q){void 0===ee&&document.createElement("div").focus({get preventScroll(){return ee=!0,!1}});try{if(ee)e.focus({preventScroll:!0});else{const 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){}}},ne=()=>{const e=document;let 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},se={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({},y),{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"};var oe,ae;!function(e){e[e.Init=0]="Init",e[e.Ready=1]="Ready",e[e.Closing=2]="Closing",e[e.CustomClosing=3]="CustomClosing",e[e.Destroy=4]="Destroy"}(oe||(oe={})),function(e){e[e.Loading=0]="Loading",e[e.Opening=1]="Opening",e[e.Ready=2]="Ready",e[e.Closing=3]="Closing"}(ae||(ae={}));let re="",le=!1,ce=!1,he=null;const de=()=>{let e="",t="";const i=Ct.getInstance();if(i){const 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")||"",!t&&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}},ue=()=>{const 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}},pe=()=>{const{slug:e,index:t}=ue();if(!e)return;let i=document.querySelector(`[data-slug="${e}"]`);if(i&&i.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0})),Ct.getInstance())return;const n=document.querySelectorAll(`[data-fancybox="${e}"]`);n.length&&(i=n[t-1],i&&i.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0})))},ge=()=>{if(!1===Ct.defaults.Hash)return;const e=Ct.getInstance();if(!1===(null==e?void 0:e.options.Hash))return;const{slug:t,index:i}=ue(),{slug:n}=de();e&&(t===n?e.jumpTo(i-1):(le=!0,e.close())),pe()},fe=()=>{he&&clearTimeout(he),queueMicrotask((()=>{ge()}))},me=()=>{window.addEventListener("hashchange",fe,!1),setTimeout((()=>{ge()}),500)};Q&&(/complete|interactive|loaded/.test(document.readyState)?me():document.addEventListener("DOMContentLoaded",me));const ve="is-zooming-in";class be extends ${onCreateSlide(e,t,i){const 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){C(this.instance.container,ve);for(const e of t.slides){const t=e.panzoom;t&&e.index!==i&&t.reset(.35)}}onClose(){var e;const t=this.instance,i=t.container,n=t.getSlide();if(!i||!i.parentElement||!n)return;const{el:s,contentEl:o,panzoom:a,thumbElSrc:r}=n;if(!s||!r||!o||!a||a.isContentLoading||a.state===v.Init||a.state===v.Destroy)return;a.updateMetrics();let l=this.getZoomInfo(n);if(!l)return;this.instance.state=oe.CustomClosing,i.classList.remove(ve),i.classList.add("is-zooming-out"),o.style.backgroundImage=`url('${r}')`;const c=i.getBoundingClientRect();
31===((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:`${c.width}px`,height:`${c.height}px`,overflow:"hidden"});const{x:h,y:d,scale:u,opacity:p}=l;if(p){const e=((e,t)=>{const i=t-e;return t=>1+((t-e)/i*-1||0)})(a.scale,u);a.on("afterTransform",(()=>{o.style.opacity=e(a.scale)+""}))}a.on("endAnimation",(()=>{t.destroy()})),a.target.a=u,a.target.b=0,a.target.c=0,a.target.d=u,a.panTo({x:h,y:d,scale:u,friction:p?.2:.33,ignoreBounds:!0}),a.isResting&&t.destroy()}setImage(e,t){const i=this.instance;e.src=t,this.process(e,t).then((t=>{const{contentEl:n,imageEl:s,thumbElSrc:o,el:a}=e;if(i.isClosing()||!n||!s)return;n.offsetHeight;const r=!!i.isOpeningSlide(e)&&this.getZoomInfo(e);if(this.option("protected")&&a){a.addEventListener("contextmenu",(e=>{e.preventDefault()}));const e=document.createElement("div");T(e,"fancybox-protected"),n.appendChild(e)}if(o&&r){const s=t.contentRect,a=Math.max(s.fullWidth,s.fullHeight);let c=null;!r.opacity&&a>1200&&(c=document.createElement("img"),T(c,"fancybox-ghost"),c.src=o,n.appendChild(c));const h=()=>{c&&(T(c,"f-fadeFastOut"),setTimeout((()=>{c&&(c.remove(),c=null)}),200))};(l=o,new Promise(((e,t)=>{const i=new Image;i.onload=e,i.onerror=t,i.src=l}))).then((()=>{i.hideLoading(e),e.state=ae.Opening,this.instance.emit("reveal",e),this.zoomIn(e).then((()=>{h(),this.instance.done(e)}),(()=>{})),c&&setTimeout((()=>{h()}),a>2500?800:200)}),(()=>{i.hideLoading(e),i.revealContent(e)}))}else{const n=this.optionFor(e,"initialSize"),s=this.optionFor(e,"zoom"),o={event:i.prevMouseMoveEvent||i.options.event,friction:s?.12:0};let 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)}var l}),(()=>{i.setError(e,"{{IMAGE_ERROR}}")}))}process(e,t){return new Promise(((i,n)=>{var o;const a=this.instance,r=e.el;a.clearContent(e),a.showLoading(e);let l=this.optionFor(e,"content");if("string"==typeof l&&(l=s(l)),!l||!E(l)){if(l=document.createElement("img"),l instanceof HTMLImageElement){let i="",n=e.caption;i="string"==typeof n&&n?n.replace(/<[^>]+>/gi,"").substring(0,1e3):`Image ${e.index+1} of ${(null===(o=a.carousel)||void 0===o?void 0:o.pages.length)||1}`,l.src=t||"",l.alt=i,l.draggable=!1,e.srcset&&l.setAttribute("srcset",e.srcset),this.instance.isOpeningSlide(e)&&(l.fetchPriority="high")}e.sizes&&l.setAttribute("sizes",e.sizes)}T(l,"fancybox-image"),e.imageEl=l,a.setContent(e,l,!1),e.panzoom=new z(r,p({transformParent:!0},this.option("Panzoom")||{},{content:l,width:(t,i)=>a.optionFor(e,"width","auto",i)||"auto",height:(t,i)=>a.optionFor(e,"height","auto",i)||"auto",wheel:()=>{const e=a.option("wheel");return("zoom"===e||"pan"==e)&&e},click:(t,i)=>{var n,s;if(a.isCompact||a.isClosing())return!1;if(e.index!==(null===(n=a.getSlide())||void 0===n?void 0:n.index))return!1;if(i){const e=i.composedPath()[0];if(["A","BUTTON","TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].includes(e.nodeName))return!1}let o=!i||i.target&&(null===(s=e.contentEl)||void 0===s?void 0:s.contains(i.target));return a.option(o?"contentClick":"backdropClick")||!1},dblClick:()=>a.isCompact?"toggleZoom":a.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)=>{const n=this.instance,s=n.container,{panzoom:o,contentEl:a,el:r}=e;o&&o.updateMetrics();const l=this.getZoomInfo(e);if(!(l&&r&&a&&o&&s))return void i();const{x:c,y:h,scale:d,opacity:u}=l,p=()=>{e.state!==ae.Closing&&(u&&(a.style.opacity=Math.max(Math.min(1,1-(1-o.scale)/(1-d)),0)+""),o.scale>=1&&o.scale>o.targetScale-.1&&t(o))},g=e=>{(e.scale<.99||e.scale>1.01)&&!e.isDragging||(C(s,ve),a.style.opacity="",e.off("endAnimation",g),e.off("touchStart",g),e.off("afterTransform",p),t(e))};o.on("endAnimation",g),o.on("touchStart",g),o.on("afterTransform",p),o.on(["error","destroy"],(()=>{i()})),o.panTo({x:c,y:h,scale:d,friction:0,ignoreBounds:!0}),o.stop("current");
3const f={event:"mousemove"===o.panMode?n.prevMouseMoveEvent||n.options.event:void 0},m=this.optionFor(e,"initialSize");T(s,ve),n.hideLoading(e),"full"===m?o.zoomToFull(f):"cover"===m?o.zoomToCover(f):"max"===m?o.zoomToMax(f):o.reset(.172)}))}getZoomInfo(e){const{el:t,imageEl:i,thumbEl:n,panzoom:s}=e,o=this.instance,a=o.container;if(!t||!i||!n||!s||J(n)<3||!this.optionFor(e,"zoom")||!a||o.state===oe.Destroy)return!1;if("0"===getComputedStyle(a).getPropertyValue("--f-images-zoom"))return!1;const r=window.visualViewport||null;if(1!==(r?r.scale:1))return!1;let{top:l,left:c,width:h,height:d}=n.getBoundingClientRect(),{top:u,left:p,fitWidth:g,fitHeight:f}=s.contentRect;if(!(h&&d&&g&&f))return!1;const m=s.container.getBoundingClientRect();p+=m.left,u+=m.top;const v=-1*(p+.5*g-(c+.5*h)),b=-1*(u+.5*f-(l+.5*d)),y=h/g;let w=this.option("zoomOpacity")||!1;return"auto"===w&&(w=Math.abs(h/d-g/f)>.1),{x:v,y:b,scale:y,opacity:w}}attach(){const e=this,t=e.instance;t.on("Carousel.change",e.onChange),t.on("Carousel.createSlide",e.onCreateSlide),t.on("Carousel.removeSlide",e.onRemoveSlide),t.on("close",e.onClose)}detach(){const e=this,t=e.instance;t.off("Carousel.change",e.onChange),t.off("Carousel.createSlide",e.onCreateSlide),t.off("Carousel.removeSlide",e.onRemoveSlide),t.off("close",e.onClose)}}Object.defineProperty(be,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{initialSize:"fit",Panzoom:{maxScale:1},protected:!1,zoom:!0,zoomOpacity:"auto"}}),"function"==typeof SuppressedError&&SuppressedError;const ye="html",we="image",xe="map",Se="youtube",Ee="vimeo",Ce="html5video",Te=(e,t={})=>{const i=new URL(e),n=new URLSearchParams(i.search),s=new URLSearchParams;for(const[e,i]of[...n,...Object.entries(t)]){let t=i+"";if("t"===e){let e=t.match(/((\d*)m)?(\d*)s?/);e&&s.set("start",60*parseInt(e[2]||"0")+parseInt(e[3]||"0")+"")}else s.set(e,t)}let o=s+"",a=e.match(/#t=((.*)?\d+s)/);return a&&(o+=`#t=${a[1]}`),o},Pe=["image","html","ajax","inline","clone","iframe","map","pdf","html5video","youtube","vimeo"];class Me extends ${onBeforeInitSlide(e,t,i){this.processType(i)}onCreateSlide(e,t,i){this.setContent(i)}onClearContent(e,t){t.xhr&&(t.xhr.abort(),t.xhr=null);const i=t.iframeEl;i&&(i.onload=i.onerror=null,i.src="//about:blank",t.iframeEl=null);const n=t.contentEl,s=t.placeholderEl;if("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===ae.Ready&&this.playVideo()}onUnselectSlide(e,t,i){var n,s;if(i.type===Ce){try{null===(s=null===(n=i.el)||void 0===n?void 0:n.querySelector("video"))||void 0===s||s.pause()}catch(e){}return}let o;i.type===Ee?o={method:"pause",value:"true"}:i.type===Se&&(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){const e=document.getElementById(t.id);e&&(e.dataset.ready="true")}}catch(e){}}loadAjaxContent(e){const t=this.instance.optionFor(e,"src")||"";this.instance.showLoading(e);const i=this.instance,n=new XMLHttpRequest;i.showLoading(e),n.onreadystatechange=function(){n.readyState===XMLHttpRequest.DONE&&i.state===oe.Ready&&(i.hideLoading(e),200===n.status?i.setContent(e,n.responseText):i.setError(e,404===n.status?"{{AJAX_NOT_FOUND}}":"{{AJAX_FORBIDDEN}}"))};const s=e.ajax||null;n.open(s?"POST":"GET",t+""),n.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),n.setRequestHeader("X-Requested-With","XMLHttpRequest"),n.send(s),e.xhr=n}setInlineContent(e){let t=null;if(E(e.src))t=e.src;else if("string"==typeof e.src){const i=e.src.split("#",2).pop();t=i?document.getElementById(i):null}if(t){if("clone"===e.type||t.closest(".fancybox__slide")){t=t.cloneNode(!0);const i=t.dataset.animationName;i&&(t.classList.remove(i),delete t.dataset.animationName);let n=t.getAttribute("id");n=n?`${n}--clone`:`clone-${this.instance.id}-${e.index}`,t.setAttribute("id",n)}else if(t.parentNode){const i=document.createElement("div");i.classList.add("fancybox-placeholder"),t.parentNode.insertBefore(i,t),e.placeholderEl=i}this.instance.setContent(e,t)}else this.instance.setError(e,"{{ELEMENT_NOT_FOUND}}")}setIframeContent(e){const{src:t,el:i}=e;if(!t||"string"!=typeof t||!i)return;i.classList.add("is-loading");const n=this.instance,s=document.createElement("iframe");s.className="fancybox__iframe",s.setAttribute("id",`fancybox__iframe_${n.id}_${e.index}`);for(const[t,i]of Object.entries(this.optionFor(e,"iframeAttr")||{}))s.setAttribute(t,i);s.onerror=()=>{n.setError(e,"{{IFRAME_ERROR}}")},e.iframeEl=s;const 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=()=>
3{if(!s.src.length)return;const 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){const{type:t,iframeEl:i}=e;if(t===Se||t===Ee)return;const 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);const r=n&&n.style;if(!1!==e.preload&&!1!==s&&r)try{const e=window.getComputedStyle(n),t=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight),s=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),l=i.contentWindow;if(l){const e=l.document,i=e.getElementsByTagName(ye)[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){const 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(){const e=this.instance.getSlide();if(!e)return;const{el:t}=e;if(!t||!t.offsetParent)return;if(!this.optionFor(e,"videoAutoplay"))return;if(e.type===Ce)try{const e=t.querySelector("video");if(e){const t=e.play();void 0!==t&&t.then((()=>{})).catch((t=>{e.muted=!0,e.play()}))}}catch(e){}if(e.type!==Se&&e.type!==Ee)return;const i=()=>{if(e.iframeEl&&e.iframeEl.contentWindow){let t;if("true"===e.iframeEl.dataset.ready)return t=e.type===Se?{event:"command",func:"playVideo"}:{method:"play",value:"true"},t&&e.iframeEl.contentWindow.postMessage(JSON.stringify(t),"*"),void(e.poller=void 0);e.type===Se&&(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=ye,e.src=e.html,void(e.html="");const 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)){const s=this.optionFor(e,Se),{nocookie:o}=s,a=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(i[n[s]]=e[n[s]])}return i}(s,["nocookie"]),r=`www.youtube${o?"-nocookie":""}.com`,l=Te(t,a),c=encodeURIComponent(n[2]);e.videoId=c,e.src=`https://${r}/embed/${c}?${l}`,e.thumbSrc=e.thumbSrc||`https://i.ytimg.com/vi/${c}/mqdefault.jpg`,i=Se}else if(n=t.match(/^.+vimeo.com\/(?:\/)?([\d]+)((\/|\?h=)([a-z0-9]+))?(.*)?/)){const s=Te(t,this.optionFor(e,Ee)),o=encodeURIComponent(n[1]),a=n[4]||"";e.videoId=o,e.src=`https://player.vimeo.com/video/${o}?${a?`h=${a}${s?"&":""}`:""}${s}`,i=Ee}if(!i&&e.triggerEl){const t=e.triggerEl.dataset.type;Pe.includes(t)&&(i=t)}i||"string"==typeof t&&("#"===t.charAt(0)?i="inline":(n=t.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i))?(i=Ce,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=we: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=xe):(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=xe),i=i||this.instance.option("defaultType"),e.type=i,i===we&&(e.thumbSrc=e.thumbSrc||e.src)}setContent(e){const t=this.instance.optionFor(e,"src")||"";if(e&&e.type&&t){switch(e.type){case ye:this.instance.setContent(e,t);break;case Ce:const i=this.option("videoTpl");i&&this.instance.setContent(e,i.replace(/\{\{src\}\}/gi,t+"").replace(/\{\{format\}\}/gi,this.optionFor(e,"videoFormat")||"").replace(/\{\{poster\}\}/gi,e.poster||e.thumbSrc||""));break;case"inline":case"clone":this.setInlineContent(e);break;case"ajax":this.loadAjaxContent(e);break;case"pdf":case xe:case Se:case Ee:e.preload=!1;case"iframe":this.setIframeContent(e)}this.setAspectRatio(e)}}setAspectRatio(e){const t=e.contentEl;if(!(e.el&&t&&e.type&&[Se,Ee,Ce].includes(e.type)))return;let i,n=e.width||"auto",s=e.height||"auto";if("auto"===n||"auto"===s){i=this.optionFor(e,"videoRatio");const t=(i+"").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;const 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(){const e=this,t=e.instance;t.on("Carousel.beforeInitSlide",e.onBeforeInitSlide),t.on("Carousel.createSlide",e.onCreateSlide),t.on("Carousel.selectSlide",e.onSelectSlide),t.on("Carousel.unselectSlide",e.onUnselectSlide),t.on("Carousel.Panzoom.refresh",e.onRefresh),t.on("done",e.onDone),t.on("clearContent",e.onClearContent),window.addEventListener("message",e.onMessage)}detach(){const e=this,t=e.instance;t.off("Carousel.beforeInitSlide",e.onBeforeInitSlide),t.off("Carousel.createSlide",e.onCreateSlide),t.off("Carousel.selectSlide",e.onSelectSlide),t.off("Carousel.unselectSlide",e.onUnselectSlide),t.off("Carousel.Panzoom.refresh",e.onRefresh),t.off("done",e.onDone),t.off("clearContent",e.onClearContent),window.removeEventListener("message",e.onMessage)}}Object.defineProperty(Me,"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}}});const Oe="play",ke="pause",Le="ready";class Ae extends ${constructor(){super(...arguments),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:Le}),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!==Le}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(){const e=this.instance;"play"===this.state&&(e.isInfinite||e.page!==e.pages.length-1?e.
3slideNext():e.slideTo(0))}removeProgressBar(){this.progressBar&&(this.progressBar.remove(),this.progressBar=null)}createProgressBar(){var e;if(!this.option("showProgress"))return null;this.removeProgressBar();const t=this.instance,i=(null===(e=t.pages[t.page])||void 0===e?void 0:e.slides)||[];let n=this.option("progressParentEl");if(n||(n=(1===i.length?i[0].el:null)||t.viewport),!n)return null;const s=document.createElement("div");return T(s,"f-progress"),n.prepend(s),this.progressBar=s,s.offsetHeight,s}set(){const e=this,t=e.instance;if(t.pages.length<2)return;if(e.timer)return;const i=e.option("timeout");e.state=Oe,T(t.container,"has-autoplay");let n=e.createProgressBar();n&&(n.style.transitionDuration=`${i}ms`,n.style.transform="scaleX(1)"),e.timer=setTimeout((()=>{e.timer=null,e.inHover||e.onTimerEnd()}),i),e.emit("set")}clear(){const e=this;e.timer&&(clearTimeout(e.timer),e.timer=null),e.removeProgressBar()}start(){const e=this;if(e.set(),e.state!==Le){if(e.option("pauseOnHover")){const t=e.instance.container;t.addEventListener("mouseenter",e.onMouseEnter,!1),t.addEventListener("mouseleave",e.onMouseLeave,!1)}document.addEventListener("visibilitychange",e.onVisibilityChange,!1),e.emit("start")}}stop(){const e=this,t=e.state,i=e.instance.container;e.clear(),e.state=Le,i.removeEventListener("mouseenter",e.onMouseEnter,!1),i.removeEventListener("mouseleave",e.onMouseLeave,!1),document.removeEventListener("visibilitychange",e.onVisibilityChange,!1),C(i,"has-autoplay"),t!==Le&&e.emit("stop")}pause(){const e=this;e.state===Oe&&(e.state=ke,e.clear(),e.emit(ke))}resume(){const e=this,t=e.instance;if(t.isInfinite||t.page!==t.pages.length-1)if(e.state!==Oe){if(e.state===ke&&!e.inHover){const t=new Event("resume",{bubbles:!0,cancelable:!0});e.emit("resume",t),t.defaultPrevented||e.set()}}else e.set();else e.stop()}toggle(){ 4this.state===Oe||this.state===ke?this.stop():this.start()}attach(){const e=this,t=e.instance;t.on("ready",e.onReady),t.on("Panzoom.startAnimation",e.onChange),t.on("Panzoom.endAnimation",e.onSettle),t.on("Panzoom.touchMove",e.onChange)}detach(){const e=this,t=e.instance;t.off("ready",e.onReady),t.off("Panzoom.startAnimation",e.onChange),t.off("Panzoom.endAnimation",e.onSettle),t.off("Panzoom.touchMove",e.onChange),e.stop()}}Object.defineProperty(Ae,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{autoStart:!0,pauseOnHover:!0,progressParentEl:null,showProgress:!0,timeout:3e3}});class Re extends ${constructor(){super(...arguments),Object.defineProperty(this,"ref",{enumerable:!0,configurable:!0,writable:!0,value:null})}onPrepare(e){const t=e.carousel;if(!t)return;const i=e.container;i&&(t.options.Autoplay=p({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)!==ae.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)===ae.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:Ae}),this.ref=t.plugins.Autoplay)}onReady(e){const t=e.carousel,i=this.ref;i&&t&&this.option("playOnStart")&&(t.isInfinite||t.page<t.pages.length-1)&&i.start()}onDone(e,t){const i=this.ref,n=e.carousel;if(!i||!n)return;const s=t.panzoom;s&&s.on("startAnimation",(()=>{e.isCurrentSlide(t)&&i.stop()})),e.isCurrentSlide(t)&&i.resume()}onKeydown(e,t){var i;const n=this.ref;n&&t===this.option("key")&&"BUTTON"!==(null===(i=document.activeElement)||void 0===i?void 0:i.nodeName)&&n.toggle()}attach(){const e=this,t=e.instance;t.on("Carousel.init",e.onPrepare),t.on("Carousel.ready",e.onReady),t.on("done",e.onDone),t.on("keydown",e.onKeydown)}detach(){const e=this,t=e.instance;t.off("Carousel.init",e.onPrepare),t.off("Carousel.ready",e.onReady),t.off("done",e.onDone),t.off("keydown",e.onKeydown)}}Object.defineProperty(Re,"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}});const je={classes:{container:"f-thumbs f-carousel__thumbs",viewport:"f-thumbs__viewport",track:"f-thumbs__track",slide:"f-thumbs__slide",isResting:"is-resting",isSelected:"is-selected",isLoading:"is-loading",hasThumbs:"has-thumbs"},minCount:2,parentEl:null,thumbTpl:'<button class="f-thumbs__slide__button" tabindex="0" type="button" aria-label="{{GOTO}}" data-carousel-index="%i"><img class="f-thumbs__slide__img" data-lazy-src="{{%s}}" alt="" /></button>',type:"modern"};var ze;!function(e){e[e.Init=0]="Init",e[e.Ready=1]="Ready",e[e.Hidden=2]="Hidden"}(ze||(ze={}));
4const Ie="isResting",Fe="thumbWidth",De="thumbHeight",$e="thumbClipWidth";let _e=class extends ${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:ze.Init})}get isModern(){return"modern"===this.type}onInitSlide(e,t){const i=t.el?t.el.dataset:void 0;i&&(t.thumbSrc=i.thumbSrc||t.thumbSrc||"",t[$e]=parseFloat(i[$e]||"")||t[$e]||0,t[De]=parseFloat(i.thumbHeight||"")||t[De]||0),this.addSlide(t)}onInitSlides(){this.build()}onChange(){var e;if(!this.isModern)return;const t=this.container,i=this.instance,n=i.panzoom,s=this.carousel,o=s?s.panzoom:null,r=i.page;if(n&&s&&o){if(n.isDragging){C(t,this.cn(Ie));let n=(null===(e=s.pages[r])||void 0===e?void 0:e.pos)||0;n+=i.getProgress(r)*(this[$e]+this.thumbGap);let a=o.getBounds();-1*n>a.x.min&&-1*n<a.x.max&&o.panTo({x:-1*n,friction:.12})}else a(t,this.cn(Ie),n.isResting);this.shiftModern()}}onRefresh(){this.updateProps();for(const e of this.instance.slides||[])this.resizeModernSlide(e);this.shiftModern()}isDisabled(){const e=this.option("minCount")||0;if(e){const t=this.instance;let i=0;for(const e of t.slides||[])e.thumbSrc&&i++;if(i<e)return!0}const t=this.option("type");return["modern","classic"].indexOf(t)<0}getThumb(e){const 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){const t=this.carousel;t&&t.addSlide(e.index,this.getThumb(e))}getSlides(){const e=[];
4for(const t of this.instance.slides||[])e.push(this.getThumb(t));return e}resizeModernSlide(e){this.isModern&&(e[Fe]=e[$e]&&e[De]?Math.round(this[De]*(e[$e]/e[De])):this[Fe])}updateProps(){const e=this.container;if(!e)return;const t=t=>parseFloat(getComputedStyle(e).getPropertyValue("--f-thumb-"+t))||0;this.thumbGap=t("gap"),this.thumbExtraGap=t("extra-gap"),this[Fe]=t("width")||40,this[$e]=t("clip-width")||40,this[De]=t("height")||40}build(){const e=this;if(e.state!==ze.Init)return;if(e.isDisabled())return void e.emit("disabled");const t=e.instance,i=t.container,n=e.getSlides(),s=e.option("type");e.type=s;const o=e.option("parentEl"),a=e.cn("container"),r=e.cn("track");let l=null==o?void 0:o.querySelector("."+a);l||(l=document.createElement("div"),T(l,a),o?o.appendChild(l):i.after(l)),T(l,`is-${s}`),T(i,e.cn("hasThumbs")),e.container=l,e.updateProps();let c=l.querySelector("."+r);c||(c=document.createElement("div"),T(c,e.cn("track")),l.appendChild(c)),e.track=c;const h=p({},{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}),d=new t.constructor(l,h);d.on("createSlide",((t,i)=>{e.setProps(i.index),e.emit("createSlide",i,i.el)})),d.on("ready",(()=>{e.shiftModern(),e.emit("ready")})),d.on("refresh",(()=>{e.shiftModern()})),d.on("Panzoom.click",((t,i,n)=>{e.onClick(n)})),e.carousel=d,e.state=ze.Ready}onClick(e){e.preventDefault(),e.stopPropagation();const t=this.instance,{pages:i,page:n}=t,s=e=>{if(e){const t=e.closest("[data-carousel-index]");if(t)return[parseInt(t.dataset.carouselIndex||"",10)||0,t]}return[-1,void 0]},o=(e,t)=>{const i=document.elementFromPoint(e,t);return i?s(i):[-1,void 0]};let[a,r]=s(e.target);if(a>-1)return;const l=this[$e],c=e.clientX,h=e.clientY;let[d,u]=o(c-l,h),[p,g]=o(c+l,h);u&&g?(a=Math.abs(c-u.getBoundingClientRect().right)<Math.abs(c-g.getBoundingClientRect().left)?d:p,a===n&&(a=a===d?p:d)):u?a=d:g&&(a=p),a>-1&&i[a]&&t.slideTo(a)}getShift(e){var t;const i=this,{instance:n}=i,s=i.carousel;if(!n||!s)return 0;const o=i[Fe],a=i[$e],r=i.thumbGap,l=i.thumbExtraGap;if(!(null===(t=s.slides[e])||void 0===t?void 0:t.el))return 0;const c=.5*(o-a),h=n.pages.length-1;let d=n.getProgress(0),u=n.getProgress(h),p=n.getProgress(e,!1,!0),g=0,f=c+l+r;const m=d<0&&d>-1,v=u>0&&u<1;return 0===e?(g=f*Math.abs(d),v&&1===d&&(g-=f*Math.abs(u))):e===h?(g=f*Math.abs(u)*-1,m&&-1===u&&(g+=f*Math.abs(d))):m||v?(g=-1*f,g+=f*Math.abs(d),g+=f*(1-Math.abs(u))):g=f*p,g}setProps(e){var i;const n=this;if(!n.isModern)return;const{instance:s}=n,o=n.carousel;if(s&&o){const a=null===(i=o.slides[e])||void 0===i?void 0:i.el;if(a&&a.childNodes.length){let i=t(1-Math.abs(s.getProgress(e))),o=t(n.getShift(e));a.style.setProperty("--progress",i?i+"":""),a.style.setProperty("--shift",o+"")}}}shiftModern(){const e=this;if(!e.isModern)return;const{instance:t,track:i}=e,n=t.panzoom,s=e.carousel;if(!(t&&i&&n&&s))return;if(n.state===v.Init||n.state===v.Destroy)return;for(const i of t.slides)e.setProps(i.index);let o=(e[$e]+e.thumbGap)*(s.slides.length||0);i.style.setProperty("--width",o+"")}cleanup(){const e=this;e.carousel&&e.carousel.destroy(),e.carousel=null,e.container&&e.container.remove(),e.container=null,e.track&&e.track.remove(),e.track=null,e.state=ze.Init,C(e.instance.container,e.cn("hasThumbs"))}attach(){const e=this,t=e.instance;t.on("initSlide",e.onInitSlide),t.state===D.Init?t.on("initSlides",e.onInitSlides):e.onInitSlides(),t.on(["change","Panzoom.afterTransform"],e.onChange),t.on("Panzoom.refresh",e.onRefresh)}detach(){const e=this,t=e.instance;t.off("initSlide",e.onInitSlide),t.off("initSlides",e.onInitSlides),t.off(["change","Panzoom.afterTransform"],e.onChange),t.off("Panzoom.refresh",e.onRefresh),e.cleanup()}};Object.defineProperty(_e,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:je});const Be=Object.assign(Object.assign({},je),{key:"t",showOnStart:!0,parentEl:null}),He="is-masked",Ne="aria-hidden";class qe extends ${constructor(){super(...arguments),Object.defineProperty(this,"ref",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"hidden",{enumerable:!0,configurable:!0,writable:!0,value:!1})}get isEnabled(){const e=this.ref;return e&&!e.isDisabled()}get isHidden(){return this.hidden}onClick(e,t){t.stopPropagation()}onCreateSlide(e,t){var i,n,s;const o=(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"),T(a,e)}}onInit(){var e;const t=this,i=t.instance,n=i.carousel;if(t.ref||!n)return;
4const s=t.option("parentEl")||i.footer||i.container;if(!s)return;const o=p({},t.options,{parentEl:s,classes:{container:"f-thumbs fancybox__thumbs"},Carousel:{Sync:{friction:i.option("Carousel.friction")||0}},on:{ready:e=>{const 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=p((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:_e}),t.ref=n.plugins.Thumbs,t.option("showOnStart")||(t.ref.state=ze.Hidden,t.hidden=!0)}onResize(){var e;const t=null===(e=this.ref)||void 0===e?void 0:e.container;t&&(t.style.maxHeight="")}onKeydown(e,t){const i=this.option("key");i&&i===t&&this.toggle()}toggle(){const e=this.ref;if(e&&!e.isDisabled())return e.state===ze.Hidden?(e.state=ze.Init,void e.build()):void(this.hidden?this.show():this.hide())}show(){const e=this.ref;if(!e||e.isDisabled())return;const t=e.container;t&&(this.refresh(),t.offsetHeight,t.removeAttribute(Ne),t.classList.remove(He),this.hidden=!1)}hide(){const e=this.ref,t=e&&e.container;t&&(this.refresh(),t.offsetHeight,t.classList.add(He),t.setAttribute(Ne,"true")),this.hidden=!0}refresh(){const e=this.ref;if(!e||!e.state)return;const t=e.container,i=(null==t?void 0:t.firstChild)||null;t&&i&&i.childNodes.length&&(t.style.maxHeight=`${i.getBoundingClientRect().height}px`)}attach(){const e=this,t=e.instance;t.state===oe.Init?t.on("Carousel.init",e.onInit):e.onInit(),t.on("resize",e.onResize),t.on("keydown",e.onKeydown)}detach(){var e;const t=this,i=t.instance;i.off("Carousel.init",t.onInit),i.off("resize",t.onResize),i.off("keydown",t.onKeydown),null===(e=i.carousel)||void 0===e||e.detachPlugins(["Thumbs"]),t.ref=null}}Object.defineProperty(qe,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:Be});const We={panLeft:{icon:'<svg><path d="M5 12h14M5 12l6 6M5 12l6-6"/></svg>',change:{panX:-100}},panRight:{icon:'<svg><path d="M5 12h14M13 18l6-6M13 6l6 6"/></svg>',change:{panX:100}},panUp:{icon:'<svg><path d="M12 5v14M18 11l-6-6M6 11l6-6"/></svg>',change:{panY:-100}},panDown:{icon:'<svg><path d="M12 5v14M18 13l-6 6M6 13l6 6"/></svg>',change:{panY:100}},zoomIn:{icon:'<svg><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M11 8v6M8 11h6"/></svg>',action:"zoomIn"},zoomOut:{icon:'<svg><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M8 11h6"/></svg>',action:"zoomOut"},toggle1to1:{icon:'<svg><path d="M3.51 3.07c5.74.02 11.48-.02 17.22.02 1.37.1 2.34 1.64 2.18 3.13 0 4.08.02 8.16 0 12.23-.1 1.54-1.47 2.64-2.79 2.46-5.61-.01-11.24.02-16.86-.01-1.36-.12-2.33-1.65-2.17-3.14 0-4.07-.02-8.16 0-12.23.1-1.36 1.22-2.48 2.42-2.46Z"/><path d="M5.65 8.54h1.49v6.92m8.94-6.92h1.49v6.92M11.5 9.4v.02m0 5.18v0"/></svg>',action:"toggleZoom"},toggleZoom:{icon:'<svg><g><line x1="11" y1="8" x2="11" y2="14"></line></g><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M8 11h6"/></svg>',action:"toggleZoom"},iterateZoom:{icon:'<svg><g><line x1="11" y1="8" x2="11" y2="14"></line></g><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M8 11h6"/></svg>',action:"iterateZoom"},rotateCCW:{icon:'<svg><path d="M15 4.55a8 8 0 0 0-6 14.9M9 15v5H4M18.37 7.16v.01M13 19.94v.01M16.84 18.37v.01M19.37 15.1v.01M19.94 11v.01"/></svg>',action:"rotateCCW"},rotateCW:{icon:'<svg><path d="M9 4.55a8 8 0 0 1 6 14.9M15 15v5h5M5.63 7.16v.01M4.06 11v.01M4.63 15.1v.01M7.16 18.37v.01M11 19.94v.01"/></svg>',action:"rotateCW"},flipX:{icon:'<svg style="stroke-width: 1.3"><path d="M12 3v18M16 7v10h5L16 7M8 7v10H3L8 7"/></svg>',action:"flipX"},flipY:{icon:'<svg style="stroke-width: 1.3"><path d="M3 12h18M7 16h10L7 21v-5M7 8h10L7 3v5"/></svg>',action:"flipY"},fitX:{icon:'<svg><path d="M4 12V6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v6M10 18H3M21 18h-7M6 15l-3 3 3 3M18 15l3 3-3 3"/></svg>',action:"fitX"},fitY:{icon:'<svg><path d="M12 20H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h6M18 14v7M18 3v7M15 18l3 3 3-3M15 6l3-3 3 3"/></svg>',action:"fitY"},reset:{icon:'<svg><path d="M20 11A8.1 8.1 0 0 0 4.5 9M4 5v4h4M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"/></svg>',action:"reset"},toggleFS:{icon:'<svg><g><path d="M14.5 9.5 21 3m0 0h-6m6 0v6M3 21l6.5-6.5M3 21v-6m0 6h6"/></g><g><path d="m14 10 7-7m-7 7h6m-6 0V4M3 21l7-7m0 0v6m0-6H4"/></g></svg>',action:"toggleFS"}};var Xe;!function(e){e[e.Init=0]="Init",e[e.Ready=1]="Ready",e[e.Disabled=2]="Disabled"}(Xe||(Xe={}));const Ye={tabindex:"-1",width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Ve="has-toolbar",Ze="fancybox__toolbar";class Ue extends ${constructor(){super(...arguments),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:Xe.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){const e=this.instance.carousel;let t=0;if(e)for(const i of e.slides)(i.panzoom||"image"===i.type)&&t++;t||(s=!1)}s||(i=void 0);let o=0;const a={left:[],middle:[],right:[]};if(i)for(const e of["left","middle","right"])for(const n of i[e]){const 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(const[e,t]of Object.entries(a)){const i=document.createElement("div");T(i,Ze+"__column is-"+e);for(const e of t)i.appendChild(e);"auto"!==n||"middle"!==e||t.length||(n=!0),r.appendChild(i)}!0===n&&T(r,"is-absolute"),this.state=Xe.Ready,this.onRefresh()}else this.state=Xe.Disabled}onClick(e){var t,i;const n=this.instance,s=n.getSlide(),o=null==s?void 0:s.panzoom,a=e.target,r=a&&E(a)?a.dataset:null;if(!r)return;if(void 0!==r.fancyboxToggleThumbs)return e.preventDefault(),e.stopPropagation(),void(null===(t=n.plugins.Thumbs
4)||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();const t=null===(i=n.carousel)||void 0===i?void 0:i.plugins.Autoplay;let s=t.isActive;return o&&"mousemove"===o.panMode&&!s&&o.reset(),void(s?t.stop():t.start())}const l=r.panzoomAction,c=r.panzoomChange;if((c||l)&&(e.preventDefault(),e.stopPropagation()),c){let t={};try{t=JSON.parse(c)}catch(e){}o&&o.applyChange(t)}else l&&o&&o[l]&&o[l]()}onChange(){this.onRefresh()}onRefresh(){if(this.instance.isClosing())return;const e=this.container;if(!e)return;const t=this.instance.getSlide();if(!t||t.state!==ae.Ready)return;const i=t&&!t.error&&t.panzoom;for(const 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(const t of e.querySelectorAll('[data-panzoom-action="zoomIn"]'))n?(t.removeAttribute("disabled"),t.removeAttribute("tabindex")):(t.setAttribute("disabled",""),t.setAttribute("tabindex","-1"));for(const t of e.querySelectorAll('[data-panzoom-action="zoomOut"]'))s?(t.removeAttribute("disabled"),t.removeAttribute("tabindex")):(t.setAttribute("disabled",""),t.setAttribute("tabindex","-1"));for(const 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"));const 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(){const e=this.instance.container;if(!e)return null;const t=this.option("parentEl")||e;let i=t.querySelector("."+Ze);return i||(i=document.createElement("div"),T(i,Ze),t.prepend(i)),i.addEventListener("click",this.onClick,{passive:!1,capture:!0}),e&&T(e,Ve),this.container=i,i}createEl(e){const t=this.instance,i=t.carousel;if(!i)return null;if("toggleFS"===e)return null;if("fullscreen"===e&&!ne())return null;let n=null;const o=i.slides.length||0;let a=0,r=0;for(const e of i.slides)(e.panzoom||"image"===e.type)&&a++,("image"===e.type||e.downloadSrc)&&r++;if(o<2&&["infobar","prev","next"].includes(e))return n;if(void 0!==We[e]&&!a)return null;if("download"===e&&!r)return null;if("thumbs"===e){const e=t.plugins.Thumbs;if(!e||!e.isEnabled)return null}if("slideshow"===e&&(!i.plugins.Autoplay||o<2))return null;if(void 0!==We[e]){const t=We[e];n=document.createElement("button"),n.setAttribute("title",this.instance.localize(`{{${e.toUpperCase()}}}`)),T(n,"f-button"),t.action&&(n.dataset.panzoomAction=t.action),t.change&&(n.dataset.panzoomChange=JSON.stringify(t.change)),n.appendChild(s(this.instance.localize(t.icon)))}else{const t=(this.option("items")||[])[e];t&&(n=s(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)})))}const l=null==n?void 0:n.querySelector("svg");if(l)for(const[e,t]of Object.entries(Ye))l.getAttribute(e)||l.setAttribute(e,String(t));return n}removeContainer(){const e=this.container;e&&e.remove(),this.container=null,this.state=Xe.Disabled;const t=this.instance.container;t&&C(t,Ve)}attach(){const e=this,t=e.instance;t.on("Carousel.initSlides",e.onReady),t.on("done",e.onDone),t.on(["reveal","Carousel.change"],e.onChange),e.onReady(e.instance)}detach(){const e=this,t=e.instance;t.off("Carousel.initSlides",e.onReady),t.off("done",e.onDone),t.off(["reveal","Carousel.change"],e.onChange),e.removeContainer()}}Object.defineProperty(Ue,"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>
4<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}});const Ge={Hash:class extends ${onReady(){le=!1}onChange(e){he&&clearTimeout(he);const{hash:t}=de(),{hash:i}=ue(),n=e.isOpeningSlide(e.getSlide());n&&(re=i===t?"":i),t&&t!==i&&(he=setTimeout((()=>{try{if(e.state===oe.Ready){let e="replaceState";n&&!ce&&(e="pushState",ce=!0),window.history[e]({},document.title,window.location.pathname+window.location.search+t)}}catch(e){}}),300))}onClose(e){if(he&&clearTimeout(he),!le&&ce)return ce=!1,le=!1,void window.history.back();if(!le)try{window.history.replaceState({},document.title,window.location.pathname+window.location.search+(re||""))}catch(e){}}attach(){const e=this.instance;e.on("ready",this.onReady),e.on(["Carousel.ready","Carousel.change"],this.onChange),e.on("close",this.onClose)}detach(){const e=this.instance;e.off("ready",this.onReady),e.off(["Carousel.ready","Carousel.change"],this.onChange),e.off("close",this.onClose)}static parseURL(){return ue()}static startFromUrl(){pe()}static destroy(){window.removeEventListener("hashchange",fe,!1)}},Html:Me,Images:be,Slideshow:Re,Thumbs:qe,Toolbar:Ue},Ke="with-fancybox",Je="hide-scrollbar",Qe="--fancybox-scrollbar-compensate",et="--fancybox-body-margin",tt="aria-hidden",it="is-using-tab",nt="is-animated",st="is-compact",ot="is-loading",at="is-opening",rt="has-caption",lt="disabled",ct="tabindex",ht="download",dt="href",ut="src",pt=e=>"string"==typeof e,gt=function(){var e=window.getSelection();return!!e&&"Range"===e.type};let ft,mt=null,vt=null,bt=0,yt=0,wt=0,xt=0;const St=new Map;let Et=0;class Ct extends m{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:oe.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}),ft||(ft=ne()),this.id=t.id||++Et,St.set(this.id,this),this.userSlides=e,this.userPlugins=i,queueMicrotask((()=>{this.init()}))}init(){if(this.state===oe.Destroy)return;this.state=oe.Init,this.attachPlugins(Object.assign(Object.assign({}
4,Ct.Plugins),this.userPlugins)),this.emit("init"),this.emit("attachPlugins"),!0===this.option("hideScrollbar")&&(()=>{if(!Q)return;const e=document,t=e.body,i=e.documentElement;if(t.classList.contains(Je))return;let n=window.innerWidth-i.getBoundingClientRect().width;const s=parseFloat(window.getComputedStyle(t).marginRight);n<0&&(n=0),i.style.setProperty(Qe,`${n}px`),s&&t.style.setProperty(et,`${s}px`),t.classList.add(Je)})(),this.initLayout(),this.scale();const e=()=>{this.initCarousel(this.userSlides),this.state=oe.Ready,this.attachEvents(),this.emit("ready"),setTimeout((()=>{this.container&&this.container.setAttribute(tt,"false")}),16)};this.option("Fullscreen.autoStart")&&ft&&!ft.isFullscreen()?ft.request().then((()=>{this.startedFs=!0,e()})).catch((()=>e())):e()}initLayout(){var e,t;const i=this.option("parentEl")||document.body,n=s(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(st,this.isCompact),T(n,this.option("mainClass")||""),T(n,at),this.container=n,this.footer=n.querySelector(".fancybox__footer"),i.appendChild(n),T(document.documentElement,Ke),mt&&vt||(mt=document.createElement("span"),T(mt,"fancybox-focus-guard"),mt.setAttribute(ct,"0"),mt.setAttribute(tt,"true"),mt.setAttribute("aria-label","Focus guard"),vt=mt.cloneNode(),null===(e=n.parentElement)||void 0===e||e.insertBefore(mt,n),null===(t=n.parentElement)||void 0===t||t.append(vt)),n.addEventListener("mousedown",(e=>{bt=e.pageX,yt=e.pageY,C(n,it)})),this.option("closeExisting"))for(const e of St.values())e.id!==this.id&&e.close();else this.option("animated")&&(T(n,nt),setTimeout((()=>{this.isClosing()||C(n,nt)}),350));this.emit("initLayout")}}initCarousel(e){const t=this.container;if(!t)return;const n=t.querySelector(".fancybox__carousel");if(!n)return;const s=this.carousel=new K(n,p({},{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")||{}));s.on("*",((e,t,...i)=>{this.emit(`Carousel.${t}`,e,...i)})),s.on(["ready","change"],(()=>{this.manageCaption()})),this.on("Carousel.removeSlide",((e,t,i)=>{this.clearContent(i),i.state=void 0})),s.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())})),s.on("settle",(()=>{this.idleTimer||this.isCompact||!this.option("idle")||this.setIdle(),this.option("autoFocus")&&!this.isClosing&&this.checkFocus()})),this.option("dragToClose")&&(s.on("Panzoom.afterTransform",((e,t)=>{const n=this.getSlide();if(n&&i(n.el))return;const s=this.container;if(s){const e=Math.abs(t.current.f),i=e<1?"":Math.max(.5,Math.min(1,1-e/t.contentRect.fitHeight*1.5));s.style.setProperty("--fancybox-ts",i?"0s":""),s.style.setProperty("--fancybox-opacity",i+"")}})),s.on("Panzoom.touchEnd",((e,t,n)=>{var s;const o=this.getSlide();if(o&&i(o.el))return;if(t.isMobile&&document.activeElement&&-1!==["TEXTAREA","INPUT"].indexOf(null===(s=document.activeElement)||void 0===s?void 0:s.nodeName))return;const a=Math.abs(t.dragOffset.y);"y"===t.lockedAxis&&(a>=200||a>=50&&t.dragOffset.time<300)&&(n&&n.cancelable&&n.preventDefault(),this.close(n,"f-throwOut"+(t.current.f<0?"Up":"Down")))}))),s.on("change",(e=>{var t;let i=null===(t=this.getSlide())||void 0===t?void 0:t.triggerEl;if(i){const t=new CustomEvent("slideTo",{bubbles:!0,cancelable:!0,detail:e.page});i.dispatchEvent(t)}})),s.on(["refresh","change"],(e=>{const t=this.container;if(!t)return;for(const i of t.querySelectorAll("[data-fancybox-current-index]"))i.innerHTML=e.page+1;for(const i of t.querySelectorAll("[data-fancybox-count]"))i.innerHTML=e.pages.length;if(!e.isInfinite){for(const i of t.querySelectorAll("[data-fancybox-next]"))e.page<e.pages.length-1?(i.removeAttribute(lt),i.removeAttribute(ct)):(i.setAttribute(lt,""),i.setAttribute(ct,"-1"));for(const i of t.querySelectorAll("[data-fancybox-prev]"))e.page>0?(i.removeAttribute(lt),i.removeAttribute(ct)):(i.setAttribute(lt,""),i.setAttribute(ct,"-1"))}const i=this.getSlide();if(!i)return;let n=i.downloadSrc||"";n||"image"!==i.type||i.error||!pt(i[ut])||(n=i[ut]);for(const e of t.querySelectorAll("[data-fancybox-download]")){const t=i.downloadFilename;n?(e.removeAttribute(lt),e.removeAttribute(ct),e.setAttribute(dt,n),e.setAttribute(ht,t||n),e.setAttribute("target","_blank")):(e.setAttribute(lt,""),e.setAttribute(ct,"-1"),e.removeAttribute(dt),e.removeAttribute(ht))}}
4)),this.emit("initCarousel")}attachEvents(){const e=this,t=e.container;if(!t)return;t.addEventListener("click",e.onClick,{passive:!1,capture:!1}),t.addEventListener("wheel",e.onWheel,{passive:!1,capture:!1}),document.addEventListener("keydown",e.onKeydown,{passive:!1,capture:!0}),document.addEventListener("visibilitychange",e.onVisibilityChange,!1),document.addEventListener("mousemove",e.onMousemove),e.option("trapFocus")&&document.addEventListener("focus",e.onFocus,!0),window.addEventListener("resize",e.onResize);const i=window.visualViewport;i&&(i.addEventListener("scroll",e.onResize),i.addEventListener("resize",e.onResize))}detachEvents(){const e=this,t=e.container;if(!t)return;document.removeEventListener("keydown",e.onKeydown,{passive:!1,capture:!0}),t.removeEventListener("wheel",e.onWheel,{passive:!1,capture:!1}),t.removeEventListener("click",e.onClick,{passive:!1,capture:!1}),document.removeEventListener("mousemove",e.onMousemove),window.removeEventListener("resize",e.onResize);const i=window.visualViewport;i&&(i.removeEventListener("resize",e.onResize),i.removeEventListener("scroll",e.onResize)),document.removeEventListener("visibilitychange",e.onVisibilityChange,!1),document.removeEventListener("focus",e.onFocus,!0)}scale(){const e=this.container;if(!e)return;const t=window.visualViewport,i=Math.max(1,(null==t?void 0:t.scale)||1);let 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;const{container:i,isCompact:n}=this;if(!i||this.isClosing())return;!n&&this.option("idle")&&this.resetIdle();const s=e.composedPath()[0] 5;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)return;if(Math.abs(e.pageX-bt)>30||Math.abs(e.pageY-yt)>30)return;const o=document.activeElement;if(gt()&&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(te)||o.blur()}if(gt())return;a=this.option("contentClick")}else s.closest(".fancybox__carousel")&&!s.matches(te)&&(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){const t=e.target;let i=this.option("wheel",e);t.closest(".fancybox__thumbs")&&(i="slide");const s="slide"===i,o=[-e.deltaX||0,-e.deltaY||0,-e.detail||0].reduce((function(e,t){return Math.abs(t)>Math.abs(e)?t:e})),a=Math.max(-1,Math.min(1,o)),r=Date.now();this.pwt&&r-this.pwt<300?s&&e.preventDefault():(this.pwt=r,this.emit("wheel",e,a),e.defaultPrevented||("close"===i?(e.preventDefault(),this.close(e)):"slide"===i&&(n(t)||(e.preventDefault(),this[a>0?"prev":"next"]()))))}onScroll(){window.scrollTo(wt,xt)}onKeydown(e){if(!this.isTopmost())return;this.isCompact||!this.option("idle")||this.isClosing()||this.resetIdle();const t=e.key,i=this.option("keyboard");if(!i)return;const n=e.composedPath()[0],s=document.activeElement&&document.activeElement.classList,o=s&&s.contains("f-button")||n.dataset.carouselPage||n.dataset.carouselIndex;if("Escape"!==t&&!o&&E(n)&&(n.isContentEditable||-1!==["TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].indexOf(n.nodeName)))return;if("Tab"===e.key?T(this.container,it):C(this.container,it),e.ctrlKey||e.altKey||e.shiftKey)return;this.emit("keydown",t,e);const a=i[t];a&&"function"==typeof this[a]&&(e.preventDefault(),this[a]())}onResize(){const e=this.container;if(!e)return;const t=this.isCompact;e.classList.toggle(st,t),this.manageCaption(this.getSlide()),this.isCompact?this.clearIdle():this.endIdle(),this.scale(),this.emit
5("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){const t=this.optionFor(e,"closeButton")||!1;if("auto"===t){const e=this.plugins.Toolbar;if(e&&e.state===Xe.Ready)return}if(!t)return;if(!e.contentEl||e.closeBtnEl)return;const i=this.option("tpl.closeButton");if(i){const t=s(this.localize(i));e.closeBtnEl=e.contentEl.appendChild(t),e.el&&T(e.el,"has-close-btn")}}manageCaption(e=void 0){var t,i;const n="fancybox__caption",s=this.container;if(!s)return;C(s,rt);const o=this.isCompact||this.option("commonCaption"),a=!o;if(this.caption&&this.stop(this.caption),a&&this.caption&&(this.caption.remove(),this.caption=null),o&&!this.caption)for(const e of(null===(t=this.carousel)||void 0===t?void 0:t.slides)||[])e.captionEl&&(e.captionEl.remove(),e.captionEl=void 0,C(e.el,rt),null===(i=e.el)||void 0===i||i.removeAttribute("aria-labelledby"));if(e||(e=this.getSlide()),!e||o&&!this.isCurrentSlide(e))return;const r=e.el;let l=this.optionFor(e,"caption","");if(!l)return void(o&&this.caption&&this.animate(this.caption,"f-fadeOut",(()=>{this.caption&&(this.caption.innerHTML="")})));let c=null;if(a){if(c=e.captionEl||null,r&&!c){const t=n+`_${this.id}_${e.index}`;c=document.createElement("div"),T(c,n),c.setAttribute("id",t),e.captionEl=r.appendChild(c),T(r,rt),r.setAttribute("aria-labelledby",t)}}else c=this.caption,c||(c=s.querySelector("."+n)),c||(c=document.createElement("div"),c.dataset.fancyboxCaption="",T(c,n),(this.footer||s).prepend(c)),T(s,rt),this.caption=c;c&&(c.innerHTML="",pt(l)||"number"==typeof l?c.innerHTML=l+"":l instanceof HTMLElement&&c.appendChild(l))}checkFocus(e){this.focus(e)}focus(e){var t;if(this.ignoreFocusChange)return;const 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)return;if(!e&&i&&s.contains(i))return;const a=this.getSlide(),r=a&&a.state===ae.Ready?a.el:null;if(!r||r.contains(i)||s===i)return;e&&e.cancelable&&e.preventDefault(),this.ignoreFocusChange=!0;const l=Array.from(s.querySelectorAll(te));let c=[],h=null;for(let e of l){const t=!e.offsetParent||!!e.closest('[aria-hidden="true"]'),i=r&&r.contains(e),n=!o.contains(e);if(e===s||(i||n)&&!t){c.push(e);const t=e.dataset.origTabindex;void 0!==t&&t&&(e.tabIndex=parseFloat(t)),e.removeAttribute("data-orig-tabindex"),!e.hasAttribute("autoFocus")&&h||(h=e)}else{const t=void 0===e.dataset.origTabindex?e.getAttribute("tabindex")||"":e.dataset.origTabindex;t&&(e.dataset.origTabindex=t),e.tabIndex=-1}}let d=null;e?(!n||c.indexOf(n)<0)&&(d=h||s,c.length&&(i===vt?d=c[0]:this.lastFocus!==s&&i!==mt||(d=c[c.length-1]))):d=a&&"image"===a.type?s:h||s,d&&ie(d),this.lastFocus=document.activeElement,this.ignoreFocusChange=!1}next(){const e=this.carousel;e&&e.pages.length>1&&e.slideNext()}prev(){const e=this.carousel;e&&e.pages.length>1&&e.slidePrev()}jumpTo(...e){this.carousel&&this.carousel.slideTo(...e)}isTopmost(){var e;return(null===(e=Ct.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);const n=s=>{s.target===e&&e.dataset.animationName&&(e.removeEventListener("animationend",n),delete e.dataset.animationName,i&&i(),C(e,t))};e.dataset.animationName=t,e.addEventListener("animationend",n),T(e,t)}stop(e){e&&e.dispatchEvent(new CustomEvent("animationend",{bubbles:!1,cancelable:!0,currentTarget:e}))}setContent(e,t="",i=!0){if(this.isClosing())return;const n=e.el;if(!n)return;let o=null;if(E(t)?o=t:(o=s(t+""),E(o)||(o=document.createElement("div"),o.innerHTML=t+"")),["img","picture","iframe","video","audio"].includes(o.nodeName.toLowerCase())){const e=document.createElement("div");e.appendChild(o),o=e}E(o)&&e.filter&&!e.error&&(o=o.querySelector(e.filter)),o&&E(o)?(T(o,"fancybox__content"),e.id&&o.setAttribute("id",e.id),n.classList.add(`has-${e.error?"error":e.type||"unknown"}`),n.prepend(o),"none"===o.style.display&&(o.style.display=""),"none"===getComputedStyle(o).getPropertyValue("display")&&(o.style.display=e.display||this.option("defaultDisplay")||"flex"),e.contentEl=o,i&&this.revealContent(e),this.manageCloseBtn(e),this.manageCaption(e)):this.setError(e,"{{ELEMENT_NOT_FOUND}}")}revealContent(e,t){const i=e.el,n=e.contentEl;
5i&&n&&(this.emit("reveal",e),this.hideLoading(e),e.state=ae.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=ae.Ready,this.emit("done",e),T(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)&&(C(this.container,at),!this.isCompact&&this.option("idle")&&this.setIdle()))}isCurrentSlide(e){const t=this.getSlide();return!(!e||!t)&&t.index===e.index}isOpeningSlide(e){var t,i;return 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=ae.Loading;const t=e.el;t&&(T(t,ot),this.emit("loading",e),e.spinnerEl||setTimeout((()=>{if(!this.isClosing()&&!e.spinnerEl&&e.state===ae.Loading){let i=s(S);T(i,"fancybox-spinner"),e.spinnerEl=i,t.prepend(i),this.animate(i,"f-fadeIn")}}),250))}hideLoading(e){const t=e.el;if(!t)return;const i=e.spinnerEl;this.isClosing()?null==i||i.remove():(C(t,ot),i&&this.animate(i,"f-fadeOut",(()=>{i.remove()}
5)),e.state===ae.Loading&&(this.emit("loaded",e),e.state=ae.Ready))}setError(e,t){if(this.isClosing())return;const i=new Event("error",{bubbles:!0,cancelable:!0});if(this.emit("error",i,e),i.defaultPrevented)return;e.error=t,this.hideLoading(e),this.clearContent(e);const n=document.createElement("div");n.classList.add("fancybox-error"),n.innerHTML=this.localize(t||"<p>{{ERROR}}</p>"),this.setContent(e,n)}clearContent(e){if(void 0===e.state)return;this.emit("clearContent",e),e.contentEl&&(e.contentEl.remove(),e.contentEl=void 0);const t=e.el;t&&(C(t,"has-error"),C(t,"has-unknown"),C(t,`has-${e.type||"unknown"}`)),e.closeBtnEl&&e.closeBtnEl.remove(),e.closeBtnEl=void 0,e.captionEl&&e.captionEl.remove(),e.captionEl=void 0,e.spinnerEl&&e.spinnerEl.remove(),e.spinnerEl=void 0}getSlide(){var e;const t=this.carousel;return(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;const i=new Event("shouldClose",{bubbles:!0,cancelable:!0});if(this.emit("shouldClose",i,e),i.defaultPrevented)return;e&&e.cancelable&&(e.preventDefault(),e.stopPropagation());const n=()=>{this.proceedClose(e,t)};this.startedFs&&ft&&ft.isFullscreen()?Promise.resolve(ft.exit()).then((()=>n())):n()}clearIdle(){this.idleTimer&&clearTimeout(this.idleTimer),this.idleTimer=null}setIdle(e=!1){const t=()=>{this.clearIdle(),this.idle=!0,T(this.container,"is-idle"),this.emit("setIdle")};if(this.clearIdle(),!this.isClosing())if(e)t();else{const e=this.option("idle");e&&(this.idleTimer=setTimeout(t,e))}}endIdle(){this.clearIdle(),this.idle&&!this.isClosing()&&(this.idle=!1,C(this.container,"is-idle"),this.emit("endIdle"))}resetIdle(){this.endIdle(),this.setIdle()}toggleIdle(){this.idle?this.endIdle():this.setIdle(!0)}toggleFullscreen(){ft&&(ft.isFullscreen()?ft.exit():ft.request().then((()=>{this.startedFs=!0})))}isClosing(){return[oe.Closing,oe.CustomClosing,oe.Destroy].includes(this.state)}proceedClose(e,t){var i,n;this.state=oe.Closing,this.clearIdle(),this.detachEvents();const s=this.container,o=this.carousel,a=this.getSlide(),r=a&&this.option("placeFocusBack")?a.triggerEl||this.option("triggerEl"):null;if(r&&(J(r)?ie(r):r.focus()),s&&(C(s,at),T(s,"is-closing"),s.setAttribute(tt,"true"),this.option("animated")&&T(s,nt),s.style.pointerEvents="none"),o){o.clearTransitions(),null===(i=o.panzoom)||void 0===i||i.destroy(),null===(n=o.plugins.Navigation)||void 0===n||n.detach();for(const e of o.slides){e.state=ae.Closing,this.hideLoading(e);const t=e.contentEl;t&&this.stop(t);const i=null==e?void 0:e.panzoom;i&&(i.stop(),i.detachEvents(),i.detachObserver()),this.isCurrentSlide(e)||o.emit("removeSlide",e)}}wt=window.scrollX,xt=window.scrollY,window.addEventListener("scroll",this.onScroll),this.emit("close",e),this.state!==oe.CustomClosing?(void 0===t&&a&&(t=this.optionFor(a,"hideClass")),t&&a?(this.animate(a.contentEl,t,(()=>{o&&o.emit("removeSlide",a)})),setTimeout((()=>{this.destroy()}),500)):this.destroy()):setTimeout((()=>{this.destroy()}),500)}destroy(){var e;if(this.state===oe.Destroy)return;window.removeEventListener("scroll",this.onScroll),this.state=oe.Destroy,null===(e=this.carousel)||void 0===e||e.destroy();const t=this.container;t&&t.remove(),St.delete(this.id);const i=Ct.getInstance();i?i.focus():(mt&&(mt.remove(),mt=null),vt&&(vt.remove(),vt=null),C(document.documentElement,Ke),(()=>{if(!Q)return;const e=document,t=e.body;t.classList.remove(Je),t.style.setProperty(et,""),e.documentElement.style.setProperty(Qe,"")})(),this.emit("destroy"))}static bind(e,t,i){if(!Q)return;let n,s="",o={};if(void 0===e?n=document.body:pt(e)?(n=document.body,s=e,"object"==typeof t&&(o=t||{})):(n=e,pt(t)&&(s=t),"object"==typeof i&&(o=i||{})),!n||!E(n))return;s=s||"[data-fancybox]";const a=Ct.openers.get(n)||new Map;a.set(s,o),Ct.openers.set(n,a),1===a.size&&n.addEventListener("click",Ct.fromEvent)}static unbind(e,t){let i,n="";if(pt(e)?(i=document.body,n=e):(i=e,pt(t)&&(n=t)),!i)return;const s=Ct.openers.get(i);s&&n&&s.delete(n),n&&s||(Ct.openers.delete(i),i.removeEventListener("click",Ct.fromEvent))}static destroy(){let e;for(;e=Ct.getInstance();)e.destroy();for(const e of Ct.openers.keys())e.removeEventListener("click",Ct.fromEvent);Ct.openers=new Map}static fromEvent(e){if(e.defaultPrevented)return;if(e.button&&0!==e.button)return;if(e.ctrlKey||e.metaKey||e.shiftKey)return;let t=e.composedPath()[0];const i=t.closest("[data-fancybox-trigger]");if(i){const e=i.dataset.fancyboxTrigger||"",n=document.querySelectorAll(`[data-fancybox="${e}"]`),s=parseInt(i.dataset.fancyboxIndex||"",10)||0;t=n[s]||t}if(!(t&&t instanceof Element))return;let n,s,o,a;if([...Ct.openers].reverse().find((([e,i])=>!(!e.contains(t)||![...i].reverse().find((([i,r])=>{let l=t.closest(i);return!!l&&(n=e,s=i,o=l,a=r,!0)}))))),!n||!s||!o)return;a=a||{},e.preventDefault(),t=o;let r=[],l=p({},se,a);l.event=e,l.triggerEl=t,l.delegate=i;const c=l.groupAll,h=l.groupAttr,d=h&&t?t.getAttribute(`${h}`):"";
5if((!t||d||c)&&(r=[].slice.call(n.querySelectorAll(s))),t&&!c&&(r=d?r.filter((e=>e.getAttribute(`${h}`)===d)):[t]),!r.length)return;const u=Ct.getInstance();return u&&u.options.triggerEl&&r.indexOf(u.options.triggerEl)>-1?void 0:(t&&(l.startIndex=r.indexOf(t)),Ct.fromNodes(r,l))}static fromSelector(e,t,i){let n=null,s="",o={};if(pt(e)?(n=document.body,s=e,"object"==typeof t&&(o=t||{})):e instanceof HTMLElement&&pt(t)&&(n=e,s=t,"object"==typeof i&&(o=i||{})),!n||!s)return!1;const a=Ct.openers.get(n);return!!a&&(o=p({},a.get(s)||{},o),!!o&&Ct.fromNodes(Array.from(n.querySelectorAll(s)),o))}static fromNodes(e,t){t=p({},se,t||{});const i=[];for(const n of e){const e=n.dataset||{},s=e[ut]||n.getAttribute(dt)||n.getAttribute("currentSrc")||n.getAttribute(ut)||void 0;let o;const a=t.delegate;let r;a&&i.length===t.startIndex&&(o=a instanceof HTMLImageElement?a:a.querySelector("img:not([aria-hidden])")),o||(o=n instanceof HTMLImageElement?n:n.querySelector("img:not([aria-hidden])")),o&&(r=o.currentSrc||o[ut]||void 0,!r&&o.dataset&&(r=o.dataset.lazySrc||o.dataset[ut]||void 0));const l={src:s,triggerEl:n,thumbEl:o,thumbElSrc:r,thumbSrc:r};for(const t in e){let i=e[t]+"";i="false"!==i&&("true"===i||i),l[t]=i}i.push(l)}return new Ct(i,t)}static getInstance(e){return e?St.get(e):Array.from(St.values()).reverse().find((e=>!e.isClosing()&&e))||null}static getSlide(){var e;return(null===(e=Ct.getInstance())||void 0===e?void 0:e.getSlide())||null}static show(e=[],t={}){return new Ct(e,t)}static next(){const e=Ct.getInstance();e&&e.next()}static prev(){const e=Ct.getInstance();e&&e.prev()}static close(e=!0,...t){if(e)for(const e of St.values())e.close(...t);else{const e=Ct.getInstance();e&&e.close(...t)}}}Object.defineProperty(Ct,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.0.36"}),Object.defineProperty(Ct,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:se}),Object.defineProperty(Ct,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:Ge}),Object.defineProperty(Ct,"openers",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),e.Carousel=K,e.Fancybox=Ct,e.Panzoom=z})),Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)});var delaySubmit=function(){var e=0;return function(t,i){clearTimeout(e),e=setTimeout(t,i)}}();function detectIfHeaderIsAtTopOfPage(e){const t=document.querySelector(".site-notice__banner");if(t){e>=110+t.offsetHeight?header.classList.add("not-at-top"):window.scrollY<=t.offsetHeight&&header.classList.remove("not-at-top")}else e>110?header.classList.add("not-at-top"):0===window.scrollY&&header.classList.remove("not-at-top")}$((function(){Fancybox.bind("[data-fancybox]"),$("#menu-toggle").on("click",(function(){$(this).toggleClass("menu-open"),$("#main-menu").toggleClass("menu-open")})),$("#main-menu button.toggle").on("click",(function(){$(this).toggleClass("open"),$(this).siblings("ul").slideToggle()})),$("#site-search-toggle").on("click",(function(){$("#site-search-toggle").toggleClass("open"),$("#site-search").slideToggle()}));const e=$(".site-notice__modal"),t=$(".site-notice__close"),i=$(".site-notice__trigger"),n="hide_popup_"+$(e).attr("data-notice-id");var s,o;function a(e,t){var i={},n=$('.js-search-form[data-search-request="'+e+'"]');return searchFilterFormFields=!0===t?n.find('input:not([type="hidden"], [type="submit"]), select'):n.find("input, select"),searchFilterFormFields.each((function(){var e=$
5(this).prop("name");switch($(this).prop("type")){case"checkbox":void 0!==i[e]&&"string"!=typeof i[e]||(i[e]=[]),$(this).is(":checked")&&i[e].push($(this).val());break;case"radio":$(this).is(":checked")&&(i[e]=$(this).val());break;default:i[e]=$(this).val()}})),i}function r(e,t){void 0===t&&(t={}),s&&s.abort();var i=$('.js-search-form[data-search-request="'+e+'"]'),n=$('.js-search-view[data-search-request="'+e+'"]'),o=(i.data(),n.data(),c(!0)),r=$.extend({},o);$.extend(r,a(e)),$.extend(r,t);var h=i.prop("action");void 0!==r.page&&(h+="?page="+r.page),s=$.ajax({type:"POST",dataType:"json",url:h,data:{filters:r,request_type:e},beforeSend:function(){n.addClass("loading")},success:function(e){"object"!=typeof e&&(e=[{html:e}]),e.forEach((function(e){if(void 0!==e.view)var t=$('.js-search-view[data-view="'+e.view+'"]');else t=n;void 0!==e.html&&t.html(e.html)}))},error:function(e){console.error(e)},complete:function(e,t){n.removeClass("loading")}});var d=$.extend({},o);return $.extend(d,a(e,!0)),$.extend(d,t),l(d,e),s}function l(e,t){void 0===e&&(e={});window.location.hash;Object.keys(e).forEach((function(t){isEmpty(e[t])&&delete e[t]})),void 0!==t&&(isEmpty(e)||(e=$.extend({search_request:t},e)));var i=window.location.protocol+"//"+window.location.host+window.location.pathname,n=$.param(e);""!==n&&(i=i+"?"+n)}function c(e){var t={};window.location.search&&(window.location.search.substring(1).split("&").forEach((function(e){if(void 0!==(e=e.split("="))[1]){var i=decodeURIComponent(e[0]).replace("[]",""),n=(n=decodeURIComponent(e[1]))?n.replace(/\++/g," ").trim():"";if(0===i.length)return;void 0===t[i]?t[i]=n:("function"!=typeof t[i].push&&(t[i]=[t[i]]),t[i].push(n))}})),void 0!==e&&!0===e&&delete t.search_request);return t}function h(e){r("calendar_item",e).then((function(){$(".event__modal").addClass("open")}))}if(0==checkCookie(n,"true")?$(e).addClass("open"):$(i).addClass("visible"),$(t).on("click",(function(){$(e).removeClass("open"),$(i).addClass("visible"),this.closest("dialog").close(),setCookie(n,"true",14)})),$(".site-notice__modal .modal__body a").on("click",(function(){setCookie(n,"true",14)})),$(i).on("click",(function(){this.previousElementSibling.showModal(),$(this).removeClass("visible"),$(e).addClass("open")})),$(".js-search-form").on("change",'input[type="radio"], input[type="checkbox"], select',(function(){var e=$
5($(this).prop("form"));e.find(".js-clear").show(),!0!==e.data("manual-submit")&&r(e.data("search-request"),{page:1})})),$(".js-search-form").on("keyup keypress",'input[type="text"]',(function(e){13!=e.keyCode&&13!=e.which||e.preventDefault(),delaySubmit(function(){var e=$($(this).prop("form"));e.find(".js-clear").show(),!0!==e.data("manual-submit")&&r(e.data("search-request"),{page:1})}.bind($(this)),500)})),$(".js-search-form").on("click",'button[type="submit"], input[type="submit"]',(function(e){e.preventDefault(),r($($(this).prop("form")).data("search-request"),{page:1})})),$(".js-search-form").on("click",".js-clear",(function(){$(this).hide();var e=$($(this).prop("form"));!function(e){$('.js-search-form[data-search-request="'+e+'"]').trigger("reset"),$('.js-sort[data-search-request="'+e+'"]').removeClass("active"),$('.js-sort[data-search-request="'+e+'"]').data("sort-dir","asc"),l()}(e.data("search-request")),r(e.data("search-request"))})),$(document).on("click",".js-sort",(function(){var e=$(this).data("search-request"),t=$(this).data("sort-by"),i=$(this).data("sort-dir");$('.js-sort[data-search-request="'+e+'"]').removeClass("active"),$('.js-search-form[data-search-request="'+e+'"]').find(".js-clear").show(),$(this).addClass("active"),"asc"===i?$(this).data("sort-dir","desc"):"desc"===i&&$(this).data("sort-dir","asc"),r(e,{sort_by:t,sort_dir:i=$(this).data("sort-dir")})})),$(document).on("click",".js-view-toggle button",(function(){var e=$
5(this).data("view-type");$('.js-view-toggle button[data-view-type="'+e+'"]').addClass("active"),$('.js-view-toggle button[data-view-type]:not([data-view-type="'+e+'"])').removeClass("active"),$('[data-view="'+e+'"]').show(),$('[data-view]:not([data-view="'+e+'"])').hide(),window.location.hash=e})),$("#grid-calendar").on("click",".calendar_nav a",(function(e){e.preventDefault();const t=$(this).attr("href").replace("#","").split("/"),i=t[0];r("events",{month:t[1],year:i})})),$("#grid-calendar").on("click","a.item_link",(function(e){e.preventDefault(),h({event_id:$(this).attr("id"),year:$(this).attr("data-year"),month:$(this).attr("data-month"),day:$(this).attr("data-day")})})),$(document).on("click",".event__modal .modal_close",(function(){$(".event__modal").removeClass("open"),l(a("events",!0),"events")})),$(document).on("click",".pagination a",(function(){let e=$(this).attr("href"),t=new URLSearchParams(e).get("page");return r($(this).data("type"),{page:t}),!1})),o=c(),searchRequest=o.search_request,Object.keys(o).length&&(Object.keys(o).forEach((function(e){var t=$('[name="'+e+'"]');"checkbox"===t.prop("type")?Array.isArray(o[e])?t.each((function(){-1!==o[e].indexOf($(this).val())&&$(this).prop("checked",!0)})):$('[name="'+e+'"][value="'+o[e]+'"]').prop("checked",!0):t.val(o[e])})),"calendar_item"==searchRequest?h(o):r(searchRequest)),window.location.hash){var d=window.location.hash.replace("#","");$('.js-view-toggle button[data-view-type="'+d+'"]').click()}else $(".js-view-toggle button.active").click()})),document.addEventListener("scroll",(e=>{let t,i=window.scrollY;t||(window.requestAnimationFrame((()=>{detectIfHeaderIsAtTopOfPage(i),t=!1})),t=!0)}));let ca=document.cookie.split(";"),hidePopup=!1;const noticeModal=document.querySelector(".site-notice__modal");for(let e=0;e<ca.length;e++){ca[e].includes("hide_popup")&&(hidePopup=!0)}!hidePopup&¬iceModal&&(noticeModal?.showModal(),noticeModal?.classList.add("open"));const linksAsButtons=document.querySelectorAll(".links-as-buttons a"),linksAsSlimButtons=document.querySelectorAll(".links-as-slim-buttons a"),featuredLinks=document.querySelectorAll(".featured-links-article a");linksAsButtons.forEach((e=>{const t=e.textContent,i=document.createRange().createContextualFragment(`<span class="links-as-button-text">${t}</span>`);e.innerHTML="",e.append(i)})),linksAsSlimButtons.forEach((e=>{const t=e.textContent,i=document.createRange().createContextualFragment(`<span class="links-as-button-text">${t}</span>`);e.innerHTML="",e.append(i);const n=document.createRange().createContextualFragment('<svg viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><circle cx="20" cy="20" fill="#ff9e18" r="20"/><path d="m22 12 8 8m0 0-8 8m8-8h-20" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5"/></svg>');e.prepend(n)})),featuredLinks.forEach((e=>{const t=document.createRange().createContextualFragment('<svg viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><circle cx="20" cy="20" fill="#ff9e18" r="20"/><path d="m22 12 8 8m0 0-8 8m8-8h-20" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5"/></svg>');e.append(t)})),$(".accordion__toggle").on("click",(function(){$(this).toggleClass("open"),$(this).parents(".accordion__header").siblings(".accordion__content").slideToggle("fast")}));const header=document.querySelector("#header");if(header){const e=document.querySelectorAll(".header__list li"),t=document.querySelector("#main-menu .main_navigation"),i=document.querySelectorAll("#main-menu b"),n=document.querySelectorAll("#main-menu >ul>li.children"),s=document.querySelectorAll("#main-menu .secondary-navigation li.children");i.forEach((e=>{e.outerHTML=e.textContent})),e.forEach((e=>{e.classList.add("mobile-only");const i=document.createRange().createContextualFragment(`${e.outerHTML}`);t.append(i)})),$(".main_navigation .mobile-only").wrapAll('<li class="mobile-only"><ul></ul></li>'),n.forEach((e=>{const t=document.createRange().createContextualFragment('\n <button class="sub-menu-toggle">\n <svg viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg">\n <circle cx="20" cy="20" fill="#ff6900" r="20"/>\n <path d="m22 12 8 8m0 0-8 8m8-8h-20" fill="none" stroke="#fff"\n stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5"/>\n </svg\n ></button>\n ');e.insertBefore(t,e.lastElementChild)}
5)),s.forEach((e=>{const t=document.createRange().createContextualFragment('\n <button class="sub-menu-toggle">\n <svg class="plus" viewBox="0 0 28 28" xmlns="http://www.w3.org/2000/svg">\n <path d="m14 10v8m4-4h-8m16 0c0 4.29-2.29 8.25-6 10.39s-8.29 2.14-12 0-6-6.11-6-10.39c0-6.63 5.37-12 12-12s12 5.37 12 12z"fill="none" stroke="#007c91" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5"/>\n </svg>\n <svg class="minus " viewBox="0 0 28 28" xmlns="http://www.w3.org/2000/svg"><g stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5"><path d="m14 2c6.63 0 12 5.37 12 12 0 4.29-2.29 8.25-6 10.39s-8.29 2.14-12 0-6-6.11-6-10.39c0-6.63 5.37-12 12-12zm4 12h-8" fill="#007c91" fill-rule="evenodd" stroke="#007c91"/><path d="m18 13.33h-8" fill="none" stroke="#fff"/></g></svg>\n </button>\n ');e.insertBefore(t,e.lastElementChild)}));t.querySelectorAll(":scope >li >.sub-menu-toggle").forEach((e=>{e.addEventListener("click",(function(){this.classList.toggle("active"),this.nextElementSibling.classList.toggle("active")}))}));const o=t.querySelectorAll(":scope .secondary-navigation .sub-menu-toggle");o.forEach((e=>{$(e.nextElementSibling).slideUp()})),o.forEach((e=>{e.addEventListener("click",(function(){this.classList.toggle("active"),$(this).next().slideToggle("fast")}))}));document.querySelectorAll("#main-menu > ul > li > a").forEach((e=>{e?.nextElementSibling?.nextElementSibling.prepend(document.createRange().createContextualFragment(`\n <li>\n <button class="menu-back-button">\n <svg viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg">\n <circle cx="20" cy="20" fill="#ff6900" r="20"/>\n <path d="m22 12 8 8m0 0-8 8m8-8h-20" fill="none" stroke="#fff"\n stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5"/>\n </svg>\n <span>${e.textContent}</span>\n </button>\n </li>`))}));document.querySelectorAll(".menu-back-button").forEach((e=>{e.addEventListener("click",(function(){this.closest("ul").classList.remove("active")}))}))}$(".js-meeting-category-toggler").click((function(){$(this).toggleClass("open"),$(this).siblings(".js-meeting-category-togglee").slideToggle()})),$(".js-meeting-toggle").click((function(){$(this).toggleClass("open"),$(this).parents(".meeting__header").siblings(".js-meeting-togglee").slideToggle(),$(this).parents(".js-meeting").toggleClass("open")})),$(".js-meeting-toggle").mouseenter((function(){$(this).parents(".js-meeting").addClass("hover")})),$(".js-meeting-toggle").mouseleave((function(){$(this).parents(".js-meeting").removeClass("hover")})),$(".js-meetings-openall").click((function(){$(this).parents(".category__actions").siblings(".js-meeting").find(".js-meeting-togglee").slideDown(),$(this).parents(".category__actions").siblings(".js-meeting").find(".js-meeting-toggle").addClass("open"),$(this).parents(".category__actions").siblings(".js-meeting").addClass("open")})),$(".js-meetings-closeall").click((function(){$(this).parents(".category__actions").siblings(".js-meeting").find(".js-meeting-togglee").slideUp(),$(this).parents(".category__actions").siblings(".js-meeting").find(".js-meeting-toggle").removeClass("open"),$(this).parents(".category__actions").siblings(".js-meeting").removeClass("open")}));const jobsSection=document.querySelector(".job-section");if(jobsSection){const e=jobsSection.querySelector(":scope .job .type"),t=document.createRange().createContextualFragment("<b>Type: </b>");e?.prepend(t);const i=jobsSection.querySelector(":scope .job .location"),n=document.createRange().createContextualFragment("<b>Location: </b>");i?.prepend(n);const s=jobsSection.querySelector(':scope .left:has([name="classified_education[0][from_month]"]) label'),o=document.createRange().createContextualFragment("<b>Attended From:</b>");s&&(s.innerHTML="",s.append(o));const a=jobsSection.querySelector(':scope .right:has([name="classified_education[0][to_month]"])> label'),r=document.createRange().createContextualFragment("<b>Attended To:</b>");a&&(a.innerHTML="",a.append(r));document.querySelectorAll(".job-section h3 ~ form input[type=file] ~ .button").forEach((e=>{e?.classList.add("supporting")}))}const shareThisLink=document.querySelector(".share-this-link");if(shareThisLink){let e=shareThisLink.dataset.url?shareThisLink.dataset.url:location;const t=async()=>{try{await navigator.clipboard.writeText(e)}catch(e){shareThisLink.querySelector(":scope span").textContent="Failed To Copy"}};shareThisLink.addEventListener("click",(()=>{t().then((()=>{shareThisLink.querySelector(":scope span").textContent="Copied to ClipBoard"}))}))}
5const projectModalToggle=document.querySelector(".projects-page button.status"),closeProjectModal=document.querySelector(".projects-page button.close-modal"),billStepsTrigger=document.querySelector(".projects-page button.bill-steps-trigger"),alternateBillStepsTrigger=document.querySelector(".projects-page .open-bill-steps"),billStepsModal=document.querySelector(".projects-page dialog .bill-steps"),projectStatusTab=document.querySelector("#project-container dialog"),projectStepsTab=document.querySelector("#project-container .bill-steps"),closeStepsTab=document.querySelector(".close-steps-tab");projectModalToggle?.addEventListener("click",(function(){this.closest("aside").nextElementSibling.showModal()})),closeProjectModal?.addEventListener("click",(function(){projectStatusTab.close(),projectStepsTab.classList.remove("open")})),billStepsTrigger?.addEventListener("click",(function(){billStepsModal.classList.add("open")})),alternateBillStepsTrigger?.addEventListener("click",(function(){projectStatusTab?.showModal(),billStepsModal.classList.add("open")})),closeStepsTab?.addEventListener("click",(function(){projectStepsTab.classList.remove("open")}));const contactViewToggles=document.querySelectorAll(".attached-content-container button");if(contactViewToggles){const e=document.querySelector(".mla-focuses-tab"),t=document.querySelector(".shadow-minister-tab"),i=document.querySelector(".tab-toggles .shadow-minister"),n=document.querySelector(".tab-toggles .mla");contactViewToggles.forEach((s=>{s.addEventListener("click",(s=>{s.target.classList.contains("shadow-minister")&&(t.classList.add("active"),i.classList.add("active"),n.classList.remove("active"),e.classList.remove("active")),s.target.classList.contains("mla")&&(t.classList.remove("active"),i.classList.remove("active"),n.classList.add("active"),e.classList.add("active"))}))}))}
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.