Просмотр файла public/assets/dist/js/vendor.js

Размер файла: 358.52Kb
(self.webpackChunkrotor=self.webpackChunkrotor||[]).push([[531],{197:(e,t,n)=>{"use strict";n.d(t,{lX:()=>Tt});const i=(e,t=1e4)=>(e=parseFloat(e+"")||0,Math.round((e+Number.EPSILON)*t)/t),o=function(e){if(!(e&&e instanceof Element&&e.offsetParent))return!1;const t=e.scrollHeight>e.clientHeight,n=window.getComputedStyle(e).overflowY,i=-1!==n.indexOf("hidden"),o=-1!==n.indexOf("visible");return t&&!i&&!o},s=function(e,t=void 0){return!(!e||e===document.body||t&&e===t)&&(o(e)?e:s(e.parentElement,t))},r=function(e){var t=(new DOMParser).parseFromString(e,"text/html").body;if(t.childElementCount>1){for(var n=document.createElement("div");t.firstChild;)n.appendChild(t.firstChild);return n}return t.firstChild},a=e=>`${e||""}`.split(" ").filter(e=>!!e),l=(e,t,n)=>{e&&a(t).forEach(t=>{e.classList.toggle(t,n||!1)})};class c{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 u={passive:!1};class h{constructor(e,{start:t=()=>!0,move:n=()=>{},end:i=()=>{}}){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=n,this.endCallback=i;for(const e of["onPointerStart","onTouchStart","onMove","onTouchEnd","onPointerEnd","onWindowBlur"])this[e]=this[e].bind(this);this.element.addEventListener("mousedown",this.onPointerStart,u),this.element.addEventListener("touchstart",this.onTouchStart,u),this.element.addEventListener("touchmove",this.onMove,u),this.element.addEventListener("touchend",this.onTouchEnd),this.element.addEventListener("touchcancel",this.onTouchEnd)}onPointerStart(e){if(!e.buttons||0!==e.button)return;const t=new c(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 c(t),e);window.addEventListener("blur",this.onWindowBlur)}onMove(e){const t=this.currentPointers.slice(),n="changedTouches"in e?Array.from(e.changedTouches||[]).map(e=>new c(e)):[new c(e)],i=[];for(const e of n){const t=this.currentPointers.findIndex(t=>t.id===e.id);t<0||(i.push(e),this.currentPointers[t]=e)}i.length&&this.moveCallback(e,this.currentPointers.slice(),t)}onPointerEnd(e){e.buttons>0&&0!==e.button||(this.triggerPointerEnd(e,new c(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 c(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 n=this.currentPointers.findIndex(e=>e.id===t.id);n<0||(this.currentPointers.splice(n,1),this.startPointers.splice(n,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,u),this.element.removeEventListener("touchstart",this.onTouchStart,u),this.element.removeEventListener("touchmove",this.onMove,u),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 d(e,t){return t?Math.sqrt(Math.pow(t.clientX-e.clientX,2)+Math.pow(t.clientY-e.clientY,2)):0}function f(e,t){return t?{clientX:(e.clientX+t.clientX)/2,clientY:(e.clientY+t.clientY)/2}:e}const p=e=>"object"==typeof e&&null!==e&&e.constructor===Object&&"[object Object]"===Object.prototype.toString.call(e),g=(e,...t)=>{const n=t.length;for(let i=0;i<n;i++){const n=t[i]||{};Object.entries(n).forEach(([t,n])=>{const i=Array.isArray(n)?[]:{};e[t]||Object.assign(e,{[t]:i}),p(n)?Object.assign(e[t],g(i,n)):Array.isArray(n)?Object.assign(e,{[t]:[...n]}):Object.assign(e,{[t]:n})})}return e},m=function(e,t){return e.split(".").reduce((e,t)=>"object"==typeof e?e[t]:void 0,t)};class v{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?g({},this.constructor.defaults,e):{};for(const[e,t]of Object.entries(this.option("on")||{}))this.on(e,t)}option(e,...t){let n=m(e,this.options);return n&&"function"==typeof n&&(n=n.call(this,this,...t)),n}optionFor(e,t,n,...i){let o=m(t,e);var s;"string"!=typeof(s=o)||isNaN(s)||isNaN(parseFloat(s))||(o=parseFloat(o)),"true"===o&&(o=!0),"false"===o&&(o=!1),o&&"function"==typeof o&&(o=o.call(this,this,e,...i));let r=m(t,this.options);return r&&"function"==typeof r?o=r.call(this,this,e,...i,o):void 0===o&&(o=r),void 0===o?n:o}cn(e){const t=this.options.classes;return t&&t[e]||""}localize(e,t=[]){e=String(e).replace(/\{\{(\w+).?(\w+)?\}\}/g,(e,t,n)=>{let i="";return n?i=this.option(`${t[0]+t.toLowerCase().substring(1)}.l10n.${n}`):t&&(i=this.option(`l10n.${t}`)),i||(i=e),i});for(let n=0;n<t.length;n++)e=e.split(t[n][0]).join(t[n][1]);return e.replace(/\{\{(.*?)\}\}/g,(e,t)=>t)}on(e,t){let n=[];"string"==typeof e?n=e.split(" "):Array.isArray(e)&&(n=e),this.events||(this.events=new Map),n.forEach(e=>{let n=this.events.get(e);n||(this.events.set(e,[]),n=[]),n.includes(t)||n.push(t),this.events.set(e,n)})}off(e,t){let n=[];"string"==typeof e?n=e.split(" "):Array.isArray(e)&&(n=e),n.forEach(e=>{const n=this.events.get(e);if(Array.isArray(n)){const e=n.indexOf(t);e>-1&&n.splice(e,1)}})}emit(e,...t){[...this.events.get(e)||[]].forEach(e=>e(this,...t)),"*"!==e&&this.emit("*",e,...t)}}Object.defineProperty(v,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.0.36"}),Object.defineProperty(v,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{}});class b extends v{constructor(e={}){super(e),Object.defineProperty(this,"plugins",{enumerable:!0,configurable:!0,writable:!0,value:{}})}attachPlugins(e={}){const t=new Map;for(const[n,i]of Object.entries(e)){const e=this.option(n),o=this.plugins[n];o||!1===e?o&&!1===e&&(o.detach(),delete this.plugins[n]):t.set(n,new i(this,e||{}))}for(const[e,n]of t)this.plugins[e]=n,n.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 y;!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"}(y||(y={}));const w=["a","b","c","d","e","f"],_={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"},x={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:_},E='<circle cx="25" cy="25" r="20"></circle>',C='<div class="f-spinner"><svg viewBox="0 0 50 50">'+E+E+"</svg></div>",S=e=>e&&null!==e&&e instanceof Element&&"nodeType"in e,T=(e,t)=>{e&&a(t).forEach(t=>{e.classList.remove(t)})},k=(e,t)=>{e&&a(t).forEach(t=>{e.classList.add(t)})},A={a:1,b:0,c:0,d:1,e:0,f:0},O=1e4,M="mousemove",P="drag",L="content",D="auto";let I=null,j=null;class N extends b{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===I&&(I=/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)),I}get panMode(){return this.options.panMode!==M||this.isTouchDevice?P:M}get panOnlyZoomed(){const e=this.options.panOnlyZoomed;return e===D?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,n=Math.max(e.height/t.fitHeight,e.width/t.fitWidth)||1;return Math.min(this.fullScale,n)}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 w){const t="e"==e||"f"===e?1e-4:1e-5;if(Math.abs(this.target[e]-this.current[e])>t)return!1}return!(!this.ignoreBounds&&!this.checkBounds().inBounds)}constructor(e,t={},n={}){var i;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:y.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({},A)}),Object.defineProperty(this,"target",{enumerable:!0,configurable:!0,writable:!0,value:Object.assign({},A)}),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({},N.Plugins),n)),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=r(C);!e.contains(o)||o.parentElement instanceof HTMLPictureElement?this.spinner=e.appendChild(t):this.spinner=(null===(i=o.parentElement)||void 0===i?void 0:i.insertBefore(t,o))||null}this.emit("beforeLoad")}else queueMicrotask(()=>{this.enable()})}initContent(){const{container:e}=this,t=this.cn(L);let n=this.option(L)||e.querySelector(`.${t}`);if(n||(n=e.querySelector("img,picture")||e.firstElementChild,n&&k(n,t)),n instanceof HTMLPictureElement&&(n=n.querySelector("img")),!n)throw new Error("No content found");this.content=n}onLoad(){const{spinner:e,container:t,state:n}=this;e&&(e.remove(),this.spinner=null),this.option("spinner")&&t.classList.remove(this.cn("isLoading")),this.emit("afterLoad"),n===y.Init?this.enable():this.updateMetrics()}onError(){this.state!==y.Destroy&&(this.spinner&&(this.spinner.remove(),this.spinner=null),this.stop(),this.detachEvents(),this.state=y.Error,this.emit("error"))}getNextScale(e){const{fullScale:t,targetScale:n,coverScale:i,maxScale:o,minScale:s}=this;let r=s;switch(e){case"toggleMax":r=n-s<.5*(o-s)?o:s;break;case"toggleCover":r=n-s<.5*(i-s)?i:s;break;case"toggleZoom":r=n-s<.5*(t-s)?t:s;break;case"iterateZoom":let e=[1,t,o].sort((e,t)=>e-t),a=e.findIndex(e=>e>n+1e-5);r=e[a]||1}return r}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 h(e,{start:this.onPointerDown,move:this.onPointerMove,end:this.onPointerUp}),document.addEventListener(M,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(M,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 n of w)e?(this.velocity[n]*=1-e,t&&!this.isScaling&&(this.velocity[n]=Math.max(Math.min(this.velocity[n],t),-1*t)),this.current[n]+=this.velocity[n]):this.current[n]=this.target[n];this.setTransform(),this.setEdgeForce(),!this.isResting||this.isDragging?this.rAF=requestAnimationFrame(()=>this.animate()):this.stop("current")}setTargetForce(){for(const e of w)"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:n}=this,i=n.e+e,o=n.f+t,s=this.getBounds(),{x:r,y:a}=s,l=r.min,c=r.max,u=a.min,h=a.max;let d=0,f=0;return l!==1/0&&i<l?d=l-i:c!==1/0&&i>c&&(d=c-i),u!==1/0&&o<u?f=u-o:h!==1/0&&o>h&&(f=h-o),Math.abs(d)<1e-4&&(d=0),Math.abs(f)<1e-4&&(f=0),Object.assign(Object.assign({},s),{xDiff:d,yDiff:f,inBounds:!d&&!f})}clampTargetBounds(){const{target:e}=this,{x:t,y:n}=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)),n.min!==1/0&&(e.f=Math.max(e.f,n.min)),n.max!==1/0&&(e.f=Math.min(e.f,n.max))}calculateContentDim(e=this.current){const{content:t,contentRect:n}=this,{fitWidth:i,fitHeight:o,fullWidth:s,fullHeight:r}=n;let a=s,l=r;if(this.option("zoom")||0!==this.angle){const n=!(t instanceof HTMLImageElement||"none"!==window.getComputedStyle(t).maxWidth&&"none"!==window.getComputedStyle(t).maxHeight),c=n?s:i,u=n?r:o,h=this.getMatrix(e),d=new DOMPoint(0,0).matrixTransform(h),f=new DOMPoint(0+c,0).matrixTransform(h),p=new DOMPoint(0+c,0+u).matrixTransform(h),g=new DOMPoint(0,0+u).matrixTransform(h),m=Math.abs(p.x-d.x),v=Math.abs(p.y-d.y),b=Math.abs(g.x-f.x),y=Math.abs(g.y-f.y);a=Math.max(m,b),l=Math.max(v,y)}return{contentWidth:a,contentHeight:l}}setEdgeForce(){if(this.ignoreBounds||this.isDragging||this.panMode===M||this.targetScale<this.scale)return this.isBouncingX=!1,void(this.isBouncingY=!1);const{target:e}=this,{x:t,y:n,xDiff:i,yDiff:o}=this.checkBounds(),s=this.option("maxVelocity");let r=this.velocity.e,a=this.velocity.f;0!==i?(this.isBouncingX=!0,i*r<=0?r+=.14*i:(r=.14*i,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))),s&&(r=Math.max(Math.min(r,s),-1*s))):this.isBouncingX=!1,0!==o?(this.isBouncingY=!0,o*a<=0?a+=.14*o:(a=.14*o,n.min!==1/0&&(this.target.f=Math.max(e.f,n.min)),n.max!==1/0&&(this.target.f=Math.min(e.f,n.max))),s&&(a=Math.max(Math.min(a,s),-1*s))):this.isBouncingY=!1,this.isBouncingX&&(this.velocity.e=r),this.isBouncingY&&(this.velocity.f=a)}enable(){const{content:e}=this,t=new DOMMatrixReadOnly(window.getComputedStyle(e).transform);for(const e of w)this.current[e]=this.target[e]=t[e];this.updateMetrics(),this.attachObserver(),this.attachEvents(),this.state=y.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 n=e.target;if(!n||e.defaultPrevented)return;if(n.hasAttribute("disabled"))return e.preventDefault(),void e.stopPropagation();if((()=>{const e=window.getSelection();return e&&"Range"===e.type})()&&!n.closest("button"))return;const i=n.closest("[data-panzoom-action]"),o=n.closest("[data-panzoom-change]"),s=i||o,r=s&&S(s)?s.dataset:null;if(r){const t=r.panzoomChange,n=r.panzoomAction;if((t||n)&&e.preventDefault(),t){let n={};try{n=JSON.parse(t)}catch(e){console&&console.warn("The given data was not valid JSON")}return void this.applyChange(n)}if(n)return void(this[n]&&this[n]())}if(Math.abs(this.dragOffset.x)>3||Math.abs(this.dragOffset.y)>3)return e.preventDefault(),void e.stopPropagation();if(n.closest("[data-fancybox]"))return;const a=this.content.getBoundingClientRect(),l=this.dragStart;if(l.time&&!this.canZoomOut()&&(Math.abs(a.x-l.x)>2||Math.abs(a.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}))},u=this.option("click",e),h=this.option("dblClick",e);h?(this.clicks++,1==this.clicks&&(this.clickTimer=setTimeout(()=>{1===this.clicks?(this.emit("click",e),!e.defaultPrevented&&u&&c(u)):(this.emit("dblClick",e),e.defaultPrevented||c(h)),this.clicks=0,this.clickTimer=null},350))):(this.emit("click",e),!e.defaultPrevented&&u&&c(u))}addTrackingPoint(e){const t=this.trackingPoints.filter(e=>e.time>Date.now()-100);t.push(e),this.trackingPoints=t}onPointerDown(e,t,n){var i;if(!1===this.option("touch",e))return!1;this.pwt=0,this.dragOffset={x:0,y:0,time:0},this.trackingPoints=[];const o=this.content.getBoundingClientRect();if(this.dragStart={x:o.x,y:o.y,top:o.top,left:o.left,time:Date.now()},this.clickTimer)return!1;if(this.panMode===M&&this.targetScale>1)return e.preventDefault(),e.stopPropagation(),!1;const s=e.composedPath()[0];if(!n.length){if(["TEXTAREA","OPTION","INPUT","SELECT","VIDEO","IFRAME"].includes(s.nodeName)||s.closest("[contenteditable],[data-selectable],[data-draggable],[data-clickable],[data-panzoom-change],[data-panzoom-action]"))return!1;null===(i=window.getSelection())||void 0===i||i.removeAllRanges()}if("mousedown"===e.type)["A","BUTTON"].includes(s.nodeName)||e.preventDefault();else if(Math.abs(this.velocity.a)>.3)return!1;return this.target.e=this.current.e,this.target.f=this.current.f,this.stop(),this.isDragging||(this.isDragging=!0,this.addTrackingPoint(t),this.emit("touchStart",e)),!0}onPointerMove(e,t,n){if(!1===this.option("touch",e))return;if(!this.isDragging)return;if(t.length<2&&this.panOnlyZoomed&&i(this.targetScale)<=i(this.minScale))return;if(this.emit("touchMove",e),e.defaultPrevented)return;this.addTrackingPoint(t[0]);const{content:o}=this,r=f(n[0],n[1]),a=f(t[0],t[1]);let l=0,c=0;if(t.length>1){const e=o.getBoundingClientRect();l=r.clientX-e.left-.5*e.width,c=r.clientY-e.top-.5*e.height}const u=d(n[0],n[1]),h=d(t[0],t[1]);let p=u?h/u:1,g=a.clientX-r.clientX,m=a.clientY-r.clientY;this.dragOffset.x+=g,this.dragOffset.y+=m,this.dragOffset.time=Date.now()-this.dragStart.time;let v=i(this.targetScale)===i(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,g=0,m=0}else this.lockedAxis=v;if(s(e.target,this.content)&&(v="x",this.dragOffset.y=0),v&&"xy"!==v&&this.lockedAxis!==v&&i(this.targetScale)===i(this.minScale))return;e.cancelable&&e.preventDefault(),this.container.classList.add(this.cn("isDragging"));const b=this.checkBounds(g,m);this.option("rubberband")?("x"!==this.isInfinite&&(b.xDiff>0&&g<0||b.xDiff<0&&g>0)&&(g*=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&&(g=0),b.yDiff&&(m=0));const y=this.targetScale,w=this.minScale,_=this.maxScale;y<.5*w&&(p=Math.max(p,w)),y>1.5*_&&(p=Math.min(p,_)),"y"===this.lockedAxis&&i(y)===i(w)&&(g=0),"x"===this.lockedAxis&&i(y)===i(w)&&(m=0),this.applyChange({originX:l,originY:c,panX:g,panY:m,scale:p,friction:this.option("dragFriction"),ignoreBounds:!0})}onPointerUp(e,t,n){if(n.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=[]),s(e.target,this.content)&&"y"===this.lockedAxis&&(this.trackingPoints=[]),this.emit("touchEnd",e),this.isDragging=!1,this.lockedAxis=!1,this.state!==y.Destroy&&(e.defaultPrevented||this.startDecelAnim()))}startDecelAnim(){var e;const t=this.isScaling;this.rAF&&(cancelAnimationFrame(this.rAF),this.rAF=null),this.isBouncingX=!1,this.isBouncingY=!1;for(const e of w)this.velocity[e]=0;this.target.e=this.current.e,this.target.f=this.current.f,T(this.container,"is-scaling"),T(this.container,"is-animating"),this.isTicking=!1;const{trackingPoints:n}=this,o=n[0],s=n[n.length-1];let r=0,a=0,l=0;s&&o&&(r=s.clientX-o.clientX,a=s.clientY-o.clientY,l=s.time-o.time);const c=(null===(e=window.visualViewport)||void 0===e?void 0:e.scale)||1;1!==c&&(r*=c,a*=c);let u=0,h=0,d=0,f=0,p=this.option("decelFriction");const g=this.targetScale;if(l>0){d=Math.abs(r)>3?r/(l/30):0,f=Math.abs(a)>3?a/(l/30):0;const e=this.option("maxVelocity");e&&(d=Math.max(Math.min(d,e),-1*e),f=Math.max(Math.min(f,e),-1*e))}d&&(u=d/(1/(1-p)-1)),f&&(h=f/(1/(1-p)-1)),("y"===this.option("lockAxis")||"xy"===this.option("lockAxis")&&"y"===this.lockedAxis&&i(g)===this.minScale)&&(u=d=0),("x"===this.option("lockAxis")||"xy"===this.option("lockAxis")&&"x"===this.lockedAxis&&i(g)===this.minScale)&&(h=f=0);const m=this.dragOffset.x,v=this.dragOffset.y,b=this.option("dragMinThreshold")||0;Math.abs(m)<b&&Math.abs(v)<b&&(u=h=0,d=f=0),(this.option("zoom")&&(g<this.minScale-1e-5||g>this.maxScale+1e-5)||t&&!u&&!h)&&(p=.35),this.applyChange({panX:u,panY:h,friction:p}),this.emit("decel",d,f,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 n=Math.max(-1,Math.min(1,t));if(this.emit("wheel",e,n),this.panMode===M)return;if(e.defaultPrevented)return;const i=this.option("wheel");"pan"===i?(e.preventDefault(),this.panOnlyZoomed&&!this.canZoomOut()||this.applyChange({panX:2*-e.deltaX,panY:2*-e.deltaY,bounce:!1})):"zoom"===i&&!1!==this.option("zoom")&&this.zoomWithWheel(e)}onMouseMove(e){this.panWithMouse(e)}onKeydown(e){"Escape"===e.key&&this.toggleFS()}onResize(){this.updateMetrics(),this.checkBounds().inBounds||this.requestTick()}setTransform(){this.emit("beforeTransform");const{current:e,target:t,content:n,contentRect:o}=this,s=Object.assign({},A);for(const n of w){const o="e"==n||"f"===n?O:1e5;s[n]=i(e[n],o),Math.abs(t[n]-e[n])<("e"==n||"f"===n?.51:.001)&&(e[n]=t[n])}let{a:r,b:a,c:l,d:c,e:u,f:h}=s,d=`matrix(${r}, ${a}, ${l}, ${c}, ${u}, ${h})`,f=n.parentElement instanceof HTMLPictureElement?n.parentElement:n;if(this.option("transformParent")&&(f=f.parentElement||f),f.style.transform===d)return;f.style.transform=d;const{contentWidth:p,contentHeight:g}=this.calculateContentDim();o.width=p,o.height=g,this.emit("afterTransform")}updateMetrics(e=!1){var t;if(!this||this.state===y.Destroy)return;if(this.isContentLoading)return;const n=Math.max(1,(null===(t=window.visualViewport)||void 0===t?void 0:t.scale)||1),{container:o,content:s}=this,r=s instanceof HTMLImageElement,a=o.getBoundingClientRect(),l=getComputedStyle(this.container);let c=a.width*n,u=a.height*n;const h=parseFloat(l.paddingTop)+parseFloat(l.paddingBottom),d=c-(parseFloat(l.paddingLeft)+parseFloat(l.paddingRight)),f=u-h;this.containerRect={width:c,height:u,innerWidth:d,innerHeight:f};const p=parseFloat(s.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})(s),g=parseFloat(s.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})(s);let m=this.option("width",p)||D,v=this.option("height",g)||D;const b=m===D,w=v===D;"number"!=typeof m&&(m=p),"number"!=typeof v&&(v=g),b&&(m=p*(v/g)),w&&(v=g/(p/m));let _=s.parentElement instanceof HTMLPictureElement?s.parentElement:s;this.option("transformParent")&&(_=_.parentElement||_);const x=_.getAttribute("style")||"";_.style.setProperty("transform","none","important"),r&&(_.style.width="",_.style.height=""),_.offsetHeight;const E=s.getBoundingClientRect();let C=E.width*n,S=E.height*n,T=C,k=S;C=Math.min(C,m),S=Math.min(S,v),r?({width:C,height:S}=((e,t,n,i)=>{const o=n/e,s=i/t,r=Math.min(o,s);return{width:e*=r,height:t*=r}})(m,v,C,S)):(C=Math.min(C,m),S=Math.min(S,v));let A=.5*(k-S),O=.5*(T-C);this.contentRect=Object.assign(Object.assign({},this.contentRect),{top:E.top-a.top+A,bottom:a.bottom-E.bottom+A,left:E.left-a.left+O,right:a.right-E.right+O,fitWidth:C,fitHeight:S,width:C,height:S,fullWidth:m,fullHeight:v}),_.style.cssText=x,r&&(_.style.width=`${C}px`,_.style.height=`${S}px`),this.setTransform(),!0!==e&&this.emit("refresh"),this.ignoreBounds||(i(this.targetScale)<i(this.minScale)?this.zoomTo(this.minScale,{friction:0}):this.targetScale>this.maxScale?this.zoomTo(this.maxScale,{friction:0}):this.state===y.Init||this.checkBounds().inBounds||this.requestTick()),this.updateControls()}calculateBounds(){const{contentWidth:e,contentHeight:t}=this.calculateContentDim(this.target),{targetScale:n,lockedAxis:o}=this,{fitWidth:s,fitHeight:r}=this.contentRect;let a=0,l=0,c=0,u=0;const h=this.option("infinite");if(!0===h||o&&h===o)a=-1/0,c=1/0,l=-1/0,u=1/0;else{let{containerRect:o,contentRect:h}=this,d=i(s*n,O),f=i(r*n,O),{innerWidth:p,innerHeight:g}=o;if(o.width===d&&(p=o.width),o.width===f&&(g=o.height),e>p){c=.5*(e-p),a=-1*c;let t=.5*(h.right-h.left);a+=t,c+=t}if(s>p&&e<p&&(a-=.5*(s-p),c-=.5*(s-p)),t>g){u=.5*(t-g),l=-1*u;let e=.5*(h.bottom-h.top);l+=e,u+=e}r>g&&t<g&&(a-=.5*(r-g),c-=.5*(r-g))}return{x:{min:a,max:c},y:{min:l,max:u}}}getBounds(){const e=this.option("bounds");return e!==D?e:this.calculateBounds()}updateControls(){const e=this,t=e.container,{panMode:n,contentRect:o,targetScale:s,minScale:r}=e;let a=r,c=e.option("click")||!1;c&&(a=e.getNextScale(c));let u=e.canZoomIn(),h=e.canZoomOut(),d=n===P&&!!this.option("touch"),f=h&&d;if(d&&(i(s)<i(r)&&!this.panOnlyZoomed&&(f=!0),(i(o.width,1)>i(o.fitWidth,1)||i(o.height,1)>i(o.fitHeight,1))&&(f=!0)),i(o.width*s,1)<i(o.fitWidth,1)&&(f=!1),n===M&&(f=!1),l(t,this.cn("isDraggable"),f),!this.option("zoom"))return;let p=u&&i(a)>i(s),g=!p&&!f&&h&&i(a)<i(s);l(t,this.cn("canZoomIn"),p),l(t,this.cn("canZoomOut"),g);for(const e of t.querySelectorAll("[data-panzoom-action]")){let t=!1,n=!1;switch(e.dataset.panzoomAction){case"zoomIn":u?t=!0:n=!0;break;case"zoomOut":h?t=!0:n=!0;break;case"toggleZoom":case"iterateZoom":u||h?t=!0:n=!0;const i=e.querySelector("g");i&&(i.style.display=u?"":"none")}t?(e.removeAttribute("disabled"),e.removeAttribute("tabindex")):n&&(e.setAttribute("disabled",""),e.setAttribute("tabindex","-1"))}}panTo({x:e=this.target.e,y:t=this.target.f,scale:n=this.targetScale,friction:i=this.option("friction"),angle:o=0,originX:s=0,originY:r=0,flipX:a=!1,flipY:l=!1,ignoreBounds:c=!1}){this.state!==y.Destroy&&this.applyChange({panX:e-this.target.e,panY:t-this.target.f,scale:n/this.targetScale,angle:o,originX:s,originY:r,friction:i,flipX:a,flipY:l,ignoreBounds:c})}applyChange({panX:e=0,panY:t=0,scale:n=1,angle:o=0,originX:s=-this.current.e,originY:r=-this.current.f,friction:a=this.option("friction"),flipX:l=!1,flipY:c=!1,ignoreBounds:u=!1,bounce:h=this.option("bounce")}){const d=this.state;if(d===y.Destroy)return;this.rAF&&(cancelAnimationFrame(this.rAF),this.rAF=null),this.friction=a||0,this.ignoreBounds=u;const{current:f}=this,p=f.e,g=f.f,m=this.getMatrix(this.target);let v=(new DOMMatrix).translate(p,g).translate(s,r).translate(e,t);if(this.option("zoom")){if(!u){const e=this.targetScale,t=this.minScale,i=this.maxScale;e*n<t&&(n=t/e),e*n>i&&(n=i/e)}v=v.scale(n)}v=v.translate(-s,-r).translate(-p,-g).multiply(m),o&&(v=v.rotate(o)),l&&(v=v.scale(-1,1)),c&&(v=v.scale(1,-1));for(const e of w)"e"!==e&&"f"!==e&&(v[e]>this.minScale+1e-5||v[e]<this.minScale-1e-5)?this.target[e]=v[e]:this.target[e]=i(v[e],O);(this.targetScale<this.scale||Math.abs(n-1)>.1||this.panMode===M||!1===h)&&!u&&this.clampTargetBounds(),d===y.Init?this.animate():this.isResting||(this.state=y.Panning,this.requestTick())}stop(e=!1){if(this.state===y.Init||this.state===y.Destroy)return;const t=this.isTicking;this.rAF&&(cancelAnimationFrame(this.rAF),this.rAF=null),this.isBouncingX=!1,this.isBouncingY=!1;for(const t of w)this.velocity[t]=0,"current"===e?this.current[t]=this.target[t]:"target"===e&&(this.target[t]=this.current[t]);this.setTransform(),T(this.container,"is-scaling"),T(this.container,"is-animating"),this.isTicking=!1,this.state=y.Ready,t&&(this.emit("endAnimation"),this.updateControls())}requestTick(){this.isTicking||(this.emit("startAnimation"),this.updateControls(),k(this.container,"is-animating"),this.isScaling&&k(this.container,"is-scaling")),this.isTicking=!0,this.rAF||(this.rAF=requestAnimationFrame(()=>this.animate()))}panWithMouse(e,t=this.option("mouseMoveFriction")){if(this.pmme=e,this.panMode!==M||!e)return;if(i(this.targetScale)<=i(this.minScale))return;this.emit("mouseMove",e);const{container:n,containerRect:o,contentRect:s}=this,r=o.width,a=o.height,l=n.getBoundingClientRect(),c=(e.clientX||0)-l.left,u=(e.clientY||0)-l.top;let{contentWidth:h,contentHeight:d}=this.calculateContentDim(this.target);const f=this.option("mouseMoveFactor");f>1&&(h!==r&&(h*=f),d!==a&&(d*=f));let p=.5*(h-r)-c/r*100/100*(h-r);p+=.5*(s.right-s.left);let g=.5*(d-a)-u/a*100/100*(d-a);g+=.5*(s.bottom-s.top),this.applyChange({panX:p-this.target.e,panY:g-this.target.f,friction:t})}zoomWithWheel(e){if(this.state===y.Destroy||this.state===y.Init)return;const t=Date.now();if(t-this.pwt<45)return void e.preventDefault();this.pwt=t;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 o=Math.max(-1,Math.min(1,n)),{targetScale:s,maxScale:r,minScale:a}=this;let l=s*(100+45*o)/100;i(l)<i(a)&&i(s)<=i(a)?(this.cwd+=Math.abs(o),l=a):i(l)>i(r)&&i(s)>=i(r)?(this.cwd+=Math.abs(o),l=r):(this.cwd=0,l=Math.max(Math.min(l,r),a)),this.cwd>this.option("wheelLimit")||(e.preventDefault(),i(l)!==i(s)&&this.zoomTo(l,{event:e}))}canZoomIn(){return this.option("zoom")&&(i(this.contentRect.width,1)<i(this.contentRect.fitWidth,1)||i(this.targetScale)<i(this.maxScale))}canZoomOut(){return this.option("zoom")&&i(this.targetScale)>i(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=D,originX:n=D,originY:i=D,event:o}={}){if(this.isContentLoading||this.state===y.Destroy)return;const{targetScale:s,fullScale:r,maxScale:a,coverScale:l}=this;if(this.stop(),this.panMode===M&&(o=this.pmme||o),o||n===D||i===D){const e=this.content.getBoundingClientRect(),t=this.container.getBoundingClientRect(),s=o?o.clientX:t.left+.5*t.width,r=o?o.clientY:t.top+.5*t.height;n=s-e.left-.5*e.width,i=r-e.top-.5*e.height}let c=1;"number"==typeof e?c=e:"full"===e?c=r:"cover"===e?c=l:"max"===e?c=a:"fit"===e?c=1:"next"===e&&(c=this.getNextScale("iterateZoom")),c=c/s||1,t=t===D?c>1?.15:.25:t,this.applyChange({scale:c,originX:n,originY:i,friction:t}),o&&this.panMode===M&&this.panWithMouse(o,t)}rotateCCW(){this.applyChange({angle:-90})}rotateCW(){this.applyChange({angle:90})}flipX(){this.applyChange({flipX:!0})}flipY(){this.applyChange({flipY:!0})}fitX(){this.stop("target");const{containerRect:e,contentRect:t,target:n}=this;this.applyChange({panX:.5*e.width-(t.left+.5*t.fitWidth)-n.e,panY:.5*e.height-(t.top+.5*t.fitHeight)-n.f,scale:e.width/t.fitWidth/this.targetScale,originX:0,originY:0,ignoreBounds:!0})}fitY(){this.stop("target");const{containerRect:e,contentRect:t,target:n}=this;this.applyChange({panX:.5*e.width-(t.left+.5*t.fitWidth)-n.e,panY:.5*e.innerHeight-(t.top+.5*t.fitHeight)-n.f,scale:e.height/t.fitHeight/this.targetScale,originX:0,originY:0,ignoreBounds:!0})}toggleFS(){const{container:e}=this,t=this.cn("inFullscreen"),n=this.cn("htmlHasFullscreen");e.classList.toggle(t);const i=e.classList.contains(t);i?(document.documentElement.classList.add(n),document.addEventListener("keydown",this.onKeydown,!0)):(document.documentElement.classList.remove(n),document.removeEventListener("keydown",this.onKeydown,!0)),this.updateMetrics(),this.emit(i?"enterFS":"exitFS")}getMatrix(e=this.current){const{a:t,b:n,c:i,d:o,e:s,f:r}=e;return new DOMMatrix([t,n,i,o,s,r])}reset(e){if(this.state!==y.Init&&this.state!==y.Destroy){this.stop("current");for(const e of w)this.target[e]=A[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=y.Panning,this.requestTick())}}destroy(){this.stop(),this.state=y.Destroy,this.detachEvents(),this.detachObserver();const{container:e,content:t}=this,n=this.option("classes")||{};for(const t of Object.values(n))e.classList.remove(t+"");t&&(t.removeEventListener("load",this.onLoad),t.removeEventListener("error",this.onError)),this.detachPlugins()}}Object.defineProperty(N,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:x}),Object.defineProperty(N,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:{}});const R=function(e,t){let n=!0;return(...i)=>{n&&(n=!1,e(...i),setTimeout(()=>{n=!0},t))}},F=(e,t)=>{let n=[];return e.childNodes.forEach(e=>{e.nodeType!==Node.ELEMENT_NODE||t&&!e.matches(t)||n.push(e)}),n};var z;!function(e){e[e.Init=0]="Init",e[e.Ready=1]="Ready",e[e.Destroy=2]="Destroy"}(z||(z={}));const H=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)},$=(e={})=>Object.assign({index:-1,slides:[],dim:0,pos:-1},e);class B extends v{constructor(e,t){super(t),Object.defineProperty(this,"instance",{enumerable:!0,configurable:!0,writable:!0,value:e})}attach(){}detach(){}}class q extends B{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"),k(e,this.cn("list")),e.setAttribute("role","tablist");const t=this.instance.container;t.appendChild(e),k(t,this.cn("hasDots")),this.list=e}return e}refresh(){var e;const t=this.instance.pages.length,n=Math.min(2,this.option("minCount")),i=Math.max(2e3,this.option("maxCount")),o=this.option("dynamicFrom");if(t<n||t>i)return void this.cleanup();const s="number"==typeof o&&t>5&&t>=o,r=!this.list||this.isDynamic!==s||this.list.children.length!==t;r&&this.cleanup();const a=this.build();if(l(a,this.cn("isDynamic"),!!s),r)for(let e=0;e<t;e++)a.append(this.createItem(e));let c,u=0;for(const t of[...a.children]){const n=u===this.instance.page;n&&(c=t),l(t,this.cn("isCurrent"),n),null===(e=t.children[0])||void 0===e||e.setAttribute("aria-selected",n?"true":"false");for(const e of["isBeforePrev","isPrev","isNext","isAfterNext"])T(t,this.cn(e));u++}if(c=c||a.firstChild,s&&c){const e=c.previousElementSibling,t=e&&e.previousElementSibling;k(e,this.cn("isPrev")),k(t,this.cn("isBeforePrev"));const n=c.nextElementSibling,i=n&&n.nextElementSibling;k(n,this.cn("isNext")),k(i,this.cn("isAfterNext"))}this.isDynamic=s}createItem(e=0){var t;const n=document.createElement("li");n.setAttribute("role","presentation");const i=r(this.instance.localize(this.option("dotTpl"),[["%d",e+1]]).replace(/\%i/g,e+""));return n.appendChild(i),null===(t=n.children[0])||void 0===t||t.setAttribute("role","tab"),n}cleanup(){this.list&&(this.list.remove(),this.list=null),this.isDynamic=!1,T(this.instance.container,this.cn("hasDots"))}attach(){this.instance.on(["refresh","change"],this.onRefresh)}detach(){this.instance.off(["refresh","change"],this.onRefresh),this.cleanup()}}Object.defineProperty(q,"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 W="disabled",V="next",X="prev";class Y extends B{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,n=e.page;if(t<2)return void this.cleanup();this.build();let i=this.prev,o=this.next;i&&o&&(i.removeAttribute(W),o.removeAttribute(W),e.isInfinite||(n<=0&&i.setAttribute(W,""),n>=t-1&&o.setAttribute(W,"")))}addBtn(e){var t;const n=this.instance,i=document.createElement("button");i.setAttribute("tabindex","0"),i.setAttribute("title",n.localize(`{{${e.toUpperCase()}}}`)),k(i,this.cn("button")+" "+this.cn(e===V?"isNext":"isPrev"));const o=n.isRTL?e===V?X:V:e;var s;return i.innerHTML=n.localize(this.option(`${o}Tpl`)),i.dataset[`carousel${s=e,s?s.match("^[a-z]")?s.charAt(0).toUpperCase()+s.substring(1):s:""}`]="true",null===(t=this.container)||void 0===t||t.appendChild(i),i}build(){const e=this.instance.container,t=this.cn("container");let{container:n,prev:i,next:o}=this;n||(n=e.querySelector("."+t),this.isDom=!!n),n||(n=document.createElement("div"),k(n,t),e.appendChild(n)),this.container=n,o||(o=n.querySelector("[data-carousel-next]")),o||(o=this.addBtn(V)),this.next=o,i||(i=n.querySelector("[data-carousel-prev]")),i||(i=this.addBtn(X)),this.prev=i}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(Y,"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>',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 U extends B{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===z.Ready?this.onNavReady(e):e.on("ready",this.onNavReady),t.state===z.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,n){this.onNavTouch(e,e.panzoom,n)}onNavTouch(e,t,n){var i,o;if(Math.abs(t.dragOffset.x)>3||Math.abs(t.dragOffset.y)>3)return;const s=n.target,{nav:r,target:a}=this;if(!r||!a||!s)return;const l=s.closest("[data-index]");if(n.stopPropagation(),n.preventDefault(),!l)return;const c=parseInt(l.dataset.index||"",10)||0,u=a.getPageForSlide(c),h=r.getPageForSlide(c);r.slideTo(h),a.slideTo(u,{friction:(null===(o=null===(i=this.nav)||void 0===i?void 0:i.plugins)||void 0===o?void 0:o.Sync.option("friction"))||0}),this.markSelectedSlide(c)}onNavCreateSlide(e,t){t.index===this.selectedIndex&&this.markSelectedSlide(t.index)}onTargetChange(){var e,t;const{target:n,nav:i}=this;if(!n||!i)return;if(i.state!==z.Ready||n.state!==z.Ready)return;const o=null===(t=null===(e=n.pages[n.page])||void 0===e?void 0:e.slides[0])||void 0===t?void 0:t.index,s=i.getPageForSlide(o);this.markSelectedSlide(o),i.slideTo(s,null===i.prevPage&&null===n.prevPage?{friction:0}:void 0)}markSelectedSlide(e){const t=this.nav;t&&t.state===z.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,n=e.options.nav;t?e.addAsNavFor(t):n&&e.addAsTargetFor(n)}detach(){const e=this,t=e.nav,n=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,n&&(n.off("ready",e.onTargetReady),n.off("refresh",e.onTargetChange),n.off("change",e.onTargetChange)),e.target=null}}Object.defineProperty(U,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{friction:.35}});const G={Navigation:Y,Dots:q,Sync:U},Z="animationend",K="isSelected",J="slide";class Q extends b{get axis(){return this.isHorizontal?"e":"f"}get isEnabled(){return this.state===z.Ready}get isInfinite(){let e=!1;const{contentDim:t,viewportDim:n,pages:i,slides:o}=this,s=o[0];return i.length>=2&&s&&t+s.dim>=n&&(e=this.option("infinite")),e}get isRTL(){return"rtl"===this.option("direction")}get isHorizontal(){return"x"===this.option("axis")}constructor(e,t={},n={}){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:z.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||!S(e))throw new Error("No Element found");this.container=e,this.slideNext=R(this.slideNext.bind(this),150),this.slidePrev=R(this.slidePrev.bind(this),150),this.userOptions=t,this.userPlugins=n,queueMicrotask(()=>{this.processOptions()})}processOptions(){var e,t;const n=g({},Q.defaults,this.userOptions);let i="";const o=n.breakpoints;if(o&&p(o))for(const[e,t]of Object.entries(o))window.matchMedia(e).matches&&p(t)&&(i+=e,g(n,t));i===this.bp&&this.state!==z.Init||(this.bp=i,this.state===z.Ready&&(n.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!==z.Init&&this.destroy(),super.setOptions(n),!1===this.option("enabled")?this.attachEvents():setTimeout(()=>{this.init()},0))}init(){this.state=z.Init,this.emit("init"),this.attachPlugins(Object.assign(Object.assign({},Q.Plugins),this.userPlugins)),this.emit("attachPlugins"),this.initLayout(),this.initSlides(),this.updateMetrics(),this.setInitialPosition(),this.initPanzoom(),this.attachEvents(),this.state=z.Ready,this.emit("ready")}initLayout(){const{container:e}=this,t=this.option("classes");k(e,this.cn("container")),l(e,t.isLTR,!this.isRTL),l(e,t.isRTL,this.isRTL),l(e,t.isVertical,!this.isHorizontal),l(e,t.isHorizontal,this.isHorizontal);let n=this.option("viewport")||e.querySelector(`.${t.viewport}`);n||(n=document.createElement("div"),k(n,t.viewport),n.append(...F(e,`.${t.slide}`)),e.prepend(n)),n.addEventListener("scroll",this.onScroll);let i=this.option("track")||e.querySelector(`.${t.track}`);i||(i=document.createElement("div"),k(i,t.track),i.append(...Array.from(n.childNodes))),i.setAttribute("aria-live","polite"),n.contains(i)||n.prepend(i),this.viewport=n,this.track=i,this.emit("initLayout")}initSlides(){const{track:e}=this;if(!e)return;const t=[...this.slides],n=[];[...F(e,`.${this.cn(J)}`)].forEach(e=>{if(S(e)){const t=H({el:e,isDom:!0,index:this.slides.length});n.push(t)}});for(let e of[...this.option("slides",[])||[],...t])n.push(H(e));this.slides=n;for(let e=0;e<this.slides.length;e++)this.slides[e].index=e;for(const e of n)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:n}=this;if(!e||!t.length)return;let i=this.page;t[i]||(this.page=i=0);const o=(t[i].pos||0)*(this.isRTL&&n?1:-1),s=n?`${o}px`:"0",r=n?"0":`${o}px`;e.style.transform=`translate3d(${s}, ${r}, 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 N(this.viewport,g({},{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,...n)=>{this.emit(`Panzoom.${t}`,e,...n)}),this.panzoom.on("decel",this.onDecel),this.panzoom.on("refresh",this.onRefresh),this.panzoom.on("beforeTransform",this.onBeforeTransform),this.panzoom.on("endAnimation",this.onEndAnimation)}attachEvents(){const e=this.container;e&&(e.addEventListener("click",this.onClick,{passive:!1,capture:!1}),e.addEventListener("slideTo",this.onSlideTo)),window.addEventListener("resize",this.onResize)}createPages(){let e=[];const{contentDim:t,viewportDim:n}=this;let i=this.option("slidesPerPage");i=("auto"===i||t<=n)&&!1!==this.option("fill")?1/0:parseFloat(i+"");let o=0,s=0,r=0;for(const t of this.slides)(!e.length||s+t.dim-n>.05||r>=i)&&(e.push($()),o=e.length-1,s=0,r=0),e[o].slides.push(t),s+=t.dim+t.gap,r++;return e}processPages(){const e=this.pages,{contentDim:t,viewportDim:n,isInfinite:o}=this,s=this.option("center"),r=this.option("fill"),a=r&&s&&t>n&&!o;if(e.forEach((e,i)=>{var o;e.index=i,e.pos=(null===(o=e.slides[0])||void 0===o?void 0:o.pos)||0,e.dim=0;for(const[t,n]of e.slides.entries())e.dim+=n.dim,t<e.slides.length-1&&(e.dim+=n.gap);a&&e.pos+.5*e.dim<.5*n?e.pos=0:a&&e.pos+.5*e.dim>=t-.5*n?e.pos=t-n:s&&(e.pos+=-.5*(n-e.dim))}),e.forEach(e=>{r&&!o&&t>n&&(e.pos=Math.max(e.pos,0),e.pos=Math.min(e.pos,t-n)),e.pos=i(e.pos,1e3),e.dim=i(e.dim,1e3),Math.abs(e.pos)<=.1&&(e.pos=0)}),o)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 n;return e=parseInt((e||0).toString())||0,n=this.isInfinite?(e%t+t)%t:Math.max(Math.min(e,t-1),0),n}getSlideMetrics(e){var t,n;const o=this.isHorizontal?"width":"height";let s=0,r=0,a=e.el;const l=!(!a||a.parentNode);if(a?s=parseFloat(a.dataset[o]||"")||0:(a=document.createElement("div"),a.style.visibility="hidden",(this.track||document.body).prepend(a)),k(a,this.cn(J)+" "+e.class+" "+e.customClass),s)a.style[o]=`${s}px`,a.style["width"===o?"height":"width"]="";else{l&&(this.track||document.body).prepend(a),s=a.getBoundingClientRect()[o]*Math.max(1,(null===(t=window.visualViewport)||void 0===t?void 0:t.scale)||1);let e=a[this.isHorizontal?"offsetWidth":"offsetHeight"];e-1>s&&(s=e)}const c=getComputedStyle(a);return"content-box"===c.boxSizing&&(this.isHorizontal?(s+=parseFloat(c.paddingLeft)||0,s+=parseFloat(c.paddingRight)||0):(s+=parseFloat(c.paddingTop)||0,s+=parseFloat(c.paddingBottom)||0)),r=parseFloat(c[this.isHorizontal?"marginRight":"marginBottom"])||0,l?null===(n=a.parentElement)||void 0===n||n.removeChild(a):e.el||a.remove(),{dim:i(s,1e3),gap:i(r,1e3)}}getBounds(){const{isInfinite:e,isRTL:t,isHorizontal:n,pages:i}=this;let o={min:0,max:0};if(e)o={min:-1/0,max:1/0};else if(i.length){const e=i[0].pos,s=i[i.length-1].pos;o=t&&n?{min:e,max:s}:{min:-1*s,max:-1*e}}return{x:n?o:{min:0,max:0},y:n?{min:0,max:0}:o}}repositionSlides(){let e,{isHorizontal:t,isRTL:n,isInfinite:o,viewport:s,viewportDim:r,contentDim:a,page:l,pages:c,slides:u,panzoom:h}=this,d=0,f=0,p=0,g=0;h?g=-1*h.current[this.axis]:c[l]&&(g=c[l].pos||0),e=t?n?"right":"left":"top",n&&t&&(g*=-1);for(const t of u){const n=t.el;n?("top"===e?(n.style.right="",n.style.left=""):n.style.top="",t.index!==d?n.style[e]=0===f?"":`${i(f,1e3)}px`:n.style[e]="",p+=t.dim+t.gap,d++):f+=t.dim+t.gap}if(o&&p&&s){let n=getComputedStyle(s),o="padding",l=t?"Right":"Bottom",c=parseFloat(n[o+(t?"Left":"Top")]);g-=c,r+=c,r+=parseFloat(n[o+l]);for(const t of u)t.el&&(i(t.pos)<i(r)&&i(t.pos+t.dim+t.gap)<i(g)&&i(g)>i(a-r)&&(t.el.style[e]=`${i(f+p,1e3)}px`),i(t.pos+t.gap)>=i(a-r)&&i(t.pos)>i(g+r)&&i(g)<i(r)&&(t.el.style[e]=`-${i(p,1e3)}px`))}let m,v,b=[...this.inTransition];if(b.length>1&&(m=c[b[0]],v=c[b[1]]),m&&v){let t=0;for(const n of u)n.el?this.inTransition.has(n.index)&&m.slides.indexOf(n)<0&&(n.el.style[e]=`${i(t+(m.pos-v.pos),1e3)}px`):t+=n.dim+n.gap}}createSlideEl(e){const{track:t,slides:n}=this;if(!t||!e)return;if(e.el&&e.el.parentNode)return;const i=e.el||document.createElement("div");k(i,this.cn(J)),k(i,e.class),k(i,e.customClass);const o=e.html;o&&(o instanceof HTMLElement?i.appendChild(o):i.innerHTML=e.html+"");const s=[];n.forEach((e,t)=>{e.el&&s.push(t)});const r=e.index;let a=null;s.length&&(a=n[s.reduce((e,t)=>Math.abs(t-r)<Math.abs(e-r)?t:e)]);const l=a&&a.el&&a.el.parentNode?a.index<e.index?a.el.nextSibling:a.el:null;t.insertBefore(i,t.contains(l)?l:null),e.el=i,this.emit("createSlide",e)}removeSlideEl(e,t=!1){const n=null==e?void 0:e.el;if(!n||!n.parentNode)return;const i=this.cn(K);if(n.classList.contains(i)&&(T(n,i),this.emit("unselectSlide",e)),e.isDom&&!t)return n.removeAttribute("aria-hidden"),n.removeAttribute("data-index"),void(n.style.left="");this.emit("removeSlide",e);const o=new CustomEvent(Z);n.dispatchEvent(o),e.el&&(e.el.remove(),e.el=null)}transitionTo(e=0,t=this.option("transition")){var n,i,o,s;if(!t)return!1;const r=this.page,{pages:a,panzoom:l}=this;e=parseInt((e||0).toString())||0;const c=this.getPageFromIndex(e);if(!l||!a[c]||a.length<2||Math.abs(((null===(i=null===(n=a[r])||void 0===n?void 0:n.slides[0])||void 0===i?void 0:i.dim)||0)-this.viewportDim)>1)return!1;let u=e>r?1:-1;this.isInfinite&&(0===r&&e===a.length-1&&(u=-1),r===a.length-1&&0===e&&(u=1));const h=a[c].pos*(this.isRTL?1:-1);if(r===c&&Math.abs(h-l.target[this.axis])<1)return!1;this.clearTransitions();const d=l.isResting;k(this.container,this.cn("inTransition"));const f=(null===(o=a[r])||void 0===o?void 0:o.slides[0])||null,p=(null===(s=a[c])||void 0===s?void 0:s.slides[0])||null;this.inTransition.add(p.index),this.createSlideEl(p);let g=f.el,m=p.el;d||t===J||(t="fadeFast",g=null);const v=this.isRTL?"next":"prev",b=this.isRTL?"prev":"next";return g&&(this.inTransition.add(f.index),f.transition=t,g.addEventListener(Z,this.onAnimationEnd),g.classList.add(`f-${t}Out`,`to-${u>0?b:v}`)),m&&(p.transition=t,m.addEventListener(Z,this.onAnimationEnd),m.classList.add(`f-${t}In`,`from-${u>0?v:b}`)),l.current[this.axis]=h,l.target[this.axis]=h,l.requestTick(),this.onChange(c),!0}manageSlideVisiblity(){const e=new Set,t=new Set,n=this.getVisibleSlides(parseFloat(this.option("preload",0)+"")||0);for(const i of this.slides)n.has(i)?e.add(i):t.add(i);for(const t of this.inTransition)e.add(this.slides[t]);for(const t of e)this.createSlideEl(t),this.lazyLoadSlide(t);for(const n of t)e.has(n)||this.removeSlideEl(n);this.markSelectedSlides(),this.repositionSlides()}markSelectedSlides(){if(!this.pages[this.page]||!this.pages[this.page].slides)return;const e="aria-hidden";let t=this.cn(K);if(t)for(const n of this.slides){const i=n.el;i&&(i.dataset.index=`${n.index}`,i.classList.contains("f-thumbs__slide")?this.getVisibleSlides(0).has(n)?i.removeAttribute(e):i.setAttribute(e,"true"):this.pages[this.page].slides.includes(n)?(i.classList.contains(t)||(k(i,t),this.emit("selectSlide",n)),i.removeAttribute(e)):(i.classList.contains(t)&&(T(i,t),this.emit("unselectSlide",n)),i.setAttribute(e,"true")))}}flipInfiniteTrack(){const{axis:e,isHorizontal:t,isInfinite:n,isRTL:i,viewportDim:o,contentDim:s}=this,r=this.panzoom;if(!r||!n)return;let a=r.current[e],l=r.target[e]-a,c=0,u=.5*o;i&&t?(a<-u&&(c=-1,a+=s),a>s-u&&(c=1,a-=s)):(a>u&&(c=1,a-=s),a<-s+u&&(c=-1,a+=s)),c&&(r.current[e]=a,r.target[e]=a+l)}lazyLoadImg(e,t){const n=this,i="f-fadeIn",o="is-preloading";let s=!1,a=null;const l=()=>{s||(s=!0,a&&(a.remove(),a=null),T(t,o),t.complete&&(k(t,i),setTimeout(()=>{T(t,i)},350)),this.option("adaptiveHeight")&&e.el&&this.pages[this.page].slides.indexOf(e)>-1&&(n.updateMetrics(),n.setViewportHeight()),this.emit("load",e))};k(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 n=t.parentNode;n&&e.el&&(t.complete?l():s||(a=r(C),n.insertBefore(a,t)))},300)}lazyLoadSlide(e){const t=e&&e.el;if(!t)return;const n=new Set;let i=Array.from(t.querySelectorAll("[data-lazy-src],[data-lazy-srcset]"));t.dataset.lazySrc&&i.push(t),i.map(e=>{e instanceof HTMLImageElement?n.add(e):e instanceof HTMLElement&&e.dataset.lazySrc&&(e.style.backgroundImage=`url('${e.dataset.lazySrc}')`,delete e.dataset.lazySrc)});for(const t of n)this.lazyLoadImg(e,t)}onAnimationEnd(e){var t;const n=e.target,i=n?parseInt(n.dataset.index||"",10)||0:-1,o=this.slides[i],s=e.animationName;if(!n||!o||!s)return;const r=!!this.inTransition.has(i)&&o.transition;r&&s.substring(0,r.length+2)===`f-${r}`&&this.inTransition.delete(i),this.inTransition.size||this.clearTransitions(),i===this.page&&(null===(t=this.panzoom)||void 0===t?void 0:t.isResting)&&this.emit("settle")}onDecel(e,t=0,n=0,i=0,o=0){if(this.option("dragFree"))return void this.setPageFromPosition();const{isRTL:s,isHorizontal:r,axis:a,pages:l}=this,c=l.length,u=Math.abs(Math.atan2(n,t)/(Math.PI/180));let h=0;if(h=u>45&&u<135?r?0:n:r?t:0,!c)return;let d=this.page,f=s&&r?1:-1;const p=e.current[a]*f;let{pageIndex:g}=this.getPageFromPosition(p);Math.abs(h)>5?(l[d].dim<document.documentElement["client"+(this.isHorizontal?"Width":"Height")]-1&&(d=g),d=s&&r?h<0?d-1:d+1:h<0?d+1:d-1):d=0===i&&0===o?d:g,this.slideTo(d,{transition:!1,friction:e.option("decelFriction")})}onClick(e){const t=e.target,n=t&&S(t)?t.dataset:null;let i,o;n&&(void 0!==n.carouselPage?(o="slideTo",i=n.carouselPage):void 0!==n.carouselNext?o="slideNext":void 0!==n.carouselPrev&&(o="slidePrev")),o?(e.preventDefault(),e.stopPropagation(),t&&!t.hasAttribute("disabled")&&this[o](i)):this.emit("click",e)}onSlideTo(e){const t=e.detail||0;this.slideTo(this.getPageForSlide(t),{friction:0})}onChange(e,t=0){const n=this.page;this.prevPage=n,this.page=e,this.option("adaptiveHeight")&&this.setViewportHeight(),e!==n&&(this.markSelectedSlides(),this.emit("change",e,n,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=z.Init,this.prevPage=null,this.userOptions=e||this.userOptions,this.userPlugins=t||this.userPlugins,this.processOptions()}slideTo(e=0,{friction:t=this.option("friction"),transition:n=this.option("transition")}={}){if(this.state===z.Destroy)return;e=parseInt((e||0).toString())||0;const i=this.getPageFromIndex(e),{axis:o,isHorizontal:s,isRTL:r,pages:a,panzoom:l}=this,c=a.length,u=r&&s?1:-1;if(!l||!c)return;if(this.page!==i){const t=new Event("beforeChange",{bubbles:!0,cancelable:!0});if(this.emit("beforeChange",t,e),t.defaultPrevented)return}if(this.transitionTo(e,n))return;let h=a[i].pos;if(this.isInfinite){const t=this.contentDim,n=l.target[o]*u;2===c?h+=t*Math.floor(parseFloat(e+"")/2):h=[h,h-t,h+t].reduce(function(e,t){return Math.abs(t-n)<Math.abs(e-n)?t:e})}h*=u,Math.abs(l.target[o]-h)<1||(l.panTo({x:s?h:0,y:s?0:h,friction:t}),this.onChange(i))}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(),T(this.container,this.cn("inTransition"));const e=["to-prev","to-next","from-prev","from-next"];for(const t of this.slides){const n=t.el;if(n){n.removeEventListener(Z,this.onAnimationEnd),n.classList.remove(...e);const i=t.transition;i&&n.classList.remove(`f-${i}Out`,`f-${i}In`)}}this.manageSlideVisiblity()}addSlide(e,t){var n,i,o,s;const r=this.panzoom,a=(null===(n=this.pages[this.page])||void 0===n?void 0:n.pos)||0,l=(null===(i=this.pages[this.page])||void 0===i?void 0:i.dim)||0,c=this.contentDim<this.viewportDim;let u=Array.isArray(t)?t:[t];const h=[];for(const e of u)h.push(H(e));this.slides.splice(e,0,...h);for(let e=0;e<this.slides.length;e++)this.slides[e].index=e;for(const e of h)this.emit("beforeInitSlide",e,e.index);if(this.page>=e&&(this.page+=h.length),this.updateMetrics(),r){const t=(null===(o=this.pages[this.page])||void 0===o?void 0:o.pos)||0,n=(null===(s=this.pages[this.page])||void 0===s?void 0:s.dim)||0,i=this.pages.length||1,u=this.isRTL?l-n:n-l,h=this.isRTL?a-t:t-a;c&&1===i?(e<=this.page&&(r.current[this.axis]-=u,r.target[this.axis]-=u),r.panTo({[this.isHorizontal?"x":"y"]:-1*t})):h&&e<=this.page&&(r.target[this.axis]-=h,r.current[this.axis]-=h,r.requestTick())}for(const e of h)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 n=this.slides[e];if(n){this.removeSlideEl(n,!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}),this.emit("destroySlide",n)}}updateMetrics(){const{panzoom:e,viewport:t,track:n,slides:o,isHorizontal:s,isInfinite:r}=this;if(!n)return;const a=s?"width":"height",l=s?"offsetWidth":"offsetHeight";if(t){let e=Math.max(t[l],i(t.getBoundingClientRect()[a],1e3)),n=getComputedStyle(t),o="padding",r=s?"Right":"Bottom";e-=parseFloat(n[o+(s?"Left":"Top")])+parseFloat(n[o+r]),this.viewportDim=e}let c,u=0;for(const[e,t]of o.entries()){let n=0,s=0;!t.el&&c?(n=c.dim,s=c.gap):(({dim:n,gap:s}=this.getSlideMetrics(t)),c=t),n=i(n,1e3),s=i(s,1e3),t.dim=n,t.gap=s,t.pos=u,u+=n,(r||e<o.length-1)&&(u+=s)}u=i(u,1e3),this.contentDim=u,e&&(e.contentRect[a]=u,e.contentRect[s?"fullWidth":"fullHeight"]=u),this.pages=this.createPages(),this.pages=this.processPages(),this.state===z.Init&&this.setInitialPage(),this.page=Math.max(0,Math.min(this.page,this.pages.length-1)),this.manageSlideVisiblity(),this.emit("refresh")}getProgress(e,t=!1,n=!1){void 0===e&&(e=this.page);const o=this,s=o.panzoom,r=o.contentDim,a=o.pages[e]||0;if(!a||!s)return e>this.page?-1:1;let l=-1*s.current.e,c=i((l-a.pos)/(1*a.dim),1e3),u=c,h=c;this.isInfinite&&!0!==n&&(u=i((l-a.pos+r)/(1*a.dim),1e3),h=i((l-a.pos-r)/(1*a.dim),1e3));let d=[c,u,h].reduce(function(e,t){return Math.abs(t)<Math.abs(e)?t:e});return t?d:d>1?1:d<-1?-1:d}setViewportHeight(){const{page:e,pages:t,viewport:n,isHorizontal:i}=this;if(!n||!t[e])return;let o=0;i&&this.track&&(this.track.style.height="auto",t[e].slides.forEach(e=>{e.el&&(o=Math.max(o,e.el.offsetHeight))})),n.style.height=o?`${o}px`:""}getPageForSlide(e){for(const t of this.pages)for(const n of t.slides)if(n.index===e)return t.index;return-1}getVisibleSlides(e=0){var t;const n=new Set;let{panzoom:i,contentDim:o,viewportDim:s,pages:r,page:a}=this;if(s){o=o+(null===(t=this.slides[this.slides.length-1])||void 0===t?void 0:t.gap)||0;let l=0;l=i&&i.state!==y.Init&&i.state!==y.Destroy?-1*i.current[this.axis]:r[a]&&r[a].pos||0,this.isInfinite&&(l-=Math.floor(l/o)*o),this.isRTL&&this.isHorizontal&&(l*=-1);const c=l-s*e,u=l+s*(e+1),h=this.isInfinite?[-1,0,1]:[0];for(const e of this.slides)for(const t of h){const i=e.pos+t*o,s=i+e.dim+e.gap;i<u&&s>c&&n.add(e)}}return n}getPageFromPosition(e){const{viewportDim:t,contentDim:n,slides:i,pages:o,panzoom:s}=this,r=o.length,a=i.length,l=i[0],c=i[a-1],u=this.option("center");let h=0,d=0,f=0,p=void 0===e?-1*((null==s?void 0:s.target[this.axis])||0):e;u&&(p+=.5*t),this.isInfinite?(p<l.pos-.5*c.gap&&(p-=n,f=-1),p>c.pos+c.dim+.5*c.gap&&(p-=n,f=1)):p=Math.max(l.pos||0,Math.min(p,c.pos));let g=c,m=i.find(e=>{const t=e.pos-.5*g.gap,n=e.pos+e.dim+.5*e.gap;return g=e,p>=t&&p<n});return m||(m=c),d=this.getPageForSlide(m.index),h=d+f*r,{page:h,pageIndex:d}}setPageFromPosition(){const{pageIndex:e}=this.getPageFromPosition();this.onChange(e)}destroy(){if([z.Destroy].includes(this.state))return;this.state=z.Destroy;const{container:e,viewport:t,track:n,slides:i,panzoom:o}=this,s=this.option("classes");e.removeEventListener("click",this.onClick,{passive:!1,capture:!1}),e.removeEventListener("slideTo",this.onSlideTo),window.removeEventListener("resize",this.onResize),o&&(o.destroy(),this.panzoom=null),i&&i.forEach(e=>{this.removeSlideEl(e)}),this.detachPlugins(),t&&(t.removeEventListener("scroll",this.onScroll),t.offsetParent&&n&&n.offsetParent&&t.replaceWith(...n.childNodes));for(const[t,n]of Object.entries(s))"container"!==t&&n&&e.classList.remove(n);this.track=null,this.viewport=null,this.page=0,this.slides=[];const r=this.events.get("ready");this.events=new Map,r&&this.events.set("ready",r)}}Object.defineProperty(Q,"Panzoom",{enumerable:!0,configurable:!0,writable:!0,value:N}),Object.defineProperty(Q,"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(Q,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:G});const ee=function(e){if(!S(e))return 0;const t=window.scrollY,n=window.innerHeight,i=t+n,o=e.getBoundingClientRect(),s=o.y+t,r=o.height,a=s+r;if(t>a||i<s)return 0;if(t<s&&i>a)return 100;if(s<t&&a>i)return 100;let l=r;s<t&&(l-=t-s),a>i&&(l-=a-i);const c=l/n*100;return Math.round(c)},te=!("undefined"==typeof window||!window.document||!window.document.createElement);let ne;const ie=["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(","),oe=e=>{if(e&&te){void 0===ne&&document.createElement("div").focus({get preventScroll(){return ne=!0,!1}});try{if(ne)e.focus({preventScroll:!0});else{const t=window.scrollY||document.body.scrollTop,n=window.scrollX||document.body.scrollLeft;e.focus(),document.body.scrollTo({top:t,left:n,behavior:"auto"})}}catch(e){}}},se=()=>{const e=document;let t,n="",i="",o="";return e.fullscreenEnabled?(n="requestFullscreen",i="exitFullscreen",o="fullscreenElement"):e.webkitFullscreenEnabled&&(n="webkitRequestFullscreen",i="webkitExitFullscreen",o="webkitFullscreenElement"),n&&(t={request:function(t=e.documentElement){return"webkitRequestFullscreen"===n?t[n](Element.ALLOW_KEYBOARD_INPUT):t[n]()},exit:function(){return e[o]&&e[i]()},isFullscreen:function(){return e[o]}}),t},re={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({},_),{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 ae,le;!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"}(ae||(ae={})),function(e){e[e.Loading=0]="Loading",e[e.Opening=1]="Opening",e[e.Ready=2]="Ready",e[e.Closing=3]="Closing"}(le||(le={}));let ce="",ue=!1,he=!1,de=null;const fe=()=>{let e="",t="";const n=Tt.getInstance();if(n){const i=n.carousel,o=n.getSlide();if(i&&o){let s=o.slug||void 0,r=o.triggerEl||void 0;t=s||n.option("slug")||"",!t&&r&&r.dataset&&(t=r.dataset.fancybox||""),t&&"true"!==t&&(e="#"+t+(!s&&i.slides.length>1?"-"+(o.index+1):""))}}return{hash:e,slug:t,index:1}},pe=()=>{const e=new URL(document.URL).hash,t=e.slice(1).split("-"),n=t[t.length-1],i=n&&/^\+?\d+$/.test(n)&&parseInt(t.pop()||"1",10)||1;return{hash:e,slug:t.join("-"),index:i}},ge=()=>{const{slug:e,index:t}=pe();if(!e)return;let n=document.querySelector(`[data-slug="${e}"]`);if(n&&n.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0})),Tt.getInstance())return;const i=document.querySelectorAll(`[data-fancybox="${e}"]`);i.length&&(n=i[t-1],n&&n.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0})))},me=()=>{if(!1===Tt.defaults.Hash)return;const e=Tt.getInstance();if(!1===(null==e?void 0:e.options.Hash))return;const{slug:t,index:n}=pe(),{slug:i}=fe();e&&(t===i?e.jumpTo(n-1):(ue=!0,e.close())),ge()},ve=()=>{de&&clearTimeout(de),queueMicrotask(()=>{me()})},be=()=>{window.addEventListener("hashchange",ve,!1),setTimeout(()=>{me()},500)};te&&(/complete|interactive|loaded/.test(document.readyState)?be():document.addEventListener("DOMContentLoaded",be));const ye="is-zooming-in";class we extends B{onCreateSlide(e,t,n){const i=this.instance.optionFor(n,"src")||"";n.el&&"image"===n.type&&"string"==typeof i&&this.setImage(n,i)}onRemoveSlide(e,t,n){n.panzoom&&n.panzoom.destroy(),n.panzoom=void 0,n.imageEl=void 0}onChange(e,t,n,i){T(this.instance.container,ye);for(const e of t.slides){const t=e.panzoom;t&&e.index!==n&&t.reset(.35)}}onClose(){var e;const t=this.instance,n=t.container,i=t.getSlide();if(!n||!n.parentElement||!i)return;const{el:o,contentEl:s,panzoom:r,thumbElSrc:a}=i;if(!o||!a||!s||!r||r.isContentLoading||r.state===y.Init||r.state===y.Destroy)return;r.updateMetrics();let l=this.getZoomInfo(i);if(!l)return;this.instance.state=ae.CustomClosing,n.classList.remove(ye),n.classList.add("is-zooming-out"),s.style.backgroundImage=`url('${a}')`;const c=n.getBoundingClientRect();1===((null===(e=window.visualViewport)||void 0===e?void 0:e.scale)||1)&&Object.assign(n.style,{position:"absolute",top:`${n.offsetTop+window.scrollY}px`,left:`${n.offsetLeft+window.scrollX}px`,bottom:"auto",right:"auto",width:`${c.width}px`,height:`${c.height}px`,overflow:"hidden"});const{x:u,y:h,scale:d,opacity:f}=l;if(f){const e=((e,t)=>{const n=t-e;return t=>1+((t-e)/n*-1||0)})(r.scale,d);r.on("afterTransform",()=>{s.style.opacity=e(r.scale)+""})}r.on("endAnimation",()=>{t.destroy()}),r.target.a=d,r.target.b=0,r.target.c=0,r.target.d=d,r.panTo({x:u,y:h,scale:d,friction:f?.2:.33,ignoreBounds:!0}),r.isResting&&t.destroy()}setImage(e,t){const n=this.instance;e.src=t,this.process(e,t).then(t=>{const{contentEl:i,imageEl:o,thumbElSrc:s,el:r}=e;if(n.isClosing()||!i||!o)return;i.offsetHeight;const a=!!n.isOpeningSlide(e)&&this.getZoomInfo(e);if(this.option("protected")&&r){r.addEventListener("contextmenu",e=>{e.preventDefault()});const e=document.createElement("div");k(e,"fancybox-protected"),i.appendChild(e)}if(s&&a){const o=t.contentRect,r=Math.max(o.fullWidth,o.fullHeight);let c=null;!a.opacity&&r>1200&&(c=document.createElement("img"),k(c,"fancybox-ghost"),c.src=s,i.appendChild(c));const u=()=>{c&&(k(c,"f-fadeFastOut"),setTimeout(()=>{c&&(c.remove(),c=null)},200))};(l=s,new Promise((e,t)=>{const n=new Image;n.onload=e,n.onerror=t,n.src=l})).then(()=>{n.hideLoading(e),e.state=le.Opening,this.instance.emit("reveal",e),this.zoomIn(e).then(()=>{u(),this.instance.done(e)},()=>{}),c&&setTimeout(()=>{u()},r>2500?800:200)},()=>{n.hideLoading(e),n.revealContent(e)})}else{const i=this.optionFor(e,"initialSize"),o=this.optionFor(e,"zoom"),s={event:n.prevMouseMoveEvent||n.options.event,friction:o?.12:0};let r=n.optionFor(e,"showClass")||void 0,a=!0;n.isOpeningSlide(e)&&("full"===i?t.zoomToFull(s):"cover"===i?t.zoomToCover(s):"max"===i?t.zoomToMax(s):a=!1,t.stop("current")),a&&r&&(r=t.isDragging?"f-fadeIn":""),n.hideLoading(e),n.revealContent(e,r)}var l},()=>{n.setError(e,"{{IMAGE_ERROR}}")})}process(e,t){return new Promise((n,i)=>{var o;const s=this.instance,a=e.el;s.clearContent(e),s.showLoading(e);let l=this.optionFor(e,"content");if("string"==typeof l&&(l=r(l)),!l||!S(l)){if(l=document.createElement("img"),l instanceof HTMLImageElement){let n="",i=e.caption;n="string"==typeof i&&i?i.replace(/<[^>]+>/gi,"").substring(0,1e3):`Image ${e.index+1} of ${(null===(o=s.carousel)||void 0===o?void 0:o.pages.length)||1}`,l.src=t||"",l.alt=n,l.draggable=!1,e.srcset&&l.setAttribute("srcset",e.srcset),this.instance.isOpeningSlide(e)&&(l.fetchPriority="high")}e.sizes&&l.setAttribute("sizes",e.sizes)}k(l,"fancybox-image"),e.imageEl=l,s.setContent(e,l,!1),e.panzoom=new N(a,g({transformParent:!0},this.option("Panzoom")||{},{content:l,width:(t,n)=>s.optionFor(e,"width","auto",n)||"auto",height:(t,n)=>s.optionFor(e,"height","auto",n)||"auto",wheel:()=>{const e=s.option("wheel");return("zoom"===e||"pan"==e)&&e},click:(t,n)=>{var i,o;if(s.isCompact||s.isClosing())return!1;if(e.index!==(null===(i=s.getSlide())||void 0===i?void 0:i.index))return!1;if(n){const e=n.composedPath()[0];if(["A","BUTTON","TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].includes(e.nodeName))return!1}let r=!n||n.target&&(null===(o=e.contentEl)||void 0===o?void 0:o.contains(n.target));return s.option(r?"contentClick":"backdropClick")||!1},dblClick:()=>s.isCompact?"toggleZoom":s.option("contentDblClick")||!1,spinner:!1,panOnlyZoomed:!0,wheelLimit:1/0,on:{ready:e=>{n(e)},error:()=>{i()},destroy:()=>{i()}}}))})}zoomIn(e){return new Promise((t,n)=>{const i=this.instance,o=i.container,{panzoom:s,contentEl:r,el:a}=e;s&&s.updateMetrics();const l=this.getZoomInfo(e);if(!(l&&a&&r&&s&&o))return void n();const{x:c,y:u,scale:h,opacity:d}=l,f=()=>{e.state!==le.Closing&&(d&&(r.style.opacity=Math.max(Math.min(1,1-(1-s.scale)/(1-h)),0)+""),s.scale>=1&&s.scale>s.targetScale-.1&&t(s))},p=e=>{(e.scale<.99||e.scale>1.01)&&!e.isDragging||(T(o,ye),r.style.opacity="",e.off("endAnimation",p),e.off("touchStart",p),e.off("afterTransform",f),t(e))};s.on("endAnimation",p),s.on("touchStart",p),s.on("afterTransform",f),s.on(["error","destroy"],()=>{n()}),s.panTo({x:c,y:u,scale:h,friction:0,ignoreBounds:!0}),s.stop("current");const g={event:"mousemove"===s.panMode?i.prevMouseMoveEvent||i.options.event:void 0},m=this.optionFor(e,"initialSize");k(o,ye),i.hideLoading(e),"full"===m?s.zoomToFull(g):"cover"===m?s.zoomToCover(g):"max"===m?s.zoomToMax(g):s.reset(.172)})}getZoomInfo(e){const{el:t,imageEl:n,thumbEl:i,panzoom:o}=e,s=this.instance,r=s.container;if(!t||!n||!i||!o||ee(i)<3||!this.optionFor(e,"zoom")||!r||s.state===ae.Destroy)return!1;if("0"===getComputedStyle(r).getPropertyValue("--f-images-zoom"))return!1;const a=window.visualViewport||null;if(1!==(a?a.scale:1))return!1;let{top:l,left:c,width:u,height:h}=i.getBoundingClientRect(),{top:d,left:f,fitWidth:p,fitHeight:g}=o.contentRect;if(!(u&&h&&p&&g))return!1;const m=o.container.getBoundingClientRect();f+=m.left,d+=m.top;const v=-1*(f+.5*p-(c+.5*u)),b=-1*(d+.5*g-(l+.5*h)),y=u/p;let w=this.option("zoomOpacity")||!1;return"auto"===w&&(w=Math.abs(u/h-p/g)>.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(we,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{initialSize:"fit",Panzoom:{maxScale:1},protected:!1,zoom:!0,zoomOpacity:"auto"}}),"function"==typeof SuppressedError&&SuppressedError;const _e="html",xe="image",Ee="map",Ce="youtube",Se="vimeo",Te="html5video",ke=(e,t={})=>{const n=new URL(e),i=new URLSearchParams(n.search),o=new URLSearchParams;for(const[e,n]of[...i,...Object.entries(t)]){let t=n+"";if("t"===e){let e=t.match(/((\d*)m)?(\d*)s?/);e&&o.set("start",60*parseInt(e[2]||"0")+parseInt(e[3]||"0")+"")}else o.set(e,t)}let s=o+"",r=e.match(/#t=((.*)?\d+s)/);return r&&(s+=`#t=${r[1]}`),s},Ae=["image","html","ajax","inline","clone","iframe","map","pdf","html5video","youtube","vimeo"];class Oe extends B{onBeforeInitSlide(e,t,n){this.processType(n)}onCreateSlide(e,t,n){this.setContent(n)}onClearContent(e,t){t.xhr&&(t.xhr.abort(),t.xhr=null);const n=t.iframeEl;n&&(n.onload=n.onerror=null,n.src="//about:blank",t.iframeEl=null);const i=t.contentEl,o=t.placeholderEl;if("inline"===t.type&&i&&o)i.classList.remove("fancybox__content"),"none"!==getComputedStyle(i).getPropertyValue("display")&&(i.style.display="none"),setTimeout(()=>{o&&(i&&o.parentNode&&o.parentNode.insertBefore(i,o),o.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,n){n.state===le.Ready&&this.playVideo()}onUnselectSlide(e,t,n){var i,o;if(n.type===Te){try{null===(o=null===(i=n.el)||void 0===i?void 0:i.querySelector("video"))||void 0===o||o.pause()}catch(e){}return}let s;n.type===Se?s={method:"pause",value:"true"}:n.type===Ce&&(s={event:"command",func:"pauseVideo"}),s&&n.iframeEl&&n.iframeEl.contentWindow&&n.iframeEl.contentWindow.postMessage(JSON.stringify(s),"*"),n.poller&&clearTimeout(n.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 n=this.instance,i=new XMLHttpRequest;n.showLoading(e),i.onreadystatechange=function(){i.readyState===XMLHttpRequest.DONE&&n.state===ae.Ready&&(n.hideLoading(e),200===i.status?n.setContent(e,i.responseText):n.setError(e,404===i.status?"{{AJAX_NOT_FOUND}}":"{{AJAX_FORBIDDEN}}"))};const o=e.ajax||null;i.open(o?"POST":"GET",t+""),i.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),i.setRequestHeader("X-Requested-With","XMLHttpRequest"),i.send(o),e.xhr=i}setInlineContent(e){let t=null;if(S(e.src))t=e.src;else if("string"==typeof e.src){const n=e.src.split("#",2).pop();t=n?document.getElementById(n):null}if(t){if("clone"===e.type||t.closest(".fancybox__slide")){t=t.cloneNode(!0);const n=t.dataset.animationName;n&&(t.classList.remove(n),delete t.dataset.animationName);let i=t.getAttribute("id");i=i?`${i}--clone`:`clone-${this.instance.id}-${e.index}`,t.setAttribute("id",i)}else if(t.parentNode){const n=document.createElement("div");n.classList.add("fancybox-placeholder"),t.parentNode.insertBefore(n,t),e.placeholderEl=n}this.instance.setContent(e,t)}else this.instance.setError(e,"{{ELEMENT_NOT_FOUND}}")}setIframeContent(e){const{src:t,el:n}=e;if(!t||"string"!=typeof t||!n)return;n.classList.add("is-loading");const i=this.instance,o=document.createElement("iframe");o.className="fancybox__iframe",o.setAttribute("id",`fancybox__iframe_${i.id}_${e.index}`);for(const[t,n]of Object.entries(this.optionFor(e,"iframeAttr")||{}))o.setAttribute(t,n);o.onerror=()=>{i.setError(e,"{{IFRAME_ERROR}}")},e.iframeEl=o;const s=this.optionFor(e,"preload");if("iframe"!==e.type||!1===s)return o.setAttribute("src",e.src+""),i.setContent(e,o,!1),this.resizeIframe(e),void i.revealContent(e);i.showLoading(e),o.onload=()=>{if(!o.src.length)return;const t="true"!==o.dataset.ready;o.dataset.ready="true",this.resizeIframe(e),t?i.revealContent(e):i.hideLoading(e)},o.setAttribute("src",t),i.setContent(e,o,!1)}resizeIframe(e){const{type:t,iframeEl:n}=e;if(t===Ce||t===Se)return;const i=null==n?void 0:n.parentElement;if(!n||!i)return;let o=e.autoSize;void 0===o&&(o=this.optionFor(e,"autoSize"));let s=e.width||0,r=e.height||0;s&&r&&(o=!1);const a=i&&i.style;if(!1!==e.preload&&!1!==o&&a)try{const e=window.getComputedStyle(i),t=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight),o=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),l=n.contentWindow;if(l){const e=l.document,n=e.getElementsByTagName(_e)[0],i=e.body;a.width="",i.style.overflow="hidden",s=s||n.scrollWidth+t,a.width=`${s}px`,i.style.overflow="",a.flex="0 0 auto",a.height=`${i.scrollHeight}px`,r=n.scrollHeight+o}}catch(e){}if(s||r){const e={flex:"0 1 auto",width:"",height:""};s&&"auto"!==s&&(e.width=`${s}px`),r&&"auto"!==r&&(e.height=`${r}px`),Object.assign(a,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===Te)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!==Ce&&e.type!==Se)return;const n=()=>{if(e.iframeEl&&e.iframeEl.contentWindow){let t;if("true"===e.iframeEl.dataset.ready)return t=e.type===Ce?{event:"command",func:"playVideo"}:{method:"play",value:"true"},t&&e.iframeEl.contentWindow.postMessage(JSON.stringify(t),"*"),void(e.poller=void 0);e.type===Ce&&(t={event:"listening",id:e.iframeEl.getAttribute("id")},e.iframeEl.contentWindow.postMessage(JSON.stringify(t),"*"))}e.poller=setTimeout(n,250)};n()}processType(e){if(e.html)return e.type=_e,e.src=e.html,void(e.html="");const t=this.instance.optionFor(e,"src","");if(!t||"string"!=typeof t)return;let n=e.type,i=null;if(i=t.match(/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(?:watch\?(?:.*&)?v=|v\/|u\/|shorts\/|embed\/?)?(videoseries\?list=(?:.*)|[\w-]{11}|\?listType=(?:.*)&list=(?:.*))(?:.*)/i)){const o=this.optionFor(e,Ce),{nocookie:s}=o,r=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]])}return n}(o,["nocookie"]),a=`www.youtube${s?"-nocookie":""}.com`,l=ke(t,r),c=encodeURIComponent(i[2]);e.videoId=c,e.src=`https://${a}/embed/${c}?${l}`,e.thumbSrc=e.thumbSrc||`https://i.ytimg.com/vi/${c}/mqdefault.jpg`,n=Ce}else if(i=t.match(/^.+vimeo.com\/(?:\/)?([\d]+)((\/|\?h=)([a-z0-9]+))?(.*)?/)){const o=ke(t,this.optionFor(e,Se)),s=encodeURIComponent(i[1]),r=i[4]||"";e.videoId=s,e.src=`https://player.vimeo.com/video/${s}?${r?`h=${r}${o?"&":""}`:""}${o}`,n=Se}if(!n&&e.triggerEl){const t=e.triggerEl.dataset.type;Ae.includes(t)&&(n=t)}n||"string"==typeof t&&("#"===t.charAt(0)?n="inline":(i=t.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i))?(n=Te,e.videoFormat=e.videoFormat||"video/"+("ogv"===i[1]?"ogg":i[1])):t.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)?n=xe:t.match(/\.(pdf)((\?|#).*)?$/i)&&(n="pdf")),(i=t.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:(?:(?:maps\/(?:place\/(?:.*)\/)?\@(.*),(\d+.?\d+?)z))|(?:\?ll=))(.*)?/i))?(e.src=`https://maps.google.${i[1]}/?ll=${(i[2]?i[2]+"&z="+Math.floor(parseFloat(i[3]))+(i[4]?i[4].replace(/^\//,"&"):""):i[4]+"").replace(/\?/,"&")}&output=${i[4]&&i[4].indexOf("layer=c")>0?"svembed":"embed"}`,n=Ee):(i=t.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:maps\/search\/)(.*)/i))&&(e.src=`https://maps.google.${i[1]}/maps?q=${i[2].replace("query=","q=").replace("api=1","")}&output=embed`,n=Ee),n=n||this.instance.option("defaultType"),e.type=n,n===xe&&(e.thumbSrc=e.thumbSrc||e.src)}setContent(e){const t=this.instance.optionFor(e,"src")||"";if(e&&e.type&&t){switch(e.type){case _e:this.instance.setContent(e,t);break;case Te:const n=this.option("videoTpl");n&&this.instance.setContent(e,n.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 Ee:case Ce:case Se:e.preload=!1;case"iframe":this.setIframeContent(e)}this.setAspectRatio(e)}}setAspectRatio(e){const t=e.contentEl;if(!(e.el&&t&&e.type&&[Ce,Se,Te].includes(e.type)))return;let n,i=e.width||"auto",o=e.height||"auto";if("auto"===i||"auto"===o){n=this.optionFor(e,"videoRatio");const t=(n+"").match(/(\d+)\s*\/\s?(\d+)/);n=t&&t.length>2?parseFloat(t[1])/parseFloat(t[2]):parseFloat(n+"")}else i&&o&&(n=i/o);if(!n)return;t.style.aspectRatio="",t.style.width="",t.style.height="",t.offsetHeight;const s=t.getBoundingClientRect(),r=s.width||1,a=s.height||1;t.style.aspectRatio=n+"",n<r/a?(o="auto"===o?a:Math.min(a,o),t.style.width="auto",t.style.height=`${o}px`):(i="auto"===i?r:Math.min(r,i),t.style.width=`${i}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(Oe,"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 Me="play",Pe="pause",Le="ready";class De extends B{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.slideNext():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,n=(null===(e=t.pages[t.page])||void 0===e?void 0:e.slides)||[];let i=this.option("progressParentEl");if(i||(i=(1===n.length?n[0].el:null)||t.viewport),!i)return null;const o=document.createElement("div");return k(o,"f-progress"),i.prepend(o),this.progressBar=o,o.offsetHeight,o}set(){const e=this,t=e.instance;if(t.pages.length<2)return;if(e.timer)return;const n=e.option("timeout");e.state=Me,k(t.container,"has-autoplay");let i=e.createProgressBar();i&&(i.style.transitionDuration=`${n}ms`,i.style.transform="scaleX(1)"),e.timer=setTimeout(()=>{e.timer=null,e.inHover||e.onTimerEnd()},n),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,n=e.instance.container;e.clear(),e.state=Le,n.removeEventListener("mouseenter",e.onMouseEnter,!1),n.removeEventListener("mouseleave",e.onMouseLeave,!1),document.removeEventListener("visibilitychange",e.onVisibilityChange,!1),T(n,"has-autoplay"),t!==Le&&e.emit("stop")}pause(){const e=this;e.state===Me&&(e.state=Pe,e.clear(),e.emit(Pe))}resume(){const e=this,t=e.instance;if(t.isInfinite||t.page!==t.pages.length-1)if(e.state!==Me){if(e.state===Pe&&!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(){this.state===Me||this.state===Pe?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(De,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{autoStart:!0,pauseOnHover:!0,progressParentEl:null,showProgress:!0,timeout:3e3}});class Ie extends B{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 n=e.container;n&&(t.options.Autoplay=g({autoStart:!1},this.option("Autoplay")||{},{pauseOnHover:!1,timeout:this.option("timeout"),progressParentEl:()=>this.option("progressParentEl")||null,on:{start:()=>{e.emit("startSlideshow")},set:t=>{var i;n.classList.add("has-slideshow"),(null===(i=e.getSlide())||void 0===i?void 0:i.state)!==le.Ready&&t.pause()},stop:()=>{n.classList.remove("has-slideshow"),e.isCompact||e.endIdle(),e.emit("endSlideshow")},resume:(t,n)=>{var i,o,s;!n||!n.cancelable||(null===(i=e.getSlide())||void 0===i?void 0:i.state)===le.Ready&&(null===(s=null===(o=e.carousel)||void 0===o?void 0:o.panzoom)||void 0===s?void 0:s.isResting)||n.preventDefault()}}}),t.attachPlugins({Autoplay:De}),this.ref=t.plugins.Autoplay)}onReady(e){const t=e.carousel,n=this.ref;n&&t&&this.option("playOnStart")&&(t.isInfinite||t.page<t.pages.length-1)&&n.start()}onDone(e,t){const n=this.ref,i=e.carousel;if(!n||!i)return;const o=t.panzoom;o&&o.on("startAnimation",()=>{e.isCurrentSlide(t)&&n.stop()}),e.isCurrentSlide(t)&&n.resume()}onKeydown(e,t){var n;const i=this.ref;i&&t===this.option("key")&&"BUTTON"!==(null===(n=document.activeElement)||void 0===n?void 0:n.nodeName)&&i.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(Ie,"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 Ne;!function(e){e[e.Init=0]="Init",e[e.Ready=1]="Ready",e[e.Hidden=2]="Hidden"}(Ne||(Ne={}));const Re="isResting",Fe="thumbWidth",ze="thumbHeight",He="thumbClipWidth";let $e=class extends B{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:Ne.Init})}get isModern(){return"modern"===this.type}onInitSlide(e,t){const n=t.el?t.el.dataset:void 0;n&&(t.thumbSrc=n.thumbSrc||t.thumbSrc||"",t[He]=parseFloat(n[He]||"")||t[He]||0,t[ze]=parseFloat(n.thumbHeight||"")||t[ze]||0),this.addSlide(t)}onInitSlides(){this.build()}onChange(){var e;if(!this.isModern)return;const t=this.container,n=this.instance,i=n.panzoom,o=this.carousel,s=o?o.panzoom:null,r=n.page;if(i&&o&&s){if(i.isDragging){T(t,this.cn(Re));let i=(null===(e=o.pages[r])||void 0===e?void 0:e.pos)||0;i+=n.getProgress(r)*(this[He]+this.thumbGap);let a=s.getBounds();-1*i>a.x.min&&-1*i<a.x.max&&s.panTo({x:-1*i,friction:.12})}else l(t,this.cn(Re),i.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 n=0;for(const e of t.slides||[])e.thumbSrc&&n++;if(n<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=[];for(const t of this.instance.slides||[])e.push(this.getThumb(t));return e}resizeModernSlide(e){this.isModern&&(e[Fe]=e[He]&&e[ze]?Math.round(this[ze]*(e[He]/e[ze])):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[He]=t("clip-width")||40,this[ze]=t("height")||40}build(){const e=this;if(e.state!==Ne.Init)return;if(e.isDisabled())return void e.emit("disabled");const t=e.instance,n=t.container,i=e.getSlides(),o=e.option("type");e.type=o;const s=e.option("parentEl"),r=e.cn("container"),a=e.cn("track");let l=null==s?void 0:s.querySelector("."+r);l||(l=document.createElement("div"),k(l,r),s?s.appendChild(l):n.after(l)),k(l,`is-${o}`),k(n,e.cn("hasThumbs")),e.container=l,e.updateProps();let c=l.querySelector("."+a);c||(c=document.createElement("div"),k(c,e.cn("track")),l.appendChild(c)),e.track=c;const u=g({},{track:c,infinite:!1,center:!0,fill:"classic"===o,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:i}),h=new t.constructor(l,u);h.on("createSlide",(t,n)=>{e.setProps(n.index),e.emit("createSlide",n,n.el)}),h.on("ready",()=>{e.shiftModern(),e.emit("ready")}),h.on("refresh",()=>{e.shiftModern()}),h.on("Panzoom.click",(t,n,i)=>{e.onClick(i)}),e.carousel=h,e.state=Ne.Ready}onClick(e){e.preventDefault(),e.stopPropagation();const t=this.instance,{pages:n,page:i}=t,o=e=>{if(e){const t=e.closest("[data-carousel-index]");if(t)return[parseInt(t.dataset.carouselIndex||"",10)||0,t]}return[-1,void 0]},s=(e,t)=>{const n=document.elementFromPoint(e,t);return n?o(n):[-1,void 0]};let[r,a]=o(e.target);if(r>-1)return;const l=this[He],c=e.clientX,u=e.clientY;let[h,d]=s(c-l,u),[f,p]=s(c+l,u);d&&p?(r=Math.abs(c-d.getBoundingClientRect().right)<Math.abs(c-p.getBoundingClientRect().left)?h:f,r===i&&(r=r===h?f:h)):d?r=h:p&&(r=f),r>-1&&n[r]&&t.slideTo(r)}getShift(e){var t;const n=this,{instance:i}=n,o=n.carousel;if(!i||!o)return 0;const s=n[Fe],r=n[He],a=n.thumbGap,l=n.thumbExtraGap;if(!(null===(t=o.slides[e])||void 0===t?void 0:t.el))return 0;const c=.5*(s-r),u=i.pages.length-1;let h=i.getProgress(0),d=i.getProgress(u),f=i.getProgress(e,!1,!0),p=0,g=c+l+a;const m=h<0&&h>-1,v=d>0&&d<1;return 0===e?(p=g*Math.abs(h),v&&1===h&&(p-=g*Math.abs(d))):e===u?(p=g*Math.abs(d)*-1,m&&-1===d&&(p+=g*Math.abs(h))):m||v?(p=-1*g,p+=g*Math.abs(h),p+=g*(1-Math.abs(d))):p=g*f,p}setProps(e){var t;const n=this;if(!n.isModern)return;const{instance:o}=n,s=n.carousel;if(o&&s){const r=null===(t=s.slides[e])||void 0===t?void 0:t.el;if(r&&r.childNodes.length){let t=i(1-Math.abs(o.getProgress(e))),s=i(n.getShift(e));r.style.setProperty("--progress",t?t+"":""),r.style.setProperty("--shift",s+"")}}}shiftModern(){const e=this;if(!e.isModern)return;const{instance:t,track:n}=e,i=t.panzoom,o=e.carousel;if(!(t&&n&&i&&o))return;if(i.state===y.Init||i.state===y.Destroy)return;for(const n of t.slides)e.setProps(n.index);let s=(e[He]+e.thumbGap)*(o.slides.length||0);n.style.setProperty("--width",s+"")}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=Ne.Init,T(e.instance.container,e.cn("hasThumbs"))}attach(){const e=this,t=e.instance;t.on("initSlide",e.onInitSlide),t.state===z.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}),qe="is-masked",We="aria-hidden";class Ve extends B{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 n,i,o;const s=(null===(o=null===(i=null===(n=this.instance)||void 0===n?void 0:n.carousel)||void 0===i?void 0:i.slides[t.index])||void 0===o?void 0:o.type)||"",r=t.el;if(r&&s){let e=`for-${s}`;["video","youtube","vimeo","html5video"].includes(s)&&(e+=" for-video"),k(r,e)}}onInit(){var e;const t=this,n=t.instance,i=n.carousel;if(t.ref||!i)return;const o=t.option("parentEl")||n.footer||n.container;if(!o)return;const s=g({},t.options,{parentEl:o,classes:{container:"f-thumbs fancybox__thumbs"},Carousel:{Sync:{friction:n.option("Carousel.friction")||0}},on:{ready:e=>{const n=e.container;n&&this.hidden&&(t.refresh(),n.style.transition="none",t.hide(),n.offsetHeight,queueMicrotask(()=>{n.style.transition="",t.show()}))}}});s.Carousel=s.Carousel||{},s.Carousel.on=g((null===(e=t.options.Carousel)||void 0===e?void 0:e.on)||{},{click:this.onClick,createSlide:this.onCreateSlide}),i.options.Thumbs=s,i.attachPlugins({Thumbs:$e}),t.ref=i.plugins.Thumbs,t.option("showOnStart")||(t.ref.state=Ne.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 n=this.option("key");n&&n===t&&this.toggle()}toggle(){const e=this.ref;if(e&&!e.isDisabled())return e.state===Ne.Hidden?(e.state=Ne.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(We),t.classList.remove(qe),this.hidden=!1)}hide(){const e=this.ref,t=e&&e.container;t&&(this.refresh(),t.offsetHeight,t.classList.add(qe),t.setAttribute(We,"true")),this.hidden=!0}refresh(){const e=this.ref;if(!e||!e.state)return;const t=e.container,n=(null==t?void 0:t.firstChild)||null;t&&n&&n.childNodes.length&&(t.style.maxHeight=`${n.getBoundingClientRect().height}px`)}attach(){const e=this,t=e.instance;t.state===ae.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,n=t.instance;n.off("Carousel.init",t.onInit),n.off("resize",t.onResize),n.off("keydown",t.onKeydown),null===(e=n.carousel)||void 0===e||e.detachPlugins(["Thumbs"]),t.ref=null}}Object.defineProperty(Ve,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:Be});const Xe={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 Ye;!function(e){e[e.Init=0]="Init",e[e.Ready=1]="Ready",e[e.Disabled=2]="Disabled"}(Ye||(Ye={}));const Ue={tabindex:"-1",width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Ge="has-toolbar",Ze="fancybox__toolbar";class Ke extends B{constructor(){super(...arguments),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:Ye.Init}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null})}onReady(e){var t;if(!e.carousel)return;let n=this.option("display"),i=this.option("absolute"),o=this.option("enabled");if("auto"===o){const e=this.instance.carousel;let t=0;if(e)for(const n of e.slides)(n.panzoom||"image"===n.type)&&t++;t||(o=!1)}o||(n=void 0);let s=0;const r={left:[],middle:[],right:[]};if(n)for(const e of["left","middle","right"])for(const i of n[e]){const n=this.createEl(i);n&&(null===(t=r[e])||void 0===t||t.push(n),s++)}let a=null;if(s&&(a=this.createContainer()),a){for(const[e,t]of Object.entries(r)){const n=document.createElement("div");k(n,Ze+"__column is-"+e);for(const e of t)n.appendChild(e);"auto"!==i||"middle"!==e||t.length||(i=!0),a.appendChild(n)}!0===i&&k(a,"is-absolute"),this.state=Ye.Ready,this.onRefresh()}else this.state=Ye.Disabled}onClick(e){var t,n;const i=this.instance,o=i.getSlide(),s=null==o?void 0:o.panzoom,r=e.target,a=r&&S(r)?r.dataset:null;if(!a)return;if(void 0!==a.fancyboxToggleThumbs)return e.preventDefault(),e.stopPropagation(),void(null===(t=i.plugins.Thumbs)||void 0===t||t.toggle());if(void 0!==a.fancyboxToggleFullscreen)return e.preventDefault(),e.stopPropagation(),void this.instance.toggleFullscreen();if(void 0!==a.fancyboxToggleSlideshow){e.preventDefault(),e.stopPropagation();const t=null===(n=i.carousel)||void 0===n?void 0:n.plugins.Autoplay;let o=t.isActive;return s&&"mousemove"===s.panMode&&!o&&s.reset(),void(o?t.stop():t.start())}const l=a.panzoomAction,c=a.panzoomChange;if((c||l)&&(e.preventDefault(),e.stopPropagation()),c){let t={};try{t=JSON.parse(c)}catch(e){}s&&s.applyChange(t)}else l&&s&&s[l]&&s[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!==le.Ready)return;const n=t&&!t.error&&t.panzoom;for(const t of e.querySelectorAll("[data-panzoom-action]"))n?(t.removeAttribute("disabled"),t.removeAttribute("tabindex")):(t.setAttribute("disabled",""),t.setAttribute("tabindex","-1"));let i=n&&n.canZoomIn(),o=n&&n.canZoomOut();for(const t of e.querySelectorAll('[data-panzoom-action="zoomIn"]'))i?(t.removeAttribute("disabled"),t.removeAttribute("tabindex")):(t.setAttribute("disabled",""),t.setAttribute("tabindex","-1"));for(const t of e.querySelectorAll('[data-panzoom-action="zoomOut"]'))o?(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"]')){o||i?(t.removeAttribute("disabled"),t.removeAttribute("tabindex")):(t.setAttribute("disabled",""),t.setAttribute("tabindex","-1"));const e=t.querySelector("g");e&&(e.style.display=i?"":"none")}}onDone(e,t){var n;null===(n=t.panzoom)||void 0===n||n.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 n=t.querySelector("."+Ze);return n||(n=document.createElement("div"),k(n,Ze),t.prepend(n)),n.addEventListener("click",this.onClick,{passive:!1,capture:!0}),e&&k(e,Ge),this.container=n,n}createEl(e){const t=this.instance,n=t.carousel;if(!n)return null;if("toggleFS"===e)return null;if("fullscreen"===e&&!se())return null;let i=null;const o=n.slides.length||0;let s=0,a=0;for(const e of n.slides)(e.panzoom||"image"===e.type)&&s++,("image"===e.type||e.downloadSrc)&&a++;if(o<2&&["infobar","prev","next"].includes(e))return i;if(void 0!==Xe[e]&&!s)return null;if("download"===e&&!a)return null;if("thumbs"===e){const e=t.plugins.Thumbs;if(!e||!e.isEnabled)return null}if("slideshow"===e&&(!n.plugins.Autoplay||o<2))return null;if(void 0!==Xe[e]){const t=Xe[e];i=document.createElement("button"),i.setAttribute("title",this.instance.localize(`{{${e.toUpperCase()}}}`)),k(i,"f-button"),t.action&&(i.dataset.panzoomAction=t.action),t.change&&(i.dataset.panzoomChange=JSON.stringify(t.change)),i.appendChild(r(this.instance.localize(t.icon)))}else{const t=(this.option("items")||[])[e];t&&(i=r(this.instance.localize(t.tpl)),"function"==typeof t.click&&i.addEventListener("click",e=>{e.preventDefault(),e.stopPropagation(),"function"==typeof t.click&&t.click.call(this,this,e)}))}const l=null==i?void 0:i.querySelector("svg");if(l)for(const[e,t]of Object.entries(Ue))l.getAttribute(e)||l.setAttribute(e,String(t));return i}removeContainer(){const e=this.container;e&&e.remove(),this.container=null,this.state=Ye.Disabled;const t=this.instance.container;t&&T(t,Ge)}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(Ke,"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><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 Je={Hash:class extends B{onReady(){ue=!1}onChange(e){de&&clearTimeout(de);const{hash:t}=fe(),{hash:n}=pe(),i=e.isOpeningSlide(e.getSlide());i&&(ce=n===t?"":n),t&&t!==n&&(de=setTimeout(()=>{try{if(e.state===ae.Ready){let e="replaceState";i&&!he&&(e="pushState",he=!0),window.history[e]({},document.title,window.location.pathname+window.location.search+t)}}catch(e){}},300))}onClose(e){if(de&&clearTimeout(de),!ue&&he)return he=!1,ue=!1,void window.history.back();if(!ue)try{window.history.replaceState({},document.title,window.location.pathname+window.location.search+(ce||""))}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 pe()}static startFromUrl(){ge()}static destroy(){window.removeEventListener("hashchange",ve,!1)}},Html:Oe,Images:we,Slideshow:Ie,Thumbs:Ve,Toolbar:Ke},Qe="with-fancybox",et="hide-scrollbar",tt="--fancybox-scrollbar-compensate",nt="--fancybox-body-margin",it="aria-hidden",ot="is-using-tab",st="is-animated",rt="is-compact",at="is-loading",lt="is-opening",ct="has-caption",ut="disabled",ht="tabindex",dt="download",ft="href",pt="src",gt=e=>"string"==typeof e,mt=function(){var e=window.getSelection();return!!e&&"Range"===e.type};let vt,bt=null,yt=null,wt=0,_t=0,xt=0,Et=0;const Ct=new Map;let St=0;class Tt extends b{get isIdle(){return this.idle}get isCompact(){return this.option("compact")}constructor(e=[],t={},n={}){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:ae.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}),vt||(vt=se()),this.id=t.id||++St,Ct.set(this.id,this),this.userSlides=e,this.userPlugins=n,queueMicrotask(()=>{this.init()})}init(){if(this.state===ae.Destroy)return;this.state=ae.Init,this.attachPlugins(Object.assign(Object.assign({},Tt.Plugins),this.userPlugins)),this.emit("init"),this.emit("attachPlugins"),!0===this.option("hideScrollbar")&&(()=>{if(!te)return;const e=document,t=e.body,n=e.documentElement;if(t.classList.contains(et))return;let i=window.innerWidth-n.getBoundingClientRect().width;const o=parseFloat(window.getComputedStyle(t).marginRight);i<0&&(i=0),n.style.setProperty(tt,`${i}px`),o&&t.style.setProperty(nt,`${o}px`),t.classList.add(et)})(),this.initLayout(),this.scale();const e=()=>{this.initCarousel(this.userSlides),this.state=ae.Ready,this.attachEvents(),this.emit("ready"),setTimeout(()=>{this.container&&this.container.setAttribute(it,"false")},16)};this.option("Fullscreen.autoStart")&&vt&&!vt.isFullscreen()?vt.request().then(()=>{this.startedFs=!0,e()}).catch(()=>e()):e()}initLayout(){var e,t;const n=this.option("parentEl")||document.body,i=r(this.localize(this.option("tpl.main")||""));if(i){if(i.setAttribute("id",`fancybox-${this.id}`),i.setAttribute("aria-label",this.localize("{{MODAL}}")),i.classList.toggle(rt,this.isCompact),k(i,this.option("mainClass")||""),k(i,lt),this.container=i,this.footer=i.querySelector(".fancybox__footer"),n.appendChild(i),k(document.documentElement,Qe),bt&&yt||(bt=document.createElement("span"),k(bt,"fancybox-focus-guard"),bt.setAttribute(ht,"0"),bt.setAttribute(it,"true"),bt.setAttribute("aria-label","Focus guard"),yt=bt.cloneNode(),null===(e=i.parentElement)||void 0===e||e.insertBefore(bt,i),null===(t=i.parentElement)||void 0===t||t.append(yt)),i.addEventListener("mousedown",e=>{wt=e.pageX,_t=e.pageY,T(i,ot)}),this.option("closeExisting"))for(const e of Ct.values())e.id!==this.id&&e.close();else this.option("animated")&&(k(i,st),setTimeout(()=>{this.isClosing()||T(i,st)},350));this.emit("initLayout")}}initCarousel(e){const t=this.container;if(!t)return;const n=t.querySelector(".fancybox__carousel");if(!n)return;const i=this.carousel=new Q(n,g({},{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")||{}));i.on("*",(e,t,...n)=>{this.emit(`Carousel.${t}`,e,...n)}),i.on(["ready","change"],()=>{this.manageCaption()}),this.on("Carousel.removeSlide",(e,t,n)=>{this.clearContent(n),n.state=void 0}),i.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())}),i.on("settle",()=>{this.idleTimer||this.isCompact||!this.option("idle")||this.setIdle(),this.option("autoFocus")&&!this.isClosing&&this.checkFocus()}),this.option("dragToClose")&&(i.on("Panzoom.afterTransform",(e,t)=>{const n=this.getSlide();if(n&&o(n.el))return;const i=this.container;if(i){const e=Math.abs(t.current.f),n=e<1?"":Math.max(.5,Math.min(1,1-e/t.contentRect.fitHeight*1.5));i.style.setProperty("--fancybox-ts",n?"0s":""),i.style.setProperty("--fancybox-opacity",n+"")}}),i.on("Panzoom.touchEnd",(e,t,n)=>{var i;const s=this.getSlide();if(s&&o(s.el))return;if(t.isMobile&&document.activeElement&&-1!==["TEXTAREA","INPUT"].indexOf(null===(i=document.activeElement)||void 0===i?void 0:i.nodeName))return;const r=Math.abs(t.dragOffset.y);"y"===t.lockedAxis&&(r>=200||r>=50&&t.dragOffset.time<300)&&(n&&n.cancelable&&n.preventDefault(),this.close(n,"f-throwOut"+(t.current.f<0?"Up":"Down")))})),i.on("change",e=>{var t;let n=null===(t=this.getSlide())||void 0===t?void 0:t.triggerEl;if(n){const t=new CustomEvent("slideTo",{bubbles:!0,cancelable:!0,detail:e.page});n.dispatchEvent(t)}}),i.on(["refresh","change"],e=>{const t=this.container;if(!t)return;for(const n of t.querySelectorAll("[data-fancybox-current-index]"))n.innerHTML=e.page+1;for(const n of t.querySelectorAll("[data-fancybox-count]"))n.innerHTML=e.pages.length;if(!e.isInfinite){for(const n of t.querySelectorAll("[data-fancybox-next]"))e.page<e.pages.length-1?(n.removeAttribute(ut),n.removeAttribute(ht)):(n.setAttribute(ut,""),n.setAttribute(ht,"-1"));for(const n of t.querySelectorAll("[data-fancybox-prev]"))e.page>0?(n.removeAttribute(ut),n.removeAttribute(ht)):(n.setAttribute(ut,""),n.setAttribute(ht,"-1"))}const n=this.getSlide();if(!n)return;let i=n.downloadSrc||"";i||"image"!==n.type||n.error||!gt(n[pt])||(i=n[pt]);for(const e of t.querySelectorAll("[data-fancybox-download]")){const t=n.downloadFilename;i?(e.removeAttribute(ut),e.removeAttribute(ht),e.setAttribute(ft,i),e.setAttribute(dt,t||i),e.setAttribute("target","_blank")):(e.setAttribute(ut,""),e.setAttribute(ht,"-1"),e.removeAttribute(ft),e.removeAttribute(dt))}}),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 n=window.visualViewport;n&&(n.addEventListener("scroll",e.onResize),n.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 n=window.visualViewport;n&&(n.removeEventListener("resize",e.onResize),n.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,n=Math.max(1,(null==t?void 0:t.scale)||1);let i="",o="",s="";if(t&&n>1){let e=`${t.offsetLeft}px`,r=`${t.offsetTop}px`;i=t.width*n+"px",o=t.height*n+"px",s=`translate3d(${e}, ${r}, 0) scale(${1/n})`}e.style.transform=s,e.style.width=i,e.style.height=o}onClick(e){var t;const{container:n,isCompact:i}=this;if(!n||this.isClosing())return;!i&&this.option("idle")&&this.resetIdle();const o=e.composedPath()[0];if(o.closest(".fancybox-spinner")||o.closest("[data-fancybox-close]"))return e.preventDefault(),void this.close(e);if(o.closest("[data-fancybox-prev]"))return e.preventDefault(),void this.prev();if(o.closest("[data-fancybox-next]"))return e.preventDefault(),void this.next();if("click"===e.type&&0===e.detail)return;if(Math.abs(e.pageX-wt)>30||Math.abs(e.pageY-_t)>30)return;const s=document.activeElement;if(mt()&&s&&n.contains(s))return;if(i&&"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 r=!1;if(o.closest(".fancybox__content")){if(s){if(s.closest("[contenteditable]"))return;o.matches(ie)||s.blur()}if(mt())return;r=this.option("contentClick")}else o.closest(".fancybox__carousel")&&!o.matches(ie)&&(r=this.option("backdropClick"));"close"===r?(e.preventDefault(),this.close(e)):"next"===r?(e.preventDefault(),this.next()):"prev"===r&&(e.preventDefault(),this.prev())}onWheel(e){const t=e.target;let n=this.option("wheel",e);t.closest(".fancybox__thumbs")&&(n="slide");const i="slide"===n,o=[-e.deltaX||0,-e.deltaY||0,-e.detail||0].reduce(function(e,t){return Math.abs(t)>Math.abs(e)?t:e}),r=Math.max(-1,Math.min(1,o)),a=Date.now();this.pwt&&a-this.pwt<300?i&&e.preventDefault():(this.pwt=a,this.emit("wheel",e,r),e.defaultPrevented||("close"===n?(e.preventDefault(),this.close(e)):"slide"===n&&(s(t)||(e.preventDefault(),this[r>0?"prev":"next"]()))))}onScroll(){window.scrollTo(xt,Et)}onKeydown(e){if(!this.isTopmost())return;this.isCompact||!this.option("idle")||this.isClosing()||this.resetIdle();const t=e.key,n=this.option("keyboard");if(!n)return;const i=e.composedPath()[0],o=document.activeElement&&document.activeElement.classList,s=o&&o.contains("f-button")||i.dataset.carouselPage||i.dataset.carouselIndex;if("Escape"!==t&&!s&&S(i)&&(i.isContentEditable||-1!==["TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].indexOf(i.nodeName)))return;if("Tab"===e.key?k(this.container,ot):T(this.container,ot),e.ctrlKey||e.altKey||e.shiftKey)return;this.emit("keydown",t,e);const r=n[t];r&&"function"==typeof this[r]&&(e.preventDefault(),this[r]())}onResize(){const e=this.container;if(!e)return;const t=this.isCompact;e.classList.toggle(rt,t),this.manageCaption(this.getSlide()),this.isCompact?this.clearIdle():this.endIdle(),this.scale(),this.emit("resize")}onFocus(e){this.isTopmost()&&this.checkFocus(e)}onMousemove(e){this.prevMouseMoveEvent=e,!this.isCompact&&this.option("idle")&&this.resetIdle()}onVisibilityChange(){"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===Ye.Ready)return}if(!t)return;if(!e.contentEl||e.closeBtnEl)return;const n=this.option("tpl.closeButton");if(n){const t=r(this.localize(n));e.closeBtnEl=e.contentEl.appendChild(t),e.el&&k(e.el,"has-close-btn")}}manageCaption(e=void 0){var t,n;const i="fancybox__caption",o=this.container;if(!o)return;T(o,ct);const s=this.isCompact||this.option("commonCaption"),r=!s;if(this.caption&&this.stop(this.caption),r&&this.caption&&(this.caption.remove(),this.caption=null),s&&!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,T(e.el,ct),null===(n=e.el)||void 0===n||n.removeAttribute("aria-labelledby"));if(e||(e=this.getSlide()),!e||s&&!this.isCurrentSlide(e))return;const a=e.el;let l=this.optionFor(e,"caption","");if(!l)return void(s&&this.caption&&this.animate(this.caption,"f-fadeOut",()=>{this.caption&&(this.caption.innerHTML="")}));let c=null;if(r){if(c=e.captionEl||null,a&&!c){const t=i+`_${this.id}_${e.index}`;c=document.createElement("div"),k(c,i),c.setAttribute("id",t),e.captionEl=a.appendChild(c),k(a,ct),a.setAttribute("aria-labelledby",t)}}else c=this.caption,c||(c=o.querySelector("."+i)),c||(c=document.createElement("div"),c.dataset.fancyboxCaption="",k(c,i),(this.footer||o).prepend(c)),k(o,ct),this.caption=c;c&&(c.innerHTML="",gt(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 n=document.activeElement||null,i=(null==e?void 0:e.target)||null,o=this.container,s=null===(t=this.carousel)||void 0===t?void 0:t.viewport;if(!o||!s)return;if(!e&&n&&o.contains(n))return;const r=this.getSlide(),a=r&&r.state===le.Ready?r.el:null;if(!a||a.contains(n)||o===n)return;e&&e.cancelable&&e.preventDefault(),this.ignoreFocusChange=!0;const l=Array.from(o.querySelectorAll(ie));let c=[],u=null;for(let e of l){const t=!e.offsetParent||!!e.closest('[aria-hidden="true"]'),n=a&&a.contains(e),i=!s.contains(e);if(e===o||(n||i)&&!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")&&u||(u=e)}else{const t=void 0===e.dataset.origTabindex?e.getAttribute("tabindex")||"":e.dataset.origTabindex;t&&(e.dataset.origTabindex=t),e.tabIndex=-1}}let h=null;e?(!i||c.indexOf(i)<0)&&(h=u||o,c.length&&(n===yt?h=c[0]:this.lastFocus!==o&&n!==bt||(h=c[c.length-1]))):h=r&&"image"===r.type?o:u||o,h&&oe(h),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=Tt.getInstance())||void 0===e?void 0:e.id)==this.id}animate(e=null,t="",n){if(!e||!t)return void(n&&n());this.stop(e);const i=o=>{o.target===e&&e.dataset.animationName&&(e.removeEventListener("animationend",i),delete e.dataset.animationName,n&&n(),T(e,t))};e.dataset.animationName=t,e.addEventListener("animationend",i),k(e,t)}stop(e){e&&e.dispatchEvent(new CustomEvent("animationend",{bubbles:!1,cancelable:!0,currentTarget:e}))}setContent(e,t="",n=!0){if(this.isClosing())return;const i=e.el;if(!i)return;let o=null;if(S(t)?o=t:(o=r(t+""),S(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}S(o)&&e.filter&&!e.error&&(o=o.querySelector(e.filter)),o&&S(o)?(k(o,"fancybox__content"),e.id&&o.setAttribute("id",e.id),i.classList.add(`has-${e.error?"error":e.type||"unknown"}`),i.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,n&&this.revealContent(e),this.manageCloseBtn(e),this.manageCaption(e)):this.setError(e,"{{ELEMENT_NOT_FOUND}}")}revealContent(e,t){const n=e.el,i=e.contentEl;n&&i&&(this.emit("reveal",e),this.hideLoading(e),e.state=le.Opening,(t=this.isOpeningSlide(e)?void 0===t?this.optionFor(e,"showClass"):t:"f-fadeIn")?this.animate(i,t,()=>{this.done(e)}):this.done(e))}done(e){this.isClosing()||(e.state=le.Ready,this.emit("done",e),k(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)&&(T(this.container,lt),!this.isCompact&&this.option("idle")&&this.setIdle()))}isCurrentSlide(e){const t=this.getSlide();return!(!e||!t)&&t.index===e.index}isOpeningSlide(e){var t,n;return null===(null===(t=this.carousel)||void 0===t?void 0:t.prevPage)&&e&&e.index===(null===(n=this.getSlide())||void 0===n?void 0:n.index)}showLoading(e){e.state=le.Loading;const t=e.el;t&&(k(t,at),this.emit("loading",e),e.spinnerEl||setTimeout(()=>{if(!this.isClosing()&&!e.spinnerEl&&e.state===le.Loading){let n=r(C);k(n,"fancybox-spinner"),e.spinnerEl=n,t.prepend(n),this.animate(n,"f-fadeIn")}},250))}hideLoading(e){const t=e.el;if(!t)return;const n=e.spinnerEl;this.isClosing()?null==n||n.remove():(T(t,at),n&&this.animate(n,"f-fadeOut",()=>{n.remove()}),e.state===le.Loading&&(this.emit("loaded",e),e.state=le.Ready))}setError(e,t){if(this.isClosing())return;const n=new Event("error",{bubbles:!0,cancelable:!0});if(this.emit("error",n,e),n.defaultPrevented)return;e.error=t,this.hideLoading(e),this.clearContent(e);const i=document.createElement("div");i.classList.add("fancybox-error"),i.innerHTML=this.localize(t||"<p>{{ERROR}}</p>"),this.setContent(e,i)}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&&(T(t,"has-error"),T(t,"has-unknown"),T(t,`has-${e.type||"unknown"}`)),e.closeBtnEl&&e.closeBtnEl.remove(),e.closeBtnEl=void 0,e.captionEl&&e.captionEl.remove(),e.captionEl=void 0,e.spinnerEl&&e.spinnerEl.remove(),e.spinnerEl=void 0}getSlide(){var e;const t=this.carousel;return(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 n=new Event("shouldClose",{bubbles:!0,cancelable:!0});if(this.emit("shouldClose",n,e),n.defaultPrevented)return;e&&e.cancelable&&(e.preventDefault(),e.stopPropagation());const i=()=>{this.proceedClose(e,t)};this.startedFs&&vt&&vt.isFullscreen()?Promise.resolve(vt.exit()).then(()=>i()):i()}clearIdle(){this.idleTimer&&clearTimeout(this.idleTimer),this.idleTimer=null}setIdle(e=!1){const t=()=>{this.clearIdle(),this.idle=!0,k(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,T(this.container,"is-idle"),this.emit("endIdle"))}resetIdle(){this.endIdle(),this.setIdle()}toggleIdle(){this.idle?this.endIdle():this.setIdle(!0)}toggleFullscreen(){vt&&(vt.isFullscreen()?vt.exit():vt.request().then(()=>{this.startedFs=!0}))}isClosing(){return[ae.Closing,ae.CustomClosing,ae.Destroy].includes(this.state)}proceedClose(e,t){var n,i;this.state=ae.Closing,this.clearIdle(),this.detachEvents();const o=this.container,s=this.carousel,r=this.getSlide(),a=r&&this.option("placeFocusBack")?r.triggerEl||this.option("triggerEl"):null;if(a&&(ee(a)?oe(a):a.focus()),o&&(T(o,lt),k(o,"is-closing"),o.setAttribute(it,"true"),this.option("animated")&&k(o,st),o.style.pointerEvents="none"),s){s.clearTransitions(),null===(n=s.panzoom)||void 0===n||n.destroy(),null===(i=s.plugins.Navigation)||void 0===i||i.detach();for(const e of s.slides){e.state=le.Closing,this.hideLoading(e);const t=e.contentEl;t&&this.stop(t);const n=null==e?void 0:e.panzoom;n&&(n.stop(),n.detachEvents(),n.detachObserver()),this.isCurrentSlide(e)||s.emit("removeSlide",e)}}xt=window.scrollX,Et=window.scrollY,window.addEventListener("scroll",this.onScroll),this.emit("close",e),this.state!==ae.CustomClosing?(void 0===t&&r&&(t=this.optionFor(r,"hideClass")),t&&r?(this.animate(r.contentEl,t,()=>{s&&s.emit("removeSlide",r)}),setTimeout(()=>{this.destroy()},500)):this.destroy()):setTimeout(()=>{this.destroy()},500)}destroy(){var e;if(this.state===ae.Destroy)return;window.removeEventListener("scroll",this.onScroll),this.state=ae.Destroy,null===(e=this.carousel)||void 0===e||e.destroy();const t=this.container;t&&t.remove(),Ct.delete(this.id);const n=Tt.getInstance();n?n.focus():(bt&&(bt.remove(),bt=null),yt&&(yt.remove(),yt=null),T(document.documentElement,Qe),(()=>{if(!te)return;const e=document,t=e.body;t.classList.remove(et),t.style.setProperty(nt,""),e.documentElement.style.setProperty(tt,"")})(),this.emit("destroy"))}static bind(e,t,n){if(!te)return;let i,o="",s={};if(void 0===e?i=document.body:gt(e)?(i=document.body,o=e,"object"==typeof t&&(s=t||{})):(i=e,gt(t)&&(o=t),"object"==typeof n&&(s=n||{})),!i||!S(i))return;o=o||"[data-fancybox]";const r=Tt.openers.get(i)||new Map;r.set(o,s),Tt.openers.set(i,r),1===r.size&&i.addEventListener("click",Tt.fromEvent)}static unbind(e,t){let n,i="";if(gt(e)?(n=document.body,i=e):(n=e,gt(t)&&(i=t)),!n)return;const o=Tt.openers.get(n);o&&i&&o.delete(i),i&&o||(Tt.openers.delete(n),n.removeEventListener("click",Tt.fromEvent))}static destroy(){let e;for(;e=Tt.getInstance();)e.destroy();for(const e of Tt.openers.keys())e.removeEventListener("click",Tt.fromEvent);Tt.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 n=t.closest("[data-fancybox-trigger]");if(n){const e=n.dataset.fancyboxTrigger||"",i=document.querySelectorAll(`[data-fancybox="${e}"]`),o=parseInt(n.dataset.fancyboxIndex||"",10)||0;t=i[o]||t}if(!(t&&t instanceof Element))return;let i,o,s,r;if([...Tt.openers].reverse().find(([e,n])=>!(!e.contains(t)||![...n].reverse().find(([n,a])=>{let l=t.closest(n);return!!l&&(i=e,o=n,s=l,r=a,!0)}))),!i||!o||!s)return;r=r||{},e.preventDefault(),t=s;let a=[],l=g({},re,r);l.event=e,l.triggerEl=t,l.delegate=n;const c=l.groupAll,u=l.groupAttr,h=u&&t?t.getAttribute(`${u}`):"";if((!t||h||c)&&(a=[].slice.call(i.querySelectorAll(o))),t&&!c&&(a=h?a.filter(e=>e.getAttribute(`${u}`)===h):[t]),!a.length)return;const d=Tt.getInstance();return d&&d.options.triggerEl&&a.indexOf(d.options.triggerEl)>-1?void 0:(t&&(l.startIndex=a.indexOf(t)),Tt.fromNodes(a,l))}static fromSelector(e,t,n){let i=null,o="",s={};if(gt(e)?(i=document.body,o=e,"object"==typeof t&&(s=t||{})):e instanceof HTMLElement&&gt(t)&&(i=e,o=t,"object"==typeof n&&(s=n||{})),!i||!o)return!1;const r=Tt.openers.get(i);return!!r&&(s=g({},r.get(o)||{},s),!!s&&Tt.fromNodes(Array.from(i.querySelectorAll(o)),s))}static fromNodes(e,t){t=g({},re,t||{});const n=[];for(const i of e){const e=i.dataset||{},o=e[pt]||i.getAttribute(ft)||i.getAttribute("currentSrc")||i.getAttribute(pt)||void 0;let s;const r=t.delegate;let a;r&&n.length===t.startIndex&&(s=r instanceof HTMLImageElement?r:r.querySelector("img:not([aria-hidden])")),s||(s=i instanceof HTMLImageElement?i:i.querySelector("img:not([aria-hidden])")),s&&(a=s.currentSrc||s[pt]||void 0,!a&&s.dataset&&(a=s.dataset.lazySrc||s.dataset[pt]||void 0));const l={src:o,triggerEl:i,thumbEl:s,thumbElSrc:a,thumbSrc:a};for(const t in e){let n=e[t]+"";n="false"!==n&&("true"===n||n),l[t]=n}n.push(l)}return new Tt(n,t)}static getInstance(e){return e?Ct.get(e):Array.from(Ct.values()).reverse().find(e=>!e.isClosing()&&e)||null}static getSlide(){var e;return(null===(e=Tt.getInstance())||void 0===e?void 0:e.getSlide())||null}static show(e=[],t={}){return new Tt(e,t)}static next(){const e=Tt.getInstance();e&&e.next()}static prev(){const e=Tt.getInstance();e&&e.prev()}static close(e=!0,...t){if(e)for(const e of Ct.values())e.close(...t);else{const e=Tt.getInstance();e&&e.close(...t)}}}Object.defineProperty(Tt,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.0.36"}),Object.defineProperty(Tt,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:re}),Object.defineProperty(Tt,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:Je}),Object.defineProperty(Tt,"openers",{enumerable:!0,configurable:!0,writable:!0,value:new Map})},371:(e,t,n)=>{var i,o,s;window.jQuery,window.Zepto,o=[n(692)],void 0===(s="function"==typeof(i=function(e){"use strict";var t=function(t,n,i){var o={invalid:[],getCaret:function(){try{var e,n=0,i=t.get(0),s=document.selection,r=i.selectionStart;return s&&-1===navigator.appVersion.indexOf("MSIE 10")?((e=s.createRange()).moveStart("character",-o.val().length),n=e.text.length):(r||"0"===r)&&(n=r),n}catch(e){}},setCaret:function(e){try{if(t.is(":focus")){var n,i=t.get(0);i.setSelectionRange?i.setSelectionRange(e,e):((n=i.createTextRange()).collapse(!0),n.moveEnd("character",e),n.moveStart("character",e),n.select())}}catch(e){}},events:function(){t.on("keydown.mask",function(e){t.data("mask-keycode",e.keyCode||e.which),t.data("mask-previus-value",t.val()),t.data("mask-previus-caret-pos",o.getCaret()),o.maskDigitPosMapOld=o.maskDigitPosMap}).on(e.jMaskGlobals.useInput?"input.mask":"keyup.mask",o.behaviour).on("paste.mask drop.mask",function(){setTimeout(function(){t.keydown().keyup()},100)}).on("change.mask",function(){t.data("changed",!0)}).on("blur.mask",function(){a===o.val()||t.data("changed")||t.trigger("change"),t.data("changed",!1)}).on("blur.mask",function(){a=o.val()}).on("focus.mask",function(t){!0===i.selectOnFocus&&e(t.target).select()}).on("focusout.mask",function(){i.clearIfNotMatch&&!s.test(o.val())&&o.val("")})},getRegexMask:function(){for(var e,t,i,o,s,a,l=[],c=0;c<n.length;c++)(e=r.translation[n.charAt(c)])?(t=e.pattern.toString().replace(/.{1}$|^.{1}/g,""),i=e.optional,(o=e.recursive)?(l.push(n.charAt(c)),s={digit:n.charAt(c),pattern:t}):l.push(i||o?t+"?":t)):l.push(n.charAt(c).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"));return a=l.join(""),s&&(a=a.replace(new RegExp("("+s.digit+"(.*"+s.digit+")?)"),"($1)?").replace(new RegExp(s.digit,"g"),s.pattern)),new RegExp(a)},destroyEvents:function(){t.off(["input","keydown","keyup","paste","drop","blur","focusout",""].join(".mask "))},val:function(e){var n,i=t.is("input")?"val":"text";return arguments.length>0?(t[i]()!==e&&t[i](e),n=t):n=t[i](),n},calculateCaretPosition:function(e){var n=o.getMasked(),i=o.getCaret();if(e!==n){var s=t.data("mask-previus-caret-pos")||0,r=n.length,a=e.length,l=0,c=0,u=0,h=0,d=0;for(d=i;d<r&&o.maskDigitPosMap[d];d++)c++;for(d=i-1;d>=0&&o.maskDigitPosMap[d];d--)l++;for(d=i-1;d>=0;d--)o.maskDigitPosMap[d]&&u++;for(d=s-1;d>=0;d--)o.maskDigitPosMapOld[d]&&h++;if(i>a)i=10*r;else if(s>=i&&s!==a){if(!o.maskDigitPosMapOld[i]){var f=i;i-=h-u,i-=l,o.maskDigitPosMap[i]&&(i=f)}}else i>s&&(i+=u-h,i+=c)}return i},behaviour:function(n){n=n||window.event,o.invalid=[];var i=t.data("mask-keycode");if(-1===e.inArray(i,r.byPassKeys)){var s=o.getMasked(),a=o.getCaret(),l=t.data("mask-previus-value")||"";return setTimeout(function(){o.setCaret(o.calculateCaretPosition(l))},e.jMaskGlobals.keyStrokeCompensation),o.val(s),o.setCaret(a),o.callbacks(n)}},getMasked:function(e,t){var s,a,l,c=[],u=void 0===t?o.val():t+"",h=0,d=n.length,f=0,p=u.length,g=1,m="push",v=-1,b=0,y=[];for(i.reverse?(m="unshift",g=-1,s=0,h=d-1,f=p-1,a=function(){return h>-1&&f>-1}):(s=d-1,a=function(){return h<d&&f<p});a();){var w=n.charAt(h),_=u.charAt(f),x=r.translation[w];x?(_.match(x.pattern)?(c[m](_),x.recursive&&(-1===v?v=h:h===s&&h!==v&&(h=v-g),s===v&&(h-=g)),h+=g):_===l?(b--,l=void 0):x.optional?(h+=g,f-=g):x.fallback?(c[m](x.fallback),h+=g,f-=g):o.invalid.push({p:f,v:_,e:x.pattern}),f+=g):(e||c[m](w),_===w?(y.push(f),f+=g):(l=w,y.push(f+b),b++),h+=g)}var E=n.charAt(s);d!==p+1||r.translation[E]||c.push(E);var C=c.join("");return o.mapMaskdigitPositions(C,y,p),C},mapMaskdigitPositions:function(e,t,n){var s=i.reverse?e.length-n:0;o.maskDigitPosMap={};for(var r=0;r<t.length;r++)o.maskDigitPosMap[t[r]+s]=1},callbacks:function(e){var s=o.val(),r=s!==a,l=[s,e,t,i],c=function(e,t,n){"function"==typeof i[e]&&t&&i[e].apply(this,n)};c("onChange",!0===r,l),c("onKeyPress",!0===r,l),c("onComplete",s.length===n.length,l),c("onInvalid",o.invalid.length>0,[s,e,t,o.invalid,i])}};t=e(t);var s,r=this,a=o.val();n="function"==typeof n?n(o.val(),void 0,t,i):n,r.mask=n,r.options=i,r.remove=function(){var e=o.getCaret();return r.options.placeholder&&t.removeAttr("placeholder"),t.data("mask-maxlength")&&t.removeAttr("maxlength"),o.destroyEvents(),o.val(r.getCleanVal()),o.setCaret(e),t},r.getCleanVal=function(){return o.getMasked(!0)},r.getMaskedVal=function(e){return o.getMasked(!1,e)},r.init=function(a){if(a=a||!1,i=i||{},r.clearIfNotMatch=e.jMaskGlobals.clearIfNotMatch,r.byPassKeys=e.jMaskGlobals.byPassKeys,r.translation=e.extend({},e.jMaskGlobals.translation,i.translation),r=e.extend(!0,{},r,i),s=o.getRegexMask(),a)o.events(),o.val(o.getMasked());else{i.placeholder&&t.attr("placeholder",i.placeholder),t.data("mask")&&t.attr("autocomplete","off");for(var l=0,c=!0;l<n.length;l++){var u=r.translation[n.charAt(l)];if(u&&u.recursive){c=!1;break}}c&&t.attr("maxlength",n.length).data("mask-maxlength",!0),o.destroyEvents(),o.events();var h=o.getCaret();o.val(o.getMasked()),o.setCaret(h)}},r.init(!t.is("input"))};e.maskWatchers={};var n=function(){var n=e(this),o={},s="data-mask-",r=n.attr("data-mask");if(n.attr(s+"reverse")&&(o.reverse=!0),n.attr(s+"clearifnotmatch")&&(o.clearIfNotMatch=!0),"true"===n.attr(s+"selectonfocus")&&(o.selectOnFocus=!0),i(n,r,o))return n.data("mask",new t(this,r,o))},i=function(t,n,i){i=i||{};var o=e(t).data("mask"),s=JSON.stringify,r=e(t).val()||e(t).text();try{return"function"==typeof n&&(n=n(r)),"object"!=typeof o||s(o.options)!==s(i)||o.mask!==n}catch(e){}},o=function(e){var t,n=document.createElement("div");return(t=(e="on"+e)in n)||(n.setAttribute(e,"return;"),t="function"==typeof n[e]),n=null,t};e.fn.mask=function(n,o){o=o||{};var s=this.selector,r=e.jMaskGlobals,a=r.watchInterval,l=o.watchInputs||r.watchInputs,c=function(){if(i(this,n,o))return e(this).data("mask",new t(this,n,o))};return e(this).each(c),s&&""!==s&&l&&(clearInterval(e.maskWatchers[s]),e.maskWatchers[s]=setInterval(function(){e(document).find(s).each(c)},a)),this},e.fn.masked=function(e){return this.data("mask").getMaskedVal(e)},e.fn.unmask=function(){return clearInterval(e.maskWatchers[this.selector]),delete e.maskWatchers[this.selector],this.each(function(){var t=e(this).data("mask");t&&t.remove().removeData("mask")})},e.fn.cleanVal=function(){return this.data("mask").getCleanVal()},e.applyDataMask=function(t){((t=t||e.jMaskGlobals.maskElements)instanceof e?t:e(t)).filter(e.jMaskGlobals.dataMaskAttr).each(n)};var s={maskElements:"input,td,span,div",dataMaskAttr:"*[data-mask]",dataMask:!0,watchInterval:300,watchInputs:!0,keyStrokeCompensation:10,useInput:!/Chrome\/[2-4][0-9]|SamsungBrowser/.test(window.navigator.userAgent)&&o("input"),watchDataMask:!1,byPassKeys:[9,16,17,18,36,37,38,39,40,91],translation:{0:{pattern:/\d/},9:{pattern:/\d/,optional:!0},"#":{pattern:/\d/,recursive:!0},A:{pattern:/[a-zA-Z0-9]/},S:{pattern:/[a-zA-Z]/}}};e.jMaskGlobals=e.jMaskGlobals||{},(s=e.jMaskGlobals=e.extend(!0,{},s,e.jMaskGlobals)).dataMask&&e.applyDataMask(),setInterval(function(){e.jMaskGlobals.watchDataMask&&e.applyDataMask()},s.watchInterval)})?i.apply(t,o):i)||(e.exports=s)},388:(e,t,n)=>{"use strict";n.d(t,{A:()=>M});const i={items:[],allowNew:!1,showAllSuggestions:!1,badgeStyle:"primary",allowClear:!1,clearEnd:!1,selected:[],regex:"",separator:[],max:0,clearLabel:"Clear",searchLabel:"Type a value",showDropIcon:!0,keepOpen:!1,allowSame:!1,baseClass:"",placeholder:"",addOnBlur:!1,showDisabled:!1,hideNativeValidation:!1,suggestionsThreshold:-1,maximumItems:0,autoselectFirst:!0,updateOnSelect:!1,highlightTyped:!1,highlightClass:"",fullWidth:!0,fixed:!1,fuzzy:!1,startsWith:!1,singleBadge:!1,activeClasses:["bg-primary","text-white"],labelField:"label",valueField:"value",searchFields:["label"],queryParam:"query",server:"",serverMethod:"GET",serverParams:{},serverDataKey:"data",fetchOptions:{},liveServer:!1,noCache:!0,allowHtml:!1,debounceTime:300,notFoundMessage:"",inputFilter:e=>e,sanitizer:e=>w(e),onRenderItem:(e,t,n)=>n.config("allowHtml")?t:n.config("sanitizer")(t),onSelectItem:(e,t)=>{},onClearItem:(e,t)=>{},onCreateItem:(e,t)=>{},onBlur:(e,t)=>{},onDataLoaded:(e,t)=>{},onFocus:(e,t)=>{},onCanAdd:(e,t,n)=>{},confirmClear:(e,t)=>Promise.resolve(),confirmAdd:(e,t)=>Promise.resolve(),onServerResponse:(e,t)=>e.json(),onServerError:(e,t,n)=>{"AbortError"===e.name||t.aborted||console.error(e)}},o="tags-",s="is-loading",r="is-active",a="is-invalid",l="is-max-reached",c="show",u="data-value",h="next",d="prev",f="form-control-focus",p="form-placeholder-shown",g="form-control-disabled",m=new WeakMap;let v=0;const b=window.bootstrap&&window.bootstrap.Tooltip;function y(e,t=document.body){const n=A("span");t.appendChild(n),n.style.fontSize="inherit",n.style.height="auto",n.style.width="auto",n.style.position="absolute",n.style.whiteSpace="no-wrap",n.innerHTML=w(`${e}`);const i=Math.ceil(n.clientWidth);return t.removeChild(n),i<=20&&t!==document.body?y(e,document.body):i}function w(e){return e.replace(/[\x26\x0A\<>'"]/g,function(e){return"&#"+e.charCodeAt(0)+";"})}function _(e){return e?function(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}(e.toString()).toLowerCase():""}function x(e,t){if(e.indexOf(t)>=0)return!0;let n=0;for(let i=0;i<t.length;i++){const o=t[i];if(" "!==o&&(n=e.indexOf(o,n)+1,n<=0))return!1}return!0}function E(e){e.style.display="none",S(e,{"aria-hidden":"true"})}function C(e){e.style.display="list-item",S(e,{"aria-hidden":"false"})}function S(e,t){for(const[n,i]of Object.entries(t))e.setAttribute(n,i)}function T(e,t){e.hasAttribute(t)&&e.removeAttribute(t)}function k(e){return["true","false","1","0",!0,!1].includes(e)&&!!JSON.parse(e)}function A(e){return document.createElement(e)}class O{constructor(e,t={}){if(e instanceof HTMLElement){m.set(e,this),v++,this._selectElement=e,this._configure(t),this._isMouse=!1,this._keyboardNavigation=!1,this._searchFunc=function(e,t=300){let n;return(...i)=>{clearTimeout(n),n=setTimeout(()=>{e.apply(this,i)},t)}}(()=>{this._loadFromServer(!0)},this._config.debounceTime),this._fireEvents=!0,this._configureParent(),this._holderElement=A("div"),this._containerElement=A("div"),this._dropElement=A("ul"),this._searchInput=A("input"),this._holderElement.appendChild(this._containerElement),this._selectElement.parentElement.insertBefore(this._holderElement,this._selectElement),this._configureHolderElement(),this._configureContainerElement(),this._configureSelectElement(),this._configureSearchInput(),this._configureDropElement(),this.resetState(),this.handleEvent=e=>{this._handleEvent(e)},this._config.fixed&&(document.addEventListener("scroll",this,!0),window.addEventListener("resize",this)),Array.isArray(this._config.separator)&&(this._config.separator=this._config.separator.filter(e=>e)),"label"!==this._config.labelField&&this._config.searchFields.includes("label")&&1===this._config.searchFields.length&&(this._config.searchFields=[this._config.labelField]);for(const e of["focus","blur","input","keydown","paste"])this._searchInput.addEventListener(e,this);for(const e of["mousemove","mouseleave"])this._dropElement.addEventListener(e,this);this.loadData(!0)}else console.error("Invalid element",e)}static init(e="select[multiple]",t={},n=!1){const i=document.querySelectorAll(e);for(let e=0;e<i.length;e++){const o=O.getInstance(i[e]);o&&!n||(o&&o.dispose(),new O(i[e],t))}}static getInstance(e){if(m.has(e))return m.get(e)}dispose(){for(const e of["focus","blur","input","keydown","paste"])this._searchInput.removeEventListener(e,this);for(const e of["mousemove","mouseleave"])this._dropElement.removeEventListener(e,this);this._config.fixed&&(document.removeEventListener("scroll",this,!0),window.removeEventListener("resize",this)),this._selectElement.style.display="block",this._holderElement.parentElement.removeChild(this._holderElement),this.parentForm&&this.parentForm.removeEventListener("reset",this),m.delete(this._selectElement)}handleEvent(e){this._handleEvent(e)}_handleEvent(e){["scroll","resize"].includes(e.type)?(this._timer&&window.cancelAnimationFrame(this._timer),this._timer=window.requestAnimationFrame(()=>{this[`on${e.type}`](e)})):this[`on${e.type}`](e)}_configure(e={}){this._config=Object.assign({},i,{showDropIcon:!!this._findOption()});const t={...e,...this._selectElement.dataset.config?JSON.parse(this._selectElement.dataset.config):{},...this._selectElement.dataset};for(const[e,n]of Object.entries(i)){if("config"===e||void 0===t[e])continue;const i=t[e];switch(typeof n){case"number":this._config[e]=parseInt(i);break;case"boolean":this._config[e]=k(i);break;case"string":this._config[e]=i.toString();break;case"object":this._config[e]=i,"string"==typeof i&&(["{","["].includes(i[0])?this._config[e]=JSON.parse(i):this._config[e]=i.split(i.includes("|")?"|":","));break;case"function":this._config[e]="string"==typeof i?i.split(".").reduce((e,t)=>e[t],window):i,this._config[e]||console.error("Invalid function",i);break;default:this._config[e]=i}}this._config.placeholder||(this._config.placeholder=this._getPlaceholder()),-1==this._config.suggestionsThreshold&&(this._config.suggestionsThreshold=this._config.liveServer?1:0)}config(e=null){return e?this._config[e]:this._config}setConfig(e,t){this._config[e]=t}_configureParent(){for(this.overflowParent=null,this.parentForm=this._selectElement.parentElement;this.parentForm&&("hidden"===this.parentForm.style.overflow&&(this.overflowParent=this.parentForm),this.parentForm=this.parentForm.parentElement,!this.parentForm||"FORM"!=this.parentForm.nodeName););this.parentForm&&this.parentForm.addEventListener("reset",this)}_getPlaceholder(){if(this._selectElement.hasAttribute("placeholder"))return this._selectElement.getAttribute("placeholder");if(this._selectElement.dataset.placeholder)return this._selectElement.dataset.placeholder;const e=this._selectElement.querySelector("option");return e&&this._config.autoselectFirst?(T(e,"selected"),e.selected=!1,e.value?"":e.textContent):""}_configureSelectElement(){const e=this._selectElement;this._config.hideNativeValidation?(e.style.position="absolute",e.style.left="-9999px"):e.style.cssText="height:1px;width:1px;opacity:0;padding:0;margin:0;border:0;float:left;flex-basis:100%;min-height:unset;",e.tabIndex=-1,e.addEventListener("focus",e=>{this.onclick(e)}),e.addEventListener("invalid",e=>{this._holderElement.classList.add(a)})}_configureDropElement(){const e=this._dropElement;e.classList.add("dropdown-menu",`${o}menu`),e.id=`${o}menu-${v}`,e.setAttribute("role","menu");const t=e.style;t.padding="0",t.maxHeight="280px",this._config.fullWidth||(t.maxWidth="360px"),this._config.fixed&&(t.position="fixed"),t.overflowY="auto",t.overscrollBehavior="contain",t.textAlign="unset",e.addEventListener("mouseenter",e=>{this._keyboardNavigation=!1}),this._holderElement.appendChild(e),this._searchInput.setAttribute("aria-controls",e.id)}_configureHolderElement(){const e=this._holderElement;e.classList.add("form-control","dropdown"),["form-select-lg","form-select-sm","is-invalid","is-valid"].forEach(t=>{this._selectElement.classList.contains(t)&&e.classList.add(t)}),0==this._config.suggestionsThreshold&&this._config.showDropIcon&&e.classList.add("form-select"),this.overflowParent&&(e.style.position="inherit"),e.style.height="auto",e.addEventListener("click",this)}_configureContainerElement(){this._containerElement.addEventListener("click",e=>{this.isDisabled()||"hidden"!==this._searchInput.style.visibility&&this._searchInput.focus()});const e=this._containerElement.style;e.display="flex",e.alignItems="center",e.flexWrap="wrap"}_configureSearchInput(){const e=this._searchInput;e.type="text",e.autocomplete="off",e.spellcheck=!1,S(e,{"aria-autocomplete":"list","aria-haspopup":"menu","aria-expanded":"false","aria-label":this._config.searchLabel,role:"combobox"}),e.style.cssText="background-color:transparent;color:currentColor;border:0;padding:0;outline:0;max-width:100%",this.resetSearchInput(!0),this._containerElement.appendChild(e),this._rtl=""===e.dir&&"rtl"===document.dir||"rtl"===e.dir}onfocus(e){this._holderElement.classList.contains(f)||(this._holderElement.classList.add(f),this.showOrSearch(),this._config.onFocus(e,this))}onblur(e){const t=e.relatedTarget;this._isMouse&&t&&(t.classList.contains("modal")||t.classList.contains(`${o}menu`))?this._searchInput.focus():this.afteronblur(e)}afteronblur(e){this._abortController&&this._abortController.abort();let t=!0;if(this._config.addOnBlur&&this._searchInput.value&&(t=this._enterValue()),this._holderElement.classList.remove(f),this.hideSuggestions(t),this._fireEvents){const t=this.getSelection(),n={selection:t?t.dataset.value:null,input:this._searchInput.value};this._config.onBlur(e,this),this._selectElement.dispatchEvent(new CustomEvent("tags.blur",{bubbles:!0,detail:n}))}}onpaste(e){const t=(e.clipboardData||window.clipboardData).getData("text/plain").replace(/\r\n|\n/g," ");if(t.length>2&&this._config.separator.length){const n=function(e,t){const n=t[0];let i=e;for(let e=1;e<t.length;e++)i=i.split(t[e]).join(n);return i.split(n)}(t,this._config.separator).filter(e=>e);if(n.length>1){e.preventDefault();for(const e of n)this._addPastedValue(e)}}}_addPastedValue(e){let t=e;const n={};if(this._config.allowNew)n.new=1;else{const n=this.getSelection();if(!n)return;e=n.getAttribute(u),t=n.dataset.label}this._config.confirmAdd(e,this).then(()=>{this._add(t,e,n)}).catch(()=>{})}oninput(e){const t=this._config.inputFilter(this._searchInput.value);if(t!=this._searchInput.value&&(this._searchInput.value=t),t){const e=t.slice(-1);if(this._config.separator.length&&this._config.separator.includes(e))return this._searchInput.value=this._searchInput.value.slice(0,-1),void this._addPastedValue(this._searchInput.value)}setTimeout(()=>{this._adjustWidth()}),this.showOrSearch()}onkeydown(e){let t=e.keyCode||e.key;const n=e.target;switch(229==e.keyCode&&(t=n.value.charAt(n.selectionStart-1).charCodeAt(0)),t){case 13:case"Enter":e.preventDefault(),this._enterValue();break;case 38:case"ArrowUp":e.preventDefault(),this._keyboardNavigation=!0,this._moveSelection(d);break;case 40:case"ArrowDown":e.preventDefault(),this._keyboardNavigation=!0,this.isDropdownVisible()?this._moveSelection(h):this.showOrSearch(!1);break;case 8:case"Backspace":const t=this.getLastItem();0===this._searchInput.value.length&&t&&this._config.confirmClear(t,this).then(()=>{this.removeLastItem(),this._adjustWidth(),this.showOrSearch()}).catch(()=>{});break;case 27:case"Escape":this._searchInput.focus(),this.hideSuggestions()}}onmousemove(e){this._isMouse=!0,this._keyboardNavigation=!1}onmouseleave(e){this._isMouse=!1,this.removeSelection()}onscroll(e){this._positionMenu()}onresize(e){this._positionMenu()}onclick(e=null){!this.isSingle()&&this.isMaxReached()||this._searchInput.focus()}onreset(e){this.reset()}loadData(e=!1){Object.keys(this._config.items).length>0?this.setData(this._config.items,!0):this.resetSuggestions(!0),this._config.server&&(this._config.liveServer||this._loadFromServer(!e))}_setSelectedAttributes(){const e=this._selectElement.selectedOptions||[];for(let t=0;t<e.length;t++)e[t].value&&!e[t].hasAttribute("selected")&&e[t].setAttribute("selected","selected")}resetState(){this.isDisabled()?(this._holderElement.setAttribute("readonly",""),this._searchInput.setAttribute("disabled",""),this._holderElement.classList.add(g)):(T(this._holderElement,"readonly"),T(this._searchInput,"disabled"),this._holderElement.classList.remove(g))}resetSuggestions(e=!1){this._setSelectedAttributes();const t=e=>{const t={value:e.getAttribute("value"),label:e.textContent,disabled:e.disabled,selected:e.selected,title:e.title,data:Object.assign({disabled:e.disabled},e.dataset)};return"value"!==this._config.valueField&&(t[this._config.valueField]=t.value),"label"!==this._config.labelField&&(t[this._config.labelField]=t.label),t},n=Array.from(this._selectElement.children).filter(e=>e.hasAttribute("label")||!e.disabled||this._config.showDisabled).map(e=>e.hasAttribute("label")?{group:e.getAttribute("label"),items:Array.from(e.children).map(e=>t(e))}:t(e));this.setData(n,e)}_enterValue(){const e=this.getSelection();if(e)return e.click(),!0;if(this._config.allowNew&&this._searchInput.value){const e=this._searchInput.value;return this._config.confirmAdd(e,this).then(()=>{this._add(e,e,{new:1})}).catch(()=>{}),!0}return!1}_loadFromServer(e=!1){this._abortController&&this._abortController.abort(),this._abortController=new AbortController;let t=this._selectElement.dataset.serverParams||{};"string"==typeof t&&(t=JSON.parse(t));const n=Object.assign({},this._config.serverParams,t);if(n[this._config.queryParam]=this._searchInput.value,this._config.noCache&&(n.t=Date.now()),n.related){const e=document.getElementById(n.related);if(e){n.related=e.value;const t=e.getAttribute("name");t&&(n[t]=e.value)}}const i=new URLSearchParams(n);let o=this._config.server;const r=Object.assign(this._config.fetchOptions,{method:this._config.serverMethod||"GET",signal:this._abortController.signal});"POST"===r.method?r.body=i:o+=`?${i.toString()}`,this._holderElement.classList.add(s),fetch(o,r).then(e=>this._config.onServerResponse(e,this)).then(t=>{const n=function(e,t="window"){return e.split(".").reduce((e,t)=>e[t],t)}(this._config.serverDataKey,t)||t;this.setData(n,!e),this._abortController=null,e&&this._showSuggestions()}).catch(e=>{this._config.onServerError(e,this._abortController.signal,this)}).finally(e=>{this._holderElement.classList.remove(s)})}_add(e,t=null,n={}){if(!n.value&&t&&(n.value=t),!this.canAdd(e,n))return null;const i=this.addItem(e,t,n);return this._resetHtmlState(),this._config.keepOpen?this._showSuggestions():this.resetSearchInput(),i}_isItemEnabled(e){if("none"===e.style.display)return!1;const t=e.firstElementChild;return"A"===t.tagName&&!t.classList.contains("disabled")}_moveSelection(e=h,t=null){const n=this.getSelection();let i=t;if(n){const t=e===h?"nextSibling":"previousSibling";i=n.parentNode;do{i=i[t]}while(i&&!this._isItemEnabled(i));i?n.classList.remove(...this._activeClasses()):n&&(i=n.parentElement)}else{if(e===d)return i;if(!i)for(i=this._dropElement.firstChild;i&&!this._isItemEnabled(i);)i=i.nextSibling}if(i){const t=i.offsetHeight,n=i.offsetTop,o=i.parentNode,s=o.offsetHeight,r=o.scrollHeight,a=o.offsetTop;if(0===t&&setTimeout(()=>{o.scrollTop=0}),e===d){const e=n-a>10?n-a:0;o.scrollTop=e}else{n+t-(s+o.scrollTop)>0&&t>0&&(o.scrollTop=n+t-s+1,o.scrollTop+s>=r-10&&(o.scrollTop=n-a))}const l=i.querySelector("a");l.classList.add(...this._activeClasses()),this._searchInput.setAttribute("aria-activedescendant",l.id),this._config.updateOnSelect&&(this._searchInput.value=l.dataset.label,this._adjustWidth())}else this._searchInput.setAttribute("aria-activedescendant","");return i}_adjustWidth(){this._holderElement.classList.remove(p),this._searchInput.value?this._searchInput.size=this._searchInput.value.length:this.getSelectedValues().length?(this._searchInput.placeholder="",this._searchInput.size=1):(this._searchInput.size=this._config.placeholder.length>0?this._config.placeholder.length:1,this._searchInput.placeholder=this._config.placeholder,this._holderElement.classList.add(p));const e=this._searchInput.value||this._searchInput.placeholder;if(e.length>0){const t=y(e,this._holderElement)+20;this._searchInput.style.width=`${t}px`}}_buildSuggestions(e){for(;this._dropElement.lastChild;)this._dropElement.removeChild(this._dropElement.lastChild);let t=0,n=1;for(let i=0;i<e.length;i++){const o=e[i];if(o){if(o.group&&o.items){const e=A("li");e.setAttribute("role","presentation"),e.dataset.id=""+n;const i=A("span");if(e.append(i),i.classList.add("dropdown-header","text-truncate"),i.innerHTML=this._config.sanitizer(o.group),this._dropElement.appendChild(e),o.items)for(let e=0;e<o.items.length;e++){o.items[e].group_id=n,this._buildSuggestionsItem(o.items[e],t),t++}n++}this._buildSuggestionsItem(o,t),t++}}if(this._config.notFoundMessage){const e=A("li");e.setAttribute("role","presentation"),e.classList.add(`${o}not-found`),e.innerHTML='<span class="dropdown-item"></span>',this._dropElement.appendChild(e)}}_buildSuggestionsItem(e,t){if(!e[this._config.valueField])return;const n=e[this._config.valueField],i=e[this._config.labelField],o=this._config.onRenderItem(e,i,this),s=A("li");s.setAttribute("role","menuitem"),e.group_id&&s.setAttribute("data-group-id",`${e.group_id}`),e.title&&(s.setAttribute("title",e.title),s.setAttribute("data-bs-placement","left"));const r=A("a");s.append(r),r.id=`${this._dropElement.id}-${t}`,r.classList.add("dropdown-item","text-truncate"),e.disabled&&r.classList.add("disabled"),r.setAttribute(u,n),r.dataset.label=i;const a={};this._config.searchFields.forEach(t=>{a[t]=e[t]}),r.dataset.searchData=JSON.stringify(a),r.setAttribute("href","#"),r.innerHTML=o,this._dropElement.appendChild(s);const l=5===this._getBootstrapVersion();e.title&&b&&l&&b.getOrCreateInstance(s),r.addEventListener("mouseenter",e=>{this._keyboardNavigation||(this.removeSelection(),s.querySelector("a").classList.add(...this._activeClasses()))}),r.addEventListener("mousedown",e=>{e.preventDefault()}),r.addEventListener("click",t=>{t.preventDefault(),t.stopPropagation(),this._config.confirmAdd(n,this).then(()=>{this._add(i,n,e.data),this._config.onSelectItem(e,this)}).catch(()=>{})})}initialOptions(){return this._selectElement.querySelectorAll("option[data-init]")}_removeSelectedAttrs(){this._selectElement.querySelectorAll("option").forEach(e=>{T(e,"selected")})}reset(){this.removeAll(),this._fireEvents=!1;const e=this.initialOptions();this._removeSelectedAttrs();for(let t=0;t<e.length;t++){const n=e[t],i=Object.assign({},{disabled:n.hasAttribute("disabled")},n.dataset);this.addItem(n.textContent,n.value,i)}this._resetHtmlState(),this._fireEvents=!0}resetSearchInput(e=!1){if(this._searchInput.value="",e||this._adjustWidth(),this._checkMax(),this.isSingle()&&!e)return document.activeElement.blur(),void this.hideSuggestions();e||(this._shouldShow()||this.hideSuggestions(),this._searchInput===document.activeElement&&this._searchInput.dispatchEvent(new Event("input")))}_checkMax(){this.isMaxReached()?(this._holderElement.classList.add(l),this._searchInput.style.visibility="hidden"):"hidden"==this._searchInput.style.visibility&&(this._searchInput.style.visibility="visible")}getSelectedValues(){const e=this._selectElement.querySelectorAll("option[selected]");return Array.from(e).map(e=>e.value)}getAvailableValues(){const e=this._selectElement.querySelectorAll("option");return Array.from(e).map(e=>e.value)}showOrSearch(e=!0){!e||this._shouldShow()?this._config.liveServer?this._searchFunc():this._showSuggestions():this.hideSuggestions(!1)}hideSuggestions(e=!0){this._dropElement.classList.remove(c),S(this._searchInput,{"aria-expanded":"false"}),this.removeSelection(),e&&this._holderElement.classList.remove(a)}toggleSuggestions(e=!0,t=!0){this._dropElement.classList.contains(c)?this.hideSuggestions(t):this.showOrSearch(e)}_shouldShow(){return!this.isDisabled()&&!this.isMaxReached()&&this._searchInput.value.length>=this._config.suggestionsThreshold}_showSuggestions(){if("hidden"==this._searchInput.style.visibility)return;const e=_(this._searchInput.value),t={},n=this._dropElement.querySelectorAll("li");let i=0,s=null,r=!1;const l={};for(let o=0;o<n.length;o++){const a=n[o],c=a.firstElementChild;if(c instanceof HTMLSpanElement){a.dataset.id&&(l[a.dataset.id]=!1),E(a);continue}if(c.classList.remove(...this._activeClasses()),!this._config.allowSame){const e=c.getAttribute(u);t[e]=t[e]||0;if(this._findOption(c.getAttribute(u),"[selected]",t[e]++)){E(a);continue}}const h=this._config.showAllSuggestions||0===e.length;let d=0==e.length&&0===this._config.suggestionsThreshold;if(!h&&e.length>0){const t=JSON.parse(c.dataset.searchData);this._config.searchFields.forEach(n=>{const i=_(t[n]);let o=!1;if(this._config.fuzzy)o=x(i,e);else{const t=i.indexOf(e);o=this._config.startsWith?0===t:t>=0}o&&(d=!0)})}const f=d||0===e.length;if(h||d?(i++,C(a),a.dataset.groupId&&(l[a.dataset.groupId]=!0),!s&&this._isItemEnabled(a)&&f&&(s=a),this._config.maximumItems>0&&i>this._config.maximumItems&&E(a)):E(a),this._config.highlightTyped){const t=c.textContent,n=_(t).indexOf(e),i=t.substring(0,n)+`<mark class="${this._config.highlightClass}">${t.substring(n,n+e.length)}</mark>`+t.substring(n+e.length,t.length);c.innerHTML=i}this._isItemEnabled(a)&&(r=!0)}if(this._config.allowNew||0===e.length&&!r||this._holderElement.classList.add(a),this._config.allowNew&&this._config.regex&&this.isInvalid()&&this._holderElement.classList.remove(a),Array.from(n).filter(e=>e.dataset.id).forEach(e=>{!0===l[e.dataset.id]&&C(e)}),r&&(this._holderElement.classList.remove(a),s&&this._config.autoselectFirst&&(this.removeSelection(),this._moveSelection(h,s))),0===i)if(this._config.notFoundMessage){const e=this._dropElement.querySelector(`.${o}not-found`);e.style.display="block";const t=this._config.notFoundMessage.replace("{{tag}}",this._searchInput.value);e.innerHTML=`<span class="dropdown-item">${t}</span>`,this._showDropdown()}else this.hideSuggestions(!1);else this._showDropdown()}_showDropdown(){const e=this._dropElement.classList.contains(c);e||(this._dropElement.classList.add(c),S(this._searchInput,{"aria-expanded":"true"})),this._positionMenu(e)}_positionMenu(e=!1){const t=this._rtl,n=this._config.fixed,i=this._config.fullWidth,o=this._searchInput.getBoundingClientRect(),s=this._holderElement.getBoundingClientRect();let r=0,a=0;if(n?i?(r=s.x,a=s.y+s.height+2):(r=o.x,a=o.y+o.height):i?(r=0,a=s.height+2):(r=this._searchInput.offsetLeft,a=this._searchInput.offsetHeight+this._searchInput.offsetTop),t&&!i&&(r-=this._dropElement.offsetWidth-o.width),!i){const e=Math.min(window.innerWidth,document.body.offsetWidth),n=t?o.x+o.width-this._dropElement.offsetWidth-1:e-1-(o.x+this._dropElement.offsetWidth);n<0&&(r=t?r-n:r+n)}i&&(this._dropElement.style.width=`${this._holderElement.offsetWidth}px`),e||(this._dropElement.style.transform="unset"),Object.assign(this._dropElement.style,{left:`${r}px`,top:`${a}px`});const l=this._dropElement.getBoundingClientRect(),c=window.innerHeight;if(l.y+l.height>c||this._dropElement.style.transform.includes("translateY")){const e=i?s.height+4:o.height;this._dropElement.style.transform=`translateY(calc(-100.1% - ${e}px))`}}_getBootstrapVersion(){let e=5;const t=window.jQuery;return t&&t.fn.tooltip&&t.fn.tooltip.Constructor&&(e=parseInt(t.fn.tooltip.Constructor.VERSION.charAt(0))),e}_isSelected(e){return!!Array.from(this._selectElement.querySelectorAll("option")).find(t=>t.textContent==e&&t.getAttribute("selected"))}_isSelectable(e,t){const n=Array.from(this._selectElement.querySelectorAll("option")),i=t.value?n.filter(e=>e.value==t.value):n.filter(t=>t.textContent==e);if(i.length>0){if(!i.find(e=>!e.getAttribute("selected")))return!1}return!0}hasItem(e){for(let t of this._config.items){const n=t.items||[t];for(let t of n)if(t[this._config.labelField]==e)return!0}return!1}getItem(e){for(let t of this._config.items){const n=t.items||[t];for(let t of n)if(t[this._config.valueField]==e)return t}return null}_validateRegex(e){return new RegExp(this._config.regex.trim()).test(e)}getSelection(){return this._dropElement.querySelector(`a.${r}`)}removeSelection(){const e=this.getSelection();e&&e.classList.remove(...this._activeClasses())}_activeClasses(){return[...this._config.activeClasses,r]}getActiveSelection(){return this.getSelection()}removeActiveSelection(){return this.removeSelection()}removeAll(){this.getSelectedValues().forEach(e=>{this.removeItem(e,!0)}),this._adjustWidth()}removeLastItem(e=!1){const t=this.getLastItem();t&&this.removeItem(t,e)}getLastItem(){const e=this._containerElement.querySelectorAll(`span.${o}badge`);if(!e.length)return;return e[e.length-1].getAttribute(u)}disable(){this._selectElement.setAttribute("disabled",""),this.resetState()}enable(){T(this._selectElement,"disabled"),this.resetState()}isDisabled(){return this._selectElement.hasAttribute("disabled")||this._selectElement.disabled||this._selectElement.hasAttribute("readonly")}isDropdownVisible(){return this._dropElement.classList.contains(c)}isInvalid(){return this._holderElement.classList.contains(a)}isSingle(){return!this._selectElement.hasAttribute("multiple")}isMaxReached(){return this._config.max&&this.getSelectedValues().length>=this._config.max}canAdd(e,t={}){const n=this.cannotAddReason(e,t);return"ok"===n||(n.includes("invalid-")&&this._holderElement.classList.add(a),!1)}cannotAddReason(e,t={}){if(!e)return"no-text";if(t.new&&!this._config.allowNew)return"not-allow-new";if(!t.new&&!this._config.liveServer&&!this.hasItem(e))return"no-item";if(this.isDisabled())return"is-disabled";if(!this.isSingle()&&!this._config.allowSame)if(t.new){if(this._isSelected(e))return"already-selected"}else if(!this._isSelectable(e,t))return"not-selectable";return this.isMaxReached()?"max-reached":this._config.regex&&t.new&&!this._validateRegex(e)?"invalid-regex":this._config.onCanAdd&&!1===this._config.onCanAdd(e,t,this)?"invalid-can-add":"ok"}getData(){return this._config.items}setData(e,t=!1){if(this._fireEvents=!1,Array.isArray(e)||(e=Object.entries(e).map(([e,t])=>({value:e,label:t}))),this._config.items!=e&&(this._config.items=e),t){this._removeSelectedAttrs();e.reduce((e,t)=>e.concat(t.group?t.items:[t]),[]).forEach(e=>{const t=e[this._config.valueField],n=e[this._config.labelField];if(t&&(e.selected||this._config.selected.includes(t))){const i=this.addItem(n,t,e.data);i&&i.setAttribute("data-init","true")}})}this._buildSuggestions(e),this._resetHtmlState(),this._fireEvents=!0,this._config.onDataLoaded(e,this),this._selectElement.dispatchEvent(new CustomEvent("tags.loaded",{bubbles:!0,detail:e}))}_findOption(e=null,t="",n=0){const i=`option${null===e?"":`[value="${CSS.escape(e)}"]`}${t}`;return this._selectElement.querySelectorAll(i)[n]||null}setItem(e,t={}){let n=null;if(!this._config.allowSame){if(this._findOption(e,"[selected]"))return}let i=this._findOption(e,":not([selected])");if(i)n=this.addItem(i.textContent,i.value,t);else{let i=this.getItem(e);if(i){const e=i[this._config.valueField],o=i[this._config.labelField];n=this.addItem(o,e,t)}}return this._adjustWidth(),this._checkMax(),n}addItem(e,t=null,n={}){t||(t=e),this.isSingle()&&this.getSelectedValues().length&&this.removeLastItem(!0);let i=this._findOption(t,":not([selected])");if(!i){i=A("option"),i.value=t,i.innerText=e;for(const[e,t]of Object.entries(n))i.dataset[e]=t;this._selectElement.appendChild(i),this._config.onCreateItem(i,this)}return i&&(n=Object.assign({title:i.getAttribute("title")},i.dataset,n)),i.setAttribute("selected","selected"),i.selected=!0,this._createBadge(e,t,n),this._fireEvents&&this._selectElement.dispatchEvent(new Event("change",{bubbles:!0})),i}_resetHtmlState(){const e=this._selectElement.innerHTML;this._selectElement.innerHTML="",this._selectElement.innerHTML=e,this._adjustWidth()}_createBadge(e,t=null,n={}){const i=5===this._getBootstrapVersion(),s=n.disabled&&k(n.disabled),r=this._config.allowClear&&!s;let a=this._config.allowHtml?e:this._config.sanitizer(e);const l=A("span");let c=[`${o}badge`];const h=this.isSingle()&&!this._config.singleBadge;if(!h){c.push("badge");let e=this._config.badgeStyle;n.badgeStyle&&(e=n.badgeStyle),n.badgeClass&&c.push(...n.badgeClass.split(" ")),this._config.baseClass?c.push(...this._config.baseClass.split(" ")):c=i?[...c,`bg-${e}`,"text-truncate"]:[...c,`badge-${e}`],l.style.maxWidth="100%"}s&&c.push("disabled","opacity-50");const d=h?0:2;if(l.style.margin=`${d}px 6px ${d}px 0px`,l.style.marginBlock=`${d}px`,l.style.marginInline="0px 6px",l.style.display="flex",l.style.alignItems="center",n.backgroundColor&&l.style.setProperty("background-color",n.backgroundColor,"important"),n.color&&l.style.setProperty("color",n.color,"important"),l.classList.add(...c),l.setAttribute(u,t),n.title&&l.setAttribute("title",n.title),r){const e=c.includes("text-dark")||n.color&&!function(e){if(!e.includes("#"))return!0;const t=+("0x"+e.slice(1).replace(e.length<5&&/./g,"$&$&")),n=t>>16,i=t>>8&255,o=255&t;return Math.sqrt(n*n*.299+i*i*.587+o*o*.114)>127.5}(n.color)||h?"btn-close":"btn-close btn-close-white";let t="margin-inline: 0px 6px;",o="left";this._config.clearEnd&&(o="right"),"right"==o&&(t="margin-inline: 6px 0px;");const s=i?'<button type="button" style="font-size:0.65em;'+t+'" class="'+e+'" aria-label="'+this._config.clearLabel+'"></button>':'<button type="button" style="font-size:1em;'+t+'text-shadow:none;color:currentColor;transform:scale(1.2);float:none" class="close" aria-label="'+this._config.clearLabel+'"><span aria-hidden="true">&times;</span></button>';a="left"==o?s+a:a+s}l.innerHTML=a,this._containerElement.insertBefore(l,this._searchInput),n.title&&b&&i&&b.getOrCreateInstance(l),r&&l.querySelector("button").addEventListener("click",e=>{e.preventDefault(),e.stopPropagation(),this.isDisabled()||this._config.confirmClear(t,this).then(()=>{this.removeItem(t),document.activeElement.blur(),this._adjustWidth()}).catch(()=>{})})}getHolder(){return this._holderElement}clear(){this.hideSuggestions(),this.reset()}updateData(e){this.setData(e,!1),this.reset()}removeItem(e,t=!1){const n=CSS.escape(e),i=this._containerElement.querySelectorAll("span["+u+'="'+n+'"]');if(!i.length)return!1;const o=i.length-1,s=i[o];s&&(s.dataset.bsOriginalTitle&&b.getOrCreateInstance(s).dispose(),s.remove());const r=this._findOption(e,"[selected]",o);return r&&(T(r,"selected"),r.selected=!1,this._fireEvents&&!t&&this._selectElement.dispatchEvent(new Event("change",{bubbles:!0}))),"hidden"!=this._searchInput.style.visibility||this.isMaxReached()||(this._searchInput.style.visibility="visible",this._holderElement.classList.remove(l)),t||this._config.onClearItem(e,this),!0}}const M=O},454:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Alert:()=>Ot,Button:()=>Pt,Carousel:()=>dn,Collapse:()=>Tn,Dropdown:()=>Kn,Modal:()=>Li,Offcanvas:()=>Zi,Popover:()=>Eo,ScrollSpy:()=>Io,Tab:()=>is,Toast:()=>bs,Tooltip:()=>bo});var i={};n.r(i),n.d(i,{afterMain:()=>E,afterRead:()=>w,afterWrite:()=>T,applyStyles:()=>D,arrow:()=>Q,auto:()=>l,basePlacements:()=>c,beforeMain:()=>_,beforeRead:()=>b,beforeWrite:()=>C,bottom:()=>s,clippingParents:()=>d,computeStyles:()=>ie,createPopper:()=>De,createPopperBase:()=>Le,createPopperLite:()=>Ie,detectOverflow:()=>ye,end:()=>h,eventListeners:()=>se,flip:()=>we,hide:()=>Ee,left:()=>a,main:()=>x,modifierPhases:()=>k,offset:()=>Ce,placements:()=>v,popper:()=>p,popperGenerator:()=>Pe,popperOffsets:()=>Se,preventOverflow:()=>Te,read:()=>y,reference:()=>g,right:()=>r,start:()=>u,top:()=>o,variationPlacements:()=>m,viewport:()=>f,write:()=>S});var o="top",s="bottom",r="right",a="left",l="auto",c=[o,s,r,a],u="start",h="end",d="clippingParents",f="viewport",p="popper",g="reference",m=c.reduce(function(e,t){return e.concat([t+"-"+u,t+"-"+h])},[]),v=[].concat(c,[l]).reduce(function(e,t){return e.concat([t,t+"-"+u,t+"-"+h])},[]),b="beforeRead",y="read",w="afterRead",_="beforeMain",x="main",E="afterMain",C="beforeWrite",S="write",T="afterWrite",k=[b,y,w,_,x,E,C,S,T];function A(e){return e?(e.nodeName||"").toLowerCase():null}function O(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function M(e){return e instanceof O(e).Element||e instanceof Element}function P(e){return e instanceof O(e).HTMLElement||e instanceof HTMLElement}function L(e){return"undefined"!=typeof ShadowRoot&&(e instanceof O(e).ShadowRoot||e instanceof ShadowRoot)}const D={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},i=t.attributes[e]||{},o=t.elements[e];P(o)&&A(o)&&(Object.assign(o.style,n),Object.keys(i).forEach(function(e){var t=i[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var i=t.elements[e],o=t.attributes[e]||{},s=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]="",e},{});P(i)&&A(i)&&(Object.assign(i.style,s),Object.keys(o).forEach(function(e){i.removeAttribute(e)}))})}},requires:["computeStyles"]};function I(e){return e.split("-")[0]}var j=Math.max,N=Math.min,R=Math.round;function F(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function z(){return!/^((?!chrome|android).)*safari/i.test(F())}function H(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var i=e.getBoundingClientRect(),o=1,s=1;t&&P(e)&&(o=e.offsetWidth>0&&R(i.width)/e.offsetWidth||1,s=e.offsetHeight>0&&R(i.height)/e.offsetHeight||1);var r=(M(e)?O(e):window).visualViewport,a=!z()&&n,l=(i.left+(a&&r?r.offsetLeft:0))/o,c=(i.top+(a&&r?r.offsetTop:0))/s,u=i.width/o,h=i.height/s;return{width:u,height:h,top:c,right:l+u,bottom:c+h,left:l,x:l,y:c}}function $(e){var t=H(e),n=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:i}}function B(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&L(n)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function q(e){return O(e).getComputedStyle(e)}function W(e){return["table","td","th"].indexOf(A(e))>=0}function V(e){return((M(e)?e.ownerDocument:e.document)||window.document).documentElement}function X(e){return"html"===A(e)?e:e.assignedSlot||e.parentNode||(L(e)?e.host:null)||V(e)}function Y(e){return P(e)&&"fixed"!==q(e).position?e.offsetParent:null}function U(e){for(var t=O(e),n=Y(e);n&&W(n)&&"static"===q(n).position;)n=Y(n);return n&&("html"===A(n)||"body"===A(n)&&"static"===q(n).position)?t:n||function(e){var t=/firefox/i.test(F());if(/Trident/i.test(F())&&P(e)&&"fixed"===q(e).position)return null;var n=X(e);for(L(n)&&(n=n.host);P(n)&&["html","body"].indexOf(A(n))<0;){var i=q(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||t&&"filter"===i.willChange||t&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}(e)||t}function G(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Z(e,t,n){return j(e,N(t,n))}function K(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function J(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}const Q={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,i=e.name,l=e.options,u=n.elements.arrow,h=n.modifiersData.popperOffsets,d=I(n.placement),f=G(d),p=[a,r].indexOf(d)>=0?"height":"width";if(u&&h){var g=function(e,t){return K("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:J(e,c))}(l.padding,n),m=$(u),v="y"===f?o:a,b="y"===f?s:r,y=n.rects.reference[p]+n.rects.reference[f]-h[f]-n.rects.popper[p],w=h[f]-n.rects.reference[f],_=U(u),x=_?"y"===f?_.clientHeight||0:_.clientWidth||0:0,E=y/2-w/2,C=g[v],S=x-m[p]-g[b],T=x/2-m[p]/2+E,k=Z(C,T,S),A=f;n.modifiersData[i]=((t={})[A]=k,t.centerOffset=k-T,t)}},effect:function(e){var t=e.state,n=e.options.element,i=void 0===n?"[data-popper-arrow]":n;null!=i&&("string"!=typeof i||(i=t.elements.popper.querySelector(i)))&&B(t.elements.popper,i)&&(t.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ee(e){return e.split("-")[1]}var te={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ne(e){var t,n=e.popper,i=e.popperRect,l=e.placement,c=e.variation,u=e.offsets,d=e.position,f=e.gpuAcceleration,p=e.adaptive,g=e.roundOffsets,m=e.isFixed,v=u.x,b=void 0===v?0:v,y=u.y,w=void 0===y?0:y,_="function"==typeof g?g({x:b,y:w}):{x:b,y:w};b=_.x,w=_.y;var x=u.hasOwnProperty("x"),E=u.hasOwnProperty("y"),C=a,S=o,T=window;if(p){var k=U(n),A="clientHeight",M="clientWidth";if(k===O(n)&&"static"!==q(k=V(n)).position&&"absolute"===d&&(A="scrollHeight",M="scrollWidth"),l===o||(l===a||l===r)&&c===h)S=s,w-=(m&&k===T&&T.visualViewport?T.visualViewport.height:k[A])-i.height,w*=f?1:-1;if(l===a||(l===o||l===s)&&c===h)C=r,b-=(m&&k===T&&T.visualViewport?T.visualViewport.width:k[M])-i.width,b*=f?1:-1}var P,L=Object.assign({position:d},p&&te),D=!0===g?function(e,t){var n=e.x,i=e.y,o=t.devicePixelRatio||1;return{x:R(n*o)/o||0,y:R(i*o)/o||0}}({x:b,y:w},O(n)):{x:b,y:w};return b=D.x,w=D.y,f?Object.assign({},L,((P={})[S]=E?"0":"",P[C]=x?"0":"",P.transform=(T.devicePixelRatio||1)<=1?"translate("+b+"px, "+w+"px)":"translate3d("+b+"px, "+w+"px, 0)",P)):Object.assign({},L,((t={})[S]=E?w+"px":"",t[C]=x?b+"px":"",t.transform="",t))}const ie={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,i=n.gpuAcceleration,o=void 0===i||i,s=n.adaptive,r=void 0===s||s,a=n.roundOffsets,l=void 0===a||a,c={placement:I(t.placement),variation:ee(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,ne(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:r,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,ne(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};var oe={passive:!0};const se={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,i=e.options,o=i.scroll,s=void 0===o||o,r=i.resize,a=void 0===r||r,l=O(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&c.forEach(function(e){e.addEventListener("scroll",n.update,oe)}),a&&l.addEventListener("resize",n.update,oe),function(){s&&c.forEach(function(e){e.removeEventListener("scroll",n.update,oe)}),a&&l.removeEventListener("resize",n.update,oe)}},data:{}};var re={left:"right",right:"left",bottom:"top",top:"bottom"};function ae(e){return e.replace(/left|right|bottom|top/g,function(e){return re[e]})}var le={start:"end",end:"start"};function ce(e){return e.replace(/start|end/g,function(e){return le[e]})}function ue(e){var t=O(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function he(e){return H(V(e)).left+ue(e).scrollLeft}function de(e){var t=q(e),n=t.overflow,i=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+i)}function fe(e){return["html","body","#document"].indexOf(A(e))>=0?e.ownerDocument.body:P(e)&&de(e)?e:fe(X(e))}function pe(e,t){var n;void 0===t&&(t=[]);var i=fe(e),o=i===(null==(n=e.ownerDocument)?void 0:n.body),s=O(i),r=o?[s].concat(s.visualViewport||[],de(i)?i:[]):i,a=t.concat(r);return o?a:a.concat(pe(X(r)))}function ge(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function me(e,t,n){return t===f?ge(function(e,t){var n=O(e),i=V(e),o=n.visualViewport,s=i.clientWidth,r=i.clientHeight,a=0,l=0;if(o){s=o.width,r=o.height;var c=z();(c||!c&&"fixed"===t)&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:r,x:a+he(e),y:l}}(e,n)):M(t)?function(e,t){var n=H(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):ge(function(e){var t,n=V(e),i=ue(e),o=null==(t=e.ownerDocument)?void 0:t.body,s=j(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),r=j(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-i.scrollLeft+he(e),l=-i.scrollTop;return"rtl"===q(o||n).direction&&(a+=j(n.clientWidth,o?o.clientWidth:0)-s),{width:s,height:r,x:a,y:l}}(V(e)))}function ve(e,t,n,i){var o="clippingParents"===t?function(e){var t=pe(X(e)),n=["absolute","fixed"].indexOf(q(e).position)>=0&&P(e)?U(e):e;return M(n)?t.filter(function(e){return M(e)&&B(e,n)&&"body"!==A(e)}):[]}(e):[].concat(t),s=[].concat(o,[n]),r=s[0],a=s.reduce(function(t,n){var o=me(e,n,i);return t.top=j(o.top,t.top),t.right=N(o.right,t.right),t.bottom=N(o.bottom,t.bottom),t.left=j(o.left,t.left),t},me(e,r,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function be(e){var t,n=e.reference,i=e.element,l=e.placement,c=l?I(l):null,d=l?ee(l):null,f=n.x+n.width/2-i.width/2,p=n.y+n.height/2-i.height/2;switch(c){case o:t={x:f,y:n.y-i.height};break;case s:t={x:f,y:n.y+n.height};break;case r:t={x:n.x+n.width,y:p};break;case a:t={x:n.x-i.width,y:p};break;default:t={x:n.x,y:n.y}}var g=c?G(c):null;if(null!=g){var m="y"===g?"height":"width";switch(d){case u:t[g]=t[g]-(n[m]/2-i[m]/2);break;case h:t[g]=t[g]+(n[m]/2-i[m]/2)}}return t}function ye(e,t){void 0===t&&(t={});var n=t,i=n.placement,a=void 0===i?e.placement:i,l=n.strategy,u=void 0===l?e.strategy:l,h=n.boundary,m=void 0===h?d:h,v=n.rootBoundary,b=void 0===v?f:v,y=n.elementContext,w=void 0===y?p:y,_=n.altBoundary,x=void 0!==_&&_,E=n.padding,C=void 0===E?0:E,S=K("number"!=typeof C?C:J(C,c)),T=w===p?g:p,k=e.rects.popper,A=e.elements[x?T:w],O=ve(M(A)?A:A.contextElement||V(e.elements.popper),m,b,u),P=H(e.elements.reference),L=be({reference:P,element:k,strategy:"absolute",placement:a}),D=ge(Object.assign({},k,L)),I=w===p?D:P,j={top:O.top-I.top+S.top,bottom:I.bottom-O.bottom+S.bottom,left:O.left-I.left+S.left,right:I.right-O.right+S.right},N=e.modifiersData.offset;if(w===p&&N){var R=N[a];Object.keys(j).forEach(function(e){var t=[r,s].indexOf(e)>=0?1:-1,n=[o,s].indexOf(e)>=0?"y":"x";j[e]+=R[n]*t})}return j}const we={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var h=n.mainAxis,d=void 0===h||h,f=n.altAxis,p=void 0===f||f,g=n.fallbackPlacements,b=n.padding,y=n.boundary,w=n.rootBoundary,_=n.altBoundary,x=n.flipVariations,E=void 0===x||x,C=n.allowedAutoPlacements,S=t.options.placement,T=I(S),k=g||(T===S||!E?[ae(S)]:function(e){if(I(e)===l)return[];var t=ae(e);return[ce(e),t,ce(t)]}(S)),A=[S].concat(k).reduce(function(e,n){return e.concat(I(n)===l?function(e,t){void 0===t&&(t={});var n=t,i=n.placement,o=n.boundary,s=n.rootBoundary,r=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,u=void 0===l?v:l,h=ee(i),d=h?a?m:m.filter(function(e){return ee(e)===h}):c,f=d.filter(function(e){return u.indexOf(e)>=0});0===f.length&&(f=d);var p=f.reduce(function(t,n){return t[n]=ye(e,{placement:n,boundary:o,rootBoundary:s,padding:r})[I(n)],t},{});return Object.keys(p).sort(function(e,t){return p[e]-p[t]})}(t,{placement:n,boundary:y,rootBoundary:w,padding:b,flipVariations:E,allowedAutoPlacements:C}):n)},[]),O=t.rects.reference,M=t.rects.popper,P=new Map,L=!0,D=A[0],j=0;j<A.length;j++){var N=A[j],R=I(N),F=ee(N)===u,z=[o,s].indexOf(R)>=0,H=z?"width":"height",$=ye(t,{placement:N,boundary:y,rootBoundary:w,altBoundary:_,padding:b}),B=z?F?r:a:F?s:o;O[H]>M[H]&&(B=ae(B));var q=ae(B),W=[];if(d&&W.push($[R]<=0),p&&W.push($[B]<=0,$[q]<=0),W.every(function(e){return e})){D=N,L=!1;break}P.set(N,W)}if(L)for(var V=function(e){var t=A.find(function(t){var n=P.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return D=t,"break"},X=E?3:1;X>0;X--){if("break"===V(X))break}t.placement!==D&&(t.modifiersData[i]._skip=!0,t.placement=D,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function _e(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function xe(e){return[o,r,s,a].some(function(t){return e[t]>=0})}const Ee={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,i=t.rects.reference,o=t.rects.popper,s=t.modifiersData.preventOverflow,r=ye(t,{elementContext:"reference"}),a=ye(t,{altBoundary:!0}),l=_e(r,i),c=_e(a,o,s),u=xe(l),h=xe(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":h})}};const Ce={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,i=e.name,s=n.offset,l=void 0===s?[0,0]:s,c=v.reduce(function(e,n){return e[n]=function(e,t,n){var i=I(e),s=[a,o].indexOf(i)>=0?-1:1,l="function"==typeof n?n(Object.assign({},t,{placement:e})):n,c=l[0],u=l[1];return c=c||0,u=(u||0)*s,[a,r].indexOf(i)>=0?{x:u,y:c}:{x:c,y:u}}(n,t.rects,l),e},{}),u=c[t.placement],h=u.x,d=u.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=h,t.modifiersData.popperOffsets.y+=d),t.modifiersData[i]=c}};const Se={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=be({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}};const Te={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,i=e.name,l=n.mainAxis,c=void 0===l||l,h=n.altAxis,d=void 0!==h&&h,f=n.boundary,p=n.rootBoundary,g=n.altBoundary,m=n.padding,v=n.tether,b=void 0===v||v,y=n.tetherOffset,w=void 0===y?0:y,_=ye(t,{boundary:f,rootBoundary:p,padding:m,altBoundary:g}),x=I(t.placement),E=ee(t.placement),C=!E,S=G(x),T="x"===S?"y":"x",k=t.modifiersData.popperOffsets,A=t.rects.reference,O=t.rects.popper,M="function"==typeof w?w(Object.assign({},t.rects,{placement:t.placement})):w,P="number"==typeof M?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M),L=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,D={x:0,y:0};if(k){if(c){var R,F="y"===S?o:a,z="y"===S?s:r,H="y"===S?"height":"width",B=k[S],q=B+_[F],W=B-_[z],V=b?-O[H]/2:0,X=E===u?A[H]:O[H],Y=E===u?-O[H]:-A[H],K=t.elements.arrow,J=b&&K?$(K):{width:0,height:0},Q=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},te=Q[F],ne=Q[z],ie=Z(0,A[H],J[H]),oe=C?A[H]/2-V-ie-te-P.mainAxis:X-ie-te-P.mainAxis,se=C?-A[H]/2+V+ie+ne+P.mainAxis:Y+ie+ne+P.mainAxis,re=t.elements.arrow&&U(t.elements.arrow),ae=re?"y"===S?re.clientTop||0:re.clientLeft||0:0,le=null!=(R=null==L?void 0:L[S])?R:0,ce=B+se-le,ue=Z(b?N(q,B+oe-le-ae):q,B,b?j(W,ce):W);k[S]=ue,D[S]=ue-B}if(d){var he,de="x"===S?o:a,fe="x"===S?s:r,pe=k[T],ge="y"===T?"height":"width",me=pe+_[de],ve=pe-_[fe],be=-1!==[o,a].indexOf(x),we=null!=(he=null==L?void 0:L[T])?he:0,_e=be?me:pe-A[ge]-O[ge]-we+P.altAxis,xe=be?pe+A[ge]+O[ge]-we-P.altAxis:ve,Ee=b&&be?function(e,t,n){var i=Z(e,t,n);return i>n?n:i}(_e,pe,xe):Z(b?_e:me,pe,b?xe:ve);k[T]=Ee,D[T]=Ee-pe}t.modifiersData[i]=D}},requiresIfExists:["offset"]};function ke(e,t,n){void 0===n&&(n=!1);var i,o,s=P(t),r=P(t)&&function(e){var t=e.getBoundingClientRect(),n=R(t.width)/e.offsetWidth||1,i=R(t.height)/e.offsetHeight||1;return 1!==n||1!==i}(t),a=V(t),l=H(e,r,n),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(s||!s&&!n)&&(("body"!==A(t)||de(a))&&(c=(i=t)!==O(i)&&P(i)?{scrollLeft:(o=i).scrollLeft,scrollTop:o.scrollTop}:ue(i)),P(t)?((u=H(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):a&&(u.x=he(a))),{x:l.left+c.scrollLeft-u.x,y:l.top+c.scrollTop-u.y,width:l.width,height:l.height}}function Ae(e){var t=new Map,n=new Set,i=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!n.has(e)){var i=t.get(e);i&&o(i)}}),i.push(e)}return e.forEach(function(e){t.set(e.name,e)}),e.forEach(function(e){n.has(e.name)||o(e)}),i}var Oe={placement:"bottom",modifiers:[],strategy:"absolute"};function Me(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}function Pe(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,i=void 0===n?[]:n,o=t.defaultOptions,s=void 0===o?Oe:o;return function(e,t,n){void 0===n&&(n=s);var o,r,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},Oe,s),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},l=[],c=!1,u={state:a,setOptions:function(n){var o="function"==typeof n?n(a.options):n;h(),a.options=Object.assign({},s,a.options,o),a.scrollParents={reference:M(e)?pe(e):e.contextElement?pe(e.contextElement):[],popper:pe(t)};var r,c,d=function(e){var t=Ae(e);return k.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}((r=[].concat(i,a.options.modifiers),c=r.reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{}),Object.keys(c).map(function(e){return c[e]})));return a.orderedModifiers=d.filter(function(e){return e.enabled}),a.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,i=void 0===n?{}:n,o=e.effect;if("function"==typeof o){var s=o({state:a,name:t,instance:u,options:i}),r=function(){};l.push(s||r)}}),u.update()},forceUpdate:function(){if(!c){var e=a.elements,t=e.reference,n=e.popper;if(Me(t,n)){a.rects={reference:ke(t,U(n),"fixed"===a.options.strategy),popper:$(n)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach(function(e){return a.modifiersData[e.name]=Object.assign({},e.data)});for(var i=0;i<a.orderedModifiers.length;i++)if(!0!==a.reset){var o=a.orderedModifiers[i],s=o.fn,r=o.options,l=void 0===r?{}:r,h=o.name;"function"==typeof s&&(a=s({state:a,options:l,name:h,instance:u})||a)}else a.reset=!1,i=-1}}},update:(o=function(){return new Promise(function(e){u.forceUpdate(),e(a)})},function(){return r||(r=new Promise(function(e){Promise.resolve().then(function(){r=void 0,e(o())})})),r}),destroy:function(){h(),c=!0}};if(!Me(e,t))return u;function h(){l.forEach(function(e){return e()}),l=[]}return u.setOptions(n).then(function(e){!c&&n.onFirstUpdate&&n.onFirstUpdate(e)}),u}}var Le=Pe(),De=Pe({defaultModifiers:[se,Se,ie,D,Ce,we,Te,Q,Ee]}),Ie=Pe({defaultModifiers:[se,Se,ie,D]});const je=new Map,Ne={set(e,t,n){je.has(e)||je.set(e,new Map);const i=je.get(e);i.has(t)||0===i.size?i.set(t,n):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(i.keys())[0]}.`)},get:(e,t)=>je.has(e)&&je.get(e).get(t)||null,remove(e,t){if(!je.has(e))return;const n=je.get(e);n.delete(t),0===n.size&&je.delete(e)}},Re="transitionend",Fe=e=>(e&&window.CSS&&window.CSS.escape&&(e=e.replace(/#([^\s"#']+)/g,(e,t)=>`#${CSS.escape(t)}`)),e),ze=e=>null==e?`${e}`:Object.prototype.toString.call(e).match(/\s([a-z]+)/i)[1].toLowerCase(),He=e=>{e.dispatchEvent(new Event(Re))},$e=e=>!(!e||"object"!=typeof e)&&(void 0!==e.jquery&&(e=e[0]),void 0!==e.nodeType),Be=e=>$e(e)?e.jquery?e[0]:e:"string"==typeof e&&e.length>0?document.querySelector(Fe(e)):null,qe=e=>{if(!$e(e)||0===e.getClientRects().length)return!1;const t="visible"===getComputedStyle(e).getPropertyValue("visibility"),n=e.closest("details:not([open])");if(!n)return t;if(n!==e){const t=e.closest("summary");if(t&&t.parentNode!==n)return!1;if(null===t)return!1}return t},We=e=>!e||e.nodeType!==Node.ELEMENT_NODE||(!!e.classList.contains("disabled")||(void 0!==e.disabled?e.disabled:e.hasAttribute("disabled")&&"false"!==e.getAttribute("disabled"))),Ve=e=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof e.getRootNode){const t=e.getRootNode();return t instanceof ShadowRoot?t:null}return e instanceof ShadowRoot?e:e.parentNode?Ve(e.parentNode):null},Xe=()=>{},Ye=e=>{e.offsetHeight},Ue=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,Ge=[],Ze=()=>"rtl"===document.documentElement.dir,Ke=e=>{var t;t=()=>{const t=Ue();if(t){const n=e.NAME,i=t.fn[n];t.fn[n]=e.jQueryInterface,t.fn[n].Constructor=e,t.fn[n].noConflict=()=>(t.fn[n]=i,e.jQueryInterface)}},"loading"===document.readyState?(Ge.length||document.addEventListener("DOMContentLoaded",()=>{for(const e of Ge)e()}),Ge.push(t)):t()},Je=(e,t=[],n=e)=>"function"==typeof e?e.call(...t):n,Qe=(e,t,n=!0)=>{if(!n)return void Je(e);const i=(e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:n}=window.getComputedStyle(e);const i=Number.parseFloat(t),o=Number.parseFloat(n);return i||o?(t=t.split(",")[0],n=n.split(",")[0],1e3*(Number.parseFloat(t)+Number.parseFloat(n))):0})(t)+5;let o=!1;const s=({target:n})=>{n===t&&(o=!0,t.removeEventListener(Re,s),Je(e))};t.addEventListener(Re,s),setTimeout(()=>{o||He(t)},i)},et=(e,t,n,i)=>{const o=e.length;let s=e.indexOf(t);return-1===s?!n&&i?e[o-1]:e[0]:(s+=n?1:-1,i&&(s=(s+o)%o),e[Math.max(0,Math.min(s,o-1))])},tt=/[^.]*(?=\..*)\.|.*/,nt=/\..*/,it=/::\d+$/,ot={};let st=1;const rt={mouseenter:"mouseover",mouseleave:"mouseout"},at=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function lt(e,t){return t&&`${t}::${st++}`||e.uidEvent||st++}function ct(e){const t=lt(e);return e.uidEvent=t,ot[t]=ot[t]||{},ot[t]}function ut(e,t,n=null){return Object.values(e).find(e=>e.callable===t&&e.delegationSelector===n)}function ht(e,t,n){const i="string"==typeof t,o=i?n:t||n;let s=gt(e);return at.has(s)||(s=e),[i,o,s]}function dt(e,t,n,i,o){if("string"!=typeof t||!e)return;let[s,r,a]=ht(t,n,i);if(t in rt){const e=e=>function(t){if(!t.relatedTarget||t.relatedTarget!==t.delegateTarget&&!t.delegateTarget.contains(t.relatedTarget))return e.call(this,t)};r=e(r)}const l=ct(e),c=l[a]||(l[a]={}),u=ut(c,r,s?n:null);if(u)return void(u.oneOff=u.oneOff&&o);const h=lt(r,t.replace(tt,"")),d=s?function(e,t,n){return function i(o){const s=e.querySelectorAll(t);for(let{target:r}=o;r&&r!==this;r=r.parentNode)for(const a of s)if(a===r)return vt(o,{delegateTarget:r}),i.oneOff&&mt.off(e,o.type,t,n),n.apply(r,[o])}}(e,n,r):function(e,t){return function n(i){return vt(i,{delegateTarget:e}),n.oneOff&&mt.off(e,i.type,t),t.apply(e,[i])}}(e,r);d.delegationSelector=s?n:null,d.callable=r,d.oneOff=o,d.uidEvent=h,c[h]=d,e.addEventListener(a,d,s)}function ft(e,t,n,i,o){const s=ut(t[n],i,o);s&&(e.removeEventListener(n,s,Boolean(o)),delete t[n][s.uidEvent])}function pt(e,t,n,i){const o=t[n]||{};for(const[s,r]of Object.entries(o))s.includes(i)&&ft(e,t,n,r.callable,r.delegationSelector)}function gt(e){return e=e.replace(nt,""),rt[e]||e}const mt={on(e,t,n,i){dt(e,t,n,i,!1)},one(e,t,n,i){dt(e,t,n,i,!0)},off(e,t,n,i){if("string"!=typeof t||!e)return;const[o,s,r]=ht(t,n,i),a=r!==t,l=ct(e),c=l[r]||{},u=t.startsWith(".");if(void 0===s){if(u)for(const n of Object.keys(l))pt(e,l,n,t.slice(1));for(const[n,i]of Object.entries(c)){const o=n.replace(it,"");a&&!t.includes(o)||ft(e,l,r,i.callable,i.delegationSelector)}}else{if(!Object.keys(c).length)return;ft(e,l,r,s,o?n:null)}},trigger(e,t,n){if("string"!=typeof t||!e)return null;const i=Ue();let o=null,s=!0,r=!0,a=!1;t!==gt(t)&&i&&(o=i.Event(t,n),i(e).trigger(o),s=!o.isPropagationStopped(),r=!o.isImmediatePropagationStopped(),a=o.isDefaultPrevented());const l=vt(new Event(t,{bubbles:s,cancelable:!0}),n);return a&&l.preventDefault(),r&&e.dispatchEvent(l),l.defaultPrevented&&o&&o.preventDefault(),l}};function vt(e,t={}){for(const[n,i]of Object.entries(t))try{e[n]=i}catch(t){Object.defineProperty(e,n,{configurable:!0,get:()=>i})}return e}function bt(e){if("true"===e)return!0;if("false"===e)return!1;if(e===Number(e).toString())return Number(e);if(""===e||"null"===e)return null;if("string"!=typeof e)return e;try{return JSON.parse(decodeURIComponent(e))}catch(t){return e}}function yt(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}const wt={setDataAttribute(e,t,n){e.setAttribute(`data-bs-${yt(t)}`,n)},removeDataAttribute(e,t){e.removeAttribute(`data-bs-${yt(t)}`)},getDataAttributes(e){if(!e)return{};const t={},n=Object.keys(e.dataset).filter(e=>e.startsWith("bs")&&!e.startsWith("bsConfig"));for(const i of n){let n=i.replace(/^bs/,"");n=n.charAt(0).toLowerCase()+n.slice(1),t[n]=bt(e.dataset[i])}return t},getDataAttribute:(e,t)=>bt(e.getAttribute(`data-bs-${yt(t)}`))};class _t{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(e){return e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e}_mergeConfigObj(e,t){const n=$e(t)?wt.getDataAttribute(t,"config"):{};return{...this.constructor.Default,..."object"==typeof n?n:{},...$e(t)?wt.getDataAttributes(t):{},..."object"==typeof e?e:{}}}_typeCheckConfig(e,t=this.constructor.DefaultType){for(const[n,i]of Object.entries(t)){const t=e[n],o=$e(t)?"element":ze(t);if(!new RegExp(i).test(o))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${n}" provided type "${o}" but expected type "${i}".`)}}}class xt extends _t{constructor(e,t){super(),(e=Be(e))&&(this._element=e,this._config=this._getConfig(t),Ne.set(this._element,this.constructor.DATA_KEY,this))}dispose(){Ne.remove(this._element,this.constructor.DATA_KEY),mt.off(this._element,this.constructor.EVENT_KEY);for(const e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,t,n=!0){Qe(e,t,n)}_getConfig(e){return e=this._mergeConfigObj(e,this._element),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}static getInstance(e){return Ne.get(Be(e),this.DATA_KEY)}static getOrCreateInstance(e,t={}){return this.getInstance(e)||new this(e,"object"==typeof t?t:null)}static get VERSION(){return"5.3.7"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(e){return`${e}${this.EVENT_KEY}`}}const Et=e=>{let t=e.getAttribute("data-bs-target");if(!t||"#"===t){let n=e.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n=`#${n.split("#")[1]}`),t=n&&"#"!==n?n.trim():null}return t?t.split(",").map(e=>Fe(e)).join(","):null},Ct={find:(e,t=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(t,e)),findOne:(e,t=document.documentElement)=>Element.prototype.querySelector.call(t,e),children:(e,t)=>[].concat(...e.children).filter(e=>e.matches(t)),parents(e,t){const n=[];let i=e.parentNode.closest(t);for(;i;)n.push(i),i=i.parentNode.closest(t);return n},prev(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return[n];n=n.previousElementSibling}return[]},next(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return[n];n=n.nextElementSibling}return[]},focusableChildren(e){const t=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(e=>`${e}:not([tabindex^="-"])`).join(",");return this.find(t,e).filter(e=>!We(e)&&qe(e))},getSelectorFromElement(e){const t=Et(e);return t&&Ct.findOne(t)?t:null},getElementFromSelector(e){const t=Et(e);return t?Ct.findOne(t):null},getMultipleElementsFromSelector(e){const t=Et(e);return t?Ct.find(t):[]}},St=(e,t="hide")=>{const n=`click.dismiss${e.EVENT_KEY}`,i=e.NAME;mt.on(document,n,`[data-bs-dismiss="${i}"]`,function(n){if(["A","AREA"].includes(this.tagName)&&n.preventDefault(),We(this))return;const o=Ct.getElementFromSelector(this)||this.closest(`.${i}`);e.getOrCreateInstance(o)[t]()})},Tt=".bs.alert",kt=`close${Tt}`,At=`closed${Tt}`;class Ot extends xt{static get NAME(){return"alert"}close(){if(mt.trigger(this._element,kt).defaultPrevented)return;this._element.classList.remove("show");const e=this._element.classList.contains("fade");this._queueCallback(()=>this._destroyElement(),this._element,e)}_destroyElement(){this._element.remove(),mt.trigger(this._element,At),this.dispose()}static jQueryInterface(e){return this.each(function(){const t=Ot.getOrCreateInstance(this);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e](this)}})}}St(Ot,"close"),Ke(Ot);const Mt='[data-bs-toggle="button"]';class Pt extends xt{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(e){return this.each(function(){const t=Pt.getOrCreateInstance(this);"toggle"===e&&t[e]()})}}mt.on(document,"click.bs.button.data-api",Mt,e=>{e.preventDefault();const t=e.target.closest(Mt);Pt.getOrCreateInstance(t).toggle()}),Ke(Pt);const Lt=".bs.swipe",Dt=`touchstart${Lt}`,It=`touchmove${Lt}`,jt=`touchend${Lt}`,Nt=`pointerdown${Lt}`,Rt=`pointerup${Lt}`,Ft={endCallback:null,leftCallback:null,rightCallback:null},zt={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Ht extends _t{constructor(e,t){super(),this._element=e,e&&Ht.isSupported()&&(this._config=this._getConfig(t),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return Ft}static get DefaultType(){return zt}static get NAME(){return"swipe"}dispose(){mt.off(this._element,Lt)}_start(e){this._supportPointerEvents?this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX):this._deltaX=e.touches[0].clientX}_end(e){this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX-this._deltaX),this._handleSwipe(),Je(this._config.endCallback)}_move(e){this._deltaX=e.touches&&e.touches.length>1?0:e.touches[0].clientX-this._deltaX}_handleSwipe(){const e=Math.abs(this._deltaX);if(e<=40)return;const t=e/this._deltaX;this._deltaX=0,t&&Je(t>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(mt.on(this._element,Nt,e=>this._start(e)),mt.on(this._element,Rt,e=>this._end(e)),this._element.classList.add("pointer-event")):(mt.on(this._element,Dt,e=>this._start(e)),mt.on(this._element,It,e=>this._move(e)),mt.on(this._element,jt,e=>this._end(e)))}_eventIsPointerPenTouch(e){return this._supportPointerEvents&&("pen"===e.pointerType||"touch"===e.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const $t=".bs.carousel",Bt=".data-api",qt="ArrowLeft",Wt="ArrowRight",Vt="next",Xt="prev",Yt="left",Ut="right",Gt=`slide${$t}`,Zt=`slid${$t}`,Kt=`keydown${$t}`,Jt=`mouseenter${$t}`,Qt=`mouseleave${$t}`,en=`dragstart${$t}`,tn=`load${$t}${Bt}`,nn=`click${$t}${Bt}`,on="carousel",sn="active",rn=".active",an=".carousel-item",ln=rn+an,cn={[qt]:Ut,[Wt]:Yt},un={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},hn={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class dn extends xt{constructor(e,t){super(e,t),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=Ct.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===on&&this.cycle()}static get Default(){return un}static get DefaultType(){return hn}static get NAME(){return"carousel"}next(){this._slide(Vt)}nextWhenVisible(){!document.hidden&&qe(this._element)&&this.next()}prev(){this._slide(Xt)}pause(){this._isSliding&&He(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?mt.one(this._element,Zt,()=>this.cycle()):this.cycle())}to(e){const t=this._getItems();if(e>t.length-1||e<0)return;if(this._isSliding)return void mt.one(this._element,Zt,()=>this.to(e));const n=this._getItemIndex(this._getActive());if(n===e)return;const i=e>n?Vt:Xt;this._slide(i,t[e])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(e){return e.defaultInterval=e.interval,e}_addEventListeners(){this._config.keyboard&&mt.on(this._element,Kt,e=>this._keydown(e)),"hover"===this._config.pause&&(mt.on(this._element,Jt,()=>this.pause()),mt.on(this._element,Qt,()=>this._maybeEnableCycle())),this._config.touch&&Ht.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const e of Ct.find(".carousel-item img",this._element))mt.on(e,en,e=>e.preventDefault());const e={leftCallback:()=>this._slide(this._directionToOrder(Yt)),rightCallback:()=>this._slide(this._directionToOrder(Ut)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),500+this._config.interval))}};this._swipeHelper=new Ht(this._element,e)}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;const t=cn[e.key];t&&(e.preventDefault(),this._slide(this._directionToOrder(t)))}_getItemIndex(e){return this._getItems().indexOf(e)}_setActiveIndicatorElement(e){if(!this._indicatorsElement)return;const t=Ct.findOne(rn,this._indicatorsElement);t.classList.remove(sn),t.removeAttribute("aria-current");const n=Ct.findOne(`[data-bs-slide-to="${e}"]`,this._indicatorsElement);n&&(n.classList.add(sn),n.setAttribute("aria-current","true"))}_updateInterval(){const e=this._activeElement||this._getActive();if(!e)return;const t=Number.parseInt(e.getAttribute("data-bs-interval"),10);this._config.interval=t||this._config.defaultInterval}_slide(e,t=null){if(this._isSliding)return;const n=this._getActive(),i=e===Vt,o=t||et(this._getItems(),n,i,this._config.wrap);if(o===n)return;const s=this._getItemIndex(o),r=t=>mt.trigger(this._element,t,{relatedTarget:o,direction:this._orderToDirection(e),from:this._getItemIndex(n),to:s});if(r(Gt).defaultPrevented)return;if(!n||!o)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(s),this._activeElement=o;const l=i?"carousel-item-start":"carousel-item-end",c=i?"carousel-item-next":"carousel-item-prev";o.classList.add(c),Ye(o),n.classList.add(l),o.classList.add(l);this._queueCallback(()=>{o.classList.remove(l,c),o.classList.add(sn),n.classList.remove(sn,c,l),this._isSliding=!1,r(Zt)},n,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return Ct.findOne(ln,this._element)}_getItems(){return Ct.find(an,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(e){return Ze()?e===Yt?Xt:Vt:e===Yt?Vt:Xt}_orderToDirection(e){return Ze()?e===Xt?Yt:Ut:e===Xt?Ut:Yt}static jQueryInterface(e){return this.each(function(){const t=dn.getOrCreateInstance(this,e);if("number"!=typeof e){if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}}else t.to(e)})}}mt.on(document,nn,"[data-bs-slide], [data-bs-slide-to]",function(e){const t=Ct.getElementFromSelector(this);if(!t||!t.classList.contains(on))return;e.preventDefault();const n=dn.getOrCreateInstance(t),i=this.getAttribute("data-bs-slide-to");return i?(n.to(i),void n._maybeEnableCycle()):"next"===wt.getDataAttribute(this,"slide")?(n.next(),void n._maybeEnableCycle()):(n.prev(),void n._maybeEnableCycle())}),mt.on(window,tn,()=>{const e=Ct.find('[data-bs-ride="carousel"]');for(const t of e)dn.getOrCreateInstance(t)}),Ke(dn);const fn=".bs.collapse",pn=`show${fn}`,gn=`shown${fn}`,mn=`hide${fn}`,vn=`hidden${fn}`,bn=`click${fn}.data-api`,yn="show",wn="collapse",_n="collapsing",xn=`:scope .${wn} .${wn}`,En='[data-bs-toggle="collapse"]',Cn={parent:null,toggle:!0},Sn={parent:"(null|element)",toggle:"boolean"};class Tn extends xt{constructor(e,t){super(e,t),this._isTransitioning=!1,this._triggerArray=[];const n=Ct.find(En);for(const e of n){const t=Ct.getSelectorFromElement(e),n=Ct.find(t).filter(e=>e===this._element);null!==t&&n.length&&this._triggerArray.push(e)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Cn}static get DefaultType(){return Sn}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let e=[];if(this._config.parent&&(e=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter(e=>e!==this._element).map(e=>Tn.getOrCreateInstance(e,{toggle:!1}))),e.length&&e[0]._isTransitioning)return;if(mt.trigger(this._element,pn).defaultPrevented)return;for(const t of e)t.hide();const t=this._getDimension();this._element.classList.remove(wn),this._element.classList.add(_n),this._element.style[t]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const n=`scroll${t[0].toUpperCase()+t.slice(1)}`;this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(_n),this._element.classList.add(wn,yn),this._element.style[t]="",mt.trigger(this._element,gn)},this._element,!0),this._element.style[t]=`${this._element[n]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(mt.trigger(this._element,mn).defaultPrevented)return;const e=this._getDimension();this._element.style[e]=`${this._element.getBoundingClientRect()[e]}px`,Ye(this._element),this._element.classList.add(_n),this._element.classList.remove(wn,yn);for(const e of this._triggerArray){const t=Ct.getElementFromSelector(e);t&&!this._isShown(t)&&this._addAriaAndCollapsedClass([e],!1)}this._isTransitioning=!0;this._element.style[e]="",this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(_n),this._element.classList.add(wn),mt.trigger(this._element,vn)},this._element,!0)}_isShown(e=this._element){return e.classList.contains(yn)}_configAfterMerge(e){return e.toggle=Boolean(e.toggle),e.parent=Be(e.parent),e}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const e=this._getFirstLevelChildren(En);for(const t of e){const e=Ct.getElementFromSelector(t);e&&this._addAriaAndCollapsedClass([t],this._isShown(e))}}_getFirstLevelChildren(e){const t=Ct.find(xn,this._config.parent);return Ct.find(e,this._config.parent).filter(e=>!t.includes(e))}_addAriaAndCollapsedClass(e,t){if(e.length)for(const n of e)n.classList.toggle("collapsed",!t),n.setAttribute("aria-expanded",t)}static jQueryInterface(e){const t={};return"string"==typeof e&&/show|hide/.test(e)&&(t.toggle=!1),this.each(function(){const n=Tn.getOrCreateInstance(this,t);if("string"==typeof e){if(void 0===n[e])throw new TypeError(`No method named "${e}"`);n[e]()}})}}mt.on(document,bn,En,function(e){("A"===e.target.tagName||e.delegateTarget&&"A"===e.delegateTarget.tagName)&&e.preventDefault();for(const e of Ct.getMultipleElementsFromSelector(this))Tn.getOrCreateInstance(e,{toggle:!1}).toggle()}),Ke(Tn);const kn="dropdown",An=".bs.dropdown",On=".data-api",Mn="ArrowUp",Pn="ArrowDown",Ln=`hide${An}`,Dn=`hidden${An}`,In=`show${An}`,jn=`shown${An}`,Nn=`click${An}${On}`,Rn=`keydown${An}${On}`,Fn=`keyup${An}${On}`,zn="show",Hn='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',$n=`${Hn}.${zn}`,Bn=".dropdown-menu",qn=Ze()?"top-end":"top-start",Wn=Ze()?"top-start":"top-end",Vn=Ze()?"bottom-end":"bottom-start",Xn=Ze()?"bottom-start":"bottom-end",Yn=Ze()?"left-start":"right-start",Un=Ze()?"right-start":"left-start",Gn={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},Zn={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class Kn extends xt{constructor(e,t){super(e,t),this._popper=null,this._parent=this._element.parentNode,this._menu=Ct.next(this._element,Bn)[0]||Ct.prev(this._element,Bn)[0]||Ct.findOne(Bn,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return Gn}static get DefaultType(){return Zn}static get NAME(){return kn}toggle(){return this._isShown()?this.hide():this.show()}show(){if(We(this._element)||this._isShown())return;const e={relatedTarget:this._element};if(!mt.trigger(this._element,In,e).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const e of[].concat(...document.body.children))mt.on(e,"mouseover",Xe);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(zn),this._element.classList.add(zn),mt.trigger(this._element,jn,e)}}hide(){if(We(this._element)||!this._isShown())return;const e={relatedTarget:this._element};this._completeHide(e)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(e){if(!mt.trigger(this._element,Ln,e).defaultPrevented){if("ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))mt.off(e,"mouseover",Xe);this._popper&&this._popper.destroy(),this._menu.classList.remove(zn),this._element.classList.remove(zn),this._element.setAttribute("aria-expanded","false"),wt.removeDataAttribute(this._menu,"popper"),mt.trigger(this._element,Dn,e),this._element.focus()}}_getConfig(e){if("object"==typeof(e=super._getConfig(e)).reference&&!$e(e.reference)&&"function"!=typeof e.reference.getBoundingClientRect)throw new TypeError(`${kn.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return e}_createPopper(){let e=this._element;"parent"===this._config.reference?e=this._parent:$e(this._config.reference)?e=Be(this._config.reference):"object"==typeof this._config.reference&&(e=this._config.reference);const t=this._getPopperConfig();this._popper=De(e,this._menu,t)}_isShown(){return this._menu.classList.contains(zn)}_getPlacement(){const e=this._parent;if(e.classList.contains("dropend"))return Yn;if(e.classList.contains("dropstart"))return Un;if(e.classList.contains("dropup-center"))return"top";if(e.classList.contains("dropdown-center"))return"bottom";const t="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return e.classList.contains("dropup")?t?Wn:qn:t?Xn:Vn}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:e}=this._config;return"string"==typeof e?e.split(",").map(e=>Number.parseInt(e,10)):"function"==typeof e?t=>e(t,this._element):e}_getPopperConfig(){const e={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(wt.setDataAttribute(this._menu,"popper","static"),e.modifiers=[{name:"applyStyles",enabled:!1}]),{...e,...Je(this._config.popperConfig,[void 0,e])}}_selectMenuItem({key:e,target:t}){const n=Ct.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter(e=>qe(e));n.length&&et(n,t,e===Pn,!n.includes(t)).focus()}static jQueryInterface(e){return this.each(function(){const t=Kn.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}})}static clearMenus(e){if(2===e.button||"keyup"===e.type&&"Tab"!==e.key)return;const t=Ct.find($n);for(const n of t){const t=Kn.getInstance(n);if(!t||!1===t._config.autoClose)continue;const i=e.composedPath(),o=i.includes(t._menu);if(i.includes(t._element)||"inside"===t._config.autoClose&&!o||"outside"===t._config.autoClose&&o)continue;if(t._menu.contains(e.target)&&("keyup"===e.type&&"Tab"===e.key||/input|select|option|textarea|form/i.test(e.target.tagName)))continue;const s={relatedTarget:t._element};"click"===e.type&&(s.clickEvent=e),t._completeHide(s)}}static dataApiKeydownHandler(e){const t=/input|textarea/i.test(e.target.tagName),n="Escape"===e.key,i=[Mn,Pn].includes(e.key);if(!i&&!n)return;if(t&&!n)return;e.preventDefault();const o=this.matches(Hn)?this:Ct.prev(this,Hn)[0]||Ct.next(this,Hn)[0]||Ct.findOne(Hn,e.delegateTarget.parentNode),s=Kn.getOrCreateInstance(o);if(i)return e.stopPropagation(),s.show(),void s._selectMenuItem(e);s._isShown()&&(e.stopPropagation(),s.hide(),o.focus())}}mt.on(document,Rn,Hn,Kn.dataApiKeydownHandler),mt.on(document,Rn,Bn,Kn.dataApiKeydownHandler),mt.on(document,Nn,Kn.clearMenus),mt.on(document,Fn,Kn.clearMenus),mt.on(document,Nn,Hn,function(e){e.preventDefault(),Kn.getOrCreateInstance(this).toggle()}),Ke(Kn);const Jn="backdrop",Qn="show",ei=`mousedown.bs.${Jn}`,ti={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},ni={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class ii extends _t{constructor(e){super(),this._config=this._getConfig(e),this._isAppended=!1,this._element=null}static get Default(){return ti}static get DefaultType(){return ni}static get NAME(){return Jn}show(e){if(!this._config.isVisible)return void Je(e);this._append();const t=this._getElement();this._config.isAnimated&&Ye(t),t.classList.add(Qn),this._emulateAnimation(()=>{Je(e)})}hide(e){this._config.isVisible?(this._getElement().classList.remove(Qn),this._emulateAnimation(()=>{this.dispose(),Je(e)})):Je(e)}dispose(){this._isAppended&&(mt.off(this._element,ei),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const e=document.createElement("div");e.className=this._config.className,this._config.isAnimated&&e.classList.add("fade"),this._element=e}return this._element}_configAfterMerge(e){return e.rootElement=Be(e.rootElement),e}_append(){if(this._isAppended)return;const e=this._getElement();this._config.rootElement.append(e),mt.on(e,ei,()=>{Je(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(e){Qe(e,this._getElement(),this._config.isAnimated)}}const oi=".bs.focustrap",si=`focusin${oi}`,ri=`keydown.tab${oi}`,ai="backward",li={autofocus:!0,trapElement:null},ci={autofocus:"boolean",trapElement:"element"};class ui extends _t{constructor(e){super(),this._config=this._getConfig(e),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return li}static get DefaultType(){return ci}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),mt.off(document,oi),mt.on(document,si,e=>this._handleFocusin(e)),mt.on(document,ri,e=>this._handleKeydown(e)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,mt.off(document,oi))}_handleFocusin(e){const{trapElement:t}=this._config;if(e.target===document||e.target===t||t.contains(e.target))return;const n=Ct.focusableChildren(t);0===n.length?t.focus():this._lastTabNavDirection===ai?n[n.length-1].focus():n[0].focus()}_handleKeydown(e){"Tab"===e.key&&(this._lastTabNavDirection=e.shiftKey?ai:"forward")}}const hi=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",di=".sticky-top",fi="padding-right",pi="margin-right";class gi{constructor(){this._element=document.body}getWidth(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}hide(){const e=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,fi,t=>t+e),this._setElementAttributes(hi,fi,t=>t+e),this._setElementAttributes(di,pi,t=>t-e)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,fi),this._resetElementAttributes(hi,fi),this._resetElementAttributes(di,pi)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,t,n){const i=this.getWidth();this._applyManipulationCallback(e,e=>{if(e!==this._element&&window.innerWidth>e.clientWidth+i)return;this._saveInitialAttribute(e,t);const o=window.getComputedStyle(e).getPropertyValue(t);e.style.setProperty(t,`${n(Number.parseFloat(o))}px`)})}_saveInitialAttribute(e,t){const n=e.style.getPropertyValue(t);n&&wt.setDataAttribute(e,t,n)}_resetElementAttributes(e,t){this._applyManipulationCallback(e,e=>{const n=wt.getDataAttribute(e,t);null!==n?(wt.removeDataAttribute(e,t),e.style.setProperty(t,n)):e.style.removeProperty(t)})}_applyManipulationCallback(e,t){if($e(e))t(e);else for(const n of Ct.find(e,this._element))t(n)}}const mi=".bs.modal",vi=`hide${mi}`,bi=`hidePrevented${mi}`,yi=`hidden${mi}`,wi=`show${mi}`,_i=`shown${mi}`,xi=`resize${mi}`,Ei=`click.dismiss${mi}`,Ci=`mousedown.dismiss${mi}`,Si=`keydown.dismiss${mi}`,Ti=`click${mi}.data-api`,ki="modal-open",Ai="show",Oi="modal-static",Mi={backdrop:!0,focus:!0,keyboard:!0},Pi={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Li extends xt{constructor(e,t){super(e,t),this._dialog=Ct.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new gi,this._addEventListeners()}static get Default(){return Mi}static get DefaultType(){return Pi}static get NAME(){return"modal"}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){if(this._isShown||this._isTransitioning)return;mt.trigger(this._element,wi,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(ki),this._adjustDialog(),this._backdrop.show(()=>this._showElement(e)))}hide(){if(!this._isShown||this._isTransitioning)return;mt.trigger(this._element,vi).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(Ai),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){mt.off(window,mi),mt.off(this._dialog,mi),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new ii({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new ui({trapElement:this._element})}_showElement(e){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const t=Ct.findOne(".modal-body",this._dialog);t&&(t.scrollTop=0),Ye(this._element),this._element.classList.add(Ai);this._queueCallback(()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,mt.trigger(this._element,_i,{relatedTarget:e})},this._dialog,this._isAnimated())}_addEventListeners(){mt.on(this._element,Si,e=>{"Escape"===e.key&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())}),mt.on(window,xi,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),mt.on(this._element,Ci,e=>{mt.one(this._element,Ei,t=>{this._element===e.target&&this._element===t.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(ki),this._resetAdjustments(),this._scrollBar.reset(),mt.trigger(this._element,yi)})}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(mt.trigger(this._element,bi).defaultPrevented)return;const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._element.style.overflowY;"hidden"===t||this._element.classList.contains(Oi)||(e||(this._element.style.overflowY="hidden"),this._element.classList.add(Oi),this._queueCallback(()=>{this._element.classList.remove(Oi),this._queueCallback(()=>{this._element.style.overflowY=t},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._scrollBar.getWidth(),n=t>0;if(n&&!e){const e=Ze()?"paddingLeft":"paddingRight";this._element.style[e]=`${t}px`}if(!n&&e){const e=Ze()?"paddingRight":"paddingLeft";this._element.style[e]=`${t}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,t){return this.each(function(){const n=Li.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===n[e])throw new TypeError(`No method named "${e}"`);n[e](t)}})}}mt.on(document,Ti,'[data-bs-toggle="modal"]',function(e){const t=Ct.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&e.preventDefault(),mt.one(t,wi,e=>{e.defaultPrevented||mt.one(t,yi,()=>{qe(this)&&this.focus()})});const n=Ct.findOne(".modal.show");n&&Li.getInstance(n).hide();Li.getOrCreateInstance(t).toggle(this)}),St(Li),Ke(Li);const Di=".bs.offcanvas",Ii=".data-api",ji=`load${Di}${Ii}`,Ni="show",Ri="showing",Fi="hiding",zi=".offcanvas.show",Hi=`show${Di}`,$i=`shown${Di}`,Bi=`hide${Di}`,qi=`hidePrevented${Di}`,Wi=`hidden${Di}`,Vi=`resize${Di}`,Xi=`click${Di}${Ii}`,Yi=`keydown.dismiss${Di}`,Ui={backdrop:!0,keyboard:!0,scroll:!1},Gi={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Zi extends xt{constructor(e,t){super(e,t),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Ui}static get DefaultType(){return Gi}static get NAME(){return"offcanvas"}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){if(this._isShown)return;if(mt.trigger(this._element,Hi,{relatedTarget:e}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||(new gi).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(Ri);this._queueCallback(()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(Ni),this._element.classList.remove(Ri),mt.trigger(this._element,$i,{relatedTarget:e})},this._element,!0)}hide(){if(!this._isShown)return;if(mt.trigger(this._element,Bi).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(Fi),this._backdrop.hide();this._queueCallback(()=>{this._element.classList.remove(Ni,Fi),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new gi).reset(),mt.trigger(this._element,Wi)},this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const e=Boolean(this._config.backdrop);return new ii({className:"offcanvas-backdrop",isVisible:e,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:e?()=>{"static"!==this._config.backdrop?this.hide():mt.trigger(this._element,qi)}:null})}_initializeFocusTrap(){return new ui({trapElement:this._element})}_addEventListeners(){mt.on(this._element,Yi,e=>{"Escape"===e.key&&(this._config.keyboard?this.hide():mt.trigger(this._element,qi))})}static jQueryInterface(e){return this.each(function(){const t=Zi.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e](this)}})}}mt.on(document,Xi,'[data-bs-toggle="offcanvas"]',function(e){const t=Ct.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),We(this))return;mt.one(t,Wi,()=>{qe(this)&&this.focus()});const n=Ct.findOne(zi);n&&n!==t&&Zi.getInstance(n).hide();Zi.getOrCreateInstance(t).toggle(this)}),mt.on(window,ji,()=>{for(const e of Ct.find(zi))Zi.getOrCreateInstance(e).show()}),mt.on(window,Vi,()=>{for(const e of Ct.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(e).position&&Zi.getOrCreateInstance(e).hide()}),St(Zi),Ke(Zi);const Ki={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Ji=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Qi=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,eo=(e,t)=>{const n=e.nodeName.toLowerCase();return t.includes(n)?!Ji.has(n)||Boolean(Qi.test(e.nodeValue)):t.filter(e=>e instanceof RegExp).some(e=>e.test(n))};const to={allowList:Ki,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},no={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},io={entry:"(string|element|function|null)",selector:"(string|element)"};class oo extends _t{constructor(e){super(),this._config=this._getConfig(e)}static get Default(){return to}static get DefaultType(){return no}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map(e=>this._resolvePossibleFunction(e)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(e){return this._checkContent(e),this._config.content={...this._config.content,...e},this}toHtml(){const e=document.createElement("div");e.innerHTML=this._maybeSanitize(this._config.template);for(const[t,n]of Object.entries(this._config.content))this._setContent(e,n,t);const t=e.children[0],n=this._resolvePossibleFunction(this._config.extraClass);return n&&t.classList.add(...n.split(" ")),t}_typeCheckConfig(e){super._typeCheckConfig(e),this._checkContent(e.content)}_checkContent(e){for(const[t,n]of Object.entries(e))super._typeCheckConfig({selector:t,entry:n},io)}_setContent(e,t,n){const i=Ct.findOne(n,e);i&&((t=this._resolvePossibleFunction(t))?$e(t)?this._putElementInTemplate(Be(t),i):this._config.html?i.innerHTML=this._maybeSanitize(t):i.textContent=t:i.remove())}_maybeSanitize(e){return this._config.sanitize?function(e,t,n){if(!e.length)return e;if(n&&"function"==typeof n)return n(e);const i=(new window.DOMParser).parseFromString(e,"text/html"),o=[].concat(...i.body.querySelectorAll("*"));for(const e of o){const n=e.nodeName.toLowerCase();if(!Object.keys(t).includes(n)){e.remove();continue}const i=[].concat(...e.attributes),o=[].concat(t["*"]||[],t[n]||[]);for(const t of i)eo(t,o)||e.removeAttribute(t.nodeName)}return i.body.innerHTML}(e,this._config.allowList,this._config.sanitizeFn):e}_resolvePossibleFunction(e){return Je(e,[void 0,this])}_putElementInTemplate(e,t){if(this._config.html)return t.innerHTML="",void t.append(e);t.textContent=e.textContent}}const so=new Set(["sanitize","allowList","sanitizeFn"]),ro="fade",ao="show",lo=".tooltip-inner",co=".modal",uo="hide.bs.modal",ho="hover",fo="focus",po="click",go={AUTO:"auto",TOP:"top",RIGHT:Ze()?"left":"right",BOTTOM:"bottom",LEFT:Ze()?"right":"left"},mo={allowList:Ki,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},vo={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class bo extends xt{constructor(e,t){super(e,t),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return mo}static get DefaultType(){return vo}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),mt.off(this._element.closest(co),uo,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const e=mt.trigger(this._element,this.constructor.eventName("show")),t=(Ve(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(e.defaultPrevented||!t)return;this._disposePopper();const n=this._getTipElement();this._element.setAttribute("aria-describedby",n.getAttribute("id"));const{container:i}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(i.append(n),mt.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(n),n.classList.add(ao),"ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))mt.on(e,"mouseover",Xe);this._queueCallback(()=>{mt.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1},this.tip,this._isAnimated())}hide(){if(!this._isShown())return;if(mt.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented)return;if(this._getTipElement().classList.remove(ao),"ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))mt.off(e,"mouseover",Xe);this._activeTrigger[po]=!1,this._activeTrigger[fo]=!1,this._activeTrigger[ho]=!1,this._isHovered=null;this._queueCallback(()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),mt.trigger(this._element,this.constructor.eventName("hidden")))},this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(e){const t=this._getTemplateFactory(e).toHtml();if(!t)return null;t.classList.remove(ro,ao),t.classList.add(`bs-${this.constructor.NAME}-auto`);const n=(e=>{do{e+=Math.floor(1e6*Math.random())}while(document.getElementById(e));return e})(this.constructor.NAME).toString();return t.setAttribute("id",n),this._isAnimated()&&t.classList.add(ro),t}setContent(e){this._newContent=e,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(e){return this._templateFactory?this._templateFactory.changeContent(e):this._templateFactory=new oo({...this._config,content:e,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[lo]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(e){return this.constructor.getOrCreateInstance(e.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(ro)}_isShown(){return this.tip&&this.tip.classList.contains(ao)}_createPopper(e){const t=Je(this._config.placement,[this,e,this._element]),n=go[t.toUpperCase()];return De(this._element,e,this._getPopperConfig(n))}_getOffset(){const{offset:e}=this._config;return"string"==typeof e?e.split(",").map(e=>Number.parseInt(e,10)):"function"==typeof e?t=>e(t,this._element):e}_resolvePossibleFunction(e){return Je(e,[this._element,this._element])}_getPopperConfig(e){const t={placement:e,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:e=>{this._getTipElement().setAttribute("data-popper-placement",e.state.placement)}}]};return{...t,...Je(this._config.popperConfig,[void 0,t])}}_setListeners(){const e=this._config.trigger.split(" ");for(const t of e)if("click"===t)mt.on(this._element,this.constructor.eventName("click"),this._config.selector,e=>{const t=this._initializeOnDelegatedTarget(e);t._activeTrigger[po]=!(t._isShown()&&t._activeTrigger[po]),t.toggle()});else if("manual"!==t){const e=t===ho?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),n=t===ho?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");mt.on(this._element,e,this._config.selector,e=>{const t=this._initializeOnDelegatedTarget(e);t._activeTrigger["focusin"===e.type?fo:ho]=!0,t._enter()}),mt.on(this._element,n,this._config.selector,e=>{const t=this._initializeOnDelegatedTarget(e);t._activeTrigger["focusout"===e.type?fo:ho]=t._element.contains(e.relatedTarget),t._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},mt.on(this._element.closest(co),uo,this._hideModalHandler)}_fixTitle(){const e=this._element.getAttribute("title");e&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",e),this._element.setAttribute("data-bs-original-title",e),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(e,t){clearTimeout(this._timeout),this._timeout=setTimeout(e,t)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(e){const t=wt.getDataAttributes(this._element);for(const e of Object.keys(t))so.has(e)&&delete t[e];return e={...t,..."object"==typeof e&&e?e:{}},e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e.container=!1===e.container?document.body:Be(e.container),"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),"number"==typeof e.title&&(e.title=e.title.toString()),"number"==typeof e.content&&(e.content=e.content.toString()),e}_getDelegateConfig(){const e={};for(const[t,n]of Object.entries(this._config))this.constructor.Default[t]!==n&&(e[t]=n);return e.selector=!1,e.trigger="manual",e}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(e){return this.each(function(){const t=bo.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}})}}Ke(bo);const yo=".popover-header",wo=".popover-body",_o={...bo.Default,content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"},xo={...bo.DefaultType,content:"(null|string|element|function)"};class Eo extends bo{static get Default(){return _o}static get DefaultType(){return xo}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[yo]:this._getTitle(),[wo]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(e){return this.each(function(){const t=Eo.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}})}}Ke(Eo);const Co=".bs.scrollspy",So=`activate${Co}`,To=`click${Co}`,ko=`load${Co}.data-api`,Ao="active",Oo="[href]",Mo=".nav-link",Po=`${Mo}, .nav-item > ${Mo}, .list-group-item`,Lo={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Do={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Io extends xt{constructor(e,t){super(e,t),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Lo}static get DefaultType(){return Do}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const e of this._observableSections.values())this._observer.observe(e)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(e){return e.target=Be(e.target)||document.body,e.rootMargin=e.offset?`${e.offset}px 0px -30%`:e.rootMargin,"string"==typeof e.threshold&&(e.threshold=e.threshold.split(",").map(e=>Number.parseFloat(e))),e}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(mt.off(this._config.target,To),mt.on(this._config.target,To,Oo,e=>{const t=this._observableSections.get(e.target.hash);if(t){e.preventDefault();const n=this._rootElement||window,i=t.offsetTop-this._element.offsetTop;if(n.scrollTo)return void n.scrollTo({top:i,behavior:"smooth"});n.scrollTop=i}}))}_getNewObserver(){const e={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(e=>this._observerCallback(e),e)}_observerCallback(e){const t=e=>this._targetLinks.get(`#${e.target.id}`),n=e=>{this._previousScrollData.visibleEntryTop=e.target.offsetTop,this._process(t(e))},i=(this._rootElement||document.documentElement).scrollTop,o=i>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=i;for(const s of e){if(!s.isIntersecting){this._activeTarget=null,this._clearActiveClass(t(s));continue}const e=s.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(o&&e){if(n(s),!i)return}else o||e||n(s)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const e=Ct.find(Oo,this._config.target);for(const t of e){if(!t.hash||We(t))continue;const e=Ct.findOne(decodeURI(t.hash),this._element);qe(e)&&(this._targetLinks.set(decodeURI(t.hash),t),this._observableSections.set(t.hash,e))}}_process(e){this._activeTarget!==e&&(this._clearActiveClass(this._config.target),this._activeTarget=e,e.classList.add(Ao),this._activateParents(e),mt.trigger(this._element,So,{relatedTarget:e}))}_activateParents(e){if(e.classList.contains("dropdown-item"))Ct.findOne(".dropdown-toggle",e.closest(".dropdown")).classList.add(Ao);else for(const t of Ct.parents(e,".nav, .list-group"))for(const e of Ct.prev(t,Po))e.classList.add(Ao)}_clearActiveClass(e){e.classList.remove(Ao);const t=Ct.find(`${Oo}.${Ao}`,e);for(const e of t)e.classList.remove(Ao)}static jQueryInterface(e){return this.each(function(){const t=Io.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}})}}mt.on(window,ko,()=>{for(const e of Ct.find('[data-bs-spy="scroll"]'))Io.getOrCreateInstance(e)}),Ke(Io);const jo=".bs.tab",No=`hide${jo}`,Ro=`hidden${jo}`,Fo=`show${jo}`,zo=`shown${jo}`,Ho=`click${jo}`,$o=`keydown${jo}`,Bo=`load${jo}`,qo="ArrowLeft",Wo="ArrowRight",Vo="ArrowUp",Xo="ArrowDown",Yo="Home",Uo="End",Go="active",Zo="fade",Ko="show",Jo=".dropdown-toggle",Qo=`:not(${Jo})`,es='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',ts=`${`.nav-link${Qo}, .list-group-item${Qo}, [role="tab"]${Qo}`}, ${es}`,ns=`.${Go}[data-bs-toggle="tab"], .${Go}[data-bs-toggle="pill"], .${Go}[data-bs-toggle="list"]`;class is extends xt{constructor(e){super(e),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),mt.on(this._element,$o,e=>this._keydown(e)))}static get NAME(){return"tab"}show(){const e=this._element;if(this._elemIsActive(e))return;const t=this._getActiveElem(),n=t?mt.trigger(t,No,{relatedTarget:e}):null;mt.trigger(e,Fo,{relatedTarget:t}).defaultPrevented||n&&n.defaultPrevented||(this._deactivate(t,e),this._activate(e,t))}_activate(e,t){if(!e)return;e.classList.add(Go),this._activate(Ct.getElementFromSelector(e));this._queueCallback(()=>{"tab"===e.getAttribute("role")?(e.removeAttribute("tabindex"),e.setAttribute("aria-selected",!0),this._toggleDropDown(e,!0),mt.trigger(e,zo,{relatedTarget:t})):e.classList.add(Ko)},e,e.classList.contains(Zo))}_deactivate(e,t){if(!e)return;e.classList.remove(Go),e.blur(),this._deactivate(Ct.getElementFromSelector(e));this._queueCallback(()=>{"tab"===e.getAttribute("role")?(e.setAttribute("aria-selected",!1),e.setAttribute("tabindex","-1"),this._toggleDropDown(e,!1),mt.trigger(e,Ro,{relatedTarget:t})):e.classList.remove(Ko)},e,e.classList.contains(Zo))}_keydown(e){if(![qo,Wo,Vo,Xo,Yo,Uo].includes(e.key))return;e.stopPropagation(),e.preventDefault();const t=this._getChildren().filter(e=>!We(e));let n;if([Yo,Uo].includes(e.key))n=t[e.key===Yo?0:t.length-1];else{const i=[Wo,Xo].includes(e.key);n=et(t,e.target,i,!0)}n&&(n.focus({preventScroll:!0}),is.getOrCreateInstance(n).show())}_getChildren(){return Ct.find(ts,this._parent)}_getActiveElem(){return this._getChildren().find(e=>this._elemIsActive(e))||null}_setInitialAttributes(e,t){this._setAttributeIfNotExists(e,"role","tablist");for(const e of t)this._setInitialAttributesOnChild(e)}_setInitialAttributesOnChild(e){e=this._getInnerElement(e);const t=this._elemIsActive(e),n=this._getOuterElement(e);e.setAttribute("aria-selected",t),n!==e&&this._setAttributeIfNotExists(n,"role","presentation"),t||e.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(e,"role","tab"),this._setInitialAttributesOnTargetPanel(e)}_setInitialAttributesOnTargetPanel(e){const t=Ct.getElementFromSelector(e);t&&(this._setAttributeIfNotExists(t,"role","tabpanel"),e.id&&this._setAttributeIfNotExists(t,"aria-labelledby",`${e.id}`))}_toggleDropDown(e,t){const n=this._getOuterElement(e);if(!n.classList.contains("dropdown"))return;const i=(e,i)=>{const o=Ct.findOne(e,n);o&&o.classList.toggle(i,t)};i(Jo,Go),i(".dropdown-menu",Ko),n.setAttribute("aria-expanded",t)}_setAttributeIfNotExists(e,t,n){e.hasAttribute(t)||e.setAttribute(t,n)}_elemIsActive(e){return e.classList.contains(Go)}_getInnerElement(e){return e.matches(ts)?e:Ct.findOne(ts,e)}_getOuterElement(e){return e.closest(".nav-item, .list-group-item")||e}static jQueryInterface(e){return this.each(function(){const t=is.getOrCreateInstance(this);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}})}}mt.on(document,Ho,es,function(e){["A","AREA"].includes(this.tagName)&&e.preventDefault(),We(this)||is.getOrCreateInstance(this).show()}),mt.on(window,Bo,()=>{for(const e of Ct.find(ns))is.getOrCreateInstance(e)}),Ke(is);const os=".bs.toast",ss=`mouseover${os}`,rs=`mouseout${os}`,as=`focusin${os}`,ls=`focusout${os}`,cs=`hide${os}`,us=`hidden${os}`,hs=`show${os}`,ds=`shown${os}`,fs="hide",ps="show",gs="showing",ms={animation:"boolean",autohide:"boolean",delay:"number"},vs={animation:!0,autohide:!0,delay:5e3};class bs extends xt{constructor(e,t){super(e,t),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return vs}static get DefaultType(){return ms}static get NAME(){return"toast"}show(){if(mt.trigger(this._element,hs).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add("fade");this._element.classList.remove(fs),Ye(this._element),this._element.classList.add(ps,gs),this._queueCallback(()=>{this._element.classList.remove(gs),mt.trigger(this._element,ds),this._maybeScheduleHide()},this._element,this._config.animation)}hide(){if(!this.isShown())return;if(mt.trigger(this._element,cs).defaultPrevented)return;this._element.classList.add(gs),this._queueCallback(()=>{this._element.classList.add(fs),this._element.classList.remove(gs,ps),mt.trigger(this._element,us)},this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(ps),super.dispose()}isShown(){return this._element.classList.contains(ps)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(e,t){switch(e.type){case"mouseover":case"mouseout":this._hasMouseInteraction=t;break;case"focusin":case"focusout":this._hasKeyboardInteraction=t}if(t)return void this._clearTimeout();const n=e.relatedTarget;this._element===n||this._element.contains(n)||this._maybeScheduleHide()}_setListeners(){mt.on(this._element,ss,e=>this._onInteraction(e,!0)),mt.on(this._element,rs,e=>this._onInteraction(e,!1)),mt.on(this._element,as,e=>this._onInteraction(e,!0)),mt.on(this._element,ls,e=>this._onInteraction(e,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each(function(){const t=bs.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e](this)}})}}St(bs),Ke(bs)},530:function(e,t,n){var i,o,s;!function(){"use strict";o=[n(692)],i=function e(t,n){let i={},o="6.0.4";i.VERSION=o;let s={en:{OK:"OK",CANCEL:"Cancel",CONFIRM:"OK"}},r={dialog:'<div class="bootbox modal" tabindex="-1" role="dialog" aria-hidden="true"><div class="modal-dialog"><div class="modal-content"><div class="modal-body"><div class="bootbox-body"></div></div></div></div></div>',header:'<div class="modal-header"><h5 class="modal-title"></h5></div>',footer:'<div class="modal-footer"></div>',closeButton:'<button type="button" class="bootbox-close-button close btn-close" aria-hidden="true" aria-label="Close"></button>',form:'<form class="bootbox-form"></form>',button:'<button type="button" class="btn"></button>',option:'<option value=""></option>',promptMessage:'<div class="bootbox-prompt-message"></div>',inputs:{text:'<input class="bootbox-input bootbox-input-text form-control" autocomplete="off" type="text" />',textarea:'<textarea class="bootbox-input bootbox-input-textarea form-control"></textarea>',email:'<input class="bootbox-input bootbox-input-email form-control" autocomplete="off" type="email" />',select:'<select class="bootbox-input bootbox-input-select form-select"></select>',checkbox:'<div class="form-check checkbox"><label class="form-check-label"><input class="form-check-input bootbox-input bootbox-input-checkbox" type="checkbox" /></label></div>',radio:'<div class="form-check radio"><label class="form-check-label"><input class="form-check-input bootbox-input bootbox-input-radio" type="radio" name="bootbox-radio" /></label></div>',date:'<input class="bootbox-input bootbox-input-date form-control" autocomplete="off" type="date" />',time:'<input class="bootbox-input bootbox-input-time form-control" autocomplete="off" type="time" />',number:'<input class="bootbox-input bootbox-input-number form-control" autocomplete="off" type="number" />',password:'<input class="bootbox-input bootbox-input-password form-control" autocomplete="off" type="password" />',range:'<input class="bootbox-input bootbox-input-range form-control-range" autocomplete="off" type="range" />'}},a={locale:"en",backdrop:"static",animate:!0,className:null,closeButton:!0,show:!0,container:"body",value:"",inputType:"text",errorMessage:null,swapButtonOrder:!1,centerVertical:!1,multiple:!1,scrollable:!1,reusable:!1,relatedTarget:null,size:null,id:null};function l(e,t){let n=e.length,i={};if(n<1||n>2)throw new Error("Invalid argument length");return 2===n||"string"==typeof e[0]?(i[t[0]]=e[0],i[t[1]]=e[1]):i=e[0],i}function c(e,n,i){return t.extend(!0,{},e,l(n,i))}function u(e,t,n,i){let o;if(i&&i[0]){o=i[0].locale||a.locale,(i[0].swapButtonOrder||a.swapButtonOrder)&&(t=t.reverse())}return h(c({className:"bootbox-"+e,buttons:d(t,o)},i,n),t)}function h(e,t){let i={};return m(t,function(e,t){i[t]=!0}),m(e.buttons,function(e){if(i[e]===n)throw new Error('button key "'+e+'" is not allowed (options are '+t.join(" ")+")")}),e}function d(e,t){let n={};for(let i=0,o=e.length;i<o;i++){let o=e[i],s=o.toLowerCase(),r=o.toUpperCase();n[s]={label:f(r,t)}}return n}function f(e,t){let n=s[t];return n?n[e]:s.en[e]}function p(e){let n,i;if("object"!=typeof e)throw new Error("Please supply an object of options");if(!e.message)throw new Error('"message" option must not be null or an empty string.');return(e=t.extend({},a,e)).backdrop?e.backdrop="string"!=typeof e.backdrop||"static"!==e.backdrop.toLowerCase()||"static":e.backdrop=!1!==e.backdrop&&0!==e.backdrop&&"static",e.buttons||(e.buttons={}),n=e.buttons,i=g(n),m(n,function(t,o,s){if("function"==typeof o&&(o=n[t]={callback:o}),"object"!=typeof o)throw new Error('button with key "'+t+'" must be an object');if(o.label||(o.label=t),!o.className){let t=!1;t=e.swapButtonOrder?0===s:s===i-1,o.className=i<=2&&t?"btn-primary":"btn-secondary btn-default"}}),e}function g(e){return Object.keys(e).length}function m(e,n){let i=0;t.each(e,function(e,t){n(e,t,i++)})}function v(e){e.data.dialog.find(".bootbox-accept").first().trigger("focus")}function b(e){e.target===e.data.dialog[0]&&e.data.dialog.remove()}function y(e){e.target===e.data.dialog[0]&&(e.data.dialog.off("escape.close.bb"),e.data.dialog.off("click"))}function w(e,t,n){e.stopPropagation(),e.preventDefault(),"function"==typeof n&&!1===n.call(t,e)||t.modal("hide")}function _(e,t,i){let o=!1,s=!0,r=!0;if("date"===e)t===n||(s=E(t))?i===n||(r=E(i))||console.warn('Browsers which natively support the "date" input type expect date values to be of the form "YYYY-MM-DD" (see ISO-8601 https://www.iso.org/iso-8601-date-and-time-format.html). Bootbox does not enforce this rule, but your max value may not be enforced by this browser.'):console.warn('Browsers which natively support the "date" input type expect date values to be of the form "YYYY-MM-DD" (see ISO-8601 https://www.iso.org/iso-8601-date-and-time-format.html). Bootbox does not enforce this rule, but your min value may not be enforced by this browser.');else if("time"===e){if(t!==n&&!(s=x(t)))throw new Error('"min" is not a valid time. See https://www.w3.org/TR/2012/WD-html-markup-20120315/datatypes.html#form.data.time for more information.');if(i!==n&&!(r=x(i)))throw new Error('"max" is not a valid time. See https://www.w3.org/TR/2012/WD-html-markup-20120315/datatypes.html#form.data.time for more information.')}else{if(t!==n&&isNaN(t))throw s=!1,new Error('"min" must be a valid number. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-min for more information.');if(i!==n&&isNaN(i))throw r=!1,new Error('"max" must be a valid number. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-max for more information.')}if(s&&r){if(i<t)throw new Error('"max" must be greater than or equal to "min". See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-max for more information.');o=!0}return o}function x(e){return/([01][0-9]|2[0-3]):[0-5][0-9]?:[0-5][0-9]/.test(e)}function E(e){return/(\d{4})-(\d{2})-(\d{2})/.test(e)}return i.locales=function(e){return e?s[e]:s},i.addLocale=function(e,n){return t.each(["OK","CANCEL","CONFIRM"],function(e,t){if(!n[t])throw new Error('Please supply a translation for "'+t+'"')}),s[e]={OK:n.OK,CANCEL:n.CANCEL,CONFIRM:n.CONFIRM},i},i.removeLocale=function(e){if("en"===e)throw new Error('"en" is used as the default and fallback locale and cannot be removed.');return delete s[e],i},i.setLocale=function(e){return i.setDefaults("locale",e)},i.setDefaults=function(){let e={};return 2===arguments.length?e[arguments[0]]=arguments[1]:e=arguments[0],t.extend(a,e),i},i.hideAll=function(){return t(".bootbox").modal("hide"),i},i.init=function(n){return e(n||t)},i.dialog=function(e){if(t.fn.modal===n)throw new Error('"$.fn.modal" is not defined; please double check you have included the Bootstrap JavaScript library. See https://getbootstrap.com/docs/5.3/getting-started/introduction/ for more details.');if(e=p(e),t.fn.modal.Constructor.VERSION){e.fullBootstrapVersion=t.fn.modal.Constructor.VERSION;let n=e.fullBootstrapVersion.indexOf(".");e.bootstrap=e.fullBootstrapVersion.substring(0,n)}else e.bootstrap="2",e.fullBootstrapVersion="2.3.2",console.warn("Bootbox will *mostly* work with Bootstrap 2, but we do not officially support it. Please upgrade, if possible.");let i=t(r.dialog),o=i.find(".modal-dialog"),s=i.find(".modal-body"),a=t(r.header),l=t(r.footer),c=e.buttons,u={onEscape:e.onEscape};if(s.find(".bootbox-body").html(e.message),g(e.buttons)>0&&(m(c,function(e,n){let i=t(r.button);switch(i.data("bb-handler",e),i.addClass(n.className),e){case"ok":case"confirm":i.addClass("bootbox-accept");break;case"cancel":i.addClass("bootbox-cancel")}i.html(n.label),n.id&&i.attr({id:n.id}),!0===n.disabled&&i.prop({disabled:!0}),l.append(i),u[e]=n.callback}),s.after(l)),!0===e.animate&&i.addClass("fade"),e.className&&i.addClass(e.className),e.id&&i.attr({id:e.id}),e.size)switch(e.fullBootstrapVersion.substring(0,3)<"3.1"&&console.warn('"size" requires Bootstrap 3.1.0 or higher. You appear to be using '+e.fullBootstrapVersion+". Please upgrade to use this option."),e.size){case"small":case"sm":o.addClass("modal-sm");break;case"large":case"lg":o.addClass("modal-lg");break;case"extra-large":case"xl":o.addClass("modal-xl"),e.fullBootstrapVersion.substring(0,3)<"4.2"&&console.warn('Using size "xl"/"extra-large" requires Bootstrap 4.2.0 or higher. You appear to be using '+e.fullBootstrapVersion+". Please upgrade to use this option.")}if(e.scrollable&&(o.addClass("modal-dialog-scrollable"),e.fullBootstrapVersion.substring(0,3)<"4.3"&&console.warn('Using "scrollable" requires Bootstrap 4.3.0 or higher. You appear to be using '+e.fullBootstrapVersion+". Please upgrade to use this option.")),e.title||e.closeButton){if(e.title?a.find(".modal-title").html(e.title):a.addClass("border-0"),e.closeButton){let n=t(r.closeButton);e.bootstrap<5&&n.html("&times;"),e.bootstrap<4?a.prepend(n):a.append(n)}s.before(a)}if(e.centerVertical&&(o.addClass("modal-dialog-centered"),e.fullBootstrapVersion<"4.0.0"&&console.warn('"centerVertical" requires Bootstrap 4.0.0-beta.3 or higher. You appear to be using '+e.fullBootstrapVersion+". Please upgrade to use this option.")),e.reusable||(i.one("hide.bs.modal",{dialog:i},y),i.one("hidden.bs.modal",{dialog:i},b)),e.onHide){if("function"!=typeof e.onHide)throw new Error('Argument supplied to "onHide" must be a function');i.on("hide.bs.modal",e.onHide)}if(e.onHidden){if("function"!=typeof e.onHidden)throw new Error('Argument supplied to "onHidden" must be a function');i.on("hidden.bs.modal",e.onHidden)}if(e.onShow){if("function"!=typeof e.onShow)throw new Error('Argument supplied to "onShow" must be a function');i.on("show.bs.modal",e.onShow)}if(i.one("shown.bs.modal",{dialog:i},v),e.onShown){if("function"!=typeof e.onShown)throw new Error('Argument supplied to "onShown" must be a function');i.on("shown.bs.modal",e.onShown)}if(!0===e.backdrop){let e=!1;i.on("mousedown",".modal-content",function(t){t.stopPropagation(),e=!0}),i.on("click.dismiss.bs.modal",function(t){e||t.target!==t.currentTarget||i.trigger("escape.close.bb")})}return i.on("escape.close.bb",function(e){u.onEscape&&w(e,i,u.onEscape)}),i.on("click",".modal-footer button:not(.disabled)",function(e){let o=t(this).data("bb-handler");o!==n&&w(e,i,u[o])}),i.on("click",".bootbox-close-button",function(e){w(e,i,u.onEscape)}),i.on("keyup",function(e){27===e.which&&i.trigger("escape.close.bb")}),t(e.container).append(i),i.modal({backdrop:e.backdrop,keyboard:!1,show:!1}),e.show&&i.modal("show",e.relatedTarget),i},i.alert=function(){let e;if(e=u("alert",["ok"],["message","callback"],arguments),e.callback&&"function"!=typeof e.callback)throw new Error('alert requires the "callback" property to be a function when provided');return e.buttons.ok.callback=e.onEscape=function(){return"function"!=typeof e.callback||e.callback.call(this)},i.dialog(e)},i.confirm=function(){let e;if(e=u("confirm",["cancel","confirm"],["message","callback"],arguments),"function"!=typeof e.callback)throw new Error("confirm requires a callback");return e.buttons.cancel.callback=e.onEscape=function(){return e.callback.call(this,!1)},e.buttons.confirm.callback=function(){return e.callback.call(this,!0)},i.dialog(e)},i.prompt=function(){let e,o,s,l,c,h;if(s=t(r.form),e=u("prompt",["cancel","confirm"],["title","callback"],arguments),e.value||(e.value=a.value),e.inputType||(e.inputType=a.inputType),c=e.show===n?a.show:e.show,e.show=!1,e.buttons.cancel.callback=e.onEscape=function(){return e.callback.call(this,null)},e.buttons.confirm.callback=function(){let n;if("checkbox"===e.inputType){if(n=l.find("input:checked").map(function(){return t(this).val()}).get(),0===n.length&&!0===e.required)return!1}else if("radio"===e.inputType)n=l.find("input:checked").val();else{let i=l[0];if(i.checkValidity&&!i.checkValidity())return e.errorMessage&&i.setCustomValidity(e.errorMessage),i.reportValidity&&i.reportValidity(),!1;n="select"===e.inputType&&!0===e.multiple?l.find("option:selected").map(function(){return t(this).val()}).get():l.val()}return e.callback.call(this,n)},!e.title)throw new Error("prompt requires a title");if("function"!=typeof e.callback)throw new Error("prompt requires a callback");if(!r.inputs[e.inputType])throw new Error("Invalid prompt type");switch(l=t(r.inputs[e.inputType]),e.inputType){case"text":case"textarea":case"email":case"password":l.val(e.value),e.placeholder&&l.attr("placeholder",e.placeholder),e.pattern&&l.attr("pattern",e.pattern),e.maxlength&&l.attr("maxlength",e.maxlength),e.required&&l.prop({required:!0}),e.rows&&!isNaN(parseInt(e.rows))&&"textarea"===e.inputType&&l.attr({rows:e.rows});break;case"date":case"time":case"number":case"range":if(l.val(e.value),e.placeholder&&l.attr("placeholder",e.placeholder),e.pattern?l.attr("pattern",e.pattern):"date"===e.inputType?l.attr("pattern","d{4}-d{2}-d{2}"):"time"===e.inputType&&l.attr("pattern","d{2}:d{2}"),e.required&&l.prop({required:!0}),e.step){if(!("any"===e.step||!isNaN(e.step)&&parseFloat(e.step)>0))throw new Error('"step" must be a valid positive number or the value "any". See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-step for more information.');l.attr("step",e.step)}_(e.inputType,e.min,e.max)&&(e.min!==n&&l.attr("min",e.min),e.max!==n&&l.attr("max",e.max));break;case"select":let i={};if(h=e.inputOptions||[],!Array.isArray(h))throw new Error("Please pass an array of input options");if(!h.length)throw new Error('prompt with "inputType" set to "select" requires at least one option');e.required&&l.prop({required:!0}),e.multiple&&l.prop({multiple:!0}),m(h,function(e,o){let s=l;if(o.value===n||o.text===n)throw new Error('each option needs a "value" property and a "text" property');o.group&&(i[o.group]||(i[o.group]=t("<optgroup />").attr("label",o.group)),s=i[o.group]);let a=t(r.option);a.attr("value",o.value).text(o.text),s.append(a)}),m(i,function(e,t){l.append(t)}),l.val(e.value),e.bootstrap<5&&l.removeClass("form-select").addClass("form-control");break;case"checkbox":let o=Array.isArray(e.value)?e.value:[e.value];if(h=e.inputOptions||[],!h.length)throw new Error('prompt with "inputType" set to "checkbox" requires at least one option');l=t('<div class="bootbox-checkbox-list"></div>'),m(h,function(i,s){if(s.value===n||s.text===n)throw new Error('each option needs a "value" property and a "text" property');let a=t(r.inputs[e.inputType]);a.find("input").attr("value",s.value),a.find("label").append("\n"+s.text),m(o,function(e,t){t===s.value&&a.find("input").prop("checked",!0)}),l.append(a)});break;case"radio":if(e.value!==n&&Array.isArray(e.value))throw new Error('prompt with "inputType" set to "radio" requires a single, non-array value for "value"');if(h=e.inputOptions||[],!h.length)throw new Error('prompt with "inputType" set to "radio" requires at least one option');l=t('<div class="bootbox-radiobutton-list"></div>');let s=!0;m(h,function(i,o){if(o.value===n||o.text===n)throw new Error('each option needs a "value" property and a "text" property');let a=t(r.inputs[e.inputType]);a.find("input").attr("value",o.value),a.find("label").append("\n"+o.text),e.value!==n&&o.value===e.value&&(a.find("input").prop("checked",!0),s=!1),l.append(a)}),s&&l.find('input[type="radio"]').first().prop("checked",!0)}if(s.append(l),s.on("submit",function(e){e.preventDefault(),e.stopPropagation(),o.find(".bootbox-accept").trigger("click")}),e.message&&""!==e.message.trim()){let n=t(r.promptMessage).html(e.message);s.prepend(n),e.message=s}else e.message=s;return o=i.dialog(e),o.off("shown.bs.modal",v),o.on("shown.bs.modal",function(){l.focus()}),!0===c&&o.modal("show"),o},i},void 0===(s="function"==typeof i?i.apply(t,o):i)||(e.exports=s)}()},692:function(e,t){var n;!function(t,n){"use strict";"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,function(i,o){"use strict";var s=[],r=Object.getPrototypeOf,a=s.slice,l=s.flat?function(e){return s.flat.call(e)}:function(e){return s.concat.apply([],e)},c=s.push,u=s.indexOf,h={},d=h.toString,f=h.hasOwnProperty,p=f.toString,g=p.call(Object),m={},v=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},b=function(e){return null!=e&&e===e.window},y=i.document,w={type:!0,src:!0,nonce:!0,noModule:!0};function _(e,t,n){var i,o,s=(n=n||y).createElement("script");if(s.text=e,t)for(i in w)(o=t[i]||t.getAttribute&&t.getAttribute(i))&&s.setAttribute(i,o);n.head.appendChild(s).parentNode.removeChild(s)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?h[d.call(e)]||"object":typeof e}var E="3.7.1",C=/HTML$/i,S=function(e,t){return new S.fn.init(e,t)};function T(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!v(e)&&!b(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function k(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}S.fn=S.prototype={jquery:E,constructor:S,length:0,toArray:function(){return a.call(this)},get:function(e){return null==e?a.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(e){return this.pushStack(S.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(a.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(S.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:c,sort:s.sort,splice:s.splice},S.extend=S.fn.extend=function(){var e,t,n,i,o,s,r=arguments[0]||{},a=1,l=arguments.length,c=!1;for("boolean"==typeof r&&(c=r,r=arguments[a]||{},a++),"object"==typeof r||v(r)||(r={}),a===l&&(r=this,a--);a<l;a++)if(null!=(e=arguments[a]))for(t in e)i=e[t],"__proto__"!==t&&r!==i&&(c&&i&&(S.isPlainObject(i)||(o=Array.isArray(i)))?(n=r[t],s=o&&!Array.isArray(n)?[]:o||S.isPlainObject(n)?n:{},o=!1,r[t]=S.extend(c,s,i)):void 0!==i&&(r[t]=i));return r},S.extend({expando:"jQuery"+(E+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==d.call(e))&&(!(t=r(e))||"function"==typeof(n=f.call(t,"constructor")&&t.constructor)&&p.call(n)===g)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){_(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,i=0;if(T(e))for(n=e.length;i<n&&!1!==t.call(e[i],i,e[i]);i++);else for(i in e)if(!1===t.call(e[i],i,e[i]))break;return e},text:function(e){var t,n="",i=0,o=e.nodeType;if(!o)for(;t=e[i++];)n+=S.text(t);return 1===o||11===o?e.textContent:9===o?e.documentElement.textContent:3===o||4===o?e.nodeValue:n},makeArray:function(e,t){var n=t||[];return null!=e&&(T(Object(e))?S.merge(n,"string"==typeof e?[e]:e):c.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:u.call(t,e,n)},isXMLDoc:function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!C.test(t||n&&n.nodeName||"HTML")},merge:function(e,t){for(var n=+t.length,i=0,o=e.length;i<n;i++)e[o++]=t[i];return e.length=o,e},grep:function(e,t,n){for(var i=[],o=0,s=e.length,r=!n;o<s;o++)!t(e[o],o)!==r&&i.push(e[o]);return i},map:function(e,t,n){var i,o,s=0,r=[];if(T(e))for(i=e.length;s<i;s++)null!=(o=t(e[s],s,n))&&r.push(o);else for(s in e)null!=(o=t(e[s],s,n))&&r.push(o);return l(r)},guid:1,support:m}),"function"==typeof Symbol&&(S.fn[Symbol.iterator]=s[Symbol.iterator]),S.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){h["[object "+t+"]"]=t.toLowerCase()});var A=s.pop,O=s.sort,M=s.splice,P="[\\x20\\t\\r\\n\\f]",L=new RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g");S.contains=function(e,t){var n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(e.contains?e.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))};var D=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function I(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e}S.escapeSelector=function(e){return(e+"").replace(D,I)};var j=y,N=c;!function(){var e,t,n,o,r,l,c,h,d,p,g=N,v=S.expando,b=0,y=0,w=ee(),_=ee(),x=ee(),E=ee(),C=function(e,t){return e===t&&(r=!0),0},T="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",D="(?:\\\\[\\da-fA-F]{1,6}"+P+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",I="\\["+P+"*("+D+")(?:"+P+"*([*^$|!~]?=)"+P+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+D+"))|)"+P+"*\\]",R=":("+D+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+I+")*)|.*)\\)|)",F=new RegExp(P+"+","g"),z=new RegExp("^"+P+"*,"+P+"*"),H=new RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),$=new RegExp(P+"|>"),B=new RegExp(R),q=new RegExp("^"+D+"$"),W={ID:new RegExp("^#("+D+")"),CLASS:new RegExp("^\\.("+D+")"),TAG:new RegExp("^("+D+"|[*])"),ATTR:new RegExp("^"+I),PSEUDO:new RegExp("^"+R),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:new RegExp("^(?:"+T+")$","i"),needsContext:new RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},V=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,U=/[+~]/,G=new RegExp("\\\\[\\da-fA-F]{1,6}"+P+"?|\\\\([^\\r\\n\\f])","g"),Z=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},K=function(){le()},J=de(function(e){return!0===e.disabled&&k(e,"fieldset")},{dir:"parentNode",next:"legend"});try{g.apply(s=a.call(j.childNodes),j.childNodes),s[j.childNodes.length].nodeType}catch(e){g={apply:function(e,t){N.apply(e,a.call(t))},call:function(e){N.apply(e,a.call(arguments,1))}}}function Q(e,t,n,i){var o,s,r,a,c,u,f,p=t&&t.ownerDocument,b=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==b&&9!==b&&11!==b)return n;if(!i&&(le(t),t=t||l,h)){if(11!==b&&(c=Y.exec(e)))if(o=c[1]){if(9===b){if(!(r=t.getElementById(o)))return n;if(r.id===o)return g.call(n,r),n}else if(p&&(r=p.getElementById(o))&&Q.contains(t,r)&&r.id===o)return g.call(n,r),n}else{if(c[2])return g.apply(n,t.getElementsByTagName(e)),n;if((o=c[3])&&t.getElementsByClassName)return g.apply(n,t.getElementsByClassName(o)),n}if(!(E[e+" "]||d&&d.test(e))){if(f=e,p=t,1===b&&($.test(e)||H.test(e))){for((p=U.test(e)&&ae(t.parentNode)||t)==t&&m.scope||((a=t.getAttribute("id"))?a=S.escapeSelector(a):t.setAttribute("id",a=v)),s=(u=ue(e)).length;s--;)u[s]=(a?"#"+a:":scope")+" "+he(u[s]);f=u.join(",")}try{return g.apply(n,p.querySelectorAll(f)),n}catch(t){E(e,!0)}finally{a===v&&t.removeAttribute("id")}}}return be(e.replace(L,"$1"),t,n,i)}function ee(){var e=[];return function n(i,o){return e.push(i+" ")>t.cacheLength&&delete n[e.shift()],n[i+" "]=o}}function te(e){return e[v]=!0,e}function ne(e){var t=l.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ie(e){return function(t){return k(t,"input")&&t.type===e}}function oe(e){return function(t){return(k(t,"input")||k(t,"button"))&&t.type===e}}function se(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&J(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function re(e){return te(function(t){return t=+t,te(function(n,i){for(var o,s=e([],n.length,t),r=s.length;r--;)n[o=s[r]]&&(n[o]=!(i[o]=n[o]))})})}function ae(e){return e&&void 0!==e.getElementsByTagName&&e}function le(e){var n,i=e?e.ownerDocument||e:j;return i!=l&&9===i.nodeType&&i.documentElement?(c=(l=i).documentElement,h=!S.isXMLDoc(l),p=c.matches||c.webkitMatchesSelector||c.msMatchesSelector,c.msMatchesSelector&&j!=l&&(n=l.defaultView)&&n.top!==n&&n.addEventListener("unload",K),m.getById=ne(function(e){return c.appendChild(e).id=S.expando,!l.getElementsByName||!l.getElementsByName(S.expando).length}),m.disconnectedMatch=ne(function(e){return p.call(e,"*")}),m.scope=ne(function(){return l.querySelectorAll(":scope")}),m.cssHas=ne(function(){try{return l.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}}),m.getById?(t.filter.ID=function(e){var t=e.replace(G,Z);return function(e){return e.getAttribute("id")===t}},t.find.ID=function(e,t){if(void 0!==t.getElementById&&h){var n=t.getElementById(e);return n?[n]:[]}}):(t.filter.ID=function(e){var t=e.replace(G,Z);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},t.find.ID=function(e,t){if(void 0!==t.getElementById&&h){var n,i,o,s=t.getElementById(e);if(s){if((n=s.getAttributeNode("id"))&&n.value===e)return[s];for(o=t.getElementsByName(e),i=0;s=o[i++];)if((n=s.getAttributeNode("id"))&&n.value===e)return[s]}return[]}}),t.find.TAG=function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},t.find.CLASS=function(e,t){if(void 0!==t.getElementsByClassName&&h)return t.getElementsByClassName(e)},d=[],ne(function(e){var t;c.appendChild(e).innerHTML="<a id='"+v+"' href='' disabled='disabled'></a><select id='"+v+"-\r\\' disabled='disabled'><option selected=''></option></select>",e.querySelectorAll("[selected]").length||d.push("\\["+P+"*(?:value|"+T+")"),e.querySelectorAll("[id~="+v+"-]").length||d.push("~="),e.querySelectorAll("a#"+v+"+*").length||d.push(".#.+[+~]"),e.querySelectorAll(":checked").length||d.push(":checked"),(t=l.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),c.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&d.push(":enabled",":disabled"),(t=l.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||d.push("\\["+P+"*name"+P+"*="+P+"*(?:''|\"\")")}),m.cssHas||d.push(":has"),d=d.length&&new RegExp(d.join("|")),C=function(e,t){if(e===t)return r=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!m.sortDetached&&t.compareDocumentPosition(e)===n?e===l||e.ownerDocument==j&&Q.contains(j,e)?-1:t===l||t.ownerDocument==j&&Q.contains(j,t)?1:o?u.call(o,e)-u.call(o,t):0:4&n?-1:1)},l):l}for(e in Q.matches=function(e,t){return Q(e,null,null,t)},Q.matchesSelector=function(e,t){if(le(e),h&&!E[t+" "]&&(!d||!d.test(t)))try{var n=p.call(e,t);if(n||m.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){E(t,!0)}return Q(t,l,null,[e]).length>0},Q.contains=function(e,t){return(e.ownerDocument||e)!=l&&le(e),S.contains(e,t)},Q.attr=function(e,n){(e.ownerDocument||e)!=l&&le(e);var i=t.attrHandle[n.toLowerCase()],o=i&&f.call(t.attrHandle,n.toLowerCase())?i(e,n,!h):void 0;return void 0!==o?o:e.getAttribute(n)},Q.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},S.uniqueSort=function(e){var t,n=[],i=0,s=0;if(r=!m.sortStable,o=!m.sortStable&&a.call(e,0),O.call(e,C),r){for(;t=e[s++];)t===e[s]&&(i=n.push(s));for(;i--;)M.call(e,n[i],1)}return o=null,e},S.fn.uniqueSort=function(){return this.pushStack(S.uniqueSort(a.apply(this)))},t=S.expr={cacheLength:50,createPseudo:te,match:W,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(G,Z),e[3]=(e[3]||e[4]||e[5]||"").replace(G,Z),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||Q.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&Q.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return W.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&B.test(n)&&(t=ue(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(G,Z).toLowerCase();return"*"===e?function(){return!0}:function(e){return k(e,t)}},CLASS:function(e){var t=w[e+" "];return t||(t=new RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&w(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(i){var o=Q.attr(i,e);return null==o?"!="===t:!t||(o+="","="===t?o===n:"!="===t?o!==n:"^="===t?n&&0===o.indexOf(n):"*="===t?n&&o.indexOf(n)>-1:"$="===t?n&&o.slice(-n.length)===n:"~="===t?(" "+o.replace(F," ")+" ").indexOf(n)>-1:"|="===t&&(o===n||o.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,i,o){var s="nth"!==e.slice(0,3),r="last"!==e.slice(-4),a="of-type"===t;return 1===i&&0===o?function(e){return!!e.parentNode}:function(t,n,l){var c,u,h,d,f,p=s!==r?"nextSibling":"previousSibling",g=t.parentNode,m=a&&t.nodeName.toLowerCase(),y=!l&&!a,w=!1;if(g){if(s){for(;p;){for(h=t;h=h[p];)if(a?k(h,m):1===h.nodeType)return!1;f=p="only"===e&&!f&&"nextSibling"}return!0}if(f=[r?g.firstChild:g.lastChild],r&&y){for(w=(d=(c=(u=g[v]||(g[v]={}))[e]||[])[0]===b&&c[1])&&c[2],h=d&&g.childNodes[d];h=++d&&h&&h[p]||(w=d=0)||f.pop();)if(1===h.nodeType&&++w&&h===t){u[e]=[b,d,w];break}}else if(y&&(w=d=(c=(u=t[v]||(t[v]={}))[e]||[])[0]===b&&c[1]),!1===w)for(;(h=++d&&h&&h[p]||(w=d=0)||f.pop())&&(!(a?k(h,m):1===h.nodeType)||!++w||(y&&((u=h[v]||(h[v]={}))[e]=[b,w]),h!==t)););return(w-=o)===i||w%i===0&&w/i>=0}}},PSEUDO:function(e,n){var i,o=t.pseudos[e]||t.setFilters[e.toLowerCase()]||Q.error("unsupported pseudo: "+e);return o[v]?o(n):o.length>1?(i=[e,e,"",n],t.setFilters.hasOwnProperty(e.toLowerCase())?te(function(e,t){for(var i,s=o(e,n),r=s.length;r--;)e[i=u.call(e,s[r])]=!(t[i]=s[r])}):function(e){return o(e,0,i)}):o}},pseudos:{not:te(function(e){var t=[],n=[],i=ve(e.replace(L,"$1"));return i[v]?te(function(e,t,n,o){for(var s,r=i(e,null,o,[]),a=e.length;a--;)(s=r[a])&&(e[a]=!(t[a]=s))}):function(e,o,s){return t[0]=e,i(t,null,s,n),t[0]=null,!n.pop()}}),has:te(function(e){return function(t){return Q(e,t).length>0}}),contains:te(function(e){return e=e.replace(G,Z),function(t){return(t.textContent||S.text(t)).indexOf(e)>-1}}),lang:te(function(e){return q.test(e||"")||Q.error("unsupported lang: "+e),e=e.replace(G,Z).toLowerCase(),function(t){var n;do{if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(e){var t=i.location&&i.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===c},focus:function(e){return e===function(){try{return l.activeElement}catch(e){}}()&&l.hasFocus()&&!!(e.type||e.href||~e.tabIndex)},enabled:se(!1),disabled:se(!0),checked:function(e){return k(e,"input")&&!!e.checked||k(e,"option")&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!t.pseudos.empty(e)},header:function(e){return X.test(e.nodeName)},input:function(e){return V.test(e.nodeName)},button:function(e){return k(e,"input")&&"button"===e.type||k(e,"button")},text:function(e){var t;return k(e,"input")&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:re(function(){return[0]}),last:re(function(e,t){return[t-1]}),eq:re(function(e,t,n){return[n<0?n+t:n]}),even:re(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:re(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:re(function(e,t,n){var i;for(i=n<0?n+t:n>t?t:n;--i>=0;)e.push(i);return e}),gt:re(function(e,t,n){for(var i=n<0?n+t:n;++i<t;)e.push(i);return e})}},t.pseudos.nth=t.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})t.pseudos[e]=ie(e);for(e in{submit:!0,reset:!0})t.pseudos[e]=oe(e);function ce(){}function ue(e,n){var i,o,s,r,a,l,c,u=_[e+" "];if(u)return n?0:u.slice(0);for(a=e,l=[],c=t.preFilter;a;){for(r in i&&!(o=z.exec(a))||(o&&(a=a.slice(o[0].length)||a),l.push(s=[])),i=!1,(o=H.exec(a))&&(i=o.shift(),s.push({value:i,type:o[0].replace(L," ")}),a=a.slice(i.length)),t.filter)!(o=W[r].exec(a))||c[r]&&!(o=c[r](o))||(i=o.shift(),s.push({value:i,type:r,matches:o}),a=a.slice(i.length));if(!i)break}return n?a.length:a?Q.error(e):_(e,l).slice(0)}function he(e){for(var t=0,n=e.length,i="";t<n;t++)i+=e[t].value;return i}function de(e,t,n){var i=t.dir,o=t.next,s=o||i,r=n&&"parentNode"===s,a=y++;return t.first?function(t,n,o){for(;t=t[i];)if(1===t.nodeType||r)return e(t,n,o);return!1}:function(t,n,l){var c,u,h=[b,a];if(l){for(;t=t[i];)if((1===t.nodeType||r)&&e(t,n,l))return!0}else for(;t=t[i];)if(1===t.nodeType||r)if(u=t[v]||(t[v]={}),o&&k(t,o))t=t[i]||t;else{if((c=u[s])&&c[0]===b&&c[1]===a)return h[2]=c[2];if(u[s]=h,h[2]=e(t,n,l))return!0}return!1}}function fe(e){return e.length>1?function(t,n,i){for(var o=e.length;o--;)if(!e[o](t,n,i))return!1;return!0}:e[0]}function pe(e,t,n,i,o){for(var s,r=[],a=0,l=e.length,c=null!=t;a<l;a++)(s=e[a])&&(n&&!n(s,i,o)||(r.push(s),c&&t.push(a)));return r}function ge(e,t,n,i,o,s){return i&&!i[v]&&(i=ge(i)),o&&!o[v]&&(o=ge(o,s)),te(function(s,r,a,l){var c,h,d,f,p=[],m=[],v=r.length,b=s||function(e,t,n){for(var i=0,o=t.length;i<o;i++)Q(e,t[i],n);return n}(t||"*",a.nodeType?[a]:a,[]),y=!e||!s&&t?b:pe(b,p,e,a,l);if(n?n(y,f=o||(s?e:v||i)?[]:r,a,l):f=y,i)for(c=pe(f,m),i(c,[],a,l),h=c.length;h--;)(d=c[h])&&(f[m[h]]=!(y[m[h]]=d));if(s){if(o||e){if(o){for(c=[],h=f.length;h--;)(d=f[h])&&c.push(y[h]=d);o(null,f=[],c,l)}for(h=f.length;h--;)(d=f[h])&&(c=o?u.call(s,d):p[h])>-1&&(s[c]=!(r[c]=d))}}else f=pe(f===r?f.splice(v,f.length):f),o?o(null,r,f,l):g.apply(r,f)})}function me(e){for(var i,o,s,r=e.length,a=t.relative[e[0].type],l=a||t.relative[" "],c=a?1:0,h=de(function(e){return e===i},l,!0),d=de(function(e){return u.call(i,e)>-1},l,!0),f=[function(e,t,o){var s=!a&&(o||t!=n)||((i=t).nodeType?h(e,t,o):d(e,t,o));return i=null,s}];c<r;c++)if(o=t.relative[e[c].type])f=[de(fe(f),o)];else{if((o=t.filter[e[c].type].apply(null,e[c].matches))[v]){for(s=++c;s<r&&!t.relative[e[s].type];s++);return ge(c>1&&fe(f),c>1&&he(e.slice(0,c-1).concat({value:" "===e[c-2].type?"*":""})).replace(L,"$1"),o,c<s&&me(e.slice(c,s)),s<r&&me(e=e.slice(s)),s<r&&he(e))}f.push(o)}return fe(f)}function ve(e,i){var o,s=[],r=[],a=x[e+" "];if(!a){for(i||(i=ue(e)),o=i.length;o--;)(a=me(i[o]))[v]?s.push(a):r.push(a);a=x(e,function(e,i){var o=i.length>0,s=e.length>0,r=function(r,a,c,u,d){var f,p,m,v=0,y="0",w=r&&[],_=[],x=n,E=r||s&&t.find.TAG("*",d),C=b+=null==x?1:Math.random()||.1,T=E.length;for(d&&(n=a==l||a||d);y!==T&&null!=(f=E[y]);y++){if(s&&f){for(p=0,a||f.ownerDocument==l||(le(f),c=!h);m=e[p++];)if(m(f,a||l,c)){g.call(u,f);break}d&&(b=C)}o&&((f=!m&&f)&&v--,r&&w.push(f))}if(v+=y,o&&y!==v){for(p=0;m=i[p++];)m(w,_,a,c);if(r){if(v>0)for(;y--;)w[y]||_[y]||(_[y]=A.call(u));_=pe(_)}g.apply(u,_),d&&!r&&_.length>0&&v+i.length>1&&S.uniqueSort(u)}return d&&(b=C,n=x),w};return o?te(r):r}(r,s)),a.selector=e}return a}function be(e,n,i,o){var s,r,a,l,c,u="function"==typeof e&&e,d=!o&&ue(e=u.selector||e);if(i=i||[],1===d.length){if((r=d[0]=d[0].slice(0)).length>2&&"ID"===(a=r[0]).type&&9===n.nodeType&&h&&t.relative[r[1].type]){if(!(n=(t.find.ID(a.matches[0].replace(G,Z),n)||[])[0]))return i;u&&(n=n.parentNode),e=e.slice(r.shift().value.length)}for(s=W.needsContext.test(e)?0:r.length;s--&&(a=r[s],!t.relative[l=a.type]);)if((c=t.find[l])&&(o=c(a.matches[0].replace(G,Z),U.test(r[0].type)&&ae(n.parentNode)||n))){if(r.splice(s,1),!(e=o.length&&he(r)))return g.apply(i,o),i;break}}return(u||ve(e,d))(o,n,!h,i,!n||U.test(e)&&ae(n.parentNode)||n),i}ce.prototype=t.filters=t.pseudos,t.setFilters=new ce,m.sortStable=v.split("").sort(C).join("")===v,le(),m.sortDetached=ne(function(e){return 1&e.compareDocumentPosition(l.createElement("fieldset"))}),S.find=Q,S.expr[":"]=S.expr.pseudos,S.unique=S.uniqueSort,Q.compile=ve,Q.select=be,Q.setDocument=le,Q.tokenize=ue,Q.escape=S.escapeSelector,Q.getText=S.text,Q.isXML=S.isXMLDoc,Q.selectors=S.expr,Q.support=S.support,Q.uniqueSort=S.uniqueSort}();var R=function(e,t,n){for(var i=[],o=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(o&&S(e).is(n))break;i.push(e)}return i},F=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},z=S.expr.match.needsContext,H=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function $(e,t,n){return v(t)?S.grep(e,function(e,i){return!!t.call(e,i,e)!==n}):t.nodeType?S.grep(e,function(e){return e===t!==n}):"string"!=typeof t?S.grep(e,function(e){return u.call(t,e)>-1!==n}):S.filter(t,e,n)}S.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?S.find.matchesSelector(i,e)?[i]:[]:S.find.matches(e,S.grep(t,function(e){return 1===e.nodeType}))},S.fn.extend({find:function(e){var t,n,i=this.length,o=this;if("string"!=typeof e)return this.pushStack(S(e).filter(function(){for(t=0;t<i;t++)if(S.contains(o[t],this))return!0}));for(n=this.pushStack([]),t=0;t<i;t++)S.find(e,o[t],n);return i>1?S.uniqueSort(n):n},filter:function(e){return this.pushStack($(this,e||[],!1))},not:function(e){return this.pushStack($(this,e||[],!0))},is:function(e){return!!$(this,"string"==typeof e&&z.test(e)?S(e):e||[],!1).length}});var B,q=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var i,o;if(!e)return this;if(n=n||B,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:q.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:y,!0)),H.test(i[1])&&S.isPlainObject(t))for(i in t)v(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(o=y.getElementById(i[2]))&&(this[0]=o,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,B=S(y);var W=/^(?:parents|prev(?:Until|All))/,V={children:!0,contents:!0,next:!0,prev:!0};function X(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(S.contains(this,t[e]))return!0})},closest:function(e,t){var n,i=0,o=this.length,s=[],r="string"!=typeof e&&S(e);if(!z.test(e))for(;i<o;i++)for(n=this[i];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(r?r.index(n)>-1:1===n.nodeType&&S.find.matchesSelector(n,e))){s.push(n);break}return this.pushStack(s.length>1?S.uniqueSort(s):s)},index:function(e){return e?"string"==typeof e?u.call(S(e),this[0]):u.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),S.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return R(e,"parentNode")},parentsUntil:function(e,t,n){return R(e,"parentNode",n)},next:function(e){return X(e,"nextSibling")},prev:function(e){return X(e,"previousSibling")},nextAll:function(e){return R(e,"nextSibling")},prevAll:function(e){return R(e,"previousSibling")},nextUntil:function(e,t,n){return R(e,"nextSibling",n)},prevUntil:function(e,t,n){return R(e,"previousSibling",n)},siblings:function(e){return F((e.parentNode||{}).firstChild,e)},children:function(e){return F(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(k(e,"template")&&(e=e.content||e),S.merge([],e.childNodes))}},function(e,t){S.fn[e]=function(n,i){var o=S.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(o=S.filter(i,o)),this.length>1&&(V[e]||S.uniqueSort(o),W.test(e)&&o.reverse()),this.pushStack(o)}});var Y=/[^\x20\t\r\n\f]+/g;function U(e){return e}function G(e){throw e}function Z(e,t,n,i){var o;try{e&&v(o=e.promise)?o.call(e).done(t).fail(n):e&&v(o=e.then)?o.call(e,t,n):t.apply(void 0,[e].slice(i))}catch(e){n.apply(void 0,[e])}}S.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return S.each(e.match(Y)||[],function(e,n){t[n]=!0}),t}(e):S.extend({},e);var t,n,i,o,s=[],r=[],a=-1,l=function(){for(o=o||e.once,i=t=!0;r.length;a=-1)for(n=r.shift();++a<s.length;)!1===s[a].apply(n[0],n[1])&&e.stopOnFalse&&(a=s.length,n=!1);e.memory||(n=!1),t=!1,o&&(s=n?[]:"")},c={add:function(){return s&&(n&&!t&&(a=s.length-1,r.push(n)),function t(n){S.each(n,function(n,i){v(i)?e.unique&&c.has(i)||s.push(i):i&&i.length&&"string"!==x(i)&&t(i)})}(arguments),n&&!t&&l()),this},remove:function(){return S.each(arguments,function(e,t){for(var n;(n=S.inArray(t,s,n))>-1;)s.splice(n,1),n<=a&&a--}),this},has:function(e){return e?S.inArray(e,s)>-1:s.length>0},empty:function(){return s&&(s=[]),this},disable:function(){return o=r=[],s=n="",this},disabled:function(){return!s},lock:function(){return o=r=[],n||t||(s=n=""),this},locked:function(){return!!o},fireWith:function(e,n){return o||(n=[e,(n=n||[]).slice?n.slice():n],r.push(n),t||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!i}};return c},S.extend({Deferred:function(e){var t=[["notify","progress",S.Callbacks("memory"),S.Callbacks("memory"),2],["resolve","done",S.Callbacks("once memory"),S.Callbacks("once memory"),0,"resolved"],["reject","fail",S.Callbacks("once memory"),S.Callbacks("once memory"),1,"rejected"]],n="pending",o={state:function(){return n},always:function(){return s.done(arguments).fail(arguments),this},catch:function(e){return o.then(null,e)},pipe:function(){var e=arguments;return S.Deferred(function(n){S.each(t,function(t,i){var o=v(e[i[4]])&&e[i[4]];s[i[1]](function(){var e=o&&o.apply(this,arguments);e&&v(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[i[0]+"With"](this,o?[e]:arguments)})}),e=null}).promise()},then:function(e,n,o){var s=0;function r(e,t,n,o){return function(){var a=this,l=arguments,c=function(){var i,c;if(!(e<s)){if((i=n.apply(a,l))===t.promise())throw new TypeError("Thenable self-resolution");c=i&&("object"==typeof i||"function"==typeof i)&&i.then,v(c)?o?c.call(i,r(s,t,U,o),r(s,t,G,o)):(s++,c.call(i,r(s,t,U,o),r(s,t,G,o),r(s,t,U,t.notifyWith))):(n!==U&&(a=void 0,l=[i]),(o||t.resolveWith)(a,l))}},u=o?c:function(){try{c()}catch(i){S.Deferred.exceptionHook&&S.Deferred.exceptionHook(i,u.error),e+1>=s&&(n!==G&&(a=void 0,l=[i]),t.rejectWith(a,l))}};e?u():(S.Deferred.getErrorHook?u.error=S.Deferred.getErrorHook():S.Deferred.getStackHook&&(u.error=S.Deferred.getStackHook()),i.setTimeout(u))}}return S.Deferred(function(i){t[0][3].add(r(0,i,v(o)?o:U,i.notifyWith)),t[1][3].add(r(0,i,v(e)?e:U)),t[2][3].add(r(0,i,v(n)?n:G))}).promise()},promise:function(e){return null!=e?S.extend(e,o):o}},s={};return S.each(t,function(e,i){var r=i[2],a=i[5];o[i[1]]=r.add,a&&r.add(function(){n=a},t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),r.add(i[3].fire),s[i[0]]=function(){return s[i[0]+"With"](this===s?void 0:this,arguments),this},s[i[0]+"With"]=r.fireWith}),o.promise(s),e&&e.call(s,s),s},when:function(e){var t=arguments.length,n=t,i=Array(n),o=a.call(arguments),s=S.Deferred(),r=function(e){return function(n){i[e]=this,o[e]=arguments.length>1?a.call(arguments):n,--t||s.resolveWith(i,o)}};if(t<=1&&(Z(e,s.done(r(n)).resolve,s.reject,!t),"pending"===s.state()||v(o[n]&&o[n].then)))return s.then();for(;n--;)Z(o[n],r(n),s.reject);return s.promise()}});var K=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;S.Deferred.exceptionHook=function(e,t){i.console&&i.console.warn&&e&&K.test(e.name)&&i.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},S.readyException=function(e){i.setTimeout(function(){throw e})};var J=S.Deferred();function Q(){y.removeEventListener("DOMContentLoaded",Q),i.removeEventListener("load",Q),S.ready()}S.fn.ready=function(e){return J.then(e).catch(function(e){S.readyException(e)}),this},S.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--S.readyWait:S.isReady)||(S.isReady=!0,!0!==e&&--S.readyWait>0||J.resolveWith(y,[S]))}}),S.ready.then=J.then,"complete"===y.readyState||"loading"!==y.readyState&&!y.documentElement.doScroll?i.setTimeout(S.ready):(y.addEventListener("DOMContentLoaded",Q),i.addEventListener("load",Q));var ee=function(e,t,n,i,o,s,r){var a=0,l=e.length,c=null==n;if("object"===x(n))for(a in o=!0,n)ee(e,t,a,n[a],!0,s,r);else if(void 0!==i&&(o=!0,v(i)||(r=!0),c&&(r?(t.call(e,i),t=null):(c=t,t=function(e,t,n){return c.call(S(e),n)})),t))for(;a<l;a++)t(e[a],n,r?i:i.call(e[a],a,t(e[a],n)));return o?e:c?t.call(e):l?t(e[0],n):s},te=/^-ms-/,ne=/-([a-z])/g;function ie(e,t){return t.toUpperCase()}function oe(e){return e.replace(te,"ms-").replace(ne,ie)}var se=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function re(){this.expando=S.expando+re.uid++}re.uid=1,re.prototype={cache:function(e){var t=e[this.expando];return t||(t={},se(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var i,o=this.cache(e);if("string"==typeof t)o[oe(t)]=n;else for(i in t)o[oe(i)]=t[i];return o},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][oe(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,i=e[this.expando];if(void 0!==i){if(void 0!==t){n=(t=Array.isArray(t)?t.map(oe):(t=oe(t))in i?[t]:t.match(Y)||[]).length;for(;n--;)delete i[t[n]]}(void 0===t||S.isEmptyObject(i))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!S.isEmptyObject(t)}};var ae=new re,le=new re,ce=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,ue=/[A-Z]/g;function he(e,t,n){var i;if(void 0===n&&1===e.nodeType)if(i="data-"+t.replace(ue,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(i))){try{n=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:ce.test(e)?JSON.parse(e):e)}(n)}catch(e){}le.set(e,t,n)}else n=void 0;return n}S.extend({hasData:function(e){return le.hasData(e)||ae.hasData(e)},data:function(e,t,n){return le.access(e,t,n)},removeData:function(e,t){le.remove(e,t)},_data:function(e,t,n){return ae.access(e,t,n)},_removeData:function(e,t){ae.remove(e,t)}}),S.fn.extend({data:function(e,t){var n,i,o,s=this[0],r=s&&s.attributes;if(void 0===e){if(this.length&&(o=le.get(s),1===s.nodeType&&!ae.get(s,"hasDataAttrs"))){for(n=r.length;n--;)r[n]&&0===(i=r[n].name).indexOf("data-")&&(i=oe(i.slice(5)),he(s,i,o[i]));ae.set(s,"hasDataAttrs",!0)}return o}return"object"==typeof e?this.each(function(){le.set(this,e)}):ee(this,function(t){var n;if(s&&void 0===t)return void 0!==(n=le.get(s,e))||void 0!==(n=he(s,e))?n:void 0;this.each(function(){le.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){le.remove(this,e)})}}),S.extend({queue:function(e,t,n){var i;if(e)return t=(t||"fx")+"queue",i=ae.get(e,t),n&&(!i||Array.isArray(n)?i=ae.access(e,t,S.makeArray(n)):i.push(n)),i||[]},dequeue:function(e,t){t=t||"fx";var n=S.queue(e,t),i=n.length,o=n.shift(),s=S._queueHooks(e,t);"inprogress"===o&&(o=n.shift(),i--),o&&("fx"===t&&n.unshift("inprogress"),delete s.stop,o.call(e,function(){S.dequeue(e,t)},s)),!i&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return ae.get(e,n)||ae.access(e,n,{empty:S.Callbacks("once memory").add(function(){ae.remove(e,[t+"queue",n])})})}}),S.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?S.queue(this[0],e):void 0===t?this:this.each(function(){var n=S.queue(this,e,t);S._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&S.dequeue(this,e)})},dequeue:function(e){return this.each(function(){S.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,i=1,o=S.Deferred(),s=this,r=this.length,a=function(){--i||o.resolveWith(s,[s])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";r--;)(n=ae.get(s[r],e+"queueHooks"))&&n.empty&&(i++,n.empty.add(a));return a(),o.promise(t)}});var de=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,fe=new RegExp("^(?:([+-])=|)("+de+")([a-z%]*)$","i"),pe=["Top","Right","Bottom","Left"],ge=y.documentElement,me=function(e){return S.contains(e.ownerDocument,e)},ve={composed:!0};ge.getRootNode&&(me=function(e){return S.contains(e.ownerDocument,e)||e.getRootNode(ve)===e.ownerDocument});var be=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&me(e)&&"none"===S.css(e,"display")};function ye(e,t,n,i){var o,s,r=20,a=i?function(){return i.cur()}:function(){return S.css(e,t,"")},l=a(),c=n&&n[3]||(S.cssNumber[t]?"":"px"),u=e.nodeType&&(S.cssNumber[t]||"px"!==c&&+l)&&fe.exec(S.css(e,t));if(u&&u[3]!==c){for(l/=2,c=c||u[3],u=+l||1;r--;)S.style(e,t,u+c),(1-s)*(1-(s=a()/l||.5))<=0&&(r=0),u/=s;u*=2,S.style(e,t,u+c),n=n||[]}return n&&(u=+u||+l||0,o=n[1]?u+(n[1]+1)*n[2]:+n[2],i&&(i.unit=c,i.start=u,i.end=o)),o}var we={};function _e(e){var t,n=e.ownerDocument,i=e.nodeName,o=we[i];return o||(t=n.body.appendChild(n.createElement(i)),o=S.css(t,"display"),t.parentNode.removeChild(t),"none"===o&&(o="block"),we[i]=o,o)}function xe(e,t){for(var n,i,o=[],s=0,r=e.length;s<r;s++)(i=e[s]).style&&(n=i.style.display,t?("none"===n&&(o[s]=ae.get(i,"display")||null,o[s]||(i.style.display="")),""===i.style.display&&be(i)&&(o[s]=_e(i))):"none"!==n&&(o[s]="none",ae.set(i,"display",n)));for(s=0;s<r;s++)null!=o[s]&&(e[s].style.display=o[s]);return e}S.fn.extend({show:function(){return xe(this,!0)},hide:function(){return xe(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){be(this)?S(this).show():S(this).hide()})}});var Ee,Ce,Se=/^(?:checkbox|radio)$/i,Te=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,ke=/^$|^module$|\/(?:java|ecma)script/i;Ee=y.createDocumentFragment().appendChild(y.createElement("div")),(Ce=y.createElement("input")).setAttribute("type","radio"),Ce.setAttribute("checked","checked"),Ce.setAttribute("name","t"),Ee.appendChild(Ce),m.checkClone=Ee.cloneNode(!0).cloneNode(!0).lastChild.checked,Ee.innerHTML="<textarea>x</textarea>",m.noCloneChecked=!!Ee.cloneNode(!0).lastChild.defaultValue,Ee.innerHTML="<option></option>",m.option=!!Ee.lastChild;var Ae={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function Oe(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&k(e,t)?S.merge([e],n):n}function Me(e,t){for(var n=0,i=e.length;n<i;n++)ae.set(e[n],"globalEval",!t||ae.get(t[n],"globalEval"))}Ae.tbody=Ae.tfoot=Ae.colgroup=Ae.caption=Ae.thead,Ae.th=Ae.td,m.option||(Ae.optgroup=Ae.option=[1,"<select multiple='multiple'>","</select>"]);var Pe=/<|&#?\w+;/;function Le(e,t,n,i,o){for(var s,r,a,l,c,u,h=t.createDocumentFragment(),d=[],f=0,p=e.length;f<p;f++)if((s=e[f])||0===s)if("object"===x(s))S.merge(d,s.nodeType?[s]:s);else if(Pe.test(s)){for(r=r||h.appendChild(t.createElement("div")),a=(Te.exec(s)||["",""])[1].toLowerCase(),l=Ae[a]||Ae._default,r.innerHTML=l[1]+S.htmlPrefilter(s)+l[2],u=l[0];u--;)r=r.lastChild;S.merge(d,r.childNodes),(r=h.firstChild).textContent=""}else d.push(t.createTextNode(s));for(h.textContent="",f=0;s=d[f++];)if(i&&S.inArray(s,i)>-1)o&&o.push(s);else if(c=me(s),r=Oe(h.appendChild(s),"script"),c&&Me(r),n)for(u=0;s=r[u++];)ke.test(s.type||"")&&n.push(s);return h}var De=/^([^.]*)(?:\.(.+)|)/;function Ie(){return!0}function je(){return!1}function Ne(e,t,n,i,o,s){var r,a;if("object"==typeof t){for(a in"string"!=typeof n&&(i=i||n,n=void 0),t)Ne(e,a,n,i,t[a],s);return e}if(null==i&&null==o?(o=n,i=n=void 0):null==o&&("string"==typeof n?(o=i,i=void 0):(o=i,i=n,n=void 0)),!1===o)o=je;else if(!o)return e;return 1===s&&(r=o,o=function(e){return S().off(e),r.apply(this,arguments)},o.guid=r.guid||(r.guid=S.guid++)),e.each(function(){S.event.add(this,t,o,i,n)})}function Re(e,t,n){n?(ae.set(e,t,!1),S.event.add(e,t,{namespace:!1,handler:function(e){var n,i=ae.get(this,t);if(1&e.isTrigger&&this[t]){if(i)(S.event.special[t]||{}).delegateType&&e.stopPropagation();else if(i=a.call(arguments),ae.set(this,t,i),this[t](),n=ae.get(this,t),ae.set(this,t,!1),i!==n)return e.stopImmediatePropagation(),e.preventDefault(),n}else i&&(ae.set(this,t,S.event.trigger(i[0],i.slice(1),this)),e.stopPropagation(),e.isImmediatePropagationStopped=Ie)}})):void 0===ae.get(e,t)&&S.event.add(e,t,Ie)}S.event={global:{},add:function(e,t,n,i,o){var s,r,a,l,c,u,h,d,f,p,g,m=ae.get(e);if(se(e))for(n.handler&&(n=(s=n).handler,o=s.selector),o&&S.find.matchesSelector(ge,o),n.guid||(n.guid=S.guid++),(l=m.events)||(l=m.events=Object.create(null)),(r=m.handle)||(r=m.handle=function(t){return void 0!==S&&S.event.triggered!==t.type?S.event.dispatch.apply(e,arguments):void 0}),c=(t=(t||"").match(Y)||[""]).length;c--;)f=g=(a=De.exec(t[c])||[])[1],p=(a[2]||"").split(".").sort(),f&&(h=S.event.special[f]||{},f=(o?h.delegateType:h.bindType)||f,h=S.event.special[f]||{},u=S.extend({type:f,origType:g,data:i,handler:n,guid:n.guid,selector:o,needsContext:o&&S.expr.match.needsContext.test(o),namespace:p.join(".")},s),(d=l[f])||((d=l[f]=[]).delegateCount=0,h.setup&&!1!==h.setup.call(e,i,p,r)||e.addEventListener&&e.addEventListener(f,r)),h.add&&(h.add.call(e,u),u.handler.guid||(u.handler.guid=n.guid)),o?d.splice(d.delegateCount++,0,u):d.push(u),S.event.global[f]=!0)},remove:function(e,t,n,i,o){var s,r,a,l,c,u,h,d,f,p,g,m=ae.hasData(e)&&ae.get(e);if(m&&(l=m.events)){for(c=(t=(t||"").match(Y)||[""]).length;c--;)if(f=g=(a=De.exec(t[c])||[])[1],p=(a[2]||"").split(".").sort(),f){for(h=S.event.special[f]||{},d=l[f=(i?h.delegateType:h.bindType)||f]||[],a=a[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),r=s=d.length;s--;)u=d[s],!o&&g!==u.origType||n&&n.guid!==u.guid||a&&!a.test(u.namespace)||i&&i!==u.selector&&("**"!==i||!u.selector)||(d.splice(s,1),u.selector&&d.delegateCount--,h.remove&&h.remove.call(e,u));r&&!d.length&&(h.teardown&&!1!==h.teardown.call(e,p,m.handle)||S.removeEvent(e,f,m.handle),delete l[f])}else for(f in l)S.event.remove(e,f+t[c],n,i,!0);S.isEmptyObject(l)&&ae.remove(e,"handle events")}},dispatch:function(e){var t,n,i,o,s,r,a=new Array(arguments.length),l=S.event.fix(e),c=(ae.get(this,"events")||Object.create(null))[l.type]||[],u=S.event.special[l.type]||{};for(a[0]=l,t=1;t<arguments.length;t++)a[t]=arguments[t];if(l.delegateTarget=this,!u.preDispatch||!1!==u.preDispatch.call(this,l)){for(r=S.event.handlers.call(this,l,c),t=0;(o=r[t++])&&!l.isPropagationStopped();)for(l.currentTarget=o.elem,n=0;(s=o.handlers[n++])&&!l.isImmediatePropagationStopped();)l.rnamespace&&!1!==s.namespace&&!l.rnamespace.test(s.namespace)||(l.handleObj=s,l.data=s.data,void 0!==(i=((S.event.special[s.origType]||{}).handle||s.handler).apply(o.elem,a))&&!1===(l.result=i)&&(l.preventDefault(),l.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,l),l.result}},handlers:function(e,t){var n,i,o,s,r,a=[],l=t.delegateCount,c=e.target;if(l&&c.nodeType&&!("click"===e.type&&e.button>=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||!0!==c.disabled)){for(s=[],r={},n=0;n<l;n++)void 0===r[o=(i=t[n]).selector+" "]&&(r[o]=i.needsContext?S(o,this).index(c)>-1:S.find(o,this,null,[c]).length),r[o]&&s.push(i);s.length&&a.push({elem:c,handlers:s})}return c=this,l<t.length&&a.push({elem:c,handlers:t.slice(l)}),a},addProp:function(e,t){Object.defineProperty(S.Event.prototype,e,{enumerable:!0,configurable:!0,get:v(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[S.expando]?e:new S.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return Se.test(t.type)&&t.click&&k(t,"input")&&Re(t,"click",!0),!1},trigger:function(e){var t=this||e;return Se.test(t.type)&&t.click&&k(t,"input")&&Re(t,"click"),!0},_default:function(e){var t=e.target;return Se.test(t.type)&&t.click&&k(t,"input")&&ae.get(t,"click")||k(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},S.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},S.Event=function(e,t){if(!(this instanceof S.Event))return new S.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ie:je,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&S.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[S.expando]=!0},S.Event.prototype={constructor:S.Event,isDefaultPrevented:je,isPropagationStopped:je,isImmediatePropagationStopped:je,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ie,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ie,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ie,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},S.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},S.event.addProp),S.each({focus:"focusin",blur:"focusout"},function(e,t){function n(e){if(y.documentMode){var n=ae.get(this,"handle"),i=S.event.fix(e);i.type="focusin"===e.type?"focus":"blur",i.isSimulated=!0,n(e),i.target===i.currentTarget&&n(i)}else S.event.simulate(t,e.target,S.event.fix(e))}S.event.special[e]={setup:function(){var i;if(Re(this,e,!0),!y.documentMode)return!1;(i=ae.get(this,t))||this.addEventListener(t,n),ae.set(this,t,(i||0)+1)},trigger:function(){return Re(this,e),!0},teardown:function(){var e;if(!y.documentMode)return!1;(e=ae.get(this,t)-1)?ae.set(this,t,e):(this.removeEventListener(t,n),ae.remove(this,t))},_default:function(t){return ae.get(t.target,e)},delegateType:t},S.event.special[t]={setup:function(){var i=this.ownerDocument||this.document||this,o=y.documentMode?this:i,s=ae.get(o,t);s||(y.documentMode?this.addEventListener(t,n):i.addEventListener(e,n,!0)),ae.set(o,t,(s||0)+1)},teardown:function(){var i=this.ownerDocument||this.document||this,o=y.documentMode?this:i,s=ae.get(o,t)-1;s?ae.set(o,t,s):(y.documentMode?this.removeEventListener(t,n):i.removeEventListener(e,n,!0),ae.remove(o,t))}}}),S.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){S.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,i=e.relatedTarget,o=e.handleObj;return i&&(i===this||S.contains(this,i))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),S.fn.extend({on:function(e,t,n,i){return Ne(this,e,t,n,i)},one:function(e,t,n,i){return Ne(this,e,t,n,i,1)},off:function(e,t,n){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,S(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,t,e[o]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=je),this.each(function(){S.event.remove(this,e,n,t)})}});var Fe=/<script|<style|<link/i,ze=/checked\s*(?:[^=]|=\s*.checked.)/i,He=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function $e(e,t){return k(e,"table")&&k(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Be(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function We(e,t){var n,i,o,s,r,a;if(1===t.nodeType){if(ae.hasData(e)&&(a=ae.get(e).events))for(o in ae.remove(t,"handle events"),a)for(n=0,i=a[o].length;n<i;n++)S.event.add(t,o,a[o][n]);le.hasData(e)&&(s=le.access(e),r=S.extend({},s),le.set(t,r))}}function Ve(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Se.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function Xe(e,t,n,i){t=l(t);var o,s,r,a,c,u,h=0,d=e.length,f=d-1,p=t[0],g=v(p);if(g||d>1&&"string"==typeof p&&!m.checkClone&&ze.test(p))return e.each(function(o){var s=e.eq(o);g&&(t[0]=p.call(this,o,s.html())),Xe(s,t,n,i)});if(d&&(s=(o=Le(t,e[0].ownerDocument,!1,e,i)).firstChild,1===o.childNodes.length&&(o=s),s||i)){for(a=(r=S.map(Oe(o,"script"),Be)).length;h<d;h++)c=o,h!==f&&(c=S.clone(c,!0,!0),a&&S.merge(r,Oe(c,"script"))),n.call(e[h],c,h);if(a)for(u=r[r.length-1].ownerDocument,S.map(r,qe),h=0;h<a;h++)c=r[h],ke.test(c.type||"")&&!ae.access(c,"globalEval")&&S.contains(u,c)&&(c.src&&"module"!==(c.type||"").toLowerCase()?S._evalUrl&&!c.noModule&&S._evalUrl(c.src,{nonce:c.nonce||c.getAttribute("nonce")},u):_(c.textContent.replace(He,""),c,u))}return e}function Ye(e,t,n){for(var i,o=t?S.filter(t,e):e,s=0;null!=(i=o[s]);s++)n||1!==i.nodeType||S.cleanData(Oe(i)),i.parentNode&&(n&&me(i)&&Me(Oe(i,"script")),i.parentNode.removeChild(i));return e}S.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var i,o,s,r,a=e.cloneNode(!0),l=me(e);if(!(m.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||S.isXMLDoc(e)))for(r=Oe(a),i=0,o=(s=Oe(e)).length;i<o;i++)Ve(s[i],r[i]);if(t)if(n)for(s=s||Oe(e),r=r||Oe(a),i=0,o=s.length;i<o;i++)We(s[i],r[i]);else We(e,a);return(r=Oe(a,"script")).length>0&&Me(r,!l&&Oe(e,"script")),a},cleanData:function(e){for(var t,n,i,o=S.event.special,s=0;void 0!==(n=e[s]);s++)if(se(n)){if(t=n[ae.expando]){if(t.events)for(i in t.events)o[i]?S.event.remove(n,i):S.removeEvent(n,i,t.handle);n[ae.expando]=void 0}n[le.expando]&&(n[le.expando]=void 0)}}}),S.fn.extend({detach:function(e){return Ye(this,e,!0)},remove:function(e){return Ye(this,e)},text:function(e){return ee(this,function(e){return void 0===e?S.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Xe(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||$e(this,e).appendChild(e)})},prepend:function(){return Xe(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=$e(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Xe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Xe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(S.cleanData(Oe(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return S.clone(this,e,t)})},html:function(e){return ee(this,function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Fe.test(e)&&!Ae[(Te.exec(e)||["",""])[1].toLowerCase()]){e=S.htmlPrefilter(e);try{for(;n<i;n++)1===(t=this[n]||{}).nodeType&&(S.cleanData(Oe(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return Xe(this,arguments,function(t){var n=this.parentNode;S.inArray(this,e)<0&&(S.cleanData(Oe(this)),n&&n.replaceChild(t,this))},e)}}),S.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){S.fn[e]=function(e){for(var n,i=[],o=S(e),s=o.length-1,r=0;r<=s;r++)n=r===s?this:this.clone(!0),S(o[r])[t](n),c.apply(i,n.get());return this.pushStack(i)}});var Ue=new RegExp("^("+de+")(?!px)[a-z%]+$","i"),Ge=/^--/,Ze=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=i),t.getComputedStyle(e)},Ke=function(e,t,n){var i,o,s={};for(o in t)s[o]=e.style[o],e.style[o]=t[o];for(o in i=n.call(e),t)e.style[o]=s[o];return i},Je=new RegExp(pe.join("|"),"i");function Qe(e,t,n){var i,o,s,r,a=Ge.test(t),l=e.style;return(n=n||Ze(e))&&(r=n.getPropertyValue(t)||n[t],a&&r&&(r=r.replace(L,"$1")||void 0),""!==r||me(e)||(r=S.style(e,t)),!m.pixelBoxStyles()&&Ue.test(r)&&Je.test(t)&&(i=l.width,o=l.minWidth,s=l.maxWidth,l.minWidth=l.maxWidth=l.width=r,r=n.width,l.width=i,l.minWidth=o,l.maxWidth=s)),void 0!==r?r+"":r}function et(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(u){c.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",u.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",ge.appendChild(c).appendChild(u);var e=i.getComputedStyle(u);n="1%"!==e.top,l=12===t(e.marginLeft),u.style.right="60%",r=36===t(e.right),o=36===t(e.width),u.style.position="absolute",s=12===t(u.offsetWidth/3),ge.removeChild(c),u=null}}function t(e){return Math.round(parseFloat(e))}var n,o,s,r,a,l,c=y.createElement("div"),u=y.createElement("div");u.style&&(u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",m.clearCloneStyle="content-box"===u.style.backgroundClip,S.extend(m,{boxSizingReliable:function(){return e(),o},pixelBoxStyles:function(){return e(),r},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),l},scrollboxSize:function(){return e(),s},reliableTrDimensions:function(){var e,t,n,o;return null==a&&(e=y.createElement("table"),t=y.createElement("tr"),n=y.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",t.style.cssText="box-sizing:content-box;border:1px solid",t.style.height="1px",n.style.height="9px",n.style.display="block",ge.appendChild(e).appendChild(t).appendChild(n),o=i.getComputedStyle(t),a=parseInt(o.height,10)+parseInt(o.borderTopWidth,10)+parseInt(o.borderBottomWidth,10)===t.offsetHeight,ge.removeChild(e)),a}}))}();var tt=["Webkit","Moz","ms"],nt=y.createElement("div").style,it={};function ot(e){var t=S.cssProps[e]||it[e];return t||(e in nt?e:it[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=tt.length;n--;)if((e=tt[n]+t)in nt)return e}(e)||e)}var st=/^(none|table(?!-c[ea]).+)/,rt={position:"absolute",visibility:"hidden",display:"block"},at={letterSpacing:"0",fontWeight:"400"};function lt(e,t,n){var i=fe.exec(t);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):t}function ct(e,t,n,i,o,s){var r="width"===t?1:0,a=0,l=0,c=0;if(n===(i?"border":"content"))return 0;for(;r<4;r+=2)"margin"===n&&(c+=S.css(e,n+pe[r],!0,o)),i?("content"===n&&(l-=S.css(e,"padding"+pe[r],!0,o)),"margin"!==n&&(l-=S.css(e,"border"+pe[r]+"Width",!0,o))):(l+=S.css(e,"padding"+pe[r],!0,o),"padding"!==n?l+=S.css(e,"border"+pe[r]+"Width",!0,o):a+=S.css(e,"border"+pe[r]+"Width",!0,o));return!i&&s>=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-s-l-a-.5))||0),l+c}function ut(e,t,n){var i=Ze(e),o=(!m.boxSizingReliable()||n)&&"border-box"===S.css(e,"boxSizing",!1,i),s=o,r=Qe(e,t,i),a="offset"+t[0].toUpperCase()+t.slice(1);if(Ue.test(r)){if(!n)return r;r="auto"}return(!m.boxSizingReliable()&&o||!m.reliableTrDimensions()&&k(e,"tr")||"auto"===r||!parseFloat(r)&&"inline"===S.css(e,"display",!1,i))&&e.getClientRects().length&&(o="border-box"===S.css(e,"boxSizing",!1,i),(s=a in e)&&(r=e[a])),(r=parseFloat(r)||0)+ct(e,t,n||(o?"border":"content"),s,i,r)+"px"}function ht(e,t,n,i,o){return new ht.prototype.init(e,t,n,i,o)}S.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Qe(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(e,t,n,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,s,r,a=oe(t),l=Ge.test(t),c=e.style;if(l||(t=ot(a)),r=S.cssHooks[t]||S.cssHooks[a],void 0===n)return r&&"get"in r&&void 0!==(o=r.get(e,!1,i))?o:c[t];"string"===(s=typeof n)&&(o=fe.exec(n))&&o[1]&&(n=ye(e,t,o),s="number"),null!=n&&n==n&&("number"!==s||l||(n+=o&&o[3]||(S.cssNumber[a]?"":"px")),m.clearCloneStyle||""!==n||0!==t.indexOf("background")||(c[t]="inherit"),r&&"set"in r&&void 0===(n=r.set(e,n,i))||(l?c.setProperty(t,n):c[t]=n))}},css:function(e,t,n,i){var o,s,r,a=oe(t);return Ge.test(t)||(t=ot(a)),(r=S.cssHooks[t]||S.cssHooks[a])&&"get"in r&&(o=r.get(e,!0,n)),void 0===o&&(o=Qe(e,t,i)),"normal"===o&&t in at&&(o=at[t]),""===n||n?(s=parseFloat(o),!0===n||isFinite(s)?s||0:o):o}}),S.each(["height","width"],function(e,t){S.cssHooks[t]={get:function(e,n,i){if(n)return!st.test(S.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?ut(e,t,i):Ke(e,rt,function(){return ut(e,t,i)})},set:function(e,n,i){var o,s=Ze(e),r=!m.scrollboxSize()&&"absolute"===s.position,a=(r||i)&&"border-box"===S.css(e,"boxSizing",!1,s),l=i?ct(e,t,i,a,s):0;return a&&r&&(l-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(s[t])-ct(e,t,"border",!1,s)-.5)),l&&(o=fe.exec(n))&&"px"!==(o[3]||"px")&&(e.style[t]=n,n=S.css(e,t)),lt(0,n,l)}}}),S.cssHooks.marginLeft=et(m.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Qe(e,"marginLeft"))||e.getBoundingClientRect().left-Ke(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),S.each({margin:"",padding:"",border:"Width"},function(e,t){S.cssHooks[e+t]={expand:function(n){for(var i=0,o={},s="string"==typeof n?n.split(" "):[n];i<4;i++)o[e+pe[i]+t]=s[i]||s[i-2]||s[0];return o}},"margin"!==e&&(S.cssHooks[e+t].set=lt)}),S.fn.extend({css:function(e,t){return ee(this,function(e,t,n){var i,o,s={},r=0;if(Array.isArray(t)){for(i=Ze(e),o=t.length;r<o;r++)s[t[r]]=S.css(e,t[r],!1,i);return s}return void 0!==n?S.style(e,t,n):S.css(e,t)},e,t,arguments.length>1)}}),S.Tween=ht,ht.prototype={constructor:ht,init:function(e,t,n,i,o,s){this.elem=e,this.prop=n,this.easing=o||S.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=s||(S.cssNumber[n]?"":"px")},cur:function(){var e=ht.propHooks[this.prop];return e&&e.get?e.get(this):ht.propHooks._default.get(this)},run:function(e){var t,n=ht.propHooks[this.prop];return this.options.duration?this.pos=t=S.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):ht.propHooks._default.set(this),this}},ht.prototype.init.prototype=ht.prototype,ht.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=S.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){S.fx.step[e.prop]?S.fx.step[e.prop](e):1!==e.elem.nodeType||!S.cssHooks[e.prop]&&null==e.elem.style[ot(e.prop)]?e.elem[e.prop]=e.now:S.style(e.elem,e.prop,e.now+e.unit)}}},ht.propHooks.scrollTop=ht.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},S.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},S.fx=ht.prototype.init,S.fx.step={};var dt,ft,pt=/^(?:toggle|show|hide)$/,gt=/queueHooks$/;function mt(){ft&&(!1===y.hidden&&i.requestAnimationFrame?i.requestAnimationFrame(mt):i.setTimeout(mt,S.fx.interval),S.fx.tick())}function vt(){return i.setTimeout(function(){dt=void 0}),dt=Date.now()}function bt(e,t){var n,i=0,o={height:e};for(t=t?1:0;i<4;i+=2-t)o["margin"+(n=pe[i])]=o["padding"+n]=e;return t&&(o.opacity=o.width=e),o}function yt(e,t,n){for(var i,o=(wt.tweeners[t]||[]).concat(wt.tweeners["*"]),s=0,r=o.length;s<r;s++)if(i=o[s].call(n,t,e))return i}function wt(e,t,n){var i,o,s=0,r=wt.prefilters.length,a=S.Deferred().always(function(){delete l.elem}),l=function(){if(o)return!1;for(var t=dt||vt(),n=Math.max(0,c.startTime+c.duration-t),i=1-(n/c.duration||0),s=0,r=c.tweens.length;s<r;s++)c.tweens[s].run(i);return a.notifyWith(e,[c,i,n]),i<1&&r?n:(r||a.notifyWith(e,[c,1,0]),a.resolveWith(e,[c]),!1)},c=a.promise({elem:e,props:S.extend({},t),opts:S.extend(!0,{specialEasing:{},easing:S.easing._default},n),originalProperties:t,originalOptions:n,startTime:dt||vt(),duration:n.duration,tweens:[],createTween:function(t,n){var i=S.Tween(e,c.opts,t,n,c.opts.specialEasing[t]||c.opts.easing);return c.tweens.push(i),i},stop:function(t){var n=0,i=t?c.tweens.length:0;if(o)return this;for(o=!0;n<i;n++)c.tweens[n].run(1);return t?(a.notifyWith(e,[c,1,0]),a.resolveWith(e,[c,t])):a.rejectWith(e,[c,t]),this}}),u=c.props;for(!function(e,t){var n,i,o,s,r;for(n in e)if(o=t[i=oe(n)],s=e[n],Array.isArray(s)&&(o=s[1],s=e[n]=s[0]),n!==i&&(e[i]=s,delete e[n]),(r=S.cssHooks[i])&&"expand"in r)for(n in s=r.expand(s),delete e[i],s)n in e||(e[n]=s[n],t[n]=o);else t[i]=o}(u,c.opts.specialEasing);s<r;s++)if(i=wt.prefilters[s].call(c,e,u,c.opts))return v(i.stop)&&(S._queueHooks(c.elem,c.opts.queue).stop=i.stop.bind(i)),i;return S.map(u,yt,c),v(c.opts.start)&&c.opts.start.call(e,c),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always),S.fx.timer(S.extend(l,{elem:e,anim:c,queue:c.opts.queue})),c}S.Animation=S.extend(wt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return ye(n.elem,e,fe.exec(t),n),n}]},tweener:function(e,t){v(e)?(t=e,e=["*"]):e=e.match(Y);for(var n,i=0,o=e.length;i<o;i++)n=e[i],wt.tweeners[n]=wt.tweeners[n]||[],wt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var i,o,s,r,a,l,c,u,h="width"in t||"height"in t,d=this,f={},p=e.style,g=e.nodeType&&be(e),m=ae.get(e,"fxshow");for(i in n.queue||(null==(r=S._queueHooks(e,"fx")).unqueued&&(r.unqueued=0,a=r.empty.fire,r.empty.fire=function(){r.unqueued||a()}),r.unqueued++,d.always(function(){d.always(function(){r.unqueued--,S.queue(e,"fx").length||r.empty.fire()})})),t)if(o=t[i],pt.test(o)){if(delete t[i],s=s||"toggle"===o,o===(g?"hide":"show")){if("show"!==o||!m||void 0===m[i])continue;g=!0}f[i]=m&&m[i]||S.style(e,i)}if((l=!S.isEmptyObject(t))||!S.isEmptyObject(f))for(i in h&&1===e.nodeType&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],null==(c=m&&m.display)&&(c=ae.get(e,"display")),"none"===(u=S.css(e,"display"))&&(c?u=c:(xe([e],!0),c=e.style.display||c,u=S.css(e,"display"),xe([e]))),("inline"===u||"inline-block"===u&&null!=c)&&"none"===S.css(e,"float")&&(l||(d.done(function(){p.display=c}),null==c&&(u=p.display,c="none"===u?"":u)),p.display="inline-block")),n.overflow&&(p.overflow="hidden",d.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]})),l=!1,f)l||(m?"hidden"in m&&(g=m.hidden):m=ae.access(e,"fxshow",{display:c}),s&&(m.hidden=!g),g&&xe([e],!0),d.done(function(){for(i in g||xe([e]),ae.remove(e,"fxshow"),f)S.style(e,i,f[i])})),l=yt(g?m[i]:0,i,d),i in m||(m[i]=l.start,g&&(l.end=l.start,l.start=0))}],prefilter:function(e,t){t?wt.prefilters.unshift(e):wt.prefilters.push(e)}}),S.speed=function(e,t,n){var i=e&&"object"==typeof e?S.extend({},e):{complete:n||!n&&t||v(e)&&e,duration:e,easing:n&&t||t&&!v(t)&&t};return S.fx.off?i.duration=0:"number"!=typeof i.duration&&(i.duration in S.fx.speeds?i.duration=S.fx.speeds[i.duration]:i.duration=S.fx.speeds._default),null!=i.queue&&!0!==i.queue||(i.queue="fx"),i.old=i.complete,i.complete=function(){v(i.old)&&i.old.call(this),i.queue&&S.dequeue(this,i.queue)},i},S.fn.extend({fadeTo:function(e,t,n,i){return this.filter(be).css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function(e,t,n,i){var o=S.isEmptyObject(e),s=S.speed(t,n,i),r=function(){var t=wt(this,S.extend({},e),s);(o||ae.get(this,"finish"))&&t.stop(!0)};return r.finish=r,o||!1===s.queue?this.each(r):this.queue(s.queue,r)},stop:function(e,t,n){var i=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&this.queue(e||"fx",[]),this.each(function(){var t=!0,o=null!=e&&e+"queueHooks",s=S.timers,r=ae.get(this);if(o)r[o]&&r[o].stop&&i(r[o]);else for(o in r)r[o]&&r[o].stop&&gt.test(o)&&i(r[o]);for(o=s.length;o--;)s[o].elem!==this||null!=e&&s[o].queue!==e||(s[o].anim.stop(n),t=!1,s.splice(o,1));!t&&n||S.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=ae.get(this),i=n[e+"queue"],o=n[e+"queueHooks"],s=S.timers,r=i?i.length:0;for(n.finish=!0,S.queue(this,e,[]),o&&o.stop&&o.stop.call(this,!0),t=s.length;t--;)s[t].elem===this&&s[t].queue===e&&(s[t].anim.stop(!0),s.splice(t,1));for(t=0;t<r;t++)i[t]&&i[t].finish&&i[t].finish.call(this);delete n.finish})}}),S.each(["toggle","show","hide"],function(e,t){var n=S.fn[t];S.fn[t]=function(e,i,o){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(bt(t,!0),e,i,o)}}),S.each({slideDown:bt("show"),slideUp:bt("hide"),slideToggle:bt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){S.fn[e]=function(e,n,i){return this.animate(t,e,n,i)}}),S.timers=[],S.fx.tick=function(){var e,t=0,n=S.timers;for(dt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||S.fx.stop(),dt=void 0},S.fx.timer=function(e){S.timers.push(e),S.fx.start()},S.fx.interval=13,S.fx.start=function(){ft||(ft=!0,mt())},S.fx.stop=function(){ft=null},S.fx.speeds={slow:600,fast:200,_default:400},S.fn.delay=function(e,t){return e=S.fx&&S.fx.speeds[e]||e,t=t||"fx",this.queue(t,function(t,n){var o=i.setTimeout(t,e);n.stop=function(){i.clearTimeout(o)}})},function(){var e=y.createElement("input"),t=y.createElement("select").appendChild(y.createElement("option"));e.type="checkbox",m.checkOn=""!==e.value,m.optSelected=t.selected,(e=y.createElement("input")).value="t",e.type="radio",m.radioValue="t"===e.value}();var _t,xt=S.expr.attrHandle;S.fn.extend({attr:function(e,t){return ee(this,S.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){S.removeAttr(this,e)})}}),S.extend({attr:function(e,t,n){var i,o,s=e.nodeType;if(3!==s&&8!==s&&2!==s)return void 0===e.getAttribute?S.prop(e,t,n):(1===s&&S.isXMLDoc(e)||(o=S.attrHooks[t.toLowerCase()]||(S.expr.match.bool.test(t)?_t:void 0)),void 0!==n?null===n?void S.removeAttr(e,t):o&&"set"in o&&void 0!==(i=o.set(e,n,t))?i:(e.setAttribute(t,n+""),n):o&&"get"in o&&null!==(i=o.get(e,t))?i:null==(i=S.find.attr(e,t))?void 0:i)},attrHooks:{type:{set:function(e,t){if(!m.radioValue&&"radio"===t&&k(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,i=0,o=t&&t.match(Y);if(o&&1===e.nodeType)for(;n=o[i++];)e.removeAttribute(n)}}),_t={set:function(e,t,n){return!1===t?S.removeAttr(e,n):e.setAttribute(n,n),n}},S.each(S.expr.match.bool.source.match(/\w+/g),function(e,t){var n=xt[t]||S.find.attr;xt[t]=function(e,t,i){var o,s,r=t.toLowerCase();return i||(s=xt[r],xt[r]=o,o=null!=n(e,t,i)?r:null,xt[r]=s),o}});var Et=/^(?:input|select|textarea|button)$/i,Ct=/^(?:a|area)$/i;function St(e){return(e.match(Y)||[]).join(" ")}function Tt(e){return e.getAttribute&&e.getAttribute("class")||""}function kt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(Y)||[]}S.fn.extend({prop:function(e,t){return ee(this,S.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[S.propFix[e]||e]})}}),S.extend({prop:function(e,t,n){var i,o,s=e.nodeType;if(3!==s&&8!==s&&2!==s)return 1===s&&S.isXMLDoc(e)||(t=S.propFix[t]||t,o=S.propHooks[t]),void 0!==n?o&&"set"in o&&void 0!==(i=o.set(e,n,t))?i:e[t]=n:o&&"get"in o&&null!==(i=o.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=S.find.attr(e,"tabindex");return t?parseInt(t,10):Et.test(e.nodeName)||Ct.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),m.optSelected||(S.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),S.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){S.propFix[this.toLowerCase()]=this}),S.fn.extend({addClass:function(e){var t,n,i,o,s,r;return v(e)?this.each(function(t){S(this).addClass(e.call(this,t,Tt(this)))}):(t=kt(e)).length?this.each(function(){if(i=Tt(this),n=1===this.nodeType&&" "+St(i)+" "){for(s=0;s<t.length;s++)o=t[s],n.indexOf(" "+o+" ")<0&&(n+=o+" ");r=St(n),i!==r&&this.setAttribute("class",r)}}):this},removeClass:function(e){var t,n,i,o,s,r;return v(e)?this.each(function(t){S(this).removeClass(e.call(this,t,Tt(this)))}):arguments.length?(t=kt(e)).length?this.each(function(){if(i=Tt(this),n=1===this.nodeType&&" "+St(i)+" "){for(s=0;s<t.length;s++)for(o=t[s];n.indexOf(" "+o+" ")>-1;)n=n.replace(" "+o+" "," ");r=St(n),i!==r&&this.setAttribute("class",r)}}):this:this.attr("class","")},toggleClass:function(e,t){var n,i,o,s,r=typeof e,a="string"===r||Array.isArray(e);return v(e)?this.each(function(n){S(this).toggleClass(e.call(this,n,Tt(this),t),t)}):"boolean"==typeof t&&a?t?this.addClass(e):this.removeClass(e):(n=kt(e),this.each(function(){if(a)for(s=S(this),o=0;o<n.length;o++)i=n[o],s.hasClass(i)?s.removeClass(i):s.addClass(i);else void 0!==e&&"boolean"!==r||((i=Tt(this))&&ae.set(this,"__className__",i),this.setAttribute&&this.setAttribute("class",i||!1===e?"":ae.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,i=0;for(t=" "+e+" ";n=this[i++];)if(1===n.nodeType&&(" "+St(Tt(n))+" ").indexOf(t)>-1)return!0;return!1}});var At=/\r/g;S.fn.extend({val:function(e){var t,n,i,o=this[0];return arguments.length?(i=v(e),this.each(function(n){var o;1===this.nodeType&&(null==(o=i?e.call(this,n,S(this).val()):e)?o="":"number"==typeof o?o+="":Array.isArray(o)&&(o=S.map(o,function(e){return null==e?"":e+""})),(t=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,o,"value")||(this.value=o))})):o?(t=S.valHooks[o.type]||S.valHooks[o.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(o,"value"))?n:"string"==typeof(n=o.value)?n.replace(At,""):null==n?"":n:void 0}}),S.extend({valHooks:{option:{get:function(e){var t=S.find.attr(e,"value");return null!=t?t:St(S.text(e))}},select:{get:function(e){var t,n,i,o=e.options,s=e.selectedIndex,r="select-one"===e.type,a=r?null:[],l=r?s+1:o.length;for(i=s<0?l:r?s:0;i<l;i++)if(((n=o[i]).selected||i===s)&&!n.disabled&&(!n.parentNode.disabled||!k(n.parentNode,"optgroup"))){if(t=S(n).val(),r)return t;a.push(t)}return a},set:function(e,t){for(var n,i,o=e.options,s=S.makeArray(t),r=o.length;r--;)((i=o[r]).selected=S.inArray(S.valHooks.option.get(i),s)>-1)&&(n=!0);return n||(e.selectedIndex=-1),s}}}}),S.each(["radio","checkbox"],function(){S.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=S.inArray(S(e).val(),t)>-1}},m.checkOn||(S.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Ot=i.location,Mt={guid:Date.now()},Pt=/\?/;S.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new i.DOMParser).parseFromString(e,"text/xml")}catch(e){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||S.error("Invalid XML: "+(n?S.map(n.childNodes,function(e){return e.textContent}).join("\n"):e)),t};var Lt=/^(?:focusinfocus|focusoutblur)$/,Dt=function(e){e.stopPropagation()};S.extend(S.event,{trigger:function(e,t,n,o){var s,r,a,l,c,u,h,d,p=[n||y],g=f.call(e,"type")?e.type:e,m=f.call(e,"namespace")?e.namespace.split("."):[];if(r=d=a=n=n||y,3!==n.nodeType&&8!==n.nodeType&&!Lt.test(g+S.event.triggered)&&(g.indexOf(".")>-1&&(m=g.split("."),g=m.shift(),m.sort()),c=g.indexOf(":")<0&&"on"+g,(e=e[S.expando]?e:new S.Event(g,"object"==typeof e&&e)).isTrigger=o?2:3,e.namespace=m.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:S.makeArray(t,[e]),h=S.event.special[g]||{},o||!h.trigger||!1!==h.trigger.apply(n,t))){if(!o&&!h.noBubble&&!b(n)){for(l=h.delegateType||g,Lt.test(l+g)||(r=r.parentNode);r;r=r.parentNode)p.push(r),a=r;a===(n.ownerDocument||y)&&p.push(a.defaultView||a.parentWindow||i)}for(s=0;(r=p[s++])&&!e.isPropagationStopped();)d=r,e.type=s>1?l:h.bindType||g,(u=(ae.get(r,"events")||Object.create(null))[e.type]&&ae.get(r,"handle"))&&u.apply(r,t),(u=c&&r[c])&&u.apply&&se(r)&&(e.result=u.apply(r,t),!1===e.result&&e.preventDefault());return e.type=g,o||e.isDefaultPrevented()||h._default&&!1!==h._default.apply(p.pop(),t)||!se(n)||c&&v(n[g])&&!b(n)&&((a=n[c])&&(n[c]=null),S.event.triggered=g,e.isPropagationStopped()&&d.addEventListener(g,Dt),n[g](),e.isPropagationStopped()&&d.removeEventListener(g,Dt),S.event.triggered=void 0,a&&(n[c]=a)),e.result}},simulate:function(e,t,n){var i=S.extend(new S.Event,n,{type:e,isSimulated:!0});S.event.trigger(i,null,t)}}),S.fn.extend({trigger:function(e,t){return this.each(function(){S.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return S.event.trigger(e,t,n,!0)}});var It=/\[\]$/,jt=/\r?\n/g,Nt=/^(?:submit|button|image|reset|file)$/i,Rt=/^(?:input|select|textarea|keygen)/i;function Ft(e,t,n,i){var o;if(Array.isArray(t))S.each(t,function(t,o){n||It.test(e)?i(e,o):Ft(e+"["+("object"==typeof o&&null!=o?t:"")+"]",o,n,i)});else if(n||"object"!==x(t))i(e,t);else for(o in t)Ft(e+"["+o+"]",t[o],n,i)}S.param=function(e,t){var n,i=[],o=function(e,t){var n=v(t)?t():t;i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!S.isPlainObject(e))S.each(e,function(){o(this.name,this.value)});else for(n in e)Ft(n,e[n],t,o);return i.join("&")},S.fn.extend({serialize:function(){return S.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=S.prop(this,"elements");return e?S.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!S(this).is(":disabled")&&Rt.test(this.nodeName)&&!Nt.test(e)&&(this.checked||!Se.test(e))}).map(function(e,t){var n=S(this).val();return null==n?null:Array.isArray(n)?S.map(n,function(e){return{name:t.name,value:e.replace(jt,"\r\n")}}):{name:t.name,value:n.replace(jt,"\r\n")}}).get()}});var zt=/%20/g,Ht=/#.*$/,$t=/([?&])_=[^&]*/,Bt=/^(.*?):[ \t]*([^\r\n]*)$/gm,qt=/^(?:GET|HEAD)$/,Wt=/^\/\//,Vt={},Xt={},Yt="*/".concat("*"),Ut=y.createElement("a");function Gt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,o=0,s=t.toLowerCase().match(Y)||[];if(v(n))for(;i=s[o++];)"+"===i[0]?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function Zt(e,t,n,i){var o={},s=e===Xt;function r(a){var l;return o[a]=!0,S.each(e[a]||[],function(e,a){var c=a(t,n,i);return"string"!=typeof c||s||o[c]?s?!(l=c):void 0:(t.dataTypes.unshift(c),r(c),!1)}),l}return r(t.dataTypes[0])||!o["*"]&&r("*")}function Kt(e,t){var n,i,o=S.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((o[n]?e:i||(i={}))[n]=t[n]);return i&&S.extend(!0,e,i),e}Ut.href=Ot.href,S.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ot.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Ot.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Yt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":S.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Kt(Kt(e,S.ajaxSettings),t):Kt(S.ajaxSettings,e)},ajaxPrefilter:Gt(Vt),ajaxTransport:Gt(Xt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,o,s,r,a,l,c,u,h,d,f=S.ajaxSetup({},t),p=f.context||f,g=f.context&&(p.nodeType||p.jquery)?S(p):S.event,m=S.Deferred(),v=S.Callbacks("once memory"),b=f.statusCode||{},w={},_={},x="canceled",E={readyState:0,getResponseHeader:function(e){var t;if(c){if(!r)for(r={};t=Bt.exec(s);)r[t[1].toLowerCase()+" "]=(r[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=r[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return c?s:null},setRequestHeader:function(e,t){return null==c&&(e=_[e.toLowerCase()]=_[e.toLowerCase()]||e,w[e]=t),this},overrideMimeType:function(e){return null==c&&(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)E.always(e[E.status]);else for(t in e)b[t]=[b[t],e[t]];return this},abort:function(e){var t=e||x;return n&&n.abort(t),C(0,t),this}};if(m.promise(E),f.url=((e||f.url||Ot.href)+"").replace(Wt,Ot.protocol+"//"),f.type=t.method||t.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(Y)||[""],null==f.crossDomain){l=y.createElement("a");try{l.href=f.url,l.href=l.href,f.crossDomain=Ut.protocol+"//"+Ut.host!=l.protocol+"//"+l.host}catch(e){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=S.param(f.data,f.traditional)),Zt(Vt,f,t,E),c)return E;for(h in(u=S.event&&f.global)&&0===S.active++&&S.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!qt.test(f.type),o=f.url.replace(Ht,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(zt,"+")):(d=f.url.slice(o.length),f.data&&(f.processData||"string"==typeof f.data)&&(o+=(Pt.test(o)?"&":"?")+f.data,delete f.data),!1===f.cache&&(o=o.replace($t,"$1"),d=(Pt.test(o)?"&":"?")+"_="+Mt.guid+++d),f.url=o+d),f.ifModified&&(S.lastModified[o]&&E.setRequestHeader("If-Modified-Since",S.lastModified[o]),S.etag[o]&&E.setRequestHeader("If-None-Match",S.etag[o])),(f.data&&f.hasContent&&!1!==f.contentType||t.contentType)&&E.setRequestHeader("Content-Type",f.contentType),E.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Yt+"; q=0.01":""):f.accepts["*"]),f.headers)E.setRequestHeader(h,f.headers[h]);if(f.beforeSend&&(!1===f.beforeSend.call(p,E,f)||c))return E.abort();if(x="abort",v.add(f.complete),E.done(f.success),E.fail(f.error),n=Zt(Xt,f,t,E)){if(E.readyState=1,u&&g.trigger("ajaxSend",[E,f]),c)return E;f.async&&f.timeout>0&&(a=i.setTimeout(function(){E.abort("timeout")},f.timeout));try{c=!1,n.send(w,C)}catch(e){if(c)throw e;C(-1,e)}}else C(-1,"No Transport");function C(e,t,r,l){var h,d,y,w,_,x=t;c||(c=!0,a&&i.clearTimeout(a),n=void 0,s=l||"",E.readyState=e>0?4:0,h=e>=200&&e<300||304===e,r&&(w=function(e,t,n){for(var i,o,s,r,a=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=e.mimeType||t.getResponseHeader("Content-Type"));if(i)for(o in a)if(a[o]&&a[o].test(i)){l.unshift(o);break}if(l[0]in n)s=l[0];else{for(o in n){if(!l[0]||e.converters[o+" "+l[0]]){s=o;break}r||(r=o)}s=s||r}if(s)return s!==l[0]&&l.unshift(s),n[s]}(f,E,r)),!h&&S.inArray("script",f.dataTypes)>-1&&S.inArray("json",f.dataTypes)<0&&(f.converters["text script"]=function(){}),w=function(e,t,n,i){var o,s,r,a,l,c={},u=e.dataTypes.slice();if(u[1])for(r in e.converters)c[r.toLowerCase()]=e.converters[r];for(s=u.shift();s;)if(e.responseFields[s]&&(n[e.responseFields[s]]=t),!l&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=s,s=u.shift())if("*"===s)s=l;else if("*"!==l&&l!==s){if(!(r=c[l+" "+s]||c["* "+s]))for(o in c)if((a=o.split(" "))[1]===s&&(r=c[l+" "+a[0]]||c["* "+a[0]])){!0===r?r=c[o]:!0!==c[o]&&(s=a[0],u.unshift(a[1]));break}if(!0!==r)if(r&&e.throws)t=r(t);else try{t=r(t)}catch(e){return{state:"parsererror",error:r?e:"No conversion from "+l+" to "+s}}}return{state:"success",data:t}}(f,w,E,h),h?(f.ifModified&&((_=E.getResponseHeader("Last-Modified"))&&(S.lastModified[o]=_),(_=E.getResponseHeader("etag"))&&(S.etag[o]=_)),204===e||"HEAD"===f.type?x="nocontent":304===e?x="notmodified":(x=w.state,d=w.data,h=!(y=w.error))):(y=x,!e&&x||(x="error",e<0&&(e=0))),E.status=e,E.statusText=(t||x)+"",h?m.resolveWith(p,[d,x,E]):m.rejectWith(p,[E,x,y]),E.statusCode(b),b=void 0,u&&g.trigger(h?"ajaxSuccess":"ajaxError",[E,f,h?d:y]),v.fireWith(p,[E,x]),u&&(g.trigger("ajaxComplete",[E,f]),--S.active||S.event.trigger("ajaxStop")))}return E},getJSON:function(e,t,n){return S.get(e,t,n,"json")},getScript:function(e,t){return S.get(e,void 0,t,"script")}}),S.each(["get","post"],function(e,t){S[t]=function(e,n,i,o){return v(n)&&(o=o||i,i=n,n=void 0),S.ajax(S.extend({url:e,type:t,dataType:o,data:n,success:i},S.isPlainObject(e)&&e))}}),S.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),S._evalUrl=function(e,t,n){return S.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){S.globalEval(e,t,n)}})},S.fn.extend({wrapAll:function(e){var t;return this[0]&&(v(e)&&(e=e.call(this[0])),t=S(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return v(e)?this.each(function(t){S(this).wrapInner(e.call(this,t))}):this.each(function(){var t=S(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=v(e);return this.each(function(n){S(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){S(this).replaceWith(this.childNodes)}),this}}),S.expr.pseudos.hidden=function(e){return!S.expr.pseudos.visible(e)},S.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},S.ajaxSettings.xhr=function(){try{return new i.XMLHttpRequest}catch(e){}};var Jt={0:200,1223:204},Qt=S.ajaxSettings.xhr();m.cors=!!Qt&&"withCredentials"in Qt,m.ajax=Qt=!!Qt,S.ajaxTransport(function(e){var t,n;if(m.cors||Qt&&!e.crossDomain)return{send:function(o,s){var r,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(r in e.xhrFields)a[r]=e.xhrFields[r];for(r in e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||o["X-Requested-With"]||(o["X-Requested-With"]="XMLHttpRequest"),o)a.setRequestHeader(r,o[r]);t=function(e){return function(){t&&(t=n=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?s(0,"error"):s(a.status,a.statusText):s(Jt[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=t(),n=a.onerror=a.ontimeout=t("error"),void 0!==a.onabort?a.onabort=n:a.onreadystatechange=function(){4===a.readyState&&i.setTimeout(function(){t&&n()})},t=t("abort");try{a.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}}),S.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),S.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return S.globalEval(e),e}}}),S.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),S.ajaxTransport("script",function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(i,o){t=S("<script>").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&o("error"===e.type?404:200,e.type)}),y.head.appendChild(t[0])},abort:function(){n&&n()}}});var en,tn=[],nn=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=tn.pop()||S.expando+"_"+Mt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var o,s,r,a=!1!==e.jsonp&&(nn.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&nn.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return o=e.jsonpCallback=v(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(nn,"$1"+o):!1!==e.jsonp&&(e.url+=(Pt.test(e.url)?"&":"?")+e.jsonp+"="+o),e.converters["script json"]=function(){return r||S.error(o+" was not called"),r[0]},e.dataTypes[0]="json",s=i[o],i[o]=function(){r=arguments},n.always(function(){void 0===s?S(i).removeProp(o):i[o]=s,e[o]&&(e.jsonpCallback=t.jsonpCallback,tn.push(o)),r&&v(s)&&s(r[0]),r=s=void 0}),"script"}),m.createHTMLDocument=((en=y.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===en.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(m.createHTMLDocument?((i=(t=y.implementation.createHTMLDocument("")).createElement("base")).href=y.location.href,t.head.appendChild(i)):t=y),s=!n&&[],(o=H.exec(e))?[t.createElement(o[1])]:(o=Le([e],t,s),s&&s.length&&S(s).remove(),S.merge([],o.childNodes)));var i,o,s},S.fn.load=function(e,t,n){var i,o,s,r=this,a=e.indexOf(" ");return a>-1&&(i=St(e.slice(a)),e=e.slice(0,a)),v(t)?(n=t,t=void 0):t&&"object"==typeof t&&(o="POST"),r.length>0&&S.ajax({url:e,type:o||"GET",dataType:"html",data:t}).done(function(e){s=arguments,r.html(i?S("<div>").append(S.parseHTML(e)).find(i):e)}).always(n&&function(e,t){r.each(function(){n.apply(this,s||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(e){return S.grep(S.timers,function(t){return e===t.elem}).length},S.offset={setOffset:function(e,t,n){var i,o,s,r,a,l,c=S.css(e,"position"),u=S(e),h={};"static"===c&&(e.style.position="relative"),a=u.offset(),s=S.css(e,"top"),l=S.css(e,"left"),("absolute"===c||"fixed"===c)&&(s+l).indexOf("auto")>-1?(r=(i=u.position()).top,o=i.left):(r=parseFloat(s)||0,o=parseFloat(l)||0),v(t)&&(t=t.call(e,n,S.extend({},a))),null!=t.top&&(h.top=t.top-a.top+r),null!=t.left&&(h.left=t.left-a.left+o),"using"in t?t.using.call(e,h):u.css(h)}},S.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){S.offset.setOffset(this,e,t)});var t,n,i=this[0];return i?i.getClientRects().length?(t=i.getBoundingClientRect(),n=i.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,i=this[0],o={top:0,left:0};if("fixed"===S.css(i,"position"))t=i.getBoundingClientRect();else{for(t=this.offset(),n=i.ownerDocument,e=i.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position");)e=e.parentNode;e&&e!==i&&1===e.nodeType&&((o=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),o.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-o.top-S.css(i,"marginTop",!0),left:t.left-o.left-S.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===S.css(e,"position");)e=e.offsetParent;return e||ge})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;S.fn[e]=function(i){return ee(this,function(e,i,o){var s;if(b(e)?s=e:9===e.nodeType&&(s=e.defaultView),void 0===o)return s?s[t]:e[i];s?s.scrollTo(n?s.pageXOffset:o,n?o:s.pageYOffset):e[i]=o},e,i,arguments.length)}}),S.each(["top","left"],function(e,t){S.cssHooks[t]=et(m.pixelPosition,function(e,n){if(n)return n=Qe(e,t),Ue.test(n)?S(e).position()[t]+"px":n})}),S.each({Height:"height",Width:"width"},function(e,t){S.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,i){S.fn[i]=function(o,s){var r=arguments.length&&(n||"boolean"!=typeof o),a=n||(!0===o||!0===s?"margin":"border");return ee(this,function(t,n,o){var s;return b(t)?0===i.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(s=t.documentElement,Math.max(t.body["scroll"+e],s["scroll"+e],t.body["offset"+e],s["offset"+e],s["client"+e])):void 0===o?S.css(t,n,a):S.style(t,n,o,a)},t,r?o:void 0,r)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){S.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}});var on=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;S.proxy=function(e,t){var n,i,o;if("string"==typeof t&&(n=e[t],t=e,e=n),v(e))return i=a.call(arguments,2),o=function(){return e.apply(t||this,i.concat(a.call(arguments)))},o.guid=e.guid=e.guid||S.guid++,o},S.holdReady=function(e){e?S.readyWait++:S.ready(!0)},S.isArray=Array.isArray,S.parseJSON=JSON.parse,S.nodeName=k,S.isFunction=v,S.isWindow=b,S.camelCase=oe,S.type=x,S.now=Date.now,S.isNumeric=function(e){var t=S.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},S.trim=function(e){return null==e?"":(e+"").replace(on,"$1")},void 0===(n=function(){return S}.apply(t,[]))||(e.exports=n);var sn=i.jQuery,rn=i.$;return S.noConflict=function(e){return i.$===S&&(i.$=rn),e&&i.jQuery===S&&(i.jQuery=sn),S},void 0===o&&(i.jQuery=i.$=S),S})},959:(e,t,n)=>{var i,o;n.amdD,i=[n(692)],void 0===(o=function(e){return function(){var t,n,i,o=0,s="error",r="info",a="success",l="warning",c={clear:function(n,i){var o=p();t||u(o),h(n,o,i)||function(n){for(var i=t.children(),o=i.length-1;o>=0;o--)h(e(i[o]),n)}(o)},remove:function(n){var i=p();t||u(i),n&&0===e(":focus",n).length?g(n):t.children().length&&t.remove()},error:function(e,t,n){return f({type:s,iconClass:p().iconClasses.error,message:e,optionsOverride:n,title:t})},getContainer:u,info:function(e,t,n){return f({type:r,iconClass:p().iconClasses.info,message:e,optionsOverride:n,title:t})},options:{},subscribe:function(e){n=e},success:function(e,t,n){return f({type:a,iconClass:p().iconClasses.success,message:e,optionsOverride:n,title:t})},version:"2.1.4",warning:function(e,t,n){return f({type:l,iconClass:p().iconClasses.warning,message:e,optionsOverride:n,title:t})}};return c;function u(n,i){return n||(n=p()),(t=e("#"+n.containerId)).length||i&&(t=function(n){return(t=e("<div/>").attr("id",n.containerId).addClass(n.positionClass)).appendTo(e(n.target)),t}(n)),t}function h(t,n,i){var o=!(!i||!i.force)&&i.force;return!(!t||!o&&0!==e(":focus",t).length||(t[n.hideMethod]({duration:n.hideDuration,easing:n.hideEasing,complete:function(){g(t)}}),0))}function d(e){n&&n(e)}function f(n){var s=p(),r=n.iconClass||s.iconClass;if(void 0!==n.optionsOverride&&(s=e.extend(s,n.optionsOverride),r=n.optionsOverride.iconClass||r),!function(e,t){if(e.preventDuplicates){if(t.message===i)return!0;i=t.message}return!1}(s,n)){o++,t=u(s,!0);var a=null,l=e("<div/>"),c=e("<div/>"),h=e("<div/>"),f=e("<div/>"),m=e(s.closeHtml),v={intervalId:null,hideEta:null,maxHideTime:null},b={toastId:o,state:"visible",startTime:new Date,options:s,map:n};return n.iconClass&&l.addClass(s.toastClass).addClass(r),function(){if(n.title){var e=n.title;s.escapeHtml&&(e=y(n.title)),c.append(e).addClass(s.titleClass),l.append(c)}}(),function(){if(n.message){var e=n.message;s.escapeHtml&&(e=y(n.message)),h.append(e).addClass(s.messageClass),l.append(h)}}(),s.closeButton&&(m.addClass(s.closeClass).attr("role","button"),l.prepend(m)),s.progressBar&&(f.addClass(s.progressClass),l.prepend(f)),s.rtl&&l.addClass("rtl"),s.newestOnTop?t.prepend(l):t.append(l),function(){var e="";switch(n.iconClass){case"toast-success":case"toast-info":e="polite";break;default:e="assertive"}l.attr("aria-live",e)}(),l.hide(),l[s.showMethod]({duration:s.showDuration,easing:s.showEasing,complete:s.onShown}),s.timeOut>0&&(a=setTimeout(w,s.timeOut),v.maxHideTime=parseFloat(s.timeOut),v.hideEta=(new Date).getTime()+v.maxHideTime,s.progressBar&&(v.intervalId=setInterval(E,10))),s.closeOnHover&&l.hover(x,_),!s.onclick&&s.tapToDismiss&&l.click(w),s.closeButton&&m&&m.click(function(e){e.stopPropagation?e.stopPropagation():void 0!==e.cancelBubble&&!0!==e.cancelBubble&&(e.cancelBubble=!0),s.onCloseClick&&s.onCloseClick(e),w(!0)}),s.onclick&&l.click(function(e){s.onclick(e),w()}),d(b),s.debug&&console&&console.log(b),l}function y(e){return null==e&&(e=""),e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function w(t){var n=t&&!1!==s.closeMethod?s.closeMethod:s.hideMethod,i=t&&!1!==s.closeDuration?s.closeDuration:s.hideDuration,o=t&&!1!==s.closeEasing?s.closeEasing:s.hideEasing;if(!e(":focus",l).length||t)return clearTimeout(v.intervalId),l[n]({duration:i,easing:o,complete:function(){g(l),clearTimeout(a),s.onHidden&&"hidden"!==b.state&&s.onHidden(),b.state="hidden",b.endTime=new Date,d(b)}})}function _(){(s.timeOut>0||s.extendedTimeOut>0)&&(a=setTimeout(w,s.extendedTimeOut),v.maxHideTime=parseFloat(s.extendedTimeOut),v.hideEta=(new Date).getTime()+v.maxHideTime)}function x(){clearTimeout(a),v.hideEta=0,l.stop(!0,!0)[s.showMethod]({duration:s.showDuration,easing:s.showEasing})}function E(){var e=(v.hideEta-(new Date).getTime())/v.maxHideTime*100;f.width(e+"%")}}function p(){return e.extend({},{tapToDismiss:!0,toastClass:"toast",containerId:"toast-container",debug:!1,showMethod:"fadeIn",showDuration:300,showEasing:"swing",onShown:void 0,hideMethod:"fadeOut",hideDuration:1e3,hideEasing:"swing",onHidden:void 0,closeMethod:!1,closeDuration:!1,closeEasing:!1,closeOnHover:!0,extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},iconClass:"toast-info",positionClass:"toast-top-right",timeOut:5e3,titleClass:"toast-title",messageClass:"toast-message",escapeHtml:!1,target:"body",closeHtml:'<button type="button">&times;</button>',closeClass:"toast-close-button",newestOnTop:!0,preventDuplicates:!1,progressBar:!1,progressClass:"toast-progress",rtl:!1},c.options)}function g(e){t||(t=u()),e.is(":visible")||(e.remove(),e=null,0===t.children().length&&(t.remove(),i=void 0))}}()}.apply(t,i))||(e.exports=o)}}]);