var c$=Object.defineProperty;var u$=(e,t,n)=>t in e?c$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var xe=(e,t,n)=>(u$(e,typeof t!="symbol"?t+"":t,n),n);function f$(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var zl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function RL(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function d$(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){if(this instanceof r){var i=[null];i.push.apply(i,arguments);var o=Function.bind.apply(t,i);return new o}return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var g={},h$={get exports(){return g},set exports(e){g=e}},sy={},V={},p$={get exports(){return V},set exports(e){V=e}},it={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Rd=Symbol.for("react.element"),m$=Symbol.for("react.portal"),g$=Symbol.for("react.fragment"),v$=Symbol.for("react.strict_mode"),y$=Symbol.for("react.profiler"),_$=Symbol.for("react.provider"),b$=Symbol.for("react.context"),w$=Symbol.for("react.forward_ref"),x$=Symbol.for("react.suspense"),S$=Symbol.for("react.memo"),C$=Symbol.for("react.lazy"),aO=Symbol.iterator;function E$(e){return e===null||typeof e!="object"?null:(e=aO&&e[aO]||e["@@iterator"],typeof e=="function"?e:null)}var NL={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},LL=Object.assign,DL={};function Wc(e,t,n){this.props=e,this.context=t,this.refs=DL,this.updater=n||NL}Wc.prototype.isReactComponent={};Wc.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Wc.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function AL(){}AL.prototype=Wc.prototype;function E2(e,t,n){this.props=e,this.context=t,this.refs=DL,this.updater=n||NL}var T2=E2.prototype=new AL;T2.constructor=E2;LL(T2,Wc.prototype);T2.isPureReactComponent=!0;var lO=Array.isArray,jL=Object.prototype.hasOwnProperty,O2={current:null},IL={key:!0,ref:!0,__self:!0,__source:!0};function FL(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)jL.call(t,r)&&!IL.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1Math.max(Math.min(e,n),t);function zu(e){return ss(Nd(e*2.55),0,255)}function ys(e){return ss(Nd(e*255),0,255)}function ho(e){return ss(Nd(e/2.55)/100,0,1)}function uO(e){return ss(Nd(e*100),0,100)}const Vr={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Z1=[..."0123456789ABCDEF"],j$=e=>Z1[e&15],I$=e=>Z1[(e&240)>>4]+Z1[e&15],Fh=e=>(e&240)>>4===(e&15),F$=e=>Fh(e.r)&&Fh(e.g)&&Fh(e.b)&&Fh(e.a);function $$(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&Vr[e[1]]*17,g:255&Vr[e[2]]*17,b:255&Vr[e[3]]*17,a:t===5?Vr[e[4]]*17:255}:(t===7||t===9)&&(n={r:Vr[e[1]]<<4|Vr[e[2]],g:Vr[e[3]]<<4|Vr[e[4]],b:Vr[e[5]]<<4|Vr[e[6]],a:t===9?Vr[e[7]]<<4|Vr[e[8]]:255})),n}const B$=(e,t)=>e<255?t(e):"";function z$(e){var t=F$(e)?j$:I$;return e?"#"+t(e.r)+t(e.g)+t(e.b)+B$(e.a,t):void 0}const U$=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function BL(e,t,n){const r=t*Math.min(n,1-n),i=(o,s=(o+e/30)%12)=>n-r*Math.max(Math.min(s-3,9-s,1),-1);return[i(0),i(8),i(4)]}function V$(e,t,n){const r=(i,o=(i+e/60)%6)=>n-n*t*Math.max(Math.min(o,4-o,1),0);return[r(5),r(3),r(1)]}function H$(e,t,n){const r=BL(e,1,.5);let i;for(t+n>1&&(i=1/(t+n),t*=i,n*=i),i=0;i<3;i++)r[i]*=1-t-n,r[i]+=t;return r}function W$(e,t,n,r,i){return e===i?(t-n)/r+(t.5?f/(2-o-s):f/(o+s),l=W$(n,r,i,f,o),l=l*60+.5),[l|0,c||0,a]}function M2(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(ys)}function R2(e,t,n){return M2(BL,e,t,n)}function Y$(e,t,n){return M2(H$,e,t,n)}function q$(e,t,n){return M2(V$,e,t,n)}function zL(e){return(e%360+360)%360}function G$(e){const t=U$.exec(e);let n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?zu(+t[5]):ys(+t[5]));const i=zL(+t[2]),o=+t[3]/100,s=+t[4]/100;return t[1]==="hwb"?r=Y$(i,o,s):t[1]==="hsv"?r=q$(i,o,s):r=R2(i,o,s),{r:r[0],g:r[1],b:r[2],a:n}}function Z$(e,t){var n=k2(e);n[0]=zL(n[0]+t),n=R2(n),e.r=n[0],e.g=n[1],e.b=n[2]}function K$(e){if(!e)return;const t=k2(e),n=t[0],r=uO(t[1]),i=uO(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${i}%, ${ho(e.a)})`:`hsl(${n}, ${r}%, ${i}%)`}const fO={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},dO={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function X$(){const e={},t=Object.keys(dO),n=Object.keys(fO);let r,i,o,s,a;for(r=0;r>16&255,o>>8&255,o&255]}return e}let $h;function Q$(e){$h||($h=X$(),$h.transparent=[0,0,0,0]);const t=$h[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const J$=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function e7(e){const t=J$.exec(e);let n=255,r,i,o;if(t){if(t[7]!==r){const s=+t[7];n=t[8]?zu(s):ss(s*255,0,255)}return r=+t[1],i=+t[3],o=+t[5],r=255&(t[2]?zu(r):ss(r,0,255)),i=255&(t[4]?zu(i):ss(i,0,255)),o=255&(t[6]?zu(o):ss(o,0,255)),{r,g:i,b:o,a:n}}}function t7(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${ho(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const s0=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,El=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function n7(e,t,n){const r=El(ho(e.r)),i=El(ho(e.g)),o=El(ho(e.b));return{r:ys(s0(r+n*(El(ho(t.r))-r))),g:ys(s0(i+n*(El(ho(t.g))-i))),b:ys(s0(o+n*(El(ho(t.b))-o))),a:e.a+n*(t.a-e.a)}}function Bh(e,t,n){if(e){let r=k2(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=R2(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function UL(e,t){return e&&Object.assign(t||{},e)}function hO(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=ys(e[3]))):(t=UL(e,{r:0,g:0,b:0,a:1}),t.a=ys(t.a)),t}function r7(e){return e.charAt(0)==="r"?e7(e):G$(e)}class Af{constructor(t){if(t instanceof Af)return t;const n=typeof t;let r;n==="object"?r=hO(t):n==="string"&&(r=$$(t)||Q$(t)||r7(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var t=UL(this._rgb);return t&&(t.a=ho(t.a)),t}set rgb(t){this._rgb=hO(t)}rgbString(){return this._valid?t7(this._rgb):void 0}hexString(){return this._valid?z$(this._rgb):void 0}hslString(){return this._valid?K$(this._rgb):void 0}mix(t,n){if(t){const r=this.rgb,i=t.rgb;let o;const s=n===o?.5:n,a=2*s-1,l=r.a-i.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,r.r=255&c*r.r+o*i.r+.5,r.g=255&c*r.g+o*i.g+.5,r.b=255&c*r.b+o*i.b+.5,r.a=s*r.a+(1-s)*i.a,this.rgb=r}return this}interpolate(t,n){return t&&(this._rgb=n7(this._rgb,t._rgb,n)),this}clone(){return new Af(this.rgb)}alpha(t){return this._rgb.a=ys(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=Nd(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Bh(this._rgb,2,t),this}darken(t){return Bh(this._rgb,2,-t),this}saturate(t){return Bh(this._rgb,1,t),this}desaturate(t){return Bh(this._rgb,1,-t),this}rotate(t){return Z$(this._rgb,t),this}}/*! * Chart.js v4.1.1 * https://www.chartjs.org * (c) 2022 Chart.js Contributors * Released under the MIT License */function lo(){}const i7=(()=>{let e=0;return()=>e++})();function ct(e){return e===null||typeof e>"u"}function kt(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function rt(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function Gt(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Tr(e,t){return Gt(e)?e:t}function Ke(e,t){return typeof e>"u"?t:e}const o7=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,VL=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function Ct(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function vt(e,t,n,r){let i,o,s;if(kt(e))if(o=e.length,r)for(i=o-1;i>=0;i--)t.call(n,e[i],i);else for(i=0;ie,x:e=>e.x,y:e=>e.y};function l7(e){const t=e.split("."),n=[];let r="";for(const i of t)r+=i,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function c7(e){const t=l7(e);return n=>{for(const r of t){if(r==="")break;n=n&&n[r]}return n}}function Ls(e,t){return(pO[t]||(pO[t]=c7(t)))(e)}function N2(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Qr=e=>typeof e<"u",Ds=e=>typeof e=="function",mO=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function u7(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const Ft=Math.PI,Mt=2*Ft,f7=Mt+Ft,sg=Number.POSITIVE_INFINITY,d7=Ft/180,Zt=Ft/2,da=Ft/4,gO=Ft*2/3,as=Math.log10,qi=Math.sign;function of(e,t,n){return Math.abs(e-t)i-o).pop(),t}function bc(e){return!isNaN(parseFloat(e))&&isFinite(e)}function p7(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function WL(e,t,n){let r,i,o;for(r=0,i=e.length;rl&&c=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function D2(e,t,n){n=n||(s=>e[s]1;)o=i+r>>1,n(o)?i=o:r=o;return{lo:i,hi:r}}const _o=(e,t,n,r)=>D2(e,n,r?i=>{const o=e[i][t];return oe[i][t]D2(e,n,r=>e[r][t]>=n);function y7(e,t,n){let r=0,i=e.length;for(;rr&&e[i-1]>n;)i--;return r>0||i{const r="_onData"+N2(n),i=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...o){const s=i.apply(this,o);return e._chartjs.listeners.forEach(a=>{typeof a[r]=="function"&&a[r](...o)}),s}})})}function _O(e,t){const n=e._chartjs;if(!n)return;const r=n.listeners,i=r.indexOf(t);i!==-1&&r.splice(i,1),!(r.length>0)&&(qL.forEach(o=>{delete e[o]}),delete e._chartjs)}function GL(e){const t=new Set;let n,r;for(n=0,r=e.length;n"u"?function(e){return e()}:window.requestAnimationFrame}();function KL(e,t){let n=[],r=!1;return function(...i){n=i,r||(r=!0,ZL.call(window,()=>{r=!1,e.apply(t,n)}))}}function b7(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}const A2=e=>e==="start"?"left":e==="end"?"right":"center",Kn=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,w7=(e,t,n,r)=>e===(r?"left":"right")?n:e==="center"?(t+n)/2:t;function XL(e,t,n){const r=t.length;let i=0,o=r;if(e._sorted){const{iScale:s,_parsed:a}=e,l=s.axis,{min:c,max:f,minDefined:h,maxDefined:p}=s.getUserBounds();h&&(i=En(Math.min(_o(a,s.axis,c).lo,n?r:_o(t,l,s.getPixelForValue(c)).lo),0,r-1)),p?o=En(Math.max(_o(a,s.axis,f,!0).hi+1,n?0:_o(t,l,s.getPixelForValue(f),!0).hi+1),i,r)-i:o=r-i}return{start:i,count:o}}function QL(e){const{xScale:t,yScale:n,_scaleRanges:r}=e,i={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!r)return e._scaleRanges=i,!0;const o=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),o}const zh=e=>e===0||e===1,bO=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*Mt/n)),wO=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*Mt/n)+1,sf={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*Zt)+1,easeOutSine:e=>Math.sin(e*Zt),easeInOutSine:e=>-.5*(Math.cos(Ft*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>zh(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>zh(e)?e:bO(e,.075,.3),easeOutElastic:e=>zh(e)?e:wO(e,.075,.3),easeInOutElastic(e){return zh(e)?e:e<.5?.5*bO(e*2,.1125,.45):.5+.5*wO(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-sf.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?sf.easeInBounce(e*2)*.5:sf.easeOutBounce(e*2-1)*.5+.5};function JL(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function xO(e){return JL(e)?e:new Af(e)}function a0(e){return JL(e)?e:new Af(e).saturate(.5).darken(.1).hexString()}const x7=["x","y","borderWidth","radius","tension"],S7=["color","borderColor","backgroundColor"];function C7(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:S7},numbers:{type:"number",properties:x7}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function E7(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const SO=new Map;function T7(e,t){t=t||{};const n=e+JSON.stringify(t);let r=SO.get(n);return r||(r=new Intl.NumberFormat(e,t),SO.set(n,r)),r}function Ld(e,t,n){return T7(t,n).format(e)}const eD={values(e){return kt(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const r=this.chart.options.locale;let i,o=e;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(i="scientific"),o=O7(e,n)}const s=as(Math.abs(o)),a=Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:i,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),Ld(e,r,l)},logarithmic(e,t,n){if(e===0)return"0";const r=n[t].significand||e/Math.pow(10,Math.floor(as(e)));return[1,2,3,5,10,15].includes(r)||t>.8*n.length?eD.numeric.call(this,e,t,n):""}};function O7(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var ay={formatters:eD};function P7(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:ay.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Ha=Object.create(null),X1=Object.create(null);function af(e,t){if(!t)return e;const n=t.split(".");for(let r=0,i=n.length;rr.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(r,i)=>a0(i.backgroundColor),this.hoverBorderColor=(r,i)=>a0(i.borderColor),this.hoverColor=(r,i)=>a0(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(n)}set(t,n){return l0(this,t,n)}get(t){return af(this,t)}describe(t,n){return l0(X1,t,n)}override(t,n){return l0(Ha,t,n)}route(t,n,r,i){const o=af(this,t),s=af(this,r),a="_"+n;Object.defineProperties(o,{[a]:{value:o[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[a],c=s[i];return rt(l)?Object.assign({},c,l):Ke(l,c)},set(l){this[a]=l}}})}apply(t){t.forEach(n=>n(this))}}var nn=new k7({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[C7,E7,P7]);function M7(e){return!e||ct(e.size)||ct(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function ag(e,t,n,r,i){let o=t[i];return o||(o=t[i]=e.measureText(i).width,n.push(i)),o>r&&(r=o),r}function R7(e,t,n,r){r=r||{};let i=r.data=r.data||{},o=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(i=r.data={},o=r.garbageCollect=[],r.font=t),e.save(),e.font=t;let s=0;const a=n.length;let l,c,f,h,p;for(l=0;ln.length){for(l=0;l0&&e.stroke()}}function Ff(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.xt.top-n&&e.y0&&o.strokeColor!=="";let l,c;for(e.save(),e.font=i.string,D7(e,o),l=0;l+e||0;function j2(e,t){const n={},r=rt(t),i=r?Object.keys(t):t,o=rt(e)?r?s=>Ke(e[s],e[t[s]]):s=>e[s]:()=>e;for(const s of i)n[s]=B7(o(s));return n}function nD(e){return j2(e,{top:"y",right:"x",bottom:"y",left:"x"})}function Aa(e){return j2(e,["topLeft","topRight","bottomLeft","bottomRight"])}function er(e){const t=nD(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function gn(e,t){e=e||{},t=t||nn.font;let n=Ke(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let r=Ke(e.style,t.style);r&&!(""+r).match(F7)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:Ke(e.family,t.family),lineHeight:$7(Ke(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:Ke(e.weight,t.weight),string:""};return i.string=M7(i),i}function Uu(e,t,n,r){let i=!0,o,s,a;for(o=0,s=e.length;on&&a===0?0:a+l;return{min:s(r,-Math.abs(o)),max:s(i,o)}}function Ys(e,t){return Object.assign(Object.create(e),t)}function I2(e,t=[""],n=e,r,i=()=>e[0]){Qr(r)||(r=sD("_fallback",e));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:n,_fallback:r,_getTarget:i,override:s=>I2([s,...e],t,n,r)};return new Proxy(o,{deleteProperty(s,a){return delete s[a],delete s._keys,delete e[0][a],!0},get(s,a){return iD(s,a,()=>Z7(a,t,e,s))},getOwnPropertyDescriptor(s,a){return Reflect.getOwnPropertyDescriptor(s._scopes[0],a)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(s,a){return TO(s).includes(a)},ownKeys(s){return TO(s)},set(s,a,l){const c=s._storage||(s._storage=i());return s[a]=c[a]=l,delete s._keys,!0}})}function wc(e,t,n,r){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:rD(e,r),setContext:o=>wc(e,o,n,r),override:o=>wc(e.override(o),t,n,r)};return new Proxy(i,{deleteProperty(o,s){return delete o[s],delete e[s],!0},get(o,s,a){return iD(o,s,()=>V7(o,s,a))},getOwnPropertyDescriptor(o,s){return o._descriptors.allKeys?Reflect.has(e,s)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,s)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(o,s){return Reflect.has(e,s)},ownKeys(){return Reflect.ownKeys(e)},set(o,s,a){return e[s]=a,delete o[s],!0}})}function rD(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:r=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:n,indexable:r,isScriptable:Ds(n)?n:()=>n,isIndexable:Ds(r)?r:()=>r}}const U7=(e,t)=>e?e+N2(t):t,F2=(e,t)=>rt(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function iD(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t))return e[t];const r=n();return e[t]=r,r}function V7(e,t,n){const{_proxy:r,_context:i,_subProxy:o,_descriptors:s}=e;let a=r[t];return Ds(a)&&s.isScriptable(t)&&(a=H7(t,a,e,n)),kt(a)&&a.length&&(a=W7(t,a,e,s.isIndexable)),F2(t,a)&&(a=wc(a,i,o&&o[t],s)),a}function H7(e,t,n,r){const{_proxy:i,_context:o,_subProxy:s,_stack:a}=n;if(a.has(e))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+e);return a.add(e),t=t(o,s||r),a.delete(e),F2(e,t)&&(t=$2(i._scopes,i,e,t)),t}function W7(e,t,n,r){const{_proxy:i,_context:o,_subProxy:s,_descriptors:a}=n;if(Qr(o.index)&&r(e))t=t[o.index%t.length];else if(rt(t[0])){const l=t,c=i._scopes.filter(f=>f!==l);t=[];for(const f of l){const h=$2(c,i,e,f);t.push(wc(h,o,s&&s[e],a))}}return t}function oD(e,t,n){return Ds(e)?e(t,n):e}const Y7=(e,t)=>e===!0?t:typeof e=="string"?Ls(t,e):void 0;function q7(e,t,n,r,i){for(const o of t){const s=Y7(n,o);if(s){e.add(s);const a=oD(s._fallback,n,i);if(Qr(a)&&a!==n&&a!==r)return a}else if(s===!1&&Qr(r)&&n!==r)return null}return!1}function $2(e,t,n,r){const i=t._rootScopes,o=oD(t._fallback,n,r),s=[...e,...i],a=new Set;a.add(r);let l=EO(a,s,n,o||n,r);return l===null||Qr(o)&&o!==n&&(l=EO(a,s,o,l,r),l===null)?!1:I2(Array.from(a),[""],i,o,()=>G7(t,n,r))}function EO(e,t,n,r,i){for(;n;)n=q7(e,t,n,r,i);return n}function G7(e,t,n){const r=e._getTarget();t in r||(r[t]={});const i=r[t];return kt(i)&&rt(n)?n:i||{}}function Z7(e,t,n,r){let i;for(const o of t)if(i=sD(U7(o,e),n),Qr(i))return F2(e,i)?$2(n,r,e,i):i}function sD(e,t){for(const n of t){if(!n)continue;const r=n[e];if(Qr(r))return r}}function TO(e){let t=e._keys;return t||(t=e._keys=K7(e._scopes)),t}function K7(e){const t=new Set;for(const n of e)for(const r of Object.keys(n).filter(i=>!i.startsWith("_")))t.add(r);return Array.from(t)}function aD(e,t,n,r){const{iScale:i}=e,{key:o="r"}=this._parsing,s=new Array(r);let a,l,c,f;for(a=0,l=r;ate==="x"?"y":"x";function Q7(e,t,n,r){const i=e.skip?t:e,o=t,s=n.skip?t:n,a=K1(o,i),l=K1(s,o);let c=a/(a+l),f=l/(a+l);c=isNaN(c)?0:c,f=isNaN(f)?0:f;const h=r*c,p=r*f;return{previous:{x:o.x-h*(s.x-i.x),y:o.y-h*(s.y-i.y)},next:{x:o.x+p*(s.x-i.x),y:o.y+p*(s.y-i.y)}}}function J7(e,t,n){const r=e.length;let i,o,s,a,l,c=xc(e,0);for(let f=0;f!c.skip)),t.cubicInterpolationMode==="monotone")tB(e,i);else{let c=r?e[e.length-1]:e[0];for(o=0,s=e.length;oe.ownerDocument.defaultView.getComputedStyle(e,null);function iB(e,t){return uy(e).getPropertyValue(t)}const oB=["top","right","bottom","left"];function ja(e,t,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const o=oB[i];r[o]=parseFloat(e[t+"-"+o+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const sB=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function aB(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:o}=r;let s=!1,a,l;if(sB(i,o,e.target))a=i,l=o;else{const c=t.getBoundingClientRect();a=r.clientX-c.left,l=r.clientY-c.top,s=!0}return{x:a,y:l,box:s}}function ba(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,i=uy(n),o=i.boxSizing==="border-box",s=ja(i,"padding"),a=ja(i,"border","width"),{x:l,y:c,box:f}=aB(e,n),h=s.left+(f&&a.left),p=s.top+(f&&a.top);let{width:m,height:v}=t;return o&&(m-=s.width+a.width,v-=s.height+a.height),{x:Math.round((l-h)/m*n.width/r),y:Math.round((c-p)/v*n.height/r)}}function lB(e,t,n){let r,i;if(t===void 0||n===void 0){const o=B2(e);if(!o)t=e.clientWidth,n=e.clientHeight;else{const s=o.getBoundingClientRect(),a=uy(o),l=ja(a,"border","width"),c=ja(a,"padding");t=s.width-c.width-l.width,n=s.height-c.height-l.height,r=lg(a.maxWidth,o,"clientWidth"),i=lg(a.maxHeight,o,"clientHeight")}}return{width:t,height:n,maxWidth:r||sg,maxHeight:i||sg}}const Vh=e=>Math.round(e*10)/10;function cB(e,t,n,r){const i=uy(e),o=ja(i,"margin"),s=lg(i.maxWidth,e,"clientWidth")||sg,a=lg(i.maxHeight,e,"clientHeight")||sg,l=lB(e,t,n);let{width:c,height:f}=l;if(i.boxSizing==="content-box"){const p=ja(i,"border","width"),m=ja(i,"padding");c-=m.width+p.width,f-=m.height+p.height}return c=Math.max(0,c-o.width),f=Math.max(0,r?c/r:f-o.height),c=Vh(Math.min(c,s,l.maxWidth)),f=Vh(Math.min(f,a,l.maxHeight)),c&&!f&&(f=Vh(c/2)),(t!==void 0||n!==void 0)&&r&&l.height&&f>l.height&&(f=l.height,c=Vh(Math.floor(f*r))),{width:c,height:f}}function OO(e,t,n){const r=t||1,i=Math.floor(e.height*r),o=Math.floor(e.width*r);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const s=e.canvas;return s.style&&(n||!s.style.height&&!s.style.width)&&(s.style.height=`${e.height}px`,s.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||s.height!==i||s.width!==o?(e.currentDevicePixelRatio=r,s.height=i,s.width=o,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}const uB=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch{}return e}();function PO(e,t){const n=iB(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function wa(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function fB(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:r==="middle"?n<.5?e.y:t.y:r==="after"?n<1?e.y:t.y:n>0?t.y:e.y}}function dB(e,t,n,r){const i={x:e.cp2x,y:e.cp2y},o={x:t.cp1x,y:t.cp1y},s=wa(e,i,n),a=wa(i,o,n),l=wa(o,t,n),c=wa(s,a,n),f=wa(a,l,n);return wa(c,f,n)}const hB=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,r){return n-r},leftForLtr(n,r){return n-r}}},pB=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function ic(e,t,n){return e?hB(t,n):pB()}function uD(e,t){let n,r;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=r)}function fD(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function dD(e){return e==="angle"?{between:If,compare:m7,normalize:Pr}:{between:yo,compare:(t,n)=>t-n,normalize:t=>t}}function kO({start:e,end:t,count:n,loop:r,style:i}){return{start:e%n,end:t%n,loop:r&&(t-e+1)%n===0,style:i}}function mB(e,t,n){const{property:r,start:i,end:o}=n,{between:s,normalize:a}=dD(r),l=t.length;let{start:c,end:f,loop:h}=e,p,m;if(h){for(c+=l,f+=l,p=0,m=l;pl(i,S,_)&&a(i,S)!==0,P=()=>a(o,_)===0||l(o,S,_),k=()=>y||T(),N=()=>!y||P();for(let D=f,z=f;D<=h;++D)w=t[D%s],!w.skip&&(_=c(w[r]),_!==S&&(y=l(_,i,o),x===null&&k()&&(x=a(_,i)===0?D:z),x!==null&&N()&&(v.push(kO({start:x,end:D,loop:p,count:s,style:m})),x=null),z=D,S=_));return x!==null&&v.push(kO({start:x,end:h,loop:p,count:s,style:m})),v}function pD(e,t){const n=[],r=e.segments;for(let i=0;ii&&e[o%t].skip;)o--;return o%=t,{start:i,end:o}}function vB(e,t,n,r){const i=e.length,o=[];let s=t,a=e[t],l;for(l=t+1;l<=n;++l){const c=e[l%i];c.skip||c.stop?a.skip||(r=!1,o.push({start:t%i,end:(l-1)%i,loop:r}),t=s=c.stop?l:null):(s=l,a.skip&&(t=l)),a=c}return s!==null&&o.push({start:t%i,end:s%i,loop:r}),o}function yB(e,t){const n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];const o=!!e._loop,{start:s,end:a}=gB(n,i,o,r);if(r===!0)return MO(e,[{start:s,end:a,loop:o}],n,t);const l=aa({chart:t,initial:n.initial,numSteps:s,currentStep:Math.min(r-n.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=ZL.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;const o=r.items;let s=o.length-1,a=!1,l;for(;s>=0;--s)l=o[s],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(t),a=!0):(o[s]=o[o.length-1],o.pop());a&&(i.draw(),this._notify(i,r,t,"progress")),o.length||(r.running=!1,this._notify(i,r,t,"complete"),r.initial=!1),n+=o.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let r=n.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,r)),r}listen(t,n,r){this._getAnims(t).listeners[n].push(r)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,i)=>Math.max(r,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const r=n.items;let i=r.length-1;for(;i>=0;--i)r[i].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var co=new wB;const NO="transparent",xB={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=xO(e||NO),i=r.valid&&xO(t||NO);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class SB{constructor(t,n,r,i){const o=n[r];i=Uu([t.to,i,o,t.from]);const s=Uu([t.from,o,i]);this._active=!0,this._fn=t.fn||xB[t.type||typeof s],this._easing=sf[t.easing]||sf.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=r,this._from=s,this._to=i,this._promises=void 0}active(){return this._active}update(t,n,r){if(this._active){this._notify(!1);const i=this._target[this._prop],o=r-this._start,s=this._duration-o;this._start=r,this._duration=Math.floor(Math.max(s,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=Uu([t.to,n,i,t.from]),this._from=Uu([t.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,r=this._duration,i=this._prop,o=this._from,s=this._loop,a=this._to;let l;if(this._active=o!==a&&(s||n1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(o,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,r)=>{t.push({res:n,rej:r})})}_notify(t){const n=t?"res":"rej",r=this._promises||[];for(let i=0;i{const o=t[i];if(!rt(o))return;const s={};for(const a of n)s[a]=o[a];(kt(o.properties)&&o.properties||[i]).forEach(a=>{(a===i||!r.has(a))&&r.set(a,s)})})}_animateOptions(t,n){const r=n.options,i=EB(t,r);if(!i)return[];const o=this._createAnimations(i,r);return r.$shared&&CB(t.options.$animations,r).then(()=>{t.options=r},()=>{}),o}_createAnimations(t,n){const r=this._properties,i=[],o=t.$animations||(t.$animations={}),s=Object.keys(n),a=Date.now();let l;for(l=s.length-1;l>=0;--l){const c=s[l];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(t,n));continue}const f=n[c];let h=o[c];const p=r.get(c);if(h)if(p&&h.active()){h.update(p,f,a);continue}else h.cancel();if(!p||!p.duration){t[c]=f;continue}o[c]=h=new SB(p,t,c,f),i.push(h)}return i}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const r=this._createAnimations(t,n);if(r.length)return co.add(this._chart,r),!0}}function CB(e,t){const n=[],r=Object.keys(t);for(let i=0;i0||!n&&o<0)return i.index}return null}function IO(e,t){const{chart:n,_cachedMeta:r}=e,i=n._stacks||(n._stacks={}),{iScale:o,vScale:s,index:a}=r,l=o.axis,c=s.axis,f=kB(o,s,r),h=t.length;let p;for(let m=0;mn[r].axis===t).shift()}function NB(e,t){return Ys(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function LB(e,t,n){return Ys(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function wu(e,t){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t=t||e._parsed;for(const i of t){const o=i._stacks;if(!o||o[r]===void 0||o[r][n]===void 0)return;delete o[r][n],o[r]._visualValues!==void 0&&o[r]._visualValues[n]!==void 0&&delete o[r]._visualValues[n]}}}const u0=e=>e==="reset"||e==="none",FO=(e,t)=>t?e:Object.assign({},e),DB=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:gD(n,!0),values:null};class bi{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=AO(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&wu(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(h,p,m,v)=>h==="x"?p:h==="r"?v:m,o=n.xAxisID=Ke(r.xAxisID,c0(t,"x")),s=n.yAxisID=Ke(r.yAxisID,c0(t,"y")),a=n.rAxisID=Ke(r.rAxisID,c0(t,"r")),l=n.indexAxis,c=n.iAxisID=i(l,o,s,a),f=n.vAxisID=i(l,s,o,a);n.xScale=this.getScaleForId(o),n.yScale=this.getScaleForId(s),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(f)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&_O(this._data,this),t._stacked&&wu(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(rt(n))this._data=PB(n);else if(r!==n){if(r){_O(r,this);const i=this._cachedMeta;wu(i),i._parsed=[]}n&&Object.isExtensible(n)&&_7(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,r=this.getDataset();let i=!1;this._dataCheck();const o=n._stacked;n._stacked=AO(n.vScale,n),n.stack!==r.stack&&(i=!0,wu(n),n.stack=r.stack),this._resyncElements(t),(i||o!==n._stacked)&&IO(this,n._parsed)}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:r,_data:i}=this,{iScale:o,_stacked:s}=r,a=o.axis;let l=t===0&&n===i.length?!0:r._sorted,c=t>0&&r._parsed[t-1],f,h,p;if(this._parsing===!1)r._parsed=i,r._sorted=!0,p=i;else{kt(i[t])?p=this.parseArrayData(r,i,t,n):rt(i[t])?p=this.parseObjectData(r,i,t,n):p=this.parsePrimitiveData(r,i,t,n);const m=()=>h[a]===null||c&&h[a]y||h=0;--p)if(!v()){this.updateRangeFromParsed(c,t,m,l);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed,r=[];let i,o,s;for(i=0,o=n.length;i=0&&tthis.getContext(r,i,n),y=c.resolveNamedOptions(p,m,v,h);return y.$shared&&(y.$shared=l,o[s]=Object.freeze(FO(y,l))),y}_resolveAnimations(t,n,r){const i=this.chart,o=this._cachedDataOpts,s=`animation-${n}`,a=o[s];if(a)return a;let l;if(i.options.animation!==!1){const f=this.chart.config,h=f.datasetAnimationScopeKeys(this._type,n),p=f.getOptionScopes(this.getDataset(),h);l=f.createResolver(p,this.getContext(t,r,n))}const c=new mD(i,l&&l.animations);return l&&l._cacheable&&(o[s]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||u0(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),i=this._sharedOptions,o=this.getSharedOptions(r),s=this.includeOptions(n,o)||o!==i;return this.updateSharedOptions(o,n,r),{sharedOptions:o,includeOptions:s}}updateElement(t,n,r,i){u0(i)?Object.assign(t,r):this._resolveAnimations(n,i).update(t,r)}updateSharedOptions(t,n,r){t&&!u0(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,i){t.active=i;const o=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(t,{options:!i&&this.getSharedOptions(o)||o})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,r=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const i=r.length,o=n.length,s=Math.min(o,i);s&&this.parse(0,s),o>i?this._insertElements(i,o-i,t):o{for(c.length+=n,a=c.length-1;a>=s;a--)c[a]=c[a-n]};for(l(o),a=t;ai-o))}return e._cache.$bar}function jB(e){const t=e.iScale,n=AB(t,e.type);let r=t._length,i,o,s,a;const l=()=>{s===32767||s===-32768||(Qr(a)&&(r=Math.min(r,Math.abs(s-a)||r)),a=s)};for(i=0,o=n.length;i0?i[e-1]:null,a=eMath.abs(a)&&(l=a,c=s),t[n.axis]=c,t._custom={barStart:l,barEnd:c,start:i,end:o,min:s,max:a}}function vD(e,t,n,r){return kt(e)?$B(e,t,n,r):t[n.axis]=n.parse(e,r),t}function $O(e,t,n,r){const i=e.iScale,o=e.vScale,s=i.getLabels(),a=i===o,l=[];let c,f,h,p;for(c=n,f=n+r;c=n?1:-1)}function zB(e){let t,n,r,i,o;return e.horizontal?(t=e.base>e.x,n="left",r="right"):(t=e.basel.controller.options.grouped),o=r.options.stacked,s=[],a=l=>{const c=l.controller.getParsed(n),f=c&&c[l.vScale.axis];if(ct(f)||isNaN(f))return!0};for(const l of i)if(!(n!==void 0&&a(l))&&((o===!1||s.indexOf(l.stack)===-1||o===void 0&&l.stack===void 0)&&s.push(l.stack),l.index===t))break;return s.length||s.push(void 0),s}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,n,r){const i=this._getStacks(t,r),o=n!==void 0?i.indexOf(n):-1;return o===-1?i.length-1:o}_getRuler(){const t=this.options,n=this._cachedMeta,r=n.iScale,i=[];let o,s;for(o=0,s=n.data.length;o=0;--r)n=Math.max(n,t[r].size(this.resolveDataElementOptions(r))/2);return n>0&&n}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart.data.labels||[],{xScale:i,yScale:o}=n,s=this.getParsed(t),a=i.getLabelForValue(s.x),l=o.getLabelForValue(s.y),c=s._custom;return{label:r[t]||"",value:"("+a+", "+l+(c?", "+c:"")+")"}}update(t){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,t)}updateElements(t,n,r,i){const o=i==="reset",{iScale:s,vScale:a}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(n,i),f=s.axis,h=a.axis;for(let p=n;pIf(S,a,l,!0)?1:Math.max(T,T*n,P,P*n),v=(S,T,P)=>If(S,a,l,!0)?-1:Math.min(T,T*n,P,P*n),y=m(0,c,h),x=m(Zt,f,p),_=v(Ft,c,h),w=v(Ft+Zt,f,p);r=(y-_)/2,i=(x-w)/2,o=-(y+_)/2,s=-(x+w)/2}return{ratioX:r,ratioY:i,offsetX:o,offsetY:s}}class ls extends bi{constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){const r=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=r;else{let o=l=>+r[l];if(rt(r[t])){const{key:l="value"}=this._parsing;o=c=>+Ls(r[c],l)}let s,a;for(s=t,a=t+n;s0&&!isNaN(t)?Mt*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],o=Ld(n._parsed[t],r.options.locale);return{label:i[t]||"",value:o}}getMaxBorderWidth(t){let n=0;const r=this.chart;let i,o,s,a,l;if(!t){for(i=0,o=r.data.datasets.length;it!=="spacing",_indexable:t=>t!=="spacing"}),xe(ls,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:i}}=t.legend.options;return n.labels.map((o,s)=>{const l=t.getDatasetMeta(0).controller.getStyle(s);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}}});class cf extends bi{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:r,data:i=[],_dataset:o}=n,s=this.chart._animationsDisabled;let{start:a,count:l}=XL(n,i,s);this._drawStart=a,this._drawCount=l,QL(n)&&(a=0,l=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!o._decimated,r.points=i;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(r,void 0,{animated:!s,options:c},t),this.updateElements(i,a,l,t)}updateElements(t,n,r,i){const o=i==="reset",{iScale:s,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:f,includeOptions:h}=this._getSharedOptions(n,i),p=s.axis,m=a.axis,{spanGaps:v,segment:y}=this.options,x=bc(v)?v:Number.POSITIVE_INFINITY,_=this.chart._animationsDisabled||o||i==="none",w=n+r,S=t.length;let T=n>0&&this.getParsed(n-1);for(let P=0;P=w){N.skip=!0;continue}const D=this.getParsed(P),z=ct(D[m]),A=N[p]=s.getPixelForValue(D[p],P),W=N[m]=o||z?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,D,l):D[m],P);N.skip=isNaN(A)||isNaN(W)||z,N.stop=P>0&&Math.abs(D[p]-T[p])>x,y&&(N.parsed=D,N.raw=c.data[P]),h&&(N.options=f||this.resolveDataElementOptions(P,k.active?"active":i)),_||this.updateElement(k,P,N,i),T=D}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,r=n.options&&n.options.borderWidth||0,i=t.data||[];if(!i.length)return r;const o=i[0].size(this.resolveDataElementOptions(0)),s=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,o,s)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}xe(cf,"id","line"),xe(cf,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),xe(cf,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class uf extends bi{constructor(t,n){super(t,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],o=Ld(n._parsed[t].r,r.options.locale);return{label:i[t]||"",value:o}}parseObjectData(t,n,r,i){return aD.bind(this)(t,n,r,i)}update(t){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,t)}getMinMax(){const t=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((r,i)=>{const o=this.getParsed(i).r;!isNaN(o)&&this.chart.getDataVisibility(i)&&(on.max&&(n.max=o))}),n}_updateRadius(){const t=this.chart,n=t.chartArea,r=t.options,i=Math.min(n.right-n.left,n.bottom-n.top),o=Math.max(i/2,0),s=Math.max(r.cutoutPercentage?o/100*r.cutoutPercentage:1,0),a=(o-s)/t.getVisibleDatasetCount();this.outerRadius=o-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(t,n,r,i){const o=i==="reset",s=this.chart,l=s.options.animation,c=this._cachedMeta.rScale,f=c.xCenter,h=c.yCenter,p=c.getIndexAngle(0)-.5*Ft;let m=p,v;const y=360/this.countVisibleElements();for(v=0;v{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&n++}),n}_computeAngle(t,n,r){return this.chart.getDataVisibility(t)?vi(this.resolveDataElementOptions(t,n).angle||r):0}}xe(uf,"id","polarArea"),xe(uf,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),xe(uf,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:i}}=t.legend.options;return n.labels.map((o,s)=>{const l=t.getDatasetMeta(0).controller.getStyle(s);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class J1 extends ls{}xe(J1,"id","pie"),xe(J1,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class Hp extends bi{getLabelAndValue(t){const n=this._cachedMeta.vScale,r=this.getParsed(t);return{label:n.getLabels()[t],value:""+n.getLabelForValue(r[n.axis])}}parseObjectData(t,n,r,i){return aD.bind(this)(t,n,r,i)}update(t){const n=this._cachedMeta,r=n.dataset,i=n.data||[],o=n.iScale.getLabels();if(r.points=i,t!=="resize"){const s=this.resolveDatasetElementOptions(t);this.options.showLine||(s.borderWidth=0);const a={_loop:!0,_fullLoop:o.length===i.length,options:s};this.updateElement(r,void 0,a,t)}this.updateElements(i,0,i.length,t)}updateElements(t,n,r,i){const o=this._cachedMeta.rScale,s=i==="reset";for(let a=n;a0&&this.getParsed(n-1);for(let T=n;T0&&Math.abs(k[m]-S[m])>_,x&&(N.parsed=k,N.raw=c.data[T]),p&&(N.options=h||this.resolveDataElementOptions(T,P.active?"active":i)),w||this.updateElement(P,T,N,i),S=k}this.updateSharedOptions(h,i,f)}getMaxOverflow(){const t=this._cachedMeta,n=t.data||[];if(!this.options.showLine){let a=0;for(let l=n.length-1;l>=0;--l)a=Math.max(a,n[l].size(this.resolveDataElementOptions(l))/2);return a>0&&a}const r=t.dataset,i=r.options&&r.options.borderWidth||0;if(!n.length)return i;const o=n[0].size(this.resolveDataElementOptions(0)),s=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,o,s)/2}}xe(Wp,"id","scatter"),xe(Wp,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),xe(Wp,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var YB=Object.freeze({__proto__:null,BarController:lf,BubbleController:Vp,DoughnutController:ls,LineController:cf,PolarAreaController:uf,PieController:J1,RadarController:Hp,ScatterController:Wp});function pa(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class z2{static override(t){Object.assign(z2.prototype,t)}constructor(t){this.options=t||{}}init(){}formats(){return pa()}parse(){return pa()}format(){return pa()}add(){return pa()}diff(){return pa()}startOf(){return pa()}endOf(){return pa()}}var qB={_date:z2};function GB(e,t,n,r){const{controller:i,data:o,_sorted:s}=e,a=i._cachedMeta.iScale;if(a&&t===a.axis&&t!=="r"&&s&&o.length){const l=a._reversePixels?v7:_o;if(r){if(i._sharedOptions){const c=o[0],f=typeof c.getRange=="function"&&c.getRange(t);if(f){const h=l(o,t,n-f),p=l(o,t,n+f);return{lo:h.lo,hi:p.hi}}}}else return l(o,t,n)}return{lo:0,hi:o.length-1}}function Dd(e,t,n,r,i){const o=e.getSortedVisibleDatasetMetas(),s=n[t];for(let a=0,l=o.length;a{l[s](t[n],i)&&(o.push({element:l,datasetIndex:c,index:f}),a=a||l.inRange(t.x,t.y,i))}),r&&!a?[]:o}var QB={evaluateInteractionItems:Dd,modes:{index(e,t,n,r){const i=ba(t,e),o=n.axis||"x",s=n.includeInvisible||!1,a=n.intersect?d0(e,i,o,r,s):h0(e,i,o,!1,r,s),l=[];return a.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const f=a[0].index,h=c.data[f];h&&!h.skip&&l.push({element:h,datasetIndex:c.index,index:f})}),l):[]},dataset(e,t,n,r){const i=ba(t,e),o=n.axis||"xy",s=n.includeInvisible||!1;let a=n.intersect?d0(e,i,o,r,s):h0(e,i,o,!1,r,s);if(a.length>0){const l=a[0].datasetIndex,c=e.getDatasetMeta(l).data;a=[];for(let f=0;fn.pos===t)}function VO(e,t){return e.filter(n=>yD.indexOf(n.pos)===-1&&n.box.axis===t)}function Su(e,t){return e.sort((n,r)=>{const i=t?r:n,o=t?n:r;return i.weight===o.weight?i.index-o.index:i.weight-o.weight})}function JB(e){const t=[];let n,r,i,o,s,a;for(n=0,r=(e||[]).length;nc.box.fullSize),!0),r=Su(xu(t,"left"),!0),i=Su(xu(t,"right")),o=Su(xu(t,"top"),!0),s=Su(xu(t,"bottom")),a=VO(t,"x"),l=VO(t,"y");return{fullSize:n,leftAndTop:r.concat(o),rightAndBottom:i.concat(l).concat(s).concat(a),chartArea:xu(t,"chartArea"),vertical:r.concat(i).concat(l),horizontal:o.concat(s).concat(a)}}function HO(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function _D(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function r9(e,t,n,r){const{pos:i,box:o}=n,s=e.maxPadding;if(!rt(i)){n.size&&(e[i]-=n.size);const h=r[n.stack]||{size:0,count:1};h.size=Math.max(h.size,n.horizontal?o.height:o.width),n.size=h.size/h.count,e[i]+=n.size}o.getPadding&&_D(s,o.getPadding());const a=Math.max(0,t.outerWidth-HO(s,e,"left","right")),l=Math.max(0,t.outerHeight-HO(s,e,"top","bottom")),c=a!==e.w,f=l!==e.h;return e.w=a,e.h=l,n.horizontal?{same:c,other:f}:{same:f,other:c}}function i9(e){const t=e.maxPadding;function n(r){const i=Math.max(t[r]-e[r],0);return e[r]+=i,i}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function o9(e,t){const n=t.maxPadding;function r(i){const o={left:0,top:0,right:0,bottom:0};return i.forEach(s=>{o[s]=Math.max(t[s],n[s])}),o}return r(e?["left","right"]:["top","bottom"])}function Vu(e,t,n,r){const i=[];let o,s,a,l,c,f;for(o=0,s=e.length,c=0;o{typeof y.beforeLayout=="function"&&y.beforeLayout()});const f=l.reduce((y,x)=>x.box.options&&x.box.options.display===!1?y:y+1,0)||1,h=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:o,availableHeight:s,vBoxMaxWidth:o/2/f,hBoxMaxHeight:s/2}),p=Object.assign({},i);_D(p,er(r));const m=Object.assign({maxPadding:p,w:o,h:s,x:i.left,y:i.top},i),v=t9(l.concat(c),h);Vu(a.fullSize,m,h,v),Vu(l,m,h,v),Vu(c,m,h,v)&&Vu(l,m,h,v),i9(m),WO(a.leftAndTop,m,h,v),m.x+=m.w,m.y+=m.h,WO(a.rightAndBottom,m,h,v),e.chartArea={left:m.left,top:m.top,right:m.left+m.w,bottom:m.top+m.h,height:m.h,width:m.w},vt(a.chartArea,y=>{const x=y.box;Object.assign(x,e.chartArea),x.update(m.w,m.h,{left:0,top:0,right:0,bottom:0})})}};class bD{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,r){}removeEventListener(t,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,r,i){return n=Math.max(0,n||t.width),r=r||t.height,{width:n,height:Math.max(0,i?Math.floor(n/i):r)}}isAttached(t){return!0}updateConfig(t){}}class s9 extends bD{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Yp="$chartjs",a9={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},YO=e=>e===null||e==="";function l9(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[Yp]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",YO(i)){const o=PO(e,"width");o!==void 0&&(e.width=o)}if(YO(r))if(e.style.height==="")e.height=e.width/(t||2);else{const o=PO(e,"height");o!==void 0&&(e.height=o)}return e}const wD=uB?{passive:!0}:!1;function c9(e,t,n){e.addEventListener(t,n,wD)}function u9(e,t,n){e.canvas.removeEventListener(t,n,wD)}function f9(e,t){const n=a9[e.type]||e.type,{x:r,y:i}=ba(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:i!==void 0?i:null}}function cg(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function d9(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let s=!1;for(const a of o)s=s||cg(a.addedNodes,r),s=s&&!cg(a.removedNodes,r);s&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function h9(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let s=!1;for(const a of o)s=s||cg(a.removedNodes,r),s=s&&!cg(a.addedNodes,r);s&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const Bf=new Map;let qO=0;function xD(){const e=window.devicePixelRatio;e!==qO&&(qO=e,Bf.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function p9(e,t){Bf.size||window.addEventListener("resize",xD),Bf.set(e,t)}function m9(e){Bf.delete(e),Bf.size||window.removeEventListener("resize",xD)}function g9(e,t,n){const r=e.canvas,i=r&&B2(r);if(!i)return;const o=KL((a,l)=>{const c=i.clientWidth;n(a,l),c{const l=a[0],c=l.contentRect.width,f=l.contentRect.height;c===0&&f===0||o(c,f)});return s.observe(i),p9(e,o),s}function p0(e,t,n){n&&n.disconnect(),t==="resize"&&m9(e)}function v9(e,t,n){const r=e.canvas,i=KL(o=>{e.ctx!==null&&n(f9(o,e))},e);return c9(r,t,i),i}class y9 extends bD{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(l9(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[Yp])return!1;const r=n[Yp].initial;["height","width"].forEach(o=>{const s=r[o];ct(s)?n.removeAttribute(o):n.setAttribute(o,s)});const i=r.style||{};return Object.keys(i).forEach(o=>{n.style[o]=i[o]}),n.width=n.width,delete n[Yp],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),s={attach:d9,detach:h9,resize:g9}[n]||v9;i[n]=s(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),i=r[n];if(!i)return;({attach:p0,detach:p0,resize:p0}[n]||u9)(t,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,i){return cB(t,n,r,i)}isAttached(t){const n=B2(t);return!!(n&&n.isConnected)}}function _9(e){return!cD()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?s9:y9}var Bp;let Ao=(Bp=class{constructor(){xe(this,"active",!1)}tooltipPosition(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}hasValue(){return bc(this.x)&&bc(this.y)}getProps(t,n){const r=this.$animations;if(!n||!r)return this;const i={};return t.forEach(o=>{i[o]=r[o]&&r[o].active()?r[o]._to:this[o]}),i}},xe(Bp,"defaults",{}),xe(Bp,"defaultRoutes"),Bp);function b9(e,t){const n=e.options.ticks,r=w9(e),i=Math.min(n.maxTicksLimit||r,r),o=n.major.enabled?S9(t):[],s=o.length,a=o[0],l=o[s-1],c=[];if(s>i)return C9(t,c,o,s/i),c;const f=x9(o,t,i);if(s>0){let h,p;const m=s>1?Math.round((l-a)/(s-1)):null;for(Wh(t,c,f,ct(m)?0:a-m,a),h=0,p=s-1;hi)return l}return Math.max(i,1)}function S9(e){const t=[];let n,r;for(n=0,r=e.length;ne==="left"?"right":e==="right"?"left":e,GO=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n;function ZO(e,t){const n=[],r=e.length/t,i=e.length;let o=0;for(;os+a)))return l}function P9(e,t){vt(e,n=>{const r=n.gc,i=r.length/2;let o;if(i>t){for(o=0;or?r:n,r=i&&n>r?n:r,{min:Tr(n,Tr(r,n)),max:Tr(r,Tr(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Ct(this.options.beforeUpdate,[this])}update(t,n,r){const{beginAtZero:i,grace:o,ticks:s}=this.options,a=s.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=z7(this,o,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a=o||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const f=this._getLabelSizes(),h=f.widest.width,p=f.highest.height,m=En(this.chart.width-h,0,this.maxWidth);a=t.offset?this.maxWidth/r:m/(r-1),h+6>a&&(a=m/(r-(t.offset?.5:1)),l=this.maxHeight-Cu(t.grid)-n.padding-KO(t.title,this.chart.options.font),c=Math.sqrt(h*h+p*p),s=L2(Math.min(Math.asin(En((f.highest.height+6)/a,-1,1)),Math.asin(En(l/c,-1,1))-Math.asin(En(p/c,-1,1)))),s=Math.max(i,Math.min(o,s))),this.labelRotation=s}afterCalculateLabelRotation(){Ct(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Ct(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:o}}=this,s=this._isVisible(),a=this.isHorizontal();if(s){const l=KO(i,n.options.font);if(a?(t.width=this.maxWidth,t.height=Cu(o)+l):(t.height=this.maxHeight,t.width=Cu(o)+l),r.display&&this.ticks.length){const{first:c,last:f,widest:h,highest:p}=this._getLabelSizes(),m=r.padding*2,v=vi(this.labelRotation),y=Math.cos(v),x=Math.sin(v);if(a){const _=r.mirror?0:x*h.width+y*p.height;t.height=Math.min(this.maxHeight,t.height+_+m)}else{const _=r.mirror?0:y*h.width+x*p.height;t.width=Math.min(this.maxWidth,t.width+_+m)}this._calculatePadding(c,f,x,y)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,r,i){const{ticks:{align:o,padding:s},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const f=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1);let p=0,m=0;l?c?(p=i*t.width,m=r*n.height):(p=r*t.height,m=i*n.width):o==="start"?m=n.width:o==="end"?p=t.width:o!=="inner"&&(p=t.width/2,m=n.width/2),this.paddingLeft=Math.max((p-f+s)*this.width/(this.width-f),0),this.paddingRight=Math.max((m-h+s)*this.width/(this.width-h),0)}else{let f=n.height/2,h=t.height/2;o==="start"?(f=0,h=t.height):o==="end"&&(f=n.height,h=0),this.paddingTop=f+s,this.paddingBottom=h+s}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Ct(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,r;for(n=0,r=t.length;n({width:o[N]||0,height:s[N]||0});return{first:k(0),last:k(n-1),widest:k(T),highest:k(P),widths:o,heights:s}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return g7(this._alignToPixels?ha(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&ta*i?a/r:l/i:l*i0}_computeGridLineItems(t){const n=this.axis,r=this.chart,i=this.options,{grid:o,position:s,border:a}=i,l=o.offset,c=this.isHorizontal(),h=this.ticks.length+(l?1:0),p=Cu(o),m=[],v=a.setContext(this.getContext()),y=v.display?v.width:0,x=y/2,_=function(ie){return ha(r,ie,y)};let w,S,T,P,k,N,D,z,A,W,Y,J;if(s==="top")w=_(this.bottom),N=this.bottom-p,z=w-x,W=_(t.top)+x,J=t.bottom;else if(s==="bottom")w=_(this.top),W=t.top,J=_(t.bottom)-x,N=w+x,z=this.top+p;else if(s==="left")w=_(this.right),k=this.right-p,D=w-x,A=_(t.left)+x,Y=t.right;else if(s==="right")w=_(this.left),A=t.left,Y=_(t.right)-x,k=w+x,D=this.left+p;else if(n==="x"){if(s==="center")w=_((t.top+t.bottom)/2+.5);else if(rt(s)){const ie=Object.keys(s)[0],oe=s[ie];w=_(this.chart.scales[ie].getPixelForValue(oe))}W=t.top,J=t.bottom,N=w+x,z=N+p}else if(n==="y"){if(s==="center")w=_((t.left+t.right)/2);else if(rt(s)){const ie=Object.keys(s)[0],oe=s[ie];w=_(this.chart.scales[ie].getPixelForValue(oe))}k=w-x,D=k-p,A=t.left,Y=t.right}const Z=Ke(i.ticks.maxTicksLimit,h),ee=Math.max(1,Math.ceil(h/Z));for(S=0;So.value===t);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const n=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,s;const a=(l,c,f)=>{!f.width||!f.color||(r.save(),r.lineWidth=f.width,r.strokeStyle=f.color,r.setLineDash(f.borderDash||[]),r.lineDashOffset=f.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(c.x,c.y),r.stroke(),r.restore())};if(n.display)for(o=0,s=i.length;o{this.draw(o)}}]:[{z:r,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let o,s;for(o=0,s=n.length;o{const r=n.split("."),i=r.pop(),o=[e].concat(r).join("."),s=t[n].split("."),a=s.pop(),l=s.join(".");nn.route(o,i,l,a)})}function A9(e){return"id"in e&&"defaults"in e}class j9{constructor(){this.controllers=new Yh(bi,"datasets",!0),this.elements=new Yh(Ao,"elements"),this.plugins=new Yh(Object,"plugins"),this.scales=new Yh(ll,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,r){[...n].forEach(i=>{const o=r||this._getRegistryForType(i);r||o.isForType(i)||o===this.plugins&&i.id?this._exec(t,o,i):vt(i,s=>{const a=r||this._getRegistryForType(s);this._exec(t,a,s)})})}_exec(t,n,r){const i=N2(t);Ct(r["before"+i],[],r),n[t](r),Ct(r["after"+i],[],r)}_getRegistryForType(t){for(let n=0;no.filter(a=>!s.some(l=>a.plugin.id===l.plugin.id));this._notify(i(n,r),t,"stop"),this._notify(i(r,n),t,"start")}}function F9(e){const t={},n=[],r=Object.keys($i.plugins.items);for(let o=0;o1&&ug(e[0].toLowerCase(),t),e))return e;throw new Error(`Cannot determine type of '${name}' axis. Please provide 'axis' or 'position' option.`)}function W9(e,t){const n=Ha[e.type]||{scales:{}},r=t.scales||{},i=eb(e.type,t),o=Object.create(null);return Object.keys(r).forEach(s=>{const a=r[s];if(!rt(a))return console.error(`Invalid scale configuration for scale: ${s}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${s}`);const l=ug(s,a),c=V9(l,i),f=n.scales||{};o[s]=rf(Object.create(null),[{axis:l},a,f[l],f[c]])}),e.data.datasets.forEach(s=>{const a=s.type||e.type,l=s.indexAxis||eb(a,t),f=(Ha[a]||{}).scales||{};Object.keys(f).forEach(h=>{const p=U9(h,l),m=s[p+"AxisID"]||p;o[m]=o[m]||Object.create(null),rf(o[m],[{axis:p},r[m],f[h]])})}),Object.keys(o).forEach(s=>{const a=o[s];rf(a,[nn.scales[a.type],nn.scale])}),o}function SD(e){const t=e.options||(e.options={});t.plugins=Ke(t.plugins,{}),t.scales=W9(e,t)}function CD(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function Y9(e){return e=e||{},e.data=CD(e.data),SD(e),e}const XO=new Map,ED=new Set;function qh(e,t){let n=XO.get(e);return n||(n=t(),XO.set(e,n),ED.add(n)),n}const Eu=(e,t,n)=>{const r=Ls(t,n);r!==void 0&&e.add(r)};class q9{constructor(t){this._config=Y9(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=CD(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),SD(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return qh(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return qh(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return qh(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return qh(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const r=this._scopeCache;let i=r.get(t);return(!i||n)&&(i=new Map,r.set(t,i)),i}getOptionScopes(t,n,r){const{options:i,type:o}=this,s=this._cachedScopes(t,r),a=s.get(n);if(a)return a;const l=new Set;n.forEach(f=>{t&&(l.add(t),f.forEach(h=>Eu(l,t,h))),f.forEach(h=>Eu(l,i,h)),f.forEach(h=>Eu(l,Ha[o]||{},h)),f.forEach(h=>Eu(l,nn,h)),f.forEach(h=>Eu(l,X1,h))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),ED.has(n)&&s.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,Ha[n]||{},nn.datasets[n]||{},{type:n},nn,X1]}resolveNamedOptions(t,n,r,i=[""]){const o={$shared:!0},{resolver:s,subPrefixes:a}=QO(this._resolverCache,t,i);let l=s;if(Z9(s,n)){o.$shared=!1,r=Ds(r)?r():r;const c=this.createResolver(t,r,a);l=wc(s,r,c)}for(const c of n)o[c]=l[c];return o}createResolver(t,n,r=[""],i){const{resolver:o}=QO(this._resolverCache,t,r);return rt(n)?wc(o,n,void 0,i):o}}function QO(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const i=n.join();let o=r.get(i);return o||(o={resolver:I2(t,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},r.set(i,o)),o}const G9=e=>rt(e)&&Object.getOwnPropertyNames(e).reduce((t,n)=>t||Ds(e[n]),!1);function Z9(e,t){const{isScriptable:n,isIndexable:r}=rD(e);for(const i of t){const o=n(i),s=r(i),a=(s||o)&&e[i];if(o&&(Ds(a)||G9(a))||s&&kt(a))return!0}return!1}var K9="4.1.1";const X9=["top","bottom","left","right","chartArea"];function JO(e,t){return e==="top"||e==="bottom"||X9.indexOf(e)===-1&&t==="x"}function eP(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function tP(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),Ct(n&&n.onComplete,[e],t)}function Q9(e){const t=e.chart,n=t.options.animation;Ct(n&&n.onProgress,[e],t)}function TD(e){return cD()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const qp={},nP=e=>{const t=TD(e);return Object.values(qp).filter(n=>n.canvas===t).pop()};function J9(e,t,n){const r=Object.keys(e);for(const i of r){const o=+i;if(o>=t){const s=e[i];delete e[i],(n>0||o>t)&&(e[o+n]=s)}}}function ez(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}function tz(e){const{xScale:t,yScale:n}=e;if(t&&n)return{left:t.left,right:t.right,top:n.top,bottom:n.bottom}}var Ko;let fy=(Ko=class{static register(...t){$i.add(...t),rP()}static unregister(...t){$i.remove(...t),rP()}constructor(t,n){const r=this.config=new q9(n),i=TD(t),o=nP(i);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const s=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||_9(i)),this.platform.updateConfig(r);const a=this.platform.acquireContext(i,s.aspectRatio),l=a&&a.canvas,c=l&&l.height,f=l&&l.width;if(this.id=i7(),this.ctx=a,this.canvas=l,this.width=f,this.height=c,this._options=s,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new I9,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=b7(h=>this.update(h),s.resizeDelay||0),this._dataChanges=[],qp[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}co.listen(this,"complete",tP),co.listen(this,"progress",Q9),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:i,_aspectRatio:o}=this;return ct(t)?n&&o?o:i?r/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return $i}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():OO(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return CO(this.canvas,this.ctx),this}stop(){return co.stop(this),this}resize(t,n){co.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const r=this.options,i=this.canvas,o=r.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(i,t,n,o),a=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,OO(this,a,!0)&&(this.notifyPlugins("resize",{size:s}),Ct(r.onResize,[this,s],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};vt(n,(r,i)=>{r.id=i})}buildOrUpdateScales(){const t=this.options,n=t.scales,r=this.scales,i=Object.keys(r).reduce((s,a)=>(s[a]=!1,s),{});let o=[];n&&(o=o.concat(Object.keys(n).map(s=>{const a=n[s],l=ug(s,a),c=l==="r",f=l==="x";return{options:a,dposition:c?"chartArea":f?"bottom":"left",dtype:c?"radialLinear":f?"category":"linear"}}))),vt(o,s=>{const a=s.options,l=a.id,c=ug(l,a),f=Ke(a.type,s.dtype);(a.position===void 0||JO(a.position,c)!==JO(s.dposition))&&(a.position=s.dposition),i[l]=!0;let h=null;if(l in r&&r[l].type===f)h=r[l];else{const p=$i.getScale(f);h=new p({id:l,type:f,ctx:this.ctx,chart:this}),r[h.id]=h}h.init(a,t)}),vt(i,(s,a)=>{s||delete r[a]}),vt(r,s=>{Jn.configure(this,s,s.options),Jn.addBox(this,s)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,r=t.length;if(t.sort((i,o)=>i.index-o.index),r>n){for(let i=n;in.length&&delete this._stacks,t.forEach((r,i)=>{n.filter(o=>o===r._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let r,i;for(this._removeUnreferencedMetasets(),r=0,i=n.length;r{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let c=0,f=this.data.datasets.length;c{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(eP("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){vt(this.scales,t=>{Jn.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!mO(n,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:i,count:o}of n){const s=r==="_removeElements"?-o:o;J9(t,i,s)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=o=>new Set(t.filter(s=>s[0]===o).map((s,a)=>a+","+s.splice(1).join(","))),i=r(0);for(let o=1;oo.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Jn.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],vt(this.boxes,i=>{r&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,o)=>{i._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,r=t._clip,i=!r.disabled,o=tz(t)||this.chartArea,s={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(i&&ly(n,{left:r.left===!1?0:o.left-r.left,right:r.right===!1?this.width:o.right+r.right,top:r.top===!1?0:o.top-r.top,bottom:r.bottom===!1?this.height:o.bottom+r.bottom}),t.controller.draw(),i&&cy(n),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return Ff(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,i){const o=QB.modes[n];return typeof o=="function"?o(this,t,r,i):[]}getDatasetMeta(t){const n=this.data.datasets[t],r=this._metasets;let i=r.filter(o=>o&&o._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},r.push(i)),i}getContext(){return this.$context||(this.$context=Ys(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(t,n){const r=this.getDatasetMeta(t);r.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,r){const i=r?"show":"hide",o=this.getDatasetMeta(t),s=o.controller._resolveAnimations(void 0,i);Qr(n)?(o.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),s.update(o,{visible:r}),this.update(a=>a.datasetIndex===t?i:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),co.remove(this),t=0,n=this.data.datasets.length;t{n.addEventListener(this,o,s),t[o]=s},i=(o,s,a)=>{o.offsetX=s,o.offsetY=a,this._eventHandler(o)};vt(this.options.events,o=>r(o,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,r=(l,c)=>{n.addEventListener(this,l,c),t[l]=c},i=(l,c)=>{t[l]&&(n.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let s;const a=()=>{i("attach",a),this.attached=!0,this.resize(),r("resize",o),r("detach",s)};s=()=>{this.attached=!1,i("resize",o),this._stop(),this._resize(0,0),r("attach",a)},n.isAttached(this.canvas)?a():s()}unbindEvents(){vt(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},vt(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,r){const i=r?"set":"remove";let o,s,a,l;for(n==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+i+"DatasetHoverStyle"]()),a=0,l=t.length;a{const a=this.getDatasetMeta(o);if(!a)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:a.data[s],index:s}});!ig(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(t,n,r){return this._plugins.notify(this,t,n,r)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,r){const i=this.options.hover,o=(l,c)=>l.filter(f=>!c.some(h=>f.datasetIndex===h.datasetIndex&&f.index===h.index)),s=o(n,t),a=r?t:o(t,n);s.length&&this.updateHoverStyle(s,i.mode,!1),a.length&&i.mode&&this.updateHoverStyle(a,i.mode,!0)}_eventHandler(t,n){const r={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},i=s=>(s.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,i)===!1)return;const o=this._handleEvent(t,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,i),(o||r.changed)&&this.render(),this}_handleEvent(t,n,r){const{_active:i=[],options:o}=this,s=n,a=this._getActiveElements(t,i,r,s),l=u7(t),c=ez(t,this._lastEvent,r,l);r&&(this._lastEvent=null,Ct(o.onHover,[t,a,this],this),l&&Ct(o.onClick,[t,a,this],this));const f=!ig(a,i);return(f||n)&&(this._active=a,this._updateHoverStyles(a,i,n)),this._lastEvent=c,f}_getActiveElements(t,n,r,i){if(t.type==="mouseout")return[];if(!r)return n;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,i)}},xe(Ko,"defaults",nn),xe(Ko,"instances",qp),xe(Ko,"overrides",Ha),xe(Ko,"registry",$i),xe(Ko,"version",K9),xe(Ko,"getChart",nP),Ko);function rP(){return vt(fy.instances,e=>e._plugins.invalidate())}function nz(e,t,n){const{startAngle:r,pixelMargin:i,x:o,y:s,outerRadius:a,innerRadius:l}=t;let c=i/a;e.beginPath(),e.arc(o,s,a,r-c,n+c),l>i?(c=i/l,e.arc(o,s,l,n+c,r-c,!0)):e.arc(o,s,i,n+Zt,r-Zt),e.closePath(),e.clip()}function rz(e){return j2(e,["outerStart","outerEnd","innerStart","innerEnd"])}function iz(e,t,n,r){const i=rz(e.options.borderRadius),o=(n-t)/2,s=Math.min(o,r*t/2),a=l=>{const c=(n-Math.min(o,l))*r/2;return En(l,0,Math.min(o,c))};return{outerStart:a(i.outerStart),outerEnd:a(i.outerEnd),innerStart:En(i.innerStart,0,s),innerEnd:En(i.innerEnd,0,s)}}function Tl(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function fg(e,t,n,r,i,o){const{x:s,y:a,startAngle:l,pixelMargin:c,innerRadius:f}=t,h=Math.max(t.outerRadius+r+n-c,0),p=f>0?f+r+n+c:0;let m=0;const v=i-l;if(r){const ee=f>0?f-r:0,ie=h>0?h-r:0,oe=(ee+ie)/2,G=oe!==0?v*oe/(oe+r):v;m=(v-G)/2}const y=Math.max(.001,v*h-n/Ft)/h,x=(v-y)/2,_=l+x+m,w=i-x-m,{outerStart:S,outerEnd:T,innerStart:P,innerEnd:k}=iz(t,p,h,w-_),N=h-S,D=h-T,z=_+S/N,A=w-T/D,W=p+P,Y=p+k,J=_+P/W,Z=w-k/Y;if(e.beginPath(),o){const ee=(z+A)/2;if(e.arc(s,a,h,z,ee),e.arc(s,a,h,ee,A),T>0){const F=Tl(D,A,s,a);e.arc(F.x,F.y,T,A,w+Zt)}const ie=Tl(Y,w,s,a);if(e.lineTo(ie.x,ie.y),k>0){const F=Tl(Y,Z,s,a);e.arc(F.x,F.y,k,w+Zt,Z+Math.PI)}const oe=(w-k/p+(_+P/p))/2;if(e.arc(s,a,p,w-k/p,oe,!0),e.arc(s,a,p,oe,_+P/p,!0),P>0){const F=Tl(W,J,s,a);e.arc(F.x,F.y,P,J+Math.PI,_-Zt)}const G=Tl(N,_,s,a);if(e.lineTo(G.x,G.y),S>0){const F=Tl(N,z,s,a);e.arc(F.x,F.y,S,_-Zt,z)}}else{e.moveTo(s,a);const ee=Math.cos(z)*h+s,ie=Math.sin(z)*h+a;e.lineTo(ee,ie);const oe=Math.cos(A)*h+s,G=Math.sin(A)*h+a;e.lineTo(oe,G)}e.closePath()}function oz(e,t,n,r,i){const{fullCircles:o,startAngle:s,circumference:a}=t;let l=t.endAngle;if(o){fg(e,t,n,r,l,i);for(let c=0;c=Mt||If(o,a,l),y=yo(s,c+p,f+p);return v&&y}getCenterPoint(t){const{x:n,y:r,startAngle:i,endAngle:o,innerRadius:s,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:l,spacing:c}=this.options,f=(i+o)/2,h=(s+a+c+l)/2;return{x:n+Math.cos(f)*h,y:r+Math.sin(f)*h}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:n,circumference:r}=this,i=(n.offset||0)/4,o=(n.spacing||0)/2,s=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=r>Mt?Math.floor(r/Mt):0,r===0||this.innerRadius<0||this.outerRadius<0)return;t.save();const a=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(a)*i,Math.sin(a)*i);const l=1-Math.sin(Math.min(Ft,r||0)),c=i*l;t.fillStyle=n.backgroundColor,t.strokeStyle=n.borderColor,oz(t,this,c,o,s),sz(t,this,c,o,s),t.restore()}}xe(Gp,"id","arc"),xe(Gp,"defaults",{borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),xe(Gp,"defaultRoutes",{backgroundColor:"backgroundColor"});function OD(e,t,n=t){e.lineCap=Ke(n.borderCapStyle,t.borderCapStyle),e.setLineDash(Ke(n.borderDash,t.borderDash)),e.lineDashOffset=Ke(n.borderDashOffset,t.borderDashOffset),e.lineJoin=Ke(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=Ke(n.borderWidth,t.borderWidth),e.strokeStyle=Ke(n.borderColor,t.borderColor)}function az(e,t,n){e.lineTo(n.x,n.y)}function lz(e){return e.stepped?N7:e.tension||e.cubicInterpolationMode==="monotone"?L7:az}function PD(e,t,n={}){const r=e.length,{start:i=0,end:o=r-1}=n,{start:s,end:a}=t,l=Math.max(i,s),c=Math.min(o,a),f=ia&&o>a;return{count:r,start:l,loop:t.loop,ilen:c(s+(c?a-T:T))%o,S=()=>{y!==x&&(e.lineTo(f,x),e.lineTo(f,y),e.lineTo(f,_))};for(l&&(m=i[w(0)],e.moveTo(m.x,m.y)),p=0;p<=a;++p){if(m=i[w(p)],m.skip)continue;const T=m.x,P=m.y,k=T|0;k===v?(Px&&(x=P),f=(h*f+T)/++h):(S(),e.lineTo(T,P),v=k,h=0,y=x=P),_=P}S()}function tb(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?uz:cz}function fz(e){return e.stepped?fB:e.tension||e.cubicInterpolationMode==="monotone"?dB:wa}function dz(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),OD(e,t.options),e.stroke(i)}function hz(e,t,n,r){const{segments:i,options:o}=t,s=tb(t);for(const a of i)OD(e,o,a.style),e.beginPath(),s(e,t,a,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const pz=typeof Path2D=="function";function mz(e,t,n,r){pz&&!t.options.segment?dz(e,t,n,r):hz(e,t,n,r)}class cs extends Ao{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,n){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const i=r.spanGaps?this._loop:this._fullLoop;rB(this._points,r,t,i,n),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=yB(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,r=t.length;return r&&n[t[r-1].end]}interpolate(t,n){const r=this.options,i=t[n],o=this.points,s=pD(this,{property:n,start:i,end:i});if(!s.length)return;const a=[],l=fz(r);let c,f;for(c=0,f=s.length;ct!=="borderDash"&&t!=="fill"});function iP(e,t,n,r){const i=e.options,{[n]:o}=e.getProps([n],r);return Math.abs(t-o)e.replace("rgb(","rgba(").replace(")",", 0.5)"));function MD(e){return nb[e%nb.length]}function RD(e){return oP[e%oP.length]}function xz(e,t){return e.borderColor=MD(t),e.backgroundColor=RD(t),++t}function Sz(e,t){return e.backgroundColor=e.data.map(()=>MD(t++)),t}function Cz(e,t){return e.backgroundColor=e.data.map(()=>RD(t++)),t}function Ez(e){let t=0;return(n,r)=>{const i=e.getDatasetMeta(r).controller;i instanceof ls?t=Sz(n,t):i instanceof uf?t=Cz(n,t):i&&(t=xz(n,t))}}function sP(e){let t;for(t in e)if(e[t].borderColor||e[t].backgroundColor)return!0;return!1}var Tz={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,t,n){if(!n.enabled)return;const{options:{elements:r},data:{datasets:i}}=e.config;if(!n.forceOverride&&(sP(i)||r&&sP(r)))return;const o=Ez(e);i.forEach(o)}};function Oz(e,t,n,r,i){const o=i.samples||r;if(o>=n)return e.slice(t,t+n);const s=[],a=(n-2)/(o-2);let l=0;const c=t+n-1;let f=t,h,p,m,v,y;for(s[l++]=e[f],h=0;hm&&(m=v,p=e[w],y=w);s[l++]=p,f=y}return s[l++]=e[c],s}function Pz(e,t,n,r){let i=0,o=0,s,a,l,c,f,h,p,m,v,y;const x=[],_=t+n-1,w=e[t].x,T=e[_].x-w;for(s=t;sy&&(y=c,p=s),i=(o*i+a.x)/++o;else{const k=s-1;if(!ct(h)&&!ct(p)){const N=Math.min(h,p),D=Math.max(h,p);N!==m&&N!==k&&x.push({...e[N],x:i}),D!==m&&D!==k&&x.push({...e[D],x:i})}s>0&&k!==m&&x.push(e[k]),x.push(a),f=P,o=0,v=y=c,h=p=m=s}}return x}function ND(e){if(e._decimated){const t=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{value:t})}}function aP(e){e.data.datasets.forEach(t=>{ND(t)})}function kz(e,t){const n=t.length;let r=0,i;const{iScale:o}=e,{min:s,max:a,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(r=En(_o(t,o.axis,s).lo,0,n-1)),c?i=En(_o(t,o.axis,a).hi+1,r,n)-r:i=n-r,{start:r,count:i}}var Mz={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,t,n)=>{if(!n.enabled){aP(e);return}const r=e.width;e.data.datasets.forEach((i,o)=>{const{_data:s,indexAxis:a}=i,l=e.getDatasetMeta(o),c=s||i.data;if(Uu([a,e.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const f=e.scales[l.xAxisID];if(f.type!=="linear"&&f.type!=="time"||e.options.parsing)return;let{start:h,count:p}=kz(l,c);const m=n.threshold||4*r;if(p<=m){ND(i);return}ct(s)&&(i._data=c,delete i.data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(y){this._data=y}}));let v;switch(n.algorithm){case"lttb":v=Oz(c,h,p,r,n);break;case"min-max":v=Pz(c,h,p,r);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}i._decimated=v})},destroy(e){aP(e)}};function Rz(e,t,n){const r=e.segments,i=e.points,o=t.points,s=[];for(const a of r){let{start:l,end:c}=a;c=U2(l,c,i);const f=rb(n,i[l],i[c],a.loop);if(!t.segments){s.push({source:a,target:f,start:i[l],end:i[c]});continue}const h=pD(t,f);for(const p of h){const m=rb(n,o[p.start],o[p.end],p.loop),v=hD(a,i,m);for(const y of v)s.push({source:y,target:p,start:{[n]:lP(f,m,"start",Math.max)},end:{[n]:lP(f,m,"end",Math.min)}})}}return s}function rb(e,t,n,r){if(r)return;let i=t[e],o=n[e];return e==="angle"&&(i=Pr(i),o=Pr(o)),{property:e,start:i,end:o}}function Nz(e,t){const{x:n=null,y:r=null}=e||{},i=t.points,o=[];return t.segments.forEach(({start:s,end:a})=>{a=U2(s,a,i);const l=i[s],c=i[a];r!==null?(o.push({x:l.x,y:r}),o.push({x:c.x,y:r})):n!==null&&(o.push({x:n,y:l.y}),o.push({x:n,y:c.y}))}),o}function U2(e,t,n){for(;t>e;t--){const r=n[t];if(!isNaN(r.x)&&!isNaN(r.y))break}return t}function lP(e,t,n,r){return e&&t?r(e[n],t[n]):e?e[n]:t?t[n]:0}function LD(e,t){let n=[],r=!1;return kt(e)?(r=!0,n=e):n=Nz(e,t),n.length?new cs({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function cP(e){return e&&e.fill!==!1}function Lz(e,t,n){let i=e[t].fill;const o=[t];let s;if(!n)return i;for(;i!==!1&&o.indexOf(i)===-1;){if(!Gt(i))return i;if(s=e[i],!s)return!1;if(s.visible)return i;o.push(i),i=s.fill}return!1}function Dz(e,t,n){const r=Fz(e);if(rt(r))return isNaN(r.value)?!1:r;let i=parseFloat(r);return Gt(i)&&Math.floor(i)===i?Az(r[0],t,i,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function Az(e,t,n,r){return(e==="-"||e==="+")&&(n=t+n),n===t||n<0||n>=r?!1:n}function jz(e,t){let n=null;return e==="start"?n=t.bottom:e==="end"?n=t.top:rt(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function Iz(e,t,n){let r;return e==="start"?r=n:e==="end"?r=t.options.reverse?t.min:t.max:rt(e)?r=e.value:r=t.getBaseValue(),r}function Fz(e){const t=e.options,n=t.fill;let r=Ke(n&&n.target,n);return r===void 0&&(r=!!t.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function $z(e){const{scale:t,index:n,line:r}=e,i=[],o=r.segments,s=r.points,a=Bz(t,n);a.push(LD({x:null,y:t.bottom},r));for(let l=0;l=0;--s){const a=i[s].$filler;a&&(a.line.updateControlPoints(o,a.axis),r&&a.fill&&v0(e.ctx,a,o))}},beforeDatasetsDraw(e,t,n){if(n.drawTime!=="beforeDatasetsDraw")return;const r=e.getSortedVisibleDatasetMetas();for(let i=r.length-1;i>=0;--i){const o=r[i].$filler;cP(o)&&v0(e.ctx,o,e.chartArea)}},beforeDatasetDraw(e,t,n){const r=t.meta.$filler;!cP(r)||n.drawTime!=="beforeDatasetDraw"||v0(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const hP=(e,t)=>{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}},Xz=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class pP extends Ao{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n,r){this.maxWidth=t,this.maxHeight=n,this._margins=r,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let n=Ct(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(r=>t.filter(r,this.chart.data))),t.sort&&(n=n.sort((r,i)=>t.sort(r,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const r=t.labels,i=gn(r.font),o=i.size,s=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=hP(r,o);let c,f;n.font=i.string,this.isHorizontal()?(c=this.maxWidth,f=this._fitRows(s,o,a,l)+10):(f=this.maxHeight,c=this._fitCols(s,i,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(f,t.maxHeight||this.maxHeight)}_fitRows(t,n,r,i){const{ctx:o,maxWidth:s,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],f=i+a;let h=t;o.textAlign="left",o.textBaseline="middle";let p=-1,m=-f;return this.legendItems.forEach((v,y)=>{const x=r+n/2+o.measureText(v.text).width;(y===0||c[c.length-1]+x+2*a>s)&&(h+=f,c[c.length-(y>0?0:1)]=0,m+=f,p++),l[y]={left:0,top:m,row:p,width:x,height:i},c[c.length-1]+=x+a}),h}_fitCols(t,n,r,i){const{ctx:o,maxHeight:s,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],f=s-t;let h=a,p=0,m=0,v=0,y=0;return this.legendItems.forEach((x,_)=>{const{itemWidth:w,itemHeight:S}=Qz(r,n,o,x,i);_>0&&m+S+2*a>f&&(h+=p+a,c.push({width:p,height:m}),v+=p+a,y++,p=m=0),l[_]={left:v,top:m,col:y,width:w,height:S},p=Math.max(p,w),m+=S+a}),h+=p,c.push({width:p,height:m}),h}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:i},rtl:o}}=this,s=ic(o,this.left,this.width);if(this.isHorizontal()){let a=0,l=Kn(r,this.left+i,this.right-this.lineWidths[a]);for(const c of n)a!==c.row&&(a=c.row,l=Kn(r,this.left+i,this.right-this.lineWidths[a])),c.top+=this.top+t+i,c.left=s.leftForLtr(s.x(l),c.width),l+=c.width+i}else{let a=0,l=Kn(r,this.top+t+i,this.bottom-this.columnSizes[a].height);for(const c of n)c.col!==a&&(a=c.col,l=Kn(r,this.top+t+i,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+i,c.left=s.leftForLtr(s.x(c.left),c.width),l+=c.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;ly(t,this),this._draw(),cy(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:i}=this,{align:o,labels:s}=t,a=nn.color,l=ic(t.rtl,this.left,this.width),c=gn(s.font),{padding:f}=s,h=c.size,p=h/2;let m;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=c.string;const{boxWidth:v,boxHeight:y,itemHeight:x}=hP(s,h),_=function(k,N,D){if(isNaN(v)||v<=0||isNaN(y)||y<0)return;i.save();const z=Ke(D.lineWidth,1);if(i.fillStyle=Ke(D.fillStyle,a),i.lineCap=Ke(D.lineCap,"butt"),i.lineDashOffset=Ke(D.lineDashOffset,0),i.lineJoin=Ke(D.lineJoin,"miter"),i.lineWidth=z,i.strokeStyle=Ke(D.strokeStyle,a),i.setLineDash(Ke(D.lineDash,[])),s.usePointStyle){const A={radius:y*Math.SQRT2/2,pointStyle:D.pointStyle,rotation:D.rotation,borderWidth:z},W=l.xPlus(k,v/2),Y=N+p;tD(i,A,W,Y,s.pointStyleWidth&&v)}else{const A=N+Math.max((h-y)/2,0),W=l.leftForLtr(k,v),Y=Aa(D.borderRadius);i.beginPath(),Object.values(Y).some(J=>J!==0)?$f(i,{x:W,y:A,w:v,h:y,radius:Y}):i.rect(W,A,v,y),i.fill(),z!==0&&i.stroke()}i.restore()},w=function(k,N,D){Wa(i,D.text,k,N+x/2,c,{strikethrough:D.hidden,textAlign:l.textAlign(D.textAlign)})},S=this.isHorizontal(),T=this._computeTitleHeight();S?m={x:Kn(o,this.left+f,this.right-r[0]),y:this.top+f+T,line:0}:m={x:this.left+f,y:Kn(o,this.top+T+f,this.bottom-n[0].height),line:0},uD(this.ctx,t.textDirection);const P=x+f;this.legendItems.forEach((k,N)=>{i.strokeStyle=k.fontColor,i.fillStyle=k.fontColor;const D=i.measureText(k.text).width,z=l.textAlign(k.textAlign||(k.textAlign=s.textAlign)),A=v+p+D;let W=m.x,Y=m.y;l.setWidth(this.width),S?N>0&&W+A+f>this.right&&(Y=m.y+=P,m.line++,W=m.x=Kn(o,this.left+f,this.right-r[m.line])):N>0&&Y+P>this.bottom&&(W=m.x=W+n[m.line].width+f,m.line++,Y=m.y=Kn(o,this.top+T+f,this.bottom-n[m.line].height));const J=l.x(W);if(_(J,Y,k),W=w7(z,W+v+p,S?W+A:this.right,t.rtl),w(l.x(W),Y,k),S)m.x+=A+f;else if(typeof k.text!="string"){const Z=c.lineHeight;m.y+=AD(k,Z)}else m.y+=P}),fD(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=gn(n.font),i=er(n.padding);if(!n.display)return;const o=ic(t.rtl,this.left,this.width),s=this.ctx,a=n.position,l=r.size/2,c=i.top+l;let f,h=this.left,p=this.width;if(this.isHorizontal())p=Math.max(...this.lineWidths),f=this.top+c,h=Kn(t.align,h,this.right-p);else{const v=this.columnSizes.reduce((y,x)=>Math.max(y,x.height),0);f=c+Kn(t.align,this.top,this.bottom-v-t.labels.padding-this._computeTitleHeight())}const m=Kn(a,h,h+p);s.textAlign=o.textAlign(A2(a)),s.textBaseline="middle",s.strokeStyle=n.color,s.fillStyle=n.color,s.font=r.string,Wa(s,n.text,m,f,r)}_computeTitleHeight(){const t=this.options.title,n=gn(t.font),r=er(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,i,o;if(yo(t,this.left,this.right)&&yo(n,this.top,this.bottom)){for(o=this.legendHitBoxes,r=0;ro.length>s.length?o:s)),t+n.size/2+r.measureText(i).width}function eU(e,t,n){let r=e;return typeof t.text!="string"&&(r=AD(t,n)),r}function AD(e,t){const n=e.text?e.text.length+.5:0;return t*n}function tU(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var nU={id:"legend",_element:pP,start(e,t,n){const r=e.legend=new pP({ctx:e.ctx,options:n,chart:e});Jn.configure(e,r,n),Jn.addBox(e,r)},stop(e){Jn.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;Jn.configure(e,r,n),r.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const r=t.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),t.hidden=!0):(i.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:i,color:o,useBorderRadius:s,borderRadius:a}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(n?0:void 0),f=er(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(f.width+f.height)/4,strokeStyle:c.borderColor,pointStyle:r||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:s&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class V2 extends Ao{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n){const r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=n;const i=kt(r.text)?r.text.length:1;this._padding=er(r.padding);const o=i*gn(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:r,bottom:i,right:o,options:s}=this,a=s.align;let l=0,c,f,h;return this.isHorizontal()?(f=Kn(a,r,o),h=n+t,c=o-r):(s.position==="left"?(f=r+t,h=Kn(a,i,n),l=Ft*-.5):(f=o-t,h=Kn(a,n,i),l=Ft*.5),c=i-n),{titleX:f,titleY:h,maxWidth:c,rotation:l}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const r=gn(n.font),o=r.lineHeight/2+this._padding.top,{titleX:s,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(o);Wa(t,n.text,0,0,r,{color:n.color,maxWidth:l,rotation:c,textAlign:A2(n.align),textBaseline:"middle",translation:[s,a]})}}function rU(e,t){const n=new V2({ctx:e.ctx,options:t,chart:e});Jn.configure(e,n,t),Jn.addBox(e,n),e.titleBlock=n}var iU={id:"title",_element:V2,start(e,t,n){rU(e,n)},stop(e){const t=e.titleBlock;Jn.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const r=e.titleBlock;Jn.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Gh=new WeakMap;var oU={id:"subtitle",start(e,t,n){const r=new V2({ctx:e.ctx,options:n,chart:e});Jn.configure(e,r,n),Jn.addBox(e,r),Gh.set(e,r)},stop(e){Jn.removeBox(e,Gh.get(e)),Gh.delete(e)},beforeUpdate(e,t,n){const r=Gh.get(e);Jn.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Hu={average(e){if(!e.length)return!1;let t,n,r=0,i=0,o=0;for(t=0,n=e.length;t-1?e.split(` `):e}function sU(e,t){const{element:n,datasetIndex:r,index:i}=t,o=e.getDatasetMeta(r).controller,{label:s,value:a}=o.getLabelAndValue(i);return{chart:e,label:s,parsed:o.getParsed(i),raw:e.data.datasets[r].data[i],formattedValue:a,dataset:o.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function mP(e,t){const n=e.chart.ctx,{body:r,footer:i,title:o}=e,{boxWidth:s,boxHeight:a}=t,l=gn(t.bodyFont),c=gn(t.titleFont),f=gn(t.footerFont),h=o.length,p=i.length,m=r.length,v=er(t.padding);let y=v.height,x=0,_=r.reduce((T,P)=>T+P.before.length+P.lines.length+P.after.length,0);if(_+=e.beforeBody.length+e.afterBody.length,h&&(y+=h*c.lineHeight+(h-1)*t.titleSpacing+t.titleMarginBottom),_){const T=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;y+=m*T+(_-m)*l.lineHeight+(_-1)*t.bodySpacing}p&&(y+=t.footerMarginTop+p*f.lineHeight+(p-1)*t.footerSpacing);let w=0;const S=function(T){x=Math.max(x,n.measureText(T).width+w)};return n.save(),n.font=c.string,vt(e.title,S),n.font=l.string,vt(e.beforeBody.concat(e.afterBody),S),w=t.displayColors?s+2+t.boxPadding:0,vt(r,T=>{vt(T.before,S),vt(T.lines,S),vt(T.after,S)}),w=0,n.font=f.string,vt(e.footer,S),n.restore(),x+=v.width,{width:x,height:y}}function aU(e,t){const{y:n,height:r}=t;return ne.height-r/2?"bottom":"center"}function lU(e,t,n,r){const{x:i,width:o}=r,s=n.caretSize+n.caretPadding;if(e==="left"&&i+o+s>t.width||e==="right"&&i-o-s<0)return!0}function cU(e,t,n,r){const{x:i,width:o}=n,{width:s,chartArea:{left:a,right:l}}=e;let c="center";return r==="center"?c=i<=(a+l)/2?"left":"right":i<=o/2?c="left":i>=s-o/2&&(c="right"),lU(c,e,t,n)&&(c="center"),c}function gP(e,t,n){const r=n.yAlign||t.yAlign||aU(e,n);return{xAlign:n.xAlign||t.xAlign||cU(e,t,n,r),yAlign:r}}function uU(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function fU(e,t,n){let{y:r,height:i}=e;return t==="top"?r+=n:t==="bottom"?r-=i+n:r-=i/2,r}function vP(e,t,n,r){const{caretSize:i,caretPadding:o,cornerRadius:s}=e,{xAlign:a,yAlign:l}=n,c=i+o,{topLeft:f,topRight:h,bottomLeft:p,bottomRight:m}=Aa(s);let v=uU(t,a);const y=fU(t,l,c);return l==="center"?a==="left"?v+=c:a==="right"&&(v-=c):a==="left"?v-=Math.max(f,p)+i:a==="right"&&(v+=Math.max(h,m)+i),{x:En(v,0,r.width-t.width),y:En(y,0,r.height-t.height)}}function Zh(e,t,n){const r=er(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function yP(e){return Fi([],uo(e))}function dU(e,t,n){return Ys(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function _P(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const jD={beforeTitle:lo,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex"u"?jD[t].call(n,r):i}var q1;let bP=(q1=class extends Ao{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,r=this.options.setContext(this.getContext()),i=r.enabled&&n.options.animation&&r.animations,o=new mD(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=dU(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,i=dr(r,"beforeTitle",this,t),o=dr(r,"title",this,t),s=dr(r,"afterTitle",this,t);let a=[];return a=Fi(a,uo(i)),a=Fi(a,uo(o)),a=Fi(a,uo(s)),a}getBeforeBody(t,n){return yP(dr(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,i=[];return vt(t,o=>{const s={before:[],lines:[],after:[]},a=_P(r,o);Fi(s.before,uo(dr(a,"beforeLabel",this,o))),Fi(s.lines,dr(a,"label",this,o)),Fi(s.after,uo(dr(a,"afterLabel",this,o))),i.push(s)}),i}getAfterBody(t,n){return yP(dr(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,i=dr(r,"beforeFooter",this,t),o=dr(r,"footer",this,t),s=dr(r,"afterFooter",this,t);let a=[];return a=Fi(a,uo(i)),a=Fi(a,uo(o)),a=Fi(a,uo(s)),a}_createItems(t){const n=this._active,r=this.chart.data,i=[],o=[],s=[];let a=[],l,c;for(l=0,c=n.length;lt.filter(f,h,p,r))),t.itemSort&&(a=a.sort((f,h)=>t.itemSort(f,h,r))),vt(a,f=>{const h=_P(t.callbacks,f);i.push(dr(h,"labelColor",this,f)),o.push(dr(h,"labelPointStyle",this,f)),s.push(dr(h,"labelTextColor",this,f))}),this.labelColors=i,this.labelPointStyles=o,this.labelTextColors=s,this.dataPoints=a,a}update(t,n){const r=this.options.setContext(this.getContext()),i=this._active;let o,s=[];if(!i.length)this.opacity!==0&&(o={opacity:0});else{const a=Hu[r.position].call(this,i,this._eventPosition);s=this._createItems(r),this.title=this.getTitle(s,r),this.beforeBody=this.getBeforeBody(s,r),this.body=this.getBody(s,r),this.afterBody=this.getAfterBody(s,r),this.footer=this.getFooter(s,r);const l=this._size=mP(this,r),c=Object.assign({},a,l),f=gP(this.chart,r,c),h=vP(r,c,f,this.chart);this.xAlign=f.xAlign,this.yAlign=f.yAlign,o={opacity:1,x:h.x,y:h.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=s,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,i){const o=this.getCaretPosition(t,r,i);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)}getCaretPosition(t,n,r){const{xAlign:i,yAlign:o}=this,{caretSize:s,cornerRadius:a}=r,{topLeft:l,topRight:c,bottomLeft:f,bottomRight:h}=Aa(a),{x:p,y:m}=t,{width:v,height:y}=n;let x,_,w,S,T,P;return o==="center"?(T=m+y/2,i==="left"?(x=p,_=x-s,S=T+s,P=T-s):(x=p+v,_=x+s,S=T-s,P=T+s),w=x):(i==="left"?_=p+Math.max(l,f)+s:i==="right"?_=p+v-Math.max(c,h)-s:_=this.caretX,o==="top"?(S=m,T=S-s,x=_-s,w=_+s):(S=m+y,T=S+s,x=_+s,w=_-s),P=S),{x1:x,x2:_,x3:w,y1:S,y2:T,y3:P}}drawTitle(t,n,r){const i=this.title,o=i.length;let s,a,l;if(o){const c=ic(r.rtl,this.x,this.width);for(t.x=Zh(this,r.titleAlign,r),n.textAlign=c.textAlign(r.titleAlign),n.textBaseline="middle",s=gn(r.titleFont),a=r.titleSpacing,n.fillStyle=r.titleColor,n.font=s.string,l=0;lS!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,$f(t,{x,y,w:c,h:l,radius:w}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),$f(t,{x:_,y:y+1,w:c-2,h:l-2,radius:w}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(x,y,c,l),t.strokeRect(x,y,c,l),t.fillStyle=s.backgroundColor,t.fillRect(_,y+1,c-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:i}=this,{bodySpacing:o,bodyAlign:s,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:f}=r,h=gn(r.bodyFont);let p=h.lineHeight,m=0;const v=ic(r.rtl,this.x,this.width),y=function(D){n.fillText(D,v.x(t.x+m),t.y+p/2),t.y+=p+o},x=v.textAlign(s);let _,w,S,T,P,k,N;for(n.textAlign=s,n.textBaseline="middle",n.font=h.string,t.x=Zh(this,x,r),n.fillStyle=r.bodyColor,vt(this.beforeBody,y),m=a&&x!=="right"?s==="center"?c/2+f:c+2+f:0,T=0,k=i.length;T0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,i=r&&r.x,o=r&&r.y;if(i||o){const s=Hu[t.position].call(this,this._active,this._eventPosition);if(!s)return;const a=this._size=mP(this,t),l=Object.assign({},s,this._size),c=gP(n,t,l),f=vP(t,l,c,n);(i._to!==f.x||o._to!==f.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=s.x,this.caretY=s.y,this._resolveAnimations().update(this,f))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},o={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const s=er(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(t.save(),t.globalAlpha=r,this.drawBackground(o,t,i,n),uD(t,n.textDirection),o.y+=s.top,this.drawTitle(o,t,n),this.drawBody(o,t,n),this.drawFooter(o,t,n),fD(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,i=t.map(({datasetIndex:a,index:l})=>{const c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[l],index:l}}),o=!ig(r,i),s=this._positionChanged(i,n);(o||s)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,o=this._active||[],s=this._getActiveElements(t,o,n,r),a=this._positionChanged(s,t),l=n||!ig(s,o)||a;return l&&(this._active=s,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,r,i){const o=this.options;if(t.type==="mouseout")return[];if(!i)return n;const s=this.chart.getElementsAtEventForMode(t,o.mode,o,r);return o.reverse&&s.reverse(),s}_positionChanged(t,n){const{caretX:r,caretY:i,options:o}=this,s=Hu[o.position].call(this,t,n);return s!==!1&&(r!==s.x||i!==s.y)}},xe(q1,"positioners",Hu),q1);var hU={id:"tooltip",_element:bP,positioners:Hu,afterInit(e,t,n){n&&(e.tooltip=new bP({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:jD},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},pU=Object.freeze({__proto__:null,Colors:Tz,Decimation:Mz,Filler:Kz,Legend:nU,SubTitle:oU,Title:iU,Tooltip:hU});const mU=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function gU(e,t,n,r){const i=e.indexOf(t);if(i===-1)return mU(e,t,n,r);const o=e.lastIndexOf(t);return i!==o?n:i}const vU=(e,t)=>e===null?null:En(Math.round(e),0,t);function wP(e){const t=this.getLabels();return e>=0&&en.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}xe(ib,"id","category"),xe(ib,"defaults",{ticks:{callback:wP}});function yU(e,t){const n=[],{bounds:i,step:o,min:s,max:a,precision:l,count:c,maxTicks:f,maxDigits:h,includeBounds:p}=e,m=o||1,v=f-1,{min:y,max:x}=t,_=!ct(s),w=!ct(a),S=!ct(c),T=(x-y)/(h+1);let P=vO((x-y)/v/m)*m,k,N,D,z;if(P<1e-14&&!_&&!w)return[{value:y},{value:x}];z=Math.ceil(x/P)-Math.floor(y/P),z>v&&(P=vO(z*P/v/m)*m),ct(l)||(k=Math.pow(10,l),P=Math.ceil(P*k)/k),i==="ticks"?(N=Math.floor(y/P)*P,D=Math.ceil(x/P)*P):(N=y,D=x),_&&w&&o&&p7((a-s)/o,P/1e3)?(z=Math.round(Math.min((a-s)/P,f)),P=(a-s)/z,N=s,D=a):S?(N=_?s:N,D=w?a:D,z=c-1,P=(D-N)/z):(z=(D-N)/P,of(z,Math.round(z),P/1e3)?z=Math.round(z):z=Math.ceil(z));const A=Math.max(yO(P),yO(N));k=Math.pow(10,ct(l)?A:l),N=Math.round(N*k)/k,D=Math.round(D*k)/k;let W=0;for(_&&(p&&N!==s?(n.push({value:s}),Ni=n?i:l,a=l=>o=r?o:l;if(t){const l=qi(i),c=qi(o);l<0&&c<0?a(0):l>0&&c>0&&s(0)}if(i===o){let l=o===0?1:Math.abs(o*.05);a(o+l),t||s(i-l)}this.min=i,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=t,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},o=this._range||this,s=yU(i,o);return t.bounds==="ticks"&&WL(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const t=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const i=(r-n)/Math.max(t.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return Ld(t,this.chart.options.locale,this.options.ticks.format)}}class ob extends dg{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=Gt(t)?t:0,this.max=Gt(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=vi(this.options.ticks.minRotation),i=(t?Math.sin(r):Math.cos(r))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,o.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}xe(ob,"id","linear"),xe(ob,"defaults",{ticks:{callback:ay.formatters.numeric}});const zf=e=>Math.floor(as(e)),ma=(e,t)=>Math.pow(10,zf(e)+t);function SP(e){return e/Math.pow(10,zf(e))===1}function CP(e,t,n){const r=Math.pow(10,n),i=Math.floor(e/r);return Math.ceil(t/r)-i}function _U(e,t){const n=t-e;let r=zf(n);for(;CP(e,t,r)>10;)r++;for(;CP(e,t,r)<10;)r--;return Math.min(r,zf(e))}function bU(e,{min:t,max:n}){t=Tr(e.min,t);const r=[],i=zf(t);let o=_U(t,n),s=o<0?Math.pow(10,Math.abs(o)):1;const a=Math.pow(10,o),l=i>o?Math.pow(10,i):0,c=Math.round((t-l)*s)/s,f=Math.floor((t-l)/a/10)*a*10;let h=Math.floor((c-f)/Math.pow(10,o)),p=Tr(e.min,Math.round((l+f+h*Math.pow(10,o))*s)/s);for(;p=10?h=h<15?15:20:h++,h>=20&&(o++,h=2,s=o>=0?1:s),p=Math.round((l+f+h*Math.pow(10,o))*s)/s;const m=Tr(e.max,p);return r.push({value:m,major:SP(m),significand:h}),r}class sb extends ll{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){const r=dg.prototype.parse.apply(this,[t,n]);if(r===0){this._zero=!0;return}return Gt(r)&&r>0?r:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=Gt(t)?Math.max(0,t):null,this.max=Gt(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!Gt(this._userMin)&&(this.min=t===ma(this.min,0)?ma(this.min,-1):ma(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let r=this.min,i=this.max;const o=a=>r=t?r:a,s=a=>i=n?i:a;r===i&&(r<=0?(o(1),s(10)):(o(ma(r,-1)),s(ma(i,1)))),r<=0&&o(ma(i,-1)),i<=0&&s(ma(r,1)),this.min=r,this.max=i}buildTicks(){const t=this.options,n={min:this._userMin,max:this._userMax},r=bU(n,this);return t.bounds==="ticks"&&WL(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}getLabelForValue(t){return t===void 0?"0":Ld(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=as(t),this._valueRange=as(this.max)-as(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(as(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}xe(sb,"id","logarithmic"),xe(sb,"defaults",{ticks:{callback:ay.formatters.logarithmic,major:{enabled:!0}}});function ab(e){const t=e.ticks;if(t.display&&e.display){const n=er(t.backdropPadding);return Ke(t.font&&t.font.size,nn.font.size)+n.height}return 0}function wU(e,t,n){return n=kt(n)?n:[n],{w:R7(e,t.string,n),h:n.length*t.lineHeight}}function EP(e,t,n,r,i){return e===r||e===i?{start:t-n/2,end:t+n/2}:ei?{start:t-n,end:t}:{start:t,end:t+n}}function xU(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),r=[],i=[],o=e._pointLabels.length,s=e.options.pointLabels,a=s.centerPointLabels?Ft/o:0;for(let l=0;lt.r&&(a=(r.end-t.r)/o,e.r=Math.max(e.r,t.r+a)),i.startt.b&&(l=(i.end-t.b)/s,e.b=Math.max(e.b,t.b+l))}function CU(e,t,n){const r=[],i=e._pointLabels.length,o=e.options,s=ab(o)/2,a=e.drawingArea,l=o.pointLabels.centerPointLabels?Ft/i:0;for(let c=0;c270||n<90)&&(e-=t),e}function PU(e,t){const{ctx:n,options:{pointLabels:r}}=e;for(let i=t-1;i>=0;i--){const o=r.setContext(e.getPointLabelContext(i)),s=gn(o.font),{x:a,y:l,textAlign:c,left:f,top:h,right:p,bottom:m}=e._pointLabelItems[i],{backdropColor:v}=o;if(!ct(v)){const y=Aa(o.borderRadius),x=er(o.backdropPadding);n.fillStyle=v;const _=f-x.left,w=h-x.top,S=p-f+x.width,T=m-h+x.height;Object.values(y).some(P=>P!==0)?(n.beginPath(),$f(n,{x:_,y:w,w:S,h:T,radius:y}),n.fill()):n.fillRect(_,w,S,T)}Wa(n,e._pointLabels[i],a,l+s.lineHeight/2,s,{color:o.color,textAlign:c,textBaseline:"middle"})}}function ID(e,t,n,r){const{ctx:i}=e;if(n)i.arc(e.xCenter,e.yCenter,t,0,Mt);else{let o=e.getPointPosition(0,t);i.moveTo(o.x,o.y);for(let s=1;s{const i=Ct(this.options.pointLabels.callback,[n,r],this);return i||i===0?i:""}).filter((n,r)=>this.chart.getDataVisibility(r))}fit(){const t=this.options;t.display&&t.pointLabels.display?xU(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,n,r,i){this.xCenter+=Math.floor((t-n)/2),this.yCenter+=Math.floor((r-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,n,r,i))}getIndexAngle(t){const n=Mt/(this._pointLabels.length||1),r=this.options.startAngle||0;return Pr(t*n+vi(r))}getDistanceFromCenterForValue(t){if(ct(t))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*n:(t-this.min)*n}getValueForDistanceFromCenter(t){if(ct(t))return NaN;const n=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(t){const n=this._pointLabels||[];if(t>=0&&t{if(h!==0){l=this.getDistanceFromCenterForValue(f.value);const p=this.getContext(h),m=i.setContext(p),v=o.setContext(p);kU(this,m,l,s,v)}}),r.display){for(t.save(),a=s-1;a>=0;a--){const f=r.setContext(this.getPointLabelContext(a)),{color:h,lineWidth:p}=f;!p||!h||(t.lineWidth=p,t.strokeStyle=h,t.setLineDash(f.borderDash),t.lineDashOffset=f.borderDashOffset,l=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),c=this.getPointPosition(a,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,n=this.options,r=n.ticks;if(!r.display)return;const i=this.getIndexAngle(0);let o,s;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(i),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&!n.reverse)return;const c=r.setContext(this.getContext(l)),f=gn(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=f.string,s=t.measureText(a.label).width,t.fillStyle=c.backdropColor;const h=er(c.backdropPadding);t.fillRect(-s/2-h.left,-o-f.size/2-h.top,s+h.width,f.size+h.height)}Wa(t,a.label,0,-o,f,{color:c.color})}),t.restore()}drawTitle(){}}xe(Wu,"id","radialLinear"),xe(Wu,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:ay.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),xe(Wu,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),xe(Wu,"descriptors",{angleLines:{_fallback:"grid"}});const dy={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},mr=Object.keys(dy);function RU(e,t){return e-t}function TP(e,t){if(ct(t))return null;const n=e._adapter,{parser:r,round:i,isoWeekday:o}=e._parseOpts;let s=t;return typeof r=="function"&&(s=r(s)),Gt(s)||(s=typeof r=="string"?n.parse(s,r):n.parse(s)),s===null?null:(i&&(s=i==="week"&&(bc(o)||o===!0)?n.startOf(s,"isoWeek",o):n.startOf(s,i)),+s)}function OP(e,t,n,r){const i=mr.length;for(let o=mr.indexOf(e);o=mr.indexOf(n);o--){const s=mr[o];if(dy[s].common&&e._adapter.diff(i,r,s)>=t-1)return s}return mr[n?mr.indexOf(n):0]}function LU(e){for(let t=mr.indexOf(e)+1,n=mr.length;t=t?n[r]:n[i];e[o]=!0}}function DU(e,t,n,r){const i=e._adapter,o=+i.startOf(t[0].value,r),s=t[t.length-1].value;let a,l;for(a=o;a<=s;a=+i.add(a,1,r))l=n[a],l>=0&&(t[l].major=!0);return t}function kP(e,t,n){const r=[],i={},o=t.length;let s,a;for(s=0;s+t.value))}initOffsets(t=[]){let n=0,r=0,i,o;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?r=o:r=(o-this.getDecimalForValue(t[t.length-2]))/2);const s=t.length<3?.5:.25;n=En(n,0,s),r=En(r,0,s),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,i=this.options,o=i.time,s=o.unit||OP(o.minUnit,n,r,this._getLabelCapacity(n)),a=Ke(i.ticks.stepSize,1),l=s==="week"?o.isoWeekday:!1,c=bc(l)||l===!0,f={};let h=n,p,m;if(c&&(h=+t.startOf(h,"isoWeek",l)),h=+t.startOf(h,c?"day":s),t.diff(r,n,s)>1e5*a)throw new Error(n+" and "+r+" are too far apart with stepSize of "+a+" "+s);const v=i.ticks.source==="data"&&this.getDataTimestamps();for(p=h,m=0;py-x).map(y=>+y)}getLabelForValue(t){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}_tickFormatFunction(t,n,r,i){const o=this.options,s=o.ticks.callback;if(s)return Ct(s,[t,n,r],this);const a=o.time.displayFormats,l=this._unit,c=this._majorUnit,f=l&&a[l],h=c&&a[c],p=r[n],m=c&&h&&p&&p.major;return this._adapter.format(t,i||(m?h:f))}generateTickLabels(t){let n,r,i;for(n=0,r=t.length;n0?a:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n=e[r].pos&&t<=e[i].pos&&({lo:r,hi:i}=_o(e,"pos",t)),{pos:o,time:a}=e[r],{pos:s,time:l}=e[i]):(t>=e[r].time&&t<=e[i].time&&({lo:r,hi:i}=_o(e,"time",t)),{time:o,pos:a}=e[r],{time:s,pos:l}=e[i]);const c=s-o;return c?a+(l-a)*(t-o)/c:a}class lb extends Uf{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=Kh(n,this.min),this._tableRange=Kh(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,i=[],o=[];let s,a,l,c,f;for(s=0,a=t.length;s=n&&c<=r&&i.push(c);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(s=0,a=i.length;s>>1,ne=G[B];if(0>>1;Bi(te,j))sei(pe,te)?(G[B]=pe,G[se]=j,B=se):(G[B]=te,G[q]=j,B=q);else if(sei(pe,j))G[B]=pe,G[se]=j,B=se;else break e}}return F}function i(G,F){var j=G.sortIndex-F.sortIndex;return j!==0?j:G.id-F.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],c=[],f=1,h=null,p=3,m=!1,v=!1,y=!1,x=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(G){for(var F=n(c);F!==null;){if(F.callback===null)r(c);else if(F.startTime<=G)r(c),F.sortIndex=F.expirationTime,t(l,F);else break;F=n(c)}}function T(G){if(y=!1,S(G),!v)if(n(l)!==null)v=!0,ie(P);else{var F=n(c);F!==null&&oe(T,F.startTime-G)}}function P(G,F){v=!1,y&&(y=!1,_(D),D=-1),m=!0;var j=p;try{for(S(F),h=n(l);h!==null&&(!(h.expirationTime>F)||G&&!W());){var B=h.callback;if(typeof B=="function"){h.callback=null,p=h.priorityLevel;var ne=B(h.expirationTime<=F);F=e.unstable_now(),typeof ne=="function"?h.callback=ne:h===n(l)&&r(l),S(F)}else r(l);h=n(l)}if(h!==null)var H=!0;else{var q=n(c);q!==null&&oe(T,q.startTime-F),H=!1}return H}finally{h=null,p=j,m=!1}}var k=!1,N=null,D=-1,z=5,A=-1;function W(){return!(e.unstable_now()-AG||125B?(G.sortIndex=j,t(c,G),n(l)===null&&G===n(c)&&(y?(_(D),D=-1):y=!0,oe(T,j-B))):(G.sortIndex=ne,t(l,G),v||m||(v=!0,ie(P))),G},e.unstable_shouldYield=W,e.unstable_wrapCallback=function(G){var F=p;return function(){var j=p;p=F;try{return G.apply(this,arguments)}finally{p=j}}}})(FD);(function(e){e.exports=FD})(FU);/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var $D=V,Dr=cb;function Ee(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ub=Object.prototype.hasOwnProperty,$U=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,MP={},RP={};function BU(e){return ub.call(RP,e)?!0:ub.call(MP,e)?!1:$U.test(e)?RP[e]=!0:(MP[e]=!0,!1)}function zU(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function UU(e,t,n,r){if(t===null||typeof t>"u"||zU(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function fr(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var Hn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Hn[e]=new fr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Hn[t]=new fr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Hn[e]=new fr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Hn[e]=new fr(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Hn[e]=new fr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Hn[e]=new fr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Hn[e]=new fr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Hn[e]=new fr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Hn[e]=new fr(e,5,!1,e.toLowerCase(),null,!1,!1)});var H2=/[\-:]([a-z])/g;function W2(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(H2,W2);Hn[t]=new fr(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(H2,W2);Hn[t]=new fr(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(H2,W2);Hn[t]=new fr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Hn[e]=new fr(e,1,!1,e.toLowerCase(),null,!1,!1)});Hn.xlinkHref=new fr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Hn[e]=new fr(e,1,!1,e.toLowerCase(),null,!0,!0)});function Y2(e,t,n,r){var i=Hn.hasOwnProperty(t)?Hn[t]:null;(i!==null?i.type!==0:r||!(2a||i[s]!==o[a]){var l=` `+i[s].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{_0=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Yu(e):""}function VU(e){switch(e.tag){case 5:return Yu(e.type);case 16:return Yu("Lazy");case 13:return Yu("Suspense");case 19:return Yu("SuspenseList");case 0:case 2:case 15:return e=b0(e.type,!1),e;case 11:return e=b0(e.type.render,!1),e;case 1:return e=b0(e.type,!0),e;default:return""}}function pb(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Vl:return"Fragment";case Ul:return"Portal";case fb:return"Profiler";case q2:return"StrictMode";case db:return"Suspense";case hb:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case UD:return(e.displayName||"Context")+".Consumer";case zD:return(e._context.displayName||"Context")+".Provider";case G2:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Z2:return t=e.displayName||null,t!==null?t:pb(e.type)||"Memo";case Qo:t=e._payload,e=e._init;try{return pb(e(t))}catch{}}return null}function HU(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return pb(t);case 8:return t===q2?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function As(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function HD(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function WU(e){var t=HD(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Qh(e){e._valueTracker||(e._valueTracker=WU(e))}function WD(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=HD(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function hg(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function mb(e,t){var n=t.checked;return Ht({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function LP(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=As(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function YD(e,t){t=t.checked,t!=null&&Y2(e,"checked",t,!1)}function gb(e,t){YD(e,t);var n=As(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?vb(e,t.type,n):t.hasOwnProperty("defaultValue")&&vb(e,t.type,As(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function DP(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function vb(e,t,n){(t!=="number"||hg(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var qu=Array.isArray;function oc(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Jh.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Hf(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ff={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},YU=["Webkit","ms","Moz","O"];Object.keys(ff).forEach(function(e){YU.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ff[t]=ff[e]})});function KD(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ff.hasOwnProperty(e)&&ff[e]?(""+t).trim():t+"px"}function XD(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=KD(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var qU=Ht({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function bb(e,t){if(t){if(qU[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Ee(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Ee(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Ee(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Ee(62))}}function wb(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var xb=null;function K2(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Sb=null,sc=null,ac=null;function IP(e){if(e=Id(e)){if(typeof Sb!="function")throw Error(Ee(280));var t=e.stateNode;t&&(t=vy(t),Sb(e.stateNode,e.type,t))}}function QD(e){sc?ac?ac.push(e):ac=[e]:sc=e}function JD(){if(sc){var e=sc,t=ac;if(ac=sc=null,IP(e),t)for(e=0;e>>=0,e===0?32:31-(iV(e)/oV|0)|0}var ep=64,tp=4194304;function Gu(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function vg(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=Gu(a):(o&=s,o!==0&&(r=Gu(o)))}else s=n&~i,s!==0?r=Gu(s):o!==0&&(r=Gu(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Ad(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-wi(t),e[t]=n}function cV(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=hf),YP=String.fromCharCode(32),qP=!1;function _A(e,t){switch(e){case"keyup":return IV.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bA(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Hl=!1;function $V(e,t){switch(e){case"compositionend":return bA(t);case"keypress":return t.which!==32?null:(qP=!0,YP);case"textInput":return e=t.data,e===YP&&qP?null:e;default:return null}}function BV(e,t){if(Hl)return e==="compositionend"||!iS&&_A(e,t)?(e=vA(),Qp=tS=fs=null,Hl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=XP(n)}}function CA(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?CA(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function EA(){for(var e=window,t=hg();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=hg(e.document)}return t}function oS(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function ZV(e){var t=EA(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&CA(n.ownerDocument.documentElement,n)){if(r!==null&&oS(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=QP(n,o);var s=QP(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Wl=null,kb=null,mf=null,Mb=!1;function JP(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Mb||Wl==null||Wl!==hg(r)||(r=Wl,"selectionStart"in r&&oS(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),mf&&Kf(mf,r)||(mf=r,r=bg(kb,"onSelect"),0Gl||(e.current=jb[Gl],jb[Gl]=null,Gl--)}function Et(e,t){Gl++,jb[Gl]=e.current,e.current=t}var js={},tr=Gs(js),yr=Gs(!1),qa=js;function Cc(e,t){var n=e.type.contextTypes;if(!n)return js;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function _r(e){return e=e.childContextTypes,e!=null}function xg(){Rt(yr),Rt(tr)}function sk(e,t,n){if(tr.current!==js)throw Error(Ee(168));Et(tr,t),Et(yr,n)}function DA(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Ee(108,HU(e)||"Unknown",i));return Ht({},n,r)}function Sg(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||js,qa=tr.current,Et(tr,e),Et(yr,yr.current),!0}function ak(e,t,n){var r=e.stateNode;if(!r)throw Error(Ee(169));n?(e=DA(e,t,qa),r.__reactInternalMemoizedMergedChildContext=e,Rt(yr),Rt(tr),Et(tr,e)):Rt(yr),Et(yr,n)}var po=null,yy=!1,D0=!1;function AA(e){po===null?po=[e]:po.push(e)}function aH(e){yy=!0,AA(e)}function Zs(){if(!D0&&po!==null){D0=!0;var e=0,t=_t;try{var n=po;for(_t=1;e>=s,i-=s,bo=1<<32-wi(t)+i|n<D?(z=N,N=null):z=N.sibling;var A=p(_,N,S[D],T);if(A===null){N===null&&(N=z);break}e&&N&&A.alternate===null&&t(_,N),w=o(A,w,D),k===null?P=A:k.sibling=A,k=A,N=z}if(D===S.length)return n(_,N),jt&&xa(_,D),P;if(N===null){for(;DD?(z=N,N=null):z=N.sibling;var W=p(_,N,A.value,T);if(W===null){N===null&&(N=z);break}e&&N&&W.alternate===null&&t(_,N),w=o(W,w,D),k===null?P=W:k.sibling=W,k=W,N=z}if(A.done)return n(_,N),jt&&xa(_,D),P;if(N===null){for(;!A.done;D++,A=S.next())A=h(_,A.value,T),A!==null&&(w=o(A,w,D),k===null?P=A:k.sibling=A,k=A);return jt&&xa(_,D),P}for(N=r(_,N);!A.done;D++,A=S.next())A=m(N,_,D,A.value,T),A!==null&&(e&&A.alternate!==null&&N.delete(A.key===null?D:A.key),w=o(A,w,D),k===null?P=A:k.sibling=A,k=A);return e&&N.forEach(function(Y){return t(_,Y)}),jt&&xa(_,D),P}function x(_,w,S,T){if(typeof S=="object"&&S!==null&&S.type===Vl&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case Xh:e:{for(var P=S.key,k=w;k!==null;){if(k.key===P){if(P=S.type,P===Vl){if(k.tag===7){n(_,k.sibling),w=i(k,S.props.children),w.return=_,_=w;break e}}else if(k.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===Qo&&pk(P)===k.type){n(_,k.sibling),w=i(k,S.props),w.ref=Ru(_,k,S),w.return=_,_=w;break e}n(_,k);break}else t(_,k);k=k.sibling}S.type===Vl?(w=Fa(S.props.children,_.mode,T,S.key),w.return=_,_=w):(T=sm(S.type,S.key,S.props,null,_.mode,T),T.ref=Ru(_,w,S),T.return=_,_=T)}return s(_);case Ul:e:{for(k=S.key;w!==null;){if(w.key===k)if(w.tag===4&&w.stateNode.containerInfo===S.containerInfo&&w.stateNode.implementation===S.implementation){n(_,w.sibling),w=i(w,S.children||[]),w.return=_,_=w;break e}else{n(_,w);break}else t(_,w);w=w.sibling}w=U0(S,_.mode,T),w.return=_,_=w}return s(_);case Qo:return k=S._init,x(_,w,k(S._payload),T)}if(qu(S))return v(_,w,S,T);if(Tu(S))return y(_,w,S,T);lp(_,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,w!==null&&w.tag===6?(n(_,w.sibling),w=i(w,S),w.return=_,_=w):(n(_,w),w=z0(S,_.mode,T),w.return=_,_=w),s(_)):n(_,w)}return x}var Tc=VA(!0),HA=VA(!1),Fd={},Zi=Gs(Fd),ed=Gs(Fd),td=Gs(Fd);function Na(e){if(e===Fd)throw Error(Ee(174));return e}function pS(e,t){switch(Et(td,t),Et(ed,e),Et(Zi,Fd),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:_b(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=_b(t,e)}Rt(Zi),Et(Zi,t)}function Oc(){Rt(Zi),Rt(ed),Rt(td)}function WA(e){Na(td.current);var t=Na(Zi.current),n=_b(t,e.type);t!==n&&(Et(ed,e),Et(Zi,n))}function mS(e){ed.current===e&&(Rt(Zi),Rt(ed))}var zt=Gs(0);function kg(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var A0=[];function gS(){for(var e=0;en?n:4,e(!0);var r=j0.transition;j0.transition={};try{e(!1),t()}finally{_t=n,j0.transition=r}}function a4(){return ei().memoizedState}function fH(e,t,n){var r=Es(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},l4(e))c4(t,n);else if(n=$A(e,t,n,r),n!==null){var i=cr();xi(n,e,r,i),u4(n,t,r)}}function dH(e,t,n){var r=Es(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(l4(e))c4(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,Ti(a,s)){var l=t.interleaved;l===null?(i.next=i,dS(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=$A(e,t,i,r),n!==null&&(i=cr(),xi(n,e,r,i),u4(n,t,r))}}function l4(e){var t=e.alternate;return e===Vt||t!==null&&t===Vt}function c4(e,t){gf=Mg=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function u4(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Q2(e,n)}}var Rg={readContext:Jr,useCallback:qn,useContext:qn,useEffect:qn,useImperativeHandle:qn,useInsertionEffect:qn,useLayoutEffect:qn,useMemo:qn,useReducer:qn,useRef:qn,useState:qn,useDebugValue:qn,useDeferredValue:qn,useTransition:qn,useMutableSource:qn,useSyncExternalStore:qn,useId:qn,unstable_isNewReconciler:!1},hH={readContext:Jr,useCallback:function(e,t){return Bi().memoizedState=[e,t===void 0?null:t],e},useContext:Jr,useEffect:gk,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,nm(4194308,4,n4.bind(null,t,e),n)},useLayoutEffect:function(e,t){return nm(4194308,4,e,t)},useInsertionEffect:function(e,t){return nm(4,2,e,t)},useMemo:function(e,t){var n=Bi();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Bi();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=fH.bind(null,Vt,e),[r.memoizedState,e]},useRef:function(e){var t=Bi();return e={current:e},t.memoizedState=e},useState:mk,useDebugValue:wS,useDeferredValue:function(e){return Bi().memoizedState=e},useTransition:function(){var e=mk(!1),t=e[0];return e=uH.bind(null,e[1]),Bi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Vt,i=Bi();if(jt){if(n===void 0)throw Error(Ee(407));n=n()}else{if(n=t(),Tn===null)throw Error(Ee(349));Za&30||GA(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,gk(KA.bind(null,r,o,e),[e]),r.flags|=2048,id(9,ZA.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Bi(),t=Tn.identifierPrefix;if(jt){var n=wo,r=bo;n=(r&~(1<<32-wi(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=nd++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Ui]=t,e[Jf]=r,_4(e,t,!1,!1),t.stateNode=e;e:{switch(s=wb(n,r),n){case"dialog":Tt("cancel",e),Tt("close",e),i=r;break;case"iframe":case"object":case"embed":Tt("load",e),i=r;break;case"video":case"audio":for(i=0;ikc&&(t.flags|=128,r=!0,Nu(o,!1),t.lanes=4194304)}else{if(!r)if(e=kg(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Nu(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!jt)return Gn(t),null}else 2*tn()-o.renderingStartTime>kc&&n!==1073741824&&(t.flags|=128,r=!0,Nu(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=tn(),t.sibling=null,n=zt.current,Et(zt,r?n&1|2:n&1),t):(Gn(t),null);case 22:case 23:return OS(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Or&1073741824&&(Gn(t),t.subtreeFlags&6&&(t.flags|=8192)):Gn(t),null;case 24:return null;case 25:return null}throw Error(Ee(156,t.tag))}function wH(e,t){switch(aS(t),t.tag){case 1:return _r(t.type)&&xg(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Oc(),Rt(yr),Rt(tr),gS(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return mS(t),null;case 13:if(Rt(zt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ee(340));Ec()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Rt(zt),null;case 4:return Oc(),null;case 10:return fS(t.type._context),null;case 22:case 23:return OS(),null;case 24:return null;default:return null}}var up=!1,Xn=!1,xH=typeof WeakSet=="function"?WeakSet:Set,ze=null;function Ql(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Yt(e,t,r)}else n.current=null}function Gb(e,t,n){try{n()}catch(r){Yt(e,t,r)}}var Ek=!1;function SH(e,t){if(Rb=yg,e=EA(),oS(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,c=0,f=0,h=e,p=null;t:for(;;){for(var m;h!==n||i!==0&&h.nodeType!==3||(a=s+i),h!==o||r!==0&&h.nodeType!==3||(l=s+r),h.nodeType===3&&(s+=h.nodeValue.length),(m=h.firstChild)!==null;)p=h,h=m;for(;;){if(h===e)break t;if(p===n&&++c===i&&(a=s),p===o&&++f===r&&(l=s),(m=h.nextSibling)!==null)break;h=p,p=h.parentNode}h=m}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Nb={focusedElem:e,selectionRange:n},yg=!1,ze=t;ze!==null;)if(t=ze,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ze=e;else for(;ze!==null;){t=ze;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var y=v.memoizedProps,x=v.memoizedState,_=t.stateNode,w=_.getSnapshotBeforeUpdate(t.elementType===t.type?y:fi(t.type,y),x);_.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var S=t.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ee(163))}}catch(T){Yt(t,t.return,T)}if(e=t.sibling,e!==null){e.return=t.return,ze=e;break}ze=t.return}return v=Ek,Ek=!1,v}function vf(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&Gb(t,n,o)}i=i.next}while(i!==r)}}function wy(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Zb(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function x4(e){var t=e.alternate;t!==null&&(e.alternate=null,x4(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ui],delete t[Jf],delete t[Ab],delete t[oH],delete t[sH])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function S4(e){return e.tag===5||e.tag===3||e.tag===4}function Tk(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||S4(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Kb(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=wg));else if(r!==4&&(e=e.child,e!==null))for(Kb(e,t,n),e=e.sibling;e!==null;)Kb(e,t,n),e=e.sibling}function Xb(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Xb(e,t,n),e=e.sibling;e!==null;)Xb(e,t,n),e=e.sibling}var Bn=null,di=!1;function qo(e,t,n){for(n=n.child;n!==null;)C4(e,t,n),n=n.sibling}function C4(e,t,n){if(Gi&&typeof Gi.onCommitFiberUnmount=="function")try{Gi.onCommitFiberUnmount(hy,n)}catch{}switch(n.tag){case 5:Xn||Ql(n,t);case 6:var r=Bn,i=di;Bn=null,qo(e,t,n),Bn=r,di=i,Bn!==null&&(di?(e=Bn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Bn.removeChild(n.stateNode));break;case 18:Bn!==null&&(di?(e=Bn,n=n.stateNode,e.nodeType===8?L0(e.parentNode,n):e.nodeType===1&&L0(e,n),Gf(e)):L0(Bn,n.stateNode));break;case 4:r=Bn,i=di,Bn=n.stateNode.containerInfo,di=!0,qo(e,t,n),Bn=r,di=i;break;case 0:case 11:case 14:case 15:if(!Xn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&Gb(n,t,s),i=i.next}while(i!==r)}qo(e,t,n);break;case 1:if(!Xn&&(Ql(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Yt(n,t,a)}qo(e,t,n);break;case 21:qo(e,t,n);break;case 22:n.mode&1?(Xn=(r=Xn)||n.memoizedState!==null,qo(e,t,n),Xn=r):qo(e,t,n);break;default:qo(e,t,n)}}function Ok(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new xH),t.forEach(function(r){var i=NH.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function ui(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=tn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*EH(r/1960))-r,10e?16:e,ds===null)var r=!1;else{if(e=ds,ds=null,Dg=0,ut&6)throw Error(Ee(331));var i=ut;for(ut|=4,ze=e.current;ze!==null;){var o=ze,s=o.child;if(ze.flags&16){var a=o.deletions;if(a!==null){for(var l=0;ltn()-ES?Ia(e,0):CS|=n),br(e,t)}function N4(e,t){t===0&&(e.mode&1?(t=tp,tp<<=1,!(tp&130023424)&&(tp=4194304)):t=1);var n=cr();e=To(e,t),e!==null&&(Ad(e,t,n),br(e,n))}function RH(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),N4(e,n)}function NH(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Ee(314))}r!==null&&r.delete(t),N4(e,n)}var L4;L4=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||yr.current)gr=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return gr=!1,_H(e,t,n);gr=!!(e.flags&131072)}else gr=!1,jt&&t.flags&1048576&&jA(t,Eg,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;rm(e,t),e=t.pendingProps;var i=Cc(t,tr.current);cc(t,n),i=yS(null,t,r,e,i,n);var o=_S();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,_r(r)?(o=!0,Sg(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,hS(t),i.updater=_y,t.stateNode=i,i._reactInternals=t,zb(t,r,e,n),t=Hb(null,t,r,!0,o,n)):(t.tag=0,jt&&o&&sS(t),ar(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(rm(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=DH(r),e=fi(r,e),i){case 0:t=Vb(null,t,r,e,n);break e;case 1:t=xk(null,t,r,e,n);break e;case 11:t=bk(null,t,r,e,n);break e;case 14:t=wk(null,t,r,fi(r.type,e),n);break e}throw Error(Ee(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:fi(r,i),Vb(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:fi(r,i),xk(e,t,r,i,n);case 3:e:{if(g4(t),e===null)throw Error(Ee(387));r=t.pendingProps,o=t.memoizedState,i=o.element,BA(e,t),Pg(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Pc(Error(Ee(423)),t),t=Sk(e,t,r,n,i);break e}else if(r!==i){i=Pc(Error(Ee(424)),t),t=Sk(e,t,r,n,i);break e}else for(kr=xs(t.stateNode.containerInfo.firstChild),Rr=t,jt=!0,pi=null,n=HA(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ec(),r===i){t=Oo(e,t,n);break e}ar(e,t,r,n)}t=t.child}return t;case 5:return WA(t),e===null&&Fb(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,Lb(r,i)?s=null:o!==null&&Lb(r,o)&&(t.flags|=32),m4(e,t),ar(e,t,s,n),t.child;case 6:return e===null&&Fb(t),null;case 13:return v4(e,t,n);case 4:return pS(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Tc(t,null,r,n):ar(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:fi(r,i),bk(e,t,r,i,n);case 7:return ar(e,t,t.pendingProps,n),t.child;case 8:return ar(e,t,t.pendingProps.children,n),t.child;case 12:return ar(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,Et(Tg,r._currentValue),r._currentValue=s,o!==null)if(Ti(o.value,s)){if(o.children===i.children&&!yr.current){t=Oo(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=xo(-1,n&-n),l.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?l.next=l:(l.next=f.next,f.next=l),c.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),$b(o.return,n,t),a.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(Ee(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),$b(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}ar(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,cc(t,n),i=Jr(i),r=r(i),t.flags|=1,ar(e,t,r,n),t.child;case 14:return r=t.type,i=fi(r,t.pendingProps),i=fi(r.type,i),wk(e,t,r,i,n);case 15:return h4(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:fi(r,i),rm(e,t),t.tag=1,_r(r)?(e=!0,Sg(t)):e=!1,cc(t,n),UA(t,r,i),zb(t,r,i,n),Hb(null,t,r,!0,e,n);case 19:return y4(e,t,n);case 22:return p4(e,t,n)}throw Error(Ee(156,t.tag))};function D4(e,t){return sA(e,t)}function LH(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function qr(e,t,n,r){return new LH(e,t,n,r)}function kS(e){return e=e.prototype,!(!e||!e.isReactComponent)}function DH(e){if(typeof e=="function")return kS(e)?1:0;if(e!=null){if(e=e.$$typeof,e===G2)return 11;if(e===Z2)return 14}return 2}function Ts(e,t){var n=e.alternate;return n===null?(n=qr(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function sm(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")kS(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Vl:return Fa(n.children,i,o,t);case q2:s=8,i|=8;break;case fb:return e=qr(12,n,t,i|2),e.elementType=fb,e.lanes=o,e;case db:return e=qr(13,n,t,i),e.elementType=db,e.lanes=o,e;case hb:return e=qr(19,n,t,i),e.elementType=hb,e.lanes=o,e;case VD:return Sy(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case zD:s=10;break e;case UD:s=9;break e;case G2:s=11;break e;case Z2:s=14;break e;case Qo:s=16,r=null;break e}throw Error(Ee(130,e==null?e:typeof e,""))}return t=qr(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Fa(e,t,n,r){return e=qr(7,e,r,t),e.lanes=n,e}function Sy(e,t,n,r){return e=qr(22,e,r,t),e.elementType=VD,e.lanes=n,e.stateNode={isHidden:!1},e}function z0(e,t,n){return e=qr(6,e,null,t),e.lanes=n,e}function U0(e,t,n){return t=qr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function AH(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=x0(0),this.expirationTimes=x0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=x0(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function MS(e,t,n,r,i,o,s,a,l){return e=new AH(e,t,n,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=qr(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},hS(o),e}function jH(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=jr})(IU);const $a=RL(Ya);var F4,Ak=Ya;F4=Ak.createRoot,Ak.hydrateRoot;var Ig={},zH={get exports(){return Ig},set exports(e){Ig=e}},$4={};/** * @license React * use-sync-external-store-shim.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Mc=V;function UH(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var VH=typeof Object.is=="function"?Object.is:UH,HH=Mc.useState,WH=Mc.useEffect,YH=Mc.useLayoutEffect,qH=Mc.useDebugValue;function GH(e,t){var n=t(),r=HH({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return YH(function(){i.value=n,i.getSnapshot=t,V0(i)&&o({inst:i})},[e,n,t]),WH(function(){return V0(i)&&o({inst:i}),e(function(){V0(i)&&o({inst:i})})},[e]),qH(n),n}function V0(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!VH(e,n)}catch{return!0}}function ZH(e,t){return t()}var KH=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?ZH:GH;$4.useSyncExternalStore=Mc.useSyncExternalStore!==void 0?Mc.useSyncExternalStore:KH;(function(e){e.exports=$4})(zH);var jk={},XH={get exports(){return jk},set exports(e){jk=e}},B4={};/** * @license React * use-sync-external-store-shim/with-selector.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Py=V,QH=Ig;function JH(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var eW=typeof Object.is=="function"?Object.is:JH,tW=QH.useSyncExternalStore,nW=Py.useRef,rW=Py.useEffect,iW=Py.useMemo,oW=Py.useDebugValue;B4.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=nW(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=iW(function(){function l(m){if(!c){if(c=!0,f=m,m=r(m),i!==void 0&&s.hasValue){var v=s.value;if(i(v,m))return h=v}return h=m}if(v=h,eW(f,m))return v;var y=r(m);return i!==void 0&&i(v,y)?v:(f=m,h=y)}var c=!1,f,h,p=n===void 0?null:n;return[function(){return l(t())},p===null?void 0:function(){return l(p())}]},[t,n,r,i]);var a=tW(e,o[0],o[1]);return rW(function(){s.hasValue=!0,s.value=a},[a]),oW(a),a};(function(e){e.exports=B4})(XH);function sW(e){e()}let z4=sW;const aW=e=>z4=e,lW=()=>z4,U4=V.createContext(null),cW=()=>{throw new Error("uSES not initialized!")};function fc(){return fc=Object.assign||function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}var nw={},uW={get exports(){return nw},set exports(e){nw=e}},bt={};/** @license React v16.13.1 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var On=typeof Symbol=="function"&&Symbol.for,AS=On?Symbol.for("react.element"):60103,jS=On?Symbol.for("react.portal"):60106,ky=On?Symbol.for("react.fragment"):60107,My=On?Symbol.for("react.strict_mode"):60108,Ry=On?Symbol.for("react.profiler"):60114,Ny=On?Symbol.for("react.provider"):60109,Ly=On?Symbol.for("react.context"):60110,IS=On?Symbol.for("react.async_mode"):60111,Dy=On?Symbol.for("react.concurrent_mode"):60111,Ay=On?Symbol.for("react.forward_ref"):60112,jy=On?Symbol.for("react.suspense"):60113,fW=On?Symbol.for("react.suspense_list"):60120,Iy=On?Symbol.for("react.memo"):60115,Fy=On?Symbol.for("react.lazy"):60116,dW=On?Symbol.for("react.block"):60121,hW=On?Symbol.for("react.fundamental"):60117,pW=On?Symbol.for("react.responder"):60118,mW=On?Symbol.for("react.scope"):60119;function Fr(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case AS:switch(e=e.type,e){case IS:case Dy:case ky:case Ry:case My:case jy:return e;default:switch(e=e&&e.$$typeof,e){case Ly:case Ay:case Fy:case Iy:case Ny:return e;default:return t}}case jS:return t}}}function V4(e){return Fr(e)===Dy}bt.AsyncMode=IS;bt.ConcurrentMode=Dy;bt.ContextConsumer=Ly;bt.ContextProvider=Ny;bt.Element=AS;bt.ForwardRef=Ay;bt.Fragment=ky;bt.Lazy=Fy;bt.Memo=Iy;bt.Portal=jS;bt.Profiler=Ry;bt.StrictMode=My;bt.Suspense=jy;bt.isAsyncMode=function(e){return V4(e)||Fr(e)===IS};bt.isConcurrentMode=V4;bt.isContextConsumer=function(e){return Fr(e)===Ly};bt.isContextProvider=function(e){return Fr(e)===Ny};bt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===AS};bt.isForwardRef=function(e){return Fr(e)===Ay};bt.isFragment=function(e){return Fr(e)===ky};bt.isLazy=function(e){return Fr(e)===Fy};bt.isMemo=function(e){return Fr(e)===Iy};bt.isPortal=function(e){return Fr(e)===jS};bt.isProfiler=function(e){return Fr(e)===Ry};bt.isStrictMode=function(e){return Fr(e)===My};bt.isSuspense=function(e){return Fr(e)===jy};bt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===ky||e===Dy||e===Ry||e===My||e===jy||e===fW||typeof e=="object"&&e!==null&&(e.$$typeof===Fy||e.$$typeof===Iy||e.$$typeof===Ny||e.$$typeof===Ly||e.$$typeof===Ay||e.$$typeof===hW||e.$$typeof===pW||e.$$typeof===mW||e.$$typeof===dW)};bt.typeOf=Fr;(function(e){e.exports=bt})(uW);var FS=nw,gW={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},vW={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},yW={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},H4={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},$S={};$S[FS.ForwardRef]=yW;$S[FS.Memo]=H4;function Ik(e){return FS.isMemo(e)?H4:$S[e.$$typeof]||gW}var _W=Object.defineProperty,bW=Object.getOwnPropertyNames,Fk=Object.getOwnPropertySymbols,wW=Object.getOwnPropertyDescriptor,xW=Object.getPrototypeOf,$k=Object.prototype;function W4(e,t,n){if(typeof t!="string"){if($k){var r=xW(t);r&&r!==$k&&W4(e,r,n)}var i=bW(t);Fk&&(i=i.concat(Fk(t)));for(var o=Ik(e),s=Ik(t),a=0;at(i(...o)))}return n}function iw(e){return function(n){const r=e(n);function i(){return r}return i.dependsOnOwnProps=!1,i}}function zk(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function Y4(e,t){return function(r,{displayName:i}){const o=function(a,l){return o.dependsOnOwnProps?o.mapToProps(a,l):o.mapToProps(a,void 0)};return o.dependsOnOwnProps=!0,o.mapToProps=function(a,l){o.mapToProps=e,o.dependsOnOwnProps=zk(e);let c=o(a,l);return typeof c=="function"&&(o.mapToProps=c,o.dependsOnOwnProps=zk(c),c=o(a,l)),c},o}}function US(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function RW(e){return e&&typeof e=="object"?iw(t=>MW(e,t)):e?typeof e=="function"?Y4(e):US(e,"mapDispatchToProps"):iw(t=>({dispatch:t}))}function NW(e){return e?typeof e=="function"?Y4(e):US(e,"mapStateToProps"):iw(()=>({}))}function LW(e,t,n){return fc({},n,e,t)}function DW(e){return function(n,{displayName:r,areMergedPropsEqual:i}){let o=!1,s;return function(l,c,f){const h=e(l,c,f);return o?i(h,s)||(s=h):(o=!0,s=h),s}}}function AW(e){return e?typeof e=="function"?DW(e):US(e,"mergeProps"):()=>LW}function jW(){const e=lW();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const Uk={notify(){},get:()=>[]};function q4(e,t){let n,r=Uk;function i(h){return l(),r.subscribe(h)}function o(){r.notify()}function s(){f.onStateChange&&f.onStateChange()}function a(){return!!n}function l(){n||(n=t?t.addNestedSub(s):e.subscribe(s),r=jW())}function c(){n&&(n(),n=void 0,r.clear(),r=Uk)}const f={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:s,isSubscribed:a,trySubscribe:l,tryUnsubscribe:c,getListeners:()=>r};return f}const IW=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Fg=IW?V.useLayoutEffect:V.useEffect;function Vk(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function H0(e,t){if(Vk(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i=0;i{G4=e},BW=[null,null];function zW(e,t,n){Fg(()=>e(...t),n)}function UW(e,t,n,r,i,o){e.current=r,n.current=!1,i.current&&(i.current=null,o())}function VW(e,t,n,r,i,o,s,a,l,c,f){if(!e)return()=>{};let h=!1,p=null;const m=()=>{if(h||!a.current)return;const y=t.getState();let x,_;try{x=r(y,i.current)}catch(w){_=w,p=w}_||(p=null),x===o.current?s.current||c():(o.current=x,l.current=x,s.current=!0,f())};return n.onStateChange=m,n.trySubscribe(),m(),()=>{if(h=!0,n.tryUnsubscribe(),n.onStateChange=null,p)throw p}}function HW(e,t){return e===t}function WW(e,t,n,{pure:r,areStatesEqual:i=HW,areOwnPropsEqual:o=H0,areStatePropsEqual:s=H0,areMergedPropsEqual:a=H0,forwardRef:l=!1,context:c=U4}={}){const f=c,h=NW(e),p=RW(t),m=AW(n),v=!!e;return x=>{const _=x.displayName||x.name||"Component",w=`Connect(${_})`,S={shouldHandleStateChanges:v,displayName:w,wrappedComponentName:_,WrappedComponent:x,initMapStateToProps:h,initMapDispatchToProps:p,initMergeProps:m,areStatesEqual:i,areStatePropsEqual:s,areOwnPropsEqual:o,areMergedPropsEqual:a};function T(N){const[D,z,A]=V.useMemo(()=>{const{reactReduxForwardedRef:K}=N,ae=DS(N,FW);return[N.context,K,ae]},[N]),W=V.useMemo(()=>D&&D.Consumer&&rw.isContextConsumer(U.createElement(D.Consumer,null))?D:f,[D,f]),Y=V.useContext(W),J=!!N.store&&!!N.store.getState&&!!N.store.dispatch,Z=!!Y&&!!Y.store,ee=J?N.store:Y.store,ie=Z?Y.getServerState:ee.getState,oe=V.useMemo(()=>kW(ee.dispatch,S),[ee]),[G,F]=V.useMemo(()=>{if(!v)return BW;const K=q4(ee,J?void 0:Y.subscription),ae=K.notifyNestedSubs.bind(K);return[K,ae]},[ee,J,Y]),j=V.useMemo(()=>J?Y:fc({},Y,{subscription:G}),[J,Y,G]),B=V.useRef(),ne=V.useRef(A),H=V.useRef(),q=V.useRef(!1);V.useRef(!1);const te=V.useRef(!1),se=V.useRef();Fg(()=>(te.current=!0,()=>{te.current=!1}),[]);const pe=V.useMemo(()=>()=>H.current&&A===ne.current?H.current:oe(ee.getState(),A),[ee,A]),O=V.useMemo(()=>ae=>G?VW(v,ee,G,oe,ne,B,q,te,H,F,ae):()=>{},[G]);zW(UW,[ne,B,q,A,H,F]);let R;try{R=G4(O,pe,ie?()=>oe(ie(),A):pe)}catch(K){throw se.current&&(K.message+=` The error may be correlated with this previous error: ${se.current.stack} `),K}Fg(()=>{se.current=void 0,H.current=void 0,B.current=R});const I=V.useMemo(()=>U.createElement(x,fc({},R,{ref:z})),[z,x,R]);return V.useMemo(()=>v?U.createElement(W.Provider,{value:j},I):I,[W,I,j])}const k=U.memo(T);if(k.WrappedComponent=x,k.displayName=T.displayName=w,l){const D=U.forwardRef(function(A,W){return U.createElement(k,fc({},A,{reactReduxForwardedRef:W}))});return D.displayName=w,D.WrappedComponent=x,Bk(D,x)}return Bk(k,x)}}function YW({store:e,context:t,children:n,serverState:r}){const i=V.useMemo(()=>{const a=q4(e);return{store:e,subscription:a,getServerState:r?()=>r:void 0}},[e,r]),o=V.useMemo(()=>e.getState(),[e]);Fg(()=>{const{subscription:a}=i;return a.onStateChange=a.notifyNestedSubs,a.trySubscribe(),o!==e.getState()&&a.notifyNestedSubs(),()=>{a.tryUnsubscribe(),a.onStateChange=void 0}},[i,o]);const s=t||U4;return U.createElement(s.Provider,{value:i},n)}$W(Ig.useSyncExternalStore);aW(Ya.unstable_batchedUpdates);/** * @remix-run/router v1.2.1 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function $g(){return $g=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function GW(){return Math.random().toString(36).substr(2,8)}function Wk(e){return{usr:e.state,key:e.key}}function ow(e,t,n,r){return n===void 0&&(n=null),$g({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Gc(t):t,{state:n,key:t&&t.key||r||GW()})}function sd(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Gc(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function ZW(e){let t=typeof window<"u"&&typeof window.location<"u"&&window.location.origin!=="null"?window.location.origin:window.location.href,n=typeof e=="string"?e:sd(e);return dn(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}function KW(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a=hs.Pop,l=null;function c(){a=hs.Pop,l&&l({action:a,location:p.location})}function f(m,v){a=hs.Push;let y=ow(p.location,m,v);n&&n(y,m);let x=Wk(y),_=p.createHref(y);try{s.pushState(x,"",_)}catch{i.location.assign(_)}o&&l&&l({action:a,location:p.location})}function h(m,v){a=hs.Replace;let y=ow(p.location,m,v);n&&n(y,m);let x=Wk(y),_=p.createHref(y);s.replaceState(x,"",_),o&&l&&l({action:a,location:p.location})}let p={get action(){return a},get location(){return e(i,s)},listen(m){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(Hk,c),l=m,()=>{i.removeEventListener(Hk,c),l=null}},createHref(m){return t(i,m)},encodeLocation(m){let v=ZW(typeof m=="string"?m:sd(m));return{pathname:v.pathname,search:v.search,hash:v.hash}},push:f,replace:h,go(m){return s.go(m)}};return p}var Yk;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Yk||(Yk={}));function XW(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?Gc(t):t,i=X4(r.pathname||"/",n);if(i==null)return null;let o=Z4(e);QW(o);let s=null;for(let a=0;s==null&&a{let l={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};l.relativePath.startsWith("/")&&(dn(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=Os([r,l.relativePath]),f=n.concat(l);o.children&&o.children.length>0&&(dn(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),Z4(o.children,t,f,c)),!(o.path==null&&!o.index)&&t.push({path:c,score:oY(c,o.index),routesMeta:f})};return e.forEach((o,s)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))i(o,s);else for(let l of K4(o.path))i(o,s,l)}),t}function K4(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let s=K4(r.join("/")),a=[];return a.push(...s.map(l=>l===""?o:[o,l].join("/"))),i&&a.push(...s),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function QW(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:sY(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const JW=/^:\w+$/,eY=3,tY=2,nY=1,rY=10,iY=-2,qk=e=>e==="*";function oY(e,t){let n=e.split("/"),r=n.length;return n.some(qk)&&(r+=iY),t&&(r+=tY),n.filter(i=>!qk(i)).reduce((i,o)=>i+(JW.test(o)?eY:o===""?nY:rY),r)}function sY(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function aY(e,t){let{routesMeta:n}=e,r={},i="/",o=[];for(let s=0;s{if(f==="*"){let p=a[h]||"";s=o.slice(0,o.length-p.length).replace(/(.)\/+$/,"$1")}return c[f]=fY(a[h]||"",f),c},{}),pathname:o,pathnameBase:s,pattern:e}}function cY(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),VS(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(s,a)=>(r.push(a),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function uY(e){try{return decodeURI(e)}catch(t){return VS(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function fY(e,t){try{return decodeURIComponent(e)}catch(n){return VS(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function X4(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function VS(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function dY(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Gc(e):e;return{pathname:n?n.startsWith("/")?n:hY(n,t):t,search:mY(r),hash:gY(i)}}function hY(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function W0(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Q4(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function J4(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Gc(e):(i=$g({},e),dn(!i.pathname||!i.pathname.includes("?"),W0("?","pathname","search",i)),dn(!i.pathname||!i.pathname.includes("#"),W0("#","pathname","hash",i)),dn(!i.search||!i.search.includes("#"),W0("#","search","hash",i)));let o=e===""||i.pathname==="",s=o?"/":i.pathname,a;if(r||s==null)a=n;else{let h=t.length-1;if(s.startsWith("..")){let p=s.split("/");for(;p[0]==="..";)p.shift(),h-=1;i.pathname=p.join("/")}a=h>=0?t[h]:"/"}let l=dY(i,a),c=s&&s!=="/"&&s.endsWith("/"),f=(o||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||f)&&(l.pathname+="/"),l}const Os=e=>e.join("/").replace(/\/\/+/g,"/"),pY=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),mY=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,gY=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class vY{constructor(t,n,r,i){i===void 0&&(i=!1),this.status=t,this.statusText=n||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function yY(e){return e instanceof vY}/** * React Router v6.6.1 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function sw(){return sw=Object.assign?Object.assign.bind():function(e){for(var t=1;t{i.value=r,i.getSnapshot=t,Y0(i)&&o({inst:i})},[e,r,t]),xY(()=>(Y0(i)&&o({inst:i}),e(()=>{Y0(i)&&o({inst:i})})),[e]),CY(r),r}function Y0(e){const t=e.getSnapshot,n=e.value;try{const r=t();return!bY(n,r)}catch{return!0}}function TY(e,t,n){return t()}const OY=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",PY=!OY,kY=PY?TY:EY;"useSyncExternalStore"in G1&&(e=>e.useSyncExternalStore)(G1);const MY=V.createContext(null),RY=V.createContext(null),Zy=V.createContext(null),$d=V.createContext(null),Ky=V.createContext(null),fl=V.createContext({outlet:null,matches:[]}),ej=V.createContext(null);function NY(e,t){let{relative:n}=t===void 0?{}:t;Zc()||dn(!1);let{basename:r,navigator:i}=V.useContext($d),{hash:o,pathname:s,search:a}=HS(e,{relative:n}),l=s;return r!=="/"&&(l=s==="/"?r:Os([r,s])),i.createHref({pathname:l,search:a,hash:o})}function Zc(){return V.useContext(Ky)!=null}function Pn(){return Zc()||dn(!1),V.useContext(Ky).location}function Io(){Zc()||dn(!1);let{basename:e,navigator:t}=V.useContext($d),{matches:n}=V.useContext(fl),{pathname:r}=Pn(),i=JSON.stringify(Q4(n).map(a=>a.pathnameBase)),o=V.useRef(!1);return V.useEffect(()=>{o.current=!0}),V.useCallback(function(a,l){if(l===void 0&&(l={}),!o.current)return;if(typeof a=="number"){t.go(a);return}let c=J4(a,JSON.parse(i),r,l.relative==="path");e!=="/"&&(c.pathname=c.pathname==="/"?e:Os([e,c.pathname])),(l.replace?t.replace:t.push)(c,l.state,l)},[e,t,i,r])}function Ks(){let{matches:e}=V.useContext(fl),t=e[e.length-1];return t?t.params:{}}function HS(e,t){let{relative:n}=t===void 0?{}:t,{matches:r}=V.useContext(fl),{pathname:i}=Pn(),o=JSON.stringify(Q4(r).map(s=>s.pathnameBase));return V.useMemo(()=>J4(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function LY(e,t){Zc()||dn(!1);let{navigator:n}=V.useContext($d),r=V.useContext(Zy),{matches:i}=V.useContext(fl),o=i[i.length-1],s=o?o.params:{};o&&o.pathname;let a=o?o.pathnameBase:"/";o&&o.route;let l=Pn(),c;if(t){var f;let y=typeof t=="string"?Gc(t):t;a==="/"||(f=y.pathname)!=null&&f.startsWith(a)||dn(!1),c=y}else c=l;let h=c.pathname||"/",p=a==="/"?h:h.slice(a.length)||"/",m=XW(e,{pathname:p}),v=IY(m&&m.map(y=>Object.assign({},y,{params:Object.assign({},s,y.params),pathname:Os([a,n.encodeLocation?n.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?a:Os([a,n.encodeLocation?n.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),i,r||void 0);return t&&v?V.createElement(Ky.Provider,{value:{location:sw({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:hs.Pop}},v):v}function DY(){let e=zY(),t=yY(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},o={padding:"2px 4px",backgroundColor:r};return V.createElement(V.Fragment,null,V.createElement("h2",null,"Unhandled Thrown Error!"),V.createElement("h3",{style:{fontStyle:"italic"}},t),n?V.createElement("pre",{style:i},n):null,V.createElement("p",null,"💿 Hey developer 👋"),V.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",V.createElement("code",{style:o},"errorElement")," props on ",V.createElement("code",{style:o},"")))}class AY extends V.Component{constructor(t){super(t),this.state={location:t.location,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location?{error:t.error,location:t.location}:{error:t.error||n.error,location:n.location}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?V.createElement(fl.Provider,{value:this.props.routeContext},V.createElement(ej.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function jY(e){let{routeContext:t,match:n,children:r}=e,i=V.useContext(MY);return i&&n.route.errorElement&&(i._deepestRenderedBoundaryId=n.route.id),V.createElement(fl.Provider,{value:t},r)}function IY(e,t,n){if(t===void 0&&(t=[]),e==null)if(n!=null&&n.errors)e=n.matches;else return null;let r=e,i=n==null?void 0:n.errors;if(i!=null){let o=r.findIndex(s=>s.route.id&&(i==null?void 0:i[s.route.id]));o>=0||dn(!1),r=r.slice(0,Math.min(r.length,o+1))}return r.reduceRight((o,s,a)=>{let l=s.route.id?i==null?void 0:i[s.route.id]:null,c=n?s.route.errorElement||V.createElement(DY,null):null,f=t.concat(r.slice(0,a+1)),h=()=>V.createElement(jY,{match:s,routeContext:{outlet:o,matches:f}},l?c:s.route.element!==void 0?s.route.element:o);return n&&(s.route.errorElement||a===0)?V.createElement(AY,{location:n.location,component:c,error:l,children:h(),routeContext:{outlet:null,matches:f}}):h()},null)}var Gk;(function(e){e.UseRevalidator="useRevalidator"})(Gk||(Gk={}));var Bg;(function(e){e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"})(Bg||(Bg={}));function FY(e){let t=V.useContext(Zy);return t||dn(!1),t}function $Y(e){let t=V.useContext(fl);return t||dn(!1),t}function BY(e){let t=$Y(),n=t.matches[t.matches.length-1];return n.route.id||dn(!1),n.route.id}function zY(){var e;let t=V.useContext(ej),n=FY(Bg.UseRouteError),r=BY(Bg.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function WS(e){let{to:t,replace:n,state:r,relative:i}=e;Zc()||dn(!1);let o=V.useContext(Zy),s=Io();return V.useEffect(()=>{o&&o.navigation.state!=="idle"||s(t,{replace:n,state:r,relative:i})}),null}function gt(e){dn(!1)}function UY(e){let{basename:t="/",children:n=null,location:r,navigationType:i=hs.Pop,navigator:o,static:s=!1}=e;Zc()&&dn(!1);let a=t.replace(/^\/*/,"/"),l=V.useMemo(()=>({basename:a,navigator:o,static:s}),[a,o,s]);typeof r=="string"&&(r=Gc(r));let{pathname:c="/",search:f="",hash:h="",state:p=null,key:m="default"}=r,v=V.useMemo(()=>{let y=X4(c,a);return y==null?null:{pathname:y,search:f,hash:h,state:p,key:m}},[a,c,f,h,p,m]);return v==null?null:V.createElement($d.Provider,{value:l},V.createElement(Ky.Provider,{children:n,value:{location:v,navigationType:i}}))}function Xy(e){let{children:t,location:n}=e,r=V.useContext(RY),i=r&&!t?r.router.routes:aw(t);return LY(i,n)}var Zk;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(Zk||(Zk={}));new Promise(()=>{});function aw(e,t){t===void 0&&(t=[]);let n=[];return V.Children.forEach(e,(r,i)=>{if(!V.isValidElement(r))return;if(r.type===V.Fragment){n.push.apply(n,aw(r.props.children,t));return}r.type!==gt&&dn(!1),!r.props.index||!r.props.children||dn(!1);let o=[...t,i],s={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,hasErrorBoundary:r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle};r.props.children&&(s.children=aw(r.props.children,o)),n.push(s)}),n}/** * React Router DOM v6.6.1 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function zg(){return zg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function VY(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function HY(e,t){return e.button===0&&(!t||t==="_self")&&!VY(e)}const WY=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],YY=["aria-current","caseSensitive","className","end","style","to","children"];function qY(e){let{basename:t,children:n,window:r}=e,i=V.useRef();i.current==null&&(i.current=qW({window:r,v5Compat:!0}));let o=i.current,[s,a]=V.useState({action:o.action,location:o.location});return V.useLayoutEffect(()=>o.listen(a),[o]),V.createElement(UY,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:o})}const Lt=V.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:s,state:a,target:l,to:c,preventScrollReset:f}=t,h=tj(t,WY),p=NY(c,{relative:i}),m=GY(c,{replace:s,state:a,target:l,preventScrollReset:f,relative:i});function v(y){r&&r(y),y.defaultPrevented||m(y)}return V.createElement("a",zg({},h,{href:p,onClick:o?r:v,ref:n,target:l}))}),nj=V.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:o="",end:s=!1,style:a,to:l,children:c}=t,f=tj(t,YY),h=HS(l,{relative:f.relative}),p=Pn(),m=V.useContext(Zy),{navigator:v}=V.useContext($d),y=v.encodeLocation?v.encodeLocation(h).pathname:h.pathname,x=p.pathname,_=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;i||(x=x.toLowerCase(),_=_?_.toLowerCase():null,y=y.toLowerCase());let w=x===y||!s&&x.startsWith(y)&&x.charAt(y.length)==="/",S=_!=null&&(_===y||!s&&_.startsWith(y)&&_.charAt(y.length)==="/"),T=w?r:void 0,P;typeof o=="function"?P=o({isActive:w,isPending:S}):P=[o,w?"active":null,S?"pending":null].filter(Boolean).join(" ");let k=typeof a=="function"?a({isActive:w,isPending:S}):a;return V.createElement(Lt,zg({},f,{"aria-current":T,className:P,ref:n,style:k,to:l}),typeof c=="function"?c({isActive:w,isPending:S}):c)});var Kk;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(Kk||(Kk={}));var Xk;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Xk||(Xk={}));function GY(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:s}=t===void 0?{}:t,a=Io(),l=Pn(),c=HS(e,{relative:s});return V.useCallback(f=>{if(HY(f,n)){f.preventDefault();let h=r!==void 0?r:sd(l)===sd(c);a(e,{replace:h,state:i,preventScrollReset:o,relative:s})}},[l,a,c,r,i,n,e,o,s])}const ZY="shlink-web-client",KY="A React-based progressive web application for shlink",XY="/shlink-web-client/feature/short-url-export",QY="https://github.com/shlinkio/shlink-web-client",JY="MIT",eq={lint:"npm run lint:css && npm run lint:js","lint:css":"stylelint src/*.scss src/**/*.scss","lint:js":"eslint --ext .js,.ts,.tsx src test","lint:fix":"npm run lint:css:fix && npm run lint:js:fix","lint:css:fix":"npm run lint:css -- --fix","lint:js:fix":"npm run lint:js -- --fix",types:"tsc",start:"vite serve --host=0.0.0.0",preview:"vite preview --host=0.0.0.0",build:"npm run types && vite build && node scripts/replace-version.mjs","build:dist":"npm run build && node scripts/create-dist-file.mjs",test:"jest --env=jsdom --colors","test:coverage":"npm run test -- --coverage --coverageReporters=text --coverageReporters=text-summary","test:ci":"npm run test:coverage -- --coverageReporters=clover --ci","test:pretty":"npm run test:coverage -- --coverageReporters=html","test:verbose":"npm run test -- --verbose"},tq={"@babel/preset-env":"^7.20.2","@babel/preset-react":"^7.18.6","@babel/preset-typescript":"^7.21.0","@fortawesome/fontawesome-free":"^6.3.0","@fortawesome/fontawesome-svg-core":"^6.3.0","@fortawesome/free-brands-svg-icons":"^6.3.0","@fortawesome/free-regular-svg-icons":"^6.3.0","@fortawesome/free-solid-svg-icons":"^6.3.0","@fortawesome/react-fontawesome":"^0.2.0","@json2csv/plainjs":"^6.1.2","@reduxjs/toolkit":"^1.9.1",bootstrap:"^5.2.3",bottlejs:"^2.0.1",bowser:"^2.11.0","chart.js":"^4.1.1",classnames:"^2.3.2","compare-versions":"^5.0.3",csvtojson:"^2.0.10","date-fns":"^2.29.3","event-source-polyfill":"^1.0.31",history:"^5.3.0",leaflet:"^1.9.3",qs:"^6.11.0",ramda:"^0.27.2",react:"^18.2.0","react-chartjs-2":"^5.1.0","react-colorful":"^5.6.1","react-copy-to-clipboard":"^5.1.0","react-datepicker":"^4.8.0","react-dom":"^18.2.0","react-external-link":"^2.2.0","react-leaflet":"^4.2.0","react-redux":"^8.0.5","react-router-dom":"^6.6.1","react-swipeable":"^7.0.0","react-tag-autocomplete":"^6.3.0",reactstrap:"^9.1.5",redux:"^4.2.0","redux-localstorage-simple":"^2.5.1","redux-thunk":"^2.4.2",uuid:"^8.3.2","workbox-core":"^6.5.4","workbox-expiration":"^6.5.4","workbox-precaching":"^6.5.4","workbox-routing":"^6.5.4","workbox-strategies":"^6.5.4"},nq={"@shlinkio/eslint-config-js-coding-standard":"~2.1.0","@shlinkio/stylelint-config-css-coding-standard":"~1.0.1","@testing-library/jest-dom":"^5.16.5","@testing-library/react":"^13.4.0","@testing-library/user-event":"^14.4.3","@total-typescript/shoehorn":"^0.1.0","@types/jest":"^29.2.4","@types/json2csv":"^5.0.3","@types/leaflet":"^1.9.0","@types/qs":"^6.9.7","@types/ramda":"^0.28.15","@types/react":"^18.0.26","@types/react-color":"^3.0.6","@types/react-copy-to-clipboard":"^5.0.4","@types/react-datepicker":"^4.8.0","@types/react-dom":"^18.0.10","@types/react-tag-autocomplete":"^6.3.0","@types/uuid":"^8.3.4","@vitejs/plugin-react":"^4.0.0","adm-zip":"^0.5.10","babel-jest":"^29.5.0",chalk:"^5.2.0",eslint:"^8.30.0","identity-obj-proxy":"^3.0.0",jest:"^29.3.1","jest-canvas-mock":"^2.4.0","jest-environment-jsdom":"^29.3.1","resize-observer-polyfill":"^1.5.1",sass:"^1.57.1",stylelint:"^14.16.0",typescript:"^5.0.2",vite:"^4.3.1","vite-plugin-pwa":"^0.14.4"},rq=[">0.2%","not dead","not ie <= 11","not op_mini all"],Ug={name:ZY,description:KY,private:!1,homepage:XY,repository:QY,license:JY,scripts:eq,dependencies:tq,devDependencies:nq,browserslist:rq};var Oi,Qi=".",rj="function",ij="string",oj="__global__",YS="Provider",iq=0,qS=Array.prototype.slice,oq=function(t,n){var r=t[n];if(r===void 0&&Oi.config.strict)throw new Error("Bottle was unable to resolve a service. `"+n+"` is undefined.");return r},Qy=function(t){var n;return this.nested[t]||(n=Oi.pop(),this.nested[t]=n,this.factory(t,function(){return n.container})),this.nested[t]},sj=function(t){return t.split(Qi).reduce(oq,this)},sq=function(t,n,r,i){var o={configurable:!0,enumerable:!0};return t.length?o.get=function(){var a=0,l=function(f){if(f)throw f;t[a]&&t[a++](r,l)};return l(),r}:(o.value=r,o.writable=!0),Object.defineProperty(i,n,o),i[n]},aq=function(t,n){var r,i;return typeof t===rj&&(n=t,t=oj),r=t.split(Qi),i=r.shift(),r.length?Qy.call(this,i).middleware(r.join(Qi),n):(this.middlewares[i]||(this.middlewares[i]=[]),this.middlewares[i].push(n)),this},lq=function(t,n){return n(t)},Qk=function(t,n){return(t[n]||[]).concat(t.__global__||[])},cq=function(t,n){var r,i,o,s,a;return this.id,o=this.container,s=this.decorators,a=this.middlewares,r=t+YS,i=Object.create(null),i[r]={configurable:!0,enumerable:!0,get:function(){var c=new n;return delete o[r],o[r]=c,c}},i[t]={configurable:!0,enumerable:!0,get:function(){var c=o[r],f;return c&&(f=Qk(s,t).reduce(lq,c.$get(o)),delete o[r],delete o[t]),f===void 0?f:sq(Qk(a,t),t,f,o)}},Object.defineProperties(o,i),this},aj=function(t,n){var r,i;return r=t.split(Qi),this.providerMap[t]&&r.length===1&&!this.container[t+YS]?console.error(t+" provider already instantiated."):(this.originalProviders[t]=n,this.providerMap[t]=!0,i=r.shift(),r.length?(Qy.call(this,i).provider(r.join(Qi),n),this):cq.call(this,i,n))},GS=function(t,n){return aj.call(this,t,function(){this.$get=n})},lj=function(t,n,r){var i=arguments.length>3?qS.call(arguments,3):[],o=this;return GS.call(this,t,function(){var a=n,l=i.map(sj,o.container);return r?new(n.bind.apply(n,[null].concat(l))):a.apply(null,l)})},uq=function(t,n){return lj.apply(this,[t,n,!0].concat(qS.call(arguments,2)))},fq=function(t,n){return lj.apply(this,[t,n,!1].concat(qS.call(arguments,2)))},cj=function(t,n){Object.defineProperty(this,t,{configurable:!0,enumerable:!0,value:n,writable:!0})},uj=function(t,n){var r=t[n];return r||(r={},cj.call(t,n,r)),r},dq=function(t,n){var r;return r=t.split(Qi),t=r.pop(),cj.call(r.reduce(uj,this.container),t,n),this},hq=function(t,n){Object.defineProperty(this,t,{configurable:!1,enumerable:!0,value:n,writable:!1})},pq=function(t,n){var r=t.split(Qi);return t=r.pop(),hq.call(r.reduce(uj,this.container),t,n),this},fj=function(t,n){var r,i;return typeof t===rj&&(n=t,t=oj),r=t.split(Qi),i=r.shift(),r.length?Qy.call(this,i).decorator(r.join(Qi),n):(this.decorators[i]||(this.decorators[i]=[]),this.decorators[i].push(n)),this},mq=function(t){return this.deferred.push(t),this},gq=function(t){return(t||[]).map(sj,this.container)},vq=function(t,n){return GS.call(this,t,function(i){return{instance:n.bind(n,i)}})},yq=function(t){return!/^\$(?:decorator|register|list)$|Provider$/.test(t)},ZS=function(t){return Object.keys(t||this.container||{}).filter(yq)},Vg={},_q=function(t){var n;return typeof t===ij?(n=Vg[t],n||(Vg[t]=n=new Oi,n.constant("BOTTLE_NAME",t)),n):new Oi},bq=function(t){typeof t===ij?delete Vg[t]:Vg={}},dj=function(t){var n=t.$value===void 0?t:t.$value;return this[t.$type||"service"].apply(this,[t.$name,n].concat(t.$inject||[]))},Jk=function(t){delete this.providerMap[t],delete this.container[t],delete this.container[t+YS]},wq=function(t){var n=this.originalProviders,r=Array.isArray(t);Object.keys(this.originalProviders).forEach(function(o){if(!(r&&t.indexOf(o)===-1)){var s=o.split(Qi);s.length>1&&s.forEach(Jk,Qy.call(this,s[0])),Jk.call(this,o),this.provider(o,n[o])}},this)},xq=function(t){return this.deferred.forEach(function(r){r(t)}),this};Oi=function e(t){if(!(this instanceof e))return e.pop(t);this.id=iq++,this.decorators={},this.middlewares={},this.nested={},this.providerMap={},this.originalProviders={},this.deferred=[],this.container={$decorator:fj.bind(this),$register:dj.bind(this),$list:ZS.bind(this)}};Oi.prototype={constant:pq,decorator:fj,defer:mq,digest:gq,factory:GS,instanceFactory:vq,list:ZS,middleware:aq,provider:aj,resetProviders:wq,register:dj,resolve:xq,service:uq,serviceFactory:fq,value:dq};Oi.pop=_q;Oi.clear=bq;Oi.list=ZS;Oi.config={strict:!1};const Sq=Oi;var Cq=function(){return!0};const hj=Cq;function Ot(e){return e!=null&&typeof e=="object"&&e["@@functional/placeholder"]===!0}function yt(e){return function t(n){return arguments.length===0||Ot(n)?t:e.apply(this,arguments)}}function lt(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return Ot(n)?t:yt(function(i){return e(n,i)});default:return Ot(n)&&Ot(r)?t:Ot(n)?yt(function(i){return e(i,r)}):Ot(r)?yt(function(i){return e(n,i)}):e(n,r)}}}function Eq(e,t){e=e||[],t=t||[];var n,r=e.length,i=t.length,o=[];for(n=0;n=arguments.length)?a=t[s]:(a=arguments[i],i+=1),r[s]=a,Ot(a)||(o-=1),s+=1}return o<=0?n.apply(this,r):Kc(o,Jy(e,r,n))}}var Tq=lt(function(t,n){return t===1?yt(n):Kc(t,Jy(t,[],n))});const Hg=Tq;function Xs(e){return function t(n,r,i){switch(arguments.length){case 0:return t;case 1:return Ot(n)?t:lt(function(o,s){return e(n,o,s)});case 2:return Ot(n)&&Ot(r)?t:Ot(n)?lt(function(o,s){return e(o,r,s)}):Ot(r)?lt(function(o,s){return e(n,o,s)}):yt(function(o){return e(n,r,o)});default:return Ot(n)&&Ot(r)&&Ot(i)?t:Ot(n)&&Ot(r)?lt(function(o,s){return e(o,s,i)}):Ot(n)&&Ot(i)?lt(function(o,s){return e(o,r,s)}):Ot(r)&&Ot(i)?lt(function(o,s){return e(n,o,s)}):Ot(n)?yt(function(o){return e(o,r,i)}):Ot(r)?yt(function(o){return e(n,o,i)}):Ot(i)?yt(function(o){return e(n,r,o)}):e(n,r,i)}}}const Bd=Array.isArray||function(t){return t!=null&&t.length>=0&&Object.prototype.toString.call(t)==="[object Array]"};function Oq(e){return e!=null&&typeof e["@@transducer/step"]=="function"}function KS(e,t,n){return function(){if(arguments.length===0)return n();var r=Array.prototype.slice.call(arguments,0),i=r.pop();if(!Bd(i)){for(var o=0;ot?n:t});const pj=Pq;function am(e,t){for(var n=0,r=t.length,i=Array(r);n0?t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1):!1});const mj=kq;var Mq=function(){function e(t){this.f=t}return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(t){return t},e.prototype["@@transducer/step"]=function(t,n){return this.f(t,n)},e}();function Rq(e){return new Mq(e)}var Nq=lt(function(t,n){return Kc(t.length,function(){return t.apply(n,arguments)})});const Lq=Nq;function Dq(e,t,n){for(var r=0,i=n.length;r=0;)n=iM[r],Mr(n,t)&&!Bq(i,n)&&(i[i.length]=n),r-=1;return i});const Ji=zq;var Uq=lt(KS(["fantasy-land/map","map"],Iq,function(t,n){switch(Object.prototype.toString.call(n)){case"[object Function]":return Hg(n.length,function(){return t.call(this,n.apply(this,arguments))});case"[object Object]":return Xc(function(r,i){return r[i]=t(n[i]),r},{},Ji(n));default:return am(t,n)}}));const zd=Uq,lw=Number.isInteger||function(t){return t<<0===t};var Vq=lt(function(t,n){var r=t<0?n.length+t:t;return e_(n)?n.charAt(r):n[r]});const vj=Vq;var Hq=lt(function(t,n){return t.map(function(r){for(var i=n,o=0,s;o1){var o=!Fo(r)&&Mr(i,r)?r[i]:lw(t[1])?[]:{};n=e(Array.prototype.slice.call(t,1),n,o)}if(lw(i)&&Bd(r)){var s=[].concat(r);return s[i]=n,s}else return ld(i,n,r)});const Pl=nG;function rG(e){var t=Object.prototype.toString.call(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object AsyncGeneratorFunction]"}var iG=lt(function(t,n){var r=Hg(t,n);return Hg(t,function(){return Xc(Qq,zd(r,arguments[0]),Array.prototype.slice.call(arguments,1))})});const oG=iG;var sG=yt(function(t){return oG(t.length,t)});const aG=sG;function lG(e){return function t(n){for(var r,i,o,s=[],a=0,l=n.length;a=0;){if(n[o]===e)return r[o]===t;o-=1}switch(i){case"Map":return e.size!==t.size?!1:lM(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size!==t.size?!1:lM(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var s=Ji(e);if(s.length!==Ji(t).length)return!1;var a=n.concat([e]),l=r.concat([t]);for(o=s.length-1;o>=0;){var c=s[o];if(!(Mr(c,t)&&eC(t[c],e[c],a,l)))return!1;o-=1}return!0}var CG=lt(function(t,n){return eC(t,n,[],[])});const tC=CG;function EG(e,t,n){var r,i;if(typeof e.indexOf=="function")switch(typeof t){case"number":if(t===0){for(r=1/t;n=0}function Z0(e){var t=e.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0");return'"'+t.replace(/"/g,'\\"')+'"'}var Du=function(t){return(t<10?"0":"")+t},OG=typeof Date.prototype.toISOString=="function"?function(t){return t.toISOString()}:function(t){return t.getUTCFullYear()+"-"+Du(t.getUTCMonth()+1)+"-"+Du(t.getUTCDate())+"T"+Du(t.getUTCHours())+":"+Du(t.getUTCMinutes())+":"+Du(t.getUTCSeconds())+"."+(t.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};const PG=OG;function kG(e){return function(){return!e.apply(this,arguments)}}function MG(e,t){for(var n=0,r=t.length,i=[];n":wj(s,a)},r=function(o,s){return am(function(a){return Z0(a)+": "+n(o[a])},s.slice().sort())};switch(Object.prototype.toString.call(e)){case"[object Arguments]":return"(function() { return arguments; }("+am(n,e).join(", ")+"))";case"[object Array]":return"["+am(n,e).concat(r(e,Ud(function(o){return/^\d+$/.test(o)},Ji(e)))).join(", ")+"]";case"[object Boolean]":return typeof e=="object"?"new Boolean("+n(e.valueOf())+")":e.toString();case"[object Date]":return"new Date("+(isNaN(e.valueOf())?n(NaN):Z0(PG(e)))+")";case"[object Null]":return"null";case"[object Number]":return typeof e=="object"?"new Number("+n(e.valueOf())+")":1/e===-1/0?"-0":e.toString(10);case"[object String]":return typeof e=="object"?"new String("+n(e.valueOf())+")":Z0(e);case"[object Undefined]":return"undefined";default:if(typeof e.toString=="function"){var i=e.toString();if(i!=="[object Object]")return i}return"{"+r(e,Ji(e)).join(", ")+"}"}}var jG=yt(function(t){return wj(t,[])});const IG=jG;var FG=yt(function(t){var n=XS(pj,0,zd(function(r){return r[0].length},t));return Kc(n,function(){for(var r=0;rs?1:0})});const bZ=_Z;var wZ=lt(function(t,n){if(t<=0)throw new Error("First argument to splitEvery must be a positive integer");for(var r=[],i=0;i!!(e!=null&&e.url)&&!!(e!=null&&e.apiKey),Ps=e=>!!(e!=null&&e.id),t_=e=>!!(e!=null&&e.version),MZ=e=>!!(e!=null&&e.serverNotFound),Vd=e=>Ps(e)?e.id:"",RZ=e=>dZ(["id","autoConnect"],e),n_=(e,t,n)=>e!==t?"ASC":n?{ASC:"DESC",DESC:void 0}[n]:"ASC",kj=(e,{field:t,dir:n})=>!t||!n?e:e.sort((r,i)=>{const o=n==="ASC"?1:-1,s=n==="ASC"?-1:1;return r[t]>i[t]?o:s}),Mj=e=>e.dir?`${e.field}-${e.dir}`:void 0,NZ=e=>{const[t,n]=e.split("-");return{field:t,dir:n}};var LZ=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var i=42;t[n]=i;for(n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,n);if(s.value!==i||s.enumerable!==!0)return!1}return!0},uM=typeof Symbol<"u"&&Symbol,DZ=LZ,AZ=function(){return typeof uM!="function"||typeof Symbol!="function"||typeof uM("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:DZ()},jZ="Function.prototype.bind called on incompatible ",K0=Array.prototype.slice,IZ=Object.prototype.toString,FZ="[object Function]",$Z=function(t){var n=this;if(typeof n!="function"||IZ.call(n)!==FZ)throw new TypeError(jZ+n);for(var r=K0.call(arguments,1),i,o=function(){if(this instanceof i){var f=n.apply(this,r.concat(K0.call(arguments)));return Object(f)===f?f:this}else return n.apply(t,r.concat(K0.call(arguments)))},s=Math.max(0,n.length-r.length),a=[],l=0;l"u"?st:es(Uint8Array),hc={"%AggregateError%":typeof AggregateError>"u"?st:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?st:ArrayBuffer,"%ArrayIteratorPrototype%":kl?es([][Symbol.iterator]()):st,"%AsyncFromSyncIteratorPrototype%":st,"%AsyncFunction%":$l,"%AsyncGenerator%":$l,"%AsyncGeneratorFunction%":$l,"%AsyncIteratorPrototype%":$l,"%Atomics%":typeof Atomics>"u"?st:Atomics,"%BigInt%":typeof BigInt>"u"?st:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?st:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?st:Float32Array,"%Float64Array%":typeof Float64Array>"u"?st:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?st:FinalizationRegistry,"%Function%":Rj,"%GeneratorFunction%":$l,"%Int8Array%":typeof Int8Array>"u"?st:Int8Array,"%Int16Array%":typeof Int16Array>"u"?st:Int16Array,"%Int32Array%":typeof Int32Array>"u"?st:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":kl?es(es([][Symbol.iterator]())):st,"%JSON%":typeof JSON=="object"?JSON:st,"%Map%":typeof Map>"u"?st:Map,"%MapIteratorPrototype%":typeof Map>"u"||!kl?st:es(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?st:Promise,"%Proxy%":typeof Proxy>"u"?st:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?st:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?st:Set,"%SetIteratorPrototype%":typeof Set>"u"||!kl?st:es(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?st:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":kl?es(""[Symbol.iterator]()):st,"%Symbol%":kl?Symbol:st,"%SyntaxError%":ud,"%ThrowTypeError%":VZ,"%TypedArray%":HZ,"%TypeError%":dc,"%Uint8Array%":typeof Uint8Array>"u"?st:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?st:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?st:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?st:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?st:WeakMap,"%WeakRef%":typeof WeakRef>"u"?st:WeakRef,"%WeakSet%":typeof WeakSet>"u"?st:WeakSet},WZ=function e(t){var n;if(t==="%AsyncFunction%")n=X0("async function () {}");else if(t==="%GeneratorFunction%")n=X0("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=X0("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&(n=es(i.prototype))}return hc[t]=n,n},fM={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},r_=oC,Gg=UZ,YZ=r_.call(Function.call,Array.prototype.concat),qZ=r_.call(Function.apply,Array.prototype.splice),dM=r_.call(Function.call,String.prototype.replace),Zg=r_.call(Function.call,String.prototype.slice),GZ=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ZZ=/\\(\\)?/g,KZ=function(t){var n=Zg(t,0,1),r=Zg(t,-1);if(n==="%"&&r!=="%")throw new ud("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new ud("invalid intrinsic syntax, expected opening `%`");var i=[];return dM(t,GZ,function(o,s,a,l){i[i.length]=a?dM(l,ZZ,"$1"):s||o}),i},XZ=function(t,n){var r=t,i;if(Gg(fM,r)&&(i=fM[r],r="%"+i[0]+"%"),Gg(hc,r)){var o=hc[r];if(o===$l&&(o=WZ(r)),typeof o>"u"&&!n)throw new dc("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:o}}throw new ud("intrinsic "+t+" does not exist!")},sC=function(t,n){if(typeof t!="string"||t.length===0)throw new dc("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new dc('"allowMissing" argument must be a boolean');var r=KZ(t),i=r.length>0?r[0]:"",o=XZ("%"+i+"%",n),s=o.name,a=o.value,l=!1,c=o.alias;c&&(i=c[0],qZ(r,YZ([0,1],c)));for(var f=1,h=!0;f=r.length){var y=Ba(a,p);h=!!y,h&&"get"in y&&!("originalValue"in y.get)?a=y.get:a=a[p]}else h=Gg(a,p),a=a[p];h&&!l&&(hc[s]=a)}}return a},uw={},QZ={get exports(){return uw},set exports(e){uw=e}};(function(e){var t=oC,n=sC,r=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),o=n("%Reflect.apply%",!0)||t.call(i,r),s=n("%Object.getOwnPropertyDescriptor%",!0),a=n("%Object.defineProperty%",!0),l=n("%Math.max%");if(a)try{a({},"a",{value:1})}catch{a=null}e.exports=function(h){var p=o(t,i,arguments);if(s&&a){var m=s(p,"length");m.configurable&&a(p,"length",{value:1+l(0,h.length-(arguments.length-1))})}return p};var c=function(){return o(t,r,arguments)};a?a(e.exports,"apply",{value:c}):e.exports.apply=c})(QZ);var Nj=sC,Lj=uw,JZ=Lj(Nj("String.prototype.indexOf")),eK=function(t,n){var r=Nj(t,!!n);return typeof r=="function"&&JZ(t,".prototype.")>-1?Lj(r):r};const tK={},nK=Object.freeze(Object.defineProperty({__proto__:null,default:tK},Symbol.toStringTag,{value:"Module"})),rK=d$(nK);var aC=typeof Map=="function"&&Map.prototype,J0=Object.getOwnPropertyDescriptor&&aC?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Kg=aC&&J0&&typeof J0.get=="function"?J0.get:null,iK=aC&&Map.prototype.forEach,lC=typeof Set=="function"&&Set.prototype,e1=Object.getOwnPropertyDescriptor&&lC?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Xg=lC&&e1&&typeof e1.get=="function"?e1.get:null,oK=lC&&Set.prototype.forEach,sK=typeof WeakMap=="function"&&WeakMap.prototype,bf=sK?WeakMap.prototype.has:null,aK=typeof WeakSet=="function"&&WeakSet.prototype,wf=aK?WeakSet.prototype.has:null,lK=typeof WeakRef=="function"&&WeakRef.prototype,hM=lK?WeakRef.prototype.deref:null,cK=Boolean.prototype.valueOf,uK=Object.prototype.toString,fK=Function.prototype.toString,dK=String.prototype.match,cC=String.prototype.slice,ps=String.prototype.replace,hK=String.prototype.toUpperCase,pM=String.prototype.toLowerCase,Dj=RegExp.prototype.test,mM=Array.prototype.concat,zi=Array.prototype.join,pK=Array.prototype.slice,gM=Math.floor,fw=typeof BigInt=="function"?BigInt.prototype.valueOf:null,t1=Object.getOwnPropertySymbols,dw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Rc=typeof Symbol=="function"&&typeof Symbol.iterator=="object",nr=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Rc||"symbol")?Symbol.toStringTag:null,Aj=Object.prototype.propertyIsEnumerable,vM=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function yM(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||Dj.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-gM(-e):gM(e);if(r!==e){var i=String(r),o=cC.call(t,i.length+1);return ps.call(i,n,"$&_")+"."+ps.call(ps.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return ps.call(t,n,"$&_")}var n1=rK.custom,r1=n1&&Ij(n1)?n1:null,mK=function e(t,n,r,i){var o=n||{};if(ts(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(ts(o,"maxStringLength")&&(typeof o.maxStringLength=="number"?o.maxStringLength<0&&o.maxStringLength!==1/0:o.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=ts(o,"customInspect")?o.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(ts(o,"indent")&&o.indent!==null&&o.indent!==" "&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(ts(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=o.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return $j(t,o);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?yM(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return a?yM(t,c):c}var f=typeof o.depth>"u"?5:o.depth;if(typeof r>"u"&&(r=0),r>=f&&f>0&&typeof t=="object")return hw(t)?"[Array]":"[Object]";var h=DK(o,r);if(typeof i>"u")i=[];else if(Fj(i,t)>=0)return"[Circular]";function p(J,Z,ee){if(Z&&(i=pK.call(i),i.push(Z)),ee){var ie={depth:o.depth};return ts(o,"quoteStyle")&&(ie.quoteStyle=o.quoteStyle),e(J,ie,r+1,i)}return e(J,o,r+1,i)}if(typeof t=="function"){var m=EK(t),v=hp(t,p);return"[Function"+(m?": "+m:" (anonymous)")+"]"+(v.length>0?" { "+zi.call(v,", ")+" }":"")}if(Ij(t)){var y=Rc?ps.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):dw.call(t);return typeof t=="object"&&!Rc?ju(y):y}if(RK(t)){for(var x="<"+pM.call(String(t.nodeName)),_=t.attributes||[],w=0;w<_.length;w++)x+=" "+_[w].name+"="+jj(gK(_[w].value),"double",o);return x+=">",t.childNodes&&t.childNodes.length&&(x+="..."),x+="",x}if(hw(t)){if(t.length===0)return"[]";var S=hp(t,p);return h&&!LK(S)?"["+pw(S,h)+"]":"[ "+zi.call(S,", ")+" ]"}if(_K(t)){var T=hp(t,p);return"cause"in t&&!Aj.call(t,"cause")?"{ ["+String(t)+"] "+zi.call(mM.call("[cause]: "+p(t.cause),T),", ")+" }":T.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+zi.call(T,", ")+" }"}if(typeof t=="object"&&s){if(r1&&typeof t[r1]=="function")return t[r1]();if(s!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(TK(t)){var P=[];return iK.call(t,function(J,Z){P.push(p(Z,t,!0)+" => "+p(J,t))}),_M("Map",Kg.call(t),P,h)}if(kK(t)){var k=[];return oK.call(t,function(J){k.push(p(J,t))}),_M("Set",Xg.call(t),k,h)}if(OK(t))return i1("WeakMap");if(MK(t))return i1("WeakSet");if(PK(t))return i1("WeakRef");if(wK(t))return ju(p(Number(t)));if(SK(t))return ju(p(fw.call(t)));if(xK(t))return ju(cK.call(t));if(bK(t))return ju(p(String(t)));if(!vK(t)&&!yK(t)){var N=hp(t,p),D=vM?vM(t)===Object.prototype:t instanceof Object||t.constructor===Object,z=t instanceof Object?"":"null prototype",A=!D&&nr&&Object(t)===t&&nr in t?cC.call(Qs(t),8,-1):z?"Object":"",W=D||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",Y=W+(A||z?"["+zi.call(mM.call([],A||[],z||[]),": ")+"] ":"");return N.length===0?Y+"{}":h?Y+"{"+pw(N,h)+"}":Y+"{ "+zi.call(N,", ")+" }"}return String(t)};function jj(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function gK(e){return ps.call(String(e),/"/g,""")}function hw(e){return Qs(e)==="[object Array]"&&(!nr||!(typeof e=="object"&&nr in e))}function vK(e){return Qs(e)==="[object Date]"&&(!nr||!(typeof e=="object"&&nr in e))}function yK(e){return Qs(e)==="[object RegExp]"&&(!nr||!(typeof e=="object"&&nr in e))}function _K(e){return Qs(e)==="[object Error]"&&(!nr||!(typeof e=="object"&&nr in e))}function bK(e){return Qs(e)==="[object String]"&&(!nr||!(typeof e=="object"&&nr in e))}function wK(e){return Qs(e)==="[object Number]"&&(!nr||!(typeof e=="object"&&nr in e))}function xK(e){return Qs(e)==="[object Boolean]"&&(!nr||!(typeof e=="object"&&nr in e))}function Ij(e){if(Rc)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!dw)return!1;try{return dw.call(e),!0}catch{}return!1}function SK(e){if(!e||typeof e!="object"||!fw)return!1;try{return fw.call(e),!0}catch{}return!1}var CK=Object.prototype.hasOwnProperty||function(e){return e in this};function ts(e,t){return CK.call(e,t)}function Qs(e){return uK.call(e)}function EK(e){if(e.name)return e.name;var t=dK.call(fK.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Fj(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;nt.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return $j(cC.call(e,0,t.maxStringLength),t)+r}var i=ps.call(ps.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,NK);return jj(i,"single",t)}function NK(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+hK.call(t.toString(16))}function ju(e){return"Object("+e+")"}function i1(e){return e+" { ? }"}function _M(e,t,n,r){var i=r?pw(n,r):zi.call(n,", ");return e+" ("+t+") {"+i+"}"}function LK(e){for(var t=0;t=0)return!1;return!0}function DK(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=zi.call(Array(e.indent+1)," ");else return null;return{base:n,prev:zi.call(Array(t+1),n)}}function pw(e,t){if(e.length===0)return"";var n=` `+t.prev+t.base;return n+zi.call(e,","+n)+` `+t.prev}function hp(e,t){var n=hw(e),r=[];if(n){r.length=e.length;for(var i=0;i1;){var n=t.pop(),r=n.obj[n.prop];if(Pa(r)){for(var i=[],o=0;o=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||o===ZK.RFC1738&&(c===40||c===41)){a+=s.charAt(l);continue}if(c<128){a=a+ji[c];continue}if(c<2048){a=a+(ji[192|c>>6]+ji[128|c&63]);continue}if(c<55296||c>=57344){a=a+(ji[224|c>>12]+ji[128|c>>6&63]+ji[128|c&63]);continue}l+=1,c=65536+((c&1023)<<10|s.charCodeAt(l)&1023),a+=ji[240|c>>18]+ji[128|c>>12&63]+ji[128|c>>6&63]+ji[128|c&63]}return a},tX=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],i=0;i"u"&&(S=0)}if(typeof l=="function"?_=l(n,_):_ instanceof Date?_=h(_):r==="comma"&&mo(_)&&(_=mw.maybeMap(_,function(F){return F instanceof Date?h(F):F})),_===null){if(o)return a&&!v?a(n,$n.encoder,y,"key",p):n;_=""}if(uX(_)||mw.isBuffer(_)){if(a){var k=v?n:a(n,$n.encoder,y,"key",p);if(r==="comma"&&v){for(var N=aX.call(String(_),","),D="",z=0;z"u")return A;var W;if(r==="comma"&&mo(_))W=[{value:_.length>0?_.join(",")||null:void 0}];else if(mo(l))W=l;else{var Y=Object.keys(_);W=c?Y.sort(c):Y}for(var J=i&&mo(_)&&_.length===1?n+"[]":n,Z=0;Z"u"?$n.allowDots:!!t.allowDots,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:$n.charsetSentinel,delimiter:typeof t.delimiter>"u"?$n.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:$n.encode,encoder:typeof t.encoder=="function"?t.encoder:$n.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:$n.encodeValuesOnly,filter:o,format:r,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:$n.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:$n.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:$n.strictNullHandling}},hX=function(e,t){var n=e,r=dX(t),i,o;typeof r.filter=="function"?(o=r.filter,n=o("",n)):mo(r.filter)&&(o=r.filter,i=o);var s=[];if(typeof n!="object"||n===null)return"";var a;t&&t.arrayFormat in bM?a=t.arrayFormat:t&&"indices"in t?a=t.indices?"indices":"repeat":a="indices";var l=bM[a];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var c=l==="comma"&&t&&t.commaRoundTrip;i||(i=Object.keys(n)),r.sort&&i.sort(r.sort);for(var f=Uj(),h=0;h0?v+m:""},Nc=zj,gw=Object.prototype.hasOwnProperty,pX=Array.isArray,Sn={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:Nc.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},mX=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},Hj=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},gX="utf8=%26%2310003%3B",vX="utf8=%E2%9C%93",yX=function(t,n){var r={},i=n.ignoreQueryPrefix?t.replace(/^\?/,""):t,o=n.parameterLimit===1/0?void 0:n.parameterLimit,s=i.split(n.delimiter,o),a=-1,l,c=n.charset;if(n.charsetSentinel)for(l=0;l-1&&(v=pX(v)?[v]:v),gw.call(r,m)?r[m]=Nc.combine(r[m],v):r[m]=v}return r},_X=function(e,t,n,r){for(var i=r?t:Hj(t,n),o=e.length-1;o>=0;--o){var s,a=e[o];if(a==="[]"&&n.parseArrays)s=[].concat(i);else{s=n.plainObjects?Object.create(null):{};var l=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,c=parseInt(l,10);!n.parseArrays&&l===""?s={0:i}:!isNaN(c)&&a!==l&&String(c)===l&&c>=0&&n.parseArrays&&c<=n.arrayLimit?(s=[],s[c]=i):l!=="__proto__"&&(s[l]=i)}i=s}return i},bX=function(t,n,r,i){if(t){var o=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,s=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=r.depth>0&&s.exec(o),c=l?o.slice(0,l.index):o,f=[];if(c){if(!r.plainObjects&&gw.call(Object.prototype,c)&&!r.allowPrototypes)return;f.push(c)}for(var h=0;r.depth>0&&(l=a.exec(o))!==null&&h"u"?Sn.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?Sn.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Sn.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Sn.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Sn.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Sn.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Sn.comma,decoder:typeof t.decoder=="function"?t.decoder:Sn.decoder,delimiter:typeof t.delimiter=="string"||Nc.isRegExp(t.delimiter)?t.delimiter:Sn.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Sn.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Sn.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Sn.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Sn.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Sn.strictNullHandling}},xX=function(e,t){var n=wX(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?yX(e,n):e,i=n.plainObjects?Object.create(null):{},o=Object.keys(r),s=0;sWj.parse(e,{ignoreQueryPrefix:!0}),Hd=e=>Wj.stringify(e,{arrayFormat:"brackets"});var i_=(e=>(e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.INVALID_SHORT_URL_DELETION="INVALID_SHORT_URL_DELETION",e.DOMAIN_NOT_FOUND="DOMAIN_NOT_FOUND",e.FORBIDDEN_OPERATION="FORBIDDEN_OPERATION",e.INVALID_URL="INVALID_URL",e.INVALID_SLUG="INVALID_SLUG",e.INVALID_SHORTCODE="INVALID_SHORTCODE",e.TAG_CONFLICT="TAG_CONFLICT",e.TAG_NOT_FOUND="TAG_NOT_FOUND",e.MERCURE_NOT_CONFIGURED="MERCURE_NOT_CONFIGURED",e.INVALID_AUTHORIZATION="INVALID_AUTHORIZATION",e.INVALID_API_KEY="INVALID_API_KEY",e.NOT_FOUND="NOT_FOUND",e))(i_||{}),o_=(e=>(e.INVALID_ARGUMENT="https://shlink.io/api/error/invalid-data",e.INVALID_SHORT_URL_DELETION="https://shlink.io/api/error/invalid-short-url-deletion",e.DOMAIN_NOT_FOUND="https://shlink.io/api/error/domain-not-found",e.FORBIDDEN_OPERATION="https://shlink.io/api/error/forbidden-tag-operation",e.INVALID_URL="https://shlink.io/api/error/invalid-url",e.INVALID_SLUG="https://shlink.io/api/error/non-unique-slug",e.INVALID_SHORTCODE="https://shlink.io/api/error/short-url-not-found",e.TAG_CONFLICT="https://shlink.io/api/error/tag-conflict",e.TAG_NOT_FOUND="https://shlink.io/api/error/tag-not-found",e.MERCURE_NOT_CONFIGURED="https://shlink.io/api/error/mercure-not-configured",e.INVALID_AUTHORIZATION="https://shlink.io/api/error/missing-authentication",e.INVALID_API_KEY="https://shlink.io/api/error/invalid-api-key",e.NOT_FOUND="https://shlink.io/api/error/not-found",e))(o_||{});const TX=e=>!!e&&typeof e=="object"&&["type","detail","title","status"].every(t=>t in e),no=e=>TX(e)?e:void 0,OX=e=>(e==null?void 0:e.type)===i_.INVALID_ARGUMENT||(e==null?void 0:e.type)===o_.INVALID_ARGUMENT,PX=e=>(e==null?void 0:e.type)==="INVALID_SHORTCODE_DELETION"||(e==null?void 0:e.type)===i_.INVALID_SHORT_URL_DELETION||(e==null?void 0:e.type)===o_.INVALID_SHORT_URL_DELETION,kX=e=>((e==null?void 0:e.type)===i_.NOT_FOUND||(e==null?void 0:e.type)===o_.NOT_FOUND)&&(e==null?void 0:e.status)===404,MX=(e,t)=>`${e}/rest/v${t}`,RX=Ud(Fo),NX=({orderBy:e={},excludeMaxVisitsReached:t,excludePastValidUntil:n,...r})=>({...r,excludeMaxVisitsReached:t===!0?"true":void 0,excludePastValidUntil:n===!0?"true":void 0,orderBy:Mj(e)});class LX{constructor(t,n,r){xe(this,"apiVersion");xe(this,"listShortUrls",async(t={})=>this.performRequest("/short-urls","GET",NX(t)).then(({shortUrls:n})=>n));xe(this,"createShortUrl",async t=>{const n=Ud(r=>Wn(r)||Fo(r),t);return this.performRequest("/short-urls","POST",{},n)});xe(this,"getShortUrlVisits",async(t,n)=>this.performRequest(`/short-urls/${t}/visits`,"GET",n).then(({visits:r})=>r));xe(this,"getTagVisits",async(t,n)=>this.performRequest(`/tags/${t}/visits`,"GET",n).then(({visits:r})=>r));xe(this,"getDomainVisits",async(t,n)=>this.performRequest(`/domains/${t}/visits`,"GET",n).then(({visits:r})=>r));xe(this,"getOrphanVisits",async t=>this.performRequest("/visits/orphan","GET",t).then(({visits:n})=>n));xe(this,"getNonOrphanVisits",async t=>this.performRequest("/visits/non-orphan","GET",t).then(({visits:n})=>n));xe(this,"getVisitsOverview",async()=>this.performRequest("/visits").then(({visits:t})=>t));xe(this,"getShortUrl",async(t,n)=>this.performRequest(`/short-urls/${t}`,"GET",{domain:n}));xe(this,"deleteShortUrl",async(t,n)=>this.performEmptyRequest(`/short-urls/${t}`,"DELETE",{domain:n}));xe(this,"updateShortUrl",async(t,n,r)=>this.performRequest(`/short-urls/${t}`,"PATCH",{domain:n},r));xe(this,"listTags",async()=>this.performRequest("/tags","GET",{withStats:"true"}).then(({tags:t})=>t).then(({data:t,stats:n})=>({tags:t,stats:n})));xe(this,"tagsStats",async()=>this.performRequest("/tags/stats","GET").then(({tags:t})=>t).then(({data:t})=>({tags:t.map(({tag:n})=>n),stats:t})));xe(this,"deleteTags",async t=>this.performEmptyRequest("/tags","DELETE",{tags:t}).then(()=>({tags:t})));xe(this,"editTag",async(t,n)=>this.performEmptyRequest("/tags","PUT",{},{oldName:t,newName:n}).then(()=>({oldName:t,newName:n})));xe(this,"health",async()=>this.performRequest("/health","GET"));xe(this,"mercureInfo",async()=>this.performRequest("/mercure-info","GET"));xe(this,"listDomains",async()=>this.performRequest("/domains").then(({domains:t})=>t));xe(this,"editDomainRedirects",async t=>this.performRequest("/domains/redirects","PATCH",{},t));xe(this,"performRequest",async(t,n="GET",r={},i)=>this.httpClient.fetchJson(...this.toFetchParams(t,n,r,i)).catch(this.handleFetchError(()=>this.httpClient.fetchJson(...this.toFetchParams(t,n,r,i)))));xe(this,"performEmptyRequest",async(t,n="GET",r={},i)=>this.httpClient.fetchEmpty(...this.toFetchParams(t,n,r,i)).catch(this.handleFetchError(()=>this.httpClient.fetchEmpty(...this.toFetchParams(t,n,r,i)))));xe(this,"toFetchParams",(t,n,r={},i)=>{const o=Hd(RX(r)),s=Wn(o)?"":`?${o}`;return[`${MX(this.baseUrl,this.apiVersion)}${t}${s}`,{method:n,body:i&&JSON.stringify(i),headers:{"X-Api-Key":this.apiKey}}]});xe(this,"handleFetchError",t=>n=>{if(!kX(no(n)))throw n;return this.apiVersion=2,t()});this.httpClient=t,this.baseUrl=n,this.apiKey=r,this.apiVersion=3}}const l1={},DX=e=>typeof e=="function",AX=e=>{const{selectedServer:t}=e();if(!iC(t))throw new Error("There's no selected server or it is not found");return t},jX=e=>t=>{const{url:n,apiKey:r}=DX(t)?AX(t):t,i=`${n}_${r}`;return l1[i]||(l1[i]=new LX(e,n,r)),l1[i]},IX=e=>{e.serviceFactory("buildShlinkApiClient",jX,"HttpClient")};var vw={},FX={get exports(){return vw},set exports(e){vw=e}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;ie.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1;i--){var o=n[i],s=(o.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(s)>-1&&(r=o)}return Nt.head.insertBefore(t,r),e}}var sJ="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function gd(){for(var e=12,t="";e-- >0;)t+=sJ[Math.random()*62|0];return t}function eu(e){for(var t=[],n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function SC(e){return e.classList?eu(e.classList):(e.getAttribute("class")||"").split(" ").filter(function(t){return t})}function cI(e){return"".concat(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function aJ(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,'="').concat(cI(e[n]),'" ')},"").trim()}function s_(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,": ").concat(e[n].trim(),";")},"")}function CC(e){return e.size!==Yi.size||e.x!==Yi.x||e.y!==Yi.y||e.rotate!==Yi.rotate||e.flipX||e.flipY}function lJ(e){var t=e.transform,n=e.containerWidth,r=e.iconWidth,i={transform:"translate(".concat(n/2," 256)")},o="translate(".concat(t.x*32,", ").concat(t.y*32,") "),s="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),a="rotate(".concat(t.rotate," 0 0)"),l={transform:"".concat(o," ").concat(s," ").concat(a)},c={transform:"translate(".concat(r/2*-1," -256)")};return{outer:i,inner:l,path:c}}function cJ(e){var t=e.transform,n=e.width,r=n===void 0?bw:n,i=e.height,o=i===void 0?bw:i,s=e.startCentered,a=s===void 0?!1:s,l="";return a&&nI?l+="translate(".concat(t.x/Go-r/2,"em, ").concat(t.y/Go-o/2,"em) "):a?l+="translate(calc(-50% + ".concat(t.x/Go,"em), calc(-50% + ").concat(t.y/Go,"em)) "):l+="translate(".concat(t.x/Go,"em, ").concat(t.y/Go,"em) "),l+="scale(".concat(t.size/Go*(t.flipX?-1:1),", ").concat(t.size/Go*(t.flipY?-1:1),") "),l+="rotate(".concat(t.rotate,"deg) "),l}var uJ=`:root, :host { --fa-font-solid: normal 900 1em/1 "Font Awesome 6 Solid"; --fa-font-regular: normal 400 1em/1 "Font Awesome 6 Regular"; --fa-font-light: normal 300 1em/1 "Font Awesome 6 Light"; --fa-font-thin: normal 100 1em/1 "Font Awesome 6 Thin"; --fa-font-duotone: normal 900 1em/1 "Font Awesome 6 Duotone"; --fa-font-sharp-solid: normal 900 1em/1 "Font Awesome 6 Sharp"; --fa-font-sharp-regular: normal 400 1em/1 "Font Awesome 6 Sharp"; --fa-font-brands: normal 400 1em/1 "Font Awesome 6 Brands"; } svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa { overflow: visible; box-sizing: content-box; } .svg-inline--fa { display: var(--fa-display, inline-block); height: 1em; overflow: visible; vertical-align: -0.125em; } .svg-inline--fa.fa-2xs { vertical-align: 0.1em; } .svg-inline--fa.fa-xs { vertical-align: 0em; } .svg-inline--fa.fa-sm { vertical-align: -0.0714285705em; } .svg-inline--fa.fa-lg { vertical-align: -0.2em; } .svg-inline--fa.fa-xl { vertical-align: -0.25em; } .svg-inline--fa.fa-2xl { vertical-align: -0.3125em; } .svg-inline--fa.fa-pull-left { margin-right: var(--fa-pull-margin, 0.3em); width: auto; } .svg-inline--fa.fa-pull-right { margin-left: var(--fa-pull-margin, 0.3em); width: auto; } .svg-inline--fa.fa-li { width: var(--fa-li-width, 2em); top: 0.25em; } .svg-inline--fa.fa-fw { width: var(--fa-fw-width, 1.25em); } .fa-layers svg.svg-inline--fa { bottom: 0; left: 0; margin: auto; position: absolute; right: 0; top: 0; } .fa-layers-counter, .fa-layers-text { display: inline-block; position: absolute; text-align: center; } .fa-layers { display: inline-block; height: 1em; position: relative; text-align: center; vertical-align: -0.125em; width: 1em; } .fa-layers svg.svg-inline--fa { -webkit-transform-origin: center center; transform-origin: center center; } .fa-layers-text { left: 50%; top: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); -webkit-transform-origin: center center; transform-origin: center center; } .fa-layers-counter { background-color: var(--fa-counter-background-color, #ff253a); border-radius: var(--fa-counter-border-radius, 1em); box-sizing: border-box; color: var(--fa-inverse, #fff); line-height: var(--fa-counter-line-height, 1); max-width: var(--fa-counter-max-width, 5em); min-width: var(--fa-counter-min-width, 1.5em); overflow: hidden; padding: var(--fa-counter-padding, 0.25em 0.5em); right: var(--fa-right, 0); text-overflow: ellipsis; top: var(--fa-top, 0); -webkit-transform: scale(var(--fa-counter-scale, 0.25)); transform: scale(var(--fa-counter-scale, 0.25)); -webkit-transform-origin: top right; transform-origin: top right; } .fa-layers-bottom-right { bottom: var(--fa-bottom, 0); right: var(--fa-right, 0); top: auto; -webkit-transform: scale(var(--fa-layers-scale, 0.25)); transform: scale(var(--fa-layers-scale, 0.25)); -webkit-transform-origin: bottom right; transform-origin: bottom right; } .fa-layers-bottom-left { bottom: var(--fa-bottom, 0); left: var(--fa-left, 0); right: auto; top: auto; -webkit-transform: scale(var(--fa-layers-scale, 0.25)); transform: scale(var(--fa-layers-scale, 0.25)); -webkit-transform-origin: bottom left; transform-origin: bottom left; } .fa-layers-top-right { top: var(--fa-top, 0); right: var(--fa-right, 0); -webkit-transform: scale(var(--fa-layers-scale, 0.25)); transform: scale(var(--fa-layers-scale, 0.25)); -webkit-transform-origin: top right; transform-origin: top right; } .fa-layers-top-left { left: var(--fa-left, 0); right: auto; top: var(--fa-top, 0); -webkit-transform: scale(var(--fa-layers-scale, 0.25)); transform: scale(var(--fa-layers-scale, 0.25)); -webkit-transform-origin: top left; transform-origin: top left; } .fa-1x { font-size: 1em; } .fa-2x { font-size: 2em; } .fa-3x { font-size: 3em; } .fa-4x { font-size: 4em; } .fa-5x { font-size: 5em; } .fa-6x { font-size: 6em; } .fa-7x { font-size: 7em; } .fa-8x { font-size: 8em; } .fa-9x { font-size: 9em; } .fa-10x { font-size: 10em; } .fa-2xs { font-size: 0.625em; line-height: 0.1em; vertical-align: 0.225em; } .fa-xs { font-size: 0.75em; line-height: 0.0833333337em; vertical-align: 0.125em; } .fa-sm { font-size: 0.875em; line-height: 0.0714285718em; vertical-align: 0.0535714295em; } .fa-lg { font-size: 1.25em; line-height: 0.05em; vertical-align: -0.075em; } .fa-xl { font-size: 1.5em; line-height: 0.0416666682em; vertical-align: -0.125em; } .fa-2xl { font-size: 2em; line-height: 0.03125em; vertical-align: -0.1875em; } .fa-fw { text-align: center; width: 1.25em; } .fa-ul { list-style-type: none; margin-left: var(--fa-li-margin, 2.5em); padding-left: 0; } .fa-ul > li { position: relative; } .fa-li { left: calc(var(--fa-li-width, 2em) * -1); position: absolute; text-align: center; width: var(--fa-li-width, 2em); line-height: inherit; } .fa-border { border-color: var(--fa-border-color, #eee); border-radius: var(--fa-border-radius, 0.1em); border-style: var(--fa-border-style, solid); border-width: var(--fa-border-width, 0.08em); padding: var(--fa-border-padding, 0.2em 0.25em 0.15em); } .fa-pull-left { float: left; margin-right: var(--fa-pull-margin, 0.3em); } .fa-pull-right { float: right; margin-left: var(--fa-pull-margin, 0.3em); } .fa-beat { -webkit-animation-name: fa-beat; animation-name: fa-beat; -webkit-animation-delay: var(--fa-animation-delay, 0s); animation-delay: var(--fa-animation-delay, 0s); -webkit-animation-direction: var(--fa-animation-direction, normal); animation-direction: var(--fa-animation-direction, normal); -webkit-animation-duration: var(--fa-animation-duration, 1s); animation-duration: var(--fa-animation-duration, 1s); -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); animation-iteration-count: var(--fa-animation-iteration-count, infinite); -webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out); animation-timing-function: var(--fa-animation-timing, ease-in-out); } .fa-bounce { -webkit-animation-name: fa-bounce; animation-name: fa-bounce; -webkit-animation-delay: var(--fa-animation-delay, 0s); animation-delay: var(--fa-animation-delay, 0s); -webkit-animation-direction: var(--fa-animation-direction, normal); animation-direction: var(--fa-animation-direction, normal); -webkit-animation-duration: var(--fa-animation-duration, 1s); animation-duration: var(--fa-animation-duration, 1s); -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); animation-iteration-count: var(--fa-animation-iteration-count, infinite); -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1)); animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1)); } .fa-fade { -webkit-animation-name: fa-fade; animation-name: fa-fade; -webkit-animation-delay: var(--fa-animation-delay, 0s); animation-delay: var(--fa-animation-delay, 0s); -webkit-animation-direction: var(--fa-animation-direction, normal); animation-direction: var(--fa-animation-direction, normal); -webkit-animation-duration: var(--fa-animation-duration, 1s); animation-duration: var(--fa-animation-duration, 1s); -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); animation-iteration-count: var(--fa-animation-iteration-count, infinite); -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1)); animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1)); } .fa-beat-fade { -webkit-animation-name: fa-beat-fade; animation-name: fa-beat-fade; -webkit-animation-delay: var(--fa-animation-delay, 0s); animation-delay: var(--fa-animation-delay, 0s); -webkit-animation-direction: var(--fa-animation-direction, normal); animation-direction: var(--fa-animation-direction, normal); -webkit-animation-duration: var(--fa-animation-duration, 1s); animation-duration: var(--fa-animation-duration, 1s); -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); animation-iteration-count: var(--fa-animation-iteration-count, infinite); -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1)); animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1)); } .fa-flip { -webkit-animation-name: fa-flip; animation-name: fa-flip; -webkit-animation-delay: var(--fa-animation-delay, 0s); animation-delay: var(--fa-animation-delay, 0s); -webkit-animation-direction: var(--fa-animation-direction, normal); animation-direction: var(--fa-animation-direction, normal); -webkit-animation-duration: var(--fa-animation-duration, 1s); animation-duration: var(--fa-animation-duration, 1s); -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); animation-iteration-count: var(--fa-animation-iteration-count, infinite); -webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out); animation-timing-function: var(--fa-animation-timing, ease-in-out); } .fa-shake { -webkit-animation-name: fa-shake; animation-name: fa-shake; -webkit-animation-delay: var(--fa-animation-delay, 0s); animation-delay: var(--fa-animation-delay, 0s); -webkit-animation-direction: var(--fa-animation-direction, normal); animation-direction: var(--fa-animation-direction, normal); -webkit-animation-duration: var(--fa-animation-duration, 1s); animation-duration: var(--fa-animation-duration, 1s); -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); animation-iteration-count: var(--fa-animation-iteration-count, infinite); -webkit-animation-timing-function: var(--fa-animation-timing, linear); animation-timing-function: var(--fa-animation-timing, linear); } .fa-spin { -webkit-animation-name: fa-spin; animation-name: fa-spin; -webkit-animation-delay: var(--fa-animation-delay, 0s); animation-delay: var(--fa-animation-delay, 0s); -webkit-animation-direction: var(--fa-animation-direction, normal); animation-direction: var(--fa-animation-direction, normal); -webkit-animation-duration: var(--fa-animation-duration, 2s); animation-duration: var(--fa-animation-duration, 2s); -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); animation-iteration-count: var(--fa-animation-iteration-count, infinite); -webkit-animation-timing-function: var(--fa-animation-timing, linear); animation-timing-function: var(--fa-animation-timing, linear); } .fa-spin-reverse { --fa-animation-direction: reverse; } .fa-pulse, .fa-spin-pulse { -webkit-animation-name: fa-spin; animation-name: fa-spin; -webkit-animation-direction: var(--fa-animation-direction, normal); animation-direction: var(--fa-animation-direction, normal); -webkit-animation-duration: var(--fa-animation-duration, 1s); animation-duration: var(--fa-animation-duration, 1s); -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); animation-iteration-count: var(--fa-animation-iteration-count, infinite); -webkit-animation-timing-function: var(--fa-animation-timing, steps(8)); animation-timing-function: var(--fa-animation-timing, steps(8)); } @media (prefers-reduced-motion: reduce) { .fa-beat, .fa-bounce, .fa-fade, .fa-beat-fade, .fa-flip, .fa-pulse, .fa-shake, .fa-spin, .fa-spin-pulse { -webkit-animation-delay: -1ms; animation-delay: -1ms; -webkit-animation-duration: 1ms; animation-duration: 1ms; -webkit-animation-iteration-count: 1; animation-iteration-count: 1; -webkit-transition-delay: 0s; transition-delay: 0s; -webkit-transition-duration: 0s; transition-duration: 0s; } } @-webkit-keyframes fa-beat { 0%, 90% { -webkit-transform: scale(1); transform: scale(1); } 45% { -webkit-transform: scale(var(--fa-beat-scale, 1.25)); transform: scale(var(--fa-beat-scale, 1.25)); } } @keyframes fa-beat { 0%, 90% { -webkit-transform: scale(1); transform: scale(1); } 45% { -webkit-transform: scale(var(--fa-beat-scale, 1.25)); transform: scale(var(--fa-beat-scale, 1.25)); } } @-webkit-keyframes fa-bounce { 0% { -webkit-transform: scale(1, 1) translateY(0); transform: scale(1, 1) translateY(0); } 10% { -webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0); transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0); } 30% { -webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em)); transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em)); } 50% { -webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0); transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0); } 57% { -webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em)); transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em)); } 64% { -webkit-transform: scale(1, 1) translateY(0); transform: scale(1, 1) translateY(0); } 100% { -webkit-transform: scale(1, 1) translateY(0); transform: scale(1, 1) translateY(0); } } @keyframes fa-bounce { 0% { -webkit-transform: scale(1, 1) translateY(0); transform: scale(1, 1) translateY(0); } 10% { -webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0); transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0); } 30% { -webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em)); transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em)); } 50% { -webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0); transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0); } 57% { -webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em)); transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em)); } 64% { -webkit-transform: scale(1, 1) translateY(0); transform: scale(1, 1) translateY(0); } 100% { -webkit-transform: scale(1, 1) translateY(0); transform: scale(1, 1) translateY(0); } } @-webkit-keyframes fa-fade { 50% { opacity: var(--fa-fade-opacity, 0.4); } } @keyframes fa-fade { 50% { opacity: var(--fa-fade-opacity, 0.4); } } @-webkit-keyframes fa-beat-fade { 0%, 100% { opacity: var(--fa-beat-fade-opacity, 0.4); -webkit-transform: scale(1); transform: scale(1); } 50% { opacity: 1; -webkit-transform: scale(var(--fa-beat-fade-scale, 1.125)); transform: scale(var(--fa-beat-fade-scale, 1.125)); } } @keyframes fa-beat-fade { 0%, 100% { opacity: var(--fa-beat-fade-opacity, 0.4); -webkit-transform: scale(1); transform: scale(1); } 50% { opacity: 1; -webkit-transform: scale(var(--fa-beat-fade-scale, 1.125)); transform: scale(var(--fa-beat-fade-scale, 1.125)); } } @-webkit-keyframes fa-flip { 50% { -webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg)); transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg)); } } @keyframes fa-flip { 50% { -webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg)); transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg)); } } @-webkit-keyframes fa-shake { 0% { -webkit-transform: rotate(-15deg); transform: rotate(-15deg); } 4% { -webkit-transform: rotate(15deg); transform: rotate(15deg); } 8%, 24% { -webkit-transform: rotate(-18deg); transform: rotate(-18deg); } 12%, 28% { -webkit-transform: rotate(18deg); transform: rotate(18deg); } 16% { -webkit-transform: rotate(-22deg); transform: rotate(-22deg); } 20% { -webkit-transform: rotate(22deg); transform: rotate(22deg); } 32% { -webkit-transform: rotate(-12deg); transform: rotate(-12deg); } 36% { -webkit-transform: rotate(12deg); transform: rotate(12deg); } 40%, 100% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } } @keyframes fa-shake { 0% { -webkit-transform: rotate(-15deg); transform: rotate(-15deg); } 4% { -webkit-transform: rotate(15deg); transform: rotate(15deg); } 8%, 24% { -webkit-transform: rotate(-18deg); transform: rotate(-18deg); } 12%, 28% { -webkit-transform: rotate(18deg); transform: rotate(18deg); } 16% { -webkit-transform: rotate(-22deg); transform: rotate(-22deg); } 20% { -webkit-transform: rotate(22deg); transform: rotate(22deg); } 32% { -webkit-transform: rotate(-12deg); transform: rotate(-12deg); } 36% { -webkit-transform: rotate(12deg); transform: rotate(12deg); } 40%, 100% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } } @-webkit-keyframes fa-spin { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } @keyframes fa-spin { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } .fa-rotate-90 { -webkit-transform: rotate(90deg); transform: rotate(90deg); } .fa-rotate-180 { -webkit-transform: rotate(180deg); transform: rotate(180deg); } .fa-rotate-270 { -webkit-transform: rotate(270deg); transform: rotate(270deg); } .fa-flip-horizontal { -webkit-transform: scale(-1, 1); transform: scale(-1, 1); } .fa-flip-vertical { -webkit-transform: scale(1, -1); transform: scale(1, -1); } .fa-flip-both, .fa-flip-horizontal.fa-flip-vertical { -webkit-transform: scale(-1, -1); transform: scale(-1, -1); } .fa-rotate-by { -webkit-transform: rotate(var(--fa-rotate-angle, none)); transform: rotate(var(--fa-rotate-angle, none)); } .fa-stack { display: inline-block; vertical-align: middle; height: 2em; position: relative; width: 2.5em; } .fa-stack-1x, .fa-stack-2x { bottom: 0; left: 0; margin: auto; position: absolute; right: 0; top: 0; z-index: var(--fa-stack-z-index, auto); } .svg-inline--fa.fa-stack-1x { height: 1em; width: 1.25em; } .svg-inline--fa.fa-stack-2x { height: 2em; width: 2.5em; } .fa-inverse { color: var(--fa-inverse, #fff); } .sr-only, .fa-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; } .sr-only-focusable:not(:focus), .fa-sr-only-focusable:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; } .svg-inline--fa .fa-primary { fill: var(--fa-primary-color, currentColor); opacity: var(--fa-primary-opacity, 1); } .svg-inline--fa .fa-secondary { fill: var(--fa-secondary-color, currentColor); opacity: var(--fa-secondary-opacity, 0.4); } .svg-inline--fa.fa-swap-opacity .fa-primary { opacity: var(--fa-secondary-opacity, 0.4); } .svg-inline--fa.fa-swap-opacity .fa-secondary { opacity: var(--fa-primary-opacity, 1); } .svg-inline--fa mask .fa-primary, .svg-inline--fa mask .fa-secondary { fill: black; } .fad.fa-inverse, .fa-duotone.fa-inverse { color: var(--fa-inverse, #fff); }`;function uI(){var e=rI,t=iI,n=Ve.cssPrefix,r=Ve.replacementClass,i=uJ;if(n!==e||r!==t){var o=new RegExp("\\.".concat(e,"\\-"),"g"),s=new RegExp("\\--".concat(e,"\\-"),"g"),a=new RegExp("\\.".concat(t),"g");i=i.replace(o,".".concat(n,"-")).replace(s,"--".concat(n,"-")).replace(a,".".concat(r))}return i}var NM=!1;function c1(){Ve.autoAddCss&&!NM&&(oJ(uI()),NM=!0)}var fJ={mixout:function(){return{dom:{css:uI,insertCss:c1}}},hooks:function(){return{beforeDOMElementCreation:function(){c1()},beforeI2svg:function(){c1()}}}},ko=Is||{};ko[Po]||(ko[Po]={});ko[Po].styles||(ko[Po].styles={});ko[Po].hooks||(ko[Po].hooks={});ko[Po].shims||(ko[Po].shims=[]);var yi=ko[Po],fI=[],dJ=function e(){Nt.removeEventListener("DOMContentLoaded",e),Jg=1,fI.map(function(t){return t()})},Jg=!1;$o&&(Jg=(Nt.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(Nt.readyState),Jg||Nt.addEventListener("DOMContentLoaded",dJ));function hJ(e){$o&&(Jg?setTimeout(e,0):fI.push(e))}function qd(e){var t=e.tag,n=e.attributes,r=n===void 0?{}:n,i=e.children,o=i===void 0?[]:i;return typeof e=="string"?cI(e):"<".concat(t," ").concat(aJ(r),">").concat(o.map(qd).join(""),"")}function LM(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}var pJ=function(t,n){return function(r,i,o,s){return t.call(n,r,i,o,s)}},u1=function(t,n,r,i){var o=Object.keys(t),s=o.length,a=i!==void 0?pJ(n,i):n,l,c,f;for(r===void 0?(l=1,f=t[o[0]]):(l=0,f=r);l=55296&&i<=56319&&n=55296&&r<=56319&&n>t+1&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}function DM(e){return Object.keys(e).reduce(function(t,n){var r=e[n],i=!!r.icon;return i?t[r.iconName]=r.icon:t[n]=r,t},{})}function Sw(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.skipHooks,i=r===void 0?!1:r,o=DM(t);typeof yi.hooks.addPack=="function"&&!i?yi.hooks.addPack(e,DM(t)):yi.styles[e]=Be(Be({},yi.styles[e]||{}),o),e==="fas"&&Sw("fa",t)}var xp,Sp,Cp,ec=yi.styles,vJ=yi.shims,yJ=(xp={},bn(xp,Pt,Object.values(pd[Pt])),bn(xp,qt,Object.values(pd[qt])),xp),EC=null,dI={},hI={},pI={},mI={},gI={},_J=(Sp={},bn(Sp,Pt,Object.keys(dd[Pt])),bn(Sp,qt,Object.keys(dd[qt])),Sp);function bJ(e){return~eJ.indexOf(e)}function wJ(e,t){var n=t.split("-"),r=n[0],i=n.slice(1).join("-");return r===e&&i!==""&&!bJ(i)?i:null}var vI=function(){var t=function(o){return u1(ec,function(s,a,l){return s[l]=u1(a,o,{}),s},{})};dI=t(function(i,o,s){if(o[3]&&(i[o[3]]=s),o[2]){var a=o[2].filter(function(l){return typeof l=="number"});a.forEach(function(l){i[l.toString(16)]=s})}return i}),hI=t(function(i,o,s){if(i[s]=s,o[2]){var a=o[2].filter(function(l){return typeof l=="string"});a.forEach(function(l){i[l]=s})}return i}),gI=t(function(i,o,s){var a=o[2];return i[s]=s,a.forEach(function(l){i[l]=s}),i});var n="far"in ec||Ve.autoFetchSvg,r=u1(vJ,function(i,o){var s=o[0],a=o[1],l=o[2];return a==="far"&&!n&&(a="fas"),typeof s=="string"&&(i.names[s]={prefix:a,iconName:l}),typeof s=="number"&&(i.unicodes[s.toString(16)]={prefix:a,iconName:l}),i},{names:{},unicodes:{}});pI=r.names,mI=r.unicodes,EC=a_(Ve.styleDefault,{family:Ve.familyDefault})};iJ(function(e){EC=a_(e.styleDefault,{family:Ve.familyDefault})});vI();function TC(e,t){return(dI[e]||{})[t]}function xJ(e,t){return(hI[e]||{})[t]}function Da(e,t){return(gI[e]||{})[t]}function yI(e){return pI[e]||{prefix:null,iconName:null}}function SJ(e){var t=mI[e],n=TC("fas",e);return t||(n?{prefix:"fas",iconName:n}:null)||{prefix:null,iconName:null}}function Fs(){return EC}var OC=function(){return{prefix:null,iconName:null,rest:[]}};function a_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.family,r=n===void 0?Pt:n,i=dd[r][e],o=hd[r][e]||hd[r][i],s=e in yi.styles?e:null;return o||s||null}var AM=(Cp={},bn(Cp,Pt,Object.keys(pd[Pt])),bn(Cp,qt,Object.keys(pd[qt])),Cp);function l_(e){var t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.skipLookups,i=r===void 0?!1:r,o=(t={},bn(t,Pt,"".concat(Ve.cssPrefix,"-").concat(Pt)),bn(t,qt,"".concat(Ve.cssPrefix,"-").concat(qt)),t),s=null,a=Pt;(e.includes(o[Pt])||e.some(function(c){return AM[Pt].includes(c)}))&&(a=Pt),(e.includes(o[qt])||e.some(function(c){return AM[qt].includes(c)}))&&(a=qt);var l=e.reduce(function(c,f){var h=wJ(Ve.cssPrefix,f);if(ec[f]?(f=yJ[a].includes(f)?GQ[a][f]:f,s=f,c.prefix=f):_J[a].indexOf(f)>-1?(s=f,c.prefix=a_(f,{family:a})):h?c.iconName=h:f!==Ve.replacementClass&&f!==o[Pt]&&f!==o[qt]&&c.rest.push(f),!i&&c.prefix&&c.iconName){var p=s==="fa"?yI(c.iconName):{},m=Da(c.prefix,c.iconName);p.prefix&&(s=null),c.iconName=p.iconName||m||c.iconName,c.prefix=p.prefix||c.prefix,c.prefix==="far"&&!ec.far&&ec.fas&&!Ve.autoFetchSvg&&(c.prefix="fas")}return c},OC());return(e.includes("fa-brands")||e.includes("fab"))&&(l.prefix="fab"),(e.includes("fa-duotone")||e.includes("fad"))&&(l.prefix="fad"),!l.prefix&&a===qt&&(ec.fass||Ve.autoFetchSvg)&&(l.prefix="fass",l.iconName=Da(l.prefix,l.iconName)||l.iconName),(l.prefix==="fa"||s==="fa")&&(l.prefix=Fs()||"fas"),l}var CJ=function(){function e(){jQ(this,e),this.definitions={}}return IQ(e,[{key:"add",value:function(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o0&&f.forEach(function(h){typeof h=="string"&&(n[a][h]=c)}),n[a][l]=c}),n}}]),e}(),jM=[],tc={},pc={},EJ=Object.keys(pc);function TJ(e,t){var n=t.mixoutsTo;return jM=e,tc={},Object.keys(pc).forEach(function(r){EJ.indexOf(r)===-1&&delete pc[r]}),jM.forEach(function(r){var i=r.mixout?r.mixout():{};if(Object.keys(i).forEach(function(s){typeof i[s]=="function"&&(n[s]=i[s]),Qg(i[s])==="object"&&Object.keys(i[s]).forEach(function(a){n[s]||(n[s]={}),n[s][a]=i[s][a]})}),r.hooks){var o=r.hooks();Object.keys(o).forEach(function(s){tc[s]||(tc[s]=[]),tc[s].push(o[s])})}r.provides&&r.provides(pc)}),n}function Cw(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i1?t-1:0),r=1;r0&&arguments[0]!==void 0?arguments[0]:{};return $o?(Ja("beforeI2svg",t),Mo("pseudoElements2svg",t),Mo("i2svg",t)):Promise.reject("Operation requires a DOM of some kind.")},watch:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot;Ve.autoReplaceSvg===!1&&(Ve.autoReplaceSvg=!0),Ve.observeMutations=!0,hJ(function(){MJ({autoReplaceSvgRoot:n}),Ja("watch",t)})}},kJ={icon:function(t){if(t===null)return null;if(Qg(t)==="object"&&t.prefix&&t.iconName)return{prefix:t.prefix,iconName:Da(t.prefix,t.iconName)||t.iconName};if(Array.isArray(t)&&t.length===2){var n=t[1].indexOf("fa-")===0?t[1].slice(3):t[1],r=a_(t[0]);return{prefix:r,iconName:Da(r,n)||n}}if(typeof t=="string"&&(t.indexOf("".concat(Ve.cssPrefix,"-"))>-1||t.match(ZQ))){var i=l_(t.split(" "),{skipLookups:!0});return{prefix:i.prefix||Fs(),iconName:Da(i.prefix,i.iconName)||i.iconName}}if(typeof t=="string"){var o=Fs();return{prefix:o,iconName:Da(o,t)||t}}}},$r={noAuto:OJ,config:Ve,dom:PJ,parse:kJ,library:_I,findIconDefinition:Ew,toHtml:qd},MJ=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot,r=n===void 0?Nt:n;(Object.keys(yi.styles).length>0||Ve.autoFetchSvg)&&$o&&Ve.autoReplaceSvg&&$r.dom.i2svg({node:r})};function c_(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(function(r){return qd(r)})}}),Object.defineProperty(e,"node",{get:function(){if($o){var r=Nt.createElement("div");return r.innerHTML=e.html,r.children}}}),e}function RJ(e){var t=e.children,n=e.main,r=e.mask,i=e.attributes,o=e.styles,s=e.transform;if(CC(s)&&n.found&&!r.found){var a=n.width,l=n.height,c={x:a/l/2,y:.5};i.style=s_(Be(Be({},o),{},{"transform-origin":"".concat(c.x+s.x/16,"em ").concat(c.y+s.y/16,"em")}))}return[{tag:"svg",attributes:i,children:t}]}function NJ(e){var t=e.prefix,n=e.iconName,r=e.children,i=e.attributes,o=e.symbol,s=o===!0?"".concat(t,"-").concat(Ve.cssPrefix,"-").concat(n):o;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:Be(Be({},i),{},{id:s}),children:r}]}]}function PC(e){var t=e.icons,n=t.main,r=t.mask,i=e.prefix,o=e.iconName,s=e.transform,a=e.symbol,l=e.title,c=e.maskId,f=e.titleId,h=e.extra,p=e.watchable,m=p===void 0?!1:p,v=r.found?r:n,y=v.width,x=v.height,_=i==="fak",w=[Ve.replacementClass,o?"".concat(Ve.cssPrefix,"-").concat(o):""].filter(function(z){return h.classes.indexOf(z)===-1}).filter(function(z){return z!==""||!!z}).concat(h.classes).join(" "),S={children:[],attributes:Be(Be({},h.attributes),{},{"data-prefix":i,"data-icon":o,class:w,role:h.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(y," ").concat(x)})},T=_&&!~h.classes.indexOf("fa-fw")?{width:"".concat(y/x*16*.0625,"em")}:{};m&&(S.attributes[Qa]=""),l&&(S.children.push({tag:"title",attributes:{id:S.attributes["aria-labelledby"]||"title-".concat(f||gd())},children:[l]}),delete S.attributes.title);var P=Be(Be({},S),{},{prefix:i,iconName:o,main:n,mask:r,maskId:c,transform:s,symbol:a,styles:Be(Be({},T),h.styles)}),k=r.found&&n.found?Mo("generateAbstractMask",P)||{children:[],attributes:{}}:Mo("generateAbstractIcon",P)||{children:[],attributes:{}},N=k.children,D=k.attributes;return P.children=N,P.attributes=D,a?NJ(P):RJ(P)}function IM(e){var t=e.content,n=e.width,r=e.height,i=e.transform,o=e.title,s=e.extra,a=e.watchable,l=a===void 0?!1:a,c=Be(Be(Be({},s.attributes),o?{title:o}:{}),{},{class:s.classes.join(" ")});l&&(c[Qa]="");var f=Be({},s.styles);CC(i)&&(f.transform=cJ({transform:i,startCentered:!0,width:n,height:r}),f["-webkit-transform"]=f.transform);var h=s_(f);h.length>0&&(c.style=h);var p=[];return p.push({tag:"span",attributes:c,children:[t]}),o&&p.push({tag:"span",attributes:{class:"sr-only"},children:[o]}),p}function LJ(e){var t=e.content,n=e.title,r=e.extra,i=Be(Be(Be({},r.attributes),n?{title:n}:{}),{},{class:r.classes.join(" ")}),o=s_(r.styles);o.length>0&&(i.style=o);var s=[];return s.push({tag:"span",attributes:i,children:[t]}),n&&s.push({tag:"span",attributes:{class:"sr-only"},children:[n]}),s}var f1=yi.styles;function Tw(e){var t=e[0],n=e[1],r=e.slice(4),i=yC(r,1),o=i[0],s=null;return Array.isArray(o)?s={tag:"g",attributes:{class:"".concat(Ve.cssPrefix,"-").concat(La.GROUP)},children:[{tag:"path",attributes:{class:"".concat(Ve.cssPrefix,"-").concat(La.SECONDARY),fill:"currentColor",d:o[0]}},{tag:"path",attributes:{class:"".concat(Ve.cssPrefix,"-").concat(La.PRIMARY),fill:"currentColor",d:o[1]}}]}:s={tag:"path",attributes:{fill:"currentColor",d:o}},{found:!0,width:t,height:n,icon:s}}var DJ={found:!1,width:512,height:512};function AJ(e,t){!oI&&!Ve.showMissingIcons&&e&&console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}function Ow(e,t){var n=t;return t==="fa"&&Ve.styleDefault!==null&&(t=Fs()),new Promise(function(r,i){if(Mo("missingIconAbstract"),n==="fa"){var o=yI(e)||{};e=o.iconName||e,t=o.prefix||t}if(e&&t&&f1[t]&&f1[t][e]){var s=f1[t][e];return r(Tw(s))}AJ(e,t),r(Be(Be({},DJ),{},{icon:Ve.showMissingIcons&&e?Mo("missingIconAbstract")||{}:{}}))})}var FM=function(){},Pw=Ve.measurePerformance&&gp&&gp.mark&&gp.measure?gp:{mark:FM,measure:FM},Xu='FA "6.3.0"',jJ=function(t){return Pw.mark("".concat(Xu," ").concat(t," begins")),function(){return bI(t)}},bI=function(t){Pw.mark("".concat(Xu," ").concat(t," ends")),Pw.measure("".concat(Xu," ").concat(t),"".concat(Xu," ").concat(t," begins"),"".concat(Xu," ").concat(t," ends"))},kC={begin:jJ,end:bI},lm=function(){};function $M(e){var t=e.getAttribute?e.getAttribute(Qa):null;return typeof t=="string"}function IJ(e){var t=e.getAttribute?e.getAttribute(bC):null,n=e.getAttribute?e.getAttribute(wC):null;return t&&n}function FJ(e){return e&&e.classList&&e.classList.contains&&e.classList.contains(Ve.replacementClass)}function $J(){if(Ve.autoReplaceSvg===!0)return cm.replace;var e=cm[Ve.autoReplaceSvg];return e||cm.replace}function BJ(e){return Nt.createElementNS("http://www.w3.org/2000/svg",e)}function zJ(e){return Nt.createElement(e)}function wI(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.ceFn,r=n===void 0?e.tag==="svg"?BJ:zJ:n;if(typeof e=="string")return Nt.createTextNode(e);var i=r(e.tag);Object.keys(e.attributes||[]).forEach(function(s){i.setAttribute(s,e.attributes[s])});var o=e.children||[];return o.forEach(function(s){i.appendChild(wI(s,{ceFn:r}))}),i}function UJ(e){var t=" ".concat(e.outerHTML," ");return t="".concat(t,"Font Awesome fontawesome.com "),t}var cm={replace:function(t){var n=t[0];if(n.parentNode)if(t[1].forEach(function(i){n.parentNode.insertBefore(wI(i),n)}),n.getAttribute(Qa)===null&&Ve.keepOriginalSource){var r=Nt.createComment(UJ(n));n.parentNode.replaceChild(r,n)}else n.remove()},nest:function(t){var n=t[0],r=t[1];if(~SC(n).indexOf(Ve.replacementClass))return cm.replace(t);var i=new RegExp("".concat(Ve.cssPrefix,"-.*"));if(delete r[0].attributes.id,r[0].attributes.class){var o=r[0].attributes.class.split(" ").reduce(function(a,l){return l===Ve.replacementClass||l.match(i)?a.toSvg.push(l):a.toNode.push(l),a},{toNode:[],toSvg:[]});r[0].attributes.class=o.toSvg.join(" "),o.toNode.length===0?n.removeAttribute("class"):n.setAttribute("class",o.toNode.join(" "))}var s=r.map(function(a){return qd(a)}).join(` `);n.setAttribute(Qa,""),n.innerHTML=s}};function BM(e){e()}function xI(e,t){var n=typeof t=="function"?t:lm;if(e.length===0)n();else{var r=BM;Ve.mutateApproach===YQ&&(r=Is.requestAnimationFrame||BM),r(function(){var i=$J(),o=kC.begin("mutate");e.map(i),o(),n()})}}var MC=!1;function SI(){MC=!0}function kw(){MC=!1}var ev=null;function zM(e){if(MM&&Ve.observeMutations){var t=e.treeCallback,n=t===void 0?lm:t,r=e.nodeCallback,i=r===void 0?lm:r,o=e.pseudoElementsCallback,s=o===void 0?lm:o,a=e.observeMutationsRoot,l=a===void 0?Nt:a;ev=new MM(function(c){if(!MC){var f=Fs();eu(c).forEach(function(h){if(h.type==="childList"&&h.addedNodes.length>0&&!$M(h.addedNodes[0])&&(Ve.searchPseudoElements&&s(h.target),n(h.target)),h.type==="attributes"&&h.target.parentNode&&Ve.searchPseudoElements&&s(h.target.parentNode),h.type==="attributes"&&$M(h.target)&&~JQ.indexOf(h.attributeName))if(h.attributeName==="class"&&IJ(h.target)){var p=l_(SC(h.target)),m=p.prefix,v=p.iconName;h.target.setAttribute(bC,m||f),v&&h.target.setAttribute(wC,v)}else FJ(h.target)&&i(h.target)})}}),$o&&ev.observe(l,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function VJ(){ev&&ev.disconnect()}function HJ(e){var t=e.getAttribute("style"),n=[];return t&&(n=t.split(";").reduce(function(r,i){var o=i.split(":"),s=o[0],a=o.slice(1);return s&&a.length>0&&(r[s]=a.join(":").trim()),r},{})),n}function WJ(e){var t=e.getAttribute("data-prefix"),n=e.getAttribute("data-icon"),r=e.innerText!==void 0?e.innerText.trim():"",i=l_(SC(e));return i.prefix||(i.prefix=Fs()),t&&n&&(i.prefix=t,i.iconName=n),i.iconName&&i.prefix||(i.prefix&&r.length>0&&(i.iconName=xJ(i.prefix,e.innerText)||TC(i.prefix,xw(e.innerText))),!i.iconName&&Ve.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(i.iconName=e.firstChild.data)),i}function YJ(e){var t=eu(e.attributes).reduce(function(i,o){return i.name!=="class"&&i.name!=="style"&&(i[o.name]=o.value),i},{}),n=e.getAttribute("title"),r=e.getAttribute("data-fa-title-id");return Ve.autoA11y&&(n?t["aria-labelledby"]="".concat(Ve.replacementClass,"-title-").concat(r||gd()):(t["aria-hidden"]="true",t.focusable="false")),t}function qJ(){return{iconName:null,title:null,titleId:null,prefix:null,transform:Yi,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function UM(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0},n=WJ(e),r=n.iconName,i=n.prefix,o=n.rest,s=YJ(e),a=Cw("parseNodeAttributes",{},e),l=t.styleParser?HJ(e):[];return Be({iconName:r,title:e.getAttribute("title"),titleId:e.getAttribute("data-fa-title-id"),prefix:i,transform:Yi,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:o,styles:l,attributes:s}},a)}var GJ=yi.styles;function CI(e){var t=Ve.autoReplaceSvg==="nest"?UM(e,{styleParser:!1}):UM(e);return~t.extra.classes.indexOf(sI)?Mo("generateLayersText",e,t):Mo("generateSvgReplacementMutation",e,t)}var $s=new Set;xC.map(function(e){$s.add("fa-".concat(e))});Object.keys(dd[Pt]).map($s.add.bind($s));Object.keys(dd[qt]).map($s.add.bind($s));$s=Wd($s);function VM(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!$o)return Promise.resolve();var n=Nt.documentElement.classList,r=function(h){return n.add("".concat(RM,"-").concat(h))},i=function(h){return n.remove("".concat(RM,"-").concat(h))},o=Ve.autoFetchSvg?$s:xC.map(function(f){return"fa-".concat(f)}).concat(Object.keys(GJ));o.includes("fa")||o.push("fa");var s=[".".concat(sI,":not([").concat(Qa,"])")].concat(o.map(function(f){return".".concat(f,":not([").concat(Qa,"])")})).join(", ");if(s.length===0)return Promise.resolve();var a=[];try{a=eu(e.querySelectorAll(s))}catch{}if(a.length>0)r("pending"),i("complete");else return Promise.resolve();var l=kC.begin("onTree"),c=a.reduce(function(f,h){try{var p=CI(h);p&&f.push(p)}catch(m){oI||m.name==="MissingIcon"&&console.error(m)}return f},[]);return new Promise(function(f,h){Promise.all(c).then(function(p){xI(p,function(){r("active"),r("complete"),i("pending"),typeof t=="function"&&t(),l(),f()})}).catch(function(p){l(),h(p)})})}function ZJ(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;CI(e).then(function(n){n&&xI([n],t)})}function KJ(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=(t||{}).icon?t:Ew(t||{}),i=n.mask;return i&&(i=(i||{}).icon?i:Ew(i||{})),e(r,Be(Be({},n),{},{mask:i}))}}var XJ=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.transform,i=r===void 0?Yi:r,o=n.symbol,s=o===void 0?!1:o,a=n.mask,l=a===void 0?null:a,c=n.maskId,f=c===void 0?null:c,h=n.title,p=h===void 0?null:h,m=n.titleId,v=m===void 0?null:m,y=n.classes,x=y===void 0?[]:y,_=n.attributes,w=_===void 0?{}:_,S=n.styles,T=S===void 0?{}:S;if(t){var P=t.prefix,k=t.iconName,N=t.icon;return c_(Be({type:"icon"},t),function(){return Ja("beforeDOMElementCreation",{iconDefinition:t,params:n}),Ve.autoA11y&&(p?w["aria-labelledby"]="".concat(Ve.replacementClass,"-title-").concat(v||gd()):(w["aria-hidden"]="true",w.focusable="false")),PC({icons:{main:Tw(N),mask:l?Tw(l.icon):{found:!1,width:null,height:null,icon:{}}},prefix:P,iconName:k,transform:Be(Be({},Yi),i),symbol:s,title:p,maskId:f,titleId:v,extra:{attributes:w,styles:T,classes:x}})})}},QJ={mixout:function(){return{icon:KJ(XJ)}},hooks:function(){return{mutationObserverCallbacks:function(n){return n.treeCallback=VM,n.nodeCallback=ZJ,n}}},provides:function(t){t.i2svg=function(n){var r=n.node,i=r===void 0?Nt:r,o=n.callback,s=o===void 0?function(){}:o;return VM(i,s)},t.generateSvgReplacementMutation=function(n,r){var i=r.iconName,o=r.title,s=r.titleId,a=r.prefix,l=r.transform,c=r.symbol,f=r.mask,h=r.maskId,p=r.extra;return new Promise(function(m,v){Promise.all([Ow(i,a),f.iconName?Ow(f.iconName,f.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(y){var x=yC(y,2),_=x[0],w=x[1];m([n,PC({icons:{main:_,mask:w},prefix:a,iconName:i,transform:l,symbol:c,maskId:h,title:o,titleId:s,extra:p,watchable:!0})])}).catch(v)})},t.generateAbstractIcon=function(n){var r=n.children,i=n.attributes,o=n.main,s=n.transform,a=n.styles,l=s_(a);l.length>0&&(i.style=l);var c;return CC(s)&&(c=Mo("generateAbstractTransformGrouping",{main:o,transform:s,containerWidth:o.width,iconWidth:o.width})),r.push(c||o.icon),{children:r,attributes:i}}}},JJ={mixout:function(){return{layer:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.classes,o=i===void 0?[]:i;return c_({type:"layer"},function(){Ja("beforeDOMElementCreation",{assembler:n,params:r});var s=[];return n(function(a){Array.isArray(a)?a.map(function(l){s=s.concat(l.abstract)}):s=s.concat(a.abstract)}),[{tag:"span",attributes:{class:["".concat(Ve.cssPrefix,"-layers")].concat(Wd(o)).join(" ")},children:s}]})}}}},eee={mixout:function(){return{counter:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.title,o=i===void 0?null:i,s=r.classes,a=s===void 0?[]:s,l=r.attributes,c=l===void 0?{}:l,f=r.styles,h=f===void 0?{}:f;return c_({type:"counter",content:n},function(){return Ja("beforeDOMElementCreation",{content:n,params:r}),LJ({content:n.toString(),title:o,extra:{attributes:c,styles:h,classes:["".concat(Ve.cssPrefix,"-layers-counter")].concat(Wd(a))}})})}}}},tee={mixout:function(){return{text:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.transform,o=i===void 0?Yi:i,s=r.title,a=s===void 0?null:s,l=r.classes,c=l===void 0?[]:l,f=r.attributes,h=f===void 0?{}:f,p=r.styles,m=p===void 0?{}:p;return c_({type:"text",content:n},function(){return Ja("beforeDOMElementCreation",{content:n,params:r}),IM({content:n,transform:Be(Be({},Yi),o),title:a,extra:{attributes:h,styles:m,classes:["".concat(Ve.cssPrefix,"-layers-text")].concat(Wd(c))}})})}}},provides:function(t){t.generateLayersText=function(n,r){var i=r.title,o=r.transform,s=r.extra,a=null,l=null;if(nI){var c=parseInt(getComputedStyle(n).fontSize,10),f=n.getBoundingClientRect();a=f.width/c,l=f.height/c}return Ve.autoA11y&&!i&&(s.attributes["aria-hidden"]="true"),Promise.resolve([n,IM({content:n.innerHTML,width:a,height:l,transform:o,title:i,extra:s,watchable:!0})])}}},nee=new RegExp('"',"ug"),HM=[1105920,1112319];function ree(e){var t=e.replace(nee,""),n=gJ(t,0),r=n>=HM[0]&&n<=HM[1],i=t.length===2?t[0]===t[1]:!1;return{value:xw(i?t[0]:t),isSecondary:r||i}}function WM(e,t){var n="".concat(WQ).concat(t.replace(":","-"));return new Promise(function(r,i){if(e.getAttribute(n)!==null)return r();var o=eu(e.children),s=o.filter(function(N){return N.getAttribute(ww)===t})[0],a=Is.getComputedStyle(e,t),l=a.getPropertyValue("font-family").match(KQ),c=a.getPropertyValue("font-weight"),f=a.getPropertyValue("content");if(s&&!l)return e.removeChild(s),r();if(l&&f!=="none"&&f!==""){var h=a.getPropertyValue("content"),p=~["Sharp"].indexOf(l[2])?qt:Pt,m=~["Solid","Regular","Light","Thin","Duotone","Brands","Kit"].indexOf(l[2])?hd[p][l[2].toLowerCase()]:XQ[p][c],v=ree(h),y=v.value,x=v.isSecondary,_=l[0].startsWith("FontAwesome"),w=TC(m,y),S=w;if(_){var T=SJ(y);T.iconName&&T.prefix&&(w=T.iconName,m=T.prefix)}if(w&&!x&&(!s||s.getAttribute(bC)!==m||s.getAttribute(wC)!==S)){e.setAttribute(n,S),s&&e.removeChild(s);var P=qJ(),k=P.extra;k.attributes[ww]=t,Ow(w,m).then(function(N){var D=PC(Be(Be({},P),{},{icons:{main:N,mask:OC()},prefix:m,iconName:S,extra:k,watchable:!0})),z=Nt.createElement("svg");t==="::before"?e.insertBefore(z,e.firstChild):e.appendChild(z),z.outerHTML=D.map(function(A){return qd(A)}).join(` `),e.removeAttribute(n),r()}).catch(i)}else r()}else r()})}function iee(e){return Promise.all([WM(e,"::before"),WM(e,"::after")])}function oee(e){return e.parentNode!==document.head&&!~qQ.indexOf(e.tagName.toUpperCase())&&!e.getAttribute(ww)&&(!e.parentNode||e.parentNode.tagName!=="svg")}function YM(e){if($o)return new Promise(function(t,n){var r=eu(e.querySelectorAll("*")).filter(oee).map(iee),i=kC.begin("searchPseudoElements");SI(),Promise.all(r).then(function(){i(),kw(),t()}).catch(function(){i(),kw(),n()})})}var see={hooks:function(){return{mutationObserverCallbacks:function(n){return n.pseudoElementsCallback=YM,n}}},provides:function(t){t.pseudoElements2svg=function(n){var r=n.node,i=r===void 0?Nt:r;Ve.searchPseudoElements&&YM(i)}}},qM=!1,aee={mixout:function(){return{dom:{unwatch:function(){SI(),qM=!0}}}},hooks:function(){return{bootstrap:function(){zM(Cw("mutationObserverCallbacks",{}))},noAuto:function(){VJ()},watch:function(n){var r=n.observeMutationsRoot;qM?kw():zM(Cw("mutationObserverCallbacks",{observeMutationsRoot:r}))}}}},GM=function(t){var n={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return t.toLowerCase().split(" ").reduce(function(r,i){var o=i.toLowerCase().split("-"),s=o[0],a=o.slice(1).join("-");if(s&&a==="h")return r.flipX=!0,r;if(s&&a==="v")return r.flipY=!0,r;if(a=parseFloat(a),isNaN(a))return r;switch(s){case"grow":r.size=r.size+a;break;case"shrink":r.size=r.size-a;break;case"left":r.x=r.x-a;break;case"right":r.x=r.x+a;break;case"up":r.y=r.y-a;break;case"down":r.y=r.y+a;break;case"rotate":r.rotate=r.rotate+a;break}return r},n)},lee={mixout:function(){return{parse:{transform:function(n){return GM(n)}}}},hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-transform");return i&&(n.transform=GM(i)),n}}},provides:function(t){t.generateAbstractTransformGrouping=function(n){var r=n.main,i=n.transform,o=n.containerWidth,s=n.iconWidth,a={transform:"translate(".concat(o/2," 256)")},l="translate(".concat(i.x*32,", ").concat(i.y*32,") "),c="scale(".concat(i.size/16*(i.flipX?-1:1),", ").concat(i.size/16*(i.flipY?-1:1),") "),f="rotate(".concat(i.rotate," 0 0)"),h={transform:"".concat(l," ").concat(c," ").concat(f)},p={transform:"translate(".concat(s/2*-1," -256)")},m={outer:a,inner:h,path:p};return{tag:"g",attributes:Be({},m.outer),children:[{tag:"g",attributes:Be({},m.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:Be(Be({},r.icon.attributes),m.path)}]}]}}}},d1={x:0,y:0,width:"100%",height:"100%"};function ZM(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return e.attributes&&(e.attributes.fill||t)&&(e.attributes.fill="black"),e}function cee(e){return e.tag==="g"?e.children:[e]}var uee={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-mask"),o=i?l_(i.split(" ").map(function(s){return s.trim()})):OC();return o.prefix||(o.prefix=Fs()),n.mask=o,n.maskId=r.getAttribute("data-fa-mask-id"),n}}},provides:function(t){t.generateAbstractMask=function(n){var r=n.children,i=n.attributes,o=n.main,s=n.mask,a=n.maskId,l=n.transform,c=o.width,f=o.icon,h=s.width,p=s.icon,m=lJ({transform:l,containerWidth:h,iconWidth:c}),v={tag:"rect",attributes:Be(Be({},d1),{},{fill:"white"})},y=f.children?{children:f.children.map(ZM)}:{},x={tag:"g",attributes:Be({},m.inner),children:[ZM(Be({tag:f.tag,attributes:Be(Be({},f.attributes),m.path)},y))]},_={tag:"g",attributes:Be({},m.outer),children:[x]},w="mask-".concat(a||gd()),S="clip-".concat(a||gd()),T={tag:"mask",attributes:Be(Be({},d1),{},{id:w,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[v,_]},P={tag:"defs",children:[{tag:"clipPath",attributes:{id:S},children:cee(p)},T]};return r.push(P,{tag:"rect",attributes:Be({fill:"currentColor","clip-path":"url(#".concat(S,")"),mask:"url(#".concat(w,")")},d1)}),{children:r,attributes:i}}}},fee={provides:function(t){var n=!1;Is.matchMedia&&(n=Is.matchMedia("(prefers-reduced-motion: reduce)").matches),t.missingIconAbstract=function(){var r=[],i={fill:"currentColor"},o={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};r.push({tag:"path",attributes:Be(Be({},i),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});var s=Be(Be({},o),{},{attributeName:"opacity"}),a={tag:"circle",attributes:Be(Be({},i),{},{cx:"256",cy:"364",r:"28"}),children:[]};return n||a.children.push({tag:"animate",attributes:Be(Be({},o),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:Be(Be({},s),{},{values:"1;0;1;1;0;1;"})}),r.push(a),r.push({tag:"path",attributes:Be(Be({},i),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:n?[]:[{tag:"animate",attributes:Be(Be({},s),{},{values:"1;0;0;0;0;1;"})}]}),n||r.push({tag:"path",attributes:Be(Be({},i),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:Be(Be({},s),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:r}}}},dee={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-symbol"),o=i===null?!1:i===""?!0:i;return n.symbol=o,n}}}},hee=[fJ,QJ,JJ,eee,tee,see,aee,lee,uee,fee,dee];TJ(hee,{mixoutsTo:$r});$r.noAuto;$r.config;$r.library;$r.dom;var Mw=$r.parse;$r.findIconDefinition;$r.toHtml;var pee=$r.icon;$r.layer;$r.text;$r.counter;var C={},mee={get exports(){return C},set exports(e){C=e}},gee="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",vee=gee,yee=vee;function EI(){}function TI(){}TI.resetWarningCache=EI;var _ee=function(){function e(r,i,o,s,a,l){if(l!==yee){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:TI,resetWarningCache:EI};return n.PropTypes=n,n};mee.exports=_ee();function KM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ms(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function wee(e,t){if(e==null)return{};var n=bee(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Rw(e){return xee(e)||See(e)||Cee(e)||Eee()}function xee(e){if(Array.isArray(e))return Nw(e)}function See(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Cee(e,t){if(e){if(typeof e=="string")return Nw(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Nw(e,t)}}function Nw(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&arguments[2]!==void 0?arguments[2]:{};if(typeof t=="string")return t;var r=(t.children||[]).map(function(l){return PI(e,l)}),i=Object.keys(t.attributes||{}).reduce(function(l,c){var f=t.attributes[c];switch(c){case"class":l.attrs.className=f,delete t.attributes.class;break;case"style":l.attrs.style=Mee(f);break;default:c.indexOf("aria-")===0||c.indexOf("data-")===0?l.attrs[c.toLowerCase()]=f:l.attrs[OI(c)]=f}return l},{attrs:{}}),o=n.style,s=o===void 0?{}:o,a=wee(n,Pee);return i.attrs.style=ms(ms({},i.attrs.style),s),e.apply(void 0,[t.tag,ms(ms({},i.attrs),a)].concat(Rw(r)))}var kI=!1;try{kI=!0}catch{}function Ree(){if(!kI&&console&&typeof console.error=="function"){var e;(e=console).error.apply(e,arguments)}}function XM(e){if(e&&tv(e)==="object"&&e.prefix&&e.iconName&&e.icon)return e;if(Mw.icon)return Mw.icon(e);if(e===null)return null;if(e&&tv(e)==="object"&&e.prefix&&e.iconName)return e;if(Array.isArray(e)&&e.length===2)return{prefix:e[0],iconName:e[1]};if(typeof e=="string")return{prefix:"fas",iconName:e}}function h1(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?nc({},e,t):{}}var je=U.forwardRef(function(e,t){var n=e.icon,r=e.mask,i=e.symbol,o=e.className,s=e.title,a=e.titleId,l=e.maskId,c=XM(n),f=h1("classes",[].concat(Rw(Tee(e)),Rw(o.split(" ")))),h=h1("transform",typeof e.transform=="string"?Mw.transform(e.transform):e.transform),p=h1("mask",XM(r)),m=pee(c,ms(ms(ms(ms({},f),h),p),{},{symbol:i,title:s,titleId:a,maskId:l}));if(!m)return Ree("Could not find icon",c),null;var v=m.abstract,y={ref:t};return Object.keys(e).forEach(function(x){je.defaultProps.hasOwnProperty(x)||(y[x]=e[x])}),Nee(v[0],y)});je.displayName="FontAwesomeIcon";je.propTypes={beat:C.bool,border:C.bool,beatFade:C.bool,bounce:C.bool,className:C.string,fade:C.bool,flash:C.bool,mask:C.oneOfType([C.object,C.array,C.string]),maskId:C.string,fixedWidth:C.bool,inverse:C.bool,flip:C.oneOf([!0,!1,"horizontal","vertical","both"]),icon:C.oneOfType([C.object,C.array,C.string]),listItem:C.bool,pull:C.oneOf(["right","left"]),pulse:C.bool,rotation:C.oneOf([0,90,180,270]),shake:C.bool,size:C.oneOf(["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:C.bool,spinPulse:C.bool,spinReverse:C.bool,symbol:C.oneOfType([C.bool,C.string]),title:C.string,titleId:C.string,transform:C.oneOfType([C.string,C.object]),swapOpacity:C.bool};je.defaultProps={border:!1,className:"",mask:null,maskId:null,fixedWidth:!1,inverse:!1,flip:!1,icon:null,listItem:!1,pull:null,pulse:!1,rotation:null,size:null,spin:!1,spinPulse:!1,spinReverse:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:null,transform:null,swapOpacity:!1};var Nee=PI.bind(null,U.createElement),MI=V.createContext(),RI=V.createContext();function QM(e){var t=e.children,n=V.useState(null),r=n[0],i=n[1],o=V.useRef(!1);V.useEffect(function(){return function(){o.current=!0}},[]);var s=V.useCallback(function(a){o.current||i(a)},[]);return V.createElement(MI.Provider,{value:r},V.createElement(RI.Provider,{value:s},t))}var NI=function(t){return Array.isArray(t)?t[0]:t},LI=function(t){if(typeof t=="function"){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i"u")return!1;var t=ii(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Wee(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Kr(o)||!eo(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var a=i[s];a===!1?o.removeAttribute(s):o.setAttribute(s,a===!0?"":a)}))})}function Yee(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(r){var i=t.elements[r],o=t.attributes[r]||{},s=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),a=s.reduce(function(l,c){return l[c]="",l},{});!Kr(i)||!eo(i)||(Object.assign(i.style,a),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const qee={name:"applyStyles",enabled:!0,phase:"write",fn:Wee,effect:Yee,requires:["computeStyles"]};function Ki(e){return e.split("-")[0]}var za=Math.max,nv=Math.min,Ac=Math.round;function Dw(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function jI(){return!/^((?!chrome|android).)*safari/i.test(Dw())}function jc(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Kr(e)&&(i=e.offsetWidth>0&&Ac(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Ac(r.height)/e.offsetHeight||1);var s=el(e)?ii(e):window,a=s.visualViewport,l=!jI()&&n,c=(r.left+(l&&a?a.offsetLeft:0))/i,f=(r.top+(l&&a?a.offsetTop:0))/o,h=r.width/i,p=r.height/o;return{width:h,height:p,top:f,right:c+h,bottom:f+p,left:c,x:c,y:f}}function LC(e){var t=jc(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function II(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&NC(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Ro(e){return ii(e).getComputedStyle(e)}function Gee(e){return["table","td","th"].indexOf(eo(e))>=0}function Js(e){return((el(e)?e.ownerDocument:e.document)||window.document).documentElement}function u_(e){return eo(e)==="html"?e:e.assignedSlot||e.parentNode||(NC(e)?e.host:null)||Js(e)}function n3(e){return!Kr(e)||Ro(e).position==="fixed"?null:e.offsetParent}function Zee(e){var t=/firefox/i.test(Dw()),n=/Trident/i.test(Dw());if(n&&Kr(e)){var r=Ro(e);if(r.position==="fixed")return null}var i=u_(e);for(NC(i)&&(i=i.host);Kr(i)&&["html","body"].indexOf(eo(i))<0;){var o=Ro(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Zd(e){for(var t=ii(e),n=n3(e);n&&Gee(n)&&Ro(n).position==="static";)n=n3(n);return n&&(eo(n)==="html"||eo(n)==="body"&&Ro(n).position==="static")?t:n||Zee(e)||t}function DC(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Ef(e,t,n){return za(e,nv(t,n))}function Kee(e,t,n){var r=Ef(e,t,n);return r>n?n:r}function FI(){return{top:0,right:0,bottom:0,left:0}}function $I(e){return Object.assign({},FI(),e)}function BI(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Xee=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,$I(typeof t!="number"?t:BI(t,Gd))};function Qee(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=Ki(n.placement),l=DC(a),c=[xr,ni].indexOf(a)>=0,f=c?"height":"width";if(!(!o||!s)){var h=Xee(i.padding,n),p=LC(o),m=l==="y"?wr:xr,v=l==="y"?ti:ni,y=n.rects.reference[f]+n.rects.reference[l]-s[l]-n.rects.popper[f],x=s[l]-n.rects.reference[l],_=Zd(o),w=_?l==="y"?_.clientHeight||0:_.clientWidth||0:0,S=y/2-x/2,T=h[m],P=w-p[f]-h[v],k=w/2-p[f]/2+S,N=Ef(T,k,P),D=l;n.modifiersData[r]=(t={},t[D]=N,t.centerOffset=N-k,t)}}function Jee(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||II(t.elements.popper,i)&&(t.elements.arrow=i))}const ete={name:"arrow",enabled:!0,phase:"main",fn:Qee,effect:Jee,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ic(e){return e.split("-")[1]}var tte={top:"auto",right:"auto",bottom:"auto",left:"auto"};function nte(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:Ac(t*i)/i||0,y:Ac(n*i)/i||0}}function r3(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,s=e.offsets,a=e.position,l=e.gpuAcceleration,c=e.adaptive,f=e.roundOffsets,h=e.isFixed,p=s.x,m=p===void 0?0:p,v=s.y,y=v===void 0?0:v,x=typeof f=="function"?f({x:m,y}):{x:m,y};m=x.x,y=x.y;var _=s.hasOwnProperty("x"),w=s.hasOwnProperty("y"),S=xr,T=wr,P=window;if(c){var k=Zd(n),N="clientHeight",D="clientWidth";if(k===ii(n)&&(k=Js(n),Ro(k).position!=="static"&&a==="absolute"&&(N="scrollHeight",D="scrollWidth")),k=k,i===wr||(i===xr||i===ni)&&o===vd){T=ti;var z=h&&k===P&&P.visualViewport?P.visualViewport.height:k[N];y-=z-r.height,y*=l?1:-1}if(i===xr||(i===wr||i===ti)&&o===vd){S=ni;var A=h&&k===P&&P.visualViewport?P.visualViewport.width:k[D];m-=A-r.width,m*=l?1:-1}}var W=Object.assign({position:a},c&&tte),Y=f===!0?nte({x:m,y}):{x:m,y};if(m=Y.x,y=Y.y,l){var J;return Object.assign({},W,(J={},J[T]=w?"0":"",J[S]=_?"0":"",J.transform=(P.devicePixelRatio||1)<=1?"translate("+m+"px, "+y+"px)":"translate3d("+m+"px, "+y+"px, 0)",J))}return Object.assign({},W,(t={},t[T]=w?y+"px":"",t[S]=_?m+"px":"",t.transform="",t))}function rte(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,s=o===void 0?!0:o,a=n.roundOffsets,l=a===void 0?!0:a,c={placement:Ki(t.placement),variation:Ic(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,r3(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,r3(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})}const ite={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:rte,data:{}};var Ep={passive:!0};function ote(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,s=r.resize,a=s===void 0?!0:s,l=ii(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(f){f.addEventListener("scroll",n.update,Ep)}),a&&l.addEventListener("resize",n.update,Ep),function(){o&&c.forEach(function(f){f.removeEventListener("scroll",n.update,Ep)}),a&&l.removeEventListener("resize",n.update,Ep)}}const ste={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:ote,data:{}};var ate={left:"right",right:"left",bottom:"top",top:"bottom"};function um(e){return e.replace(/left|right|bottom|top/g,function(t){return ate[t]})}var lte={start:"end",end:"start"};function i3(e){return e.replace(/start|end/g,function(t){return lte[t]})}function AC(e){var t=ii(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function jC(e){return jc(Js(e)).left+AC(e).scrollLeft}function cte(e,t){var n=ii(e),r=Js(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;var c=jI();(c||!c&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a+jC(e),y:l}}function ute(e){var t,n=Js(e),r=AC(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=za(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=za(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+jC(e),l=-r.scrollTop;return Ro(i||n).direction==="rtl"&&(a+=za(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}function IC(e){var t=Ro(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function zI(e){return["html","body","#document"].indexOf(eo(e))>=0?e.ownerDocument.body:Kr(e)&&IC(e)?e:zI(u_(e))}function Tf(e,t){var n;t===void 0&&(t=[]);var r=zI(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=ii(r),s=i?[o].concat(o.visualViewport||[],IC(r)?r:[]):r,a=t.concat(s);return i?a:a.concat(Tf(u_(s)))}function Aw(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function fte(e,t){var n=jc(e,!1,t==="fixed");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}function o3(e,t,n){return t===DI?Aw(cte(e,n)):el(t)?fte(t,n):Aw(ute(Js(e)))}function dte(e){var t=Tf(u_(e)),n=["absolute","fixed"].indexOf(Ro(e).position)>=0,r=n&&Kr(e)?Zd(e):e;return el(r)?t.filter(function(i){return el(i)&&II(i,r)&&eo(i)!=="body"}):[]}function hte(e,t,n,r){var i=t==="clippingParents"?dte(e):[].concat(t),o=[].concat(i,[n]),s=o[0],a=o.reduce(function(l,c){var f=o3(e,c,r);return l.top=za(f.top,l.top),l.right=nv(f.right,l.right),l.bottom=nv(f.bottom,l.bottom),l.left=za(f.left,l.left),l},o3(e,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function UI(e){var t=e.reference,n=e.element,r=e.placement,i=r?Ki(r):null,o=r?Ic(r):null,s=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2,l;switch(i){case wr:l={x:s,y:t.y-n.height};break;case ti:l={x:s,y:t.y+t.height};break;case ni:l={x:t.x+t.width,y:a};break;case xr:l={x:t.x-n.width,y:a};break;default:l={x:t.x,y:t.y}}var c=i?DC(i):null;if(c!=null){var f=c==="y"?"height":"width";switch(o){case Dc:l[c]=l[c]-(t[f]/2-n[f]/2);break;case vd:l[c]=l[c]+(t[f]/2-n[f]/2);break}}return l}function yd(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,s=o===void 0?e.strategy:o,a=n.boundary,l=a===void 0?Lee:a,c=n.rootBoundary,f=c===void 0?DI:c,h=n.elementContext,p=h===void 0?Iu:h,m=n.altBoundary,v=m===void 0?!1:m,y=n.padding,x=y===void 0?0:y,_=$I(typeof x!="number"?x:BI(x,Gd)),w=p===Iu?Dee:Iu,S=e.rects.popper,T=e.elements[v?w:p],P=hte(el(T)?T:T.contextElement||Js(e.elements.popper),l,f,s),k=jc(e.elements.reference),N=UI({reference:k,element:S,strategy:"absolute",placement:i}),D=Aw(Object.assign({},S,N)),z=p===Iu?D:k,A={top:P.top-z.top+_.top,bottom:z.bottom-P.bottom+_.bottom,left:P.left-z.left+_.left,right:z.right-P.right+_.right},W=e.modifiersData.offset;if(p===Iu&&W){var Y=W[i];Object.keys(A).forEach(function(J){var Z=[ni,ti].indexOf(J)>=0?1:-1,ee=[wr,ti].indexOf(J)>=0?"y":"x";A[J]+=Y[ee]*Z})}return A}function pte(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?AI:l,f=Ic(r),h=f?a?t3:t3.filter(function(v){return Ic(v)===f}):Gd,p=h.filter(function(v){return c.indexOf(v)>=0});p.length===0&&(p=h);var m=p.reduce(function(v,y){return v[y]=yd(e,{placement:y,boundary:i,rootBoundary:o,padding:s})[Ki(y)],v},{});return Object.keys(m).sort(function(v,y){return m[v]-m[y]})}function mte(e){if(Ki(e)===RC)return[];var t=um(e);return[i3(e),t,i3(t)]}function gte(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!0:s,l=n.fallbackPlacements,c=n.padding,f=n.boundary,h=n.rootBoundary,p=n.altBoundary,m=n.flipVariations,v=m===void 0?!0:m,y=n.allowedAutoPlacements,x=t.options.placement,_=Ki(x),w=_===x,S=l||(w||!v?[um(x)]:mte(x)),T=[x].concat(S).reduce(function(q,te){return q.concat(Ki(te)===RC?pte(t,{placement:te,boundary:f,rootBoundary:h,padding:c,flipVariations:v,allowedAutoPlacements:y}):te)},[]),P=t.rects.reference,k=t.rects.popper,N=new Map,D=!0,z=T[0],A=0;A=0,ee=Z?"width":"height",ie=yd(t,{placement:W,boundary:f,rootBoundary:h,altBoundary:p,padding:c}),oe=Z?J?ni:xr:J?ti:wr;P[ee]>k[ee]&&(oe=um(oe));var G=um(oe),F=[];if(o&&F.push(ie[Y]<=0),a&&F.push(ie[oe]<=0,ie[G]<=0),F.every(function(q){return q})){z=W,D=!1;break}N.set(W,F)}if(D)for(var j=v?3:1,B=function(te){var se=T.find(function(pe){var O=N.get(pe);if(O)return O.slice(0,te).every(function(R){return R})});if(se)return z=se,"break"},ne=j;ne>0;ne--){var H=B(ne);if(H==="break")break}t.placement!==z&&(t.modifiersData[r]._skip=!0,t.placement=z,t.reset=!0)}}const vte={name:"flip",enabled:!0,phase:"main",fn:gte,requiresIfExists:["offset"],data:{_skip:!1}};function s3(e,t,n){return n===void 0&&(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 a3(e){return[wr,ni,ti,xr].some(function(t){return e[t]>=0})}function yte(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=yd(t,{elementContext:"reference"}),a=yd(t,{altBoundary:!0}),l=s3(s,r),c=s3(a,i,o),f=a3(l),h=a3(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:f,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":h})}const _te={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:yte};function bte(e,t,n){var r=Ki(e),i=[xr,wr].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*i,[xr,ni].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}function wte(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,s=AI.reduce(function(f,h){return f[h]=bte(h,t.rects,o),f},{}),a=s[t.placement],l=a.x,c=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=s}const xte={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:wte};function Ste(e){var t=e.state,n=e.name;t.modifiersData[n]=UI({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Cte={name:"popperOffsets",enabled:!0,phase:"read",fn:Ste,data:{}};function Ete(e){return e==="x"?"y":"x"}function Tte(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!1:s,l=n.boundary,c=n.rootBoundary,f=n.altBoundary,h=n.padding,p=n.tether,m=p===void 0?!0:p,v=n.tetherOffset,y=v===void 0?0:v,x=yd(t,{boundary:l,rootBoundary:c,padding:h,altBoundary:f}),_=Ki(t.placement),w=Ic(t.placement),S=!w,T=DC(_),P=Ete(T),k=t.modifiersData.popperOffsets,N=t.rects.reference,D=t.rects.popper,z=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,A=typeof z=="number"?{mainAxis:z,altAxis:z}:Object.assign({mainAxis:0,altAxis:0},z),W=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,Y={x:0,y:0};if(k){if(o){var J,Z=T==="y"?wr:xr,ee=T==="y"?ti:ni,ie=T==="y"?"height":"width",oe=k[T],G=oe+x[Z],F=oe-x[ee],j=m?-D[ie]/2:0,B=w===Dc?N[ie]:D[ie],ne=w===Dc?-D[ie]:-N[ie],H=t.elements.arrow,q=m&&H?LC(H):{width:0,height:0},te=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:FI(),se=te[Z],pe=te[ee],O=Ef(0,N[ie],q[ie]),R=S?N[ie]/2-j-O-se-A.mainAxis:B-O-se-A.mainAxis,I=S?-N[ie]/2+j+O+pe+A.mainAxis:ne+O+pe+A.mainAxis,X=t.elements.arrow&&Zd(t.elements.arrow),K=X?T==="y"?X.clientTop||0:X.clientLeft||0:0,ae=(J=W==null?void 0:W[T])!=null?J:0,ge=oe+R-ae-K,Le=oe+I-ae,ue=Ef(m?nv(G,ge):G,oe,m?za(F,Le):F);k[T]=ue,Y[T]=ue-oe}if(a){var ve,_e=T==="x"?wr:xr,Te=T==="x"?ti:ni,De=k[P],Re=P==="y"?"height":"width",Ne=De+x[_e],ce=De-x[Te],de=[wr,xr].indexOf(_)!==-1,be=(ve=W==null?void 0:W[P])!=null?ve:0,ye=de?Ne:De-N[Re]-D[Re]-be+A.altAxis,Ce=de?De+N[Re]+D[Re]-be-A.altAxis:ce,ke=m&&de?Kee(ye,De,Ce):Ef(m?ye:Ne,De,m?Ce:ce);k[P]=ke,Y[P]=ke-De}t.modifiersData[r]=Y}}const Ote={name:"preventOverflow",enabled:!0,phase:"main",fn:Tte,requiresIfExists:["offset"]};function Pte(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function kte(e){return e===ii(e)||!Kr(e)?AC(e):Pte(e)}function Mte(e){var t=e.getBoundingClientRect(),n=Ac(t.width)/e.offsetWidth||1,r=Ac(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Rte(e,t,n){n===void 0&&(n=!1);var r=Kr(t),i=Kr(t)&&Mte(t),o=Js(t),s=jc(e,i,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((eo(t)!=="body"||IC(o))&&(a=kte(t)),Kr(t)?(l=jc(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=jC(o))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function Nte(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(a){if(!n.has(a)){var l=t.get(a);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function Lte(e){var t=Nte(e);return Hee.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function Dte(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Ate(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var l3={placement:"bottom",modifiers:[],strategy:"absolute"};function c3(){for(var e=arguments.length,t=new Array(e),n=0;n=0)&&(n[i]=e[i]);return n}function qe(e,t){if(e==null)return{};var n=Kte(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Xte(){let e=document.createElement("div");e.style.position="absolute",e.style.top="-9999px",e.style.width="50px",e.style.height="50px",e.style.overflow="scroll",document.body.appendChild(e);const t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}function FC(e){document.body.style.paddingRight=e>0?`${e}px`:null}function Qte(){return document.body.clientWidtht[n]||n).join(" "):e}function Cr(e,t){const n={};return Object.keys(e).forEach(r=>{t.indexOf(r)===-1&&(n[r]=e[r])}),n}function ZI(e,t){const n=Array.isArray(t)?t:[t];let{length:r}=n,i;const o={};for(;r>0;)r-=1,i=n[r],o[i]=e[i];return o}let d3={};function Fw(e){d3[e]||(typeof console<"u"&&console.error(e),d3[e]=!0)}function KI(e,t){return function(r,i,o,...s){return r[i]!==null&&typeof r[i]<"u"&&Fw(`"${i}" property of "${o}" has been deprecated. ${t}`),e(r,i,o,...s)}}const ene=typeof window=="object"&&window.Element||function(){};function $C(e,t,n){if(!(e[t]instanceof ene))return new Error("Invalid prop `"+t+"` supplied to `"+n+"`. Expected prop to be an instance of Element. Validation failed.")}const Bs=C.oneOfType([C.string,C.func,$C,C.shape({current:C.any})]),Pe=C.oneOfType([C.func,C.string,C.shape({$$typeof:C.symbol,render:C.func}),C.arrayOf(C.oneOfType([C.func,C.string,C.shape({$$typeof:C.symbol,render:C.func})]))]),tl={Fade:150,Collapse:350,Modal:300,Carousel:600,Offcanvas:300},rv=["in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","onEnter","onEntering","onEntered","onExit","onExiting","onExited"],go={ENTERING:"entering",ENTERED:"entered",EXITING:"exiting",EXITED:"exited"},mt={esc:27,space:32,enter:13,tab:9,up:38,down:40,home:36,end:35,n:78,p:80},tne=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],BC=!!(typeof window<"u"&&window.document&&window.document.createElement);function nne(e){return e&&typeof e=="object"?"current"in e:!1}function XI(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}function iv(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")}function h3(e){const t=typeof e,n=0/0;if(t==="number")return e;if(t==="symbol"||t==="object"&&XI(e)==="[object Symbol]")return n;if(iv(e)){const i=typeof e.valueOf=="function"?e.valueOf():e;e=iv(i)?`${i}`:i}if(t!=="string")return e===0?e:+e;e=e.replace(/^\s+|\s+$/g,"");const r=/^0b[01]+$/i.test(e);return r||/^0o[0-7]+$/i.test(e)?parseInt(e.slice(2),r?2:8):/^[-+]0x[0-9a-f]+$/i.test(e)?n:+e}function rne(e){if(!iv(e))return!1;const t=XI(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object Proxy]"}function QI(e){if(nne(e))return e.current;if(rne(e))return e();if(typeof e=="string"&&BC){let t=document.querySelectorAll(e);if(t.length||(t=document.querySelectorAll(`#${e}`)),!t.length)throw new Error(`The target '${e}' could not be identified in the dom, tip: check spelling`);return t}return e}function ov(e){return e===null?!1:Array.isArray(e)||BC&&typeof e.length=="number"}function Fc(e,t){const n=QI(e);return t?ov(n)?n:n===null?[]:[n]:ov(n)?n[0]:n}const ine=["touchstart","click"];function one(e,t,n,r){let i=e;ov(i)||(i=[i]);let o=n;if(typeof o=="string"&&(o=o.split(/\s+/)),!ov(i)||typeof t!="function"||!Array.isArray(o))throw new Error(` The first argument of this function must be DOM node or an array on DOM nodes or NodeList. The second must be a function. The third is a string or an array of strings that represents DOM events `);return Array.prototype.forEach.call(o,s=>{Array.prototype.forEach.call(i,a=>{a.addEventListener(s,t,r)})}),function(){Array.prototype.forEach.call(o,a=>{Array.prototype.forEach.call(i,l=>{l.removeEventListener(a,t,r)})})}}const JI=["a[href]","area[href]","input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","object","embed","[tabindex]:not(.modal):not(.offcanvas)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'];C.oneOfType([C.bool,C.string]),C.string,C.object;const sne=["className","cssModule","noGutters","tag","widths"],ane=["xs","sm","md","lg","xl","xxl"],Rl=C.oneOfType([C.number,C.string]),lne={tag:Pe,noGutters:KI(C.bool,"Please use Bootstrap 5 gutter utility classes. https://getbootstrap.com/docs/5.0/layout/gutters/"),className:C.string,cssModule:C.object,xs:Rl,sm:Rl,md:Rl,lg:Rl,xl:Rl,xxl:Rl,widths:C.array},cne={tag:"div",widths:ane};function Qn(e){const{className:t,cssModule:n,noGutters:r,tag:i,widths:o}=e,s=qe(e,sne),a=[];o.forEach((c,f)=>{let h=e[c];if(delete s[c],!h)return;const p=!f;a.push(p?`row-cols-${h}`:`row-cols-${c}-${h}`)});const l=Fe(me(t,r?"gx-0":null,"row",a),n);return U.createElement(i,$e({},s,{className:l}))}Qn.propTypes=lne;Qn.defaultProps=cne;const une=["className","cssModule","widths","tag"],e6=["xs","sm","md","lg","xl","xxl"],p3=C.oneOfType([C.number,C.string]),Nl=C.oneOfType([C.bool,C.number,C.string,C.shape({size:C.oneOfType([C.bool,C.number,C.string]),order:p3,offset:p3})]),fne={tag:Pe,xs:Nl,sm:Nl,md:Nl,lg:Nl,xl:Nl,xxl:Nl,className:C.string,cssModule:C.object,widths:C.array},dne={tag:"div",widths:e6},m3=(e,t,n)=>n===!0||n===""?e?"col":`col-${t}`:n==="auto"?e?"col-auto":`col-${t}-auto`:e?`col-${n}`:`col-${t}-${n}`,hne=(e,t,n=e6)=>{const r=e,i=[];return n.forEach((o,s)=>{let a=r[o];if(delete r[o],!a&&a!=="")return;const l=!s;if(iv(a)){const c=l?"-":`-${o}-`,f=m3(l,o,a.size);i.push(Fe(me({[f]:a.size||a.size==="",[`order${c}${a.order}`]:a.order||a.order===0,[`offset${c}${a.offset}`]:a.offset||a.offset===0}),t))}else{const c=m3(l,o,a);i.push(c)}}),{colClasses:i,modifiedAttributes:r}};function zC(e){const{className:t,cssModule:n,widths:r,tag:i}=e,o=qe(e,une);let{modifiedAttributes:s,colClasses:a}=hne(o,n,r);a.length||a.push("col");const l=Fe(me(t,a),n);return U.createElement(i,$e({},s,{className:l}))}zC.propTypes=fne;zC.defaultProps=dne;const pne=["expand","className","cssModule","light","dark","fixed","sticky","color","container","tag","children"],mne={children:C.node,className:C.string,color:C.string,container:C.oneOfType([C.bool,C.string]),cssModule:C.object,dark:C.bool,expand:C.oneOfType([C.bool,C.string]),fixed:C.string,full:C.bool,light:C.bool,role:C.string,sticky:C.string,tag:Pe},gne={tag:"nav",expand:!1,container:"fluid"},vne=e=>e===!1?!1:e===!0||e==="xs"?"navbar-expand":`navbar-expand-${e}`;function UC(e){const{expand:t,className:n,cssModule:r,light:i,dark:o,fixed:s,sticky:a,color:l,container:c,tag:f,children:h}=e,p=qe(e,pne),m=Fe(me(n,"navbar",vne(t),{"navbar-light":i,"navbar-dark":o,[`bg-${l}`]:l,[`fixed-${s}`]:s,[`sticky-${a}`]:a}),r),v=c&&c===!0?"container":`container-${c}`;return U.createElement(f,$e({},p,{className:m}),c?U.createElement("div",{className:v},h):h)}UC.propTypes=mne;UC.defaultProps=gne;const yne=["className","cssModule","tag"],_ne={className:C.string,cssModule:C.object,tag:Pe},bne={tag:"a"};function VC(e){const{className:t,cssModule:n,tag:r}=e,i=qe(e,yne),o=Fe(me(t,"navbar-brand"),n);return U.createElement(r,$e({},i,{className:o}))}VC.propTypes=_ne;VC.defaultProps=bne;C.string,C.object,C.bool;const wne=["className","cssModule","children","tag"],xne={className:C.string,cssModule:C.object,tag:Pe,type:C.string,children:C.node},Sne={tag:"button",type:"button"};function HC(e){const{className:t,cssModule:n,children:r,tag:i}=e,o=qe(e,wne),s=Fe(me(t,"navbar-toggler"),n);return U.createElement(i,$e({"aria-label":"Toggle navigation"},o,{className:s}),r||U.createElement("span",{className:Fe("navbar-toggler-icon",n)}))}HC.propTypes=xne;HC.defaultProps=Sne;const Cne=["className","cssModule","tabs","pills","vertical","horizontal","justified","fill","navbar","card","tag"],Ene={card:C.bool,className:C.string,cssModule:C.object,fill:C.bool,horizontal:C.oneOf(["center","end"]),justified:C.bool,navbar:C.bool,pills:C.bool,tabs:C.bool,tag:Pe,vertical:C.oneOfType([C.bool,C.string])},Tne={tag:"ul",vertical:!1},One=e=>e===!1?!1:e===!0||e==="xs"?"flex-column":`flex-${e}-column`;function f_(e){const{className:t,cssModule:n,tabs:r,pills:i,vertical:o,horizontal:s,justified:a,fill:l,navbar:c,card:f,tag:h}=e,p=qe(e,Cne),m=Fe(me(t,c?"navbar-nav":"nav",s?`justify-content-${s}`:!1,One(o),{"nav-tabs":r,"card-header-tabs":f&&r,"nav-pills":i,"card-header-pills":f&&i,"nav-justified":a,"nav-fill":l}),n);return U.createElement(h,$e({},p,{className:m}))}f_.propTypes=Ene;f_.defaultProps=Tne;const Pne=["className","cssModule","active","tag"],kne={active:C.bool,className:C.string,cssModule:C.object,tag:Pe},Mne={tag:"li"};function WC(e){const{className:t,cssModule:n,active:r,tag:i}=e,o=qe(e,Pne),s=Fe(me(t,"nav-item",r?"active":!1),n);return U.createElement(i,$e({},o,{className:s}))}WC.propTypes=kne;WC.defaultProps=Mne;const Rne=["className","cssModule","active","tag","innerRef"],Nne={active:C.bool,className:C.string,cssModule:C.object,disabled:C.bool,href:C.any,innerRef:C.oneOfType([C.object,C.func,C.string]),onClick:C.func,tag:Pe},Lne={tag:"a"};class YC extends U.Component{constructor(t){super(t),this.onClick=this.onClick.bind(this)}onClick(t){if(this.props.disabled){t.preventDefault();return}this.props.href==="#"&&t.preventDefault(),this.props.onClick&&this.props.onClick(t)}render(){let t=this.props,{className:n,cssModule:r,active:i,tag:o,innerRef:s}=t,a=qe(t,Rne);const l=Fe(me(n,"nav-link",{disabled:a.disabled,active:i}),r);return U.createElement(o,$e({},a,{ref:s,onClick:this.onClick,className:l}))}}YC.propTypes=Nne;YC.defaultProps=Lne;var t6=YC;C.string,C.node,C.string,C.object,C.string;C.bool,C.string,C.object;const Dne=["className","cssModule","variant","innerRef"],Ane={active:C.bool,"aria-label":C.string,onClick:C.func,variant:C.oneOf(["white"]),className:C.string,cssModule:C.object,innerRef:C.oneOfType([C.object,C.string,C.func])},jne={"aria-label":"close"};function qC(e){const{className:t,cssModule:n,variant:r,innerRef:i}=e,o=qe(e,Dne),s=Fe(me(t,"btn-close",r&&`btn-close-${r}`));return U.createElement("button",$e({ref:i,type:"button",className:s},o))}qC.propTypes=Ane;qC.defaultProps=jne;const Ine=["active","aria-label","block","className","close","cssModule","color","outline","size","tag","innerRef"],Fne={active:C.bool,"aria-label":C.string,block:C.bool,children:C.node,className:C.string,cssModule:C.object,close:C.bool,color:C.string,disabled:C.bool,innerRef:C.oneOfType([C.object,C.func,C.string]),onClick:C.func,outline:C.bool,size:C.string,tag:Pe},$ne={color:"secondary",tag:"button"};function ht(e){const t=V.useCallback(x=>{if(e.disabled){x.preventDefault();return}if(e.onClick)return e.onClick(x)},[e.onClick,e.disabled]);let{active:n,"aria-label":r,block:i,className:o,close:s,cssModule:a,color:l,outline:c,size:f,tag:h,innerRef:p}=e,m=qe(e,Ine);if(s)return U.createElement(qC,m);const v=`btn${c?"-outline":""}-${l}`,y=Fe(me(o,"btn",v,f?`btn-${f}`:!1,i?"d-block w-100":!1,{active:n,disabled:e.disabled}),a);return m.href&&h==="button"&&(h="a"),U.createElement(h,$e({type:h==="button"&&m.onClick?"button":void 0},m,{className:y,ref:p,onClick:t,"aria-label":r}))}ht.propTypes=Fne;ht.defaultProps=$ne;C.func,C.func,C.func,C.bool,C.string,C.object;const _d=U.createContext({}),n6=U.createContext({}),Bne=["className","cssModule","direction","isOpen","group","size","nav","setActiveFromChild","active","tag","menuRole"],zne={a11y:C.bool,disabled:C.bool,direction:C.oneOf(["up","down","start","end","left","right"]),group:C.bool,isOpen:C.bool,nav:C.bool,active:C.bool,size:C.string,tag:Pe,toggle:C.func,children:C.node,className:C.string,cssModule:C.object,dropup:C.bool,inNavbar:C.bool,setActiveFromChild:C.bool,menuRole:C.oneOf(["listbox","menu"])},Une={a11y:!0,isOpen:!1,direction:"down",nav:!1,active:!1,inNavbar:!1,setActiveFromChild:!1},Vne=[mt.space,mt.enter,mt.up,mt.down,mt.end,mt.home];class d_ extends U.Component{constructor(t){super(t),this.addEvents=this.addEvents.bind(this),this.handleDocumentClick=this.handleDocumentClick.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.removeEvents=this.removeEvents.bind(this),this.toggle=this.toggle.bind(this),this.handleMenuRef=this.handleMenuRef.bind(this),this.handleToggleRef=this.handleToggleRef.bind(this),this.containerRef=U.createRef(),this.menuRef=U.createRef(),this.toggleRef=U.createRef()}componentDidMount(){this.handleProps()}componentDidUpdate(t){this.props.isOpen!==t.isOpen&&this.handleProps()}componentWillUnmount(){this.removeEvents()}handleMenuRef(t){this.menuRef.current=t}handleToggleRef(t){this.toggleRef.current=t}handleDocumentClick(t){if(t&&(t.which===3||t.type==="keyup"&&t.which!==mt.tab))return;const n=this.getContainer(),r=this.getMenu(),i=this.getToggle(),o=t.target===i,s=r&&r.contains(t.target)&&r!==t.target;let a=!1;n&&(a=n.classList.contains("input-group")&&n.classList.contains("dropdown")&&t.target.tagName==="INPUT"),!((o&&!a||s)&&(t.type!=="keyup"||t.which===mt.tab))&&this.toggle(t)}handleKeyDown(t){const n=t.target.getAttribute("role")==="menuitem"||t.target.getAttribute("role")==="option",r=this.getMenuCtrl()===t.target,i=mt.tab===t.which;if(!(/input|textarea/i.test(t.target.tagName)||i&&!this.props.a11y||i&&!(n||r))&&((Vne.indexOf(t.which)!==-1||t.which>=48&&t.which<=90)&&t.preventDefault(),!this.props.disabled&&(r&&([mt.space,mt.enter,mt.up,mt.down].indexOf(t.which)>-1?(this.props.isOpen||this.toggle(t),setTimeout(()=>this.getMenuItems()[0].focus())):this.props.isOpen&&i?(t.preventDefault(),this.getMenuItems()[0].focus()):this.props.isOpen&&t.which===mt.esc&&this.toggle(t)),this.props.isOpen&&n))){if([mt.tab,mt.esc].indexOf(t.which)>-1)this.toggle(t),this.getMenuCtrl().focus();else if([mt.space,mt.enter].indexOf(t.which)>-1)t.target.click(),this.getMenuCtrl().focus();else if([mt.down,mt.up].indexOf(t.which)>-1||[mt.n,mt.p].indexOf(t.which)>-1&&t.ctrlKey){const o=this.getMenuItems();let s=o.indexOf(t.target);mt.up===t.which||mt.p===t.which&&t.ctrlKey?s=s!==0?s-1:o.length-1:(mt.down===t.which||mt.n===t.which&&t.ctrlKey)&&(s=s===o.length-1?0:s+1),o[s].focus()}else if(mt.end===t.which){const o=this.getMenuItems();o[o.length-1].focus()}else if(mt.home===t.which)this.getMenuItems()[0].focus();else if(t.which>=48&&t.which<=90){const o=this.getMenuItems(),s=String.fromCharCode(t.which).toLowerCase();for(let a=0;adocument.addEventListener(t,this.handleDocumentClick,!0))}removeEvents(){["click","touchstart","keyup"].forEach(t=>document.removeEventListener(t,this.handleDocumentClick,!0))}toggle(t){return this.props.disabled?t&&t.preventDefault():this.props.toggle(t)}render(){const t=Cr(this.props,["toggle","disabled","inNavbar","a11y"]),{className:n,cssModule:r,direction:i,isOpen:o,group:s,size:a,nav:l,setActiveFromChild:c,active:f,tag:h,menuRole:p}=t,m=qe(t,Bne),v=h||(l?"li":"div");let y=!1;c&&U.Children.map(this.props.children[1].props.children,_=>{_&&_.props.active&&(y=!0)});const x=Fe(me(n,l&&f?"active":!1,c&&y?"active":!1,{"btn-group":s,[`btn-group-${a}`]:!!a,dropdown:!s,dropup:i==="up",dropstart:i==="start"||i==="left",dropend:i==="end"||i==="right",show:o,"nav-item":l}),r);return this.context.insideInputGroup?U.createElement(_d.Provider,{value:this.getContextValue()},U.createElement(QM,null,U.Children.map(this.props.children,_=>U.cloneElement(_,{onKeyDown:this.handleKeyDown})))):U.createElement(_d.Provider,{value:this.getContextValue()},U.createElement(QM,null,U.createElement(v,$e({},m,{[typeof v=="string"?"ref":"innerRef"]:this.containerRef,onKeyDown:this.handleKeyDown,className:x}))))}}d_.propTypes=zne;d_.defaultProps=Une;d_.contextType=n6;var tu=d_;const Hne={children:C.node};function h_(e){return U.createElement(tu,$e({group:!0},e))}h_.propTypes=Hne;C.string,C.string,C.object,C.string,C.string,C.bool;C.string,C.string,C.object,C.string;const Wne=["className","cssModule","divider","tag","header","active","text"],Yne={children:C.node,active:C.bool,disabled:C.bool,divider:C.bool,tag:Pe,header:C.bool,onClick:C.func,className:C.string,cssModule:C.object,toggle:C.bool,text:C.bool},qne={tag:"button",toggle:!0};class p_ extends U.Component{constructor(t){super(t),this.onClick=this.onClick.bind(this),this.getTabIndex=this.getTabIndex.bind(this)}onClick(t){const{disabled:n,header:r,divider:i,text:o}=this.props;if(n||r||i||o){t.preventDefault();return}this.props.onClick&&this.props.onClick(t),this.props.toggle&&this.context.toggle(t)}getRole(){return this.context.menuRole==="listbox"?"option":"menuitem"}getTabIndex(){const{disabled:t,header:n,divider:r,text:i}=this.props;return t||n||r||i?"-1":"0"}render(){const t=this.getTabIndex(),n=t>-1?this.getRole():void 0;let r=Cr(this.props,["toggle"]),{className:i,cssModule:o,divider:s,tag:a,header:l,active:c,text:f}=r,h=qe(r,Wne);const p=Fe(me(i,{disabled:h.disabled,"dropdown-item":!s&&!l&&!f,active:c,"dropdown-header":l,"dropdown-divider":s,"dropdown-item-text":f}),o);return a==="button"&&(l?a="h6":s?a="div":h.href?a="a":f&&(a="span")),U.createElement(a,$e({type:a==="button"&&(h.onClick||this.props.toggle)?"button":void 0},h,{tabIndex:t,role:n,className:p,onClick:this.onClick}))}}p_.propTypes=Yne;p_.defaultProps=qne;p_.contextType=_d;var Ue=p_;const Gne=["className","cssModule","dark","end","right","tag","flip","modifiers","persist","strategy","container","updateOnSelect"],Zne={tag:Pe,children:C.node.isRequired,dark:C.bool,end:C.bool,flip:C.bool,modifiers:C.array,className:C.string,cssModule:C.object,style:C.object,persist:C.bool,strategy:C.string,container:Bs,updateOnSelect:C.bool,right:KI(C.bool,'Please use "end" instead.')},Kne={tag:"div",flip:!0,modifiers:[]},Xne={up:"top",left:"left",right:"right",start:"left",end:"right",down:"bottom"};class m_ extends U.Component{getRole(){return this.context.menuRole==="listbox"?"listbox":"menu"}render(){const t=this.props,{className:n,cssModule:r,dark:i,end:o,right:s,tag:a,flip:l,modifiers:c,persist:f,strategy:h,container:p,updateOnSelect:m}=t,v=qe(t,Gne),y=Fe(me(n,"dropdown-menu",{"dropdown-menu-dark":i,"dropdown-menu-end":o||s,show:this.context.isOpen}),r),x=a;if(f||this.context.isOpen&&!this.context.inNavbar){const T=`${Xne[this.context.direction]||"bottom"}-${o||s?"end":"start"}`,P=[...c,{name:"flip",enabled:!!l}],k=U.createElement(WI,{placement:T,modifiers:P,strategy:h},({ref:N,style:D,placement:z,update:A})=>{let W=We(We({},this.props.style),D);const Y=J=>{N(J);const{onMenuRef:Z}=this.context;Z&&Z(J)};return U.createElement(x,$e({tabIndex:"-1",role:this.getRole(),ref:Y},v,{style:W,"aria-hidden":!this.context.isOpen,className:y,"data-popper-placement":z,onClick:()=>m&&A()}))});return p?$a.createPortal(k,Fc(p)):k}const{onMenuRef:_}=this.context;return U.createElement(x,$e({tabIndex:"-1",role:this.getRole()},v,{ref:_,"aria-hidden":!this.context.isOpen,className:y,"data-popper-placement":v.placement}))}}m_.propTypes=Zne;m_.defaultProps=Kne;m_.contextType=_d;var hl=m_;const Qne=["className","color","cssModule","caret","split","nav","tag","innerRef"],Jne={caret:C.bool,color:C.string,children:C.node,className:C.string,cssModule:C.object,disabled:C.bool,onClick:C.func,"aria-haspopup":C.bool,split:C.bool,tag:Pe,nav:C.bool,innerRef:C.oneOfType([C.object,C.string,C.func])},ere={color:"secondary","aria-haspopup":!0};class g_ extends U.Component{constructor(t){super(t),this.onClick=this.onClick.bind(this)}onClick(t){if(this.props.disabled||this.context.disabled){t.preventDefault();return}this.props.nav&&!this.props.tag&&t.preventDefault(),this.props.onClick&&this.props.onClick(t),this.context.toggle(t)}getRole(){return this.context.menuRole||this.props["aria-haspopup"]}render(){const t=this.props,{className:n,color:r,cssModule:i,caret:o,split:s,nav:a,tag:l,innerRef:c}=t,f=qe(t,Qne),h=f["aria-label"]||"Toggle Dropdown",p=Fe(me(n,{"dropdown-toggle":o||s,"dropdown-toggle-split":s,"nav-link":a}),i),m=typeof f.children<"u"?f.children:U.createElement("span",{className:"visually-hidden"},h);let v;return a&&!l?(v="a",f.href="#"):l?v=l:(v=ht,f.color=r,f.cssModule=i),this.context.inNavbar?U.createElement(v,$e({},f,{className:p,onClick:this.onClick,ref:this.context.onToggleRef,"aria-expanded":this.context.isOpen,"aria-haspopup":this.getRole(),children:m})):U.createElement(qte,{innerRef:c},({ref:y})=>{const x=_=>{y(_);const{onToggleRef:w}=this.context;w&&w(_)};return U.createElement(v,$e({},f,{[typeof v=="string"?"ref":"innerRef"]:x,className:p,onClick:this.onClick,"aria-expanded":this.context.isOpen,"aria-haspopup":this.getRole(),children:m}))})}}g_.propTypes=Jne;g_.defaultProps=ere;g_.contextType=_d;var nu=g_;const tre=["tag","baseClass","baseClassActive","className","cssModule","children","innerRef"],nre=We(We({},zo.propTypes),{},{children:C.oneOfType([C.arrayOf(C.node),C.node]),tag:Pe,baseClass:C.string,baseClassActive:C.string,className:C.string,cssModule:C.object,innerRef:C.oneOfType([C.object,C.string,C.func])}),rre=We(We({},zo.defaultProps),{},{tag:"div",baseClass:"fade",baseClassActive:"show",timeout:tl.Fade,appear:!0,enter:!0,exit:!0,in:!0});function Kt(e){const{tag:t,baseClass:n,baseClassActive:r,className:i,cssModule:o,children:s,innerRef:a}=e,l=qe(e,tre),c=ZI(l,rv),f=Cr(l,rv);return U.createElement(zo,c,h=>{const m=Fe(me(i,n,h==="entered"&&r),o);return U.createElement(t,$e({className:m},f,{ref:a}),s)})}Kt.propTypes=nre;Kt.defaultProps=rre;U.createContext({});C.node,C.string,C.object,C.bool,C.oneOfType([C.object,C.string,C.func]),C.oneOfType([C.array,C.string]).isRequired,C.func.isRequired;C.string,C.object,C.oneOfType([C.object,C.string,C.func]),C.node,C.oneOfType([C.array,C.string]),C.bool;C.node,C.string,C.object,C.oneOfType([C.object,C.string,C.func]),C.string.isRequired;C.node,C.string,C.object,C.oneOfType([C.object,C.string,C.func]);const ire=["tag","horizontal","isOpen","className","navbar","cssModule","children","innerRef"],ore=We(We({},zo.propTypes),{},{horizontal:C.bool,isOpen:C.bool,children:C.oneOfType([C.arrayOf(C.node),C.node]),tag:Pe,className:C.node,navbar:C.bool,cssModule:C.object,innerRef:C.shape({current:C.object})}),sre=We(We({},zo.defaultProps),{},{horizontal:!1,isOpen:!1,appear:!1,enter:!0,exit:!0,tag:"div",timeout:tl.Collapse}),are={[go.ENTERING]:"collapsing",[go.ENTERED]:"collapse show",[go.EXITING]:"collapsing",[go.EXITED]:"collapse"};function lre(e){return are[e]||"collapse"}class GC extends V.Component{constructor(t){super(t),this.state={dimension:null},this.nodeRef=t.innerRef||U.createRef(),["onEntering","onEntered","onExit","onExiting","onExited"].forEach(n=>{this[n]=this[n].bind(this)})}onEntering(t,n){const r=this.getNode();this.setState({dimension:this.getDimension(r)}),this.props.onEntering(r,n)}onEntered(t,n){const r=this.getNode();this.setState({dimension:null}),this.props.onEntered(r,n)}onExit(){const t=this.getNode();this.setState({dimension:this.getDimension(t)}),this.props.onExit(t)}onExiting(){const t=this.getNode();this.getDimension(t),this.setState({dimension:0}),this.props.onExiting(t)}onExited(){const t=this.getNode();this.setState({dimension:null}),this.props.onExited(t)}getNode(){return this.nodeRef.current}getDimension(t){return this.props.horizontal?t.scrollWidth:t.scrollHeight}render(){const t=this.props,{tag:n,horizontal:r,isOpen:i,className:o,navbar:s,cssModule:a,children:l,innerRef:c}=t,f=qe(t,ire),{dimension:h}=this.state,p=ZI(f,rv),m=Cr(f,rv);return U.createElement(zo,$e({},p,{in:i,nodeRef:this.nodeRef,onEntering:this.onEntering,onEntered:this.onEntered,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}),v=>{let y=lre(v);const x=Fe(me(o,r&&"collapse-horizontal",y,s&&"navbar-collapse"),a),_=h===null?null:{[r?"width":"height"]:h};return U.createElement(n,$e({},m,{style:We(We({},m.style),_),className:x,ref:this.nodeRef}),l)})}}GC.propTypes=ore;GC.defaultProps=sre;var r6=GC;C.string.isRequired,C.string,C.node,C.object,C.oneOfType([C.object,C.string,C.func]);C.node,C.string,C.string,C.object,C.oneOfType([C.object,C.func,C.string]),C.bool;const cre=["className","cssModule","color","body","inverse","outline","tag","innerRef"],ure={body:C.bool,className:C.string,color:C.string,cssModule:C.object,innerRef:C.oneOfType([C.object,C.string,C.func]),inverse:C.bool,outline:C.bool,tag:Pe},fre={tag:"div"};function Sr(e){const{className:t,cssModule:n,color:r,body:i,inverse:o,outline:s,tag:a,innerRef:l}=e,c=qe(e,cre),f=Fe(me(t,"card",o?"text-white":!1,i?"card-body":!1,r?`${s?"border":"bg"}-${r}`:!1),n);return U.createElement(a,$e({},c,{className:f,ref:l}))}Sr.propTypes=ure;Sr.defaultProps=fre;C.string,C.object;C.string,C.object;C.string,C.object;const dre=["className","cssModule","innerRef","tag"],hre={className:C.string,cssModule:C.object,innerRef:C.oneOfType([C.object,C.string,C.func]),tag:Pe},pre={tag:"div"};function nl(e){const{className:t,cssModule:n,innerRef:r,tag:i}=e,o=qe(e,dre),s=Fe(me(t,"card-body"),n);return U.createElement(i,$e({},o,{className:s,ref:r}))}nl.propTypes=hre;nl.defaultProps=pre;C.oneOfType([C.object,C.func,C.string]),C.string,C.object;const mre=["className","cssModule","tag"],gre={className:C.string,cssModule:C.object,tag:Pe},vre={tag:"div"};function ZC(e){const{className:t,cssModule:n,tag:r}=e,i=qe(e,mre),o=Fe(me(t,"card-footer"),n);return U.createElement(r,$e({},i,{className:o}))}ZC.propTypes=gre;ZC.defaultProps=vre;const yre=["className","cssModule","tag"],_re={className:C.string,cssModule:C.object,tag:Pe},bre={tag:"div"};function rl(e){const{className:t,cssModule:n,tag:r}=e,i=qe(e,yre),o=Fe(me(t,"card-header"),n);return U.createElement(r,$e({},i,{className:o}))}rl.propTypes=_re;rl.defaultProps=bre;C.bool,C.string,C.object,C.bool;C.string,C.object;const dm=U.createContext({}),wre=["in","children","cssModule","slide","tag","className"];class v_ extends U.Component{constructor(t){super(t),this.state={startAnimation:!1},this.onEnter=this.onEnter.bind(this),this.onEntering=this.onEntering.bind(this),this.onExit=this.onExit.bind(this),this.onExiting=this.onExiting.bind(this),this.onExited=this.onExited.bind(this)}onEnter(t,n){this.setState({startAnimation:!1}),this.props.onEnter(t,n)}onEntering(t,n){const{offsetHeight:r}=t;return this.setState({startAnimation:!0}),this.props.onEntering(t,n),r}onExit(t){this.setState({startAnimation:!1}),this.props.onExit(t)}onExiting(t){this.setState({startAnimation:!0}),t.dispatchEvent(new CustomEvent("slide.bs.carousel")),this.props.onExiting(t)}onExited(t){t.dispatchEvent(new CustomEvent("slid.bs.carousel")),this.props.onExited(t)}render(){const t=this.props,{in:n,children:r,cssModule:i,slide:o,tag:s,className:a}=t,l=qe(t,wre);return U.createElement(zo,$e({},l,{enter:o,exit:o,in:n,onEnter:this.onEnter,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}),c=>{const{direction:f}=this.context,h=c===go.ENTERED||c===go.EXITING,p=(c===go.ENTERING||c===go.EXITING)&&this.state.startAnimation&&(f==="end"?"carousel-item-start":"carousel-item-end"),m=c===go.ENTERING&&(f==="end"?"carousel-item-next":"carousel-item-prev"),v=Fe(me(a,"carousel-item",h&&"active",p,m),i);return U.createElement(s,{className:v},r)})}}v_.propTypes=We(We({},zo.propTypes),{},{tag:Pe,in:C.bool,cssModule:C.object,children:C.node,slide:C.bool,className:C.string});v_.defaultProps=We(We({},zo.defaultProps),{},{tag:"div",timeout:tl.Carousel,slide:!0});v_.contextType=dm;var i6=v_;const xre=40,o6={activeIndex:C.number,next:C.func.isRequired,previous:C.func.isRequired,keyboard:C.bool,pause:C.oneOf(["hover",!1]),ride:C.oneOf(["carousel"]),interval:C.oneOfType([C.number,C.string,C.bool]),children:C.array,mouseEnter:C.func,mouseLeave:C.func,slide:C.bool,dark:C.bool,fade:C.bool,cssModule:C.object,className:C.string,enableTouch:C.bool},Sre=Object.keys(o6),Cre={interval:5e3,pause:"hover",keyboard:!0,slide:!0,enableTouch:!0,fade:!1};class KC extends U.Component{constructor(t){super(t),this.handleKeyPress=this.handleKeyPress.bind(this),this.renderItems=this.renderItems.bind(this),this.hoverStart=this.hoverStart.bind(this),this.hoverEnd=this.hoverEnd.bind(this),this.handleTouchStart=this.handleTouchStart.bind(this),this.handleTouchEnd=this.handleTouchEnd.bind(this),this.touchStartX=0,this.touchStartY=0,this.state={activeIndex:this.props.activeIndex,direction:"end",indicatorClicked:!1}}componentDidMount(){this.props.ride==="carousel"&&this.setInterval(),document.addEventListener("keyup",this.handleKeyPress)}static getDerivedStateFromProps(t,n){let r=null,{activeIndex:i,direction:o,indicatorClicked:s}=n;return t.activeIndex!==i&&(t.activeIndex===i+1?o="end":t.activeIndex===i-1?o="start":t.activeIndex{this.props.next()},parseInt(this.props.interval,10)))}clearInterval(){clearInterval(this.cycleInterval)}hoverStart(...t){this.props.pause==="hover"&&this.clearInterval(),this.props.mouseEnter&&this.props.mouseEnter(...t)}hoverEnd(...t){this.props.pause==="hover"&&this.setInterval(),this.props.mouseLeave&&this.props.mouseLeave(...t)}renderItems(t,n){const{slide:r}=this.props;return U.createElement("div",{className:n},t.map((i,o)=>{const s=o===this.state.activeIndex;return U.cloneElement(i,{in:s,slide:r})}))}render(){const{cssModule:t,slide:n,className:r,dark:i,fade:o}=this.props,s=Cr(this.props,Sre),a=Fe(me(r,"carousel",o&&"carousel-fade",n&&"slide",i&&"carousel-dark"),t),l=Fe(me("carousel-inner"),t),c=this.props.children.filter(_=>_!=null&&typeof _!="boolean");if(c.every(_=>_.type===i6))return U.createElement("div",$e({},s,{className:a,onMouseEnter:this.hoverStart,onMouseLeave:this.hoverEnd}),U.createElement(dm.Provider,{value:this.getContextValue()},this.renderItems(c,l)));if(c[0]instanceof Array){const _=c[0],w=c[1],S=c[2];return U.createElement("div",$e({},s,{className:a,onMouseEnter:this.hoverStart,onMouseLeave:this.hoverEnd}),U.createElement(dm.Provider,{value:this.getContextValue()},this.renderItems(_,l),w,S))}const h=c[0],p=_=>{typeof h.props.onClickHandler=="function"&&this.setState({indicatorClicked:!0},()=>h.props.onClickHandler(_))},m=U.cloneElement(h,{onClickHandler:p}),v=c[1],y=c[2],x=c[3];return U.createElement("div",$e({},s,{className:a,onMouseEnter:this.hoverStart,onMouseLeave:this.hoverEnd,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd}),U.createElement(dm.Provider,{value:this.getContextValue()},m,this.renderItems(v,l),y,x))}}KC.propTypes=o6;KC.defaultProps=Cre;var Ere=KC;const Tre=["direction","onClickHandler","cssModule","directionText","className"];function $w(e){const{direction:t,onClickHandler:n,cssModule:r,directionText:i,className:o}=e,s=qe(e,Tre),a=Fe(me(o,`carousel-control-${t}`),r),l=Fe(me(`carousel-control-${t}-icon`),r),c=Fe(me("visually-hidden"),r);return U.createElement("a",$e({},s,{className:a,style:{cursor:"pointer"},role:"button",tabIndex:"0",onClick:f=>{f.preventDefault(),n()}}),U.createElement("span",{className:l,"aria-hidden":"true"}),U.createElement("span",{className:c},i||t))}$w.propTypes={direction:C.oneOf(["prev","next"]).isRequired,onClickHandler:C.func.isRequired,cssModule:C.object,directionText:C.string,className:C.string};const Ore=["items","activeIndex","cssModule","onClickHandler","className"];function s6(e){const{items:t,activeIndex:n,cssModule:r,onClickHandler:i,className:o}=e,s=qe(e,Ore),a=Fe(me(o,"carousel-indicators"),r),l=t.map((c,f)=>{const h=Fe(me({active:n===f}),r);return U.createElement("button",{"aria-label":c.caption,"data-bs-target":!0,type:"button",key:`${c.key||Object.values(c).join("")}`,onClick:p=>{p.preventDefault(),i(f)},className:h})});return U.createElement("div",$e({className:a},s),l)}s6.propTypes={activeIndex:C.number.isRequired,className:C.string,cssModule:C.object,items:C.array.isRequired,onClickHandler:C.func.isRequired};function a6(e){const{captionHeader:t,captionText:n,cssModule:r,className:i}=e,o=Fe(me(i,"carousel-caption","d-none","d-md-block"),r);return U.createElement("div",{className:o},U.createElement("h3",null,t),U.createElement("p",null,n))}a6.propTypes={captionHeader:C.node,captionText:C.node.isRequired,className:C.string,cssModule:C.object};const Pre=["defaultActiveIndex","autoPlay","indicators","controls","items","goToIndex"],kre={items:C.array.isRequired,indicators:C.bool,controls:C.bool,autoPlay:C.bool,defaultActiveIndex:C.number,activeIndex:C.number,next:C.func,previous:C.func,goToIndex:C.func};class l6 extends V.Component{constructor(t){super(t),this.animating=!1,this.state={activeIndex:t.defaultActiveIndex||0},this.next=this.next.bind(this),this.previous=this.previous.bind(this),this.goToIndex=this.goToIndex.bind(this),this.onExiting=this.onExiting.bind(this),this.onExited=this.onExited.bind(this)}onExiting(){this.animating=!0}onExited(){this.animating=!1}next(){this.animating||this.setState(t=>({activeIndex:t.activeIndex===this.props.items.length-1?0:t.activeIndex+1}))}previous(){this.animating||this.setState(t=>({activeIndex:t.activeIndex===0?this.props.items.length-1:t.activeIndex-1}))}goToIndex(t){this.animating||this.setState({activeIndex:t})}render(){const t=this.props,{defaultActiveIndex:n,autoPlay:r,indicators:i,controls:o,items:s,goToIndex:a}=t,l=qe(t,Pre),{activeIndex:c}=this.state,f=s.map(h=>{const p=h.key||h.src;return U.createElement(i6,{onExiting:this.onExiting,onExited:this.onExited,key:p},U.createElement("img",{className:"d-block w-100",src:h.src,alt:h.altText}),U.createElement(a6,{captionText:h.caption,captionHeader:h.header||h.caption}))});return U.createElement(Ere,$e({activeIndex:c,next:this.next,previous:this.previous,ride:r?"carousel":void 0},l),i&&U.createElement(s6,{items:s,activeIndex:l.activeIndex||c,onClickHandler:a||this.goToIndex}),f,o&&U.createElement($w,{direction:"prev",directionText:"Previous",onClickHandler:l.previous||this.previous}),o&&U.createElement($w,{direction:"next",directionText:"Next",onClickHandler:l.next||this.next}))}}l6.propTypes=kre;l6.defaultProps={controls:!0,indicators:!0,autoPlay:!0};C.string,C.object;const Mre=["className","cssModule","tag"],Rre={className:C.string,cssModule:C.object,tag:Pe},Nre={tag:"p"};function XC(e){const{className:t,cssModule:n,tag:r}=e,i=qe(e,Mre),o=Fe(me(t,"card-text"),n);return U.createElement(r,$e({},i,{className:o}))}XC.propTypes=Rre;XC.defaultProps=Nre;const Lre=["className","cssModule","tag"],Dre={className:C.string,cssModule:C.object,tag:Pe},Are={tag:"div"};function QC(e){const{className:t,cssModule:n,tag:r}=e,i=qe(e,Lre),o=Fe(me(t,"card-title"),n);return U.createElement(r,$e({},i,{className:o}))}QC.propTypes=Dre;QC.defaultProps=Are;const jre=["cssModule","children","isOpen","flip","target","offset","fallbackPlacements","placementPrefix","arrowClassName","hideArrow","popperClassName","tag","container","modifiers","strategy","boundariesElement","onClosed","fade","transition","placement"];function Ire(){}const Fre={children:C.oneOfType([C.node,C.func]).isRequired,popperClassName:C.string,placement:C.string,placementPrefix:C.string,arrowClassName:C.string,hideArrow:C.bool,tag:Pe,isOpen:C.bool,cssModule:C.object,offset:C.arrayOf(C.number),fallbackPlacements:C.array,flip:C.bool,container:Bs,target:Bs.isRequired,modifiers:C.array,strategy:C.string,boundariesElement:C.oneOfType([C.string,$C]),onClosed:C.func,fade:C.bool,transition:C.shape(Kt.propTypes)},$re={boundariesElement:"scrollParent",placement:"auto",hideArrow:!1,isOpen:!1,offset:[0,0],flip:!0,container:"body",modifiers:[],onClosed:Ire,fade:!0,transition:We({},Kt.defaultProps)};class JC extends U.Component{constructor(t){super(t),this.setTargetNode=this.setTargetNode.bind(this),this.getTargetNode=this.getTargetNode.bind(this),this.getRef=this.getRef.bind(this),this.onClosed=this.onClosed.bind(this),this.state={isOpen:t.isOpen}}static getDerivedStateFromProps(t,n){return t.isOpen&&!n.isOpen?{isOpen:t.isOpen}:null}componentDidUpdate(){this._element&&this._element.childNodes&&this._element.childNodes[0]&&this._element.childNodes[0].focus&&this._element.childNodes[0].focus()}onClosed(){this.props.onClosed(),this.setState({isOpen:!1})}getTargetNode(){return this.targetNode}getContainerNode(){return Fc(this.props.container)}getRef(t){this._element=t}setTargetNode(t){this.targetNode=typeof t=="string"?Fc(t):t}renderChildren(){const t=this.props,{cssModule:n,children:r,isOpen:i,flip:o,target:s,offset:a,fallbackPlacements:l,placementPrefix:c,arrowClassName:f,hideArrow:h,popperClassName:p,tag:m,container:v,modifiers:y,strategy:x,boundariesElement:_,onClosed:w,fade:S,transition:T,placement:P}=t,k=qe(t,jre),N=Fe(me("arrow",f),n),D=Fe(me(p,c?`${c}-auto`:""),this.props.cssModule),z=y.map(J=>J.name),W=[...[{name:"offset",options:{offset:a}},{name:"flip",enabled:o,options:{fallbackPlacements:l}},{name:"preventOverflow",options:{boundary:_}}].filter(J=>!z.includes(J.name)),...y],Y=We(We(We({},Kt.defaultProps),T),{},{baseClass:S?T.baseClass:"",timeout:S?T.timeout:0});return U.createElement(Kt,$e({},Y,k,{in:i,onExited:this.onClosed,tag:m}),U.createElement(WI,{referenceElement:this.targetNode,modifiers:W,placement:P,strategy:x},({ref:J,style:Z,placement:ee,isReferenceHidden:ie,arrowProps:oe,update:G})=>U.createElement("div",{ref:J,style:Z,className:D,"data-popper-placement":ee,"data-popper-reference-hidden":ie?"true":void 0},typeof r=="function"?r({update:G}):r,!h&&U.createElement("span",{ref:oe.ref,className:N,style:oe.style}))))}render(){return this.setTargetNode(this.props.target),this.state.isOpen?this.props.container==="inline"?this.renderChildren():$a.createPortal(U.createElement("div",{ref:this.getRef},this.renderChildren()),this.getContainerNode()):null}}JC.propTypes=Fre;JC.defaultProps=$re;var Bre=JC;C.object.isRequired;Bs.isRequired;const y_={children:C.oneOfType([C.node,C.func]),placement:C.oneOf(tne),target:Bs.isRequired,container:Bs,isOpen:C.bool,disabled:C.bool,hideArrow:C.bool,boundariesElement:C.oneOfType([C.string,$C]),className:C.string,innerClassName:C.string,arrowClassName:C.string,popperClassName:C.string,cssModule:C.object,toggle:C.func,autohide:C.bool,placementPrefix:C.string,delay:C.oneOfType([C.shape({show:C.number,hide:C.number}),C.number]),modifiers:C.array,strategy:C.string,offset:C.arrayOf(C.number),innerRef:C.oneOfType([C.func,C.string,C.object]),trigger:C.string,fade:C.bool,flip:C.bool},c6={show:0,hide:50},zre={isOpen:!1,hideArrow:!1,autohide:!1,delay:c6,toggle:function(){},trigger:"click",fade:!0};function u6(e,t){return t&&(e===t||t.contains(e))}function g3(e,t=[]){return t&&t.length&&t.filter(n=>u6(e,n))[0]}class eE extends U.Component{constructor(t){super(t),this._targets=[],this.currentTargetElement=null,this.addTargetEvents=this.addTargetEvents.bind(this),this.handleDocumentClick=this.handleDocumentClick.bind(this),this.removeTargetEvents=this.removeTargetEvents.bind(this),this.toggle=this.toggle.bind(this),this.showWithDelay=this.showWithDelay.bind(this),this.hideWithDelay=this.hideWithDelay.bind(this),this.onMouseOverTooltipContent=this.onMouseOverTooltipContent.bind(this),this.onMouseLeaveTooltipContent=this.onMouseLeaveTooltipContent.bind(this),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.onEscKeyDown=this.onEscKeyDown.bind(this),this.getRef=this.getRef.bind(this),this.state={isOpen:t.isOpen},this._isMounted=!1}componentDidMount(){this._isMounted=!0,this.updateTarget()}componentWillUnmount(){this._isMounted=!1,this.removeTargetEvents(),this._targets=null,this.clearShowTimeout(),this.clearHideTimeout()}static getDerivedStateFromProps(t,n){return t.isOpen&&!n.isOpen?{isOpen:t.isOpen}:null}handleDocumentClick(t){const n=this.props.trigger.split(" ");n.indexOf("legacy")>-1&&(this.props.isOpen||g3(t.target,this._targets))?(this._hideTimeout&&this.clearHideTimeout(),this.props.isOpen&&!u6(t.target,this._popover)?this.hideWithDelay(t):this.props.isOpen||this.showWithDelay(t)):n.indexOf("click")>-1&&g3(t.target,this._targets)&&(this._hideTimeout&&this.clearHideTimeout(),this.props.isOpen?this.hideWithDelay(t):this.showWithDelay(t))}onMouseOverTooltipContent(){this.props.trigger.indexOf("hover")>-1&&!this.props.autohide&&(this._hideTimeout&&this.clearHideTimeout(),this.state.isOpen&&!this.props.isOpen&&this.toggle())}onMouseLeaveTooltipContent(t){this.props.trigger.indexOf("hover")>-1&&!this.props.autohide&&(this._showTimeout&&this.clearShowTimeout(),t.persist(),this._hideTimeout=setTimeout(this.hide.bind(this,t),this.getDelay("hide")))}onEscKeyDown(t){t.key==="Escape"&&this.hide(t)}getRef(t){const{innerRef:n}=this.props;n&&(typeof n=="function"?n(t):typeof n=="object"&&(n.current=t)),this._popover=t}getDelay(t){const{delay:n}=this.props;return typeof n=="object"?isNaN(n[t])?c6[t]:n[t]:n}getCurrentTarget(t){if(!t)return null;const n=this._targets.indexOf(t);return n>=0?this._targets[n]:this.getCurrentTarget(t.parentElement)}show(t){if(!this.props.isOpen){if(this.clearShowTimeout(),this.currentTargetElement=t?t.currentTarget||this.getCurrentTarget(t.target):null,t&&t.composedPath&&typeof t.composedPath=="function"){const n=t.composedPath();this.currentTargetElement=n&&n[0]||this.currentTargetElement}this.toggle(t)}}showWithDelay(t){this._hideTimeout&&this.clearHideTimeout(),this._showTimeout=setTimeout(this.show.bind(this,t),this.getDelay("show"))}hide(t){this.props.isOpen&&(this.clearHideTimeout(),this.currentTargetElement=null,this.toggle(t))}hideWithDelay(t){this._showTimeout&&this.clearShowTimeout(),this._hideTimeout=setTimeout(this.hide.bind(this,t),this.getDelay("hide"))}clearShowTimeout(){clearTimeout(this._showTimeout),this._showTimeout=void 0}clearHideTimeout(){clearTimeout(this._hideTimeout),this._hideTimeout=void 0}addEventOnTargets(t,n,r){this._targets.forEach(i=>{i.addEventListener(t,n,r)})}removeEventOnTargets(t,n,r){this._targets.forEach(i=>{i.removeEventListener(t,n,r)})}addTargetEvents(){if(this.props.trigger){let t=this.props.trigger.split(" ");t.indexOf("manual")===-1&&((t.indexOf("click")>-1||t.indexOf("legacy")>-1)&&document.addEventListener("click",this.handleDocumentClick,!0),this._targets&&this._targets.length&&(t.indexOf("hover")>-1&&(this.addEventOnTargets("mouseover",this.showWithDelay,!0),this.addEventOnTargets("mouseout",this.hideWithDelay,!0)),t.indexOf("focus")>-1&&(this.addEventOnTargets("focusin",this.show,!0),this.addEventOnTargets("focusout",this.hide,!0)),this.addEventOnTargets("keydown",this.onEscKeyDown,!0)))}}removeTargetEvents(){this._targets&&(this.removeEventOnTargets("mouseover",this.showWithDelay,!0),this.removeEventOnTargets("mouseout",this.hideWithDelay,!0),this.removeEventOnTargets("keydown",this.onEscKeyDown,!0),this.removeEventOnTargets("focusin",this.show,!0),this.removeEventOnTargets("focusout",this.hide,!0)),document.removeEventListener("click",this.handleDocumentClick,!0)}updateTarget(){const t=Fc(this.props.target,!0);t!==this._targets&&(this.removeTargetEvents(),this._targets=t?Array.from(t):[],this.currentTargetElement=this.currentTargetElement||this._targets[0],this.addTargetEvents())}toggle(t){return this.props.disabled||!this._isMounted?t&&t.preventDefault():this.props.toggle(t)}render(){this.props.isOpen&&this.updateTarget();const t=this.currentTargetElement||this._targets[0];if(!t)return null;const{className:n,cssModule:r,innerClassName:i,isOpen:o,hideArrow:s,boundariesElement:a,placement:l,placementPrefix:c,arrowClassName:f,popperClassName:h,container:p,modifiers:m,strategy:v,offset:y,fade:x,flip:_,children:w}=this.props,S=Cr(this.props,Object.keys(y_)),T=Fe(h,r),P=Fe(i,r);return U.createElement(Bre,{className:n,target:t,isOpen:o,hideArrow:s,boundariesElement:a,placement:l,placementPrefix:c,arrowClassName:f,popperClassName:T,container:p,modifiers:m,strategy:v,offset:y,cssModule:r,fade:x,flip:_},({update:k})=>U.createElement("div",$e({},S,{ref:this.getRef,className:P,role:"tooltip",onMouseOver:this.onMouseOverTooltipContent,onMouseLeave:this.onMouseLeaveTooltipContent,onKeyDown:this.onEscKeyDown}),typeof w=="function"?w({update:k}):w))}}eE.propTypes=y_;eE.defaultProps=zre;var f6=eE;const Ure={placement:"right",placementPrefix:"bs-popover",trigger:"click",offset:[0,8]};function Kd(e){const t=me("popover","show",e.popperClassName),n=me("popover-inner",e.innerClassName);return U.createElement(f6,$e({},e,{arrowClassName:"popover-arrow",popperClassName:t,innerClassName:n}))}Kd.propTypes=y_;Kd.defaultProps=Ure;const Vre=["defaultOpen"];class Hre extends V.Component{constructor(t){super(t),this.state={isOpen:t.defaultOpen||!1},this.toggle=this.toggle.bind(this)}toggle(){this.setState(t=>({isOpen:!t.isOpen}))}render(){return U.createElement(Kd,$e({isOpen:this.state.isOpen,toggle:this.toggle},Cr(this.props,Vre)))}}Hre.propTypes=We({defaultOpen:C.bool},Kd.propTypes);C.string,C.object;C.string,C.object;const Wre=["children","className","barClassName","cssModule","value","min","max","animated","striped","color","bar","multi","tag","style","barStyle","barAriaValueText","barAriaLabelledBy"],Yre={animated:C.bool,bar:C.bool,barAriaLabelledBy:C.string,barAriaValueText:C.string,barClassName:C.string,barStyle:C.object,children:C.node,className:C.string,cssModule:C.object,color:C.string,max:C.oneOfType([C.string,C.number]),min:C.oneOfType([C.string,C.number]),multi:C.bool,striped:C.bool,style:C.object,tag:Pe,value:C.oneOfType([C.string,C.number])},qre={tag:"div",value:0,min:0,max:100,style:{},barStyle:{}};function tE(e){const{children:t,className:n,barClassName:r,cssModule:i,value:o,min:s,max:a,animated:l,striped:c,color:f,bar:h,multi:p,tag:m,style:v,barStyle:y,barAriaValueText:x,barAriaLabelledBy:_}=e,w=qe(e,Wre),S=h3(o)/h3(a)*100,T=Fe(me(n,"progress"),i),k={className:Fe(me("progress-bar",h&&n||r,l?"progress-bar-animated":null,f?`bg-${f}`:null,c||l?"progress-bar-striped":null),i),style:We(We(We({},h?v:{}),y),{},{width:`${S}%`}),role:"progressbar","aria-valuenow":o,"aria-valuemin":s,"aria-valuemax":a,"aria-valuetext":x,"aria-labelledby":_,children:t};return h?U.createElement(m,$e({},w,k)):U.createElement(m,$e({},w,{style:v,className:T}),p?t:U.createElement("div",k))}tE.propTypes=Yre;tE.defaultProps=qre;const Gre={children:C.node.isRequired,node:C.any};class d6 extends U.Component{componentWillUnmount(){this.defaultNode&&document.body.removeChild(this.defaultNode),this.defaultNode=null}render(){return BC?(!this.props.node&&!this.defaultNode&&(this.defaultNode=document.createElement("div"),document.body.appendChild(this.defaultNode)),$a.createPortal(this.props.children,this.props.node||this.defaultNode)):null}}d6.propTypes=Gre;var h6=d6;function sv(){}const v3=C.shape(Kt.propTypes),p6={autoFocus:C.bool,backdrop:C.oneOfType([C.bool,C.oneOf(["static"])]),backdropClassName:C.string,backdropTransition:v3,centered:C.bool,children:C.node,contentClassName:C.string,className:C.string,container:Bs,cssModule:C.object,external:C.node,fade:C.bool,fullscreen:C.oneOfType([C.bool,C.oneOf(["sm","md","lg","xl"])]),innerRef:C.oneOfType([C.object,C.string,C.func]),isOpen:C.bool,keyboard:C.bool,labelledBy:C.string,modalClassName:C.string,modalTransition:v3,onClosed:C.func,onEnter:C.func,onExit:C.func,onOpened:C.func,returnFocusAfterClose:C.bool,role:C.string,scrollable:C.bool,size:C.string,toggle:C.func,trapFocus:C.bool,unmountOnClose:C.bool,wrapClassName:C.string,zIndex:C.oneOfType([C.number,C.string])},Zre=Object.keys(p6),Kre={isOpen:!1,autoFocus:!0,centered:!1,scrollable:!1,role:"dialog",backdrop:!0,keyboard:!0,zIndex:1050,fade:!0,onOpened:sv,onClosed:sv,modalTransition:{timeout:tl.Modal},backdropTransition:{mountOnEnter:!0,timeout:tl.Fade},unmountOnClose:!0,returnFocusAfterClose:!0,container:"body",trapFocus:!1};class zn extends U.Component{constructor(t){super(t),this._element=null,this._originalBodyPadding=null,this.getFocusableChildren=this.getFocusableChildren.bind(this),this.handleBackdropClick=this.handleBackdropClick.bind(this),this.handleBackdropMouseDown=this.handleBackdropMouseDown.bind(this),this.handleEscape=this.handleEscape.bind(this),this.handleStaticBackdropAnimation=this.handleStaticBackdropAnimation.bind(this),this.handleTab=this.handleTab.bind(this),this.onOpened=this.onOpened.bind(this),this.onClosed=this.onClosed.bind(this),this.manageFocusAfterClose=this.manageFocusAfterClose.bind(this),this.clearBackdropAnimationTimeout=this.clearBackdropAnimationTimeout.bind(this),this.trapFocus=this.trapFocus.bind(this),this.state={isOpen:!1,showStaticBackdropAnimation:!1}}componentDidMount(){const{isOpen:t,autoFocus:n,onEnter:r}=this.props;t&&(this.init(),this.setState({isOpen:!0}),n&&this.setFocus()),r&&r(),document.addEventListener("focus",this.trapFocus,!0),this._isMounted=!0}componentDidUpdate(t,n){if(this.props.isOpen&&!t.isOpen){this.init(),this.setState({isOpen:!0});return}this.props.autoFocus&&this.state.isOpen&&!n.isOpen&&this.setFocus(),this._element&&t.zIndex!==this.props.zIndex&&(this._element.style.zIndex=this.props.zIndex)}componentWillUnmount(){this.clearBackdropAnimationTimeout(),this.props.onExit&&this.props.onExit(),this._element&&(this.destroy(),(this.props.isOpen||this.state.isOpen)&&this.close()),document.removeEventListener("focus",this.trapFocus,!0),this._isMounted=!1}handleBackdropClick(t){if(t.target===this._mouseDownElement){t.stopPropagation();const n=this._dialog?this._dialog.parentNode:null;if(n&&t.target===n&&this.props.backdrop==="static"&&this.handleStaticBackdropAnimation(),!this.props.isOpen||this.props.backdrop!==!0)return;n&&t.target===n&&this.props.toggle&&this.props.toggle(t)}}handleTab(t){if(t.which!==9||this.modalIndex{this.setState({showStaticBackdropAnimation:!1})},100)}onOpened(t,n){this.props.onOpened(),(this.props.modalTransition.onEntered||sv)(t,n)}onClosed(t){const{unmountOnClose:n}=this.props;this.props.onClosed(),(this.props.modalTransition.onExited||sv)(t),n&&this.destroy(),this.close(),this._isMounted&&this.setState({isOpen:!1})}setFocus(){this._dialog&&this._dialog.parentNode&&typeof this._dialog.parentNode.focus=="function"&&this._dialog.parentNode.focus()}getFocusableChildren(){return this._element.querySelectorAll(JI.join(", "))}getFocusedChild(){let t;const n=this.getFocusableChildren();try{t=document.activeElement}catch{t=n[0]}return t}trapFocus(t){if(!this.props.trapFocus||!this._element||this._dialog&&this._dialog.parentNode===t.target||this.modalIndex0&&(t.preventDefault(),t.stopPropagation(),n[0].focus())}init(){try{this._triggeringElement=document.activeElement}catch{this._triggeringElement=null}this._element||(this._element=document.createElement("div"),this._element.setAttribute("tabindex","-1"),this._element.style.position="relative",this._element.style.zIndex=this.props.zIndex,this._mountContainer=Fc(this.props.container),this._mountContainer.appendChild(this._element)),this._originalBodyPadding=qI(),zn.openCount<1&&(zn.originalBodyOverflow=window.getComputedStyle(document.body).overflow),GI(),zn.openCount===0&&(document.body.className=me(document.body.className,Fe("modal-open",this.props.cssModule)),document.body.style.overflow="hidden"),this.modalIndex=zn.openCount,zn.openCount+=1}destroy(){this._element&&(this._mountContainer.removeChild(this._element),this._element=null),this.manageFocusAfterClose()}manageFocusAfterClose(){if(this._triggeringElement){const{returnFocusAfterClose:t}=this.props;this._triggeringElement.focus&&t&&this._triggeringElement.focus(),this._triggeringElement=null}}close(){if(zn.openCount<=1){const t=Fe("modal-open",this.props.cssModule),n=new RegExp(`(^| )${t}( |$)`);document.body.className=document.body.className.replace(n," ").trim(),document.body.style.overflow=zn.originalBodyOverflow}this.manageFocusAfterClose(),zn.openCount=Math.max(0,zn.openCount-1),FC(this._originalBodyPadding)}clearBackdropAnimationTimeout(){this._backdropAnimationTimeout&&(clearTimeout(this._backdropAnimationTimeout),this._backdropAnimationTimeout=void 0)}renderModalDialog(){const t=Cr(this.props,Zre),n="modal-dialog";return U.createElement("div",$e({},t,{className:Fe(me(n,this.props.className,{[`modal-${this.props.size}`]:this.props.size,[`${n}-centered`]:this.props.centered,[`${n}-scrollable`]:this.props.scrollable,"modal-fullscreen":this.props.fullscreen===!0,[`modal-fullscreen-${this.props.fullscreen}-down`]:typeof this.props.fullscreen=="string"}),this.props.cssModule),role:"document",ref:r=>{this._dialog=r}}),U.createElement("div",{className:Fe(me("modal-content",this.props.contentClassName),this.props.cssModule)},this.props.children))}render(){const{unmountOnClose:t}=this.props;if(this._element&&(this.state.isOpen||!t)){const n=!!this._element&&!this.state.isOpen&&!t;this._element.style.display=n?"none":"block";const{wrapClassName:r,modalClassName:i,backdropClassName:o,cssModule:s,isOpen:a,backdrop:l,role:c,labelledBy:f,external:h,innerRef:p}=this.props,m={onClick:this.handleBackdropClick,onMouseDown:this.handleBackdropMouseDown,onKeyUp:this.handleEscape,onKeyDown:this.handleTab,style:{display:"block"},"aria-labelledby":f,role:c,tabIndex:"-1"},v=this.props.fade,y=We(We(We({},Kt.defaultProps),this.props.modalTransition),{},{baseClass:v?this.props.modalTransition.baseClass:"",timeout:v?this.props.modalTransition.timeout:0}),x=We(We(We({},Kt.defaultProps),this.props.backdropTransition),{},{baseClass:v?this.props.backdropTransition.baseClass:"",timeout:v?this.props.backdropTransition.timeout:0}),_=l&&(v?U.createElement(Kt,$e({},x,{in:a&&!!l,cssModule:s,className:Fe(me("modal-backdrop",o),s)})):U.createElement("div",{className:Fe(me("modal-backdrop","show",o),s)}));return U.createElement(h6,{node:this._element},U.createElement("div",{className:Fe(r)},U.createElement(Kt,$e({},m,y,{in:a,onEntered:this.onOpened,onExited:this.onClosed,cssModule:s,className:Fe(me("modal",i,this.state.showStaticBackdropAnimation&&"modal-static"),s),innerRef:p}),h,this.renderModalDialog()),_))}return null}}zn.propTypes=p6;zn.defaultProps=Kre;zn.openCount=0;zn.originalBodyOverflow=null;var Uo=zn;const Xre=["className","cssModule","children","toggle","tag","wrapTag","closeAriaLabel","close"],Qre={children:C.node,className:C.string,close:C.object,closeAriaLabel:C.string,cssModule:C.object,tag:Pe,toggle:C.func,wrapTag:Pe},Jre={tag:"h5",wrapTag:"div",closeAriaLabel:"Close"};function ro(e){let t;const{className:n,cssModule:r,children:i,toggle:o,tag:s,wrapTag:a,closeAriaLabel:l,close:c}=e,f=qe(e,Xre),h=Fe(me(n,"modal-header"),r);return!c&&o&&(t=U.createElement("button",{type:"button",onClick:o,className:Fe("btn-close",r),"aria-label":l})),U.createElement(a,$e({},f,{className:h}),U.createElement(s,{className:Fe("modal-title",r)},i),c||t)}ro.propTypes=Qre;ro.defaultProps=Jre;const eie=["className","cssModule","tag"],tie={className:C.string,cssModule:C.object,tag:Pe},nie={tag:"div"};function ki(e){const{className:t,cssModule:n,tag:r}=e,i=qe(e,eie),o=Fe(me(t,"modal-body"),n);return U.createElement(r,$e({},i,{className:o}))}ki.propTypes=tie;ki.defaultProps=nie;const rie=["className","cssModule","tag"],iie={className:C.string,cssModule:C.object,tag:Pe},oie={tag:"div"};function ea(e){const{className:t,cssModule:n,tag:r}=e,i=qe(e,rie),o=Fe(me(t,"modal-footer"),n);return U.createElement(r,$e({},i,{className:o}))}ea.propTypes=iie;ea.defaultProps=oie;const sie={placement:"top",autohide:!0,placementPrefix:"bs-tooltip",trigger:"hover focus"};function Xd(e){const t=me("tooltip","show",e.popperClassName),n=me("tooltip-inner",e.innerClassName);return U.createElement(f6,$e({},e,{arrowClassName:"tooltip-arrow",popperClassName:t,innerClassName:n}))}Xd.propTypes=y_;Xd.defaultProps=sie;C.bool,C.bool,C.string,C.object,C.bool,C.bool,C.oneOfType([C.func,C.string,C.object]),C.oneOfType([C.bool,C.string]),C.string,C.bool;const aie=["className","cssModule","tag","flush","horizontal","numbered"],lie={className:C.string,cssModule:C.object,flush:C.bool,horizontal:C.oneOfType([C.bool,C.string]),numbered:C.bool,tag:Pe},cie={tag:"ul",horizontal:!1,numbered:!1},uie=e=>e===!1?!1:e===!0||e==="xs"?"list-group-horizontal":`list-group-horizontal-${e}`;function nE(e){const{className:t,cssModule:n,tag:r,flush:i,horizontal:o,numbered:s}=e,a=qe(e,aie),l=Fe(me(t,"list-group",i?"list-group-flush":uie(o),{"list-group-numbered":s}),n);return U.createElement(r,$e({},a,{className:l}))}nE.propTypes=lie;nE.defaultProps=cie;const fie=["className","cssModule","tag","innerRef"],die={children:C.node,tag:Pe,innerRef:C.oneOfType([C.object,C.func,C.string]),className:C.string,cssModule:C.object},hie={tag:"form"};class m6 extends V.Component{constructor(t){super(t),this.getRef=this.getRef.bind(this),this.submit=this.submit.bind(this)}getRef(t){this.props.innerRef&&this.props.innerRef(t),this.ref=t}submit(){this.ref&&this.ref.submit()}render(){const t=this.props,{className:n,cssModule:r,tag:i,innerRef:o}=t,s=qe(t,fie),a=Fe(n,r);return U.createElement(i,$e({},s,{ref:o,className:a}))}}m6.propTypes=die;m6.defaultProps=hie;C.node,C.string,C.object,C.bool,C.bool;const pie=["className","cssModule","row","disabled","check","inline","floating","tag","switch"],mie={children:C.node,row:C.bool,check:C.bool,switch:C.bool,inline:C.bool,floating:C.bool,disabled:C.bool,tag:Pe,className:C.string,cssModule:C.object},gie={tag:"div"};function vr(e){const{className:t,cssModule:n,row:r,disabled:i,check:o,inline:s,floating:a,tag:l,switch:c}=e,f=qe(e,pie),h=o||c,p=Fe(me(t,r?"row":!1,h?"form-check":"mb-3",c?"form-switch":!1,h&&s?"form-check-inline":!1,h&&i?"disabled":!1,a&&"form-floating"),n);return l==="fieldset"&&(f.disabled=i),U.createElement(l,$e({},f,{className:p}))}vr.propTypes=mie;vr.defaultProps=gie;C.node,C.bool,C.string,C.string,C.object;const vie=["className","cssModule","type","bsSize","valid","invalid","tag","addon","plaintext","innerRef"],yie={children:C.node,type:C.string,size:C.oneOfType([C.number,C.string]),bsSize:C.string,valid:C.bool,invalid:C.bool,tag:Pe,innerRef:C.oneOfType([C.object,C.func,C.string]),plaintext:C.bool,addon:C.bool,className:C.string,cssModule:C.object},_ie={type:"text"};let rE=class extends U.Component{constructor(t){super(t),this.getRef=this.getRef.bind(this),this.focus=this.focus.bind(this)}getRef(t){this.props.innerRef&&this.props.innerRef(t),this.ref=t}focus(){this.ref&&this.ref.focus()}render(){let t=this.props,{className:n,cssModule:r,type:i,bsSize:o,valid:s,invalid:a,tag:l,addon:c,plaintext:f,innerRef:h}=t,p=qe(t,vie);const m=["switch","radio","checkbox"].indexOf(i)>-1,v=/\D/g,y=i==="textarea",x=i==="select",_=i==="range";let w=l||(x||y?i:"input"),S="form-control";f?(S=`${S}-plaintext`,w=l||"input"):_?S="form-range":x?S="form-select":m&&(c?S=null:S="form-check-input"),p.size&&v.test(p.size)&&(Fw(`Please use the prop "bsSize" instead of the "size" to bootstrap's input sizing.`),o=p.size,delete p.size);const T=Fe(me(n,a&&"is-invalid",s&&"is-valid",o?x?`form-select-${o}`:`form-control-${o}`:!1,S),r);return(w==="input"||l&&typeof l=="function")&&(p.type=i==="switch"?"checkbox":i),p.children&&!(f||i==="select"||typeof w!="string"||w==="select")&&(Fw(`Input with a type of "${i}" cannot have children. Please use "value"/"defaultValue" instead.`),delete p.children),U.createElement(w,$e({},p,{ref:h,className:T,"aria-invalid":a}))}};rE.propTypes=yie;rE.defaultProps=_ie;var $c=rE;const bie=["className","cssModule","tag","type","size"],wie={className:C.string,cssModule:C.object,size:C.string,tag:Pe,type:C.string},xie={tag:"div"};function Qd(e){const{className:t,cssModule:n,tag:r,type:i,size:o}=e,s=qe(e,bie),a=Fe(me(t,"input-group",o?`input-group-${o}`:null),n);return e.type==="dropdown"?U.createElement(tu,$e({},s,{className:a})):U.createElement(n6.Provider,{value:{insideInputGroup:!0}},U.createElement(r,$e({},s,{className:a})))}Qd.propTypes=wie;Qd.defaultProps=xie;C.string,C.object;const p1=C.oneOfType([C.number,C.string]),Ll=C.oneOfType([C.bool,C.string,C.number,C.shape({size:p1,order:p1,offset:p1})]);C.node,C.bool,C.bool,C.string,C.string,C.string,C.object,C.array;C.bool,C.bool,C.node,C.string,C.object,C.bool,C.bool,C.bool,C.bool,C.bool,C.bool,C.bool;function av(){}const y3=C.shape(Kt.propTypes),g6={autoFocus:C.bool,backdrop:C.bool,backdropClassName:C.string,backdropTransition:y3,children:C.node,className:C.string,container:Bs,cssModule:C.object,direction:C.oneOf(["start","end","bottom","top"]),fade:C.bool,innerRef:C.oneOfType([C.object,C.string,C.func]),isOpen:C.bool,keyboard:C.bool,labelledBy:C.string,offcanvasTransition:y3,onClosed:C.func,onEnter:C.func,onExit:C.func,style:C.object,onOpened:C.func,returnFocusAfterClose:C.bool,role:C.string,scrollable:C.bool,toggle:C.func,trapFocus:C.bool,unmountOnClose:C.bool,zIndex:C.oneOfType([C.number,C.string])},Sie=Object.keys(g6),Cie={isOpen:!1,autoFocus:!0,direction:"start",scrollable:!1,role:"dialog",backdrop:!0,keyboard:!0,zIndex:1050,fade:!0,onOpened:av,onClosed:av,offcanvasTransition:{timeout:tl.Offcanvas},backdropTransition:{mountOnEnter:!0,timeout:tl.Fade},unmountOnClose:!0,returnFocusAfterClose:!0,container:"body",trapFocus:!1};class hi extends U.Component{constructor(t){super(t),this._element=null,this._originalBodyPadding=null,this.getFocusableChildren=this.getFocusableChildren.bind(this),this.handleBackdropClick=this.handleBackdropClick.bind(this),this.handleBackdropMouseDown=this.handleBackdropMouseDown.bind(this),this.handleEscape=this.handleEscape.bind(this),this.handleTab=this.handleTab.bind(this),this.onOpened=this.onOpened.bind(this),this.onClosed=this.onClosed.bind(this),this.manageFocusAfterClose=this.manageFocusAfterClose.bind(this),this.clearBackdropAnimationTimeout=this.clearBackdropAnimationTimeout.bind(this),this.trapFocus=this.trapFocus.bind(this),this.state={isOpen:!1}}componentDidMount(){const{isOpen:t,autoFocus:n,onEnter:r}=this.props;t&&(this.init(),this.setState({isOpen:!0}),n&&this.setFocus()),r&&r(),document.addEventListener("focus",this.trapFocus,!0),this._isMounted=!0}componentDidUpdate(t,n){if(this.props.isOpen&&!t.isOpen){this.init(),this.setState({isOpen:!0});return}this.props.autoFocus&&this.state.isOpen&&!n.isOpen&&this.setFocus(),this._element&&t.zIndex!==this.props.zIndex&&(this._element.style.zIndex=this.props.zIndex)}componentWillUnmount(){this.clearBackdropAnimationTimeout(),this.props.onExit&&this.props.onExit(),this._element&&(this.destroy(),(this.props.isOpen||this.state.isOpen)&&this.close()),document.removeEventListener("focus",this.trapFocus,!0),this._isMounted=!1}handleBackdropClick(t){if(t.target===this._mouseDownElement){t.stopPropagation();const n=this._backdrop;if(!this.props.isOpen||this.props.backdrop!==!0)return;n&&t.target===n&&this.props.toggle&&this.props.toggle(t)}}handleTab(t){if(t.which!==9||this.offcanvasIndex0&&(t.preventDefault(),t.stopPropagation(),n[0].focus())}init(){try{this._triggeringElement=document.activeElement}catch{this._triggeringElement=null}this._element||(this._element=document.createElement("div"),this._element.setAttribute("tabindex","-1"),this._element.style.position="relative",this._element.style.zIndex=this.props.zIndex,this._mountContainer=Fc(this.props.container),this._mountContainer.appendChild(this._element)),this._originalBodyPadding=qI(),GI(),hi.openCount===0&&this.props.backdrop&&!this.props.scrollable&&(document.body.style.overflow="hidden"),this.offcanvasIndex=hi.openCount,hi.openCount+=1}destroy(){this._element&&(this._mountContainer.removeChild(this._element),this._element=null),this.manageFocusAfterClose()}manageFocusAfterClose(){if(this._triggeringElement){const{returnFocusAfterClose:t}=this.props;this._triggeringElement.focus&&t&&this._triggeringElement.focus(),this._triggeringElement=null}}close(){this.manageFocusAfterClose(),hi.openCount=Math.max(0,hi.openCount-1),document.body.style.overflow=null,FC(this._originalBodyPadding)}clearBackdropAnimationTimeout(){this._backdropAnimationTimeout&&(clearTimeout(this._backdropAnimationTimeout),this._backdropAnimationTimeout=void 0)}render(){const{direction:t,unmountOnClose:n}=this.props;if(this._element&&(this.state.isOpen||!n)){const r=!!this._element&&!this.state.isOpen&&!n;this._element.style.display=r?"none":"block";const{className:i,backdropClassName:o,cssModule:s,isOpen:a,backdrop:l,role:c,labelledBy:f,style:h}=this.props,p={onKeyUp:this.handleEscape,onKeyDown:this.handleTab,"aria-labelledby":f,role:c,tabIndex:"-1"},m=this.props.fade,v=We(We(We({},Kt.defaultProps),this.props.offcanvasTransition),{},{baseClass:m?this.props.offcanvasTransition.baseClass:"",timeout:m?this.props.offcanvasTransition.timeout:0}),y=We(We(We({},Kt.defaultProps),this.props.backdropTransition),{},{baseClass:m?this.props.backdropTransition.baseClass:"",timeout:m?this.props.backdropTransition.timeout:0}),x=l&&(m?U.createElement(Kt,$e({},y,{in:a&&!!l,innerRef:w=>{this._backdrop=w},cssModule:s,className:Fe(me("offcanvas-backdrop",o),s),onClick:this.handleBackdropClick,onMouseDown:this.handleBackdropMouseDown})):U.createElement("div",{className:Fe(me("offcanvas-backdrop","show",o),s),onClick:this.handleBackdropClick,onMouseDown:this.handleBackdropMouseDown})),_=Cr(this.props,Sie);return U.createElement(h6,{node:this._element},U.createElement(Kt,$e({},_,p,v,{in:a,onEntered:this.onOpened,onExited:this.onClosed,cssModule:s,className:Fe(me("offcanvas",i,`offcanvas-${t}`),s),innerRef:w=>{this._dialog=w},style:We(We({},h),{},{visibility:a?"visible":"hidden"})}),this.props.children),x)}return null}}hi.propTypes=g6;hi.defaultProps=Cie;hi.openCount=0;C.string,C.object;C.node,C.string,C.object,C.string,C.object,C.func;const Eie=["className","listClassName","cssModule","size","tag","listTag","aria-label"],Tie={children:C.node,className:C.string,listClassName:C.string,cssModule:C.object,size:C.string,tag:Pe,listTag:Pe,"aria-label":C.string},Oie={tag:"nav",listTag:"ul","aria-label":"pagination"};function __(e){const{className:t,listClassName:n,cssModule:r,size:i,tag:o,listTag:s,"aria-label":a}=e,l=qe(e,Eie),c=Fe(me(t),r),f=Fe(me(n,"pagination",{[`pagination-${i}`]:!!i}),r);return U.createElement(o,{className:c,"aria-label":a},U.createElement(s,$e({},l,{className:f})))}__.propTypes=Tie;__.defaultProps=Oie;const Pie=["active","className","cssModule","disabled","tag"],kie={active:C.bool,children:C.node,className:C.string,cssModule:C.object,disabled:C.bool,tag:Pe},Mie={tag:"li"};function ks(e){const{active:t,className:n,cssModule:r,disabled:i,tag:o}=e,s=qe(e,Pie),a=Fe(me(n,"page-item",{active:t,disabled:i}),r);return U.createElement(o,$e({},s,{className:a}))}ks.propTypes=kie;ks.defaultProps=Mie;const Rie=["className","cssModule","next","previous","first","last","tag"],Nie={"aria-label":C.string,children:C.node,className:C.string,cssModule:C.object,next:C.bool,previous:C.bool,first:C.bool,last:C.bool,tag:Pe},Lie={tag:"a"};function Ms(e){let{className:t,cssModule:n,next:r,previous:i,first:o,last:s,tag:a}=e,l=qe(e,Rie);const c=Fe(me(t,"page-link"),n);let f;i?f="Previous":r?f="Next":o?f="First":s&&(f="Last");const h=e["aria-label"]||f;let p;i?p="‹":r?p="›":o?p="«":s&&(p="»");let{children:m}=e;return m&&Array.isArray(m)&&m.length===0&&(m=null),!l.href&&a==="a"&&(a="button"),(i||r||o||s)&&(m=[U.createElement("span",{"aria-hidden":"true",key:"caret"},m||p),U.createElement("span",{className:"visually-hidden",key:"ariaLabel"},h)]),U.createElement(a,$e({},l,{className:c,"aria-label":h}),m)}Ms.propTypes=Nie;Ms.defaultProps=Lie;const Die=U.createContext({}),v6={tag:Pe,activeTab:C.any,className:C.string,cssModule:C.object},Aie={tag:"div"};class y6 extends V.Component{static getDerivedStateFromProps(t,n){return n.activeTab!==t.activeTab?{activeTab:t.activeTab}:null}constructor(t){super(t),this.state={activeTab:this.props.activeTab}}render(){const{className:t,cssModule:n,tag:r}=this.props,i=Cr(this.props,Object.keys(v6)),o=Fe(me("tab-content",t),n);return U.createElement(Die.Provider,{value:{activeTabId:this.state.activeTab}},U.createElement(r,$e({},i,{className:o})))}}y6.propTypes=v6;y6.defaultProps=Aie;C.string,C.object,C.any;const jie=["className","closeClassName","closeAriaLabel","cssModule","tag","color","isOpen","toggle","children","transition","fade","innerRef"],Iie={children:C.node,className:C.string,closeClassName:C.string,closeAriaLabel:C.string,color:C.string,cssModule:C.object,fade:C.bool,innerRef:C.oneOfType([C.object,C.string,C.func]),isOpen:C.bool,tag:Pe,toggle:C.func,transition:C.shape(Kt.propTypes)},Fie={color:"success",isOpen:!0,tag:"div",closeAriaLabel:"Close",fade:!0,transition:We(We({},Kt.defaultProps),{},{unmountOnExit:!0})};function iE(e){const{className:t,closeClassName:n,closeAriaLabel:r,cssModule:i,tag:o,color:s,isOpen:a,toggle:l,children:c,transition:f,fade:h,innerRef:p}=e,m=qe(e,jie),v=Fe(me(t,"alert",`alert-${s}`,{"alert-dismissible":l}),i),y=Fe(me("btn-close",n),i),x=We(We(We({},Kt.defaultProps),f),{},{baseClass:h?f.baseClass:"",timeout:h?f.timeout:0});return U.createElement(Kt,$e({},m,x,{tag:o,className:v,in:a,role:"alert",innerRef:p}),l?U.createElement("button",{type:"button",className:y,"aria-label":r,onClick:l}):null,c)}iE.propTypes=Iie;iE.defaultProps=Fie;C.node,C.string,C.object,C.bool,C.bool,C.shape(Kt.propTypes),C.oneOfType([C.object,C.string,C.func]);We(We({},Kt.defaultProps),{},{unmountOnExit:!0});C.string,C.object,C.oneOfType([C.object,C.string,C.func]);C.oneOfType([C.string,C.node]),C.func,C.string,C.object,C.node,C.string,C.oneOfType([C.string,C.number]),C.object,C.string;const $ie=["className","cssModule","tag","active","disabled","action","color"],Bie={action:C.bool,active:C.bool,className:C.string,cssModule:C.object,color:C.string,disabled:C.bool,tag:Pe},zie={tag:"li"},Uie=e=>{e.preventDefault()};function oE(e){const{className:t,cssModule:n,tag:r,active:i,disabled:o,action:s,color:a}=e,l=qe(e,$ie),c=Fe(me(t,i?"active":!1,o?"disabled":!1,s?"list-group-item-action":!1,a?`list-group-item-${a}`:!1,"list-group-item"),n);return o&&(l.onClick=Uie),U.createElement(r,$e({},l,{className:c}))}oE.propTypes=Bie;oE.defaultProps=zie;C.string,C.object;C.string,C.object;const Vie=["className","cssModule","tag","type"],Hie={className:C.string,cssModule:C.object,tag:Pe,type:C.string},Wie={tag:"ul"},sE=V.forwardRef((e,t)=>{const{className:n,cssModule:r,tag:i,type:o}=e,s=qe(e,Vie),a=Fe(me(n,o?`list-${o}`:!1),r);return U.createElement(i,$e({},s,{className:a,ref:t}))});sE.name="List";sE.propTypes=Hie;sE.defaultProps=Wie;const Yie=["className","cssModule","tag"],qie={className:C.string,cssModule:C.object,tag:Pe},Gie={tag:"li"},aE=V.forwardRef((e,t)=>{const{className:n,cssModule:r,tag:i}=e,o=qe(e,Yie),s=Fe(me(n,"list-inline-item"),r);return U.createElement(i,$e({},o,{className:s,ref:t}))});aE.name="ListInlineItem";aE.propTypes=qie;aE.defaultProps=Gie;const Zie=["defaultOpen"];class Kie extends V.Component{constructor(t){super(t),this.state={isOpen:t.defaultOpen||!1},this.toggle=this.toggle.bind(this)}toggle(){this.setState(t=>({isOpen:!t.isOpen}))}render(){return U.createElement(h_,$e({isOpen:this.state.isOpen,toggle:this.toggle},Cr(this.props,Zie)))}}Kie.propTypes=We({defaultOpen:C.bool},h_.propTypes);const Xie=["toggleEvents","defaultOpen"],Qie={defaultOpen:C.bool,toggler:C.string.isRequired,toggleEvents:C.arrayOf(C.string)},Jie={toggleEvents:ine};class _6 extends V.Component{constructor(t){super(t),this.togglers=null,this.removeEventListeners=null,this.toggle=this.toggle.bind(this),this.state={isOpen:t.defaultOpen||!1}}componentDidMount(){this.togglers=QI(this.props.toggler),this.togglers.length&&(this.removeEventListeners=one(this.togglers,this.toggle,this.props.toggleEvents))}componentWillUnmount(){this.togglers.length&&this.removeEventListeners&&this.removeEventListeners()}toggle(t){this.setState(({isOpen:n})=>({isOpen:!n})),t.preventDefault()}render(){return U.createElement(r6,$e({isOpen:this.state.isOpen},Cr(this.props,Xie)))}}_6.propTypes=Qie;_6.defaultProps=Jie;const eoe=["defaultOpen"];class Jd extends V.Component{constructor(t){super(t),this.state={isOpen:t.defaultOpen||!1},this.toggle=this.toggle.bind(this)}toggle(t){this.setState(n=>({isOpen:!n.isOpen}),()=>{this.props.onToggle&&this.props.onToggle(t,this.state.isOpen)})}render(){return U.createElement(tu,$e({isOpen:this.state.isOpen,toggle:this.toggle},Cr(this.props,eoe)))}}Jd.propTypes=We({defaultOpen:C.bool,onToggle:C.func},tu.propTypes);const toe=["defaultOpen"];class Er extends V.Component{constructor(t){super(t),this.state={isOpen:t.defaultOpen||!1},this.toggle=this.toggle.bind(this)}toggle(){this.setState(t=>({isOpen:!t.isOpen}))}render(){return U.createElement(Xd,$e({isOpen:this.state.isOpen,toggle:this.toggle},Cr(this.props,toe)))}}Er.propTypes=We({defaultOpen:C.bool},Xd.propTypes);C.oneOf(["border","grow"]),C.oneOf(["sm"]),C.oneOf(["primary","secondary","success","danger","warning","info","light","dark"]),C.string,C.object,C.string;We(We({},zC.propTypes),{},{color:C.string,tag:Pe,animation:C.oneOf(["glow","wave"]),innerRef:C.oneOfType([C.object,C.func,C.string]),size:C.oneOf(["lg","sm","xs"])});C.string,C.string,C.bool,C.string,C.object;(()=>{if(typeof window!="object"||typeof window.CustomEvent=="function")return;const e=(t,n)=>{n=n||{bubbles:!1,cancelable:!1,detail:null};let r=document.createEvent("CustomEvent");return r.initCustomEvent(t,n.bubbles,n.cancelable,n.detail),r};window.CustomEvent=e})();(()=>{if(typeof Object.values=="function")return;Object.values=t=>Object.keys(t).map(n=>t[n])})();const noe="Left",roe="Right",ioe="Up",ooe="Down",rc={delta:10,preventScrollOnSwipe:!1,rotationAngle:0,trackMouse:!1,trackTouch:!0,swipeDuration:1/0,touchEventOptions:{passive:!0}},Bw={first:!0,initial:[0,0],start:0,swiping:!1,xy:[0,0]},_3="mousemove",b3="mouseup",soe="touchend",aoe="touchmove",loe="touchstart";function coe(e,t,n,r){return e>t?n>0?roe:noe:r>0?ooe:ioe}function w3(e,t){if(t===0)return e;const n=Math.PI/180*t,r=e[0]*Math.cos(n)+e[1]*Math.sin(n),i=e[1]*Math.cos(n)-e[0]*Math.sin(n);return[r,i]}function uoe(e,t){const n=f=>{const h="touches"in f;h&&f.touches.length>1||e((p,m)=>{m.trackMouse&&!h&&(document.addEventListener(_3,r),document.addEventListener(b3,s));const{clientX:v,clientY:y}=h?f.touches[0]:f,x=w3([v,y],m.rotationAngle);return m.onTouchStartOrOnMouseDown&&m.onTouchStartOrOnMouseDown({event:f}),Object.assign(Object.assign(Object.assign({},p),Bw),{initial:x.slice(),xy:x,start:f.timeStamp||0})})},r=f=>{e((h,p)=>{const m="touches"in f;if(m&&f.touches.length>1)return h;if(f.timeStamp-h.start>p.swipeDuration)return h.swiping?Object.assign(Object.assign({},h),{swiping:!1}):h;const{clientX:v,clientY:y}=m?f.touches[0]:f,[x,_]=w3([v,y],p.rotationAngle),w=x-h.xy[0],S=_-h.xy[1],T=Math.abs(w),P=Math.abs(S),k=(f.timeStamp||0)-h.start,N=Math.sqrt(T*T+P*P)/(k||1),D=[w/(k||1),S/(k||1)],z=coe(T,P,w,S),A=typeof p.delta=="number"?p.delta:p.delta[z.toLowerCase()]||rc.delta;if(T{e((h,p)=>{let m;if(h.swiping&&h.eventData){if(f.timeStamp-h.start{document.removeEventListener(_3,r),document.removeEventListener(b3,s)},s=f=>{o(),i(f)},a=(f,h)=>{let p=()=>{};if(f&&f.addEventListener){const m=Object.assign(Object.assign({},rc.touchEventOptions),h.touchEventOptions),v=[[loe,n,m],[aoe,r,Object.assign(Object.assign({},m),h.preventScrollOnSwipe?{passive:!1}:{})],[soe,i,m]];v.forEach(([y,x,_])=>f.addEventListener(y,x,_)),p=()=>v.forEach(([y,x])=>f.removeEventListener(y,x))}return p},c={ref:f=>{f!==null&&e((h,p)=>{if(h.el===f)return h;const m={};return h.el&&h.el!==f&&h.cleanUpTouch&&(h.cleanUpTouch(),m.cleanUpTouch=void 0),p.trackTouch&&f&&(m.cleanUpTouch=a(f,p)),Object.assign(Object.assign(Object.assign({},h),{el:f}),m)})}};return t.trackMouse&&(c.onMouseDown=n),[c,a]}function foe(e,t,n,r){return!t.trackTouch||!e.el?(e.cleanUpTouch&&e.cleanUpTouch(),Object.assign(Object.assign({},e),{cleanUpTouch:void 0})):e.cleanUpTouch?t.preventScrollOnSwipe!==n.preventScrollOnSwipe||t.touchEventOptions.passive!==n.touchEventOptions.passive?(e.cleanUpTouch(),Object.assign(Object.assign({},e),{cleanUpTouch:r(e.el,t)})):e:Object.assign(Object.assign({},e),{cleanUpTouch:r(e.el,t)})}function doe(e){const{trackMouse:t}=e,n=V.useRef(Object.assign({},Bw)),r=V.useRef(Object.assign({},rc)),i=V.useRef(Object.assign({},r.current));i.current=Object.assign({},r.current),r.current=Object.assign(Object.assign({},rc),e);let o;for(o in rc)r.current[o]===void 0&&(r.current[o]=rc[o]);const[s,a]=V.useMemo(()=>uoe(l=>n.current=l(n.current,r.current),{trackMouse:t}),[t]);return n.current=foe(n.current,r.current,i.current,a),s}var Tp,hoe=new Uint8Array(16);function poe(){if(!Tp&&(Tp=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Tp))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Tp(hoe)}const moe=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function goe(e){return typeof e=="string"&&moe.test(e)}var Fn=[];for(var m1=0;m1<256;++m1)Fn.push((m1+256).toString(16).substr(1));function voe(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(Fn[e[t+0]]+Fn[e[t+1]]+Fn[e[t+2]]+Fn[e[t+3]]+"-"+Fn[e[t+4]]+Fn[e[t+5]]+"-"+Fn[e[t+6]]+Fn[e[t+7]]+"-"+Fn[e[t+8]]+Fn[e[t+9]]+"-"+Fn[e[t+10]]+Fn[e[t+11]]+Fn[e[t+12]]+Fn[e[t+13]]+Fn[e[t+14]]+Fn[e[t+15]]).toLowerCase();if(!goe(n))throw TypeError("Stringified UUID is invalid");return n}function lE(e,t,n){e=e||{};var r=e.random||(e.rng||poe)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return voe(r)}const yoe=2e3,_oe=(e,t)=>(n=!1,r=yoe)=>{const[i,o]=V.useState(n),s=V.useRef(void 0);return[i,()=>{o(!n),s.current&&t(s.current),s.current=e(()=>o(n),r)}]},It=(e=!1)=>{const[t,n]=V.useState(e);return[t,()=>n(!t),()=>n(!0),()=>n(!1)]},boe=(e,t)=>{const n=r=>i=>{i.event.composedPath().some(({classList:s})=>s==null?void 0:s.contains("visits-table"))||document.querySelector(".modal")||r()};return doe({delta:40,onSwipedLeft:n(t),onSwipedRight:n(e)})},woe=(e,t)=>{const[n,r]=V.useState(t);return[n,o=>{const{location:s,history:a}=window,l=dl(s.search);l[e]=o,a.pushState(null,"",`${s.pathname}?${Hd(l)}`),r(o)}]},xoe=(e,t)=>{const n=V.useRef(!0);V.useEffect(()=>{!n.current&&e(),n.current=!1},t)},ta=()=>{const e=Io();return()=>e(-1)},Soe=()=>{const{search:e}=Pn();return dl(e)},b_=()=>{const{current:e}=V.useRef(`dom-${lE()}`);return e},pl=()=>V.useRef(null),un=({title:e,children:t,bodyClassName:n,...r})=>g.jsxs(Sr,{...r,children:[e&&g.jsx(rl,{role:"heading",children:e}),g.jsx(nl,{className:n,children:t})]});const Coe=({isOpen:e,toggle:t,forceUpdate:n})=>{const[r,,i]=It(),o=()=>{i(),n()};return g.jsxs(iE,{className:"app-update-banner",isOpen:e,toggle:t,tag:un,color:"secondary",children:[g.jsx("h4",{className:"mb-4",children:"This app has just been updated!"}),g.jsxs("p",{className:"mb-0",children:["Restart it to enjoy the new features.",g.jsxs(ht,{role:"button",disabled:r,className:"ms-2",color:"secondary",size:"sm",onClick:o,children:[!r&&g.jsxs(g.Fragment,{children:["Restart now ",g.jsx(je,{icon:kQ,className:"ms-1"})]}),r&&g.jsx(g.Fragment,{children:"Restarting..."})]})]})]})},b6=({to:e="/",children:t="Home"})=>g.jsx("div",{className:"home",children:g.jsxs(un,{className:"p-4",children:[g.jsx("h2",{children:"Oops! We could not find requested route."}),g.jsx("p",{children:"Use your browser's back button to navigate to the page you have previously come from, or just press this button."}),g.jsx("br",{}),g.jsx(Lt,{to:e,className:"btn btn-outline-primary btn-lg",children:t})]})}),Eoe=async()=>{var t;(await((t=navigator.serviceWorker)==null?void 0:t.getRegistrations())??[]).forEach(({waiting:n})=>{n==null||n.addEventListener("statechange",r=>{var i;((i=r.target)==null?void 0:i.state)==="activated"&&window.location.reload()}),n==null||n.postMessage({type:"SKIP_WAITING"})})},cE="#4696e5",Toe="rgba(70, 150, 229, 0.4)",w6="#f77f28",Ooe="rgba(247, 127, 40, 0.4)",Poe="white",koe="#161b22",x6=e=>{var t,n;return(n=(t=document.getElementsByTagName("html"))==null?void 0:t[0])==null?void 0:n.setAttribute("data-theme",e)},Moe=()=>{var e,t;return((t=(e=document.getElementsByTagName("html"))==null?void 0:e[0])==null?void 0:t.getAttribute("data-theme"))==="dark"};const Roe=(e,t,n,r,i,o,s,a)=>({fetchServers:l,servers:c,settings:f,appUpdated:h,resetAppUpdate:p})=>{const v=Pn().pathname==="/";return V.useEffect(()=>{var y;Object.keys(c).length===0&&l(),x6(((y=f.ui)==null?void 0:y.theme)??"light")},[]),g.jsxs("div",{className:"container-fluid app-container",children:[g.jsx(e,{}),g.jsxs("div",{className:"app",children:[g.jsx("div",{className:me("shlink-wrapper",{"d-flex d-md-block align-items-center":v}),children:g.jsxs(Xy,{children:[g.jsx(gt,{index:!0,element:g.jsx(t,{})}),g.jsx(gt,{path:"/settings/*",element:g.jsx(o,{})}),g.jsx(gt,{path:"/manage-servers",element:g.jsx(s,{})}),g.jsx(gt,{path:"/server/create",element:g.jsx(r,{})}),g.jsx(gt,{path:"/server/:serverId/edit",element:g.jsx(i,{})}),g.jsx(gt,{path:"/server/:serverId/*",element:g.jsx(n,{})}),g.jsx(gt,{path:"*",element:g.jsx(b6,{})})]})}),g.jsx("div",{className:"shlink-footer",children:g.jsx(a,{})})]}),g.jsx(Coe,{isOpen:h,toggle:p,forceUpdate:Eoe})]})};function mi(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:uE(e)?2:fE(e)?3:0}function mc(e,t){return ru(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Noe(e,t){return ru(e)===2?e.get(t):e[t]}function S6(e,t,n){var r=ru(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function C6(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function uE(e){return Foe&&e instanceof Map}function fE(e){return $oe&&e instanceof Set}function Ta(e){return e.o||e.t}function dE(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=T6(e);delete t[At];for(var n=gc(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=Loe),Object.freeze(e),t&&il(e,function(n,r){return hE(r,!0)},!0)),e}function Loe(){mi(2)}function pE(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Xi(e){var t=Hw[e];return t||mi(18,e),t}function Doe(e,t){Hw[e]||(Hw[e]=t)}function zw(){return bd}function g1(e,t){t&&(Xi("Patches"),e.u=[],e.s=[],e.v=t)}function lv(e){Uw(e),e.p.forEach(Aoe),e.p=null}function Uw(e){e===bd&&(bd=e.l)}function x3(e){return bd={p:[],l:bd,h:e,m:!0,_:0}}function Aoe(e){var t=e[At];t.i===0||t.i===1?t.j():t.O=!0}function v1(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||Xi("ES5").S(t,e,r),r?(n[At].P&&(lv(t),mi(4)),No(e)&&(e=cv(t,e),t.l||uv(t,e)),t.u&&Xi("Patches").M(n[At].t,e,t.u,t.s)):e=cv(t,n,[]),lv(t),t.u&&t.v(t.u,t.s),e!==E6?e:void 0}function cv(e,t,n){if(pE(t))return t;var r=t[At];if(!r)return il(t,function(o,s){return S3(e,r,t,o,s,n)},!0),t;if(r.A!==e)return t;if(!r.P)return uv(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=dE(r.k):r.o;il(r.i===3?new Set(i):i,function(o,s){return S3(e,r,i,o,s,n)}),uv(e,i,!1),n&&e.u&&Xi("Patches").R(r,n,e.u,e.s)}return r.o}function S3(e,t,n,r,i,o){if(zs(i)){var s=cv(e,i,o&&t&&t.i!==3&&!mc(t.D,r)?o.concat(r):void 0);if(S6(n,r,s),!zs(s))return;e.m=!1}if(No(i)&&!pE(i)){if(!e.h.F&&e._<1)return;cv(e,i),t&&t.A.l||uv(e,i)}}function uv(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&hE(t,n)}function y1(e,t){var n=e[At];return(n?Ta(n):e)[t]}function C3(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function os(e){e.P||(e.P=!0,e.l&&os(e.l))}function _1(e){e.o||(e.o=dE(e.t))}function Vw(e,t,n){var r=uE(t)?Xi("MapSet").N(t,n):fE(t)?Xi("MapSet").T(t,n):e.g?function(i,o){var s=Array.isArray(i),a={i:s?1:0,A:o?o.A:zw(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=a,c=wd;s&&(l=[a],c=Ju);var f=Proxy.revocable(l,c),h=f.revoke,p=f.proxy;return a.k=p,a.j=h,p}(t,n):Xi("ES5").J(t,n);return(n?n.A:zw()).p.push(r),r}function joe(e){return zs(e)||mi(22,e),function t(n){if(!No(n))return n;var r,i=n[At],o=ru(n);if(i){if(!i.P&&(i.i<4||!Xi("ES5").K(i)))return i.t;i.I=!0,r=E3(n,o),i.I=!1}else r=E3(n,o);return il(r,function(s,a){i&&Noe(i.t,s)===a||S6(r,s,t(a))}),o===3?new Set(r):r}(e)}function E3(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return dE(e)}function Ioe(){function e(o,s){var a=i[o];return a?a.enumerable=s:i[o]=a={configurable:!0,enumerable:s,get:function(){var l=this[At];return wd.get(l,o)},set:function(l){var c=this[At];wd.set(c,o,l)}},a}function t(o){for(var s=o.length-1;s>=0;s--){var a=o[s][At];if(!a.P)switch(a.i){case 5:r(a)&&os(a);break;case 4:n(a)&&os(a)}}}function n(o){for(var s=o.t,a=o.k,l=gc(a),c=l.length-1;c>=0;c--){var f=l[c];if(f!==At){var h=s[f];if(h===void 0&&!mc(s,f))return!0;var p=a[f],m=p&&p[At];if(m?m.t!==h:!C6(p,h))return!0}}var v=!!s[At];return l.length!==gc(s).length+(v?0:1)}function r(o){var s=o.k;if(s.length!==o.t.length)return!0;var a=Object.getOwnPropertyDescriptor(s,s.length-1);if(a&&!a.get)return!0;for(var l=0;l1?_-1:0),S=1;S<_;S++)w[S-1]=arguments[S];return l.produce(y,function(T){var P;return(P=o).call.apply(P,[x,T].concat(w))})}}var c;if(typeof o!="function"&&mi(6),s!==void 0&&typeof s!="function"&&mi(7),No(i)){var f=x3(r),h=Vw(r,i,void 0),p=!0;try{c=o(h),p=!1}finally{p?lv(f):Uw(f)}return typeof Promise<"u"&&c instanceof Promise?c.then(function(y){return g1(f,s),v1(y,f)},function(y){throw lv(f),y}):(g1(f,s),v1(c,f))}if(!i||typeof i!="object"){if((c=o(i))===void 0&&(c=i),c===E6&&(c=void 0),r.F&&hE(c,!0),s){var m=[],v=[];Xi("Patches").M(i,c,m,v),s(m,v)}return c}mi(21,i)},this.produceWithPatches=function(i,o){if(typeof i=="function")return function(c){for(var f=arguments.length,h=Array(f>1?f-1:0),p=1;p=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var s=Xi("Patches").$;return zs(n)?s(n,r):this.produce(n,function(a){return s(a,r)})},e}(),Ar=new zoe,O6=Ar.produce;Ar.produceWithPatches.bind(Ar);Ar.setAutoFreeze.bind(Ar);Ar.setUseProxies.bind(Ar);Ar.applyPatches.bind(Ar);Ar.createDraft.bind(Ar);Ar.finishDraft.bind(Ar);function Uoe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function M3(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Zn(1));return n(P6)(e,t)}if(typeof e!="function")throw new Error(Zn(2));var i=e,o=t,s=[],a=s,l=!1;function c(){a===s&&(a=s.slice())}function f(){if(l)throw new Error(Zn(3));return o}function h(y){if(typeof y!="function")throw new Error(Zn(4));if(l)throw new Error(Zn(5));var x=!0;return c(),a.push(y),function(){if(x){if(l)throw new Error(Zn(6));x=!1,c();var w=a.indexOf(y);a.splice(w,1),s=null}}}function p(y){if(!Voe(y))throw new Error(Zn(7));if(typeof y.type>"u")throw new Error(Zn(8));if(l)throw new Error(Zn(9));try{l=!0,o=i(o,y)}finally{l=!1}for(var x=s=a,_=0;_"u")throw new Error(Zn(12));if(typeof n(void 0,{type:fv.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Zn(13))})}function k6(e){for(var t=Object.keys(e),n={},r=0;r"u")throw c&&c.type,new Error(Zn(14));h[m]=x,f=f||x!==y}return f=f||o.length!==Object.keys(l).length,f?h:l}}function dv(){for(var e=arguments.length,t=new Array(e),n=0;n0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]0)for(var S=m.getState(),T=Array.from(n.values()),P=0,k=T;P!0,resetAppUpdate:()=>!1}}),{appUpdateAvailable:Lse,resetAppUpdate:Dse}=Rse,Ase=Nse,jse=(e,t)=>{e.serviceFactory("App",Roe,"MainHeader","Home","MenuLayout","CreateServer","EditServer","Settings","ManageServers","ShlinkVersionsContainer"),e.decorator("App",t(["servers","settings","appUpdated"],["fetchServers","resetAppUpdate"])),e.serviceFactory("appUpdateAvailable",()=>Lse),e.serviceFactory("resetAppUpdate",()=>Dse)};function pv(e){return t=>{const{resetSelectedServer:n}=t;return V.useEffect(()=>{n()},[]),g.jsx(e,{...t})}}const Dl=({children:e,to:t,className:n,...r})=>g.jsx(nj,{className:({isActive:i})=>me("aside-menu__item",n,{"aside-menu__item--selected":i}),to:t,...r,children:e}),Ise=e=>({selectedServer:t,showOnMobile:n=!1})=>{const r=Ps(t),i=r?t.id:"",{pathname:o}=Pn(),s=me("aside-menu",{"aside-menu--hidden":!n}),a=l=>`/server/${i}${l}`;return g.jsx("aside",{className:s,children:g.jsxs("nav",{className:"nav flex-column aside-menu__nav",children:[g.jsxs(Dl,{to:a("/overview"),children:[g.jsx(je,{fixedWidth:!0,icon:vQ}),g.jsx("span",{className:"aside-menu__item-text",children:"Overview"})]}),g.jsxs(Dl,{to:a("/list-short-urls/1"),className:me({"aside-menu__item--selected":o.match("/list-short-urls")!==null}),children:[g.jsx(je,{fixedWidth:!0,icon:qj}),g.jsx("span",{className:"aside-menu__item-text",children:"List short URLs"})]}),g.jsxs(Dl,{to:a("/create-short-url"),children:[g.jsx(je,{fixedWidth:!0,icon:xQ,flip:"horizontal"}),g.jsx("span",{className:"aside-menu__item-text",children:"Create short URL"})]}),g.jsxs(Dl,{to:a("/manage-tags"),children:[g.jsx(je,{fixedWidth:!0,icon:Zj}),g.jsx("span",{className:"aside-menu__item-text",children:"Manage tags"})]}),g.jsxs(Dl,{to:a("/manage-domains"),children:[g.jsx(je,{fixedWidth:!0,icon:KX}),g.jsx("span",{className:"aside-menu__item-text",children:"Manage domains"})]}),g.jsxs(Dl,{to:a("/edit"),className:"aside-menu__item--push",children:[g.jsx(je,{fixedWidth:!0,icon:oQ}),g.jsx("span",{className:"aside-menu__item-text",children:"Edit this server"})]}),r&&g.jsx(e,{className:"aside-menu__item aside-menu__item--danger",textClassName:"aside-menu__item-text",server:t})]})})},Fse=({location:e},{error:t})=>class extends V.Component{constructor(n){super(n),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(n){t(n)}render(){const{hasError:n}=this.state;if(n)return g.jsx("div",{className:"home",children:g.jsxs(un,{className:"p-4",children:[g.jsx("h1",{children:"Oops! This is awkward :S"}),g.jsx("p",{children:"It seems that something went wrong. Try refreshing the page or just click this button."}),g.jsx("br",{}),g.jsx(ht,{outline:!0,color:"primary",onClick:()=>e.reload(),children:"Take me back"})]})});const{children:r}=this.props;return r}},Si=({href:e,children:t,rel:n,...r})=>g.jsx("a",{target:"_blank",rel:`noopener noreferrer${n?` ${n}`:""}`,href:e,...r,children:t??e});const $se=({id:e,name:t})=>g.jsxs(oE,{tag:Lt,to:`/server/${e}`,className:"servers-list__server-item",children:[t,g.jsx(je,{icon:OQ,className:"servers-list__server-item-icon"})]}),z6=({servers:e,children:t,embedded:n=!1})=>g.jsxs(g.Fragment,{children:[t&&g.jsx("h5",{className:"mb-md-3",children:t}),e.length>0&&g.jsx(nE,{className:me("servers-list__list-group",{"servers-list__list-group--embedded":n}),children:e.map(({id:r,name:i})=>g.jsx($se,{id:r,name:i},r))})]}),U6=({color:e=cE,className:t})=>g.jsx("svg",{className:t,viewBox:"0 0 512 512",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:g.jsxs("g",{fill:e,children:[g.jsx("path",{d:" M 23.71 85.08 C 17.22 49.81 49.44 14.86 85.08 18.12 C 118.83 19.21 145.72 53.33 139.45 86.37 C 155.64 102.30 171.32 118.83 187.87 134.36 C 198.32 111.73 208.84 89.12 219.57 66.62 C 226.05 53.84 243.47 48.74 255.73 56.27 C 263.76 62.10 270.34 69.69 277.25 76.75 C 286.28 86.61 285.72 102.89 276.31 112.31 C 223.38 165.37 170.38 218.37 117.35 271.34 C 107.72 280.99 91.01 281.25 81.11 271.86 C 74.39 264.94 66.82 258.69 61.24 250.77 C 53.72 238.52 58.85 221.07 71.64 214.62 C 94.11 203.87 116.72 193.38 139.33 182.91 C 123.81 166.36 107.30 150.68 91.37 134.49 C 60.20 140.28 27.37 116.78 23.71 85.08 Z"}),g.jsx("path",{d:" M 205.21 201.23 C 225.32 181.36 260.88 181.11 281.14 200.86 C 299.25 218.75 317.37 236.65 335.10 254.93 C 356.73 278.01 352.01 318.70 326.03 336.56 C 320.07 330.47 313.73 324.65 308.12 318.28 C 323.86 309.39 328.76 286.18 316.63 272.39 C 301.73 256.95 286.30 242.03 271.24 226.75 C 264.49 219.65 256.80 212.00 246.37 211.52 C 224.65 208.64 205.52 233.36 214.49 253.58 C 221.09 266.81 234.22 275.12 243.62 286.24 C 240.43 295.96 238.09 306.13 238.29 316.46 C 225.55 304.29 213.16 291.73 200.89 279.09 C 180.97 257.57 183.10 220.45 205.21 201.23 Z"}),g.jsx("path",{d:" M 273.90 352.07 C 252.28 328.99 256.98 288.31 282.96 270.46 C 288.93 276.54 295.26 282.36 300.88 288.72 C 285.14 297.62 280.23 320.82 292.38 334.61 C 307.27 350.05 322.70 364.96 337.75 380.25 C 344.51 387.35 352.20 395.00 362.64 395.48 C 384.35 398.37 403.49 373.64 394.51 353.42 C 387.92 340.18 374.78 331.88 365.38 320.76 C 368.56 311.04 370.91 300.86 370.71 290.54 C 383.45 302.70 395.84 315.27 408.11 327.91 C 428.03 349.43 425.90 386.55 403.78 405.77 C 383.68 425.64 348.13 425.89 327.86 406.14 C 309.75 388.25 291.60 370.37 273.90 352.07 Z"}),g.jsx("path",{d:" M 422.11 403.83 C 431.96 394.07 441.60 384.06 451.66 374.51 C 460.90 383.74 471.89 392.70 474.89 406.11 C 480.16 429.97 484.08 454.13 488.76 478.12 C 490.00 483.41 484.47 488.29 479.35 486.63 C 454.66 481.52 429.55 478.12 405.14 471.84 C 393.17 467.97 385.20 457.75 376.55 449.27 C 386.39 439.49 396.13 429.60 406.06 419.91 C 416.37 433.45 435.74 414.00 422.11 403.83 Z"})]})});const Bse=({servers:e})=>{const t=Io(),n=Qc(e),r=!Wn(n);return V.useEffect(()=>{const i=n.find(({autoConnect:o})=>o);i&&t(`/server/${i.id}`)},[]),g.jsx("div",{className:"home",children:g.jsx(Sr,{className:"home__main-card",children:g.jsxs(Qn,{className:"g-0",children:[g.jsx("div",{className:"col-md-5 d-none d-md-block",children:g.jsx("div",{className:"home__logo-wrapper",children:g.jsx("div",{className:"home__logo",children:g.jsx(U6,{})})})}),g.jsxs("div",{className:"col-md-7 home__servers-container",children:[g.jsx("div",{className:"home__title-wrapper",children:g.jsx("h1",{className:"home__title",children:"Welcome!"})}),g.jsx(z6,{embedded:!0,servers:n,children:!r&&g.jsxs("div",{className:"p-4 text-center",children:[g.jsx("p",{className:"mb-5",children:"This application will help you manage your Shlink servers."}),g.jsx("p",{children:g.jsxs(Lt,{to:"/server/create",className:"btn btn-outline-primary btn-lg me-2",children:[g.jsx(je,{icon:vC})," ",g.jsx("span",{className:"ms-1",children:"Add a server"})]})}),g.jsx("p",{className:"mb-0 mt-5",children:g.jsx(Si,{href:"https://shlink.io/documentation",children:g.jsxs("small",{children:[g.jsx("span",{className:"me-1",children:"Learn more about Shlink"})," ",g.jsx(je,{icon:lQ})]})})})]})})]})]})})})};const zse=e=>()=>{const[t,n,,r]=It(),i=Pn(),{pathname:o}=i;V.useEffect(r,[i]);const s="/settings",a=me("main-header__toggle-icon",{"main-header__toggle-icon--opened":t});return g.jsxs(UC,{color:"primary",dark:!0,fixed:"top",className:"main-header",expand:"md",children:[g.jsxs(VC,{tag:Lt,to:"/",children:[g.jsx(U6,{className:"main-header__brand-logo",color:"white"})," Shlink"]}),g.jsx(HC,{onClick:n,children:g.jsx(je,{icon:EQ,className:a})}),g.jsx(r6,{navbar:!0,isOpen:t,children:g.jsxs(f_,{navbar:!0,className:"ms-auto",children:[g.jsx(WC,{children:g.jsxs(t6,{tag:Lt,to:s,active:o.startsWith(s),children:[g.jsx(je,{icon:RQ}),"  Settings"]})}),g.jsx(e,{})]})})]})};const iu=({children:e})=>g.jsx("div",{className:"no-menu-wrapper container-xl",children:e}),Use=e=>({error:"border-danger",default:""})[e],Vse=e=>({error:"text-danger",default:"text-muted"})[e],So=({className:e,children:t,loading:n=!1,type:r="default",fullWidth:i=!1})=>{const o=me({"col-md-12":i,"col-md-10 offset-md-1":!i});return g.jsx(Qn,{className:me("g-0",e),children:g.jsx("div",{className:o,children:g.jsx(Sr,{className:Use(r),body:!0,children:g.jsxs("h3",{className:me("text-center mb-0",Vse(r)),children:[n&&g.jsx(je,{icon:Yj,spin:!0}),n&&g.jsx("span",{className:"ms-2",children:t??"Loading..."}),!n&&t]})})})})};function V6(e,t){return n=>{const r=Ks(),{selectServer:i,selectedServer:o}=n;return V.useEffect(()=>{r.serverId&&i(r.serverId)},[r.serverId]),o?MZ(o)?g.jsx(t,{}):g.jsx(e,{...n}):g.jsx(iu,{children:g.jsx(So,{loading:!0})})}}const rr=(e,t)=>dse(e,t,{serializeError:JS}),Hse=(e,t)=>{const n=$3(e),r=$3(t),i=n.pop(),o=r.pop(),s=U3(n,r);return s!==0?s:i&&o?U3(i.split("."),o.split(".")):i||o?i?-1:1:0},qw=(e,t,n)=>{Gse(n);const r=Hse(e,t);return H6[n].includes(r)},Wse=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,$3=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(Wse);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},B3=e=>e==="*"||e==="x"||e==="X",z3=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},Yse=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],qse=(e,t)=>{if(B3(e)||B3(t))return 0;const[n,r]=Yse(z3(e),z3(t));return n>r?1:n{for(let n=0;n":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1]},V3=Object.keys(H6),Gse=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(V3.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${V3.join("|")}`)},_E=(e,t,n=1)=>rC(n,e+1).map(t),gi=e=>!Fo(e)&&!Wn(e),rh=e=>Dt(t=>t.preventDefault(),e),S1=e=>Wn(e)?null:e,ga=e=>t=>e===t,W6=e=>e?"true":"false",C1=e=>e===void 0?void 0:W6(e),Zse=(e,{maxVersion:t,minVersion:n})=>{if(!gi(e))return!1;const r=!n||qw(e,n,">=");return(!t||qw(e,t,"<="))&&r},Y6=Cj(JS,e=>{try{return qw(e,e,"=")}catch{return!1}}),q6=e=>Y6(e)?`v${e}`:e,G6=(e="latest")=>t=>Y6(t)?t:e,bE="shlink/selectedServer",Kse="1.0.0",Xse="999.999.999",Qse="latest",Jse=Dt(e=>e===Qse?Xse:e,G6(Kse)),eae=Cj(e=>`${e.id}_${e.url}_${e.apiKey}`,async(e,t)=>t().then(({version:n})=>({version:Jse(n),printableVersion:q6(n)}))),H3=null,wE=yn(`${bE}/resetSelectedServer`),Z6=e=>rr(`${bE}/selectServer`,async(t,{dispatch:n,getState:r})=>{n(wE());const{servers:i}=r(),o=i[t];if(!o)return{serverNotFound:!0};try{const{health:s}=e(o),{version:a,printableVersion:l}=await eae(o,s);return{...o,version:a,printableVersion:l}}catch{return{...o,serverNotReachable:!0}}}),tae=(e,t)=>{const n=Mse();return n.startListening({actionCreator:e.fulfilled,effect:({payload:r},{dispatch:i})=>{t_(r)&&i(t())}}),n},nae=e=>Yn({name:bE,initialState:H3,reducers:{},extraReducers:t=>{t.addCase(wE,()=>H3),t.addCase(e.fulfilled,(n,{payload:r})=>r)}}),Ii=e=>t=>t_(t)&&Zse(t.version,{minVersion:e}),xE={forwardQuery:Ii("2.9.0"),nonRestCors:Ii("2.9.0"),defaultDomainRedirectsEdition:Ii("2.10.0"),nonOrphanVisits:Ii("3.0.0"),allTagsFiltering:Ii("3.0.0"),tagsStats:Ii("3.0.0"),domainVisits:Ii("3.1.0"),excludeBotsOnShortUrls:Ii("3.4.0"),filterDisabledUrls:Ii("3.4.0"),deviceLongUrls:Ii("3.5.0")};Object.freeze(xE);const Pi=(e,t)=>V.useMemo(()=>xE[e](t),[e,Z6]);const rae=(e,t,n,r,i,o,s,a,l,c,f,h,p)=>V6(({selectedServer:m,sidebarNotPresent:v,sidebarPresent:y})=>{const x=Pn(),[_,w,S,T]=It(),P=t_(m);if(V.useEffect(()=>T(),[x]),V.useEffect(()=>(P&&y(),()=>v()),[]),!P)return g.jsx(c,{});const k=Pi("nonOrphanVisits",m),N=Pi("domainVisits",m),D=me("menu-layout__burger-icon",{"menu-layout__burger-icon--active":_}),z=boe(S,T);return g.jsxs(g.Fragment,{children:[g.jsx(je,{icon:WX,className:D,onClick:w}),g.jsx("div",{...z,className:"menu-layout__swipeable",children:g.jsxs("div",{className:"menu-layout__swipeable-inner",children:[g.jsx(n,{selectedServer:m,showOnMobile:_}),g.jsx("div",{className:"menu-layout__container",onClick:()=>T(),children:g.jsx("div",{className:"container-xl",children:g.jsxs(Xy,{children:[g.jsx(gt,{index:!0,element:g.jsx(WS,{replace:!0,to:"overview"})}),g.jsx(gt,{path:"/overview",element:g.jsx(f,{})}),g.jsx(gt,{path:"/list-short-urls/:page",element:g.jsx(t,{})}),g.jsx(gt,{path:"/create-short-url",element:g.jsx(r,{})}),g.jsx(gt,{path:"/short-code/:shortCode/visits/*",element:g.jsx(i,{})}),g.jsx(gt,{path:"/short-code/:shortCode/edit",element:g.jsx(h,{})}),g.jsx(gt,{path:"/tag/:tag/visits/*",element:g.jsx(o,{})}),N&&g.jsx(gt,{path:"/domain/:domain/visits/*",element:g.jsx(s,{})}),g.jsx(gt,{path:"/orphan-visits/*",element:g.jsx(a,{})}),k&&g.jsx(gt,{path:"/non-orphan-visits/*",element:g.jsx(l,{})}),g.jsx(gt,{path:"/manage-tags",element:g.jsx(e,{})}),g.jsx(gt,{path:"/manage-domains",element:g.jsx(p,{})}),g.jsx(gt,{path:"*",element:g.jsx(b6,{to:`/server/${m.id}/list-short-urls/1`,children:"List short URLs"})})]})})})]})})]})},c),iae={sidebarPresent:!1},{actions:oae,reducer:sae}=Yn({name:"shlink/sidebar",initialState:iae,reducers:{sidebarPresent:()=>({sidebarPresent:!0}),sidebarNotPresent:()=>({sidebarPresent:!1})}}),{sidebarPresent:aae,sidebarNotPresent:lae}=oae,cae=sae,uae=({children:e})=>{const t=Pn();return V.useEffect(()=>{scrollTo(0,0)},[t]),g.jsx(g.Fragment,{children:e})},fae="%_VERSION_%",dae=Dt(G6(),q6),W3=({project:e,version:t})=>g.jsx(Si,{href:`https://github.com/shlinkio/${e}/releases/${t}`,className:"text-muted",children:g.jsx("b",{children:t})}),hae=({selectedServer:e,clientVersion:t=fae})=>{const n=dae(t);return g.jsxs("small",{className:"text-muted",children:[t_(e)&&g.jsxs(g.Fragment,{children:["Server: ",g.jsx(W3,{project:"shlink",version:e.printableVersion})," - "]}),"Client: ",g.jsx(W3,{project:"shlink-web-client",version:n})]})};const pae=({selectedServer:e,sidebar:t})=>{const n=me("text-center",{"shlink-versions-container--with-sidebar":t.sidebarPresent});return g.jsx("div",{className:n,children:g.jsx(hae,{selectedServer:e})})},Y3={"Content-Type":"application/json"},q3=e=>e!=null&&e.body?e?{...e,headers:{...e.headers??{},...Y3}}:{headers:Y3}:e;class mae{constructor(t){xe(this,"fetchJson",(t,n)=>this.fetch(t,q3(n)).then(async r=>{const i=await r.json();if(!r.ok)throw i;return i}));xe(this,"fetchEmpty",(t,n)=>this.fetch(t,q3(n)).then(async r=>{if(!r.ok)throw await r.json()}));xe(this,"fetchBlob",t=>this.fetch(t).then(n=>n.blob()));this.fetch=t}}const K6=({document:e},t,n)=>{const r=e.createElement("a");r.setAttribute("href",t),r.setAttribute("download",n),r.style.visibility="hidden",e.body.appendChild(r),r.click(),e.body.removeChild(r)},X6=(e,t,n)=>{const r=new Blob([t],{type:"text/csv;charset=utf-8;"}),i=URL.createObjectURL(r);K6(e,i,n)};class gae{constructor(t,n){this.httpClient=t,this.window=n}async saveImage(t,n){const r=await this.httpClient.fetchBlob(t),i=URL.createObjectURL(r);K6(this.window,i,n)}}class vae{constructor(t,n){xe(this,"exportVisits",(t,n)=>{n.length&&this.exportCsv(t,n)});xe(this,"exportShortUrls",t=>{t.length&&this.exportCsv("short_urls.csv",t)});xe(this,"exportCsv",(t,n)=>{const r=this.jsonToCsv(n);X6(this.window,r,t)});this.window=t,this.jsonToCsv=n}}const yae=(e,t)=>{e.constant("window",window),e.constant("console",console),e.constant("fetch",window.fetch.bind(window)),e.service("HttpClient",mae,"fetch"),e.service("ImageDownloader",gae,"HttpClient","window"),e.service("ReportExporter",vae,"window","jsonToCsv"),e.serviceFactory("ScrollToTop",()=>uae),e.serviceFactory("MainHeader",zse,"ServersDropdown"),e.serviceFactory("Home",()=>Bse),e.decorator("Home",pv),e.decorator("Home",t(["servers"],["resetSelectedServer"])),e.serviceFactory("MenuLayout",rae,"TagsList","ShortUrlsList","AsideMenu","CreateShortUrl","ShortUrlVisits","TagVisits","DomainVisits","OrphanVisits","NonOrphanVisits","ServerError","Overview","EditShortUrl","ManageDomains"),e.decorator("MenuLayout",t(["selectedServer"],["selectServer","sidebarPresent","sidebarNotPresent"])),e.serviceFactory("AsideMenu",Ise,"DeleteServerButton"),e.serviceFactory("ShlinkVersionsContainer",()=>pae),e.decorator("ShlinkVersionsContainer",t(["selectedServer","sidebar"])),e.serviceFactory("ErrorHandler",Fse,"window","console"),e.serviceFactory("sidebarPresent",()=>aae),e.serviceFactory("sidebarNotPresent",()=>lae)};const na=({text:e,disabled:t=!1,className:n="",children:r,dropdownClassName:i,right:o=!1,minWidth:s})=>{const[a,l]=It(),c=`dropdown-btn__toggle btn-block ${n}`,f={minWidth:s&&`${s}px`};return g.jsxs(tu,{isOpen:a,toggle:l,disabled:t,className:i,children:[g.jsx(nu,{caret:!0,className:c,color:"primary",children:e}),g.jsx(hl,{className:"w-100",end:o,style:f,children:r})]})};const _ae=({listDomains:e,value:t,domainsList:n,onChange:r})=>{const[i,,o,s]=It(),{domains:a}=n,l=Wn(t),c=()=>r("");return V.useEffect(()=>{e()},[]),i?g.jsxs(Qd,{children:[g.jsx($c,{value:t??"",placeholder:"Domain",onChange:f=>r(f.target.value)}),g.jsx(ht,{id:"backToDropdown",outline:!0,type:"button",className:"domains-dropdown__back-btn","aria-label":"Back to domains list",onClick:Dt(c,s),children:g.jsx(je,{icon:dQ})}),g.jsx(Er,{target:"backToDropdown",placement:"left",trigger:"hover",children:"Existing domains"})]}):g.jsxs(na,{text:l?"Domain":`Domain: ${t}`,className:l?"domains-dropdown__toggle-btn":"domains-dropdown__toggle-btn--active",children:[a.map(({domain:f,isDefault:h})=>g.jsxs(Ue,{active:(t===f||h)&&l,onClick:()=>r(f),children:[f,h&&g.jsx("span",{className:"float-end text-muted",children:"default"})]},f)),g.jsx(Ue,{divider:!0}),g.jsx(Ue,{onClick:Dt(c,o),children:g.jsx("i",{children:"New domain"})})]})},Lo=({errorData:e,fallbackMessage:t})=>g.jsxs(g.Fragment,{children:[(e==null?void 0:e.detail)??t,OX(e)&&g.jsxs("p",{className:"mb-0",children:["Invalid elements: [",e.invalidElements.join(", "),"]"]})]}),Nr=({children:e,type:t,className:n,small:r=!1})=>g.jsx(Qn,{className:n,children:g.jsx("div",{className:me({"col-md-10 offset-md-1":!r,"col-12":r}),children:g.jsx(un,{role:"document",className:me("text-center",{"bg-main":t==="success","bg-danger":t==="error","bg-warning":t==="warning","text-white":t!=="warning"}),bodyClassName:me({"p-2":r}),children:e})})});const bae=500;let Op;const ih=({onChange:e,className:t,large:n=!0,noBorder:r=!1,initialValue:i=""})=>{const[o,s]=V.useState(i),a=()=>{Op&&clearTimeout(Op),Op=null},l=(c,f=bae)=>{s(c),a(),Op=setTimeout(()=>{e(c),a()},f)};return g.jsxs("div",{className:me("search-field",t),children:[g.jsx("input",{type:"text",className:me("form-control search-field__input",{"form-control-lg":n,"search-field__input--no-border":r}),placeholder:"Search...",value:o,onChange:c=>l(c.target.value)}),g.jsx(je,{icon:CQ,className:"search-field__icon"}),g.jsx("div",{className:"close search-field__close btn-close",hidden:o==="",id:"search-field__close",onClick:()=>l("",0)})]})};const x_=({isOpen:e,toggle:t,children:n,right:r=!0})=>g.jsxs(h_,{toggle:t,isOpen:e,children:[g.jsxs(nu,{size:"sm",caret:!0,outline:!0,className:"dropdown-btn-menu__dropdown-toggle",children:[" ",g.jsx(je,{icon:mQ})," "]}),g.jsx(hl,{end:r,children:n})]}),Of=(e,t,n)=>Fo(n)?e.shortCode===t&&!e.domain:e.shortCode===t&&e.domain===n,wae=(e,t)=>!e.domain&&t===E5?!0:e.domain===t,xae=(e,t)=>{const n=(t==null?void 0:t.validateUrls)??!1;return e?{longUrl:e.longUrl,tags:e.tags,title:e.title??void 0,domain:e.domain??void 0,validSince:e.meta.validSince??void 0,validUntil:e.meta.validUntil??void 0,maxVisits:e.meta.maxVisits??void 0,crawlable:e.crawlable,forwardQuery:e.forwardQuery,deviceLongUrls:e.deviceLongUrls,validateUrl:n}:{longUrl:"",validateUrl:n}},Q6="__",Sae=e=>e.replaceAll("/",Q6),hm=e=>e.replaceAll(Q6,"/");function Qe(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function Oe(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function pm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?pm=function(n){return typeof n}:pm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},pm(e)}function Me(e){Oe(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||pm(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function ml(e,t){Oe(2,arguments);var n=Me(e),r=Qe(t);return isNaN(r)?new Date(NaN):(r&&n.setDate(n.getDate()+r),n)}function to(e,t){Oe(2,arguments);var n=Me(e),r=Qe(t);if(isNaN(r))return new Date(NaN);if(!r)return n;var i=n.getDate(),o=new Date(n.getTime());o.setMonth(n.getMonth()+r+1,0);var s=o.getDate();return i>=s?o:(n.setFullYear(o.getFullYear(),o.getMonth(),i),n)}function mm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?mm=function(n){return typeof n}:mm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},mm(e)}function Cae(e,t){if(Oe(2,arguments),!t||mm(t)!=="object")return new Date(NaN);var n=t.years?Qe(t.years):0,r=t.months?Qe(t.months):0,i=t.weeks?Qe(t.weeks):0,o=t.days?Qe(t.days):0,s=t.hours?Qe(t.hours):0,a=t.minutes?Qe(t.minutes):0,l=t.seconds?Qe(t.seconds):0,c=Me(e),f=r||n?to(c,r+n*12):c,h=o||i?ml(f,o+i*7):f,p=a+s*60,m=l+p*60,v=m*1e3,y=new Date(h.getTime()+v);return y}function SE(e,t){Oe(2,arguments);var n=Me(e).getTime(),r=Qe(t);return new Date(n+r)}var Eae=36e5;function Tae(e,t){Oe(2,arguments);var n=Qe(t);return SE(e,n*Eae)}var Oae={};function Vo(){return Oae}function J6(e,t){var n,r,i,o,s,a,l,c;Oe(1,arguments);var f=Vo(),h=Qe((n=(r=(i=(o=t==null?void 0:t.weekStartsOn)!==null&&o!==void 0?o:t==null||(s=t.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.weekStartsOn)!==null&&i!==void 0?i:f.weekStartsOn)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Me(e),m=p.getDay(),v=(m=i.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function kae(e){Oe(1,arguments);var t=Pae(e),n=new Date(0);n.setFullYear(t,0,4),n.setHours(0,0,0,0);var r=Sd(n);return r}function Bc(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function Lr(e){Oe(1,arguments);var t=Me(e);return t.setHours(0,0,0,0),t}var Mae=864e5;function Cd(e,t){Oe(2,arguments);var n=Lr(e),r=Lr(t),i=n.getTime()-Bc(n),o=r.getTime()-Bc(r);return Math.round((i-o)/Mae)}var Rae=6e4;function Gw(e,t){Oe(2,arguments);var n=Qe(t);return SE(e,n*Rae)}function CE(e,t){Oe(2,arguments);var n=Qe(t),r=n*7;return ml(e,r)}function zc(e,t){Oe(2,arguments);var n=Qe(t);return to(e,n*12)}function gm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?gm=function(n){return typeof n}:gm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},gm(e)}function G3(e){Oe(1,arguments);var t;if(e&&typeof e.forEach=="function")t=e;else if(gm(e)==="object"&&e!==null)t=Array.prototype.slice.call(e);else return new Date(NaN);var n;return t.forEach(function(r){var i=Me(r);(n===void 0||ni||isNaN(i.getDate()))&&(n=i)}),n||new Date(NaN)}function ym(e,t){Oe(2,arguments);var n=Me(e),r=Me(t),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}var EE=6e4,S_=36e5,Nae=1e3;function Lae(e,t){Oe(2,arguments);var n=Lr(e),r=Lr(t);return n.getTime()===r.getTime()}function _m(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_m=function(n){return typeof n}:_m=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},_m(e)}function TE(e){return Oe(1,arguments),e instanceof Date||_m(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function e5(e){if(Oe(1,arguments),!TE(e)&&typeof e!="number")return!1;var t=Me(e);return!isNaN(Number(t))}function Ed(e,t){Oe(2,arguments);var n=Me(e),r=Me(t),i=n.getFullYear()-r.getFullYear(),o=n.getMonth()-r.getMonth();return i*12+o}function Zw(e){Oe(1,arguments);var t=Me(e),n=Math.floor(t.getMonth()/3)+1;return n}function mv(e,t){Oe(2,arguments);var n=Me(e),r=Me(t);return n.getFullYear()-r.getFullYear()}function K3(e,t){var n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function OE(e,t){Oe(2,arguments);var n=Me(e),r=Me(t),i=K3(n,r),o=Math.abs(Cd(n,r));n.setDate(n.getDate()-i*o);var s=+(K3(n,r)===-i),a=i*(o-s);return a===0?0:a}function t5(e,t){return Oe(2,arguments),Me(e).getTime()-Me(t).getTime()}var X3={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},Dae="trunc";function PE(e){return e?X3[e]:X3[Dae]}function Aae(e,t,n){Oe(2,arguments);var r=t5(e,t)/S_;return PE(n==null?void 0:n.roundingMethod)(r)}function ol(e){Oe(1,arguments);var t=Me(e);return t.setHours(23,59,59,999),t}function jae(e){Oe(1,arguments);var t=Me(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function Iae(e){Oe(1,arguments);var t=Me(e);return ol(t).getTime()===jae(t).getTime()}function gv(e,t){Oe(2,arguments);var n=Me(e),r=Me(t),i=ym(n,r),o=Math.abs(Ed(n,r)),s;if(o<1)s=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-i*o);var a=ym(n,r)===-i;Iae(Me(e))&&o===1&&ym(e,r)===1&&(a=!1),s=i*(o-Number(a))}return s===0?0:s}function Fae(e,t,n){Oe(2,arguments);var r=t5(e,t)/1e3;return PE(n==null?void 0:n.roundingMethod)(r)}function $ae(e,t,n){Oe(2,arguments);var r=OE(e,t)/7;return PE(n==null?void 0:n.roundingMethod)(r)}function Kw(e){Oe(1,arguments);var t=Me(e),n=t.getMonth(),r=n-n%3;return t.setMonth(r,1),t.setHours(0,0,0,0),t}function Bae(e){Oe(1,arguments);var t=Me(e);return t.setDate(1),t.setHours(0,0,0,0),t}function zae(e){Oe(1,arguments);var t=Me(e),n=new Date(0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Uae(e,t){var n,r,i,o,s,a,l,c;Oe(1,arguments);var f=Vo(),h=Qe((n=(r=(i=(o=t==null?void 0:t.weekStartsOn)!==null&&o!==void 0?o:t==null||(s=t.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.weekStartsOn)!==null&&i!==void 0?i:f.weekStartsOn)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Me(e),m=p.getDay(),v=(m=i.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function Yae(e){Oe(1,arguments);var t=r5(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var r=Uc(n);return r}var qae=6048e5;function i5(e){Oe(1,arguments);var t=Me(e),n=Uc(t).getTime()-Yae(t).getTime();return Math.round(n/qae)+1}function sl(e,t){var n,r,i,o,s,a,l,c;Oe(1,arguments);var f=Vo(),h=Qe((n=(r=(i=(o=t==null?void 0:t.weekStartsOn)!==null&&o!==void 0?o:t==null||(s=t.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.weekStartsOn)!==null&&i!==void 0?i:f.weekStartsOn)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Me(e),m=p.getUTCDay(),v=(m=1&&m<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var v=new Date(0);v.setUTCFullYear(h+1,0,m),v.setUTCHours(0,0,0,0);var y=sl(v,t),x=new Date(0);x.setUTCFullYear(h,0,m),x.setUTCHours(0,0,0,0);var _=sl(x,t);return f.getTime()>=y.getTime()?h+1:f.getTime()>=_.getTime()?h:h-1}function Gae(e,t){var n,r,i,o,s,a,l,c;Oe(1,arguments);var f=Vo(),h=Qe((n=(r=(i=(o=t==null?void 0:t.firstWeekContainsDate)!==null&&o!==void 0?o:t==null||(s=t.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.firstWeekContainsDate)!==null&&i!==void 0?i:f.firstWeekContainsDate)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&n!==void 0?n:1),p=kE(e,t),m=new Date(0);m.setUTCFullYear(p,0,h),m.setUTCHours(0,0,0,0);var v=sl(m,t);return v}var Zae=6048e5;function o5(e,t){Oe(1,arguments);var n=Me(e),r=sl(n,t).getTime()-Gae(n,t).getTime();return Math.round(r/Zae)+1}function tt(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length0?r:1-r;return tt(n==="yy"?i%100:i,n.length)},M:function(t,n){var r=t.getUTCMonth();return n==="M"?String(r+1):tt(r+1,2)},d:function(t,n){return tt(t.getUTCDate(),n.length)},a:function(t,n){var r=t.getUTCHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h:function(t,n){return tt(t.getUTCHours()%12||12,n.length)},H:function(t,n){return tt(t.getUTCHours(),n.length)},m:function(t,n){return tt(t.getUTCMinutes(),n.length)},s:function(t,n){return tt(t.getUTCSeconds(),n.length)},S:function(t,n){var r=n.length,i=t.getUTCMilliseconds(),o=Math.floor(i*Math.pow(10,r-3));return tt(o,n.length)}};const Zo=Kae;var Al={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Xae={G:function(t,n,r){var i=t.getUTCFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return r.era(i,{width:"abbreviated"});case"GGGGG":return r.era(i,{width:"narrow"});case"GGGG":default:return r.era(i,{width:"wide"})}},y:function(t,n,r){if(n==="yo"){var i=t.getUTCFullYear(),o=i>0?i:1-i;return r.ordinalNumber(o,{unit:"year"})}return Zo.y(t,n)},Y:function(t,n,r,i){var o=kE(t,i),s=o>0?o:1-o;if(n==="YY"){var a=s%100;return tt(a,2)}return n==="Yo"?r.ordinalNumber(s,{unit:"year"}):tt(s,n.length)},R:function(t,n){var r=r5(t);return tt(r,n.length)},u:function(t,n){var r=t.getUTCFullYear();return tt(r,n.length)},Q:function(t,n,r){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"Q":return String(i);case"QQ":return tt(i,2);case"Qo":return r.ordinalNumber(i,{unit:"quarter"});case"QQQ":return r.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,n,r){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"q":return String(i);case"qq":return tt(i,2);case"qo":return r.ordinalNumber(i,{unit:"quarter"});case"qqq":return r.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,n,r){var i=t.getUTCMonth();switch(n){case"M":case"MM":return Zo.M(t,n);case"Mo":return r.ordinalNumber(i+1,{unit:"month"});case"MMM":return r.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(i,{width:"wide",context:"formatting"})}},L:function(t,n,r){var i=t.getUTCMonth();switch(n){case"L":return String(i+1);case"LL":return tt(i+1,2);case"Lo":return r.ordinalNumber(i+1,{unit:"month"});case"LLL":return r.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(i,{width:"wide",context:"standalone"})}},w:function(t,n,r,i){var o=o5(t,i);return n==="wo"?r.ordinalNumber(o,{unit:"week"}):tt(o,n.length)},I:function(t,n,r){var i=i5(t);return n==="Io"?r.ordinalNumber(i,{unit:"week"}):tt(i,n.length)},d:function(t,n,r){return n==="do"?r.ordinalNumber(t.getUTCDate(),{unit:"date"}):Zo.d(t,n)},D:function(t,n,r){var i=Wae(t);return n==="Do"?r.ordinalNumber(i,{unit:"dayOfYear"}):tt(i,n.length)},E:function(t,n,r){var i=t.getUTCDay();switch(n){case"E":case"EE":case"EEE":return r.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(i,{width:"short",context:"formatting"});case"EEEE":default:return r.day(i,{width:"wide",context:"formatting"})}},e:function(t,n,r,i){var o=t.getUTCDay(),s=(o-i.weekStartsOn+8)%7||7;switch(n){case"e":return String(s);case"ee":return tt(s,2);case"eo":return r.ordinalNumber(s,{unit:"day"});case"eee":return r.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(o,{width:"short",context:"formatting"});case"eeee":default:return r.day(o,{width:"wide",context:"formatting"})}},c:function(t,n,r,i){var o=t.getUTCDay(),s=(o-i.weekStartsOn+8)%7||7;switch(n){case"c":return String(s);case"cc":return tt(s,n.length);case"co":return r.ordinalNumber(s,{unit:"day"});case"ccc":return r.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(o,{width:"narrow",context:"standalone"});case"cccccc":return r.day(o,{width:"short",context:"standalone"});case"cccc":default:return r.day(o,{width:"wide",context:"standalone"})}},i:function(t,n,r){var i=t.getUTCDay(),o=i===0?7:i;switch(n){case"i":return String(o);case"ii":return tt(o,n.length);case"io":return r.ordinalNumber(o,{unit:"day"});case"iii":return r.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(i,{width:"short",context:"formatting"});case"iiii":default:return r.day(i,{width:"wide",context:"formatting"})}},a:function(t,n,r){var i=t.getUTCHours(),o=i/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,n,r){var i=t.getUTCHours(),o;switch(i===12?o=Al.noon:i===0?o=Al.midnight:o=i/12>=1?"pm":"am",n){case"b":case"bb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(t,n,r){var i=t.getUTCHours(),o;switch(i>=17?o=Al.evening:i>=12?o=Al.afternoon:i>=4?o=Al.morning:o=Al.night,n){case"B":case"BB":case"BBB":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(t,n,r){if(n==="ho"){var i=t.getUTCHours()%12;return i===0&&(i=12),r.ordinalNumber(i,{unit:"hour"})}return Zo.h(t,n)},H:function(t,n,r){return n==="Ho"?r.ordinalNumber(t.getUTCHours(),{unit:"hour"}):Zo.H(t,n)},K:function(t,n,r){var i=t.getUTCHours()%12;return n==="Ko"?r.ordinalNumber(i,{unit:"hour"}):tt(i,n.length)},k:function(t,n,r){var i=t.getUTCHours();return i===0&&(i=24),n==="ko"?r.ordinalNumber(i,{unit:"hour"}):tt(i,n.length)},m:function(t,n,r){return n==="mo"?r.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):Zo.m(t,n)},s:function(t,n,r){return n==="so"?r.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):Zo.s(t,n)},S:function(t,n){return Zo.S(t,n)},X:function(t,n,r,i){var o=i._originalDate||t,s=o.getTimezoneOffset();if(s===0)return"Z";switch(n){case"X":return J3(s);case"XXXX":case"XX":return Oa(s);case"XXXXX":case"XXX":default:return Oa(s,":")}},x:function(t,n,r,i){var o=i._originalDate||t,s=o.getTimezoneOffset();switch(n){case"x":return J3(s);case"xxxx":case"xx":return Oa(s);case"xxxxx":case"xxx":default:return Oa(s,":")}},O:function(t,n,r,i){var o=i._originalDate||t,s=o.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+Q3(s,":");case"OOOO":default:return"GMT"+Oa(s,":")}},z:function(t,n,r,i){var o=i._originalDate||t,s=o.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+Q3(s,":");case"zzzz":default:return"GMT"+Oa(s,":")}},t:function(t,n,r,i){var o=i._originalDate||t,s=Math.floor(o.getTime()/1e3);return tt(s,n.length)},T:function(t,n,r,i){var o=i._originalDate||t,s=o.getTime();return tt(s,n.length)}};function Q3(e,t){var n=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),o=r%60;if(o===0)return n+String(i);var s=t||"";return n+String(i)+s+tt(o,2)}function J3(e,t){if(e%60===0){var n=e>0?"-":"+";return n+tt(Math.abs(e)/60,2)}return Oa(e,t)}function Oa(e,t){var n=t||"",r=e>0?"-":"+",i=Math.abs(e),o=tt(Math.floor(i/60),2),s=tt(i%60,2);return r+o+n+s}const Qae=Xae;var eR=function(t,n){switch(t){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},s5=function(t,n){switch(t){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},Jae=function(t,n){var r=t.match(/(P+)(p+)?/)||[],i=r[1],o=r[2];if(!o)return eR(t,n);var s;switch(i){case"P":s=n.dateTime({width:"short"});break;case"PP":s=n.dateTime({width:"medium"});break;case"PPP":s=n.dateTime({width:"long"});break;case"PPPP":default:s=n.dateTime({width:"full"});break}return s.replace("{{date}}",eR(i,n)).replace("{{time}}",s5(o,n))},ele={p:s5,P:Jae};const Xw=ele;var tle=["D","DD"],nle=["YY","YYYY"];function a5(e){return tle.indexOf(e)!==-1}function l5(e){return nle.indexOf(e)!==-1}function vv(e,t,n){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var rle={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},ile=function(t,n,r){var i,o=rle[t];return typeof o=="string"?i=o:n===1?i=o.one:i=o.other.replace("{{count}}",n.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+i:i+" ago":i};const ole=ile;function E1(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,r=e.formats[n]||e.formats[e.defaultWidth];return r}}var sle={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},ale={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},lle={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},cle={date:E1({formats:sle,defaultWidth:"full"}),time:E1({formats:ale,defaultWidth:"full"}),dateTime:E1({formats:lle,defaultWidth:"full"})};const ule=cle;var fle={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},dle=function(t,n,r,i){return fle[t]};const hle=dle;function Fu(e){return function(t,n){var r=n!=null&&n.context?String(n.context):"standalone",i;if(r==="formatting"&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):o;i=e.formattingValues[s]||e.formattingValues[o]}else{var a=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[l]||e.values[a]}var c=e.argumentCallback?e.argumentCallback(t):t;return i[c]}}var ple={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},mle={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},gle={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},vle={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},yle={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},_le={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},ble=function(t,n){var r=Number(t),i=r%100;if(i>20||i<10)switch(i%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},wle={ordinalNumber:ble,era:Fu({values:ple,defaultWidth:"wide"}),quarter:Fu({values:mle,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:Fu({values:gle,defaultWidth:"wide"}),day:Fu({values:vle,defaultWidth:"wide"}),dayPeriod:Fu({values:yle,defaultWidth:"wide",formattingValues:_le,defaultFormattingWidth:"wide"})};const xle=wle;function $u(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;var s=o[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?Cle(a,function(h){return h.test(s)}):Sle(a,function(h){return h.test(s)}),c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;var f=t.slice(s.length);return{value:c,rest:f}}}function Sle(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function Cle(e,t){for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:{},r=t.match(e.matchPattern);if(!r)return null;var i=r[0],o=t.match(e.parsePattern);if(!o)return null;var s=e.valueCallback?e.valueCallback(o[0]):o[0];s=n.valueCallback?n.valueCallback(s):s;var a=t.slice(i.length);return{value:s,rest:a}}}var Tle=/^(\d+)(th|st|nd|rd)?/i,Ole=/\d+/i,Ple={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},kle={any:[/^b/i,/^(a|c)/i]},Mle={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Rle={any:[/1/i,/2/i,/3/i,/4/i]},Nle={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Lle={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Dle={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Ale={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},jle={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Ile={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Fle={ordinalNumber:Ele({matchPattern:Tle,parsePattern:Ole,valueCallback:function(t){return parseInt(t,10)}}),era:$u({matchPatterns:Ple,defaultMatchWidth:"wide",parsePatterns:kle,defaultParseWidth:"any"}),quarter:$u({matchPatterns:Mle,defaultMatchWidth:"wide",parsePatterns:Rle,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:$u({matchPatterns:Nle,defaultMatchWidth:"wide",parsePatterns:Lle,defaultParseWidth:"any"}),day:$u({matchPatterns:Dle,defaultMatchWidth:"wide",parsePatterns:Ale,defaultParseWidth:"any"}),dayPeriod:$u({matchPatterns:jle,defaultMatchWidth:"any",parsePatterns:Ile,defaultParseWidth:"any"})};const $le=Fle;var Ble={code:"en-US",formatDistance:ole,formatLong:ule,formatRelative:hle,localize:xle,match:$le,options:{weekStartsOn:0,firstWeekContainsDate:1}};const ME=Ble;var zle=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ule=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Vle=/^'([^]*?)'?$/,Hle=/''/g,Wle=/[a-zA-Z]/;function vo(e,t,n){var r,i,o,s,a,l,c,f,h,p,m,v,y,x,_,w,S,T;Oe(2,arguments);var P=String(t),k=Vo(),N=(r=(i=n==null?void 0:n.locale)!==null&&i!==void 0?i:k.locale)!==null&&r!==void 0?r:ME,D=Qe((o=(s=(a=(l=n==null?void 0:n.firstWeekContainsDate)!==null&&l!==void 0?l:n==null||(c=n.locale)===null||c===void 0||(f=c.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&a!==void 0?a:k.firstWeekContainsDate)!==null&&s!==void 0?s:(h=k.locale)===null||h===void 0||(p=h.options)===null||p===void 0?void 0:p.firstWeekContainsDate)!==null&&o!==void 0?o:1);if(!(D>=1&&D<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var z=Qe((m=(v=(y=(x=n==null?void 0:n.weekStartsOn)!==null&&x!==void 0?x:n==null||(_=n.locale)===null||_===void 0||(w=_.options)===null||w===void 0?void 0:w.weekStartsOn)!==null&&y!==void 0?y:k.weekStartsOn)!==null&&v!==void 0?v:(S=k.locale)===null||S===void 0||(T=S.options)===null||T===void 0?void 0:T.weekStartsOn)!==null&&m!==void 0?m:0);if(!(z>=0&&z<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!N.localize)throw new RangeError("locale must contain localize property");if(!N.formatLong)throw new RangeError("locale must contain formatLong property");var A=Me(e);if(!e5(A))throw new RangeError("Invalid time value");var W=Bc(A),Y=n5(A,W),J={firstWeekContainsDate:D,weekStartsOn:z,locale:N,_originalDate:A},Z=P.match(Ule).map(function(ee){var ie=ee[0];if(ie==="p"||ie==="P"){var oe=Xw[ie];return oe(ee,N.formatLong)}return ee}).join("").match(zle).map(function(ee){if(ee==="''")return"'";var ie=ee[0];if(ie==="'")return Yle(ee);var oe=Qae[ie];if(oe)return!(n!=null&&n.useAdditionalWeekYearTokens)&&l5(ee)&&vv(ee,t,String(e)),!(n!=null&&n.useAdditionalDayOfYearTokens)&&a5(ee)&&vv(ee,t,String(e)),oe(Y,ee,N.localize,J);if(ie.match(Wle))throw new RangeError("Format string contains an unescaped latin alphabet character `"+ie+"`");return ee}).join("");return Z}function Yle(e){var t=e.match(Vle);return t?t[1].replace(Hle,"'"):e}function RE(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function qle(e){return RE({},e)}var tR=1440,Gle=2520,T1=43200,Zle=86400;function Kle(e,t,n){var r,i;Oe(2,arguments);var o=Vo(),s=(r=(i=n==null?void 0:n.locale)!==null&&i!==void 0?i:o.locale)!==null&&r!==void 0?r:ME;if(!s.formatDistance)throw new RangeError("locale must contain formatDistance property");var a=ym(e,t);if(isNaN(a))throw new RangeError("Invalid time value");var l=RE(qle(n),{addSuffix:!!(n!=null&&n.addSuffix),comparison:a}),c,f;a>0?(c=Me(t),f=Me(e)):(c=Me(e),f=Me(t));var h=Fae(f,c),p=(Bc(f)-Bc(c))/1e3,m=Math.round((h-p)/60),v;if(m<2)return n!=null&&n.includeSeconds?h<5?s.formatDistance("lessThanXSeconds",5,l):h<10?s.formatDistance("lessThanXSeconds",10,l):h<20?s.formatDistance("lessThanXSeconds",20,l):h<40?s.formatDistance("halfAMinute",0,l):h<60?s.formatDistance("lessThanXMinutes",1,l):s.formatDistance("xMinutes",1,l):m===0?s.formatDistance("lessThanXMinutes",1,l):s.formatDistance("xMinutes",m,l);if(m<45)return s.formatDistance("xMinutes",m,l);if(m<90)return s.formatDistance("aboutXHours",1,l);if(mr.getTime()}function Gr(e,t){Oe(2,arguments);var n=Me(e),r=Me(t);return n.getTime()"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _v(e){return _v=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},_v(e)}function NE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function bv(e){return bv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},bv(e)}function sR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var vce=function(e){hce(n,e);var t=pce(n);function n(){var r;fce(this,n);for(var i=arguments.length,o=new Array(i),s=0;s0,r=n?t:1-t,i;if(r<=50)i=e||100;else{var o=r+50,s=Math.floor(o/100)*100,a=e>=o%100;i=e+s-(a?100:0)}return n?i:1-i}function m5(e){return e%400===0||e%4===0&&e%100!==0}function xm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?xm=function(n){return typeof n}:xm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},xm(e)}function yce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function aR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function xv(e){return xv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},xv(e)}function lR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Cce=function(e){bce(n,e);var t=wce(n);function n(){var r;yce(this,n);for(var i=arguments.length,o=new Array(i),s=0;s0}},{key:"set",value:function(i,o,s){var a=i.getUTCFullYear();if(s.isTwoDigitYear){var l=p5(s.year,a);return i.setUTCFullYear(l,0,1),i.setUTCHours(0,0,0,0),i}var c=!("era"in o)||o.era===1?s.year:1-s.year;return i.setUTCFullYear(c,0,1),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Sm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Sm=function(n){return typeof n}:Sm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Sm(e)}function Ece(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Sv(e){return Sv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Sv(e)}function uR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Rce=function(e){Oce(n,e);var t=Pce(n);function n(){var r;Ece(this,n);for(var i=arguments.length,o=new Array(i),s=0;s0}},{key:"set",value:function(i,o,s,a){var l=kE(i,a);if(s.isTwoDigitYear){var c=p5(s.year,l);return i.setUTCFullYear(c,0,a.firstWeekContainsDate),i.setUTCHours(0,0,0,0),sl(i,a)}var f=!("era"in o)||o.era===1?s.year:1-s.year;return i.setUTCFullYear(f,0,a.firstWeekContainsDate),i.setUTCHours(0,0,0,0),sl(i,a)}}]),n}(pt);function Cm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Cm=function(n){return typeof n}:Cm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Cm(e)}function Nce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Cv(e){return Cv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Cv(e)}function dR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Fce=function(e){Dce(n,e);var t=Ace(n);function n(){var r;Nce(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ev(e){return Ev=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Ev(e)}function pR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Wce=function(e){zce(n,e);var t=Uce(n);function n(){var r;$ce(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Tv(e){return Tv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Tv(e)}function gR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Qce=function(e){Gce(n,e);var t=Zce(n);function n(){var r;Yce(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=4}},{key:"set",value:function(i,o,s){return i.setUTCMonth((s-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Om(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Om=function(n){return typeof n}:Om=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Om(e)}function Jce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ov(e){return Ov=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Ov(e)}function yR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var oue=function(e){tue(n,e);var t=nue(n);function n(){var r;Jce(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=4}},{key:"set",value:function(i,o,s){return i.setUTCMonth((s-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Pm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Pm=function(n){return typeof n}:Pm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Pm(e)}function sue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _R(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Pv(e){return Pv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Pv(e)}function bR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var due=function(e){lue(n,e);var t=cue(n);function n(){var r;sue(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=11}},{key:"set",value:function(i,o,s){return i.setUTCMonth(s,1),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function km(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?km=function(n){return typeof n}:km=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},km(e)}function hue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function kv(e){return kv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},kv(e)}function xR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _ue=function(e){mue(n,e);var t=gue(n);function n(){var r;hue(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=11}},{key:"set",value:function(i,o,s){return i.setUTCMonth(s,1),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function bue(e,t,n){Oe(2,arguments);var r=Me(e),i=Qe(t),o=o5(r,n)-i;return r.setUTCDate(r.getUTCDate()-o*7),r}function Mm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Mm=function(n){return typeof n}:Mm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Mm(e)}function wue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function SR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Mv(e){return Mv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Mv(e)}function CR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Oue=function(e){Sue(n,e);var t=Cue(n);function n(){var r;wue(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=53}},{key:"set",value:function(i,o,s,a){return sl(bue(i,s,a),a)}}]),n}(pt);function Pue(e,t){Oe(2,arguments);var n=Me(e),r=Qe(t),i=i5(n)-r;return n.setUTCDate(n.getUTCDate()-i*7),n}function Rm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Rm=function(n){return typeof n}:Rm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Rm(e)}function kue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ER(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Rv(e){return Rv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Rv(e)}function TR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Aue=function(e){Rue(n,e);var t=Nue(n);function n(){var r;kue(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=53}},{key:"set",value:function(i,o,s){return Uc(Pue(i,s))}}]),n}(pt);function Nm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Nm=function(n){return typeof n}:Nm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Nm(e)}function jue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function OR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Nv(e){return Nv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Nv(e)}function O1(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Uue=[31,28,31,30,31,30,31,31,30,31,30,31],Vue=[31,29,31,30,31,30,31,31,30,31,30,31],Hue=function(e){Fue(n,e);var t=$ue(n);function n(){var r;jue(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=Vue[l]:o>=1&&o<=Uue[l]}},{key:"set",value:function(i,o,s){return i.setUTCDate(s),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Dm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Dm=function(n){return typeof n}:Dm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Dm(e)}function Wue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Lv(e){return Lv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Lv(e)}function P1(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Xue=function(e){que(n,e);var t=Gue(n);function n(){var r;Wue(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=366:o>=1&&o<=365}},{key:"set",value:function(i,o,s){return i.setUTCMonth(0,s),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function AE(e,t,n){var r,i,o,s,a,l,c,f;Oe(2,arguments);var h=Vo(),p=Qe((r=(i=(o=(s=n==null?void 0:n.weekStartsOn)!==null&&s!==void 0?s:n==null||(a=n.locale)===null||a===void 0||(l=a.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&o!==void 0?o:h.weekStartsOn)!==null&&i!==void 0?i:(c=h.locale)===null||c===void 0||(f=c.options)===null||f===void 0?void 0:f.weekStartsOn)!==null&&r!==void 0?r:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=Me(e),v=Qe(t),y=m.getUTCDay(),x=v%7,_=(x+7)%7,w=(_"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Dv(e){return Dv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Dv(e)}function MR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ife=function(e){efe(n,e);var t=tfe(n);function n(){var r;Que(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=6}},{key:"set",value:function(i,o,s,a){return i=AE(i,s,a),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Im(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Im=function(n){return typeof n}:Im=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Im(e)}function ofe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function RR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Av(e){return Av=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Av(e)}function NR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ffe=function(e){afe(n,e);var t=lfe(n);function n(){var r;ofe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=6}},{key:"set",value:function(i,o,s,a){return i=AE(i,s,a),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Fm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Fm=function(n){return typeof n}:Fm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Fm(e)}function dfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function LR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function jv(e){return jv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},jv(e)}function DR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var yfe=function(e){pfe(n,e);var t=mfe(n);function n(){var r;dfe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=6}},{key:"set",value:function(i,o,s,a){return i=AE(i,s,a),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function _fe(e,t){Oe(2,arguments);var n=Qe(t);n%7===0&&(n=n-7);var r=1,i=Me(e),o=i.getUTCDay(),s=n%7,a=(s+7)%7,l=(a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Iv(e){return Iv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Iv(e)}function jR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Tfe=function(e){xfe(n,e);var t=Sfe(n);function n(){var r;bfe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=7}},{key:"set",value:function(i,o,s){return i=_fe(i,s),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Bm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Bm=function(n){return typeof n}:Bm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Bm(e)}function Ofe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function IR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Fv(e){return Fv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Fv(e)}function FR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Lfe=function(e){kfe(n,e);var t=Mfe(n);function n(){var r;Ofe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function $v(e){return $v=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},$v(e)}function BR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Bfe=function(e){jfe(n,e);var t=Ife(n);function n(){var r;Dfe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Bv(e){return Bv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Bv(e)}function UR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var qfe=function(e){Vfe(n,e);var t=Hfe(n);function n(){var r;zfe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function zv(e){return zv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},zv(e)}function HR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ede=function(e){Kfe(n,e);var t=Xfe(n);function n(){var r;Gfe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=12}},{key:"set",value:function(i,o,s){var a=i.getUTCHours()>=12;return a&&s<12?i.setUTCHours(s+12,0,0,0):!a&&s===12?i.setUTCHours(0,0,0,0):i.setUTCHours(s,0,0,0),i}}]),n}(pt);function Hm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Hm=function(n){return typeof n}:Hm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Hm(e)}function tde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function WR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Uv(e){return Uv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Uv(e)}function YR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ade=function(e){rde(n,e);var t=ide(n);function n(){var r;tde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=23}},{key:"set",value:function(i,o,s){return i.setUTCHours(s,0,0,0),i}}]),n}(pt);function Wm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Wm=function(n){return typeof n}:Wm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Wm(e)}function lde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Vv(e){return Vv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Vv(e)}function GR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pde=function(e){ude(n,e);var t=fde(n);function n(){var r;lde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=11}},{key:"set",value:function(i,o,s){var a=i.getUTCHours()>=12;return a&&s<12?i.setUTCHours(s+12,0,0,0):i.setUTCHours(s,0,0,0),i}}]),n}(pt);function Ym(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ym=function(n){return typeof n}:Ym=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ym(e)}function mde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ZR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Hv(e){return Hv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Hv(e)}function KR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var wde=function(e){vde(n,e);var t=yde(n);function n(){var r;mde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=24}},{key:"set",value:function(i,o,s){var a=s<=24?s%24:s;return i.setUTCHours(a,0,0,0),i}}]),n}(pt);function qm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?qm=function(n){return typeof n}:qm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},qm(e)}function xde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function XR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Wv(e){return Wv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Wv(e)}function QR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Pde=function(e){Cde(n,e);var t=Ede(n);function n(){var r;xde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=59}},{key:"set",value:function(i,o,s){return i.setUTCMinutes(s,0,0),i}}]),n}(pt);function Gm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Gm=function(n){return typeof n}:Gm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Gm(e)}function kde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function JR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Yv(e){return Yv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Yv(e)}function eN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ade=function(e){Rde(n,e);var t=Nde(n);function n(){var r;kde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=59}},{key:"set",value:function(i,o,s){return i.setUTCSeconds(s,0),i}}]),n}(pt);function Zm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Zm=function(n){return typeof n}:Zm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Zm(e)}function jde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tN(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function qv(e){return qv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},qv(e)}function nN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ude=function(e){Fde(n,e);var t=$de(n);function n(){var r;jde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Gv(e){return Gv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Gv(e)}function iN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Zde=function(e){Wde(n,e);var t=Yde(n);function n(){var r;Vde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Zv(e){return Zv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Zv(e)}function sN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var nhe=function(e){Qde(n,e);var t=Jde(n);function n(){var r;Kde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Kv(e){return Kv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Kv(e)}function lN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var che=function(e){ohe(n,e);var t=she(n);function n(){var r;rhe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Xv(e){return Xv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Xv(e)}function uN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ghe=function(e){dhe(n,e);var t=hhe(n);function n(){var r;uhe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||e[Symbol.iterator]==null){if(Array.isArray(e)||(n=yhe(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,a;return{s:function(){n=e[Symbol.iterator]()},n:function(){var c=n.next();return o=c.done,c},e:function(c){s=!0,a=c},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}}}function yhe(e,t){if(e){if(typeof e=="string")return dN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return dN(e,t)}}function dN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=1&&A<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var W=Qe((v=(y=(x=(_=r==null?void 0:r.weekStartsOn)!==null&&_!==void 0?_:r==null||(w=r.locale)===null||w===void 0||(S=w.options)===null||S===void 0?void 0:S.weekStartsOn)!==null&&x!==void 0?x:D.weekStartsOn)!==null&&y!==void 0?y:(T=D.locale)===null||T===void 0||(P=T.options)===null||P===void 0?void 0:P.weekStartsOn)!==null&&v!==void 0?v:0);if(!(W>=0&&W<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(N==="")return k===""?Me(n):new Date(NaN);var Y={firstWeekContainsDate:A,weekStartsOn:W,locale:z},J=[new lce],Z=N.match(bhe).map(function(O){var R=O[0];if(R in Xw){var I=Xw[R];return I(O,z.formatLong)}return O}).join("").match(_he),ee=[],ie=fN(Z),oe;try{var G=function(){var R=oe.value;!(r!=null&&r.useAdditionalWeekYearTokens)&&l5(R)&&vv(R,N,e),!(r!=null&&r.useAdditionalDayOfYearTokens)&&a5(R)&&vv(R,N,e);var I=R[0],X=vhe[I];if(X){var K=X.incompatibleTokens;if(Array.isArray(K)){var ae=ee.find(function(Le){return K.includes(Le.token)||Le.token===I});if(ae)throw new RangeError("The format string mustn't contain `".concat(ae.fullToken,"` and `").concat(R,"` at the same time"))}else if(X.incompatibleTokens==="*"&&ee.length>0)throw new RangeError("The format string mustn't contain `".concat(R,"` and any other token at the same time"));ee.push({token:I,fullToken:R});var ge=X.run(k,R,z.match,Y);if(!ge)return{v:new Date(NaN)};J.push(ge.setter),k=ge.rest}else{if(I.match(Che))throw new RangeError("Format string contains an unescaped latin alphabet character `"+I+"`");if(R==="''"?R="'":I==="'"&&(R=Ehe(R)),k.indexOf(R)===0)k=k.slice(R.length);else return{v:new Date(NaN)}}};for(ie.s();!(oe=ie.n()).done;){var F=G();if(eg(F)==="object")return F.v}}catch(O){ie.e(O)}finally{ie.f()}if(k.length>0&&She.test(k))return new Date(NaN);var j=J.map(function(O){return O.priority}).sort(function(O,R){return R-O}).filter(function(O,R,I){return I.indexOf(O)===R}).map(function(O){return J.filter(function(R){return R.priority===O}).sort(function(R,I){return I.subPriority-R.subPriority})}).map(function(O){return O[0]}),B=Me(n);if(isNaN(B.getTime()))return new Date(NaN);var ne=n5(B,Bc(B)),H={},q=fN(j),te;try{for(q.s();!(te=q.n()).done;){var se=te.value;if(!se.validate(ne,Y))return new Date(NaN);var pe=se.set(ne,H,Y);Array.isArray(pe)?(ne=pe[0],RE(H,pe[1])):ne=pe}}catch(O){q.e(O)}finally{q.f()}return ne}function Ehe(e){return e.match(whe)[1].replace(xhe,"'")}function The(e,t){Oe(2,arguments);var n=Me(e),r=Me(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function Ohe(e,t){Oe(2,arguments);var n=Kw(e),r=Kw(t);return n.getTime()===r.getTime()}function Phe(e,t){Oe(2,arguments);var n=Me(e),r=Me(t);return n.getFullYear()===r.getFullYear()}function Vc(e,t){Oe(2,arguments);var n=Me(e).getTime(),r=Me(t.start).getTime(),i=Me(t.end).getTime();if(!(r<=i))throw new RangeError("Invalid interval");return n>=r&&n<=i}function jE(e,t){Oe(2,arguments);var n=Qe(t);return ml(e,-n)}function Do(e,t){var n;Oe(1,arguments);var r=Qe((n=t==null?void 0:t.additionalDigits)!==null&&n!==void 0?n:2);if(r!==2&&r!==1&&r!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof e=="string"||Object.prototype.toString.call(e)==="[object String]"))return new Date(NaN);var i=Nhe(e),o;if(i.date){var s=Lhe(i.date,r);o=Dhe(s.restDateString,s.year)}if(!o||isNaN(o.getTime()))return new Date(NaN);var a=o.getTime(),l=0,c;if(i.time&&(l=Ahe(i.time),isNaN(l)))return new Date(NaN);if(i.timezone){if(c=jhe(i.timezone),isNaN(c))return new Date(NaN)}else{var f=new Date(a+l),h=new Date(0);return h.setFullYear(f.getUTCFullYear(),f.getUTCMonth(),f.getUTCDate()),h.setHours(f.getUTCHours(),f.getUTCMinutes(),f.getUTCSeconds(),f.getUTCMilliseconds()),h}return new Date(a+l+c)}var Pp={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},khe=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Mhe=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Rhe=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Nhe(e){var t={},n=e.split(Pp.dateTimeDelimiter),r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],Pp.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Pp.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){var i=Pp.timezone.exec(r);i?(t.time=r.replace(i[1],""),t.timezone=i[1]):t.time=r}return t}function Lhe(e,t){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};var i=r[1]?parseInt(r[1]):null,o=r[2]?parseInt(r[2]):null;return{year:o===null?i:o*100,restDateString:e.slice((r[1]||r[2]).length)}}function Dhe(e,t){if(t===null)return new Date(NaN);var n=e.match(khe);if(!n)return new Date(NaN);var r=!!n[4],i=Bu(n[1]),o=Bu(n[2])-1,s=Bu(n[3]),a=Bu(n[4]),l=Bu(n[5])-1;if(r)return zhe(t,a,l)?Ihe(t,a,l):new Date(NaN);var c=new Date(0);return!$he(t,o,s)||!Bhe(t,i)?new Date(NaN):(c.setUTCFullYear(t,o,Math.max(i,s)),c)}function Bu(e){return e?parseInt(e):1}function Ahe(e){var t=e.match(Mhe);if(!t)return NaN;var n=M1(t[1]),r=M1(t[2]),i=M1(t[3]);return Uhe(n,r,i)?n*S_+r*EE+i*1e3:NaN}function M1(e){return e&&parseFloat(e.replace(",","."))||0}function jhe(e){if(e==="Z")return 0;var t=e.match(Rhe);if(!t)return 0;var n=t[1]==="+"?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return Vhe(r,i)?n*(r*S_+i*EE):NaN}function Ihe(e,t,n){var r=new Date(0);r.setUTCFullYear(e,0,4);var i=r.getUTCDay()||7,o=(t-1)*7+n+1-i;return r.setUTCDate(r.getUTCDate()+o),r}var Fhe=[31,null,31,30,31,30,31,31,30,31,30,31];function g5(e){return e%400===0||e%4===0&&e%100!==0}function $he(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(Fhe[t]||(g5(e)?29:28))}function Bhe(e,t){return t>=1&&t<=(g5(e)?366:365)}function zhe(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function Uhe(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function Vhe(e,t){return t>=0&&t<=59}function Wi(e,t){Oe(2,arguments);var n=Me(e),r=Qe(t),i=n.getFullYear(),o=n.getDate(),s=new Date(0);s.setFullYear(i,r,15),s.setHours(0,0,0,0);var a=Jle(s);return n.setMonth(r,Math.min(o,a)),n}function Pf(e,t){Oe(2,arguments);var n=Me(e),r=Qe(t);return n.setHours(r),n}function kf(e,t){Oe(2,arguments);var n=Me(e),r=Qe(t);return n.setMinutes(r),n}function ef(e,t){Oe(2,arguments);var n=Me(e),r=Qe(t),i=Math.floor(n.getMonth()/3)+1,o=r-i;return Wi(n,n.getMonth()+o*3)}function Hhe(e,t){Oe(2,arguments);var n=Me(e),r=Qe(t);return n.setSeconds(r),n}function Qv(e,t){Oe(2,arguments);var n=Me(e),r=Qe(t);return isNaN(n.getTime())?new Date(NaN):(n.setFullYear(r),n)}function Td(e,t){Oe(2,arguments);var n=Qe(t);return to(e,-n)}function Whe(e,t){Oe(2,arguments);var n=Qe(t);return CE(e,-n)}function Od(e,t){Oe(2,arguments);var n=Qe(t);return zc(e,-n)}const Mf="yyyy-MM-dd",IE="yyyy-MM-dd HH:mm",Vs=()=>new Date,FE=e=>typeof e!="string",v5=(e,t)=>!e||!FE(e)?e:t?vo(e,t):Xle(e),y5=(e=Mf)=>t=>v5(t,e),Hs=e=>v5(e,void 0),kp=y5(),Jv=y5(IE),_i=e=>FE(e)?e:Do(e),hN=e=>e?_i(e):null,oh=(e,t,n)=>{try{return Vc(_i(e),{start:_i(t??e),end:_i(n??e)})}catch{return!1}},va=(e,t)=>c5(e,t)||Gr(e,t),sh="all",_5={today:"Today",yesterday:"Yesterday",last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",last180Days:"Last 180 days",last365Days:"Last 365 days",[sh]:void 0},b5=Object.keys(_5),w5=e=>e===void 0||Wn(bj(Boolean,e)),ey=e=>typeof e=="string"&&b5.includes(e),Yhe=b5.filter(e=>e!==sh),x5=(e,t)=>({startDate:hN(e),endDate:hN(t)}),qhe=e=>{if(!(!e||w5(e)))return e.startDate&&!e.endDate?`Since ${kp(e.startDate)}`:!e.startDate&&e.endDate?`Until ${kp(e.endDate)}`:`${kp(e.startDate)} - ${kp(e.endDate)}`},$E=e=>{if(!(!e||e===sh))return ey(e)?_5[e]:qhe(e)},Yr=e=>Lr(jE(Vs(),e)),jl=e=>({startDate:e,endDate:ol(Vs())}),S5=nC([[ga("today"),()=>jl(Lr(Vs()))],[ga("yesterday"),()=>({startDate:Yr(1),endDate:ol(jE(Vs(),1))})],[ga("last7Days"),()=>jl(Yr(7))],[ga("last30Days"),()=>jl(Yr(30))],[ga("last90Days"),()=>jl(Yr(90))],[ga("last180Days"),()=>jl(Yr(180))],[ga("last365Days"),()=>jl(Yr(365))],[hj,()=>({})]]),Ghe=e=>{const t=_i(e);return nC([[()=>va(Lr(Vs()),t),()=>"today"],[()=>va(Yr(1),t),()=>"yesterday"],[()=>va(Yr(7),t),()=>"last7Days"],[()=>va(Yr(30),t),()=>"last30Days"],[()=>va(Yr(90),t),()=>"last90Days"],[()=>va(Yr(180),t),()=>"last180Days"],[()=>va(Yr(365),t),()=>"last365Days"],[hj,()=>sh]])()},Zhe=e=>ey(e)?S5(e):e,ah=yn("shlink/visitCreation/createNewVisits",e=>({payload:{createdVisits:e}})),pN=5e3,mN=4,gN=2,Khe=({currentPage:e,pagesCount:t})=>e>=t,Xhe=(e,t)=>t*100/e,lh=({typePrefix:e,createLoaders:t,getExtraFulfilledPayload:n,shouldCancel:r})=>{const i=yn(`${e}/progressChanged`),o=yn(`${e}/large`),s=yn(`${e}/fallbackToInterval`),a=rr(e,async(l,{getState:c,dispatch:f})=>{var w;const[h,p]=t(l,c),m=async S=>Promise.all(S.map(async T=>h(T,pN).then(at("data")))).then(XG),v=async(S,T=0)=>{if(r(c))return[];const P=await m(S[T]);return f(i(Xhe(S.length,T+gN))),T{const{pagination:T,data:P}=await h(S,pN);if(!T||Khe(T))return P;const k=rC(gN,T.pagesCount+1),N=cd(mN,k);return T.pagesCount-1>mN&&f(o()),P.concat(await v(N))},[x,_]=await Promise.all([y(),p((w=l.query)==null?void 0:w.excludeBots)]);return!x.length&&_&&f(s(Ghe(_.date))),{...n(l),visits:x}});return Object.assign(a,{progressChanged:i,large:o,fallbackToInterval:s})},ch=(e,t)=>async n=>e?t({page:1,itemsPerPage:1,excludeBots:n}).then(({data:r})=>r[0]):Promise.resolve(void 0),uh=({name:e,asyncThunkCreator:t,initialState:n,filterCreatedVisits:r})=>{const{pending:i,rejected:o,fulfilled:s,large:a,progressChanged:l,fallbackToInterval:c}=t,{reducer:f,actions:h}=Yn({name:e,initialState:n,reducers:{cancelGetVisits:m=>({...m,cancelLoad:!0})},extraReducers:m=>{m.addCase(i,()=>({...n,loading:!0})),m.addCase(o,(v,{error:y})=>({...n,error:!0,errorData:no(y)})),m.addCase(s,(v,{payload:y})=>({...v,...y,loading:!1,loadingLarge:!1,error:!1})),m.addCase(a,v=>({...v,loadingLarge:!0})),m.addCase(l,(v,{payload:y})=>({...v,progress:y})),m.addCase(c,(v,{payload:y})=>({...v,fallbackInterval:y})),m.addCase(ah,(v,{payload:y})=>{const{visits:x}=v,_=r(v,y.createdVisits).map(({visit:w})=>w);return _.length?{...v,visits:[..._,...x]}:v})}}),{cancelGetVisits:p}=h;return{reducer:f,cancelGetVisits:p}},C5="shlink/domainVisits",E5="DEFAULT",Qhe={visits:[],domain:"",loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},Jhe=e=>lh({typePrefix:`${C5}/getDomainVisits`,createLoaders:({domain:t,query:n={},doIntervalFallback:r=!1},i)=>{const{getDomainVisits:o}=e(i),s=async(l,c)=>o(t,{...n,page:l,itemsPerPage:c}),a=ch(r,async l=>o(t,l));return[s,a]},getExtraFulfilledPayload:({domain:t,query:n={}})=>({domain:t,query:n}),shouldCancel:t=>t().domainVisits.cancelLoad}),epe=e=>uh({name:C5,initialState:Qhe,asyncThunkCreator:e,filterCreatedVisits:({domain:t,query:n={}},r)=>{const{startDate:i,endDate:o}=n;return r.filter(({shortUrl:s,visit:a})=>s&&wae(s,t)&&oh(a.date,i,o))}}),ou=({children:e,label:t,className:n="",labelClassName:r="",noMargin:i=!1,id:o})=>g.jsxs("div",{className:`${n} ${i?"":"mb-3"}`,children:[g.jsx("label",{className:`form-label ${r}`,htmlFor:o,children:t}),e]}),tg=({children:e,value:t,onChange:n,type:r,required:i,placeholder:o,className:s,labelClassName:a})=>{const l=b_();return g.jsx(ou,{label:g.jsxs(g.Fragment,{children:[e,":"]}),className:s??"",labelClassName:a,id:l,children:g.jsx("input",{id:l,className:"form-control",type:r??"text",value:t,required:i??!0,placeholder:o,onChange:c=>n(c.target.value)})})},ng=({className:e="",placement:t,children:n})=>{const r=pl();return g.jsxs(g.Fragment,{children:[g.jsx("span",{className:e,ref:r,children:g.jsx(je,{icon:gC})}),g.jsx(Er,{target:r,placement:t,children:n})]})},R1=({isLast:e,...t})=>g.jsx(tg,{...t,required:!1,type:"url",placeholder:"No redirect",className:e?"mb-0":""}),tpe=({isOpen:e,toggle:t,domain:n,editDomainRedirects:r})=>{var h,p,m;const[i,o]=V.useState(((h=n.redirects)==null?void 0:h.baseUrlRedirect)??""),[s,a]=V.useState(((p=n.redirects)==null?void 0:p.regular404Redirect)??""),[l,c]=V.useState(((m=n.redirects)==null?void 0:m.invalidShortUrlRedirect)??""),f=rh(async()=>r({domain:n.domain,redirects:{baseUrlRedirect:S1(i),regular404Redirect:S1(s),invalidShortUrlRedirect:S1(l)}}).then(t));return g.jsx(Uo,{isOpen:e,toggle:t,centered:!0,children:g.jsxs("form",{name:"domainRedirectsModal",onSubmit:f,children:[g.jsxs(ro,{toggle:t,children:["Edit redirects for ",g.jsx("b",{children:n.domain})]}),g.jsxs(ki,{children:[g.jsxs(R1,{value:i,onChange:o,children:[g.jsxs(ng,{className:"me-2",placement:"bottom",children:["Visitors accessing the base url, as in ",g.jsxs("b",{children:["https://",n.domain,"/"]}),", will be redirected to this URL."]}),"Base URL"]}),g.jsxs(R1,{value:s,onChange:a,children:[g.jsxs(ng,{className:"me-2",placement:"bottom",children:["Visitors accessing a url not matching a short URL pattern, as in ",g.jsxs("b",{children:["https://",n.domain,"/???/[...]"]}),", will be redirected to this URL."]}),"Regular 404"]}),g.jsxs(R1,{value:l,isLast:!0,onChange:c,children:[g.jsx(ng,{className:"me-2",placement:"bottom",children:"Visitors accessing a url matching a short URL pattern, but not matching an existing short code, will be redirected to this URL."}),"Invalid short URL"]})]}),g.jsxs(ea,{children:[g.jsx(ht,{color:"link",type:"button",onClick:t,children:"Cancel"}),g.jsx(ht,{color:"primary",children:"Save"})]})]})})},npe=({domain:e,editDomainRedirects:t,selectedServer:n})=>{const[r,i]=It(),[o,s]=It(),{isDefault:a}=e,l=!a||Pi("defaultDomainRedirectsEdition",n),c=Pi("domainVisits",n),f=Vd(n);return g.jsxs(x_,{isOpen:r,toggle:i,children:[c&&g.jsxs(Ue,{tag:Lt,to:`/server/${f}/domain/${e.domain}${e.isDefault?`_${E5}`:""}/visits`,children:[g.jsx(je,{icon:mC,fixedWidth:!0})," Visit stats"]}),g.jsxs(Ue,{disabled:!l,onClick:l?s:void 0,children:[g.jsx(je,{fixedWidth:!0,icon:pC})," Edit redirects"]}),g.jsx(tpe,{domain:e,isOpen:o,toggle:s,editDomainRedirects:t})]})},rpe=({status:e,matchMedia:t=window.matchMedia})=>{const n=pl(),r=()=>t("(max-width: 991px)").matches,[i,o]=V.useState(r());return V.useEffect(()=>{const s=()=>o(r());return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]),e==="validating"?g.jsx(je,{fixedWidth:!0,icon:Yj,spin:!0}):g.jsxs(g.Fragment,{children:[g.jsx("span",{ref:n,children:e==="valid"?g.jsx(je,{fixedWidth:!0,icon:fd,className:"text-muted"}):g.jsx(je,{fixedWidth:!0,icon:yw,className:"text-danger"})}),g.jsx(Er,{target:n,placement:i?"top-start":"left",autohide:e==="valid",children:e==="valid"?"Congratulations! This domain is properly configured.":g.jsxs("span",{children:["Oops! There is some missing configuration, and short URLs shared with this domain will not work.",g.jsx("br",{}),"Check the ",g.jsx(Si,{href:"https://slnk.to/multi-domain-docs",children:"documentation"})," in order to find out what is missing."]})})]})},N1=({fallback:e})=>g.jsxs("span",{className:"text-muted",children:[!e&&g.jsx("small",{children:"No redirect"}),e&&g.jsxs(g.Fragment,{children:[e," ",g.jsx("small",{children:"(as fallback)"})]})]}),ipe=()=>g.jsxs(g.Fragment,{children:[g.jsx(je,{fixedWidth:!0,icon:qX,className:"text-primary",id:"defaultDomainIcon"}),g.jsx(Er,{target:"defaultDomainIcon",placement:"right",children:"Default domain"})]}),ope=({domain:e,editDomainRedirects:t,checkDomainHealth:n,defaultRedirects:r,selectedServer:i})=>{const{domain:o,isDefault:s,redirects:a,status:l}=e;return V.useEffect(()=>{n(e.domain)},[]),g.jsxs("tr",{className:"responsive-table__row",children:[g.jsx("td",{className:"responsive-table__cell","data-th":"Is default domain",children:s&&g.jsx(ipe,{})}),g.jsx("th",{className:"responsive-table__cell","data-th":"Domain",children:o}),g.jsx("td",{className:"responsive-table__cell","data-th":"Base path redirect",children:(a==null?void 0:a.baseUrlRedirect)??g.jsx(N1,{fallback:r==null?void 0:r.baseUrlRedirect})}),g.jsx("td",{className:"responsive-table__cell","data-th":"Regular 404 redirect",children:(a==null?void 0:a.regular404Redirect)??g.jsx(N1,{fallback:r==null?void 0:r.regular404Redirect})}),g.jsx("td",{className:"responsive-table__cell","data-th":"Invalid short URL redirect",children:(a==null?void 0:a.invalidShortUrlRedirect)??g.jsx(N1,{fallback:r==null?void 0:r.invalidShortUrlRedirect})}),g.jsx("td",{className:"responsive-table__cell text-lg-center","data-th":"Status",children:g.jsx(rpe,{status:l})}),g.jsx("td",{className:"responsive-table__cell text-end",children:g.jsx(npe,{domain:e,editDomainRedirects:t,selectedServer:i})})]})},vN=["","Domain","Base path redirect","Regular 404 redirect","Invalid short URL redirect","",""],spe=({listDomains:e,domainsList:t,filterDomains:n,editDomainRedirects:r,checkDomainHealth:i,selectedServer:o})=>{var m;const{filteredDomains:s,defaultRedirects:a,loading:l,error:c,errorData:f}=t,h=a??((m=s.find(({isDefault:v})=>v))==null?void 0:m.redirects);if(V.useEffect(()=>{e()},[]),l)return g.jsx(So,{loading:!0});const p=()=>c?g.jsx(Nr,{type:"error",children:g.jsx(Lo,{errorData:f,fallbackMessage:"Error loading domains :("})}):g.jsx(un,{children:g.jsxs("table",{className:"table table-hover responsive-table mb-0",children:[g.jsx("thead",{className:"responsive-table__header",children:g.jsx("tr",{children:vN.map((v,y)=>g.jsx("th",{children:v},y))})}),g.jsxs("tbody",{children:[s.length<1&&g.jsx("tr",{children:g.jsx("td",{colSpan:vN.length,className:"text-center",children:"No results found"})}),s.map(v=>g.jsx(ope,{domain:v,editDomainRedirects:r,checkDomainHealth:i,defaultRedirects:h,selectedServer:o},v.domain))]})]})});return g.jsxs(g.Fragment,{children:[g.jsx(ih,{className:"mb-3",onChange:n}),p()]})},ape="shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS",lpe=e=>rr(ape,async({domain:t,redirects:n},{getState:r})=>{const{editDomainRedirects:i}=e(r),o=await i({domain:t,...n});return{domain:t,redirects:o}}),cpe=(e,t)=>{const[n,r]=e.split("://"),[,...i]=r.split("/"),o=i.length?`/${i.join("/")}`:"";return`${n}://${t}${o}`},Mp="shlink/domainsList",Rp={domains:[],filteredDomains:[],loading:!1,error:!1},yN=({domain:e,redirects:t})=>n=>n.domain!==e?n:{...n,redirects:t},_N=(e,t)=>n=>n.domain!==e?n:{...n,status:t},upe=(e,t)=>{const n=rr(`${Mp}/listDomains`,async(s,{getState:a})=>{const{listDomains:l}=e(a),{data:c,defaultRedirects:f}=await l();return{domains:c.map(h=>({...h,status:"validating"})),defaultRedirects:f}}),r=rr(`${Mp}/checkDomainHealth`,async(s,{getState:a})=>{const{selectedServer:l}=a();if(!iC(l))return{domain:s,status:"invalid"};try{const{url:c,...f}=l,{health:h}=e({...f,url:cpe(c,s)}),{status:p}=await h();return{domain:s,status:p==="pass"?"valid":"invalid"}}catch{return{domain:s,status:"invalid"}}}),i=yn(`${Mp}/filterDomains`),{reducer:o}=Yn({name:Mp,initialState:Rp,reducers:{},extraReducers:s=>{s.addCase(n.pending,()=>({...Rp,loading:!0})),s.addCase(n.rejected,(a,{error:l})=>({...Rp,error:!0,errorData:no(l)})),s.addCase(n.fulfilled,(a,{payload:l})=>({...Rp,...l,filteredDomains:l.domains})),s.addCase(r.fulfilled,({domains:a,filteredDomains:l,...c},{payload:f})=>({...c,domains:a.map(_N(f.domain,f.status)),filteredDomains:l.map(_N(f.domain,f.status))})),s.addCase(i,(a,{payload:l})=>({...a,filteredDomains:a.domains.filter(({domain:c})=>c.toLowerCase().match(l.toLowerCase()))})),s.addCase(t.fulfilled,(a,{payload:l})=>({...a,domains:a.domains.map(yN(l)),filteredDomains:a.filteredDomains.map(yN(l))}))}});return{reducer:o,listDomains:n,checkDomainHealth:r,filterDomains:i}},fpe=(e,t)=>{e.serviceFactory("DomainSelector",()=>_ae),e.decorator("DomainSelector",t(["domainsList"],["listDomains"])),e.serviceFactory("ManageDomains",()=>spe),e.decorator("ManageDomains",t(["domainsList","selectedServer"],["listDomains","filterDomains","editDomainRedirects","checkDomainHealth"])),e.serviceFactory("domainsListReducerCreator",upe,"buildShlinkApiClient","editDomainRedirects"),e.serviceFactory("domainsListReducer",at("reducer"),"domainsListReducerCreator"),e.serviceFactory("listDomains",at("listDomains"),"domainsListReducerCreator"),e.serviceFactory("filterDomains",at("filterDomains"),"domainsListReducerCreator"),e.serviceFactory("editDomainRedirects",lpe,"buildShlinkApiClient"),e.serviceFactory("checkDomainHealth",at("checkDomainHealth"),"domainsListReducerCreator")},bN="shlink/mercure",dpe={loading:!0,error:!1},hpe=e=>{const t=rr(`${bN}/loadMercureInfo`,(r,{getState:i})=>{const{settings:o}=i();if(!o.realTimeUpdates.enabled)throw new Error("Real time updates not enabled");return e(i).mercureInfo()}),{reducer:n}=Yn({name:bN,initialState:dpe,reducers:{},extraReducers:r=>{r.addCase(t.pending,i=>({...i,loading:!0,error:!1})),r.addCase(t.rejected,i=>({...i,loading:!1,error:!0})),r.addCase(t.fulfilled,(i,{payload:o})=>({...o,loading:!1,error:!1}))}});return{loadMercureInfo:t,reducer:n}},ppe=e=>{e.serviceFactory("mercureInfoReducerCreator",hpe,"buildShlinkApiClient"),e.serviceFactory("mercureInfoReducer",at("reducer"),"mercureInfoReducerCreator"),e.serviceFactory("loadMercureInfo",at("loadMercureInfo"),"mercureInfoReducerCreator")},T5=({isOpen:e,duplicatedServers:t,onDiscard:n,onSave:r})=>{const i=t.length>1;return g.jsxs(Uo,{centered:!0,isOpen:e,children:[g.jsxs(ro,{children:["Duplicated server",i&&"s"]}),g.jsxs(ki,{children:[g.jsx("p",{children:i?"The next servers already exist:":"There is already a server with:"}),g.jsx("ul",{children:t.map(({url:o,apiKey:s},a)=>i?g.jsxs("li",{children:[g.jsx("b",{children:o})," - ",g.jsx("b",{children:s})]},a):g.jsxs(V.Fragment,{children:[g.jsxs("li",{children:["URL: ",g.jsx("b",{children:o})]}),g.jsxs("li",{children:["API key: ",g.jsx("b",{children:s})]})]},a))}),g.jsxs("span",{children:[i?"Do you want to ignore duplicated servers":"Do you want to save this server anyway","?"]})]}),g.jsxs(ea,{children:[g.jsx(ht,{color:"link",onClick:n,children:i?"Ignore duplicated":"Discard"}),g.jsx(ht,{color:"primary",onClick:r,children:"Save anyway"})]})]})},O5=({onSubmit:e,initialValues:t,children:n,title:r})=>{const[i,o]=V.useState(""),[s,a]=V.useState(""),[l,c]=V.useState(""),f=rh(()=>e({name:i,url:s,apiKey:l}));return V.useEffect(()=>{t&&o(t.name),t&&a(t.url),t&&c(t.apiKey)},[t]),g.jsxs("form",{className:"server-form",name:"serverForm",onSubmit:f,children:[g.jsxs(un,{className:"mb-3",title:r,children:[g.jsx(tg,{value:i,onChange:o,children:"Name"}),g.jsx(tg,{type:"url",value:s,onChange:a,children:"URL"}),g.jsx(tg,{value:l,onChange:c,children:"API key"})]}),g.jsx("div",{className:"text-end",children:n})]})},wN=4e3,xN=({type:e})=>g.jsx("div",{className:"mt-3",children:g.jsxs(Nr,{type:e,children:[e==="success"&&"Servers properly imported. You can now select one from the list :)",e==="error"&&"The servers could not be imported. Make sure the format is correct."]})}),mpe=(e,t)=>({servers:n,createServers:r})=>{const i=Io(),o=ta(),s=!!Object.keys(n).length,[a,l]=t(!1,wN),[c,f]=t(!1,wN),[h,p]=It(),[m,v]=V.useState(),y=()=>{if(!m)return;const x=lE();r([{...m,id:x}]),i(`/server/${x}`)};return V.useEffect(()=>{Object.values(n).some(({url:_,apiKey:w})=>(m==null?void 0:m.url)===_&&(m==null?void 0:m.apiKey)===w)?p():y()},[m]),g.jsxs(iu,{children:[g.jsxs(O5,{title:g.jsx("h5",{className:"mb-0",children:"Add new server"}),onSubmit:v,children:[!s&&g.jsx(e,{tooltipPlacement:"top",onImport:l,onImportError:f}),s&&g.jsx(ht,{outline:!0,onClick:o,children:"Cancel"}),g.jsx(ht,{outline:!0,color:"primary",className:"ms-2",children:"Create server"})]}),a&&g.jsx(xN,{type:"success"}),c&&g.jsx(xN,{type:"error"}),g.jsx(T5,{isOpen:h,duplicatedServers:m?[m]:[],onDiscard:o,onSave:y})]})},gpe=e=>({server:t,className:n,children:r,textClassName:i})=>{const[o,,s,a]=It();return g.jsxs(g.Fragment,{children:[g.jsxs("span",{className:n,onClick:s,children:[!r&&g.jsx(je,{fixedWidth:!0,icon:hC}),g.jsx("span",{className:i,children:r??"Remove this server"})]}),g.jsx(e,{server:t,isOpen:o,toggle:a})]})},vpe=({server:e,toggle:t,isOpen:n,deleteServer:r,redirectHome:i=!0})=>{const o=Io(),s=V.useRef(!1),a=()=>{s.current=!0,t()},l=()=>{s.current&&(r(e),i&&o("/"))};return g.jsxs(Uo,{isOpen:n,toggle:t,centered:!0,onClosed:l,children:[g.jsx(ro,{toggle:t,className:"text-danger",children:"Remove server"}),g.jsxs(ki,{children:[g.jsxs("p",{children:["Are you sure you want to remove ",g.jsx("b",{children:e?e.name:""}),"?"]}),g.jsx("p",{children:g.jsx("i",{children:"No data will be deleted, only the access to this server will be removed from this device. You can create it again at any moment."})})]}),g.jsxs(ea,{children:[g.jsx(ht,{color:"link",onClick:t,children:"Cancel"}),g.jsx(ht,{color:"danger",onClick:a,children:"Delete"})]})]})},ype=e=>V6(({editServer:t,selectedServer:n,selectServer:r})=>{const i=ta(),{reconnect:o}=Soe();if(!Ps(n))return null;const s=a=>{t(n.id,a),o==="true"&&r(n.id),i()};return g.jsx(iu,{children:g.jsxs(O5,{title:g.jsxs("h5",{className:"mb-0",children:['Edit "',n.name,'"']}),initialValues:n,onSubmit:s,children:[g.jsx(ht,{outline:!0,className:"me-2",onClick:i,children:"Cancel"}),g.jsx(ht,{outline:!0,color:"primary",children:"Save"})]})})},e);const SN=e=>({url:t,apiKey:n})=>e.some(r=>r.url===t&&r.apiKey===n),_pe=({importServersFromFile:e})=>({createServers:t,servers:n,children:r,onImport:i=()=>{},onImportError:o=()=>{},tooltipPlacement:s="bottom",className:a=""})=>{const l=pl(),[c,f]=V.useState(),[h,p]=V.useState([]),[m,,v,y]=It(),x=Dt(t,i),_=Dt(()=>x(c??[]),y),w=Dt(()=>x((c??[]).filter(pG(SN(h)))),y),S=async({target:T})=>{var P;return e((P=T.files)==null?void 0:P[0]).then(f).then(()=>{T.value=null}).catch(o)};return V.useEffect(()=>{if(!c)return;const T=Object.values(n),P=c.filter(SN(T)),k=!!P.length;k?p(P):x(c),k&&v()},[c]),g.jsxs(g.Fragment,{children:[g.jsxs(ht,{outline:!0,id:"importBtn",className:a,onClick:()=>{var T;return(T=l.current)==null?void 0:T.click()},children:[g.jsx(je,{icon:JX,fixedWidth:!0})," ",r??"Import from file"]}),g.jsxs(Er,{placement:s,target:"importBtn",children:["You can create servers by importing a CSV file with columns ",g.jsx("b",{children:"name"}),", ",g.jsx("b",{children:"apiKey"})," and ",g.jsx("b",{children:"url"}),"."]}),g.jsx("input",{type:"file",accept:"text/csv",className:"import-servers-btn__csv-select",ref:l,onChange:S}),g.jsx(T5,{isOpen:m,duplicatedServers:h,onDiscard:w,onSave:_})]})};const bpe=e=>({servers:t,selectedServer:n})=>g.jsx(iu,{children:g.jsxs("div",{className:"server-error__container flex-column",children:[g.jsxs(So,{className:"w-100 mb-3 mb-md-5",type:"error",fullWidth:!0,children:[!Ps(n)&&"Could not find this Shlink server.",Ps(n)&&g.jsxs(g.Fragment,{children:[g.jsx("p",{children:"Oops! Could not connect to this Shlink server."}),"Make sure you have internet connection, and the server is properly configured and on-line."]})]}),g.jsxs(z6,{servers:Object.values(t),children:["These are the Shlink servers currently configured. Choose one of them or ",g.jsx(Lt,{to:"/server/create",children:"add a new one"}),"."]}),Ps(n)&&g.jsx("div",{className:"container mt-3 mt-md-5",children:g.jsxs("h5",{children:["Alternatively, if you think you may have miss-configured this server, you can ",g.jsx(e,{server:n,className:"server-error__delete-btn",children:"remove it"})," or ",g.jsx(Lt,{to:`/server/${n.id}/edit?reconnect=true`,children:"edit it"}),"."]})})]})}),wpe=4e3,xpe=(e,t,n,r)=>({servers:i})=>{const o=Object.values(i),[s,a]=V.useState(o),l=p=>a(o.filter(({name:m,url:v})=>`${m} ${v}`.toLowerCase().match(p.toLowerCase()))),c=s.some(({autoConnect:p})=>!!p),[f,h]=n(!1,wpe);return V.useEffect(()=>{a(Object.values(i))},[i]),g.jsxs(iu,{children:[g.jsx(ih,{className:"mb-3",onChange:l}),g.jsxs(Qn,{className:"mb-3",children:[g.jsxs("div",{className:"col-md-6 d-flex d-md-block mb-2 mb-md-0",children:[g.jsx(t,{className:"flex-fill",onImportError:h,children:"Import servers"}),o.length>0&&g.jsxs(ht,{outline:!0,className:"ms-2 flex-fill",onClick:async()=>e.exportServers(),children:[g.jsx(je,{icon:Xj,fixedWidth:!0})," Export servers"]})]}),g.jsx("div",{className:"col-md-6 text-md-end d-flex d-md-block",children:g.jsxs(ht,{outline:!0,color:"primary",className:"flex-fill",tag:Lt,to:"/server/create",children:[g.jsx(je,{icon:vC,fixedWidth:!0})," Add a server"]})})]}),g.jsx(un,{children:g.jsxs("table",{className:"table table-hover responsive-table mb-0",children:[g.jsx("thead",{className:"responsive-table__header",children:g.jsxs("tr",{children:[c&&g.jsx("th",{"aria-label":"Auto-connect",style:{width:"50px"}}),g.jsx("th",{children:"Name"}),g.jsx("th",{children:"Base URL"}),g.jsx("th",{"aria-label":"Options"})]})}),g.jsxs("tbody",{children:[!s.length&&g.jsx("tr",{className:"text-center",children:g.jsx("td",{colSpan:4,children:"No servers found."})}),s.map(p=>g.jsx(r,{server:p,hasAutoConnect:c},p.id))]})]})}),f&&g.jsx("div",{className:"mt-3",children:g.jsx(Nr,{type:"error",children:"The servers could not be imported. Make sure the format is correct."})})]})},Spe=e=>({server:t,hasAutoConnect:n})=>g.jsxs("tr",{className:"responsive-table__row",children:[n&&g.jsx("td",{className:"responsive-table__cell","data-th":"Auto-connect",children:t.autoConnect&&g.jsxs(g.Fragment,{children:[g.jsx(je,{icon:fd,className:"text-primary",id:"autoConnectIcon"}),g.jsx(Er,{target:"autoConnectIcon",placement:"right",children:"Auto-connect to this server"})]})}),g.jsx("th",{className:"responsive-table__cell","data-th":"Name",children:g.jsx(Lt,{to:`/server/${t.id}`,children:t.name})}),g.jsx("td",{className:"responsive-table__cell","data-th":"Base URL",children:t.url}),g.jsx("td",{className:"responsive-table__cell text-end",children:g.jsx(e,{server:t})})]});var Cpe={prefix:"far",iconName:"calendar-days",icon:[448,512,["calendar-alt"],"f073","M152 24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64H64C28.7 64 0 92.7 0 128v16 48V448c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V192 144 128c0-35.3-28.7-64-64-64H344V24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64H152V24zM48 192h80v56H48V192zm0 104h80v64H48V296zm128 0h96v64H176V296zm144 0h80v64H320V296zm80-48H320V192h80v56zm0 160v40c0 8.8-7.2 16-16 16H320V408h80zm-128 0v56H176V408h96zm-144 0v56H64c-8.8 0-16-7.2-16-16V408h80zM272 248H176V192h96v56z"]},Epe=Cpe,Tpe={prefix:"far",iconName:"circle-right",icon:[512,512,[61838,"arrow-alt-circle-right"],"f35a","M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM294.6 135.1c-4.2-4.5-10.1-7.1-16.3-7.1C266 128 256 138 256 150.3V208H160c-17.7 0-32 14.3-32 32v32c0 17.7 14.3 32 32 32h96v57.7c0 12.3 10 22.3 22.3 22.3c6.2 0 12.1-2.6 16.3-7.1l99.9-107.1c3.5-3.8 5.5-8.7 5.5-13.8s-2-10.1-5.5-13.8L294.6 135.1z"]},Ope=Tpe,Ppe={prefix:"far",iconName:"circle",icon:[512,512,[128308,128309,128992,128993,128994,128995,128996,9679,9898,9899,11044,61708,61915],"f111","M512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256zM256 48C141.1 48 48 141.1 48 256C48 370.9 141.1 464 256 464C370.9 464 464 370.9 464 256C464 141.1 370.9 48 256 48z"]},P5={prefix:"far",iconName:"clone",icon:[512,512,[],"f24d","M64 464H288c8.8 0 16-7.2 16-16V384h48v64c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V224c0-35.3 28.7-64 64-64h64v48H64c-8.8 0-16 7.2-16 16V448c0 8.8 7.2 16 16 16zM224 304H448c8.8 0 16-7.2 16-16V64c0-8.8-7.2-16-16-16H224c-8.8 0-16 7.2-16 16V288c0 8.8 7.2 16 16 16zm-64-16V64c0-35.3 28.7-64 64-64H448c35.3 0 64 28.7 64 64V288c0 35.3-28.7 64-64 64H224c-35.3 0-64-28.7-64-64z"]};const kpe=e=>({server:t,setAutoConnect:n})=>{const[r,i]=It(),[o,,s,a]=It(),l=`/server/${t.id}`,{autoConnect:c}=t,f=c?XX:Ppe;return g.jsxs(x_,{isOpen:r,toggle:i,children:[g.jsxs(Ue,{tag:Lt,to:l,children:[g.jsx(je,{icon:ZX,fixedWidth:!0})," Connect"]}),g.jsxs(Ue,{tag:Lt,to:`${l}/edit`,children:[g.jsx(je,{icon:pC,fixedWidth:!0})," Edit server"]}),g.jsxs(Ue,{onClick:()=>n(t,!c),children:[g.jsx(je,{icon:f,fixedWidth:!0})," ",c?"Do not a":"A","uto-connect"]}),g.jsx(Ue,{divider:!0}),g.jsxs(Ue,{className:"dropdown-item--danger",onClick:s,children:[g.jsx(je,{icon:hC,fixedWidth:!0})," Remove server"]}),g.jsx(e,{redirectHome:!1,server:t,isOpen:o,toggle:a})]})};var ty={},Mpe={get exports(){return ty},set exports(e){ty=e}};/** @license * eventsource.js * Available under MIT License (MIT) * https://github.com/Yaffle/EventSource/ */(function(e,t){(function(n){var r=n.setTimeout,i=n.clearTimeout,o=n.XMLHttpRequest,s=n.XDomainRequest,a=n.ActiveXObject,l=n.EventSource,c=n.document,f=n.Promise,h=n.fetch,p=n.Response,m=n.TextDecoder,v=n.TextEncoder,y=n.AbortController;if(typeof window<"u"&&typeof c<"u"&&!("readyState"in c)&&c.body==null&&(c.readyState="loading",window.addEventListener("load",function(ue){c.readyState="complete"},!1)),o==null&&a!=null&&(o=function(){return new a("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(ue){function ve(){}return ve.prototype=ue,new ve}),Date.now||(Date.now=function(){return new Date().getTime()}),y==null){var x=h;h=function(ue,ve){var _e=ve.signal;return x(ue,{headers:ve.headers,credentials:ve.credentials,cache:ve.cache}).then(function(Te){var De=Te.body.getReader();return _e._reader=De,_e._aborted&&_e._reader.cancel(),{status:Te.status,statusText:Te.statusText,headers:Te.headers,body:{getReader:function(){return De}}}})},y=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function _(){this.bitsNeeded=0,this.codePoint=0}_.prototype.decode=function(ue){function ve(be,ye,Ce){if(Ce===1)return be>=128>>ye&&be<=2048>>ye&&be<=57344>>ye&&be<=65536>>ye&&be<>6>15?3:ye>31?2:1;if(be===6*2)return ye>15?3:2;if(be===6*3)return 3;throw new Error}for(var Te=65533,De="",Re=this.bitsNeeded,Ne=this.codePoint,ce=0;ce191||!ve(Ne<<6|de&63,Re-6,_e(Re,Ne)))&&(Re=0,Ne=Te,De+=String.fromCharCode(Ne)),Re===0?(de>=0&&de<=127?(Re=0,Ne=de):de>=192&&de<=223?(Re=6*1,Ne=de&31):de>=224&&de<=239?(Re=6*2,Ne=de&15):de>=240&&de<=247?(Re=6*3,Ne=de&7):(Re=0,Ne=Te),Re!==0&&!ve(Ne,Re,_e(Re,Ne))&&(Re=0,Ne=Te)):(Re-=6,Ne=Ne<<6|de&63),Re===0&&(Ne<=65535?De+=String.fromCharCode(Ne):(De+=String.fromCharCode(55296+(Ne-65535-1>>10)),De+=String.fromCharCode(56320+(Ne-65535-1&1023))))}return this.bitsNeeded=Re,this.codePoint=Ne,De};var w=function(){try{return new m().decode(new v().encode("test"),{stream:!0})==="test"}catch(ue){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+ue)}return!1};(m==null||v==null||!w())&&(m=_);var S=function(){};function T(ue){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=S,this.onload=S,this.onerror=S,this.onreadystatechange=S,this._contentType="",this._xhr=ue,this._sendTimeout=0,this._abort=S}T.prototype.open=function(ue,ve){this._abort(!0);var _e=this,Te=this._xhr,De=1,Re=0;this._abort=function(Ce){_e._sendTimeout!==0&&(i(_e._sendTimeout),_e._sendTimeout=0),(De===1||De===2||De===3)&&(De=4,Te.onload=S,Te.onerror=S,Te.onabort=S,Te.onprogress=S,Te.onreadystatechange=S,Te.abort(),Re!==0&&(i(Re),Re=0),Ce||(_e.readyState=4,_e.onabort(null),_e.onreadystatechange())),De=0};var Ne=function(){if(De===1){var Ce=0,ke="",Ie=void 0;if("contentType"in Te)Ce=200,ke="OK",Ie=Te.contentType;else try{Ce=Te.status,ke=Te.statusText,Ie=Te.getResponseHeader("Content-Type")}catch{Ce=0,ke="",Ie=void 0}Ce!==0&&(De=2,_e.readyState=2,_e.status=Ce,_e.statusText=ke,_e._contentType=Ie,_e.onreadystatechange())}},ce=function(){if(Ne(),De===2||De===3){De=3;var Ce="";try{Ce=Te.responseText}catch{}_e.readyState=3,_e.responseText=Ce,_e.onprogress()}},de=function(Ce,ke){if((ke==null||ke.preventDefault==null)&&(ke={preventDefault:S}),ce(),De===1||De===2||De===3){if(De=4,Re!==0&&(i(Re),Re=0),_e.readyState=4,Ce==="load")_e.onload(ke);else if(Ce==="error")_e.onerror(ke);else if(Ce==="abort")_e.onabort(ke);else throw new TypeError;_e.onreadystatechange()}},be=function(Ce){Te!=null&&(Te.readyState===4?(!("onload"in Te)||!("onerror"in Te)||!("onabort"in Te))&&de(Te.responseText===""?"error":"load",Ce):Te.readyState===3?"onprogress"in Te||ce():Te.readyState===2&&Ne())},ye=function(){Re=r(function(){ye()},500),Te.readyState===3&&ce()};"onload"in Te&&(Te.onload=function(Ce){de("load",Ce)}),"onerror"in Te&&(Te.onerror=function(Ce){de("error",Ce)}),"onabort"in Te&&(Te.onabort=function(Ce){de("abort",Ce)}),"onprogress"in Te&&(Te.onprogress=ce),"onreadystatechange"in Te&&(Te.onreadystatechange=function(Ce){be(Ce)}),("contentType"in Te||!("ontimeout"in o.prototype))&&(ve+=(ve.indexOf("?")===-1?"?":"&")+"padding=true"),Te.open(ue,ve,!0),"readyState"in Te&&(Re=r(function(){ye()},0))},T.prototype.abort=function(){this._abort(!1)},T.prototype.getResponseHeader=function(ue){return this._contentType},T.prototype.setRequestHeader=function(ue,ve){var _e=this._xhr;"setRequestHeader"in _e&&_e.setRequestHeader(ue,ve)},T.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},T.prototype.send=function(){if((!("ontimeout"in o.prototype)||!("sendAsBinary"in o.prototype)&&!("mozAnon"in o.prototype))&&c!=null&&c.readyState!=null&&c.readyState!=="complete"){var ue=this;ue._sendTimeout=r(function(){ue._sendTimeout=0,ue.send()},4);return}var ve=this._xhr;"withCredentials"in ve&&(ve.withCredentials=this.withCredentials);try{ve.send(void 0)}catch(_e){throw _e}};function P(ue){return ue.replace(/[A-Z]/g,function(ve){return String.fromCharCode(ve.charCodeAt(0)+32)})}function k(ue){for(var ve=Object.create(null),_e=ue.split(`\r `),Te=0;Te<_e.length;Te+=1){var De=_e[Te],Re=De.split(": "),Ne=Re.shift(),ce=Re.join(": ");ve[P(Ne)]=ce}this._map=ve}k.prototype.get=function(ue){return this._map[P(ue)]},o!=null&&o.HEADERS_RECEIVED==null&&(o.HEADERS_RECEIVED=2);function N(){}N.prototype.open=function(ue,ve,_e,Te,De,Re,Ne){ue.open("GET",De);var ce=0;ue.onprogress=function(){var be=ue.responseText,ye=be.slice(ce);ce+=ye.length,_e(ye)},ue.onerror=function(be){be.preventDefault(),Te(new Error("NetworkError"))},ue.onload=function(){Te(null)},ue.onabort=function(){Te(null)},ue.onreadystatechange=function(){if(ue.readyState===o.HEADERS_RECEIVED){var be=ue.status,ye=ue.statusText,Ce=ue.getResponseHeader("Content-Type"),ke=ue.getAllResponseHeaders();ve(be,ye,Ce,new k(ke))}},ue.withCredentials=Re;for(var de in Ne)Object.prototype.hasOwnProperty.call(Ne,de)&&ue.setRequestHeader(de,Ne[de]);return ue.send(),ue};function D(ue){this._headers=ue}D.prototype.get=function(ue){return this._headers.get(ue)};function z(){}z.prototype.open=function(ue,ve,_e,Te,De,Re,Ne){var ce=null,de=new y,be=de.signal,ye=new m;return h(De,{headers:Ne,credentials:Re?"include":"same-origin",signal:be,cache:"no-store"}).then(function(Ce){return ce=Ce.body.getReader(),ve(Ce.status,Ce.statusText,Ce.headers.get("Content-Type"),new D(Ce.headers)),new f(function(ke,Ie){var Je=function(){ce.read().then(function(et){if(et.done)ke(void 0);else{var Ge=ye.decode(et.value,{stream:!0});_e(Ge),Je()}}).catch(function(et){Ie(et)})};Je()})}).catch(function(Ce){if(Ce.name!=="AbortError")return Ce}).then(function(Ce){Te(Ce)}),{abort:function(){ce!=null&&ce.cancel(),de.abort()}}};function A(){this._listeners=Object.create(null)}function W(ue){r(function(){throw ue},0)}A.prototype.dispatchEvent=function(ue){ue.target=this;var ve=this._listeners[ue.type];if(ve!=null)for(var _e=ve.length,Te=0;Te<_e;Te+=1){var De=ve[Te];try{typeof De.handleEvent=="function"?De.handleEvent(ue):De.call(this,ue)}catch(Re){W(Re)}}},A.prototype.addEventListener=function(ue,ve){ue=String(ue);var _e=this._listeners,Te=_e[ue];Te==null&&(Te=[],_e[ue]=Te);for(var De=!1,Re=0;Re"u"?typeof window<"u"?window:typeof self<"u"?self:zl:globalThis)})(Mpe,ty);const Rpe=(e,t,n,r)=>{const{mercureHubUrl:i,token:o,loading:s,error:a}=e;if(s||a||!i)return;const l=({data:h})=>n(JSON.parse(h)),c=({status:h})=>h===401&&r(),f=t.map(h=>{const p=new URL(i);p.searchParams.append("topic",h);const m=new ty.EventSourcePolyfill(p,{headers:{Authorization:`Bearer ${o}`}});return m.onmessage=l,m.onerror=c,m});return()=>f.forEach(h=>h.close())};function ra(e,t){const n=new Set;return r=>{const{createNewVisits:i,loadMercureInfo:o,mercureInfo:s}=r,{interval:a}=s,l=Ks();return V.useEffect(()=>{const c=m=>a?n.add(m):i([m]),f=t(r,l),h=Rpe(s,f,c,o);if(!a)return h;const p=setInterval(()=>{i([...n]),n.clear()},a*1e3*60);return Dt(()=>clearInterval(p),()=>h==null?void 0:h())},[s]),g.jsx(e,{...r})}}class Xr{}xe(Xr,"visits","https://shlink.io/new-visit"),xe(Xr,"orphanVisits","https://shlink.io/new-orphan-visit"),xe(Xr,"shortUrlVisits",t=>`https://shlink.io/new-visit/${t}`);const BE="shlink/shortUrlDeletion",CN={shortCode:"",loading:!1,deleted:!1,error:!1},Npe=e=>rr(`${BE}/deleteShortUrl`,async({shortCode:t,domain:n},{getState:r})=>{const{deleteShortUrl:i}=e(r);return await i(t,n),{shortCode:t,domain:n}}),k5=yn(`${BE}/shortUrlDeleted`),Lpe=e=>{const{actions:t,reducer:n}=Yn({name:BE,initialState:CN,reducers:{resetDeleteShortUrl:()=>CN},extraReducers:i=>{i.addCase(e.pending,o=>({...o,loading:!0,error:!1,deleted:!1})),i.addCase(e.rejected,(o,{error:s})=>({...o,errorData:no(s),loading:!1,error:!0,deleted:!1})),i.addCase(e.fulfilled,(o,{payload:s})=>({...o,shortCode:s.shortCode,loading:!1,error:!1,deleted:!0}))}}),{resetDeleteShortUrl:r}=t;return{reducer:n,resetDeleteShortUrl:r}},M5="shlink/shortUrlsList",R5=5,Dpe={loading:!0,error:!1},Ape=e=>rr(`${M5}/listShortUrls`,(t,{getState:n})=>{const{listShortUrls:r}=e(n);return r(t??{})}),jpe=(e,t,n)=>Yn({name:M5,initialState:Dpe,reducers:{},extraReducers:r=>{r.addCase(e.pending,i=>({...i,loading:!0,error:!1})),r.addCase(e.rejected,()=>({loading:!1,error:!0})),r.addCase(e.fulfilled,(i,{payload:o})=>({loading:!1,error:!1,shortUrls:o})),r.addCase(n.fulfilled,Dt((i,{payload:o})=>i.shortUrls?Pl(["shortUrls","data"],[o,...i.shortUrls.data.slice(0,R5-1)],i):i,i=>i.shortUrls?Pl(["shortUrls","pagination","totalItems"],i.shortUrls.pagination.totalItems+1,i):i)),r.addCase(t.fulfilled,(i,{payload:o})=>i.shortUrls?Pl(["shortUrls","data"],i.shortUrls.data.map(s=>{const{shortCode:a,domain:l}=o;return Of(s,a,l)?o:s}),i):i),r.addCase(k5,Dt((i,{payload:o})=>i.shortUrls?Pl(["shortUrls","data"],Ud(s=>Of(s,o.shortCode,o.domain),i.shortUrls.data),i):i,i=>i.shortUrls?Pl(["shortUrls","pagination","totalItems"],i.shortUrls.pagination.totalItems-1,i):i)),r.addCase(ah,(i,{payload:o})=>{var s,a;return Pl(["shortUrls","data"],(a=(s=i.shortUrls)==null?void 0:s.data)==null?void 0:a.map(l=>{var c;return((c=qG(o.createdVisits.filter(({shortUrl:f})=>f&&Of(l,f.shortCode,f.domain))))==null?void 0:c.shortUrl)??l}),i)})}}),EN=10,{ceil:Ipe}=Math,Fpe=new Intl.NumberFormat("en-US"),_n=e=>Fpe.format(Number(e)),$pe=e=>Ipe(e/EN)*EN;const Bpe=e=>e?{tag:Lt,to:e}:{},a2=({children:e,title:t,link:n,tooltip:r})=>{const i=pl();return g.jsxs(g.Fragment,{children:[g.jsxs(Sr,{innerRef:i,className:"highlight-card",body:!0,...Bpe(n),children:[n&&g.jsx(je,{size:"3x",className:"highlight-card__link-icon",icon:Ope}),g.jsx(QC,{tag:"h5",className:"highlight-card__title",children:t}),g.jsx(XC,{tag:"h2",children:e})]}),r&&g.jsx(Er,{target:i,placement:"bottom",children:r})]})},TN=({loading:e,excludeBots:t,visitsSummary:n,...r})=>g.jsx(a2,{tooltip:n.bots!==void 0?g.jsxs(g.Fragment,{children:[t?"Plus":"Including"," ",g.jsx("b",{children:_n(n.bots)})," potential bot visits"]}):void 0,...r,children:e?"Loading...":_n(t&&n.nonBots?n.nonBots:n.total)}),zpe=(e,t)=>ra(({shortUrlsList:n,listShortUrls:r,listTags:i,tagsList:o,selectedServer:s,loadVisitsOverview:a,visitsOverview:l,settings:{visits:c}})=>{const{loading:f,shortUrls:h}=n,{loading:p}=o,{loading:m,nonOrphanVisits:v,orphanVisits:y}=l,x=Vd(s),_=Pi("nonOrphanVisits",s),w=Io();return V.useEffect(()=>{r({itemsPerPage:R5,orderBy:{field:"dateCreated",dir:"DESC"}}),i(),a()},[]),g.jsxs(g.Fragment,{children:[g.jsxs(Qn,{children:[g.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:g.jsx(TN,{title:"Visits",link:_?`/server/${x}/non-orphan-visits`:void 0,excludeBots:(c==null?void 0:c.excludeBots)??!1,loading:m,visitsSummary:v})}),g.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:g.jsx(TN,{title:"Orphan visits",link:`/server/${x}/orphan-visits`,excludeBots:(c==null?void 0:c.excludeBots)??!1,loading:m,visitsSummary:y})}),g.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:g.jsx(a2,{title:"Short URLs",link:`/server/${x}/list-short-urls/1`,children:f?"Loading...":_n((h==null?void 0:h.pagination.totalItems)??0)})}),g.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:g.jsx(a2,{title:"Tags",link:`/server/${x}/manage-tags`,children:p?"Loading...":_n(o.tags.length)})})]}),g.jsxs(Sr,{className:"mb-3",children:[g.jsxs(rl,{children:[g.jsx("span",{className:"d-sm-none",children:"Create a short URL"}),g.jsx("h5",{className:"d-none d-sm-inline",children:"Create a short URL"}),g.jsx(Lt,{className:"float-end",to:`/server/${x}/create-short-url`,children:"Advanced options »"})]}),g.jsx(nl,{children:g.jsx(t,{basicMode:!0})})]}),g.jsxs(Sr,{children:[g.jsxs(rl,{children:[g.jsx("span",{className:"d-sm-none",children:"Recently created URLs"}),g.jsx("h5",{className:"d-none d-sm-inline",children:"Recently created URLs"}),g.jsx(Lt,{className:"float-end",to:`/server/${x}/list-short-urls/1`,children:"See all »"})]}),g.jsx(nl,{children:g.jsx(e,{shortUrlsList:n,selectedServer:s,className:"mb-0",onTagClick:S=>w(`/server/${x}/list-short-urls/1?tags=${encodeURIComponent(S)}`)})})]})]})},()=>[Xr.visits,Xr.orphanVisits]),Upe={},Vpe=e=>e.id?e:ld("id",lE(),e),Hpe=XS((e,t)=>ld(t.id,t,e),{}),{actions:Wpe,reducer:Ype}=Yn({name:"shlink/servers",initialState:Upe,reducers:{editServer:{prepare:(e,t)=>({payload:{serverId:e,serverData:t}}),reducer:(e,{payload:t})=>{const{serverId:n,serverData:r}=t;return e[n]?ld(n,{...e[n],...r},e):e}},deleteServer:(e,{payload:t})=>WG(t.id,e),setAutoConnect:{prepare:({id:e},t)=>({payload:{serverId:e,autoConnect:t}}),reducer:(e,{payload:t})=>{const{serverId:n,autoConnect:r}=t;return e[n]?r?Ku(qg(e).map(([i,o])=>[i,{...o,autoConnect:i===n}])):ld(n,{...e[n],autoConnect:r},e):e}},createServers:{prepare:Dt(zd(Vpe),Hpe,e=>({payload:e})),reducer:(e,{payload:t})=>({...e,...t})}}}),{editServer:qpe,deleteServer:Gpe,setAutoConnect:Zpe,createServers:N5}=Wpe,Kpe=Ype,Xpe=e=>Array.isArray(e)?e.filter(iC):[],Qpe=e=>rr("shlink/remoteServers/fetchServers",async(t,{dispatch:n})=>{const r=await e.fetchJson(`${Ug.homepage}/servers.json`),i=Xpe(r);n(N5(i))}),Jpe=({servers:e,selectedServer:t})=>{const n=Qc(e),r=()=>Wn(n)?g.jsxs(Ue,{tag:Lt,to:"/server/create",children:[g.jsx(je,{icon:vC})," ",g.jsx("span",{className:"ms-1",children:"Add a server"})]}):g.jsxs(g.Fragment,{children:[n.map(({name:i,id:o})=>g.jsx(Ue,{tag:Lt,to:`/server/${o}`,active:Vd(t)===o,children:i},o)),g.jsx(Ue,{divider:!0}),g.jsxs(Ue,{tag:Lt,to:"/manage-servers",children:[g.jsx(je,{icon:xM})," ",g.jsx("span",{className:"ms-1",children:"Manage servers"})]})]});return g.jsxs(Jd,{nav:!0,inNavbar:!0,children:[g.jsxs(nu,{nav:!0,caret:!0,children:[g.jsx(je,{icon:xM})," ",g.jsx("span",{className:"ms-1",children:"Servers"})]}),g.jsx(hl,{end:!0,style:{right:0},children:r()})]})},eme="shlink-servers.csv";class tme{constructor(t,n,r){xe(this,"exportServers",async()=>{const t=Qc(this.storage.get("servers")??{}).map(RZ);try{const n=this.jsonToCsv(t);X6(this.window,n,eme)}catch(n){console.error(n)}});this.storage=t,this.window=n,this.jsonToCsv=r}}const nme=e=>typeof e.url=="string"&&typeof e.apiKey=="string"&&typeof e.name=="string",rme=e=>Array.isArray(e)&&e.every(nme);class ime{constructor(t,n){xe(this,"importServersFromFile",async t=>{if(!t)throw new Error("No file provided");const n=this.fileReaderFactory();return new Promise((r,i)=>{n.addEventListener("loadend",async o=>{var s,a;try{const l=((a=(s=o.target)==null?void 0:s.result)==null?void 0:a.toString())??"",c=await this.csvToJson(l);if(!rme(c))throw new Error("Provided file does not have the right format.");r(c)}catch(l){i(l)}}),n.readAsText(t)})});this.csvToJson=t,this.fileReaderFactory=n}}const ome=(e,t)=>{e.serviceFactory("ManageServers",xpe,"ServersExporter","ImportServersBtn","useTimeoutToggle","ManageServersRow"),e.decorator("ManageServers",pv),e.decorator("ManageServers",t(["selectedServer","servers"],["resetSelectedServer"])),e.serviceFactory("ManageServersRow",Spe,"ManageServersRowDropdown"),e.serviceFactory("ManageServersRowDropdown",kpe,"DeleteServerModal"),e.decorator("ManageServersRowDropdown",t(null,["setAutoConnect"])),e.serviceFactory("CreateServer",mpe,"ImportServersBtn","useTimeoutToggle"),e.decorator("CreateServer",pv),e.decorator("CreateServer",t(["selectedServer","servers"],["createServers","resetSelectedServer"])),e.serviceFactory("EditServer",ype,"ServerError"),e.decorator("EditServer",t(["selectedServer"],["editServer","selectServer","resetSelectedServer"])),e.serviceFactory("ServersDropdown",()=>Jpe),e.decorator("ServersDropdown",t(["servers","selectedServer"])),e.serviceFactory("DeleteServerModal",()=>vpe),e.decorator("DeleteServerModal",t(null,["deleteServer"])),e.serviceFactory("DeleteServerButton",gpe,"DeleteServerModal"),e.serviceFactory("ImportServersBtn",_pe,"ServersImporter"),e.decorator("ImportServersBtn",t(["servers"],["createServers"])),e.serviceFactory("ServerError",bpe,"DeleteServerButton"),e.decorator("ServerError",t(["servers","selectedServer"])),e.serviceFactory("Overview",zpe,"ShortUrlsTable","CreateShortUrl"),e.decorator("Overview",t(["shortUrlsList","tagsList","selectedServer","mercureInfo","visitsOverview","settings"],["listShortUrls","listTags","createNewVisits","loadMercureInfo","loadVisitsOverview"])),e.constant("fileReaderFactory",()=>new FileReader),e.service("ServersImporter",ime,"csvToJson","fileReaderFactory"),e.service("ServersExporter",tme,"Storage","window","jsonToCsv"),e.serviceFactory("selectServer",Z6,"buildShlinkApiClient","loadMercureInfo"),e.serviceFactory("createServers",()=>N5),e.serviceFactory("deleteServer",()=>Gpe),e.serviceFactory("editServer",()=>qpe),e.serviceFactory("setAutoConnect",()=>Zpe),e.serviceFactory("fetchServers",Qpe,"HttpClient"),e.serviceFactory("resetSelectedServer",()=>wE),e.serviceFactory("selectServerListener",tae,"selectServer","loadMercureInfo"),e.serviceFactory("selectedServerReducerCreator",nae,"selectServer"),e.serviceFactory("selectedServerReducer",at("reducer"),"selectedServerReducerCreator")},_c=({children:e})=>g.jsx("small",{className:"form-text text-muted d-block",children:e}),L5=({checked:e=!1,onChange:t=JS,className:n,children:r,type:i,inline:o=!1})=>{const s=b_(),a=f=>t(f.target.checked,f),l={"form-switch":i==="switch","form-checkbox":i==="checkbox"},c=o?{display:"inline-block"}:{};return g.jsxs("span",{className:me("form-check",l,n),style:c,children:[g.jsx("input",{type:"checkbox",className:"form-check-input",id:s,checked:e,onChange:a}),g.jsx("label",{className:"form-check-label",htmlFor:s,children:r})]})},Hc=e=>g.jsx(L5,{type:"switch",...e}),sme=e=>e?`${e}`:"",ame=({settings:{realTimeUpdates:e},toggleRealTimeUpdates:t,setRealTimeUpdatesInterval:n})=>{const r=b_();return g.jsxs(un,{title:"Real-time updates",className:"h-100",children:[g.jsx(vr,{children:g.jsxs(Hc,{checked:e.enabled,onChange:t,children:["Enable or disable real-time updates.",g.jsxs(_c,{children:["Real-time updates are currently being ",g.jsx("b",{children:e.enabled?"processed":"ignored"}),"."]})]})}),g.jsxs(ou,{noMargin:!0,label:"Real-time updates frequency (in minutes):",labelClassName:me("form-label",{"text-muted":!e.enabled}),id:r,children:[g.jsx($c,{type:"number",min:0,placeholder:"Immediate",disabled:!e.enabled,value:sme(e.interval),id:r,onChange:({target:i})=>n(Number(i.value))}),e.enabled&&g.jsxs(_c,{children:[e.interval!==void 0&&e.interval>0&&g.jsxs("span",{children:["Updates will be reflected in the UI every ",g.jsx("b",{children:e.interval})," minute",e.interval>1&&"s","."]}),!e.interval&&"Updates will be reflected in the UI as soon as they happen."]})]})]})},zE={field:"dateCreated",dir:"DESC"},lme={realTimeUpdates:{enabled:!0},shortUrlCreation:{validateUrls:!1},ui:{theme:"light"},visits:{defaultInterval:"last30Days"},shortUrlsList:{defaultOrdering:zE}},cme=(e,{payload:t})=>Ej(e,t),ya=e=>({reducer:cme,prepare:e}),_a=e=>({payload:e}),{reducer:ume,actions:fme}=Yn({name:"shlink/settings",initialState:lme,reducers:{toggleRealTimeUpdates:ya(e=>_a({realTimeUpdates:{enabled:e}})),setRealTimeUpdatesInterval:ya(e=>_a({realTimeUpdates:{interval:e}})),setShortUrlCreationSettings:ya(e=>_a({shortUrlCreation:e})),setShortUrlsListSettings:ya(e=>_a({shortUrlsList:e})),setUiSettings:ya(e=>_a({ui:e})),setVisitsSettings:ya(e=>_a({visits:e})),setTagsSettings:ya(e=>_a({tags:e}))}}),{toggleRealTimeUpdates:dme,setRealTimeUpdatesInterval:hme,setShortUrlCreationSettings:pme,setShortUrlsListSettings:mme,setUiSettings:gme,setVisitsSettings:vme,setTagsSettings:yme}=fme,_me=ume;const Rf=({children:e,...t})=>g.jsx(t6,{className:"nav-pills__nav-link",tag:nj,...t,children:e}),D5=({children:e,fill:t=!1,className:n=""})=>g.jsx(Sr,{className:`nav-pills__nav p-0 overflow-hidden ${n}`,body:!0,children:g.jsx(f_,{pills:!0,fill:t,children:V.Children.map(e,r=>{if(!V.isValidElement(r)||r.type!==Rf)throw new Error("Only NavPillItem children are allowed inside NavPills.");return r})})}),L1=({items:e})=>g.jsx(g.Fragment,{children:e.map((t,n)=>g.jsx("div",{className:"mb-3",children:t},n))}),bme=(e,t,n,r,i,o)=>()=>g.jsxs(iu,{children:[g.jsxs(D5,{className:"mb-3",children:[g.jsx(Rf,{to:"general",children:"General"}),g.jsx(Rf,{to:"short-urls",children:"Short URLs"}),g.jsx(Rf,{to:"other-items",children:"Other items"})]}),g.jsxs(Xy,{children:[g.jsx(gt,{path:"general",element:g.jsx(L1,{items:[g.jsx(r,{}),g.jsx(e,{})]})}),g.jsx(gt,{path:"short-urls",element:g.jsx(L1,{items:[g.jsx(t,{}),g.jsx(n,{})]})}),g.jsx(gt,{path:"other-items",element:g.jsx(L1,{items:[g.jsx(o,{}),g.jsx(i,{})]})}),g.jsx(gt,{path:"*",element:g.jsx(WS,{replace:!0,to:"general"})})]})]}),D1=e=>e==="includes"?"Suggest tags including input":"Suggest tags starting with input",wme=e=>e==="includes"?g.jsxs(g.Fragment,{children:["The list of suggested tags will contain those ",g.jsx("b",{children:"including"})," provided input."]}):g.jsxs(g.Fragment,{children:["The list of suggested tags will contain those ",g.jsx("b",{children:"starting with"})," provided input."]}),xme=({settings:e,setShortUrlCreationSettings:t})=>{const n=e.shortUrlCreation??{validateUrls:!1},r=i=>()=>t({...n??{validateUrls:!1},tagFilteringMode:i});return g.jsxs(un,{title:"Short URLs form",className:"h-100",children:[g.jsx(vr,{children:g.jsxs(Hc,{checked:n.validateUrls??!1,onChange:i=>t({...n,validateUrls:i}),children:["Request validation on long URLs when creating new short URLs.",g.jsxs(_c,{children:["The initial state of the ",g.jsx("b",{children:"Validate URL"})," checkbox will be ",g.jsx("b",{children:n.validateUrls?"checked":"unchecked"}),"."]})]})}),g.jsx(vr,{children:g.jsxs(Hc,{checked:n.forwardQuery??!0,onChange:i=>t({...n,forwardQuery:i}),children:["Make all new short URLs forward their query params to the long URL.",g.jsxs(_c,{children:["The initial state of the ",g.jsx("b",{children:"Forward query params on redirect"})," checkbox will be ",g.jsx("b",{children:n.forwardQuery??!0?"checked":"unchecked"}),"."]})]})}),g.jsxs(ou,{noMargin:!0,label:"Tag suggestions search mode:",children:[g.jsxs(na,{text:D1(n.tagFilteringMode),children:[g.jsx(Ue,{active:!n.tagFilteringMode||n.tagFilteringMode==="startsWith",onClick:r("startsWith"),children:D1("startsWith")}),g.jsx(Ue,{active:n.tagFilteringMode==="includes",onClick:r("includes"),children:D1("includes")})]}),g.jsx(_c,{children:wme(n.tagFilteringMode)})]})]})},A5={dateCreated:"Created at",shortCode:"Short URL",longUrl:"Long URL",title:"Title",visits:"Visits"};function fh({items:e,order:t,onChange:n,isButton:r=!0,right:i=!1,prefixed:o=!0}){const s=a=>()=>{const l=n_(a,t.field,t.dir);n(l?a:void 0,l)};return g.jsxs(Jd,{children:[g.jsxs(nu,{caret:!0,color:r?"primary":"link",className:me({"dropdown-btn__toggle btn-block pe-4 overflow-hidden":r,"btn-sm p-0":!r}),children:[!r&&g.jsx(g.Fragment,{children:"Order by"}),r&&!t.field&&g.jsx("i",{children:"Order by..."}),r&&t.field&&g.jsxs(g.Fragment,{children:[o&&"Order by: ",e[t.field]," - ",g.jsx("small",{children:t.dir??"DESC"})]})]}),g.jsxs(hl,{end:i,className:me("w-100",{"ordering-dropdown__menu--link":!r}),children:[qg(e).map(([a,l])=>g.jsxs(Ue,{active:t.field===a,onClick:s(a),children:[l,t.field===a&&g.jsx(je,{icon:t.dir==="ASC"?_Q:iQ,className:"ordering-dropdown__sort-icon"})]},a)),g.jsx(Ue,{divider:!0}),g.jsx(Ue,{disabled:!t.field,onClick:()=>n(),children:g.jsx("i",{children:"Clear selection"})})]})]})}const Sme=({settings:{shortUrlsList:e},setShortUrlsListSettings:t})=>g.jsx(un,{title:"Short URLs list",className:"h-100",children:g.jsx(ou,{noMargin:!0,label:"Default ordering for short URLs list:",children:g.jsx(fh,{items:A5,order:(e==null?void 0:e.defaultOrdering)??zE,onChange:(n,r)=>t({defaultOrdering:{field:n,dir:r}})})})}),j5={tag:"Tag",shortUrls:"Short URLs",visits:"Visits"},Cme=({settings:{tags:e},setTagsSettings:t})=>g.jsx(un,{title:"Tags",className:"h-100",children:g.jsx(ou,{noMargin:!0,label:"Default ordering for tags list:",children:g.jsx(fh,{items:j5,order:(e==null?void 0:e.defaultOrdering)??{},onChange:(n,r)=>t({...e,defaultOrdering:{field:n,dir:r}})})})});const Eme=({settings:{ui:e},setUiSettings:t})=>g.jsxs(un,{title:"User interface",className:"h-100",children:[g.jsx(je,{icon:(e==null?void 0:e.theme)==="dark"?LQ:wQ,className:"user-interface__theme-icon"}),g.jsx(Hc,{checked:(e==null?void 0:e.theme)==="dark",onChange:n=>{const r=n?"dark":"light";t({...e,theme:r}),x6(r)},children:"Use dark theme."})]}),I5=({active:e,allText:t,onChange:n})=>g.jsxs(g.Fragment,{children:[g.jsx(Ue,{active:e==="all",onClick:()=>n("all"),children:t}),g.jsx(Ue,{divider:!0}),Yhe.map(r=>g.jsx(Ue,{active:e===r,onClick:()=>n(r),children:$E(r)},r))]}),Tme=({onChange:e,active:t,allText:n})=>g.jsx(na,{text:$E(t)??n,children:g.jsx(I5,{allText:n,active:t,onChange:e})}),ON=e=>{var t;return((t=e.visits)==null?void 0:t.defaultInterval)??"last30Days"},Ome=({settings:e,setVisitsSettings:t})=>{var n,r;return g.jsxs(un,{title:"Visits",className:"h-100",children:[g.jsx(vr,{children:g.jsxs(Hc,{checked:!!((n=e.visits)!=null&&n.excludeBots),onChange:i=>t({defaultInterval:ON(e),excludeBots:i}),children:["Exclude bots wherever possible (this option‘s effect might depend on Shlink server‘s version).",g.jsxs(_c,{children:["The visits coming from potential bots will be ",g.jsx("b",{children:(r=e.visits)!=null&&r.excludeBots?"excluded":"included"}),"."]})]})}),g.jsx(ou,{noMargin:!0,label:"Default interval to load on visits sections:",children:g.jsx(Tme,{allText:"All visits",active:ON(e),onChange:i=>t({defaultInterval:i})})})]})},Pme=(e,t)=>{e.serviceFactory("Settings",bme,"RealTimeUpdatesSettings","ShortUrlCreationSettings","ShortUrlsListSettings","UserInterfaceSettings","VisitsSettings","TagsSettings"),e.decorator("Settings",pv),e.decorator("Settings",t(null,["resetSelectedServer"])),e.serviceFactory("RealTimeUpdatesSettings",()=>ame),e.decorator("RealTimeUpdatesSettings",t(["settings"],["toggleRealTimeUpdates","setRealTimeUpdatesInterval"])),e.serviceFactory("ShortUrlCreationSettings",()=>xme),e.decorator("ShortUrlCreationSettings",t(["settings"],["setShortUrlCreationSettings"])),e.serviceFactory("UserInterfaceSettings",()=>Eme),e.decorator("UserInterfaceSettings",t(["settings"],["setUiSettings"])),e.serviceFactory("VisitsSettings",()=>Ome),e.decorator("VisitsSettings",t(["settings"],["setVisitsSettings"])),e.serviceFactory("TagsSettings",()=>Cme),e.decorator("TagsSettings",t(["settings"],["setTagsSettings"])),e.serviceFactory("ShortUrlsListSettings",()=>Sme),e.decorator("ShortUrlsListSettings",t(["settings"],["setShortUrlsListSettings"])),e.serviceFactory("toggleRealTimeUpdates",()=>dme),e.serviceFactory("setRealTimeUpdatesInterval",()=>hme),e.serviceFactory("setShortUrlCreationSettings",()=>pme),e.serviceFactory("setShortUrlsListSettings",()=>mme),e.serviceFactory("setUiSettings",()=>gme),e.serviceFactory("setVisitsSettings",()=>vme),e.serviceFactory("setTagsSettings",()=>yme)},kme=e=>({longUrl:"",tags:[],customSlug:"",title:void 0,shortCodeLength:void 0,domain:"",validSince:void 0,validUntil:void 0,maxVisits:void 0,findIfExists:!1,validateUrl:(e==null?void 0:e.validateUrls)??!1,forwardQuery:(e==null?void 0:e.forwardQuery)??!0}),Mme=(e,t)=>({createShortUrl:n,shortUrlCreation:r,resetCreateShortUrl:i,selectedServer:o,basicMode:s=!1,settings:{shortUrlCreation:a}})=>{const l=V.useMemo(()=>kme(a),[a]);return g.jsxs(g.Fragment,{children:[g.jsx(e,{initialState:l,saving:r.saving,selectedServer:o,mode:s?"create-basic":"create",onSave:async c=>(i(),n(c))}),g.jsx(t,{creation:r,resetCreateShortUrl:i,canBeClosed:s})]})},Rme=e=>({settings:{shortUrlCreation:t},selectedServer:n,shortUrlDetail:r,getShortUrlDetail:i,shortUrlEdition:o,editShortUrl:s})=>{const{search:a}=Pn(),l=Ks(),c=ta(),{loading:f,error:h,errorData:p,shortUrl:m}=r,{saving:v,saved:y,error:x,errorData:_}=o,{domain:w}=dl(a),S=V.useMemo(()=>xae(m,t),[m,t]);return V.useEffect(()=>{l.shortCode&&i({shortCode:hm(l.shortCode),domain:w})},[]),f?g.jsx(So,{loading:!0}):h?g.jsx(Nr,{type:"error",children:g.jsx(Lo,{errorData:p,fallbackMessage:"An error occurred while loading short URL detail :("})}):g.jsxs(g.Fragment,{children:[g.jsx("header",{className:"mb-3",children:g.jsx(Sr,{body:!0,children:g.jsxs("h2",{className:"d-sm-flex justify-content-between align-items-center mb-0",children:[g.jsx(ht,{color:"link",size:"lg",className:"p-0 me-3",onClick:c,children:g.jsx(je,{icon:Kj})}),g.jsx("span",{className:"text-center",children:g.jsxs("small",{children:["Edit ",g.jsx(Si,{href:(m==null?void 0:m.shortUrl)??""})]})}),g.jsx("span",{})]})})}),g.jsx(e,{initialState:S,saving:v,selectedServer:n,mode:"edit",onSave:async T=>{m&&s({...m,data:T})}}),y&&x&&g.jsx(Nr,{type:"error",className:"mt-3",children:g.jsx(Lo,{errorData:_,fallbackMessage:"An error occurred while updating short URL :("})}),y&&!x&&g.jsx(Nr,{type:"success",className:"mt-3",children:"Short URL properly edited."})]})};var C_={},Nme=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var h=PN[t.format]||PN.default;window.clipboardData.setData(h,e)}else f.clipboardData.clearData(),f.clipboardData.setData(t.format,e);t.onCopy&&(f.preventDefault(),t.onCopy(f.clipboardData))}),document.body.appendChild(a),o.selectNodeContents(a),s.addRange(o);var c=document.execCommand("copy");if(!c)throw new Error("copy command was unsuccessful");l=!0}catch(f){n&&console.error("unable to copy using execCommand: ",f),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),l=!0}catch(h){n&&console.error("unable to copy using clipboardData: ",h),n&&console.error("falling back to prompt"),r=Ame("message"in t?t.message:Dme),window.prompt(r,e)}}finally{s&&(typeof s.removeRange=="function"?s.removeRange(o):s.removeAllRanges()),a&&document.body.removeChild(a),i()}return l}var Ime=jme;function l2(e){return l2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l2(e)}Object.defineProperty(C_,"__esModule",{value:!0});C_.CopyToClipboard=void 0;var Np=F5(V),Fme=F5(Ime),$me=["text","onCopy","options","children"];function F5(e){return e&&e.__esModule?e:{default:e}}function kN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function MN(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function zme(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function Ume(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function RN(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ny(e){return ny=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},ny(e)}function UE(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var B5=function(e){Hme(n,e);var t=Wme(n);function n(){var r;Ume(this,n);for(var i=arguments.length,o=new Array(i),s=0;s({creation:t,resetCreateShortUrl:n,canBeClosed:r=!1})=>{const[i,o]=e(),{error:s,saved:a}=t;if(V.useEffect(()=>{n()},[]),s)return g.jsxs(Nr,{type:"error",className:"mt-3",children:[r&&g.jsx(je,{icon:yw,className:"float-end pointer",onClick:n}),g.jsx(Lo,{errorData:t.errorData,fallbackMessage:"An error occurred while creating the URL :("})]});if(!a)return null;const{shortUrl:l}=t.result;return g.jsxs(Nr,{type:"success",className:"mt-3",children:[r&&g.jsx(je,{icon:yw,className:"float-end pointer",onClick:n}),g.jsxs("span",{children:[g.jsx("b",{children:"Great!"})," The short URL is ",g.jsx("b",{children:l})]}),g.jsx(z5,{text:l,onCopy:o,children:g.jsxs("button",{className:"btn btn-light btn-sm create-short-url-result__copy-btn",id:"copyBtn",type:"button",children:[g.jsx(je,{icon:P5})," Copy"]})}),g.jsx(Xd,{placement:"left",isOpen:i,target:"copyBtn",children:"Copied!"})]})},A1="delete",Kme=({shortUrl:e,toggle:t,isOpen:n,shortUrlDeletion:r,resetDeleteShortUrl:i,deleteShortUrl:o,shortUrlDeleted:s})=>{const[a,l]=V.useState("");V.useEffect(()=>i,[]);const{loading:c,error:f,deleted:h,errorData:p}=r,m=Dt(i,t),v=rh(()=>o(e).then(t));return g.jsx(Uo,{isOpen:n,toggle:m,centered:!0,onClosed:()=>h&&s(e),children:g.jsxs("form",{onSubmit:v,children:[g.jsx(ro,{toggle:m,children:g.jsx("span",{className:"text-danger",children:"Delete short URL"})}),g.jsxs(ki,{children:[g.jsxs("p",{children:[g.jsx("b",{className:"text-danger",children:"Caution!"})," You are about to delete a short URL."]}),g.jsx("p",{children:"This action cannot be undone. Once you have deleted it, all the visits stats will be lost."}),g.jsxs("p",{children:["Write ",g.jsx("b",{children:A1})," to confirm deletion."]}),g.jsx("input",{type:"text",className:"form-control",placeholder:`Insert ${A1}`,value:a,onChange:y=>l(y.target.value)}),f&&g.jsx(Nr,{type:PX(p)?"warning":"error",small:!0,className:"mt-2",children:g.jsx(Lo,{errorData:p,fallbackMessage:"Something went wrong while deleting the URL :("})})]}),g.jsxs(ea,{children:[g.jsx("button",{type:"button",className:"btn btn-link",onClick:m,children:"Cancel"}),g.jsx("button",{type:"submit",className:"btn btn-danger",disabled:a!==A1||c,children:c?"Deleting...":"Delete"})]})]})})},U5=({amount:e=0,loading:t=!1,...n})=>g.jsxs(ht,{...n,outline:!0,color:"primary",disabled:t,children:[g.jsx(je,{icon:UX})," ",t?"Exporting...":g.jsxs(g.Fragment,{children:["Export (",_n(e),")"]})]}),E_=()=>{const e=Io(),{search:t}=Pn(),{serverId:n=""}=Ks(),r=V.useMemo(Dt(()=>dl(t),({orderBy:o,tags:s,excludeBots:a,excludeMaxVisitsReached:l,excludePastValidUntil:c,...f})=>{const h=o?NZ(o):void 0,p=(s==null?void 0:s.split(","))??[];return{...f,orderBy:h,tags:p,excludeBots:a!==void 0?a==="true":void 0,excludeMaxVisitsReached:l!==void 0?l==="true":void 0,excludePastValidUntil:c!==void 0?c==="true":void 0}}),[t]);return[r,o=>{const s={...r,...o},{orderBy:a,tags:l,excludeBots:c,excludeMaxVisitsReached:f,excludePastValidUntil:h,...p}=s,m={...p,orderBy:a&&Mj(a),tags:l.length>0?l.join(","):void 0,excludeBots:C1(c),excludeMaxVisitsReached:C1(f),excludePastValidUntil:C1(h)},v=Hd(m),y=Wn(v)?"":`?${v}`;e(`/server/${n}/list-short-urls/1${y}`)}]},NN=20,Xme=(e,{exportShortUrls:t})=>({amount:n=0,selectedServer:r})=>{const[{tags:i,search:o,startDate:s,endDate:a,orderBy:l,tagsMode:c}]=E_(),[f,,h,p]=It(),m=V.useCallback(async()=>{if(!Ps(r))return;const v=n/NN,{listShortUrls:y}=e(r),x=async(w=1)=>{const{data:S}=await y({page:`${w}`,tags:i,searchTerm:o,startDate:s,endDate:a,orderBy:l,tagsMode:c,itemsPerPage:NN});return w>=v?S:S.concat(await x(w+1))};h();const _=await x();t(_.map(w=>{var k;const{hostname:S,pathname:T}=new URL(w.shortUrl),P=T.substring(1);return{createdAt:w.dateCreated,domain:S,shortCode:P,shortUrl:w.shortUrl,longUrl:w.longUrl,title:w.title??"",tags:w.tags.join("|"),visits:((k=w==null?void 0:w.visitsSummary)==null?void 0:k.total)??w.visitsCount}})),p()},[r]);return g.jsx(U5,{loading:f,className:"btn-md-block",amount:n,onClick:m})};const V5=({text:e,onCopy:t})=>g.jsx(z5,{text:e,onCopy:t,children:g.jsx(je,{icon:P5,className:"ms-2 copy-to-clipboard-icon"})}),Qme=(e,{margin:t,...n})=>{const r=`${e}/qr-code`,i=Hd({...n,margin:t>0?t:void 0});return`${r}${Wn(i)?"":`?${i}`}`},Jme=({errorCorrection:e,setErrorCorrection:t})=>g.jsxs(na,{text:`Error correction (${e})`,children:[g.jsxs(Ue,{active:e==="L",onClick:()=>t("L"),children:[g.jsx("b",{children:"L"}),"ow"]}),g.jsxs(Ue,{active:e==="M",onClick:()=>t("M"),children:[g.jsx("b",{children:"M"}),"edium"]}),g.jsxs(Ue,{active:e==="Q",onClick:()=>t("Q"),children:[g.jsx("b",{children:"Q"}),"uartile"]}),g.jsxs(Ue,{active:e==="H",onClick:()=>t("H"),children:[g.jsx("b",{children:"H"}),"igh"]})]}),ege=({format:e,setFormat:t})=>g.jsxs(na,{text:`Format (${e})`,children:[g.jsx(Ue,{active:e==="png",onClick:()=>t("png"),children:"PNG"}),g.jsx(Ue,{active:e==="svg",onClick:()=>t("svg"),children:"SVG"})]});const tge=e=>({shortUrl:{shortUrl:t,shortCode:n},toggle:r,isOpen:i,selectedServer:o})=>{const[s,a]=V.useState(300),[l,c]=V.useState(0),[f,h]=V.useState("png"),[p,m]=V.useState("L"),v=Pi("nonRestCors",o),y=V.useMemo(()=>Qme(t,{size:s,format:f,margin:l,errorCorrection:p}),[t,s,f,l,p]),x=V.useMemo(()=>s+l,[s,l]),_=V.useMemo(()=>{if(!(x<500))return x<800?"lg":"xl"},[x]);return g.jsxs(Uo,{isOpen:i,toggle:r,centered:!0,size:_,children:[g.jsxs(ro,{toggle:r,children:["QR code for ",g.jsx(Si,{href:t,children:t})]}),g.jsxs(ki,{children:[g.jsxs(Qn,{children:[g.jsxs(vr,{className:"d-grid col-md-4",children:[g.jsxs("label",{children:["Size: ",s,"px"]}),g.jsx("input",{type:"range",className:"form-control-range",value:s,step:10,min:50,max:1e3,onChange:w=>a(Number(w.target.value))})]}),g.jsxs(vr,{className:"d-grid col-md-4",children:[g.jsxs("label",{htmlFor:"marginControl",children:["Margin: ",l,"px"]}),g.jsx("input",{id:"marginControl",type:"range",className:"form-control-range",value:l,step:1,min:0,max:100,onChange:w=>c(Number(w.target.value))})]}),g.jsx(vr,{className:"d-grid col-md-4",children:g.jsx(ege,{format:f,setFormat:h})}),g.jsx(vr,{className:"col-md-6",children:g.jsx(Jme,{errorCorrection:p,setErrorCorrection:m})})]}),g.jsxs("div",{className:"text-center",children:[g.jsxs("div",{className:"mb-3",children:[g.jsx(Si,{href:y}),g.jsx(V5,{text:y})]}),g.jsx("img",{src:y,className:"qr-code-modal__img",alt:"QR code"}),v&&g.jsx("div",{className:"mt-3",children:g.jsxs(ht,{block:!0,color:"primary",onClick:()=>{e.saveImage(y,`${n}-qr-code.${f}`).catch(()=>{})},children:["Download ",g.jsx(je,{icon:Xj,className:"ms-1"})]})})]})]})]})},ry=({date:e,format:t=IE,relative:n=!1})=>{const r=FE(e)?e:Do(e);return g.jsx("time",{dateTime:`${rce(r)}000`,children:n?`${Kle(Vs(),r)} ago`:vo(r,t)})},nge=e=>{const{meta:t,visitsCount:n,visitsSummary:r}=e,{maxVisits:i,validSince:o,validUntil:s}=t,a=(r==null?void 0:r.total)??n;return i&&a>=i?{icon:DQ,className:"text-danger",description:g.jsxs(g.Fragment,{children:["This short URL cannot be currently visited because it has reached the maximum amount of ",g.jsx("b",{children:i})," visit",i>1?"s":"","."]})}:s&&Gr(_i(s),Vs())?{icon:SM,className:"text-danger",description:g.jsxs(g.Fragment,{children:["This short URL cannot be visited since ",g.jsx("b",{className:"indivisible",children:Jv(_i(s))}),"."]})}:o&&Gr(Vs(),_i(o))?{icon:SM,className:"text-warning",description:g.jsxs(g.Fragment,{children:["This short URL will start working on ",g.jsx("b",{className:"indivisible",children:Jv(_i(o))}),"."]})}:{icon:fd,className:"text-primary",description:"This short URL can be visited normally."}},rge=({shortUrl:e})=>{const t=pl(),{icon:n,className:r,description:i}=nge(e);return g.jsxs(g.Fragment,{children:[g.jsx("span",{style:{cursor:i?"help":void 0},ref:t,children:g.jsx(je,{icon:n,className:r})}),g.jsx(Er,{target:t,placement:"bottom",children:i})]})},ige=({id:e},{shortCode:t,domain:n},r)=>{const i=n?`?domain=${n}`:"";return`/server/${e}/short-code/${Sae(t)}/${r}${i}`},f2=({selectedServer:e,shortUrl:t,suffix:n,children:r,...i})=>!e||!Ps(e)||!t?g.jsx("span",{...i,children:r}):g.jsx(Lt,{to:ige(e,t,n),...i,children:r});const H5=({visitsCount:e,shortUrl:t,selectedServer:n,active:r=!1})=>{const{maxVisits:i,validSince:o,validUntil:s}=(t==null?void 0:t.meta)??{},a=!!i||!!o||!!s,l=g.jsx(f2,{selectedServer:n,shortUrl:t,suffix:"visits",children:g.jsx("strong",{className:me("short-url-visits-count__amount",{"short-url-visits-count__amount--big":r}),children:_n(e)})});if(!a)return l;const c=pl();return g.jsxs(g.Fragment,{children:[g.jsxs("span",{className:"indivisible",children:[l,g.jsxs("small",{className:"short-urls-visits-count__max-visits-control",ref:c,children:[i&&g.jsxs(g.Fragment,{children:[" / ",_n(i)]}),g.jsx("sup",{className:"ms-1",children:g.jsx(je,{icon:gC})})]})]}),g.jsx(Er,{target:c,placement:"bottom",children:g.jsxs("ul",{className:"list-unstyled mb-0",children:[i&&g.jsxs("li",{className:"short-url-visits-count__tooltip-list-item",children:["This short URL will not accept more than ",g.jsx("b",{children:_n(i)})," visit",i===1?"":"s","."]}),o&&g.jsxs("li",{className:"short-url-visits-count__tooltip-list-item",children:["This short URL will not accept visits before ",g.jsx("b",{className:"indivisible",children:Jv(_i(o))}),"."]}),s&&g.jsxs("li",{className:"short-url-visits-count__tooltip-list-item",children:["This short URL will not accept visits after ",g.jsx("b",{className:"indivisible",children:Jv(_i(s))}),"."]})]})})]})};const VE=({text:e,children:t,clearable:n,className:r="",colorGenerator:i,onClick:o,onClose:s})=>g.jsxs("span",{className:me("badge tag",r,{"tag--light-bg":i.isColorLightForKey(e)}),style:{backgroundColor:i.getColorForKey(e),cursor:n||!o?"auto":"pointer"},onClick:o,children:[t??e,n&&g.jsx("span",{"aria-label":`Remove ${e}`,className:"close tag__close-selected-tag",onClick:s,children:"×"})]}),oge=({tags:e,onTagClick:t,colorGenerator:n})=>Wn(e)?g.jsx("i",{className:"indivisible",children:g.jsx("small",{children:"No tags"})}):g.jsx(g.Fragment,{children:e.map(r=>g.jsx(VE,{text:r,colorGenerator:n,onClick:()=>t==null?void 0:t(r)},r))});const sge=(e,t,n)=>({shortUrl:r,selectedServer:i,onTagClick:o,settings:s})=>{var y,x,_,w;const[a,l]=n(),[c,f]=n(!1,500),h=V.useRef(!0),[{excludeBots:p}]=E_(),{visits:m}=s,v=p??(m==null?void 0:m.excludeBots);return V.useEffect(()=>{!h.current&&f(),h.current=!1},[(y=r.visitsSummary)==null?void 0:y.total,(x=r.visitsSummary)==null?void 0:x.nonBots,r.visitsCount]),g.jsxs("tr",{className:"responsive-table__row",children:[g.jsx("td",{className:"indivisible short-urls-row__cell responsive-table__cell","data-th":"Created at",children:g.jsx(ry,{date:r.dateCreated})}),g.jsx("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Short URL",children:g.jsxs("span",{className:"position-relative short-urls-row__cell--indivisible",children:[g.jsx("span",{className:"short-urls-row__short-url-wrapper",children:g.jsx(Si,{href:r.shortUrl})}),g.jsx(V5,{text:r.shortUrl,onCopy:l}),g.jsx("span",{className:"badge bg-warning text-black short-urls-row__copy-hint",hidden:!a,children:"Copied short URL!"})]})}),g.jsx("td",{className:"responsive-table__cell short-urls-row__cell short-urls-row__cell--break","data-th":`${r.title?"Title":"Long URL"}`,children:g.jsx(Si,{href:r.longUrl,children:r.title??r.longUrl})}),r.title&&g.jsx("td",{className:"short-urls-row__cell responsive-table__cell short-urls-row__cell--break d-lg-none","data-th":"Long URL",children:g.jsx(Si,{href:r.longUrl})}),g.jsx("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Tags",children:g.jsx(oge,{tags:r.tags,colorGenerator:t,onTagClick:o})}),g.jsx("td",{className:"responsive-table__cell short-urls-row__cell text-lg-end","data-th":"Visits",children:g.jsx(H5,{visitsCount:(v?(_=r.visitsSummary)==null?void 0:_.nonBots:(w=r.visitsSummary)==null?void 0:w.total)??r.visitsCount,shortUrl:r,selectedServer:i,active:c})}),g.jsx("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Status",children:g.jsx(rge,{shortUrl:r})}),g.jsx("td",{className:"responsive-table__cell short-urls-row__cell",children:g.jsx(e,{selectedServer:i,shortUrl:r})})]})},age=(e,t)=>({shortUrl:n,selectedServer:r})=>{const[i,o]=It(),[s,,a,l]=It(),[c,,f,h]=It();return g.jsxs(x_,{toggle:o,isOpen:i,children:[g.jsxs(Ue,{tag:f2,selectedServer:r,shortUrl:n,suffix:"visits",children:[g.jsx(je,{icon:mC,fixedWidth:!0})," Visit stats"]}),g.jsxs(Ue,{tag:f2,selectedServer:r,shortUrl:n,suffix:"edit",children:[g.jsx(je,{icon:pC,fixedWidth:!0})," Edit short URL"]}),g.jsxs(Ue,{onClick:a,children:[g.jsx(je,{icon:NQ,fixedWidth:!0})," QR code"]}),g.jsx(t,{shortUrl:n,isOpen:s,toggle:l}),g.jsx(Ue,{divider:!0}),g.jsxs(Ue,{className:"dropdown-item--danger",onClick:f,children:[g.jsx(je,{icon:hC,fixedWidth:!0})," Delete short URL"]}),g.jsx(e,{shortUrl:n,isOpen:c,toggle:h})]})},W5="shlink/shortUrlCreation",LN={saving:!1,saved:!1,error:!1},lge=e=>rr(`${W5}/createShortUrl`,(t,{getState:n})=>e(n).createShortUrl(t)),cge=e=>{const{reducer:t,actions:n}=Yn({name:W5,initialState:LN,reducers:{resetCreateShortUrl:()=>LN},extraReducers:i=>{i.addCase(e.pending,()=>({saving:!0,saved:!1,error:!1})),i.addCase(e.rejected,(o,{error:s})=>({saving:!1,saved:!1,error:!0,errorData:no(s)})),i.addCase(e.fulfilled,(o,{payload:s})=>({result:s,saving:!1,saved:!0,error:!1}))}}),{resetCreateShortUrl:r}=n;return{reducer:t,resetCreateShortUrl:r}},DN="shlink/shortUrlDetail",AN={loading:!1,error:!1},uge=e=>{const t=rr(`${DN}/getShortUrlDetail`,async({shortCode:r,domain:i},{getState:o})=>{var l;const{shortUrlsList:s}=o();return((l=s==null?void 0:s.shortUrls)==null?void 0:l.data.find(c=>Of(c,r,i)))??await e(o).getShortUrl(r,i)}),{reducer:n}=Yn({name:DN,initialState:AN,reducers:{},extraReducers:r=>{r.addCase(t.pending,()=>({loading:!0,error:!1})),r.addCase(t.rejected,(i,{error:o})=>({loading:!1,error:!0,errorData:no(o)})),r.addCase(t.fulfilled,(i,{payload:o})=>({...AN,shortUrl:o}))}});return{reducer:n,getShortUrlDetail:t}},Y5="shlink/shortUrlEdition",fge={saving:!1,saved:!1,error:!1},dge=e=>rr(`${Y5}/editShortUrl`,({shortCode:t,domain:n,data:r},{getState:i})=>{const{updateShortUrl:o}=e(i);return o(t,n,r)}),hge=e=>Yn({name:Y5,initialState:fge,reducers:{},extraReducers:t=>{t.addCase(e.pending,n=>({...n,saving:!0,error:!1,saved:!1})),t.addCase(e.rejected,(n,{error:r})=>({...n,saving:!1,error:!0,saved:!1,errorData:no(r)})),t.addCase(e.fulfilled,(n,{payload:r})=>({shortUrl:r,saving:!1,error:!1,saved:!0}))}});var pge={prefix:"fab",iconName:"apple",icon:[384,512,[],"f179","M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z"]},mge={prefix:"fab",iconName:"android",icon:[576,512,[],"f17b","M420.55,301.93a24,24,0,1,1,24-24,24,24,0,0,1-24,24m-265.1,0a24,24,0,1,1,24-24,24,24,0,0,1-24,24m273.7-144.48,47.94-83a10,10,0,1,0-17.27-10h0l-48.54,84.07a301.25,301.25,0,0,0-246.56,0L116.18,64.45a10,10,0,1,0-17.27,10h0l47.94,83C64.53,202.22,8.24,285.55,0,384H576c-8.24-98.45-64.54-181.78-146.85-226.55"]};const q5=e=>g.jsx(L5,{type:"checkbox",...e});function gge(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,d2(e,t)}function d2(e,t){return d2=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},d2(e,t)}function vge(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function jN(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function yge(e,t,n){return e===t?!0:e.correspondingElement?e.correspondingElement.classList.contains(n):e.classList.contains(n)}function _ge(e,t,n){if(e===t)return!0;for(;e.parentNode||e.host;){if(e.parentNode&&yge(e,t,n))return!0;e=e.parentNode||e.host}return e}function bge(e){return document.documentElement.clientWidth<=e.clientX||document.documentElement.clientHeight<=e.clientY}var wge=function(){if(!(typeof window>"u"||typeof window.addEventListener!="function")){var t=!1,n=Object.defineProperty({},"passive",{get:function(){t=!0}}),r=function(){};return window.addEventListener("testPassiveEventSupport",r,n),window.removeEventListener("testPassiveEventSupport",r,n),t}};function xge(e){return e===void 0&&(e=0),function(){return++e}}var Sge=xge(),h2,Lp={},j1={},Cge=["touchstart","touchmove"],Ege="ignore-react-onclickoutside";function IN(e,t){var n=null,r=Cge.indexOf(t)!==-1;return r&&h2&&(n={passive:!e.props.preventDefault}),n}function T_(e,t){var n,r,i=e.displayName||e.name||"Component";return r=n=function(o){gge(s,o);function s(l){var c;return c=o.call(this,l)||this,c.__outsideClickHandler=function(f){if(typeof c.__clickOutsideHandlerProp=="function"){c.__clickOutsideHandlerProp(f);return}var h=c.getInstance();if(typeof h.props.handleClickOutside=="function"){h.props.handleClickOutside(f);return}if(typeof h.handleClickOutside=="function"){h.handleClickOutside(f);return}throw new Error("WrappedComponent: "+i+" lacks a handleClickOutside(event) function for processing outside click events.")},c.__getComponentNode=function(){var f=c.getInstance();return t&&typeof t.setClickOutsideRef=="function"?t.setClickOutsideRef()(f):typeof f.setClickOutsideRef=="function"?f.setClickOutsideRef():Ya.findDOMNode(f)},c.enableOnClickOutside=function(){if(!(typeof document>"u"||j1[c._uid])){typeof h2>"u"&&(h2=wge()),j1[c._uid]=!0;var f=c.props.eventTypes;f.forEach||(f=[f]),Lp[c._uid]=function(h){if(c.componentNode!==null&&(c.props.preventDefault&&h.preventDefault(),c.props.stopPropagation&&h.stopPropagation(),!(c.props.excludeScrollbar&&bge(h)))){var p=h.composed&&h.composedPath&&h.composedPath().shift()||h.target;_ge(p,c.componentNode,c.props.outsideClickIgnoreClass)===document&&c.__outsideClickHandler(h)}},f.forEach(function(h){document.addEventListener(h,Lp[c._uid],IN(jN(c),h))})}},c.disableOnClickOutside=function(){delete j1[c._uid];var f=Lp[c._uid];if(f&&typeof document<"u"){var h=c.props.eventTypes;h.forEach||(h=[h]),h.forEach(function(p){return document.removeEventListener(p,f,IN(jN(c),p))}),delete Lp[c._uid]}},c.getRef=function(f){return c.instanceRef=f},c._uid=Sge(),c}var a=s.prototype;return a.getInstance=function(){if(e.prototype&&!e.prototype.isReactComponent)return this;var c=this.instanceRef;return c.getInstance?c.getInstance():c},a.componentDidMount=function(){if(!(typeof document>"u"||!document.createElement)){var c=this.getInstance();if(t&&typeof t.handleClickOutside=="function"&&(this.__clickOutsideHandlerProp=t.handleClickOutside(c),typeof this.__clickOutsideHandlerProp!="function"))throw new Error("WrappedComponent: "+i+" lacks a function for processing outside click events specified by the handleClickOutside config option.");this.componentNode=this.__getComponentNode(),!this.props.disableOnClickOutside&&this.enableOnClickOutside()}},a.componentDidUpdate=function(){this.componentNode=this.__getComponentNode()},a.componentWillUnmount=function(){this.disableOnClickOutside()},a.render=function(){var c=this.props;c.excludeScrollbar;var f=vge(c,["excludeScrollbar"]);return e.prototype&&e.prototype.isReactComponent?f.ref=this.getRef:f.wrappedRef=this.getRef,f.disableOnClickOutside=this.disableOnClickOutside,f.enableOnClickOutside=this.enableOnClickOutside,V.createElement(e,f)},s}(V.Component),n.displayName="OnClickOutside("+i+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:Ege,preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},r}var G5=V.createContext(),Z5=V.createContext();function Tge(e){var t=e.children,n=V.useState(null),r=n[0],i=n[1],o=V.useRef(!1);V.useEffect(function(){return function(){o.current=!0}},[]);var s=V.useCallback(function(a){o.current||i(a)},[]);return V.createElement(G5.Provider,{value:r},V.createElement(Z5.Provider,{value:s},t))}var K5=function(t){return Array.isArray(t)?t[0]:t},X5=function(t){if(typeof t=="function"){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=m2(e);if(t){var i=m2(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Dge(this,n)}}function e8(e){return function(t){if(Array.isArray(t))return I1(t)}(e)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||function(t,n){if(t){if(typeof t=="string")return I1(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return I1(t,n)}}(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function I1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(o=k1(e,t.slice(0,e.length),new Date)),ns(o)||(o=new Date(e))),ns(o)&&a?o:null)}function ns(e,t){return t=t||new Date("1/1/1000"),e5(e)&&!Gr(e,t)}function sn(e,t,n){if(n==="en")return vo(e,t,{awareOfUnicodeTokens:!0});var r=Ns(n);return n&&!r&&console.warn('A locale object was not found for the provided string ["'.concat(n,'"].')),!r&&Va()&&Ns(Va())&&(r=Ns(Va())),vo(e,t,{locale:r||null,awareOfUnicodeTokens:!0})}function F1(e,t){var n=t.dateFormat,r=t.locale;return e&&sn(e,Array.isArray(n)?n[0]:n,r)||""}function WN(e,t){var n=t.hour,r=n===void 0?0:n,i=t.minute,o=i===void 0?0:i,s=t.second;return Pf(kf(Hhe(e,s===void 0?0:s),o),r)}function Fge(e,t){var n=t&&Ns(t)||Va()&&Ns(Va());return tce(e,n?{locale:n}:null)}function $ge(e,t){return sn(e,"ddd",t)}function Bge(e){return Lr(e)}function HE(e,t,n){var r=Ns(t||Va());return J6(e,{locale:r,weekStartsOn:n})}function Ua(e){return Bae(e)}function tf(e){return zae(e)}function zge(e){return Kw(e)}function t8(e,t){return e&&t?Phe(e,t):!e&&!t}function gs(e,t){return e&&t?The(e,t):!e&&!t}function iy(e,t){return e&&t?Ohe(e,t):!e&&!t}function pr(e,t){return e&&t?Lae(e,t):!e&&!t}function vs(e,t){return e&&t?c5(e,t):!e&&!t}function rg(e,t,n){var r,i=Lr(t),o=ol(n);try{r=Vc(e,{start:i,end:o})}catch{r=!1}return r}function Va(){return(typeof window<"u"?window:globalThis).__localeId__}function Ns(e){if(typeof e=="string"){var t=typeof window<"u"?window:globalThis;return t.__localeData__?t.__localeData__[e]:null}return e}function n8(e,t){return sn(Wi(hn(),e),"LLLL",t)}function r8(e,t){return sn(Wi(hn(),e),"LLL",t)}function Uge(e,t){return sn(ef(hn(),e),"QQQ",t)}function P_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate,i=t.excludeDates,o=t.excludeDateIntervals,s=t.includeDates,a=t.includeDateIntervals,l=t.filterDate;return k_(e,{minDate:n,maxDate:r})||i&&i.some(function(c){return pr(e,c)})||o&&o.some(function(c){var f=c.start,h=c.end;return Vc(e,{start:f,end:h})})||s&&!s.some(function(c){return pr(e,c)})||a&&!a.some(function(c){var f=c.start,h=c.end;return Vc(e,{start:f,end:h})})||l&&!l(hn(e))||!1}function WE(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.excludeDates,r=t.excludeDateIntervals;return r&&r.length>0?r.some(function(i){var o=i.start,s=i.end;return Vc(e,{start:o,end:s})}):n&&n.some(function(i){return pr(e,i)})||!1}function Vge(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate,i=t.excludeDates,o=t.includeDates,s=t.filterDate;return k_(e,{minDate:n,maxDate:r})||i&&i.some(function(a){return gs(e,a)})||o&&!o.some(function(a){return gs(e,a)})||s&&!s(hn(e))||!1}function Hge(e,t,n,r){var i=dt(e),o=lr(e),s=dt(t),a=lr(t),l=dt(r);return i===s&&i===l?o<=n&&n<=a:i=n||li:void 0}function Wge(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate,i=t.excludeDates,o=t.includeDates,s=t.filterDate;return k_(e,{minDate:n,maxDate:r})||i&&i.some(function(a){return iy(e,a)})||o&&!o.some(function(a){return iy(e,a)})||s&&!s(hn(e))||!1}function Yge(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate,i=new Date(e,0,1);return k_(i,{minDate:n,maxDate:r})||!1}function qge(e,t,n,r){var i=dt(e),o=Zw(e),s=dt(t),a=Zw(t),l=dt(r);return i===s&&i===l?o<=n&&n<=a:i=n||li:void 0}function k_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate;return n&&Cd(e,n)<0||r&&Cd(e,r)>0}function YN(e,t){return t.some(function(n){return Ci(n)===Ci(e)&&Ei(n)===Ei(e)})}function qN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.excludeTimes,r=t.includeTimes,i=t.filterTime;return n&&YN(e,n)||r&&!YN(e,r)||i&&!i(e)||!1}function GN(e,t){var n=t.minTime,r=t.maxTime;if(!n||!r)throw new Error("Both minTime and maxTime props required");var i,o=hn(),s=Pf(kf(o,Ei(e)),Ci(e)),a=Pf(kf(o,Ei(n)),Ci(n)),l=Pf(kf(o,Ei(r)),Ci(r));try{i=!Vc(s,{start:a,end:l})}catch{i=!1}return i}function ZN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.includeDates,i=Td(e,1);return n&&Ed(n,i)>0||r&&r.every(function(o){return Ed(o,i)>0})||!1}function KN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.maxDate,r=t.includeDates,i=to(e,1);return n&&Ed(i,n)>0||r&&r.every(function(o){return Ed(i,o)>0})||!1}function XN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.includeDates,i=Od(e,1);return n&&mv(n,i)>0||r&&r.every(function(o){return mv(o,i)>0})||!1}function QN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.maxDate,r=t.includeDates,i=zc(e,1);return n&&mv(i,n)>0||r&&r.every(function(o){return mv(i,o)>0})||!1}function i8(e){var t=e.minDate,n=e.includeDates;if(n&&t){var r=n.filter(function(i){return Cd(i,t)>=0});return Z3(r)}return n?Z3(n):t}function o8(e){var t=e.maxDate,n=e.includeDates;if(n&&t){var r=n.filter(function(i){return Cd(i,t)<=0});return G3(r)}return n?G3(n):t}function JN(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"react-datepicker__day--highlighted",n=new Map,r=0,i=e.length;r1&&arguments[1]!==void 0?arguments[1]:12,n=Math.ceil(dt(e)/t)*t,r=n-(t-1);return{startPeriod:r,endPeriod:n}}function Zge(e,t,n,r){for(var i=[],o=0;o<2*t+1;o++){var s=e+t-o,a=!0;n&&(a=dt(n)<=s),r&&a&&(a=dt(r)>=s),a&&i.push(s)}return i}var Kge=T_(function(e){Rn(n,U.Component);var t=Nn(n);function n(r){var i;kn(this,n),re(le(i=t.call(this,r)),"renderOptions",function(){var l=i.props.year,c=i.state.yearsList.map(function(p){return U.createElement("div",{className:l===p?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:p,onClick:i.onChange.bind(le(i),p),"aria-selected":l===p?"true":void 0},l===p?U.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",p)}),f=i.props.minDate?dt(i.props.minDate):null,h=i.props.maxDate?dt(i.props.maxDate):null;return h&&i.state.yearsList.find(function(p){return p===h})||c.unshift(U.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:i.incrementYears},U.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),f&&i.state.yearsList.find(function(p){return p===f})||c.push(U.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:i.decrementYears},U.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),c}),re(le(i),"onChange",function(l){i.props.onChange(l)}),re(le(i),"handleClickOutside",function(){i.props.onCancel()}),re(le(i),"shiftYears",function(l){var c=i.state.yearsList.map(function(f){return f+l});i.setState({yearsList:c})}),re(le(i),"incrementYears",function(){return i.shiftYears(1)}),re(le(i),"decrementYears",function(){return i.shiftYears(-1)});var o=r.yearDropdownItemNumber,s=r.scrollableYearDropdown,a=o||(s?10:5);return i.state={yearsList:Zge(i.props.year,a,i.props.minDate,i.props.maxDate)},i.dropdownRef=V.createRef(),i}return Mn(n,[{key:"componentDidMount",value:function(){var r=this.dropdownRef.current;r&&(r.scrollTop=r.scrollHeight/2-r.clientHeight/2)}},{key:"render",value:function(){var r=me({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return U.createElement("div",{className:r,ref:this.dropdownRef},this.renderOptions())}}]),n}()),Xge=function(e){Rn(n,U.Component);var t=Nn(n);function n(){var r;kn(this,n);for(var i=arguments.length,o=new Array(i),s=0;s0&&arguments[0]!==void 0?arguments[0]:{},l=!1;r.getTabIndex()===0&&!a.isInputFocused&&r.isSameDay(r.props.preSelection)&&(document.activeElement&&document.activeElement!==document.body||(l=!0),r.props.inline&&!r.props.shouldFocusDayInline&&(l=!1),r.props.containerRef&&r.props.containerRef.current&&r.props.containerRef.current.contains(document.activeElement)&&document.activeElement.classList.contains("react-datepicker__day")&&(l=!0)),l&&r.dayEl.current.focus({preventScroll:!0})}),re(le(r),"renderDayContents",function(){return r.props.monthShowsDuplicateDaysEnd&&r.isAfterMonth()||r.props.monthShowsDuplicateDaysStart&&r.isBeforeMonth()?null:r.props.renderDayContents?r.props.renderDayContents(nR(r.props.day),r.props.day):nR(r.props.day)}),re(le(r),"render",function(){return U.createElement("div",{ref:r.dayEl,className:r.getClassNames(r.props.day),onKeyDown:r.handleOnKeyDown,onClick:r.handleClick,onMouseEnter:r.handleMouseEnter,tabIndex:r.getTabIndex(),"aria-label":r.getAriaLabel(),role:"option","aria-disabled":r.isDisabled(),"aria-current":r.isCurrentDay()?"date":void 0,"aria-selected":r.isSelected()},r.renderDayContents())}),r}return Mn(n,[{key:"componentDidMount",value:function(){this.handleFocusDay()}},{key:"componentDidUpdate",value:function(r){this.handleFocusDay(r)}}]),n}(),ive=function(e){Rn(n,U.Component);var t=Nn(n);function n(){var r;kn(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=6,m=!l&&!r.isWeekInMonth(h);if(p||m){if(!r.props.peekNextMonth)break;f=!0}}return a}),re(le(r),"onMonthClick",function(a,l){r.handleDayClick(Ua(Wi(r.props.day,l)),a)}),re(le(r),"handleMonthNavigation",function(a,l){r.isDisabled(l)||r.isExcluded(l)||(r.props.setPreSelection(l),r.MONTH_REFS[a].current&&r.MONTH_REFS[a].current.focus())}),re(le(r),"onMonthKeyDown",function(a,l){var c=a.key;if(!r.props.disabledKeyboardNavigation)switch(c){case"Enter":r.onMonthClick(a,l),r.props.setPreSelection(r.props.selected);break;case"ArrowRight":r.handleMonthNavigation(l===11?0:l+1,to(r.props.preSelection,1));break;case"ArrowLeft":r.handleMonthNavigation(l===0?11:l-1,Td(r.props.preSelection,1))}}),re(le(r),"onQuarterClick",function(a,l){r.handleDayClick(zge(ef(r.props.day,l)),a)}),re(le(r),"getMonthClassNames",function(a){var l=r.props,c=l.day,f=l.startDate,h=l.endDate,p=l.selected,m=l.minDate,v=l.maxDate,y=l.preSelection,x=l.monthClassName,_=x?x(c):void 0;return me("react-datepicker__month-text","react-datepicker__month-".concat(a),_,{"react-datepicker__month--disabled":(m||v)&&Vge(Wi(c,a),r.props),"react-datepicker__month--selected":r.isSelectedMonth(c,a,p),"react-datepicker__month-text--keyboard-selected":lr(y)===a,"react-datepicker__month--in-range":Hge(f,h,a,c),"react-datepicker__month--range-start":r.isRangeStartMonth(a),"react-datepicker__month--range-end":r.isRangeEndMonth(a),"react-datepicker__month-text--today":r.isCurrentMonth(c,a)})}),re(le(r),"getTabIndex",function(a){var l=lr(r.props.preSelection);return r.props.disabledKeyboardNavigation||a!==l?"-1":"0"}),re(le(r),"getAriaLabel",function(a){var l=r.props,c=l.chooseDayAriaLabelPrefix,f=c===void 0?"Choose":c,h=l.disabledDayAriaLabelPrefix,p=h===void 0?"Not available":h,m=l.day,v=Wi(m,a),y=r.isDisabled(v)||r.isExcluded(v)?p:f;return"".concat(y," ").concat(sn(v,"MMMM yyyy"))}),re(le(r),"getQuarterClassNames",function(a){var l=r.props,c=l.day,f=l.startDate,h=l.endDate,p=l.selected,m=l.minDate,v=l.maxDate;return me("react-datepicker__quarter-text","react-datepicker__quarter-".concat(a),{"react-datepicker__quarter--disabled":(m||v)&&Wge(ef(c,a),r.props),"react-datepicker__quarter--selected":r.isSelectedQuarter(c,a,p),"react-datepicker__quarter--in-range":qge(f,h,a,c),"react-datepicker__quarter--range-start":r.isRangeStartQuarter(a),"react-datepicker__quarter--range-end":r.isRangeEndQuarter(a)})}),re(le(r),"renderMonths",function(){var a=r.props,l=a.showFullMonthYearPicker,c=a.showTwoColumnMonthYearPicker,f=a.showFourColumnMonthYearPicker,h=a.locale,p=a.day,m=a.selected;return(f?[[0,1,2,3],[4,5,6,7],[8,9,10,11]]:c?[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]]:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]]).map(function(v,y){return U.createElement("div",{className:"react-datepicker__month-wrapper",key:y},v.map(function(x,_){return U.createElement("div",{ref:r.MONTH_REFS[x],key:_,onClick:function(w){r.onMonthClick(w,x)},onKeyDown:function(w){r.onMonthKeyDown(w,x)},tabIndex:r.getTabIndex(x),className:r.getMonthClassNames(x),role:"option","aria-label":r.getAriaLabel(x),"aria-current":r.isCurrentMonth(p,x)?"date":void 0,"aria-selected":r.isSelectedMonth(p,x,m)},l?n8(x,h):r8(x,h))}))})}),re(le(r),"renderQuarters",function(){var a=r.props,l=a.day,c=a.selected;return U.createElement("div",{className:"react-datepicker__quarter-wrapper"},[1,2,3,4].map(function(f,h){return U.createElement("div",{key:h,role:"option",onClick:function(p){r.onQuarterClick(p,f)},className:r.getQuarterClassNames(f),"aria-selected":r.isSelectedQuarter(l,f,c)},Uge(f,r.props.locale))}))}),re(le(r),"getClassNames",function(){var a=r.props;a.day;var l=a.selectingDate,c=a.selectsStart,f=a.selectsEnd,h=a.showMonthYearPicker,p=a.showQuarterYearPicker;return me("react-datepicker__month",{"react-datepicker__month--selecting-range":l&&(c||f)},{"react-datepicker__monthPicker":h},{"react-datepicker__quarterPicker":p})}),r}return Mn(n,[{key:"render",value:function(){var r=this.props,i=r.showMonthYearPicker,o=r.showQuarterYearPicker,s=r.day,a=r.ariaLabelPrefix,l=a===void 0?"month ":a;return U.createElement("div",{className:this.getClassNames(),onMouseLeave:this.handleMouseLeave,"aria-label":"".concat(l," ").concat(sn(s,"yyyy-MM")),role:"listbox"},i?this.renderMonths():o?this.renderQuarters():this.renderWeeks())}}]),n}(),s8=function(e){Rn(n,U.Component);var t=Nn(n);function n(){var r;kn(this,n);for(var i=arguments.length,o=new Array(i),s=0;s0&&arguments[0]!==void 0?arguments[0]:{}).className||"").split(/\s+/);return uve.some(function(a){return s.indexOf(a)>=0})})(o.target)&&i.props.onDropdownFocus()}),re(le(i),"getDateInView",function(){var o=i.props,s=o.preSelection,a=o.selected,l=o.openToDate,c=i8(i.props),f=o8(i.props),h=hn(),p=l||a||s;return p||(c&&Gr(h,c)?c:f&&Us(h,f)?f:h)}),re(le(i),"increaseMonth",function(){i.setState(function(o){var s=o.date;return{date:to(s,1)}},function(){return i.handleMonthChange(i.state.date)})}),re(le(i),"decreaseMonth",function(){i.setState(function(o){var s=o.date;return{date:Td(s,1)}},function(){return i.handleMonthChange(i.state.date)})}),re(le(i),"handleDayClick",function(o,s,a){i.props.onSelect(o,s,a),i.props.setPreSelection&&i.props.setPreSelection(o)}),re(le(i),"handleDayMouseEnter",function(o){i.setState({selectingDate:o}),i.props.onDayMouseEnter&&i.props.onDayMouseEnter(o)}),re(le(i),"handleMonthMouseLeave",function(){i.setState({selectingDate:null}),i.props.onMonthMouseLeave&&i.props.onMonthMouseLeave()}),re(le(i),"handleYearChange",function(o){i.props.onYearChange&&i.props.onYearChange(o),i.props.adjustDateOnChange&&(i.props.onSelect&&i.props.onSelect(o),i.props.setOpen&&i.props.setOpen(!0)),i.props.setPreSelection&&i.props.setPreSelection(o)}),re(le(i),"handleMonthChange",function(o){i.props.onMonthChange&&i.props.onMonthChange(o),i.props.adjustDateOnChange&&(i.props.onSelect&&i.props.onSelect(o),i.props.setOpen&&i.props.setOpen(!0)),i.props.setPreSelection&&i.props.setPreSelection(o)}),re(le(i),"handleMonthYearChange",function(o){i.handleYearChange(o),i.handleMonthChange(o)}),re(le(i),"changeYear",function(o){i.setState(function(s){var a=s.date;return{date:Qv(a,o)}},function(){return i.handleYearChange(i.state.date)})}),re(le(i),"changeMonth",function(o){i.setState(function(s){var a=s.date;return{date:Wi(a,o)}},function(){return i.handleMonthChange(i.state.date)})}),re(le(i),"changeMonthYear",function(o){i.setState(function(s){var a=s.date;return{date:Qv(Wi(a,lr(o)),dt(o))}},function(){return i.handleMonthYearChange(i.state.date)})}),re(le(i),"header",function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:i.state.date,s=HE(o,i.props.locale,i.props.calendarStartDay),a=[];return i.props.showWeekNumbers&&a.push(U.createElement("div",{key:"W",className:"react-datepicker__day-name"},i.props.weekLabel||"#")),a.concat([0,1,2,3,4,5,6].map(function(l){var c=ml(s,l),f=i.formatWeekday(c,i.props.locale),h=i.props.weekDayClassName?i.props.weekDayClassName(c):void 0;return U.createElement("div",{key:l,className:me("react-datepicker__day-name",h)},f)}))}),re(le(i),"formatWeekday",function(o,s){return i.props.formatWeekDay?function(a,l,c){return l(sn(a,"EEEE",c))}(o,i.props.formatWeekDay,s):i.props.useWeekdaysShort?function(a,l){return sn(a,"EEE",l)}(o,s):function(a,l){return sn(a,"EEEEEE",l)}(o,s)}),re(le(i),"decreaseYear",function(){i.setState(function(o){var s=o.date;return{date:Od(s,i.props.showYearPicker?i.props.yearItemNumber:1)}},function(){return i.handleYearChange(i.state.date)})}),re(le(i),"renderPreviousButton",function(){if(!i.props.renderCustomHeader){var o;switch(!0){case i.props.showMonthYearPicker:o=XN(i.state.date,i.props);break;case i.props.showYearPicker:o=function(_){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},S=w.minDate,T=w.yearItemNumber,P=T===void 0?12:T,k=Nf(tf(Od(_,P)),P).endPeriod,N=S&&dt(S);return N&&N>k||!1}(i.state.date,i.props);break;default:o=ZN(i.state.date,i.props)}if((i.props.forceShowMonthNavigation||i.props.showDisabledMonthNavigation||!o)&&!i.props.showTimeSelectOnly){var s=["react-datepicker__navigation","react-datepicker__navigation--previous"],a=i.decreaseMonth;(i.props.showMonthYearPicker||i.props.showQuarterYearPicker||i.props.showYearPicker)&&(a=i.decreaseYear),o&&i.props.showDisabledMonthNavigation&&(s.push("react-datepicker__navigation--previous--disabled"),a=null);var l=i.props.showMonthYearPicker||i.props.showQuarterYearPicker||i.props.showYearPicker,c=i.props,f=c.previousMonthButtonLabel,h=c.previousYearButtonLabel,p=i.props,m=p.previousMonthAriaLabel,v=m===void 0?typeof f=="string"?f:"Previous Month":m,y=p.previousYearAriaLabel,x=y===void 0?typeof h=="string"?h:"Previous Year":y;return U.createElement("button",{type:"button",className:s.join(" "),onClick:a,onKeyDown:i.props.handleOnKeyDown,"aria-label":l?x:v},U.createElement("span",{className:["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"].join(" ")},l?i.props.previousYearButtonLabel:i.props.previousMonthButtonLabel))}}}),re(le(i),"increaseYear",function(){i.setState(function(o){var s=o.date;return{date:zc(s,i.props.showYearPicker?i.props.yearItemNumber:1)}},function(){return i.handleYearChange(i.state.date)})}),re(le(i),"renderNextButton",function(){if(!i.props.renderCustomHeader){var o;switch(!0){case i.props.showMonthYearPicker:o=QN(i.state.date,i.props);break;case i.props.showYearPicker:o=function(_){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},S=w.maxDate,T=w.yearItemNumber,P=T===void 0?12:T,k=Nf(zc(_,P),P).startPeriod,N=S&&dt(S);return N&&N0&&arguments[0]!==void 0?arguments[0]:i.state.date,s=["react-datepicker__current-month"];return i.props.showYearDropdown&&s.push("react-datepicker__current-month--hasYearDropdown"),i.props.showMonthDropdown&&s.push("react-datepicker__current-month--hasMonthDropdown"),i.props.showMonthYearDropdown&&s.push("react-datepicker__current-month--hasMonthYearDropdown"),U.createElement("div",{className:s.join(" ")},sn(o,i.props.dateFormat,i.props.locale))}),re(le(i),"renderYearDropdown",function(){var o=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(i.props.showYearDropdown&&!o)return U.createElement(Xge,{adjustDateOnChange:i.props.adjustDateOnChange,date:i.state.date,onSelect:i.props.onSelect,setOpen:i.props.setOpen,dropdownMode:i.props.dropdownMode,onChange:i.changeYear,minDate:i.props.minDate,maxDate:i.props.maxDate,year:dt(i.state.date),scrollableYearDropdown:i.props.scrollableYearDropdown,yearDropdownItemNumber:i.props.yearDropdownItemNumber})}),re(le(i),"renderMonthDropdown",function(){var o=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(i.props.showMonthDropdown&&!o)return U.createElement(Jge,{dropdownMode:i.props.dropdownMode,locale:i.props.locale,onChange:i.changeMonth,month:lr(i.state.date),useShortMonthInDropdown:i.props.useShortMonthInDropdown})}),re(le(i),"renderMonthYearDropdown",function(){var o=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(i.props.showMonthYearDropdown&&!o)return U.createElement(nve,{dropdownMode:i.props.dropdownMode,locale:i.props.locale,dateFormat:i.props.dateFormat,onChange:i.changeMonthYear,minDate:i.props.minDate,maxDate:i.props.maxDate,date:i.state.date,scrollableMonthYearDropdown:i.props.scrollableMonthYearDropdown})}),re(le(i),"renderTodayButton",function(){if(i.props.todayButton&&!i.props.showTimeSelectOnly)return U.createElement("div",{className:"react-datepicker__today-button",onClick:function(o){return i.props.onSelect(Lr(hn()),o)}},i.props.todayButton)}),re(le(i),"renderDefaultHeader",function(o){var s=o.monthDate,a=o.i;return U.createElement("div",{className:"react-datepicker__header ".concat(i.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},i.renderCurrentMonth(s),U.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(i.props.dropdownMode),onFocus:i.handleDropdownFocus},i.renderMonthDropdown(a!==0),i.renderMonthYearDropdown(a!==0),i.renderYearDropdown(a!==0)),U.createElement("div",{className:"react-datepicker__day-names"},i.header(s)))}),re(le(i),"renderCustomHeader",function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=o.monthDate,a=o.i;if(i.props.showTimeSelect&&!i.state.monthContainer||i.props.showTimeSelectOnly)return null;var l=ZN(i.state.date,i.props),c=KN(i.state.date,i.props),f=XN(i.state.date,i.props),h=QN(i.state.date,i.props),p=!i.props.showMonthYearPicker&&!i.props.showQuarterYearPicker&&!i.props.showYearPicker;return U.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:i.props.onDropdownFocus},i.props.renderCustomHeader(zN(zN({},i.state),{},{customHeaderCount:a,monthDate:s,changeMonth:i.changeMonth,changeYear:i.changeYear,decreaseMonth:i.decreaseMonth,increaseMonth:i.increaseMonth,decreaseYear:i.decreaseYear,increaseYear:i.increaseYear,prevMonthButtonDisabled:l,nextMonthButtonDisabled:c,prevYearButtonDisabled:f,nextYearButtonDisabled:h})),p&&U.createElement("div",{className:"react-datepicker__day-names"},i.header(s)))}),re(le(i),"renderYearHeader",function(){var o=i.state.date,s=i.props,a=s.showYearPicker,l=Nf(o,s.yearItemNumber),c=l.startPeriod,f=l.endPeriod;return U.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},a?"".concat(c," - ").concat(f):dt(o))}),re(le(i),"renderHeader",function(o){switch(!0){case i.props.renderCustomHeader!==void 0:return i.renderCustomHeader(o);case(i.props.showMonthYearPicker||i.props.showQuarterYearPicker||i.props.showYearPicker):return i.renderYearHeader(o);default:return i.renderDefaultHeader(o)}}),re(le(i),"renderMonths",function(){if(!i.props.showTimeSelectOnly&&!i.props.showYearPicker){for(var o=[],s=i.props.showPreviousMonths?i.props.monthsShown-1:0,a=Td(i.state.date,s),l=0;l0;o.push(U.createElement("div",{key:h,ref:function(v){i.monthContainer=v},className:"react-datepicker__month-container"},i.renderHeader({monthDate:f,i:l}),U.createElement(sve,{chooseDayAriaLabelPrefix:i.props.chooseDayAriaLabelPrefix,disabledDayAriaLabelPrefix:i.props.disabledDayAriaLabelPrefix,weekAriaLabelPrefix:i.props.weekAriaLabelPrefix,ariaLabelPrefix:i.props.monthAriaLabelPrefix,onChange:i.changeMonthYear,day:f,dayClassName:i.props.dayClassName,calendarStartDay:i.props.calendarStartDay,monthClassName:i.props.monthClassName,onDayClick:i.handleDayClick,handleOnKeyDown:i.props.handleOnDayKeyDown,onDayMouseEnter:i.handleDayMouseEnter,onMouseLeave:i.handleMonthMouseLeave,onWeekSelect:i.props.onWeekSelect,orderInDisplay:l,formatWeekNumber:i.props.formatWeekNumber,locale:i.props.locale,minDate:i.props.minDate,maxDate:i.props.maxDate,excludeDates:i.props.excludeDates,excludeDateIntervals:i.props.excludeDateIntervals,highlightDates:i.props.highlightDates,selectingDate:i.state.selectingDate,includeDates:i.props.includeDates,includeDateIntervals:i.props.includeDateIntervals,inline:i.props.inline,shouldFocusDayInline:i.props.shouldFocusDayInline,fixedHeight:i.props.fixedHeight,filterDate:i.props.filterDate,preSelection:i.props.preSelection,setPreSelection:i.props.setPreSelection,selected:i.props.selected,selectsStart:i.props.selectsStart,selectsEnd:i.props.selectsEnd,selectsRange:i.props.selectsRange,selectsDisabledDaysInRange:i.props.selectsDisabledDaysInRange,showWeekNumbers:i.props.showWeekNumbers,startDate:i.props.startDate,endDate:i.props.endDate,peekNextMonth:i.props.peekNextMonth,setOpen:i.props.setOpen,shouldCloseOnSelect:i.props.shouldCloseOnSelect,renderDayContents:i.props.renderDayContents,disabledKeyboardNavigation:i.props.disabledKeyboardNavigation,showMonthYearPicker:i.props.showMonthYearPicker,showFullMonthYearPicker:i.props.showFullMonthYearPicker,showTwoColumnMonthYearPicker:i.props.showTwoColumnMonthYearPicker,showFourColumnMonthYearPicker:i.props.showFourColumnMonthYearPicker,showYearPicker:i.props.showYearPicker,showQuarterYearPicker:i.props.showQuarterYearPicker,isInputFocused:i.props.isInputFocused,containerRef:i.containerRef,monthShowsDuplicateDaysEnd:p,monthShowsDuplicateDaysStart:m})))}return o}}),re(le(i),"renderYears",function(){if(!i.props.showTimeSelectOnly)return i.props.showYearPicker?U.createElement("div",{className:"react-datepicker__year--container"},i.renderHeader(),U.createElement(ave,O_({onDayClick:i.handleDayClick,date:i.state.date},i.props))):void 0}),re(le(i),"renderTimeSection",function(){if(i.props.showTimeSelect&&(i.state.monthContainer||i.props.showTimeSelectOnly))return U.createElement(s8,{selected:i.props.selected,openToDate:i.props.openToDate,onChange:i.props.onTimeChange,timeClassName:i.props.timeClassName,format:i.props.timeFormat,includeTimes:i.props.includeTimes,intervals:i.props.timeIntervals,minTime:i.props.minTime,maxTime:i.props.maxTime,excludeTimes:i.props.excludeTimes,filterTime:i.props.filterTime,timeCaption:i.props.timeCaption,todayButton:i.props.todayButton,showMonthDropdown:i.props.showMonthDropdown,showMonthYearDropdown:i.props.showMonthYearDropdown,showYearDropdown:i.props.showYearDropdown,withPortal:i.props.withPortal,monthRef:i.state.monthContainer,injectTimes:i.props.injectTimes,locale:i.props.locale,handleOnKeyDown:i.props.handleOnKeyDown,showTimeSelectOnly:i.props.showTimeSelectOnly})}),re(le(i),"renderInputTimeSection",function(){var o=new Date(i.props.selected),s=ns(o)&&i.props.selected?"".concat(eL(o.getHours()),":").concat(eL(o.getMinutes())):"";if(i.props.showTimeInput)return U.createElement(lve,{date:o,timeString:s,timeInputLabel:i.props.timeInputLabel,onChange:i.props.onTimeChange,customTimeInput:i.props.customTimeInput})}),i.containerRef=U.createRef(),i.state={date:i.getDateInView(),selectingDate:null,monthContainer:null},i}return Mn(n,[{key:"componentDidMount",value:function(){var r=this;this.props.showTimeSelect&&(this.assignMonthContainer=void r.setState({monthContainer:r.monthContainer}))}},{key:"componentDidUpdate",value:function(r){this.props.preSelection&&!pr(this.props.preSelection,r.preSelection)?this.setState({date:this.props.preSelection}):this.props.openToDate&&!pr(this.props.openToDate,r.openToDate)&&this.setState({date:this.props.openToDate})}},{key:"render",value:function(){var r=this.props.container||cve;return U.createElement("div",{ref:this.containerRef},U.createElement(r,{className:me("react-datepicker",this.props.className,{"react-datepicker--time-only":this.props.showTimeSelectOnly}),showPopperArrow:this.props.showPopperArrow,arrowProps:this.props.arrowProps},this.renderPreviousButton(),this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.props.children))}}],[{key:"defaultProps",get:function(){return{onDropdownFocus:function(){},monthsShown:1,monthSelectedIn:0,forceShowMonthNavigation:!1,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",customTimeInput:null,yearItemNumber:12}}}]),n}(),a8=function(e){Rn(n,U.Component);var t=Nn(n);function n(r){var i;return kn(this,n),(i=t.call(this,r)).el=document.createElement("div"),i}return Mn(n,[{key:"componentDidMount",value:function(){this.portalRoot=(this.props.portalHost||document).getElementById(this.props.portalId),this.portalRoot||(this.portalRoot=document.createElement("div"),this.portalRoot.setAttribute("id",this.props.portalId),(this.props.portalHost||document.body).appendChild(this.portalRoot)),this.portalRoot.appendChild(this.el)}},{key:"componentWillUnmount",value:function(){this.portalRoot.removeChild(this.el)}},{key:"render",value:function(){return $a.createPortal(this.props.children,this.el)}}]),n}(),dve=function(e){return!e.disabled&&e.tabIndex!==-1},hve=function(e){Rn(n,U.Component);var t=Nn(n);function n(r){var i;return kn(this,n),re(le(i=t.call(this,r)),"getTabChildren",function(){return Array.prototype.slice.call(i.tabLoopRef.current.querySelectorAll("[tabindex], a, button, input, select, textarea"),1,-1).filter(dve)}),re(le(i),"handleFocusStart",function(o){var s=i.getTabChildren();s&&s.length>1&&s[s.length-1].focus()}),re(le(i),"handleFocusEnd",function(o){var s=i.getTabChildren();s&&s.length>1&&s[0].focus()}),i.tabLoopRef=U.createRef(),i}return Mn(n,[{key:"render",value:function(){return this.props.enableTabLoop?U.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},U.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:"0",onFocus:this.handleFocusStart}),this.props.children,U.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:"0",onFocus:this.handleFocusEnd})):this.props.children}}],[{key:"defaultProps",get:function(){return{enableTabLoop:!0}}}]),n}(),pve=function(e){Rn(n,U.Component);var t=Nn(n);function n(){return kn(this,n),t.apply(this,arguments)}return Mn(n,[{key:"render",value:function(){var r,i=this.props,o=i.className,s=i.wrapperClassName,a=i.hidePopper,l=i.popperComponent,c=i.popperModifiers,f=i.popperPlacement,h=i.popperProps,p=i.targetComponent,m=i.enableTabLoop,v=i.popperOnKeyDown,y=i.portalId,x=i.portalHost;if(!a){var _=me("react-datepicker-popper",o);r=U.createElement(Nge,O_({modifiers:c,placement:f},h),function(S){var T=S.ref,P=S.style,k=S.placement,N=S.arrowProps;return U.createElement(hve,{enableTabLoop:m},U.createElement("div",{ref:T,style:P,className:_,"data-placement":k,onKeyDown:v},U.cloneElement(l,{arrowProps:N})))})}this.props.popperContainer&&(r=U.createElement(this.props.popperContainer,{},r)),y&&!a&&(r=U.createElement(a8,{portalId:y,portalHost:x},r));var w=me("react-datepicker-wrapper",s);return U.createElement(Tge,{className:"react-datepicker-manager"},U.createElement(Lge,null,function(S){var T=S.ref;return U.createElement("div",{ref:T,className:w},p)}),r)}}],[{key:"defaultProps",get:function(){return{hidePopper:!0,popperModifiers:[],popperProps:{},popperPlacement:"bottom-start"}}}]),n}(),mve=T_(fve),gve=function(e){Rn(n,U.Component);var t=Nn(n);function n(r){var i;return kn(this,n),re(le(i=t.call(this,r)),"getPreSelection",function(){return i.props.openToDate?i.props.openToDate:i.props.selectsEnd&&i.props.startDate?i.props.startDate:i.props.selectsStart&&i.props.endDate?i.props.endDate:hn()}),re(le(i),"calcInitialState",function(){var o,s=i.getPreSelection(),a=i8(i.props),l=o8(i.props),c=a&&Gr(s,Lr(a))?a:l&&Us(s,ol(l))?l:s;return{open:i.props.startOpen||!1,preventFocus:!1,preSelection:(o=i.props.selectsRange?i.props.startDate:i.props.selected)!==null&&o!==void 0?o:c,highlightDates:JN(i.props.highlightDates),focused:!1,shouldFocusDayInline:!1}}),re(le(i),"clearPreventFocusTimeout",function(){i.preventFocusTimeout&&clearTimeout(i.preventFocusTimeout)}),re(le(i),"setFocus",function(){i.input&&i.input.focus&&i.input.focus({preventScroll:!0})}),re(le(i),"setBlur",function(){i.input&&i.input.blur&&i.input.blur(),i.cancelFocusInput()}),re(le(i),"setOpen",function(o){var s=arguments.length>1&&arguments[1]!==void 0&&arguments[1];i.setState({open:o,preSelection:o&&i.state.open?i.state.preSelection:i.calcInitialState().preSelection,lastPreSelectChange:$1},function(){o||i.setState(function(a){return{focused:!!s&&a.focused}},function(){!s&&i.setBlur(),i.setState({inputValue:null})})})}),re(le(i),"inputOk",function(){return TE(i.state.preSelection)}),re(le(i),"isCalendarOpen",function(){return i.props.open===void 0?i.state.open&&!i.props.disabled&&!i.props.readOnly:i.props.open}),re(le(i),"handleFocus",function(o){i.state.preventFocus||(i.props.onFocus(o),i.props.preventOpenOnFocus||i.props.readOnly||i.setOpen(!0)),i.setState({focused:!0})}),re(le(i),"cancelFocusInput",function(){clearTimeout(i.inputFocusTimeout),i.inputFocusTimeout=null}),re(le(i),"deferFocusInput",function(){i.cancelFocusInput(),i.inputFocusTimeout=setTimeout(function(){return i.setFocus()},1)}),re(le(i),"handleDropdownFocus",function(){i.cancelFocusInput()}),re(le(i),"handleBlur",function(o){(!i.state.open||i.props.withPortal||i.props.showTimeInput)&&i.props.onBlur(o),i.setState({focused:!1})}),re(le(i),"handleCalendarClickOutside",function(o){i.props.inline||i.setOpen(!1),i.props.onClickOutside(o),i.props.withPortal&&o.preventDefault()}),re(le(i),"handleChange",function(){for(var o=arguments.length,s=new Array(o),a=0;a{const{className:t,isClearable:n,selected:r,dateFormat:i}=e,o=!n||Fo(r),s=V.useRef();return g.jsxs("div",{className:"icon-input-container",children:[g.jsx(gve,{...e,popperModifiers:[{name:"arrow",options:{padding:24}}],dateFormat:i??Mf,className:me("icon-input-container__input form-control",t),ref:s}),o&&g.jsx(je,{icon:Epe,className:"icon-input-container__icon",onClick:()=>{var a;return(a=s.current)==null?void 0:a.input.focus()}})]})},yve=e=>g.jsx(g2,{...e,dateFormat:IE,showTimeSelect:!0,timeIntervals:10});const _ve=({icon:e,className:t,...n})=>{const r=pl(),i=me("icon-input-container__input",t);return g.jsxs("div",{className:"icon-input-container",children:[g.jsx($c,{className:i,innerRef:r,...n}),g.jsx(je,{icon:e,fixedWidth:!0,className:"icon-input-container__icon",onClick:()=>{var o;return(o=r.current)==null?void 0:o.focus()}})]})},B1=({children:e,infoTooltip:t,checked:n,onChange:r})=>g.jsxs("p",{children:[g.jsx(q5,{inline:!0,checked:n,className:t?"me-2":"",onChange:r,children:e}),t&&g.jsx(ng,{placement:"right",children:t})]});const bve=({isOpen:e,toggle:t})=>g.jsxs(Uo,{isOpen:e,toggle:t,centered:!0,size:"lg",children:[g.jsx(ro,{toggle:t,children:"Info"}),g.jsxs(ki,{children:[g.jsxs("p",{children:["When the ",g.jsx("b",{children:g.jsx("i",{children:'"Use existing URL if found"'})})," checkbox is checked, the server will return an existing short URL if it matches provided params."]}),g.jsx("p",{children:"These are the checks performed by Shlink in order to determine if an existing short URL should be returned:"}),g.jsxs("ul",{children:[g.jsx("li",{children:"When only the long URL is provided: The most recent match will be returned, or a new short URL will be created if none is found."}),g.jsxs("li",{children:["When long URL and custom slug and/or domain are provided: Same as in previous case, but it will try to match the short URL using both the long URL and the slug, the long URL and the domain, or the three of them.",g.jsx("br",{}),"If the slug is being used by another long URL, an error will be returned."]}),g.jsx("li",{children:"When other params are provided: Same as in previous cases, but it will try to match existing short URLs with all provided data. If any of them does not match, a new short URL will be created"})]})]})]}),wve=()=>{const[e,t]=It();return g.jsxs(g.Fragment,{children:[g.jsx("span",{title:"What does this mean?",children:g.jsx(je,{icon:gC,style:{cursor:"pointer"},onClick:t})}),g.jsx(bve,{isOpen:e,toggle:t})]})};const xve=Dt(PZ,yZ(/ /g,"-")),z1=e=>typeof e=="string"?Do(e):e,Sve=(e,t)=>({mode:n,saving:r,onSave:i,initialState:o,selectedServer:s})=>{const[a,l]=V.useState(o),c=()=>l(o),f=Pi("deviceLongUrls",s),h=n==="edit",p=n==="create-basic",m=P=>l({...a,tags:P.map(xve)}),v=(P,k)=>gi(P)?P:gi(k)?null:void 0,y=rh(async()=>i({...a,validSince:Hs(a.validSince)??null,validUntil:Hs(a.validUntil)??null,maxVisits:gi(a.maxVisits)?Number(a.maxVisits):null}).then(()=>!h&&c()).catch(()=>{}));V.useEffect(()=>{l(o)},[o]);const x=(P,k,N="text",D={},z={})=>g.jsx(vr,{...z,children:g.jsx($c,{id:P,type:N,placeholder:k,value:a[P]??"",onChange:D.onChange??(A=>l({...a,[P]:A.target.value})),...D})}),_=(P,k,N)=>{var D;return g.jsx(_ve,{icon:N,id:P,type:"url",placeholder:k,value:((D=a.deviceLongUrls)==null?void 0:D[P])??"",onChange:z=>{var A;return l({...a,deviceLongUrls:{...a.deviceLongUrls??{},[P]:v(z.target.value,(A=o.deviceLongUrls)==null?void 0:A[P])}})}})},w=(P,k,N={})=>g.jsx(yve,{selected:a[P]?z1(a[P]):null,placeholderText:k,isClearable:!0,onChange:D=>l({...a,[P]:D}),...N}),S=g.jsxs(g.Fragment,{children:[g.jsx(vr,{children:g.jsx($c,{bsSize:"lg",type:"url",placeholder:"URL to be shortened",required:!0,value:a.longUrl,onChange:P=>l({...a,longUrl:P.target.value})})}),g.jsxs(Qn,{children:[p&&x("customSlug","Custom slug","text",{bsSize:"lg"},{className:"col-lg-6"}),g.jsx("div",{className:p?"col-lg-6 mb-3":"col-12",children:g.jsx(e,{selectedTags:a.tags??[],onChange:m})})]})]}),T=Pi("forwardQuery",s);return g.jsxs("form",{name:"shortUrlForm",className:"short-url-form",onSubmit:y,children:[p&&S,!p&&g.jsxs(g.Fragment,{children:[g.jsxs(Qn,{children:[g.jsx("div",{className:me("mb-3",{"col-sm-6":f,"col-12":!f}),children:g.jsx(un,{title:"Main options",className:"mb-3",children:S})}),f&&g.jsx("div",{className:"col-sm-6 mb-3",children:g.jsxs(un,{title:"Device-specific long URLs",children:[g.jsx(vr,{children:_("android","Android-specific redirection",mge)}),g.jsx(vr,{children:_("ios","iOS-specific redirection",pge)}),_("desktop","Desktop-specific redirection",AQ)]})})]}),g.jsxs(Qn,{children:[g.jsx("div",{className:"col-sm-6 mb-3",children:g.jsxs(un,{title:"Customize the short URL",children:[x("title","Title","text",{onChange:({target:P})=>l({...a,title:v(P.value,o.title)})}),!h&&g.jsxs(g.Fragment,{children:[g.jsxs(Qn,{children:[g.jsx("div",{className:"col-lg-6",children:x("customSlug","Custom slug","text",{disabled:gi(a.shortCodeLength)})}),g.jsx("div",{className:"col-lg-6",children:x("shortCodeLength","Short code length","number",{min:4,disabled:gi(a.customSlug)})})]}),g.jsx(t,{value:a.domain,onChange:P=>l({...a,domain:P})})]})]})}),g.jsx("div",{className:"col-sm-6 mb-3",children:g.jsxs(un,{title:"Limit access to the short URL",children:[x("maxVisits","Maximum number of visits allowed","number",{min:1}),g.jsx("div",{className:"mb-3",children:w("validSince","Enabled since...",{maxDate:a.validUntil?z1(a.validUntil):void 0})}),w("validUntil","Enabled until...",{minDate:a.validSince?z1(a.validSince):void 0})]})})]}),g.jsxs(Qn,{children:[g.jsx("div",{className:"col-sm-6 mb-3",children:g.jsxs(un,{title:"Extra checks",children:[g.jsx(B1,{infoTooltip:"If checked, Shlink will try to reach the long URL, failing in case it's not publicly accessible.",checked:a.validateUrl,onChange:P=>l({...a,validateUrl:P}),children:"Validate URL"}),!h&&g.jsxs("p",{children:[g.jsx(q5,{inline:!0,className:"me-2",checked:a.findIfExists,onChange:P=>l({...a,findIfExists:P}),children:"Use existing URL if found"}),g.jsx(wve,{})]})]})}),g.jsx("div",{className:"col-sm-6 mb-3",children:g.jsxs(un,{title:"Configure behavior",children:[g.jsx(B1,{infoTooltip:"This short URL will be included in the robots.txt for your Shlink instance, allowing web crawlers (like Google) to index it.",checked:a.crawlable,onChange:P=>l({...a,crawlable:P}),children:"Make it crawlable"}),T&&g.jsx(B1,{infoTooltip:"When this short URL is visited, any query params appended to it will be forwarded to the long URL.",checked:a.forwardQuery,onChange:P=>l({...a,forwardQuery:P}),children:"Forward query params on redirect"})]})})]})]}),g.jsx("div",{className:"text-center",children:g.jsx(ht,{outline:!0,color:"primary",disabled:r||Wn(a.longUrl),className:"btn-xs-block",children:r?"Saving...":"Save"})})]})},Cve=({startDate:e=null,endDate:t=null,disabled:n=!1,onStartDateChange:r,onEndDateChange:i})=>g.jsxs("div",{className:"row",children:[g.jsx("div",{className:"col-md-6",children:g.jsx(g2,{selected:e,placeholderText:"Since...",isClearable:!0,maxDate:t??void 0,disabled:n,onChange:r})}),g.jsx("div",{className:"col-md-6",children:g.jsx(g2,{className:"mt-2 mt-md-0",selected:t,placeholderText:"Until...",isClearable:!0,minDate:e??void 0,disabled:n,onChange:o=>i(o&&ol(o))})})]}),l8=({onDatesChange:e,initialDateRange:t,defaultText:n,disabled:r,updatable:i=!1})=>{const o=ey(t),[s,a]=V.useState(o?t:void 0),[l,c]=V.useState(o?void 0:t),f=p=>{a(w5(p)?sh:void 0),c(p),e(p)},h=p=>{a(p),c(void 0),e(S5(p))};return i&&xoe(()=>{const p=ey(t);p&&h(t),t&&!p&&f(t)},[t]),g.jsxs(na,{disabled:r,text:$E(s??l)??n,children:[g.jsx(I5,{allText:n,active:s,onChange:h}),g.jsx(Ue,{divider:!0}),g.jsx(Ue,{header:!0,children:"Custom:"}),g.jsx(Ue,{text:!0,children:g.jsx(Cve,{...l,onStartDateChange:p=>f({...l,startDate:p}),onEndDateChange:p=>f({...l,endDate:p})})})]})},Eve=({onChange:e,selected:t={},className:n,supportsDisabledFiltering:r})=>{const{excludeBots:i=!1,excludeMaxVisitsReached:o=!1,excludePastValidUntil:s=!1}=t,a=l=>()=>e({...t,[l]:!(t!=null&&t[l])});return g.jsxs(na,{text:"Filters",dropdownClassName:n,className:"me-3",right:!0,minWidth:250,children:[g.jsx(Ue,{header:!0,children:"Visits:"}),g.jsx(Ue,{active:i,onClick:a("excludeBots"),children:"Ignore visits from bots"}),r&&g.jsxs(g.Fragment,{children:[g.jsx(Ue,{divider:!0}),g.jsx(Ue,{header:!0,children:"Short URLs:"}),g.jsx(Ue,{active:o,onClick:a("excludeMaxVisitsReached"),children:"Exclude with visits reached"}),g.jsx(Ue,{active:s,onClick:a("excludePastValidUntil"),children:"Exclude enabled in the past"})]}),g.jsx(Ue,{divider:!0}),g.jsx(Ue,{disabled:!gi(t),onClick:()=>e({excludeBots:!1,excludeMaxVisitsReached:!1,excludePastValidUntil:!1}),children:g.jsx("i",{children:"Clear filters"})})]})};const Tve=(e,t)=>({selectedServer:n,className:r,shortUrlsAmount:i,order:o,handleOrderBy:s,settings:a})=>{var D;const[l,c]=E_(),{search:f,tags:h,startDate:p,endDate:m,excludeBots:v,excludeMaxVisitsReached:y,excludePastValidUntil:x,tagsMode:_="any"}=l,w=Pi("filterDisabledUrls",n),S=Dt(({startDate:z,endDate:A})=>({startDate:Hs(z)??void 0,endDate:Hs(A)??void 0}),c),T=Dt(z=>Wn(z)?void 0:z,z=>c({search:z})),P=z=>c({tags:z}),k=Pi("allTagsFiltering",n),N=Dt(()=>_==="any"?"all":"any",z=>c({tagsMode:z}));return g.jsxs("div",{className:me("short-urls-filtering-bar-container",r),children:[g.jsx(ih,{initialValue:f,onChange:T}),g.jsxs(Qd,{className:"mt-3",children:[g.jsx(t,{allowNew:!1,placeholder:"With tags...",selectedTags:h,onChange:P}),k&&h.length>1&&g.jsxs(g.Fragment,{children:[g.jsx(ht,{outline:!0,color:"secondary",onClick:N,id:"tagsModeBtn","aria-label":"Change tags mode",children:g.jsx(je,{className:"short-urls-filtering-bar__tags-icon",icon:_==="all"?Zj:cQ})}),g.jsx(Er,{target:"tagsModeBtn",placement:"left",children:_==="all"?"With all the tags.":"With any of the tags."})]})]}),g.jsxs(Qn,{className:"flex-lg-row-reverse",children:[g.jsx("div",{className:"col-lg-8 col-xl-6 mt-3",children:g.jsxs("div",{className:"d-md-flex",children:[g.jsx("div",{className:"flex-fill",children:g.jsx(l8,{defaultText:"All short URLs",initialDateRange:x5(p,m),onDatesChange:S})}),g.jsx(Eve,{className:"ms-0 ms-md-2 mt-3 mt-md-0",selected:{excludeBots:v??((D=a.visits)==null?void 0:D.excludeBots),excludeMaxVisitsReached:y,excludePastValidUntil:x},onChange:c,supportsDisabledFiltering:w})]})}),g.jsx("div",{className:"col-6 col-lg-4 col-xl-6 mt-3",children:g.jsx(e,{amount:i})}),g.jsx("div",{className:"col-6 d-lg-none mt-3",children:g.jsx(fh,{prefixed:!1,items:A5,order:o,onChange:s})})]})]})};function Lf({currentOrder:e,field:t,className:n="ms-1"}){return!e.dir||e.field!==t?null:g.jsx(je,{icon:e.dir==="ASC"?tQ:hQ,className:n})}const Il=2,v2="...",c8=(e,t)=>{const n=rC(pj(Il,e-Il),Tj(t-1,e+Il)+1);return e-Il>Il&&n.unshift(v2),e+Ile===v2,u8=e=>Pd(e)?e:_n(e),f8=(e,t)=>Pd(e)?`${e}_${t}`:`${e}`,Ove=({paginator:e,serverId:t,currentQueryString:n=""})=>{const{currentPage:r=0,pagesCount:i=0}=e??{},o=a=>`/server/${t}/list-short-urls/${a}${n}`;if(i<=1)return g.jsx("div",{className:"pb-3"});const s=()=>c8(r,i).map((a,l)=>g.jsx(ks,{disabled:Pd(a),active:r===a,children:g.jsx(Ms,{tag:Lt,to:o(a),children:u8(a)})},f8(a,l)));return g.jsxs(__,{className:"sticky-card-paginator py-3",listClassName:"flex-wrap justify-content-center mb-0",children:[g.jsx(ks,{disabled:r===1,children:g.jsx(Ms,{previous:!0,tag:Lt,to:o(r-1)})}),s(),g.jsx(ks,{disabled:r>=i,children:g.jsx(Ms,{next:!0,tag:Lt,to:o(r+1)})})]})},Pve=(e,t)=>ra(({listShortUrls:n,shortUrlsList:r,selectedServer:i,settings:o})=>{var Z,ee,ie;const s=Vd(i),{page:a}=Ks(),l=Pn(),[c,f]=E_(),{tags:h,search:p,startDate:m,endDate:v,orderBy:y,tagsMode:x,excludeBots:_,excludePastValidUntil:w,excludeMaxVisitsReached:S}=c,[T,P]=V.useState(y??((Z=o.shortUrlsList)==null?void 0:Z.defaultOrdering)??zE),{pagination:k}=(r==null?void 0:r.shortUrls)??{},N=_??((ee=o.visits)==null?void 0:ee.excludeBots),D=Pi("excludeBotsOnShortUrls",i),z=(oe,G)=>{f({orderBy:{field:oe,dir:G}}),P({field:oe,dir:G})},A=oe=>()=>z(oe,n_(oe,T.field,T.dir)),W=oe=>g.jsx(Lf,{currentOrder:T,field:oe}),Y=Dt(oe=>[...new Set([...h,oe])],oe=>f({tags:oe})),J=({field:oe,dir:G})=>D&&N&&oe==="visits"?{field:"nonBotVisits",dir:G}:{field:oe,dir:G};return V.useEffect(()=>{n({page:a,searchTerm:p,tags:h,startDate:m,endDate:v,orderBy:J(T),tagsMode:x,excludePastValidUntil:w,excludeMaxVisitsReached:S})},[a,p,h,m,v,T.field,T.dir,x,w,S]),g.jsxs(g.Fragment,{children:[g.jsx(t,{selectedServer:i,shortUrlsAmount:(ie=r.shortUrls)==null?void 0:ie.pagination.totalItems,order:T,handleOrderBy:z,settings:o,className:"mb-3"}),g.jsxs(Sr,{body:!0,className:"pb-0",children:[g.jsx(e,{selectedServer:i,shortUrlsList:r,orderByColumn:A,renderOrderIcon:W,onTagClick:Y}),g.jsx(Ove,{paginator:k,serverId:s,currentQueryString:l.search})]})]})},()=>[Xr.visits]);const kve=e=>({orderByColumn:t,renderOrderIcon:n,shortUrlsList:r,onTagClick:i,selectedServer:o,className:s})=>{const{error:a,loading:l,shortUrls:c}=r,f=me({"short-urls-table__header-cell--with-action":!!t}),h=me("short-urls-table__header-cell",f),p=me("table table-hover responsive-table short-urls-table",s),m=()=>a?g.jsx("tr",{children:g.jsx("td",{colSpan:6,className:"text-center table-danger text-dark",children:"Something went wrong while loading short URLs :("})}):l?g.jsx("tr",{children:g.jsx("td",{colSpan:6,className:"text-center",children:"Loading..."})}):!l&&Wn(c==null?void 0:c.data)?g.jsx("tr",{children:g.jsx("td",{colSpan:6,className:"text-center",children:"No results found"})}):c==null?void 0:c.data.map(v=>g.jsx(e,{shortUrl:v,selectedServer:o,onTagClick:i},v.shortUrl));return g.jsxs("table",{className:p,children:[g.jsx("thead",{className:"responsive-table__header short-urls-table__header",children:g.jsxs("tr",{children:[g.jsxs("th",{className:h,onClick:t==null?void 0:t("dateCreated"),children:["Created at ",n==null?void 0:n("dateCreated")]}),g.jsxs("th",{className:h,onClick:t==null?void 0:t("shortCode"),children:["Short URL ",n==null?void 0:n("shortCode")]}),g.jsxs("th",{className:"short-urls-table__header-cell",children:[g.jsxs("span",{className:f,onClick:t==null?void 0:t("title"),children:["Title ",n==null?void 0:n("title")]}),"  /  ",g.jsxs("span",{className:f,onClick:t==null?void 0:t("longUrl"),children:[g.jsx("span",{className:"indivisible",children:"Long URL"})," ",n==null?void 0:n("longUrl")]})]}),g.jsx("th",{className:"short-urls-table__header-cell",children:"Tags"}),g.jsx("th",{className:h,onClick:t==null?void 0:t("visits"),children:g.jsxs("span",{className:"indivisible",children:["Visits ",n==null?void 0:n("visits")]})}),g.jsx("th",{className:"short-urls-table__header-cell",colSpan:2})]})}),g.jsx("tbody",{children:m()})]})},Mve=(e,t)=>{e.serviceFactory("ShortUrlsList",Pve,"ShortUrlsTable","ShortUrlsFilteringBar"),e.decorator("ShortUrlsList",t(["selectedServer","mercureInfo","shortUrlsList","settings"],["listShortUrls","createNewVisits","loadMercureInfo"])),e.serviceFactory("ShortUrlsTable",kve,"ShortUrlsRow"),e.serviceFactory("ShortUrlsRow",sge,"ShortUrlsRowMenu","ColorGenerator","useTimeoutToggle"),e.decorator("ShortUrlsRow",t(["settings"])),e.serviceFactory("ShortUrlsRowMenu",age,"DeleteShortUrlModal","QrCodeModal"),e.serviceFactory("CreateShortUrlResult",Zme,"useTimeoutToggle"),e.serviceFactory("ShortUrlForm",Sve,"TagsSelector","DomainSelector"),e.serviceFactory("CreateShortUrl",Mme,"ShortUrlForm","CreateShortUrlResult"),e.decorator("CreateShortUrl",t(["shortUrlCreation","selectedServer","settings"],["createShortUrl","resetCreateShortUrl"])),e.serviceFactory("EditShortUrl",Rme,"ShortUrlForm"),e.decorator("EditShortUrl",t(["shortUrlDetail","shortUrlEdition","selectedServer","settings"],["getShortUrlDetail","editShortUrl"])),e.serviceFactory("DeleteShortUrlModal",()=>Kme),e.decorator("DeleteShortUrlModal",t(["shortUrlDeletion"],["deleteShortUrl","shortUrlDeleted","resetDeleteShortUrl"])),e.serviceFactory("QrCodeModal",tge,"ImageDownloader"),e.decorator("QrCodeModal",t(["selectedServer"])),e.serviceFactory("ShortUrlsFilteringBar",Tve,"ExportShortUrlsBtn","TagsSelector"),e.serviceFactory("ExportShortUrlsBtn",Xme,"buildShlinkApiClient","ReportExporter"),e.decorator("ExportShortUrlsBtn",t(["selectedServer"])),e.serviceFactory("shortUrlsListReducerCreator",jpe,"listShortUrls","editShortUrl","createShortUrl"),e.serviceFactory("shortUrlsListReducer",at("reducer"),"shortUrlsListReducerCreator"),e.serviceFactory("shortUrlCreationReducerCreator",cge,"createShortUrl"),e.serviceFactory("shortUrlCreationReducer",at("reducer"),"shortUrlCreationReducerCreator"),e.serviceFactory("shortUrlEditionReducerCreator",hge,"editShortUrl"),e.serviceFactory("shortUrlEditionReducer",at("reducer"),"shortUrlEditionReducerCreator"),e.serviceFactory("shortUrlDeletionReducerCreator",Lpe,"deleteShortUrl"),e.serviceFactory("shortUrlDeletionReducer",at("reducer"),"shortUrlDeletionReducerCreator"),e.serviceFactory("shortUrlDetailReducerCreator",uge,"buildShlinkApiClient"),e.serviceFactory("shortUrlDetailReducer",at("reducer"),"shortUrlDetailReducerCreator"),e.serviceFactory("listShortUrls",Ape,"buildShlinkApiClient"),e.serviceFactory("createShortUrl",lge,"buildShlinkApiClient"),e.serviceFactory("resetCreateShortUrl",at("resetCreateShortUrl"),"shortUrlCreationReducerCreator"),e.serviceFactory("deleteShortUrl",Npe,"buildShlinkApiClient"),e.serviceFactory("resetDeleteShortUrl",at("resetDeleteShortUrl"),"shortUrlDeletionReducerCreator"),e.serviceFactory("shortUrlDeleted",()=>k5),e.serviceFactory("getShortUrlDetail",at("getShortUrlDetail"),"shortUrlDetailReducerCreator"),e.serviceFactory("editShortUrl",dge,"buildShlinkApiClient")},Rve=({tag:e,toggle:t,isOpen:n,deleteTag:r,tagDelete:i,tagDeleted:o})=>{const{deleting:s,error:a,deleted:l,errorData:c}=i,f=async()=>{await r(e),t()};return g.jsxs(Uo,{toggle:t,isOpen:n,centered:!0,onClosed:()=>l&&o(e),children:[g.jsx(ro,{toggle:t,className:"text-danger",children:"Delete tag"}),g.jsxs(ki,{children:["Are you sure you want to delete tag ",g.jsx("b",{children:e}),"?",a&&g.jsx(Nr,{type:"error",small:!0,className:"mt-2",children:g.jsx(Lo,{errorData:c,fallbackMessage:"Something went wrong while deleting the tag :("})})]}),g.jsxs(ea,{children:[g.jsx(ht,{color:"link",onClick:t,children:"Cancel"}),g.jsx(ht,{color:"danger",disabled:s,onClick:f,children:s?"Deleting tag...":"Delete tag"})]})]})};function M_(){return(M_=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function y2(e){var t=V.useRef(e),n=V.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var kd=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:x.buttons>0)&&i.current?o(tL(i.current,x,a.current)):y(!1)},v=function(){return y(!1)};function y(x){var _=l.current,w=_2(i.current),S=x?w.addEventListener:w.removeEventListener;S(_?"touchmove":"mousemove",m),S(_?"touchend":"mouseup",v)}return[function(x){var _=x.nativeEvent,w=i.current;if(w&&(nL(_),!function(T,P){return P&&!Df(T)}(_,l.current)&&w)){if(Df(_)){l.current=!0;var S=_.changedTouches||[];S.length&&(a.current=S[0].identifier)}w.focus(),o(tL(w,_,a.current)),y(!0)}},function(x){var _=x.which||x.keyCode;_<37||_>40||(x.preventDefault(),s({left:_===39?.05:_===37?-.05:0,top:_===40?.05:_===38?-.05:0}))},y]},[s,o]),f=c[0],h=c[1],p=c[2];return V.useEffect(function(){return p},[p]),U.createElement("div",M_({},r,{onTouchStart:f,onMouseDown:f,className:"react-colorful__interactive",ref:i,onKeyDown:h,tabIndex:0,role:"slider"}))}),YE=function(e){return e.filter(Boolean).join(" ")},p8=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=YE(["react-colorful__pointer",e.className]);return U.createElement("div",{className:o,style:{top:100*i+"%",left:100*n+"%"}},U.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},Un=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},Nve=function(e){return Ive(b2(e))},b2=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?Un(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?Un(parseInt(e.substring(6,8),16)/255,2):1}},Lve=function(e){return jve(Ave(e))},Dve=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:Un(e.h),s:Un(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:Un(i/2),a:Un(r,2)}},w2=function(e){var t=Dve(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},Ave=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),s=r*(1-n),a=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),c=o%6;return{r:Un(255*[r,a,s,s,l,r][c]),g:Un(255*[l,r,r,a,s,s][c]),b:Un(255*[s,s,l,r,r,a][c]),a:Un(i,2)}},Dp=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},jve=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=i<1?Dp(Un(255*i)):"";return"#"+Dp(t)+Dp(n)+Dp(r)+o},Ive=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),s=o-Math.min(t,n,r),a=s?o===t?(n-r)/s:o===n?2+(r-t)/s:4+(t-n)/s:0;return{h:Un(60*(a<0?a+6:a)),s:Un(o?s/o*100:0),v:Un(o/255*100),a:i}},Fve=U.memo(function(e){var t=e.hue,n=e.onChange,r=YE(["react-colorful__hue",e.className]);return U.createElement("div",{className:r},U.createElement(h8,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:kd(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":Un(t),"aria-valuemax":"360","aria-valuemin":"0"},U.createElement(p8,{className:"react-colorful__hue-pointer",left:t/360,color:w2({h:t,s:100,v:100,a:1})})))}),$ve=U.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:w2({h:t.h,s:100,v:100,a:1})};return U.createElement("div",{className:"react-colorful__saturation",style:r},U.createElement(h8,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:kd(t.s+100*i.left,0,100),v:kd(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+Un(t.s)+"%, Brightness "+Un(t.v)+"%"},U.createElement(p8,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:w2(t)})))}),m8=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},Bve=function(e,t){return e.toLowerCase()===t.toLowerCase()||m8(b2(e),b2(t))};function zve(e,t,n){var r=y2(n),i=V.useState(function(){return e.toHsva(t)}),o=i[0],s=i[1],a=V.useRef({color:t,hsva:o});V.useEffect(function(){if(!e.equal(t,a.current.color)){var c=e.toHsva(t);a.current={hsva:c,color:t},s(c)}},[t,e]),V.useEffect(function(){var c;m8(o,a.current.hsva)||e.equal(c=e.fromHsva(o),a.current.color)||(a.current={hsva:o,color:c},r(c))},[o,e,r]);var l=V.useCallback(function(c){s(function(f){return Object.assign({},f,c)})},[]);return[o,l]}var Uve=typeof window<"u"?V.useLayoutEffect:V.useEffect,Vve=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},rL=new Map,Hve=function(e){Uve(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!rL.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,rL.set(t,n);var r=Vve();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},Wve=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,s=d8(e,["className","colorModel","color","onChange"]),a=V.useRef(null);Hve(a);var l=zve(n,i,o),c=l[0],f=l[1],h=YE(["react-colorful",t]);return U.createElement("div",M_({},s,{ref:a,className:h}),U.createElement($ve,{hsva:c,onChange:f}),U.createElement(Fve,{hue:c.h,onChange:f,className:"react-colorful__last-control"}))},Yve={defaultColor:"000",toHsva:Nve,fromHsva:function(e){return Lve({h:e.h,s:e.s,v:e.v,a:1})},equal:Bve},qve=function(e){return U.createElement(Wve,M_({},e,{colorModel:Yve}))};const Gve=({getColorForKey:e})=>({tag:t,editTag:n,toggle:r,tagEdited:i,isOpen:o,tagEdit:s})=>{const[a,l]=V.useState(t),[c,f]=V.useState(e(t)),[h,p,,m]=It(),{editing:v,error:y,edited:x,errorData:_}=s,w=rh(async()=>{await n({oldName:t,newName:a,color:c}),r()}),S=Dt(m,()=>x&&i({oldName:t,newName:a,color:c}));return g.jsx(Uo,{isOpen:o,toggle:r,centered:!0,onClosed:S,children:g.jsxs("form",{name:"editTag",onSubmit:w,children:[g.jsx(ro,{toggle:r,children:"Edit tag"}),g.jsxs(ki,{children:[g.jsxs(Qd,{children:[g.jsx("div",{id:"colorPickerBtn",className:"input-group-text edit-tag-modal__color-picker-toggle",style:{backgroundColor:c,borderColor:c},onClick:p,children:g.jsx(je,{icon:nQ,className:"edit-tag-modal__color-icon"})}),g.jsx(Kd,{isOpen:h,toggle:p,target:"colorPickerBtn",placement:"right",hideArrow:!0,popperClassName:"edit-tag-modal__popover",children:g.jsx(qve,{color:c,onChange:f})}),g.jsx($c,{value:a,placeholder:"Tag",required:!0,onChange:({target:T})=>l(T.value)})]}),y&&g.jsx(Nr,{type:"error",small:!0,className:"mt-2",children:g.jsx(Lo,{errorData:_,fallbackMessage:"Something went wrong while editing the tag :("})})]}),g.jsxs(ea,{children:[g.jsx(ht,{type:"button",color:"link",onClick:r,children:"Cancel"}),g.jsx(ht,{color:"primary",disabled:v,children:v?"Saving...":"Save"})]})]})})};function Zve(e){return U.createElement("button",{type:"button",className:e.classNames.selectedTag,title:e.removeButtonText,onClick:e.onDelete},U.createElement("span",{className:e.classNames.selectedTagName},e.tag.name))}const Kve={position:"absolute",width:0,height:0,visibility:"hidden",overflow:"scroll",whiteSpace:"pre"},Xve=["fontSize","fontFamily","fontWeight","fontStyle","letterSpacing","textTransform"];class Qve extends U.Component{constructor(t){super(t),this.state={inputWidth:null},this.input=U.createRef(),this.sizer=U.createRef()}componentDidMount(){this.props.autoresize&&(this.copyInputStyles(),this.updateInputWidth())}componentDidUpdate({query:t,placeholderText:n}){(t!==this.props.query||n!==this.props.placeholderText)&&this.updateInputWidth()}copyInputStyles(){const t=window.getComputedStyle(this.input.current);Xve.forEach(n=>{this.sizer.current.style[n]=t[n]})}updateInputWidth(){let t;this.props.autoresize&&(t=Math.ceil(this.sizer.current.scrollWidth)+2),t!==this.state.inputWidth&&this.setState({inputWidth:t})}render(){const{id:t,query:n,ariaLabelText:r,placeholderText:i,expanded:o,classNames:s,inputAttributes:a,inputEventHandlers:l,index:c}=this.props;return U.createElement("div",{className:s.searchWrapper},U.createElement("input",Object.assign({},a,l,{ref:this.input,value:n,placeholder:i,className:s.searchInput,role:"combobox","aria-autocomplete":"list","aria-label":r||i,"aria-owns":t,"aria-activedescendant":c>-1?`${t}-${c}`:null,"aria-expanded":o,style:{width:this.state.inputWidth}})),U.createElement("div",{ref:this.sizer,style:Kve},n||i))}}function qE(e){return e.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")}function Jve(e){return new RegExp(qE(e),"gi")}function eye(e){return new RegExp(`(?:^|\\s)${qE(e)}`,"i")}function tye(e){return new RegExp(`^${qE(e)}$`,"i")}function nye(e,t){const n=Jve(t);return e.replace(n,"$&")}function rye({item:e,query:t}){return U.createElement("span",{dangerouslySetInnerHTML:{__html:nye(e.name,t)}})}function iye(e){const t=e.suggestionComponent||rye,n=e.options.map((r,i)=>{const o=`${e.id}-${i}`,s=[];return e.index===i&&s.push(e.classNames.suggestionActive),r.disabled&&s.push(e.classNames.suggestionDisabled),U.createElement("li",{id:o,key:o,role:"option",className:s.join(" "),"aria-disabled":!!r.disabled,onMouseDown:a=>a.preventDefault(),onClick:()=>e.addTag(r)},r.prefix?U.createElement("span",{className:e.classNames.suggestionPrefix},r.prefix," "):null,r.disableMarkIt?r.name:U.createElement(t,{item:r,query:e.query}))});return U.createElement("div",{className:e.classNames.suggestions},U.createElement("ul",{role:"listbox",id:e.id},n))}function oye(e,t){const n=e.querySelectorAll("a,button,input"),r=Array.prototype.findIndex.call(n,o=>o===t),i=n[r-1]||n[r+1];i&&i.focus()}const ka={ENTER:"Enter",TAB:"Tab",BACKSPACE:"Backspace",UP_ARROW:"ArrowUp",UP_ARROW_COMPAT:"Up",DOWN_ARROW:"ArrowDown",DOWN_ARROW_COMPAT:"Down"},g8={root:"react-tags",rootFocused:"is-focused",selected:"react-tags__selected",selectedTag:"react-tags__selected-tag",selectedTagName:"react-tags__selected-tag-name",search:"react-tags__search",searchWrapper:"react-tags__search-wrapper",searchInput:"react-tags__search-input",suggestions:"react-tags__suggestions",suggestionActive:"is-active",suggestionDisabled:"is-disabled",suggestionPrefix:"react-tags__suggestion-prefix"};function v8(e,t){return e.findIndex(n=>tye(t).test(n.name))}function U1(){if(this.state.query.length>=this.props.minQueryLength){const e=v8(this.state.options,this.state.query),t=this.state.index===-1?e:this.state.index,n=t>-1?this.state.options[t]:null;n?this.addTag(n):this.props.allowNew&&this.addTag({name:this.state.query})}}function sye(e){e.preventDefault();const t=this.state.options.length-1;this.setState({index:this.state.index<=0?t:this.state.index-1})}function aye(e){e.preventDefault();const t=this.state.options.length-1;this.setState({index:this.state.index>=t?0:this.state.index+1})}function lye(){this.state.query.length||this.deleteTag(this.props.tags.length-1)}function cye(e,t){return eye(t).test(e.name)}function uye(e,t){let n;return e.suggestionsTransform?n=e.suggestionsTransform(t.query,e.suggestions):n=e.suggestions.filter(r=>e.suggestionsFilter(r,t.query)),n=n.slice(0,e.maxSuggestionsLength),e.allowNew&&e.newTagText&&v8(n,t.query)===-1?n.push({id:0,name:t.query,prefix:e.newTagText,disableMarkIt:!0}):e.noSuggestionsText&&n.length===0&&n.push({id:0,name:e.noSuggestionsText,disabled:!0,disableMarkIt:!0}),n}class GE extends U.Component{constructor(t){super(t),this.state={query:"",focused:!1,index:-1},this.inputEventHandlers={onChange:()=>{},onBlur:this.onBlur.bind(this),onFocus:this.onFocus.bind(this),onInput:this.onInput.bind(this),onKeyDown:this.onKeyDown.bind(this)},this.container=U.createRef(),this.input=U.createRef()}onInput(t){const n=t.target.value;this.props.onInput&&this.props.onInput(n),n.length===this.state.query.length+1&&this.props.delimiters.indexOf(n.slice(-1))>-1?U1.call(this):n!==this.state.query&&this.setState({query:n})}onKeyDown(t){this.props.delimiters.indexOf(t.key)>-1&&((this.state.query||this.state.index>-1)&&t.preventDefault(),U1.call(this)),t.key===ka.BACKSPACE&&this.props.allowBackspace&&lye.call(this,t),(t.key===ka.UP_ARROW||t.key===ka.UP_ARROW_COMPAT)&&sye.call(this,t),(t.key===ka.DOWN_ARROW||t.key===ka.DOWN_ARROW_COMPAT)&&aye.call(this,t)}onClick(t){document.activeElement!==t.target&&this.focusInput()}onBlur(){this.setState({focused:!1,index:-1}),this.props.onBlur&&this.props.onBlur(),this.props.addOnBlur&&U1.call(this)}onFocus(){this.setState({focused:!0}),this.props.onFocus&&this.props.onFocus()}onDeleteTag(t,n){this.container.current&&oye(this.container.current,n.currentTarget),this.deleteTag(t)}addTag(t){t.disabled||typeof this.props.onValidate=="function"&&!this.props.onValidate(t)||(this.props.onAddition({id:t.id,name:t.name}),this.clearInput())}deleteTag(t){this.props.onDelete(t)}clearInput(){this.setState({query:"",index:-1})}clearSelectedIndex(){this.setState({index:-1})}focusInput(){this.input.current&&this.input.current.input.current&&this.input.current.input.current.focus()}render(){const t=this.props.tagComponent||Zve,n=this.state.focused&&this.state.query.length>=this.props.minQueryLength,r=Object.assign({},g8,this.props.classNames),i=[r.root];return this.state.focused&&i.push(r.rootFocused),U.createElement("div",{ref:this.container,className:i.join(" "),onClick:this.onClick.bind(this)},U.createElement("div",{className:r.selected,"aria-relevant":"additions removals","aria-live":"polite"},this.props.tags.map((o,s)=>U.createElement(t,{key:s,tag:o,removeButtonText:this.props.removeButtonText,classNames:r,onDelete:this.onDeleteTag.bind(this,s)}))),U.createElement("div",{className:r.search},U.createElement(Qve,Object.assign({},this.state,{id:this.props.id,ref:this.input,classNames:r,inputAttributes:this.props.inputAttributes,inputEventHandlers:this.inputEventHandlers,autoresize:this.props.autoresize,expanded:n,placeholderText:this.props.placeholderText,ariaLabelText:this.props.ariaLabelText})),n&&this.state.options.length?U.createElement(iye,Object.assign({},this.state,{id:this.props.id,classNames:r,expanded:n,addTag:this.addTag.bind(this),suggestionComponent:this.props.suggestionComponent})):null))}static getDerivedStateFromProps(t,n){return n.prevQuery!==n.query||n.prevSuggestions!==t.suggestions?{prevQuery:n.query,prevSuggestions:t.suggestions,options:uye(t,n)}:null}}GE.defaultProps={id:"ReactTags",tags:[],placeholderText:"Add new tag",removeButtonText:"Click to remove tag",noSuggestionsText:null,newTagText:null,suggestions:[],suggestionsFilter:cye,suggestionsTransform:null,autoresize:!0,classNames:g8,delimiters:[ka.TAB,ka.ENTER],minQueryLength:2,maxSuggestionsLength:6,allowNew:!1,allowBackspace:!0,addOnBlur:!1,tagComponent:null,suggestionComponent:null,inputAttributes:{}};GE.propTypes={id:C.string,tags:C.arrayOf(C.object),placeholderText:C.string,ariaLabelText:C.string,removeButtonText:C.string,noSuggestionsText:C.string,newTagText:C.string,suggestions:C.arrayOf(C.object),suggestionsFilter:C.func,suggestionsTransform:C.func,autoresize:C.bool,delimiters:C.arrayOf(C.string),onDelete:C.func.isRequired,onAddition:C.func.isRequired,onInput:C.func,onFocus:C.func,onBlur:C.func,onValidate:C.func,minQueryLength:C.number,maxSuggestionsLength:C.number,classNames:C.object,allowNew:C.bool,allowBackspace:C.bool,addOnBlur:C.bool,tagComponent:C.oneOfType([C.func,C.element]),suggestionComponent:C.oneOfType([C.func,C.element]),inputAttributes:C.object};const y8=({tag:e,colorGenerator:t})=>g.jsx("div",{style:{backgroundColor:t.getColorForKey(e)},className:"tag-bullet"}),iL=e=>({id:e,name:e}),fye=e=>({selectedTags:t,onChange:n,placeholder:r,listTags:i,tagsList:o,settings:s,allowNew:a=!0})=>{var h;V.useEffect(()=>{i()},[]);const l=((h=s.shortUrlCreation)==null?void 0:h.tagFilteringMode)??"startsWith",c=({tag:p,onDelete:m})=>g.jsx(VE,{colorGenerator:e,text:p.name,clearable:!0,className:"react-tags__tag",onClose:m}),f=({item:p})=>g.jsxs(g.Fragment,{children:[g.jsx(y8,{tag:`${p.name}`,colorGenerator:e}),p.name]});return g.jsx(GE,{tags:t.map(iL),tagComponent:c,suggestions:o.tags.filter(p=>!t.includes(p)).map(iL),suggestionComponent:f,allowNew:a,addOnBlur:!0,placeholderText:r??"Add tags to the URL",minQueryLength:1,delimiters:["Enter","Tab",","],suggestionsTransform:l==="includes"?(p,m)=>m.filter(({name:v})=>v.includes(p)):void 0,onDelete:p=>{const m=[...t];m.splice(p,1),n(m)},onAddition:({name:p})=>n([...new Set([...t,...p.toLowerCase().split(",")])])})},x2="shlink/tagDelete",dye={deleting:!1,deleted:!1,error:!1},_8=yn(`${x2}/tagDeleted`),hye=e=>{const t=rr(`${x2}/deleteTag`,async(r,{getState:i})=>{const{deleteTags:o}=e(i);await o([r])}),{reducer:n}=Yn({name:x2,initialState:dye,reducers:{},extraReducers:r=>{r.addCase(t.pending,()=>({deleting:!0,deleted:!1,error:!1})),r.addCase(t.rejected,(i,{error:o})=>({deleting:!1,deleted:!1,error:!0,errorData:no(o)})),r.addCase(t.fulfilled,()=>({deleting:!1,deleted:!0,error:!1}))}});return{reducer:n,deleteTag:t}},ZE="shlink/tagEdit",pye={editing:!1,edited:!1,error:!1},b8=yn(`${ZE}/tagEdited`),mye=(e,t)=>rr(`${ZE}/editTag`,async({oldName:n,newName:r,color:i},{getState:o})=>(await e(o).editTag(n,r),t.setColorForKey(r,i),{oldName:n,newName:r,color:i})),gye=e=>Yn({name:ZE,initialState:pye,reducers:{},extraReducers:t=>{t.addCase(e.pending,()=>({editing:!0,edited:!1,error:!1})),t.addCase(e.rejected,(n,{error:r})=>({editing:!1,edited:!1,error:!0,errorData:no(r)})),t.addCase(e.fulfilled,(n,{payload:r})=>({...Oj(["oldName","newName"],r),editing:!1,edited:!0,error:!1}))}}),KE="shlink/tagsList",V1={tags:[],filteredTags:[],stats:{},loading:!1,error:!1},oL=(e,t)=>n=>n===e?t:n,sL=(e,t)=>Ud(n=>n===t,e),vye=(e,t)=>e.reduce((n,[r,i])=>{if(!n[r])return n;const{bots:o,nonBots:s}=i,a=n[r];return{...n,[r]:{...a,visitsSummary:a.visitsSummary&&{total:a.visitsSummary.total+o+s,bots:a.visitsSummary.bots+o,nonBots:a.visitsSummary.nonBots+s},visitsCount:a.visitsCount+o+s}}},{...t}),yye=e=>Object.entries(e.reduce((t,{shortUrl:n,visit:r})=>(n==null||n.tags.forEach(i=>{t[i]||(t[i]={bots:0,nonBots:0}),r.potentialBot?t[i].bots+=1:t[i].nonBots+=1}),t),{})),_ye=(e,t=!0)=>rr(`${KE}/listTags`,async(n,{getState:r})=>{const{tagsList:i,selectedServer:o}=r();if(!t&&!Wn(i.tags))return i;const{listTags:s,tagsStats:a}=e(r),{tags:l,stats:c}=await(xE.tagsStats(o)?a():s()),f=c.reduce((h,{tag:p,...m})=>(h[p]=m,h),{});return{tags:l,stats:f}}),w8=yn(`${KE}/filterTags`),bye=(e,t)=>Yn({name:KE,initialState:V1,reducers:{},extraReducers:n=>{n.addCase(w8,(r,{payload:i})=>({...r,filteredTags:r.tags.filter(o=>o.toLowerCase().match(i.toLowerCase()))})),n.addCase(e.pending,r=>({...r,loading:!0,error:!1})),n.addCase(e.rejected,(r,{error:i})=>({...V1,error:!0,errorData:no(i)})),n.addCase(e.fulfilled,(r,{payload:i})=>({...V1,stats:i.stats,tags:i.tags,filteredTags:i.tags})),n.addCase(_8,({tags:r,filteredTags:i,...o},{payload:s})=>({...o,tags:sL(r,s),filteredTags:sL(i,s)})),n.addCase(b8,({tags:r,filteredTags:i,stats:o,...s},{payload:a})=>({...s,stats:{...o,[a.newName]:o[a.oldName]},tags:r.map(oL(a.oldName,a.newName)).sort(),filteredTags:i.map(oL(a.oldName,a.newName)).sort()})),n.addCase(ah,(r,{payload:i})=>({...r,stats:vye(yye(i.createdVisits),r.stats)})),n.addCase(t.fulfilled,({tags:r,...i},{payload:o})=>({...i,tags:r.concat(o.tags.filter(s=>!r.includes(s)))}))}}),wye=e=>ra(({filterTags:t,forceListTags:n,tagsList:r,selectedServer:i,settings:o})=>{var h;const[s,a]=V.useState(((h=o.tags)==null?void 0:h.defaultOrdering)??{}),l=Dt(()=>r.filteredTags.map(p=>{var y,x,_;const m=r.stats[p],v=((y=o.visits)!=null&&y.excludeBots?(x=m==null?void 0:m.visitsSummary)==null?void 0:x.nonBots:(_=m==null?void 0:m.visitsSummary)==null?void 0:_.total)??(m==null?void 0:m.visitsCount)??0;return{tag:p,visits:v,shortUrls:(m==null?void 0:m.shortUrlsCount)??0}}),p=>kj(p,s));if(V.useEffect(()=>{n()},[]),r.loading)return g.jsx(So,{loading:!0});if(r.error)return g.jsx(Nr,{type:"error",children:g.jsx(Lo,{errorData:r.errorData,fallbackMessage:"Error loading tags :("})});const c=p=>()=>{const m=n_(p,s.field,s.dir);a({field:m?p:void 0,dir:m})},f=()=>{if(r.filteredTags.length<1)return g.jsx(So,{children:"No tags found"});const p=l();return g.jsx(e,{sortedTags:p,selectedServer:i,currentOrder:s,orderByColumn:c})};return g.jsxs(g.Fragment,{children:[g.jsx(ih,{className:"mb-3",onChange:t}),g.jsx(Qn,{className:"mb-3",children:g.jsx("div",{className:"col-lg-6 offset-lg-6",children:g.jsx(fh,{items:j5,order:s,onChange:(p,m)=>a({field:p,dir:m})})})}),f()]})},()=>[Xr.visits]);const XE=({pagesCount:e,currentPage:t,setCurrentPage:n,centered:r=!0})=>{if(e<2)return null;const i=o=>()=>!Pd(o)&&n(o);return g.jsxs(__,{listClassName:me("flex-wrap mb-0 simple-paginator",{"justify-content-center":r}),children:[g.jsx(ks,{disabled:t<=1,children:g.jsx(Ms,{previous:!0,tag:"span",onClick:i(t-1)})}),c8(t,e).map((o,s)=>g.jsx(ks,{disabled:Pd(o),active:t===o,children:g.jsx(Ms,{role:"link",tag:"span",onClick:i(o),children:u8(o)})},f8(o,s))),g.jsx(ks,{disabled:t>=e,children:g.jsx(Ms,{next:!0,tag:"span",onClick:i(t+1)})})]})};const xye=20,Sye=e=>({sortedTags:t,selectedServer:n,orderByColumn:r,currentOrder:i})=>{const o=V.useRef(!0),{search:s}=Pn(),{page:a=1}=dl(s),[l,c]=woe("page",Number(a)),f=cd(xye,t),h=f.length>1,p=f[l-1]??[];return V.useEffect(()=>{!o.current&&c(1),o.current=!1},[t]),V.useEffect(()=>{scrollTo(0,0)},[l]),g.jsxs(un,{bodyClassName:h?"pb-1":"",children:[g.jsxs("table",{className:"table table-hover responsive-table mb-0",children:[g.jsxs("thead",{className:"responsive-table__header",children:[g.jsxs("tr",{children:[g.jsxs("th",{className:"tags-table__header-cell",onClick:r("tag"),children:["Tag ",g.jsx(Lf,{currentOrder:i,field:"tag"})]}),g.jsxs("th",{className:"tags-table__header-cell text-lg-end",onClick:r("shortUrls"),children:["Short URLs ",g.jsx(Lf,{currentOrder:i,field:"shortUrls"})]}),g.jsxs("th",{className:"tags-table__header-cell text-lg-end",onClick:r("visits"),children:["Visits ",g.jsx(Lf,{currentOrder:i,field:"visits"})]}),g.jsx("th",{"aria-label":"Options",className:"tags-table__header-cell"})]}),g.jsx("tr",{children:g.jsx("th",{"aria-label":"Separator",colSpan:4,className:"p-0 border-top-0"})})]}),g.jsxs("tbody",{children:[p.length===0&&g.jsx("tr",{children:g.jsx("td",{colSpan:4,className:"text-center",children:"No results found"})}),p.map(m=>g.jsx(e,{tag:m,selectedServer:n},m.tag))]})]}),h&&g.jsx("div",{className:"sticky-card-paginator",children:g.jsx(XE,{pagesCount:f.length,currentPage:l,setCurrentPage:c})})]},l)},Cye=(e,t,n)=>({tag:r,selectedServer:i})=>{const[o,s]=It(),[a,l]=It(),[c,f]=It(),h=Vd(i);return g.jsxs("tr",{className:"responsive-table__row",children:[g.jsxs("th",{className:"responsive-table__cell","data-th":"Tag",children:[g.jsx(y8,{tag:r.tag,colorGenerator:n})," ",r.tag]}),g.jsx("td",{className:"responsive-table__cell text-lg-end","data-th":"Short URLs",children:g.jsx(Lt,{to:`/server/${h}/list-short-urls/1?tags=${encodeURIComponent(r.tag)}`,children:_n(r.shortUrls)})}),g.jsx("td",{className:"responsive-table__cell text-lg-end","data-th":"Visits",children:g.jsx(Lt,{to:`/server/${h}/tag/${r.tag}/visits`,children:_n(r.visits)})}),g.jsx("td",{className:"responsive-table__cell text-lg-end",children:g.jsxs(x_,{toggle:f,isOpen:c,children:[g.jsxs(Ue,{onClick:l,children:[g.jsx(je,{icon:HX,fixedWidth:!0,className:"me-1"})," Edit"]}),g.jsxs(Ue,{onClick:s,children:[g.jsx(je,{icon:sQ,fixedWidth:!0,className:"me-1"})," Delete"]})]})}),g.jsx(t,{tag:r.tag,toggle:l,isOpen:a}),g.jsx(e,{tag:r.tag,toggle:s,isOpen:o})]})},Eye=(e,t)=>{e.serviceFactory("TagsSelector",fye,"ColorGenerator"),e.decorator("TagsSelector",t(["tagsList","settings"],["listTags"])),e.serviceFactory("DeleteTagConfirmModal",()=>Rve),e.decorator("DeleteTagConfirmModal",t(["tagDelete"],["deleteTag","tagDeleted"])),e.serviceFactory("EditTagModal",Gve,"ColorGenerator"),e.decorator("EditTagModal",t(["tagEdit"],["editTag","tagEdited"])),e.serviceFactory("TagsTableRow",Cye,"DeleteTagConfirmModal","EditTagModal","ColorGenerator"),e.decorator("TagsTableRow",t(["settings"])),e.serviceFactory("TagsTable",Sye,"TagsTableRow"),e.serviceFactory("TagsList",wye,"TagsTable"),e.decorator("TagsList",t(["tagsList","selectedServer","mercureInfo","settings"],["forceListTags","filterTags","createNewVisits","loadMercureInfo"])),e.serviceFactory("tagEditReducerCreator",gye,"editTag"),e.serviceFactory("tagEditReducer",at("reducer"),"tagEditReducerCreator"),e.serviceFactory("tagDeleteReducerCreator",hye,"buildShlinkApiClient"),e.serviceFactory("tagDeleteReducer",at("reducer"),"tagDeleteReducerCreator"),e.serviceFactory("tagsListReducerCreator",bye,"listTags","createShortUrl"),e.serviceFactory("tagsListReducer",at("reducer"),"tagsListReducerCreator");const n=r=>({buildShlinkApiClient:i})=>_ye(i,r);e.factory("listTags",n(!1)),e.factory("forceListTags",n(!0)),e.serviceFactory("filterTags",()=>w8),e.serviceFactory("deleteTag",at("deleteTag"),"tagDeleteReducerCreator"),e.serviceFactory("tagDeleted",()=>_8),e.serviceFactory("editTag",mye,"buildShlinkApiClient","ColorGenerator"),e.serviceFactory("tagEdited",()=>b8)};var Tye="Expected a function",x8="__lodash_hash_undefined__",S8=1/0,Oye="[object Function]",Pye="[object GeneratorFunction]",kye="[object Symbol]",Mye=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Rye=/^\w*$/,Nye=/^\./,Lye=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Dye=/[\\^$.*+?()[\]{}|]/g,Aye=/\\(\\)?/g,jye=/^\[object .+?Constructor\]$/,Iye=typeof zl=="object"&&zl&&zl.Object===Object&&zl,Fye=typeof self=="object"&&self&&self.Object===Object&&self,QE=Iye||Fye||Function("return this")();function $ye(e,t){return e==null?void 0:e[t]}function Bye(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var zye=Array.prototype,Uye=Function.prototype,C8=Object.prototype,H1=QE["__core-js_shared__"],aL=function(){var e=/[^.]+$/.exec(H1&&H1.keys&&H1.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),E8=Uye.toString,JE=C8.hasOwnProperty,T8=C8.toString,Vye=RegExp("^"+E8.call(JE).replace(Dye,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),lL=QE.Symbol,Hye=zye.splice,Wye=O8(QE,"Map"),Md=O8(Object,"create"),cL=lL?lL.prototype:void 0,uL=cL?cL.toString:void 0;function al(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1}function t_e(e,t){var n=this.__data__,r=R_(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}su.prototype.clear=Xye;su.prototype.delete=Qye;su.prototype.get=Jye;su.prototype.has=e_e;su.prototype.set=t_e;function gl(e){var t=-1,n=e?e.length:0;for(this.clear();++tt.toFixed(e.decimals).replace(".",e.separator):t=>`${t}`.replace(".",e.separator):e.decimals?t=>t.toFixed(e.decimals):t=>`${t}`}function nT(e={}){const t=typeof e.quote=="string"?e.quote:'"',n=typeof e.escapedQuote=="string"?e.escapedQuote:`${t}${t}`;return!t||t===n?r=>r:r=>(r.includes(t)&&(r=r.replace(new RegExp(t,"g"),n)),`${t}${r}${t}`)}function S_e(e={stringFormatter:nT()}){return t=>e.stringFormatter(t.toString().slice(7,-1))}function C_e(e={stringFormatter:nT()}){return t=>t===null||(t=JSON.stringify(t),t===void 0)?"":(t[0]==='"'&&(t=t.replace(/^"(.+)"$/,"$1")),e.stringFormatter(t))}function dL(e,t,n){const r=e[t];return r===void 0?n:r}function M8(e,t){try{return Array.isArray(t)?e.push(...t):e.push(t),e}catch{return e.concat(t)}}function S2(e,t){let n=!0;return e.reduce((r,i)=>(i==null&&(i=""),n?(n=!1,`${i}`):`${r}${t}${i}`),"")}class E_e{constructor(t){this.opts=this.preprocessOpts(t)}preprocessOpts(t){const n=Object.assign({},t);n.fields&&(n.fields=this.preprocessFieldsInfo(n.fields,n.defaultValue)),n.transforms=n.transforms||[];const r=n.formatters&&n.formatters.string||nT(),i=C_e({stringFormatter:r}),o={header:r,undefined:W1,boolean:W1,number:x_e(),bigint:W1,string:r,symbol:S_e({stringFormatter:r}),function:i,object:i};return n.formatters={...o,...n.formatters},n.delimiter=n.delimiter||",",n.eol=n.eol||` `,n.header=n.header!==!1,n.includeEmptyRows=n.includeEmptyRows||!1,n.withBOM=n.withBOM||!1,n}preprocessFieldsInfo(t,n){return t.map(r=>{if(typeof r=="string")return{label:r,value:r.includes(".")||r.includes("[")?i=>fL(i,r,n):i=>dL(i,r,n)};if(typeof r=="object"){const i="default"in r?r.default:n;if(typeof r.value=="string")return{label:r.label||r.value,value:r.value.includes(".")||r.value.includes("[")?o=>fL(o,r.value,i):o=>dL(o,r.value,i)};if(typeof r.value=="function"){const o=r.label||r.value.name||"",s={label:o,default:i};return{label:o,value(a){const l=r.value(a,s);return l??i}}}}throw new Error("Invalid field info option. "+JSON.stringify(r))})}getHeader(){return S2(this.opts.fields.map(t=>this.opts.formatters.header(t.label)),this.opts.delimiter)}preprocessRow(t){return this.opts.transforms.reduce((n,r)=>n.map(i=>r(i)).reduce(M8,[]),[t])}processRow(t){if(!t)return;const n=this.opts.fields.map(r=>this.processCell(t,r));if(!(!this.opts.includeEmptyRows&&n.every(r=>r==="")))return S2(n,this.opts.delimiter)}processCell(t,n){return this.processValue(n.value(t))}processValue(t){return this.opts.formatters[typeof t](t)}}class T_e extends E_e{constructor(t){super(t)}parse(t){const n=this.preprocessData(t);this.opts.fields=this.opts.fields||this.preprocessFieldsInfo(n.reduce((s,a)=>(Object.keys(a).forEach(l=>{s.includes(l)||s.push(l)}),s),[]));const r=this.opts.header?this.getHeader():"",i=this.processData(n);return(this.opts.withBOM?"\uFEFF":"")+r+(r&&i?this.opts.eol:"")+i}preprocessData(t){const n=Array.isArray(t)?t:[t];if(!this.opts.fields&&(n.length===0||typeof n[0]!="object"))throw new Error('Data should not be empty or the "fields" option should be included');return this.opts.transforms.length===0?n:n.map(r=>this.preprocessRow(r)).reduce(M8,[])}processData(t){return S2(t.map(n=>this.processRow(n)).filter(n=>n),this.opts.eol)}}var xn;(function(e){e[e.BACKSPACE=8]="BACKSPACE",e[e.FORM_FEED=12]="FORM_FEED",e[e.NEWLINE=10]="NEWLINE",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.TAB=9]="TAB",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.NUMBER_SIGN=35]="NUMBER_SIGN",e[e.DOLLAR_SIGN=36]="DOLLAR_SIGN",e[e.PERCENT_SIGN=37]="PERCENT_SIGN",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.LEFT_PARENTHESIS=40]="LEFT_PARENTHESIS",e[e.RIGHT_PARENTHESIS=41]="RIGHT_PARENTHESIS",e[e.ASTERISK=42]="ASTERISK",e[e.PLUS_SIGN=43]="PLUS_SIGN",e[e.COMMA=44]="COMMA",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.FULL_STOP=46]="FULL_STOP",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_ZERO=48]="DIGIT_ZERO",e[e.DIGIT_ONE=49]="DIGIT_ONE",e[e.DIGIT_TWO=50]="DIGIT_TWO",e[e.DIGIT_THREE=51]="DIGIT_THREE",e[e.DIGIT_FOUR=52]="DIGIT_FOUR",e[e.DIGIT_FIVE=53]="DIGIT_FIVE",e[e.DIGIT_SIX=54]="DIGIT_SIX",e[e.DIGIT_SEVEN=55]="DIGIT_SEVEN",e[e.DIGIT_EIGHT=56]="DIGIT_EIGHT",e[e.DIGIT_NINE=57]="DIGIT_NINE",e[e.COLON=58]="COLON",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.COMMERCIAL_AT=64]="COMMERCIAL_AT",e[e.LATIN_CAPITAL_LETTER_A=65]="LATIN_CAPITAL_LETTER_A",e[e.LATIN_CAPITAL_LETTER_B=66]="LATIN_CAPITAL_LETTER_B",e[e.LATIN_CAPITAL_LETTER_C=67]="LATIN_CAPITAL_LETTER_C",e[e.LATIN_CAPITAL_LETTER_D=68]="LATIN_CAPITAL_LETTER_D",e[e.LATIN_CAPITAL_LETTER_E=69]="LATIN_CAPITAL_LETTER_E",e[e.LATIN_CAPITAL_LETTER_F=70]="LATIN_CAPITAL_LETTER_F",e[e.LATIN_CAPITAL_LETTER_G=71]="LATIN_CAPITAL_LETTER_G",e[e.LATIN_CAPITAL_LETTER_H=72]="LATIN_CAPITAL_LETTER_H",e[e.LATIN_CAPITAL_LETTER_I=73]="LATIN_CAPITAL_LETTER_I",e[e.LATIN_CAPITAL_LETTER_J=74]="LATIN_CAPITAL_LETTER_J",e[e.LATIN_CAPITAL_LETTER_K=75]="LATIN_CAPITAL_LETTER_K",e[e.LATIN_CAPITAL_LETTER_L=76]="LATIN_CAPITAL_LETTER_L",e[e.LATIN_CAPITAL_LETTER_M=77]="LATIN_CAPITAL_LETTER_M",e[e.LATIN_CAPITAL_LETTER_N=78]="LATIN_CAPITAL_LETTER_N",e[e.LATIN_CAPITAL_LETTER_O=79]="LATIN_CAPITAL_LETTER_O",e[e.LATIN_CAPITAL_LETTER_P=80]="LATIN_CAPITAL_LETTER_P",e[e.LATIN_CAPITAL_LETTER_Q=81]="LATIN_CAPITAL_LETTER_Q",e[e.LATIN_CAPITAL_LETTER_R=82]="LATIN_CAPITAL_LETTER_R",e[e.LATIN_CAPITAL_LETTER_S=83]="LATIN_CAPITAL_LETTER_S",e[e.LATIN_CAPITAL_LETTER_T=84]="LATIN_CAPITAL_LETTER_T",e[e.LATIN_CAPITAL_LETTER_U=85]="LATIN_CAPITAL_LETTER_U",e[e.LATIN_CAPITAL_LETTER_V=86]="LATIN_CAPITAL_LETTER_V",e[e.LATIN_CAPITAL_LETTER_W=87]="LATIN_CAPITAL_LETTER_W",e[e.LATIN_CAPITAL_LETTER_X=88]="LATIN_CAPITAL_LETTER_X",e[e.LATIN_CAPITAL_LETTER_Y=89]="LATIN_CAPITAL_LETTER_Y",e[e.LATIN_CAPITAL_LETTER_Z=90]="LATIN_CAPITAL_LETTER_Z",e[e.LEFT_SQUARE_BRACKET=91]="LEFT_SQUARE_BRACKET",e[e.REVERSE_SOLIDUS=92]="REVERSE_SOLIDUS",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.CIRCUMFLEX_ACCENT=94]="CIRCUMFLEX_ACCENT",e[e.LOW_LINE=95]="LOW_LINE",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_LETTER_A=97]="LATIN_SMALL_LETTER_A",e[e.LATIN_SMALL_LETTER_B=98]="LATIN_SMALL_LETTER_B",e[e.LATIN_SMALL_LETTER_C=99]="LATIN_SMALL_LETTER_C",e[e.LATIN_SMALL_LETTER_D=100]="LATIN_SMALL_LETTER_D",e[e.LATIN_SMALL_LETTER_E=101]="LATIN_SMALL_LETTER_E",e[e.LATIN_SMALL_LETTER_F=102]="LATIN_SMALL_LETTER_F",e[e.LATIN_SMALL_LETTER_G=103]="LATIN_SMALL_LETTER_G",e[e.LATIN_SMALL_LETTER_H=104]="LATIN_SMALL_LETTER_H",e[e.LATIN_SMALL_LETTER_I=105]="LATIN_SMALL_LETTER_I",e[e.LATIN_SMALL_LETTER_J=106]="LATIN_SMALL_LETTER_J",e[e.LATIN_SMALL_LETTER_K=107]="LATIN_SMALL_LETTER_K",e[e.LATIN_SMALL_LETTER_L=108]="LATIN_SMALL_LETTER_L",e[e.LATIN_SMALL_LETTER_M=109]="LATIN_SMALL_LETTER_M",e[e.LATIN_SMALL_LETTER_N=110]="LATIN_SMALL_LETTER_N",e[e.LATIN_SMALL_LETTER_O=111]="LATIN_SMALL_LETTER_O",e[e.LATIN_SMALL_LETTER_P=112]="LATIN_SMALL_LETTER_P",e[e.LATIN_SMALL_LETTER_Q=113]="LATIN_SMALL_LETTER_Q",e[e.LATIN_SMALL_LETTER_R=114]="LATIN_SMALL_LETTER_R",e[e.LATIN_SMALL_LETTER_S=115]="LATIN_SMALL_LETTER_S",e[e.LATIN_SMALL_LETTER_T=116]="LATIN_SMALL_LETTER_T",e[e.LATIN_SMALL_LETTER_U=117]="LATIN_SMALL_LETTER_U",e[e.LATIN_SMALL_LETTER_V=118]="LATIN_SMALL_LETTER_V",e[e.LATIN_SMALL_LETTER_W=119]="LATIN_SMALL_LETTER_W",e[e.LATIN_SMALL_LETTER_X=120]="LATIN_SMALL_LETTER_X",e[e.LATIN_SMALL_LETTER_Y=121]="LATIN_SMALL_LETTER_Y",e[e.LATIN_SMALL_LETTER_Z=122]="LATIN_SMALL_LETTER_Z",e[e.LEFT_CURLY_BRACKET=123]="LEFT_CURLY_BRACKET",e[e.VERTICAL_LINE=124]="VERTICAL_LINE",e[e.RIGHT_CURLY_BRACKET=125]="RIGHT_CURLY_BRACKET",e[e.TILDE=126]="TILDE"})(xn||(xn={}));xn.QUOTATION_MARK+"",xn.QUOTATION_MARK,xn.REVERSE_SOLIDUS+"",xn.REVERSE_SOLIDUS,xn.SOLIDUS+"",xn.SOLIDUS,xn.LATIN_SMALL_LETTER_B+"",xn.BACKSPACE,xn.LATIN_SMALL_LETTER_F+"",xn.FORM_FEED,xn.LATIN_SMALL_LETTER_N+"",xn.NEWLINE,xn.LATIN_SMALL_LETTER_R+"",xn.CARRIAGE_RETURN,xn.LATIN_SMALL_LETTER_T+"",xn.TAB;var hL;(function(e){e[e.LEFT_BRACE=1]="LEFT_BRACE",e[e.RIGHT_BRACE=2]="RIGHT_BRACE",e[e.LEFT_BRACKET=3]="LEFT_BRACKET",e[e.RIGHT_BRACKET=4]="RIGHT_BRACKET",e[e.COLON=5]="COLON",e[e.COMMA=6]="COMMA",e[e.TRUE=7]="TRUE",e[e.FALSE=8]="FALSE",e[e.NULL=9]="NULL",e[e.STRING=10]="STRING",e[e.NUMBER=11]="NUMBER",e[e.SEPARATOR=12]="SEPARATOR"})(hL||(hL={}));var pL;(function(e){e[e.START=0]="START",e[e.ENDED=1]="ENDED",e[e.ERROR=2]="ERROR",e[e.TRUE1=3]="TRUE1",e[e.TRUE2=4]="TRUE2",e[e.TRUE3=5]="TRUE3",e[e.FALSE1=6]="FALSE1",e[e.FALSE2=7]="FALSE2",e[e.FALSE3=8]="FALSE3",e[e.FALSE4=9]="FALSE4",e[e.NULL1=10]="NULL1",e[e.NULL2=11]="NULL2",e[e.NULL3=12]="NULL3",e[e.STRING_DEFAULT=13]="STRING_DEFAULT",e[e.STRING_AFTER_BACKSLASH=14]="STRING_AFTER_BACKSLASH",e[e.STRING_UNICODE_DIGIT_1=15]="STRING_UNICODE_DIGIT_1",e[e.STRING_UNICODE_DIGIT_2=16]="STRING_UNICODE_DIGIT_2",e[e.STRING_UNICODE_DIGIT_3=17]="STRING_UNICODE_DIGIT_3",e[e.STRING_UNICODE_DIGIT_4=18]="STRING_UNICODE_DIGIT_4",e[e.STRING_INCOMPLETE_CHAR=19]="STRING_INCOMPLETE_CHAR",e[e.NUMBER_AFTER_INITIAL_MINUS=20]="NUMBER_AFTER_INITIAL_MINUS",e[e.NUMBER_AFTER_INITIAL_ZERO=21]="NUMBER_AFTER_INITIAL_ZERO",e[e.NUMBER_AFTER_INITIAL_NON_ZERO=22]="NUMBER_AFTER_INITIAL_NON_ZERO",e[e.NUMBER_AFTER_FULL_STOP=23]="NUMBER_AFTER_FULL_STOP",e[e.NUMBER_AFTER_DECIMAL=24]="NUMBER_AFTER_DECIMAL",e[e.NUMBER_AFTER_E=25]="NUMBER_AFTER_E",e[e.NUMBER_AFTER_E_AND_SIGN=26]="NUMBER_AFTER_E_AND_SIGN",e[e.NUMBER_AFTER_E_AND_DIGIT=27]="NUMBER_AFTER_E_AND_DIGIT",e[e.SEPARATOR=28]="SEPARATOR"})(pL||(pL={}));var mL;(function(e){e[e.VALUE=0]="VALUE",e[e.KEY=1]="KEY",e[e.COLON=2]="COLON",e[e.COMMA=3]="COMMA",e[e.ENDED=4]="ENDED",e[e.ERROR=5]="ERROR",e[e.SEPARATOR=6]="SEPARATOR"})(mL||(mL={}));var gL;(function(e){e[e.OBJECT=0]="OBJECT",e[e.ARRAY=1]="ARRAY"})(gL||(gL={}));var O_e=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(r,i,o){n.o(r,i)||Object.defineProperty(r,i,{enumerable:!0,get:o})},n.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n.t=function(r,i){if(1&i&&(r=n(r)),8&i||4&i&&typeof r=="object"&&r&&r.__esModule)return r;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:r}),2&i&&typeof r!="string")for(var s in r)n.d(o,s,function(a){return r[a]}.bind(null,s));return o},n.n=function(r){var i=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(i,"a",i),i},n.o=function(r,i){return Object.prototype.hasOwnProperty.call(r,i)},n.p="",n(n.s=32)}([function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch{typeof window=="object"&&(n=window)}e.exports=n},function(e,t,n){var r=n(6),i=Object.keys||function(v){var y=[];for(var x in v)y.push(x);return y};e.exports=h;var o=n(5);o.inherits=n(2);var s=n(23),a=n(14);o.inherits(h,s);for(var l=i(a.prototype),c=0;c * @license MIT */var i=n(38),o=n(39),s=n(40);function a(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function l(O,R){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|O}function y(O,R){if(c.isBuffer(O))return O.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(O)||O instanceof ArrayBuffer))return O.byteLength;typeof O!="string"&&(O=""+O);var I=O.length;if(I===0)return 0;for(var X=!1;;)switch(R){case"ascii":case"latin1":case"binary":return I;case"utf8":case"utf-8":case void 0:return te(O).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*I;case"hex":return I>>>1;case"base64":return se(O).length;default:if(X)return te(O).length;R=(""+R).toLowerCase(),X=!0}}function x(O,R,I){var X=O[R];O[R]=O[I],O[I]=X}function _(O,R,I,X,K){if(O.length===0)return-1;if(typeof I=="string"?(X=I,I=0):I>2147483647?I=2147483647:I<-2147483648&&(I=-2147483648),I=+I,isNaN(I)&&(I=K?0:O.length-1),I<0&&(I=O.length+I),I>=O.length){if(K)return-1;I=O.length-1}else if(I<0){if(!K)return-1;I=0}if(typeof R=="string"&&(R=c.from(R,X)),c.isBuffer(R))return R.length===0?-1:w(O,R,I,X,K);if(typeof R=="number")return R&=255,c.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?K?Uint8Array.prototype.indexOf.call(O,R,I):Uint8Array.prototype.lastIndexOf.call(O,R,I):w(O,[R],I,X,K);throw new TypeError("val must be string, number or Buffer")}function w(O,R,I,X,K){var ae,ge=1,Le=O.length,ue=R.length;if(X!==void 0&&((X=String(X).toLowerCase())==="ucs2"||X==="ucs-2"||X==="utf16le"||X==="utf-16le")){if(O.length<2||R.length<2)return-1;ge=2,Le/=2,ue/=2,I/=2}function ve(Re,Ne){return ge===1?Re[Ne]:Re.readUInt16BE(Ne*ge)}if(K){var _e=-1;for(ae=I;aeLe&&(I=Le-ue),ae=I;ae>=0;ae--){for(var Te=!0,De=0;DeK&&(X=K):X=K;var ae=R.length;if(ae%2!=0)throw new TypeError("Invalid hex string");X>ae/2&&(X=ae/2);for(var ge=0;ge>8,ue=ge%256,ve.push(ue),ve.push(Le);return ve}(R,O.length-I),O,I,X)}function z(O,R,I){return R===0&&I===O.length?i.fromByteArray(O):i.fromByteArray(O.slice(R,I))}function A(O,R,I){I=Math.min(O.length,I);for(var X=[],K=R;K239?4:ve>223?3:ve>191?2:1;if(K+Te<=I)switch(Te){case 1:ve<128&&(_e=ve);break;case 2:(192&(ae=O[K+1]))==128&&(ue=(31&ve)<<6|63&ae)>127&&(_e=ue);break;case 3:ae=O[K+1],ge=O[K+2],(192&ae)==128&&(192&ge)==128&&(ue=(15&ve)<<12|(63&ae)<<6|63&ge)>2047&&(ue<55296||ue>57343)&&(_e=ue);break;case 4:ae=O[K+1],ge=O[K+2],Le=O[K+3],(192&ae)==128&&(192&ge)==128&&(192&Le)==128&&(ue=(15&ve)<<18|(63&ae)<<12|(63&ge)<<6|63&Le)>65535&&ue<1114112&&(_e=ue)}_e===null?(_e=65533,Te=1):_e>65535&&(_e-=65536,X.push(_e>>>10&1023|55296),_e=56320|1023&_e),X.push(_e),K+=Te}return function(De){var Re=De.length;if(Re<=W)return String.fromCharCode.apply(String,De);for(var Ne="",ce=0;cethis.length||((X===void 0||X>this.length)&&(X=this.length),X<=0)||(X>>>=0)<=(I>>>=0))return"";for(R||(R="utf8");;)switch(R){case"hex":return Z(this,I,X);case"utf8":case"utf-8":return A(this,I,X);case"ascii":return Y(this,I,X);case"latin1":case"binary":return J(this,I,X);case"base64":return z(this,I,X);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ee(this,I,X);default:if(K)throw new TypeError("Unknown encoding: "+R);R=(R+"").toLowerCase(),K=!0}}.apply(this,arguments)},c.prototype.equals=function(O){if(!c.isBuffer(O))throw new TypeError("Argument must be a Buffer");return this===O||c.compare(this,O)===0},c.prototype.inspect=function(){var O="",R=t.INSPECT_MAX_BYTES;return this.length>0&&(O=this.toString("hex",0,R).match(/.{2}/g).join(" "),this.length>R&&(O+=" ... ")),""},c.prototype.compare=function(O,R,I,X,K){if(!c.isBuffer(O))throw new TypeError("Argument must be a Buffer");if(R===void 0&&(R=0),I===void 0&&(I=O?O.length:0),X===void 0&&(X=0),K===void 0&&(K=this.length),R<0||I>O.length||X<0||K>this.length)throw new RangeError("out of range index");if(X>=K&&R>=I)return 0;if(X>=K)return-1;if(R>=I)return 1;if(R>>>=0,I>>>=0,X>>>=0,K>>>=0,this===O)return 0;for(var ae=K-X,ge=I-R,Le=Math.min(ae,ge),ue=this.slice(X,K),ve=O.slice(R,I),_e=0;_eK)&&(I=K),O.length>0&&(I<0||R<0)||R>this.length)throw new RangeError("Attempt to write outside buffer bounds");X||(X="utf8");for(var ae=!1;;)switch(X){case"hex":return S(this,O,R,I);case"utf8":case"utf-8":return T(this,O,R,I);case"ascii":return P(this,O,R,I);case"latin1":case"binary":return k(this,O,R,I);case"base64":return N(this,O,R,I);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,O,R,I);default:if(ae)throw new TypeError("Unknown encoding: "+X);X=(""+X).toLowerCase(),ae=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var W=4096;function Y(O,R,I){var X="";I=Math.min(O.length,I);for(var K=R;KX)&&(I=X);for(var K="",ae=R;aeI)throw new RangeError("Trying to access beyond buffer length")}function oe(O,R,I,X,K,ae){if(!c.isBuffer(O))throw new TypeError('"buffer" argument must be a Buffer instance');if(R>K||RO.length)throw new RangeError("Index out of range")}function G(O,R,I,X){R<0&&(R=65535+R+1);for(var K=0,ae=Math.min(O.length-I,2);K>>8*(X?K:1-K)}function F(O,R,I,X){R<0&&(R=4294967295+R+1);for(var K=0,ae=Math.min(O.length-I,4);K>>8*(X?K:3-K)&255}function j(O,R,I,X,K,ae){if(I+X>O.length)throw new RangeError("Index out of range");if(I<0)throw new RangeError("Index out of range")}function B(O,R,I,X,K){return K||j(O,0,I,4),o.write(O,R,I,X,23,4),I+4}function ne(O,R,I,X,K){return K||j(O,0,I,8),o.write(O,R,I,X,52,8),I+8}c.prototype.slice=function(O,R){var I,X=this.length;if(O=~~O,R=R===void 0?X:~~R,O<0?(O+=X)<0&&(O=0):O>X&&(O=X),R<0?(R+=X)<0&&(R=0):R>X&&(R=X),R0&&(K*=256);)X+=this[O+--R]*K;return X},c.prototype.readUInt8=function(O,R){return R||ie(O,1,this.length),this[O]},c.prototype.readUInt16LE=function(O,R){return R||ie(O,2,this.length),this[O]|this[O+1]<<8},c.prototype.readUInt16BE=function(O,R){return R||ie(O,2,this.length),this[O]<<8|this[O+1]},c.prototype.readUInt32LE=function(O,R){return R||ie(O,4,this.length),(this[O]|this[O+1]<<8|this[O+2]<<16)+16777216*this[O+3]},c.prototype.readUInt32BE=function(O,R){return R||ie(O,4,this.length),16777216*this[O]+(this[O+1]<<16|this[O+2]<<8|this[O+3])},c.prototype.readIntLE=function(O,R,I){O|=0,R|=0,I||ie(O,R,this.length);for(var X=this[O],K=1,ae=0;++ae=(K*=128)&&(X-=Math.pow(2,8*R)),X},c.prototype.readIntBE=function(O,R,I){O|=0,R|=0,I||ie(O,R,this.length);for(var X=R,K=1,ae=this[O+--X];X>0&&(K*=256);)ae+=this[O+--X]*K;return ae>=(K*=128)&&(ae-=Math.pow(2,8*R)),ae},c.prototype.readInt8=function(O,R){return R||ie(O,1,this.length),128&this[O]?-1*(255-this[O]+1):this[O]},c.prototype.readInt16LE=function(O,R){R||ie(O,2,this.length);var I=this[O]|this[O+1]<<8;return 32768&I?4294901760|I:I},c.prototype.readInt16BE=function(O,R){R||ie(O,2,this.length);var I=this[O+1]|this[O]<<8;return 32768&I?4294901760|I:I},c.prototype.readInt32LE=function(O,R){return R||ie(O,4,this.length),this[O]|this[O+1]<<8|this[O+2]<<16|this[O+3]<<24},c.prototype.readInt32BE=function(O,R){return R||ie(O,4,this.length),this[O]<<24|this[O+1]<<16|this[O+2]<<8|this[O+3]},c.prototype.readFloatLE=function(O,R){return R||ie(O,4,this.length),o.read(this,O,!0,23,4)},c.prototype.readFloatBE=function(O,R){return R||ie(O,4,this.length),o.read(this,O,!1,23,4)},c.prototype.readDoubleLE=function(O,R){return R||ie(O,8,this.length),o.read(this,O,!0,52,8)},c.prototype.readDoubleBE=function(O,R){return R||ie(O,8,this.length),o.read(this,O,!1,52,8)},c.prototype.writeUIntLE=function(O,R,I,X){O=+O,R|=0,I|=0,X||oe(this,O,R,I,Math.pow(2,8*I)-1,0);var K=1,ae=0;for(this[R]=255&O;++ae=0&&(ae*=256);)this[R+K]=O/ae&255;return R+I},c.prototype.writeUInt8=function(O,R,I){return O=+O,R|=0,I||oe(this,O,R,1,255,0),c.TYPED_ARRAY_SUPPORT||(O=Math.floor(O)),this[R]=255&O,R+1},c.prototype.writeUInt16LE=function(O,R,I){return O=+O,R|=0,I||oe(this,O,R,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[R]=255&O,this[R+1]=O>>>8):G(this,O,R,!0),R+2},c.prototype.writeUInt16BE=function(O,R,I){return O=+O,R|=0,I||oe(this,O,R,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[R]=O>>>8,this[R+1]=255&O):G(this,O,R,!1),R+2},c.prototype.writeUInt32LE=function(O,R,I){return O=+O,R|=0,I||oe(this,O,R,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[R+3]=O>>>24,this[R+2]=O>>>16,this[R+1]=O>>>8,this[R]=255&O):F(this,O,R,!0),R+4},c.prototype.writeUInt32BE=function(O,R,I){return O=+O,R|=0,I||oe(this,O,R,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[R]=O>>>24,this[R+1]=O>>>16,this[R+2]=O>>>8,this[R+3]=255&O):F(this,O,R,!1),R+4},c.prototype.writeIntLE=function(O,R,I,X){if(O=+O,R|=0,!X){var K=Math.pow(2,8*I-1);oe(this,O,R,I,K-1,-K)}var ae=0,ge=1,Le=0;for(this[R]=255&O;++ae>0)-Le&255;return R+I},c.prototype.writeIntBE=function(O,R,I,X){if(O=+O,R|=0,!X){var K=Math.pow(2,8*I-1);oe(this,O,R,I,K-1,-K)}var ae=I-1,ge=1,Le=0;for(this[R+ae]=255&O;--ae>=0&&(ge*=256);)O<0&&Le===0&&this[R+ae+1]!==0&&(Le=1),this[R+ae]=(O/ge>>0)-Le&255;return R+I},c.prototype.writeInt8=function(O,R,I){return O=+O,R|=0,I||oe(this,O,R,1,127,-128),c.TYPED_ARRAY_SUPPORT||(O=Math.floor(O)),O<0&&(O=255+O+1),this[R]=255&O,R+1},c.prototype.writeInt16LE=function(O,R,I){return O=+O,R|=0,I||oe(this,O,R,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[R]=255&O,this[R+1]=O>>>8):G(this,O,R,!0),R+2},c.prototype.writeInt16BE=function(O,R,I){return O=+O,R|=0,I||oe(this,O,R,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[R]=O>>>8,this[R+1]=255&O):G(this,O,R,!1),R+2},c.prototype.writeInt32LE=function(O,R,I){return O=+O,R|=0,I||oe(this,O,R,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[R]=255&O,this[R+1]=O>>>8,this[R+2]=O>>>16,this[R+3]=O>>>24):F(this,O,R,!0),R+4},c.prototype.writeInt32BE=function(O,R,I){return O=+O,R|=0,I||oe(this,O,R,4,2147483647,-2147483648),O<0&&(O=4294967295+O+1),c.TYPED_ARRAY_SUPPORT?(this[R]=O>>>24,this[R+1]=O>>>16,this[R+2]=O>>>8,this[R+3]=255&O):F(this,O,R,!1),R+4},c.prototype.writeFloatLE=function(O,R,I){return B(this,O,R,!0,I)},c.prototype.writeFloatBE=function(O,R,I){return B(this,O,R,!1,I)},c.prototype.writeDoubleLE=function(O,R,I){return ne(this,O,R,!0,I)},c.prototype.writeDoubleBE=function(O,R,I){return ne(this,O,R,!1,I)},c.prototype.copy=function(O,R,I,X){if(I||(I=0),X||X===0||(X=this.length),R>=O.length&&(R=O.length),R||(R=0),X>0&&X=this.length)throw new RangeError("sourceStart out of bounds");if(X<0)throw new RangeError("sourceEnd out of bounds");X>this.length&&(X=this.length),O.length-R=0;--K)O[K+R]=this[K+I];else if(ae<1e3||!c.TYPED_ARRAY_SUPPORT)for(K=0;K>>=0,I=I===void 0?this.length:I>>>0,O||(O=0),typeof O=="number")for(ae=R;ae55295&&I<57344){if(!K){if(I>56319){(R-=3)>-1&&ae.push(239,191,189);continue}if(ge+1===X){(R-=3)>-1&&ae.push(239,191,189);continue}K=I;continue}if(I<56320){(R-=3)>-1&&ae.push(239,191,189),K=I;continue}I=65536+(K-55296<<10|I-56320)}else K&&(R-=3)>-1&&ae.push(239,191,189);if(K=null,I<128){if((R-=1)<0)break;ae.push(I)}else if(I<2048){if((R-=2)<0)break;ae.push(I>>6|192,63&I|128)}else if(I<65536){if((R-=3)<0)break;ae.push(I>>12|224,I>>6&63|128,63&I|128)}else{if(!(I<1114112))throw new Error("Invalid code point");if((R-=4)<0)break;ae.push(I>>18|240,I>>12&63|128,I>>6&63|128,63&I|128)}}return ae}function se(O){return i.toByteArray(function(R){if((R=function(I){return I.trim?I.trim():I.replace(/^\s+|\s+$/g,"")}(R).replace(H,"")).length<2)return"";for(;R.length%4!=0;)R+="=";return R}(O))}function pe(O,R,I,X){for(var K=0;K=R.length||K>=O.length);++K)R[K+I]=O[K];return K}}).call(this,n(0))},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(x){if(n===setTimeout)return setTimeout(x,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(x,0);try{return n(x,0)}catch{try{return n.call(null,x,0)}catch{return n.call(this,x,0)}}}(function(){try{n=typeof setTimeout=="function"?setTimeout:o}catch{n=o}try{r=typeof clearTimeout=="function"?clearTimeout:s}catch{r=s}})();var l,c=[],f=!1,h=-1;function p(){f&&l&&(f=!1,l.length?c=l.concat(c):h=-1,c.length&&m())}function m(){if(!f){var x=a(p);f=!0;for(var _=c.length;_;){for(l=c,c=[];++h<_;)l&&l[h].run();h=-1,_=c.length}l=null,f=!1,function(w){if(r===clearTimeout)return clearTimeout(w);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(w);try{r(w)}catch{try{return r.call(null,w)}catch{return r.call(this,w)}}}(x)}}function v(x,_){this.fun=x,this.array=_}function y(){}i.nextTick=function(x){var _=new Array(arguments.length-1);if(arguments.length>1)for(var w=1;w=0&&(a._idleTimeoutId=setTimeout(function(){a._onTimeout&&a._onTimeout()},l))},n(35),t.setImmediate=typeof self<"u"&&self.setImmediate||r!==void 0&&r.setImmediate||this&&this.setImmediate,t.clearImmediate=typeof self<"u"&&self.clearImmediate||r!==void 0&&r.clearImmediate||this&&this.clearImmediate}).call(this,n(0))},function(e,t){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(s){return typeof s=="function"}function i(s){return typeof s=="object"&&s!==null}function o(s){return s===void 0}e.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(s){if(!function(a){return typeof a=="number"}(s)||s<0||isNaN(s))throw TypeError("n must be a positive number");return this._maxListeners=s,this},n.prototype.emit=function(s){var a,l,c,f,h,p;if(this._events||(this._events={}),s==="error"&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if((a=arguments[1])instanceof Error)throw a;var m=new Error('Uncaught, unspecified "error" event. ('+a+")");throw m.context=a,m}if(o(l=this._events[s]))return!1;if(r(l))switch(arguments.length){case 1:l.call(this);break;case 2:l.call(this,arguments[1]);break;case 3:l.call(this,arguments[1],arguments[2]);break;default:f=Array.prototype.slice.call(arguments,1),l.apply(this,f)}else if(i(l))for(f=Array.prototype.slice.call(arguments,1),c=(p=l.slice()).length,h=0;h0&&this._events[s].length>l&&(this._events[s].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[s].length),typeof console.trace=="function"&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(s,a){if(!r(a))throw TypeError("listener must be a function");var l=!1;function c(){this.removeListener(s,c),l||(l=!0,a.apply(this,arguments))}return c.listener=a,this.on(s,c),this},n.prototype.removeListener=function(s,a){var l,c,f,h;if(!r(a))throw TypeError("listener must be a function");if(!this._events||!this._events[s])return this;if(f=(l=this._events[s]).length,c=-1,l===a||r(l.listener)&&l.listener===a)delete this._events[s],this._events.removeListener&&this.emit("removeListener",s,a);else if(i(l)){for(h=f;h-- >0;)if(l[h]===a||l[h].listener&&l[h].listener===a){c=h;break}if(c<0)return this;l.length===1?(l.length=0,delete this._events[s]):l.splice(c,1),this._events.removeListener&&this.emit("removeListener",s,a)}return this},n.prototype.removeAllListeners=function(s){var a,l;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[s]&&delete this._events[s],this;if(arguments.length===0){for(a in this._events)a!=="removeListener"&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events={},this}if(r(l=this._events[s]))this.removeListener(s,l);else if(l)for(;l.length;)this.removeListener(s,l[l.length-1]);return delete this._events[s],this},n.prototype.listeners=function(s){return this._events&&this._events[s]?r(this._events[s])?[this._events[s]]:this._events[s].slice():[]},n.prototype.listenerCount=function(s){if(this._events){var a=this._events[s];if(r(a))return 1;if(a)return a.length}return 0},n.listenerCount=function(s,a){return s.listenerCount(a)}},function(e,t,n){(t=e.exports=n(23)).Stream=t,t.Readable=t,t.Writable=n(14),t.Duplex=n(1),t.Transform=n(27),t.PassThrough=n(45)},function(e,t,n){(function(r,i,o){var s=n(6);function a(A){var W=this;this.next=null,this.entry=null,this.finish=function(){(function(Y,J,Z){var ee=Y.entry;for(Y.entry=null;ee;){var ie=ee.callback;J.pendingcb--,ie(void 0),ee=ee.next}J.corkedRequestsFree?J.corkedRequestsFree.next=Y:J.corkedRequestsFree=Y})(W,A)}}e.exports=S;var l,c=!r.browser&&["v0.10","v0.9."].indexOf(r.version.slice(0,5))>-1?i:s.nextTick;S.WritableState=w;var f=n(5);f.inherits=n(2);var h,p={deprecate:n(44)},m=n(24),v=n(7).Buffer,y=o.Uint8Array||function(){},x=n(25);function _(){}function w(A,W){l=l||n(1),A=A||{};var Y=W instanceof l;this.objectMode=!!A.objectMode,Y&&(this.objectMode=this.objectMode||!!A.writableObjectMode);var J=A.highWaterMark,Z=A.writableHighWaterMark,ee=this.objectMode?16:16384;this.highWaterMark=J||J===0?J:Y&&(Z||Z===0)?Z:ee,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var ie=A.decodeStrings===!1;this.decodeStrings=!ie,this.defaultEncoding=A.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(oe){(function(G,F){var j=G._writableState,B=j.sync,ne=j.writecb;if(function(q){q.writing=!1,q.writecb=null,q.length-=q.writelen,q.writelen=0}(j),F)(function(q,te,se,pe,O){--te.pendingcb,se?(s.nextTick(O,pe),s.nextTick(z,q,te),q._writableState.errorEmitted=!0,q.emit("error",pe)):(O(pe),q._writableState.errorEmitted=!0,q.emit("error",pe),z(q,te))})(G,j,B,F,ne);else{var H=N(j);H||j.corked||j.bufferProcessing||!j.bufferedRequest||k(G,j),B?c(P,G,j,H,ne):P(G,j,H,ne)}})(W,oe)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function S(A){if(l=l||n(1),!(h.call(S,this)||this instanceof l))return new S(A);this._writableState=new w(A,this),this.writable=!0,A&&(typeof A.write=="function"&&(this._write=A.write),typeof A.writev=="function"&&(this._writev=A.writev),typeof A.destroy=="function"&&(this._destroy=A.destroy),typeof A.final=="function"&&(this._final=A.final)),m.call(this)}function T(A,W,Y,J,Z,ee,ie){W.writelen=J,W.writecb=ie,W.writing=!0,W.sync=!0,Y?A._writev(Z,W.onwrite):A._write(Z,ee,W.onwrite),W.sync=!1}function P(A,W,Y,J){Y||function(Z,ee){ee.length===0&&ee.needDrain&&(ee.needDrain=!1,Z.emit("drain"))}(A,W),W.pendingcb--,J(),z(A,W)}function k(A,W){W.bufferProcessing=!0;var Y=W.bufferedRequest;if(A._writev&&Y&&Y.next){var J=W.bufferedRequestCount,Z=new Array(J),ee=W.corkedRequestsFree;ee.entry=Y;for(var ie=0,oe=!0;Y;)Z[ie]=Y,Y.isBuf||(oe=!1),Y=Y.next,ie+=1;Z.allBuffers=oe,T(A,W,!0,W.length,Z,"",ee.finish),W.pendingcb++,W.lastBufferedRequest=null,ee.next?(W.corkedRequestsFree=ee.next,ee.next=null):W.corkedRequestsFree=new a(W),W.bufferedRequestCount=0}else{for(;Y;){var G=Y.chunk,F=Y.encoding,j=Y.callback;if(T(A,W,!1,W.objectMode?1:G.length,G,F,j),Y=Y.next,W.bufferedRequestCount--,W.writing)break}Y===null&&(W.lastBufferedRequest=null)}W.bufferedRequest=Y,W.bufferProcessing=!1}function N(A){return A.ending&&A.length===0&&A.bufferedRequest===null&&!A.finished&&!A.writing}function D(A,W){A._final(function(Y){W.pendingcb--,Y&&A.emit("error",Y),W.prefinished=!0,A.emit("prefinish"),z(A,W)})}function z(A,W){var Y=N(W);return Y&&(function(J,Z){Z.prefinished||Z.finalCalled||(typeof J._final=="function"?(Z.pendingcb++,Z.finalCalled=!0,s.nextTick(D,J,Z)):(Z.prefinished=!0,J.emit("prefinish")))}(A,W),W.pendingcb===0&&(W.finished=!0,A.emit("finish"))),Y}f.inherits(S,m),w.prototype.getBuffer=function(){for(var A=this.bufferedRequest,W=[];A;)W.push(A),A=A.next;return W},function(){try{Object.defineProperty(w.prototype,"buffer",{get:p.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(h=Function.prototype[Symbol.hasInstance],Object.defineProperty(S,Symbol.hasInstance,{value:function(A){return!!h.call(this,A)||this===S&&A&&A._writableState instanceof w}})):h=function(A){return A instanceof this},S.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},S.prototype.write=function(A,W,Y){var J=this._writableState,Z=!1,ee=!J.objectMode&&function(ie){return v.isBuffer(ie)||ie instanceof y}(A);return ee&&!v.isBuffer(A)&&(A=function(ie){return v.from(ie)}(A)),typeof W=="function"&&(Y=W,W=null),ee?W="buffer":W||(W=J.defaultEncoding),typeof Y!="function"&&(Y=_),J.ended?function(ie,oe){var G=new Error("write after end");ie.emit("error",G),s.nextTick(oe,G)}(this,Y):(ee||function(ie,oe,G,F){var j=!0,B=!1;return G===null?B=new TypeError("May not write null values to stream"):typeof G=="string"||G===void 0||oe.objectMode||(B=new TypeError("Invalid non-string/buffer chunk")),B&&(ie.emit("error",B),s.nextTick(F,B),j=!1),j}(this,J,A,Y))&&(J.pendingcb++,Z=function(ie,oe,G,F,j,B){if(!G){var ne=function(se,pe,O){return se.objectMode||se.decodeStrings===!1||typeof pe!="string"||(pe=v.from(pe,O)),pe}(oe,F,j);F!==ne&&(G=!0,j="buffer",F=ne)}var H=oe.objectMode?1:F.length;oe.length+=H;var q=oe.length-1))throw new TypeError("Unknown encoding: "+A);return this._writableState.defaultEncoding=A,this},Object.defineProperty(S.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),S.prototype._write=function(A,W,Y){Y(new Error("_write() is not implemented"))},S.prototype._writev=null,S.prototype.end=function(A,W,Y){var J=this._writableState;typeof A=="function"?(Y=A,A=null,W=null):typeof W=="function"&&(Y=W,W=null),A!=null&&this.write(A,W),J.corked&&(J.corked=1,this.uncork()),J.ending||J.finished||function(Z,ee,ie){ee.ending=!0,z(Z,ee),ie&&(ee.finished?s.nextTick(ie):Z.once("finish",ie)),ee.ended=!0,Z.writable=!1}(this,J,Y)},Object.defineProperty(S.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(A){this._writableState&&(this._writableState.destroyed=A)}}),S.prototype.destroy=x.destroy,S.prototype._undestroy=x.undestroy,S.prototype._destroy=function(A,W){this.end(),W(A)}}).call(this,n(4),n(11).setImmediate,n(0))},function(e,t,n){(function(r,i,o){e.exports=function s(a,l,c){function f(m,v){if(!l[m]){if(!a[m]){var y=typeof _dereq_=="function"&&_dereq_;if(!v&&y)return y(m,!0);if(h)return h(m,!0);var x=new Error("Cannot find module '"+m+"'");throw x.code="MODULE_NOT_FOUND",x}var _=l[m]={exports:{}};a[m][0].call(_.exports,function(w){return f(a[m][1][w]||w)},_,_.exports,s,a,l,c)}return l[m].exports}for(var h=typeof _dereq_=="function"&&_dereq_,p=0;p0;){var w=_.shift();if(typeof w=="function"){var S=_.shift(),T=_.shift();w.call(S,T)}else w._settlePromises()}},m.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},m.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},m.prototype._reset=function(){this._isTickUsed=!1},a.exports=m,a.exports.firstLineError=c},{"./queue":26,"./schedule":29,"./util":36}],3:[function(s,a,l){a.exports=function(c,f,h,p){var m=!1,v=function(w,S){this._reject(S)},y=function(w,S){S.promiseRejectionQueued=!0,S.bindingPromise._then(v,v,null,this,w)},x=function(w,S){!(50397184&this._bitField)&&this._resolveCallback(S.target)},_=function(w,S){S.promiseRejectionQueued||this._reject(w)};c.prototype.bind=function(w){m||(m=!0,c.prototype._propagateFrom=p.propagateFromFunction(),c.prototype._boundValue=p.boundValueFunction());var S=h(w),T=new c(f);T._propagateFrom(this,1);var P=this._target();if(T._setBoundTo(S),S instanceof c){var k={promiseRejectionQueued:!1,promise:T,target:P,bindingPromise:S};P._then(f,y,void 0,T,k),S._then(x,_,void 0,T,k),T._setOnCancel(S)}else T._resolveCallback(P);return T},c.prototype._setBoundTo=function(w){w!==void 0?(this._bitField=2097152|this._bitField,this._boundTo=w):this._bitField=-2097153&this._bitField},c.prototype._isBound=function(){return(2097152&this._bitField)==2097152},c.bind=function(w,S){return c.resolve(S).bind(w)}}},{}],4:[function(s,a,l){var c;typeof Promise<"u"&&(c=Promise);var f=s("./promise")();f.noConflict=function(){try{Promise===f&&(Promise=c)}catch{}return f},a.exports=f},{"./promise":22}],5:[function(s,a,l){var c=Object.create;if(c){var f=c(null),h=c(null);f[" size"]=h[" size"]=0}a.exports=function(p){var m=s("./util"),v=m.canEvaluate;function y(w){return function(S,T){var P;if(S!=null&&(P=S[T]),typeof P!="function"){var k="Object "+m.classString(S)+" has no method '"+m.toString(T)+"'";throw new p.TypeError(k)}return P}(w,this.pop()).apply(w,this)}function x(w){return w[this]}function _(w){var S=+this;return S<0&&(S=Math.max(0,S+w.length)),w[S]}m.isIdentifier,p.prototype.call=function(w){var S=[].slice.call(arguments,1);return S.push(w),this._then(y,void 0,void 0,S,void 0)},p.prototype.get=function(w){var S;if(typeof w=="number")S=_;else if(v){var T=(void 0)(w);S=T!==null?T:x}else S=x;return this._then(S,void 0,void 0,w,void 0)}}},{"./util":36}],6:[function(s,a,l){a.exports=function(c,f,h,p){var m=s("./util"),v=m.tryCatch,y=m.errorObj,x=c._async;c.prototype.break=c.prototype.cancel=function(){if(!p.cancellation())return this._warn("cancellation is disabled");for(var _=this,w=_;_._isCancellable();){if(!_._cancelBy(w)){w._isFollowing()?w._followee().cancel():w._cancelBranched();break}var S=_._cancellationParent;if(S==null||!S._isCancellable()){_._isFollowing()?_._followee().cancel():_._cancelBranched();break}_._isFollowing()&&_._followee().cancel(),_._setWillBeCancelled(),w=_,_=S}},c.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},c.prototype._enoughBranchesHaveCancelled=function(){return this._branchesRemainingToCancel===void 0||this._branchesRemainingToCancel<=0},c.prototype._cancelBy=function(_){return _===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},c.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},c.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),x.invoke(this._cancelPromises,this,void 0))},c.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},c.prototype._unsetOnCancel=function(){this._onCancelField=void 0},c.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},c.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},c.prototype._doInvokeOnCancel=function(_,w){if(m.isArray(_))for(var S=0;S<_.length;++S)this._doInvokeOnCancel(_[S],w);else if(_!==void 0)if(typeof _=="function"){if(!w){var T=v(_).call(this._boundValue());T===y&&(this._attachExtraTrace(T.e),x.throwLater(T.e))}}else _._resultCancelled(this)},c.prototype._invokeOnCancel=function(){var _=this._onCancel();this._unsetOnCancel(),x.invoke(this._doInvokeOnCancel,this,_)},c.prototype._invokeInternalOnCancel=function(){this._isCancellable()&&(this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel())},c.prototype._resultCancelled=function(){this.cancel()}}},{"./util":36}],7:[function(s,a,l){a.exports=function(c){var f=s("./util"),h=s("./es5").keys,p=f.tryCatch,m=f.errorObj;return function(v,y,x){return function(_){var w=x._boundValue();e:for(var S=0;S=0)return h[v]}return c.prototype._promiseCreated=function(){},c.prototype._pushContext=function(){},c.prototype._popContext=function(){return null},c._peekContext=c.prototype._peekContext=function(){},p.prototype._pushContext=function(){this._trace!==void 0&&(this._trace._promiseCreated=null,h.push(this._trace))},p.prototype._popContext=function(){if(this._trace!==void 0){var v=h.pop(),y=v._promiseCreated;return v._promiseCreated=null,y}return null},p.CapturedTrace=null,p.create=function(){if(f)return new p},p.deactivateLongStackTraces=function(){},p.activateLongStackTraces=function(){var v=c.prototype._pushContext,y=c.prototype._popContext,x=c._peekContext,_=c.prototype._peekContext,w=c.prototype._promiseCreated;p.deactivateLongStackTraces=function(){c.prototype._pushContext=v,c.prototype._popContext=y,c._peekContext=x,c.prototype._peekContext=_,c.prototype._promiseCreated=w,f=!1},f=!0,c.prototype._pushContext=p.prototype._pushContext,c.prototype._popContext=p.prototype._popContext,c._peekContext=c.prototype._peekContext=m,c.prototype._promiseCreated=function(){var S=this._peekContext();S&&S._promiseCreated==null&&(S._promiseCreated=this)}},p}},{}],9:[function(s,a,l){a.exports=function(c,f){var h,p,m,v=c._getDomain,y=c._async,x=s("./errors").Warning,_=s("./util"),w=_.canAttachTrace,S=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,T=/\((?:timers\.js):\d+:\d+\)/,P=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,k=null,N=null,D=!1,z=_.env("BLUEBIRD_DEBUG")!=0,A=!(_.env("BLUEBIRD_WARNINGS")==0||!z&&!_.env("BLUEBIRD_WARNINGS")),W=!(_.env("BLUEBIRD_LONG_STACK_TRACES")==0||!z&&!_.env("BLUEBIRD_LONG_STACK_TRACES")),Y=_.env("BLUEBIRD_W_FORGOTTEN_RETURN")!=0&&(A||!!_.env("BLUEBIRD_W_FORGOTTEN_RETURN"));c.prototype.suppressUnhandledRejections=function(){var ce=this._target();ce._bitField=-1048577&ce._bitField|524288},c.prototype._ensurePossibleRejectionHandled=function(){if(!(524288&this._bitField)){this._setRejectionIsUnhandled();var ce=this;setTimeout(function(){ce._notifyUnhandledRejection()},1)}},c.prototype._notifyUnhandledRejectionIsHandled=function(){ge("rejectionHandled",h,void 0,this)},c.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},c.prototype._returnedNonUndefined=function(){return(268435456&this._bitField)!=0},c.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var ce=this._settledValue();this._setUnhandledRejectionIsNotified(),ge("unhandledRejection",p,ce,this)}},c.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},c.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},c.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},c.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},c.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},c.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},c.prototype._warn=function(ce,de,be){return I(ce,de,be||this)},c.onPossiblyUnhandledRejection=function(ce){var de=v();p=typeof ce=="function"?de===null?ce:_.domainBind(de,ce):void 0},c.onUnhandledRejectionHandled=function(ce){var de=v();h=typeof ce=="function"?de===null?ce:_.domainBind(de,ce):void 0};var J=function(){};c.longStackTraces=function(){if(y.haveItemsQueued()&&!Ne.longStackTraces)throw new Error(`cannot enable long stack traces after promises have been created See http://goo.gl/MqrFmX `);if(!Ne.longStackTraces&&ue()){var ce=c.prototype._captureStackTrace,de=c.prototype._attachExtraTrace;Ne.longStackTraces=!0,J=function(){if(y.haveItemsQueued()&&!Ne.longStackTraces)throw new Error(`cannot enable long stack traces after promises have been created See http://goo.gl/MqrFmX `);c.prototype._captureStackTrace=ce,c.prototype._attachExtraTrace=de,f.deactivateLongStackTraces(),y.enableTrampoline(),Ne.longStackTraces=!1},c.prototype._captureStackTrace=O,c.prototype._attachExtraTrace=R,f.activateLongStackTraces(),y.disableTrampolineIfNecessary()}},c.hasLongStackTraces=function(){return Ne.longStackTraces&&ue()};var Z=function(){try{if(typeof CustomEvent=="function"){var ce=new CustomEvent("CustomEvent");return _.global.dispatchEvent(ce),function(de,be){var ye=new CustomEvent(de.toLowerCase(),{detail:be,cancelable:!0});return!_.global.dispatchEvent(ye)}}return typeof Event=="function"?(ce=new Event("CustomEvent"),_.global.dispatchEvent(ce),function(de,be){var ye=new Event(de.toLowerCase(),{cancelable:!0});return ye.detail=be,!_.global.dispatchEvent(ye)}):((ce=document.createEvent("CustomEvent")).initCustomEvent("testingtheevent",!1,!0,{}),_.global.dispatchEvent(ce),function(de,be){var ye=document.createEvent("CustomEvent");return ye.initCustomEvent(de.toLowerCase(),!1,!0,be),!_.global.dispatchEvent(ye)})}catch{}return function(){return!1}}(),ee=_.isNode?function(){return r.emit.apply(r,arguments)}:_.global?function(ce){var de="on"+ce.toLowerCase(),be=_.global[de];return!!be&&(be.apply(_.global,[].slice.call(arguments,1)),!0)}:function(){return!1};function ie(ce,de){return{promise:de}}var oe={promiseCreated:ie,promiseFulfilled:ie,promiseRejected:ie,promiseResolved:ie,promiseCancelled:ie,promiseChained:function(ce,de,be){return{promise:de,child:be}},warning:function(ce,de){return{warning:de}},unhandledRejection:function(ce,de,be){return{reason:de,promise:be}},rejectionHandled:ie},G=function(ce){var de=!1;try{de=ee.apply(null,arguments)}catch(ye){y.throwLater(ye),de=!0}var be=!1;try{be=Z(ce,oe[ce].apply(null,arguments))}catch(ye){y.throwLater(ye),be=!0}return be||de};function F(){return!1}function j(ce,de,be){var ye=this;try{ce(de,be,function(Ce){if(typeof Ce!="function")throw new TypeError("onCancel must be a function, got: "+_.toString(Ce));ye._attachCancellationCallback(Ce)})}catch(Ce){return Ce}}function B(ce){if(!this._isCancellable())return this;var de=this._onCancel();de!==void 0?_.isArray(de)?de.push(ce):this._setOnCancel([de,ce]):this._setOnCancel(ce)}function ne(){return this._onCancelField}function H(ce){this._onCancelField=ce}function q(){this._cancellationParent=void 0,this._onCancelField=void 0}function te(ce,de){if(1&de){this._cancellationParent=ce;var be=ce._branchesRemainingToCancel;be===void 0&&(be=0),ce._branchesRemainingToCancel=be+1}2&de&&ce._isBound()&&this._setBoundTo(ce._boundTo)}c.config=function(ce){if("longStackTraces"in(ce=Object(ce))&&(ce.longStackTraces?c.longStackTraces():!ce.longStackTraces&&c.hasLongStackTraces()&&J()),"warnings"in ce){var de=ce.warnings;Ne.warnings=!!de,Y=Ne.warnings,_.isObject(de)&&"wForgottenReturn"in de&&(Y=!!de.wForgottenReturn)}if("cancellation"in ce&&ce.cancellation&&!Ne.cancellation){if(y.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");c.prototype._clearCancellationData=q,c.prototype._propagateFrom=te,c.prototype._onCancel=ne,c.prototype._setOnCancel=H,c.prototype._attachCancellationCallback=B,c.prototype._execute=j,se=te,Ne.cancellation=!0}return"monitoring"in ce&&(ce.monitoring&&!Ne.monitoring?(Ne.monitoring=!0,c.prototype._fireEvent=G):!ce.monitoring&&Ne.monitoring&&(Ne.monitoring=!1,c.prototype._fireEvent=F)),c},c.prototype._fireEvent=F,c.prototype._execute=function(ce,de,be){try{ce(de,be)}catch(ye){return ye}},c.prototype._onCancel=function(){},c.prototype._setOnCancel=function(ce){},c.prototype._attachCancellationCallback=function(ce){},c.prototype._captureStackTrace=function(){},c.prototype._attachExtraTrace=function(){},c.prototype._clearCancellationData=function(){},c.prototype._propagateFrom=function(ce,de){};var se=function(ce,de){2&de&&ce._isBound()&&this._setBoundTo(ce._boundTo)};function pe(){var ce=this._boundTo;return ce!==void 0&&ce instanceof c?ce.isFulfilled()?ce.value():void 0:ce}function O(){this._trace=new De(this._peekContext())}function R(ce,de){if(w(ce)){var be=this._trace;if(be!==void 0&&de&&(be=be._parent),be!==void 0)be.attachExtraTrace(ce);else if(!ce.__stackCleaned__){var ye=K(ce);_.notEnumerableProp(ce,"stack",ye.message+` `+ye.stack.join(` `)),_.notEnumerableProp(ce,"__stackCleaned__",!0)}}}function I(ce,de,be){if(Ne.warnings){var ye,Ce=new x(ce);if(de)be._attachExtraTrace(Ce);else if(Ne.longStackTraces&&(ye=c._peekContext()))ye.attachExtraTrace(Ce);else{var ke=K(Ce);Ce.stack=ke.message+` `+ke.stack.join(` `)}G("warning",Ce)||ae(Ce,"",!0)}}function X(ce){for(var de=[],be=0;be0?function(ye){for(var Ce=ye.stack.replace(/\s+$/g,"").split(` `),ke=0;ke0&&ye.name!="SyntaxError"&&(Ce=Ce.slice(ke)),Ce}(ce):[" (No stack trace)"],{message:be,stack:ce.name=="SyntaxError"?de:X(de)}}function ae(ce,de,be){if(typeof console<"u"){var ye;if(_.isObject(ce)){var Ce=ce.stack;ye=de+N(Ce,ce)}else ye=de+String(ce);typeof m=="function"?m(ye,be):typeof console.log!="function"&&typeof console.log!="object"||console.log(ye)}}function ge(ce,de,be,ye){var Ce=!1;try{typeof de=="function"&&(Ce=!0,ce==="rejectionHandled"?de(ye):de(be,ye))}catch(ke){y.throwLater(ke)}ce==="unhandledRejection"?G(ce,be,ye)||Ce||ae(be,"Unhandled rejection "):G(ce,ye)}function Le(ce){var de;if(typeof ce=="function")de="[function "+(ce.name||"anonymous")+"]";else{if(de=ce&&typeof ce.toString=="function"?ce.toString():_.toString(ce),/\[object [a-zA-Z0-9$_]+\]/.test(de))try{de=JSON.stringify(ce)}catch{}de.length===0&&(de="(empty array)")}return"(<"+function(be){return be.length<41?be:be.substr(0,38)+"..."}(de)+">, no stack trace)"}function ue(){return typeof Re=="function"}var ve=function(){return!1},_e=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function Te(ce){var de=ce.match(_e);if(de)return{fileName:de[1],line:parseInt(de[2],10)}}function De(ce){this._parent=ce,this._promisesCreated=0;var de=this._length=1+(ce===void 0?0:ce._length);Re(this,De),de>32&&this.uncycle()}_.inherits(De,Error),f.CapturedTrace=De,De.prototype.uncycle=function(){var ce=this._length;if(!(ce<2)){for(var de=[],be={},ye=0,Ce=this;Ce!==void 0;++ye)de.push(Ce),Ce=Ce._parent;for(ye=(ce=this._length=ye)-1;ye>=0;--ye){var ke=de[ye].stack;be[ke]===void 0&&(be[ke]=ye)}for(ye=0;ye0&&(de[Ie-1]._parent=void 0,de[Ie-1]._length=1),de[ye]._parent=void 0,de[ye]._length=1;var Je=ye>0?de[ye-1]:this;Ie=0;--Ge)de[Ge]._length=et,et++;return}}}},De.prototype.attachExtraTrace=function(ce){if(!ce.__stackCleaned__){this.uncycle();for(var de=K(ce),be=de.message,ye=[de.stack],Ce=this;Ce!==void 0;)ye.push(X(Ce.stack.split(` `))),Ce=Ce._parent;(function(ke){for(var Ie=ke[0],Je=1;Je=0;--wn)if(et[wn]===Wt){$t=wn;break}for(wn=$t;wn>=0;--wn){var ir=et[wn];if(Ie[Ge]!==ir)break;Ie.pop(),Ge--}Ie=et}})(ye),function(ke){for(var Ie=0;Ie=0)return k=/@/,N=de,D=!0,function(ke){ke.stack=new Error().stack};try{throw new Error}catch(ke){ye="stack"in ke}return"stack"in Ce||!ye||typeof Error.stackTraceLimit!="number"?(N=function(ke,Ie){return typeof ke=="string"?ke:typeof Ie!="object"&&typeof Ie!="function"||Ie.name===void 0||Ie.message===void 0?Le(Ie):Ie.toString()},null):(k=ce,N=de,function(ke){Error.stackTraceLimit+=6;try{throw new Error}catch(Ie){ke.stack=Ie.stack}Error.stackTraceLimit-=6})}();typeof console<"u"&&console.warn!==void 0&&(m=function(ce){console.warn(ce)},_.isNode&&r.stderr.isTTY?m=function(ce,de){var be=de?"\x1B[33m":"\x1B[31m";console.warn(be+ce+`\x1B[0m `)}:_.isNode||typeof new Error().stack!="string"||(m=function(ce,de){console.warn("%c"+ce,de?"color: darkorange":"color: red")}));var Ne={warnings:A,longStackTraces:!1,cancellation:!1,monitoring:!1};return W&&c.longStackTraces(),{longStackTraces:function(){return Ne.longStackTraces},warnings:function(){return Ne.warnings},cancellation:function(){return Ne.cancellation},monitoring:function(){return Ne.monitoring},propagateFromFunction:function(){return se},boundValueFunction:function(){return pe},checkForgottenReturns:function(ce,de,be,ye,Ce){if(ce===void 0&&de!==null&&Y){if(Ce!==void 0&&Ce._returnedNonUndefined()||!(65535&ye._bitField))return;be&&(be+=" ");var ke="",Ie="";if(de._trace){for(var Je=de._trace.stack.split(` `),et=X(Je),Ge=et.length-1;Ge>=0;--Ge){var Wt=et[Ge];if(!T.test(Wt)){var $t=Wt.match(P);$t&&(ke="at "+$t[1]+":"+$t[2]+":"+$t[3]+" ");break}}if(et.length>0){var wn=et[0];for(Ge=0;Ge0&&(Ie=` `+Je[Ge-1]);break}}}var ir="a promise was created in a "+be+"handler "+ke+"but was not returned from it, see http://goo.gl/rRqMUw"+Ie;ye._warn(ir,!0,de)}},setBounds:function(ce,de){if(ue()){for(var be,ye,Ce=ce.stack.split(` `),ke=de.stack.split(` `),Ie=-1,Je=-1,et=0;et=Je||(ve=function(Wt){if(S.test(Wt))return!0;var $t=Te(Wt);return!!($t&&$t.fileName===be&&Ie<=$t.line&&$t.line<=Je)})}},warn:I,deprecated:function(ce,de){var be=ce+" is deprecated and will be removed in a future version.";return de&&(be+=" Use "+de+" instead."),I(be)},CapturedTrace:De,fireDomEvent:Z,fireGlobalEvent:ee}}},{"./errors":12,"./util":36}],10:[function(s,a,l){a.exports=function(c){function f(){return this.value}function h(){throw this.reason}c.prototype.return=c.prototype.thenReturn=function(p){return p instanceof c&&p.suppressUnhandledRejections(),this._then(f,void 0,void 0,{value:p},void 0)},c.prototype.throw=c.prototype.thenThrow=function(p){return this._then(h,void 0,void 0,{reason:p},void 0)},c.prototype.catchThrow=function(p){if(arguments.length<=1)return this._then(void 0,h,void 0,{reason:p},void 0);var m=arguments[1];return this.caught(p,function(){throw m})},c.prototype.catchReturn=function(p){if(arguments.length<=1)return p instanceof c&&p.suppressUnhandledRejections(),this._then(void 0,f,void 0,{value:p},void 0);var m=arguments[1];return m instanceof c&&m.suppressUnhandledRejections(),this.caught(p,function(){return m})}}},{}],11:[function(s,a,l){a.exports=function(c,f){var h=c.reduce,p=c.all;function m(){return p(this)}c.prototype.each=function(v){return h(this,v,f,0)._then(m,void 0,void 0,this,void 0)},c.prototype.mapSeries=function(v){return h(this,v,f,f)},c.each=function(v,y){return h(v,y,f,0)._then(m,void 0,void 0,v,void 0)},c.mapSeries=function(v,y){return h(v,y,f,f)}}},{}],12:[function(s,a,l){var c,f,h=s("./es5"),p=h.freeze,m=s("./util"),v=m.inherits,y=m.notEnumerableProp;function x(A,W){function Y(J){if(!(this instanceof Y))return new Y(J);y(this,"message",typeof J=="string"?J:W),y(this,"name",A),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return v(Y,Error),Y}var _=x("Warning","warning"),w=x("CancellationError","cancellation error"),S=x("TimeoutError","timeout error"),T=x("AggregateError","aggregate error");try{c=TypeError,f=RangeError}catch{c=x("TypeError","type error"),f=x("RangeError","range error")}for(var P="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),k=0;k1?k.cancelPromise._reject(N):k.cancelPromise._cancel(),k.cancelPromise=null,!0)}function S(){return P.call(this,this.promise._target()._settledValue())}function T(k){if(!w(this,k))return v.e=k,v}function P(k){var N=this.promise,D=this.handler;if(!this.called){this.called=!0;var z=this.isFinallyHandler()?D.call(N._boundValue()):D.call(N._boundValue(),k);if(z===h)return z;if(z!==void 0){N._setReturnedNonUndefined();var A=f(z,N);if(A instanceof c){if(this.cancelPromise!=null){if(A._isCancelled()){var W=new m("late cancellation observer");return N._attachExtraTrace(W),v.e=W,v}A.isPending()&&A._attachCancellationCallback(new _(this))}return A._then(S,T,void 0,this,void 0)}}}return N.isRejected()?(w(this),v.e=k,v):(w(this),k)}return x.prototype.isFinallyHandler=function(){return this.type===0},_.prototype._resultCancelled=function(){w(this.finallyHandler)},c.prototype._passThrough=function(k,N,D,z){return typeof k!="function"?this.then():this._then(D,z,void 0,new x(this,N,k),void 0)},c.prototype.lastly=c.prototype.finally=function(k){return this._passThrough(k,0,P,P)},c.prototype.tap=function(k){return this._passThrough(k,1,P)},c.prototype.tapCatch=function(k){var N=arguments.length;if(N===1)return this._passThrough(k,1,void 0,P);var D,z=new Array(N-1),A=0;for(D=0;D0&&typeof arguments[_]=="function"&&(x=arguments[_]);var w=[].slice.call(arguments);x&&w.pop();var S=new f(w).promise();return x!==void 0?S.spread(x):S}}},{"./util":36}],18:[function(s,a,l){a.exports=function(c,f,h,p,m,v){var y=c._getDomain,x=s("./util"),_=x.tryCatch,w=x.errorObj,S=c._async;function T(k,N,D,z){this.constructor$(k),this._promise._captureStackTrace();var A=y();this._callback=A===null?N:x.domainBind(A,N),this._preservedValues=z===m?new Array(this.length()):null,this._limit=D,this._inFlight=0,this._queue=[],S.invoke(this._asyncInit,this,void 0)}function P(k,N,D,z){if(typeof N!="function")return h("expecting a function but got "+x.classString(N));var A=0;if(D!==void 0){if(typeof D!="object"||D===null)return c.reject(new TypeError("options argument must be an object but it is "+x.classString(D)));if(typeof D.concurrency!="number")return c.reject(new TypeError("'concurrency' must be a number but it is "+x.classString(D.concurrency)));A=D.concurrency}return new T(k,N,A=typeof A=="number"&&isFinite(A)&&A>=1?A:0,z).promise()}x.inherits(T,f),T.prototype._asyncInit=function(){this._init$(void 0,-2)},T.prototype._init=function(){},T.prototype._promiseFulfilled=function(k,N){var D=this._values,z=this.length(),A=this._preservedValues,W=this._limit;if(N<0){if(D[N=-1*N-1]=k,W>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(W>=1&&this._inFlight>=W)return D[N]=k,this._queue.push(N),!1;A!==null&&(A[N]=k);var Y=this._promise,J=this._callback,Z=Y._boundValue();Y._pushContext();var ee=_(J).call(Z,k,N,z),ie=Y._popContext();if(v.checkForgottenReturns(ee,ie,A!==null?"Promise.filter":"Promise.map",Y),ee===w)return this._reject(ee.e),!0;var oe=p(ee,this._promise);if(oe instanceof c){var G=(oe=oe._target())._bitField;if(!(50397184&G))return W>=1&&this._inFlight++,D[N]=oe,oe._proxy(this,-1*(N+1)),!1;if(!(33554432&G))return 16777216&G?(this._reject(oe._reason()),!0):(this._cancel(),!0);ee=oe._value()}D[N]=ee}return++this._totalResolved>=z&&(A!==null?this._filter(D,A):this._resolve(D),!0)},T.prototype._drainQueue=function(){for(var k=this._queue,N=this._limit,D=this._values;k.length>0&&this._inFlight1){m.deprecated("calling Promise.try with more than 1 argument");var S=arguments[1],T=arguments[2];_=v.isArray(S)?y(x).apply(T,S):y(x).call(T,S)}else _=y(x)();var P=w._popContext();return m.checkForgottenReturns(_,P,"Promise.try",w),w._resolveFromSyncValue(_),w},c.prototype._resolveFromSyncValue=function(x){x===v.errorObj?this._rejectCallback(x.e,!1):this._resolveCallback(x,!0)}}},{"./util":36}],20:[function(s,a,l){var c=s("./util"),f=c.maybeWrapAsError,h=s("./errors").OperationalError,p=s("./es5"),m=/^(?:name|message|stack|cause)$/;function v(y){var x;if(function(T){return T instanceof Error&&p.getPrototypeOf(T)===Error.prototype}(y)){(x=new h(y)).name=y.name,x.message=y.message,x.stack=y.stack;for(var _=p.keys(y),w=0;w<_.length;++w){var S=_[w];m.test(S)||(x[S]=y[S])}return x}return c.markAsOriginatingFromRejection(y),y}a.exports=function(y,x){return function(_,w){if(y!==null){if(_){var S=v(f(_));y._attachExtraTrace(S),y._reject(S)}else if(x){var T=[].slice.call(arguments,1);y._fulfill(T)}else y._fulfill(w);y=null}}}},{"./errors":12,"./es5":13,"./util":36}],21:[function(s,a,l){a.exports=function(c){var f=s("./util"),h=c._async,p=f.tryCatch,m=f.errorObj;function v(_,w){if(!f.isArray(_))return y.call(this,_,w);var S=p(w).apply(this._boundValue(),[null].concat(_));S===m&&h.throwLater(S.e)}function y(_,w){var S=this._boundValue(),T=_===void 0?p(w).call(S,null):p(w).call(S,null,_);T===m&&h.throwLater(T.e)}function x(_,w){if(!_){var S=new Error(_+"");S.cause=_,_=S}var T=p(w).call(this._boundValue(),_);T===m&&h.throwLater(T.e)}c.prototype.asCallback=c.prototype.nodeify=function(_,w){if(typeof _=="function"){var S=y;w!==void 0&&Object(w).spread&&(S=v),this._then(S,x,void 0,this,_)}return this}}},{"./util":36}],22:[function(s,a,l){a.exports=function(){var c=function(){return new T(`circular promise resolution chain See http://goo.gl/MqrFmX `)},f=function(){return new F.PromiseInspection(this._target())},h=function(H){return F.reject(new T(H))};function p(){}var m,v={},y=s("./util");m=y.isNode?function(){var H=r.domain;return H===void 0&&(H=null),H}:function(){return null},y.notEnumerableProp(F,"_getDomain",m);var x=s("./es5"),_=s("./async"),w=new _;x.defineProperty(F,"_async",{value:w});var S=s("./errors"),T=F.TypeError=S.TypeError;F.RangeError=S.RangeError;var P=F.CancellationError=S.CancellationError;F.TimeoutError=S.TimeoutError,F.OperationalError=S.OperationalError,F.RejectionError=S.OperationalError,F.AggregateError=S.AggregateError;var k=function(){},N={},D={},z=s("./thenables")(F,k),A=s("./promise_array")(F,k,z,h,p),W=s("./context")(F),Y=W.create,J=s("./debuggability")(F,W),Z=(J.CapturedTrace,s("./finally")(F,z,D)),ee=s("./catch_filter")(D),ie=s("./nodeback"),oe=y.errorObj,G=y.tryCatch;function F(H){H!==k&&function(q,te){if(q==null||q.constructor!==F)throw new T(`the promise constructor cannot be invoked directly See http://goo.gl/MqrFmX `);if(typeof te!="function")throw new T("expecting a function but got "+y.classString(te))}(this,H),this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,this._resolveFromExecutor(H),this._promiseCreated(),this._fireEvent("promiseCreated",this)}function j(H){this.promise._resolveCallback(H)}function B(H){this.promise._rejectCallback(H,!1)}function ne(H){var q=new F(k);q._fulfillmentHandler0=H,q._rejectionHandler0=H,q._promise0=H,q._receiver0=H}return F.prototype.toString=function(){return"[object Promise]"},F.prototype.caught=F.prototype.catch=function(H){var q=arguments.length;if(q>1){var te,se=new Array(q-1),pe=0;for(te=0;te0&&typeof H!="function"&&typeof q!="function"){var te=".then() only accepts functions but was passed: "+y.classString(H);arguments.length>1&&(te+=", "+y.classString(q)),this._warn(te)}return this._then(H,q,void 0,void 0,void 0)},F.prototype.done=function(H,q){this._then(H,q,void 0,void 0,void 0)._setIsFinal()},F.prototype.spread=function(H){return typeof H!="function"?h("expecting a function but got "+y.classString(H)):this.all()._then(H,void 0,void 0,N,void 0)},F.prototype.toJSON=function(){var H={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(H.fulfillmentValue=this.value(),H.isFulfilled=!0):this.isRejected()&&(H.rejectionReason=this.reason(),H.isRejected=!0),H},F.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new A(this).promise()},F.prototype.error=function(H){return this.caught(y.originatesFromRejection,H)},F.getNewLibraryCopy=a.exports,F.is=function(H){return H instanceof F},F.fromNode=F.fromCallback=function(H){var q=new F(k);q._captureStackTrace();var te=arguments.length>1&&!!Object(arguments[1]).multiArgs,se=G(H)(ie(q,te));return se===oe&&q._rejectCallback(se.e,!0),q._isFateSealed()||q._setAsyncGuaranteed(),q},F.all=function(H){return new A(H).promise()},F.cast=function(H){var q=z(H);return q instanceof F||((q=new F(k))._captureStackTrace(),q._setFulfilled(),q._rejectionHandler0=H),q},F.resolve=F.fulfilled=F.cast,F.reject=F.rejected=function(H){var q=new F(k);return q._captureStackTrace(),q._rejectCallback(H,!0),q},F.setScheduler=function(H){if(typeof H!="function")throw new T("expecting a function but got "+y.classString(H));return w.setScheduler(H)},F.prototype._then=function(H,q,te,se,pe){var O=pe!==void 0,R=O?pe:new F(k),I=this._target(),X=I._bitField;O||(R._propagateFrom(this,3),R._captureStackTrace(),se===void 0&&2097152&this._bitField&&(se=50397184&X?this._boundValue():I===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,R));var K=m();if(50397184&X){var ae,ge,Le=I._settlePromiseCtx;33554432&X?(ge=I._rejectionHandler0,ae=H):16777216&X?(ge=I._fulfillmentHandler0,ae=q,I._unsetRejectionIsUnhandled()):(Le=I._settlePromiseLateCancellationObserver,ge=new P("late cancellation observer"),I._attachExtraTrace(ge),ae=q),w.invoke(Le,I,{handler:K===null?ae:typeof ae=="function"&&y.domainBind(K,ae),promise:R,receiver:se,value:ge})}else I._addCallbacks(H,q,R,se,K);return R},F.prototype._length=function(){return 65535&this._bitField},F.prototype._isFateSealed=function(){return(117506048&this._bitField)!=0},F.prototype._isFollowing=function(){return(67108864&this._bitField)==67108864},F.prototype._setLength=function(H){this._bitField=-65536&this._bitField|65535&H},F.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},F.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},F.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},F.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},F.prototype._isFinal=function(){return(4194304&this._bitField)>0},F.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},F.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},F.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},F.prototype._setAsyncGuaranteed=function(){w.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},F.prototype._receiverAt=function(H){var q=H===0?this._receiver0:this[4*H-4+3];if(q!==v)return q===void 0&&this._isBound()?this._boundValue():q},F.prototype._promiseAt=function(H){return this[4*H-4+2]},F.prototype._fulfillmentHandlerAt=function(H){return this[4*H-4+0]},F.prototype._rejectionHandlerAt=function(H){return this[4*H-4+1]},F.prototype._boundValue=function(){},F.prototype._migrateCallback0=function(H){H._bitField;var q=H._fulfillmentHandler0,te=H._rejectionHandler0,se=H._promise0,pe=H._receiverAt(0);pe===void 0&&(pe=v),this._addCallbacks(q,te,se,pe,null)},F.prototype._migrateCallbackAt=function(H,q){var te=H._fulfillmentHandlerAt(q),se=H._rejectionHandlerAt(q),pe=H._promiseAt(q),O=H._receiverAt(q);O===void 0&&(O=v),this._addCallbacks(te,se,pe,O,null)},F.prototype._addCallbacks=function(H,q,te,se,pe){var O=this._length();if(O>=65531&&(O=0,this._setLength(0)),O===0)this._promise0=te,this._receiver0=se,typeof H=="function"&&(this._fulfillmentHandler0=pe===null?H:y.domainBind(pe,H)),typeof q=="function"&&(this._rejectionHandler0=pe===null?q:y.domainBind(pe,q));else{var R=4*O-4;this[R+2]=te,this[R+3]=se,typeof H=="function"&&(this[R+0]=pe===null?H:y.domainBind(pe,H)),typeof q=="function"&&(this[R+1]=pe===null?q:y.domainBind(pe,q))}return this._setLength(O+1),O},F.prototype._proxy=function(H,q){this._addCallbacks(void 0,void 0,q,H,null)},F.prototype._resolveCallback=function(H,q){if(!(117506048&this._bitField)){if(H===this)return this._rejectCallback(c(),!1);var te=z(H,this);if(!(te instanceof F))return this._fulfill(H);q&&this._propagateFrom(te,2);var se=te._target();if(se!==this){var pe=se._bitField;if(50397184&pe)if(33554432&pe)this._fulfill(se._value());else if(16777216&pe)this._reject(se._reason());else{var I=new P("late cancellation observer");se._attachExtraTrace(I),this._reject(I)}else{var O=this._length();O>0&&se._migrateCallback0(this);for(var R=1;R>>16)){if(H===this){var te=c();return this._attachExtraTrace(te),this._reject(te)}this._setFulfilled(),this._rejectionHandler0=H,(65535&q)>0&&(134217728&q?this._settlePromises():w.settlePromises(this))}},F.prototype._reject=function(H){var q=this._bitField;if(!((117506048&q)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=H,this._isFinal())return w.fatalError(H,y.isNode);(65535&q)>0?w.settlePromises(this):this._ensurePossibleRejectionHandled()}},F.prototype._fulfillPromises=function(H,q){for(var te=1;te0){if(16842752&H){var te=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,te,H),this._rejectPromises(q,te)}else{var se=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,se,H),this._fulfillPromises(q,se)}this._setLength(0)}this._clearCancellationData()},F.prototype._settledValue=function(){var H=this._bitField;return 33554432&H?this._rejectionHandler0:16777216&H?this._fulfillmentHandler0:void 0},F.defer=F.pending=function(){return J.deprecated("Promise.defer","new Promise"),{promise:new F(k),resolve:j,reject:B}},y.notEnumerableProp(F,"_makeSelfResolutionError",c),s("./method")(F,k,z,h,J),s("./bind")(F,k,z,J),s("./cancel")(F,A,h,J),s("./direct_resolve")(F),s("./synchronous_inspection")(F),s("./join")(F,A,z,k,w,m),F.Promise=F,F.version="3.5.1",s("./map.js")(F,A,h,z,k,J),s("./call_get.js")(F),s("./using.js")(F,h,z,Y,k,J),s("./timers.js")(F,k,J),s("./generators.js")(F,h,k,z,p,J),s("./nodeify.js")(F),s("./promisify.js")(F,k),s("./props.js")(F,A,z,h),s("./race.js")(F,k,z,h),s("./reduce.js")(F,A,h,z,k,J),s("./settle.js")(F,A,J),s("./some.js")(F,A,h),s("./filter.js")(F,k),s("./each.js")(F,k),s("./any.js")(F),y.toFastProperties(F),y.toFastProperties(F.prototype),ne({a:1}),ne({b:2}),ne({c:3}),ne(1),ne(function(){}),ne(void 0),ne(!1),ne(new F(k)),J.setBounds(_.firstLineError,y.lastLineError),F}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(s,a,l){a.exports=function(c,f,h,p,m){var v=s("./util");function y(x){var _=this._promise=new c(f);x instanceof c&&_._propagateFrom(x,3),_._setOnCancel(this),this._values=x,this._length=0,this._totalResolved=0,this._init(void 0,-2)}return v.isArray,v.inherits(y,m),y.prototype.length=function(){return this._length},y.prototype.promise=function(){return this._promise},y.prototype._init=function x(_,w){var S=h(this._values,this._promise);if(S instanceof c){var T=(S=S._target())._bitField;if(this._values=S,(50397184&T)==0)return this._promise._setAsyncGuaranteed(),S._then(x,this._reject,void 0,this,w);if(!(33554432&T))return 16777216&T?this._reject(S._reason()):this._cancel();S=S._value()}if((S=v.asArray(S))!==null)S.length!==0?this._iterate(S):w===-5?this._resolveEmptyArray():this._resolve(function(k){switch(w){case-2:return[];case-3:return{};case-6:return new Map}}());else{var P=p("expecting an array or an iterable object but got "+v.classString(S)).reason();this._promise._rejectCallback(P,!1)}},y.prototype._iterate=function(x){var _=this.getActualLength(x.length);this._length=_,this._values=this.shouldCopyValues()?new Array(_):this._values;for(var w=this._promise,S=!1,T=null,P=0;P<_;++P){var k=h(x[P],w);T=k instanceof c?(k=k._target())._bitField:null,S?T!==null&&k.suppressUnhandledRejections():T!==null?50397184&T?S=33554432&T?this._promiseFulfilled(k._value(),P):16777216&T?this._promiseRejected(k._reason(),P):this._promiseCancelled(P):(k._proxy(this,P),this._values[P]=k):S=this._promiseFulfilled(k,P)}S||w._setAsyncGuaranteed()},y.prototype._isResolved=function(){return this._values===null},y.prototype._resolve=function(x){this._values=null,this._promise._fulfill(x)},y.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},y.prototype._reject=function(x){this._values=null,this._promise._rejectCallback(x,!1)},y.prototype._promiseFulfilled=function(x,_){return this._values[_]=x,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},y.prototype._promiseCancelled=function(){return this._cancel(),!0},y.prototype._promiseRejected=function(x){return this._totalResolved++,this._reject(x),!0},y.prototype._resultCancelled=function(){if(!this._isResolved()){var x=this._values;if(this._cancel(),x instanceof c)x.cancel();else for(var _=0;_=this._length){var k;if(this._isMap)k=function(A){for(var W=new m,Y=A.length/2|0,J=0;J>1},c.prototype.props=function(){return S(this)},c.props=function(T){return S(T)}}},{"./es5":13,"./util":36}],26:[function(s,a,l){function c(f){this._capacity=f,this._length=0,this._front=0}c.prototype._willBeOverCapacity=function(f){return this._capacity"u"){var p=i.setImmediate,m=r.nextTick;c=f.isRecentNode?function(y){p.call(i,y)}:function(y){m.call(r,y)}}else if(typeof h=="function"&&typeof h.resolve=="function"){var v=h.resolve();c=function(y){v.then(y)}}else c=typeof MutationObserver>"u"||typeof window<"u"&&window.navigator&&(window.navigator.standalone||window.cordova)?o!==void 0?function(y){o(y)}:typeof setTimeout<"u"?function(y){setTimeout(y,0)}:function(){throw new Error(`No async scheduler available See http://goo.gl/MqrFmX `)}:function(){var y=document.createElement("div"),x={attributes:!0},_=!1,w=document.createElement("div");return new MutationObserver(function(){y.classList.toggle("foo"),_=!1}).observe(w,x),function(S){var T=new MutationObserver(function(){T.disconnect(),S()});T.observe(y,x),_||(_=!0,w.classList.toggle("foo"))}}();a.exports=c},{"./util":36}],30:[function(s,a,l){a.exports=function(c,f,h){var p=c.PromiseInspection;function m(v){this.constructor$(v)}s("./util").inherits(m,f),m.prototype._promiseResolved=function(v,y){return this._values[v]=y,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},m.prototype._promiseFulfilled=function(v,y){var x=new p;return x._bitField=33554432,x._settledValueField=v,this._promiseResolved(y,x)},m.prototype._promiseRejected=function(v,y){var x=new p;return x._bitField=16777216,x._settledValueField=v,this._promiseResolved(y,x)},c.settle=function(v){return h.deprecated(".settle()",".reflect()"),new m(v).promise()},c.prototype.settle=function(){return c.settle(this)}}},{"./util":36}],31:[function(s,a,l){a.exports=function(c,f,h){var p=s("./util"),m=s("./errors").RangeError,v=s("./errors").AggregateError,y=p.isArray,x={};function _(S){this.constructor$(S),this._howMany=0,this._unwrap=!1,this._initialized=!1}function w(S,T){if((0|T)!==T||T<0)return h(`expecting a positive integer See http://goo.gl/MqrFmX `);var P=new _(S),k=P.promise();return P.setHowMany(T),P.init(),k}p.inherits(_,f),_.prototype._init=function(){if(this._initialized)if(this._howMany!==0){this._init$(void 0,-5);var S=y(this._values);!this._isResolved()&&S&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}else this._resolve([])},_.prototype.init=function(){this._initialized=!0,this._init()},_.prototype.setUnwrap=function(){this._unwrap=!0},_.prototype.howMany=function(){return this._howMany},_.prototype.setHowMany=function(S){this._howMany=S},_.prototype._promiseFulfilled=function(S){return this._addFulfilled(S),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),this.howMany()===1&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},_.prototype._promiseRejected=function(S){return this._addRejected(S),this._checkOutcome()},_.prototype._promiseCancelled=function(){return this._values instanceof c||this._values==null?this._cancel():(this._addRejected(x),this._checkOutcome())},_.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var S=new v,T=this.length();T0?this._reject(S):this._cancel(),!0}return!1},_.prototype._fulfilled=function(){return this._totalResolved},_.prototype._rejected=function(){return this._values.length-this.length()},_.prototype._addRejected=function(S){this._values.push(S)},_.prototype._addFulfilled=function(S){this._values[this._totalResolved++]=S},_.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},_.prototype._getRangeError=function(S){var T="Input array must contain at least "+this._howMany+" items but contains only "+S+" items";return new m(T)},_.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},c.some=function(S,T){return w(S,T)},c.prototype.some=function(S){return w(this,S)},c._SomePromiseArray=_}},{"./errors":12,"./util":36}],32:[function(s,a,l){a.exports=function(c){function f(_){_!==void 0?(_=_._target(),this._bitField=_._bitField,this._settledValueField=_._isFateSealed()?_._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}f.prototype._settledValue=function(){return this._settledValueField};var h=f.prototype.value=function(){if(!this.isFulfilled())throw new TypeError(`cannot get fulfillment value of a non-fulfilled promise See http://goo.gl/MqrFmX `);return this._settledValue()},p=f.prototype.error=f.prototype.reason=function(){if(!this.isRejected())throw new TypeError(`cannot get rejection reason of a non-rejected promise See http://goo.gl/MqrFmX `);return this._settledValue()},m=f.prototype.isFulfilled=function(){return(33554432&this._bitField)!=0},v=f.prototype.isRejected=function(){return(16777216&this._bitField)!=0},y=f.prototype.isPending=function(){return(50397184&this._bitField)==0},x=f.prototype.isResolved=function(){return(50331648&this._bitField)!=0};f.prototype.isCancelled=function(){return(8454144&this._bitField)!=0},c.prototype.__isCancelled=function(){return(65536&this._bitField)==65536},c.prototype._isCancelled=function(){return this._target().__isCancelled()},c.prototype.isCancelled=function(){return(8454144&this._target()._bitField)!=0},c.prototype.isPending=function(){return y.call(this._target())},c.prototype.isRejected=function(){return v.call(this._target())},c.prototype.isFulfilled=function(){return m.call(this._target())},c.prototype.isResolved=function(){return x.call(this._target())},c.prototype.value=function(){return h.call(this._target())},c.prototype.reason=function(){var _=this._target();return _._unsetRejectionIsUnhandled(),p.call(_)},c.prototype._value=function(){return this._settledValue()},c.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},c.PromiseInspection=f}},{}],33:[function(s,a,l){a.exports=function(c,f){var h=s("./util"),p=h.errorObj,m=h.isObject,v={}.hasOwnProperty;return function(y,x){if(m(y)){if(y instanceof c)return y;var _=function(S){try{return function(T){return T.then}(S)}catch(T){return p.e=T,p}}(y);if(_===p){x&&x._pushContext();var w=c.reject(_.e);return x&&x._popContext(),w}if(typeof _=="function")return function(S){try{return v.call(S,"_promise0")}catch{return!1}}(y)?(w=new c(f),y._then(w._fulfill,w._reject,void 0,w,null),w):function(S,T,P){var k=new c(f),N=k;P&&P._pushContext(),k._captureStackTrace(),P&&P._popContext();var D=!0,z=h.tryCatch(T).call(S,function(A){k&&(k._resolveCallback(A),k=null)},function(A){k&&(k._rejectCallback(A,D,!0),k=null)});return D=!1,k&&z===p&&(k._rejectCallback(z.e,!0,!0),k=null),N}(y,_,x)}return y}}},{"./util":36}],34:[function(s,a,l){a.exports=function(c,f,h){var p=s("./util"),m=c.TimeoutError;function v(S){this.handle=S}v.prototype._resultCancelled=function(){clearTimeout(this.handle)};var y=function(S){return x(+this).thenReturn(S)},x=c.delay=function(S,T){var P,k;return T!==void 0?(P=c.resolve(T)._then(y,null,null,S,void 0),h.cancellation()&&T instanceof c&&P._setOnCancel(T)):(P=new c(f),k=setTimeout(function(){P._fulfill()},+S),h.cancellation()&&P._setOnCancel(new v(k)),P._captureStackTrace()),P._setAsyncGuaranteed(),P};function _(S){return clearTimeout(this.handle),S}function w(S){throw clearTimeout(this.handle),S}c.prototype.delay=function(S){return x(S,this)},c.prototype.timeout=function(S,T){var P,k;S=+S;var N=new v(setTimeout(function(){P.isPending()&&function(D,z,A){var W;W=typeof z!="string"?z instanceof Error?z:new m("operation timed out"):new m(z),p.markAsOriginatingFromRejection(W),D._attachExtraTrace(W),D._reject(W),A!=null&&A.cancel()}(P,T,k)},S));return h.cancellation()?(k=this.then(),(P=k._then(_,w,void 0,N,void 0))._setOnCancel(N)):P=this._then(_,w,void 0,N,void 0),P}}},{"./util":36}],35:[function(s,a,l){a.exports=function(c,f,h,p,m,v){var y=s("./util"),x=s("./errors").TypeError,_=s("./util").inherits,w=y.errorObj,S=y.tryCatch,T={};function P(W){setTimeout(function(){throw W},0)}function k(W,Y){var J=0,Z=W.length,ee=new c(m);return function ie(){if(J>=Z)return ee._fulfill();var oe=function(G){var F=h(G);return F!==G&&typeof G._isDisposable=="function"&&typeof G._getDisposer=="function"&&G._isDisposable()&&F._setDisposable(G._getDisposer()),F}(W[J++]);if(oe instanceof c&&oe._isDisposable()){try{oe=h(oe._getDisposer().tryDispose(Y),W.promise)}catch(G){return P(G)}if(oe instanceof c)return oe._then(ie,P,null,null,null)}ie()}(),ee}function N(W,Y,J){this._data=W,this._promise=Y,this._context=J}function D(W,Y,J){this.constructor$(W,Y,J)}function z(W){return N.isDisposer(W)?(this.resources[this.index]._setDisposable(W),W.promise()):W}function A(W){this.length=W,this.promise=null,this[W-1]=null}N.prototype.data=function(){return this._data},N.prototype.promise=function(){return this._promise},N.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():T},N.prototype.tryDispose=function(W){var Y=this.resource(),J=this._context;J!==void 0&&J._pushContext();var Z=Y!==T?this.doDispose(Y,W):null;return J!==void 0&&J._popContext(),this._promise._unsetDisposable(),this._data=null,Z},N.isDisposer=function(W){return W!=null&&typeof W.resource=="function"&&typeof W.tryDispose=="function"},_(D,N),D.prototype.doDispose=function(W,Y){return this.data().call(W,W,Y)},A.prototype._resultCancelled=function(){for(var W=this.length,Y=0;Y0},c.prototype._getDisposer=function(){return this._disposer},c.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},c.prototype.disposer=function(W){if(typeof W=="function")return new D(W,this,p());throw new x}}},{"./errors":12,"./util":36}],36:[function(s,a,l){var c,f=s("./es5"),h=typeof navigator>"u",p={e:{}},m=typeof self<"u"?self:typeof window<"u"?window:i!==void 0?i:this!==void 0?this:null;function v(){try{var Z=c;return c=null,Z.apply(this,arguments)}catch(ee){return p.e=ee,p}}function y(Z){return Z==null||Z===!0||Z===!1||typeof Z=="string"||typeof Z=="number"}function x(Z,ee,ie){if(y(Z))return Z;var oe={value:ie,configurable:!0,enumerable:!1,writable:!0};return f.defineProperty(Z,ee,oe),Z}var _=function(){var Z=[Array.prototype,Object.prototype,Function.prototype],ee=function(G){for(var F=0;F1,oe=ee.length>0&&!(ee.length===1&&ee[0]==="constructor"),G=w.test(Z+"")&&f.names(Z).length>0;if(ie||oe||G)return!0}return!1}catch{return!1}},isIdentifier:function(Z){return S.test(Z)},inheritedDataKeys:_,getDataPropertyOrDefault:function(Z,ee,ie){if(!f.isES5)return{}.hasOwnProperty.call(Z,ee)?Z[ee]:void 0;var oe=Object.getOwnPropertyDescriptor(Z,ee);return oe!=null?oe.get==null&&oe.set==null?oe.value:ie:void 0},thrower:function(Z){throw Z},isArray:f.isArray,asArray:z,notEnumerableProp:x,isPrimitive:y,isObject:function(Z){return typeof Z=="function"||typeof Z=="object"&&Z!==null},isError:P,canEvaluate:h,errorObj:p,tryCatch:function(Z){return c=Z,v},inherits:function(Z,ee){var ie={}.hasOwnProperty;function oe(){for(var G in this.constructor=Z,this.constructor$=ee,ee.prototype)ie.call(ee.prototype,G)&&G.charAt(G.length-1)!=="$"&&(this[G+"$"]=ee.prototype[G])}return oe.prototype=ee.prototype,Z.prototype=new oe,Z.prototype},withAppended:function(Z,ee){var ie,oe=Z.length,G=new Array(oe+1);for(ie=0;ie10||Z[0]>0}(),J.isNode&&J.toFastProperties(r);try{throw new Error}catch(Z){J.lastLineError=Z}a.exports=J},{"./es5":13}]},{},[4])(4),typeof window<"u"&&window!==null?window.P=window.Promise:typeof self<"u"&&self!==null&&(self.P=self.Promise)}).call(this,n(4),n(0),n(11).setImmediate)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(r,i){if(!i.eol&&r){for(var o=0,s=r.length;o0?(typeof B=="string"||se.objectMode||Object.getPrototypeOf(B)===f.prototype||(B=function(pe){return f.from(pe)}(B)),H?se.endEmitted?j.emit("error",new Error("stream.unshift() after end event")):k(j,se,B,!0):se.ended?j.emit("error",new Error("stream.push() after EOF")):(se.reading=!1,se.decoder&&!ne?(B=se.decoder.write(B),se.objectMode||B.length!==0?k(j,se,B,!1):W(j,se)):k(j,se,B,!1))):H||(se.reading=!1)),function(pe){return!pe.ended&&(pe.needReadable||pe.lengthB.highWaterMark&&(B.highWaterMark=function(ne){return ne>=N?ne=N:(ne--,ne|=ne>>>1,ne|=ne>>>2,ne|=ne>>>4,ne|=ne>>>8,ne|=ne>>>16,ne++),ne}(j)),j<=B.length?j:B.ended?B.length:(B.needReadable=!0,0))}function z(j){var B=j._readableState;B.needReadable=!1,B.emittedReadable||(v("emitReadable",B.flowing),B.emittedReadable=!0,B.sync?o.nextTick(A,j):A(j))}function A(j){v("emit readable"),j.emit("readable"),ee(j)}function W(j,B){B.readingMore||(B.readingMore=!0,o.nextTick(Y,j,B))}function Y(j,B){for(var ne=B.length;!B.reading&&!B.flowing&&!B.ended&&B.length=B.length?(ne=B.decoder?B.buffer.join(""):B.buffer.length===1?B.buffer.head.data:B.buffer.concat(B.length),B.buffer.clear()):ne=function(H,q,te){var se;return HK.length?K.length:pe;if(ae===K.length?X+=K:X+=K.slice(0,pe),(pe-=ae)==0){ae===K.length?(++I,R.next?O.head=R.next:O.head=O.tail=null):(O.head=R,R.data=K.slice(ae));break}++I}return O.length-=I,X}(H,q):function(pe,O){var R=f.allocUnsafe(pe),I=O.head,X=1;for(I.data.copy(R),pe-=I.data.length;I=I.next;){var K=I.data,ae=pe>K.length?K.length:pe;if(K.copy(R,R.length-pe,0,ae),(pe-=ae)==0){ae===K.length?(++X,I.next?O.head=I.next:O.head=O.tail=null):(O.head=I,I.data=K.slice(ae));break}++X}return O.length-=X,R}(H,q),se}(j,B.buffer,B.decoder),ne);var ne}function oe(j){var B=j._readableState;if(B.length>0)throw new Error('"endReadable()" called on non-empty stream');B.endEmitted||(B.ended=!0,o.nextTick(G,B,j))}function G(j,B){j.endEmitted||j.length!==0||(j.endEmitted=!0,B.readable=!1,B.emit("end"))}function F(j,B){for(var ne=0,H=j.length;ne=B.highWaterMark||B.ended))return v("read: emitReadable",B.length,B.ended),B.length===0&&B.ended?oe(this):z(this),null;if((j=D(j,B))===0&&B.ended)return B.length===0&&oe(this),null;var H,q=B.needReadable;return v("need readable",q),(B.length===0||B.length-j0?ie(j,B):null)===null?(B.needReadable=!0,j=0):B.length-=j,B.length===0&&(B.ended||(B.needReadable=!0),ne!==j&&B.ended&&oe(this)),H!==null&&this.emit("data",H),H},T.prototype._read=function(j){this.emit("error",new Error("_read() is not implemented"))},T.prototype.pipe=function(j,B){var ne=this,H=this._readableState;switch(H.pipesCount){case 0:H.pipes=j;break;case 1:H.pipes=[H.pipes,j];break;default:H.pipes.push(j)}H.pipesCount+=1,v("pipe count=%d opts=%j",H.pipesCount,B);var q=B&&B.end===!1||j===i.stdout||j===i.stderr?ae:te;function te(){v("onend"),j.end()}H.endEmitted?o.nextTick(q):ne.once("end",q),j.on("unpipe",function ge(Le,ue){v("onunpipe"),Le===ne&&ue&&ue.hasUnpiped===!1&&(ue.hasUnpiped=!0,v("cleanup"),j.removeListener("close",X),j.removeListener("finish",K),j.removeListener("drain",se),j.removeListener("error",I),j.removeListener("unpipe",ge),ne.removeListener("end",te),ne.removeListener("end",ae),ne.removeListener("data",R),pe=!0,!H.awaitDrain||j._writableState&&!j._writableState.needDrain||se())});var se=function(ge){return function(){var Le=ge._readableState;v("pipeOnDrain",Le.awaitDrain),Le.awaitDrain&&Le.awaitDrain--,Le.awaitDrain===0&&l(ge,"data")&&(Le.flowing=!0,ee(ge))}}(ne);j.on("drain",se);var pe=!1,O=!1;function R(ge){v("ondata"),O=!1,j.write(ge)!==!1||O||((H.pipesCount===1&&H.pipes===j||H.pipesCount>1&&F(H.pipes,j)!==-1)&&!pe&&(v("false write response, pause",ne._readableState.awaitDrain),ne._readableState.awaitDrain++,O=!0),ne.pause())}function I(ge){v("onerror",ge),ae(),j.removeListener("error",I),l(j,"error")===0&&j.emit("error",ge)}function X(){j.removeListener("finish",K),ae()}function K(){v("onfinish"),j.removeListener("close",X),ae()}function ae(){v("unpipe"),ne.unpipe(j)}return ne.on("data",R),function(ge,Le,ue){if(typeof ge.prependListener=="function")return ge.prependListener(Le,ue);ge._events&&ge._events[Le]?a(ge._events[Le])?ge._events[Le].unshift(ue):ge._events[Le]=[ue,ge._events[Le]]:ge.on(Le,ue)}(j,"error",I),j.once("close",X),j.once("finish",K),j.emit("pipe",ne),H.flowing||(v("pipe resume"),ne.resume()),j},T.prototype.unpipe=function(j){var B=this._readableState,ne={hasUnpiped:!1};if(B.pipesCount===0)return this;if(B.pipesCount===1)return j&&j!==B.pipes?this:(j||(j=B.pipes),B.pipes=null,B.pipesCount=0,B.flowing=!1,j&&j.emit("unpipe",this,ne),this);if(!j){var H=B.pipes,q=B.pipesCount;B.pipes=null,B.pipesCount=0,B.flowing=!1;for(var te=0;te>5==6?2:v>>4==14?3:v>>3==30?4:v>>6==2?-1:-2}function a(v){var y=this.lastTotal-this.lastNeed,x=function(_,w,S){if((192&w[0])!=128)return _.lastNeed=0,"�";if(_.lastNeed>1&&w.length>1){if((192&w[1])!=128)return _.lastNeed=1,"�";if(_.lastNeed>2&&w.length>2&&(192&w[2])!=128)return _.lastNeed=2,"�"}}(this,v);return x!==void 0?x:this.lastNeed<=v.length?(v.copy(this.lastChar,y,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(v.copy(this.lastChar,y,0,v.length),void(this.lastNeed-=v.length))}function l(v,y){if((v.length-y)%2==0){var x=v.toString("utf16le",y);if(x){var _=x.charCodeAt(x.length-1);if(_>=55296&&_<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=v[v.length-2],this.lastChar[1]=v[v.length-1],x.slice(0,-1)}return x}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=v[v.length-1],v.toString("utf16le",y,v.length-1)}function c(v){var y=v&&v.length?this.write(v):"";if(this.lastNeed){var x=this.lastTotal-this.lastNeed;return y+this.lastChar.toString("utf16le",0,x)}return y}function f(v,y){var x=(v.length-y)%3;return x===0?v.toString("base64",y):(this.lastNeed=3-x,this.lastTotal=3,x===1?this.lastChar[0]=v[v.length-1]:(this.lastChar[0]=v[v.length-2],this.lastChar[1]=v[v.length-1]),v.toString("base64",y,v.length-x))}function h(v){var y=v&&v.length?this.write(v):"";return this.lastNeed?y+this.lastChar.toString("base64",0,3-this.lastNeed):y}function p(v){return v.toString(this.encoding)}function m(v){return v&&v.length?this.write(v):""}t.StringDecoder=o,o.prototype.write=function(v){if(v.length===0)return"";var y,x;if(this.lastNeed){if((y=this.fillLast(v))===void 0)return"";x=this.lastNeed,this.lastNeed=0}else x=0;return x=0?(k>0&&(w.lastNeed=k-1),k):--P=0?(k>0&&(w.lastNeed=k-2),k):--P=0?(k>0&&(k===2?k=0:w.lastNeed=k-3),k):0}(this,v,y);if(!this.lastNeed)return v.toString("utf8",y);this.lastTotal=x;var _=v.length-(x-this.lastNeed);return v.copy(this.lastChar,0,_),v.toString("utf8",y,_)},o.prototype.fillLast=function(v){if(this.lastNeed<=v.length)return v.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);v.copy(this.lastChar,this.lastTotal-this.lastNeed,0,v.length),this.lastNeed-=v.length}},function(e,t,n){e.exports=o;var r=n(1),i=n(5);function o(l){if(!(this instanceof o))return new o(l);r.call(this,l),this._transformState={afterTransform:function(c,f){var h=this._transformState;h.transforming=!1;var p=h.writecb;if(!p)return this.emit("error",new Error("write callback called multiple times"));h.writechunk=null,h.writecb=null,f!=null&&this.push(f),p(c);var m=this._readableState;m.reading=!1,(m.needReadable||m.length-1&&s.push(i[a]);return s},t.trimLeft=String.prototype.trimLeft?function(i){return i.trimLeft()}:function(i){return i.replace(/^\s+/,"")},t.trimRight=String.prototype.trimRight?function(i){return i.trimRight()}:function(i){return i.replace(/\s+$/,"")}}).call(this,n(3).Buffer)},function(e,t,n){var r=this&&this.__extends||function(){var o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,a){s.__proto__=a}||function(s,a){for(var l in a)a.hasOwnProperty(l)&&(s[l]=a[l])};return function(s,a){function l(){this.constructor=s}o(s,a),s.prototype=a===null?Object.create(a):(l.prototype=a.prototype,new l)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(o){function s(a,l,c){var f=o.call(this,"Error: "+a+". JSON Line number: "+l+(c?" near: "+c:""))||this;return f.err=a,f.line=l,f.extra=c,f.name="CSV Parse Error",f}return r(s,o),s.column_mismatched=function(a,l){return new s("column_mismatched",a,l)},s.unclosed_quote=function(a,l){return new s("unclosed_quote",a,l)},s.fromJSON=function(a){return new s(a.err,a.line,a.extra)},s.prototype.toJSON=function(){return{err:this.err,line:this.line,extra:this.extra}},s}(Error);t.default=i},function(e,t,n){var r=n(18),i=n(68),o=n(69),s=r?r.toStringTag:void 0;e.exports=function(a){return a==null?a===void 0?"[object Undefined]":"[object Null]":s&&s in Object(a)?i(a):o(a)}},function(e,t){e.exports=function(n,r){return n===r||n!=n&&r!=r}},function(e,t,n){e.exports=n(33)},function(e,t,n){var r=n(34),i=function(o,s){return new r.Converter(o,s)};i.csv=i,i.Converter=r.Converter,e.exports=i},function(e,t,n){(function(r){var i=this&&this.__extends||function(){var m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,y){v.__proto__=y}||function(v,y){for(var x in y)y.hasOwnProperty(x)&&(v[x]=y[x])};return function(v,y){function x(){this.constructor=v}m(v,y),v.prototype=y===null?Object.create(y):(x.prototype=y.prototype,new x)}}(),o=this&&this.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(36),a=n(50),l=n(51),c=o(n(15)),f=n(52),h=n(105),p=function(m){function v(y,x){x===void 0&&(x={});var _=m.call(this,x)||this;return _.options=x,_.params=a.mergeParams(y),_.runtime=l.initParseRuntime(_),_.result=new h.Result(_),_.processor=new f.ProcessorLocal(_),_.once("error",function(w){r(function(){_.result.processError(w),_.emit("done",w)})}),_.once("done",function(){_.processor.destroy()}),_}return i(v,m),v.prototype.preRawData=function(y){return this.runtime.preRawDataHook=y,this},v.prototype.preFileLine=function(y){return this.runtime.preFileLineHook=y,this},v.prototype.subscribe=function(y,x,_){return this.parseRuntime.subscribe={onNext:y,onError:x,onCompleted:_},this},v.prototype.fromFile=function(y,x){var _=this,w=n(!function(){var S=new Error("Cannot find module 'fs'");throw S.code="MODULE_NOT_FOUND",S}());return w.exists(y,function(S){S?w.createReadStream(y,x).pipe(_):_.emit("error",new Error("File does not exist. Check to make sure the file path to your csv is correct."))}),this},v.prototype.fromStream=function(y){return y.pipe(this),this},v.prototype.fromString=function(y){y.toString();var x=new s.Readable,_=0;return x._read=function(w){if(_>=y.length)this.push(null);else{var S=y.substr(_,w);this.push(S),_+=w}},this.fromStream(x)},v.prototype.then=function(y,x){var _=this;return new c.default(function(w,S){_.parseRuntime.then={onfulfilled:function(T){w(y?y(T):T)},onrejected:function(T){x?w(x(T)):S(T)}}})},Object.defineProperty(v.prototype,"parseParam",{get:function(){return this.params},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parseRuntime",{get:function(){return this.runtime},enumerable:!0,configurable:!0}),v.prototype._transform=function(y,x,_){var w=this;this.processor.process(y).then(function(S){if(S.length>0)return w.runtime.started=!0,w.result.processResult(S)}).then(function(){w.emit("drained"),_()},function(S){w.runtime.hasError=!0,w.runtime.error=S,w.emit("error",S),_()})},v.prototype._flush=function(y){var x=this;this.processor.flush().then(function(_){if(_.length>0)return x.result.processResult(_)}).then(function(){x.processEnd(y)},function(_){x.emit("error",_),y()})},v.prototype.processEnd=function(y){this.result.endProcess(),this.emit("done"),y()},Object.defineProperty(v.prototype,"parsedLineNumber",{get:function(){return this.runtime.parsedLineNumber},enumerable:!0,configurable:!0}),v}(s.Transform);t.Converter=p}).call(this,n(11).setImmediate)},function(e,t,n){(function(r,i){(function(o,s){if(!o.setImmediate){var a,l=1,c={},f=!1,h=o.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(o);p=p&&p.setTimeout?p:o,{}.toString.call(o.process)==="[object process]"?a=function(y){i.nextTick(function(){v(y)})}:function(){if(o.postMessage&&!o.importScripts){var y=!0,x=o.onmessage;return o.onmessage=function(){y=!1},o.postMessage("","*"),o.onmessage=x,y}}()?function(){var y="setImmediate$"+Math.random()+"$",x=function(_){_.source===o&&typeof _.data=="string"&&_.data.indexOf(y)===0&&v(+_.data.slice(y.length))};o.addEventListener?o.addEventListener("message",x,!1):o.attachEvent("onmessage",x),a=function(_){o.postMessage(y+_,"*")}}():o.MessageChannel?function(){var y=new MessageChannel;y.port1.onmessage=function(x){v(x.data)},a=function(x){y.port2.postMessage(x)}}():h&&"onreadystatechange"in h.createElement("script")?function(){var y=h.documentElement;a=function(x){var _=h.createElement("script");_.onreadystatechange=function(){v(x),_.onreadystatechange=null,y.removeChild(_),_=null},y.appendChild(_)}}():a=function(y){setTimeout(v,0,y)},p.setImmediate=function(y){typeof y!="function"&&(y=new Function(""+y));for(var x=new Array(arguments.length-1),_=0;_"u"?r===void 0?this:r:self)}).call(this,n(0),n(4))},function(e,t,n){e.exports=i;var r=n(12).EventEmitter;function i(){r.call(this)}n(2)(i,r),i.Readable=n(13),i.Writable=n(46),i.Duplex=n(47),i.Transform=n(48),i.PassThrough=n(49),i.Stream=i,i.prototype.pipe=function(o,s){var a=this;function l(y){o.writable&&o.write(y)===!1&&a.pause&&a.pause()}function c(){a.readable&&a.resume&&a.resume()}a.on("data",l),o.on("drain",c),o._isStdio||s&&s.end===!1||(a.on("end",h),a.on("close",p));var f=!1;function h(){f||(f=!0,o.end())}function p(){f||(f=!0,typeof o.destroy=="function"&&o.destroy())}function m(y){if(v(),r.listenerCount(this,"error")===0)throw y}function v(){a.removeListener("data",l),o.removeListener("drain",c),a.removeListener("end",h),a.removeListener("close",p),a.removeListener("error",m),o.removeListener("error",m),a.removeListener("end",v),a.removeListener("close",v),o.removeListener("close",v)}return a.on("error",m),o.on("error",m),a.on("end",v),a.on("close",v),o.on("close",v),o.emit("pipe",a),o}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(r){return n.call(r)=="[object Array]"}},function(e,t,n){t.byteLength=function(p){var m=c(p),v=m[0],y=m[1];return 3*(v+y)/4-y},t.toByteArray=function(p){for(var m,v=c(p),y=v[0],x=v[1],_=new o(3*(y+x)/4-x),w=0,S=x>0?y-4:y,T=0;T>16&255,_[w++]=m>>8&255,_[w++]=255&m;return x===2&&(m=i[p.charCodeAt(T)]<<2|i[p.charCodeAt(T+1)]>>4,_[w++]=255&m),x===1&&(m=i[p.charCodeAt(T)]<<10|i[p.charCodeAt(T+1)]<<4|i[p.charCodeAt(T+2)]>>2,_[w++]=m>>8&255,_[w++]=255&m),_},t.fromByteArray=function(p){for(var m,v=p.length,y=v%3,x=[],_=0,w=v-y;_w?w:_+16383));return y===1?(m=p[v-1],x.push(r[m>>2]+r[m<<4&63]+"==")):y===2&&(m=(p[v-2]<<8)+p[v-1],x.push(r[m>>10]+r[m>>4&63]+r[m<<2&63]+"=")),x.join("")};for(var r=[],i=[],o=typeof Uint8Array<"u"?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,l=s.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var v=p.indexOf("=");return v===-1&&(v=m),[v,v===m?0:4-v%4]}function f(p){return r[p>>18&63]+r[p>>12&63]+r[p>>6&63]+r[63&p]}function h(p,m,v){for(var y,x=[],_=m;_>1,p=-7,m=i?s-1:0,v=i?-1:1,y=n[r+m];for(m+=v,a=y&(1<<-p)-1,y>>=-p,p+=c;p>0;a=256*a+n[r+m],m+=v,p-=8);for(l=a&(1<<-p)-1,a>>=-p,p+=o;p>0;l=256*l+n[r+m],m+=v,p-=8);if(a===0)a=1-h;else{if(a===f)return l?NaN:1/0*(y?-1:1);l+=Math.pow(2,o),a-=h}return(y?-1:1)*l*Math.pow(2,a-o)},t.write=function(n,r,i,o,s,a){var l,c,f,h=8*a-s-1,p=(1<>1,v=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,y=o?0:a-1,x=o?1:-1,_=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(c=isNaN(r)?1:0,l=p):(l=Math.floor(Math.log(r)/Math.LN2),r*(f=Math.pow(2,-l))<1&&(l--,f*=2),(r+=l+m>=1?v/f:v*Math.pow(2,1-m))*f>=2&&(l++,f/=2),l+m>=p?(c=0,l=p):l+m>=1?(c=(r*f-1)*Math.pow(2,s),l+=m):(c=r*Math.pow(2,m-1)*Math.pow(2,s),l=0));s>=8;n[i+y]=255&c,y+=x,c/=256,s-=8);for(l=l<0;n[i+y]=255&l,y+=x,l/=256,h-=8);n[i+y-x]|=128*_}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(r){return n.call(r)=="[object Array]"}},function(e,t){},function(e,t,n){var r=n(7).Buffer,i=n(43);function o(s,a,l){s.copy(a,l)}e.exports=function(){function s(){(function(a,l){if(!(a instanceof l))throw new TypeError("Cannot call a class as a function")})(this,s),this.head=null,this.tail=null,this.length=0}return s.prototype.push=function(a){var l={data:a,next:null};this.length>0?this.tail.next=l:this.head=l,this.tail=l,++this.length},s.prototype.unshift=function(a){var l={data:a,next:this.head};this.length===0&&(this.tail=l),this.head=l,++this.length},s.prototype.shift=function(){if(this.length!==0){var a=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,a}},s.prototype.clear=function(){this.head=this.tail=null,this.length=0},s.prototype.join=function(a){if(this.length===0)return"";for(var l=this.head,c=""+l.data;l=l.next;)c+=a+l.data;return c},s.prototype.concat=function(a){if(this.length===0)return r.alloc(0);if(this.length===1)return this.head.data;for(var l=r.allocUnsafe(a>>>0),c=this.head,f=0;c;)o(c.data,l,f),f+=c.data.length,c=c.next;return l},s}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var s=i.inspect({length:this.length});return this.constructor.name+" "+s})},function(e,t){},function(e,t,n){(function(r){function i(o){try{if(!r.localStorage)return!1}catch{return!1}var s=r.localStorage[o];return s!=null&&String(s).toLowerCase()==="true"}e.exports=function(o,s){if(i("noDeprecation"))return o;var a=!1;return function(){if(!a){if(i("throwDeprecation"))throw new Error(s);i("traceDeprecation")?console.trace(s):console.warn(s),a=!0}return o.apply(this,arguments)}}}).call(this,n(0))},function(e,t,n){e.exports=o;var r=n(27),i=n(5);function o(s){if(!(this instanceof o))return new o(s);r.call(this,s)}i.inherits=n(2),i.inherits(o,r),o.prototype._transform=function(s,a,l){l(null,s)}},function(e,t,n){e.exports=n(14)},function(e,t,n){e.exports=n(1)},function(e,t,n){e.exports=n(13).Transform},function(e,t,n){e.exports=n(13).PassThrough},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.mergeParams=function(r){var i={delimiter:",",ignoreColumns:void 0,includeColumns:void 0,quote:'"',trim:!0,checkType:!1,ignoreEmpty:!1,noheader:!1,headers:void 0,flatKeys:!1,maxRowLength:0,checkColumn:!1,escape:'"',colParser:{},eol:void 0,alwaysSplitAtEOL:!1,output:"json",nullObject:!1,downstreamFormat:"line",needEmitAll:!0};for(var o in r||(r={}),r)r.hasOwnProperty(o)&&(Array.isArray(r[o])?i[o]=[].concat(r[o]):i[o]=r[o]);return i}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.initParseRuntime=function(r){var i=r.parseParam,o={needProcessIgnoreColumn:!1,needProcessIncludeColumn:!1,selectedColumns:void 0,ended:!1,hasError:!1,error:void 0,delimiter:r.parseParam.delimiter,eol:r.parseParam.eol,columnConv:[],headerType:[],headerTitle:[],headerFlag:[],headers:void 0,started:!1,parsedLineNumber:0,columnValueSetter:[]};return i.ignoreColumns&&(o.needProcessIgnoreColumn=!0),i.includeColumns&&(o.needProcessIncludeColumn=!0),o}},function(e,t,n){(function(r){var i=this&&this.__extends||function(){var x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,w){_.__proto__=w}||function(_,w){for(var S in w)w.hasOwnProperty(S)&&(_[S]=w[S])};return function(_,w){function S(){this.constructor=_}x(_,w),_.prototype=w===null?Object.create(w):(S.prototype=w.prototype,new S)}}(),o=this&&this.__importDefault||function(x){return x&&x.__esModule?x:{default:x}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(53),a=o(n(15)),l=n(54),c=o(n(16)),f=n(57),h=n(28),p=n(58),m=o(n(59)),v=o(n(29)),y=function(x){function _(){var w=x!==null&&x.apply(this,arguments)||this;return w.rowSplit=new p.RowSplit(w.converter),w.eolEmitted=!1,w._needEmitEol=void 0,w.headEmitted=!1,w._needEmitHead=void 0,w}return i(_,x),_.prototype.flush=function(){var w=this;if(this.runtime.csvLineBuffer&&this.runtime.csvLineBuffer.length>0){var S=this.runtime.csvLineBuffer;return this.runtime.csvLineBuffer=void 0,this.process(S,!0).then(function(T){return w.runtime.csvLineBuffer&&w.runtime.csvLineBuffer.length>0?a.default.reject(v.default.unclosed_quote(w.runtime.parsedLineNumber,w.runtime.csvLineBuffer.toString())):a.default.resolve(T)})}return a.default.resolve([])},_.prototype.destroy=function(){return a.default.resolve()},Object.defineProperty(_.prototype,"needEmitEol",{get:function(){return this._needEmitEol===void 0&&(this._needEmitEol=this.converter.listeners("eol").length>0),this._needEmitEol},enumerable:!0,configurable:!0}),Object.defineProperty(_.prototype,"needEmitHead",{get:function(){return this._needEmitHead===void 0&&(this._needEmitHead=this.converter.listeners("header").length>0),this._needEmitHead},enumerable:!0,configurable:!0}),_.prototype.process=function(w,S){var T,P=this;return S===void 0&&(S=!1),T=S?w.toString():l.prepareData(w,this.converter.parseRuntime),a.default.resolve().then(function(){return P.runtime.preRawDataHook?P.runtime.preRawDataHook(T):T}).then(function(k){return k&&k.length>0?P.processCSV(k,S):a.default.resolve([])})},_.prototype.processCSV=function(w,S){var T=this,P=this.params,k=this.runtime;k.eol||c.default(w,k),this.needEmitEol&&!this.eolEmitted&&k.eol&&(this.converter.emit("eol",k.eol),this.eolEmitted=!0),P.ignoreEmpty&&!k.started&&(w=h.trimLeft(w));var N=f.stringToLines(w,k);return S?(N.lines.push(N.partial),N.partial=""):this.prependLeftBuf(h.bufFromString(N.partial)),N.lines.length>0?(k.preFileLineHook?this.runPreLineHook(N.lines):a.default.resolve(N.lines)).then(function(D){return k.started||T.runtime.headers?T.processCSVBody(D):T.processDataWithHead(D)}):a.default.resolve([])},_.prototype.processDataWithHead=function(w){if(this.params.noheader)this.params.headers?this.runtime.headers=this.params.headers:this.runtime.headers=[];else{for(var S="",T=[];w.length;){var P=S+w.shift(),k=this.rowSplit.parse(P);if(k.closed){T=k.cells,S="";break}S=P+c.default(P,this.runtime)}if(this.prependLeftBuf(h.bufFromString(S)),T.length===0)return[];this.params.headers?this.runtime.headers=this.params.headers:this.runtime.headers=T}return(this.runtime.needProcessIgnoreColumn||this.runtime.needProcessIncludeColumn)&&this.filterHeader(),this.needEmitHead&&!this.headEmitted&&(this.converter.emit("header",this.runtime.headers),this.headEmitted=!0),this.processCSVBody(w)},_.prototype.filterHeader=function(){if(this.runtime.selectedColumns=[],this.runtime.headers){for(var w=this.runtime.headers,S=0;S=N.length)A();else if(D.preFileLineHook){var W=N[z],Y=D.preFileLineHook(W,D.parsedLineNumber+z);if(z++,Y&&Y.then)Y.then(function(J){N[z-1]=J,k(N,D,z,A)});else{for(N[z-1]=Y;z0?r.concat([h.csvLineBuffer,f]):f}(s,a);a.csvLineBuffer=void 0;var c=function(f,h){var p=f.length-1;if(128&f[p]){for(;(192&f[p])==128;)p--;p--}return p!=f.length-1?(h.csvLineBuffer=f.slice(p+1),f.slice(0,p+1)):f}(l,a).toString("utf8");return a.started===!1?o.default(c):c}}).call(this,n(3).Buffer)},function(e,t,n){(function(r){var i=n(56);e.exports=function(o){return typeof o=="string"&&o.charCodeAt(0)===65279?o.slice(1):r.isBuffer(o)&&i(o)&&o[0]===239&&o[1]===187&&o[2]===191?o.slice(3):o}}).call(this,n(3).Buffer)},function(e,t){e.exports=function(n){for(var r=0;r0),this._needEmitDelimiter},enumerable:!0,configurable:!0}),l.prototype.parse=function(c){if(c.length===0||this.conv.parseParam.ignoreEmpty&&c.trim().length===0)return{cells:[],closed:!0};var f=this.quote,h=this.trim;this.escape,(this.conv.parseRuntime.delimiter instanceof Array||this.conv.parseRuntime.delimiter.toLowerCase()==="auto")&&(this.conv.parseRuntime.delimiter=this.getDelimiter(c)),this.needEmitDelimiter&&!this.delimiterEmitted&&(this.conv.emit("delimiter",this.conv.parseRuntime.delimiter),this.delimiterEmitted=!0);var p=this.conv.parseRuntime.delimiter,m=c.split(p);if(f==="off"){if(h)for(var v=0;vh&&(p=m,h=v)}),p},l.prototype.isQuoteOpen=function(c){var f=this.quote,h=this.escape;return c[0]===f&&(c[1]!==f||c[1]===h&&(c[2]===f||c.length===2))},l.prototype.isQuoteClose=function(c){var f=this.quote,h=this.escape;this.conv.parseParam.trim&&(c=o.trimRight(c));for(var p=0,m=c.length-1;c[m]===f||c[m]===h;)m--,p++;return p%2!=0},l.prototype.escapeQuote=function(c){var f="es|"+this.quote+"|"+this.escape;this.cachedRegExp[f]===void 0&&(this.cachedRegExp[f]=new RegExp("\\"+this.escape+"\\"+this.quote,"g"));var h=this.cachedRegExp[f];return c.replace(h,this.quote)},l.prototype.parseMultiLines=function(c){for(var f=[],h="";c.length;){var p=h+c.shift(),m=this.parse(p);m.cells.length===0&&this.conv.parseParam.ignoreEmpty||(m.closed||this.conv.parseParam.alwaysSplitAtEOL?(this.conv.parseRuntime.selectedColumns?f.push(o.filterArray(m.cells,this.conv.parseRuntime.selectedColumns)):f.push(m.cells),h=""):h=p+(i.default(p,this.conv.parseRuntime)||` `))}return{rowsCells:f,partial:h}},l}();t.RowSplit=a},function(e,t,n){var r=this&&this.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(29)),o=r(n(60)),s=/^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$/;function a(_,w,S){if(w.parseParam.checkColumn&&w.parseRuntime.headers&&_.length!==w.parseRuntime.headers.length)throw i.default.column_mismatched(w.parseRuntime.parsedLineNumber+S);return function(T,P,k){for(var N=!1,D={},z=0,A=T.length;z-1){for(var k=w.split("."),N=!0;k.length>0;)if(k.shift().length===0){N=!1;break}!N||T.parseParam.colParser[w]&&T.parseParam.colParser[w].flat?T.parseRuntime.columnValueSetter[P]=h:T.parseRuntime.columnValueSetter[P]=p}else T.parseRuntime.columnValueSetter[P]=h;T.parseParam.nullObject===!0&&S==="null"&&(S=null),T.parseRuntime.columnValueSetter[P](_,w,S)}function h(_,w,S){_[w]=S}function p(_,w,S){o.default(_,w,S)}function m(_,w,S,T){return T.parseRuntime.headerType[S]?T.parseRuntime.headerType[S]:w.indexOf("number#!")>-1?T.parseRuntime.headerType[S]=v:w.indexOf("string#!")>-1?T.parseRuntime.headerType[S]=y:T.parseParam.checkType?T.parseRuntime.headerType[S]=x:T.parseRuntime.headerType[S]=y}function v(_){var w=parseFloat(_);return isNaN(w)?_:w}function y(_){return _.toString()}function x(_){var w=_.trim();return w===""?y(_):s.test(w)?v(_):w.length===5&&w.toLowerCase()==="false"||w.length===4&&w.toLowerCase()==="true"?function(S){var T=S.trim();return T.length!==5||T.toLowerCase()!=="false"}(_):w[0]==="{"&&w[w.length-1]==="}"||w[0]==="["&&w[w.length-1]==="]"?function(S){try{return JSON.parse(S)}catch{return S}}(_):y(_)}},function(e,t,n){var r=n(61);e.exports=function(i,o,s){return i==null?i:r(i,o,s)}},function(e,t,n){var r=n(62),i=n(74),o=n(103),s=n(20),a=n(104);e.exports=function(l,c,f,h){if(!s(l))return l;for(var p=-1,m=(c=i(c,l)).length,v=m-1,y=l;y!=null&&++p-1}},function(e,t,n){var r=n(9);e.exports=function(i,o){var s=this.__data__,a=r(s,i);return a<0?(++this.size,s.push([i,o])):s[a][1]=o,this}},function(e,t,n){var r=n(17)(n(19),"Map");e.exports=r},function(e,t,n){var r=n(10);e.exports=function(i){var o=r(this,i).delete(i);return this.size-=o?1:0,o}},function(e,t){e.exports=function(n){var r=typeof n;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?n!=="__proto__":n===null}},function(e,t,n){var r=n(10);e.exports=function(i){return r(this,i).get(i)}},function(e,t,n){var r=n(10);e.exports=function(i){return r(this,i).has(i)}},function(e,t,n){var r=n(10);e.exports=function(i,o){var s=r(this,i),a=s.size;return s.set(i,o),this.size+=s.size==a?0:1,this}},function(e,t,n){var r=n(101);e.exports=function(i){return i==null?"":r(i)}},function(e,t,n){var r=n(18),i=n(102),o=n(21),s=n(22),a=r?r.prototype:void 0,l=a?a.toString:void 0;e.exports=function c(f){if(typeof f=="string")return f;if(o(f))return i(f,c)+"";if(s(f))return l?l.call(f):"";var h=f+"";return h=="0"&&1/f==-1/0?"-0":h}},function(e,t){e.exports=function(n,r){for(var i=-1,o=n==null?0:n.length,s=Array(o);++i-1&&r%1==0&&r0||this.converter.listeners("readable").length>0),this._needPushDownstream},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"needEmitAll",{get:function(){return!!this.converter.parseRuntime.then&&this.converter.parseParam.needEmitAll},enumerable:!0,configurable:!0}),l.prototype.processResult=function(c){var f=this,h=this.converter.parseRuntime.parsedLineNumber;return this.needPushDownstream&&this.converter.parseParam.downstreamFormat==="array"&&h===0&&a(this.converter,"["+o.EOL),new i.default(function(p,m){f.needEmitLine?function v(y,x,_,w,S){if(_>=y.length)S();else if(x.parseRuntime.subscribe&&x.parseRuntime.subscribe.onNext){var T=x.parseRuntime.subscribe.onNext,P=y[_],k=T(P,x.parseRuntime.parsedLineNumber+_);if(_++,k&&k.then)k.then(function(){(function(D,z,A,W,Y,J,Z){Y&&a(A,Z),v(D,A,W,Y,J)})(y,0,x,_,w,S,P)},S);else{for(w&&a(x,P);_new Promise(t=>{O_e().fromString(e).then(t)}),k_e=new T_e,M_e=e=>k_e.parse(e),R_e=6,vL="0123456789ABCDEF",N_e=128,{floor:L_e,random:D_e,sqrt:A_e,round:j_e}=Math,I_e=()=>`#${_E(R_e,()=>vL[L_e(D_e()*vL.length)]).join("")}`,yL=e=>e.toLowerCase().trim(),F_e=e=>(e.match(/../g)??[]).map(t=>parseInt(t,16)||0),$_e=(e=0,t=0,n=0)=>j_e(A_e(.299*e**2+.587*t**2+.114*n**2));class B_e{constructor(t){xe(this,"colors");xe(this,"lights");xe(this,"getColorForKey",t=>{const n=yL(t),r=this.colors[n];return r||this.setColorForKey(n,I_e())});xe(this,"setColorForKey",(t,n)=>{const r=yL(t);return this.colors[r]=n,this.storage.set("colors",this.colors),n});xe(this,"isColorLightForKey",t=>{const n=this.getColorForKey(t).substring(1);if(Fo(this.lights[n])){const r=F_e(n);this.lights[n]=$_e(...r)>=N_e}return this.lights[n]});this.storage=t,this.colors=this.storage.get("colors")??{},this.lights={}}}const z_e="shlink",_L=e=>`${z_e}.${e}`;class U_e{constructor(t){xe(this,"get",t=>{const n=this.localStorage.getItem(_L(t));return n?JSON.parse(n):void 0});xe(this,"set",(t,n)=>this.localStorage.setItem(_L(t),JSON.stringify(n)));this.localStorage=t}}const V_e=e=>{e.constant("localStorage",window.localStorage),e.service("Storage",U_e,"localStorage"),e.service("ColorGenerator",B_e,"Storage"),e.constant("csvToJson",P_e),e.constant("jsonToCsv",M_e),e.constant("setTimeout",window.setTimeout),e.constant("clearTimeout",window.clearTimeout),e.serviceFactory("useTimeoutToggle",_oe,"setTimeout","clearTimeout")},rT=e=>e.visitedUrl!==void 0,H_e=e=>e.visitedUrl!==void 0,W_e=Dt(eZ(e=>rT(e.visit)?"orphanVisits":"nonOrphanVisits"),e=>({orphanVisits:[],nonOrphanVisits:[],...e})),Ap=(e,t)=>Sj(at(t),e),dh=({page:e,itemsPerPage:t,filter:n,dateRange:r})=>{const i=((r==null?void 0:r.startDate)&&Hs(r==null?void 0:r.startDate))??void 0,o=((r==null?void 0:r.endDate)&&Hs(r==null?void 0:r.endDate))??void 0,s=(n==null?void 0:n.excludeBots)||void 0;return{page:e,itemsPerPage:t,startDate:i,endDate:o,excludeBots:s}},hh=({visits:e,goBack:t,shortUrl:n,children:r,title:i})=>g.jsx("header",{children:g.jsxs(Sr,{body:!0,children:[g.jsxs("h2",{className:"d-flex justify-content-between align-items-center mb-0",children:[g.jsx(ht,{color:"link",size:"lg",className:"p-0 me-3",onClick:t,children:g.jsx(je,{icon:Kj})}),g.jsx("span",{className:"text-center d-none d-sm-block",children:g.jsx("small",{children:i})}),g.jsxs("span",{className:"badge badge-main ms-3",children:["Visits:"," ",g.jsx(H5,{visitsCount:e.length,shortUrl:n})]})]}),g.jsx("h3",{className:"text-center d-block d-sm-none mb-0 mt-3",children:g.jsx("small",{children:i})}),r&&g.jsx("div",{className:"mt-md-2",children:r})]})});const R8=({title:e,footer:t,children:n})=>g.jsxs(Sr,{role:"document",children:[g.jsx(rl,{className:"chart-card__header",children:typeof e=="function"?e():e}),g.jsx(nl,{children:n}),t&&g.jsx(ZC,{className:"chart-card__footer--sticky",children:t})]}),N8="label";function bL(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function Y_e(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function L8(e,t){e.labels=t}function D8(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:N8;const r=[];e.datasets=t.map(i=>{const o=e.datasets.find(s=>s[n]===i[n]);return!o||!i.data||r.includes(o)?{...i}:(r.push(o),Object.assign(o,i),o)})}function q_e(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:N8;const n={labels:[],datasets:[]};return L8(n,e.labels),D8(n,e.datasets,t),n}function A8(e,t){return e.getElementsAtEventForMode(t.nativeEvent,"nearest",{intersect:!0},!1)}function G_e(e,t){const{height:n=150,width:r=300,redraw:i=!1,datasetIdKey:o,type:s,data:a,options:l,plugins:c=[],fallbackContent:f,updateMode:h,...p}=e,m=V.useRef(null),v=V.useRef(),y=()=>{m.current&&(v.current=new fy(m.current,{type:s,data:q_e(a,o),options:l&&{...l},plugins:c}),bL(t,v.current))},x=()=>{bL(t,null),v.current&&(v.current.destroy(),v.current=null)};return V.useEffect(()=>{!i&&v.current&&l&&Y_e(v.current,l)},[i,l]),V.useEffect(()=>{!i&&v.current&&L8(v.current.config.data,a.labels)},[i,a.labels]),V.useEffect(()=>{!i&&v.current&&a.datasets&&D8(v.current.config.data,a.datasets,o)},[i,a.datasets]),V.useEffect(()=>{v.current&&(i?(x(),setTimeout(y)):v.current.update(h))},[i,l,a.labels,a.datasets,h]),V.useEffect(()=>{v.current&&(x(),setTimeout(y))},[s]),V.useEffect(()=>(y(),()=>x()),[]),U.createElement("canvas",Object.assign({ref:m,role:"img",height:n,width:r},p),f)}const Z_e=V.forwardRef(G_e);function iT(e,t){return fy.register(t),V.forwardRef((n,r)=>U.createElement(Z_e,Object.assign({},n,{ref:r,type:e})))}const K_e=iT("line",cf),X_e=iT("bar",lf),Q_e=iT("doughnut",ls),j8=({native:e},[t])=>{if(!(e!=null&&e.target))return;const n=e.target;n.style.cursor=t?"pointer":"default"},I8=({dataset:e,raw:t})=>`${e.label}: ${_n(`${t}`)}`,J_e=({label:e,raw:t})=>`${e}: ${_n(`${t}`)}`;const e0e=({chart:e})=>{const{config:t}=e,{labels:n=[],datasets:r=[]}=t.data??{},[{backgroundColor:i}]=r,{defaultColor:o}=t.options??{};return g.jsx("ul",{className:"doughnut-chart-legend",children:n.map((s,a)=>g.jsxs("li",{className:"doughnut-chart-legend__item d-flex",children:[g.jsx("div",{className:"doughnut-chart-legend__item-color",style:{backgroundColor:i[a]??o}}),g.jsx("small",{className:"doughnut-chart-legend__item-text flex-fill",children:s})]},s))})},t0e=e=>[{data:e,backgroundColor:["#97BBCD","#F7464A","#46BFBD","#FDB45C","#949FB1","#57A773","#414066","#08B2E3","#B6C454","#DCDCDC","#463730"],borderColor:Moe()?koe:Poe,borderWidth:2}],n0e=(e,t)=>({labels:e,datasets:t0e(t)}),r0e=V.memo(({stats:e})=>{const[t,n]=V.useState(),r=Ji(e),i=Qc(e),o={plugins:{legend:{display:!1},tooltip:{intersect:!0,callbacks:{label:J_e}}}},s=n0e(r,i);return g.jsxs("div",{className:"row",children:[g.jsx("div",{className:"col-sm-12 col-md-7",children:g.jsx(Q_e,{height:300,data:s,options:o,ref:a=>{n(a??void 0)}})}),g.jsx("div",{className:"col-sm-12 col-md-5",children:t&&g.jsx(e0e,{chart:t})})]})}),wL=({title:e,stats:t})=>g.jsx(R8,{title:e,children:g.jsx(r0e,{stats:t})}),i0e={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},F8={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},en={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},sr={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},Xo={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class we{static getFirstMatch(t,n){const r=n.match(t);return r&&r.length>0&&r[1]||""}static getSecondMatch(t,n){const r=n.match(t);return r&&r.length>1&&r[2]||""}static matchAndReturnConst(t,n,r){if(t.test(n))return r}static getWindowsVersionName(t){switch(t){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(t){const n=t.split(".").splice(0,2).map(r=>parseInt(r,10)||0);if(n.push(0),n[0]===10)switch(n[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(t){const n=t.split(".").splice(0,2).map(r=>parseInt(r,10)||0);if(n.push(0),!(n[0]===1&&n[1]<5)){if(n[0]===1&&n[1]<6)return"Cupcake";if(n[0]===1&&n[1]>=6)return"Donut";if(n[0]===2&&n[1]<2)return"Eclair";if(n[0]===2&&n[1]===2)return"Froyo";if(n[0]===2&&n[1]>2)return"Gingerbread";if(n[0]===3)return"Honeycomb";if(n[0]===4&&n[1]<1)return"Ice Cream Sandwich";if(n[0]===4&&n[1]<4)return"Jelly Bean";if(n[0]===4&&n[1]>=4)return"KitKat";if(n[0]===5)return"Lollipop";if(n[0]===6)return"Marshmallow";if(n[0]===7)return"Nougat";if(n[0]===8)return"Oreo";if(n[0]===9)return"Pie"}}static getVersionPrecision(t){return t.split(".").length}static compareVersions(t,n,r=!1){const i=we.getVersionPrecision(t),o=we.getVersionPrecision(n);let s=Math.max(i,o),a=0;const l=we.map([t,n],c=>{const f=s-we.getVersionPrecision(c),h=c+new Array(f+1).join(".0");return we.map(h.split("."),p=>new Array(20-p.length).join("0")+p).reverse()});for(r&&(a=s-Math.min(i,o)),s-=1;s>=a;){if(l[0][s]>l[1][s])return 1;if(l[0][s]===l[1][s]){if(s===a)return 0;s-=1}else if(l[0][s]{r[l]=s[l]})}return t}static getBrowserAlias(t){return i0e[t]}static getBrowserTypeByAlias(t){return F8[t]||""}}const xt=/version\/(\d+(\.?_?\d+)+)/i,o0e=[{test:[/googlebot/i],describe(e){const t={name:"Googlebot"},n=we.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||we.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){const t={name:"Opera"},n=we.getFirstMatch(xt,e)||we.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){const t={name:"Opera"},n=we.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||we.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){const t={name:"Samsung Internet for Android"},n=we.getFirstMatch(xt,e)||we.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe(e){const t={name:"NAVER Whale Browser"},n=we.getFirstMatch(xt,e)||we.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){const t={name:"MZ Browser"},n=we.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||we.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){const t={name:"Focus"},n=we.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||we.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){const t={name:"Swing"},n=we.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||we.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){const t={name:"Opera Coast"},n=we.getFirstMatch(xt,e)||we.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(e){const t={name:"Opera Touch"},n=we.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||we.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){const t={name:"Yandex Browser"},n=we.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||we.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){const t={name:"UC Browser"},n=we.getFirstMatch(xt,e)||we.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){const t={name:"Maxthon"},n=we.getFirstMatch(xt,e)||we.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){const t={name:"Epiphany"},n=we.getFirstMatch(xt,e)||we.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){const t={name:"Puffin"},n=we.getFirstMatch(xt,e)||we.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){const t={name:"Sleipnir"},n=we.getFirstMatch(xt,e)||we.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe(e){const t={name:"K-Meleon"},n=we.getFirstMatch(xt,e)||we.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){const t={name:"WeChat"},n=we.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||we.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe(e){const t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=we.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||we.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){const t={name:"Internet Explorer"},n=we.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){const t={name:"Microsoft Edge"},n=we.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe(e){const t={name:"Microsoft Edge"},n=we.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){const t={name:"Vivaldi"},n=we.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){const t={name:"SeaMonkey"},n=we.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){const t={name:"Sailfish"},n=we.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe(e){const t={name:"Amazon Silk"},n=we.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){const t={name:"PhantomJS"},n=we.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){const t={name:"SlimerJS"},n=we.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t={name:"BlackBerry"},n=we.getFirstMatch(xt,e)||we.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe(e){const t={name:"WebOS Browser"},n=we.getFirstMatch(xt,e)||we.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe(e){const t={name:"Bada"},n=we.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){const t={name:"Tizen"},n=we.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||we.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){const t={name:"QupZilla"},n=we.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||we.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){const t={name:"Firefox"},n=we.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe(e){const t={name:"Electron"},n=we.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe(e){const t={name:"Miui"},n=we.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe(e){const t={name:"Chromium"},n=we.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||we.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){const t={name:"Chrome"},n=we.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe(e){const t={name:"Google Search"},n=we.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t={name:"Android Browser"},n=we.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){const t={name:"PlayStation 4"},n=we.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){const t={name:"Safari"},n=we.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){const t=/^(.*)\/(.*) /,n=/^(.*)\/(.*)[ \t]\((.*)/,i=e.search("\\(")!==-1?n:t;return{name:we.getFirstMatch(i,e),version:we.getSecondMatch(i,e)}}}],s0e=[{test:[/Roku\/DVP/],describe(e){const t=we.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:sr.Roku,version:t}}},{test:[/windows phone/i],describe(e){const t=we.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:sr.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){const t=we.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=we.getWindowsVersionName(t);return{name:sr.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){const t={name:sr.iOS},n=we.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){const t=we.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=we.getMacOSVersionName(t),r={name:sr.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){const t=we.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:sr.iOS,version:t}}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t=we.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=we.getAndroidVersionName(t),r={name:sr.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){const t=we.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:sr.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t=we.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||we.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||we.getFirstMatch(/\bbb(\d+)/i,e);return{name:sr.BlackBerry,version:t}}},{test:[/bada/i],describe(e){const t=we.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:sr.Bada,version:t}}},{test:[/tizen/i],describe(e){const t=we.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:sr.Tizen,version:t}}},{test:[/linux/i],describe(){return{name:sr.Linux}}},{test:[/CrOS/],describe(){return{name:sr.ChromeOS}}},{test:[/PlayStation 4/],describe(e){const t=we.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:sr.PlayStation4,version:t}}}],a0e=[{test:[/googlebot/i],describe(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe(e){const t=we.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:en.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:en.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:en.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:en.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:en.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:en.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:en.tablet}}},{test(e){const t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){const t=we.getFirstMatch(/(ipod|iphone)/i,e);return{type:en.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:en.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe(){return{type:en.mobile}}},{test(e){return e.getBrowserName(!0)==="blackberry"},describe(){return{type:en.mobile,vendor:"BlackBerry"}}},{test(e){return e.getBrowserName(!0)==="bada"},describe(){return{type:en.mobile}}},{test(e){return e.getBrowserName()==="windows phone"},describe(){return{type:en.mobile,vendor:"Microsoft"}}},{test(e){const t=Number(String(e.getOSVersion()).split(".")[0]);return e.getOSName(!0)==="android"&&t>=3},describe(){return{type:en.tablet}}},{test(e){return e.getOSName(!0)==="android"},describe(){return{type:en.mobile}}},{test(e){return e.getOSName(!0)==="macos"},describe(){return{type:en.desktop,vendor:"Apple"}}},{test(e){return e.getOSName(!0)==="windows"},describe(){return{type:en.desktop}}},{test(e){return e.getOSName(!0)==="linux"},describe(){return{type:en.desktop}}},{test(e){return e.getOSName(!0)==="playstation 4"},describe(){return{type:en.tv}}},{test(e){return e.getOSName(!0)==="roku"},describe(){return{type:en.tv}}}],l0e=[{test(e){return e.getBrowserName(!0)==="microsoft edge"},describe(e){if(/\sedg\//i.test(e))return{name:Xo.Blink};const n=we.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:Xo.EdgeHTML,version:n}}},{test:[/trident/i],describe(e){const t={name:Xo.Trident},n=we.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){return e.test(/presto/i)},describe(e){const t={name:Xo.Presto},n=we.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe(e){const t={name:Xo.Gecko},n=we.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:Xo.Blink}}},{test:[/(apple)?webkit/i],describe(e){const t={name:Xo.WebKit},n=we.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];class xL{constructor(t,n=!1){if(t==null||t==="")throw new Error("UserAgent parameter can't be empty");this._ua=t,this.parsedResult={},n!==!0&&this.parse()}getUA(){return this._ua}test(t){return t.test(this._ua)}parseBrowser(){this.parsedResult.browser={};const t=we.find(o0e,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(t){return t?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};const t=we.find(s0e,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os}getOSName(t){const{name:n}=this.getOS();return t?String(n).toLowerCase()||"":n||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(t=!1){const{type:n}=this.getPlatform();return t?String(n).toLowerCase()||"":n||""}parsePlatform(){this.parsedResult.platform={};const t=we.find(a0e,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(t){return t?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};const t=we.find(l0e,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return we.assign({},this.parsedResult)}satisfies(t){const n={};let r=0;const i={};let o=0;if(Object.keys(t).forEach(a=>{const l=t[a];typeof l=="string"?(i[a]=l,o+=1):typeof l=="object"&&(n[a]=l,r+=1)}),r>0){const a=Object.keys(n),l=we.find(a,f=>this.isOS(f));if(l){const f=this.satisfies(n[l]);if(f!==void 0)return f}const c=we.find(a,f=>this.isPlatform(f));if(c){const f=this.satisfies(n[c]);if(f!==void 0)return f}}if(o>0){const a=Object.keys(i),l=we.find(a,c=>this.isBrowser(c,!0));if(l!==void 0)return this.compareVersion(i[l])}}isBrowser(t,n=!1){const r=this.getBrowserName().toLowerCase();let i=t.toLowerCase();const o=we.getBrowserTypeByAlias(i);return n&&o&&(i=o.toLowerCase()),i===r}compareVersion(t){let n=[0],r=t,i=!1;const o=this.getBrowserVersion();if(typeof o=="string")return t[0]===">"||t[0]==="<"?(r=t.substr(1),t[1]==="="?(i=!0,r=t.substr(2)):n=[],t[0]===">"?n.push(1):n.push(-1)):t[0]==="="?r=t.substr(1):t[0]==="~"&&(i=!0,r=t.substr(1)),n.indexOf(we.compareVersions(o,r,i))>-1}isOS(t){return this.getOSName(!0)===String(t).toLowerCase()}isPlatform(t){return this.getPlatformType(!0)===String(t).toLowerCase()}isEngine(t){return this.getEngineName(!0)===String(t).toLowerCase()}is(t,n=!1){return this.isBrowser(t,n)||this.isOS(t)||this.isPlatform(t)}some(t=[]){return t.some(n=>this.is(n))}}/*! * Bowser - a browser detector * https://github.com/lancedikson/bowser * MIT License | (c) Dustin Diaz 2012-2015 * MIT License | (c) Denis Demchenko 2015-2019 */class c0e{static getParser(t,n=!1){if(typeof t!="string")throw new Error("UserAgent should be a string");return new xL(t,n)}static parse(t){return new xL(t).getResult()}static get BROWSER_MAP(){return F8}static get ENGINE_MAP(){return Xo}static get OS_MAP(){return sr}static get PLATFORMS_MAP(){return en}}const jp="Others",u0e=["Android Browser","Chrome","Chromium","Firefox","Internet Explorer","Microsoft Edge","Opera","Safari","Samsung Internet for Android","Vivaldi","WeChat"],f0e=e=>{if(!gi(e))return{browser:jp,os:jp};const{browser:{name:t},os:{name:n}}=c0e.parse(e);return{os:n??jp,browser:t&&u0e.includes(t)?t:jp}},d0e=e=>{var t;return gi(e)?((t=e.split("/")[e.includes("://")?2:0])==null?void 0:t.split(":")[0])??"":"Direct"},oT=(e,t)=>Object.values({...Pj(t,t.map(()=>0)),...e});const SL={monthly:"Month",weekly:"Week",daily:"Day",hourly:"Hour"},h0e={hourly:e=>({hours:e}),daily:e=>({days:e}),weekly:e=>({weeks:e}),monthly:e=>({months:e})},p0e={hourly:Aae,daily:OE,weekly:$ae,monthly:gv},sT={hourly:e=>vo(e,"yyyy-MM-dd HH:00"),daily:e=>vo(e,Mf),weekly(e){const t=vo(Sd(e),Mf),n=vo(Vae(e),Mf);return`${t} - ${n}`},monthly:e=>vo(e,"yyyy-MM")},m0e=e=>{const t=new Date,n=Do(e);return nC([[()=>OE(t,n)<=2,q0("hourly")],[()=>gv(t,n)<=1,q0("daily")],[()=>gv(t,n)<=6,q0("weekly")]])()??"monthly"},CL=(e,t)=>Sj(n=>sT[e](Do(n.date)),t),g0e=(e,t)=>t.reduce((n,r)=>{const i=sT[e](Do(r.date));return n[i]=n[i]??[],n[i].push(r),n},{}),v0e=(e,t)=>{const n=p0e[e],r=sT[e],i=Do(t[0].date),o=Do(t[t.length-1].date),s=n(i,o),a=h0e[e];return[r(o),..._E(s,l=>r(Cae(o,a(l))))]},y0e=(e,t,n,r)=>{if(r)return[Object.keys(t),Object.values(t)];const i=v0e(n,e);return[i,oT(t,i)]},EL=(e,t,n)=>({label:t,data:e,fill:!1,tension:.2,borderColor:n,backgroundColor:n});let Y1=null;const _0e=(e,t,[n],r)=>{if(!r||!n)return;const{index:i}=n;Y1===e[i]?(r([]),Y1=null):(r(e[i]&&t[e[i]]?t[e[i]]:[]),Y1=e[i]??null)},b0e=({title:e,visits:t,highlightedVisits:n,highlightedLabel:r="Selected",setSelectedVisits:i})=>{const[o,s]=V.useState(t.length>0?m0e(t[t.length-1].date):"monthly"),[a,l]=It(!0),c=V.useRef(null),f=V.useRef(null),h=V.useMemo(()=>g0e(o,t),[o,t]),p=V.useMemo(()=>CL(o,cw(t)),[o,t]),[m,v]=V.useMemo(()=>y0e(t,p,o,a),[t,o,a]),y=V.useMemo(()=>oT(CL(o,cw(n)),m),[n,o,m]),x=()=>{const T=EL(v,"Visits",cE);if(n.length===0)return[T];const P=EL(y,r,w6);return[T,P]},_=()=>({labels:m,datasets:x()}),w={maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{intersect:!1,axis:"x",callbacks:{label:I8}}},scales:{y:{beginAtZero:!0,ticks:{precision:0,callback:_n}},x:{title:{display:!0,text:SL[o]}}},onHover:j8},S=T=>g.jsx(K_e,{ref:T,data:_(),options:w,onClick:P=>_0e(m,h,A8(T.current,P),i)});return g.jsxs(Sr,{children:[g.jsxs(rl,{role:"heading",children:[e,g.jsx("div",{className:"float-end",children:g.jsxs(Jd,{children:[g.jsx(nu,{caret:!0,color:"link",className:"btn-sm p-0",children:"Group by"}),g.jsx(hl,{end:!0,children:Object.entries(SL).map(([T,P])=>g.jsx(Ue,{active:o===T,onClick:()=>s(T),children:P},T))})]})}),g.jsx("div",{className:"float-end me-2",children:g.jsx(Hc,{checked:a,onChange:l,children:g.jsx("small",{children:"Skip dates with no visits"})})})]}),g.jsxs(nl,{className:"line-chart-card__body",children:[n.length>0&&S(c),n.length===0&&S(f)]})]})},w0e=({toggleClassName:e,ranges:t,value:n,setValue:r})=>g.jsxs(Jd,{children:[g.jsx(nu,{caret:!0,color:"link",className:e,children:"Paginate"}),g.jsxs(hl,{end:!0,children:[t.map(i=>g.jsxs(Ue,{active:i===n,onClick:()=>r(i),children:[g.jsx("b",{children:i})," items per page"]},i)),g.jsx(Ue,{divider:!0}),g.jsx(Ue,{disabled:n===1/0,onClick:()=>r(1/0),children:g.jsx("i",{children:"Clear pagination"})})]})]}),x0e=e=>e.startsWith("hidden")?"":e,S0e=e=>!!e&&Object.keys(e).length>0,C0e=e=>e.length>20?e.length*10:void 0,E0e=(e,t,n)=>{const r={data:e,label:n?"Non-selected":"Visits",backgroundColor:Toe,borderColor:cE,borderWidth:2};return t.every(o=>o===0)?[r]:[r,{label:n??"Selected",data:t,backgroundColor:Ooe,borderColor:w6,borderWidth:2}]},T0e=(e,t,n,r)=>({labels:e,datasets:E0e(t,n,r)}),O0e=(e,[t],n)=>{!n||!t||n(e[t.index])},P0e=({stats:e,highlightedStats:t,highlightedLabel:n,onClick:r,max:i})=>{const o=Ji(e).map(x0e),s=Qc(S0e(t)?Ji(t).reduce((v,y)=>(v[y]&&(v[y]-=t[y]),v),{...e}):e),a=oT(t??{},o),l=V.useRef(null),c=V.useRef(null),f={plugins:{legend:{display:!1},tooltip:{mode:"y",filter:({label:v})=>v!=="",callbacks:{label:I8}}},scales:{x:{beginAtZero:!0,stacked:!0,max:i,ticks:{precision:0,callback:_n}},y:{stacked:!0}},onHover:j8,indexAxis:"y"},h=T0e(o,s,a,n),p=C0e(o),m=(v,y)=>g.jsx(X_e,{ref:y,data:h,options:f,height:p,onClick:x=>O0e(o,A8(y.current,x),r)},`${p}_${v}`);return g.jsxs(g.Fragment,{children:[t!==void 0&&m("with_stats",l),t===void 0&&m("without_stats",c)]})},k0e=e=>Wg(e)==="String"?SZ(e):e,TL=([e])=>e,OL=([,e])=>e,Ip=({stats:e,highlightedStats:t,title:n,sortingItems:r,extraHeaderContent:i,withPagination:o=!0,...s})=>{const[a,l]=V.useState({}),[c,f]=V.useState(1),[h,p]=V.useState(50),m=(N,D)=>{const z=qg(N),A=a.field?bZ(Dt(a.field===Object.keys(D)[0]?TL:OL,k0e),z):z;return!a.dir||a.dir==="ASC"?A:cw(A)},v=N=>{const D=N[c-1];if(c[`hidden_${A}`,0])]},y=N=>g.jsx(XE,{currentPage:c,pagesCount:N,setCurrentPage:f}),x=(N,D,z)=>{const A=m(N,D),W=A.map(TL),Y=z&&qg({...Pj(W,W.map(()=>0)),...z});if(A.length<=h)return{currentPageStats:Ku(A),currentPageHighlightedStats:Y&&Ku(Y)};const J=cd(h,A),Z=Y&&cd(h,Y);return{currentPageStats:Ku(v(J)),currentPageHighlightedStats:Z&&Ku(v(Z)),pagination:y(J.length),max:$pe(Math.max(...A.map(OL)))}},{currentPageStats:_,currentPageHighlightedStats:w,pagination:S,max:T}=x(e,r,t&&Object.keys(t).length>0?t:void 0),P=Object.keys(_),k=()=>g.jsxs(g.Fragment,{children:[n,g.jsx("div",{className:"float-end",children:g.jsx(fh,{isButton:!1,right:!0,items:r,order:a,onChange:(N,D)=>{l({field:N,dir:D}),f(1)}})}),o&&Object.keys(e).length>50&&g.jsx("div",{className:"float-end",children:g.jsx(w0e,{toggleClassName:"btn-sm p-0 me-3",ranges:[50,100,200,500],value:h,setValue:N=>{p(N),f(1)}})}),i&&g.jsx("div",{className:"float-end",children:i(S?P:void 0)})]});return g.jsx(R8,{title:k,footer:S,children:g.jsx(P0e,{stats:_,highlightedStats:w,max:T,...s})})},M0e=()=>{const e=Io(),{search:t}=Pn(),{filtering:n,domain:r}=V.useMemo(Dt(()=>dl(t),({startDate:o,endDate:s,orphanVisitsType:a,excludeBots:l,domain:c})=>({domain:c,filtering:{dateRange:o!=null||s!=null?x5(o,s):void 0,visitsFilter:{orphanVisitsType:a,excludeBots:Fo(l)?void 0:l==="true"}}})),[t]);return[n,o=>{const{dateRange:s,visitsFilter:a}=Ej(n,o),{excludeBots:l,orphanVisitsType:c}=a,f={startDate:(s==null?void 0:s.startDate)&&Hs(s.startDate)||"",endDate:(s==null?void 0:s.endDate)&&Hs(s.endDate)||"",excludeBots:l===void 0?void 0:W6(l),orphanVisitsType:c,domain:r},h=Hd(f),p=Wn(h)?"":`?${h}`;e(p,{replace:!0,relative:"route"})}]};function $8(e,t){const n=V.useRef(t);V.useEffect(function(){t!==n.current&&e.attributionControl!=null&&(n.current!=null&&e.attributionControl.removeAttribution(n.current),t!=null&&e.attributionControl.addAttribution(t)),n.current=t},[e,t])}const R0e=1;function N0e(e){return Object.freeze({__version:R0e,map:e})}function L0e(e,t){return Object.freeze({...e,...t})}const B8=V.createContext(null),z8=B8.Provider;function U8(){const e=V.useContext(B8);if(e==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of ");return e}function D0e(e){function t(n,r){const{instance:i,context:o}=e(n).current;return V.useImperativeHandle(r,()=>i),n.children==null?null:U.createElement(z8,{value:o},n.children)}return V.forwardRef(t)}function A0e(e){function t(n,r){const[i,o]=V.useState(!1),{instance:s}=e(n,o).current;V.useImperativeHandle(r,()=>s),V.useEffect(function(){i&&s.update()},[s,i,n.children]);const a=s._contentNode;return a?Ya.createPortal(n.children,a):null}return V.forwardRef(t)}function j0e(e){function t(n,r){const{instance:i}=e(n).current;return V.useImperativeHandle(r,()=>i),null}return V.forwardRef(t)}function V8(e,t){const n=V.useRef();V.useEffect(function(){return t!=null&&e.instance.on(t),n.current=t,function(){n.current!=null&&e.instance.off(n.current),n.current=null}},[e,t])}function aT(e,t){const n=e.pane??t.pane;return n?{...e,pane:n}:e}function I0e(e,t){return function(r,i){const o=U8(),s=e(aT(r,o),o);return $8(o.map,r.attribution),V8(s.current,r.eventHandlers),t(s.current,o,r,i),s}}var Ws={},F0e={get exports(){return Ws},set exports(e){Ws=e}};/* @preserve * Leaflet 1.9.3, a JS library for interactive maps. https://leafletjs.com * (c) 2010-2022 Vladimir Agafonkin, (c) 2010-2011 CloudMade */(function(e,t){(function(n,r){r(t)})(zl,function(n){var r="1.9.3";function i(u){var d,b,E,M;for(b=1,E=arguments.length;b"u"||!L||!L.Mixin)){u=S(u)?u:[u];for(var d=0;d0?Math.floor(u):Math.ceil(u)};G.prototype={clone:function(){return new G(this.x,this.y)},add:function(u){return this.clone()._add(j(u))},_add:function(u){return this.x+=u.x,this.y+=u.y,this},subtract:function(u){return this.clone()._subtract(j(u))},_subtract:function(u){return this.x-=u.x,this.y-=u.y,this},divideBy:function(u){return this.clone()._divideBy(u)},_divideBy:function(u){return this.x/=u,this.y/=u,this},multiplyBy:function(u){return this.clone()._multiplyBy(u)},_multiplyBy:function(u){return this.x*=u,this.y*=u,this},scaleBy:function(u){return new G(this.x*u.x,this.y*u.y)},unscaleBy:function(u){return new G(this.x/u.x,this.y/u.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=F(this.x),this.y=F(this.y),this},distanceTo:function(u){u=j(u);var d=u.x-this.x,b=u.y-this.y;return Math.sqrt(d*d+b*b)},equals:function(u){return u=j(u),u.x===this.x&&u.y===this.y},contains:function(u){return u=j(u),Math.abs(u.x)<=Math.abs(this.x)&&Math.abs(u.y)<=Math.abs(this.y)},toString:function(){return"Point("+p(this.x)+", "+p(this.y)+")"}};function j(u,d,b){return u instanceof G?u:S(u)?new G(u[0],u[1]):u==null?u:typeof u=="object"&&"x"in u&&"y"in u?new G(u.x,u.y):new G(u,d,b)}function B(u,d){if(u)for(var b=d?[u,d]:u,E=0,M=b.length;E=this.min.x&&b.x<=this.max.x&&d.y>=this.min.y&&b.y<=this.max.y},intersects:function(u){u=ne(u);var d=this.min,b=this.max,E=u.min,M=u.max,$=M.x>=d.x&&E.x<=b.x,Q=M.y>=d.y&&E.y<=b.y;return $&&Q},overlaps:function(u){u=ne(u);var d=this.min,b=this.max,E=u.min,M=u.max,$=M.x>d.x&&E.xd.y&&E.y=d.lat&&M.lat<=b.lat&&E.lng>=d.lng&&M.lng<=b.lng},intersects:function(u){u=q(u);var d=this._southWest,b=this._northEast,E=u.getSouthWest(),M=u.getNorthEast(),$=M.lat>=d.lat&&E.lat<=b.lat,Q=M.lng>=d.lng&&E.lng<=b.lng;return $&&Q},overlaps:function(u){u=q(u);var d=this._southWest,b=this._northEast,E=u.getSouthWest(),M=u.getNorthEast(),$=M.lat>d.lat&&E.latd.lng&&E.lng1,Qt=function(){var u=!1;try{var d=Object.defineProperty({},"passive",{get:function(){u=!0}});window.addEventListener("testPassiveEventSupport",h,d),window.removeEventListener("testPassiveEventSupport",h,d)}catch{}return u}(),or=function(){return!!document.createElement("canvas").getContext}(),Dn=!!(document.createElementNS&&Le("svg").createSVGRect),An=!!Dn&&function(){var u=document.createElement("div");return u.innerHTML="",(u.firstChild&&u.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),pn=!Dn&&function(){try{var u=document.createElement("div");u.innerHTML='';var d=u.firstChild;return d.style.behavior="url(#default#VML)",d&&typeof d.adj=="object"}catch{return!1}}(),si=navigator.platform.indexOf("Mac")===0,ai=navigator.platform.indexOf("Linux")===0;function jn(u){return navigator.userAgent.toLowerCase().indexOf(u)>=0}var He={ie:_e,ielt9:Te,edge:De,webkit:Re,android:Ne,android23:ce,androidStock:be,opera:ye,chrome:Ce,gecko:ke,safari:Ie,phantom:Je,opera12:et,win:Ge,ie3d:Wt,webkit3d:$t,gecko3d:wn,any3d:ir,mobile:Mi,mobileWebkit:Ln,mobileWebkit3d:au,msPointer:Ri,pointer:mh,touch:vh,touchNative:gh,mobileOpera:lu,mobileGecko:oa,retina:an,passiveEvents:Qt,canvas:or,svg:Dn,vml:pn,inlineSvg:An,mac:si,linux:ai},dT=He.msPointer?"MSPointerDown":"pointerdown",hT=He.msPointer?"MSPointerMove":"pointermove",pT=He.msPointer?"MSPointerUp":"pointerup",mT=He.msPointer?"MSPointerCancel":"pointercancel",L_={touchstart:dT,touchmove:hT,touchend:pT,touchcancel:mT},gT={touchstart:cF,touchmove:yh,touchend:yh,touchcancel:yh},vl={},vT=!1;function iF(u,d,b){return d==="touchstart"&&lF(),gT[d]?(b=gT[d].bind(this,b),u.addEventListener(L_[d],b,!1),b):(console.warn("wrong event specified:",d),h)}function oF(u,d,b){if(!L_[d]){console.warn("wrong event specified:",d);return}u.removeEventListener(L_[d],b,!1)}function sF(u){vl[u.pointerId]=u}function aF(u){vl[u.pointerId]&&(vl[u.pointerId]=u)}function yT(u){delete vl[u.pointerId]}function lF(){vT||(document.addEventListener(dT,sF,!0),document.addEventListener(hT,aF,!0),document.addEventListener(pT,yT,!0),document.addEventListener(mT,yT,!0),vT=!0)}function yh(u,d){if(d.pointerType!==(d.MSPOINTER_TYPE_MOUSE||"mouse")){d.touches=[];for(var b in vl)d.touches.push(vl[b]);d.changedTouches=[d],u(d)}}function cF(u,d){d.MSPOINTER_TYPE_TOUCH&&d.pointerType===d.MSPOINTER_TYPE_TOUCH&&In(d),yh(u,d)}function uF(u){var d={},b,E;for(E in u)b=u[E],d[E]=b&&b.bind?b.bind(u):b;return u=d,d.type="dblclick",d.detail=2,d.isTrusted=!1,d._simulated=!0,d}var fF=200;function dF(u,d){u.addEventListener("dblclick",d);var b=0,E;function M($){if($.detail!==1){E=$.detail;return}if(!($.pointerType==="mouse"||$.sourceCapabilities&&!$.sourceCapabilities.firesTouchEvents)){var Q=ST($);if(!(Q.some(function(he){return he instanceof HTMLLabelElement&&he.attributes.for})&&!Q.some(function(he){return he instanceof HTMLInputElement||he instanceof HTMLSelectElement}))){var fe=Date.now();fe-b<=fF?(E++,E===2&&d(uF($))):E=1,b=fe}}}return u.addEventListener("click",M),{dblclick:d,simDblclick:M}}function hF(u,d){u.removeEventListener("dblclick",d.dblclick),u.removeEventListener("click",d.simDblclick)}var D_=wh(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),cu=wh(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),_T=cu==="webkitTransition"||cu==="OTransition"?cu+"End":"transitionend";function bT(u){return typeof u=="string"?document.getElementById(u):u}function uu(u,d){var b=u.style[d]||u.currentStyle&&u.currentStyle[d];if((!b||b==="auto")&&document.defaultView){var E=document.defaultView.getComputedStyle(u,null);b=E?E[d]:null}return b==="auto"?null:b}function ft(u,d,b){var E=document.createElement(u);return E.className=d||"",b&&b.appendChild(E),E}function Bt(u){var d=u.parentNode;d&&d.removeChild(u)}function _h(u){for(;u.firstChild;)u.removeChild(u.firstChild)}function yl(u){var d=u.parentNode;d&&d.lastChild!==u&&d.appendChild(u)}function _l(u){var d=u.parentNode;d&&d.firstChild!==u&&d.insertBefore(u,d.firstChild)}function A_(u,d){if(u.classList!==void 0)return u.classList.contains(d);var b=bh(u);return b.length>0&&new RegExp("(^|\\s)"+d+"(\\s|$)").test(b)}function Xe(u,d){if(u.classList!==void 0)for(var b=v(d),E=0,M=b.length;E0?2*window.devicePixelRatio:1;function ET(u){return He.edge?u.wheelDeltaY/2:u.deltaY&&u.deltaMode===0?-u.deltaY/gF:u.deltaY&&u.deltaMode===1?-u.deltaY*20:u.deltaY&&u.deltaMode===2?-u.deltaY*60:u.deltaX||u.deltaZ?0:u.wheelDelta?(u.wheelDeltaY||u.wheelDelta)/2:u.detail&&Math.abs(u.detail)<32765?-u.detail*20:u.detail?u.detail/-32765*60:0}function q_(u,d){var b=d.relatedTarget;if(!b)return!0;try{for(;b&&b!==u;)b=b.parentNode}catch{return!1}return b!==u}var vF={__proto__:null,on:Ze,off:St,stopPropagation:la,disableScrollPropagation:Y_,disableClickPropagation:pu,preventDefault:In,stop:ca,getPropagationPath:ST,getMousePosition:CT,getWheelDelta:ET,isExternalTarget:q_,addListener:Ze,removeListener:St},TT=oe.extend({run:function(u,d,b,E){this.stop(),this._el=u,this._inProgress=!0,this._duration=b||.25,this._easeOutPower=1/Math.max(E||.5,.2),this._startPos=aa(u),this._offset=d.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=W(this._animate,this),this._step()},_step:function(u){var d=+new Date-this._startTime,b=this._duration*1e3;dthis.options.maxZoom)?this.setZoom(u):this},panInsideBounds:function(u,d){this._enforcingBounds=!0;var b=this.getCenter(),E=this._limitCenter(b,this._zoom,q(u));return b.equals(E)||this.panTo(E,d),this._enforcingBounds=!1,this},panInside:function(u,d){d=d||{};var b=j(d.paddingTopLeft||d.padding||[0,0]),E=j(d.paddingBottomRight||d.padding||[0,0]),M=this.project(this.getCenter()),$=this.project(u),Q=this.getPixelBounds(),fe=ne([Q.min.add(b),Q.max.subtract(E)]),he=fe.getSize();if(!fe.contains($)){this._enforcingBounds=!0;var Se=$.subtract(fe.getCenter()),Ae=fe.extend($).getSize().subtract(he);M.x+=Se.x<0?-Ae.x:Ae.x,M.y+=Se.y<0?-Ae.y:Ae.y,this.panTo(this.unproject(M),d),this._enforcingBounds=!1}return this},invalidateSize:function(u){if(!this._loaded)return this;u=i({animate:!1,pan:!0},u===!0?{animate:!0}:u);var d=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var b=this.getSize(),E=d.divideBy(2).round(),M=b.divideBy(2).round(),$=E.subtract(M);return!$.x&&!$.y?this:(u.animate&&u.pan?this.panBy($):(u.pan&&this._rawPanBy($),this.fire("move"),u.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(s(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:d,newSize:b}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(u){if(u=this._locateOptions=i({timeout:1e4,watch:!1},u),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var d=s(this._handleGeolocationResponse,this),b=s(this._handleGeolocationError,this);return u.watch?this._locationWatchId=navigator.geolocation.watchPosition(d,b,u):navigator.geolocation.getCurrentPosition(d,b,u),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(u){if(this._container._leaflet_id){var d=u.code,b=u.message||(d===1?"permission denied":d===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:d,message:"Geolocation error: "+b+"."})}},_handleGeolocationResponse:function(u){if(this._container._leaflet_id){var d=u.coords.latitude,b=u.coords.longitude,E=new te(d,b),M=E.toBounds(u.coords.accuracy*2),$=this._locateOptions;if($.setView){var Q=this.getBoundsZoom(M);this.setView(E,$.maxZoom?Math.min(Q,$.maxZoom):Q)}var fe={latlng:E,bounds:M,timestamp:u.timestamp};for(var he in u.coords)typeof u.coords[he]=="number"&&(fe[he]=u.coords[he]);this.fire("locationfound",fe)}},addHandler:function(u,d){if(!d)return this;var b=this[u]=new d(this);return this._handlers.push(b),this.options[u]&&b.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),Bt(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(Y(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var u;for(u in this._layers)this._layers[u].remove();for(u in this._panes)Bt(this._panes[u]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(u,d){var b="leaflet-pane"+(u?" leaflet-"+u.replace("Pane","")+"-pane":""),E=ft("div",b,d||this._mapPane);return u&&(this._panes[u]=E),E},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var u=this.getPixelBounds(),d=this.unproject(u.getBottomLeft()),b=this.unproject(u.getTopRight());return new H(d,b)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(u,d,b){u=q(u),b=j(b||[0,0]);var E=this.getZoom()||0,M=this.getMinZoom(),$=this.getMaxZoom(),Q=u.getNorthWest(),fe=u.getSouthEast(),he=this.getSize().subtract(b),Se=ne(this.project(fe,E),this.project(Q,E)).getSize(),Ae=He.any3d?this.options.zoomSnap:1,Ye=he.x/Se.x,nt=he.y/Se.y,Ur=d?Math.max(Ye,nt):Math.min(Ye,nt);return E=this.getScaleZoom(Ur,E),Ae&&(E=Math.round(E/(Ae/100))*(Ae/100),E=d?Math.ceil(E/Ae)*Ae:Math.floor(E/Ae)*Ae),Math.max(M,Math.min($,E))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new G(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(u,d){var b=this._getTopLeftPoint(u,d);return new B(b,b.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(u){return this.options.crs.getProjectedBounds(u===void 0?this.getZoom():u)},getPane:function(u){return typeof u=="string"?this._panes[u]:u},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(u,d){var b=this.options.crs;return d=d===void 0?this._zoom:d,b.scale(u)/b.scale(d)},getScaleZoom:function(u,d){var b=this.options.crs;d=d===void 0?this._zoom:d;var E=b.zoom(u*b.scale(d));return isNaN(E)?1/0:E},project:function(u,d){return d=d===void 0?this._zoom:d,this.options.crs.latLngToPoint(se(u),d)},unproject:function(u,d){return d=d===void 0?this._zoom:d,this.options.crs.pointToLatLng(j(u),d)},layerPointToLatLng:function(u){var d=j(u).add(this.getPixelOrigin());return this.unproject(d)},latLngToLayerPoint:function(u){var d=this.project(se(u))._round();return d._subtract(this.getPixelOrigin())},wrapLatLng:function(u){return this.options.crs.wrapLatLng(se(u))},wrapLatLngBounds:function(u){return this.options.crs.wrapLatLngBounds(q(u))},distance:function(u,d){return this.options.crs.distance(se(u),se(d))},containerPointToLayerPoint:function(u){return j(u).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(u){return j(u).add(this._getMapPanePos())},containerPointToLatLng:function(u){var d=this.containerPointToLayerPoint(j(u));return this.layerPointToLatLng(d)},latLngToContainerPoint:function(u){return this.layerPointToContainerPoint(this.latLngToLayerPoint(se(u)))},mouseEventToContainerPoint:function(u){return CT(u,this._container)},mouseEventToLayerPoint:function(u){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(u))},mouseEventToLatLng:function(u){return this.layerPointToLatLng(this.mouseEventToLayerPoint(u))},_initContainer:function(u){var d=this._container=bT(u);if(d){if(d._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Ze(d,"scroll",this._onScroll,this),this._containerId=l(d)},_initLayout:function(){var u=this._container;this._fadeAnimated=this.options.fadeAnimation&&He.any3d,Xe(u,"leaflet-container"+(He.touch?" leaflet-touch":"")+(He.retina?" leaflet-retina":"")+(He.ielt9?" leaflet-oldie":"")+(He.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var d=uu(u,"position");d!=="absolute"&&d!=="relative"&&d!=="fixed"&&d!=="sticky"&&(u.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var u=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),ln(this._mapPane,new G(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Xe(u.markerPane,"leaflet-zoom-hide"),Xe(u.shadowPane,"leaflet-zoom-hide"))},_resetView:function(u,d,b){ln(this._mapPane,new G(0,0));var E=!this._loaded;this._loaded=!0,d=this._limitZoom(d),this.fire("viewprereset");var M=this._zoom!==d;this._moveStart(M,b)._move(u,d)._moveEnd(M),this.fire("viewreset"),E&&this.fire("load")},_moveStart:function(u,d){return u&&this.fire("zoomstart"),d||this.fire("movestart"),this},_move:function(u,d,b,E){d===void 0&&(d=this._zoom);var M=this._zoom!==d;return this._zoom=d,this._lastCenter=u,this._pixelOrigin=this._getNewPixelOrigin(u),E?b&&b.pinch&&this.fire("zoom",b):((M||b&&b.pinch)&&this.fire("zoom",b),this.fire("move",b)),this},_moveEnd:function(u){return u&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return Y(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(u){ln(this._mapPane,this._getMapPanePos().subtract(u))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(u){this._targets={},this._targets[l(this._container)]=this;var d=u?St:Ze;d(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&d(window,"resize",this._onResize,this),He.any3d&&this.options.transform3DLimit&&(u?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){Y(this._resizeRequest),this._resizeRequest=W(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var u=this._getMapPanePos();Math.max(Math.abs(u.x),Math.abs(u.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(u,d){for(var b=[],E,M=d==="mouseout"||d==="mouseover",$=u.target||u.srcElement,Q=!1;$;){if(E=this._targets[l($)],E&&(d==="click"||d==="preclick")&&this._draggableMoved(E)){Q=!0;break}if(E&&E.listens(d,!0)&&(M&&!q_($,u)||(b.push(E),M))||$===this._container)break;$=$.parentNode}return!b.length&&!Q&&!M&&this.listens(d,!0)&&(b=[this]),b},_isClickDisabled:function(u){for(;u&&u!==this._container;){if(u._leaflet_disable_click)return!0;u=u.parentNode}},_handleDOMEvent:function(u){var d=u.target||u.srcElement;if(!(!this._loaded||d._leaflet_disable_events||u.type==="click"&&this._isClickDisabled(d))){var b=u.type;b==="mousedown"&&z_(d),this._fireDOMEvent(u,b)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(u,d,b){if(u.type==="click"){var E=i({},u);E.type="preclick",this._fireDOMEvent(E,E.type,b)}var M=this._findEventTargets(u,d);if(b){for(var $=[],Q=0;Q0?Math.round(u-d)/2:Math.max(0,Math.ceil(u))-Math.max(0,Math.floor(d))},_limitZoom:function(u){var d=this.getMinZoom(),b=this.getMaxZoom(),E=He.any3d?this.options.zoomSnap:1;return E&&(u=Math.round(u/E)*E),Math.max(d,Math.min(b,u))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Jt(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(u,d){var b=this._getCenterOffset(u)._trunc();return(d&&d.animate)!==!0&&!this.getSize().contains(b)?!1:(this.panBy(b,d),!0)},_createAnimProxy:function(){var u=this._proxy=ft("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(u),this.on("zoomanim",function(d){var b=D_,E=this._proxy.style[b];sa(this._proxy,this.project(d.center,d.zoom),this.getZoomScale(d.zoom,1)),E===this._proxy.style[b]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){Bt(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var u=this.getCenter(),d=this.getZoom();sa(this._proxy,this.project(u,d),this.getZoomScale(d,1))},_catchTransitionEnd:function(u){this._animatingZoom&&u.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(u,d,b){if(this._animatingZoom)return!0;if(b=b||{},!this._zoomAnimated||b.animate===!1||this._nothingToAnimate()||Math.abs(d-this._zoom)>this.options.zoomAnimationThreshold)return!1;var E=this.getZoomScale(d),M=this._getCenterOffset(u)._divideBy(1-1/E);return b.animate!==!0&&!this.getSize().contains(M)?!1:(W(function(){this._moveStart(!0,!1)._animateZoom(u,d,!0)},this),!0)},_animateZoom:function(u,d,b,E){this._mapPane&&(b&&(this._animatingZoom=!0,this._animateToCenter=u,this._animateToZoom=d,Xe(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:u,zoom:d,noUpdate:E}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(s(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Jt(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function yF(u,d){return new ot(u,d)}var li=Z.extend({options:{position:"topright"},initialize:function(u){y(this,u)},getPosition:function(){return this.options.position},setPosition:function(u){var d=this._map;return d&&d.removeControl(this),this.options.position=u,d&&d.addControl(this),this},getContainer:function(){return this._container},addTo:function(u){this.remove(),this._map=u;var d=this._container=this.onAdd(u),b=this.getPosition(),E=u._controlCorners[b];return Xe(d,"leaflet-control"),b.indexOf("bottom")!==-1?E.insertBefore(d,E.firstChild):E.appendChild(d),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(Bt(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(u){this._map&&u&&u.screenX>0&&u.screenY>0&&this._map.getContainer().focus()}}),mu=function(u){return new li(u)};ot.include({addControl:function(u){return u.addTo(this),this},removeControl:function(u){return u.remove(),this},_initControlPos:function(){var u=this._controlCorners={},d="leaflet-",b=this._controlContainer=ft("div",d+"control-container",this._container);function E(M,$){var Q=d+M+" "+d+$;u[M+$]=ft("div",Q,b)}E("top","left"),E("top","right"),E("bottom","left"),E("bottom","right")},_clearControlPos:function(){for(var u in this._controlCorners)Bt(this._controlCorners[u]);Bt(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var OT=li.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(u,d,b,E){return b1,this._baseLayersList.style.display=u?"":"none"),this._separator.style.display=d&&u?"":"none",this},_onLayerChange:function(u){this._handlingClick||this._update();var d=this._getLayer(l(u.target)),b=d.overlay?u.type==="add"?"overlayadd":"overlayremove":u.type==="add"?"baselayerchange":null;b&&this._map.fire(b,d)},_createRadioElement:function(u,d){var b='",E=document.createElement("div");return E.innerHTML=b,E.firstChild},_addItem:function(u){var d=document.createElement("label"),b=this._map.hasLayer(u.layer),E;u.overlay?(E=document.createElement("input"),E.type="checkbox",E.className="leaflet-control-layers-selector",E.defaultChecked=b):E=this._createRadioElement("leaflet-base-layers_"+l(this),b),this._layerControlInputs.push(E),E.layerId=l(u.layer),Ze(E,"click",this._onInputClick,this);var M=document.createElement("span");M.innerHTML=" "+u.name;var $=document.createElement("span");d.appendChild($),$.appendChild(E),$.appendChild(M);var Q=u.overlay?this._overlaysList:this._baseLayersList;return Q.appendChild(d),this._checkDisabledLayers(),d},_onInputClick:function(){var u=this._layerControlInputs,d,b,E=[],M=[];this._handlingClick=!0;for(var $=u.length-1;$>=0;$--)d=u[$],b=this._getLayer(d.layerId).layer,d.checked?E.push(b):d.checked||M.push(b);for($=0;$=0;M--)d=u[M],b=this._getLayer(d.layerId).layer,d.disabled=b.options.minZoom!==void 0&&Eb.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var u=this._section;Ze(u,"click",In),this.expand(),setTimeout(function(){St(u,"click",In)})}}),_F=function(u,d,b){return new OT(u,d,b)},G_=li.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(u){var d="leaflet-control-zoom",b=ft("div",d+" leaflet-bar"),E=this.options;return this._zoomInButton=this._createButton(E.zoomInText,E.zoomInTitle,d+"-in",b,this._zoomIn),this._zoomOutButton=this._createButton(E.zoomOutText,E.zoomOutTitle,d+"-out",b,this._zoomOut),this._updateDisabled(),u.on("zoomend zoomlevelschange",this._updateDisabled,this),b},onRemove:function(u){u.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(u){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(u.shiftKey?3:1))},_createButton:function(u,d,b,E,M){var $=ft("a",b,E);return $.innerHTML=u,$.href="#",$.title=d,$.setAttribute("role","button"),$.setAttribute("aria-label",d),pu($),Ze($,"click",ca),Ze($,"click",M,this),Ze($,"click",this._refocusOnMap,this),$},_updateDisabled:function(){var u=this._map,d="leaflet-disabled";Jt(this._zoomInButton,d),Jt(this._zoomOutButton,d),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||u._zoom===u.getMinZoom())&&(Xe(this._zoomOutButton,d),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||u._zoom===u.getMaxZoom())&&(Xe(this._zoomInButton,d),this._zoomInButton.setAttribute("aria-disabled","true"))}});ot.mergeOptions({zoomControl:!0}),ot.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new G_,this.addControl(this.zoomControl))});var bF=function(u){return new G_(u)},PT=li.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(u){var d="leaflet-control-scale",b=ft("div",d),E=this.options;return this._addScales(E,d+"-line",b),u.on(E.updateWhenIdle?"moveend":"move",this._update,this),u.whenReady(this._update,this),b},onRemove:function(u){u.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(u,d,b){u.metric&&(this._mScale=ft("div",d,b)),u.imperial&&(this._iScale=ft("div",d,b))},_update:function(){var u=this._map,d=u.getSize().y/2,b=u.distance(u.containerPointToLatLng([0,d]),u.containerPointToLatLng([this.options.maxWidth,d]));this._updateScales(b)},_updateScales:function(u){this.options.metric&&u&&this._updateMetric(u),this.options.imperial&&u&&this._updateImperial(u)},_updateMetric:function(u){var d=this._getRoundNum(u),b=d<1e3?d+" m":d/1e3+" km";this._updateScale(this._mScale,b,d/u)},_updateImperial:function(u){var d=u*3.2808399,b,E,M;d>5280?(b=d/5280,E=this._getRoundNum(b),this._updateScale(this._iScale,E+" mi",E/b)):(M=this._getRoundNum(d),this._updateScale(this._iScale,M+" ft",M/d))},_updateScale:function(u,d,b){u.style.width=Math.round(this.options.maxWidth*b)+"px",u.innerHTML=d},_getRoundNum:function(u){var d=Math.pow(10,(Math.floor(u)+"").length-1),b=u/d;return b=b>=10?10:b>=5?5:b>=3?3:b>=2?2:1,d*b}}),wF=function(u){return new PT(u)},xF='',Z_=li.extend({options:{position:"bottomright",prefix:''+(He.inlineSvg?xF+" ":"")+"Leaflet"},initialize:function(u){y(this,u),this._attributions={}},onAdd:function(u){u.attributionControl=this,this._container=ft("div","leaflet-control-attribution"),pu(this._container);for(var d in u._layers)u._layers[d].getAttribution&&this.addAttribution(u._layers[d].getAttribution());return this._update(),u.on("layeradd",this._addAttribution,this),this._container},onRemove:function(u){u.off("layeradd",this._addAttribution,this)},_addAttribution:function(u){u.layer.getAttribution&&(this.addAttribution(u.layer.getAttribution()),u.layer.once("remove",function(){this.removeAttribution(u.layer.getAttribution())},this))},setPrefix:function(u){return this.options.prefix=u,this._update(),this},addAttribution:function(u){return u?(this._attributions[u]||(this._attributions[u]=0),this._attributions[u]++,this._update(),this):this},removeAttribution:function(u){return u?(this._attributions[u]&&(this._attributions[u]--,this._update()),this):this},_update:function(){if(this._map){var u=[];for(var d in this._attributions)this._attributions[d]&&u.push(d);var b=[];this.options.prefix&&b.push(this.options.prefix),u.length&&b.push(u.join(", ")),this._container.innerHTML=b.join(' ')}}});ot.mergeOptions({attributionControl:!0}),ot.addInitHook(function(){this.options.attributionControl&&new Z_().addTo(this)});var SF=function(u){return new Z_(u)};li.Layers=OT,li.Zoom=G_,li.Scale=PT,li.Attribution=Z_,mu.layers=_F,mu.zoom=bF,mu.scale=wF,mu.attribution=SF;var Li=Z.extend({initialize:function(u){this._map=u},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Li.addTo=function(u,d){return u.addHandler(d,this),this};var CF={Events:ie},kT=He.touch?"touchstart mousedown":"mousedown",Ho=oe.extend({options:{clickTolerance:3},initialize:function(u,d,b,E){y(this,E),this._element=u,this._dragStartTarget=d||u,this._preventOutline=b},enable:function(){this._enabled||(Ze(this._dragStartTarget,kT,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Ho._dragging===this&&this.finishDrag(!0),St(this._dragStartTarget,kT,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(u){if(this._enabled&&(this._moved=!1,!A_(this._element,"leaflet-zoom-anim"))){if(u.touches&&u.touches.length!==1){Ho._dragging===this&&this.finishDrag();return}if(!(Ho._dragging||u.shiftKey||u.which!==1&&u.button!==1&&!u.touches)&&(Ho._dragging=this,this._preventOutline&&z_(this._element),F_(),fu(),!this._moving)){this.fire("down");var d=u.touches?u.touches[0]:u,b=wT(this._element);this._startPoint=new G(d.clientX,d.clientY),this._startPos=aa(this._element),this._parentScale=U_(b);var E=u.type==="mousedown";Ze(document,E?"mousemove":"touchmove",this._onMove,this),Ze(document,E?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(u){if(this._enabled){if(u.touches&&u.touches.length>1){this._moved=!0;return}var d=u.touches&&u.touches.length===1?u.touches[0]:u,b=new G(d.clientX,d.clientY)._subtract(this._startPoint);!b.x&&!b.y||Math.abs(b.x)+Math.abs(b.y)$&&(Q=fe,$=he);$>b&&(d[Q]=1,K_(u,d,b,E,Q),K_(u,d,b,Q,M))}function OF(u,d){for(var b=[u[0]],E=1,M=0,$=u.length;E<$;E++)PF(u[E],u[M])>d&&(b.push(u[E]),M=E);return M<$-1&&b.push(u[$-1]),b}var NT;function LT(u,d,b,E,M){var $=E?NT:ua(u,b),Q=ua(d,b),fe,he,Se;for(NT=Q;;){if(!($|Q))return[u,d];if($&Q)return!1;fe=$||Q,he=Ch(u,d,fe,b,M),Se=ua(he,b),fe===$?(u=he,$=Se):(d=he,Q=Se)}}function Ch(u,d,b,E,M){var $=d.x-u.x,Q=d.y-u.y,fe=E.min,he=E.max,Se,Ae;return b&8?(Se=u.x+$*(he.y-u.y)/Q,Ae=he.y):b&4?(Se=u.x+$*(fe.y-u.y)/Q,Ae=fe.y):b&2?(Se=he.x,Ae=u.y+Q*(he.x-u.x)/$):b&1&&(Se=fe.x,Ae=u.y+Q*(fe.x-u.x)/$),new G(Se,Ae,M)}function ua(u,d){var b=0;return u.xd.max.x&&(b|=2),u.yd.max.y&&(b|=8),b}function PF(u,d){var b=d.x-u.x,E=d.y-u.y;return b*b+E*E}function gu(u,d,b,E){var M=d.x,$=d.y,Q=b.x-M,fe=b.y-$,he=Q*Q+fe*fe,Se;return he>0&&(Se=((u.x-M)*Q+(u.y-$)*fe)/he,Se>1?(M=b.x,$=b.y):Se>0&&(M+=Q*Se,$+=fe*Se)),Q=u.x-M,fe=u.y-$,E?Q*Q+fe*fe:new G(M,$)}function zr(u){return!S(u[0])||typeof u[0][0]!="object"&&typeof u[0][0]<"u"}function DT(u){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),zr(u)}function AT(u,d){var b,E,M,$,Q,fe,he,Se;if(!u||u.length===0)throw new Error("latlngs not passed");zr(u)||(console.warn("latlngs are not flat! Only the first ring will be used"),u=u[0]);var Ae=[];for(var Ye in u)Ae.push(d.project(se(u[Ye])));var nt=Ae.length;for(b=0,E=0;bE){he=($-E)/M,Se=[fe.x-he*(fe.x-Q.x),fe.y-he*(fe.y-Q.y)];break}return d.unproject(j(Se))}var kF={__proto__:null,simplify:MT,pointToSegmentDistance:RT,closestPointOnSegment:EF,clipSegment:LT,_getEdgeIntersection:Ch,_getBitCode:ua,_sqClosestPointOnSegment:gu,isFlat:zr,_flat:DT,polylineCenter:AT};function jT(u,d,b){var E,M=[1,4,2,8],$,Q,fe,he,Se,Ae,Ye,nt;for($=0,Ae=u.length;$1e-7;fe++)Se=M*Math.sin(Q),Se=Math.pow((1-Se)/(1+Se),M/2),he=Math.PI/2-2*Math.atan($*Se)-Q,Q+=he;return new te(Q*d,u.x*d/b)}},RF={__proto__:null,LonLat:X_,Mercator:Q_,SphericalMercator:I},NF=i({},O,{code:"EPSG:3395",projection:Q_,transformation:function(){var u=.5/(Math.PI*Q_.R);return K(u,.5,-u,.5)}()}),FT=i({},O,{code:"EPSG:4326",projection:X_,transformation:K(1/180,1,-1/180,.5)}),LF=i({},pe,{projection:X_,transformation:K(1,0,-1,0),scale:function(u){return Math.pow(2,u)},zoom:function(u){return Math.log(u)/Math.LN2},distance:function(u,d){var b=d.lng-u.lng,E=d.lat-u.lat;return Math.sqrt(b*b+E*E)},infinite:!0});pe.Earth=O,pe.EPSG3395=NF,pe.EPSG3857=ae,pe.EPSG900913=ge,pe.EPSG4326=FT,pe.Simple=LF;var ci=oe.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(u){return u.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(u){return u&&u.removeLayer(this),this},getPane:function(u){return this._map.getPane(u?this.options[u]||u:this.options.pane)},addInteractiveTarget:function(u){return this._map._targets[l(u)]=this,this},removeInteractiveTarget:function(u){return delete this._map._targets[l(u)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(u){var d=u.target;if(d.hasLayer(this)){if(this._map=d,this._zoomAnimated=d._zoomAnimated,this.getEvents){var b=this.getEvents();d.on(b,this),this.once("remove",function(){d.off(b,this)},this)}this.onAdd(d),this.fire("add"),d.fire("layeradd",{layer:this})}}});ot.include({addLayer:function(u){if(!u._layerAdd)throw new Error("The provided object is not a Layer.");var d=l(u);return this._layers[d]?this:(this._layers[d]=u,u._mapToAdd=this,u.beforeAdd&&u.beforeAdd(this),this.whenReady(u._layerAdd,u),this)},removeLayer:function(u){var d=l(u);return this._layers[d]?(this._loaded&&u.onRemove(this),delete this._layers[d],this._loaded&&(this.fire("layerremove",{layer:u}),u.fire("remove")),u._map=u._mapToAdd=null,this):this},hasLayer:function(u){return l(u)in this._layers},eachLayer:function(u,d){for(var b in this._layers)u.call(d,this._layers[b]);return this},_addLayers:function(u){u=u?S(u)?u:[u]:[];for(var d=0,b=u.length;dthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&d[0]instanceof te&&d[0].equals(d[b-1])&&d.pop(),d},_setLatLngs:function(u){oo.prototype._setLatLngs.call(this,u),zr(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return zr(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var u=this._renderer._bounds,d=this.options.weight,b=new G(d,d);if(u=new B(u.min.subtract(b),u.max.add(b)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(u))){if(this.options.noClip){this._parts=this._rings;return}for(var E=0,M=this._rings.length,$;Eu.y!=M.y>u.y&&u.x<(M.x-E.x)*(u.y-E.y)/(M.y-E.y)+E.x&&(d=!d);return d||oo.prototype._containsPoint.call(this,u,!0)}});function zF(u,d){return new xl(u,d)}var so=io.extend({initialize:function(u,d){y(this,d),this._layers={},u&&this.addData(u)},addData:function(u){var d=S(u)?u:u.features,b,E,M;if(d){for(b=0,E=d.length;b0?E:[d.src];return}S(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(d.style,"objectFit")&&(d.style.objectFit="fill"),d.autoplay=!!this.options.autoplay,d.loop=!!this.options.loop,d.muted=!!this.options.muted,d.playsInline=!!this.options.playsInline;for(var $=0;$M?(d.height=M+"px",Xe(u,$)):Jt(u,$),this._containerWidth=this._container.offsetWidth},_animateZoom:function(u){var d=this._map._latLngToNewLayerPoint(this._latlng,u.zoom,u.center),b=this._getAnchor();ln(this._container,d.add(b))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var u=this._map,d=parseInt(uu(this._container,"marginBottom"),10)||0,b=this._container.offsetHeight+d,E=this._containerWidth,M=new G(this._containerLeft,-b-this._containerBottom);M._add(aa(this._container));var $=u.layerPointToContainerPoint(M),Q=j(this.options.autoPanPadding),fe=j(this.options.autoPanPaddingTopLeft||Q),he=j(this.options.autoPanPaddingBottomRight||Q),Se=u.getSize(),Ae=0,Ye=0;$.x+E+he.x>Se.x&&(Ae=$.x+E-Se.x+he.x),$.x-Ae-fe.x<0&&(Ae=$.x-fe.x),$.y+b+he.y>Se.y&&(Ye=$.y+b-Se.y+he.y),$.y-Ye-fe.y<0&&(Ye=$.y-fe.y),(Ae||Ye)&&(this.options.keepInView&&(this._autopanning=!0),u.fire("autopanstart").panBy([Ae,Ye]))}},_getAnchor:function(){return j(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),YF=function(u,d){return new Nh(u,d)};ot.mergeOptions({closePopupOnClick:!0}),ot.include({openPopup:function(u,d,b){return this._initOverlay(Nh,u,d,b).openOn(this),this},closePopup:function(u){return u=arguments.length?u:this._popup,u&&u.close(),this}}),ci.include({bindPopup:function(u,d){return this._popup=this._initOverlay(Nh,this._popup,u,d),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(u){return this._popup&&(this instanceof io||(this._popup._source=this),this._popup._prepareOpen(u||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(u){return this._popup&&this._popup.setContent(u),this},getPopup:function(){return this._popup},_openPopup:function(u){if(!(!this._popup||!this._map)){ca(u);var d=u.layer||u.target;if(this._popup._source===d&&!(d instanceof Wo)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(u.latlng);return}this._popup._source=d,this.openPopup(u.latlng)}},_movePopup:function(u){this._popup.setLatLng(u.latlng)},_onKeyPress:function(u){u.originalEvent.keyCode===13&&this._openPopup(u)}});var Lh=Di.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(u){Di.prototype.onAdd.call(this,u),this.setOpacity(this.options.opacity),u.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(u){Di.prototype.onRemove.call(this,u),u.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var u=Di.prototype.getEvents.call(this);return this.options.permanent||(u.preclick=this.close),u},_initLayout:function(){var u="leaflet-tooltip",d=u+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=ft("div",d),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+l(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(u){var d,b,E=this._map,M=this._container,$=E.latLngToContainerPoint(E.getCenter()),Q=E.layerPointToContainerPoint(u),fe=this.options.direction,he=M.offsetWidth,Se=M.offsetHeight,Ae=j(this.options.offset),Ye=this._getAnchor();fe==="top"?(d=he/2,b=Se):fe==="bottom"?(d=he/2,b=0):fe==="center"?(d=he/2,b=Se/2):fe==="right"?(d=0,b=Se/2):fe==="left"?(d=he,b=Se/2):Q.x<$.x?(fe="right",d=0,b=Se/2):(fe="left",d=he+(Ae.x+Ye.x)*2,b=Se/2),u=u.subtract(j(d,b,!0)).add(Ae).add(Ye),Jt(M,"leaflet-tooltip-right"),Jt(M,"leaflet-tooltip-left"),Jt(M,"leaflet-tooltip-top"),Jt(M,"leaflet-tooltip-bottom"),Xe(M,"leaflet-tooltip-"+fe),ln(M,u)},_updatePosition:function(){var u=this._map.latLngToLayerPoint(this._latlng);this._setPosition(u)},setOpacity:function(u){this.options.opacity=u,this._container&&Br(this._container,u)},_animateZoom:function(u){var d=this._map._latLngToNewLayerPoint(this._latlng,u.zoom,u.center);this._setPosition(d)},_getAnchor:function(){return j(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),qF=function(u,d){return new Lh(u,d)};ot.include({openTooltip:function(u,d,b){return this._initOverlay(Lh,u,d,b).openOn(this),this},closeTooltip:function(u){return u.close(),this}}),ci.include({bindTooltip:function(u,d){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Lh,this._tooltip,u,d),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(u){if(!(!u&&this._tooltipHandlersAdded)){var d=u?"off":"on",b={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?b.add=this._openTooltip:(b.mouseover=this._openTooltip,b.mouseout=this.closeTooltip,b.click=this._openTooltip,this._map?this._addFocusListeners():b.add=this._addFocusListeners),this._tooltip.options.sticky&&(b.mousemove=this._moveTooltip),this[d](b),this._tooltipHandlersAdded=!u}},openTooltip:function(u){return this._tooltip&&(this instanceof io||(this._tooltip._source=this),this._tooltip._prepareOpen(u)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(u){return this._tooltip&&this._tooltip.setContent(u),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(u){var d=u.getElement();d&&(Ze(d,"focus",function(){this._tooltip._source=u,this.openTooltip()},this),Ze(d,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(u){var d=u.getElement();d&&d.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(u){!this._tooltip||!this._map||this._map.dragging&&this._map.dragging.moving()||(this._tooltip._source=u.layer||u.target,this.openTooltip(this._tooltip.options.sticky?u.latlng:void 0))},_moveTooltip:function(u){var d=u.latlng,b,E;this._tooltip.options.sticky&&u.originalEvent&&(b=this._map.mouseEventToContainerPoint(u.originalEvent),E=this._map.containerPointToLayerPoint(b),d=this._map.layerPointToLatLng(E)),this._tooltip.setLatLng(d)}});var HT=wl.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(u){var d=u&&u.tagName==="DIV"?u:document.createElement("div"),b=this.options;if(b.html instanceof Element?(_h(d),d.appendChild(b.html)):d.innerHTML=b.html!==!1?b.html:"",b.bgPos){var E=j(b.bgPos);d.style.backgroundPosition=-E.x+"px "+-E.y+"px"}return this._setIconStyles(d,"icon"),d},createShadow:function(){return null}});function GF(u){return new HT(u)}wl.Default=vu;var yu=ci.extend({options:{tileSize:256,opacity:1,updateWhenIdle:He.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(u){y(this,u)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(u){u._addZoomLimit(this)},onRemove:function(u){this._removeAllTiles(),Bt(this._container),u._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(yl(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(_l(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(u){return this.options.opacity=u,this._updateOpacity(),this},setZIndex:function(u){return this.options.zIndex=u,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var u=this._clampZoom(this._map.getZoom());u!==this._tileZoom&&(this._tileZoom=u,this._updateLevels()),this._update()}return this},getEvents:function(){var u={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=c(this._onMoveEnd,this.options.updateInterval,this)),u.move=this._onMove),this._zoomAnimated&&(u.zoomanim=this._animateZoom),u},createTile:function(){return document.createElement("div")},getTileSize:function(){var u=this.options.tileSize;return u instanceof G?u:new G(u,u)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(u){for(var d=this.getPane().children,b=-u(-1/0,1/0),E=0,M=d.length,$;Ethis.options.maxZoom||bE?this._retainParent(M,$,Q,E):!1)},_retainChildren:function(u,d,b,E){for(var M=2*u;M<2*u+2;M++)for(var $=2*d;$<2*d+2;$++){var Q=new G(M,$);Q.z=b+1;var fe=this._tileCoordsToKey(Q),he=this._tiles[fe];if(he&&he.active){he.retain=!0;continue}else he&&he.loaded&&(he.retain=!0);b+1this.options.maxZoom||this.options.minZoom!==void 0&&M1){this._setView(u,b);return}for(var Ye=M.min.y;Ye<=M.max.y;Ye++)for(var nt=M.min.x;nt<=M.max.x;nt++){var Ur=new G(nt,Ye);if(Ur.z=this._tileZoom,!!this._isValidTile(Ur)){var fa=this._tiles[this._tileCoordsToKey(Ur)];fa?fa.current=!0:Q.push(Ur)}}if(Q.sort(function(Yo,r0){return Yo.distanceTo($)-r0.distanceTo($)}),Q.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Ah=document.createDocumentFragment();for(nt=0;ntb.max.x)||!d.wrapLat&&(u.yb.max.y))return!1}if(!this.options.bounds)return!0;var E=this._tileCoordsToBounds(u);return q(this.options.bounds).overlaps(E)},_keyToBounds:function(u){return this._tileCoordsToBounds(this._keyToTileCoords(u))},_tileCoordsToNwSe:function(u){var d=this._map,b=this.getTileSize(),E=u.scaleBy(b),M=E.add(b),$=d.unproject(E,u.z),Q=d.unproject(M,u.z);return[$,Q]},_tileCoordsToBounds:function(u){var d=this._tileCoordsToNwSe(u),b=new H(d[0],d[1]);return this.options.noWrap||(b=this._map.wrapLatLngBounds(b)),b},_tileCoordsToKey:function(u){return u.x+":"+u.y+":"+u.z},_keyToTileCoords:function(u){var d=u.split(":"),b=new G(+d[0],+d[1]);return b.z=+d[2],b},_removeTile:function(u){var d=this._tiles[u];d&&(Bt(d.el),delete this._tiles[u],this.fire("tileunload",{tile:d.el,coords:this._keyToTileCoords(u)}))},_initTile:function(u){Xe(u,"leaflet-tile");var d=this.getTileSize();u.style.width=d.x+"px",u.style.height=d.y+"px",u.onselectstart=h,u.onmousemove=h,He.ielt9&&this.options.opacity<1&&Br(u,this.options.opacity)},_addTile:function(u,d){var b=this._getTilePos(u),E=this._tileCoordsToKey(u),M=this.createTile(this._wrapCoords(u),s(this._tileReady,this,u));this._initTile(M),this.createTile.length<2&&W(s(this._tileReady,this,u,null,M)),ln(M,b),this._tiles[E]={el:M,coords:u,current:!0},d.appendChild(M),this.fire("tileloadstart",{tile:M,coords:u})},_tileReady:function(u,d,b){d&&this.fire("tileerror",{error:d,tile:b,coords:u});var E=this._tileCoordsToKey(u);b=this._tiles[E],b&&(b.loaded=+new Date,this._map._fadeAnimated?(Br(b.el,0),Y(this._fadeFrame),this._fadeFrame=W(this._updateOpacity,this)):(b.active=!0,this._pruneTiles()),d||(Xe(b.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:b.el,coords:u})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),He.ielt9||!this._map._fadeAnimated?W(this._pruneTiles,this):setTimeout(s(this._pruneTiles,this),250)))},_getTilePos:function(u){return u.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(u){var d=new G(this._wrapX?f(u.x,this._wrapX):u.x,this._wrapY?f(u.y,this._wrapY):u.y);return d.z=u.z,d},_pxBoundsToTileRange:function(u){var d=this.getTileSize();return new B(u.min.unscaleBy(d).floor(),u.max.unscaleBy(d).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var u in this._tiles)if(!this._tiles[u].loaded)return!1;return!0}});function ZF(u){return new yu(u)}var Cl=yu.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(u,d){this._url=u,d=y(this,d),d.detectRetina&&He.retina&&d.maxZoom>0?(d.tileSize=Math.floor(d.tileSize/2),d.zoomReverse?(d.zoomOffset--,d.minZoom=Math.min(d.maxZoom,d.minZoom+1)):(d.zoomOffset++,d.maxZoom=Math.max(d.minZoom,d.maxZoom-1)),d.minZoom=Math.max(0,d.minZoom)):d.zoomReverse?d.minZoom=Math.min(d.maxZoom,d.minZoom):d.maxZoom=Math.max(d.minZoom,d.maxZoom),typeof d.subdomains=="string"&&(d.subdomains=d.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(u,d){return this._url===u&&d===void 0&&(d=!0),this._url=u,d||this.redraw(),this},createTile:function(u,d){var b=document.createElement("img");return Ze(b,"load",s(this._tileOnLoad,this,d,b)),Ze(b,"error",s(this._tileOnError,this,d,b)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(b.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(b.referrerPolicy=this.options.referrerPolicy),b.alt="",b.src=this.getTileUrl(u),b},getTileUrl:function(u){var d={r:He.retina?"@2x":"",s:this._getSubdomain(u),x:u.x,y:u.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var b=this._globalTileRange.max.y-u.y;this.options.tms&&(d.y=b),d["-y"]=b}return w(this._url,i(d,this.options))},_tileOnLoad:function(u,d){He.ielt9?setTimeout(s(u,this,null,d),0):u(null,d)},_tileOnError:function(u,d,b){var E=this.options.errorTileUrl;E&&d.getAttribute("src")!==E&&(d.src=E),u(b,d)},_onTileRemove:function(u){u.tile.onload=null},_getZoomForUrl:function(){var u=this._tileZoom,d=this.options.maxZoom,b=this.options.zoomReverse,E=this.options.zoomOffset;return b&&(u=d-u),u+E},_getSubdomain:function(u){var d=Math.abs(u.x+u.y)%this.options.subdomains.length;return this.options.subdomains[d]},_abortLoading:function(){var u,d;for(u in this._tiles)if(this._tiles[u].coords.z!==this._tileZoom&&(d=this._tiles[u].el,d.onload=h,d.onerror=h,!d.complete)){d.src=P;var b=this._tiles[u].coords;Bt(d),delete this._tiles[u],this.fire("tileabort",{tile:d,coords:b})}},_removeTile:function(u){var d=this._tiles[u];if(d)return d.el.setAttribute("src",P),yu.prototype._removeTile.call(this,u)},_tileReady:function(u,d,b){if(!(!this._map||b&&b.getAttribute("src")===P))return yu.prototype._tileReady.call(this,u,d,b)}});function WT(u,d){return new Cl(u,d)}var YT=Cl.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(u,d){this._url=u;var b=i({},this.defaultWmsParams);for(var E in d)E in this.options||(b[E]=d[E]);d=y(this,d);var M=d.detectRetina&&He.retina?2:1,$=this.getTileSize();b.width=$.x*M,b.height=$.y*M,this.wmsParams=b},onAdd:function(u){this._crs=this.options.crs||u.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var d=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[d]=this._crs.code,Cl.prototype.onAdd.call(this,u)},getTileUrl:function(u){var d=this._tileCoordsToNwSe(u),b=this._crs,E=ne(b.project(d[0]),b.project(d[1])),M=E.min,$=E.max,Q=(this._wmsVersion>=1.3&&this._crs===FT?[M.y,M.x,$.y,$.x]:[M.x,M.y,$.x,$.y]).join(","),fe=Cl.prototype.getTileUrl.call(this,u);return fe+x(this.wmsParams,fe,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+Q},setParams:function(u,d){return i(this.wmsParams,u),d||this.redraw(),this}});function KF(u,d){return new YT(u,d)}Cl.WMS=YT,WT.wms=KF;var ao=ci.extend({options:{padding:.1},initialize:function(u){y(this,u),l(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&Xe(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var u={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(u.zoomanim=this._onAnimZoom),u},_onAnimZoom:function(u){this._updateTransform(u.center,u.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(u,d){var b=this._map.getZoomScale(d,this._zoom),E=this._map.getSize().multiplyBy(.5+this.options.padding),M=this._map.project(this._center,d),$=E.multiplyBy(-b).add(M).subtract(this._map._getNewPixelOrigin(u,d));He.any3d?sa(this._container,$,b):ln(this._container,$)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var u in this._layers)this._layers[u]._reset()},_onZoomEnd:function(){for(var u in this._layers)this._layers[u]._project()},_updatePaths:function(){for(var u in this._layers)this._layers[u]._update()},_update:function(){var u=this.options.padding,d=this._map.getSize(),b=this._map.containerPointToLayerPoint(d.multiplyBy(-u)).round();this._bounds=new B(b,b.add(d.multiplyBy(1+u*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),qT=ao.extend({options:{tolerance:0},getEvents:function(){var u=ao.prototype.getEvents.call(this);return u.viewprereset=this._onViewPreReset,u},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){ao.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var u=this._container=document.createElement("canvas");Ze(u,"mousemove",this._onMouseMove,this),Ze(u,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Ze(u,"mouseout",this._handleMouseOut,this),u._leaflet_disable_events=!0,this._ctx=u.getContext("2d")},_destroyContainer:function(){Y(this._redrawRequest),delete this._ctx,Bt(this._container),St(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var u;this._redrawBounds=null;for(var d in this._layers)u=this._layers[d],u._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){ao.prototype._update.call(this);var u=this._bounds,d=this._container,b=u.getSize(),E=He.retina?2:1;ln(d,u.min),d.width=E*b.x,d.height=E*b.y,d.style.width=b.x+"px",d.style.height=b.y+"px",He.retina&&this._ctx.scale(2,2),this._ctx.translate(-u.min.x,-u.min.y),this.fire("update")}},_reset:function(){ao.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(u){this._updateDashArray(u),this._layers[l(u)]=u;var d=u._order={layer:u,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=d),this._drawLast=d,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(u){this._requestRedraw(u)},_removePath:function(u){var d=u._order,b=d.next,E=d.prev;b?b.prev=E:this._drawLast=E,E?E.next=b:this._drawFirst=b,delete u._order,delete this._layers[l(u)],this._requestRedraw(u)},_updatePath:function(u){this._extendRedrawBounds(u),u._project(),u._update(),this._requestRedraw(u)},_updateStyle:function(u){this._updateDashArray(u),this._requestRedraw(u)},_updateDashArray:function(u){if(typeof u.options.dashArray=="string"){var d=u.options.dashArray.split(/[, ]+/),b=[],E,M;for(M=0;M')}}catch{}return function(u){return document.createElement("<"+u+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),XF={_initContainer:function(){this._container=ft("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(ao.prototype._update.call(this),this.fire("update"))},_initPath:function(u){var d=u._container=_u("shape");Xe(d,"leaflet-vml-shape "+(this.options.className||"")),d.coordsize="1 1",u._path=_u("path"),d.appendChild(u._path),this._updateStyle(u),this._layers[l(u)]=u},_addPath:function(u){var d=u._container;this._container.appendChild(d),u.options.interactive&&u.addInteractiveTarget(d)},_removePath:function(u){var d=u._container;Bt(d),u.removeInteractiveTarget(d),delete this._layers[l(u)]},_updateStyle:function(u){var d=u._stroke,b=u._fill,E=u.options,M=u._container;M.stroked=!!E.stroke,M.filled=!!E.fill,E.stroke?(d||(d=u._stroke=_u("stroke")),M.appendChild(d),d.weight=E.weight+"px",d.color=E.color,d.opacity=E.opacity,E.dashArray?d.dashStyle=S(E.dashArray)?E.dashArray.join(" "):E.dashArray.replace(/( *, *)/g," "):d.dashStyle="",d.endcap=E.lineCap.replace("butt","flat"),d.joinstyle=E.lineJoin):d&&(M.removeChild(d),u._stroke=null),E.fill?(b||(b=u._fill=_u("fill")),M.appendChild(b),b.color=E.fillColor||E.color,b.opacity=E.fillOpacity):b&&(M.removeChild(b),u._fill=null)},_updateCircle:function(u){var d=u._point.round(),b=Math.round(u._radius),E=Math.round(u._radiusY||b);this._setPath(u,u._empty()?"M0 0":"AL "+d.x+","+d.y+" "+b+","+E+" 0,"+65535*360)},_setPath:function(u,d){u._path.v=d},_bringToFront:function(u){yl(u._container)},_bringToBack:function(u){_l(u._container)}},Dh=He.vml?_u:Le,bu=ao.extend({_initContainer:function(){this._container=Dh("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Dh("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Bt(this._container),St(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){ao.prototype._update.call(this);var u=this._bounds,d=u.getSize(),b=this._container;(!this._svgSize||!this._svgSize.equals(d))&&(this._svgSize=d,b.setAttribute("width",d.x),b.setAttribute("height",d.y)),ln(b,u.min),b.setAttribute("viewBox",[u.min.x,u.min.y,d.x,d.y].join(" ")),this.fire("update")}},_initPath:function(u){var d=u._path=Dh("path");u.options.className&&Xe(d,u.options.className),u.options.interactive&&Xe(d,"leaflet-interactive"),this._updateStyle(u),this._layers[l(u)]=u},_addPath:function(u){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(u._path),u.addInteractiveTarget(u._path)},_removePath:function(u){Bt(u._path),u.removeInteractiveTarget(u._path),delete this._layers[l(u)]},_updatePath:function(u){u._project(),u._update()},_updateStyle:function(u){var d=u._path,b=u.options;d&&(b.stroke?(d.setAttribute("stroke",b.color),d.setAttribute("stroke-opacity",b.opacity),d.setAttribute("stroke-width",b.weight),d.setAttribute("stroke-linecap",b.lineCap),d.setAttribute("stroke-linejoin",b.lineJoin),b.dashArray?d.setAttribute("stroke-dasharray",b.dashArray):d.removeAttribute("stroke-dasharray"),b.dashOffset?d.setAttribute("stroke-dashoffset",b.dashOffset):d.removeAttribute("stroke-dashoffset")):d.setAttribute("stroke","none"),b.fill?(d.setAttribute("fill",b.fillColor||b.color),d.setAttribute("fill-opacity",b.fillOpacity),d.setAttribute("fill-rule",b.fillRule||"evenodd")):d.setAttribute("fill","none"))},_updatePoly:function(u,d){this._setPath(u,ue(u._parts,d))},_updateCircle:function(u){var d=u._point,b=Math.max(Math.round(u._radius),1),E=Math.max(Math.round(u._radiusY),1)||b,M="a"+b+","+E+" 0 1,0 ",$=u._empty()?"M0 0":"M"+(d.x-b)+","+d.y+M+b*2+",0 "+M+-b*2+",0 ";this._setPath(u,$)},_setPath:function(u,d){u._path.setAttribute("d",d)},_bringToFront:function(u){yl(u._path)},_bringToBack:function(u){_l(u._path)}});He.vml&&bu.include(XF);function ZT(u){return He.svg||He.vml?new bu(u):null}ot.include({getRenderer:function(u){var d=u.options.renderer||this._getPaneRenderer(u.options.pane)||this.options.renderer||this._renderer;return d||(d=this._renderer=this._createRenderer()),this.hasLayer(d)||this.addLayer(d),d},_getPaneRenderer:function(u){if(u==="overlayPane"||u===void 0)return!1;var d=this._paneRenderers[u];return d===void 0&&(d=this._createRenderer({pane:u}),this._paneRenderers[u]=d),d},_createRenderer:function(u){return this.options.preferCanvas&>(u)||ZT(u)}});var KT=xl.extend({initialize:function(u,d){xl.prototype.initialize.call(this,this._boundsToLatLngs(u),d)},setBounds:function(u){return this.setLatLngs(this._boundsToLatLngs(u))},_boundsToLatLngs:function(u){return u=q(u),[u.getSouthWest(),u.getNorthWest(),u.getNorthEast(),u.getSouthEast()]}});function QF(u,d){return new KT(u,d)}bu.create=Dh,bu.pointsToPath=ue,so.geometryToLayer=Oh,so.coordsToLatLng=e0,so.coordsToLatLngs=Ph,so.latLngToCoords=t0,so.latLngsToCoords=kh,so.getFeature=Sl,so.asFeature=Mh,ot.mergeOptions({boxZoom:!0});var XT=Li.extend({initialize:function(u){this._map=u,this._container=u._container,this._pane=u._panes.overlayPane,this._resetStateTimeout=0,u.on("unload",this._destroy,this)},addHooks:function(){Ze(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){St(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Bt(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(u){if(!u.shiftKey||u.which!==1&&u.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),fu(),F_(),this._startPoint=this._map.mouseEventToContainerPoint(u),Ze(document,{contextmenu:ca,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(u){this._moved||(this._moved=!0,this._box=ft("div","leaflet-zoom-box",this._container),Xe(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(u);var d=new B(this._point,this._startPoint),b=d.getSize();ln(this._box,d.min),this._box.style.width=b.x+"px",this._box.style.height=b.y+"px"},_finish:function(){this._moved&&(Bt(this._box),Jt(this._container,"leaflet-crosshair")),du(),$_(),St(document,{contextmenu:ca,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(u){if(!(u.which!==1&&u.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(s(this._resetState,this),0);var d=new H(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(d).fire("boxzoomend",{boxZoomBounds:d})}},_onKeyDown:function(u){u.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});ot.addInitHook("addHandler","boxZoom",XT),ot.mergeOptions({doubleClickZoom:!0});var QT=Li.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(u){var d=this._map,b=d.getZoom(),E=d.options.zoomDelta,M=u.originalEvent.shiftKey?b-E:b+E;d.options.doubleClickZoom==="center"?d.setZoom(M):d.setZoomAround(u.containerPoint,M)}});ot.addInitHook("addHandler","doubleClickZoom",QT),ot.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var JT=Li.extend({addHooks:function(){if(!this._draggable){var u=this._map;this._draggable=new Ho(u._mapPane,u._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),u.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),u.on("zoomend",this._onZoomEnd,this),u.whenReady(this._onZoomEnd,this))}Xe(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Jt(this._map._container,"leaflet-grab"),Jt(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var u=this._map;if(u._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var d=q(this._map.options.maxBounds);this._offsetLimit=ne(this._map.latLngToContainerPoint(d.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(d.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;u.fire("movestart").fire("dragstart"),u.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(u){if(this._map.options.inertia){var d=this._lastTime=+new Date,b=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(b),this._times.push(d),this._prunePositions(d)}this._map.fire("move",u).fire("drag",u)},_prunePositions:function(u){for(;this._positions.length>1&&u-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var u=this._map.getSize().divideBy(2),d=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=d.subtract(u).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(u,d){return u-(u-d)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var u=this._draggable._newPos.subtract(this._draggable._startPos),d=this._offsetLimit;u.xd.max.x&&(u.x=this._viscousLimit(u.x,d.max.x)),u.y>d.max.y&&(u.y=this._viscousLimit(u.y,d.max.y)),this._draggable._newPos=this._draggable._startPos.add(u)}},_onPreDragWrap:function(){var u=this._worldWidth,d=Math.round(u/2),b=this._initialWorldOffset,E=this._draggable._newPos.x,M=(E-d+b)%u+d-b,$=(E+d+b)%u-d-b,Q=Math.abs(M+b)0?$:-$))-d;this._delta=0,this._startTime=null,Q&&(u.options.scrollWheelZoom==="center"?u.setZoom(d+Q):u.setZoomAround(this._lastMousePos,d+Q))}});ot.addInitHook("addHandler","scrollWheelZoom",tO);var JF=600;ot.mergeOptions({tapHold:He.touchNative&&He.safari&&He.mobile,tapTolerance:15});var nO=Li.extend({addHooks:function(){Ze(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){St(this._map._container,"touchstart",this._onDown,this)},_onDown:function(u){if(clearTimeout(this._holdTimeout),u.touches.length===1){var d=u.touches[0];this._startPos=this._newPos=new G(d.clientX,d.clientY),this._holdTimeout=setTimeout(s(function(){this._cancel(),this._isTapValid()&&(Ze(document,"touchend",In),Ze(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",d))},this),JF),Ze(document,"touchend touchcancel contextmenu",this._cancel,this),Ze(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function u(){St(document,"touchend",In),St(document,"touchend touchcancel",u)},_cancel:function(){clearTimeout(this._holdTimeout),St(document,"touchend touchcancel contextmenu",this._cancel,this),St(document,"touchmove",this._onMove,this)},_onMove:function(u){var d=u.touches[0];this._newPos=new G(d.clientX,d.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(u,d){var b=new MouseEvent(u,{bubbles:!0,cancelable:!0,view:window,screenX:d.screenX,screenY:d.screenY,clientX:d.clientX,clientY:d.clientY});b._simulated=!0,d.target.dispatchEvent(b)}});ot.addInitHook("addHandler","tapHold",nO),ot.mergeOptions({touchZoom:He.touch,bounceAtZoomLimits:!0});var rO=Li.extend({addHooks:function(){Xe(this._map._container,"leaflet-touch-zoom"),Ze(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Jt(this._map._container,"leaflet-touch-zoom"),St(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(u){var d=this._map;if(!(!u.touches||u.touches.length!==2||d._animatingZoom||this._zooming)){var b=d.mouseEventToContainerPoint(u.touches[0]),E=d.mouseEventToContainerPoint(u.touches[1]);this._centerPoint=d.getSize()._divideBy(2),this._startLatLng=d.containerPointToLatLng(this._centerPoint),d.options.touchZoom!=="center"&&(this._pinchStartLatLng=d.containerPointToLatLng(b.add(E)._divideBy(2))),this._startDist=b.distanceTo(E),this._startZoom=d.getZoom(),this._moved=!1,this._zooming=!0,d._stop(),Ze(document,"touchmove",this._onTouchMove,this),Ze(document,"touchend touchcancel",this._onTouchEnd,this),In(u)}},_onTouchMove:function(u){if(!(!u.touches||u.touches.length!==2||!this._zooming)){var d=this._map,b=d.mouseEventToContainerPoint(u.touches[0]),E=d.mouseEventToContainerPoint(u.touches[1]),M=b.distanceTo(E)/this._startDist;if(this._zoom=d.getScaleZoom(M,this._startZoom),!d.options.bounceAtZoomLimits&&(this._zoomd.getMaxZoom()&&M>1)&&(this._zoom=d._limitZoom(this._zoom)),d.options.touchZoom==="center"){if(this._center=this._startLatLng,M===1)return}else{var $=b._add(E)._divideBy(2)._subtract(this._centerPoint);if(M===1&&$.x===0&&$.y===0)return;this._center=d.unproject(d.project(this._pinchStartLatLng,this._zoom).subtract($),this._zoom)}this._moved||(d._moveStart(!0,!1),this._moved=!0),Y(this._animRequest);var Q=s(d._move,d,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=W(Q,this,!0),In(u)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,Y(this._animRequest),St(document,"touchmove",this._onTouchMove,this),St(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});ot.addInitHook("addHandler","touchZoom",rO),ot.BoxZoom=XT,ot.DoubleClickZoom=QT,ot.Drag=JT,ot.Keyboard=eO,ot.ScrollWheelZoom=tO,ot.TapHold=nO,ot.TouchZoom=rO,n.Bounds=B,n.Browser=He,n.CRS=pe,n.Canvas=qT,n.Circle=J_,n.CircleMarker=Th,n.Class=Z,n.Control=li,n.DivIcon=HT,n.DivOverlay=Di,n.DomEvent=vF,n.DomUtil=mF,n.Draggable=Ho,n.Evented=oe,n.FeatureGroup=io,n.GeoJSON=so,n.GridLayer=yu,n.Handler=Li,n.Icon=wl,n.ImageOverlay=Rh,n.LatLng=te,n.LatLngBounds=H,n.Layer=ci,n.LayerGroup=bl,n.LineUtil=kF,n.Map=ot,n.Marker=Eh,n.Mixin=CF,n.Path=Wo,n.Point=G,n.PolyUtil=MF,n.Polygon=xl,n.Polyline=oo,n.Popup=Nh,n.PosAnimation=TT,n.Projection=RF,n.Rectangle=KT,n.Renderer=ao,n.SVG=bu,n.SVGOverlay=VT,n.TileLayer=Cl,n.Tooltip=Lh,n.Transformation=X,n.Util=J,n.VideoOverlay=UT,n.bind=s,n.bounds=ne,n.canvas=GT,n.circle=$F,n.circleMarker=FF,n.control=mu,n.divIcon=GF,n.extend=i,n.featureGroup=AF,n.geoJSON=zT,n.geoJson=UF,n.gridLayer=ZF,n.icon=jF,n.imageOverlay=VF,n.latLng=se,n.latLngBounds=q,n.layerGroup=DF,n.map=yF,n.marker=IF,n.point=j,n.polygon=zF,n.polyline=BF,n.popup=YF,n.rectangle=QF,n.setOptions=y,n.stamp=l,n.svg=ZT,n.svgOverlay=WF,n.tileLayer=WT,n.tooltip=qF,n.transformation=K,n.version=r,n.videoOverlay=HF;var e$=window.L;n.noConflict=function(){return window.L=e$,this},window.L=n})})(F0e,Ws);const PL=Ws;function lT(e,t,n){return Object.freeze({instance:e,context:t,container:n})}function cT(e,t){return t==null?function(r,i){const o=V.useRef();return o.current||(o.current=e(r,i)),o}:function(r,i){const o=V.useRef();o.current||(o.current=e(r,i));const s=V.useRef(r),{instance:a}=o.current;return V.useEffect(function(){s.current!==r&&(t(a,r,s.current),s.current=r)},[a,r,i]),o}}function $0e(e,t){V.useEffect(function(){return(t.layerContainer??t.map).addLayer(e.instance),function(){var o;(o=t.layerContainer)==null||o.removeLayer(e.instance),t.map.removeLayer(e.instance)}},[t,e])}function H8(e){return function(n){const r=U8(),i=e(aT(n,r),r);return $8(r.map,n.attribution),V8(i.current,n.eventHandlers),$0e(i.current,r),i}}function B0e(e,t){const n=cT(e,t),r=H8(n);return D0e(r)}function z0e(e,t){const n=cT(e),r=I0e(n,t);return A0e(r)}function U0e(e,t){const n=cT(e,t),r=H8(n);return j0e(r)}function V0e(e,t,n){const{opacity:r,zIndex:i}=t;r!=null&&r!==n.opacity&&e.setOpacity(r),i!=null&&i!==n.zIndex&&e.setZIndex(i)}function C2(){return C2=Object.assign||function(e){for(var t=1;t(m==null?void 0:m.map)??null,[m]);const y=V.useCallback(_=>{if(_!==null&&m===null){const w=new Ws.Map(_,f);n!=null&&c!=null?w.setView(n,c):e!=null&&w.fitBounds(e,t),l!=null&&w.whenReady(l),v(N0e(w))}},[]);V.useEffect(()=>()=>{m==null||m.map.remove()},[m]);const x=m?U.createElement(z8,{value:m},r):s??null;return U.createElement("div",C2({},p,{ref:y}),x)}const W0e=V.forwardRef(H0e),Y0e=B0e(function({position:t,...n},r){const i=new Ws.Marker(t,n);return lT(i,L0e(r,{overlayContainer:i}))},function(t,n,r){n.position!==r.position&&t.setLatLng(n.position),n.icon!=null&&n.icon!==r.icon&&t.setIcon(n.icon),n.zIndexOffset!=null&&n.zIndexOffset!==r.zIndexOffset&&t.setZIndexOffset(n.zIndexOffset),n.opacity!=null&&n.opacity!==r.opacity&&t.setOpacity(n.opacity),t.dragging!=null&&n.draggable!==r.draggable&&(n.draggable===!0?t.dragging.enable():t.dragging.disable())}),q0e=z0e(function(t,n){const r=new Ws.Popup(t,n.overlayContainer);return lT(r,n)},function(t,n,{position:r},i){V.useEffect(function(){const{instance:s}=t;function a(c){c.popup===s&&(s.update(),i(!0))}function l(c){c.popup===s&&i(!1)}return n.map.on({popupopen:a,popupclose:l}),n.overlayContainer==null?(r!=null&&s.setLatLng(r),s.openOn(n.map)):n.overlayContainer.bindPopup(s),function(){var f;n.map.off({popupopen:a,popupclose:l}),(f=n.overlayContainer)==null||f.unbindPopup(),n.map.removeLayer(s)}},[t,n,i,r])}),G0e=U0e(function({url:t,...n},r){const i=new Ws.TileLayer(t,aT(n,r));return lT(i,r)},function(t,n,r){V0e(t,n,r);const{url:i}=n;i!=null&&i!==r.url&&t.setUrl(i)});const Z0e=()=>g.jsx(G0e,{attribution:'© OpenStreetMap contributors',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),K0e=e=>{if(e.length===0)return{};if(e.length>1)return{bounds:e.map(at("latLong"))};const[{latLong:t}]=e;return{zoom:10,center:t}},W8=({toggle:e,isOpen:t,title:n,locations:r=[]})=>g.jsx(Uo,{toggle:e,isOpen:t,className:"map-modal__modal",contentClassName:"map-modal__modal-content",children:g.jsxs(ki,{className:"map-modal__modal-body",children:[g.jsxs("h3",{className:"map-modal__modal-title",children:[n,g.jsx("button",{type:"button",className:"btn-close float-end","aria-label":"Close",onClick:e})]}),g.jsxs(W0e,{...K0e(r),children:[g.jsx(Z0e,{}),r.map(({cityName:i,latLong:o,count:s},a)=>g.jsx(Y0e,{position:o,children:g.jsxs(q0e,{children:[g.jsx("b",{children:s})," visit",s>1?"s":""," from ",g.jsx("b",{children:i})]})},a))]})]})});const X0e=({modalTitle:e,activeCities:t,locations:n=[]})=>{const[r,,i,o]=It(),[s,a,l]=It(),[c,f]=V.useState([]),h=b_(),p=y=>t?y.filter(({cityName:x})=>t==null?void 0:t.includes(x)):y,m=()=>{if(!t){f(n),i();return}l()},v=y=>()=>{f(y?p(n):n),i()};return g.jsxs(g.Fragment,{children:[g.jsx(ht,{color:"link",className:"open-map-modal-btn__btn",id:h,onClick:m,children:g.jsx(je,{icon:Gj})}),g.jsx(Er,{placement:"left",target:h,children:"Show in map"}),g.jsx(tu,{isOpen:s,toggle:a,inNavbar:!0,children:g.jsxs(hl,{end:!0,children:[g.jsx(Ue,{onClick:v(!1),children:"Show all locations"}),g.jsx(Ue,{onClick:v(!0),children:"Show locations in current page"})]})}),g.jsx(W8,{toggle:o,isOpen:r,title:e,locations:c})]})},Q0e=({onChange:e,selected:t={},className:n,isOrphanVisits:r})=>{const{orphanVisitsType:i,excludeBots:o=!1}=t,s=l=>({active:i===l,onClick:()=>e({...t,orphanVisitsType:l===(t==null?void 0:t.orphanVisitsType)?void 0:l})}),a=()=>e({...t,excludeBots:!(t!=null&&t.excludeBots)});return g.jsxs(na,{text:"Filters",dropdownClassName:n,className:"me-3",right:!0,minWidth:250,children:[g.jsx(Ue,{header:!0,children:"Bots:"}),g.jsx(Ue,{active:o,onClick:a,children:"Exclude potential bots"}),r&&g.jsxs(g.Fragment,{children:[g.jsx(Ue,{divider:!0}),g.jsx(Ue,{header:!0,children:"Orphan visits type:"}),g.jsx(Ue,{...s("base_url"),children:"Base URL"}),g.jsx(Ue,{...s("invalid_short_url"),children:"Invalid short URL"}),g.jsx(Ue,{...s("regular_404"),children:"Regular 404"})]}),g.jsx(Ue,{divider:!0}),g.jsx(Ue,{disabled:!gi(t),onClick:()=>e({excludeBots:!1,orphanVisitsType:void 0}),children:g.jsx("i",{children:"Clear filters"})})]})},Y8=(e,t)=>!Fo(e)&&gi(e[t]),kL=e=>typeof e=="number"?e:e?parseFloat(e):0,J0e=(e,{os:t})=>{e[t]=(e[t]||0)+1},e1e=(e,{browser:t})=>{e[t]=(e[t]||0)+1},t1e=(e,{referer:t})=>{e[t]=(e[t]||0)+1},q8=e=>(t,n)=>{const i=Y8(n,e)?n[e]:"Unknown";t[i]=(t[i]||0)+1},n1e=q8("country"),r1e=q8("city"),i1e=(e,t)=>{if(!Y8(t,"city")||t.city==="Unknown")return;const{city:n,latitude:r,longitude:i}=t,o=e[n]||{cityName:n,count:0,latLong:[kL(r),kL(i)]};o.count+=1,e[n]=o},o1e=(e,t)=>{if(!H_e(t))return;const{visitedUrl:n}=t;e[n]=(e[n]||0)+1},G8=e=>e.reduce((t,n)=>(J0e(t.os,n),e1e(t.browsers,n),t1e(t.referrers,n),n1e(t.countries,n),r1e(t.cities,n),i1e(t.citiesForMap,n),o1e(t.visitedUrls,n),t),{os:{},browsers:{},referrers:{},countries:{},cities:{},citiesForMap:{},visitedUrls:{}}),Z8=zd(e=>{const{userAgent:t,date:n,referer:r,visitLocation:i,potentialBot:o}=e,s={date:n,potentialBot:o,...f0e(t),referer:d0e(r),country:(i==null?void 0:i.countryName)||"Unknown",city:(i==null?void 0:i.cityName)||"Unknown",latitude:i==null?void 0:i.latitude,longitude:i==null?void 0:i.longitude};return rT(e)?{...s,type:e.type,visitedUrl:e.visitedUrl}:s}),s1e=Object.freeze(Object.defineProperty({__proto__:null,normalizeVisits:Z8,processStatsFromVisits:G8},Symbol.toStringTag,{value:"Module"}));const nf=20,a1e=({browser:e,os:t,referer:n,country:r,city:i,...o},s)=>`${e} ${t} ${n} ${r} ${i} ${o.visitedUrl}`.toLowerCase().includes(s.toLowerCase()),l1e=(e,t)=>t.filter(n=>a1e(n,e)),c1e=(e,t)=>kj(t,e),u1e=(e,t,n)=>{const r=t?l1e(t,e):[...e],i=c1e(n,r),o=i.length;return{visitsGroups:cd(nf,i),total:o}},f1e=({visits:e,selectedVisits:t=[],setSelectedVisits:n,matchMedia:r=window.matchMedia,isOrphanVisits:i=!1})=>{var k,N;const o="visits-table__header-cell visits-table__sticky",s=()=>r("(max-width: 767px)").matches,[a,l]=V.useState(s()),[c,f]=V.useState(void 0),[h,p]=V.useState({}),m=V.useMemo(()=>u1e(e,c,h),[c,h]),v=V.useRef(!0),[y,x]=V.useState(1),_=y*nf,w=_-nf,S=8+Number(i),T=D=>()=>p({field:D,dir:n_(D,h.field,h.dir)}),P=D=>g.jsx(Lf,{currentOrder:h,field:D,className:"visits-table__header-icon"});return V.useEffect(()=>{const D=()=>l(s());return window.addEventListener("resize",D),()=>window.removeEventListener("resize",D)},[]),V.useEffect(()=>{x(1),!v.current&&n([]),v.current=!1},[c]),g.jsx("div",{className:"table-responsive-md",children:g.jsxs("table",{className:"table table-bordered table-hover table-sm visits-table",children:[g.jsxs("thead",{className:"visits-table__header",children:[g.jsxs("tr",{children:[g.jsx("th",{className:`${o} text-center`,onClick:()=>n(t.length0})})}),g.jsxs("th",{className:`${o} text-center`,onClick:T("potentialBot"),children:[g.jsx(je,{icon:CM}),P("potentialBot")]}),g.jsxs("th",{className:o,onClick:T("date"),children:["Date",P("date")]}),g.jsxs("th",{className:o,onClick:T("country"),children:["Country",P("country")]}),g.jsxs("th",{className:o,onClick:T("city"),children:["City",P("city")]}),g.jsxs("th",{className:o,onClick:T("browser"),children:["Browser",P("browser")]}),g.jsxs("th",{className:o,onClick:T("os"),children:["OS",P("os")]}),g.jsxs("th",{className:o,onClick:T("referer"),children:["Referrer",P("referer")]}),i&&g.jsxs("th",{className:o,onClick:T("visitedUrl"),children:["Visited URL",P("visitedUrl")]})]}),g.jsx("tr",{children:g.jsx("td",{colSpan:S,className:"p-0",children:g.jsx(ih,{noBorder:!0,large:!1,onChange:f})})})]}),g.jsxs("tbody",{children:[!((k=m.visitsGroups[y-1])!=null&&k.length)&&g.jsx("tr",{children:g.jsx("td",{colSpan:S,className:"text-center",children:"No visits found with current filtering"})}),(N=m.visitsGroups[y-1])==null?void 0:N.map((D,z)=>{const A=t.includes(D);return g.jsxs("tr",{style:{cursor:"pointer"},className:me({"table-active":A}),onClick:()=>n(A?t.filter(W=>W!==D):[...t,D]),children:[g.jsx("td",{className:"text-center",children:A&&g.jsx(je,{icon:fd,className:"text-primary"})}),g.jsx("td",{className:"text-center",children:D.potentialBot&&g.jsxs(g.Fragment,{children:[g.jsx(je,{icon:CM,id:`botIcon${z}`}),g.jsx(Er,{placement:"right",target:`botIcon${z}`,children:"Potentially a visit from a bot or crawler"})]})}),g.jsx("td",{children:g.jsx(ry,{date:D.date})}),g.jsx("td",{children:D.country}),g.jsx("td",{children:D.city}),g.jsx("td",{children:D.browser}),g.jsx("td",{children:D.os}),g.jsx("td",{children:D.referer}),i&&g.jsx("td",{children:D.visitedUrl})]},z)})]}),m.total>nf&&g.jsx("tfoot",{children:g.jsx("tr",{children:g.jsx("td",{colSpan:S,className:"visits-table__footer-cell visits-table__sticky",children:g.jsxs("div",{className:"row",children:[g.jsx("div",{className:"col-md-6",children:g.jsx(XE,{pagesCount:Math.ceil(m.total/nf),currentPage:y,setCurrentPage:x,centered:a})}),g.jsx("div",{className:me("col-md-6",{"d-flex align-items-center flex-row-reverse":!a,"text-center mt-3":a}),children:g.jsxs("div",{children:["Visits ",g.jsx("b",{children:_n(w+1)})," to"," ",g.jsx("b",{children:_n(Tj(_,m.total))})," of"," ",g.jsx("b",{children:_n(m.total)})]})})]})})})})]})})},Fl={byTime:{title:"By time",subPath:"by-time",icon:BX},byContext:{title:"By context",subPath:"by-context",icon:mC},byLocation:{title:"By location",subPath:"by-location",icon:Gj},list:{title:"List",subPath:"list",icon:qj}};let Fp;const ph=({children:e,visitsInfo:t,getVisits:n,cancelGetVisits:r,settings:i,exportCsv:o,isOrphanVisits:s=!1})=>{var H;const{visits:a,loading:l,loadingLarge:c,error:f,errorData:h,progress:p,fallbackInterval:m}=t,[{dateRange:v,visitsFilter:y},x]=M0e(),_=Dt(({startDate:q,endDate:te})=>({dateRange:{startDate:q??void 0,endDate:te??void 0}}),x),w=V.useRef(v??m??((H=i.visits)==null?void 0:H.defaultInterval)??"last30Days"),[S,T]=V.useState([]),[P,k]=V.useState(),N=V.useRef(!0),{search:D}=Pn(),z=q=>q?`${q}${D}`:D,A=V.useMemo(()=>Z8(a),[a]),{os:W,browsers:Y,referrers:J,countries:Z,cities:ee,citiesForMap:ie,visitedUrls:oe}=V.useMemo(()=>G8(A),[A]),G=V.useMemo(()=>{var q;return{...y,excludeBots:y.excludeBots??((q=i.visits)==null?void 0:q.excludeBots)}},[y]),F=Qc(ie),j=q=>{Fp=void 0,T(q)},B=q=>te=>{const se=`${q}_${te}`;Fp===se?(T([]),k(void 0),Fp=void 0):(T(A.filter(mZ(q,te))),k(te),Fp=se)};V.useEffect(()=>r,[]),V.useEffect(()=>{const q=N.current?v??Zhe(w.current):v;n({dateRange:q,filter:G},N.current),N.current=!1},[v,y]),V.useEffect(()=>{var q;m&&w.current===(((q=i.visits)==null?void 0:q.defaultInterval)??"last30Days")&&(w.current=m)},[m]);const ne=()=>c?g.jsxs(So,{loading:!0,children:["This is going to take a while... :S",g.jsx(tE,{value:p,striped:p===100,className:"mt-3"})]}):l?g.jsx(So,{loading:!0}):f?g.jsx(Nr,{type:"error",children:g.jsx(Lo,{errorData:h,fallbackMessage:"An error occurred while loading visits :("})}):Wn(a)?g.jsx(So,{children:"There are no visits matching current filter"}):g.jsxs(g.Fragment,{children:[g.jsx(D5,{fill:!0,children:Object.values(Fl).map(({title:q,icon:te,subPath:se},pe)=>g.jsxs(Rf,{to:z(se),replace:!0,children:[g.jsx(je,{icon:te}),g.jsx("span",{className:"ms-2 d-none d-sm-inline",children:q})]},pe))}),g.jsx(Qn,{children:g.jsxs(Xy,{children:[g.jsx(gt,{path:Fl.byTime.subPath,element:g.jsx("div",{className:"col-12 mt-3",children:g.jsx(b0e,{title:"Visits during time",visits:A,highlightedVisits:S,highlightedLabel:P,setSelectedVisits:j})})}),g.jsx(gt,{path:Fl.byContext.subPath,element:g.jsxs(g.Fragment,{children:[g.jsx("div",{className:me("mt-3 col-lg-6",{"col-xl-4":!s}),children:g.jsx(wL,{title:"Operating systems",stats:W})}),g.jsx("div",{className:me("mt-3 col-lg-6",{"col-xl-4":!s}),children:g.jsx(wL,{title:"Browsers",stats:Y})}),g.jsx("div",{className:me("mt-3",{"col-xl-4":!s,"col-lg-6":s}),children:g.jsx(Ip,{title:"Referrers",stats:J,withPagination:!1,highlightedStats:Ap(S,"referer"),highlightedLabel:P,sortingItems:{name:"Referrer name",amount:"Visits amount"},onClick:B("referer")})}),s&&g.jsx("div",{className:"mt-3 col-lg-6",children:g.jsx(Ip,{title:"Visited URLs",stats:oe,highlightedLabel:P,highlightedStats:Ap(S,"visitedUrl"),sortingItems:{visitedUrl:"Visited URL",amount:"Visits amount"},onClick:B("visitedUrl")})})]})}),g.jsx(gt,{path:Fl.byLocation.subPath,element:g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"col-lg-6 mt-3",children:g.jsx(Ip,{title:"Countries",stats:Z,highlightedStats:Ap(S,"country"),highlightedLabel:P,sortingItems:{name:"Country name",amount:"Visits amount"},onClick:B("country")})}),g.jsx("div",{className:"col-lg-6 mt-3",children:g.jsx(Ip,{title:"Cities",stats:ee,highlightedStats:Ap(S,"city"),highlightedLabel:P,extraHeaderContent:q=>F.length>0&&g.jsx(X0e,{modalTitle:"Cities",locations:F,activeCities:q}),sortingItems:{name:"City name",amount:"Visits amount"},onClick:B("city")})})]})}),g.jsx(gt,{path:Fl.list.subPath,element:g.jsx("div",{className:"col-12",children:g.jsx(f1e,{visits:A,selectedVisits:S,setSelectedVisits:j,isOrphanVisits:s})})}),g.jsx(gt,{path:"*",element:g.jsx(WS,{replace:!0,to:z(Fl.byTime.subPath)})})]})})]});return g.jsxs(g.Fragment,{children:[e,g.jsx("section",{className:"mt-3",children:g.jsxs("div",{className:"row flex-md-row-reverse",children:[g.jsx("div",{className:"col-lg-7 col-xl-6",children:g.jsxs("div",{className:"d-md-flex",children:[g.jsx("div",{className:"flex-fill",children:g.jsx(l8,{updatable:!0,disabled:l,initialDateRange:w.current,defaultText:"All visits",onDatesChange:_})}),g.jsx(Q0e,{className:"ms-0 ms-md-2 mt-3 mt-md-0",isOrphanVisits:s,selected:G,onChange:q=>x({visitsFilter:q})})]})}),a.length>0&&g.jsx("div",{className:"col-lg-5 col-xl-6 mt-3 mt-lg-0",children:g.jsxs("div",{className:"d-flex",children:[g.jsx(U5,{className:"btn-md-block",amount:A.length,onClick:()=>o(A)}),g.jsxs(ht,{outline:!0,disabled:S.length===0,className:"btn-md-block ms-2",onClick:()=>j([]),children:["Clear selection ",S.length>0&&g.jsxs(g.Fragment,{children:["(",_n(S.length),")"]})]})]})})]})}),g.jsx("section",{className:"mt-3",children:ne()})]})},d1e=({exportVisits:e})=>ra(({getDomainVisits:t,domainVisits:n,cancelGetDomainVisits:r,settings:i})=>{const o=ta(),{domain:s=""}=Ks(),[a,l=a]=s.split("_"),c=(h,p)=>t({domain:l,query:dh(h),doIntervalFallback:p}),f=h=>e(`domain_${a}_visits.csv`,h);return g.jsx(ph,{getVisits:c,cancelGetVisits:r,visitsInfo:n,settings:i,exportCsv:f,children:g.jsx(hh,{goBack:o,visits:n.visits,title:`"${a}" visits`})})},()=>[Xr.visits]),h1e=({exportVisits:e})=>ra(({getNonOrphanVisits:t,nonOrphanVisits:n,cancelGetNonOrphanVisits:r,settings:i})=>{const o=ta(),s=l=>e("non_orphan_visits.csv",l),a=(l,c)=>t({query:dh(l),doIntervalFallback:c});return g.jsx(ph,{getVisits:a,cancelGetVisits:r,visitsInfo:n,settings:i,exportCsv:s,children:g.jsx(hh,{title:"Non-orphan visits",goBack:o,visits:n.visits})})},()=>[Xr.visits]),p1e=({exportVisits:e})=>ra(({getOrphanVisits:t,orphanVisits:n,cancelGetOrphanVisits:r,settings:i})=>{const o=ta(),s=l=>e("orphan_visits.csv",l),a=(l,c)=>{var f;return t({query:dh(l),orphanVisitsType:(f=l.filter)==null?void 0:f.orphanVisitsType,doIntervalFallback:c})};return g.jsx(ph,{getVisits:a,cancelGetVisits:r,visitsInfo:n,settings:i,exportCsv:s,isOrphanVisits:!0,children:g.jsx(hh,{title:"Orphan visits",goBack:o,visits:n.visits})})},()=>[Xr.orphanVisits]),K8="shlink/orphanVisits",m1e={visits:[],loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},g1e=e=>lh({typePrefix:`${K8}/getNonOrphanVisits`,createLoaders:({query:t={},doIntervalFallback:n=!1},r)=>{const{getNonOrphanVisits:i}=e(r),o=async(a,l)=>i({...t,page:a,itemsPerPage:l}),s=ch(n,i);return[o,s]},getExtraFulfilledPayload:({query:t={}})=>({query:t}),shouldCancel:t=>t().orphanVisits.cancelLoad}),v1e=e=>uh({name:K8,initialState:m1e,asyncThunkCreator:e,filterCreatedVisits:({query:t={}},n)=>{const{startDate:r,endDate:i}=t;return n.filter(({visit:o})=>oh(o.date,r,i))}}),X8="shlink/orphanVisits",y1e={visits:[],loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},_1e=(e,t)=>!t||t===e.type,b1e=e=>lh({typePrefix:`${X8}/getOrphanVisits`,createLoaders:({orphanVisitsType:t,query:n={},doIntervalFallback:r=!1},i)=>{const{getOrphanVisits:o}=e(i),s=async(l,c)=>o({...n,page:l,itemsPerPage:c}).then(f=>{const h=f.data.filter(p=>rT(p)&&_1e(p,t));return{...f,data:h}}),a=ch(r,o);return[s,a]},getExtraFulfilledPayload:({query:t={}})=>({query:t}),shouldCancel:t=>t().orphanVisits.cancelLoad}),w1e=e=>uh({name:X8,initialState:y1e,asyncThunkCreator:e,filterCreatedVisits:({query:t={}},n)=>{const{startDate:r,endDate:i}=t;return n.filter(({visit:o,shortUrl:s})=>!s&&oh(o.date,r,i))}}),Q8="shlink/shortUrlVisits",x1e={visits:[],shortCode:"",domain:void 0,loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},S1e=e=>lh({typePrefix:`${Q8}/getShortUrlVisits`,createLoaders:({shortCode:t,query:n={},doIntervalFallback:r=!1},i)=>{const{getShortUrlVisits:o}=e(i),s=async(l,c)=>o(t,{...n,page:l,itemsPerPage:c}),a=ch(r,async l=>o(t,{...l,domain:n.domain}));return[s,a]},getExtraFulfilledPayload:({shortCode:t,query:n={}})=>({shortCode:t,query:n,domain:n.domain}),shouldCancel:t=>t().shortUrlVisits.cancelLoad}),C1e=e=>uh({name:Q8,initialState:x1e,asyncThunkCreator:e,filterCreatedVisits:({shortCode:t,domain:n,query:r={}},i)=>{const{startDate:o,endDate:s}=r;return i.filter(({shortUrl:a,visit:l})=>a&&Of(a,t,n)&&oh(l.date,o,s))}}),J8="shlink/tagVisits",E1e={visits:[],tag:"",loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},T1e=e=>lh({typePrefix:`${J8}/getTagVisits`,createLoaders:({tag:t,query:n={},doIntervalFallback:r=!1},i)=>{const{getTagVisits:o}=e(i),s=async(l,c)=>o(t,{...n,page:l,itemsPerPage:c}),a=ch(r,async l=>o(t,l));return[s,a]},getExtraFulfilledPayload:({tag:t,query:n={}})=>({tag:t,query:n}),shouldCancel:t=>t().tagVisits.cancelLoad}),O1e=e=>uh({name:J8,initialState:E1e,asyncThunkCreator:e,filterCreatedVisits:({tag:t,query:n={}},r)=>{const{startDate:i,endDate:o}=n;return r.filter(({shortUrl:s,visit:a})=>(s==null?void 0:s.tags.includes(t))&&oh(a.date,i,o))}}),eF="shlink/visitsOverview",$p={nonOrphanVisits:{total:0},orphanVisits:{total:0},loading:!1,error:!1},ML=e=>e.filter(({visit:t})=>t.potentialBot).length,P1e=e=>rr(`${eF}/loadVisitsOverview`,(t,{getState:n})=>e(n).getVisitsOverview().then(r=>{var i,o,s,a,l,c;return{nonOrphanVisits:{total:((i=r.nonOrphanVisits)==null?void 0:i.total)??r.visitsCount,nonBots:(o=r.nonOrphanVisits)==null?void 0:o.nonBots,bots:(s=r.nonOrphanVisits)==null?void 0:s.bots},orphanVisits:{total:((a=r.orphanVisits)==null?void 0:a.total)??r.orphanVisitsCount,nonBots:(l=r.orphanVisits)==null?void 0:l.nonBots,bots:(c=r.orphanVisits)==null?void 0:c.bots}}})),k1e=e=>Yn({name:eF,initialState:$p,reducers:{},extraReducers:t=>{t.addCase(e.pending,()=>({...$p,loading:!0})),t.addCase(e.rejected,()=>({...$p,error:!0})),t.addCase(e.fulfilled,(n,{payload:r})=>({...$p,...r})),t.addCase(ah,({nonOrphanVisits:n,orphanVisits:r,...i},{payload:o})=>{const{nonOrphanVisits:s,orphanVisits:a}=W_e(o.createdVisits),l=s.length,c=ML(s),f=l-c,h=a.length,p=ML(a),m=h-p;return{...i,nonOrphanVisits:{total:n.total+l,bots:n.bots&&n.bots+c,nonBots:n.nonBots&&n.nonBots+f},orphanVisits:{total:r.total+h,bots:r.bots&&r.bots+p,nonBots:r.nonBots&&r.nonBots+m}}})}});const M1e=({shortUrlDetail:e,shortUrlVisits:t,goBack:n})=>{const{shortUrl:r,loading:i}=e,{visits:o}=t,s=(r==null?void 0:r.shortUrl)??"",a=(r==null?void 0:r.longUrl)??"",l=r==null?void 0:r.title,c=()=>r?g.jsxs("span",{children:[g.jsx("b",{id:"created",className:"short-url-visits-header__created-at",children:g.jsx(ry,{date:r.dateCreated,relative:!0})}),g.jsx(Er,{placement:"bottom",target:"created",children:g.jsx(ry,{date:r.dateCreated})})]}):g.jsx("small",{children:"Loading..."}),f=g.jsxs(g.Fragment,{children:["Visits for ",g.jsx(Si,{href:s})]});return g.jsxs(hh,{title:f,goBack:n,visits:o,shortUrl:r,children:[g.jsx("hr",{}),g.jsxs("div",{children:["Created: ",c()]}),g.jsxs("div",{className:"long-url-container",children:[`${l?"Title":"Long URL"}: `,i&&g.jsx("small",{children:"Loading..."}),!i&&g.jsx(Si,{href:a,children:l??a})]})]})},R1e=({exportVisits:e})=>ra(({shortUrlVisits:t,shortUrlDetail:n,getShortUrlVisits:r,getShortUrlDetail:i,cancelGetShortUrlVisits:o,settings:s})=>{const{shortCode:a=""}=Ks(),{search:l}=Pn(),c=ta(),{domain:f}=dl(l),h=(m,v)=>r({shortCode:hm(a),query:{...dh(m),domain:f},doIntervalFallback:v}),p=m=>{var v;return e(`short-url_${(v=n.shortUrl)==null?void 0:v.shortUrl.replace(/https?:\/\//g,"")}_visits.csv`,m)};return V.useEffect(()=>{i({shortCode:hm(a),domain:f})},[]),g.jsx(ph,{getVisits:h,cancelGetVisits:o,visitsInfo:t,settings:s,exportCsv:p,children:g.jsx(M1e,{shortUrlDetail:n,shortUrlVisits:t,goBack:c})})},(t,n)=>n.shortCode?[Xr.shortUrlVisits(hm(n.shortCode))]:[]),N1e=({tagVisits:e,goBack:t,colorGenerator:n})=>{const{visits:r,tag:i}=e,o=g.jsxs("span",{className:"d-flex align-items-center justify-content-center",children:[g.jsx("span",{className:"me-2",children:"Visits for"}),g.jsx(VE,{text:i,colorGenerator:n})]});return g.jsx(hh,{title:o,goBack:t,visits:r})},L1e=(e,{exportVisits:t})=>ra(({getTagVisits:n,tagVisits:r,cancelGetTagVisits:i,settings:o})=>{const s=ta(),{tag:a=""}=Ks(),l=(f,h)=>n({tag:a,query:dh(f),doIntervalFallback:h}),c=f=>t(`tag_${a}_visits.csv`,f);return g.jsx(ph,{getVisits:l,cancelGetVisits:i,visitsInfo:r,settings:o,exportCsv:c,children:g.jsx(N1e,{tagVisits:r,goBack:s,colorGenerator:e})})},()=>[Xr.visits]),D1e=(e,t)=>{e.serviceFactory("MapModal",()=>W8),e.serviceFactory("ShortUrlVisits",R1e,"ReportExporter"),e.decorator("ShortUrlVisits",t(["shortUrlVisits","shortUrlDetail","mercureInfo","settings"],["getShortUrlVisits","getShortUrlDetail","cancelGetShortUrlVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("TagVisits",L1e,"ColorGenerator","ReportExporter"),e.decorator("TagVisits",t(["tagVisits","mercureInfo","settings"],["getTagVisits","cancelGetTagVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("DomainVisits",d1e,"ReportExporter"),e.decorator("DomainVisits",t(["domainVisits","mercureInfo","settings"],["getDomainVisits","cancelGetDomainVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("OrphanVisits",p1e,"ReportExporter"),e.decorator("OrphanVisits",t(["orphanVisits","mercureInfo","settings"],["getOrphanVisits","cancelGetOrphanVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("NonOrphanVisits",h1e,"ReportExporter"),e.decorator("NonOrphanVisits",t(["nonOrphanVisits","mercureInfo","settings"],["getNonOrphanVisits","cancelGetNonOrphanVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("VisitsParser",()=>s1e),e.serviceFactory("getShortUrlVisits",S1e,"buildShlinkApiClient"),e.serviceFactory("cancelGetShortUrlVisits",at("cancelGetVisits"),"shortUrlVisitsReducerCreator"),e.serviceFactory("getTagVisits",T1e,"buildShlinkApiClient"),e.serviceFactory("cancelGetTagVisits",at("cancelGetVisits"),"tagVisitsReducerCreator"),e.serviceFactory("getDomainVisits",Jhe,"buildShlinkApiClient"),e.serviceFactory("cancelGetDomainVisits",at("cancelGetVisits"),"domainVisitsReducerCreator"),e.serviceFactory("getOrphanVisits",b1e,"buildShlinkApiClient"),e.serviceFactory("cancelGetOrphanVisits",at("cancelGetVisits"),"orphanVisitsReducerCreator"),e.serviceFactory("getNonOrphanVisits",g1e,"buildShlinkApiClient"),e.serviceFactory("cancelGetNonOrphanVisits",at("cancelGetVisits"),"nonOrphanVisitsReducerCreator"),e.serviceFactory("createNewVisits",()=>ah),e.serviceFactory("loadVisitsOverview",P1e,"buildShlinkApiClient"),e.serviceFactory("visitsOverviewReducerCreator",k1e,"loadVisitsOverview"),e.serviceFactory("visitsOverviewReducer",at("reducer"),"visitsOverviewReducerCreator"),e.serviceFactory("domainVisitsReducerCreator",epe,"getDomainVisits"),e.serviceFactory("domainVisitsReducer",at("reducer"),"domainVisitsReducerCreator"),e.serviceFactory("nonOrphanVisitsReducerCreator",v1e,"getNonOrphanVisits"),e.serviceFactory("nonOrphanVisitsReducer",at("reducer"),"nonOrphanVisitsReducerCreator"),e.serviceFactory("orphanVisitsReducerCreator",w1e,"getOrphanVisits"),e.serviceFactory("orphanVisitsReducer",at("reducer"),"orphanVisitsReducerCreator"),e.serviceFactory("shortUrlVisitsReducerCreator",C1e,"getShortUrlVisits"),e.serviceFactory("shortUrlVisitsReducer",at("reducer"),"shortUrlVisitsReducerCreator"),e.serviceFactory("tagVisitsReducerCreator",O1e,"getTagVisits"),e.serviceFactory("tagVisitsReducer",at("reducer"),"tagVisitsReducerCreator")},oi=new Sq,{container:uT}=oi,A1e=(e,t)=>(...n)=>e[t](...n),j1e=(e,t)=>({...e,[t]:A1e(uT,t)}),ia=(e,t=[])=>WW(e?Oj(e):null,t.reduce(j1e,{}));jse(oi,ia);yae(oi,ia);IX(oi);Mve(oi,ia);ome(oi,ia);Eye(oi,ia);D1e(oi,ia);V_e(oi);ppe(oi);Pme(oi,ia);fpe(oi,ia);var fT={},oy={},I1e={get exports(){return oy},set exports(e){oy=e}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isPlainObject=t.clone=t.recursive=t.merge=t.main=void 0,e.exports=t=n,t.default=n;function n(){for(var c=[],f=0;fF.length)&&(j=F.length);for(var B=0,ne=Array(j);Bk6({servers:Kpe,selectedServer:e.selectedServerReducer,shortUrlsList:e.shortUrlsListReducer,shortUrlCreation:e.shortUrlCreationReducer,shortUrlDeletion:e.shortUrlDeletionReducer,shortUrlEdition:e.shortUrlEditionReducer,shortUrlDetail:e.shortUrlDetailReducer,shortUrlVisits:e.shortUrlVisitsReducer,tagVisits:e.tagVisitsReducer,domainVisits:e.domainVisitsReducer,orphanVisits:e.orphanVisitsReducer,nonOrphanVisits:e.nonOrphanVisitsReducer,tagsList:e.tagsListReducer,tagDelete:e.tagDeleteReducer,tagEdit:e.tagEditReducer,mercureInfo:e.mercureInfoReducer,settings:_me,domainsList:e.domainsListReducer,visitsOverview:e.visitsOverviewReducer,appUpdated:Ase,sidebar:cae}),$1e=e=>{var t;return e.settings&&((t=e.settings.visits)==null?void 0:t.defaultInterval)==="last180days"&&e.settings.visits&&(e.settings.visits.defaultInterval="last180Days"),e},B1e=!0,tF={states:["settings","servers"],namespace:"shlink",namespaceSeparator:".",debounce:300},z1e=$1e(fT.load(tF)),U1e=e=>ose({devTools:!B1e,reducer:F1e(e),preloadedState:z1e,middleware:t=>t({immutableCheck:!1,serializableCheck:!1}).prepend(e.selectServerListener.middleware).concat(fT.save(tF))}),V1e=!!(window.location.hostname==="localhost"||window.location.hostname==="[::1]"||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));function H1e(e){if("serviceWorker"in navigator){if(new URL(Ug.homepage,window.location.href).origin!==window.location.origin)return;window.addEventListener("load",()=>{const n=`${Ug.homepage}/service-worker.js`;V1e?(W1e(n,e),navigator.serviceWorker.ready.then(()=>{console.log("This web app is being served cache-first by a service worker. To learn more, visit https://cra.link/PWA")})):nF(n,e)})}}function nF(e,t){navigator.serviceWorker.register(e).then(n=>{n.onupdatefound=()=>{const r=n.installing;r!=null&&(r.onstatechange=()=>{r.state==="installed"&&(navigator.serviceWorker.controller?(console.log("New content is available and will be used when all tabs for this page are closed. See https://cra.link/PWA."),t&&t.onUpdate&&t.onUpdate(n)):(console.log("Content is cached for offline use."),t&&t.onSuccess&&t.onSuccess(n)))})}}).catch(n=>{console.error("Error during service worker registration:",n)})}function W1e(e,t){fetch(e,{headers:{"Service-Worker":"script"}}).then(n=>{const r=n.headers.get("content-type");n.status===404||r!=null&&r.indexOf("javascript")===-1?navigator.serviceWorker.ready.then(i=>{i.unregister().then(()=>{window.location.reload()})}):nF(e,t)}).catch(()=>{console.log("No internet connection found. App is running in offline mode.")})}const Y1e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=",q1e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABSCAMAAAAhFXfZAAAC91BMVEVMaXEzeak2f7I4g7g3g7cua5gzeKg8hJo3grY4g7c3grU0gLI2frE0daAubJc2gbQwd6QzeKk2gLMtd5sxdKIua5g1frA2f7IydaM0e6w2fq41fK01eqo3grgubJgta5cxdKI1f7AydaQydaMxc6EubJgvbJkwcZ4ubZkwcJwubZgubJcydqUydKIxapgubJctbJcubZcubJcvbJYubJcvbZkubJctbJctbZcubJg2f7AubJcrbZcubJcubJcua5g3grY0fq8ubJcubJdEkdEwhsw6i88vhswuhcsuhMtBjMgthMsrg8srgss6is8qgcs8i9A9iMYtg8spgcoogMo7hcMngMonf8olfso4gr8kfck5iM8jfMk4iM8he8k1fro7itAgesk2hs8eecgzfLcofssdeMg0hc4cd8g2hcsxeLQbdsgZdcgxeLImfcszhM0vda4xgckzhM4xg84wf8Yxgs4udKsvfcQucqhUndROmdM1fK0wcZ8vb5w0eqpQm9MzeKhXoNVcpdYydKNWn9VZotVKltJFjsIwcJ1Rms9OlslLmtH///8+kc9epdYzd6dbo9VHkMM2f7FHmNBClM8ydqVcpNY9hro3gLM9hLczealQmcw3fa46f7A8gLMxc6I3eagyc6FIldJMl9JSnNRSntNNl9JPnNJFi75UnM9ZodVKksg8kM45jc09e6ZHltFBk883gbRBh7pDk9EwcaBzn784g7dKkcY2i81Om9M7j85Llc81is09g7Q4grY/j9A0eqxKmdFFltBEjcXf6fFImdBCiLxJl9FGlNFBi78yiMxVndEvbpo6js74+vx+psPP3+o/ks5HkcpGmNCjwdZCkNDM3ehYoNJEls+lxNkxh8xHks0+jdC1zd5Lg6r+/v/H2ufz9/o3jM3t8/edvdM/k89Th61OiLBSjbZklbaTt9BfptdjmL1AicBHj8hGk9FAgK1dkLNTjLRekrdClc/k7fM0icy0y9tgp9c4jc2NtM9Dlc8zicxeXZn3AAAAQ3RSTlMAHDdTb4yPA+LtnEQmC4L2EmHqB7XA0d0sr478x4/Yd5i1zOfyPkf1sLVq4Nh3FvjxopQ2/STNuFzUwFIwxKaejILpIBEV9wAABhVJREFUeF6s1NdyFEcYBeBeoQIhRAkLlRDGrhIgY3BJL8CVeKzuyXFzzjkn5ZxzzuScg3PO8cKzu70JkO0LfxdTU//pM9vTu7Xgf6KqOVTb9X7toRrVEfBf1HTVjZccrT/2by1VV928Yty9ZbVuucdz90frG8DBjl9pVApbOstvmMuvVgaNXSfAAd6pGxpy6yxf5ph43pS/4f3uoaGm2rdu72S9xzOvMymkZFq/ptDrk90mhW7e4zl7HLzhxGWPR20xmSxJ/VqldG5m9XhaVOA1DadsNh3Pu5L2N6QtPO/32JpqQBVVk20oy/Pi2s23WEvyfHbe1thadVQttvm7Llf65gGmXK67XtupyoM7HQhmXdLS8oGWJNeOJ3C5fG5XCEJnkez3/oFdsvgJ4l2ANZwhrJKk/7OSXa+3Vw2WJMlKnGkobouYk6T0TyX30klOUnTD9HJ5qpckL3EW/w4XF3Xd0FGywXUrstrclVsqz5Pd/sXFYyDnPdrLcQODmGOK47IZb4CmibmMn+MYRzFZ5jg33ZL/EJrWcszHmANy3ARBK/IXtciJy8VsitPSdE3uuHxzougojcUdr8/32atnz/ev3f/K5wtpxUTpcaI45zusVDpYtZi+jg0oU9b3x74h7+n9ABvYEZeKaVq0sh0AtLKsFtqNBdeT0MrSzwwlq9+x6xAO4tgOtSzbCjrNQQiNvQUbUEubvzBUeGw26yDCsRHCoLkTHDa7IdOLIThs/gHvChszh2CimE8peRs47cxANI0lYNB5y1DljpOF0IhzBDPOZnDOqYYbeGKECbPzWnXludPphw5c2YBq5zlwXphIbO4VDCZ0gnPfUO1TwZoYwAs2ExPCedAu9DAjfQUjzITQb3jNj0KG2Sgt6BHaQUdYzWz+XmBktOHwanXjaSTcwwziBcuMOtwBmqPrTOxFQR/DRKKPqyur0aiW6cULYsx6tBm0jXpR/AUWR6HRq9WVW6MRhIq5jLyjbaCTDCijyYJNpCajdyobP/eTw0iexBAKkJ3gA5KcQb2zBXsIBckn+xVv8jkZSaEFHE+jFEleAEfayRU0MouNoBmB/L50Ai/HSLIHxcrpCvnhSQAuakKp2C/YbCylJjXRVy/z3+Kv/RrNcCo+WUzlVEhzKffnTQnxeN9fWF88fiNCUdSTsaufaChKWInHeysygfpIqagoakW+vV20J8uyl6TyNKEZWV4oRSPyCkWpgOLSbkCObT8o2r6tlG58HQquf6O0v50tB7JM7F4EORd2dx/K0w/KHsVkLPaoYrwgP/y7krr3SSMA4zj+OBgmjYkxcdIJQyQRKgg2viX9Hddi9UBb29LrKR7CVVEEEXWojUkXNyfTNDE14W9gbHJNuhjDettN3ZvbOvdOqCD3Jp/9l+/wJE+9PkYGjx/fqkys3S2rMozM/o2106rfMUINo6hVqz+eu/hd1c4xTg0TAfy5kV+4UG6+IthHTU9woWmxuKNbTfuCSfovBCxq7EtHqvYL4Sm6F8GVxsSXHMQ07TOi1DKtZxjWaaIyi4CXWjxPccUw8WVbMYY5wxC1mzEyXMJWkllpRloi+Kkoq69sxBTlElF6aAxYUbjXNlhlDZilDnM4U5SlN5biRsRHnbx3mbeWjEh4mEyiuJDl5XcWVmX5GvNkFgLWZM5qwsop4/AWfLhU1cR7k1VVvcYCWRkOI6Xy5gmnphCYIkvzuNYzHzosq2oNk2RtSs8khfUOfHIDgR6ysYBaMpl4uEgk2U/oJTs9AaTSwma7dT69geAE2ZpEjUsn2ieJNHeKfrI3EcAGJ2ZaNgVuC8EBctCLc57P5u5led6IOBkIYkuQMrmmjChs4VkfOerHqSBkPzZlhe06RslZ3zMjk2sscqKwY0RcjKK+LWbzd7KiHhkncs/siFJ+V5eXxD34B8nVuJEpGJNmxN2gH3vSvp7J70tF+D1Ej8qUJD1TkErAND2GZwTFg/LubvmgiBG3SOvdlsqFQrkEzJCL1rstlnVFROixZoDDSuXQFHESwVGlcuQcMb/b42NgjLowh5MTDFE3vNB5qStRIErdCQEh6pLPR92anSUb/wAIhldAaDMpGgAAAABJRU5ErkJggg==",G1e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC",Z1e=()=>{delete PL.Icon.Default.prototype._getIconUrl,PL.Icon.Default.mergeOptions({iconRetinaUrl:q1e,iconUrl:Y1e,shadowUrl:G1e})};Z1e();const rF=U1e(uT),{App:K1e,ScrollToTop:X1e,ErrorHandler:Q1e,appUpdateAvailable:J1e}=uT;F4(document.getElementById("root")).render(g.jsx(YW,{store:rF,children:g.jsx(qY,{basename:Ug.homepage,children:g.jsx(Q1e,{children:g.jsx(X1e,{children:g.jsx(K1e,{})})})})}));H1e({onUpdate(){rF.dispatch(J1e())}});