diff --git a/feature/external-web-component/assets/index-30cba7be.js b/feature/external-web-component/assets/index-30cba7be.js deleted file mode 100644 index 0ec53d8f..00000000 --- a/feature/external-web-component/assets/index-30cba7be.js +++ /dev/null @@ -1,1025 +0,0 @@ -var hV=Object.defineProperty;var dV=(t,e,n)=>e in t?hV(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var St=(t,e,n)=>(dV(t,typeof e!="symbol"?e+"":e,n),n);function fV(t,e){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.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 mp=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function xs(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var U4={exports:{}},yb={},V4={exports:{}},pe={};/** - * @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 Tg=Symbol.for("react.element"),pV=Symbol.for("react.portal"),mV=Symbol.for("react.fragment"),gV=Symbol.for("react.strict_mode"),vV=Symbol.for("react.profiler"),yV=Symbol.for("react.provider"),_V=Symbol.for("react.context"),bV=Symbol.for("react.forward_ref"),xV=Symbol.for("react.suspense"),wV=Symbol.for("react.memo"),SV=Symbol.for("react.lazy"),WL=Symbol.iterator;function TV(t){return t===null||typeof t!="object"?null:(t=WL&&t[WL]||t["@@iterator"],typeof t=="function"?t:null)}var H4={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},W4=Object.assign,Y4={};function Ld(t,e,n){this.props=t,this.context=e,this.refs=Y4,this.updater=n||H4}Ld.prototype.isReactComponent={};Ld.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=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,t,e,"setState")};Ld.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function Z4(){}Z4.prototype=Ld.prototype;function zO(t,e,n){this.props=t,this.context=e,this.refs=Y4,this.updater=n||H4}var UO=zO.prototype=new Z4;UO.constructor=zO;W4(UO,Ld.prototype);UO.isPureReactComponent=!0;var YL=Array.isArray,G4=Object.prototype.hasOwnProperty,VO={current:null},q4={key:!0,ref:!0,__self:!0,__source:!0};function K4(t,e,n){var r,i={},o=null,s=null;if(e!=null)for(r in e.ref!==void 0&&(s=e.ref),e.key!==void 0&&(o=""+e.key),e)G4.call(e,r)&&!q4.hasOwnProperty(r)&&(i[r]=e[r]);var l=arguments.length-2;if(l===1)i.children=n;else if(1Math.max(Math.min(t,n),e);function gp(t){return Za(Eg(t*2.55),0,255)}function sl(t){return Za(Eg(t*255),0,255)}function qs(t){return Za(Eg(t/2.55)/100,0,1)}function GL(t){return Za(Eg(t*100),0,100)}const Ki={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},J2=[..."0123456789ABCDEF"],DV=t=>J2[t&15],IV=t=>J2[(t&240)>>4]+J2[t&15],pv=t=>(t&240)>>4===(t&15),FV=t=>pv(t.r)&&pv(t.g)&&pv(t.b)&&pv(t.a);function BV(t){var e=t.length,n;return t[0]==="#"&&(e===4||e===5?n={r:255&Ki[t[1]]*17,g:255&Ki[t[2]]*17,b:255&Ki[t[3]]*17,a:e===5?Ki[t[4]]*17:255}:(e===7||e===9)&&(n={r:Ki[t[1]]<<4|Ki[t[2]],g:Ki[t[3]]<<4|Ki[t[4]],b:Ki[t[5]]<<4|Ki[t[6]],a:e===9?Ki[t[7]]<<4|Ki[t[8]]:255})),n}const $V=(t,e)=>t<255?e(t):"";function zV(t){var e=FV(t)?DV:IV;return t?"#"+e(t.r)+e(t.g)+e(t.b)+$V(t.a,e):void 0}const UV=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Q4(t,e,n){const r=e*Math.min(n,1-n),i=(o,s=(o+t/30)%12)=>n-r*Math.max(Math.min(s-3,9-s,1),-1);return[i(0),i(8),i(4)]}function VV(t,e,n){const r=(i,o=(i+t/60)%6)=>n-n*e*Math.max(Math.min(o,4-o,1),0);return[r(5),r(3),r(1)]}function HV(t,e,n){const r=Q4(t,1,.5);let i;for(e+n>1&&(i=1/(e+n),e*=i,n*=i),i=0;i<3;i++)r[i]*=1-e-n,r[i]+=e;return r}function WV(t,e,n,r,i){return t===i?(e-n)/r+(e.5?d/(2-o-s):d/(o+s),c=WV(n,r,i,d,o),c=c*60+.5),[c|0,h||0,l]}function YO(t,e,n,r){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,r)).map(sl)}function ZO(t,e,n){return YO(Q4,t,e,n)}function YV(t,e,n){return YO(HV,t,e,n)}function ZV(t,e,n){return YO(VV,t,e,n)}function J4(t){return(t%360+360)%360}function GV(t){const e=UV.exec(t);let n=255,r;if(!e)return;e[5]!==r&&(n=e[6]?gp(+e[5]):sl(+e[5]));const i=J4(+e[2]),o=+e[3]/100,s=+e[4]/100;return e[1]==="hwb"?r=YV(i,o,s):e[1]==="hsv"?r=ZV(i,o,s):r=ZO(i,o,s),{r:r[0],g:r[1],b:r[2],a:n}}function qV(t,e){var n=WO(t);n[0]=J4(n[0]+e),n=ZO(n),t.r=n[0],t.g=n[1],t.b=n[2]}function KV(t){if(!t)return;const e=WO(t),n=e[0],r=GL(e[1]),i=GL(e[2]);return t.a<255?`hsla(${n}, ${r}%, ${i}%, ${qs(t.a)})`:`hsl(${n}, ${r}%, ${i}%)`}const qL={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"},KL={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 XV(){const t={},e=Object.keys(KL),n=Object.keys(qL);let r,i,o,s,l;for(r=0;r>16&255,o>>8&255,o&255]}return t}let mv;function QV(t){mv||(mv=XV(),mv.transparent=[0,0,0,0]);const e=mv[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const JV=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function tH(t){const e=JV.exec(t);let n=255,r,i,o;if(e){if(e[7]!==r){const s=+e[7];n=e[8]?gp(s):Za(s*255,0,255)}return r=+e[1],i=+e[3],o=+e[5],r=255&(e[2]?gp(r):Za(r,0,255)),i=255&(e[4]?gp(i):Za(i,0,255)),o=255&(e[6]?gp(o):Za(o,0,255)),{r,g:i,b:o,a:n}}}function eH(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${qs(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const tw=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,Yu=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function nH(t,e,n){const r=Yu(qs(t.r)),i=Yu(qs(t.g)),o=Yu(qs(t.b));return{r:sl(tw(r+n*(Yu(qs(e.r))-r))),g:sl(tw(i+n*(Yu(qs(e.g))-i))),b:sl(tw(o+n*(Yu(qs(e.b))-o))),a:t.a+n*(e.a-t.a)}}function gv(t,e,n){if(t){let r=WO(t);r[e]=Math.max(0,Math.min(r[e]+r[e]*n,e===0?360:1)),r=ZO(r),t.r=r[0],t.g=r[1],t.b=r[2]}}function t5(t,e){return t&&Object.assign(e||{},t)}function XL(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=sl(t[3]))):(e=t5(t,{r:0,g:0,b:0,a:1}),e.a=sl(e.a)),e}function rH(t){return t.charAt(0)==="r"?tH(t):GV(t)}class gm{constructor(e){if(e instanceof gm)return e;const n=typeof e;let r;n==="object"?r=XL(e):n==="string"&&(r=BV(e)||QV(e)||rH(e)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var e=t5(this._rgb);return e&&(e.a=qs(e.a)),e}set rgb(e){this._rgb=XL(e)}rgbString(){return this._valid?eH(this._rgb):void 0}hexString(){return this._valid?zV(this._rgb):void 0}hslString(){return this._valid?KV(this._rgb):void 0}mix(e,n){if(e){const r=this.rgb,i=e.rgb;let o;const s=n===o?.5:n,l=2*s-1,c=r.a-i.a,h=((l*c===-1?l:(l+c)/(1+l*c))+1)/2;o=1-h,r.r=255&h*r.r+o*i.r+.5,r.g=255&h*r.g+o*i.g+.5,r.b=255&h*r.b+o*i.b+.5,r.a=s*r.a+(1-s)*i.a,this.rgb=r}return this}interpolate(e,n){return e&&(this._rgb=nH(this._rgb,e._rgb,n)),this}clone(){return new gm(this.rgb)}alpha(e){return this._rgb.a=sl(e),this}clearer(e){const n=this._rgb;return n.a*=1-e,this}greyscale(){const e=this._rgb,n=Eg(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=n,this}opaquer(e){const n=this._rgb;return n.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return gv(this._rgb,2,e),this}darken(e){return gv(this._rgb,2,-e),this}saturate(e){return gv(this._rgb,1,e),this}desaturate(e){return gv(this._rgb,1,-e),this}rotate(e){return qV(this._rgb,e),this}}/*! - * Chart.js v4.3.3 - * https://www.chartjs.org - * (c) 2023 Chart.js Contributors - * Released under the MIT License - */function Hs(){}const iH=(()=>{let t=0;return()=>t++})();function _e(t){return t===null||typeof t>"u"}function Qe(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function he(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function xn(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function Ci(t,e){return xn(t)?t:e}function re(t,e){return typeof t>"u"?e:t}const oH=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/e,e5=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function ze(t,e,n){if(t&&typeof t.call=="function")return t.apply(n,e)}function Me(t,e,n,r){let i,o,s;if(Qe(t))if(o=t.length,r)for(i=o-1;i>=0;i--)e.call(n,t[i],i);else for(i=0;it,x:t=>t.x,y:t=>t.y};function lH(t){const e=t.split("."),n=[];let r="";for(const i of e)r+=i,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function cH(t){const e=lH(t);return n=>{for(const r of e){if(r==="")break;n=n&&n[r]}return n}}function xl(t,e){return(QL[e]||(QL[e]=cH(e)))(t)}function GO(t){return t.charAt(0).toUpperCase()+t.slice(1)}const ym=t=>typeof t<"u",wl=t=>typeof t=="function",JL=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};function uH(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const an=Math.PI,Je=2*an,hH=Je+an,T_=Number.POSITIVE_INFINITY,dH=an/180,wn=an/2,_c=an/4,tM=an*2/3,Ga=Math.log10,us=Math.sign;function Dp(t,e,n){return Math.abs(t-e)i-o).pop(),e}function Wh(t){return!isNaN(parseFloat(t))&&isFinite(t)}function pH(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}function r5(t,e,n){let r,i,o;for(r=0,i=t.length;rc&&h=Math.min(e,n)-r&&t<=Math.max(e,n)+r}function KO(t,e,n){n=n||(s=>t[s]1;)o=i+r>>1,n(o)?i=o:r=o;return{lo:i,hi:r}}const ea=(t,e,n,r)=>KO(t,n,r?i=>{const o=t[i][e];return ot[i][e]KO(t,n,r=>t[r][e]>=n);function yH(t,e,n){let r=0,i=t.length;for(;rr&&t[i-1]>n;)i--;return r>0||i{const r="_onData"+GO(n),i=t[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!1,value(...o){const s=i.apply(this,o);return t._chartjs.listeners.forEach(l=>{typeof l[r]=="function"&&l[r](...o)}),s}})})}function rM(t,e){const n=t._chartjs;if(!n)return;const r=n.listeners,i=r.indexOf(e);i!==-1&&r.splice(i,1),!(r.length>0)&&(o5.forEach(o=>{delete t[o]}),delete t._chartjs)}function s5(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const a5=function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame}();function l5(t,e){let n=[],r=!1;return function(...i){n=i,r||(r=!0,a5.call(window,()=>{r=!1,t.apply(e,n)}))}}function bH(t,e){let n;return function(...r){return e?(clearTimeout(n),n=setTimeout(t,e,r)):t.apply(this,r),e}}const XO=t=>t==="start"?"left":t==="end"?"right":"center",Mr=(t,e,n)=>t==="start"?e:t==="end"?n:(e+n)/2,xH=(t,e,n,r)=>t===(r?"left":"right")?n:t==="center"?(e+n)/2:e;function c5(t,e,n){const r=e.length;let i=0,o=r;if(t._sorted){const{iScale:s,_parsed:l}=t,c=s.axis,{min:h,max:d,minDefined:p,maxDefined:m}=s.getUserBounds();p&&(i=or(Math.min(ea(l,c,h).lo,n?r:ea(e,c,s.getPixelForValue(h)).lo),0,r-1)),m?o=or(Math.max(ea(l,s.axis,d,!0).hi+1,n?0:ea(e,c,s.getPixelForValue(d),!0).hi+1),i,r)-i:o=r-i}return{start:i,count:o}}function u5(t){const{xScale:e,yScale:n,_scaleRanges:r}=t,i={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!r)return t._scaleRanges=i,!0;const o=r.xmin!==e.min||r.xmax!==e.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),o}const vv=t=>t===0||t===1,iM=(t,e,n)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*Je/n)),oM=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*Je/n)+1,Ip={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*wn)+1,easeOutSine:t=>Math.sin(t*wn),easeInOutSine:t=>-.5*(Math.cos(an*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>vv(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>vv(t)?t:iM(t,.075,.3),easeOutElastic:t=>vv(t)?t:oM(t,.075,.3),easeInOutElastic(t){return vv(t)?t:t<.5?.5*iM(t*2,.1125,.45):.5+.5*oM(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return(t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-Ip.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?Ip.easeInBounce(t*2)*.5:Ip.easeOutBounce(t*2-1)*.5+.5};function QO(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function sM(t){return QO(t)?t:new gm(t)}function ew(t){return QO(t)?t:new gm(t).saturate(.5).darken(.1).hexString()}const wH=["x","y","borderWidth","radius","tension"],SH=["color","borderColor","backgroundColor"];function TH(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),t.set("animations",{colors:{type:"color",properties:SH},numbers:{type:"number",properties:wH}}),t.describe("animations",{_fallback:"animation"}),t.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:e=>e|0}}}})}function EH(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const aM=new Map;function OH(t,e){e=e||{};const n=t+JSON.stringify(e);let r=aM.get(n);return r||(r=new Intl.NumberFormat(t,e),aM.set(n,r)),r}function Og(t,e,n){return OH(e,n).format(t)}const h5={values(t){return Qe(t)?t:""+t},numeric(t,e,n){if(t===0)return"0";const r=this.chart.options.locale;let i,o=t;if(n.length>1){const h=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(h<1e-4||h>1e15)&&(i="scientific"),o=CH(t,n)}const s=Ga(Math.abs(o)),l=isNaN(s)?1:Math.max(Math.min(-1*Math.floor(s),20),0),c={notation:i,minimumFractionDigits:l,maximumFractionDigits:l};return Object.assign(c,this.options.ticks.format),Og(t,r,c)},logarithmic(t,e,n){if(t===0)return"0";const r=n[e].significand||t/Math.pow(10,Math.floor(Ga(t)));return[1,2,3,5,10,15].includes(r)||e>.8*n.length?h5.numeric.call(this,t,e,n):""}};function CH(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}var _b={formatters:h5};function kH(t){t.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:(e,n)=>n.lineWidth,tickColor:(e,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:_b.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const uu=Object.create(null),eS=Object.create(null);function Fp(t,e){if(!e)return t;const n=e.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)=>ew(i.backgroundColor),this.hoverBorderColor=(r,i)=>ew(i.borderColor),this.hoverColor=(r,i)=>ew(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(e),this.apply(n)}set(e,n){return nw(this,e,n)}get(e){return Fp(this,e)}describe(e,n){return nw(eS,e,n)}override(e,n){return nw(uu,e,n)}route(e,n,r,i){const o=Fp(this,e),s=Fp(this,r),l="_"+n;Object.defineProperties(o,{[l]:{value:o[n],writable:!0},[n]:{enumerable:!0,get(){const c=this[l],h=s[i];return he(c)?Object.assign({},h,c):re(c,h)},set(c){this[l]=c}}})}apply(e){e.forEach(n=>n(this))}}var Sn=new PH({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[TH,EH,kH]);function LH(t){return!t||_e(t.size)||_e(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function E_(t,e,n,r,i){let o=e[i];return o||(o=e[i]=t.measureText(i).width,n.push(i)),o>r&&(r=o),r}function MH(t,e,n,r){r=r||{};let i=r.data=r.data||{},o=r.garbageCollect=r.garbageCollect||[];r.font!==e&&(i=r.data={},o=r.garbageCollect=[],r.font=e),t.save(),t.font=e;let s=0;const l=n.length;let c,h,d,p,m;for(c=0;cn.length){for(c=0;c0&&t.stroke()}}function na(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.xe.top-n&&t.y0&&o.strokeColor!=="";let c,h;for(t.save(),t.font=i.string,jH(t,o),c=0;c+t||0;function JO(t,e){const n={},r=he(e),i=r?Object.keys(e):e,o=he(t)?r?s=>re(t[s],t[e[s]]):s=>t[s]:()=>t;for(const s of i)n[s]=$H(o(s));return n}function f5(t){return JO(t,{top:"y",right:"x",bottom:"y",left:"x"})}function qc(t){return JO(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Dr(t){const e=f5(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Kn(t,e){t=t||{},e=e||Sn.font;let n=re(t.size,e.size);typeof n=="string"&&(n=parseInt(n,10));let r=re(t.style,e.style);r&&!(""+r).match(FH)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:re(t.family,e.family),lineHeight:BH(re(t.lineHeight,e.lineHeight),n),size:n,style:r,weight:re(t.weight,e.weight),string:""};return i.string=LH(i),i}function vp(t,e,n,r){let i=!0,o,s,l;for(o=0,s=t.length;on&&l===0?0:l+c;return{min:s(r,-Math.abs(o)),max:s(i,o)}}function Rl(t,e){return Object.assign(Object.create(t),e)}function tC(t,e=[""],n,r,i=()=>t[0]){const o=n||t;typeof r>"u"&&(r=v5("_fallback",t));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:o,_fallback:r,_getTarget:i,override:l=>tC([l,...t],e,o,r)};return new Proxy(s,{deleteProperty(l,c){return delete l[c],delete l._keys,delete t[0][c],!0},get(l,c){return m5(l,c,()=>qH(c,e,t,l))},getOwnPropertyDescriptor(l,c){return Reflect.getOwnPropertyDescriptor(l._scopes[0],c)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(l,c){return uM(l).includes(c)},ownKeys(l){return uM(l)},set(l,c,h){const d=l._storage||(l._storage=i());return l[c]=d[c]=h,delete l._keys,!0}})}function Yh(t,e,n,r){const i={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:p5(t,r),setContext:o=>Yh(t,o,n,r),override:o=>Yh(t.override(o),e,n,r)};return new Proxy(i,{deleteProperty(o,s){return delete o[s],delete t[s],!0},get(o,s,l){return m5(o,s,()=>VH(o,s,l))},getOwnPropertyDescriptor(o,s){return o._descriptors.allKeys?Reflect.has(t,s)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,s)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(o,s){return Reflect.has(t,s)},ownKeys(){return Reflect.ownKeys(t)},set(o,s,l){return t[s]=l,delete o[s],!0}})}function p5(t,e={scriptable:!0,indexable:!0}){const{_scriptable:n=e.scriptable,_indexable:r=e.indexable,_allKeys:i=e.allKeys}=t;return{allKeys:i,scriptable:n,indexable:r,isScriptable:wl(n)?n:()=>n,isIndexable:wl(r)?r:()=>r}}const UH=(t,e)=>t?t+GO(e):e,eC=(t,e)=>he(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function m5(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const r=n();return t[e]=r,r}function VH(t,e,n){const{_proxy:r,_context:i,_subProxy:o,_descriptors:s}=t;let l=r[e];return wl(l)&&s.isScriptable(e)&&(l=HH(e,l,t,n)),Qe(l)&&l.length&&(l=WH(e,l,t,s.isIndexable)),eC(e,l)&&(l=Yh(l,i,o&&o[e],s)),l}function HH(t,e,n,r){const{_proxy:i,_context:o,_subProxy:s,_stack:l}=n;if(l.has(t))throw new Error("Recursion detected: "+Array.from(l).join("->")+"->"+t);l.add(t);let c=e(o,s||r);return l.delete(t),eC(t,c)&&(c=nC(i._scopes,i,t,c)),c}function WH(t,e,n,r){const{_proxy:i,_context:o,_subProxy:s,_descriptors:l}=n;if(typeof o.index<"u"&&r(t))return e[o.index%e.length];if(he(e[0])){const c=e,h=i._scopes.filter(d=>d!==c);e=[];for(const d of c){const p=nC(h,i,t,d);e.push(Yh(p,o,s&&s[t],l))}}return e}function g5(t,e,n){return wl(t)?t(e,n):t}const YH=(t,e)=>t===!0?e:typeof t=="string"?xl(e,t):void 0;function ZH(t,e,n,r,i){for(const o of e){const s=YH(n,o);if(s){t.add(s);const l=g5(s._fallback,n,i);if(typeof l<"u"&&l!==n&&l!==r)return l}else if(s===!1&&typeof r<"u"&&n!==r)return null}return!1}function nC(t,e,n,r){const i=e._rootScopes,o=g5(e._fallback,n,r),s=[...t,...i],l=new Set;l.add(r);let c=cM(l,s,n,o||n,r);return c===null||typeof o<"u"&&o!==n&&(c=cM(l,s,o,c,r),c===null)?!1:tC(Array.from(l),[""],i,o,()=>GH(e,n,r))}function cM(t,e,n,r,i){for(;n;)n=ZH(t,e,n,r,i);return n}function GH(t,e,n){const r=t._getTarget();e in r||(r[e]={});const i=r[e];return Qe(i)&&he(n)?n:i||{}}function qH(t,e,n,r){let i;for(const o of e)if(i=v5(UH(o,t),n),typeof i<"u")return eC(t,i)?nC(n,r,t,i):i}function v5(t,e){for(const n of e){if(!n)continue;const r=n[t];if(typeof r<"u")return r}}function uM(t){let e=t._keys;return e||(e=t._keys=KH(t._scopes)),e}function KH(t){const e=new Set;for(const n of t)for(const r of Object.keys(n).filter(i=>!i.startsWith("_")))e.add(r);return Array.from(e)}function y5(t,e,n,r){const{iScale:i}=t,{key:o="r"}=this._parsing,s=new Array(r);let l,c,h,d;for(l=0,c=r;let==="x"?"y":"x";function QH(t,e,n,r){const i=t.skip?e:t,o=e,s=n.skip?e:n,l=tS(o,i),c=tS(s,o);let h=l/(l+c),d=c/(l+c);h=isNaN(h)?0:h,d=isNaN(d)?0:d;const p=r*h,m=r*d;return{previous:{x:o.x-p*(s.x-i.x),y:o.y-p*(s.y-i.y)},next:{x:o.x+m*(s.x-i.x),y:o.y+m*(s.y-i.y)}}}function JH(t,e,n){const r=t.length;let i,o,s,l,c,h=Zh(t,0);for(let d=0;d!h.skip)),e.cubicInterpolationMode==="monotone")eW(t,i);else{let h=r?t[t.length-1]:t[0];for(o=0,s=t.length;ot.ownerDocument.defaultView.getComputedStyle(t,null);function iW(t,e){return wb(t).getPropertyValue(e)}const oW=["top","right","bottom","left"];function Kc(t,e,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const o=oW[i];r[o]=parseFloat(t[e+"-"+o+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const sW=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function aW(t,e){const n=t.touches,r=n&&n.length?n[0]:t,{offsetX:i,offsetY:o}=r;let s=!1,l,c;if(sW(i,o,t.target))l=i,c=o;else{const h=e.getBoundingClientRect();l=r.clientX-h.left,c=r.clientY-h.top,s=!0}return{x:l,y:c,box:s}}function Lc(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:r}=e,i=wb(n),o=i.boxSizing==="border-box",s=Kc(i,"padding"),l=Kc(i,"border","width"),{x:c,y:h,box:d}=aW(t,n),p=s.left+(d&&l.left),m=s.top+(d&&l.top);let{width:v,height:y}=e;return o&&(v-=s.width+l.width,y-=s.height+l.height),{x:Math.round((c-p)/v*n.width/r),y:Math.round((h-m)/y*n.height/r)}}function lW(t,e,n){let r,i;if(e===void 0||n===void 0){const o=rC(t);if(!o)e=t.clientWidth,n=t.clientHeight;else{const s=o.getBoundingClientRect(),l=wb(o),c=Kc(l,"border","width"),h=Kc(l,"padding");e=s.width-h.width-c.width,n=s.height-h.height-c.height,r=O_(l.maxWidth,o,"clientWidth"),i=O_(l.maxHeight,o,"clientHeight")}}return{width:e,height:n,maxWidth:r||T_,maxHeight:i||T_}}const _v=t=>Math.round(t*10)/10;function cW(t,e,n,r){const i=wb(t),o=Kc(i,"margin"),s=O_(i.maxWidth,t,"clientWidth")||T_,l=O_(i.maxHeight,t,"clientHeight")||T_,c=lW(t,e,n);let{width:h,height:d}=c;if(i.boxSizing==="content-box"){const m=Kc(i,"border","width"),v=Kc(i,"padding");h-=v.width+m.width,d-=v.height+m.height}return h=Math.max(0,h-o.width),d=Math.max(0,r?h/r:d-o.height),h=_v(Math.min(h,s,c.maxWidth)),d=_v(Math.min(d,l,c.maxHeight)),h&&!d&&(d=_v(h/2)),(e!==void 0||n!==void 0)&&r&&c.height&&d>c.height&&(d=c.height,h=_v(Math.floor(d*r))),{width:h,height:d}}function hM(t,e,n){const r=e||1,i=Math.floor(t.height*r),o=Math.floor(t.width*r);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const s=t.canvas;return s.style&&(n||!s.style.height&&!s.style.width)&&(s.style.height=`${t.height}px`,s.style.width=`${t.width}px`),t.currentDevicePixelRatio!==r||s.height!==i||s.width!==o?(t.currentDevicePixelRatio=r,s.height=i,s.width=o,t.ctx.setTransform(r,0,0,r,0,0),!0):!1}const uW=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch{}return t}();function dM(t,e){const n=iW(t,e),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function Mc(t,e,n,r){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function hW(t,e,n,r){return{x:t.x+n*(e.x-t.x),y:r==="middle"?n<.5?t.y:e.y:r==="after"?n<1?t.y:e.y:n>0?e.y:t.y}}function dW(t,e,n,r){const i={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},s=Mc(t,i,n),l=Mc(i,o,n),c=Mc(o,e,n),h=Mc(s,l,n),d=Mc(l,c,n);return Mc(h,d,n)}const fW=function(t,e){return{x(n){return t+t+e-n},setWidth(n){e=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,r){return n-r},leftForLtr(n,r){return n-r}}},pW=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function Ah(t,e,n){return t?fW(e,n):pW()}function x5(t,e){let n,r;(e==="ltr"||e==="rtl")&&(n=t.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=r)}function w5(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function S5(t){return t==="angle"?{between:_m,compare:mH,normalize:Li}:{between:ta,compare:(e,n)=>e-n,normalize:e=>e}}function fM({start:t,end:e,count:n,loop:r,style:i}){return{start:t%n,end:e%n,loop:r&&(e-t+1)%n===0,style:i}}function mW(t,e,n){const{property:r,start:i,end:o}=n,{between:s,normalize:l}=S5(r),c=e.length;let{start:h,end:d,loop:p}=t,m,v;if(p){for(h+=c,d+=c,m=0,v=c;mc(i,E,x)&&l(i,E)!==0,k=()=>l(o,x)===0||c(o,E,x),P=()=>_||O(),A=()=>!_||k();for(let j=d,B=d;j<=p;++j)w=e[j%s],!w.skip&&(x=h(w[r]),x!==E&&(_=c(x,i,o),T===null&&P()&&(T=l(x,i)===0?j:B),T!==null&&A()&&(y.push(fM({start:T,end:j,loop:m,count:s,style:v})),T=null),B=j,E=x));return T!==null&&y.push(fM({start:T,end:p,loop:m,count:s,style:v})),y}function E5(t,e){const n=[],r=t.segments;for(let i=0;ii&&t[o%e].skip;)o--;return o%=e,{start:i,end:o}}function vW(t,e,n,r){const i=t.length,o=[];let s=e,l=t[e],c;for(c=e+1;c<=n;++c){const h=t[c%i];h.skip||h.stop?l.skip||(r=!1,o.push({start:e%i,end:(c-1)%i,loop:r}),e=s=h.stop?c:null):(s=c,l.skip&&(e=c)),l=h}return s!==null&&o.push({start:e%i,end:s%i,loop:r}),o}function yW(t,e){const n=t.points,r=t.options.spanGaps,i=n.length;if(!i)return[];const o=!!t._loop,{start:s,end:l}=gW(n,i,o,r);if(r===!0)return pM(t,[{start:s,end:l,loop:o}],n,e);const c=ll({chart:e,initial:n.initial,numSteps:s,currentStep:Math.min(r-n.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=a5.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=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,l=!1,c;for(;s>=0;--s)c=o[s],c._active?(c._total>r.duration&&(r.duration=c._total),c.tick(e),l=!0):(o[s]=o[o.length-1],o.pop());l&&(i.draw(),this._notify(i,r,e,"progress")),o.length||(r.running=!1,this._notify(i,r,e,"complete"),r.initial=!1),n+=o.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){const n=this._charts;let r=n.get(e);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,r)),r}listen(e,n,r){this._getAnims(e).listeners[n].push(r)}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n)}has(e){return this._getAnims(e).items.length>0}start(e){const n=this._charts.get(e);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,i)=>Math.max(r,i._duration),0),this._refresh())}running(e){if(!this._running)return!1;const n=this._charts.get(e);return!(!n||!n.running||!n.items.length)}stop(e){const n=this._charts.get(e);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(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Ws=new xW;const gM="transparent",wW={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const r=sM(t||gM),i=r.valid&&sM(e||gM);return i&&i.valid?i.mix(r,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class SW{constructor(e,n,r,i){const o=n[r];i=vp([e.to,i,o,e.from]);const s=vp([e.from,o,i]);this._active=!0,this._fn=e.fn||wW[e.type||typeof s],this._easing=Ip[e.easing]||Ip.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=r,this._from=s,this._to=i,this._promises=void 0}active(){return this._active}update(e,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,e.duration)),this._total+=o,this._loop=!!e.loop,this._to=vp([e.to,n,i,e.from]),this._from=vp([e.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const n=e-this._start,r=this._duration,i=this._prop,o=this._from,s=this._loop,l=this._to;let c;if(this._active=o!==l&&(s||n1?2-c:c,c=this._easing(Math.min(1,Math.max(0,c))),this._target[i]=this._fn(o,l,c)}wait(){const e=this._promises||(this._promises=[]);return new Promise((n,r)=>{e.push({res:n,rej:r})})}_notify(e){const n=e?"res":"rej",r=this._promises||[];for(let i=0;i{const o=e[i];if(!he(o))return;const s={};for(const l of n)s[l]=o[l];(Qe(o.properties)&&o.properties||[i]).forEach(l=>{(l===i||!r.has(l))&&r.set(l,s)})})}_animateOptions(e,n){const r=n.options,i=EW(e,r);if(!i)return[];const o=this._createAnimations(i,r);return r.$shared&&TW(e.options.$animations,r).then(()=>{e.options=r},()=>{}),o}_createAnimations(e,n){const r=this._properties,i=[],o=e.$animations||(e.$animations={}),s=Object.keys(n),l=Date.now();let c;for(c=s.length-1;c>=0;--c){const h=s[c];if(h.charAt(0)==="$")continue;if(h==="options"){i.push(...this._animateOptions(e,n));continue}const d=n[h];let p=o[h];const m=r.get(h);if(p)if(m&&p.active()){p.update(m,d,l);continue}else p.cancel();if(!m||!m.duration){e[h]=d;continue}o[h]=p=new SW(m,e,h,d),i.push(p)}return i}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}const r=this._createAnimations(e,n);if(r.length)return Ws.add(this._chart,r),!0}}function TW(t,e){const n=[],r=Object.keys(e);for(let i=0;i0||!n&&o<0)return i.index}return null}function xM(t,e){const{chart:n,_cachedMeta:r}=t,i=n._stacks||(n._stacks={}),{iScale:o,vScale:s,index:l}=r,c=o.axis,h=s.axis,d=PW(o,s,r),p=e.length;let m;for(let v=0;vn[r].axis===e).shift()}function AW(t,e){return Rl(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function RW(t,e,n){return Rl(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function Uf(t,e){const n=t.controller.index,r=t.vScale&&t.vScale.axis;if(r){e=e||t._parsed;for(const i of e){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 iw=t=>t==="reset"||t==="none",wM=(t,e)=>e?t:Object.assign({},t),jW=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:C5(n,!0),values:null};class Uo{constructor(e,n){this.chart=e,this._ctx=e.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 e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=_M(e.vScale,e),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(e){this.index!==e&&Uf(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(p,m,v,y)=>p==="x"?m:p==="r"?y:v,o=n.xAxisID=re(r.xAxisID,rw(e,"x")),s=n.yAxisID=re(r.yAxisID,rw(e,"y")),l=n.rAxisID=re(r.rAxisID,rw(e,"r")),c=n.indexAxis,h=n.iAxisID=i(c,o,s,l),d=n.vAxisID=i(c,s,o,l);n.xScale=this.getScaleForId(o),n.yScale=this.getScaleForId(s),n.rScale=this.getScaleForId(l),n.iScale=this.getScaleForId(h),n.vScale=this.getScaleForId(d)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const n=this._cachedMeta;return e===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&rM(this._data,this),e._stacked&&Uf(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),r=this._data;if(he(n))this._data=kW(n);else if(r!==n){if(r){rM(r,this);const i=this._cachedMeta;Uf(i),i._parsed=[]}n&&Object.isExtensible(n)&&_H(n,this),this._syncList=[],this._data=n}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const n=this._cachedMeta,r=this.getDataset();let i=!1;this._dataCheck();const o=n._stacked;n._stacked=_M(n.vScale,n),n.stack!==r.stack&&(i=!0,Uf(n),n.stack=r.stack),this._resyncElements(e),(i||o!==n._stacked)&&xM(this,n._parsed)}configure(){const e=this.chart.config,n=e.datasetScopeKeys(this._type),r=e.getOptionScopes(this.getDataset(),n,!0);this.options=e.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,n){const{_cachedMeta:r,_data:i}=this,{iScale:o,_stacked:s}=r,l=o.axis;let c=e===0&&n===i.length?!0:r._sorted,h=e>0&&r._parsed[e-1],d,p,m;if(this._parsing===!1)r._parsed=i,r._sorted=!0,m=i;else{Qe(i[e])?m=this.parseArrayData(r,i,e,n):he(i[e])?m=this.parseObjectData(r,i,e,n):m=this.parsePrimitiveData(r,i,e,n);const v=()=>p[l]===null||h&&p[l]_||p<_}for(m=0;m=0;--m)if(!y()){this.updateRangeFromParsed(h,e,v,c);break}}return h}getAllParsedValues(e){const n=this._cachedMeta._parsed,r=[];let i,o,s;for(i=0,o=n.length;i=0&&ethis.getContext(r,i,n),_=h.resolveNamedOptions(m,v,y,p);return _.$shared&&(_.$shared=c,o[s]=Object.freeze(wM(_,c))),_}_resolveAnimations(e,n,r){const i=this.chart,o=this._cachedDataOpts,s=`animation-${n}`,l=o[s];if(l)return l;let c;if(i.options.animation!==!1){const d=this.chart.config,p=d.datasetAnimationScopeKeys(this._type,n),m=d.getOptionScopes(this.getDataset(),p);c=d.createResolver(m,this.getContext(e,r,n))}const h=new O5(i,c&&c.animations);return c&&c._cacheable&&(o[s]=Object.freeze(h)),h}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return!n||iw(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){const r=this.resolveDataElementOptions(e,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(e,n,r,i){iw(i)?Object.assign(e,r):this._resolveAnimations(n,i).update(e,r)}updateSharedOptions(e,n,r){e&&!iw(n)&&this._resolveAnimations(void 0,n).update(e,r)}_setStyle(e,n,r,i){e.active=i;const o=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(e,{options:!i&&this.getSharedOptions(o)||o})}removeHoverStyle(e,n,r){this._setStyle(e,r,"active",!1)}setHoverStyle(e,n,r){this._setStyle(e,r,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const n=this._data,r=this._cachedMeta.data;for(const[l,c,h]of this._syncList)this[l](c,h);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,e):o{for(h.length+=n,l=h.length-1;l>=s;l--)h[l]=h[l-n]};for(c(o),l=e;li-o))}return t._cache.$bar}function DW(t){const e=t.iScale,n=NW(e,t.type);let r=e._length,i,o,s,l;const c=()=>{s===32767||s===-32768||(ym(l)&&(r=Math.min(r,Math.abs(s-l)||r)),l=s)};for(i=0,o=n.length;i0?i[t-1]:null,l=tMath.abs(l)&&(c=l,h=s),e[n.axis]=h,e._custom={barStart:c,barEnd:h,start:i,end:o,min:s,max:l}}function k5(t,e,n,r){return Qe(t)?BW(t,e,n,r):e[n.axis]=n.parse(t,r),e}function SM(t,e,n,r){const i=t.iScale,o=t.vScale,s=i.getLabels(),l=i===o,c=[];let h,d,p,m;for(h=n,d=n+r;h=n?1:-1)}function zW(t){let e,n,r,i,o;return t.horizontal?(e=t.base>t.x,n="left",r="right"):(e=t.basec.controller.options.grouped),o=r.options.stacked,s=[],l=c=>{const h=c.controller.getParsed(n),d=h&&h[c.vScale.axis];if(_e(d)||isNaN(d))return!0};for(const c of i)if(!(n!==void 0&&l(c))&&((o===!1||s.indexOf(c.stack)===-1||o===void 0&&c.stack===void 0)&&s.push(c.stack),c.index===e))break;return s.length||s.push(void 0),s}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,n,r){const i=this._getStacks(e,r),o=n!==void 0?i.indexOf(n):-1;return o===-1?i.length-1:o}_getRuler(){const e=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,e[r].size(this.resolveDataElementOptions(r))/2);return n>0&&n}getLabelAndValue(e){const n=this._cachedMeta,r=this.chart.data.labels||[],{xScale:i,yScale:o}=n,s=this.getParsed(e),l=i.getLabelForValue(s.x),c=o.getLabelForValue(s.y),h=s._custom;return{label:r[e]||"",value:"("+l+", "+c+(h?", "+h:"")+")"}}update(e){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,e)}updateElements(e,n,r,i){const o=i==="reset",{iScale:s,vScale:l}=this._cachedMeta,{sharedOptions:c,includeOptions:h}=this._getSharedOptions(n,i),d=s.axis,p=l.axis;for(let m=n;m_m(E,l,c,!0)?1:Math.max(O,O*n,k,k*n),y=(E,O,k)=>_m(E,l,c,!0)?-1:Math.min(O,O*n,k,k*n),_=v(0,h,p),T=v(wn,d,m),x=y(an,h,p),w=y(an+wn,d,m);r=(_-x)/2,i=(T-w)/2,o=-(_+x)/2,s=-(T+w)/2}return{ratioX:r,ratioY:i,offsetX:o,offsetY:s}}class zc extends Uo{constructor(e,n){super(e,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,n){const r=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=r;else{let o=c=>+r[c];if(he(r[e])){const{key:c="value"}=this._parsing;o=h=>+xl(r[h],c)}let s,l;for(s=e,l=e+n;s0&&!isNaN(e)?Je*(Math.abs(e)/n):0}getLabelAndValue(e){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],o=Og(n._parsed[e],r.options.locale);return{label:i[e]||"",value:o}}getMaxBorderWidth(e){let n=0;const r=this.chart;let i,o,s,l,c;if(!e){for(i=0,o=r.data.datasets.length;ie!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")}),St(zc,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:i}}=e.legend.options;return n.labels.map((o,s)=>{const c=e.getDatasetMeta(0).controller.getStyle(s);return{text:o,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:i,lineWidth:c.borderWidth,pointStyle:r,hidden:!e.getDataVisibility(s),index:s}})}return[]}},onClick(e,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}}});class By extends Uo{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const n=this._cachedMeta,{dataset:r,data:i=[],_dataset:o}=n,s=this.chart._animationsDisabled;let{start:l,count:c}=c5(n,i,s);this._drawStart=l,this._drawCount=c,u5(n)&&(l=0,c=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!o._decimated,r.points=i;const h=this.resolveDatasetElementOptions(e);this.options.showLine||(h.borderWidth=0),h.segment=this.options.segment,this.updateElement(r,void 0,{animated:!s,options:h},e),this.updateElements(i,l,c,e)}updateElements(e,n,r,i){const o=i==="reset",{iScale:s,vScale:l,_stacked:c,_dataset:h}=this._cachedMeta,{sharedOptions:d,includeOptions:p}=this._getSharedOptions(n,i),m=s.axis,v=l.axis,{spanGaps:y,segment:_}=this.options,T=Wh(y)?y:Number.POSITIVE_INFINITY,x=this.chart._animationsDisabled||o||i==="none",w=n+r,E=e.length;let O=n>0&&this.getParsed(n-1);for(let k=0;k=w){A.skip=!0;continue}const j=this.getParsed(k),B=_e(j[v]),N=A[m]=s.getPixelForValue(j[m],k),V=A[v]=o||B?l.getBasePixel():l.getPixelForValue(c?this.applyStack(l,j,c):j[v],k);A.skip=isNaN(N)||isNaN(V)||B,A.stop=k>0&&Math.abs(j[m]-O[m])>T,_&&(A.parsed=j,A.raw=h.data[k]),p&&(A.options=d||this.resolveDataElementOptions(k,P.active?"active":i)),x||this.updateElement(P,k,A,i),O=j}}getMaxOverflow(){const e=this._cachedMeta,n=e.dataset,r=n.options&&n.options.borderWidth||0,i=e.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 e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}St(By,"id","line"),St(By,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),St(By,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Bp extends Uo{constructor(e,n){super(e,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],o=Og(n._parsed[e].r,r.options.locale);return{label:i[e]||"",value:o}}parseObjectData(e,n,r,i){return y5.bind(this)(e,n,r,i)}update(e){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,e)}getMinMax(){const e=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((r,i)=>{const o=this.getParsed(i).r;!isNaN(o)&&this.chart.getDataVisibility(i)&&(on.max&&(n.max=o))}),n}_updateRadius(){const e=this.chart,n=e.chartArea,r=e.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),l=(o-s)/e.getVisibleDatasetCount();this.outerRadius=o-l*this.index,this.innerRadius=this.outerRadius-l}updateElements(e,n,r,i){const o=i==="reset",s=this.chart,c=s.options.animation,h=this._cachedMeta.rScale,d=h.xCenter,p=h.yCenter,m=h.getIndexAngle(0)-.5*an;let v=m,y;const _=360/this.countVisibleElements();for(y=0;y{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&n++}),n}_computeAngle(e,n,r){return this.chart.getDataVisibility(e)?Bo(this.resolveDataElementOptions(e,n).angle||r):0}}St(Bp,"id","polarArea"),St(Bp,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),St(Bp,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:i}}=e.legend.options;return n.labels.map((o,s)=>{const c=e.getDatasetMeta(0).controller.getStyle(s);return{text:o,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:i,lineWidth:c.borderWidth,pointStyle:r,hidden:!e.getDataVisibility(s),index:s}})}return[]}},onClick(e,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 rS extends zc{}St(rS,"id","pie"),St(rS,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class $y extends Uo{getLabelAndValue(e){const n=this._cachedMeta.vScale,r=this.getParsed(e);return{label:n.getLabels()[e],value:""+n.getLabelForValue(r[n.axis])}}parseObjectData(e,n,r,i){return y5.bind(this)(e,n,r,i)}update(e){const n=this._cachedMeta,r=n.dataset,i=n.data||[],o=n.iScale.getLabels();if(r.points=i,e!=="resize"){const s=this.resolveDatasetElementOptions(e);this.options.showLine||(s.borderWidth=0);const l={_loop:!0,_fullLoop:o.length===i.length,options:s};this.updateElement(r,void 0,l,e)}this.updateElements(i,0,i.length,e)}updateElements(e,n,r,i){const o=this._cachedMeta.rScale,s=i==="reset";for(let l=n;l0&&this.getParsed(n-1);for(let O=n;O0&&Math.abs(P[v]-E[v])>x,T&&(A.parsed=P,A.raw=h.data[O]),m&&(A.options=p||this.resolveDataElementOptions(O,k.active?"active":i)),w||this.updateElement(k,O,A,i),E=P}this.updateSharedOptions(p,i,d)}getMaxOverflow(){const e=this._cachedMeta,n=e.data||[];if(!this.options.showLine){let l=0;for(let c=n.length-1;c>=0;--c)l=Math.max(l,n[c].size(this.resolveDataElementOptions(c))/2);return l>0&&l}const r=e.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}}St(zy,"id","scatter"),St(zy,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),St(zy,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var YW=Object.freeze({__proto__:null,BarController:Iy,BubbleController:Fy,DoughnutController:zc,LineController:By,PieController:rS,PolarAreaController:Bp,RadarController:$y,ScatterController:zy});function xc(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class iC{constructor(e){St(this,"options");this.options=e||{}}static override(e){Object.assign(iC.prototype,e)}init(){}formats(){return xc()}parse(){return xc()}format(){return xc()}add(){return xc()}diff(){return xc()}startOf(){return xc()}endOf(){return xc()}}var ZW={_date:iC};function GW(t,e,n,r){const{controller:i,data:o,_sorted:s}=t,l=i._cachedMeta.iScale;if(l&&e===l.axis&&e!=="r"&&s&&o.length){const c=l._reversePixels?vH:ea;if(r){if(i._sharedOptions){const h=o[0],d=typeof h.getRange=="function"&&h.getRange(e);if(d){const p=c(o,e,n-d),m=c(o,e,n+d);return{lo:p.lo,hi:m.hi}}}}else return c(o,e,n)}return{lo:0,hi:o.length-1}}function Cg(t,e,n,r,i){const o=t.getSortedVisibleDatasetMetas(),s=n[e];for(let l=0,c=o.length;l{c[s](e[n],i)&&(o.push({element:c,datasetIndex:h,index:d}),l=l||c.inRange(e.x,e.y,i))}),r&&!l?[]:o}var QW={evaluateInteractionItems:Cg,modes:{index(t,e,n,r){const i=Lc(e,t),o=n.axis||"x",s=n.includeInvisible||!1,l=n.intersect?sw(t,i,o,r,s):aw(t,i,o,!1,r,s),c=[];return l.length?(t.getSortedVisibleDatasetMetas().forEach(h=>{const d=l[0].index,p=h.data[d];p&&!p.skip&&c.push({element:p,datasetIndex:h.index,index:d})}),c):[]},dataset(t,e,n,r){const i=Lc(e,t),o=n.axis||"xy",s=n.includeInvisible||!1;let l=n.intersect?sw(t,i,o,r,s):aw(t,i,o,!1,r,s);if(l.length>0){const c=l[0].datasetIndex,h=t.getDatasetMeta(c).data;l=[];for(let d=0;dn.pos===e)}function CM(t,e){return t.filter(n=>P5.indexOf(n.pos)===-1&&n.box.axis===e)}function Hf(t,e){return t.sort((n,r)=>{const i=e?r:n,o=e?n:r;return i.weight===o.weight?i.index-o.index:i.weight-o.weight})}function JW(t){const e=[];let n,r,i,o,s,l;for(n=0,r=(t||[]).length;nh.box.fullSize),!0),r=Hf(Vf(e,"left"),!0),i=Hf(Vf(e,"right")),o=Hf(Vf(e,"top"),!0),s=Hf(Vf(e,"bottom")),l=CM(e,"x"),c=CM(e,"y");return{fullSize:n,leftAndTop:r.concat(o),rightAndBottom:i.concat(c).concat(s).concat(l),chartArea:Vf(e,"chartArea"),vertical:r.concat(i).concat(c),horizontal:o.concat(s).concat(l)}}function kM(t,e,n,r){return Math.max(t[n],e[n])+Math.max(t[r],e[r])}function L5(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function rY(t,e,n,r){const{pos:i,box:o}=n,s=t.maxPadding;if(!he(i)){n.size&&(t[i]-=n.size);const p=r[n.stack]||{size:0,count:1};p.size=Math.max(p.size,n.horizontal?o.height:o.width),n.size=p.size/p.count,t[i]+=n.size}o.getPadding&&L5(s,o.getPadding());const l=Math.max(0,e.outerWidth-kM(s,t,"left","right")),c=Math.max(0,e.outerHeight-kM(s,t,"top","bottom")),h=l!==t.w,d=c!==t.h;return t.w=l,t.h=c,n.horizontal?{same:h,other:d}:{same:d,other:h}}function iY(t){const e=t.maxPadding;function n(r){const i=Math.max(e[r]-t[r],0);return t[r]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}function oY(t,e){const n=e.maxPadding;function r(i){const o={left:0,top:0,right:0,bottom:0};return i.forEach(s=>{o[s]=Math.max(e[s],n[s])}),o}return r(t?["left","right"]:["top","bottom"])}function yp(t,e,n,r){const i=[];let o,s,l,c,h,d;for(o=0,s=t.length,h=0;o{typeof _.beforeLayout=="function"&&_.beforeLayout()});const d=c.reduce((_,T)=>T.box.options&&T.box.options.display===!1?_:_+1,0)||1,p=Object.freeze({outerWidth:e,outerHeight:n,padding:i,availableWidth:o,availableHeight:s,vBoxMaxWidth:o/2/d,hBoxMaxHeight:s/2}),m=Object.assign({},i);L5(m,Dr(r));const v=Object.assign({maxPadding:m,w:o,h:s,x:i.left,y:i.top},i),y=eY(c.concat(h),p);yp(l.fullSize,v,p,y),yp(c,v,p,y),yp(h,v,p,y)&&yp(c,v,p,y),iY(v),PM(l.leftAndTop,v,p,y),v.x+=v.w,v.y+=v.h,PM(l.rightAndBottom,v,p,y),t.chartArea={left:v.left,top:v.top,right:v.left+v.w,bottom:v.top+v.h,height:v.h,width:v.w},Me(l.chartArea,_=>{const T=_.box;Object.assign(T,t.chartArea),T.update(v.w,v.h,{left:0,top:0,right:0,bottom:0})})}};class M5{acquireContext(e,n){}releaseContext(e){return!1}addEventListener(e,n,r){}removeEventListener(e,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(e,n,r,i){return n=Math.max(0,n||e.width),r=r||e.height,{width:n,height:Math.max(0,i?Math.floor(n/i):r)}}isAttached(e){return!0}updateConfig(e){}}class sY extends M5{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const Uy="$chartjs",aY={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},LM=t=>t===null||t==="";function lY(t,e){const n=t.style,r=t.getAttribute("height"),i=t.getAttribute("width");if(t[Uy]={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",LM(i)){const o=dM(t,"width");o!==void 0&&(t.width=o)}if(LM(r))if(t.style.height==="")t.height=t.width/(e||2);else{const o=dM(t,"height");o!==void 0&&(t.height=o)}return t}const A5=uW?{passive:!0}:!1;function cY(t,e,n){t.addEventListener(e,n,A5)}function uY(t,e,n){t.canvas.removeEventListener(e,n,A5)}function hY(t,e){const n=aY[t.type]||t.type,{x:r,y:i}=Lc(t,e);return{type:n,chart:e,native:t,x:r!==void 0?r:null,y:i!==void 0?i:null}}function C_(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function dY(t,e,n){const r=t.canvas,i=new MutationObserver(o=>{let s=!1;for(const l of o)s=s||C_(l.addedNodes,r),s=s&&!C_(l.removedNodes,r);s&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function fY(t,e,n){const r=t.canvas,i=new MutationObserver(o=>{let s=!1;for(const l of o)s=s||C_(l.removedNodes,r),s=s&&!C_(l.addedNodes,r);s&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const xm=new Map;let MM=0;function R5(){const t=window.devicePixelRatio;t!==MM&&(MM=t,xm.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function pY(t,e){xm.size||window.addEventListener("resize",R5),xm.set(t,e)}function mY(t){xm.delete(t),xm.size||window.removeEventListener("resize",R5)}function gY(t,e,n){const r=t.canvas,i=r&&rC(r);if(!i)return;const o=l5((l,c)=>{const h=i.clientWidth;n(l,c),h{const c=l[0],h=c.contentRect.width,d=c.contentRect.height;h===0&&d===0||o(h,d)});return s.observe(i),pY(t,o),s}function lw(t,e,n){n&&n.disconnect(),e==="resize"&&mY(t)}function vY(t,e,n){const r=t.canvas,i=l5(o=>{t.ctx!==null&&n(hY(o,t))},t);return cY(r,e,i),i}class yY extends M5{acquireContext(e,n){const r=e&&e.getContext&&e.getContext("2d");return r&&r.canvas===e?(lY(e,n),r):null}releaseContext(e){const n=e.canvas;if(!n[Uy])return!1;const r=n[Uy].initial;["height","width"].forEach(o=>{const s=r[o];_e(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[Uy],!0}addEventListener(e,n,r){this.removeEventListener(e,n);const i=e.$proxies||(e.$proxies={}),s={attach:dY,detach:fY,resize:gY}[n]||vY;i[n]=s(e,n,r)}removeEventListener(e,n){const r=e.$proxies||(e.$proxies={}),i=r[n];if(!i)return;({attach:lw,detach:lw,resize:lw}[n]||uY)(e,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,r,i){return cW(e,n,r,i)}isAttached(e){const n=rC(e);return!!(n&&n.isConnected)}}function _Y(t){return!b5()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?sY:yY}var jy;let wa=(jy=class{constructor(){St(this,"x");St(this,"y");St(this,"active",!1);St(this,"options");St(this,"$animations")}tooltipPosition(e){const{x:n,y:r}=this.getProps(["x","y"],e);return{x:n,y:r}}hasValue(){return Wh(this.x)&&Wh(this.y)}getProps(e,n){const r=this.$animations;if(!n||!r)return this;const i={};return e.forEach(o=>{i[o]=r[o]&&r[o].active()?r[o]._to:this[o]}),i}},St(jy,"defaults",{}),St(jy,"defaultRoutes"),jy);function bY(t,e){const n=t.options.ticks,r=xY(t),i=Math.min(n.maxTicksLimit||r,r),o=n.major.enabled?SY(e):[],s=o.length,l=o[0],c=o[s-1],h=[];if(s>i)return TY(e,h,o,s/i),h;const d=wY(o,e,i);if(s>0){let p,m;const v=s>1?Math.round((c-l)/(s-1)):null;for(xv(e,h,d,_e(v)?0:l-v,l),p=0,m=s-1;pi)return c}return Math.max(i,1)}function SY(t){const e=[];let n,r;for(n=0,r=t.length;nt==="left"?"right":t==="right"?"left":t,AM=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,RM=(t,e)=>Math.min(e||t,t);function jM(t,e){const n=[],r=t.length/e,i=t.length;let o=0;for(;os+l)))return c}function kY(t,e){Me(t,n=>{const r=n.gc,i=r.length/2;let o;if(i>e){for(o=0;or?r:n,r=i&&n>r?n:r,{min:Ci(n,Ci(r,n)),max:Ci(r,Ci(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 e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){ze(this.options.beforeUpdate,[this])}update(e,n,r){const{beginAtZero:i,grace:o,ticks:s}=this.options,l=s.sampleSize;this.beforeUpdate(),this.maxWidth=e,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=zH(this,o,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const c=l=o||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const d=this._getLabelSizes(),p=d.widest.width,m=d.highest.height,v=or(this.chart.width-p,0,this.maxWidth);l=e.offset?this.maxWidth/r:v/(r-1),p+6>l&&(l=v/(r-(e.offset?.5:1)),c=this.maxHeight-Wf(e.grid)-n.padding-NM(e.title,this.chart.options.font),h=Math.sqrt(p*p+m*m),s=qO(Math.min(Math.asin(or((d.highest.height+6)/l,-1,1)),Math.asin(or(c/h,-1,1))-Math.asin(or(m/h,-1,1)))),s=Math.max(i,Math.min(o,s))),this.labelRotation=s}afterCalculateLabelRotation(){ze(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){ze(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:o}}=this,s=this._isVisible(),l=this.isHorizontal();if(s){const c=NM(i,n.options.font);if(l?(e.width=this.maxWidth,e.height=Wf(o)+c):(e.height=this.maxHeight,e.width=Wf(o)+c),r.display&&this.ticks.length){const{first:h,last:d,widest:p,highest:m}=this._getLabelSizes(),v=r.padding*2,y=Bo(this.labelRotation),_=Math.cos(y),T=Math.sin(y);if(l){const x=r.mirror?0:T*p.width+_*m.height;e.height=Math.min(this.maxHeight,e.height+x+v)}else{const x=r.mirror?0:_*p.width+T*m.height;e.width=Math.min(this.maxWidth,e.width+x+v)}this._calculatePadding(h,d,T,_)}}this._handleMargins(),l?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,n,r,i){const{ticks:{align:o,padding:s},position:l}=this.options,c=this.labelRotation!==0,h=l!=="top"&&this.axis==="x";if(this.isHorizontal()){const d=this.getPixelForTick(0)-this.left,p=this.right-this.getPixelForTick(this.ticks.length-1);let m=0,v=0;c?h?(m=i*e.width,v=r*n.height):(m=r*e.height,v=i*n.width):o==="start"?v=n.width:o==="end"?m=e.width:o!=="inner"&&(m=e.width/2,v=n.width/2),this.paddingLeft=Math.max((m-d+s)*this.width/(this.width-d),0),this.paddingRight=Math.max((v-p+s)*this.width/(this.width-p),0)}else{let d=n.height/2,p=e.height/2;o==="start"?(d=0,p=e.height):o==="end"&&(d=n.height,p=0),this.paddingTop=d+s,this.paddingBottom=p+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(){ze(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:n}=this.options;return n==="top"||n==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let n,r;for(n=0,r=e.length;n({width:s[B]||0,height:l[B]||0});return{first:j(0),last:j(n-1),widest:j(P),highest:j(A),widths:s,heights:l}}getLabelForValue(e){return e}getPixelForValue(e,n){return NaN}getValueForPixel(e){}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const n=this._startPixel+e*this._length;return gH(this._alignToPixels?bc(this.chart,n,0):n)}getDecimalForPixel(e){const n=(e-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:n}=this;return e<0&&n<0?n:e>0&&n>0?e:0}getContext(e){const n=this.ticks||[];if(e>=0&&el*i?l/r:c/i:c*i0}_computeGridLineItems(e){const n=this.axis,r=this.chart,i=this.options,{grid:o,position:s,border:l}=i,c=o.offset,h=this.isHorizontal(),p=this.ticks.length+(c?1:0),m=Wf(o),v=[],y=l.setContext(this.getContext()),_=y.display?y.width:0,T=_/2,x=function(et){return bc(r,et,_)};let w,E,O,k,P,A,j,B,N,V,Y,nt;if(s==="top")w=x(this.bottom),A=this.bottom-m,B=w-T,V=x(e.top)+T,nt=e.bottom;else if(s==="bottom")w=x(this.top),V=e.top,nt=x(e.bottom)-T,A=w+T,B=this.top+m;else if(s==="left")w=x(this.right),P=this.right-m,j=w-T,N=x(e.left)+T,Y=e.right;else if(s==="right")w=x(this.left),N=e.left,Y=x(e.right)-T,P=w+T,j=this.left+m;else if(n==="x"){if(s==="center")w=x((e.top+e.bottom)/2+.5);else if(he(s)){const et=Object.keys(s)[0],ct=s[et];w=x(this.chart.scales[et].getPixelForValue(ct))}V=e.top,nt=e.bottom,A=w+T,B=A+m}else if(n==="y"){if(s==="center")w=x((e.left+e.right)/2);else if(he(s)){const et=Object.keys(s)[0],ct=s[et];w=x(this.chart.scales[et].getPixelForValue(ct))}P=w-T,j=P-m,N=e.left,Y=e.right}const K=re(i.ticks.maxTicksLimit,p),J=Math.max(1,Math.ceil(p/K));for(E=0;Eo.value===e);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(e){const n=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let o,s;const l=(c,h,d)=>{!d.width||!d.color||(r.save(),r.lineWidth=d.width,r.strokeStyle=d.color,r.setLineDash(d.borderDash||[]),r.lineDashOffset=d.borderDashOffset,r.beginPath(),r.moveTo(c.x,c.y),r.lineTo(h.x,h.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(e){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=[t].concat(r).join("."),s=e[n].split("."),l=s.pop(),c=s.join(".");Sn.route(o,i,c,l)})}function NY(t){return"id"in t&&"defaults"in t}class DY{constructor(){this.controllers=new wv(Uo,"datasets",!0),this.elements=new wv(wa,"elements"),this.plugins=new wv(Object,"plugins"),this.scales=new wv(ku,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,n,r){[...n].forEach(i=>{const o=r||this._getRegistryForType(i);r||o.isForType(i)||o===this.plugins&&i.id?this._exec(e,o,i):Me(i,s=>{const l=r||this._getRegistryForType(s);this._exec(e,l,s)})})}_exec(e,n,r){const i=GO(e);ze(r["before"+i],[],r),n[e](r),ze(r["after"+i],[],r)}_getRegistryForType(e){for(let n=0;no.filter(l=>!s.some(c=>l.plugin.id===c.plugin.id));this._notify(i(n,r),e,"stop"),this._notify(i(r,n),e,"start")}}function FY(t){const e={},n=[],r=Object.keys(Qo.plugins.items);for(let o=0;o1&&DM(t[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function IM(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function WY(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter(r=>r.xAxisID===t||r.yAxisID===t);if(n.length)return IM(t,"x",n[0])||IM(t,"y",n[0])}return{}}function YY(t,e){const n=uu[t.type]||{scales:{}},r=e.scales||{},i=iS(t.type,e),o=Object.create(null);return Object.keys(r).forEach(s=>{const l=r[s];if(!he(l))return console.error(`Invalid scale configuration for scale: ${s}`);if(l._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${s}`);const c=oS(s,l,WY(s,t),Sn.scales[l.type]),h=VY(c,i),d=n.scales||{};o[s]=Np(Object.create(null),[{axis:c},l,d[c],d[h]])}),t.data.datasets.forEach(s=>{const l=s.type||t.type,c=s.indexAxis||iS(l,e),d=(uu[l]||{}).scales||{};Object.keys(d).forEach(p=>{const m=UY(p,c),v=s[m+"AxisID"]||m;o[v]=o[v]||Object.create(null),Np(o[v],[{axis:m},r[v],d[p]])})}),Object.keys(o).forEach(s=>{const l=o[s];Np(l,[Sn.scales[l.type],Sn.scale])}),o}function j5(t){const e=t.options||(t.options={});e.plugins=re(e.plugins,{}),e.scales=YY(t,e)}function N5(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function ZY(t){return t=t||{},t.data=N5(t.data),j5(t),t}const FM=new Map,D5=new Set;function Sv(t,e){let n=FM.get(t);return n||(n=e(),FM.set(t,n),D5.add(n)),n}const Yf=(t,e,n)=>{const r=xl(e,n);r!==void 0&&t.add(r)};class GY{constructor(e){this._config=ZY(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=N5(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),j5(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Sv(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,n){return Sv(`${e}.transition.${n}`,()=>[[`datasets.${e}.transitions.${n}`,`transitions.${n}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,n){return Sv(`${e}-${n}`,()=>[[`datasets.${e}.elements.${n}`,`datasets.${e}`,`elements.${n}`,""]])}pluginScopeKeys(e){const n=e.id,r=this.type;return Sv(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,n){const r=this._scopeCache;let i=r.get(e);return(!i||n)&&(i=new Map,r.set(e,i)),i}getOptionScopes(e,n,r){const{options:i,type:o}=this,s=this._cachedScopes(e,r),l=s.get(n);if(l)return l;const c=new Set;n.forEach(d=>{e&&(c.add(e),d.forEach(p=>Yf(c,e,p))),d.forEach(p=>Yf(c,i,p)),d.forEach(p=>Yf(c,uu[o]||{},p)),d.forEach(p=>Yf(c,Sn,p)),d.forEach(p=>Yf(c,eS,p))});const h=Array.from(c);return h.length===0&&h.push(Object.create(null)),D5.has(n)&&s.set(n,h),h}chartOptionScopes(){const{options:e,type:n}=this;return[e,uu[n]||{},Sn.datasets[n]||{},{type:n},Sn,eS]}resolveNamedOptions(e,n,r,i=[""]){const o={$shared:!0},{resolver:s,subPrefixes:l}=BM(this._resolverCache,e,i);let c=s;if(KY(s,n)){o.$shared=!1,r=wl(r)?r():r;const h=this.createResolver(e,r,l);c=Yh(s,r,h)}for(const h of n)o[h]=c[h];return o}createResolver(e,n,r=[""],i){const{resolver:o}=BM(this._resolverCache,e,r);return he(n)?Yh(o,n,void 0,i):o}}function BM(t,e,n){let r=t.get(e);r||(r=new Map,t.set(e,r));const i=n.join();let o=r.get(i);return o||(o={resolver:tC(e,n),subPrefixes:n.filter(l=>!l.toLowerCase().includes("hover"))},r.set(i,o)),o}const qY=t=>he(t)&&Object.getOwnPropertyNames(t).reduce((e,n)=>e||wl(t[n]),!1);function KY(t,e){const{isScriptable:n,isIndexable:r}=p5(t);for(const i of e){const o=n(i),s=r(i),l=(s||o)&&t[i];if(o&&(wl(l)||qY(l))||s&&Qe(l))return!0}return!1}var XY="4.3.3";const QY=["top","bottom","left","right","chartArea"];function $M(t,e){return t==="top"||t==="bottom"||QY.indexOf(t)===-1&&e==="x"}function zM(t,e){return function(n,r){return n[t]===r[t]?n[e]-r[e]:n[t]-r[t]}}function UM(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),ze(n&&n.onComplete,[t],e)}function JY(t){const e=t.chart,n=e.options.animation;ze(n&&n.onProgress,[t],e)}function I5(t){return b5()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Vy={},VM=t=>{const e=I5(t);return Object.values(Vy).filter(n=>n.canvas===e).pop()};function tZ(t,e,n){const r=Object.keys(t);for(const i of r){const o=+i;if(o>=e){const s=t[i];delete t[i],(n>0||o>e)&&(t[o+n]=s)}}}function eZ(t,e,n,r){return!n||t.type==="mouseout"?null:r?e:t}function nZ(t){const{xScale:e,yScale:n}=t;if(e&&n)return{left:e.left,right:e.right,top:n.top,bottom:n.bottom}}class Ba{static register(...e){Qo.add(...e),HM()}static unregister(...e){Qo.remove(...e),HM()}constructor(e,n){const r=this.config=new GY(n),i=I5(e),o=VM(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||_Y(i)),this.platform.updateConfig(r);const l=this.platform.acquireContext(i,s.aspectRatio),c=l&&l.canvas,h=c&&c.height,d=c&&c.width;if(this.id=iH(),this.ctx=l,this.canvas=c,this.width=d,this.height=h,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 IY,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=bH(p=>this.update(p),s.resizeDelay||0),this._dataChanges=[],Vy[this.id]=this,!l||!c){console.error("Failed to create chart: can't acquire context from the given item");return}Ws.listen(this,"complete",UM),Ws.listen(this,"progress",JY),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:n},width:r,height:i,_aspectRatio:o}=this;return _e(e)?n&&o?o:i?r/i:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return Qo}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():hM(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return lM(this.canvas,this.ctx),this}stop(){return Ws.stop(this),this}resize(e,n){Ws.running(this)?this._resizeBeforeDraw={width:e,height:n}:this._resize(e,n)}_resize(e,n){const r=this.options,i=this.canvas,o=r.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(i,e,n,o),l=r.devicePixelRatio||this.platform.getDevicePixelRatio(),c=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,hM(this,l,!0)&&(this.notifyPlugins("resize",{size:s}),ze(r.onResize,[this,s],this),this.attached&&this._doResize(c)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Me(n,(r,i)=>{r.id=i})}buildOrUpdateScales(){const e=this.options,n=e.scales,r=this.scales,i=Object.keys(r).reduce((s,l)=>(s[l]=!1,s),{});let o=[];n&&(o=o.concat(Object.keys(n).map(s=>{const l=n[s],c=oS(s,l),h=c==="r",d=c==="x";return{options:l,dposition:h?"chartArea":d?"bottom":"left",dtype:h?"radialLinear":d?"category":"linear"}}))),Me(o,s=>{const l=s.options,c=l.id,h=oS(c,l),d=re(l.type,s.dtype);(l.position===void 0||$M(l.position,h)!==$M(s.dposition))&&(l.position=s.dposition),i[c]=!0;let p=null;if(c in r&&r[c].type===d)p=r[c];else{const m=Qo.getScale(d);p=new m({id:c,type:d,ctx:this.ctx,chart:this}),r[p.id]=p}p.init(l,e)}),Me(i,(s,l)=>{s||delete r[l]}),Me(r,s=>{Nr.configure(this,s,s.options),Nr.addBox(this,s)})}_updateMetasets(){const e=this._metasets,n=this.data.datasets.length,r=e.length;if(e.sort((i,o)=>i.index-o.index),r>n){for(let i=n;in.length&&delete this._stacks,e.forEach((r,i)=>{n.filter(o=>o===r._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const e=[],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(e){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:e,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let h=0,d=this.data.datasets.length;h{h.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(zM("z","_idx"));const{_active:l,_lastEvent:c}=this;c?this._eventHandler(c,!0):l.length&&this._updateHoverStyles(l,l,!0),this.render()}_updateScales(){Me(this.scales,e=>{Nr.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(e.events);(!JL(n,r)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:i,count:o}of n){const s=r==="_removeElements"?-o:o;tZ(e,i,s)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=o=>new Set(e.filter(s=>s[0]===o).map((s,l)=>l+","+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(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Nr.update(this,this.width,this.height,e);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],Me(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(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n=0;--n)this._drawDataset(e[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const n=this.ctx,r=e._clip,i=!r.disabled,o=nZ(e)||this.chartArea,s={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(i&&bb(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}),e.controller.draw(),i&&xb(n),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(e){return na(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,r,i){const o=QW.modes[n];return typeof o=="function"?o(this,e,r,i):[]}getDatasetMeta(e){const n=this.data.datasets[e],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:e,_dataset:n,_parsed:[],_sorted:!1},r.push(i)),i}getContext(){return this.$context||(this.$context=Rl(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const n=this.data.datasets[e];if(!n)return!1;const r=this.getDatasetMeta(e);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(e,n){const r=this.getDatasetMeta(e);r.hidden=!n}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,n,r){const i=r?"show":"hide",o=this.getDatasetMeta(e),s=o.controller._resolveAnimations(void 0,i);ym(n)?(o.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(e,r),s.update(o,{visible:r}),this.update(l=>l.datasetIndex===e?i:void 0))}hide(e,n){this._updateVisibility(e,n,!1)}show(e,n){this._updateVisibility(e,n,!0)}_destroyDatasetMeta(e){const n=this._metasets[e];n&&n.controller&&n.controller._destroy(),delete this._metasets[e]}_stop(){let e,n;for(this.stop(),Ws.remove(this),e=0,n=this.data.datasets.length;e{n.addEventListener(this,o,s),e[o]=s},i=(o,s,l)=>{o.offsetX=s,o.offsetY=l,this._eventHandler(o)};Me(this.options.events,o=>r(o,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,n=this.platform,r=(c,h)=>{n.addEventListener(this,c,h),e[c]=h},i=(c,h)=>{e[c]&&(n.removeEventListener(this,c,h),delete e[c])},o=(c,h)=>{this.canvas&&this.resize(c,h)};let s;const l=()=>{i("attach",l),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",l)},n.isAttached(this.canvas)?l():s()}unbindEvents(){Me(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._listeners={},Me(this._responsiveListeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,n,r){const i=r?"set":"remove";let o,s,l,c;for(n==="dataset"&&(o=this.getDatasetMeta(e[0].datasetIndex),o.controller["_"+i+"DatasetHoverStyle"]()),l=0,c=e.length;l{const l=this.getDatasetMeta(o);if(!l)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:l.data[s],index:s}});!w_(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(e,n,r){return this._plugins.notify(this,e,n,r)}isPluginEnabled(e){return this._plugins._cache.filter(n=>n.plugin.id===e).length===1}_updateHoverStyles(e,n,r){const i=this.options.hover,o=(c,h)=>c.filter(d=>!h.some(p=>d.datasetIndex===p.datasetIndex&&d.index===p.index)),s=o(n,e),l=r?e:o(e,n);s.length&&this.updateHoverStyle(s,i.mode,!1),l.length&&i.mode&&this.updateHoverStyle(l,i.mode,!0)}_eventHandler(e,n){const r={event:e,replay:n,cancelable:!0,inChartArea:this.isPointInArea(e)},i=s=>(s.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",r,i)===!1)return;const o=this._handleEvent(e,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,i),(o||r.changed)&&this.render(),this}_handleEvent(e,n,r){const{_active:i=[],options:o}=this,s=n,l=this._getActiveElements(e,i,r,s),c=uH(e),h=eZ(e,this._lastEvent,r,c);r&&(this._lastEvent=null,ze(o.onHover,[e,l,this],this),c&&ze(o.onClick,[e,l,this],this));const d=!w_(l,i);return(d||n)&&(this._active=l,this._updateHoverStyles(l,i,n)),this._lastEvent=h,d}_getActiveElements(e,n,r,i){if(e.type==="mouseout")return[];if(!r)return n;const o=this.options.hover;return this.getElementsAtEventForMode(e,o.mode,o,i)}}St(Ba,"defaults",Sn),St(Ba,"instances",Vy),St(Ba,"overrides",uu),St(Ba,"registry",Qo),St(Ba,"version",XY),St(Ba,"getChart",VM);function HM(){return Me(Ba.instances,t=>t._plugins.invalidate())}function rZ(t,e,n){const{startAngle:r,pixelMargin:i,x:o,y:s,outerRadius:l,innerRadius:c}=e;let h=i/l;t.beginPath(),t.arc(o,s,l,r-h,n+h),c>i?(h=i/c,t.arc(o,s,c,n+h,r-h,!0)):t.arc(o,s,i,n+wn,r-wn),t.closePath(),t.clip()}function iZ(t){return JO(t,["outerStart","outerEnd","innerStart","innerEnd"])}function oZ(t,e,n,r){const i=iZ(t.options.borderRadius),o=(n-e)/2,s=Math.min(o,r*e/2),l=c=>{const h=(n-Math.min(o,c))*r/2;return or(c,0,Math.min(o,h))};return{outerStart:l(i.outerStart),outerEnd:l(i.outerEnd),innerStart:or(i.innerStart,0,s),innerEnd:or(i.innerEnd,0,s)}}function Zu(t,e,n,r){return{x:n+t*Math.cos(e),y:r+t*Math.sin(e)}}function k_(t,e,n,r,i,o){const{x:s,y:l,startAngle:c,pixelMargin:h,innerRadius:d}=e,p=Math.max(e.outerRadius+r+n-h,0),m=d>0?d+r+n+h:0;let v=0;const y=i-c;if(r){const J=d>0?d-r:0,et=p>0?p-r:0,ct=(J+et)/2,G=ct!==0?y*ct/(ct+r):y;v=(y-G)/2}const _=Math.max(.001,y*p-n/an)/p,T=(y-_)/2,x=c+T+v,w=i-T-v,{outerStart:E,outerEnd:O,innerStart:k,innerEnd:P}=oZ(e,m,p,w-x),A=p-E,j=p-O,B=x+E/A,N=w-O/j,V=m+k,Y=m+P,nt=x+k/V,K=w-P/Y;if(t.beginPath(),o){const J=(B+N)/2;if(t.arc(s,l,p,B,J),t.arc(s,l,p,J,N),O>0){const $=Zu(j,N,s,l);t.arc($.x,$.y,O,N,w+wn)}const et=Zu(Y,w,s,l);if(t.lineTo(et.x,et.y),P>0){const $=Zu(Y,K,s,l);t.arc($.x,$.y,P,w+wn,K+Math.PI)}const ct=(w-P/m+(x+k/m))/2;if(t.arc(s,l,m,w-P/m,ct,!0),t.arc(s,l,m,ct,x+k/m,!0),k>0){const $=Zu(V,nt,s,l);t.arc($.x,$.y,k,nt+Math.PI,x-wn)}const G=Zu(A,x,s,l);if(t.lineTo(G.x,G.y),E>0){const $=Zu(A,B,s,l);t.arc($.x,$.y,E,x-wn,B)}}else{t.moveTo(s,l);const J=Math.cos(B)*p+s,et=Math.sin(B)*p+l;t.lineTo(J,et);const ct=Math.cos(N)*p+s,G=Math.sin(N)*p+l;t.lineTo(ct,G)}t.closePath()}function sZ(t,e,n,r,i){const{fullCircles:o,startAngle:s,circumference:l}=e;let c=e.endAngle;if(o){k_(t,e,n,r,c,i);for(let h=0;h=Je||_m(s,c,h),T=ta(l,d+v,p+v);return _&&T}getCenterPoint(n){const{x:r,y:i,startAngle:o,endAngle:s,innerRadius:l,outerRadius:c}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:h,spacing:d}=this.options,p=(o+s)/2,m=(l+c+d+h)/2;return{x:r+Math.cos(p)*m,y:i+Math.sin(p)*m}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:r,circumference:i}=this,o=(r.offset||0)/4,s=(r.spacing||0)/2,l=r.circular;if(this.pixelMargin=r.borderAlign==="inner"?.33:0,this.fullCircles=i>Je?Math.floor(i/Je):0,i===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const c=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(c)*o,Math.sin(c)*o);const h=1-Math.sin(Math.min(an,i||0)),d=o*h;n.fillStyle=r.backgroundColor,n.strokeStyle=r.borderColor,sZ(n,this,d,s,l),aZ(n,this,d,s,l),n.restore()}}St(_p,"id","arc"),St(_p,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),St(_p,"defaultRoutes",{backgroundColor:"backgroundColor"}),St(_p,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function F5(t,e,n=e){t.lineCap=re(n.borderCapStyle,e.borderCapStyle),t.setLineDash(re(n.borderDash,e.borderDash)),t.lineDashOffset=re(n.borderDashOffset,e.borderDashOffset),t.lineJoin=re(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=re(n.borderWidth,e.borderWidth),t.strokeStyle=re(n.borderColor,e.borderColor)}function lZ(t,e,n){t.lineTo(n.x,n.y)}function cZ(t){return t.stepped?AH:t.tension||t.cubicInterpolationMode==="monotone"?RH:lZ}function B5(t,e,n={}){const r=t.length,{start:i=0,end:o=r-1}=n,{start:s,end:l}=e,c=Math.max(i,s),h=Math.min(o,l),d=il&&o>l;return{count:r,start:c,loop:e.loop,ilen:h(s+(h?l-O:O))%o,E=()=>{_!==T&&(t.lineTo(d,T),t.lineTo(d,_),t.lineTo(d,x))};for(c&&(v=i[w(0)],t.moveTo(v.x,v.y)),m=0;m<=l;++m){if(v=i[w(m)],v.skip)continue;const O=v.x,k=v.y,P=O|0;P===y?(k<_?_=k:k>T&&(T=k),d=(p*d+O)/++p):(E(),t.lineTo(O,k),y=P,p=0,_=T=k),x=k}E()}function sS(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!n?hZ:uZ}function dZ(t){return t.stepped?hW:t.tension||t.cubicInterpolationMode==="monotone"?dW:Mc}function fZ(t,e,n,r){let i=e._path;i||(i=e._path=new Path2D,e.path(i,n,r)&&i.closePath()),F5(t,e.options),t.stroke(i)}function pZ(t,e,n,r){const{segments:i,options:o}=e,s=sS(e);for(const l of i)F5(t,o,l.style),t.beginPath(),s(t,e,l,{start:n,end:n+r-1})&&t.closePath(),t.stroke()}const mZ=typeof Path2D=="function";function gZ(t,e,n,r){mZ&&!e.options.segment?fZ(t,e,n,r):pZ(t,e,n,r)}class qa extends wa{constructor(e){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,e&&Object.assign(this,e)}updateControlPoints(e,n){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const i=r.spanGaps?this._loop:this._fullLoop;rW(this._points,r,e,i,n),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=yW(this,this.options.segment))}first(){const e=this.segments,n=this.points;return e.length&&n[e[0].start]}last(){const e=this.segments,n=this.points,r=e.length;return r&&n[e[r-1].end]}interpolate(e,n){const r=this.options,i=e[n],o=this.points,s=E5(this,{property:n,start:i,end:i});if(!s.length)return;const l=[],c=dZ(r);let h,d;for(h=0,d=s.length;he!=="borderDash"&&e!=="fill"});function WM(t,e,n,r){const i=t.options,{[n]:o}=t.getProps([n],r);return Math.abs(e-o)t.replace("rgb(","rgba(").replace(")",", 0.5)"));function z5(t){return aS[t%aS.length]}function U5(t){return YM[t%YM.length]}function SZ(t,e){return t.borderColor=z5(e),t.backgroundColor=U5(e),++e}function TZ(t,e){return t.backgroundColor=t.data.map(()=>z5(e++)),e}function EZ(t,e){return t.backgroundColor=t.data.map(()=>U5(e++)),e}function OZ(t){let e=0;return(n,r)=>{const i=t.getDatasetMeta(r).controller;i instanceof zc?e=TZ(n,e):i instanceof Bp?e=EZ(n,e):i&&(e=SZ(n,e))}}function ZM(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}function CZ(t){return t&&(t.borderColor||t.backgroundColor)}var kZ={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,n){if(!n.enabled)return;const{data:{datasets:r},options:i}=t.config,{elements:o}=i;if(!n.forceOverride&&(ZM(r)||CZ(i)||o&&ZM(o)))return;const s=OZ(t);r.forEach(s)}};function PZ(t,e,n,r,i){const o=i.samples||r;if(o>=n)return t.slice(e,e+n);const s=[],l=(n-2)/(o-2);let c=0;const h=e+n-1;let d=e,p,m,v,y,_;for(s[c++]=t[d],p=0;pv&&(v=y,m=t[w],_=w);s[c++]=m,d=_}return s[c++]=t[h],s}function LZ(t,e,n,r){let i=0,o=0,s,l,c,h,d,p,m,v,y,_;const T=[],x=e+n-1,w=t[e].x,O=t[x].x-w;for(s=e;s_&&(_=h,m=s),i=(o*i+l.x)/++o;else{const P=s-1;if(!_e(p)&&!_e(m)){const A=Math.min(p,m),j=Math.max(p,m);A!==v&&A!==P&&T.push({...t[A],x:i}),j!==v&&j!==P&&T.push({...t[j],x:i})}s>0&&P!==v&&T.push(t[P]),T.push(l),d=k,o=0,y=_=h,p=m=v=s}}return T}function V5(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function GM(t){t.data.datasets.forEach(e=>{V5(e)})}function MZ(t,e){const n=e.length;let r=0,i;const{iScale:o}=t,{min:s,max:l,minDefined:c,maxDefined:h}=o.getUserBounds();return c&&(r=or(ea(e,o.axis,s).lo,0,n-1)),h?i=or(ea(e,o.axis,l).hi+1,r,n)-r:i=n-r,{start:r,count:i}}var AZ={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,n)=>{if(!n.enabled){GM(t);return}const r=t.width;t.data.datasets.forEach((i,o)=>{const{_data:s,indexAxis:l}=i,c=t.getDatasetMeta(o),h=s||i.data;if(vp([l,t.options.indexAxis])==="y"||!c.controller.supportsDecimation)return;const d=t.scales[c.xAxisID];if(d.type!=="linear"&&d.type!=="time"||t.options.parsing)return;let{start:p,count:m}=MZ(c,h);const v=n.threshold||4*r;if(m<=v){V5(i);return}_e(s)&&(i._data=h,delete i.data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(_){this._data=_}}));let y;switch(n.algorithm){case"lttb":y=PZ(h,p,m,r,n);break;case"min-max":y=LZ(h,p,m,r);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}i._decimated=y})},destroy(t){GM(t)}};function RZ(t,e,n){const r=t.segments,i=t.points,o=e.points,s=[];for(const l of r){let{start:c,end:h}=l;h=oC(c,h,i);const d=lS(n,i[c],i[h],l.loop);if(!e.segments){s.push({source:l,target:d,start:i[c],end:i[h]});continue}const p=E5(e,d);for(const m of p){const v=lS(n,o[m.start],o[m.end],m.loop),y=T5(l,i,v);for(const _ of y)s.push({source:_,target:m,start:{[n]:qM(d,v,"start",Math.max)},end:{[n]:qM(d,v,"end",Math.min)}})}}return s}function lS(t,e,n,r){if(r)return;let i=e[t],o=n[t];return t==="angle"&&(i=Li(i),o=Li(o)),{property:t,start:i,end:o}}function jZ(t,e){const{x:n=null,y:r=null}=t||{},i=e.points,o=[];return e.segments.forEach(({start:s,end:l})=>{l=oC(s,l,i);const c=i[s],h=i[l];r!==null?(o.push({x:c.x,y:r}),o.push({x:h.x,y:r})):n!==null&&(o.push({x:n,y:c.y}),o.push({x:n,y:h.y}))}),o}function oC(t,e,n){for(;e>t;e--){const r=n[e];if(!isNaN(r.x)&&!isNaN(r.y))break}return e}function qM(t,e,n,r){return t&&e?r(t[n],e[n]):t?t[n]:e?e[n]:0}function H5(t,e){let n=[],r=!1;return Qe(t)?(r=!0,n=t):n=jZ(t,e),n.length?new qa({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function KM(t){return t&&t.fill!==!1}function NZ(t,e,n){let i=t[e].fill;const o=[e];let s;if(!n)return i;for(;i!==!1&&o.indexOf(i)===-1;){if(!xn(i))return i;if(s=t[i],!s)return!1;if(s.visible)return i;o.push(i),i=s.fill}return!1}function DZ(t,e,n){const r=$Z(t);if(he(r))return isNaN(r.value)?!1:r;let i=parseFloat(r);return xn(i)&&Math.floor(i)===i?IZ(r[0],e,i,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function IZ(t,e,n,r){return(t==="-"||t==="+")&&(n=e+n),n===e||n<0||n>=r?!1:n}function FZ(t,e){let n=null;return t==="start"?n=e.bottom:t==="end"?n=e.top:he(t)?n=e.getPixelForValue(t.value):e.getBasePixel&&(n=e.getBasePixel()),n}function BZ(t,e,n){let r;return t==="start"?r=n:t==="end"?r=e.options.reverse?e.min:e.max:he(t)?r=t.value:r=e.getBaseValue(),r}function $Z(t){const e=t.options,n=e.fill;let r=re(n&&n.target,n);return r===void 0&&(r=!!e.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function zZ(t){const{scale:e,index:n,line:r}=t,i=[],o=r.segments,s=r.points,l=UZ(e,n);l.push(H5({x:null,y:e.bottom},r));for(let c=0;c=0;--s){const l=i[s].$filler;l&&(l.line.updateControlPoints(o,l.axis),r&&l.fill&&hw(t.ctx,l,o))}},beforeDatasetsDraw(t,e,n){if(n.drawTime!=="beforeDatasetsDraw")return;const r=t.getSortedVisibleDatasetMetas();for(let i=r.length-1;i>=0;--i){const o=r[i].$filler;KM(o)&&hw(t.ctx,o,t.chartArea)}},beforeDatasetDraw(t,e,n){const r=e.meta.$filler;!KM(r)||n.drawTime!=="beforeDatasetDraw"||hw(t.ctx,r,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const tA=(t,e)=>{let{boxHeight:n=e,boxWidth:r=e}=t;return t.usePointStyle&&(n=Math.min(n,e),r=t.pointStyleWidth||Math.min(r,e)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(e,n)}},JZ=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class eA extends wa{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.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(e,n,r){this.maxWidth=e,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 e=this.options.labels||{};let n=ze(e.generateLabels,[this.chart],this)||[];e.filter&&(n=n.filter(r=>e.filter(r,this.chart.data))),e.sort&&(n=n.sort((r,i)=>e.sort(r,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:e,ctx:n}=this;if(!e.display){this.width=this.height=0;return}const r=e.labels,i=Kn(r.font),o=i.size,s=this._computeTitleHeight(),{boxWidth:l,itemHeight:c}=tA(r,o);let h,d;n.font=i.string,this.isHorizontal()?(h=this.maxWidth,d=this._fitRows(s,o,l,c)+10):(d=this.maxHeight,h=this._fitCols(s,i,l,c)+10),this.width=Math.min(h,e.maxWidth||this.maxWidth),this.height=Math.min(d,e.maxHeight||this.maxHeight)}_fitRows(e,n,r,i){const{ctx:o,maxWidth:s,options:{labels:{padding:l}}}=this,c=this.legendHitBoxes=[],h=this.lineWidths=[0],d=i+l;let p=e;o.textAlign="left",o.textBaseline="middle";let m=-1,v=-d;return this.legendItems.forEach((y,_)=>{const T=r+n/2+o.measureText(y.text).width;(_===0||h[h.length-1]+T+2*l>s)&&(p+=d,h[h.length-(_>0?0:1)]=0,v+=d,m++),c[_]={left:0,top:v,row:m,width:T,height:i},h[h.length-1]+=T+l}),p}_fitCols(e,n,r,i){const{ctx:o,maxHeight:s,options:{labels:{padding:l}}}=this,c=this.legendHitBoxes=[],h=this.columnSizes=[],d=s-e;let p=l,m=0,v=0,y=0,_=0;return this.legendItems.forEach((T,x)=>{const{itemWidth:w,itemHeight:E}=tG(r,n,o,T,i);x>0&&v+E+2*l>d&&(p+=m+l,h.push({width:m,height:v}),y+=m+l,_++,m=v=0),c[x]={left:y,top:v,col:_,width:w,height:E},m=Math.max(m,w),v+=E+l}),p+=m,h.push({width:m,height:v}),p}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:i},rtl:o}}=this,s=Ah(o,this.left,this.width);if(this.isHorizontal()){let l=0,c=Mr(r,this.left+i,this.right-this.lineWidths[l]);for(const h of n)l!==h.row&&(l=h.row,c=Mr(r,this.left+i,this.right-this.lineWidths[l])),h.top+=this.top+e+i,h.left=s.leftForLtr(s.x(c),h.width),c+=h.width+i}else{let l=0,c=Mr(r,this.top+e+i,this.bottom-this.columnSizes[l].height);for(const h of n)h.col!==l&&(l=h.col,c=Mr(r,this.top+e+i,this.bottom-this.columnSizes[l].height)),h.top=c,h.left+=this.left+i,h.left=s.leftForLtr(s.x(h.left),h.width),c+=h.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;bb(e,this),this._draw(),xb(e)}}_draw(){const{options:e,columnSizes:n,lineWidths:r,ctx:i}=this,{align:o,labels:s}=e,l=Sn.color,c=Ah(e.rtl,this.left,this.width),h=Kn(s.font),{padding:d}=s,p=h.size,m=p/2;let v;this.drawTitle(),i.textAlign=c.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=h.string;const{boxWidth:y,boxHeight:_,itemHeight:T}=tA(s,p),x=function(P,A,j){if(isNaN(y)||y<=0||isNaN(_)||_<0)return;i.save();const B=re(j.lineWidth,1);if(i.fillStyle=re(j.fillStyle,l),i.lineCap=re(j.lineCap,"butt"),i.lineDashOffset=re(j.lineDashOffset,0),i.lineJoin=re(j.lineJoin,"miter"),i.lineWidth=B,i.strokeStyle=re(j.strokeStyle,l),i.setLineDash(re(j.lineDash,[])),s.usePointStyle){const N={radius:_*Math.SQRT2/2,pointStyle:j.pointStyle,rotation:j.rotation,borderWidth:B},V=c.xPlus(P,y/2),Y=A+m;d5(i,N,V,Y,s.pointStyleWidth&&y)}else{const N=A+Math.max((p-_)/2,0),V=c.leftForLtr(P,y),Y=qc(j.borderRadius);i.beginPath(),Object.values(Y).some(nt=>nt!==0)?bm(i,{x:V,y:N,w:y,h:_,radius:Y}):i.rect(V,N,y,_),i.fill(),B!==0&&i.stroke()}i.restore()},w=function(P,A,j){hu(i,j.text,P,A+T/2,h,{strikethrough:j.hidden,textAlign:c.textAlign(j.textAlign)})},E=this.isHorizontal(),O=this._computeTitleHeight();E?v={x:Mr(o,this.left+d,this.right-r[0]),y:this.top+d+O,line:0}:v={x:this.left+d,y:Mr(o,this.top+O+d,this.bottom-n[0].height),line:0},x5(this.ctx,e.textDirection);const k=T+d;this.legendItems.forEach((P,A)=>{i.strokeStyle=P.fontColor,i.fillStyle=P.fontColor;const j=i.measureText(P.text).width,B=c.textAlign(P.textAlign||(P.textAlign=s.textAlign)),N=y+m+j;let V=v.x,Y=v.y;c.setWidth(this.width),E?A>0&&V+N+d>this.right&&(Y=v.y+=k,v.line++,V=v.x=Mr(o,this.left+d,this.right-r[v.line])):A>0&&Y+k>this.bottom&&(V=v.x=V+n[v.line].width+d,v.line++,Y=v.y=Mr(o,this.top+O+d,this.bottom-n[v.line].height));const nt=c.x(V);if(x(nt,Y,P),V=xH(B,V+y+m,E?V+N:this.right,e.rtl),w(c.x(V),Y,P),E)v.x+=N+d;else if(typeof P.text!="string"){const K=h.lineHeight;v.y+=Y5(P,K)+d}else v.y+=k}),w5(this.ctx,e.textDirection)}drawTitle(){const e=this.options,n=e.title,r=Kn(n.font),i=Dr(n.padding);if(!n.display)return;const o=Ah(e.rtl,this.left,this.width),s=this.ctx,l=n.position,c=r.size/2,h=i.top+c;let d,p=this.left,m=this.width;if(this.isHorizontal())m=Math.max(...this.lineWidths),d=this.top+h,p=Mr(e.align,p,this.right-m);else{const y=this.columnSizes.reduce((_,T)=>Math.max(_,T.height),0);d=h+Mr(e.align,this.top,this.bottom-y-e.labels.padding-this._computeTitleHeight())}const v=Mr(l,p,p+m);s.textAlign=o.textAlign(XO(l)),s.textBaseline="middle",s.strokeStyle=n.color,s.fillStyle=n.color,s.font=r.string,hu(s,n.text,v,d,r)}_computeTitleHeight(){const e=this.options.title,n=Kn(e.font),r=Dr(e.padding);return e.display?n.lineHeight+r.height:0}_getLegendItemAt(e,n){let r,i,o;if(ta(e,this.left,this.right)&&ta(n,this.top,this.bottom)){for(o=this.legendHitBoxes,r=0;ro.length>s.length?o:s)),e+n.size/2+r.measureText(i).width}function nG(t,e,n){let r=t;return typeof e.text!="string"&&(r=Y5(e,n)),r}function Y5(t,e){const n=t.text?t.text.length:0;return e*n}function rG(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var iG={id:"legend",_element:eA,start(t,e,n){const r=t.legend=new eA({ctx:t.ctx,options:n,chart:t});Nr.configure(t,r,n),Nr.addBox(t,r)},stop(t){Nr.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const r=t.legend;Nr.configure(t,r,n),r.options=n},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,n){const r=e.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),e.hidden=!0):(i.show(r),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:i,color:o,useBorderRadius:s,borderRadius:l}}=t.legend.options;return t._getSortedDatasetMetas().map(c=>{const h=c.controller.getStyle(n?0:void 0),d=Dr(h.borderWidth);return{text:e[c.index].label,fillStyle:h.backgroundColor,fontColor:o,hidden:!c.visible,lineCap:h.borderCapStyle,lineDash:h.borderDash,lineDashOffset:h.borderDashOffset,lineJoin:h.borderJoinStyle,lineWidth:(d.width+d.height)/4,strokeStyle:h.borderColor,pointStyle:r||h.pointStyle,rotation:h.rotation,textAlign:i||h.textAlign,borderRadius:s&&(l||h.borderRadius),datasetIndex:c.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class sC extends wa{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.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(e,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=e,this.height=this.bottom=n;const i=Qe(r.text)?r.text.length:1;this._padding=Dr(r.padding);const o=i*Kn(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){const{top:n,left:r,bottom:i,right:o,options:s}=this,l=s.align;let c=0,h,d,p;return this.isHorizontal()?(d=Mr(l,r,o),p=n+e,h=o-r):(s.position==="left"?(d=r+e,p=Mr(l,i,n),c=an*-.5):(d=o-e,p=Mr(l,n,i),c=an*.5),h=i-n),{titleX:d,titleY:p,maxWidth:h,rotation:c}}draw(){const e=this.ctx,n=this.options;if(!n.display)return;const r=Kn(n.font),o=r.lineHeight/2+this._padding.top,{titleX:s,titleY:l,maxWidth:c,rotation:h}=this._drawArgs(o);hu(e,n.text,0,0,r,{color:n.color,maxWidth:c,rotation:h,textAlign:XO(n.align),textBaseline:"middle",translation:[s,l]})}}function oG(t,e){const n=new sC({ctx:t.ctx,options:e,chart:t});Nr.configure(t,n,e),Nr.addBox(t,n),t.titleBlock=n}var sG={id:"title",_element:sC,start(t,e,n){oG(t,n)},stop(t){const e=t.titleBlock;Nr.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const r=t.titleBlock;Nr.configure(t,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 Tv=new WeakMap;var aG={id:"subtitle",start(t,e,n){const r=new sC({ctx:t.ctx,options:n,chart:t});Nr.configure(t,r,n),Nr.addBox(t,r),Tv.set(t,r)},stop(t){Nr.removeBox(t,Tv.get(t)),Tv.delete(t)},beforeUpdate(t,e,n){const r=Tv.get(t);Nr.configure(t,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 bp={average(t){if(!t.length)return!1;let e,n,r=0,i=0,o=0;for(e=0,n=t.length;e-1?t.split(` -`):t}function lG(t,e){const{element:n,datasetIndex:r,index:i}=e,o=t.getDatasetMeta(r).controller,{label:s,value:l}=o.getLabelAndValue(i);return{chart:t,label:s,parsed:o.getParsed(i),raw:t.data.datasets[r].data[i],formattedValue:l,dataset:o.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function nA(t,e){const n=t.chart.ctx,{body:r,footer:i,title:o}=t,{boxWidth:s,boxHeight:l}=e,c=Kn(e.bodyFont),h=Kn(e.titleFont),d=Kn(e.footerFont),p=o.length,m=i.length,v=r.length,y=Dr(e.padding);let _=y.height,T=0,x=r.reduce((O,k)=>O+k.before.length+k.lines.length+k.after.length,0);if(x+=t.beforeBody.length+t.afterBody.length,p&&(_+=p*h.lineHeight+(p-1)*e.titleSpacing+e.titleMarginBottom),x){const O=e.displayColors?Math.max(l,c.lineHeight):c.lineHeight;_+=v*O+(x-v)*c.lineHeight+(x-1)*e.bodySpacing}m&&(_+=e.footerMarginTop+m*d.lineHeight+(m-1)*e.footerSpacing);let w=0;const E=function(O){T=Math.max(T,n.measureText(O).width+w)};return n.save(),n.font=h.string,Me(t.title,E),n.font=c.string,Me(t.beforeBody.concat(t.afterBody),E),w=e.displayColors?s+2+e.boxPadding:0,Me(r,O=>{Me(O.before,E),Me(O.lines,E),Me(O.after,E)}),w=0,n.font=d.string,Me(t.footer,E),n.restore(),T+=y.width,{width:T,height:_}}function cG(t,e){const{y:n,height:r}=e;return nt.height-r/2?"bottom":"center"}function uG(t,e,n,r){const{x:i,width:o}=r,s=n.caretSize+n.caretPadding;if(t==="left"&&i+o+s>e.width||t==="right"&&i-o-s<0)return!0}function hG(t,e,n,r){const{x:i,width:o}=n,{width:s,chartArea:{left:l,right:c}}=t;let h="center";return r==="center"?h=i<=(l+c)/2?"left":"right":i<=o/2?h="left":i>=s-o/2&&(h="right"),uG(h,t,e,n)&&(h="center"),h}function rA(t,e,n){const r=n.yAlign||e.yAlign||cG(t,n);return{xAlign:n.xAlign||e.xAlign||hG(t,e,n,r),yAlign:r}}function dG(t,e){let{x:n,width:r}=t;return e==="right"?n-=r:e==="center"&&(n-=r/2),n}function fG(t,e,n){let{y:r,height:i}=t;return e==="top"?r+=n:e==="bottom"?r-=i+n:r-=i/2,r}function iA(t,e,n,r){const{caretSize:i,caretPadding:o,cornerRadius:s}=t,{xAlign:l,yAlign:c}=n,h=i+o,{topLeft:d,topRight:p,bottomLeft:m,bottomRight:v}=qc(s);let y=dG(e,l);const _=fG(e,c,h);return c==="center"?l==="left"?y+=h:l==="right"&&(y-=h):l==="left"?y-=Math.max(d,m)+i:l==="right"&&(y+=Math.max(p,v)+i),{x:or(y,0,r.width-e.width),y:or(_,0,r.height-e.height)}}function Ev(t,e,n){const r=Dr(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-r.right:t.x+r.left}function oA(t){return Xo([],Ys(t))}function pG(t,e,n){return Rl(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function sA(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const Z5={beforeTitle:Hs,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(r>0&&e.dataIndex"u"?Z5[e].call(n,r):i}var Q2;let aA=(Q2=class extends wa{constructor(e){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=e.chart,this.options=e.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(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,r=this.options.setContext(this.getContext()),i=r.enabled&&n.options.animation&&r.animations,o=new O5(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=pG(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:r}=n,i=ti(r,"beforeTitle",this,e),o=ti(r,"title",this,e),s=ti(r,"afterTitle",this,e);let l=[];return l=Xo(l,Ys(i)),l=Xo(l,Ys(o)),l=Xo(l,Ys(s)),l}getBeforeBody(e,n){return oA(ti(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:r}=n,i=[];return Me(e,o=>{const s={before:[],lines:[],after:[]},l=sA(r,o);Xo(s.before,Ys(ti(l,"beforeLabel",this,o))),Xo(s.lines,ti(l,"label",this,o)),Xo(s.after,Ys(ti(l,"afterLabel",this,o))),i.push(s)}),i}getAfterBody(e,n){return oA(ti(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:r}=n,i=ti(r,"beforeFooter",this,e),o=ti(r,"footer",this,e),s=ti(r,"afterFooter",this,e);let l=[];return l=Xo(l,Ys(i)),l=Xo(l,Ys(o)),l=Xo(l,Ys(s)),l}_createItems(e){const n=this._active,r=this.chart.data,i=[],o=[],s=[];let l=[],c,h;for(c=0,h=n.length;ce.filter(d,p,m,r))),e.itemSort&&(l=l.sort((d,p)=>e.itemSort(d,p,r))),Me(l,d=>{const p=sA(e.callbacks,d);i.push(ti(p,"labelColor",this,d)),o.push(ti(p,"labelPointStyle",this,d)),s.push(ti(p,"labelTextColor",this,d))}),this.labelColors=i,this.labelPointStyles=o,this.labelTextColors=s,this.dataPoints=l,l}update(e,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 l=bp[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 c=this._size=nA(this,r),h=Object.assign({},l,c),d=rA(this.chart,r,h),p=iA(r,h,d,this.chart);this.xAlign=d.xAlign,this.yAlign=d.yAlign,o={opacity:1,x:p.x,y:p.y,width:c.width,height:c.height,caretX:l.x,caretY:l.y}}this._tooltipItems=s,this.$context=void 0,o&&this._resolveAnimations().update(this,o),e&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,r,i){const o=this.getCaretPosition(e,r,i);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)}getCaretPosition(e,n,r){const{xAlign:i,yAlign:o}=this,{caretSize:s,cornerRadius:l}=r,{topLeft:c,topRight:h,bottomLeft:d,bottomRight:p}=qc(l),{x:m,y:v}=e,{width:y,height:_}=n;let T,x,w,E,O,k;return o==="center"?(O=v+_/2,i==="left"?(T=m,x=T-s,E=O+s,k=O-s):(T=m+y,x=T+s,E=O-s,k=O+s),w=T):(i==="left"?x=m+Math.max(c,d)+s:i==="right"?x=m+y-Math.max(h,p)-s:x=this.caretX,o==="top"?(E=v,O=E-s,T=x-s,w=x+s):(E=v+_,O=E+s,T=x+s,w=x-s),k=E),{x1:T,x2:x,x3:w,y1:E,y2:O,y3:k}}drawTitle(e,n,r){const i=this.title,o=i.length;let s,l,c;if(o){const h=Ah(r.rtl,this.x,this.width);for(e.x=Ev(this,r.titleAlign,r),n.textAlign=h.textAlign(r.titleAlign),n.textBaseline="middle",s=Kn(r.titleFont),l=r.titleSpacing,n.fillStyle=r.titleColor,n.font=s.string,c=0;cw!==0)?(e.beginPath(),e.fillStyle=o.multiKeyBackground,bm(e,{x:_,y,w:h,h:c,radius:x}),e.fill(),e.stroke(),e.fillStyle=s.backgroundColor,e.beginPath(),bm(e,{x:T,y:y+1,w:h-2,h:c-2,radius:x}),e.fill()):(e.fillStyle=o.multiKeyBackground,e.fillRect(_,y,h,c),e.strokeRect(_,y,h,c),e.fillStyle=s.backgroundColor,e.fillRect(T,y+1,h-2,c-2))}e.fillStyle=this.labelTextColors[r]}drawBody(e,n,r){const{body:i}=this,{bodySpacing:o,bodyAlign:s,displayColors:l,boxHeight:c,boxWidth:h,boxPadding:d}=r,p=Kn(r.bodyFont);let m=p.lineHeight,v=0;const y=Ah(r.rtl,this.x,this.width),_=function(j){n.fillText(j,y.x(e.x+v),e.y+m/2),e.y+=m+o},T=y.textAlign(s);let x,w,E,O,k,P,A;for(n.textAlign=s,n.textBaseline="middle",n.font=p.string,e.x=Ev(this,T,r),n.fillStyle=r.bodyColor,Me(this.beforeBody,_),v=l&&T!=="right"?s==="center"?h/2+d:h+2+d:0,O=0,P=i.length;O0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,r=this.$animations,i=r&&r.x,o=r&&r.y;if(i||o){const s=bp[e.position].call(this,this._active,this._eventPosition);if(!s)return;const l=this._size=nA(this,e),c=Object.assign({},s,this._size),h=rA(n,e,c),d=iA(e,c,h,n);(i._to!==d.x||o._to!==d.y)&&(this.xAlign=h.xAlign,this.yAlign=h.yAlign,this.width=l.width,this.height=l.height,this.caretX=s.x,this.caretY=s.y,this._resolveAnimations().update(this,d))}}_willRender(){return!!this.opacity}draw(e){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=Dr(n.padding),l=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&l&&(e.save(),e.globalAlpha=r,this.drawBackground(o,e,i,n),x5(e,n.textDirection),o.y+=s.top,this.drawTitle(o,e,n),this.drawBody(o,e,n),this.drawFooter(o,e,n),w5(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const r=this._active,i=e.map(({datasetIndex:l,index:c})=>{const h=this.chart.getDatasetMeta(l);if(!h)throw new Error("Cannot find a dataset at index "+l);return{datasetIndex:l,element:h.data[c],index:c}}),o=!w_(r,i),s=this._positionChanged(i,n);(o||s)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,o=this._active||[],s=this._getActiveElements(e,o,n,r),l=this._positionChanged(s,e),c=n||!w_(s,o)||l;return c&&(this._active=s,(i.enabled||i.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),c}_getActiveElements(e,n,r,i){const o=this.options;if(e.type==="mouseout")return[];if(!i)return n;const s=this.chart.getElementsAtEventForMode(e,o.mode,o,r);return o.reverse&&s.reverse(),s}_positionChanged(e,n){const{caretX:r,caretY:i,options:o}=this,s=bp[o.position].call(this,e,n);return s!==!1&&(r!==s.x||i!==s.y)}},St(Q2,"positioners",bp),Q2);var mG={id:"tooltip",_element:aA,positioners:bp,afterInit(t,e,n){n&&(t.tooltip=new aA({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.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:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.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:Z5},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},gG=Object.freeze({__proto__:null,Colors:kZ,Decimation:AZ,Filler:QZ,Legend:iG,SubTitle:aG,Title:sG,Tooltip:mG});const vG=(t,e,n,r)=>(typeof e=="string"?(n=t.push(e)-1,r.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function yG(t,e,n,r){const i=t.indexOf(e);if(i===-1)return vG(t,e,n,r);const o=t.lastIndexOf(e);return i!==o?n:i}const _G=(t,e)=>t===null?null:or(Math.round(t),0,e);function lA(t){const e=this.getLabels();return t>=0&&tn.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}St(cS,"id","category"),St(cS,"defaults",{ticks:{callback:lA}});function bG(t,e){const n=[],{bounds:i,step:o,min:s,max:l,precision:c,count:h,maxTicks:d,maxDigits:p,includeBounds:m}=t,v=o||1,y=d-1,{min:_,max:T}=e,x=!_e(s),w=!_e(l),E=!_e(h),O=(T-_)/(p+1);let k=eM((T-_)/y/v)*v,P,A,j,B;if(k<1e-14&&!x&&!w)return[{value:_},{value:T}];B=Math.ceil(T/k)-Math.floor(_/k),B>y&&(k=eM(B*k/y/v)*v),_e(c)||(P=Math.pow(10,c),k=Math.ceil(k*P)/P),i==="ticks"?(A=Math.floor(_/k)*k,j=Math.ceil(T/k)*k):(A=_,j=T),x&&w&&o&&pH((l-s)/o,k/1e3)?(B=Math.round(Math.min((l-s)/k,d)),k=(l-s)/B,A=s,j=l):E?(A=x?s:A,j=w?l:j,B=h-1,k=(j-A)/B):(B=(j-A)/k,Dp(B,Math.round(B),k/1e3)?B=Math.round(B):B=Math.ceil(B));const N=Math.max(nM(k),nM(A));P=Math.pow(10,_e(c)?N:c),A=Math.round(A*P)/P,j=Math.round(j*P)/P;let V=0;for(x&&(m&&A!==s?(n.push({value:s}),Al)break;n.push({value:Y})}return w&&m&&j!==l?n.length&&Dp(n[n.length-1].value,l,cA(l,O,t))?n[n.length-1].value=l:n.push({value:l}):(!w||j===l)&&n.push({value:j}),n}function cA(t,e,{horizontal:n,minRotation:r}){const i=Bo(r),o=(n?Math.sin(i):Math.cos(i))||.001,s=.75*e*(""+t).length;return Math.min(e/o,s)}class P_ extends ku{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return _e(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:i,max:o}=this;const s=c=>i=n?i:c,l=c=>o=r?o:c;if(e){const c=us(i),h=us(o);c<0&&h<0?l(0):c>0&&h>0&&s(0)}if(i===o){let c=o===0?1:Math.abs(o*.05);l(o+c),e||s(i-c)}this.min=i,this.max=o}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=e,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 e=this.options,n=e.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:e.bounds,min:e.min,max:e.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=bG(i,o);return e.bounds==="ticks"&&r5(s,this,"value"),e.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const e=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&e.length){const i=(r-n)/Math.max(e.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(e){return Og(e,this.chart.options.locale,this.options.ticks.format)}}class uS extends P_{determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=xn(e)?e:0,this.max=xn(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,r=Bo(this.options.ticks.minRotation),i=(e?Math.sin(r):Math.cos(r))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,o.lineHeight/i))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}St(uS,"id","linear"),St(uS,"defaults",{ticks:{callback:_b.formatters.numeric}});const wm=t=>Math.floor(Ga(t)),wc=(t,e)=>Math.pow(10,wm(t)+e);function uA(t){return t/Math.pow(10,wm(t))===1}function hA(t,e,n){const r=Math.pow(10,n),i=Math.floor(t/r);return Math.ceil(e/r)-i}function xG(t,e){const n=e-t;let r=wm(n);for(;hA(t,e,r)>10;)r++;for(;hA(t,e,r)<10;)r--;return Math.min(r,wm(t))}function wG(t,{min:e,max:n}){e=Ci(t.min,e);const r=[],i=wm(e);let o=xG(e,n),s=o<0?Math.pow(10,Math.abs(o)):1;const l=Math.pow(10,o),c=i>o?Math.pow(10,i):0,h=Math.round((e-c)*s)/s,d=Math.floor((e-c)/l/10)*l*10;let p=Math.floor((h-d)/Math.pow(10,o)),m=Ci(t.min,Math.round((c+d+p*Math.pow(10,o))*s)/s);for(;m=10?p=p<15?15:20:p++,p>=20&&(o++,p=2,s=o>=0?1:s),m=Math.round((c+d+p*Math.pow(10,o))*s)/s;const v=Ci(t.max,m);return r.push({value:v,major:uA(v),significand:p}),r}class hS extends ku{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,n){const r=P_.prototype.parse.apply(this,[e,n]);if(r===0){this._zero=!0;return}return xn(r)&&r>0?r:null}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=xn(e)?Math.max(0,e):null,this.max=xn(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!xn(this._userMin)&&(this.min=e===wc(this.min,0)?wc(this.min,-1):wc(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let r=this.min,i=this.max;const o=l=>r=e?r:l,s=l=>i=n?i:l;r===i&&(r<=0?(o(1),s(10)):(o(wc(r,-1)),s(wc(i,1)))),r<=0&&o(wc(i,-1)),i<=0&&s(wc(r,1)),this.min=r,this.max=i}buildTicks(){const e=this.options,n={min:this._userMin,max:this._userMax},r=wG(n,this);return e.bounds==="ticks"&&r5(r,this,"value"),e.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}getLabelForValue(e){return e===void 0?"0":Og(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=Ga(e),this._valueRange=Ga(this.max)-Ga(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(Ga(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const n=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+n*this._valueRange)}}St(hS,"id","logarithmic"),St(hS,"defaults",{ticks:{callback:_b.formatters.logarithmic,major:{enabled:!0}}});function dS(t){const e=t.ticks;if(e.display&&t.display){const n=Dr(e.backdropPadding);return re(e.font&&e.font.size,Sn.font.size)+n.height}return 0}function SG(t,e,n){return n=Qe(n)?n:[n],{w:MH(t,e.string,n),h:n.length*e.lineHeight}}function dA(t,e,n,r,i){return t===r||t===i?{start:e-n/2,end:e+n/2}:ti?{start:e-n,end:e}:{start:e,end:e+n}}function TG(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},n=Object.assign({},e),r=[],i=[],o=t._pointLabels.length,s=t.options.pointLabels,l=s.centerPointLabels?an/o:0;for(let c=0;ce.r&&(l=(r.end-e.r)/o,t.r=Math.max(t.r,e.r+l)),i.starte.b&&(c=(i.end-e.b)/s,t.b=Math.max(t.b,e.b+c))}function OG(t,e,n){const r=t.drawingArea,{extra:i,additionalAngle:o,padding:s,size:l}=n,c=t.getPointPosition(e,r+i+s,o),h=Math.round(qO(Li(c.angle+wn))),d=MG(c.y,l.h,h),p=PG(h),m=LG(c.x,l.w,p);return{visible:!0,x:c.x,y:d,textAlign:p,left:m,top:d,right:m+l.w,bottom:d+l.h}}function CG(t,e){if(!e)return!0;const{left:n,top:r,right:i,bottom:o}=t;return!(na({x:n,y:r},e)||na({x:n,y:o},e)||na({x:i,y:r},e)||na({x:i,y:o},e))}function kG(t,e,n){const r=[],i=t._pointLabels.length,o=t.options,{centerPointLabels:s,display:l}=o.pointLabels,c={extra:dS(o)/2,additionalAngle:s?an/i:0};let h;for(let d=0;d270||n<90)&&(t-=e),t}function AG(t,e,n){const{left:r,top:i,right:o,bottom:s}=n,{backdropColor:l}=e;if(!_e(l)){const c=qc(e.borderRadius),h=Dr(e.backdropPadding);t.fillStyle=l;const d=r-h.left,p=i-h.top,m=o-r+h.width,v=s-i+h.height;Object.values(c).some(y=>y!==0)?(t.beginPath(),bm(t,{x:d,y:p,w:m,h:v,radius:c}),t.fill()):t.fillRect(d,p,m,v)}}function RG(t,e){const{ctx:n,options:{pointLabels:r}}=t;for(let i=e-1;i>=0;i--){const o=t._pointLabelItems[i];if(!o.visible)continue;const s=r.setContext(t.getPointLabelContext(i));AG(n,s,o);const l=Kn(s.font),{x:c,y:h,textAlign:d}=o;hu(n,t._pointLabels[i],c,h+l.lineHeight/2,l,{color:s.color,textAlign:d,textBaseline:"middle"})}}function G5(t,e,n,r){const{ctx:i}=t;if(n)i.arc(t.xCenter,t.yCenter,e,0,Je);else{let o=t.getPointPosition(0,e);i.moveTo(o.x,o.y);for(let s=1;s{const i=ze(this.options.pointLabels.callback,[n,r],this);return i||i===0?i:""}).filter((n,r)=>this.chart.getDataVisibility(r))}fit(){const e=this.options;e.display&&e.pointLabels.display?TG(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,n,r,i){this.xCenter+=Math.floor((e-n)/2),this.yCenter+=Math.floor((r-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,n,r,i))}getIndexAngle(e){const n=Je/(this._pointLabels.length||1),r=this.options.startAngle||0;return Li(e*n+Bo(r))}getDistanceFromCenterForValue(e){if(_e(e))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*n:(e-this.min)*n}getValueForDistanceFromCenter(e){if(_e(e))return NaN;const n=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(e){const n=this._pointLabels||[];if(e>=0&&e{if(p!==0){c=this.getDistanceFromCenterForValue(d.value);const m=this.getContext(p),v=i.setContext(m),y=o.setContext(m);jG(this,v,c,s,y)}}),r.display){for(e.save(),l=s-1;l>=0;l--){const d=r.setContext(this.getPointLabelContext(l)),{color:p,lineWidth:m}=d;!m||!p||(e.lineWidth=m,e.strokeStyle=p,e.setLineDash(d.borderDash),e.lineDashOffset=d.borderDashOffset,c=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),h=this.getPointPosition(l,c),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(h.x,h.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,n=this.options,r=n.ticks;if(!r.display)return;const i=this.getIndexAngle(0);let o,s;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(i),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((l,c)=>{if(c===0&&!n.reverse)return;const h=r.setContext(this.getContext(c)),d=Kn(h.font);if(o=this.getDistanceFromCenterForValue(this.ticks[c].value),h.showLabelBackdrop){e.font=d.string,s=e.measureText(l.label).width,e.fillStyle=h.backdropColor;const p=Dr(h.backdropPadding);e.fillRect(-s/2-p.left,-o-d.size/2-p.top,s+p.width,d.size+p.height)}hu(e,l.label,0,-o,d,{color:h.color,strokeColor:h.textStrokeColor,strokeWidth:h.textStrokeWidth})}),e.restore()}drawTitle(){}}St(xp,"id","radialLinear"),St(xp,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:_b.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}}),St(xp,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),St(xp,"descriptors",{angleLines:{_fallback:"grid"}});const Sb={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}},ni=Object.keys(Sb);function fA(t,e){return t-e}function pA(t,e){if(_e(e))return null;const n=t._adapter,{parser:r,round:i,isoWeekday:o}=t._parseOpts;let s=e;return typeof r=="function"&&(s=r(s)),xn(s)||(s=typeof r=="string"?n.parse(s,r):n.parse(s)),s===null?null:(i&&(s=i==="week"&&(Wh(o)||o===!0)?n.startOf(s,"isoWeek",o):n.startOf(s,i)),+s)}function mA(t,e,n,r){const i=ni.length;for(let o=ni.indexOf(t);o=ni.indexOf(n);o--){const s=ni[o];if(Sb[s].common&&t._adapter.diff(i,r,s)>=e-1)return s}return ni[n?ni.indexOf(n):0]}function IG(t){for(let e=ni.indexOf(t)+1,n=ni.length;e=e?n[r]:n[i];t[o]=!0}}function FG(t,e,n,r){const i=t._adapter,o=+i.startOf(e[0].value,r),s=e[e.length-1].value;let l,c;for(l=o;l<=s;l=+i.add(l,1,r))c=n[l],c>=0&&(e[c].major=!0);return e}function vA(t,e,n){const r=[],i={},o=e.length;let s,l;for(s=0;s+e.value))}initOffsets(e=[]){let n=0,r=0,i,o;this.options.offset&&e.length&&(i=this.getDecimalForValue(e[0]),e.length===1?n=1-i:n=(this.getDecimalForValue(e[1])-i)/2,o=this.getDecimalForValue(e[e.length-1]),e.length===1?r=o:r=(o-this.getDecimalForValue(e[e.length-2]))/2);const s=e.length<3?.5:.25;n=or(n,0,s),r=or(r,0,s),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const e=this._adapter,n=this.min,r=this.max,i=this.options,o=i.time,s=o.unit||mA(o.minUnit,n,r,this._getLabelCapacity(n)),l=re(i.ticks.stepSize,1),c=s==="week"?o.isoWeekday:!1,h=Wh(c)||c===!0,d={};let p=n,m,v;if(h&&(p=+e.startOf(p,"isoWeek",c)),p=+e.startOf(p,h?"day":s),e.diff(r,n,s)>1e5*l)throw new Error(n+" and "+r+" are too far apart with stepSize of "+l+" "+s);const y=i.ticks.source==="data"&&this.getDataTimestamps();for(m=p,v=0;m+_)}getLabelForValue(e){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(e,r.tooltipFormat):n.format(e,r.displayFormats.datetime)}format(e,n){const i=this.options.time.displayFormats,o=this._unit,s=n||i[o];return this._adapter.format(e,s)}_tickFormatFunction(e,n,r,i){const o=this.options,s=o.ticks.callback;if(s)return ze(s,[e,n,r],this);const l=o.time.displayFormats,c=this._unit,h=this._majorUnit,d=c&&l[c],p=h&&l[h],m=r[n],v=h&&p&&m&&m.major;return this._adapter.format(e,i||(v?p:d))}generateTickLabels(e){let n,r,i;for(n=0,r=e.length;n0?l:1}getDataTimestamps(){let e=this._cache.data||[],n,r;if(e.length)return e;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=t[r].pos&&e<=t[i].pos&&({lo:r,hi:i}=ea(t,"pos",e)),{pos:o,time:l}=t[r],{pos:s,time:c}=t[i]):(e>=t[r].time&&e<=t[i].time&&({lo:r,hi:i}=ea(t,"time",e)),{time:o,pos:l}=t[r],{time:s,pos:c}=t[i]);const h=s-o;return h?l+(c-l)*(e-o)/h:l}class fS extends Sm{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=Ov(n,this.min),this._tableRange=Ov(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:r}=this,i=[],o=[];let s,l,c,h,d;for(s=0,l=e.length;s=n&&h<=r&&i.push(h);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(s=0,l=i.length;si-o)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?e=this.normalize(n.concat(r)):e=n.length?n:r,e=this._cache.all=e,e}getDecimalForValue(e){return(Ov(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,r=this.getDecimalForPixel(e)/n.factor-n.end;return Ov(this._table,r*this._tableRange+this._minPos,!0)}}St(fS,"id","timeseries"),St(fS,"defaults",Sm.defaults);var BG=Object.freeze({__proto__:null,CategoryScale:cS,LinearScale:uS,LogarithmicScale:hS,RadialLinearScale:xp,TimeScale:Sm,TimeSeriesScale:fS});const $G=[YW,wZ,gG,BG];Ba.register(...$G);var q5={exports:{}},Wi={},K5={exports:{}},X5={};/** - * @license React - * scheduler.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. - */(function(t){function e(G,$){var I=G.length;G.push($);t:for(;0>>1,it=G[H];if(0>>1;Hi(tt,I))rti(mt,tt)?(G[H]=mt,G[rt]=I,H=rt):(G[H]=tt,G[Q]=I,H=Q);else if(rti(mt,I))G[H]=mt,G[rt]=I,H=rt;else break t}}return $}function i(G,$){var I=G.sortIndex-$.sortIndex;return I!==0?I:G.id-$.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var c=[],h=[],d=1,p=null,m=3,v=!1,y=!1,_=!1,T=typeof setTimeout=="function"?setTimeout:null,x=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 E(G){for(var $=n(h);$!==null;){if($.callback===null)r(h);else if($.startTime<=G)r(h),$.sortIndex=$.expirationTime,e(c,$);else break;$=n(h)}}function O(G){if(_=!1,E(G),!y)if(n(c)!==null)y=!0,et(k);else{var $=n(h);$!==null&&ct(O,$.startTime-G)}}function k(G,$){y=!1,_&&(_=!1,x(j),j=-1),v=!0;var I=m;try{for(E($),p=n(c);p!==null&&(!(p.expirationTime>$)||G&&!V());){var H=p.callback;if(typeof H=="function"){p.callback=null,m=p.priorityLevel;var it=H(p.expirationTime<=$);$=t.unstable_now(),typeof it=="function"?p.callback=it:p===n(c)&&r(c),E($)}else r(c);p=n(c)}if(p!==null)var W=!0;else{var Q=n(h);Q!==null&&ct(O,Q.startTime-$),W=!1}return W}finally{p=null,m=I,v=!1}}var P=!1,A=null,j=-1,B=5,N=-1;function V(){return!(t.unstable_now()-NG||125H?(G.sortIndex=I,e(h,G),n(c)===null&&G===n(h)&&(_?(x(j),j=-1):_=!0,ct(O,I-H))):(G.sortIndex=it,e(c,G),y||v||(y=!0,et(k))),G},t.unstable_shouldYield=V,t.unstable_wrapCallback=function(G){var $=m;return function(){var I=m;m=$;try{return G.apply(this,arguments)}finally{m=I}}}})(X5);K5.exports=X5;var zG=K5.exports;/** - * @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 Q5=U,Bi=zG;function kt(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),pS=Object.prototype.hasOwnProperty,UG=/^[: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]*$/,yA={},_A={};function VG(t){return pS.call(_A,t)?!0:pS.call(yA,t)?!1:UG.test(t)?_A[t]=!0:(yA[t]=!0,!1)}function HG(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function WG(t,e,n,r){if(e===null||typeof e>"u"||HG(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function Jr(t,e,n,r,i,o,s){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=o,this.removeEmptyString=s}var Er={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Er[t]=new Jr(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Er[e]=new Jr(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Er[t]=new Jr(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Er[t]=new Jr(t,2,!1,t,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(t){Er[t]=new Jr(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Er[t]=new Jr(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Er[t]=new Jr(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Er[t]=new Jr(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Er[t]=new Jr(t,5,!1,t.toLowerCase(),null,!1,!1)});var aC=/[\-:]([a-z])/g;function lC(t){return t[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(t){var e=t.replace(aC,lC);Er[e]=new Jr(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(aC,lC);Er[e]=new Jr(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(aC,lC);Er[e]=new Jr(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Er[t]=new Jr(t,1,!1,t.toLowerCase(),null,!1,!1)});Er.xlinkHref=new Jr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Er[t]=new Jr(t,1,!1,t.toLowerCase(),null,!0,!0)});function cC(t,e,n,r){var i=Er.hasOwnProperty(e)?Er[e]:null;(i!==null?i.type!==0:r||!(2l||i[s]!==o[l]){var c=` -`+i[s].replace(" at new "," at ");return t.displayName&&c.includes("")&&(c=c.replace("",t.displayName)),c}while(1<=s&&0<=l);break}}}finally{fw=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?wp(t):""}function YG(t){switch(t.tag){case 5:return wp(t.type);case 16:return wp("Lazy");case 13:return wp("Suspense");case 19:return wp("SuspenseList");case 0:case 2:case 15:return t=pw(t.type,!1),t;case 11:return t=pw(t.type.render,!1),t;case 1:return t=pw(t.type,!0),t;default:return""}}function yS(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case dh:return"Fragment";case hh:return"Portal";case mS:return"Profiler";case uC:return"StrictMode";case gS:return"Suspense";case vS:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case e6:return(t.displayName||"Context")+".Consumer";case t6:return(t._context.displayName||"Context")+".Provider";case hC:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case dC:return e=t.displayName||null,e!==null?e:yS(t.type)||"Memo";case $a:e=t._payload,t=t._init;try{return yS(t(e))}catch{}}return null}function ZG(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return yS(e);case 8:return e===uC?"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 e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Sl(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function r6(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function GG(t){var e=r6(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function kv(t){t._valueTracker||(t._valueTracker=GG(t))}function i6(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=r6(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function L_(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function _S(t,e){var n=e.checked;return mn({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function xA(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=Sl(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function o6(t,e){e=e.checked,e!=null&&cC(t,"checked",e,!1)}function bS(t,e){o6(t,e);var n=Sl(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?xS(t,e.type,n):e.hasOwnProperty("defaultValue")&&xS(t,e.type,Sl(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function wA(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function xS(t,e,n){(e!=="number"||L_(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var Sp=Array.isArray;function Rh(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=Pv.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Em(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var $p={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},qG=["Webkit","ms","Moz","O"];Object.keys($p).forEach(function(t){qG.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),$p[e]=$p[t]})});function c6(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||$p.hasOwnProperty(t)&&$p[t]?(""+e).trim():e+"px"}function u6(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=c6(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var KG=mn({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 TS(t,e){if(e){if(KG[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(kt(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(kt(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(kt(61))}if(e.style!=null&&typeof e.style!="object")throw Error(kt(62))}}function ES(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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 OS=null;function fC(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var CS=null,jh=null,Nh=null;function EA(t){if(t=Lg(t)){if(typeof CS!="function")throw Error(kt(280));var e=t.stateNode;e&&(e=kb(e),CS(t.stateNode,t.type,e))}}function h6(t){jh?Nh?Nh.push(t):Nh=[t]:jh=t}function d6(){if(jh){var t=jh,e=Nh;if(Nh=jh=null,EA(t),e)for(t=0;t>>=0,t===0?32:31-(aq(t)/lq|0)|0}var Lv=64,Mv=4194304;function Tp(t){switch(t&-t){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 t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function j_(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,o=t.pingedLanes,s=n&268435455;if(s!==0){var l=s&~i;l!==0?r=Tp(l):(o&=s,o!==0&&(r=Tp(o)))}else s=n&~i,s!==0?r=Tp(s):o!==0&&(r=Tp(o));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,o=e&-e,i>=o||i===16&&(o&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0n;n++)e.push(t);return e}function kg(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Vo(e),t[e]=n}function dq(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0=Up),jA=String.fromCharCode(32),NA=!1;function A6(t,e){switch(t){case"keyup":return $q.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function R6(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var fh=!1;function Uq(t,e){switch(t){case"compositionend":return R6(e);case"keypress":return e.which!==32?null:(NA=!0,jA);case"textInput":return t=e.data,t===jA&&NA?null:t;default:return null}}function Vq(t,e){if(fh)return t==="compositionend"||!xC&&A6(t,e)?(t=L6(),Zy=yC=Xa=null,fh=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:n,offset:e-t};t=r}t:{for(;n;){if(n.nextSibling){n=n.nextSibling;break t}n=n.parentNode}n=void 0}n=BA(n)}}function I6(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?I6(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function F6(){for(var t=window,e=L_();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=L_(t.document)}return e}function wC(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function Qq(t){var e=F6(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&I6(n.ownerDocument.documentElement,n)){if(r!==null&&wC(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!t.extend&&o>r&&(i=r,r=o,o=i),i=$A(n,o);var s=$A(n,r);i&&s&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==s.node||t.focusOffset!==s.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),o>r?(t.addRange(e),t.extend(s.node,s.offset)):(e.setEnd(s.node,s.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,ph=null,RS=null,Hp=null,jS=!1;function zA(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;jS||ph==null||ph!==L_(r)||(r=ph,"selectionStart"in r&&wC(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}),Hp&&Mm(Hp,r)||(Hp=r,r=I_(RS,"onSelect"),0vh||(t.current=$S[vh],$S[vh]=null,vh--)}function Ue(t,e){vh++,$S[vh]=t.current,t.current=e}var Tl={},Ir=Nl(Tl),oi=Nl(!1),du=Tl;function qh(t,e){var n=t.type.contextTypes;if(!n)return Tl;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=e[o];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function si(t){return t=t.childContextTypes,t!=null}function B_(){tn(oi),tn(Ir)}function GA(t,e,n){if(Ir.current!==Tl)throw Error(kt(168));Ue(Ir,e),Ue(oi,n)}function Z6(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error(kt(108,ZG(t)||"Unknown",i));return mn({},n,r)}function $_(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Tl,du=Ir.current,Ue(Ir,t),Ue(oi,oi.current),!0}function qA(t,e,n){var r=t.stateNode;if(!r)throw Error(kt(169));n?(t=Z6(t,e,du),r.__reactInternalMemoizedMergedChildContext=t,tn(oi),tn(Ir),Ue(Ir,t)):tn(oi),Ue(oi,n)}var Ks=null,Pb=!1,kw=!1;function G6(t){Ks===null?Ks=[t]:Ks.push(t)}function uK(t){Pb=!0,G6(t)}function Dl(){if(!kw&&Ks!==null){kw=!0;var t=0,e=Ae;try{var n=Ks;for(Ae=1;t>=s,i-=s,ra=1<<32-Vo(e)+i|n<j?(B=A,A=null):B=A.sibling;var N=m(x,A,E[j],O);if(N===null){A===null&&(A=B);break}t&&A&&N.alternate===null&&e(x,A),w=o(N,w,j),P===null?k=N:P.sibling=N,P=N,A=B}if(j===E.length)return n(x,A),on&&Ac(x,j),k;if(A===null){for(;jj?(B=A,A=null):B=A.sibling;var V=m(x,A,N.value,O);if(V===null){A===null&&(A=B);break}t&&A&&V.alternate===null&&e(x,A),w=o(V,w,j),P===null?k=V:P.sibling=V,P=V,A=B}if(N.done)return n(x,A),on&&Ac(x,j),k;if(A===null){for(;!N.done;j++,N=E.next())N=p(x,N.value,O),N!==null&&(w=o(N,w,j),P===null?k=N:P.sibling=N,P=N);return on&&Ac(x,j),k}for(A=r(x,A);!N.done;j++,N=E.next())N=v(A,x,j,N.value,O),N!==null&&(t&&N.alternate!==null&&A.delete(N.key===null?j:N.key),w=o(N,w,j),P===null?k=N:P.sibling=N,P=N);return t&&A.forEach(function(Y){return e(x,Y)}),on&&Ac(x,j),k}function T(x,w,E,O){if(typeof E=="object"&&E!==null&&E.type===dh&&E.key===null&&(E=E.props.children),typeof E=="object"&&E!==null){switch(E.$$typeof){case Cv:t:{for(var k=E.key,P=w;P!==null;){if(P.key===k){if(k=E.type,k===dh){if(P.tag===7){n(x,P.sibling),w=i(P,E.props.children),w.return=x,x=w;break t}}else if(P.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===$a&&nR(k)===P.type){n(x,P.sibling),w=i(P,E.props),w.ref=Qf(x,P,E),w.return=x,x=w;break t}n(x,P);break}else e(x,P);P=P.sibling}E.type===dh?(w=Qc(E.props.children,x.mode,O,E.key),w.return=x,x=w):(O=e_(E.type,E.key,E.props,null,x.mode,O),O.ref=Qf(x,w,E),O.return=x,x=O)}return s(x);case hh:t:{for(P=E.key;w!==null;){if(w.key===P)if(w.tag===4&&w.stateNode.containerInfo===E.containerInfo&&w.stateNode.implementation===E.implementation){n(x,w.sibling),w=i(w,E.children||[]),w.return=x,x=w;break t}else{n(x,w);break}else e(x,w);w=w.sibling}w=Dw(E,x.mode,O),w.return=x,x=w}return s(x);case $a:return P=E._init,T(x,w,P(E._payload),O)}if(Sp(E))return y(x,w,E,O);if(Zf(E))return _(x,w,E,O);Fv(x,E)}return typeof E=="string"&&E!==""||typeof E=="number"?(E=""+E,w!==null&&w.tag===6?(n(x,w.sibling),w=i(w,E),w.return=x,x=w):(n(x,w),w=Nw(E,x.mode,O),w.return=x,x=w),s(x)):n(x,w)}return T}var Xh=nF(!0),rF=nF(!1),Mg={},ds=Nl(Mg),Nm=Nl(Mg),Dm=Nl(Mg);function Hc(t){if(t===Mg)throw Error(kt(174));return t}function MC(t,e){switch(Ue(Dm,e),Ue(Nm,t),Ue(ds,Mg),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:SS(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=SS(e,t)}tn(ds),Ue(ds,e)}function Qh(){tn(ds),tn(Nm),tn(Dm)}function iF(t){Hc(Dm.current);var e=Hc(ds.current),n=SS(e,t.type);e!==n&&(Ue(Nm,t),Ue(ds,n))}function AC(t){Nm.current===t&&(tn(ds),tn(Nm))}var hn=Nl(0);function Y_(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Pw=[];function RC(){for(var t=0;tn?n:4,t(!0);var r=Lw.transition;Lw.transition={};try{t(!1),e()}finally{Ae=n,Lw.transition=r}}function bF(){return fo().memoizedState}function pK(t,e,n){var r=fl(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},xF(t))wF(e,n);else if(n=Q6(t,e,n,r),n!==null){var i=Xr();Ho(n,t,r,i),SF(n,e,r)}}function mK(t,e,n){var r=fl(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(xF(t))wF(e,i);else{var o=t.alternate;if(t.lanes===0&&(o===null||o.lanes===0)&&(o=e.lastRenderedReducer,o!==null))try{var s=e.lastRenderedState,l=o(s,n);if(i.hasEagerState=!0,i.eagerState=l,Wo(l,s)){var c=e.interleaved;c===null?(i.next=i,PC(e)):(i.next=c.next,c.next=i),e.interleaved=i;return}}catch{}finally{}n=Q6(t,e,i,r),n!==null&&(i=Xr(),Ho(n,t,r,i),SF(n,e,r))}}function xF(t){var e=t.alternate;return t===pn||e!==null&&e===pn}function wF(t,e){Wp=Z_=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function SF(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,mC(t,n)}}var G_={readContext:ho,useCallback:Cr,useContext:Cr,useEffect:Cr,useImperativeHandle:Cr,useInsertionEffect:Cr,useLayoutEffect:Cr,useMemo:Cr,useReducer:Cr,useRef:Cr,useState:Cr,useDebugValue:Cr,useDeferredValue:Cr,useTransition:Cr,useMutableSource:Cr,useSyncExternalStore:Cr,useId:Cr,unstable_isNewReconciler:!1},gK={readContext:ho,useCallback:function(t,e){return Jo().memoizedState=[t,e===void 0?null:e],t},useContext:ho,useEffect:iR,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,Xy(4194308,4,mF.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Xy(4194308,4,t,e)},useInsertionEffect:function(t,e){return Xy(4,2,t,e)},useMemo:function(t,e){var n=Jo();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=Jo();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=pK.bind(null,pn,t),[r.memoizedState,t]},useRef:function(t){var e=Jo();return t={current:t},e.memoizedState=t},useState:rR,useDebugValue:FC,useDeferredValue:function(t){return Jo().memoizedState=t},useTransition:function(){var t=rR(!1),e=t[0];return t=fK.bind(null,t[1]),Jo().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=pn,i=Jo();if(on){if(n===void 0)throw Error(kt(407));n=n()}else{if(n=e(),ar===null)throw Error(kt(349));pu&30||aF(r,e,n)}i.memoizedState=n;var o={value:n,getSnapshot:e};return i.queue=o,iR(cF.bind(null,r,o,t),[t]),r.flags|=2048,Bm(9,lF.bind(null,r,o,n,e),void 0,null),n},useId:function(){var t=Jo(),e=ar.identifierPrefix;if(on){var n=ia,r=ra;n=(r&~(1<<32-Vo(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=Im++,0<\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=s.createElement(n,{is:r.is}):(t=s.createElement(n),n==="select"&&(s=t,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):t=s.createElementNS(t,n),t[rs]=e,t[jm]=r,AF(t,e,!1,!1),e.stateNode=t;t:{switch(s=ES(n,r),n){case"dialog":Ze("cancel",t),Ze("close",t),i=r;break;case"iframe":case"object":case"embed":Ze("load",t),i=r;break;case"video":case"audio":for(i=0;itd&&(e.flags|=128,r=!0,Jf(o,!1),e.lanes=4194304)}else{if(!r)if(t=Y_(s),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Jf(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!on)return kr(e),null}else 2*Rn()-o.renderingStartTime>td&&n!==1073741824&&(e.flags|=128,r=!0,Jf(o,!1),e.lanes=4194304);o.isBackwards?(s.sibling=e.child,e.child=s):(n=o.last,n!==null?n.sibling=s:e.child=s,o.last=s)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=Rn(),e.sibling=null,n=hn.current,Ue(hn,r?n&1|2:n&1),e):(kr(e),null);case 22:case 23:return HC(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?Pi&1073741824&&(kr(e),e.subtreeFlags&6&&(e.flags|=8192)):kr(e),null;case 24:return null;case 25:return null}throw Error(kt(156,e.tag))}function TK(t,e){switch(TC(e),e.tag){case 1:return si(e.type)&&B_(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Qh(),tn(oi),tn(Ir),RC(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return AC(e),null;case 13:if(tn(hn),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(kt(340));Kh()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return tn(hn),null;case 4:return Qh(),null;case 10:return kC(e.type._context),null;case 22:case 23:return HC(),null;case 24:return null;default:return null}}var $v=!1,Rr=!1,EK=typeof WeakSet=="function"?WeakSet:Set,Wt=null;function xh(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){yn(t,e,r)}else n.current=null}function QS(t,e,n){try{n()}catch(r){yn(t,e,r)}}var fR=!1;function OK(t,e){if(NS=N_,t=F6(),wC(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else t:{n=(n=t.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 t}var s=0,l=-1,c=-1,h=0,d=0,p=t,m=null;e:for(;;){for(var v;p!==n||i!==0&&p.nodeType!==3||(l=s+i),p!==o||r!==0&&p.nodeType!==3||(c=s+r),p.nodeType===3&&(s+=p.nodeValue.length),(v=p.firstChild)!==null;)m=p,p=v;for(;;){if(p===t)break e;if(m===n&&++h===i&&(l=s),m===o&&++d===r&&(c=s),(v=p.nextSibling)!==null)break;p=m,m=p.parentNode}p=v}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(DS={focusedElem:t,selectionRange:n},N_=!1,Wt=e;Wt!==null;)if(e=Wt,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Wt=t;else for(;Wt!==null;){e=Wt;try{var y=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var _=y.memoizedProps,T=y.memoizedState,x=e.stateNode,w=x.getSnapshotBeforeUpdate(e.elementType===e.type?_:jo(e.type,_),T);x.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var E=e.stateNode.containerInfo;E.nodeType===1?E.textContent="":E.nodeType===9&&E.documentElement&&E.removeChild(E.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(kt(163))}}catch(O){yn(e,e.return,O)}if(t=e.sibling,t!==null){t.return=e.return,Wt=t;break}Wt=e.return}return y=fR,fR=!1,y}function Yp(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var o=i.destroy;i.destroy=void 0,o!==void 0&&QS(e,n,o)}i=i.next}while(i!==r)}}function Ab(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function JS(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function NF(t){var e=t.alternate;e!==null&&(t.alternate=null,NF(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[rs],delete e[jm],delete e[BS],delete e[lK],delete e[cK])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function DF(t){return t.tag===5||t.tag===3||t.tag===4}function pR(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||DF(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function tT(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=F_));else if(r!==4&&(t=t.child,t!==null))for(tT(t,e,n),t=t.sibling;t!==null;)tT(t,e,n),t=t.sibling}function eT(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(eT(t,e,n),t=t.sibling;t!==null;)eT(t,e,n),t=t.sibling}var wr=null,No=!1;function Aa(t,e,n){for(n=n.child;n!==null;)IF(t,e,n),n=n.sibling}function IF(t,e,n){if(hs&&typeof hs.onCommitFiberUnmount=="function")try{hs.onCommitFiberUnmount(Tb,n)}catch{}switch(n.tag){case 5:Rr||xh(n,e);case 6:var r=wr,i=No;wr=null,Aa(t,e,n),wr=r,No=i,wr!==null&&(No?(t=wr,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):wr.removeChild(n.stateNode));break;case 18:wr!==null&&(No?(t=wr,n=n.stateNode,t.nodeType===8?Cw(t.parentNode,n):t.nodeType===1&&Cw(t,n),Pm(t)):Cw(wr,n.stateNode));break;case 4:r=wr,i=No,wr=n.stateNode.containerInfo,No=!0,Aa(t,e,n),wr=r,No=i;break;case 0:case 11:case 14:case 15:if(!Rr&&(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)&&QS(n,e,s),i=i.next}while(i!==r)}Aa(t,e,n);break;case 1:if(!Rr&&(xh(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){yn(n,e,l)}Aa(t,e,n);break;case 21:Aa(t,e,n);break;case 22:n.mode&1?(Rr=(r=Rr)||n.memoizedState!==null,Aa(t,e,n),Rr=r):Aa(t,e,n);break;default:Aa(t,e,n)}}function mR(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new EK),e.forEach(function(r){var i=NK.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Ro(t,e){var n=e.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=Rn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*kK(r/1960))-r,10t?16:t,Qa===null)var r=!1;else{if(t=Qa,Qa=null,X_=0,be&6)throw Error(kt(331));var i=be;for(be|=4,Wt=t.current;Wt!==null;){var o=Wt,s=o.child;if(Wt.flags&16){var l=o.deletions;if(l!==null){for(var c=0;cRn()-UC?Xc(t,0):zC|=n),ai(t,e)}function WF(t,e){e===0&&(t.mode&1?(e=Mv,Mv<<=1,!(Mv&130023424)&&(Mv=4194304)):e=1);var n=Xr();t=ha(t,e),t!==null&&(kg(t,e,n),ai(t,n))}function jK(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),WF(t,n)}function NK(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(kt(314))}r!==null&&r.delete(e),WF(t,n)}var YF;YF=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||oi.current)ii=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return ii=!1,wK(t,e,n);ii=!!(t.flags&131072)}else ii=!1,on&&e.flags&1048576&&q6(e,U_,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;Qy(t,e),t=e.pendingProps;var i=qh(e,Ir.current);Ih(e,n),i=NC(null,e,r,t,i,n);var o=DC();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,si(r)?(o=!0,$_(e)):o=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,LC(e),i.updater=Lb,e.stateNode=i,i._reactInternals=e,WS(e,r,t,n),e=GS(null,e,r,!0,o,n)):(e.tag=0,on&&o&&SC(e),Yr(null,e,i,n),e=e.child),e;case 16:r=e.elementType;t:{switch(Qy(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=IK(r),t=jo(r,t),i){case 0:e=ZS(null,e,r,t,n);break t;case 1:e=uR(null,e,r,t,n);break t;case 11:e=lR(null,e,r,t,n);break t;case 14:e=cR(null,e,r,jo(r.type,t),n);break t}throw Error(kt(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:jo(r,i),ZS(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:jo(r,i),uR(t,e,r,i,n);case 3:t:{if(PF(e),t===null)throw Error(kt(387));r=e.pendingProps,o=e.memoizedState,i=o.element,J6(t,e),W_(e,r,null,n);var s=e.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},e.updateQueue.baseState=o,e.memoizedState=o,e.flags&256){i=Jh(Error(kt(423)),e),e=hR(t,e,r,n,i);break t}else if(r!==i){i=Jh(Error(kt(424)),e),e=hR(t,e,r,n,i);break t}else for(Mi=ul(e.stateNode.containerInfo.firstChild),Di=e,on=!0,Do=null,n=rF(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Kh(),r===i){e=da(t,e,n);break t}Yr(t,e,r,n)}e=e.child}return e;case 5:return iF(e),t===null&&US(e),r=e.type,i=e.pendingProps,o=t!==null?t.memoizedProps:null,s=i.children,IS(r,i)?s=null:o!==null&&IS(r,o)&&(e.flags|=32),kF(t,e),Yr(t,e,s,n),e.child;case 6:return t===null&&US(e),null;case 13:return LF(t,e,n);case 4:return MC(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=Xh(e,null,r,n):Yr(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:jo(r,i),lR(t,e,r,i,n);case 7:return Yr(t,e,e.pendingProps,n),e.child;case 8:return Yr(t,e,e.pendingProps.children,n),e.child;case 12:return Yr(t,e,e.pendingProps.children,n),e.child;case 10:t:{if(r=e.type._context,i=e.pendingProps,o=e.memoizedProps,s=i.value,Ue(V_,r._currentValue),r._currentValue=s,o!==null)if(Wo(o.value,s)){if(o.children===i.children&&!oi.current){e=da(t,e,n);break t}}else for(o=e.child,o!==null&&(o.return=e);o!==null;){var l=o.dependencies;if(l!==null){s=o.child;for(var c=l.firstContext;c!==null;){if(c.context===r){if(o.tag===1){c=sa(-1,n&-n),c.tag=2;var h=o.updateQueue;if(h!==null){h=h.shared;var d=h.pending;d===null?c.next=c:(c.next=d.next,d.next=c),h.pending=c}}o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),VS(o.return,n,e),l.lanes|=n;break}c=c.next}}else if(o.tag===10)s=o.type===e.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(kt(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),VS(s,n,e),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===e){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Yr(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,Ih(e,n),i=ho(i),r=r(i),e.flags|=1,Yr(t,e,r,n),e.child;case 14:return r=e.type,i=jo(r,e.pendingProps),i=jo(r.type,i),cR(t,e,r,i,n);case 15:return OF(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:jo(r,i),Qy(t,e),e.tag=1,si(r)?(t=!0,$_(e)):t=!1,Ih(e,n),eF(e,r,i),WS(e,r,i,n),GS(null,e,r,!0,t,n);case 19:return MF(t,e,n);case 22:return CF(t,e,n)}throw Error(kt(156,e.tag))};function ZF(t,e){return _6(t,e)}function DK(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,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 no(t,e,n,r){return new DK(t,e,n,r)}function YC(t){return t=t.prototype,!(!t||!t.isReactComponent)}function IK(t){if(typeof t=="function")return YC(t)?1:0;if(t!=null){if(t=t.$$typeof,t===hC)return 11;if(t===dC)return 14}return 2}function pl(t,e){var n=t.alternate;return n===null?(n=no(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function e_(t,e,n,r,i,o){var s=2;if(r=t,typeof t=="function")YC(t)&&(s=1);else if(typeof t=="string")s=5;else t:switch(t){case dh:return Qc(n.children,i,o,e);case uC:s=8,i|=8;break;case mS:return t=no(12,n,e,i|2),t.elementType=mS,t.lanes=o,t;case gS:return t=no(13,n,e,i),t.elementType=gS,t.lanes=o,t;case vS:return t=no(19,n,e,i),t.elementType=vS,t.lanes=o,t;case n6:return jb(n,i,o,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case t6:s=10;break t;case e6:s=9;break t;case hC:s=11;break t;case dC:s=14;break t;case $a:s=16,r=null;break t}throw Error(kt(130,t==null?t:typeof t,""))}return e=no(s,n,e,i),e.elementType=t,e.type=r,e.lanes=o,e}function Qc(t,e,n,r){return t=no(7,t,r,e),t.lanes=n,t}function jb(t,e,n,r){return t=no(22,t,r,e),t.elementType=n6,t.lanes=n,t.stateNode={isHidden:!1},t}function Nw(t,e,n){return t=no(6,t,null,e),t.lanes=n,t}function Dw(t,e,n){return e=no(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function FK(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=gw(0),this.expirationTimes=gw(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gw(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function ZC(t,e,n,r,i,o,s,l,c){return t=new FK(t,e,n,l,c),e===1?(e=1,o===!0&&(e|=8)):e=0,o=no(3,null,null,e),t.current=o,o.stateNode=t,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},LC(o),t}function BK(t,e,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(XF)}catch(t){console.error(t)}}XF(),q5.exports=Wi;var Mu=q5.exports;const Jc=xs(Mu);var QF,SR=Mu;QF=SR.createRoot,SR.hydrateRoot;var JF={exports:{}},t8={};/** - * @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 ed=U;function HK(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var WK=typeof Object.is=="function"?Object.is:HK,YK=ed.useState,ZK=ed.useEffect,GK=ed.useLayoutEffect,qK=ed.useDebugValue;function KK(t,e){var n=e(),r=YK({inst:{value:n,getSnapshot:e}}),i=r[0].inst,o=r[1];return GK(function(){i.value=n,i.getSnapshot=e,Iw(i)&&o({inst:i})},[t,n,e]),ZK(function(){return Iw(i)&&o({inst:i}),t(function(){Iw(i)&&o({inst:i})})},[t]),qK(n),n}function Iw(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!WK(t,n)}catch{return!0}}function XK(t,e){return e()}var QK=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?XK:KK;t8.useSyncExternalStore=ed.useSyncExternalStore!==void 0?ed.useSyncExternalStore:QK;JF.exports=t8;var e8=JF.exports,JK={};/** - * @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 Bb=U,tX=e8;function eX(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var nX=typeof Object.is=="function"?Object.is:eX,rX=tX.useSyncExternalStore,iX=Bb.useRef,oX=Bb.useEffect,sX=Bb.useMemo,aX=Bb.useDebugValue;JK.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var o=iX(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=sX(function(){function c(v){if(!h){if(h=!0,d=v,v=r(v),i!==void 0&&s.hasValue){var y=s.value;if(i(y,v))return p=y}return p=v}if(y=p,nX(d,v))return y;var _=r(v);return i!==void 0&&i(y,_)?y:(d=v,p=_)}var h=!1,d,p,m=n===void 0?null:n;return[function(){return c(e())},m===null?void 0:function(){return c(m())}]},[e,n,r,i]);var l=rX(t,o[0],o[1]);return oX(function(){s.hasValue=!0,s.value=l},[l]),aX(l),l};function lX(t){t()}let n8=lX;const cX=t=>n8=t,uX=()=>n8,TR=Symbol.for("react-redux-context"),ER=typeof globalThis<"u"?globalThis:{};function hX(){var t;if(!U.createContext)return{};const e=(t=ER[TR])!=null?t:ER[TR]=new Map;let n=e.get(U.createContext);return n||(n=U.createContext(null),e.set(U.createContext,n)),n}const r8=hX(),dX=()=>{throw new Error("uSES not initialized!")};function Bh(){return Bh=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}var i8={exports:{}},Re={};/** @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 ur=typeof Symbol=="function"&&Symbol.for,QC=ur?Symbol.for("react.element"):60103,JC=ur?Symbol.for("react.portal"):60106,$b=ur?Symbol.for("react.fragment"):60107,zb=ur?Symbol.for("react.strict_mode"):60108,Ub=ur?Symbol.for("react.profiler"):60114,Vb=ur?Symbol.for("react.provider"):60109,Hb=ur?Symbol.for("react.context"):60110,tk=ur?Symbol.for("react.async_mode"):60111,Wb=ur?Symbol.for("react.concurrent_mode"):60111,Yb=ur?Symbol.for("react.forward_ref"):60112,Zb=ur?Symbol.for("react.suspense"):60113,fX=ur?Symbol.for("react.suspense_list"):60120,Gb=ur?Symbol.for("react.memo"):60115,qb=ur?Symbol.for("react.lazy"):60116,pX=ur?Symbol.for("react.block"):60121,mX=ur?Symbol.for("react.fundamental"):60117,gX=ur?Symbol.for("react.responder"):60118,vX=ur?Symbol.for("react.scope"):60119;function Zi(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case QC:switch(t=t.type,t){case tk:case Wb:case $b:case Ub:case zb:case Zb:return t;default:switch(t=t&&t.$$typeof,t){case Hb:case Yb:case qb:case Gb:case Vb:return t;default:return e}}case JC:return e}}}function o8(t){return Zi(t)===Wb}Re.AsyncMode=tk;Re.ConcurrentMode=Wb;Re.ContextConsumer=Hb;Re.ContextProvider=Vb;Re.Element=QC;Re.ForwardRef=Yb;Re.Fragment=$b;Re.Lazy=qb;Re.Memo=Gb;Re.Portal=JC;Re.Profiler=Ub;Re.StrictMode=zb;Re.Suspense=Zb;Re.isAsyncMode=function(t){return o8(t)||Zi(t)===tk};Re.isConcurrentMode=o8;Re.isContextConsumer=function(t){return Zi(t)===Hb};Re.isContextProvider=function(t){return Zi(t)===Vb};Re.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===QC};Re.isForwardRef=function(t){return Zi(t)===Yb};Re.isFragment=function(t){return Zi(t)===$b};Re.isLazy=function(t){return Zi(t)===qb};Re.isMemo=function(t){return Zi(t)===Gb};Re.isPortal=function(t){return Zi(t)===JC};Re.isProfiler=function(t){return Zi(t)===Ub};Re.isStrictMode=function(t){return Zi(t)===zb};Re.isSuspense=function(t){return Zi(t)===Zb};Re.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===$b||t===Wb||t===Ub||t===zb||t===Zb||t===fX||typeof t=="object"&&t!==null&&(t.$$typeof===qb||t.$$typeof===Gb||t.$$typeof===Vb||t.$$typeof===Hb||t.$$typeof===Yb||t.$$typeof===mX||t.$$typeof===gX||t.$$typeof===vX||t.$$typeof===pX)};Re.typeOf=Zi;i8.exports=Re;var yX=i8.exports,ek=yX,_X={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},bX={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},xX={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s8={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},nk={};nk[ek.ForwardRef]=xX;nk[ek.Memo]=s8;function OR(t){return ek.isMemo(t)?s8:nk[t.$$typeof]||_X}var wX=Object.defineProperty,SX=Object.getOwnPropertyNames,CR=Object.getOwnPropertySymbols,TX=Object.getOwnPropertyDescriptor,EX=Object.getPrototypeOf,kR=Object.prototype;function a8(t,e,n){if(typeof e!="string"){if(kR){var r=EX(e);r&&r!==kR&&a8(t,r,n)}var i=SX(e);CR&&(i=i.concat(CR(e)));for(var o=OR(t),s=OR(e),l=0;le(i(...o)))}return n}function sT(t){return function(n){const r=t(n);function i(){return r}return i.dependsOnOwnProps=!1,i}}function LR(t){return t.dependsOnOwnProps?!!t.dependsOnOwnProps:t.length!==1}function c8(t,e){return function(r,{displayName:i}){const o=function(l,c){return o.dependsOnOwnProps?o.mapToProps(l,c):o.mapToProps(l,void 0)};return o.dependsOnOwnProps=!0,o.mapToProps=function(l,c){o.mapToProps=t,o.dependsOnOwnProps=LR(t);let h=o(l,c);return typeof h=="function"&&(o.mapToProps=h,o.dependsOnOwnProps=LR(h),h=o(l,c)),h},o}}function ok(t,e){return(n,r)=>{throw new Error(`Invalid value of type ${typeof t} for ${e} argument when connecting component ${r.wrappedComponentName}.`)}}function NX(t){return t&&typeof t=="object"?sT(e=>jX(t,e)):t?typeof t=="function"?c8(t):ok(t,"mapDispatchToProps"):sT(e=>({dispatch:e}))}function DX(t){return t?typeof t=="function"?c8(t):ok(t,"mapStateToProps"):sT(()=>({}))}function IX(t,e,n){return Bh({},n,t,e)}function FX(t){return function(n,{displayName:r,areMergedPropsEqual:i}){let o=!1,s;return function(c,h,d){const p=t(c,h,d);return o?i(p,s)||(s=p):(o=!0,s=p),s}}}function BX(t){return t?typeof t=="function"?FX(t):ok(t,"mergeProps"):()=>IX}function $X(){const t=uX();let e=null,n=null;return{clear(){e=null,n=null},notify(){t(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=e;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:e=o,function(){!i||e===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}const MR={notify(){},get:()=>[]};function u8(t,e){let n,r=MR;function i(p){return c(),r.subscribe(p)}function o(){r.notify()}function s(){d.onStateChange&&d.onStateChange()}function l(){return!!n}function c(){n||(n=e?e.addNestedSub(s):t.subscribe(s),r=$X())}function h(){n&&(n(),n=void 0,r.clear(),r=MR)}const d={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:s,isSubscribed:l,trySubscribe:c,tryUnsubscribe:h,getListeners:()=>r};return d}const zX=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",t0=zX?U.useLayoutEffect:U.useEffect;function AR(t,e){return t===e?t!==0||e!==0||1/t===1/e:t!==t&&e!==e}function Fw(t,e){if(AR(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(let i=0;i{h8=t},HX=[null,null];function WX(t,e,n){t0(()=>t(...e),n)}function YX(t,e,n,r,i,o){t.current=r,n.current=!1,i.current&&(i.current=null,o())}function ZX(t,e,n,r,i,o,s,l,c,h,d){if(!t)return()=>{};let p=!1,m=null;const v=()=>{if(p||!l.current)return;const _=e.getState();let T,x;try{T=r(_,i.current)}catch(w){x=w,m=w}x||(m=null),T===o.current?s.current||h():(o.current=T,c.current=T,s.current=!0,d())};return n.onStateChange=v,n.trySubscribe(),v(),()=>{if(p=!0,n.tryUnsubscribe(),n.onStateChange=null,m)throw m}}function GX(t,e){return t===e}function d8(t,e,n,{pure:r,areStatesEqual:i=GX,areOwnPropsEqual:o=Fw,areStatePropsEqual:s=Fw,areMergedPropsEqual:l=Fw,forwardRef:c=!1,context:h=r8}={}){const d=h,p=DX(t),m=NX(e),v=BX(n),y=!!t;return T=>{const x=T.displayName||T.name||"Component",w=`Connect(${x})`,E={shouldHandleStateChanges:y,displayName:w,wrappedComponentName:x,WrappedComponent:T,initMapStateToProps:p,initMapDispatchToProps:m,initMergeProps:v,areStatesEqual:i,areStatePropsEqual:s,areOwnPropsEqual:o,areMergedPropsEqual:l};function O(A){const[j,B,N]=U.useMemo(()=>{const{reactReduxForwardedRef:st}=A,ht=XC(A,UX);return[A.context,st,ht]},[A]),V=U.useMemo(()=>j&&j.Consumer&&LX.isContextConsumer(U.createElement(j.Consumer,null))?j:d,[j,d]),Y=U.useContext(V),nt=!!A.store&&!!A.store.getState&&!!A.store.dispatch,K=!!Y&&!!Y.store,J=nt?A.store:Y.store,et=K?Y.getServerState:J.getState,ct=U.useMemo(()=>RX(J.dispatch,E),[J]),[G,$]=U.useMemo(()=>{if(!y)return HX;const st=u8(J,nt?void 0:Y.subscription),ht=st.notifyNestedSubs.bind(st);return[st,ht]},[J,nt,Y]),I=U.useMemo(()=>nt?Y:Bh({},Y,{subscription:G}),[nt,Y,G]),H=U.useRef(),it=U.useRef(N),W=U.useRef(),Q=U.useRef(!1);U.useRef(!1);const tt=U.useRef(!1),rt=U.useRef();t0(()=>(tt.current=!0,()=>{tt.current=!1}),[]);const mt=U.useMemo(()=>()=>W.current&&N===it.current?W.current:ct(J.getState(),N),[J,N]),M=U.useMemo(()=>ht=>G?ZX(y,J,G,ct,it,H,Q,tt,W,$,ht):()=>{},[G]);WX(YX,[it,H,Q,N,W,$]);let R;try{R=h8(M,mt,et?()=>ct(et(),N):mt)}catch(st){throw rt.current&&(st.message+=` -The error may be correlated with this previous error: -${rt.current.stack} - -`),st}t0(()=>{rt.current=void 0,W.current=void 0,H.current=R});const z=U.useMemo(()=>U.createElement(T,Bh({},R,{ref:B})),[B,T,R]);return U.useMemo(()=>y?U.createElement(V.Provider,{value:I},z):z,[V,z,I])}const P=U.memo(O);if(P.WrappedComponent=T,P.displayName=O.displayName=w,c){const j=U.forwardRef(function(N,V){return U.createElement(P,Bh({},N,{reactReduxForwardedRef:V}))});return j.displayName=w,j.WrappedComponent=T,PR(j,T)}return PR(P,T)}}function f8({store:t,context:e,children:n,serverState:r,stabilityCheck:i="once",noopCheck:o="once"}){const s=U.useMemo(()=>{const h=u8(t);return{store:t,subscription:h,getServerState:r?()=>r:void 0,stabilityCheck:i,noopCheck:o}},[t,r,i,o]),l=U.useMemo(()=>t.getState(),[t]);t0(()=>{const{subscription:h}=s;return h.onStateChange=h.notifyNestedSubs,h.trySubscribe(),l!==t.getState()&&h.notifyNestedSubs(),()=>{h.tryUnsubscribe(),h.onStateChange=void 0}},[s,l]);const c=e||r8;return U.createElement(c.Provider,{value:s},n)}VX(e8.useSyncExternalStore);cX(Mu.unstable_batchedUpdates);/** - * @remix-run/router v1.7.2 - * - * 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 zm(){return zm=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u")throw new Error(e)}function sk(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function KX(){return Math.random().toString(36).substr(2,8)}function jR(t,e){return{usr:t.state,key:t.key,idx:e}}function aT(t,e,n,r){return n===void 0&&(n=null),zm({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Rd(e):e,{state:n,key:e&&e.key||r||KX()})}function e0(t){let{pathname:e="/",search:n="",hash:r=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Rd(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substr(r),t=t.substr(0,r)),t&&(e.pathname=t)}return e}function XX(t,e,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,l=Ja.Pop,c=null,h=d();h==null&&(h=0,s.replaceState(zm({},s.state,{idx:h}),""));function d(){return(s.state||{idx:null}).idx}function p(){l=Ja.Pop;let T=d(),x=T==null?null:T-h;h=T,c&&c({action:l,location:_.location,delta:x})}function m(T,x){l=Ja.Push;let w=aT(_.location,T,x);n&&n(w,T),h=d()+1;let E=jR(w,h),O=_.createHref(w);try{s.pushState(E,"",O)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;i.location.assign(O)}o&&c&&c({action:l,location:_.location,delta:1})}function v(T,x){l=Ja.Replace;let w=aT(_.location,T,x);n&&n(w,T),h=d();let E=jR(w,h),O=_.createHref(w);s.replaceState(E,"",O),o&&c&&c({action:l,location:_.location,delta:0})}function y(T){let x=i.location.origin!=="null"?i.location.origin:i.location.href,w=typeof T=="string"?T:e0(T);return Fn(x,"No window.location.(origin|href) available to create URL for href: "+w),new URL(w,x)}let _={get action(){return l},get location(){return t(i,s)},listen(T){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(RR,p),c=T,()=>{i.removeEventListener(RR,p),c=null}},createHref(T){return e(i,T)},createURL:y,encodeLocation(T){let x=y(T);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:m,replace:v,go(T){return s.go(T)}};return _}var NR;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(NR||(NR={}));function QX(t,e,n){n===void 0&&(n="/");let r=typeof e=="string"?Rd(e):e,i=ak(r.pathname||"/",n);if(i==null)return null;let o=p8(t);JX(o);let s=null;for(let l=0;s==null&&l{let c={relativePath:l===void 0?o.path||"":l,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};c.relativePath.startsWith("/")&&(Fn(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let h=ml([r,c.relativePath]),d=n.concat(c);o.children&&o.children.length>0&&(Fn(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+h+'".')),p8(o.children,e,d,h)),!(o.path==null&&!o.index)&&e.push({path:h,score:sQ(h,o.index),routesMeta:d})};return t.forEach((o,s)=>{var l;if(o.path===""||!((l=o.path)!=null&&l.includes("?")))i(o,s);else for(let c of m8(o.path))i(o,s,c)}),e}function m8(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let s=m8(r.join("/")),l=[];return l.push(...s.map(c=>c===""?o:[o,c].join("/"))),i&&l.push(...s),l.map(c=>t.startsWith("/")&&c===""?"/":c)}function JX(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:aQ(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const tQ=/^:\w+$/,eQ=3,nQ=2,rQ=1,iQ=10,oQ=-2,DR=t=>t==="*";function sQ(t,e){let n=t.split("/"),r=n.length;return n.some(DR)&&(r+=oQ),e&&(r+=nQ),n.filter(i=>!DR(i)).reduce((i,o)=>i+(tQ.test(o)?eQ:o===""?rQ:iQ),r)}function aQ(t,e){return t.length===e.length&&t.slice(0,-1).every((r,i)=>r===e[i])?t[t.length-1]-e[e.length-1]:0}function lQ(t,e){let{routesMeta:n}=t,r={},i="/",o=[];for(let s=0;s{if(d==="*"){let m=l[p]||"";s=o.slice(0,o.length-m.length).replace(/(.)\/+$/,"$1")}return h[d]=dQ(l[p]||"",d),h},{}),pathname:o,pathnameBase:s,pattern:t}}function uQ(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),sk(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let r=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(s,l)=>(r.push(l),"/([^\\/]+)"));return t.endsWith("*")?(r.push("*"),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),r]}function hQ(t){try{return decodeURI(t)}catch(e){return sk(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function dQ(t,e){try{return decodeURIComponent(t)}catch(n){return sk(!1,'The value for the URL param "'+e+'" will not be decoded because'+(' the string "'+t+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),t}}function ak(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}function fQ(t,e){e===void 0&&(e="/");let{pathname:n,search:r="",hash:i=""}=typeof t=="string"?Rd(t):t;return{pathname:n?n.startsWith("/")?n:pQ(n,e):e,search:gQ(r),hash:vQ(i)}}function pQ(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Bw(t,e,n,r){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` 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 lk(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function ck(t,e,n,r){r===void 0&&(r=!1);let i;typeof t=="string"?i=Rd(t):(i=zm({},t),Fn(!i.pathname||!i.pathname.includes("?"),Bw("?","pathname","search",i)),Fn(!i.pathname||!i.pathname.includes("#"),Bw("#","pathname","hash",i)),Fn(!i.search||!i.search.includes("#"),Bw("#","search","hash",i)));let o=t===""||i.pathname==="",s=o?"/":i.pathname,l;if(r||s==null)l=n;else{let p=e.length-1;if(s.startsWith("..")){let m=s.split("/");for(;m[0]==="..";)m.shift(),p-=1;i.pathname=m.join("/")}l=p>=0?e[p]:"/"}let c=fQ(i,l),h=s&&s!=="/"&&s.endsWith("/"),d=(o||s===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(h||d)&&(c.pathname+="/"),c}const ml=t=>t.join("/").replace(/\/\/+/g,"/"),mQ=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),gQ=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,vQ=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function yQ(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const g8=["post","put","patch","delete"];new Set(g8);const _Q=["get",...g8];new Set(_Q);/** - * React Router v6.14.2 - * - * 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 n0(){return n0=Object.assign?Object.assign.bind():function(t){for(var e=1;ec.pathnameBase)),s=U.useRef(!1);return _8(()=>{s.current=!0}),U.useCallback(function(c,h){if(h===void 0&&(h={}),!s.current)return;if(typeof c=="number"){n.go(c);return}let d=ck(c,JSON.parse(o),i,h.relative==="path");t==null&&e!=="/"&&(d.pathname=d.pathname==="/"?e:ml([e,d.pathname])),(h.replace?n.replace:n.push)(d,h.state,h)},[e,n,o,i,t])}function ju(){let{matches:t}=U.useContext(Ta),e=t[t.length-1];return e?e.params:{}}function hk(t,e){let{relative:n}=e===void 0?{}:e,{matches:r}=U.useContext(Ta),{pathname:i}=Un(),o=JSON.stringify(lk(r).map(s=>s.pathnameBase));return U.useMemo(()=>ck(t,JSON.parse(o),i,n==="path"),[t,o,i,n])}function wQ(t,e){return SQ(t,e)}function SQ(t,e,n){Ru()||Fn(!1);let{navigator:r}=U.useContext(Au),{matches:i}=U.useContext(Ta),o=i[i.length-1],s=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=Un(),h;if(e){var d;let _=typeof e=="string"?Rd(e):e;l==="/"||(d=_.pathname)!=null&&d.startsWith(l)||Fn(!1),h=_}else h=c;let p=h.pathname||"/",m=l==="/"?p:p.slice(l.length)||"/",v=QX(t,{pathname:m}),y=kQ(v&&v.map(_=>Object.assign({},_,{params:Object.assign({},s,_.params),pathname:ml([l,r.encodeLocation?r.encodeLocation(_.pathname).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?l:ml([l,r.encodeLocation?r.encodeLocation(_.pathnameBase).pathname:_.pathnameBase])})),i,n);return e&&y?U.createElement(s1.Provider,{value:{location:n0({pathname:"/",search:"",hash:"",state:null,key:"default"},h),navigationType:Ja.Pop}},y):y}function TQ(){let t=AQ(),e=yQ(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},o=null;return U.createElement(U.Fragment,null,U.createElement("h2",null,"Unexpected Application Error!"),U.createElement("h3",{style:{fontStyle:"italic"}},e),n?U.createElement("pre",{style:i},n):null,o)}const EQ=U.createElement(TQ,null);class OQ extends U.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error||n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error?U.createElement(Ta.Provider,{value:this.props.routeContext},U.createElement(y8.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function CQ(t){let{routeContext:e,match:n,children:r}=t,i=U.useContext(uk);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),U.createElement(Ta.Provider,{value:e},r)}function kQ(t,e,n){var r;if(e===void 0&&(e=[]),n===void 0&&(n=null),t==null){var i;if((i=n)!=null&&i.errors)t=n.matches;else return null}let o=t,s=(r=n)==null?void 0:r.errors;if(s!=null){let l=o.findIndex(c=>c.route.id&&(s==null?void 0:s[c.route.id]));l>=0||Fn(!1),o=o.slice(0,Math.min(o.length,l+1))}return o.reduceRight((l,c,h)=>{let d=c.route.id?s==null?void 0:s[c.route.id]:null,p=null;n&&(p=c.route.errorElement||EQ);let m=e.concat(o.slice(0,h+1)),v=()=>{let y;return d?y=p:c.route.Component?y=U.createElement(c.route.Component,null):c.route.element?y=c.route.element:y=l,U.createElement(CQ,{match:c,routeContext:{outlet:l,matches:m,isDataRoute:n!=null},children:y})};return n&&(c.route.ErrorBoundary||c.route.errorElement||h===0)?U.createElement(OQ,{location:n.location,revalidation:n.revalidation,component:p,error:d,children:v(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):v()},null)}var lT;(function(t){t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate"})(lT||(lT={}));var Um;(function(t){t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId"})(Um||(Um={}));function PQ(t){let e=U.useContext(uk);return e||Fn(!1),e}function LQ(t){let e=U.useContext(v8);return e||Fn(!1),e}function MQ(t){let e=U.useContext(Ta);return e||Fn(!1),e}function b8(t){let e=MQ(),n=e.matches[e.matches.length-1];return n.route.id||Fn(!1),n.route.id}function AQ(){var t;let e=U.useContext(y8),n=LQ(Um.UseRouteError),r=b8(Um.UseRouteError);return e||((t=n.errors)==null?void 0:t[r])}function RQ(){let{router:t}=PQ(lT.UseNavigateStable),e=b8(Um.UseNavigateStable),n=U.useRef(!1);return _8(()=>{n.current=!0}),U.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?t.navigate(i):t.navigate(i,n0({fromRouteId:e},o)))},[t,e])}function dk(t){let{to:e,replace:n,state:r,relative:i}=t;Ru()||Fn(!1);let{matches:o}=U.useContext(Ta),{pathname:s}=Un(),l=ws(),c=ck(e,lk(o).map(d=>d.pathnameBase),s,i==="path"),h=JSON.stringify(c);return U.useEffect(()=>l(JSON.parse(h),{replace:n,state:r,relative:i}),[l,h,i,n,r]),null}function Ce(t){Fn(!1)}function jQ(t){let{basename:e="/",children:n=null,location:r,navigationType:i=Ja.Pop,navigator:o,static:s=!1}=t;Ru()&&Fn(!1);let l=e.replace(/^\/*/,"/"),c=U.useMemo(()=>({basename:l,navigator:o,static:s}),[l,o,s]);typeof r=="string"&&(r=Rd(r));let{pathname:h="/",search:d="",hash:p="",state:m=null,key:v="default"}=r,y=U.useMemo(()=>{let _=ak(h,l);return _==null?null:{location:{pathname:_,search:d,hash:p,state:m,key:v},navigationType:i}},[l,h,d,p,m,v,i]);return y==null?null:U.createElement(Au.Provider,{value:c},U.createElement(s1.Provider,{children:n,value:y}))}function a1(t){let{children:e,location:n}=t;return wQ(cT(e),n)}var IR;(function(t){t[t.pending=0]="pending",t[t.success=1]="success",t[t.error=2]="error"})(IR||(IR={}));new Promise(()=>{});function cT(t,e){e===void 0&&(e=[]);let n=[];return U.Children.forEach(t,(r,i)=>{if(!U.isValidElement(r))return;let o=[...e,i];if(r.type===U.Fragment){n.push.apply(n,cT(r.props.children,o));return}r.type!==Ce&&Fn(!1),!r.props.index||!r.props.children||Fn(!1);let s={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=cT(r.props.children,o)),n.push(s)}),n}/** - * React Router DOM v6.14.2 - * - * 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 r0(){return r0=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function NQ(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function DQ(t,e){return t.button===0&&(!e||e==="_self")&&!NQ(t)}const IQ=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],FQ=["aria-current","caseSensitive","className","end","style","to","children"],BQ="startTransition",FR=PV[BQ];function w8(t){let{basename:e,children:n,future:r,window:i}=t,o=U.useRef();o.current==null&&(o.current=qX({window:i,v5Compat:!0}));let s=o.current,[l,c]=U.useState({action:s.action,location:s.location}),{v7_startTransition:h}=r||{},d=U.useCallback(p=>{h&&FR?FR(()=>c(p)):c(p)},[c,h]);return U.useLayoutEffect(()=>s.listen(d),[s,d]),U.createElement(jQ,{basename:e,children:n,location:l.location,navigationType:l.action,navigator:s})}const $Q=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",zQ=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,nn=U.forwardRef(function(e,n){let{onClick:r,relative:i,reloadDocument:o,replace:s,state:l,target:c,to:h,preventScrollReset:d}=e,p=x8(e,IQ),{basename:m}=U.useContext(Au),v,y=!1;if(typeof h=="string"&&zQ.test(h)&&(v=h,$Q))try{let w=new URL(window.location.href),E=h.startsWith("//")?new URL(w.protocol+h):new URL(h),O=ak(E.pathname,m);E.origin===w.origin&&O!=null?h=O+E.search+E.hash:y=!0}catch{}let _=bQ(h,{relative:i}),T=UQ(h,{replace:s,state:l,target:c,preventScrollReset:d,relative:i});function x(w){r&&r(w),w.defaultPrevented||T(w)}return U.createElement("a",r0({},p,{href:v||_,onClick:y||o?r:x,ref:n,target:c}))}),S8=U.forwardRef(function(e,n){let{"aria-current":r="page",caseSensitive:i=!1,className:o="",end:s=!1,style:l,to:c,children:h}=e,d=x8(e,FQ),p=hk(c,{relative:d.relative}),m=Un(),v=U.useContext(v8),{navigator:y}=U.useContext(Au),_=y.encodeLocation?y.encodeLocation(p).pathname:p.pathname,T=m.pathname,x=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;i||(T=T.toLowerCase(),x=x?x.toLowerCase():null,_=_.toLowerCase());let w=T===_||!s&&T.startsWith(_)&&T.charAt(_.length)==="/",E=x!=null&&(x===_||!s&&x.startsWith(_)&&x.charAt(_.length)==="/"),O=w?r:void 0,k;typeof o=="function"?k=o({isActive:w,isPending:E}):k=[o,w?"active":null,E?"pending":null].filter(Boolean).join(" ");let P=typeof l=="function"?l({isActive:w,isPending:E}):l;return U.createElement(nn,r0({},d,{"aria-current":O,className:k,ref:n,style:P,to:c}),typeof h=="function"?h({isActive:w,isPending:E}):h)});var BR;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher"})(BR||(BR={}));var $R;(function(t){t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})($R||($R={}));function UQ(t,e){let{target:n,replace:r,state:i,preventScrollReset:o,relative:s}=e===void 0?{}:e,l=ws(),c=Un(),h=hk(t,{relative:s});return U.useCallback(d=>{if(DQ(d,n)){d.preventDefault();let p=r!==void 0?r:e0(c)===e0(h);l(t,{replace:p,state:i,preventScrollReset:o,relative:s})}},[c,l,h,r,i,n,t,o,s])}const VQ="shlink-web-client",HQ="A React-based progressive web application for shlink",WQ="/shlink-web-client/feature/external-web-component",YQ="https://github.com/shlinkio/shlink-web-client",ZQ="MIT",GQ={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:"vitest run --run","test:watch":"vitest --watch","test:ci":"npm run test -- --coverage","test:verbose":"npm run test -- --verbose"},qQ={"@fortawesome/fontawesome-free":"^6.4.2","@fortawesome/fontawesome-svg-core":"^6.4.2","@fortawesome/free-brands-svg-icons":"^6.4.2","@fortawesome/free-regular-svg-icons":"^6.4.2","@fortawesome/free-solid-svg-icons":"^6.4.2","@fortawesome/react-fontawesome":"^0.2.0","@json2csv/plainjs":"^7.0.1","@reduxjs/toolkit":"^1.9.5","@shlinkio/shlink-frontend-kit":"^0.2.0","@shlinkio/shlink-web-component":"^0.1.0",bootstrap:"5.2.3",bottlejs:"^2.0.1","chart.js":"^4.3.3",classnames:"^2.3.2","compare-versions":"^6.1.0",csvtojson:"^2.0.10","date-fns":"^2.30.0",leaflet:"^1.9.4",ramda:"^0.27.2",react:"^18.2.0","react-dom":"^18.2.0","react-external-link":"^2.2.0","react-redux":"^8.1.2","react-router-dom":"^6.14.2",reactstrap:"^9.2.0","redux-localstorage-simple":"^2.5.1",uuid:"^9.0.0","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"},KQ={"@shlinkio/eslint-config-js-coding-standard":"~2.2.0","@shlinkio/stylelint-config-css-coding-standard":"~1.1.1","@testing-library/jest-dom":"^5.17.0","@testing-library/react":"^14.0.0","@testing-library/user-event":"^14.4.3","@total-typescript/shoehorn":"^0.1.1","@types/leaflet":"^1.9.3","@types/ramda":"^0.27.66","@types/react":"^18.2.19","@types/react-dom":"^18.2.7","@types/uuid":"^9.0.2","@vitejs/plugin-react":"^4.0.4","@vitest/coverage-v8":"^0.34.1","adm-zip":"^0.5.10",chalk:"^5.3.0",eslint:"^8.46.0",history:"^5.3.0",jsdom:"^22.1.0",sass:"^1.64.2",stylelint:"^15.10.2",typescript:"^5.1.6",vite:"^4.4.9","vite-plugin-pwa":"^0.16.4",vitest:"^0.34.1"},XQ=[">0.2%","not dead","not ie <= 11","not op_mini all"],i0={name:VQ,description:HQ,private:!1,homepage:WQ,repository:YQ,license:ZQ,scripts:GQ,dependencies:qQ,devDependencies:KQ,browserslist:XQ};var Yo,gs=".",T8="function",E8="string",O8="__global__",fk="Provider",QQ=0,pk=Array.prototype.slice,JQ=function(e,n){var r=e[n];if(r===void 0&&Yo.config.strict)throw new Error("Bottle was unable to resolve a service. `"+n+"` is undefined.");return r},l1=function(e){var n;return this.nested[e]||(n=Yo.pop(),this.nested[e]=n,this.factory(e,function(){return n.container})),this.nested[e]},C8=function(e){return e.split(gs).reduce(JQ,this)},tJ=function(e,n,r,i){var o={configurable:!0,enumerable:!0};return e.length?o.get=function(){var l=0,c=function(d){if(d)throw d;e[l]&&e[l++](r,c)};return c(),r}:(o.value=r,o.writable=!0),Object.defineProperty(i,n,o),i[n]},eJ=function(e,n){var r,i;return typeof e===T8&&(n=e,e=O8),r=e.split(gs),i=r.shift(),r.length?l1.call(this,i).middleware(r.join(gs),n):(this.middlewares[i]||(this.middlewares[i]=[]),this.middlewares[i].push(n)),this},nJ=function(e,n){return n(e)},zR=function(e,n){return(e[n]||[]).concat(e.__global__||[])},rJ=function(e,n){var r,i,o,s,l;return this.id,o=this.container,s=this.decorators,l=this.middlewares,r=e+fk,i=Object.create(null),i[r]={configurable:!0,enumerable:!0,get:function(){var h=new n;return delete o[r],o[r]=h,h}},i[e]={configurable:!0,enumerable:!0,get:function(){var h=o[r],d;return h&&(d=zR(s,e).reduce(nJ,h.$get(o)),delete o[r],delete o[e]),d===void 0?d:tJ(zR(l,e),e,d,o)}},Object.defineProperties(o,i),this},k8=function(e,n){var r,i;return r=e.split(gs),this.providerMap[e]&&r.length===1&&!this.container[e+fk]?console.error(e+" provider already instantiated."):(this.originalProviders[e]=n,this.providerMap[e]=!0,i=r.shift(),r.length?(l1.call(this,i).provider(r.join(gs),n),this):rJ.call(this,i,n))},mk=function(e,n){return k8.call(this,e,function(){this.$get=n})},P8=function(e,n,r){var i=arguments.length>3?pk.call(arguments,3):[],o=this;return mk.call(this,e,function(){var l=n,c=i.map(C8,o.container);return r?new(n.bind.apply(n,[null].concat(c))):l.apply(null,c)})},iJ=function(e,n){return P8.apply(this,[e,n,!0].concat(pk.call(arguments,2)))},oJ=function(e,n){return P8.apply(this,[e,n,!1].concat(pk.call(arguments,2)))},L8=function(e,n){Object.defineProperty(this,e,{configurable:!0,enumerable:!0,value:n,writable:!0})},M8=function(e,n){var r=e[n];return r||(r={},L8.call(e,n,r)),r},sJ=function(e,n){var r;return r=e.split(gs),e=r.pop(),L8.call(r.reduce(M8,this.container),e,n),this},aJ=function(e,n){Object.defineProperty(this,e,{configurable:!1,enumerable:!0,value:n,writable:!1})},lJ=function(e,n){var r=e.split(gs);return e=r.pop(),aJ.call(r.reduce(M8,this.container),e,n),this},A8=function(e,n){var r,i;return typeof e===T8&&(n=e,e=O8),r=e.split(gs),i=r.shift(),r.length?l1.call(this,i).decorator(r.join(gs),n):(this.decorators[i]||(this.decorators[i]=[]),this.decorators[i].push(n)),this},cJ=function(e){return this.deferred.push(e),this},uJ=function(e){return(e||[]).map(C8,this.container)},hJ=function(e,n){return mk.call(this,e,function(i){return{instance:n.bind(n,i)}})},dJ=function(e){return!/^\$(?:decorator|register|list)$|Provider$/.test(e)},gk=function(e){return Object.keys(e||this.container||{}).filter(dJ)},o0={},fJ=function(e){var n;return typeof e===E8?(n=o0[e],n||(o0[e]=n=new Yo,n.constant("BOTTLE_NAME",e)),n):new Yo},pJ=function(e){typeof e===E8?delete o0[e]:o0={}},R8=function(e){var n=e.$value===void 0?e:e.$value;return this[e.$type||"service"].apply(this,[e.$name,n].concat(e.$inject||[]))},UR=function(e){delete this.providerMap[e],delete this.container[e],delete this.container[e+fk]},mJ=function(e){var n=this.originalProviders,r=Array.isArray(e);Object.keys(this.originalProviders).forEach(function(o){if(!(r&&e.indexOf(o)===-1)){var s=o.split(gs);s.length>1&&s.forEach(UR,l1.call(this,s[0])),UR.call(this,o),this.provider(o,n[o])}},this)},gJ=function(e){return this.deferred.forEach(function(r){r(e)}),this};Yo=function t(e){if(!(this instanceof t))return t.pop(e);this.id=QQ++,this.decorators={},this.middlewares={},this.nested={},this.providerMap={},this.originalProviders={},this.deferred=[],this.container={$decorator:A8.bind(this),$register:R8.bind(this),$list:gk.bind(this)}};Yo.prototype={constant:lJ,decorator:A8,defer:cJ,digest:uJ,factory:mk,instanceFactory:hJ,list:gk,middleware:eJ,provider:k8,resetProviders:mJ,register:R8,resolve:gJ,service:iJ,serviceFactory:oJ,value:sJ};Yo.pop=fJ;Yo.clear=pJ;Yo.list=gk;Yo.config={strict:!1};const vJ=Yo;function Ge(t){return t!=null&&typeof t=="object"&&t["@@functional/placeholder"]===!0}function Tn(t){return function e(n){return arguments.length===0||Ge(n)?e:t.apply(this,arguments)}}function Xe(t){return function e(n,r){switch(arguments.length){case 0:return e;case 1:return Ge(n)?e:Tn(function(i){return t(n,i)});default:return Ge(n)&&Ge(r)?e:Ge(n)?Tn(function(i){return t(i,r)}):Ge(r)?Tn(function(i){return t(n,i)}):t(n,r)}}}function yJ(t,e){t=t||[],e=e||[];var n,r=t.length,i=e.length,o=[];for(n=0;n=arguments.length)?l=e[s]:(l=arguments[i],i+=1),r[s]=l,Ge(l)||(o-=1),s+=1}return o<=0?n.apply(this,r):Ag(o,j8(t,r,n))}}var _J=Xe(function(e,n){return e===1?Tn(n):Ag(e,j8(e,[],n))});const uT=_J;function Rg(t){return function e(n,r,i){switch(arguments.length){case 0:return e;case 1:return Ge(n)?e:Xe(function(o,s){return t(n,o,s)});case 2:return Ge(n)&&Ge(r)?e:Ge(n)?Xe(function(o,s){return t(o,r,s)}):Ge(r)?Xe(function(o,s){return t(n,o,s)}):Tn(function(o){return t(n,r,o)});default:return Ge(n)&&Ge(r)&&Ge(i)?e:Ge(n)&&Ge(r)?Xe(function(o,s){return t(o,s,i)}):Ge(n)&&Ge(i)?Xe(function(o,s){return t(o,r,s)}):Ge(r)&&Ge(i)?Xe(function(o,s){return t(n,o,s)}):Ge(n)?Tn(function(o){return t(o,r,i)}):Ge(r)?Tn(function(o){return t(n,o,i)}):Ge(i)?Tn(function(o){return t(n,r,o)}):t(n,r,i)}}}const c1=Array.isArray||function(e){return e!=null&&e.length>=0&&Object.prototype.toString.call(e)==="[object Array]"};function bJ(t){return t!=null&&typeof t["@@transducer/step"]=="function"}function N8(t,e,n){return function(){if(arguments.length===0)return n();var r=Array.prototype.slice.call(arguments,0),i=r.pop();if(!c1(i)){for(var o=0;o0?e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1):!1});const SJ=wJ;var TJ=function(){function t(e){this.f=e}return t.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},t.prototype["@@transducer/result"]=function(e){return e},t.prototype["@@transducer/step"]=function(e,n){return this.f(e,n)},t}();function EJ(t){return new TJ(t)}var OJ=Xe(function(e,n){return Ag(e.length,function(){return e.apply(n,arguments)})});const CJ=OJ;function kJ(t,e,n){for(var r=0,i=n.length;r=0;)n=ZR[r],as(n,e)&&!jJ(i,n)&&(i[i.length]=n),r-=1;return i});const Vm=NJ;var DJ=Xe(N8(["fantasy-land/map","map"],MJ,function(e,n){switch(Object.prototype.toString.call(n)){case"[object Function]":return uT(n.length,function(){return e.call(this,n.apply(this,arguments))});case"[object Object]":return jg(function(r,i){return r[i]=e(n[i]),r},{},Vm(n));default:return xJ(e,n)}}));const yk=DJ,IJ=Number.isInteger||function(e){return e<<0===e};var FJ=Xe(function(e,n){var r=e<0?n.length+e:e;return vk(n)?n.charAt(r):n[r]});const BJ=FJ;var $J=Xe(function(e,n){return e.map(function(r){for(var i=n,o=0,s;o=0;){if(n[o]===t)return r[o]===e;o-=1}switch(i){case"Map":return t.size!==e.size?!1:QR(t.entries(),e.entries(),n.concat([t]),r.concat([e]));case"Set":return t.size!==e.size?!1:QR(t.values(),e.values(),n.concat([t]),r.concat([e]));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=Vm(t);if(s.length!==Vm(e).length)return!1;var l=n.concat([t]),c=r.concat([e]);for(o=s.length-1;o>=0;){var h=s[o];if(!(as(h,e)&&bk(e[h],t[h],l,c)))return!1;o-=1}return!0}var gtt=Xe(function(e,n){return bk(e,n,[],[])});const vtt=gtt;function ytt(t){return function(){return!t.apply(this,arguments)}}function _tt(t,e){for(var n=0,r=e.length,i=[];n!!(t!=null&&t.url)&&!!(t!=null&&t.apiKey),qp=t=>!!(t!=null&&t.id),H8=t=>!!(t!=null&&t.version),Ytt=t=>!!(t!=null&&t.serverNotFound),Ztt=t=>qp(t)?t.id:"",Gtt=t=>ztt(["id","autoConnect"],t);var qtt={prefix:"fas",iconName:"calendar-days",icon:[448,512,["calendar-alt"],"f073","M128 0c17.7 0 32 14.3 32 32V64H288V32c0-17.7 14.3-32 32-32s32 14.3 32 32V64h48c26.5 0 48 21.5 48 48v48H0V112C0 85.5 21.5 64 48 64H96V32c0-17.7 14.3-32 32-32zM0 192H448V464c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V192zm64 80v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V272c0-8.8-7.2-16-16-16H80c-8.8 0-16 7.2-16 16zm128 0v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V272c0-8.8-7.2-16-16-16H208c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V272c0-8.8-7.2-16-16-16H336zM64 400v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V400c0-8.8-7.2-16-16-16H80c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V400c0-8.8-7.2-16-16-16H208zm112 16v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V400c0-8.8-7.2-16-16-16H336c-8.8 0-16 7.2-16 16z"]},Ktt=qtt,Xtt={prefix:"fas",iconName:"circle-minus",icon:[512,512,["minus-circle"],"f056","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM184 232H328c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z"]},xk=Xtt,Qtt={prefix:"fas",iconName:"file-csv",icon:[512,512,[],"f6dd","M0 64C0 28.7 28.7 0 64 0H224V128c0 17.7 14.3 32 32 32H384V304H176c-35.3 0-64 28.7-64 64V512H64c-35.3 0-64-28.7-64-64V64zm384 64H256V0L384 128zM200 352h16c22.1 0 40 17.9 40 40v8c0 8.8-7.2 16-16 16s-16-7.2-16-16v-8c0-4.4-3.6-8-8-8H200c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8h16c4.4 0 8-3.6 8-8v-8c0-8.8 7.2-16 16-16s16 7.2 16 16v8c0 22.1-17.9 40-40 40H200c-22.1 0-40-17.9-40-40V392c0-22.1 17.9-40 40-40zm133.1 0H368c8.8 0 16 7.2 16 16s-7.2 16-16 16H333.1c-7.2 0-13.1 5.9-13.1 13.1c0 5.2 3 9.9 7.8 12l37.4 16.6c16.3 7.2 26.8 23.4 26.8 41.2c0 24.9-20.2 45.1-45.1 45.1H304c-8.8 0-16-7.2-16-16s7.2-16 16-16h42.9c7.2 0 13.1-5.9 13.1-13.1c0-5.2-3-9.9-7.8-12l-37.4-16.6c-16.3-7.2-26.8-23.4-26.8-41.2c0-24.9 20.2-45.1 45.1-45.1zm98.9 0c8.8 0 16 7.2 16 16v31.6c0 23 5.5 45.6 16 66c10.5-20.3 16-42.9 16-66V368c0-8.8 7.2-16 16-16s16 7.2 16 16v31.6c0 34.7-10.3 68.7-29.6 97.6l-5.1 7.7c-3 4.5-8 7.1-13.3 7.1s-10.3-2.7-13.3-7.1l-5.1-7.7c-19.3-28.9-29.6-62.9-29.6-97.6V368c0-8.8 7.2-16 16-16z"]},Jtt={prefix:"fas",iconName:"pencil",icon:[512,512,[9999,61504,"pencil-alt"],"f303","M410.3 231l11.3-11.3-33.9-33.9-62.1-62.1L291.7 89.8l-11.3 11.3-22.6 22.6L58.6 322.9c-10.4 10.4-18 23.3-22.2 37.4L1 480.7c-2.5 8.4-.2 17.5 6.1 23.7s15.3 8.5 23.7 6.1l120.3-35.4c14.1-4.2 27-11.8 37.4-22.2L387.7 253.7 410.3 231zM160 399.4l-9.1 22.7c-4 3.1-8.5 5.4-13.3 6.9L59.4 452l23-78.1c1.4-4.9 3.8-9.4 6.9-13.3l22.7-9.1v32c0 8.8 7.2 16 16 16h32zM362.7 18.7L348.3 33.2 325.7 55.8 314.3 67.1l33.9 33.9 62.1 62.1 33.9 33.9 11.3-11.3 22.6-22.6 14.5-14.5c25-25 25-65.5 0-90.5L453.3 18.7c-25-25-65.5-25-90.5 0zm-47.4 168l-144 144c-6.2 6.2-16.4 6.2-22.6 0s-6.2-16.4 0-22.6l144-144c6.2-6.2 16.4-6.2 22.6 0s6.2 16.4 0 22.6z"]},tet=Jtt,W8={prefix:"fas",iconName:"circle-notch",icon:[512,512,[],"f1ce","M222.7 32.1c5 16.9-4.6 34.8-21.5 39.8C121.8 95.6 64 169.1 64 256c0 106 86 192 192 192s192-86 192-192c0-86.9-57.8-160.4-137.1-184.1c-16.9-5-26.6-22.9-21.5-39.8s22.9-26.6 39.8-21.5C434.9 42.1 512 140 512 256c0 141.4-114.6 256-256 256S0 397.4 0 256C0 140 77.1 42.1 182.9 10.6c16.9-5 34.8 4.6 39.8 21.5z"]},eet={prefix:"fas",iconName:"bars",icon:[448,512,["navicon"],"f0c9","M0 96C0 78.3 14.3 64 32 64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z"]},Y8={prefix:"fas",iconName:"list",icon:[512,512,["list-squares"],"f03a","M40 48C26.7 48 16 58.7 16 72v48c0 13.3 10.7 24 24 24H88c13.3 0 24-10.7 24-24V72c0-13.3-10.7-24-24-24H40zM192 64c-17.7 0-32 14.3-32 32s14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H192zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H192zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H192zM16 232v48c0 13.3 10.7 24 24 24H88c13.3 0 24-10.7 24-24V232c0-13.3-10.7-24-24-24H40c-13.3 0-24 10.7-24 24zM40 368c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24H88c13.3 0 24-10.7 24-24V392c0-13.3-10.7-24-24-24H40z"]},net={prefix:"fas",iconName:"circle-dot",icon:[512,512,[128280,"dot-circle"],"f192","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-352a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"]},ret=net,iet={prefix:"fas",iconName:"pen-to-square",icon:[512,512,["edit"],"f044","M471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7zm-299.2 220c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3 172.4 241.7zM96 64C43 64 0 107 0 160V416c0 53 43 96 96 96H352c53 0 96-43 96-96V320c0-17.7-14.3-32-32-32s-32 14.3-32 32v96c0 17.7-14.3 32-32 32H96c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H96z"]},wk=iet,oet={prefix:"fas",iconName:"plug",icon:[384,512,[128268],"f1e6","M96 0C78.3 0 64 14.3 64 32v96h64V32c0-17.7-14.3-32-32-32zM288 0c-17.7 0-32 14.3-32 32v96h64V32c0-17.7-14.3-32-32-32zM32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32v32c0 77.4 55 142 128 156.8V480c0 17.7 14.3 32 32 32s32-14.3 32-32V412.8C297 398 352 333.4 352 256V224c17.7 0 32-14.3 32-32s-14.3-32-32-32H32z"]},set={prefix:"fas",iconName:"globe",icon:[512,512,[127760],"f0ac","M352 256c0 22.2-1.2 43.6-3.3 64H163.3c-2.2-20.4-3.3-41.8-3.3-64s1.2-43.6 3.3-64H348.7c2.2 20.4 3.3 41.8 3.3 64zm28.8-64H503.9c5.3 20.5 8.1 41.9 8.1 64s-2.8 43.5-8.1 64H380.8c2.1-20.6 3.2-42 3.2-64s-1.1-43.4-3.2-64zm112.6-32H376.7c-10-63.9-29.8-117.4-55.3-151.6c78.3 20.7 142 77.5 171.9 151.6zm-149.1 0H167.7c6.1-36.4 15.5-68.6 27-94.7c10.5-23.6 22.2-40.7 33.5-51.5C239.4 3.2 248.7 0 256 0s16.6 3.2 27.8 13.8c11.3 10.8 23 27.9 33.5 51.5c11.6 26 20.9 58.2 27 94.7zm-209 0H18.6C48.6 85.9 112.2 29.1 190.6 8.4C165.1 42.6 145.3 96.1 135.3 160zM8.1 192H131.2c-2.1 20.6-3.2 42-3.2 64s1.1 43.4 3.2 64H8.1C2.8 299.5 0 278.1 0 256s2.8-43.5 8.1-64zM194.7 446.6c-11.6-26-20.9-58.2-27-94.6H344.3c-6.1 36.4-15.5 68.6-27 94.6c-10.5 23.6-22.2 40.7-33.5 51.5C272.6 508.8 263.3 512 256 512s-16.6-3.2-27.8-13.8c-11.3-10.8-23-27.9-33.5-51.5zM135.3 352c10 63.9 29.8 117.4 55.3 151.6C112.2 482.9 48.6 426.1 18.6 352H135.3zm358.1 0c-30 74.1-93.6 130.9-171.9 151.6c25.5-34.2 45.2-87.7 55.3-151.6H493.4z"]},aet={prefix:"fas",iconName:"ban",icon:[512,512,[128683,"cancel"],"f05e","M367.2 412.5L99.5 144.8C77.1 176.1 64 214.5 64 256c0 106 86 192 192 192c41.5 0 79.9-13.1 111.2-35.5zm45.3-45.3C434.9 335.9 448 297.5 448 256c0-106-86-192-192-192c-41.5 0-79.9 13.1-111.2 35.5L412.5 367.2zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z"]},JR={prefix:"fas",iconName:"server",icon:[512,512,[],"f233","M64 32C28.7 32 0 60.7 0 96v64c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zm280 72a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm48 24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0zM64 288c-35.3 0-64 28.7-64 64v64c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V352c0-35.3-28.7-64-64-64H64zm280 72a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm56 24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0z"]},cet={prefix:"fas",iconName:"file-arrow-up",icon:[384,512,["file-upload"],"f574","M64 0C28.7 0 0 28.7 0 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V160H256c-17.7 0-32-14.3-32-32V0H64zM256 0V128H384L256 0zM216 408c0 13.3-10.7 24-24 24s-24-10.7-24-24V305.9l-31 31c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l72-72c9.4-9.4 24.6-9.4 33.9 0l72 72c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-31-31V408z"]},uet=cet,het={prefix:"fas",iconName:"map-location-dot",icon:[576,512,["map-marked-alt"],"f5a0","M408 120c0 54.6-73.1 151.9-105.2 192c-7.7 9.6-22 9.6-29.6 0C241.1 271.9 168 174.6 168 120C168 53.7 221.7 0 288 0s120 53.7 120 120zm8 80.4c3.5-6.9 6.7-13.8 9.6-20.6c.5-1.2 1-2.5 1.5-3.7l116-46.4C558.9 123.4 576 135 576 152V422.8c0 9.8-6 18.6-15.1 22.3L416 503V200.4zM137.6 138.3c2.4 14.1 7.2 28.3 12.8 41.5c2.9 6.8 6.1 13.7 9.6 20.6V451.8L32.9 502.7C17.1 509 0 497.4 0 480.4V209.6c0-9.8 6-18.6 15.1-22.3l122.6-49zM327.8 332c13.9-17.4 35.7-45.7 56.2-77V504.3L192 449.4V255c20.5 31.3 42.3 59.6 56.2 77c20.5 25.6 59.1 25.6 79.6 0zM288 152a40 40 0 1 0 0-80 40 40 0 1 0 0 80z"]},Z8=het,det={prefix:"fas",iconName:"caret-up",icon:[320,512,[],"f0d8","M182.6 137.4c-12.5-12.5-32.8-12.5-45.3 0l-128 128c-9.2 9.2-11.9 22.9-6.9 34.9s16.6 19.8 29.6 19.8H288c12.9 0 24.6-7.8 29.6-19.8s2.2-25.7-6.9-34.9l-128-128z"]},fet={prefix:"fas",iconName:"palette",icon:[512,512,[127912],"f53f","M512 256c0 .9 0 1.8 0 2.7c-.4 36.5-33.6 61.3-70.1 61.3H344c-26.5 0-48 21.5-48 48c0 3.4 .4 6.7 1 9.9c2.1 10.2 6.5 20 10.8 29.9c6.1 13.8 12.1 27.5 12.1 42c0 31.8-21.6 60.7-53.4 62c-3.5 .1-7 .2-10.6 .2C114.6 512 0 397.4 0 256S114.6 0 256 0S512 114.6 512 256zM128 288a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm0-96a32 32 0 1 0 0-64 32 32 0 1 0 0 64zM288 96a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm96 96a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"]},pet={prefix:"fas",iconName:"arrow-down-wide-short",icon:[576,512,["sort-amount-asc","sort-amount-down"],"f160","M151.6 469.6C145.5 476.2 137 480 128 480s-17.5-3.8-23.6-10.4l-88-96c-11.9-13-11.1-33.3 2-45.2s33.3-11.1 45.2 2L96 365.7V64c0-17.7 14.3-32 32-32s32 14.3 32 32V365.7l32.4-35.4c11.9-13 32.2-13.9 45.2-2s13.9 32.2 2 45.2l-88 96zM320 480c-17.7 0-32-14.3-32-32s14.3-32 32-32h32c17.7 0 32 14.3 32 32s-14.3 32-32 32H320zm0-128c-17.7 0-32-14.3-32-32s14.3-32 32-32h96c17.7 0 32 14.3 32 32s-14.3 32-32 32H320zm0-128c-17.7 0-32-14.3-32-32s14.3-32 32-32H480c17.7 0 32 14.3 32 32s-14.3 32-32 32H320zm0-128c-17.7 0-32-14.3-32-32s14.3-32 32-32H544c17.7 0 32 14.3 32 32s-14.3 32-32 32H320z"]},met=pet,Sk={prefix:"fas",iconName:"chart-pie",icon:[576,512,["pie-chart"],"f200","M304 240V16.6c0-9 7-16.6 16-16.6C443.7 0 544 100.3 544 224c0 9-7.6 16-16.6 16H304zM32 272C32 150.7 122.1 50.3 239 34.3c9.2-1.3 17 6.1 17 15.4V288L412.5 444.5c6.7 6.7 6.2 17.7-1.5 23.1C371.8 495.6 323.8 512 272 512C139.5 512 32 404.6 32 272zm526.4 16c9.3 0 16.6 7.8 15.4 17c-7.7 55.9-34.6 105.6-73.9 142.3c-6 5.6-15.4 5.2-21.2-.7L320 288H558.4z"]},G8={prefix:"fas",iconName:"tags",icon:[512,512,[],"f02c","M345 39.1L472.8 168.4c52.4 53 52.4 138.2 0 191.2L360.8 472.9c-9.3 9.4-24.5 9.5-33.9 .2s-9.5-24.5-.2-33.9L438.6 325.9c33.9-34.3 33.9-89.4 0-123.7L310.9 72.9c-9.3-9.4-9.2-24.6 .2-33.9s24.6-9.2 33.9 .2zM0 229.5V80C0 53.5 21.5 32 48 32H197.5c17 0 33.3 6.7 45.3 18.7l168 168c25 25 25 65.5 0 90.5L277.3 442.7c-25 25-65.5 25-90.5 0l-168-168C6.7 262.7 0 246.5 0 229.5zM144 144a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"]},tj={prefix:"fas",iconName:"calendar-xmark",icon:[512,512,["calendar-times"],"f273","M160 0c17.7 0 32 14.3 32 32V64H320V32c0-17.7 14.3-32 32-32s32 14.3 32 32V64h48c26.5 0 48 21.5 48 48v48H32V112c0-26.5 21.5-48 48-48h48V32c0-17.7 14.3-32 32-32zM32 192H480V464c0 26.5-21.5 48-48 48H80c-26.5 0-48-21.5-48-48V192zM337 305c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-47 47-47-47c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l47 47-47 47c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l47-47 47 47c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-47-47 47-47z"]},get={prefix:"fas",iconName:"trash",icon:[448,512,[],"f1f8","M135.2 17.7L128 32H32C14.3 32 0 46.3 0 64S14.3 96 32 96H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H320l-7.2-14.3C307.4 6.8 296.3 0 284.2 0H163.8c-12.1 0-23.2 6.8-28.6 17.7zM416 128H32L53.2 467c1.6 25.3 22.6 45 47.9 45H346.9c25.3 0 46.3-19.7 47.9-45L416 128z"]},q8={prefix:"fas",iconName:"arrow-left",icon:[448,512,[8592],"f060","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.2 288 416 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-306.7 0L214.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"]},vet={prefix:"fas",iconName:"up-right-from-square",icon:[512,512,["external-link-alt"],"f35d","M352 0c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9L370.7 96 201.4 265.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L416 141.3l41.4 41.4c9.2 9.2 22.9 11.9 34.9 6.9s19.8-16.6 19.8-29.6V32c0-17.7-14.3-32-32-32H352zM80 32C35.8 32 0 67.8 0 112V432c0 44.2 35.8 80 80 80H400c44.2 0 80-35.8 80-80V320c0-17.7-14.3-32-32-32s-32 14.3-32 32V432c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16V112c0-8.8 7.2-16 16-16H192c17.7 0 32-14.3 32-32s-14.3-32-32-32H80z"]},yet=vet,_et={prefix:"fas",iconName:"tag",icon:[448,512,[127991],"f02b","M0 80V229.5c0 17 6.7 33.3 18.7 45.3l176 176c25 25 65.5 25 90.5 0L418.7 317.3c25-25 25-65.5 0-90.5l-176-176c-12-12-28.3-18.7-45.3-18.7H48C21.5 32 0 53.5 0 80zm112 32a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]},bet={prefix:"fas",iconName:"circle-info",icon:[512,512,["info-circle"],"f05a","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336h24V272H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]},Tk=bet,xet={prefix:"fas",iconName:"arrow-rotate-left",icon:[512,512,[8634,"arrow-left-rotate","arrow-rotate-back","arrow-rotate-backward","undo"],"f0e2","M125.7 160H176c17.7 0 32 14.3 32 32s-14.3 32-32 32H48c-17.7 0-32-14.3-32-32V64c0-17.7 14.3-32 32-32s32 14.3 32 32v51.2L97.6 97.6c87.5-87.5 229.3-87.5 316.8 0s87.5 229.3 0 316.8s-229.3 87.5-316.8 0c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0c62.5 62.5 163.8 62.5 226.3 0s62.5-163.8 0-226.3s-163.8-62.5-226.3 0L125.7 160z"]},wet=xet,Tet={prefix:"fas",iconName:"caret-down",icon:[320,512,[],"f0d7","M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z"]},Eet={prefix:"fas",iconName:"ellipsis-vertical",icon:[128,512,["ellipsis-v"],"f142","M64 360a56 56 0 1 0 0 112 56 56 0 1 0 0-112zm0-160a56 56 0 1 0 0 112 56 56 0 1 0 0-112zM120 96A56 56 0 1 0 8 96a56 56 0 1 0 112 0z"]},Oet=Eet,Cet={prefix:"fas",iconName:"house",icon:[576,512,[127968,63498,63500,"home","home-alt","home-lg-alt"],"f015","M575.8 255.5c0 18-15 32.1-32 32.1h-32l.7 160.2c0 2.7-.2 5.4-.5 8.1V472c0 22.1-17.9 40-40 40H456c-1.1 0-2.2 0-3.3-.1c-1.4 .1-2.8 .1-4.2 .1H416 392c-22.1 0-40-17.9-40-40V448 384c0-17.7-14.3-32-32-32H256c-17.7 0-32 14.3-32 32v64 24c0 22.1-17.9 40-40 40H160 128.1c-1.5 0-3-.1-4.5-.2c-1.2 .1-2.4 .2-3.6 .2H104c-22.1 0-40-17.9-40-40V360c0-.9 0-1.9 .1-2.8V287.6H32c-18 0-32-14-32-32.1c0-9 3-17 10-24L266.4 8c7-7 15-8 22-8s15 2 21 7L564.8 231.5c8 7 12 15 11 24z"]},ket=Cet,Pet={prefix:"fas",iconName:"arrow-up-wide-short",icon:[576,512,["sort-amount-up"],"f161","M151.6 42.4C145.5 35.8 137 32 128 32s-17.5 3.8-23.6 10.4l-88 96c-11.9 13-11.1 33.3 2 45.2s33.3 11.1 45.2-2L96 146.3V448c0 17.7 14.3 32 32 32s32-14.3 32-32V146.3l32.4 35.4c11.9 13 32.2 13.9 45.2 2s13.9-32.2 2-45.2l-88-96zM320 480h32c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32s14.3 32 32 32zm0-128h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32s14.3 32 32 32zm0-128H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32s14.3 32 32 32zm0-128H544c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32s14.3 32 32 32z"]},Let=Pet,Met={prefix:"fas",iconName:"file-arrow-down",icon:[384,512,["file-download"],"f56d","M64 0C28.7 0 0 28.7 0 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V160H256c-17.7 0-32-14.3-32-32V0H64zM256 0V128H384L256 0zM216 232V334.1l31-31c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-72 72c-9.4 9.4-24.6 9.4-33.9 0l-72-72c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l31 31V232c0-13.3 10.7-24 24-24s24 10.7 24 24z"]},K8=Met,Aet={prefix:"fas",iconName:"sun",icon:[512,512,[9728],"f185","M361.5 1.2c5 2.1 8.6 6.6 9.6 11.9L391 121l107.9 19.8c5.3 1 9.8 4.6 11.9 9.6s1.5 10.7-1.6 15.2L446.9 256l62.3 90.3c3.1 4.5 3.7 10.2 1.6 15.2s-6.6 8.6-11.9 9.6L391 391 371.1 498.9c-1 5.3-4.6 9.8-9.6 11.9s-10.7 1.5-15.2-1.6L256 446.9l-90.3 62.3c-4.5 3.1-10.2 3.7-15.2 1.6s-8.6-6.6-9.6-11.9L121 391 13.1 371.1c-5.3-1-9.8-4.6-11.9-9.6s-1.5-10.7 1.6-15.2L65.1 256 2.8 165.7c-3.1-4.5-3.7-10.2-1.6-15.2s6.6-8.6 11.9-9.6L121 121 140.9 13.1c1-5.3 4.6-9.8 9.6-11.9s10.7-1.5 15.2 1.6L256 65.1 346.3 2.8c4.5-3.1 10.2-3.7 15.2-1.6zM160 256a96 96 0 1 1 192 0 96 96 0 1 1 -192 0zm224 0a128 128 0 1 0 -256 0 128 128 0 1 0 256 0z"]},Ret={prefix:"fas",iconName:"link",icon:[640,512,[128279,"chain"],"f0c1","M579.8 267.7c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114L422.3 334.8c-31.5 31.5-82.5 31.5-114 0c-27.9-27.9-31.5-71.8-8.6-103.8l1.1-1.6c10.3-14.4 6.9-34.4-7.4-44.6s-34.4-6.9-44.6 7.4l-1.1 1.6C206.5 251.2 213 330 263 380c56.5 56.5 148 56.5 204.5 0L579.8 267.7zM60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5L217.7 177.2c31.5-31.5 82.5-31.5 114 0c27.9 27.9 31.5 71.8 8.6 103.9l-1.1 1.6c-10.3 14.4-6.9 34.4 7.4 44.6s34.4 6.9 44.6-7.4l1.1-1.6C433.5 260.8 427 182 377 132c-56.5-56.5-148-56.5-204.5 0L60.2 244.3z"]},jet={prefix:"fas",iconName:"magnifying-glass",icon:[512,512,[128269,"search"],"f002","M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"]},Net=jet,Det={prefix:"fas",iconName:"chevron-down",icon:[512,512,[],"f078","M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"]},Ek={prefix:"fas",iconName:"plus",icon:[448,512,[10133,61543,"add"],"2b","M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H48c-17.7 0-32 14.3-32 32s14.3 32 32 32H192V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H400c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z"]},Iet={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]},hT=Iet,Fet={prefix:"fas",iconName:"chevron-right",icon:[320,512,[9002],"f054","M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"]},Bet={prefix:"fas",iconName:"rotate",icon:[512,512,[128260,"sync-alt"],"f2f1","M142.9 142.9c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2s12.5 14.8 22.2 14.8H463.5c0 0 0 0 0 0H472c13.3 0 24-10.7 24-24V72c0-9.7-5.8-18.5-14.8-22.2s-19.3-1.7-26.2 5.2L413.4 96.6c-87.6-86.5-228.7-86.2-315.8 1C73.2 122 55.6 150.7 44.8 181.4c-5.9 16.7 2.9 34.9 19.5 40.8s34.9-2.9 40.8-19.5c7.7-21.8 20.2-42.3 37.8-59.8zM16 312v7.6 .7V440c0 9.7 5.8 18.5 14.8 22.2s19.3 1.7 26.2-5.2l41.6-41.6c87.6 86.5 228.7 86.2 315.8-1c24.4-24.4 42.1-53.1 52.9-83.7c5.9-16.7-2.9-34.9-19.5-40.8s-34.9 2.9-40.8 19.5c-7.7 21.8-20.2 42.3-37.8 59.8c-62.2 62.2-162.7 62.5-225.3 1L185 329c6.9-6.9 8.9-17.2 5.2-26.2s-12.5-14.8-22.2-14.8H48.4h-.7H40c-13.3 0-24 10.7-24 24z"]},$et=Bet,ej={prefix:"fas",iconName:"robot",icon:[640,512,[129302],"f544","M320 0c17.7 0 32 14.3 32 32V96H472c39.8 0 72 32.2 72 72V440c0 39.8-32.2 72-72 72H168c-39.8 0-72-32.2-72-72V168c0-39.8 32.2-72 72-72H288V32c0-17.7 14.3-32 32-32zM208 384c-8.8 0-16 7.2-16 16s7.2 16 16 16h32c8.8 0 16-7.2 16-16s-7.2-16-16-16H208zm96 0c-8.8 0-16 7.2-16 16s7.2 16 16 16h32c8.8 0 16-7.2 16-16s-7.2-16-16-16H304zm96 0c-8.8 0-16 7.2-16 16s7.2 16 16 16h32c8.8 0 16-7.2 16-16s-7.2-16-16-16H400zM264 256a40 40 0 1 0 -80 0 40 40 0 1 0 80 0zm152 40a40 40 0 1 0 0-80 40 40 0 1 0 0 80zM48 224H64V416H48c-26.5 0-48-21.5-48-48V272c0-26.5 21.5-48 48-48zm544 0c26.5 0 48 21.5 48 48v96c0 26.5-21.5 48-48 48H576V224h16z"]},zet={prefix:"fas",iconName:"gears",icon:[640,512,["cogs"],"f085","M308.5 135.3c7.1-6.3 9.9-16.2 6.2-25c-2.3-5.3-4.8-10.5-7.6-15.5L304 89.4c-3-5-6.3-9.9-9.8-14.6c-5.7-7.6-15.7-10.1-24.7-7.1l-28.2 9.3c-10.7-8.8-23-16-36.2-20.9L199 27.1c-1.9-9.3-9.1-16.7-18.5-17.8C173.9 8.4 167.2 8 160.4 8h-.7c-6.8 0-13.5 .4-20.1 1.2c-9.4 1.1-16.6 8.6-18.5 17.8L115 56.1c-13.3 5-25.5 12.1-36.2 20.9L50.5 67.8c-9-3-19-.5-24.7 7.1c-3.5 4.7-6.8 9.6-9.9 14.6l-3 5.3c-2.8 5-5.3 10.2-7.6 15.6c-3.7 8.7-.9 18.6 6.2 25l22.2 19.8C32.6 161.9 32 168.9 32 176s.6 14.1 1.7 20.9L11.5 216.7c-7.1 6.3-9.9 16.2-6.2 25c2.3 5.3 4.8 10.5 7.6 15.6l3 5.2c3 5.1 6.3 9.9 9.9 14.6c5.7 7.6 15.7 10.1 24.7 7.1l28.2-9.3c10.7 8.8 23 16 36.2 20.9l6.1 29.1c1.9 9.3 9.1 16.7 18.5 17.8c6.7 .8 13.5 1.2 20.4 1.2s13.7-.4 20.4-1.2c9.4-1.1 16.6-8.6 18.5-17.8l6.1-29.1c13.3-5 25.5-12.1 36.2-20.9l28.2 9.3c9 3 19 .5 24.7-7.1c3.5-4.7 6.8-9.5 9.8-14.6l3.1-5.4c2.8-5 5.3-10.2 7.6-15.5c3.7-8.7 .9-18.6-6.2-25l-22.2-19.8c1.1-6.8 1.7-13.8 1.7-20.9s-.6-14.1-1.7-20.9l22.2-19.8zM112 176a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zM504.7 500.5c6.3 7.1 16.2 9.9 25 6.2c5.3-2.3 10.5-4.8 15.5-7.6l5.4-3.1c5-3 9.9-6.3 14.6-9.8c7.6-5.7 10.1-15.7 7.1-24.7l-9.3-28.2c8.8-10.7 16-23 20.9-36.2l29.1-6.1c9.3-1.9 16.7-9.1 17.8-18.5c.8-6.7 1.2-13.5 1.2-20.4s-.4-13.7-1.2-20.4c-1.1-9.4-8.6-16.6-17.8-18.5L583.9 307c-5-13.3-12.1-25.5-20.9-36.2l9.3-28.2c3-9 .5-19-7.1-24.7c-4.7-3.5-9.6-6.8-14.6-9.9l-5.3-3c-5-2.8-10.2-5.3-15.6-7.6c-8.7-3.7-18.6-.9-25 6.2l-19.8 22.2c-6.8-1.1-13.8-1.7-20.9-1.7s-14.1 .6-20.9 1.7l-19.8-22.2c-6.3-7.1-16.2-9.9-25-6.2c-5.3 2.3-10.5 4.8-15.6 7.6l-5.2 3c-5.1 3-9.9 6.3-14.6 9.9c-7.6 5.7-10.1 15.7-7.1 24.7l9.3 28.2c-8.8 10.7-16 23-20.9 36.2L315.1 313c-9.3 1.9-16.7 9.1-17.8 18.5c-.8 6.7-1.2 13.5-1.2 20.4s.4 13.7 1.2 20.4c1.1 9.4 8.6 16.6 17.8 18.5l29.1 6.1c5 13.3 12.1 25.5 20.9 36.2l-9.3 28.2c-3 9-.5 19 7.1 24.7c4.7 3.5 9.5 6.8 14.6 9.8l5.4 3.1c5 2.8 10.2 5.3 15.5 7.6c8.7 3.7 18.6 .9 25-6.2l19.8-22.2c6.8 1.1 13.8 1.7 20.9 1.7s14.1-.6 20.9-1.7l19.8 22.2zM464 304a48 48 0 1 1 0 96 48 48 0 1 1 0-96z"]},Uet=zet,Vet={prefix:"fas",iconName:"qrcode",icon:[448,512,[],"f029","M0 80C0 53.5 21.5 32 48 32h96c26.5 0 48 21.5 48 48v96c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80zM64 96v64h64V96H64zM0 336c0-26.5 21.5-48 48-48h96c26.5 0 48 21.5 48 48v96c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V336zm64 16v64h64V352H64zM304 32h96c26.5 0 48 21.5 48 48v96c0 26.5-21.5 48-48 48H304c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48zm80 64H320v64h64V96zM256 304c0-8.8 7.2-16 16-16h64c8.8 0 16 7.2 16 16s7.2 16 16 16h32c8.8 0 16-7.2 16-16s7.2-16 16-16s16 7.2 16 16v96c0 8.8-7.2 16-16 16H368c-8.8 0-16-7.2-16-16s-7.2-16-16-16s-16 7.2-16 16v64c0 8.8-7.2 16-16 16H272c-8.8 0-16-7.2-16-16V304zM368 480a16 16 0 1 1 0-32 16 16 0 1 1 0 32zm64 0a16 16 0 1 1 0-32 16 16 0 1 1 0 32z"]},Het={prefix:"fas",iconName:"moon",icon:[384,512,[127769,9214],"f186","M223.5 32C100 32 0 132.3 0 256S100 480 223.5 480c60.6 0 115.5-24.2 155.8-63.4c5-4.9 6.3-12.5 3.1-18.7s-10.1-9.7-17-8.5c-9.8 1.7-19.8 2.6-30.1 2.6c-96.9 0-175.5-78.8-175.5-176c0-65.8 36-123.1 89.3-153.3c6.1-3.5 9.2-10.5 7.7-17.3s-7.3-11.9-14.3-12.5c-6.3-.5-12.6-.8-19-.8z"]},Wet={prefix:"fas",iconName:"link-slash",icon:[640,512,["chain-broken","chain-slash","unlink"],"f127","M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L489.3 358.2l90.5-90.5c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114l-96 96-31.9-25C430.9 239.6 420.1 175.1 377 132c-52.2-52.3-134.5-56.2-191.3-11.7L38.8 5.1zM239 162c30.1-14.9 67.7-9.9 92.8 15.3c20 20 27.5 48.3 21.7 74.5L239 162zM406.6 416.4L220.9 270c-2.1 39.8 12.2 80.1 42.2 110c38.9 38.9 94.4 51 143.6 36.3zm-290-228.5L60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5l61.8-61.8-50.6-39.9z"]},Yet={prefix:"fas",iconName:"desktop",icon:[576,512,[128421,61704,"desktop-alt"],"f390","M64 0C28.7 0 0 28.7 0 64V352c0 35.3 28.7 64 64 64H240l-10.7 32H160c-17.7 0-32 14.3-32 32s14.3 32 32 32H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H346.7L336 416H512c35.3 0 64-28.7 64-64V64c0-35.3-28.7-64-64-64H64zM512 64V288H64V64H512z"]},Hm={prefix:"fas",iconName:"check",icon:[448,512,[10003,10004],"f00c","M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"]};function nj(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Vt(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=new Array(e);n-1;i--){var o=n[i],s=(o.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(s)>-1&&(r=o)}return en.head.insertBefore(e,r),t}}var vnt="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function qm(){for(var t=12,e="";t-- >0;)e+=vnt[Math.random()*62|0];return e}function jd(t){for(var e=[],n=(t||[]).length>>>0;n--;)e[n]=t[n];return e}function Mk(t){return t.classList?jd(t.classList):(t.getAttribute("class")||"").split(" ").filter(function(e){return e})}function lB(t){return"".concat(t).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function ynt(t){return Object.keys(t||{}).reduce(function(e,n){return e+"".concat(n,'="').concat(lB(t[n]),'" ')},"").trim()}function u1(t){return Object.keys(t||{}).reduce(function(e,n){return e+"".concat(n,": ").concat(t[n].trim(),";")},"")}function Ak(t){return t.size!==ls.size||t.x!==ls.x||t.y!==ls.y||t.rotate!==ls.rotate||t.flipX||t.flipY}function _nt(t){var e=t.transform,n=t.containerWidth,r=t.iconWidth,i={transform:"translate(".concat(n/2," 256)")},o="translate(".concat(e.x*32,", ").concat(e.y*32,") "),s="scale(".concat(e.size/16*(e.flipX?-1:1),", ").concat(e.size/16*(e.flipY?-1:1),") "),l="rotate(".concat(e.rotate," 0 0)"),c={transform:"".concat(o," ").concat(s," ").concat(l)},h={transform:"translate(".concat(r/2*-1," -256)")};return{outer:i,inner:c,path:h}}function bnt(t){var e=t.transform,n=t.width,r=n===void 0?fT:n,i=t.height,o=i===void 0?fT:i,s=t.startCentered,l=s===void 0?!1:s,c="";return l&&eB?c+="translate(".concat(e.x/Ra-r/2,"em, ").concat(e.y/Ra-o/2,"em) "):l?c+="translate(calc(-50% + ".concat(e.x/Ra,"em), calc(-50% + ").concat(e.y/Ra,"em)) "):c+="translate(".concat(e.x/Ra,"em, ").concat(e.y/Ra,"em) "),c+="scale(".concat(e.size/Ra*(e.flipX?-1:1),", ").concat(e.size/Ra*(e.flipY?-1:1),") "),c+="rotate(".concat(e.rotate,"deg) "),c}var xnt=`: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-sharp-light: normal 300 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 cB(){var t=nB,e=rB,n=Gt.cssPrefix,r=Gt.replacementClass,i=xnt;if(n!==t||r!==e){var o=new RegExp("\\.".concat(t,"\\-"),"g"),s=new RegExp("\\--".concat(t,"\\-"),"g"),l=new RegExp("\\.".concat(e),"g");i=i.replace(o,".".concat(n,"-")).replace(s,"--".concat(n,"-")).replace(l,".".concat(r))}return i}var cj=!1;function zw(){Gt.autoAddCss&&!cj&&(gnt(cB()),cj=!0)}var wnt={mixout:function(){return{dom:{css:cB,insertCss:zw}}},hooks:function(){return{beforeDOMElementCreation:function(){zw()},beforeI2svg:function(){zw()}}}},pa=El||{};pa[fa]||(pa[fa]={});pa[fa].styles||(pa[fa].styles={});pa[fa].hooks||(pa[fa].hooks={});pa[fa].shims||(pa[fa].shims=[]);var $o=pa[fa],uB=[],Snt=function t(){en.removeEventListener("DOMContentLoaded",t),h0=1,uB.map(function(e){return e()})},h0=!1;Ea&&(h0=(en.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(en.readyState),h0||en.addEventListener("DOMContentLoaded",Snt));function Tnt(t){Ea&&(h0?setTimeout(t,0):uB.push(t))}function Ig(t){var e=t.tag,n=t.attributes,r=n===void 0?{}:n,i=t.children,o=i===void 0?[]:i;return typeof t=="string"?lB(t):"<".concat(e," ").concat(ynt(r),">").concat(o.map(Ig).join(""),"")}function uj(t,e,n){if(t&&t[e]&&t[e][n])return{prefix:e,iconName:n,icon:t[e][n]}}var Ent=function(e,n){return function(r,i,o,s){return e.call(n,r,i,o,s)}},Uw=function(e,n,r,i){var o=Object.keys(e),s=o.length,l=i!==void 0?Ent(n,i):n,c,h,d;for(r===void 0?(c=1,d=e[o[0]]):(c=0,d=r);c=55296&&i<=56319&&n=55296&&r<=56319&&n>e+1&&(i=t.charCodeAt(e+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}function hj(t){return Object.keys(t).reduce(function(e,n){var r=t[n],i=!!r.icon;return i?e[r.iconName]=r.icon:e[n]=r,e},{})}function gT(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.skipHooks,i=r===void 0?!1:r,o=hj(e);typeof $o.hooks.addPack=="function"&&!i?$o.hooks.addPack(t,hj(e)):$o.styles[t]=Vt(Vt({},$o.styles[t]||{}),o),t==="fas"&&gT("fa",e)}var qv,Kv,Xv,Sh=$o.styles,knt=$o.shims,Pnt=(qv={},Jn(qv,Ke,Object.values(Zm[Ke])),Jn(qv,_n,Object.values(Zm[_n])),qv),Rk=null,hB={},dB={},fB={},pB={},mB={},Lnt=(Kv={},Jn(Kv,Ke,Object.keys(Wm[Ke])),Jn(Kv,_n,Object.keys(Wm[_n])),Kv);function Mnt(t){return~hnt.indexOf(t)}function Ant(t,e){var n=e.split("-"),r=n[0],i=n.slice(1).join("-");return r===t&&i!==""&&!Mnt(i)?i:null}var gB=function(){var e=function(o){return Uw(Sh,function(s,l,c){return s[c]=Uw(l,o,{}),s},{})};hB=e(function(i,o,s){if(o[3]&&(i[o[3]]=s),o[2]){var l=o[2].filter(function(c){return typeof c=="number"});l.forEach(function(c){i[c.toString(16)]=s})}return i}),dB=e(function(i,o,s){if(i[s]=s,o[2]){var l=o[2].filter(function(c){return typeof c=="string"});l.forEach(function(c){i[c]=s})}return i}),mB=e(function(i,o,s){var l=o[2];return i[s]=s,l.forEach(function(c){i[c]=s}),i});var n="far"in Sh||Gt.autoFetchSvg,r=Uw(knt,function(i,o){var s=o[0],l=o[1],c=o[2];return l==="far"&&!n&&(l="fas"),typeof s=="string"&&(i.names[s]={prefix:l,iconName:c}),typeof s=="number"&&(i.unicodes[s.toString(16)]={prefix:l,iconName:c}),i},{names:{},unicodes:{}});fB=r.names,pB=r.unicodes,Rk=h1(Gt.styleDefault,{family:Gt.familyDefault})};mnt(function(t){Rk=h1(t.styleDefault,{family:Gt.familyDefault})});gB();function jk(t,e){return(hB[t]||{})[e]}function Rnt(t,e){return(dB[t]||{})[e]}function Yc(t,e){return(mB[t]||{})[e]}function vB(t){return fB[t]||{prefix:null,iconName:null}}function jnt(t){var e=pB[t],n=jk("fas",t);return e||(n?{prefix:"fas",iconName:n}:null)||{prefix:null,iconName:null}}function Ol(){return Rk}var Nk=function(){return{prefix:null,iconName:null,rest:[]}};function h1(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.family,r=n===void 0?Ke:n,i=Wm[r][t],o=Ym[r][t]||Ym[r][i],s=t in $o.styles?t:null;return o||s||null}var dj=(Xv={},Jn(Xv,Ke,Object.keys(Zm[Ke])),Jn(Xv,_n,Object.keys(Zm[_n])),Xv);function d1(t){var e,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.skipLookups,i=r===void 0?!1:r,o=(e={},Jn(e,Ke,"".concat(Gt.cssPrefix,"-").concat(Ke)),Jn(e,_n,"".concat(Gt.cssPrefix,"-").concat(_n)),e),s=null,l=Ke;(t.includes(o[Ke])||t.some(function(h){return dj[Ke].includes(h)}))&&(l=Ke),(t.includes(o[_n])||t.some(function(h){return dj[_n].includes(h)}))&&(l=_n);var c=t.reduce(function(h,d){var p=Ant(Gt.cssPrefix,d);if(Sh[d]?(d=Pnt[l].includes(d)?ont[l][d]:d,s=d,h.prefix=d):Lnt[l].indexOf(d)>-1?(s=d,h.prefix=h1(d,{family:l})):p?h.iconName=p:d!==Gt.replacementClass&&d!==o[Ke]&&d!==o[_n]&&h.rest.push(d),!i&&h.prefix&&h.iconName){var m=s==="fa"?vB(h.iconName):{},v=Yc(h.prefix,h.iconName);m.prefix&&(s=null),h.iconName=m.iconName||v||h.iconName,h.prefix=m.prefix||h.prefix,h.prefix==="far"&&!Sh.far&&Sh.fas&&!Gt.autoFetchSvg&&(h.prefix="fas")}return h},Nk());return(t.includes("fa-brands")||t.includes("fab"))&&(c.prefix="fab"),(t.includes("fa-duotone")||t.includes("fad"))&&(c.prefix="fad"),!c.prefix&&l===_n&&(Sh.fass||Gt.autoFetchSvg)&&(c.prefix="fass",c.iconName=Yc(c.prefix,c.iconName)||c.iconName),(c.prefix==="fa"||s==="fa")&&(c.prefix=Ol()||"fas"),c}var Nnt=function(){function t(){Zet(this,t),this.definitions={}}return Get(t,[{key:"add",value:function(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o0&&d.forEach(function(p){typeof p=="string"&&(n[l][p]=h)}),n[l][c]=h}),n}}]),t}(),fj=[],Th={},$h={},Dnt=Object.keys($h);function Int(t,e){var n=e.mixoutsTo;return fj=t,Th={},Object.keys($h).forEach(function(r){Dnt.indexOf(r)===-1&&delete $h[r]}),fj.forEach(function(r){var i=r.mixout?r.mixout():{};if(Object.keys(i).forEach(function(s){typeof i[s]=="function"&&(n[s]=i[s]),u0(i[s])==="object"&&Object.keys(i[s]).forEach(function(l){n[s]||(n[s]={}),n[s][l]=i[s][l]})}),r.hooks){var o=r.hooks();Object.keys(o).forEach(function(s){Th[s]||(Th[s]=[]),Th[s].push(o[s])})}r.provides&&r.provides($h)}),n}function vT(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i1?e-1:0),r=1;r0&&arguments[0]!==void 0?arguments[0]:{};return Ea?(yu("beforeI2svg",e),ma("pseudoElements2svg",e),ma("i2svg",e)):Promise.reject("Operation requires a DOM of some kind.")},watch:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=e.autoReplaceSvgRoot;Gt.autoReplaceSvg===!1&&(Gt.autoReplaceSvg=!0),Gt.observeMutations=!0,Tnt(function(){znt({autoReplaceSvgRoot:n}),yu("watch",e)})}},$nt={icon:function(e){if(e===null)return null;if(u0(e)==="object"&&e.prefix&&e.iconName)return{prefix:e.prefix,iconName:Yc(e.prefix,e.iconName)||e.iconName};if(Array.isArray(e)&&e.length===2){var n=e[1].indexOf("fa-")===0?e[1].slice(3):e[1],r=h1(e[0]);return{prefix:r,iconName:Yc(r,n)||n}}if(typeof e=="string"&&(e.indexOf("".concat(Gt.cssPrefix,"-"))>-1||e.match(snt))){var i=d1(e.split(" "),{skipLookups:!0});return{prefix:i.prefix||Ol(),iconName:Yc(i.prefix,i.iconName)||i.iconName}}if(typeof e=="string"){var o=Ol();return{prefix:o,iconName:Yc(o,e)||e}}}},Gi={noAuto:Fnt,config:Gt,dom:Bnt,parse:$nt,library:yB,findIconDefinition:yT,toHtml:Ig},znt=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=e.autoReplaceSvgRoot,r=n===void 0?en:n;(Object.keys($o.styles).length>0||Gt.autoFetchSvg)&&Ea&&Gt.autoReplaceSvg&&Gi.dom.i2svg({node:r})};function f1(t,e){return Object.defineProperty(t,"abstract",{get:e}),Object.defineProperty(t,"html",{get:function(){return t.abstract.map(function(r){return Ig(r)})}}),Object.defineProperty(t,"node",{get:function(){if(Ea){var r=en.createElement("div");return r.innerHTML=t.html,r.children}}}),t}function Unt(t){var e=t.children,n=t.main,r=t.mask,i=t.attributes,o=t.styles,s=t.transform;if(Ak(s)&&n.found&&!r.found){var l=n.width,c=n.height,h={x:l/c/2,y:.5};i.style=u1(Vt(Vt({},o),{},{"transform-origin":"".concat(h.x+s.x/16,"em ").concat(h.y+s.y/16,"em")}))}return[{tag:"svg",attributes:i,children:e}]}function Vnt(t){var e=t.prefix,n=t.iconName,r=t.children,i=t.attributes,o=t.symbol,s=o===!0?"".concat(e,"-").concat(Gt.cssPrefix,"-").concat(n):o;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:Vt(Vt({},i),{},{id:s}),children:r}]}]}function Dk(t){var e=t.icons,n=e.main,r=e.mask,i=t.prefix,o=t.iconName,s=t.transform,l=t.symbol,c=t.title,h=t.maskId,d=t.titleId,p=t.extra,m=t.watchable,v=m===void 0?!1:m,y=r.found?r:n,_=y.width,T=y.height,x=i==="fak",w=[Gt.replacementClass,o?"".concat(Gt.cssPrefix,"-").concat(o):""].filter(function(B){return p.classes.indexOf(B)===-1}).filter(function(B){return B!==""||!!B}).concat(p.classes).join(" "),E={children:[],attributes:Vt(Vt({},p.attributes),{},{"data-prefix":i,"data-icon":o,class:w,role:p.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(_," ").concat(T)})},O=x&&!~p.classes.indexOf("fa-fw")?{width:"".concat(_/T*16*.0625,"em")}:{};v&&(E.attributes[vu]=""),c&&(E.children.push({tag:"title",attributes:{id:E.attributes["aria-labelledby"]||"title-".concat(d||qm())},children:[c]}),delete E.attributes.title);var k=Vt(Vt({},E),{},{prefix:i,iconName:o,main:n,mask:r,maskId:h,transform:s,symbol:l,styles:Vt(Vt({},O),p.styles)}),P=r.found&&n.found?ma("generateAbstractMask",k)||{children:[],attributes:{}}:ma("generateAbstractIcon",k)||{children:[],attributes:{}},A=P.children,j=P.attributes;return k.children=A,k.attributes=j,l?Vnt(k):Unt(k)}function pj(t){var e=t.content,n=t.width,r=t.height,i=t.transform,o=t.title,s=t.extra,l=t.watchable,c=l===void 0?!1:l,h=Vt(Vt(Vt({},s.attributes),o?{title:o}:{}),{},{class:s.classes.join(" ")});c&&(h[vu]="");var d=Vt({},s.styles);Ak(i)&&(d.transform=bnt({transform:i,startCentered:!0,width:n,height:r}),d["-webkit-transform"]=d.transform);var p=u1(d);p.length>0&&(h.style=p);var m=[];return m.push({tag:"span",attributes:h,children:[e]}),o&&m.push({tag:"span",attributes:{class:"sr-only"},children:[o]}),m}function Hnt(t){var e=t.content,n=t.title,r=t.extra,i=Vt(Vt(Vt({},r.attributes),n?{title:n}:{}),{},{class:r.classes.join(" ")}),o=u1(r.styles);o.length>0&&(i.style=o);var s=[];return s.push({tag:"span",attributes:i,children:[e]}),n&&s.push({tag:"span",attributes:{class:"sr-only"},children:[n]}),s}var Vw=$o.styles;function _T(t){var e=t[0],n=t[1],r=t.slice(4),i=Ok(r,1),o=i[0],s=null;return Array.isArray(o)?s={tag:"g",attributes:{class:"".concat(Gt.cssPrefix,"-").concat(Wc.GROUP)},children:[{tag:"path",attributes:{class:"".concat(Gt.cssPrefix,"-").concat(Wc.SECONDARY),fill:"currentColor",d:o[0]}},{tag:"path",attributes:{class:"".concat(Gt.cssPrefix,"-").concat(Wc.PRIMARY),fill:"currentColor",d:o[1]}}]}:s={tag:"path",attributes:{fill:"currentColor",d:o}},{found:!0,width:e,height:n,icon:s}}var Wnt={found:!1,width:512,height:512};function Ynt(t,e){!iB&&!Gt.showMissingIcons&&t&&console.error('Icon with name "'.concat(t,'" and prefix "').concat(e,'" is missing.'))}function bT(t,e){var n=e;return e==="fa"&&Gt.styleDefault!==null&&(e=Ol()),new Promise(function(r,i){if(ma("missingIconAbstract"),n==="fa"){var o=vB(t)||{};t=o.iconName||t,e=o.prefix||e}if(t&&e&&Vw[e]&&Vw[e][t]){var s=Vw[e][t];return r(_T(s))}Ynt(t,e),r(Vt(Vt({},Wnt),{},{icon:Gt.showMissingIcons&&t?ma("missingIconAbstract")||{}:{}}))})}var mj=function(){},xT=Gt.measurePerformance&&Vv&&Vv.mark&&Vv.measure?Vv:{mark:mj,measure:mj},Op='FA "6.4.2"',Znt=function(e){return xT.mark("".concat(Op," ").concat(e," begins")),function(){return _B(e)}},_B=function(e){xT.mark("".concat(Op," ").concat(e," ends")),xT.measure("".concat(Op," ").concat(e),"".concat(Op," ").concat(e," begins"),"".concat(Op," ").concat(e," ends"))},Ik={begin:Znt,end:_B},n_=function(){};function gj(t){var e=t.getAttribute?t.getAttribute(vu):null;return typeof e=="string"}function Gnt(t){var e=t.getAttribute?t.getAttribute(kk):null,n=t.getAttribute?t.getAttribute(Pk):null;return e&&n}function qnt(t){return t&&t.classList&&t.classList.contains&&t.classList.contains(Gt.replacementClass)}function Knt(){if(Gt.autoReplaceSvg===!0)return r_.replace;var t=r_[Gt.autoReplaceSvg];return t||r_.replace}function Xnt(t){return en.createElementNS("http://www.w3.org/2000/svg",t)}function Qnt(t){return en.createElement(t)}function bB(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.ceFn,r=n===void 0?t.tag==="svg"?Xnt:Qnt:n;if(typeof t=="string")return en.createTextNode(t);var i=r(t.tag);Object.keys(t.attributes||[]).forEach(function(s){i.setAttribute(s,t.attributes[s])});var o=t.children||[];return o.forEach(function(s){i.appendChild(bB(s,{ceFn:r}))}),i}function Jnt(t){var e=" ".concat(t.outerHTML," ");return e="".concat(e,"Font Awesome fontawesome.com "),e}var r_={replace:function(e){var n=e[0];if(n.parentNode)if(e[1].forEach(function(i){n.parentNode.insertBefore(bB(i),n)}),n.getAttribute(vu)===null&&Gt.keepOriginalSource){var r=en.createComment(Jnt(n));n.parentNode.replaceChild(r,n)}else n.remove()},nest:function(e){var n=e[0],r=e[1];if(~Mk(n).indexOf(Gt.replacementClass))return r_.replace(e);var i=new RegExp("".concat(Gt.cssPrefix,"-.*"));if(delete r[0].attributes.id,r[0].attributes.class){var o=r[0].attributes.class.split(" ").reduce(function(l,c){return c===Gt.replacementClass||c.match(i)?l.toSvg.push(c):l.toNode.push(c),l},{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(l){return Ig(l)}).join(` -`);n.setAttribute(vu,""),n.innerHTML=s}};function vj(t){t()}function xB(t,e){var n=typeof e=="function"?e:n_;if(t.length===0)n();else{var r=vj;Gt.mutateApproach===rnt&&(r=El.requestAnimationFrame||vj),r(function(){var i=Knt(),o=Ik.begin("mutate");t.map(i),o(),n()})}}var Fk=!1;function wB(){Fk=!0}function wT(){Fk=!1}var d0=null;function yj(t){if(aj&&Gt.observeMutations){var e=t.treeCallback,n=e===void 0?n_:e,r=t.nodeCallback,i=r===void 0?n_:r,o=t.pseudoElementsCallback,s=o===void 0?n_:o,l=t.observeMutationsRoot,c=l===void 0?en:l;d0=new aj(function(h){if(!Fk){var d=Ol();jd(h).forEach(function(p){if(p.type==="childList"&&p.addedNodes.length>0&&!gj(p.addedNodes[0])&&(Gt.searchPseudoElements&&s(p.target),n(p.target)),p.type==="attributes"&&p.target.parentNode&&Gt.searchPseudoElements&&s(p.target.parentNode),p.type==="attributes"&&gj(p.target)&&~unt.indexOf(p.attributeName))if(p.attributeName==="class"&&Gnt(p.target)){var m=d1(Mk(p.target)),v=m.prefix,y=m.iconName;p.target.setAttribute(kk,v||d),y&&p.target.setAttribute(Pk,y)}else qnt(p.target)&&i(p.target)})}}),Ea&&d0.observe(c,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function trt(){d0&&d0.disconnect()}function ert(t){var e=t.getAttribute("style"),n=[];return e&&(n=e.split(";").reduce(function(r,i){var o=i.split(":"),s=o[0],l=o.slice(1);return s&&l.length>0&&(r[s]=l.join(":").trim()),r},{})),n}function nrt(t){var e=t.getAttribute("data-prefix"),n=t.getAttribute("data-icon"),r=t.innerText!==void 0?t.innerText.trim():"",i=d1(Mk(t));return i.prefix||(i.prefix=Ol()),e&&n&&(i.prefix=e,i.iconName=n),i.iconName&&i.prefix||(i.prefix&&r.length>0&&(i.iconName=Rnt(i.prefix,t.innerText)||jk(i.prefix,mT(t.innerText))),!i.iconName&&Gt.autoFetchSvg&&t.firstChild&&t.firstChild.nodeType===Node.TEXT_NODE&&(i.iconName=t.firstChild.data)),i}function rrt(t){var e=jd(t.attributes).reduce(function(i,o){return i.name!=="class"&&i.name!=="style"&&(i[o.name]=o.value),i},{}),n=t.getAttribute("title"),r=t.getAttribute("data-fa-title-id");return Gt.autoA11y&&(n?e["aria-labelledby"]="".concat(Gt.replacementClass,"-title-").concat(r||qm()):(e["aria-hidden"]="true",e.focusable="false")),e}function irt(){return{iconName:null,title:null,titleId:null,prefix:null,transform:ls,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function _j(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0},n=nrt(t),r=n.iconName,i=n.prefix,o=n.rest,s=rrt(t),l=vT("parseNodeAttributes",{},t),c=e.styleParser?ert(t):[];return Vt({iconName:r,title:t.getAttribute("title"),titleId:t.getAttribute("data-fa-title-id"),prefix:i,transform:ls,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:o,styles:c,attributes:s}},l)}var ort=$o.styles;function SB(t){var e=Gt.autoReplaceSvg==="nest"?_j(t,{styleParser:!1}):_j(t);return~e.extra.classes.indexOf(oB)?ma("generateLayersText",t,e):ma("generateSvgReplacementMutation",t,e)}var Cl=new Set;Lk.map(function(t){Cl.add("fa-".concat(t))});Object.keys(Wm[Ke]).map(Cl.add.bind(Cl));Object.keys(Wm[_n]).map(Cl.add.bind(Cl));Cl=Ng(Cl);function bj(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!Ea)return Promise.resolve();var n=en.documentElement.classList,r=function(p){return n.add("".concat(lj,"-").concat(p))},i=function(p){return n.remove("".concat(lj,"-").concat(p))},o=Gt.autoFetchSvg?Cl:Lk.map(function(d){return"fa-".concat(d)}).concat(Object.keys(ort));o.includes("fa")||o.push("fa");var s=[".".concat(oB,":not([").concat(vu,"])")].concat(o.map(function(d){return".".concat(d,":not([").concat(vu,"])")})).join(", ");if(s.length===0)return Promise.resolve();var l=[];try{l=jd(t.querySelectorAll(s))}catch{}if(l.length>0)r("pending"),i("complete");else return Promise.resolve();var c=Ik.begin("onTree"),h=l.reduce(function(d,p){try{var m=SB(p);m&&d.push(m)}catch(v){iB||v.name==="MissingIcon"&&console.error(v)}return d},[]);return new Promise(function(d,p){Promise.all(h).then(function(m){xB(m,function(){r("active"),r("complete"),i("pending"),typeof e=="function"&&e(),c(),d()})}).catch(function(m){c(),p(m)})})}function srt(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;SB(t).then(function(n){n&&xB([n],e)})}function art(t){return function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=(e||{}).icon?e:yT(e||{}),i=n.mask;return i&&(i=(i||{}).icon?i:yT(i||{})),t(r,Vt(Vt({},n),{},{mask:i}))}}var lrt=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.transform,i=r===void 0?ls:r,o=n.symbol,s=o===void 0?!1:o,l=n.mask,c=l===void 0?null:l,h=n.maskId,d=h===void 0?null:h,p=n.title,m=p===void 0?null:p,v=n.titleId,y=v===void 0?null:v,_=n.classes,T=_===void 0?[]:_,x=n.attributes,w=x===void 0?{}:x,E=n.styles,O=E===void 0?{}:E;if(e){var k=e.prefix,P=e.iconName,A=e.icon;return f1(Vt({type:"icon"},e),function(){return yu("beforeDOMElementCreation",{iconDefinition:e,params:n}),Gt.autoA11y&&(m?w["aria-labelledby"]="".concat(Gt.replacementClass,"-title-").concat(y||qm()):(w["aria-hidden"]="true",w.focusable="false")),Dk({icons:{main:_T(A),mask:c?_T(c.icon):{found:!1,width:null,height:null,icon:{}}},prefix:k,iconName:P,transform:Vt(Vt({},ls),i),symbol:s,title:m,maskId:d,titleId:y,extra:{attributes:w,styles:O,classes:T}})})}},crt={mixout:function(){return{icon:art(lrt)}},hooks:function(){return{mutationObserverCallbacks:function(n){return n.treeCallback=bj,n.nodeCallback=srt,n}}},provides:function(e){e.i2svg=function(n){var r=n.node,i=r===void 0?en:r,o=n.callback,s=o===void 0?function(){}:o;return bj(i,s)},e.generateSvgReplacementMutation=function(n,r){var i=r.iconName,o=r.title,s=r.titleId,l=r.prefix,c=r.transform,h=r.symbol,d=r.mask,p=r.maskId,m=r.extra;return new Promise(function(v,y){Promise.all([bT(i,l),d.iconName?bT(d.iconName,d.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(_){var T=Ok(_,2),x=T[0],w=T[1];v([n,Dk({icons:{main:x,mask:w},prefix:l,iconName:i,transform:c,symbol:h,maskId:p,title:o,titleId:s,extra:m,watchable:!0})])}).catch(y)})},e.generateAbstractIcon=function(n){var r=n.children,i=n.attributes,o=n.main,s=n.transform,l=n.styles,c=u1(l);c.length>0&&(i.style=c);var h;return Ak(s)&&(h=ma("generateAbstractTransformGrouping",{main:o,transform:s,containerWidth:o.width,iconWidth:o.width})),r.push(h||o.icon),{children:r,attributes:i}}}},urt={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 f1({type:"layer"},function(){yu("beforeDOMElementCreation",{assembler:n,params:r});var s=[];return n(function(l){Array.isArray(l)?l.map(function(c){s=s.concat(c.abstract)}):s=s.concat(l.abstract)}),[{tag:"span",attributes:{class:["".concat(Gt.cssPrefix,"-layers")].concat(Ng(o)).join(" ")},children:s}]})}}}},hrt={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,l=s===void 0?[]:s,c=r.attributes,h=c===void 0?{}:c,d=r.styles,p=d===void 0?{}:d;return f1({type:"counter",content:n},function(){return yu("beforeDOMElementCreation",{content:n,params:r}),Hnt({content:n.toString(),title:o,extra:{attributes:h,styles:p,classes:["".concat(Gt.cssPrefix,"-layers-counter")].concat(Ng(l))}})})}}}},drt={mixout:function(){return{text:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.transform,o=i===void 0?ls:i,s=r.title,l=s===void 0?null:s,c=r.classes,h=c===void 0?[]:c,d=r.attributes,p=d===void 0?{}:d,m=r.styles,v=m===void 0?{}:m;return f1({type:"text",content:n},function(){return yu("beforeDOMElementCreation",{content:n,params:r}),pj({content:n,transform:Vt(Vt({},ls),o),title:l,extra:{attributes:p,styles:v,classes:["".concat(Gt.cssPrefix,"-layers-text")].concat(Ng(h))}})})}}},provides:function(e){e.generateLayersText=function(n,r){var i=r.title,o=r.transform,s=r.extra,l=null,c=null;if(eB){var h=parseInt(getComputedStyle(n).fontSize,10),d=n.getBoundingClientRect();l=d.width/h,c=d.height/h}return Gt.autoA11y&&!i&&(s.attributes["aria-hidden"]="true"),Promise.resolve([n,pj({content:n.innerHTML,width:l,height:c,transform:o,title:i,extra:s,watchable:!0})])}}},frt=new RegExp('"',"ug"),xj=[1105920,1112319];function prt(t){var e=t.replace(frt,""),n=Cnt(e,0),r=n>=xj[0]&&n<=xj[1],i=e.length===2?e[0]===e[1]:!1;return{value:mT(i?e[0]:e),isSecondary:r||i}}function wj(t,e){var n="".concat(nnt).concat(e.replace(":","-"));return new Promise(function(r,i){if(t.getAttribute(n)!==null)return r();var o=jd(t.children),s=o.filter(function(A){return A.getAttribute(pT)===e})[0],l=El.getComputedStyle(t,e),c=l.getPropertyValue("font-family").match(ant),h=l.getPropertyValue("font-weight"),d=l.getPropertyValue("content");if(s&&!c)return t.removeChild(s),r();if(c&&d!=="none"&&d!==""){var p=l.getPropertyValue("content"),m=~["Sharp"].indexOf(c[2])?_n:Ke,v=~["Solid","Regular","Light","Thin","Duotone","Brands","Kit"].indexOf(c[2])?Ym[m][c[2].toLowerCase()]:lnt[m][h],y=prt(p),_=y.value,T=y.isSecondary,x=c[0].startsWith("FontAwesome"),w=jk(v,_),E=w;if(x){var O=jnt(_);O.iconName&&O.prefix&&(w=O.iconName,v=O.prefix)}if(w&&!T&&(!s||s.getAttribute(kk)!==v||s.getAttribute(Pk)!==E)){t.setAttribute(n,E),s&&t.removeChild(s);var k=irt(),P=k.extra;P.attributes[pT]=e,bT(w,v).then(function(A){var j=Dk(Vt(Vt({},k),{},{icons:{main:A,mask:Nk()},prefix:v,iconName:E,extra:P,watchable:!0})),B=en.createElementNS("http://www.w3.org/2000/svg","svg");e==="::before"?t.insertBefore(B,t.firstChild):t.appendChild(B),B.outerHTML=j.map(function(N){return Ig(N)}).join(` -`),t.removeAttribute(n),r()}).catch(i)}else r()}else r()})}function mrt(t){return Promise.all([wj(t,"::before"),wj(t,"::after")])}function grt(t){return t.parentNode!==document.head&&!~int.indexOf(t.tagName.toUpperCase())&&!t.getAttribute(pT)&&(!t.parentNode||t.parentNode.tagName!=="svg")}function Sj(t){if(Ea)return new Promise(function(e,n){var r=jd(t.querySelectorAll("*")).filter(grt).map(mrt),i=Ik.begin("searchPseudoElements");wB(),Promise.all(r).then(function(){i(),wT(),e()}).catch(function(){i(),wT(),n()})})}var vrt={hooks:function(){return{mutationObserverCallbacks:function(n){return n.pseudoElementsCallback=Sj,n}}},provides:function(e){e.pseudoElements2svg=function(n){var r=n.node,i=r===void 0?en:r;Gt.searchPseudoElements&&Sj(i)}}},Tj=!1,yrt={mixout:function(){return{dom:{unwatch:function(){wB(),Tj=!0}}}},hooks:function(){return{bootstrap:function(){yj(vT("mutationObserverCallbacks",{}))},noAuto:function(){trt()},watch:function(n){var r=n.observeMutationsRoot;Tj?wT():yj(vT("mutationObserverCallbacks",{observeMutationsRoot:r}))}}}},Ej=function(e){var n={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return e.toLowerCase().split(" ").reduce(function(r,i){var o=i.toLowerCase().split("-"),s=o[0],l=o.slice(1).join("-");if(s&&l==="h")return r.flipX=!0,r;if(s&&l==="v")return r.flipY=!0,r;if(l=parseFloat(l),isNaN(l))return r;switch(s){case"grow":r.size=r.size+l;break;case"shrink":r.size=r.size-l;break;case"left":r.x=r.x-l;break;case"right":r.x=r.x+l;break;case"up":r.y=r.y-l;break;case"down":r.y=r.y+l;break;case"rotate":r.rotate=r.rotate+l;break}return r},n)},_rt={mixout:function(){return{parse:{transform:function(n){return Ej(n)}}}},hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-transform");return i&&(n.transform=Ej(i)),n}}},provides:function(e){e.generateAbstractTransformGrouping=function(n){var r=n.main,i=n.transform,o=n.containerWidth,s=n.iconWidth,l={transform:"translate(".concat(o/2," 256)")},c="translate(".concat(i.x*32,", ").concat(i.y*32,") "),h="scale(".concat(i.size/16*(i.flipX?-1:1),", ").concat(i.size/16*(i.flipY?-1:1),") "),d="rotate(".concat(i.rotate," 0 0)"),p={transform:"".concat(c," ").concat(h," ").concat(d)},m={transform:"translate(".concat(s/2*-1," -256)")},v={outer:l,inner:p,path:m};return{tag:"g",attributes:Vt({},v.outer),children:[{tag:"g",attributes:Vt({},v.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:Vt(Vt({},r.icon.attributes),v.path)}]}]}}}},Hw={x:0,y:0,width:"100%",height:"100%"};function Oj(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return t.attributes&&(t.attributes.fill||e)&&(t.attributes.fill="black"),t}function brt(t){return t.tag==="g"?t.children:[t]}var xrt={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-mask"),o=i?d1(i.split(" ").map(function(s){return s.trim()})):Nk();return o.prefix||(o.prefix=Ol()),n.mask=o,n.maskId=r.getAttribute("data-fa-mask-id"),n}}},provides:function(e){e.generateAbstractMask=function(n){var r=n.children,i=n.attributes,o=n.main,s=n.mask,l=n.maskId,c=n.transform,h=o.width,d=o.icon,p=s.width,m=s.icon,v=_nt({transform:c,containerWidth:p,iconWidth:h}),y={tag:"rect",attributes:Vt(Vt({},Hw),{},{fill:"white"})},_=d.children?{children:d.children.map(Oj)}:{},T={tag:"g",attributes:Vt({},v.inner),children:[Oj(Vt({tag:d.tag,attributes:Vt(Vt({},d.attributes),v.path)},_))]},x={tag:"g",attributes:Vt({},v.outer),children:[T]},w="mask-".concat(l||qm()),E="clip-".concat(l||qm()),O={tag:"mask",attributes:Vt(Vt({},Hw),{},{id:w,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[y,x]},k={tag:"defs",children:[{tag:"clipPath",attributes:{id:E},children:brt(m)},O]};return r.push(k,{tag:"rect",attributes:Vt({fill:"currentColor","clip-path":"url(#".concat(E,")"),mask:"url(#".concat(w,")")},Hw)}),{children:r,attributes:i}}}},wrt={provides:function(e){var n=!1;El.matchMedia&&(n=El.matchMedia("(prefers-reduced-motion: reduce)").matches),e.missingIconAbstract=function(){var r=[],i={fill:"currentColor"},o={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};r.push({tag:"path",attributes:Vt(Vt({},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=Vt(Vt({},o),{},{attributeName:"opacity"}),l={tag:"circle",attributes:Vt(Vt({},i),{},{cx:"256",cy:"364",r:"28"}),children:[]};return n||l.children.push({tag:"animate",attributes:Vt(Vt({},o),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:Vt(Vt({},s),{},{values:"1;0;1;1;0;1;"})}),r.push(l),r.push({tag:"path",attributes:Vt(Vt({},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:Vt(Vt({},s),{},{values:"1;0;0;0;0;1;"})}]}),n||r.push({tag:"path",attributes:Vt(Vt({},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:Vt(Vt({},s),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:r}}}},Srt={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}}}},Trt=[wnt,crt,urt,hrt,drt,vrt,yrt,_rt,xrt,wrt,Srt];Int(Trt,{mixoutsTo:Gi});Gi.noAuto;Gi.config;Gi.library;Gi.dom;var ST=Gi.parse;Gi.findIconDefinition;Gi.toHtml;var Ert=Gi.icon;Gi.layer;Gi.text;Gi.counter;var TB={exports:{}},Ort="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Crt=Ort,krt=Crt;function EB(){}function OB(){}OB.resetWarningCache=EB;var Prt=function(){function t(r,i,o,s,l,c){if(c!==krt){var h=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 h.name="Invariant Violation",h}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:OB,resetWarningCache:EB};return n.PropTypes=n,n};TB.exports=Prt();var Lrt=TB.exports;const F=xs(Lrt);function Cj(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function tl(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function Art(t,e){if(t==null)return{};var n=Mrt(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function TT(t){return Rrt(t)||jrt(t)||Nrt(t)||Drt()}function Rrt(t){if(Array.isArray(t))return ET(t)}function jrt(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Nrt(t,e){if(t){if(typeof t=="string")return ET(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ET(t,e)}}function ET(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n2&&arguments[2]!==void 0?arguments[2]:{};if(typeof e=="string")return e;var r=(e.children||[]).map(function(c){return kB(t,c)}),i=Object.keys(e.attributes||{}).reduce(function(c,h){var d=e.attributes[h];switch(h){case"class":c.attrs.className=d,delete e.attributes.class;break;case"style":c.attrs.style=zrt(d);break;default:h.indexOf("aria-")===0||h.indexOf("data-")===0?c.attrs[h.toLowerCase()]=d:c.attrs[CB(h)]=d}return c},{attrs:{}}),o=n.style,s=o===void 0?{}:o,l=Art(n,Brt);return i.attrs.style=tl(tl({},i.attrs.style),s),t.apply(void 0,[e.tag,tl(tl({},i.attrs),l)].concat(TT(r)))}var PB=!1;try{PB=!0}catch{}function Urt(){if(!PB&&console&&typeof console.error=="function"){var t;(t=console).error.apply(t,arguments)}}function kj(t){if(t&&f0(t)==="object"&&t.prefix&&t.iconName&&t.icon)return t;if(ST.icon)return ST.icon(t);if(t===null)return null;if(t&&f0(t)==="object"&&t.prefix&&t.iconName)return t;if(Array.isArray(t)&&t.length===2)return{prefix:t[0],iconName:t[1]};if(typeof t=="string")return{prefix:"fas",iconName:t}}function Ww(t,e){return Array.isArray(e)&&e.length>0||!Array.isArray(e)&&e?Eh({},t,e):{}}var zt=q.forwardRef(function(t,e){var n=t.icon,r=t.mask,i=t.symbol,o=t.className,s=t.title,l=t.titleId,c=t.maskId,h=kj(n),d=Ww("classes",[].concat(TT(Irt(t)),TT(o.split(" ")))),p=Ww("transform",typeof t.transform=="string"?ST.transform(t.transform):t.transform),m=Ww("mask",kj(r)),v=Ert(h,tl(tl(tl(tl({},d),p),m),{},{symbol:i,title:s,titleId:l,maskId:c}));if(!v)return Urt("Could not find icon",h),null;var y=v.abstract,_={ref:e};return Object.keys(t).forEach(function(T){zt.defaultProps.hasOwnProperty(T)||(_[T]=t[T])}),Vrt(y[0],_)});zt.displayName="FontAwesomeIcon";zt.propTypes={beat:F.bool,border:F.bool,beatFade:F.bool,bounce:F.bool,className:F.string,fade:F.bool,flash:F.bool,mask:F.oneOfType([F.object,F.array,F.string]),maskId:F.string,fixedWidth:F.bool,inverse:F.bool,flip:F.oneOf([!0,!1,"horizontal","vertical","both"]),icon:F.oneOfType([F.object,F.array,F.string]),listItem:F.bool,pull:F.oneOf(["right","left"]),pulse:F.bool,rotation:F.oneOf([0,90,180,270]),shake:F.bool,size:F.oneOf(["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:F.bool,spinPulse:F.bool,spinReverse:F.bool,symbol:F.oneOfType([F.bool,F.string]),title:F.string,titleId:F.string,transform:F.oneOfType([F.string,F.object]),swapOpacity:F.bool};zt.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 Vrt=kB.bind(null,q.createElement),LB={exports:{}};/*! - Copyright (c) 2018 Jed Watson. - Licensed under the MIT License (MIT), see - http://jedwatson.github.io/classnames -*/(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var r=[],i=0;i0?"".concat(t,"px"):null}function Yrt(){return document.body.clientWidth0&&arguments[0]!==void 0?arguments[0]:"",e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:qrt;return e?t.split(" ").map(function(n){return e[n]||n}).join(" "):t}function Il(t,e){var n={};return Object.keys(t).forEach(function(r){e.indexOf(r)===-1&&(n[r]=t[r])}),n}function AB(t,e){for(var n=Array.isArray(e)?e:[e],r=n.length,i,o={};r>0;)r-=1,i=n[r],o[i]=t[i];return o}var Pj={};function OT(t){Pj[t]||(typeof console<"u"&&console.error(t),Pj[t]=!0)}function RB(t,e){return function(r,i,o){r[i]!==null&&typeof r[i]<"u"&&OT('"'.concat(i,'" property of "').concat(o,`" has been deprecated. -`).concat(e));for(var s=arguments.length,l=new Array(s>3?s-3:0),c=3;c"u"?"undefined":rd(window))==="object"&&window.Element||function(){};function Bk(t,e,n){if(!(t[e]instanceof Krt))return new Error("Invalid prop `"+e+"` supplied to `"+n+"`. Expected prop to be an instance of Element. Validation failed.")}var id=F.oneOfType([F.string,F.func,Bk,F.shape({current:F.any})]),fe=F.oneOfType([F.func,F.string,F.shape({$$typeof:F.symbol,render:F.func}),F.arrayOf(F.oneOfType([F.func,F.string,F.shape({$$typeof:F.symbol,render:F.func})]))]),p0={Fade:150,Collapse:350,Modal:300,Carousel:600,Offcanvas:300},m0=["in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","onEnter","onEntering","onEntered","onExit","onExiting","onExited"],Qv={ENTERING:"entering",ENTERED:"entered",EXITING:"exiting",EXITED:"exited"},Le={esc:27,space:32,enter:13,tab:9,up:38,down:40,home:36,end:35,n:78,p:80},Xrt=["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"],$k=!!(typeof window<"u"&&window.document&&window.document.createElement);function Qrt(t){return t&&rd(t)==="object"?"current"in t:!1}function jB(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}function CT(t){var e=rd(t);return t!=null&&(e==="object"||e==="function")}function Lj(t){var e=rd(t),n=0/0;if(e==="number")return t;if(e==="symbol"||e==="object"&&jB(t)==="[object Symbol]")return n;if(CT(t)){var r=typeof t.valueOf=="function"?t.valueOf():t;t=CT(r)?"".concat(r):r}if(e!=="string")return t===0?t:+t;t=t.replace(/^\s+|\s+$/g,"");var i=/^0b[01]+$/i.test(t);return i||/^0o[0-7]+$/i.test(t)?parseInt(t.slice(2),i?2:8):/^[-+]0x[0-9a-f]+$/i.test(t)?n:+t}function Jrt(t){if(!CT(t))return!1;var e=jB(t);return e==="[object Function]"||e==="[object AsyncFunction]"||e==="[object GeneratorFunction]"||e==="[object Proxy]"}function tit(t){if(Qrt(t))return t.current;if(Jrt(t))return t();if(typeof t=="string"&&$k){var e=document.querySelectorAll(t);if(e.length||(e=document.querySelectorAll("#".concat(t))),!e.length)throw new Error("The target '".concat(t,"' could not be identified in the dom, tip: check spelling"));return e}return t}function Mj(t){return t===null?!1:Array.isArray(t)||$k&&typeof t.length=="number"}function Km(t,e){var n=tit(t);return e?Mj(n)?n:n===null?[]:[n]:Mj(n)?n[0]:n}var eit=["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"])'],nit=["className","cssModule","noGutters","tag","widths"];function kT(){return kT=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function iit(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}var oit=["xs","sm","md","lg","xl","xxl"],qu=F.oneOfType([F.number,F.string]),sit={tag:fe,noGutters:RB(F.bool,"Please use Bootstrap 5 gutter utility classes. https://getbootstrap.com/docs/5.0/layout/gutters/"),className:F.string,cssModule:F.object,xs:qu,sm:qu,md:qu,lg:qu,xl:qu,xxl:qu,widths:F.array};function qr(t){var e=t.className,n=t.cssModule,r=t.noGutters,i=t.tag,o=i===void 0?"div":i,s=t.widths,l=s===void 0?oit:s,c=rit(t,nit),h=[];l.forEach(function(p,m){var v=t[p];if(delete c[p],!!v){var y=!m;h.push(y?"row-cols-".concat(v):"row-cols-".concat(p,"-").concat(v))}});var d=Xt(qt(e,r?"gx-0":null,"row",h),n);return q.createElement(o,kT({},c,{className:d}))}qr.propTypes=sit;var ait=["expand","className","cssModule","light","dark","fixed","sticky","color","container","tag","children"];function PT(){return PT=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function cit(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}var uit={children:F.node,className:F.string,color:F.string,container:F.oneOfType([F.bool,F.string]),cssModule:F.object,dark:F.bool,expand:F.oneOfType([F.bool,F.string]),fixed:F.string,light:F.bool,role:F.string,sticky:F.string,tag:fe},hit=function(e){return e===!1?!1:e===!0||e==="xs"?"navbar-expand":"navbar-expand-".concat(e)};function NB(t){var e,n=t.expand,r=n===void 0?!1:n,i=t.className,o=t.cssModule,s=t.light,l=t.dark,c=t.fixed,h=t.sticky,d=t.color,p=t.container,m=p===void 0?"fluid":p,v=t.tag,y=v===void 0?"nav":v,_=t.children,T=lit(t,ait),x=Xt(qt(i,"navbar",hit(r),(e={"navbar-light":s,"navbar-dark":l},Yw(e,"bg-".concat(d),d),Yw(e,"fixed-".concat(c),c),Yw(e,"sticky-".concat(h),h),e)),o),w=m&&m===!0?"container":"container-".concat(m);return q.createElement(y,PT({},T,{className:x}),m?q.createElement("div",{className:w},_):_)}NB.propTypes=uit;var dit=["className","cssModule","tag"];function LT(){return LT=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function pit(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}var mit={className:F.string,cssModule:F.object,tag:fe};function DB(t){var e=t.className,n=t.cssModule,r=t.tag,i=r===void 0?"a":r,o=fit(t,dit),s=Xt(qt(e,"navbar-brand"),n);return q.createElement(i,LT({},o,{className:s}))}DB.propTypes=mit;var git=["className","cssModule","children","tag"];function MT(){return MT=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function bit(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}var xit={className:F.string,cssModule:F.object,tag:fe,type:F.string,children:F.node};function IB(t){var e=t.className,n=t.cssModule,r=t.children,i=t.tag,o=i===void 0?"button":i,s=_it(t,git),l=Xt(qt(e,"navbar-toggler"),n);return q.createElement(o,MT({"aria-label":"Toggle navigation"},vit({type:"button"},s),{className:l}),r||q.createElement("span",{className:Xt("navbar-toggler-icon",n)}))}IB.propTypes=xit;var wit=["className","cssModule","tabs","pills","vertical","horizontal","justified","fill","navbar","card","tag"];function AT(){return AT=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Tit(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}var Eit={card:F.bool,className:F.string,cssModule:F.object,fill:F.bool,horizontal:F.oneOf(["center","end"]),justified:F.bool,navbar:F.bool,pills:F.bool,tabs:F.bool,tag:fe,vertical:F.oneOfType([F.bool,F.string])},Oit=function(e){return e===!1?!1:e===!0||e==="xs"?"flex-column":"flex-".concat(e,"-column")};function zk(t){var e=t.className,n=t.cssModule,r=t.tabs,i=t.pills,o=t.vertical,s=o===void 0?!1:o,l=t.horizontal,c=t.justified,h=t.fill,d=t.navbar,p=t.card,m=t.tag,v=m===void 0?"ul":m,y=Sit(t,wit),_=Xt(qt(e,d?"navbar-nav":"nav",l?"justify-content-".concat(l):!1,Oit(s),{"nav-tabs":r,"card-header-tabs":p&&r,"nav-pills":i,"card-header-pills":p&&i,"nav-justified":c,"nav-fill":h}),n);return q.createElement(v,AT({},y,{className:_}))}zk.propTypes=Eit;var Cit=["className","cssModule","active","tag"];function RT(){return RT=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Pit(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}var Lit={active:F.bool,className:F.string,cssModule:F.object,tag:fe};function FB(t){var e=t.className,n=t.cssModule,r=t.active,i=t.tag,o=i===void 0?"li":i,s=kit(t,Cit),l=Xt(qt(e,"nav-item",r?"active":!1),n);return q.createElement(o,RT({},s,{className:l}))}FB.propTypes=Lit;function jT(t){"@babel/helpers - typeof";return jT=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},jT(t)}var Mit=["className","cssModule","active","tag","innerRef"];function NT(){return NT=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Rit(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}function jit(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Rj(t,e){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 g0(t){return g0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},g0(t)}var $it={active:F.bool,className:F.string,cssModule:F.object,disabled:F.bool,href:F.any,innerRef:F.oneOfType([F.object,F.func,F.string]),onClick:F.func,tag:fe},$B=function(t){Dit(n,t);var e=Iit(n);function n(r){var i;return jit(this,n),i=e.call(this,r),i.onClick=i.onClick.bind(BB(i)),i}return Nit(n,[{key:"onClick",value:function(i){if(this.props.disabled){i.preventDefault();return}this.props.href==="#"&&i.preventDefault(),this.props.onClick&&this.props.onClick(i)}},{key:"render",value:function(){var i=this.props,o=i.className,s=i.cssModule,l=i.active,c=i.tag,h=c===void 0?"a":c,d=i.innerRef,p=Ait(i,Mit),m=Xt(qt(o,"nav-link",{disabled:p.disabled,active:l}),s);return q.createElement(h,NT({},p,{ref:d,onClick:this.onClick,className:m}))}}]),n}(q.Component);$B.propTypes=$it;const zB=$B;var zit=["className","cssModule","variant","innerRef"];function IT(){return IT=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Wit(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}var Yit={active:F.bool,"aria-label":F.string,onClick:F.func,variant:F.oneOf(["white"]),className:F.string,cssModule:F.object,innerRef:F.oneOfType([F.object,F.string,F.func])};function UB(t){var e=t.className;t.cssModule;var n=t.variant,r=t.innerRef,i=Hit(t,zit),o=Xt(qt(e,"btn-close",n&&"btn-close-".concat(n)));return q.createElement("button",IT({ref:r,type:"button",className:o},Uit({"aria-label":"close"},i)))}UB.propTypes=Yit;var Zit=["active","aria-label","block","className","close","cssModule","color","outline","size","tag","innerRef"];function FT(){return FT=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function qit(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}var Kit={active:F.bool,"aria-label":F.string,block:F.bool,children:F.node,className:F.string,cssModule:F.object,close:F.bool,color:F.string,disabled:F.bool,innerRef:F.oneOfType([F.object,F.func,F.string]),onClick:F.func,outline:F.bool,size:F.string,tag:fe};function ke(t){var e=U.useCallback(function(w){if(t.disabled){w.preventDefault();return}if(t.onClick)return t.onClick(w)},[t.onClick,t.disabled]),n=t.active,r=t["aria-label"],i=t.block,o=t.className,s=t.close,l=t.cssModule,c=t.color,h=c===void 0?"secondary":c,d=t.outline,p=t.size,m=t.tag,v=m===void 0?"button":m,y=t.innerRef,_=Git(t,Zit);if(s)return q.createElement(UB,_);var T="btn".concat(d?"-outline":"","-").concat(h),x=Xt(qt(o,"btn",T,p?"btn-".concat(p):!1,i?"d-block w-100":!1,{active:n,disabled:t.disabled}),l);return _.href&&v==="button"&&(v="a"),q.createElement(v,FT({type:v==="button"&&_.onClick?"button":void 0},_,{className:x,ref:y,onClick:e,"aria-label":r}))}ke.propTypes=Kit;var VB=U.createContext(),HB=U.createContext();function Nj(t){var e=t.children,n=U.useState(null),r=n[0],i=n[1],o=U.useRef(!1);U.useEffect(function(){return function(){o.current=!0}},[]);var s=U.useCallback(function(l){o.current||i(l)},[]);return U.createElement(VB.Provider,{value:r},U.createElement(HB.Provider,{value:s},e))}var WB=function(e){return Array.isArray(e)?e[0]:e},YB=function(e){if(typeof e=="function"){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i"u")return!1;var e=$i(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function cot(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},i=e.attributes[n]||{},o=e.elements[n];!ao(o)||!vs(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var l=i[s];l===!1?o.removeAttribute(s):o.setAttribute(s,l===!0?"":l)}))})}function uot(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){var i=e.elements[r],o=e.attributes[r]||{},s=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),l=s.reduce(function(c,h){return c[h]="",c},{});!ao(i)||!vs(i)||(Object.assign(i.style,l),Object.keys(o).forEach(function(c){i.removeAttribute(c)}))})}}const hot={name:"applyStyles",enabled:!0,phase:"write",fn:cot,effect:uot,requires:["computeStyles"]};function fs(t){return t.split("-")[0]}var eu=Math.max,v0=Math.min,sd=Math.round;function $T(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function qB(){return!/^((?!chrome|android).)*safari/i.test($T())}function ad(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var r=t.getBoundingClientRect(),i=1,o=1;e&&ao(t)&&(i=t.offsetWidth>0&&sd(r.width)/t.offsetWidth||1,o=t.offsetHeight>0&&sd(r.height)/t.offsetHeight||1);var s=_u(t)?$i(t):window,l=s.visualViewport,c=!qB()&&n,h=(r.left+(c&&l?l.offsetLeft:0))/i,d=(r.top+(c&&l?l.offsetTop:0))/o,p=r.width/i,m=r.height/o;return{width:p,height:m,top:d,right:h+p,bottom:d+m,left:h,x:h,y:d}}function Hk(t){var e=ad(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function KB(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&Vk(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function ga(t){return $i(t).getComputedStyle(t)}function dot(t){return["table","td","th"].indexOf(vs(t))>=0}function Fl(t){return((_u(t)?t.ownerDocument:t.document)||window.document).documentElement}function p1(t){return vs(t)==="html"?t:t.assignedSlot||t.parentNode||(Vk(t)?t.host:null)||Fl(t)}function Bj(t){return!ao(t)||ga(t).position==="fixed"?null:t.offsetParent}function fot(t){var e=/firefox/i.test($T()),n=/Trident/i.test($T());if(n&&ao(t)){var r=ga(t);if(r.position==="fixed")return null}var i=p1(t);for(Vk(i)&&(i=i.host);ao(i)&&["html","body"].indexOf(vs(i))<0;){var o=ga(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||e&&o.willChange==="filter"||e&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Bg(t){for(var e=$i(t),n=Bj(t);n&&dot(n)&&ga(n).position==="static";)n=Bj(n);return n&&(vs(n)==="html"||vs(n)==="body"&&ga(n).position==="static")?e:n||fot(t)||e}function Wk(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Qp(t,e,n){return eu(t,v0(e,n))}function pot(t,e,n){var r=Qp(t,e,n);return r>n?n:r}function XB(){return{top:0,right:0,bottom:0,left:0}}function QB(t){return Object.assign({},XB(),t)}function JB(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var mot=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,QB(typeof e!="number"?e:JB(e,Fg))};function got(t){var e,n=t.state,r=t.name,i=t.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,l=fs(n.placement),c=Wk(l),h=[ci,mo].indexOf(l)>=0,d=h?"height":"width";if(!(!o||!s)){var p=mot(i.padding,n),m=Hk(o),v=c==="y"?li:ci,y=c==="y"?po:mo,_=n.rects.reference[d]+n.rects.reference[c]-s[c]-n.rects.popper[d],T=s[c]-n.rects.reference[c],x=Bg(o),w=x?c==="y"?x.clientHeight||0:x.clientWidth||0:0,E=_/2-T/2,O=p[v],k=w-m[d]-p[y],P=w/2-m[d]/2+E,A=Qp(O,P,k),j=c;n.modifiersData[r]=(e={},e[j]=A,e.centerOffset=A-P,e)}}function vot(t){var e=t.state,n=t.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||KB(e.elements.popper,i)&&(e.elements.arrow=i))}const yot={name:"arrow",enabled:!0,phase:"main",fn:got,effect:vot,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ld(t){return t.split("-")[1]}var _ot={top:"auto",right:"auto",bottom:"auto",left:"auto"};function bot(t,e){var n=t.x,r=t.y,i=e.devicePixelRatio||1;return{x:sd(n*i)/i||0,y:sd(r*i)/i||0}}function $j(t){var e,n=t.popper,r=t.popperRect,i=t.placement,o=t.variation,s=t.offsets,l=t.position,c=t.gpuAcceleration,h=t.adaptive,d=t.roundOffsets,p=t.isFixed,m=s.x,v=m===void 0?0:m,y=s.y,_=y===void 0?0:y,T=typeof d=="function"?d({x:v,y:_}):{x:v,y:_};v=T.x,_=T.y;var x=s.hasOwnProperty("x"),w=s.hasOwnProperty("y"),E=ci,O=li,k=window;if(h){var P=Bg(n),A="clientHeight",j="clientWidth";if(P===$i(n)&&(P=Fl(n),ga(P).position!=="static"&&l==="absolute"&&(A="scrollHeight",j="scrollWidth")),P=P,i===li||(i===ci||i===mo)&&o===Xm){O=po;var B=p&&P===k&&k.visualViewport?k.visualViewport.height:P[A];_-=B-r.height,_*=c?1:-1}if(i===ci||(i===li||i===po)&&o===Xm){E=mo;var N=p&&P===k&&k.visualViewport?k.visualViewport.width:P[j];v-=N-r.width,v*=c?1:-1}}var V=Object.assign({position:l},h&&_ot),Y=d===!0?bot({x:v,y:_},$i(n)):{x:v,y:_};if(v=Y.x,_=Y.y,c){var nt;return Object.assign({},V,(nt={},nt[O]=w?"0":"",nt[E]=x?"0":"",nt.transform=(k.devicePixelRatio||1)<=1?"translate("+v+"px, "+_+"px)":"translate3d("+v+"px, "+_+"px, 0)",nt))}return Object.assign({},V,(e={},e[O]=w?_+"px":"",e[E]=x?v+"px":"",e.transform="",e))}function xot(t){var e=t.state,n=t.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,s=o===void 0?!0:o,l=n.roundOffsets,c=l===void 0?!0:l,h={placement:fs(e.placement),variation:ld(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,$j(Object.assign({},h,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:c})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,$j(Object.assign({},h,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const wot={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:xot,data:{}};var Jv={passive:!0};function Sot(t){var e=t.state,n=t.instance,r=t.options,i=r.scroll,o=i===void 0?!0:i,s=r.resize,l=s===void 0?!0:s,c=$i(e.elements.popper),h=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&h.forEach(function(d){d.addEventListener("scroll",n.update,Jv)}),l&&c.addEventListener("resize",n.update,Jv),function(){o&&h.forEach(function(d){d.removeEventListener("scroll",n.update,Jv)}),l&&c.removeEventListener("resize",n.update,Jv)}}const Tot={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Sot,data:{}};var Eot={left:"right",right:"left",bottom:"top",top:"bottom"};function i_(t){return t.replace(/left|right|bottom|top/g,function(e){return Eot[e]})}var Oot={start:"end",end:"start"};function zj(t){return t.replace(/start|end/g,function(e){return Oot[e]})}function Yk(t){var e=$i(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Zk(t){return ad(Fl(t)).left+Yk(t).scrollLeft}function Cot(t,e){var n=$i(t),r=Fl(t),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,l=0,c=0;if(i){o=i.width,s=i.height;var h=qB();(h||!h&&e==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}return{width:o,height:s,x:l+Zk(t),y:c}}function kot(t){var e,n=Fl(t),r=Yk(t),i=(e=t.ownerDocument)==null?void 0:e.body,o=eu(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=eu(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),l=-r.scrollLeft+Zk(t),c=-r.scrollTop;return ga(i||n).direction==="rtl"&&(l+=eu(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:l,y:c}}function Gk(t){var e=ga(t),n=e.overflow,r=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function t$(t){return["html","body","#document"].indexOf(vs(t))>=0?t.ownerDocument.body:ao(t)&&Gk(t)?t:t$(p1(t))}function Jp(t,e){var n;e===void 0&&(e=[]);var r=t$(t),i=r===((n=t.ownerDocument)==null?void 0:n.body),o=$i(r),s=i?[o].concat(o.visualViewport||[],Gk(r)?r:[]):r,l=e.concat(s);return i?l:l.concat(Jp(p1(s)))}function zT(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Pot(t,e){var n=ad(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function Uj(t,e,n){return e===ZB?zT(Cot(t,n)):_u(e)?Pot(e,n):zT(kot(Fl(t)))}function Lot(t){var e=Jp(p1(t)),n=["absolute","fixed"].indexOf(ga(t).position)>=0,r=n&&ao(t)?Bg(t):t;return _u(r)?e.filter(function(i){return _u(i)&&KB(i,r)&&vs(i)!=="body"}):[]}function Mot(t,e,n,r){var i=e==="clippingParents"?Lot(t):[].concat(e),o=[].concat(i,[n]),s=o[0],l=o.reduce(function(c,h){var d=Uj(t,h,r);return c.top=eu(d.top,c.top),c.right=v0(d.right,c.right),c.bottom=v0(d.bottom,c.bottom),c.left=eu(d.left,c.left),c},Uj(t,s,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function e$(t){var e=t.reference,n=t.element,r=t.placement,i=r?fs(r):null,o=r?ld(r):null,s=e.x+e.width/2-n.width/2,l=e.y+e.height/2-n.height/2,c;switch(i){case li:c={x:s,y:e.y-n.height};break;case po:c={x:s,y:e.y+e.height};break;case mo:c={x:e.x+e.width,y:l};break;case ci:c={x:e.x-n.width,y:l};break;default:c={x:e.x,y:e.y}}var h=i?Wk(i):null;if(h!=null){var d=h==="y"?"height":"width";switch(o){case od:c[h]=c[h]-(e[d]/2-n[d]/2);break;case Xm:c[h]=c[h]+(e[d]/2-n[d]/2);break}}return c}function Qm(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=r===void 0?t.placement:r,o=n.strategy,s=o===void 0?t.strategy:o,l=n.boundary,c=l===void 0?Xit:l,h=n.rootBoundary,d=h===void 0?ZB:h,p=n.elementContext,m=p===void 0?ep:p,v=n.altBoundary,y=v===void 0?!1:v,_=n.padding,T=_===void 0?0:_,x=QB(typeof T!="number"?T:JB(T,Fg)),w=m===ep?Qit:ep,E=t.rects.popper,O=t.elements[y?w:m],k=Mot(_u(O)?O:O.contextElement||Fl(t.elements.popper),c,d,s),P=ad(t.elements.reference),A=e$({reference:P,element:E,strategy:"absolute",placement:i}),j=zT(Object.assign({},E,A)),B=m===ep?j:P,N={top:k.top-B.top+x.top,bottom:B.bottom-k.bottom+x.bottom,left:k.left-B.left+x.left,right:B.right-k.right+x.right},V=t.modifiersData.offset;if(m===ep&&V){var Y=V[i];Object.keys(N).forEach(function(nt){var K=[mo,po].indexOf(nt)>=0?1:-1,J=[li,po].indexOf(nt)>=0?"y":"x";N[nt]+=Y[J]*K})}return N}function Aot(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,l=n.flipVariations,c=n.allowedAutoPlacements,h=c===void 0?GB:c,d=ld(r),p=d?l?Fj:Fj.filter(function(y){return ld(y)===d}):Fg,m=p.filter(function(y){return h.indexOf(y)>=0});m.length===0&&(m=p);var v=m.reduce(function(y,_){return y[_]=Qm(t,{placement:_,boundary:i,rootBoundary:o,padding:s})[fs(_)],y},{});return Object.keys(v).sort(function(y,_){return v[y]-v[_]})}function Rot(t){if(fs(t)===Uk)return[];var e=i_(t);return[zj(t),e,zj(e)]}function jot(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,l=s===void 0?!0:s,c=n.fallbackPlacements,h=n.padding,d=n.boundary,p=n.rootBoundary,m=n.altBoundary,v=n.flipVariations,y=v===void 0?!0:v,_=n.allowedAutoPlacements,T=e.options.placement,x=fs(T),w=x===T,E=c||(w||!y?[i_(T)]:Rot(T)),O=[T].concat(E).reduce(function(Q,tt){return Q.concat(fs(tt)===Uk?Aot(e,{placement:tt,boundary:d,rootBoundary:p,padding:h,flipVariations:y,allowedAutoPlacements:_}):tt)},[]),k=e.rects.reference,P=e.rects.popper,A=new Map,j=!0,B=O[0],N=0;N=0,J=K?"width":"height",et=Qm(e,{placement:V,boundary:d,rootBoundary:p,altBoundary:m,padding:h}),ct=K?nt?mo:ci:nt?po:li;k[J]>P[J]&&(ct=i_(ct));var G=i_(ct),$=[];if(o&&$.push(et[Y]<=0),l&&$.push(et[ct]<=0,et[G]<=0),$.every(function(Q){return Q})){B=V,j=!1;break}A.set(V,$)}if(j)for(var I=y?3:1,H=function(tt){var rt=O.find(function(mt){var M=A.get(mt);if(M)return M.slice(0,tt).every(function(R){return R})});if(rt)return B=rt,"break"},it=I;it>0;it--){var W=H(it);if(W==="break")break}e.placement!==B&&(e.modifiersData[r]._skip=!0,e.placement=B,e.reset=!0)}}const Not={name:"flip",enabled:!0,phase:"main",fn:jot,requiresIfExists:["offset"],data:{_skip:!1}};function Vj(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function Hj(t){return[li,mo,po,ci].some(function(e){return t[e]>=0})}function Dot(t){var e=t.state,n=t.name,r=e.rects.reference,i=e.rects.popper,o=e.modifiersData.preventOverflow,s=Qm(e,{elementContext:"reference"}),l=Qm(e,{altBoundary:!0}),c=Vj(s,r),h=Vj(l,i,o),d=Hj(c),p=Hj(h);e.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:h,isReferenceHidden:d,hasPopperEscaped:p},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":p})}const Iot={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Dot};function Fot(t,e,n){var r=fs(t),i=[ci,li].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,s=o[0],l=o[1];return s=s||0,l=(l||0)*i,[ci,mo].indexOf(r)>=0?{x:l,y:s}:{x:s,y:l}}function Bot(t){var e=t.state,n=t.options,r=t.name,i=n.offset,o=i===void 0?[0,0]:i,s=GB.reduce(function(d,p){return d[p]=Fot(p,e.rects,o),d},{}),l=s[e.placement],c=l.x,h=l.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=c,e.modifiersData.popperOffsets.y+=h),e.modifiersData[r]=s}const $ot={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Bot};function zot(t){var e=t.state,n=t.name;e.modifiersData[n]=e$({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const Uot={name:"popperOffsets",enabled:!0,phase:"read",fn:zot,data:{}};function Vot(t){return t==="x"?"y":"x"}function Hot(t){var e=t.state,n=t.options,r=t.name,i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,l=s===void 0?!1:s,c=n.boundary,h=n.rootBoundary,d=n.altBoundary,p=n.padding,m=n.tether,v=m===void 0?!0:m,y=n.tetherOffset,_=y===void 0?0:y,T=Qm(e,{boundary:c,rootBoundary:h,padding:p,altBoundary:d}),x=fs(e.placement),w=ld(e.placement),E=!w,O=Wk(x),k=Vot(O),P=e.modifiersData.popperOffsets,A=e.rects.reference,j=e.rects.popper,B=typeof _=="function"?_(Object.assign({},e.rects,{placement:e.placement})):_,N=typeof B=="number"?{mainAxis:B,altAxis:B}:Object.assign({mainAxis:0,altAxis:0},B),V=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,Y={x:0,y:0};if(P){if(o){var nt,K=O==="y"?li:ci,J=O==="y"?po:mo,et=O==="y"?"height":"width",ct=P[O],G=ct+T[K],$=ct-T[J],I=v?-j[et]/2:0,H=w===od?A[et]:j[et],it=w===od?-j[et]:-A[et],W=e.elements.arrow,Q=v&&W?Hk(W):{width:0,height:0},tt=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:XB(),rt=tt[K],mt=tt[J],M=Qp(0,A[et],Q[et]),R=E?A[et]/2-I-M-rt-N.mainAxis:H-M-rt-N.mainAxis,z=E?-A[et]/2+I+M+mt+N.mainAxis:it+M+mt+N.mainAxis,at=e.elements.arrow&&Bg(e.elements.arrow),st=at?O==="y"?at.clientTop||0:at.clientLeft||0:0,ht=(nt=V==null?void 0:V[O])!=null?nt:0,bt=ct+R-ht-st,It=ct+z-ht,ft=Qp(v?v0(G,bt):G,ct,v?eu($,It):$);P[O]=ft,Y[O]=ft-ct}if(l){var vt,_t=O==="x"?li:ci,Ct=O==="x"?po:mo,Mt=P[k],Lt=k==="y"?"height":"width",jt=Mt+T[_t],dt=Mt-T[Ct],pt=[li,ci].indexOf(x)!==-1,xt=(vt=V==null?void 0:V[k])!=null?vt:0,yt=pt?jt:Mt-A[Lt]-j[Lt]-xt+N.altAxis,Et=pt?Mt+A[Lt]+j[Lt]-xt-N.altAxis:dt,At=v&&pt?pot(yt,Mt,Et):Qp(v?yt:jt,Mt,v?Et:dt);P[k]=At,Y[k]=At-Mt}e.modifiersData[r]=Y}}const Wot={name:"preventOverflow",enabled:!0,phase:"main",fn:Hot,requiresIfExists:["offset"]};function Yot(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Zot(t){return t===$i(t)||!ao(t)?Yk(t):Yot(t)}function Got(t){var e=t.getBoundingClientRect(),n=sd(e.width)/t.offsetWidth||1,r=sd(e.height)/t.offsetHeight||1;return n!==1||r!==1}function qot(t,e,n){n===void 0&&(n=!1);var r=ao(e),i=ao(e)&&Got(e),o=Fl(e),s=ad(t,i,n),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((vs(e)!=="body"||Gk(o))&&(l=Zot(e)),ao(e)?(c=ad(e,!0),c.x+=e.clientLeft,c.y+=e.clientTop):o&&(c.x=Zk(o))),{x:s.left+l.scrollLeft-c.x,y:s.top+l.scrollTop-c.y,width:s.width,height:s.height}}function Kot(t){var e=new Map,n=new Set,r=[];t.forEach(function(o){e.set(o.name,o)});function i(o){n.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(l){if(!n.has(l)){var c=e.get(l);c&&i(c)}}),r.push(o)}return t.forEach(function(o){n.has(o.name)||i(o)}),r}function Xot(t){var e=Kot(t);return lot.reduce(function(n,r){return n.concat(e.filter(function(i){return i.phase===r}))},[])}function Qot(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function Jot(t){var e=t.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(e).map(function(n){return e[n]})}var Wj={placement:"bottom",modifiers:[],strategy:"absolute"};function Yj(){for(var t=arguments.length,e=new Array(t),n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function bst(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}function xst(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Zj(t,e){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 y0(t){return y0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},y0(t)}var Cst={a11y:F.bool,disabled:F.bool,direction:F.oneOf(["up","down","start","end","left","right"]),group:F.bool,isOpen:F.bool,nav:F.bool,active:F.bool,size:F.string,tag:fe,toggle:F.func,children:F.node,className:F.string,cssModule:F.object,dropup:F.bool,inNavbar:F.bool,setActiveFromChild:F.bool,menuRole:F.oneOf(["listbox","menu"])},kst={a11y:!0,isOpen:!1,direction:"down",nav:!1,active:!1,inNavbar:!1,setActiveFromChild:!1},Pst=[Le.space,Le.enter,Le.up,Le.down,Le.end,Le.home],m1=function(t){Sst(n,t);var e=Tst(n);function n(r){var i;return xst(this,n),i=e.call(this,r),i.addEvents=i.addEvents.bind(Ia(i)),i.handleDocumentClick=i.handleDocumentClick.bind(Ia(i)),i.handleKeyDown=i.handleKeyDown.bind(Ia(i)),i.removeEvents=i.removeEvents.bind(Ia(i)),i.toggle=i.toggle.bind(Ia(i)),i.handleMenuRef=i.handleMenuRef.bind(Ia(i)),i.handleToggleRef=i.handleToggleRef.bind(Ia(i)),i.containerRef=q.createRef(),i.menuRef=q.createRef(),i.toggleRef=q.createRef(),i}return wst(n,[{key:"componentDidMount",value:function(){this.handleProps()}},{key:"componentDidUpdate",value:function(i){this.props.isOpen!==i.isOpen&&this.handleProps()}},{key:"componentWillUnmount",value:function(){this.removeEvents()}},{key:"handleMenuRef",value:function(i){this.menuRef.current=i}},{key:"handleToggleRef",value:function(i){this.toggleRef.current=i}},{key:"handleDocumentClick",value:function(i){if(!(i&&(i.which===3||i.type==="keyup"&&i.which!==Le.tab))){var o=this.getContainer(),s=this.getMenu(),l=this.getToggle(),c=l.contains(i.target),h=s&&s.contains(i.target)&&s!==i.target,d=!1;o&&(d=o.classList.contains("input-group")&&o.classList.contains("dropdown")&&i.target.tagName==="INPUT"),!((c&&!d||h)&&(i.type!=="keyup"||i.which===Le.tab))&&this.toggle(i)}}},{key:"handleKeyDown",value:function(i){var o=this,s=i.target.getAttribute("role")==="menuitem"||i.target.getAttribute("role")==="option",l=this.getMenuCtrl()===i.target,c=Le.tab===i.which;if(!(/input|textarea/i.test(i.target.tagName)||c&&!this.props.a11y||c&&!(s||l))&&((Pst.indexOf(i.which)!==-1||i.which>=48&&i.which<=90)&&i.preventDefault(),!this.props.disabled)){if(l)if([Le.space,Le.enter,Le.up,Le.down].indexOf(i.which)>-1)this.props.isOpen||this.toggle(i),setTimeout(function(){var w;return(w=o.getMenuItems()[0])===null||w===void 0?void 0:w.focus()});else if(this.props.isOpen&&c){var h;i.preventDefault(),(h=this.getMenuItems()[0])===null||h===void 0||h.focus()}else this.props.isOpen&&i.which===Le.esc&&this.toggle(i);if(this.props.isOpen&&s){if([Le.tab,Le.esc].indexOf(i.which)>-1)this.toggle(i),this.getMenuCtrl().focus();else if([Le.space,Le.enter].indexOf(i.which)>-1)i.target.click(),this.getMenuCtrl().focus();else if([Le.down,Le.up].indexOf(i.which)>-1||[Le.n,Le.p].indexOf(i.which)>-1&&i.ctrlKey){var d=this.getMenuItems(),p=d.indexOf(i.target);Le.up===i.which||Le.p===i.which&&i.ctrlKey?p=p!==0?p-1:d.length-1:(Le.down===i.which||Le.n===i.which&&i.ctrlKey)&&(p=p===d.length-1?0:p+1),d[p].focus()}else if(Le.end===i.which){var m=this.getMenuItems();m[m.length-1].focus()}else if(Le.home===i.which){var v=this.getMenuItems();v[0].focus()}else if(i.which>=48&&i.which<=90)for(var y=this.getMenuItems(),_=String.fromCharCode(i.which).toLowerCase(),T=0;T=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Ast(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}function Rst(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Gj(t,e){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 _0(t){return _0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},_0(t)}var Bst={children:F.node,active:F.bool,disabled:F.bool,divider:F.bool,tag:fe,header:F.bool,onClick:F.func,className:F.string,cssModule:F.object,toggle:F.bool,text:F.bool},qk=function(t){Nst(n,t);var e=Dst(n);function n(r){var i;return Rst(this,n),i=e.call(this,r),i.onClick=i.onClick.bind(GT(i)),i.getTabIndex=i.getTabIndex.bind(GT(i)),i}return jst(n,[{key:"onClick",value:function(i){var o,s=this.props,l=s.disabled,c=s.header,h=s.divider,d=s.text;if(l||c||h||d){i.preventDefault();return}this.props.onClick&&this.props.onClick(i),(!((o=this.props.toggle)!==null&&o!==void 0)||o)&&this.context.toggle(i)}},{key:"getRole",value:function(){return this.context.menuRole==="listbox"?"option":"menuitem"}},{key:"getTabIndex",value:function(){var i=this.props,o=i.disabled,s=i.header,l=i.divider,c=i.text;return o||s||l||c?"-1":"0"}},{key:"render",value:function(){var i=this.getTabIndex(),o=i>-1?this.getRole():void 0,s=Il(this.props,["toggle"]),l=s.className,c=s.cssModule,h=s.divider,d=s.tag,p=d===void 0?"button":d,m=s.header,v=s.active,y=s.text,_=Mst(s,Lst),T=Xt(qt(l,{disabled:_.disabled,"dropdown-item":!h&&!m&&!y,active:v,"dropdown-header":m,"dropdown-divider":h,"dropdown-item-text":y}),c);return p==="button"&&(m?p="h6":h?p="div":_.href?p="a":y&&(p="span")),q.createElement(p,YT({type:p==="button"&&(_.onClick||this.props.toggle)?"button":void 0},_,{tabIndex:i,role:o,className:T,onClick:this.onClick}))}}]),n}(q.Component);qk.propTypes=Bst;qk.contextType=Jm;const Zt=qk;function qT(t){"@babel/helpers - typeof";return qT=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qT(t)}var $st=["className","cssModule","dark","end","right","tag","flip","modifiers","persist","strategy","container","updateOnSelect"];function b0(){return b0=Object.assign?Object.assign.bind():function(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Gst(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}function qst(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Xj(t,e){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 x0(t){return x0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},x0(t)}var nat={tag:fe,children:F.node.isRequired,dark:F.bool,end:F.bool,flip:F.bool,modifiers:F.array,className:F.string,cssModule:F.object,style:F.object,persist:F.bool,strategy:F.string,container:id,updateOnSelect:F.bool,right:RB(F.bool,'Please use "end" instead.')},rat={up:"top",left:"left",right:"right",start:"left",end:"right",down:"bottom"},Kk=function(t){Xst(n,t);var e=Qst(n);function n(){return qst(this,n),e.apply(this,arguments)}return Kst(n,[{key:"getRole",value:function(){return this.context.menuRole==="listbox"?"listbox":"menu"}},{key:"render",value:function(){var i=this,o=this.props,s=o.className,l=o.cssModule,c=o.dark,h=o.end,d=o.right,p=o.tag,m=p===void 0?"div":p,v=o.flip,y=v===void 0?!0:v,_=o.modifiers,T=_===void 0?[]:_,x=o.persist,w=o.strategy,E=o.container,O=o.updateOnSelect,k=Zst(o,$st),P=Xt(qt(s,"dropdown-menu",{"dropdown-menu-dark":c,"dropdown-menu-end":h||d,show:this.context.isOpen}),l),A=m;if(x||this.context.isOpen&&!this.context.inNavbar){var j=rat[this.context.direction]||"bottom",B=h||d?"end":"start",N="".concat(j,"-").concat(B),V=[].concat(Ust(T),[{name:"flip",enabled:!!y}]),Y=q.createElement(n$,{placement:N,modifiers:V,strategy:w},function(K){var J=K.ref,et=K.style,ct=K.placement,G=K.update,$=Kj(Kj({},i.props.style),et),I=function(it){J(it);var W=i.context.onMenuRef;W&&W(it)};return q.createElement(A,b0({tabIndex:"-1",role:i.getRole(),ref:I},k,{style:$,"aria-hidden":!i.context.isOpen,className:P,"data-popper-placement":ct,onClick:function(){return O&&G()}}))});return E?Jc.createPortal(Y,Km(E)):Y}var nt=this.context.onMenuRef;return q.createElement(A,b0({tabIndex:"-1",role:this.getRole()},k,{ref:nt,"aria-hidden":!this.context.isOpen,className:P,"data-popper-placement":k.placement}))}}]),n}(q.Component);Kk.propTypes=nat;Kk.contextType=Jm;const Nd=Kk;function QT(t){"@babel/helpers - typeof";return QT=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},QT(t)}var iat=["className","color","cssModule","caret","split","nav","tag","innerRef"];function oat(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function w0(){return w0=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function aat(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}function lat(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Qj(t,e){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 S0(t){return S0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},S0(t)}var pat={caret:F.bool,color:F.string,children:F.node,className:F.string,cssModule:F.object,disabled:F.bool,onClick:F.func,"aria-haspopup":F.bool,split:F.bool,tag:fe,nav:F.bool,innerRef:F.oneOfType([F.object,F.string,F.func])},mat={color:"secondary","aria-haspopup":!0},g1=function(t){uat(n,t);var e=hat(n);function n(r){var i;return lat(this,n),i=e.call(this,r),i.onClick=i.onClick.bind(i$(i)),i}return cat(n,[{key:"onClick",value:function(i){if(this.props.disabled||this.context.disabled){i.preventDefault();return}this.props.nav&&!this.props.tag&&i.preventDefault(),this.props.onClick&&this.props.onClick(i),this.context.toggle(i)}},{key:"getRole",value:function(){return this.context.menuRole||this.props["aria-haspopup"]}},{key:"render",value:function(){var i=this,o=this.props,s=o.className,l=o.color,c=o.cssModule,h=o.caret,d=o.split,p=o.nav,m=o.tag,v=o.innerRef,y=sat(o,iat),_=y["aria-label"]||"Toggle Dropdown",T=Xt(qt(s,{"dropdown-toggle":h||d,"dropdown-toggle-split":d,"nav-link":p}),c),x=typeof y.children<"u"?y.children:q.createElement("span",{className:"visually-hidden"},_),w;return p&&!m?(w="a",y.href="#"):m?w=m:(w=ke,y.color=l,y.cssModule=c),this.context.inNavbar?q.createElement(w,w0({},y,{className:T,onClick:this.onClick,ref:this.context.onToggleRef,"aria-expanded":this.context.isOpen,"aria-haspopup":this.getRole(),children:x})):q.createElement(vst,{innerRef:v},function(E){var O=E.ref,k=function(A){O(A);var j=i.context.onToggleRef;j&&j(A)};return q.createElement(w,w0({},y,oat({},typeof w=="string"?"ref":"innerRef",k),{className:T,onClick:i.onClick,"aria-expanded":i.context.isOpen,"aria-haspopup":i.getRole(),children:x}))})}}]),n}(q.Component);g1.propTypes=pat;g1.defaultProps=mat;g1.contextType=Jm;const zg=g1;function tE(t,e){return tE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},tE(t,e)}function gat(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,tE(t,e)}const Jj={disabled:!1},o$=q.createContext(null);var Cp="unmounted",jc="exited",Nc="entering",ah="entered",eE="exiting",Oa=function(t){gat(e,t);function e(r,i){var o;o=t.call(this,r,i)||this;var s=i,l=s&&!s.isMounting?r.enter:r.appear,c;return o.appearStatus=null,r.in?l?(c=jc,o.appearStatus=Nc):c=ah:r.unmountOnExit||r.mountOnEnter?c=Cp:c=jc,o.state={status:c},o.nextCallback=null,o}e.getDerivedStateFromProps=function(i,o){var s=i.in;return s&&o.status===Cp?{status:jc}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var s=this.state.status;this.props.in?s!==Nc&&s!==ah&&(o=Nc):(s===Nc||s===ah)&&(o=eE)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,s,l;return o=s=l=i,i!=null&&typeof i!="number"&&(o=i.exit,s=i.enter,l=i.appear!==void 0?i.appear:s),{exit:o,enter:s,appear:l}},n.updateStatus=function(i,o){i===void 0&&(i=!1),o!==null?(this.cancelNextCallback(),o===Nc?this.performEnter(i):this.performExit()):this.props.unmountOnExit&&this.state.status===jc&&this.setState({status:Cp})},n.performEnter=function(i){var o=this,s=this.props.enter,l=this.context?this.context.isMounting:i,c=this.props.nodeRef?[l]:[Jc.findDOMNode(this),l],h=c[0],d=c[1],p=this.getTimeouts(),m=l?p.appear:p.enter;if(!i&&!s||Jj.disabled){this.safeSetState({status:ah},function(){o.props.onEntered(h)});return}this.props.onEnter(h,d),this.safeSetState({status:Nc},function(){o.props.onEntering(h,d),o.onTransitionEnd(m,function(){o.safeSetState({status:ah},function(){o.props.onEntered(h,d)})})})},n.performExit=function(){var i=this,o=this.props.exit,s=this.getTimeouts(),l=this.props.nodeRef?void 0:Jc.findDOMNode(this);if(!o||Jj.disabled){this.safeSetState({status:jc},function(){i.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:eE},function(){i.props.onExiting(l),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:jc},function(){i.props.onExited(l)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,s=!0;return this.nextCallback=function(l){s&&(s=!1,o.nextCallback=null,i(l))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var s=this.props.nodeRef?this.props.nodeRef.current:Jc.findDOMNode(this),l=i==null&&!this.props.addEndListener;if(!s||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],h=c[0],d=c[1];this.props.addEndListener(h,d)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Cp)return null;var o=this.props,s=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var l=XC(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return q.createElement(o$.Provider,{value:null},typeof s=="function"?s(i,l):q.cloneElement(q.Children.only(s),l))},e}(q.Component);Oa.contextType=o$;Oa.propTypes={};function Ku(){}Oa.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ku,onEntering:Ku,onEntered:Ku,onExit:Ku,onExiting:Ku,onExited:Ku};Oa.UNMOUNTED=Cp;Oa.EXITED=jc;Oa.ENTERING=Nc;Oa.ENTERED=ah;Oa.EXITING=eE;const Dd=Oa;var vat=["tag","baseClass","baseClassActive","className","cssModule","children","innerRef"];function T0(){return T0=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function _at(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}function tN(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function tg(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Tat(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}function Eat(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function eN(t,e){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 O0(t){return O0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},O0(t)}function nN(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function cd(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Fat(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}var Bat={body:F.bool,className:F.string,color:F.string,cssModule:F.object,innerRef:F.oneOfType([F.object,F.string,F.func]),inverse:F.bool,outline:F.bool,tag:fe};function zi(t){var e=t.className,n=t.cssModule,r=t.color,i=t.body,o=t.inverse,s=t.outline,l=t.tag,c=l===void 0?"div":l,h=t.innerRef,d=Iat(t,Dat),p=Xt(qt(e,"card",o?"text-white":!1,i?"card-body":!1,r?"".concat(s?"border":"bg","-").concat(r):!1),n);return q.createElement(c,iE({},d,{className:p,ref:h}))}zi.propTypes=Bat;var $at=["className","cssModule","innerRef","tag"];function oE(){return oE=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Uat(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}var Vat={className:F.string,cssModule:F.object,innerRef:F.oneOfType([F.object,F.string,F.func]),tag:fe};function ud(t){var e=t.className,n=t.cssModule,r=t.innerRef,i=t.tag,o=i===void 0?"div":i,s=zat(t,$at),l=Xt(qt(e,"card-body"),n);return q.createElement(o,oE({},s,{className:l,ref:r}))}ud.propTypes=Vat;var Hat=["className","cssModule","tag"];function sE(){return sE=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Yat(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}var Zat={className:F.string,cssModule:F.object,tag:fe};function l$(t){var e=t.className,n=t.cssModule,r=t.tag,i=r===void 0?"div":r,o=Wat(t,Hat),s=Xt(qt(e,"card-footer"),n);return q.createElement(i,sE({},o,{className:s}))}l$.propTypes=Zat;var Gat=["className","cssModule","tag"];function aE(){return aE=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Kat(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}var Xat={className:F.string,cssModule:F.object,tag:fe};function hd(t){var e=t.className,n=t.cssModule,r=t.tag,i=r===void 0?"div":r,o=qat(t,Gat),s=Xt(qt(e,"card-header"),n);return q.createElement(i,aE({},o,{className:s}))}hd.propTypes=Xat;var Qat=["className","cssModule","tag"];function lE(){return lE=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function tlt(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}var elt={className:F.string,cssModule:F.object,tag:fe};function c$(t){var e=t.className,n=t.cssModule,r=t.tag,i=r===void 0?"p":r,o=Jat(t,Qat),s=Xt(qt(e,"card-text"),n);return q.createElement(i,lE({},o,{className:s}))}c$.propTypes=elt;var nlt=["className","cssModule","tag"];function cE(){return cE=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function ilt(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}var olt={className:F.string,cssModule:F.object,tag:fe};function u$(t){var e=t.className,n=t.cssModule,r=t.tag,i=r===void 0?"div":r,o=rlt(t,nlt),s=Xt(qt(e,"card-title"),n);return q.createElement(i,cE({},o,{className:s}))}u$.propTypes=olt;function uE(t){"@babel/helpers - typeof";return uE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},uE(t)}var slt=["cssModule","children","isOpen","flip","target","offset","fallbackPlacements","placementPrefix","arrowClassName","hideArrow","popperClassName","tag","container","modifiers","strategy","boundariesElement","onClosed","fade","transition","placement"];function hE(){return hE=Object.assign?Object.assign.bind():function(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function dlt(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}function flt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function iN(t,e){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 C0(t){return C0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},C0(t)}function oN(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function s_(t){for(var e=1;e"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 k0(t){return k0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},k0(t)}var v1={children:F.oneOfType([F.node,F.func]),placement:F.oneOf(Xrt),target:id.isRequired,container:id,isOpen:F.bool,disabled:F.bool,hideArrow:F.bool,boundariesElement:F.oneOfType([F.string,Bk]),className:F.string,innerClassName:F.string,arrowClassName:F.string,popperClassName:F.string,cssModule:F.object,toggle:F.func,autohide:F.bool,placementPrefix:F.string,delay:F.oneOfType([F.shape({show:F.number,hide:F.number}),F.number]),modifiers:F.array,strategy:F.string,offset:F.arrayOf(F.number),innerRef:F.oneOfType([F.func,F.string,F.object]),trigger:F.string,fade:F.bool,flip:F.bool},h$={show:0,hide:50},Llt={isOpen:!1,hideArrow:!1,autohide:!1,delay:h$,toggle:function(){},trigger:"click",fade:!0};function d$(t,e){return e&&(t===e||e.contains(t))}function aN(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e&&e.length&&e.filter(function(n){return d$(t,n)})[0]}var Jk=function(t){Olt(n,t);var e=Clt(n);function n(r){var i;return Tlt(this,n),i=e.call(this,r),i._targets=[],i.currentTargetElement=null,i.addTargetEvents=i.addTargetEvents.bind(Oi(i)),i.handleDocumentClick=i.handleDocumentClick.bind(Oi(i)),i.removeTargetEvents=i.removeTargetEvents.bind(Oi(i)),i.toggle=i.toggle.bind(Oi(i)),i.showWithDelay=i.showWithDelay.bind(Oi(i)),i.hideWithDelay=i.hideWithDelay.bind(Oi(i)),i.onMouseOverTooltipContent=i.onMouseOverTooltipContent.bind(Oi(i)),i.onMouseLeaveTooltipContent=i.onMouseLeaveTooltipContent.bind(Oi(i)),i.show=i.show.bind(Oi(i)),i.hide=i.hide.bind(Oi(i)),i.onEscKeyDown=i.onEscKeyDown.bind(Oi(i)),i.getRef=i.getRef.bind(Oi(i)),i.state={isOpen:r.isOpen},i._isMounted=!1,i}return Elt(n,[{key:"componentDidMount",value:function(){this._isMounted=!0,this.updateTarget()}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.removeTargetEvents(),this._targets=null,this.clearShowTimeout(),this.clearHideTimeout()}},{key:"handleDocumentClick",value:function(i){var o=this.props.trigger.split(" ");o.indexOf("legacy")>-1&&(this.props.isOpen||aN(i.target,this._targets))?(this._hideTimeout&&this.clearHideTimeout(),this.props.isOpen&&!d$(i.target,this._popover)?this.hideWithDelay(i):this.props.isOpen||this.showWithDelay(i)):o.indexOf("click")>-1&&aN(i.target,this._targets)&&(this._hideTimeout&&this.clearHideTimeout(),this.props.isOpen?this.hideWithDelay(i):this.showWithDelay(i))}},{key:"onMouseOverTooltipContent",value:function(){this.props.trigger.indexOf("hover")>-1&&!this.props.autohide&&(this._hideTimeout&&this.clearHideTimeout(),this.state.isOpen&&!this.props.isOpen&&this.toggle())}},{key:"onMouseLeaveTooltipContent",value:function(i){this.props.trigger.indexOf("hover")>-1&&!this.props.autohide&&(this._showTimeout&&this.clearShowTimeout(),i.persist(),this._hideTimeout=setTimeout(this.hide.bind(this,i),this.getDelay("hide")))}},{key:"onEscKeyDown",value:function(i){i.key==="Escape"&&this.hide(i)}},{key:"getRef",value:function(i){var o=this.props.innerRef;o&&(typeof o=="function"?o(i):eg(o)==="object"&&(o.current=i)),this._popover=i}},{key:"getDelay",value:function(i){var o=this.props.delay;return eg(o)==="object"?isNaN(o[i])?h$[i]:o[i]:o}},{key:"getCurrentTarget",value:function(i){if(!i)return null;var o=this._targets.indexOf(i);return o>=0?this._targets[o]:this.getCurrentTarget(i.parentElement)}},{key:"show",value:function(i){if(!this.props.isOpen){if(this.clearShowTimeout(),this.currentTargetElement=i?i.currentTarget||this.getCurrentTarget(i.target):null,i&&i.composedPath&&typeof i.composedPath=="function"){var o=i.composedPath();this.currentTargetElement=o&&o[0]||this.currentTargetElement}this.toggle(i)}}},{key:"showWithDelay",value:function(i){this._hideTimeout&&this.clearHideTimeout(),this._showTimeout=setTimeout(this.show.bind(this,i),this.getDelay("show"))}},{key:"hide",value:function(i){this.props.isOpen&&(this.clearHideTimeout(),this.currentTargetElement=null,this.toggle(i))}},{key:"hideWithDelay",value:function(i){this._showTimeout&&this.clearShowTimeout(),this._hideTimeout=setTimeout(this.hide.bind(this,i),this.getDelay("hide"))}},{key:"clearShowTimeout",value:function(){clearTimeout(this._showTimeout),this._showTimeout=void 0}},{key:"clearHideTimeout",value:function(){clearTimeout(this._hideTimeout),this._hideTimeout=void 0}},{key:"addEventOnTargets",value:function(i,o,s){this._targets.forEach(function(l){l.addEventListener(i,o,s)})}},{key:"removeEventOnTargets",value:function(i,o,s){this._targets.forEach(function(l){l.removeEventListener(i,o,s)})}},{key:"addTargetEvents",value:function(){if(this.props.trigger){var i=this.props.trigger.split(" ");i.indexOf("manual")===-1&&((i.indexOf("click")>-1||i.indexOf("legacy")>-1)&&document.addEventListener("click",this.handleDocumentClick,!0),this._targets&&this._targets.length&&(i.indexOf("hover")>-1&&(this.addEventOnTargets("mouseover",this.showWithDelay,!0),this.addEventOnTargets("mouseout",this.hideWithDelay,!0)),i.indexOf("focus")>-1&&(this.addEventOnTargets("focusin",this.show,!0),this.addEventOnTargets("focusout",this.hide,!0)),this.addEventOnTargets("keydown",this.onEscKeyDown,!0)))}}},{key:"removeTargetEvents",value:function(){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)}},{key:"updateTarget",value:function(){var i=Km(this.props.target,!0);i!==this._targets&&(this.removeTargetEvents(),this._targets=i?Array.from(i):[],this.currentTargetElement=this.currentTargetElement||this._targets[0],this.addTargetEvents())}},{key:"toggle",value:function(i){return this.props.disabled||!this._isMounted?i&&i.preventDefault():this.props.toggle(i)}},{key:"render",value:function(){var i=this;this.props.isOpen&&this.updateTarget();var o=this.currentTargetElement||this._targets[0];if(!o)return null;var s=this.props,l=s.className,c=s.cssModule,h=s.innerClassName,d=s.isOpen,p=s.hideArrow,m=s.boundariesElement,v=s.placement,y=s.placementPrefix,_=s.arrowClassName,T=s.popperClassName,x=s.container,w=s.modifiers,E=s.strategy,O=s.offset,k=s.fade,P=s.flip,A=s.children,j=Il(this.props,Object.keys(v1)),B=Xt(T,c),N=Xt(h,c);return q.createElement(Slt,{className:l,target:o,isOpen:d,hideArrow:p,boundariesElement:m,placement:v,placementPrefix:y,arrowClassName:_,popperClassName:B,container:x,modifiers:w,strategy:E,offset:O,cssModule:c,fade:k,flip:P},function(V){var Y=V.update;return q.createElement("div",pE({},j,{ref:i.getRef,className:N,role:"tooltip",onMouseOver:i.onMouseOverTooltipContent,onMouseLeave:i.onMouseLeaveTooltipContent,onKeyDown:i.onEscKeyDown}),typeof A=="function"?A({update:Y}):A)})}}],[{key:"getDerivedStateFromProps",value:function(i,o){return i.isOpen&&!o.isOpen?{isOpen:i.isOpen}:null}}]),n}(q.Component);Jk.propTypes=v1;Jk.defaultProps=Llt;const f$=Jk;function gE(){return gE=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Nlt(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}var Dlt={animated:F.bool,bar:F.bool,barAriaLabelledBy:F.string,barAriaValueText:F.string,barClassName:F.string,barStyle:F.object,children:F.node,className:F.string,cssModule:F.object,color:F.string,max:F.oneOfType([F.string,F.number]),min:F.oneOfType([F.string,F.number]),multi:F.bool,striped:F.bool,style:F.object,tag:fe,value:F.oneOfType([F.string,F.number])};function p$(t){var e=t.children,n=t.className,r=t.barClassName,i=t.cssModule,o=t.value,s=o===void 0?0:o,l=t.min,c=l===void 0?0:l,h=t.max,d=h===void 0?100:h,p=t.animated,m=t.striped,v=t.color,y=t.bar,_=t.multi,T=t.tag,x=T===void 0?"div":T,w=t.style,E=w===void 0?{}:w,O=t.barStyle,k=O===void 0?{}:O,P=t.barAriaValueText,A=t.barAriaLabelledBy,j=jlt(t,Alt),B=Lj(s)/Lj(d)*100,N=Xt(qt(n,"progress"),i),V=Xt(qt("progress-bar",y&&n||r,p?"progress-bar-animated":null,v?"bg-".concat(v):null,m||p?"progress-bar-striped":null),i),Y={className:V,style:Zw(Zw(Zw({},y?E:{}),k),{},{width:"".concat(B,"%")}),role:"progressbar","aria-valuenow":s,"aria-valuemin":c,"aria-valuemax":d,"aria-valuetext":P,"aria-labelledby":A,children:e};return y?q.createElement(x,P0({},j,Y)):q.createElement(x,P0({},j,{style:E,className:N}),_?e:q.createElement("div",Y))}p$.propTypes=Dlt;function vE(t){"@babel/helpers - typeof";return vE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vE(t)}function Ilt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function cN(t,e){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 L0(t){return L0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},L0(t)}var Hlt={children:F.node.isRequired,node:F.any},m$=function(t){Blt(n,t);var e=$lt(n);function n(){return Ilt(this,n),e.apply(this,arguments)}return Flt(n,[{key:"componentWillUnmount",value:function(){this.defaultNode&&document.body.removeChild(this.defaultNode),this.defaultNode=null}},{key:"render",value:function(){return $k?(!this.props.node&&!this.defaultNode&&(this.defaultNode=document.createElement("div"),document.body.appendChild(this.defaultNode)),Jc.createPortal(this.props.children,this.props.node||this.defaultNode)):null}}]),n}(q.Component);m$.propTypes=Hlt;const Wlt=m$;function _E(t){"@babel/helpers - typeof";return _E=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_E(t)}function uN(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Qu(t){for(var e=1;e"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 M0(t){return M0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},M0(t)}function A0(){}var dN=F.shape(Kr.propTypes),g$={autoFocus:F.bool,backdrop:F.oneOfType([F.bool,F.oneOf(["static"])]),backdropClassName:F.string,backdropTransition:dN,centered:F.bool,children:F.node,contentClassName:F.string,className:F.string,container:id,cssModule:F.object,external:F.node,fade:F.bool,fullscreen:F.oneOfType([F.bool,F.oneOf(["sm","md","lg","xl"])]),innerRef:F.oneOfType([F.object,F.string,F.func]),isOpen:F.bool,keyboard:F.bool,labelledBy:F.string,modalClassName:F.string,modalTransition:dN,onClosed:F.func,onEnter:F.func,onExit:F.func,onOpened:F.func,returnFocusAfterClose:F.bool,role:F.string,scrollable:F.bool,size:F.string,toggle:F.func,trapFocus:F.bool,unmountOnClose:F.bool,wrapClassName:F.string,zIndex:F.oneOfType([F.number,F.string])},Qlt=Object.keys(g$),Jlt={isOpen:!1,autoFocus:!0,centered:!1,scrollable:!1,role:"dialog",backdrop:!0,keyboard:!0,zIndex:1050,fade:!0,onOpened:A0,onClosed:A0,modalTransition:{timeout:p0.Modal},backdropTransition:{mountOnEnter:!0,timeout:p0.Fade},unmountOnClose:!0,returnFocusAfterClose:!0,container:"body",trapFocus:!1},Ug=function(t){Glt(n,t);var e=qlt(n);function n(r){var i;return Ylt(this,n),i=e.call(this,r),i._element=null,i._originalBodyPadding=null,i.getFocusableChildren=i.getFocusableChildren.bind(Qi(i)),i.handleBackdropClick=i.handleBackdropClick.bind(Qi(i)),i.handleBackdropMouseDown=i.handleBackdropMouseDown.bind(Qi(i)),i.handleEscape=i.handleEscape.bind(Qi(i)),i.handleStaticBackdropAnimation=i.handleStaticBackdropAnimation.bind(Qi(i)),i.handleTab=i.handleTab.bind(Qi(i)),i.onOpened=i.onOpened.bind(Qi(i)),i.onClosed=i.onClosed.bind(Qi(i)),i.manageFocusAfterClose=i.manageFocusAfterClose.bind(Qi(i)),i.clearBackdropAnimationTimeout=i.clearBackdropAnimationTimeout.bind(Qi(i)),i.trapFocus=i.trapFocus.bind(Qi(i)),i.state={isOpen:!1,showStaticBackdropAnimation:!1},i}return Zlt(n,[{key:"componentDidMount",value:function(){var i=this.props,o=i.isOpen,s=i.autoFocus,l=i.onEnter;o&&(this.init(),this.setState({isOpen:!0}),s&&this.setFocus()),l&&l(),document.addEventListener("focus",this.trapFocus,!0),this._isMounted=!0}},{key:"componentDidUpdate",value:function(i,o){if(this.props.isOpen&&!i.isOpen){this.init(),this.setState({isOpen:!0});return}this.props.autoFocus&&this.state.isOpen&&!o.isOpen&&this.setFocus(),this._element&&i.zIndex!==this.props.zIndex&&(this._element.style.zIndex=this.props.zIndex)}},{key:"componentWillUnmount",value:function(){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}},{key:"handleBackdropClick",value:function(i){if(i.target===this._mouseDownElement){i.stopPropagation();var o=this._dialog?this._dialog.parentNode:null;if(o&&i.target===o&&this.props.backdrop==="static"&&this.handleStaticBackdropAnimation(),!this.props.isOpen||this.props.backdrop!==!0)return;o&&i.target===o&&this.props.toggle&&this.props.toggle(i)}}},{key:"handleTab",value:function(i){if(i.which===9&&!(this.modalIndex0&&(i.preventDefault(),i.stopPropagation(),o[0].focus())}}},{key:"init",value:function(){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=Km(this.props.container),this._mountContainer.appendChild(this._element)),this._originalBodyPadding=Zrt(),n.openCount<1&&(n.originalBodyOverflow=window.getComputedStyle(document.body).overflow),Grt(),n.openCount===0&&(document.body.className=qt(document.body.className,Xt("modal-open",this.props.cssModule)),document.body.style.overflow="hidden"),this.modalIndex=n.openCount,n.openCount+=1}},{key:"destroy",value:function(){this._element&&(this._mountContainer.removeChild(this._element),this._element=null),this.manageFocusAfterClose()}},{key:"manageFocusAfterClose",value:function(){if(this._triggeringElement){var i=this.props.returnFocusAfterClose;this._triggeringElement.focus&&i&&this._triggeringElement.focus(),this._triggeringElement=null}}},{key:"close",value:function(){if(n.openCount<=1){var i=Xt("modal-open",this.props.cssModule),o=new RegExp("(^| )".concat(i,"( |$)"));document.body.className=document.body.className.replace(o," ").trim(),document.body.style.overflow=n.originalBodyOverflow}this.manageFocusAfterClose(),n.openCount=Math.max(0,n.openCount-1),MB(this._originalBodyPadding)}},{key:"clearBackdropAnimationTimeout",value:function(){this._backdropAnimationTimeout&&(clearTimeout(this._backdropAnimationTimeout),this._backdropAnimationTimeout=void 0)}},{key:"renderModalDialog",value:function(){var i,o=this,s=Il(this.props,Qlt),l="modal-dialog";return q.createElement("div",tm({},s,{className:Xt(qt(l,this.props.className,(i={},lh(i,"modal-".concat(this.props.size),this.props.size),lh(i,"".concat(l,"-centered"),this.props.centered),lh(i,"".concat(l,"-scrollable"),this.props.scrollable),lh(i,"modal-fullscreen",this.props.fullscreen===!0),lh(i,"modal-fullscreen-".concat(this.props.fullscreen,"-down"),typeof this.props.fullscreen=="string"),i)),this.props.cssModule),role:"document",ref:function(h){o._dialog=h}}),q.createElement("div",{className:Xt(qt("modal-content",this.props.contentClassName),this.props.cssModule)},this.props.children))}},{key:"render",value:function(){var i=this.props.unmountOnClose;if(this._element&&(this.state.isOpen||!i)){var o=!!this._element&&!this.state.isOpen&&!i;this._element.style.display=o?"none":"block";var s=this.props,l=s.wrapClassName,c=s.modalClassName,h=s.backdropClassName,d=s.cssModule,p=s.isOpen,m=s.backdrop,v=s.role,y=s.labelledBy,_=s.external,T=s.innerRef,x={onClick:this.handleBackdropClick,onMouseDown:this.handleBackdropMouseDown,onKeyUp:this.handleEscape,onKeyDown:this.handleTab,style:{display:"block"},"aria-labelledby":y,"aria-modal":!0,role:v,tabIndex:"-1"},w=this.props.fade,E=Qu(Qu(Qu({},Kr.defaultProps),this.props.modalTransition),{},{baseClass:w?this.props.modalTransition.baseClass:"",timeout:w?this.props.modalTransition.timeout:0}),O=Qu(Qu(Qu({},Kr.defaultProps),this.props.backdropTransition),{},{baseClass:w?this.props.backdropTransition.baseClass:"",timeout:w?this.props.backdropTransition.timeout:0}),k=m&&(w?q.createElement(Kr,tm({},O,{in:p&&!!m,cssModule:d,className:Xt(qt("modal-backdrop",h),d)})):q.createElement("div",{className:Xt(qt("modal-backdrop","show",h),d)}));return q.createElement(Wlt,{node:this._element},q.createElement("div",{className:Xt(l)},q.createElement(Kr,tm({},x,E,{in:p,onEntered:this.onOpened,onExited:this.onClosed,cssModule:d,className:Xt(qt("modal",c,this.state.showStaticBackdropAnimation&&"modal-static"),d),innerRef:T}),_,this.renderModalDialog()),k))}return null}}]),n}(q.Component);Ug.propTypes=g$;Ug.defaultProps=Jlt;Ug.openCount=0;Ug.originalBodyOverflow=null;const Ca=Ug;var tct=["className","cssModule","children","toggle","tag","wrapTag","closeAriaLabel","close"];function xE(){return xE=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function nct(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}var rct={children:F.node,className:F.string,close:F.object,closeAriaLabel:F.string,cssModule:F.object,tag:fe,toggle:F.func,wrapTag:fe};function ka(t){var e,n=t.className,r=t.cssModule,i=t.children,o=t.toggle,s=t.tag,l=s===void 0?"h5":s,c=t.wrapTag,h=c===void 0?"div":c,d=t.closeAriaLabel,p=d===void 0?"Close":d,m=t.close,v=ect(t,tct),y=Xt(qt(n,"modal-header"),r);return!m&&o&&(e=q.createElement("button",{type:"button",onClick:o,className:Xt("btn-close",r),"aria-label":p})),q.createElement(h,xE({},v,{className:y}),q.createElement(l,{className:Xt("modal-title",r)},i),m||e)}ka.propTypes=rct;var ict=["className","cssModule","tag"];function wE(){return wE=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function sct(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}var act={className:F.string,cssModule:F.object,tag:fe};function Ss(t){var e=t.className,n=t.cssModule,r=t.tag,i=r===void 0?"div":r,o=oct(t,ict),s=Xt(qt(e,"modal-body"),n);return q.createElement(i,wE({},o,{className:s}))}Ss.propTypes=act;var lct=["className","cssModule","tag"];function SE(){return SE=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function uct(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}var hct={className:F.string,cssModule:F.object,tag:fe};function Nu(t){var e=t.className,n=t.cssModule,r=t.tag,i=r===void 0?"div":r,o=cct(t,lct),s=Xt(qt(e,"modal-footer"),n);return q.createElement(i,SE({},o,{className:s}))}Nu.propTypes=hct;function TE(){return TE=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function mct(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}var gct={className:F.string,cssModule:F.object,flush:F.bool,horizontal:F.oneOfType([F.bool,F.string]),numbered:F.bool,tag:fe},vct=function(e){return e===!1?!1:e===!0||e==="xs"?"list-group-horizontal":"list-group-horizontal-".concat(e)};function v$(t){var e=t.className,n=t.cssModule,r=t.tag,i=r===void 0?"ul":r,o=t.flush,s=t.horizontal,l=s===void 0?!1:s,c=t.numbered,h=c===void 0?!1:c,d=pct(t,fct),p=Xt(qt(e,"list-group",o?"list-group-flush":vct(l),{"list-group-numbered":h}),n);return q.createElement(i,EE({},d,{className:p}))}v$.propTypes=gct;var yct=["className","cssModule","row","disabled","check","inline","floating","tag","switch"];function OE(){return OE=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function bct(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}var xct={children:F.node,row:F.bool,check:F.bool,switch:F.bool,inline:F.bool,floating:F.bool,disabled:F.bool,tag:fe,className:F.string,cssModule:F.object};function Ai(t){var e=t.className,n=t.cssModule,r=t.row,i=t.disabled,o=t.check,s=t.inline,l=t.floating,c=t.tag,h=c===void 0?"div":c,d=t.switch,p=_ct(t,yct),m=o||d,v=Xt(qt(e,r?"row":!1,m?"form-check":"mb-3",d?"form-switch":!1,m&&s?"form-check-inline":!1,m&&i?"disabled":!1,l&&"form-floating"),n);return h==="fieldset"&&(p.disabled=i),q.createElement(h,OE({},p,{className:v}))}Ai.propTypes=xct;function CE(t){"@babel/helpers - typeof";return CE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},CE(t)}var wct=["className","cssModule","type","bsSize","valid","invalid","tag","addon","plaintext","innerRef"];function kE(){return kE=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Tct(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}function Ect(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fN(t,e){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 R0(t){return R0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},R0(t)}var Mct={children:F.node,type:F.string,size:F.oneOfType([F.number,F.string]),bsSize:F.string,valid:F.bool,invalid:F.bool,tag:fe,innerRef:F.oneOfType([F.object,F.func,F.string]),plaintext:F.bool,addon:F.bool,className:F.string,cssModule:F.object},y$=function(t){Cct(n,t);var e=kct(n);function n(r){var i;return Ect(this,n),i=e.call(this,r),i.getRef=i.getRef.bind(LE(i)),i.focus=i.focus.bind(LE(i)),i}return Oct(n,[{key:"getRef",value:function(i){this.props.innerRef&&this.props.innerRef(i),this.ref=i}},{key:"focus",value:function(){this.ref&&this.ref.focus()}},{key:"render",value:function(){var i=this.props,o=i.className,s=i.cssModule,l=i.type,c=l===void 0?"text":l,h=i.bsSize,d=i.valid,p=i.invalid,m=i.tag,v=i.addon,y=i.plaintext,_=i.innerRef,T=Sct(i,wct),x=["switch","radio","checkbox"].indexOf(c)>-1,w=/\D/g,E=c==="textarea",O=c==="select",k=c==="range",P=m||(O||E?c:"input"),A="form-control";y?(A="".concat(A,"-plaintext"),P=m||"input"):k?A="form-range":O?A="form-select":x&&(v?A=null:A="form-check-input"),T.size&&w.test(T.size)&&(OT(`Please use the prop "bsSize" instead of the "size" to bootstrap's input sizing.`),h=T.size,delete T.size);var j=Xt(qt(o,p&&"is-invalid",d&&"is-valid",h?O?"form-select-".concat(h):"form-control-".concat(h):!1,A),s);return(P==="input"||m&&typeof m=="function")&&(T.type=c==="switch"?"checkbox":c),T.children&&!(y||c==="select"||typeof P!="string"||P==="select")&&(OT('Input with a type of "'.concat(c,'" cannot have children. Please use "value"/"defaultValue" instead.')),delete T.children),q.createElement(P,kE({},T,{ref:_,className:j,"aria-invalid":p}))}}]),n}(q.Component);y$.propTypes=Mct;const dd=y$;var Act=["className","cssModule","tag","type","size"];function j0(){return j0=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function jct(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}var Nct={className:F.string,cssModule:F.object,size:F.string,tag:fe,type:F.string};function y1(t){var e=t.className,n=t.cssModule,r=t.tag,i=r===void 0?"div":r;t.type;var o=t.size,s=Rct(t,Act),l=Xt(qt(e,"input-group",o?"input-group-".concat(o):null),n);return t.type==="dropdown"?q.createElement($g,j0({},s,{className:l})):q.createElement(r$.Provider,{value:{insideInputGroup:!0}},q.createElement(i,j0({},s,{className:l})))}y1.propTypes=Nct;var Dct=["className","listClassName","cssModule","size","tag","listTag","aria-label"];function ME(){return ME=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Bct(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}var $ct={children:F.node,className:F.string,listClassName:F.string,cssModule:F.object,size:F.string,tag:fe,listTag:fe,"aria-label":F.string};function eP(t){var e=t.className,n=t.listClassName,r=t.cssModule,i=t.size,o=t.tag,s=o===void 0?"nav":o,l=t.listTag,c=l===void 0?"ul":l,h=t["aria-label"],d=h===void 0?"pagination":h,p=Fct(t,Dct),m=Xt(qt(e),r),v=Xt(qt(n,"pagination",Ict({},"pagination-".concat(i),!!i)),r);return q.createElement(s,{className:m,"aria-label":d},q.createElement(c,ME({},p,{className:v})))}eP.propTypes=$ct;var zct=["active","className","cssModule","disabled","tag"];function AE(){return AE=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Vct(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}var Hct={active:F.bool,children:F.node,className:F.string,cssModule:F.object,disabled:F.bool,tag:fe};function nu(t){var e=t.active,n=t.className,r=t.cssModule,i=t.disabled,o=t.tag,s=o===void 0?"li":o,l=Uct(t,zct),c=Xt(qt(n,"page-item",{active:e,disabled:i}),r);return q.createElement(s,AE({},l,{className:c}))}nu.propTypes=Hct;var Wct=["className","cssModule","next","previous","first","last","tag"];function RE(){return RE=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Zct(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}var Gct={"aria-label":F.string,children:F.node,className:F.string,cssModule:F.object,next:F.bool,previous:F.bool,first:F.bool,last:F.bool,tag:fe};function ru(t){var e=t.className,n=t.cssModule,r=t.next,i=t.previous,o=t.first,s=t.last,l=t.tag,c=l===void 0?"a":l,h=Yct(t,Wct),d=Xt(qt(e,"page-link"),n),p;i?p="Previous":r?p="Next":o?p="First":s&&(p="Last");var m=t["aria-label"]||p,v;i?v="‹":r?v="›":o?v="«":s&&(v="»");var y=t.children;return y&&Array.isArray(y)&&y.length===0&&(y=null),!h.href&&c==="a"&&(c="button"),(i||r||o||s)&&(y=[q.createElement("span",{"aria-hidden":"true",key:"caret"},y||v),q.createElement("span",{className:"visually-hidden",key:"ariaLabel"},m)]),q.createElement(c,RE({},h,{className:d,"aria-label":m}),y)}ru.propTypes=Gct;var qct=["className","closeClassName","closeAriaLabel","cssModule","tag","color","isOpen","toggle","children","transition","fade","innerRef"];function jE(){return jE=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Qct(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}var Jct={children:F.node,className:F.string,closeClassName:F.string,closeAriaLabel:F.string,color:F.string,cssModule:F.object,fade:F.bool,innerRef:F.oneOfType([F.object,F.string,F.func]),isOpen:F.bool,tag:fe,toggle:F.func,transition:F.shape(Kr.propTypes)};function _$(t){var e=t.className,n=t.closeClassName,r=t.closeAriaLabel,i=r===void 0?"Close":r,o=t.cssModule,s=t.tag,l=s===void 0?"div":s,c=t.color,h=c===void 0?"success":c,d=t.isOpen,p=d===void 0?!0:d,m=t.toggle,v=t.children,y=t.transition,_=y===void 0?np(np({},Kr.defaultProps),{},{unmountOnExit:!0}):y,T=t.fade,x=T===void 0?!0:T,w=t.innerRef,E=Xct(t,qct),O=Xt(qt(e,"alert","alert-".concat(h),{"alert-dismissible":m}),o),k=Xt(qt("btn-close",n),o),P=np(np(np({},Kr.defaultProps),_),{},{baseClass:x?_.baseClass:"",timeout:x?_.timeout:0});return q.createElement(Kr,jE({},E,P,{tag:l,className:O,in:p,role:"alert",innerRef:w}),m?q.createElement("button",{type:"button",className:k,"aria-label":i,onClick:m}):null,v)}_$.propTypes=Jct;var tut=["className","cssModule","tag","active","disabled","action","color"];function NE(){return NE=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function nut(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}var rut={action:F.bool,active:F.bool,className:F.string,cssModule:F.object,color:F.string,disabled:F.bool,tag:fe},iut=function(e){e.preventDefault()};function b$(t){var e=t.className,n=t.cssModule,r=t.tag,i=r===void 0?"li":r,o=t.active,s=t.disabled,l=t.action,c=t.color,h=eut(t,tut),d=Xt(qt(e,o?"active":!1,s?"disabled":!1,l?"list-group-item-action":!1,c?"list-group-item-".concat(c):!1,"list-group-item"),n);return s&&(h.onClick=iut),q.createElement(i,NE({},h,{className:d}))}b$.propTypes=rut;function DE(t){"@babel/helpers - typeof";return DE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},DE(t)}function mN(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function out(t){for(var e=1;e"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 N0(t){return N0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},N0(t)}var fut=["defaultOpen"],Hg=function(t){cut(n,t);var e=uut(n);function n(r){var i;return aut(this,n),i=e.call(this,r),i.state={isOpen:r.defaultOpen||!1},i.toggle=i.toggle.bind(x$(i)),i}return lut(n,[{key:"toggle",value:function(i){var o=this;this.setState(function(s){return{isOpen:!s.isOpen}},function(){o.props.onToggle&&o.props.onToggle(i,o.state.isOpen)})}},{key:"render",value:function(){return q.createElement($g,IE({isOpen:this.state.isOpen,toggle:this.toggle},Il(this.props,fut)))}}]),n}(U.Component);Hg.propTypes=out({defaultOpen:F.bool,onToggle:F.func},$g.propTypes);function BE(t){"@babel/helpers - typeof";return BE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},BE(t)}function vN(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function put(t){for(var e=1;e"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 D0(t){return D0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},D0(t)}var wut=["defaultOpen"],fi=function(t){yut(n,t);var e=_ut(n);function n(r){var i;return gut(this,n),i=e.call(this,r),i.state={isOpen:r.defaultOpen||!1},i.toggle=i.toggle.bind(w$(i)),i}return vut(n,[{key:"toggle",value:function(){this.setState(function(i){return{isOpen:!i.isOpen}})}},{key:"render",value:function(){return q.createElement(Vg,$E({isOpen:this.state.isOpen,toggle:this.toggle},Il(this.props,wut)))}}]),n}(U.Component);fi.propTypes=put({defaultOpen:F.bool},Vg.propTypes);function S$(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Sut(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}var T$={exports:{}};/*! - Copyright (c) 2018 Jed Watson. - Licensed under the MIT License (MIT), see - http://jedwatson.github.io/classnames -*/(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var r=[],i=0;i({error:"border-danger",default:""})[t],Out=t=>({error:"text-danger",default:"text-muted"})[t],aa=({className:t,children:e,loading:n=!1,type:r="default",fullWidth:i=!1})=>{const o=lo({"col-md-12":i,"col-md-10 offset-md-1":!i});return b.jsx(qr,{className:lo("g-0",t),children:b.jsx("div",{className:o,children:b.jsx(zi,{className:Eut(r),body:!0,children:b.jsxs("h3",{className:lo("text-center mb-0",Out(r)),children:[n&&b.jsx(zt,{icon:W8,spin:!0}),n&&b.jsx("span",{className:"ms-2",children:e??"Loading..."}),!n&&e]})})})})},Bn=({title:t,children:e,bodyClassName:n,...r})=>b.jsxs(zi,{...r,children:[t&&b.jsx(hd,{role:"heading",children:t}),b.jsx(ud,{className:n,children:e})]}),Ii=({children:t,type:e,className:n,small:r=!1})=>b.jsx(qr,{className:n,children:b.jsx("div",{className:lo({"col-md-10 offset-md-1":!r,"col-12":r}),children:b.jsx(Bn,{role:"document",className:lo("text-center",{"bg-main":e==="success","bg-danger":e==="error","bg-warning":e==="warning","text-white":e!=="warning"}),bodyClassName:lo({"p-2":r}),children:t})})});let ty;const Cut=new Uint8Array(16);function kut(){if(!ty&&(ty=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ty))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ty(Cut)}const br=[];for(let t=0;t<256;++t)br.push((t+256).toString(16).slice(1));function Put(t,e=0){return(br[t[e+0]]+br[t[e+1]]+br[t[e+2]]+br[t[e+3]]+"-"+br[t[e+4]]+br[t[e+5]]+"-"+br[t[e+6]]+br[t[e+7]]+"-"+br[t[e+8]]+br[t[e+9]]+"-"+br[t[e+10]]+br[t[e+11]]+br[t[e+12]]+br[t[e+13]]+br[t[e+14]]+br[t[e+15]]).toLowerCase()}const Lut=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),_N={randomUUID:Lut};function Mut(t,e,n){if(_N.randomUUID&&!e&&!t)return _N.randomUUID();t=t||{};const r=t.random||(t.rng||kut)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,e){n=n||0;for(let i=0;i<16;++i)e[n+i]=r[i];return e}return Put(r)}const zn=(t=!1)=>{const[e,n]=U.useState(t);return[e,()=>n(!e),()=>n(!0),()=>n(!1)]},_1=()=>{const{current:t}=U.useRef(`dom-${Mut()}`);return t},Bl=()=>U.useRef(null),E$=({checked:t=!1,onChange:e,className:n,children:r,type:i,inline:o=!1})=>{const s=_1(),l=d=>e==null?void 0:e(d.target.checked,d),c={"form-switch":i==="switch","form-checkbox":i==="checkbox"},h=o?{display:"inline-block"}:{};return b.jsxs("span",{className:lo("form-check",c,n),style:h,children:[b.jsx("input",{type:"checkbox",className:"form-check-input",id:s,checked:t,onChange:l}),b.jsx("label",{className:"form-check-label",htmlFor:s,children:r})]})},O$=t=>b.jsx(E$,{type:"checkbox",...t}),fd=t=>b.jsx(E$,{type:"switch",...t}),Id=({children:t,label:e,className:n="",labelClassName:r="",noMargin:i=!1,id:o})=>b.jsxs("div",{className:`${n} ${i?"":"mb-3"}`,children:[b.jsx("label",{className:`form-label ${r}`,htmlFor:o,children:e}),t]}),a_=({children:t,value:e,onChange:n,type:r,required:i,placeholder:o,className:s,labelClassName:l})=>{const c=_1();return b.jsx(Id,{label:b.jsxs(b.Fragment,{children:[t,":"]}),className:s??"",labelClassName:l,id:c,children:b.jsx("input",{id:c,className:"form-control",type:r??"text",value:e,required:i??!0,placeholder:o,onChange:h=>n(h.target.value)})})},Aut=500;let l_;const bN=()=>{l_&&clearTimeout(l_),l_=null},Wg=({onChange:t,className:e,large:n=!0,noBorder:r=!1,initialValue:i="",setTimeout_:o=setTimeout})=>{const[s,l]=U.useState(i),c=(h,d=Aut)=>{l(h),bN(),l_=o(()=>{t(h),bN()},d)};return b.jsxs("div",{className:lo("search-field",e),children:[b.jsx("input",{type:"text",className:lo("form-control search-field__input",{"form-control-lg":n,"search-field__input--no-border":r}),placeholder:"Search...",value:s,onChange:h=>c(h.target.value)}),b.jsx(zt,{icon:Net,className:"search-field__icon"}),b.jsx("button",{"aria-label":"Clear search",type:"button",className:"close search-field__close btn-close",hidden:s==="",id:"search-field__close",onClick:()=>c("",0)})]})},Pa=({text:t,disabled:e=!1,className:n,children:r,dropdownClassName:i,noCaret:o,end:s=!1,minWidth:l,inline:c,size:h})=>{const[d,p]=zn(),m=lo("dropdown-btn__toggle",n,{"btn-block":!c,"dropdown-btn__toggle--with-caret":!o}),v={minWidth:l&&`${l}px`};return b.jsxs($g,{isOpen:d,toggle:p,disabled:e,className:i,children:[b.jsx(zg,{size:h,caret:!o,className:m,color:"primary",children:t}),b.jsx(Nd,{className:"w-100",end:s,style:v,children:r})]})},b1=({children:t,minWidth:e})=>b.jsx(Pa,{text:b.jsx(zt,{className:"px-1",icon:Oet}),size:"sm",minWidth:e,end:!0,noCaret:!0,inline:!0,children:t}),em=({children:t,...e})=>b.jsx(zB,{className:"nav-pills__nav-link",tag:S8,...e,children:t}),C$=({children:t,fill:e=!1,className:n=""})=>b.jsx(zi,{className:`nav-pills__nav p-0 overflow-hidden ${n}`,body:!0,children:b.jsx(zk,{pills:!0,fill:e,children:U.Children.map(t,r=>{if(!U.isValidElement(r)||r.type!==em)throw new Error("Only NavPillItem children are allowed inside NavPills.");return r})})}),x1=(t,e,n)=>t!==e?"ASC":n?{ASC:"DESC",DESC:void 0}[n]:"ASC",k$=(t,{field:e,dir:n})=>!e||!n?t:t.sort((r,i)=>{const o=n==="ASC"?1:-1,s=n==="ASC"?-1:1;return r[e]>i[e]?o:s}),P$=t=>t.dir?`${t.field}-${t.dir}`:void 0,Rut=t=>{const[e,n]=t.split("-");return{field:e,dir:n}};function Yg({items:t,order:e,onChange:n,isButton:r=!0,right:i=!1,prefixed:o=!0}){const s=l=>()=>{const c=x1(l,e.field,e.dir);n(c?l:void 0,c)};return b.jsxs(Hg,{children:[b.jsxs(zg,{caret:!0,color:r?"primary":"link",className:lo({"dropdown-btn__toggle btn-block pe-4 overflow-hidden":r,"btn-sm p-0":!r}),children:[!r&&b.jsx(b.Fragment,{children:"Order by"}),r&&!e.field&&b.jsx("i",{children:"Order by..."}),r&&e.field&&b.jsxs(b.Fragment,{children:[o&&"Order by: ",t[e.field]," - ",b.jsx("small",{children:e.dir??"DESC"})]})]}),b.jsxs(Nd,{end:i,className:lo("w-100",{"ordering-dropdown__menu--link":!r}),children:[Object.entries(t).map(([l,c])=>b.jsxs(Zt,{active:e.field===l,onClick:s(l),children:[c,e.field===l&&b.jsx(zt,{icon:e.dir==="ASC"?Let:met,className:"ordering-dropdown__sort-icon"})]},l)),b.jsx(Zt,{divider:!0}),b.jsx(Zt,{disabled:!e.field,onClick:()=>n(),children:b.jsx("i",{children:"Clear selection"})})]})]})}const nP="#4696e5",jut="rgba(70, 150, 229, 0.4)",L$="#f77f28",Nut="rgba(247, 127, 40, 0.4)",Dut="white",Iut="#161b22",M$=t=>{var e;return(e=document.querySelector("html"))==null?void 0:e.setAttribute("data-theme",t)},Fut=()=>{var t;return((t=document.querySelector("html"))==null?void 0:t.getAttribute("data-theme"))==="dark"};var But=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},e=Symbol("test"),n=Object(e);if(typeof e=="string"||Object.prototype.toString.call(e)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var r=42;t[e]=r;for(e 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 i=Object.getOwnPropertySymbols(t);if(i.length!==1||i[0]!==e||!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(t,e);if(o.value!==r||o.enumerable!==!0)return!1}return!0},xN=typeof Symbol<"u"&&Symbol,$ut=But,zut=function(){return typeof xN!="function"||typeof Symbol!="function"||typeof xN("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:$ut()},wN={foo:{}},Uut=Object,Vut=function(){return{__proto__:wN}.foo===wN.foo&&!({__proto__:null}instanceof Uut)},Hut="Function.prototype.bind called on incompatible ",Gw=Array.prototype.slice,Wut=Object.prototype.toString,Yut="[object Function]",Zut=function(t){var e=this;if(typeof e!="function"||Wut.call(e)!==Yut)throw new TypeError(Hut+e);for(var n=Gw.call(arguments,1),r,i=function(){if(this instanceof r){var h=e.apply(this,n.concat(Gw.call(arguments)));return Object(h)===h?h:this}else return e.apply(t,n.concat(Gw.call(arguments)))},o=Math.max(0,e.length-n.length),s=[],l=0;l"u"||!rr?ge:rr(Uint8Array),ou={"%AggregateError%":typeof AggregateError>"u"?ge:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?ge:ArrayBuffer,"%ArrayIteratorPrototype%":Ju&&rr?rr([][Symbol.iterator]()):ge,"%AsyncFromSyncIteratorPrototype%":ge,"%AsyncFunction%":ch,"%AsyncGenerator%":ch,"%AsyncGeneratorFunction%":ch,"%AsyncIteratorPrototype%":ch,"%Atomics%":typeof Atomics>"u"?ge:Atomics,"%BigInt%":typeof BigInt>"u"?ge:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?ge:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?ge:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?ge:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?ge:Float32Array,"%Float64Array%":typeof Float64Array>"u"?ge:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?ge:FinalizationRegistry,"%Function%":A$,"%GeneratorFunction%":ch,"%Int8Array%":typeof Int8Array>"u"?ge:Int8Array,"%Int16Array%":typeof Int16Array>"u"?ge:Int16Array,"%Int32Array%":typeof Int32Array>"u"?ge:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ju&&rr?rr(rr([][Symbol.iterator]())):ge,"%JSON%":typeof JSON=="object"?JSON:ge,"%Map%":typeof Map>"u"?ge:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ju||!rr?ge:rr(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?ge:Promise,"%Proxy%":typeof Proxy>"u"?ge:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?ge:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?ge:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ju||!rr?ge:rr(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?ge:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ju&&rr?rr(""[Symbol.iterator]()):ge,"%Symbol%":Ju?Symbol:ge,"%SyntaxError%":pd,"%ThrowTypeError%":Xut,"%TypedArray%":Jut,"%TypeError%":zh,"%Uint8Array%":typeof Uint8Array>"u"?ge:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?ge:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?ge:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?ge:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?ge:WeakMap,"%WeakRef%":typeof WeakRef>"u"?ge:WeakRef,"%WeakSet%":typeof WeakSet>"u"?ge:WeakSet};if(rr)try{null.error}catch(t){var tht=rr(rr(t));ou["%Error.prototype%"]=tht}var eht=function t(e){var n;if(e==="%AsyncFunction%")n=qw("async function () {}");else if(e==="%GeneratorFunction%")n=qw("function* () {}");else if(e==="%AsyncGeneratorFunction%")n=qw("async function* () {}");else if(e==="%AsyncGenerator%"){var r=t("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=t("%AsyncGenerator%");i&&rr&&(n=rr(i.prototype))}return ou[e]=n,n},SN={"%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"]},Zg=rP,I0=Kut,nht=Zg.call(Function.call,Array.prototype.concat),rht=Zg.call(Function.apply,Array.prototype.splice),TN=Zg.call(Function.call,String.prototype.replace),F0=Zg.call(Function.call,String.prototype.slice),iht=Zg.call(Function.call,RegExp.prototype.exec),oht=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,sht=/\\(\\)?/g,aht=function(t){var e=F0(t,0,1),n=F0(t,-1);if(e==="%"&&n!=="%")throw new pd("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&e!=="%")throw new pd("invalid intrinsic syntax, expected opening `%`");var r=[];return TN(t,oht,function(i,o,s,l){r[r.length]=s?TN(l,sht,"$1"):o||i}),r},lht=function(t,e){var n=t,r;if(I0(SN,n)&&(r=SN[n],n="%"+r[0]+"%"),I0(ou,n)){var i=ou[n];if(i===ch&&(i=eht(n)),typeof i>"u"&&!e)throw new zh("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new pd("intrinsic "+t+" does not exist!")},iP=function(t,e){if(typeof t!="string"||t.length===0)throw new zh("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof e!="boolean")throw new zh('"allowMissing" argument must be a boolean');if(iht(/^%?[^%]*%?$/,t)===null)throw new pd("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=aht(t),r=n.length>0?n[0]:"",i=lht("%"+r+"%",e),o=i.name,s=i.value,l=!1,c=i.alias;c&&(r=c[0],rht(n,nht([0,1],c)));for(var h=1,d=!0;h=n.length){var y=iu(s,p);d=!!y,d&&"get"in y&&!("originalValue"in y.get)?s=y.get:s=s[p]}else d=I0(s,p),s=s[p];d&&!l&&(ou[o]=s)}}return s},R$={exports:{}};(function(t){var e=rP,n=iP,r=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),o=n("%Reflect.apply%",!0)||e.call(i,r),s=n("%Object.getOwnPropertyDescriptor%",!0),l=n("%Object.defineProperty%",!0),c=n("%Math.max%");if(l)try{l({},"a",{value:1})}catch{l=null}t.exports=function(d){var p=o(e,i,arguments);if(s&&l){var m=s(p,"length");m.configurable&&l(p,"length",{value:1+c(0,d.length-(arguments.length-1))})}return p};var h=function(){return o(e,r,arguments)};l?l(t.exports,"apply",{value:h}):t.exports.apply=h})(R$);var cht=R$.exports,j$=iP,N$=cht,uht=N$(j$("String.prototype.indexOf")),hht=function(t,e){var n=j$(t,!!e);return typeof n=="function"&&uht(t,".prototype.")>-1?N$(n):n};const dht={},fht=Object.freeze(Object.defineProperty({__proto__:null,default:dht},Symbol.toStringTag,{value:"Module"})),pht=Sut(fht);var oP=typeof Map=="function"&&Map.prototype,Xw=Object.getOwnPropertyDescriptor&&oP?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,B0=oP&&Xw&&typeof Xw.get=="function"?Xw.get:null,EN=oP&&Map.prototype.forEach,sP=typeof Set=="function"&&Set.prototype,Qw=Object.getOwnPropertyDescriptor&&sP?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,$0=sP&&Qw&&typeof Qw.get=="function"?Qw.get:null,ON=sP&&Set.prototype.forEach,mht=typeof WeakMap=="function"&&WeakMap.prototype,nm=mht?WeakMap.prototype.has:null,ght=typeof WeakSet=="function"&&WeakSet.prototype,rm=ght?WeakSet.prototype.has:null,vht=typeof WeakRef=="function"&&WeakRef.prototype,CN=vht?WeakRef.prototype.deref:null,yht=Boolean.prototype.valueOf,_ht=Object.prototype.toString,bht=Function.prototype.toString,xht=String.prototype.match,aP=String.prototype.slice,el=String.prototype.replace,wht=String.prototype.toUpperCase,kN=String.prototype.toLowerCase,D$=RegExp.prototype.test,PN=Array.prototype.concat,ns=Array.prototype.join,Sht=Array.prototype.slice,LN=Math.floor,UE=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Jw=Object.getOwnPropertySymbols,VE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,md=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Fr=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===md||"symbol")?Symbol.toStringTag:null,I$=Object.prototype.propertyIsEnumerable,MN=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function AN(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||D$.call(/e/,e))return e;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var r=t<0?-LN(-t):LN(t);if(r!==t){var i=String(r),o=aP.call(e,i.length+1);return el.call(i,n,"$&_")+"."+el.call(el.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return el.call(e,n,"$&_")}var HE=pht,RN=HE.custom,jN=B$(RN)?RN:null,Tht=function t(e,n,r,i){var o=n||{};if(Ua(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Ua(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=Ua(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(Ua(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(Ua(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var l=o.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return z$(e,o);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var c=String(e);return l?AN(e,c):c}if(typeof e=="bigint"){var h=String(e)+"n";return l?AN(e,h):h}var d=typeof o.depth>"u"?5:o.depth;if(typeof r>"u"&&(r=0),r>=d&&d>0&&typeof e=="object")return WE(e)?"[Array]":"[Object]";var p=Uht(o,r);if(typeof i>"u")i=[];else if($$(i,e)>=0)return"[Circular]";function m(nt,K,J){if(K&&(i=Sht.call(i),i.push(K)),J){var et={depth:o.depth};return Ua(o,"quoteStyle")&&(et.quoteStyle=o.quoteStyle),t(nt,et,r+1,i)}return t(nt,o,r+1,i)}if(typeof e=="function"&&!NN(e)){var v=Rht(e),y=ey(e,m);return"[Function"+(v?": "+v:" (anonymous)")+"]"+(y.length>0?" { "+ns.call(y,", ")+" }":"")}if(B$(e)){var _=md?el.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):VE.call(e);return typeof e=="object"&&!md?rp(_):_}if(Bht(e)){for(var T="<"+kN.call(String(e.nodeName)),x=e.attributes||[],w=0;w",T}if(WE(e)){if(e.length===0)return"[]";var E=ey(e,m);return p&&!zht(E)?"["+YE(E,p)+"]":"[ "+ns.call(E,", ")+" ]"}if(Cht(e)){var O=ey(e,m);return!("cause"in Error.prototype)&&"cause"in e&&!I$.call(e,"cause")?"{ ["+String(e)+"] "+ns.call(PN.call("[cause]: "+m(e.cause),O),", ")+" }":O.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+ns.call(O,", ")+" }"}if(typeof e=="object"&&s){if(jN&&typeof e[jN]=="function"&&HE)return HE(e,{depth:d-r});if(s!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(jht(e)){var k=[];return EN&&EN.call(e,function(nt,K){k.push(m(K,e,!0)+" => "+m(nt,e))}),DN("Map",B0.call(e),k,p)}if(Iht(e)){var P=[];return ON&&ON.call(e,function(nt){P.push(m(nt,e))}),DN("Set",$0.call(e),P,p)}if(Nht(e))return t2("WeakMap");if(Fht(e))return t2("WeakSet");if(Dht(e))return t2("WeakRef");if(Pht(e))return rp(m(Number(e)));if(Mht(e))return rp(m(UE.call(e)));if(Lht(e))return rp(yht.call(e));if(kht(e))return rp(m(String(e)));if(!Oht(e)&&!NN(e)){var A=ey(e,m),j=MN?MN(e)===Object.prototype:e instanceof Object||e.constructor===Object,B=e instanceof Object?"":"null prototype",N=!j&&Fr&&Object(e)===e&&Fr in e?aP.call($l(e),8,-1):B?"Object":"",V=j||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",Y=V+(N||B?"["+ns.call(PN.call([],N||[],B||[]),": ")+"] ":"");return A.length===0?Y+"{}":p?Y+"{"+YE(A,p)+"}":Y+"{ "+ns.call(A,", ")+" }"}return String(e)};function F$(t,e,n){var r=(n.quoteStyle||e)==="double"?'"':"'";return r+t+r}function Eht(t){return el.call(String(t),/"/g,""")}function WE(t){return $l(t)==="[object Array]"&&(!Fr||!(typeof t=="object"&&Fr in t))}function Oht(t){return $l(t)==="[object Date]"&&(!Fr||!(typeof t=="object"&&Fr in t))}function NN(t){return $l(t)==="[object RegExp]"&&(!Fr||!(typeof t=="object"&&Fr in t))}function Cht(t){return $l(t)==="[object Error]"&&(!Fr||!(typeof t=="object"&&Fr in t))}function kht(t){return $l(t)==="[object String]"&&(!Fr||!(typeof t=="object"&&Fr in t))}function Pht(t){return $l(t)==="[object Number]"&&(!Fr||!(typeof t=="object"&&Fr in t))}function Lht(t){return $l(t)==="[object Boolean]"&&(!Fr||!(typeof t=="object"&&Fr in t))}function B$(t){if(md)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!VE)return!1;try{return VE.call(t),!0}catch{}return!1}function Mht(t){if(!t||typeof t!="object"||!UE)return!1;try{return UE.call(t),!0}catch{}return!1}var Aht=Object.prototype.hasOwnProperty||function(t){return t in this};function Ua(t,e){return Aht.call(t,e)}function $l(t){return _ht.call(t)}function Rht(t){if(t.name)return t.name;var e=xht.call(bht.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function $$(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0,r=t.length;ne.maxStringLength){var n=t.length-e.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return z$(aP.call(t,0,e.maxStringLength),e)+r}var i=el.call(el.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,$ht);return F$(i,"single",e)}function $ht(t){var e=t.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return n?"\\"+n:"\\x"+(e<16?"0":"")+wht.call(e.toString(16))}function rp(t){return"Object("+t+")"}function t2(t){return t+" { ? }"}function DN(t,e,n,r){var i=r?YE(n,r):ns.call(n,", ");return t+" ("+e+") {"+i+"}"}function zht(t){for(var e=0;e=0)return!1;return!0}function Uht(t,e){var n;if(t.indent===" ")n=" ";else if(typeof t.indent=="number"&&t.indent>0)n=ns.call(Array(t.indent+1)," ");else return null;return{base:n,prev:ns.call(Array(e+1),n)}}function YE(t,e){if(t.length===0)return"";var n=` -`+e.prev+e.base;return n+ns.call(t,","+n)+` -`+e.prev}function ey(t,e){var n=WE(t),r=[];if(n){r.length=t.length;for(var i=0;i1;){var e=t.pop(),n=e.obj[e.prop];if($c(n)){for(var r=[],i=0;i=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||i===rdt.RFC1738&&(c===40||c===41)){s+=o.charAt(l);continue}if(c<128){s=s+qo[c];continue}if(c<2048){s=s+(qo[192|c>>6]+qo[128|c&63]);continue}if(c<55296||c>=57344){s=s+(qo[224|c>>12]+qo[128|c>>6&63]+qo[128|c&63]);continue}l+=1,c=65536+((c&1023)<<10|o.charCodeAt(l)&1023),s+=qo[240|c>>18]+qo[128|c>>12&63]+qo[128|c>>6&63]+qo[128|c&63]}return s},cdt=function(t){for(var e=[{obj:{o:t},prop:"o"}],n=[],r=0;r"u"&&(E=0)}if(typeof c=="function"?x=c(n,x):x instanceof Date?x=p(x):r==="comma"&&Xs(x)&&(x=c_.maybeMap(x,function(et){return et instanceof Date?p(et):et})),x===null){if(o)return l&&!y?l(n,Pr.encoder,_,"key",m):n;x=""}if(vdt(x)||c_.isBuffer(x)){if(l){var P=y?n:l(n,Pr.encoder,_,"key",m);return[v(P)+"="+v(l(x,Pr.encoder,_,"value",m))]}return[v(n)+"="+v(String(x))]}var A=[];if(typeof x>"u")return A;var j;if(r==="comma"&&Xs(x))y&&l&&(x=c_.maybeMap(x,l)),j=[{value:x.length>0?x.join(",")||null:void 0}];else if(Xs(c))j=c;else{var B=Object.keys(x);j=h?B.sort(h):B}for(var N=i&&Xs(x)&&x.length===1?n+"[]":n,V=0;V"u"?Pr.allowDots:!!t.allowDots,charset:e,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Pr.charsetSentinel,delimiter:typeof t.delimiter>"u"?Pr.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Pr.encode,encoder:typeof t.encoder=="function"?t.encoder:Pr.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Pr.encodeValuesOnly,filter:i,format:n,formatter:r,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Pr.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Pr.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Pr.strictNullHandling}},bdt=function(t,e){var n=t,r=_dt(e),i,o;typeof r.filter=="function"?(o=r.filter,n=o("",n)):Xs(r.filter)&&(o=r.filter,i=o);var s=[];if(typeof n!="object"||n===null)return"";var l;e&&e.arrayFormat in IN?l=e.arrayFormat:e&&"indices"in e?l=e.indices?"indices":"repeat":l="indices";var c=IN[l];if(e&&"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var h=c==="comma"&&e&&e.commaRoundTrip;i||(i=Object.keys(n)),r.sort&&i.sort(r.sort);for(var d=H$(),p=0;p0?y+v:""},gd=V$,ZE=Object.prototype.hasOwnProperty,xdt=Array.isArray,nr={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:gd.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},wdt=function(t){return t.replace(/&#(\d+);/g,function(e,n){return String.fromCharCode(parseInt(n,10))})},Y$=function(t,e){return t&&typeof t=="string"&&e.comma&&t.indexOf(",")>-1?t.split(","):t},Sdt="utf8=%26%2310003%3B",Tdt="utf8=%E2%9C%93",Edt=function(t,e){var n={__proto__:null},r=e.ignoreQueryPrefix?t.replace(/^\?/,""):t,i=e.parameterLimit===1/0?void 0:e.parameterLimit,o=r.split(e.delimiter,i),s=-1,l,c=e.charset;if(e.charsetSentinel)for(l=0;l-1&&(v=xdt(v)?[v]:v),ZE.call(n,m)?n[m]=gd.combine(n[m],v):n[m]=v}return n},Odt=function(t,e,n,r){for(var i=r?e:Y$(e,n),o=t.length-1;o>=0;--o){var s,l=t[o];if(l==="[]"&&n.parseArrays)s=[].concat(i);else{s=n.plainObjects?Object.create(null):{};var c=l.charAt(0)==="["&&l.charAt(l.length-1)==="]"?l.slice(1,-1):l,h=parseInt(c,10);!n.parseArrays&&c===""?s={0:i}:!isNaN(h)&&l!==c&&String(h)===c&&h>=0&&n.parseArrays&&h<=n.arrayLimit?(s=[],s[h]=i):c!=="__proto__"&&(s[c]=i)}i=s}return i},Cdt=function(t,e,n,r){if(t){var i=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,o=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,l=n.depth>0&&o.exec(i),c=l?i.slice(0,l.index):i,h=[];if(c){if(!n.plainObjects&&ZE.call(Object.prototype,c)&&!n.allowPrototypes)return;h.push(c)}for(var d=0;n.depth>0&&(l=s.exec(i))!==null&&d"u"?nr.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?nr.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:nr.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:nr.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:nr.arrayLimit,charset:e,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:nr.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:nr.comma,decoder:typeof t.decoder=="function"?t.decoder:nr.decoder,delimiter:typeof t.delimiter=="string"||gd.isRegExp(t.delimiter)?t.delimiter:nr.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:nr.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:nr.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:nr.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:nr.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:nr.strictNullHandling}},Pdt=function(t,e){var n=kdt(e);if(t===""||t===null||typeof t>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof t=="string"?Edt(t,n):t,i=n.plainObjects?Object.create(null):{},o=Object.keys(r),s=0;sZ$.parse(t,{ignoreQueryPrefix:!0}),Gg=t=>Z$.stringify(t,{arrayFormat:"brackets"});var w1=(t=>(t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.INVALID_SHORT_URL_DELETION="INVALID_SHORT_URL_DELETION",t.DOMAIN_NOT_FOUND="DOMAIN_NOT_FOUND",t.FORBIDDEN_OPERATION="FORBIDDEN_OPERATION",t.INVALID_URL="INVALID_URL",t.INVALID_SLUG="INVALID_SLUG",t.INVALID_SHORTCODE="INVALID_SHORTCODE",t.TAG_CONFLICT="TAG_CONFLICT",t.TAG_NOT_FOUND="TAG_NOT_FOUND",t.MERCURE_NOT_CONFIGURED="MERCURE_NOT_CONFIGURED",t.INVALID_AUTHORIZATION="INVALID_AUTHORIZATION",t.INVALID_API_KEY="INVALID_API_KEY",t.NOT_FOUND="NOT_FOUND",t))(w1||{}),S1=(t=>(t.INVALID_ARGUMENT="https://shlink.io/api/error/invalid-data",t.INVALID_SHORT_URL_DELETION="https://shlink.io/api/error/invalid-short-url-deletion",t.DOMAIN_NOT_FOUND="https://shlink.io/api/error/domain-not-found",t.FORBIDDEN_OPERATION="https://shlink.io/api/error/forbidden-tag-operation",t.INVALID_URL="https://shlink.io/api/error/invalid-url",t.INVALID_SLUG="https://shlink.io/api/error/non-unique-slug",t.INVALID_SHORTCODE="https://shlink.io/api/error/short-url-not-found",t.TAG_CONFLICT="https://shlink.io/api/error/tag-conflict",t.TAG_NOT_FOUND="https://shlink.io/api/error/tag-not-found",t.MERCURE_NOT_CONFIGURED="https://shlink.io/api/error/mercure-not-configured",t.INVALID_AUTHORIZATION="https://shlink.io/api/error/missing-authentication",t.INVALID_API_KEY="https://shlink.io/api/error/invalid-api-key",t.NOT_FOUND="https://shlink.io/api/error/not-found",t))(S1||{});const jdt=(t,e)=>{const[n,r]=t.split("://"),[,...i]=r.split("/"),o=i.length?`/${i.join("/")}`:"";return`${n}://${e}${o}`},Ndt=(t,e)=>`${t}/rest/v${e}`,Ddt=z8(F8),Idt=({orderBy:t={},excludeMaxVisitsReached:e,excludePastValidUntil:n,...r})=>({...r,excludeMaxVisitsReached:e===!0?"true":void 0,excludePastValidUntil:n===!0?"true":void 0,orderBy:P$(t)}),Fdt=t=>t===null||!(typeof t=="object"&&"type"in t&&"status"in t)?!1:(t.type===w1.NOT_FOUND||t.type===S1.NOT_FOUND)&&t.status===404;class Bdt{constructor(e,n,r){St(this,"apiVersion");St(this,"listShortUrls",async(e={})=>this.performRequest({url:"/short-urls",query:Idt(e)}).then(({shortUrls:n})=>n));St(this,"createShortUrl",async e=>{const n=z8(r=>c0(r)||F8(r),e);return this.performRequest({url:"/short-urls",method:"POST",body:n})});St(this,"getShortUrlVisits",async(e,n)=>this.performRequest({url:`/short-urls/${e}/visits`,query:n}).then(({visits:r})=>r));St(this,"getTagVisits",async(e,n)=>this.performRequest({url:`/tags/${e}/visits`,query:n}).then(({visits:r})=>r));St(this,"getDomainVisits",async(e,n)=>this.performRequest({url:`/domains/${e}/visits`,query:n}).then(({visits:r})=>r));St(this,"getOrphanVisits",async e=>this.performRequest({url:"/visits/orphan",query:e}).then(({visits:n})=>n));St(this,"getNonOrphanVisits",async e=>this.performRequest({url:"/visits/non-orphan",query:e}).then(({visits:n})=>n));St(this,"getVisitsOverview",async()=>this.performRequest({url:"/visits"}).then(({visits:e})=>e));St(this,"getShortUrl",async(e,n)=>this.performRequest({url:`/short-urls/${e}`,query:{domain:n}}));St(this,"deleteShortUrl",async(e,n)=>this.performEmptyRequest({url:`/short-urls/${e}`,method:"DELETE",query:{domain:n}}));St(this,"updateShortUrl",async(e,n,r)=>this.performRequest({url:`/short-urls/${e}`,method:"PATCH",query:{domain:n},body:r}));St(this,"listTags",async()=>this.performRequest({url:"/tags",query:{withStats:"true"}}).then(({tags:e})=>e).then(({data:e,stats:n})=>({tags:e,stats:n})));St(this,"tagsStats",async()=>this.performRequest({url:"/tags/stats"}).then(({tags:e})=>e).then(({data:e})=>({tags:e.map(({tag:n})=>n),stats:e})));St(this,"deleteTags",async e=>this.performEmptyRequest({url:"/tags",method:"DELETE",query:{tags:e}}).then(()=>({tags:e})));St(this,"editTag",async(e,n)=>this.performEmptyRequest({url:"/tags",method:"PUT",body:{oldName:e,newName:n}}).then(()=>({oldName:e,newName:n})));St(this,"health",async e=>this.performRequest({url:"/health",domain:e}));St(this,"mercureInfo",async()=>this.performRequest({url:"/mercure-info"}));St(this,"listDomains",async()=>this.performRequest({url:"/domains"}).then(({domains:e})=>e));St(this,"editDomainRedirects",async e=>this.performRequest({url:"/domains/redirects",method:"PATCH",body:e}));St(this,"performRequest",async e=>this.httpClient.fetchJson(...this.toFetchParams(e)).catch(this.handleFetchError(()=>this.httpClient.fetchJson(...this.toFetchParams(e)))));St(this,"performEmptyRequest",async e=>this.httpClient.fetchEmpty(...this.toFetchParams(e)).catch(this.handleFetchError(()=>this.httpClient.fetchEmpty(...this.toFetchParams(e)))));St(this,"toFetchParams",({url:e,method:n="GET",query:r={},body:i,domain:o})=>{const s=Gg(Ddt(r)),l=c0(s)?"":`?${s}`,c=o?jdt(this.baseUrl,o):this.baseUrl;return[`${Ndt(c,this.apiVersion)}${e}${l}`,{method:n,body:i&&JSON.stringify(i),headers:{"X-Api-Key":this.apiKey}}]});St(this,"handleFetchError",e=>n=>{if(!Fdt(n))throw n;return this.apiVersion=2,e()});this.httpClient=e,this.baseUrl=n,this.apiKey=r,this.apiVersion=3}}const i2={},$dt=t=>typeof t=="function",zdt=t=>{const{selectedServer:e}=t();if(!V8(e))throw new Error("There's no selected server or it is not found");return e},Udt=t=>e=>{const{url:n,apiKey:r}=$dt(e)?zdt(e):e,i=`${n}_${r}`;return i2[i]||(i2[i]=new Bdt(t,n,r)),i2[i]},Vdt=t=>{t.serviceFactory("buildShlinkApiClient",Udt,"HttpClient")};const Hdt=({isOpen:t,toggle:e,forceUpdate:n})=>{const[r,,i]=zn(),o=()=>{i(),n()};return b.jsxs(_$,{className:"app-update-banner",isOpen:t,toggle:e,tag:Bn,color:"secondary",children:[b.jsx("h4",{className:"mb-4",children:"This app has just been updated!"}),b.jsxs("p",{className:"mb-0",children:["Restart it to enjoy the new features.",b.jsxs(ke,{role:"button",disabled:r,className:"ms-2",color:"secondary",size:"sm",onClick:o,children:[!r&&b.jsxs(b.Fragment,{children:["Restart now ",b.jsx(zt,{icon:$et,className:"ms-1"})]}),r&&b.jsx(b.Fragment,{children:"Restarting..."})]})]})]})},G$=({to:t="/",children:e="Home"})=>b.jsx("div",{className:"home",children:b.jsxs(Bn,{className:"p-4",children:[b.jsx("h2",{children:"Oops! We could not find requested route."}),b.jsx("p",{children:"Use your browser's back button to navigate to the page you have previously come from, or just press this button."}),b.jsx("br",{}),b.jsx(nn,{to:t,className:"btn btn-outline-primary btn-lg",children:e})]})}),Wdt=async()=>{var e;(await((e=navigator.serviceWorker)==null?void 0:e.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"})})};const Ydt=(t,e,n,r,i,o,s,l)=>({fetchServers:c,servers:h,settings:d,appUpdated:p,resetAppUpdate:m})=>{const y=Un().pathname==="/";return U.useEffect(()=>{var _;Object.keys(h).length===0&&c(),M$(((_=d.ui)==null?void 0:_.theme)??"light")},[]),b.jsxs("div",{className:"container-fluid app-container",children:[b.jsx(t,{}),b.jsxs("div",{className:"app",children:[b.jsx("div",{className:qt("shlink-wrapper",{"d-flex d-md-block align-items-center":y}),children:b.jsxs(a1,{children:[b.jsx(Ce,{index:!0,element:b.jsx(e,{})}),b.jsx(Ce,{path:"/settings/*",element:b.jsx(o,{})}),b.jsx(Ce,{path:"/manage-servers",element:b.jsx(s,{})}),b.jsx(Ce,{path:"/server/create",element:b.jsx(r,{})}),b.jsx(Ce,{path:"/server/:serverId/edit",element:b.jsx(i,{})}),b.jsx(Ce,{path:"/server/:serverId/*",element:b.jsx(n,{})}),b.jsx(Ce,{path:"*",element:b.jsx(G$,{})})]})}),b.jsx("div",{className:"shlink-footer",children:b.jsx(l,{})})]}),b.jsx(Hdt,{isOpen:p,toggle:m,forceUpdate:Wdt})]})};function Fo(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r3?e.i-4:e.i:Array.isArray(t)?1:hP(t)?2:dP(t)?3:0}function Uh(t,e){return Bd(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Zdt(t,e){return Bd(t)===2?t.get(e):t[e]}function q$(t,e,n){var r=Bd(t);r===2?t.set(e,n):r===3?t.add(n):t[e]=n}function K$(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function hP(t){return Jdt&&t instanceof Map}function dP(t){return tft&&t instanceof Set}function Dc(t){return t.o||t.t}function fP(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Q$(t);delete e[rn];for(var n=Vh(e),r=0;r1&&(t.set=t.add=t.clear=t.delete=Gdt),Object.freeze(t),e&&bu(t,function(n,r){return pP(r,!0)},!0)),t}function Gdt(){Fo(2)}function mP(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function ps(t){var e=XE[t];return e||Fo(18,t),e}function qdt(t,e){XE[t]||(XE[t]=e)}function GE(){return ng}function o2(t,e){e&&(ps("Patches"),t.u=[],t.s=[],t.v=e)}function z0(t){qE(t),t.p.forEach(Kdt),t.p=null}function qE(t){t===ng&&(ng=t.l)}function BN(t){return ng={p:[],l:ng,h:t,m:!0,_:0}}function Kdt(t){var e=t[rn];e.i===0||e.i===1?e.j():e.g=!0}function s2(t,e){e._=e.p.length;var n=e.p[0],r=t!==void 0&&t!==n;return e.h.O||ps("ES5").S(e,t,r),r?(n[rn].P&&(z0(e),Fo(4)),va(t)&&(t=U0(e,t),e.l||V0(e,t)),e.u&&ps("Patches").M(n[rn].t,t,e.u,e.s)):t=U0(e,n,[]),z0(e),e.u&&e.v(e.u,e.s),t!==X$?t:void 0}function U0(t,e,n){if(mP(e))return e;var r=e[rn];if(!r)return bu(e,function(l,c){return $N(t,r,e,l,c,n)},!0),e;if(r.A!==t)return e;if(!r.P)return V0(t,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=fP(r.k):r.o,o=i,s=!1;r.i===3&&(o=new Set(i),i.clear(),s=!0),bu(o,function(l,c){return $N(t,r,i,l,c,n,s)}),V0(t,i,!1),n&&t.u&&ps("Patches").N(r,n,t.u,t.s)}return r.o}function $N(t,e,n,r,i,o,s){if(kl(i)){var l=U0(t,i,o&&e&&e.i!==3&&!Uh(e.R,r)?o.concat(r):void 0);if(q$(n,r,l),!kl(l))return;t.m=!1}else s&&n.add(i);if(va(i)&&!mP(i)){if(!t.h.D&&t._<1)return;U0(t,i),e&&e.A.l||V0(t,i)}}function V0(t,e,n){n===void 0&&(n=!1),!t.l&&t.h.D&&t.m&&pP(e,n)}function a2(t,e){var n=t[rn];return(n?Dc(n):t)[e]}function zN(t,e){if(e in t)for(var n=Object.getPrototypeOf(t);n;){var r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function Ya(t){t.P||(t.P=!0,t.l&&Ya(t.l))}function l2(t){t.o||(t.o=fP(t.t))}function KE(t,e,n){var r=hP(e)?ps("MapSet").F(e,n):dP(e)?ps("MapSet").T(e,n):t.O?function(i,o){var s=Array.isArray(i),l={i:s?1:0,A:o?o.A:GE(),P:!1,I:!1,R:{},l:o,t:i,k:null,o:null,j:null,C:!1},c=l,h=rg;s&&(c=[l],h=Pp);var d=Proxy.revocable(c,h),p=d.revoke,m=d.proxy;return l.k=m,l.j=p,m}(e,n):ps("ES5").J(e,n);return(n?n.A:GE()).p.push(r),r}function Xdt(t){return kl(t)||Fo(22,t),function e(n){if(!va(n))return n;var r,i=n[rn],o=Bd(n);if(i){if(!i.P&&(i.i<4||!ps("ES5").K(i)))return i.t;i.I=!0,r=UN(n,o),i.I=!1}else r=UN(n,o);return bu(r,function(s,l){i&&Zdt(i.t,s)===l||q$(r,s,e(l))}),o===3?new Set(r):r}(t)}function UN(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return fP(t)}function Qdt(){function t(o,s){var l=i[o];return l?l.enumerable=s:i[o]=l={configurable:!0,enumerable:s,get:function(){var c=this[rn];return rg.get(c,o)},set:function(c){var h=this[rn];rg.set(h,o,c)}},l}function e(o){for(var s=o.length-1;s>=0;s--){var l=o[s][rn];if(!l.P)switch(l.i){case 5:r(l)&&Ya(l);break;case 4:n(l)&&Ya(l)}}}function n(o){for(var s=o.t,l=o.k,c=Vh(l),h=c.length-1;h>=0;h--){var d=c[h];if(d!==rn){var p=s[d];if(p===void 0&&!Uh(s,d))return!0;var m=l[d],v=m&&m[rn];if(v?v.t!==p:!K$(m,p))return!0}}var y=!!s[rn];return c.length!==Vh(s).length+(y?0:1)}function r(o){var s=o.k;if(s.length!==o.t.length)return!0;var l=Object.getOwnPropertyDescriptor(s,s.length-1);if(l&&!l.get)return!0;for(var c=0;c1?x-1:0),E=1;E1?d-1:0),m=1;m=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=ps("Patches").$;return kl(n)?s(n,r):this.produce(n,function(l){return s(l,r)})},t}(),Ui=new nft,J$=Ui.produce;Ui.produceWithPatches.bind(Ui);Ui.setAutoFreeze.bind(Ui);Ui.setUseProxies.bind(Ui);Ui.applyPatches.bind(Ui);Ui.createDraft.bind(Ui);Ui.finishDraft.bind(Ui);function ig(t){"@babel/helpers - typeof";return ig=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ig(t)}function rft(t,e){if(ig(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(ig(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ift(t){var e=rft(t,"string");return ig(e)==="symbol"?e:String(e)}function oft(t,e,n){return e=ift(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function YN(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ZN(t){for(var e=1;e"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Lr(1));return n(tz)(t,e)}if(typeof t!="function")throw new Error(Lr(2));var i=t,o=e,s=[],l=s,c=!1;function h(){l===s&&(l=s.slice())}function d(){if(c)throw new Error(Lr(3));return o}function p(_){if(typeof _!="function")throw new Error(Lr(4));if(c)throw new Error(Lr(5));var T=!0;return h(),l.push(_),function(){if(T){if(c)throw new Error(Lr(6));T=!1,h();var w=l.indexOf(_);l.splice(w,1),s=null}}}function m(_){if(!sft(_))throw new Error(Lr(7));if(typeof _.type>"u")throw new Error(Lr(8));if(c)throw new Error(Lr(9));try{c=!0,o=i(o,_)}finally{c=!1}for(var T=s=l,x=0;x"u")throw new Error(Lr(12));if(typeof n(void 0,{type:H0.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Lr(13))})}function vP(t){for(var e=Object.keys(t),n={},r=0;r"u")throw h&&h.type,new Error(Lr(14));p[v]=T,d=d||T!==_}return d=d||o.length!==Object.keys(c).length,d?p:c}}function W0(){for(var t=arguments.length,e=new Array(t),n=0;n0&&o[o.length-1])&&(h[0]===6||h[0]===2)){n=0;continue}if(h[0]===3&&(!o||h[1]>o[0]&&h[1]!0,resetAppUpdate:()=>!1}}),{appUpdateAvailable:Nft,resetAppUpdate:Dft}=Rft,Ift=jft,Fft=(t,e)=>{t.serviceFactory("App",Ydt,"MainHeader","Home","ShlinkWebComponentContainer","CreateServer","EditServer","Settings","ManageServers","ShlinkVersionsContainer"),t.decorator("App",e(["servers","settings","appUpdated"],["fetchServers","resetAppUpdate"])),t.serviceFactory("appUpdateAvailable",()=>Nft),t.serviceFactory("resetAppUpdate",()=>Dft)};var Bft={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"]},$ft=Bft,zft={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"]},Uft=zft,Vft={prefix:"far",iconName:"circle",icon:[512,512,[128308,128309,128992,128993,128994,128995,128996,9679,9898,9899,11044,61708,61915],"f111","M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z"]},az={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"]},Hft={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"]},Wft={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"]},Yft=Object.defineProperty,Zft=(t,e,n)=>e in t?Yft(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Qt=(t,e,n)=>(Zft(t,typeof e!="symbol"?e+"":e,n),n),Zo,ys=".",lz="function",cz="string",uz="__global__",_P="Provider",Gft=0,bP=Array.prototype.slice,qft=function(t,e){var n=t[e];if(n===void 0&&Zo.config.strict)throw new Error("Bottle was unable to resolve a service. `"+e+"` is undefined.");return n},T1=function(t){var e;return this.nested[t]||(e=Zo.pop(),this.nested[t]=e,this.factory(t,function(){return e.container})),this.nested[t]},hz=function(t){return t.split(ys).reduce(qft,this)},Kft=function(t,e,n,r){var i={configurable:!0,enumerable:!0};return t.length?i.get=function(){var o=0,s=function(l){if(l)throw l;t[o]&&t[o++](n,s)};return s(),n}:(i.value=n,i.writable=!0),Object.defineProperty(r,e,i),r[e]},Xft=function(t,e){var n,r;return typeof t===lz&&(e=t,t=uz),n=t.split(ys),r=n.shift(),n.length?T1.call(this,r).middleware(n.join(ys),e):(this.middlewares[r]||(this.middlewares[r]=[]),this.middlewares[r].push(e)),this},Qft=function(t,e){return e(t)},tD=function(t,e){return(t[e]||[]).concat(t.__global__||[])},Jft=function(t,e){var n,r,i,o,s;return this.id,i=this.container,o=this.decorators,s=this.middlewares,n=t+_P,r=Object.create(null),r[n]={configurable:!0,enumerable:!0,get:function(){var l=new e;return delete i[n],i[n]=l,l}},r[t]={configurable:!0,enumerable:!0,get:function(){var l=i[n],c;return l&&(c=tD(o,t).reduce(Qft,l.$get(i)),delete i[n],delete i[t]),c===void 0?c:Kft(tD(s,t),t,c,i)}},Object.defineProperties(i,r),this},dz=function(t,e){var n,r;return n=t.split(ys),this.providerMap[t]&&n.length===1&&!this.container[t+_P]?console.error(t+" provider already instantiated."):(this.originalProviders[t]=e,this.providerMap[t]=!0,r=n.shift(),n.length?(T1.call(this,r).provider(n.join(ys),e),this):Jft.call(this,r,e))},xP=function(t,e){return dz.call(this,t,function(){this.$get=e})},fz=function(t,e,n){var r=arguments.length>3?bP.call(arguments,3):[],i=this;return xP.call(this,t,function(){var o=e,s=r.map(hz,i.container);return n?new(e.bind.apply(e,[null].concat(s))):o.apply(null,s)})},tpt=function(t,e){return fz.apply(this,[t,e,!0].concat(bP.call(arguments,2)))},ept=function(t,e){return fz.apply(this,[t,e,!1].concat(bP.call(arguments,2)))},pz=function(t,e){Object.defineProperty(this,t,{configurable:!0,enumerable:!0,value:e,writable:!0})},mz=function(t,e){var n=t[e];return n||(n={},pz.call(t,e,n)),n},npt=function(t,e){var n;return n=t.split(ys),t=n.pop(),pz.call(n.reduce(mz,this.container),t,e),this},rpt=function(t,e){Object.defineProperty(this,t,{configurable:!1,enumerable:!0,value:e,writable:!1})},ipt=function(t,e){var n=t.split(ys);return t=n.pop(),rpt.call(n.reduce(mz,this.container),t,e),this},gz=function(t,e){var n,r;return typeof t===lz&&(e=t,t=uz),n=t.split(ys),r=n.shift(),n.length?T1.call(this,r).decorator(n.join(ys),e):(this.decorators[r]||(this.decorators[r]=[]),this.decorators[r].push(e)),this},opt=function(t){return this.deferred.push(t),this},spt=function(t){return(t||[]).map(hz,this.container)},apt=function(t,e){return xP.call(this,t,function(n){return{instance:e.bind(e,n)}})},lpt=function(t){return!/^\$(?:decorator|register|list)$|Provider$/.test(t)},wP=function(t){return Object.keys(t||this.container||{}).filter(lpt)},Y0={},cpt=function(t){var e;return typeof t===cz?(e=Y0[t],e||(Y0[t]=e=new Zo,e.constant("BOTTLE_NAME",t)),e):new Zo},upt=function(t){typeof t===cz?delete Y0[t]:Y0={}},vz=function(t){var e=t.$value===void 0?t:t.$value;return this[t.$type||"service"].apply(this,[t.$name,e].concat(t.$inject||[]))},eD=function(t){delete this.providerMap[t],delete this.container[t],delete this.container[t+_P]},hpt=function(t){var e=this.originalProviders,n=Array.isArray(t);Object.keys(this.originalProviders).forEach(function(r){if(!(n&&t.indexOf(r)===-1)){var i=r.split(ys);i.length>1&&i.forEach(eD,T1.call(this,i[0])),eD.call(this,r),this.provider(r,e[r])}},this)},dpt=function(t){return this.deferred.forEach(function(e){e(t)}),this};Zo=function t(e){if(!(this instanceof t))return t.pop(e);this.id=Gft++,this.decorators={},this.middlewares={},this.nested={},this.providerMap={},this.originalProviders={},this.deferred=[],this.container={$decorator:gz.bind(this),$register:vz.bind(this),$list:wP.bind(this)}};Zo.prototype={constant:ipt,decorator:gz,defer:opt,digest:spt,factory:xP,instanceFactory:apt,list:wP,middleware:Xft,provider:dz,resetProviders:hpt,register:vz,resolve:dpt,service:tpt,serviceFactory:ept,value:npt};Zo.pop=cpt;Zo.clear=upt;Zo.list=wP;Zo.config={strict:!1};const fpt=Zo;var ppt=function(){return!0};const yz=ppt;function qe(t){return t!=null&&typeof t=="object"&&t["@@functional/placeholder"]===!0}function sn(t){return function e(n){return arguments.length===0||qe(n)?e:t.apply(this,arguments)}}function De(t){return function e(n,r){switch(arguments.length){case 0:return e;case 1:return qe(n)?e:sn(function(i){return t(n,i)});default:return qe(n)&&qe(r)?e:qe(n)?sn(function(i){return t(i,r)}):qe(r)?sn(function(i){return t(n,i)}):t(n,r)}}}function qg(t,e){switch(t){case 0:return function(){return e.apply(this,arguments)};case 1:return function(n){return e.apply(this,arguments)};case 2:return function(n,r){return e.apply(this,arguments)};case 3:return function(n,r,i){return e.apply(this,arguments)};case 4:return function(n,r,i,o){return e.apply(this,arguments)};case 5:return function(n,r,i,o,s){return e.apply(this,arguments)};case 6:return function(n,r,i,o,s,l){return e.apply(this,arguments)};case 7:return function(n,r,i,o,s,l,c){return e.apply(this,arguments)};case 8:return function(n,r,i,o,s,l,c,h){return e.apply(this,arguments)};case 9:return function(n,r,i,o,s,l,c,h,d){return e.apply(this,arguments)};case 10:return function(n,r,i,o,s,l,c,h,d,p){return e.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function E1(t,e,n){return function(){for(var r=[],i=0,o=t,s=0;s=arguments.length)?l=e[s]:(l=arguments[i],i+=1),r[s]=l,qe(l)||(o-=1),s+=1}return o<=0?n.apply(this,r):qg(o,E1(t,r,n))}}var mpt=De(function(t,e){return t===1?sn(e):qg(t,E1(t,[],e))});const _z=mpt;function Iu(t){return function e(n,r,i){switch(arguments.length){case 0:return e;case 1:return qe(n)?e:De(function(o,s){return t(n,o,s)});case 2:return qe(n)&&qe(r)?e:qe(n)?De(function(o,s){return t(o,r,s)}):qe(r)?De(function(o,s){return t(n,o,s)}):sn(function(o){return t(n,r,o)});default:return qe(n)&&qe(r)&&qe(i)?e:qe(n)&&qe(r)?De(function(o,s){return t(o,s,i)}):qe(n)&&qe(i)?De(function(o,s){return t(o,r,s)}):qe(r)&&qe(i)?De(function(o,s){return t(n,o,s)}):qe(n)?sn(function(o){return t(o,r,i)}):qe(r)?sn(function(o){return t(n,o,i)}):qe(i)?sn(function(o){return t(n,r,o)}):t(n,r,i)}}}const Kg=Array.isArray||function(t){return t!=null&&t.length>=0&&Object.prototype.toString.call(t)==="[object Array]"};function gpt(t){return t!=null&&typeof t["@@transducer/step"]=="function"}function SP(t,e,n){return function(){if(arguments.length===0)return n();var r=Array.prototype.slice.call(arguments,0),i=r.pop();if(!Kg(i)){for(var o=0;ot?e:t});const bz=vpt;function u_(t,e){for(var n=0,r=e.length,i=Array(r);n0?t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1):!1});const xz=ypt;var _pt=function(){function t(e){this.f=e}return t.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},t.prototype["@@transducer/result"]=function(e){return e},t.prototype["@@transducer/step"]=function(e,n){return this.f(e,n)},t}();function bpt(t){return new _pt(t)}var xpt=De(function(t,e){return qg(t.length,function(){return t.apply(e,arguments)})});const wpt=xpt;function Spt(t,e,n){for(var r=0,i=n.length;r=0;)e=sD[n],ro(e,t)&&!Ppt(r,e)&&(r[r.length]=e),n-=1;return r});const _s=Lpt;var Mpt=De(SP(["fantasy-land/map","map"],Opt,function(t,e){switch(Object.prototype.toString.call(e)){case"[object Function]":return _z(e.length,function(){return t.call(this,e.apply(this,arguments))});case"[object Object]":return C1(function(n,r){return n[r]=t(e[r]),n},{},_s(e));default:return u_(t,e)}}));const Sz=Mpt,JE=Number.isInteger||function(t){return t<<0===t};var Apt=De(function(t,e){var n=t<0?e.length+t:t;return O1(e)?e.charAt(n):e[n]});const Tz=Apt;var Rpt=De(function(t,e){return t.map(function(n){for(var r=e,i=0,o;i1){var o=!Fu(r)&&ro(i,r)?r[i]:JE(e[1])?[]:{};n=t(Array.prototype.slice.call(e,1),n,o)}if(JE(i)&&Kg(r)){var s=[].concat(r);return s[i]=n,s}else return Upt(i,n,r)});const th=Hpt;function Wpt(t){var e=Object.prototype.toString.call(t);return e==="[object Function]"||e==="[object AsyncFunction]"||e==="[object GeneratorFunction]"||e==="[object AsyncGeneratorFunction]"}function Ypt(t){return function e(n){for(var r,i,o,s=[],l=0,c=n.length;l=0;){if(n[o]===t)return r[o]===e;o-=1}switch(i){case"Map":return t.size!==e.size?!1:uD(t.entries(),e.entries(),n.concat([t]),r.concat([e]));case"Set":return t.size!==e.size?!1:uD(t.values(),e.values(),n.concat([t]),r.concat([e]));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=_s(t);if(s.length!==_s(e).length)return!1;var l=n.concat([t]),c=r.concat([e]);for(o=s.length-1;o>=0;){var h=s[o];if(!(ro(h,e)&&OP(e[h],t[h],l,c)))return!1;o-=1}return!0}var omt=De(function(t,e){return OP(t,e,[],[])});const CP=omt;function smt(t,e,n){var r,i;if(typeof t.indexOf=="function")switch(typeof e){case"number":if(e===0){for(r=1/e;n=0}function p2(t){var e=t.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'"'+e.replace(/"/g,'\\"')+'"'}var ip=function(t){return(t<10?"0":"")+t},lmt=typeof Date.prototype.toISOString=="function"?function(t){return t.toISOString()}:function(t){return t.getUTCFullYear()+"-"+ip(t.getUTCMonth()+1)+"-"+ip(t.getUTCDate())+"T"+ip(t.getUTCHours())+":"+ip(t.getUTCMinutes())+":"+ip(t.getUTCSeconds())+"."+(t.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};const cmt=lmt;function umt(t){return function(){return!t.apply(this,arguments)}}function hmt(t,e){for(var n=0,r=e.length,i=[];n":Pz(o,s)},r=function(o,s){return u_(function(l){return p2(l)+": "+n(o[l])},s.slice().sort())};switch(Object.prototype.toString.call(t)){case"[object Arguments]":return"(function() { return arguments; }("+u_(n,t).join(", ")+"))";case"[object Array]":return"["+u_(n,t).concat(r(t,kP(function(o){return/^\d+$/.test(o)},_s(t)))).join(", ")+"]";case"[object Boolean]":return typeof t=="object"?"new Boolean("+n(t.valueOf())+")":t.toString();case"[object Date]":return"new Date("+(isNaN(t.valueOf())?n(NaN):p2(cmt(t)))+")";case"[object Null]":return"null";case"[object Number]":return typeof t=="object"?"new Number("+n(t.valueOf())+")":1/t===-1/0?"-0":t.toString(10);case"[object String]":return typeof t=="object"?"new String("+n(t.valueOf())+")":p2(t);case"[object Undefined]":return"undefined";default:if(typeof t.toString=="function"){var i=t.toString();if(i!=="[object Object]")return i}return"{"+r(t,_s(t)).join(", ")+"}"}}var vmt=sn(function(t){return Pz(t,[])});const ymt=vmt;var _mt=sn(function(t){var e=Ez(bz,0,Sz(function(n){return n[0].length},t));return qg(e,function(){for(var n=0;no?1:0})});const qmt=Gmt;var Kmt=De(function(t,e){if(t<=0)throw new Error("First argument to splitEvery must be a positive integer");for(var n=[],r=0;r{const[i,,o,s]=zn(),{domains:l}=n,c=qi(e),h=()=>r("");return U.useEffect(()=>{t()},[]),i?b.jsxs(y1,{children:[b.jsx(dd,{value:e??"",placeholder:"Domain",onChange:d=>r(d.target.value)}),b.jsx(ke,{id:"backToDropdown",outline:!0,type:"button",className:"domains-dropdown__back-btn","aria-label":"Back to domains list",onClick:cr(h,s),children:b.jsx(zt,{icon:wet})}),b.jsx(fi,{target:"backToDropdown",placement:"left",trigger:"hover",children:"Existing domains"})]}):b.jsxs(Pa,{text:c?"Domain":`Domain: ${e}`,className:c?"domains-dropdown__toggle-btn":"domains-dropdown__toggle-btn--active",children:[l.map(({domain:d,isDefault:p})=>b.jsxs(Zt,{active:(e===d||p)&&c,onClick:()=>r(d),children:[d,p&&b.jsx("span",{className:"float-end text-muted",children:"default"})]},d)),b.jsx(Zt,{divider:!0}),b.jsx(Zt,{onClick:cr(h,o),children:b.jsx("i",{children:"New domain"})})]})},ngt=t=>(t==null?void 0:t.type)===w1.INVALID_ARGUMENT||(t==null?void 0:t.type)===S1.INVALID_ARGUMENT,rgt=t=>(t==null?void 0:t.type)==="INVALID_SHORTCODE_DELETION"||(t==null?void 0:t.type)===w1.INVALID_SHORT_URL_DELETION||(t==null?void 0:t.type)===S1.INVALID_SHORT_URL_DELETION,igt=t=>!!t&&typeof t=="object"&&["type","detail","title","status"].every(e=>e in t),La=t=>igt(t)?t:void 0,ya=({errorData:t,fallbackMessage:e})=>b.jsxs(b.Fragment,{children:[(t==null?void 0:t.detail)??e,ngt(t)&&b.jsxs("p",{className:"mb-0",children:["Invalid elements: [",t.invalidElements.join(", "),"]"]})]}),ogt=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,fD=t=>{if(typeof t!="string")throw new TypeError("Invalid argument expected string");const e=t.match(ogt);if(!e)throw new Error(`Invalid argument not valid semver ('${t}' received)`);return e.shift(),e},pD=t=>t==="*"||t==="x"||t==="X",mD=t=>{const e=parseInt(t,10);return isNaN(e)?t:e},sgt=(t,e)=>typeof t!=typeof e?[String(t),String(e)]:[t,e],agt=(t,e)=>{if(pD(t)||pD(e))return 0;const[n,r]=sgt(mD(t),mD(e));return n>r?1:n{for(let n=0;n{const n=fD(t),r=fD(e),i=n.pop(),o=r.pop(),s=gD(n,r);return s!==0?s:i&&o?gD(i.split("."),o.split(".")):i||o?i?-1:1:0},vD=(t,e,n)=>{cgt(n);const r=lgt(t,e);return Nz[n].includes(r)},Nz={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},yD=Object.keys(Nz),cgt=t=>{if(typeof t!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof t}`);if(yD.indexOf(t)===-1)throw new Error(`Invalid operator, expected one of ${yD.join("|")}`)},ugt=(t,{maxVersion:e,minVersion:n})=>{const r=!n||vD(t,n,">=");return(!e||vD(t,e,"<="))&&r},Dz={domainVisits:"3.1.0",excludeBotsOnShortUrls:"3.4.0",filterDisabledUrls:"3.4.0",deviceLongUrls:"3.5.0"};Object.freeze(Dz);const oy=(t,e)=>ugt(e,{minVersion:Dz[t]}),Iz=t=>({domainVisits:oy("domainVisits",t),excludeBotsOnShortUrls:oy("excludeBotsOnShortUrls",t),filterDisabledUrls:oy("filterDisabledUrls",t),deviceLongUrls:oy("deviceLongUrls",t)}),hgt=t=>U.useMemo(()=>Iz(t),[t]),Fz=U.createContext(Iz("0.0.0")),dgt=Fz.Provider,Xg=t=>U.useContext(Fz)[t],Bz=U.createContext(""),fgt=Bz.Provider,Bu=()=>U.useContext(Bz),om=(t,e,n)=>Fu(n)?t.shortCode===e&&!t.domain:t.shortCode===e&&t.domain===n,pgt=(t,e)=>!t.domain&&e===g7?!0:t.domain===e,mgt=(t,e)=>{const n=(e==null?void 0:e.validateUrls)??!1;return t?{longUrl:t.longUrl,tags:t.tags,title:t.title??void 0,domain:t.domain??void 0,validSince:t.meta.validSince??void 0,validUntil:t.meta.validUntil??void 0,maxVisits:t.meta.maxVisits??void 0,crawlable:t.crawlable,forwardQuery:t.forwardQuery,deviceLongUrls:t.deviceLongUrls&&{android:t.deviceLongUrls.android??void 0,ios:t.deviceLongUrls.ios??void 0,desktop:t.deviceLongUrls.desktop??void 0},validateUrl:n}:{longUrl:"",validateUrl:n}},$z="__",ggt=t=>t.replaceAll("/",$z),h_=t=>t.replaceAll($z,"/");function Vi(t){"@babel/helpers - typeof";return Vi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vi(t)}function te(t){if(t===null||t===!0||t===!1)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function Pt(t,e){if(e.length1?"s":"")+" required, but only "+e.length+" present")}function Nt(t){Pt(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||Vi(t)==="object"&&e==="[object Date]"?new Date(t.getTime()):typeof t=="number"||e==="[object Number]"?new Date(t):((typeof t=="string"||e==="[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 $u(t,e){Pt(2,arguments);var n=Nt(t),r=te(e);return isNaN(r)?new Date(NaN):(r&&n.setDate(n.getDate()+r),n)}function go(t,e){Pt(2,arguments);var n=Nt(t),r=te(e);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 vgt(t,e){if(Pt(2,arguments),!e||Vi(e)!=="object")return new Date(NaN);var n=e.years?te(e.years):0,r=e.months?te(e.months):0,i=e.weeks?te(e.weeks):0,o=e.days?te(e.days):0,s=e.hours?te(e.hours):0,l=e.minutes?te(e.minutes):0,c=e.seconds?te(e.seconds):0,h=Nt(t),d=r||n?go(h,r+n*12):h,p=o||i?$u(d,o+i*7):d,m=l+s*60,v=c+m*60,y=v*1e3,_=new Date(p.getTime()+y);return _}function MP(t,e){Pt(2,arguments);var n=Nt(t).getTime(),r=te(e);return new Date(n+r)}var ygt=36e5;function _gt(t,e){Pt(2,arguments);var n=te(e);return MP(t,n*ygt)}var bgt={};function Ma(){return bgt}function zz(t,e){var n,r,i,o,s,l,c,h;Pt(1,arguments);var d=Ma(),p=te((n=(r=(i=(o=e==null?void 0:e.weekStartsOn)!==null&&o!==void 0?o:e==null||(s=e.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&i!==void 0?i:d.weekStartsOn)!==null&&r!==void 0?r:(c=d.locale)===null||c===void 0||(h=c.options)===null||h===void 0?void 0:h.weekStartsOn)!==null&&n!==void 0?n:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=Nt(t),v=m.getDay(),y=(v=i.getTime()?n+1:e.getTime()>=s.getTime()?n:n-1}function wgt(t){Pt(1,arguments);var e=xgt(t),n=new Date(0);n.setFullYear(e,0,4),n.setHours(0,0,0,0);var r=ag(n);return r}function yd(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}function Fi(t){Pt(1,arguments);var e=Nt(t);return e.setHours(0,0,0,0),e}var Sgt=864e5;function lg(t,e){Pt(2,arguments);var n=Fi(t),r=Fi(e),i=n.getTime()-yd(n),o=r.getTime()-yd(r);return Math.round((i-o)/Sgt)}var Tgt=6e4;function eO(t,e){Pt(2,arguments);var n=te(e);return MP(t,n*Tgt)}function Uz(t,e){Pt(2,arguments);var n=te(e),r=n*3;return go(t,r)}function AP(t,e){Pt(2,arguments);var n=te(e),r=n*7;return $u(t,r)}function _d(t,e){Pt(2,arguments);var n=te(e);return go(t,n*12)}function _D(t){Pt(1,arguments);var e;if(t&&typeof t.forEach=="function")e=t;else if(Vi(t)==="object"&&t!==null)e=Array.prototype.slice.call(t);else return new Date(NaN);var n;return e.forEach(function(r){var i=Nt(r);(n===void 0||ni||isNaN(i.getDate()))&&(n=i)}),n||new Date(NaN)}function d_(t,e){Pt(2,arguments);var n=Nt(t),r=Nt(e),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}var RP=6e4,k1=36e5,Egt=1e3;function Ogt(t,e){Pt(2,arguments);var n=Fi(t),r=Fi(e);return n.getTime()===r.getTime()}function jP(t){return Pt(1,arguments),t instanceof Date||Vi(t)==="object"&&Object.prototype.toString.call(t)==="[object Date]"}function q0(t){if(Pt(1,arguments),!jP(t)&&typeof t!="number")return!1;var e=Nt(t);return!isNaN(Number(e))}function cg(t,e){Pt(2,arguments);var n=Nt(t),r=Nt(e),i=n.getFullYear()-r.getFullYear(),o=n.getMonth()-r.getMonth();return i*12+o}function Ch(t){Pt(1,arguments);var e=Nt(t),n=Math.floor(e.getMonth()/3)+1;return n}function K0(t,e){Pt(2,arguments);var n=Nt(t),r=Nt(e);return n.getFullYear()-r.getFullYear()}function xD(t,e){var n=t.getFullYear()-e.getFullYear()||t.getMonth()-e.getMonth()||t.getDate()-e.getDate()||t.getHours()-e.getHours()||t.getMinutes()-e.getMinutes()||t.getSeconds()-e.getSeconds()||t.getMilliseconds()-e.getMilliseconds();return n<0?-1:n>0?1:n}function NP(t,e){Pt(2,arguments);var n=Nt(t),r=Nt(e),i=xD(n,r),o=Math.abs(lg(n,r));n.setDate(n.getDate()-i*o);var s=+(xD(n,r)===-i),l=i*(o-s);return l===0?0:l}function Vz(t,e){return Pt(2,arguments),Nt(t).getTime()-Nt(e).getTime()}var wD={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},Cgt="trunc";function DP(t){return t?wD[t]:wD[Cgt]}function kgt(t,e,n){Pt(2,arguments);var r=Vz(t,e)/k1;return DP(n==null?void 0:n.roundingMethod)(r)}function xu(t){Pt(1,arguments);var e=Nt(t);return e.setHours(23,59,59,999),e}function Hz(t){Pt(1,arguments);var e=Nt(t),n=e.getMonth();return e.setFullYear(e.getFullYear(),n+1,0),e.setHours(23,59,59,999),e}function Pgt(t){Pt(1,arguments);var e=Nt(t);return xu(e).getTime()===Hz(e).getTime()}function X0(t,e){Pt(2,arguments);var n=Nt(t),r=Nt(e),i=d_(n,r),o=Math.abs(cg(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 l=d_(n,r)===-i;Pgt(Nt(t))&&o===1&&d_(t,r)===1&&(l=!1),s=i*(o-Number(l))}return s===0?0:s}function Lgt(t,e,n){Pt(2,arguments);var r=Vz(t,e)/1e3;return DP(n==null?void 0:n.roundingMethod)(r)}function Mgt(t,e,n){Pt(2,arguments);var r=NP(t,e)/7;return DP(n==null?void 0:n.roundingMethod)(r)}function nO(t){Pt(1,arguments);var e=Nt(t),n=e.getMonth(),r=n-n%3;return e.setMonth(r,1),e.setHours(0,0,0,0),e}function Wz(t){Pt(1,arguments);var e=Nt(t);return e.setDate(1),e.setHours(0,0,0,0),e}function Agt(t){Pt(1,arguments);var e=Nt(t),n=e.getFullYear();return e.setFullYear(n+1,0,0),e.setHours(23,59,59,999),e}function Yz(t){Pt(1,arguments);var e=Nt(t),n=new Date(0);return n.setFullYear(e.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Rgt(t,e){var n,r,i,o,s,l,c,h;Pt(1,arguments);var d=Ma(),p=te((n=(r=(i=(o=e==null?void 0:e.weekStartsOn)!==null&&o!==void 0?o:e==null||(s=e.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&i!==void 0?i:d.weekStartsOn)!==null&&r!==void 0?r:(c=d.locale)===null||c===void 0||(h=c.options)===null||h===void 0?void 0:h.weekStartsOn)!==null&&n!==void 0?n:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=Nt(t),v=m.getDay(),y=(v=i.getTime()?n+1:e.getTime()>=s.getTime()?n:n-1}function Igt(t){Pt(1,arguments);var e=Gz(t),n=new Date(0);n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0);var r=bd(n);return r}var Fgt=6048e5;function qz(t){Pt(1,arguments);var e=Nt(t),n=bd(e).getTime()-Igt(e).getTime();return Math.round(n/Fgt)+1}function wu(t,e){var n,r,i,o,s,l,c,h;Pt(1,arguments);var d=Ma(),p=te((n=(r=(i=(o=e==null?void 0:e.weekStartsOn)!==null&&o!==void 0?o:e==null||(s=e.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&i!==void 0?i:d.weekStartsOn)!==null&&r!==void 0?r:(c=d.locale)===null||c===void 0||(h=c.options)===null||h===void 0?void 0:h.weekStartsOn)!==null&&n!==void 0?n:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=Nt(t),v=m.getUTCDay(),y=(v=1&&v<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=new Date(0);y.setUTCFullYear(p+1,0,v),y.setUTCHours(0,0,0,0);var _=wu(y,e),T=new Date(0);T.setUTCFullYear(p,0,v),T.setUTCHours(0,0,0,0);var x=wu(T,e);return d.getTime()>=_.getTime()?p+1:d.getTime()>=x.getTime()?p:p-1}function Bgt(t,e){var n,r,i,o,s,l,c,h;Pt(1,arguments);var d=Ma(),p=te((n=(r=(i=(o=e==null?void 0:e.firstWeekContainsDate)!==null&&o!==void 0?o:e==null||(s=e.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&i!==void 0?i:d.firstWeekContainsDate)!==null&&r!==void 0?r:(c=d.locale)===null||c===void 0||(h=c.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&n!==void 0?n:1),m=IP(t,e),v=new Date(0);v.setUTCFullYear(m,0,p),v.setUTCHours(0,0,0,0);var y=wu(v,e);return y}var $gt=6048e5;function Kz(t,e){Pt(1,arguments);var n=Nt(t),r=wu(n,e).getTime()-Bgt(n,e).getTime();return Math.round(r/$gt)+1}function ue(t,e){for(var n=t<0?"-":"",r=Math.abs(t).toString();r.length0?n:1-n;return ue(e==="yy"?r%100:r,e.length)},M:function(t,e){var n=t.getUTCMonth();return e==="M"?String(n+1):ue(n+1,2)},d:function(t,e){return ue(t.getUTCDate(),e.length)},a:function(t,e){var n=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(t,e){return ue(t.getUTCHours()%12||12,e.length)},H:function(t,e){return ue(t.getUTCHours(),e.length)},m:function(t,e){return ue(t.getUTCMinutes(),e.length)},s:function(t,e){return ue(t.getUTCSeconds(),e.length)},S:function(t,e){var n=e.length,r=t.getUTCMilliseconds(),i=Math.floor(r*Math.pow(10,n-3));return ue(i,e.length)}};const Na=zgt;var eh={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ugt={G:function(t,e,n){var r=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){var r=t.getUTCFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return Na.y(t,e)},Y:function(t,e,n,r){var i=IP(t,r),o=i>0?i:1-i;if(e==="YY"){var s=o%100;return ue(s,2)}return e==="Yo"?n.ordinalNumber(o,{unit:"year"}):ue(o,e.length)},R:function(t,e){var n=Gz(t);return ue(n,e.length)},u:function(t,e){var n=t.getUTCFullYear();return ue(n,e.length)},Q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return ue(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return ue(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){var r=t.getUTCMonth();switch(e){case"M":case"MM":return Na.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){var r=t.getUTCMonth();switch(e){case"L":return String(r+1);case"LL":return ue(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){var i=Kz(t,r);return e==="wo"?n.ordinalNumber(i,{unit:"week"}):ue(i,e.length)},I:function(t,e,n){var r=qz(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):ue(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):Na.d(t,e)},D:function(t,e,n){var r=Dgt(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):ue(r,e.length)},E:function(t,e,n){var r=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){var i=t.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return ue(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){var i=t.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return ue(o,e.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(t,e,n){var r=t.getUTCDay(),i=r===0?7:r;switch(e){case"i":return String(i);case"ii":return ue(i,e.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){var r=t.getUTCHours(),i=r/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(t,e,n){var r=t.getUTCHours(),i;switch(r===12?i=eh.noon:r===0?i=eh.midnight:i=r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(t,e,n){var r=t.getUTCHours(),i;switch(r>=17?i=eh.evening:r>=12?i=eh.afternoon:r>=4?i=eh.morning:i=eh.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){var r=t.getUTCHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Na.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):Na.H(t,e)},K:function(t,e,n){var r=t.getUTCHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):ue(r,e.length)},k:function(t,e,n){var r=t.getUTCHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):ue(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):Na.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):Na.s(t,e)},S:function(t,e){return Na.S(t,e)},X:function(t,e,n,r){var i=r._originalDate||t,o=i.getTimezoneOffset();if(o===0)return"Z";switch(e){case"X":return TD(o);case"XXXX":case"XX":return Ic(o);case"XXXXX":case"XXX":default:return Ic(o,":")}},x:function(t,e,n,r){var i=r._originalDate||t,o=i.getTimezoneOffset();switch(e){case"x":return TD(o);case"xxxx":case"xx":return Ic(o);case"xxxxx":case"xxx":default:return Ic(o,":")}},O:function(t,e,n,r){var i=r._originalDate||t,o=i.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+SD(o,":");case"OOOO":default:return"GMT"+Ic(o,":")}},z:function(t,e,n,r){var i=r._originalDate||t,o=i.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+SD(o,":");case"zzzz":default:return"GMT"+Ic(o,":")}},t:function(t,e,n,r){var i=r._originalDate||t,o=Math.floor(i.getTime()/1e3);return ue(o,e.length)},T:function(t,e,n,r){var i=r._originalDate||t,o=i.getTime();return ue(o,e.length)}};function SD(t,e){var n=t>0?"-":"+",r=Math.abs(t),i=Math.floor(r/60),o=r%60;if(o===0)return n+String(i);var s=e||"";return n+String(i)+s+ue(o,2)}function TD(t,e){if(t%60===0){var n=t>0?"-":"+";return n+ue(Math.abs(t)/60,2)}return Ic(t,e)}function Ic(t,e){var n=e||"",r=t>0?"-":"+",i=Math.abs(t),o=ue(Math.floor(i/60),2),s=ue(i%60,2);return r+o+n+s}const Vgt=Ugt;var ED=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},Xz=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},Hgt=function(t,e){var n=t.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return ED(t,e);var o;switch(r){case"P":o=e.dateTime({width:"short"});break;case"PP":o=e.dateTime({width:"medium"});break;case"PPP":o=e.dateTime({width:"long"});break;case"PPPP":default:o=e.dateTime({width:"full"});break}return o.replace("{{date}}",ED(r,e)).replace("{{time}}",Xz(i,e))},Wgt={p:Xz,P:Hgt};const rO=Wgt;var Ygt=["D","DD"],Zgt=["YY","YYYY"];function Qz(t){return Ygt.indexOf(t)!==-1}function Jz(t){return Zgt.indexOf(t)!==-1}function Q0(t,e,n){if(t==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) 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(t==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) 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 Ggt={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"}},qgt=function(t,e,n){var r,i=Ggt[t];return typeof i=="string"?r=i:e===1?r=i.one:r=i.other.replace("{{count}}",e.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};const Kgt=qgt;function m2(t){return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=e.width?String(e.width):t.defaultWidth,r=t.formats[n]||t.formats[t.defaultWidth];return r}}var Xgt={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Qgt={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Jgt={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},tvt={date:m2({formats:Xgt,defaultWidth:"full"}),time:m2({formats:Qgt,defaultWidth:"full"}),dateTime:m2({formats:Jgt,defaultWidth:"full"})};const evt=tvt;var nvt={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},rvt=function(t,e,n,r){return nvt[t]};const ivt=rvt;function op(t){return function(e,n){var r=n!=null&&n.context?String(n.context):"standalone",i;if(r==="formatting"&&t.formattingValues){var o=t.defaultFormattingWidth||t.defaultWidth,s=n!=null&&n.width?String(n.width):o;i=t.formattingValues[s]||t.formattingValues[o]}else{var l=t.defaultWidth,c=n!=null&&n.width?String(n.width):t.defaultWidth;i=t.values[c]||t.values[l]}var h=t.argumentCallback?t.argumentCallback(e):e;return i[h]}}var ovt={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},svt={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},avt={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"]},lvt={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"]},cvt={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"}},uvt={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"}},hvt=function(t,e){var n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},dvt={ordinalNumber:hvt,era:op({values:ovt,defaultWidth:"wide"}),quarter:op({values:svt,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:op({values:avt,defaultWidth:"wide"}),day:op({values:lvt,defaultWidth:"wide"}),dayPeriod:op({values:cvt,defaultWidth:"wide",formattingValues:uvt,defaultFormattingWidth:"wide"})};const fvt=dvt;function sp(t){return function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.width,i=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],o=e.match(i);if(!o)return null;var s=o[0],l=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],c=Array.isArray(l)?mvt(l,function(p){return p.test(s)}):pvt(l,function(p){return p.test(s)}),h;h=t.valueCallback?t.valueCallback(c):c,h=n.valueCallback?n.valueCallback(h):h;var d=e.slice(s.length);return{value:h,rest:d}}}function pvt(t,e){for(var n in t)if(t.hasOwnProperty(n)&&e(t[n]))return n}function mvt(t,e){for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:{},r=e.match(t.matchPattern);if(!r)return null;var i=r[0],o=e.match(t.parsePattern);if(!o)return null;var s=t.valueCallback?t.valueCallback(o[0]):o[0];s=n.valueCallback?n.valueCallback(s):s;var l=e.slice(i.length);return{value:s,rest:l}}}var vvt=/^(\d+)(th|st|nd|rd)?/i,yvt=/\d+/i,_vt={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},bvt={any:[/^b/i,/^(a|c)/i]},xvt={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},wvt={any:[/1/i,/2/i,/3/i,/4/i]},Svt={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},Tvt={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]},Evt={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},Ovt={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]},Cvt={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},kvt={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}},Pvt={ordinalNumber:gvt({matchPattern:vvt,parsePattern:yvt,valueCallback:function(t){return parseInt(t,10)}}),era:sp({matchPatterns:_vt,defaultMatchWidth:"wide",parsePatterns:bvt,defaultParseWidth:"any"}),quarter:sp({matchPatterns:xvt,defaultMatchWidth:"wide",parsePatterns:wvt,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:sp({matchPatterns:Svt,defaultMatchWidth:"wide",parsePatterns:Tvt,defaultParseWidth:"any"}),day:sp({matchPatterns:Evt,defaultMatchWidth:"wide",parsePatterns:Ovt,defaultParseWidth:"any"}),dayPeriod:sp({matchPatterns:Cvt,defaultMatchWidth:"any",parsePatterns:kvt,defaultParseWidth:"any"})};const Lvt=Pvt;var Mvt={code:"en-US",formatDistance:Kgt,formatLong:evt,formatRelative:ivt,localize:fvt,match:Lvt,options:{weekStartsOn:0,firstWeekContainsDate:1}};const FP=Mvt;var Avt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Rvt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,jvt=/^'([^]*?)'?$/,Nvt=/''/g,Dvt=/[a-zA-Z]/;function xd(t,e,n){var r,i,o,s,l,c,h,d,p,m,v,y,_,T,x,w,E,O;Pt(2,arguments);var k=String(e),P=Ma(),A=(r=(i=n==null?void 0:n.locale)!==null&&i!==void 0?i:P.locale)!==null&&r!==void 0?r:FP,j=te((o=(s=(l=(c=n==null?void 0:n.firstWeekContainsDate)!==null&&c!==void 0?c:n==null||(h=n.locale)===null||h===void 0||(d=h.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&l!==void 0?l:P.firstWeekContainsDate)!==null&&s!==void 0?s:(p=P.locale)===null||p===void 0||(m=p.options)===null||m===void 0?void 0:m.firstWeekContainsDate)!==null&&o!==void 0?o:1);if(!(j>=1&&j<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var B=te((v=(y=(_=(T=n==null?void 0:n.weekStartsOn)!==null&&T!==void 0?T:n==null||(x=n.locale)===null||x===void 0||(w=x.options)===null||w===void 0?void 0:w.weekStartsOn)!==null&&_!==void 0?_:P.weekStartsOn)!==null&&y!==void 0?y:(E=P.locale)===null||E===void 0||(O=E.options)===null||O===void 0?void 0:O.weekStartsOn)!==null&&v!==void 0?v:0);if(!(B>=0&&B<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!A.localize)throw new RangeError("locale must contain localize property");if(!A.formatLong)throw new RangeError("locale must contain formatLong property");var N=Nt(t);if(!q0(N))throw new RangeError("Invalid time value");var V=yd(N),Y=Zz(N,V),nt={firstWeekContainsDate:j,weekStartsOn:B,locale:A,_originalDate:N},K=k.match(Rvt).map(function(J){var et=J[0];if(et==="p"||et==="P"){var ct=rO[et];return ct(J,A.formatLong)}return J}).join("").match(Avt).map(function(J){if(J==="''")return"'";var et=J[0];if(et==="'")return Ivt(J);var ct=Vgt[et];if(ct)return!(n!=null&&n.useAdditionalWeekYearTokens)&&Jz(J)&&Q0(J,e,String(t)),!(n!=null&&n.useAdditionalDayOfYearTokens)&&Qz(J)&&Q0(J,e,String(t)),ct(Y,J,A.localize,nt);if(et.match(Dvt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+et+"`");return J}).join("");return K}function Ivt(t){var e=t.match(jvt);return e?e[1].replace(Nvt,"'"):t}function BP(t,e){if(t==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}function Fvt(t){return BP({},t)}var OD=1440,Bvt=2520,g2=43200,$vt=86400;function zvt(t,e,n){var r,i;Pt(2,arguments);var o=Ma(),s=(r=(i=n==null?void 0:n.locale)!==null&&i!==void 0?i:o.locale)!==null&&r!==void 0?r:FP;if(!s.formatDistance)throw new RangeError("locale must contain formatDistance property");var l=d_(t,e);if(isNaN(l))throw new RangeError("Invalid time value");var c=BP(Fvt(n),{addSuffix:!!(n!=null&&n.addSuffix),comparison:l}),h,d;l>0?(h=Nt(e),d=Nt(t)):(h=Nt(t),d=Nt(e));var p=Lgt(d,h),m=(yd(d)-yd(h))/1e3,v=Math.round((p-m)/60),y;if(v<2)return n!=null&&n.includeSeconds?p<5?s.formatDistance("lessThanXSeconds",5,c):p<10?s.formatDistance("lessThanXSeconds",10,c):p<20?s.formatDistance("lessThanXSeconds",20,c):p<40?s.formatDistance("halfAMinute",0,c):p<60?s.formatDistance("lessThanXMinutes",1,c):s.formatDistance("xMinutes",1,c):v===0?s.formatDistance("lessThanXMinutes",1,c):s.formatDistance("xMinutes",v,c);if(v<45)return s.formatDistance("xMinutes",v,c);if(v<90)return s.formatDistance("aboutXHours",1,c);if(vr.getTime()}function io(t,e){Pt(2,arguments);var n=Nt(t),r=Nt(e);return n.getTime()t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[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,l;return{s:function(){n=n.call(t)},n:function(){var c=n.next();return o=c.done,c},e:function(c){s=!0,l=c},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(s)throw l}}}}function Ht(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function iO(t,e){return iO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},iO(t,e)}function xe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&iO(t,e)}function tb(t){return tb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},tb(t)}function qvt(){if(typeof Reflect>"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 Kvt(t,e){if(e&&(Vi(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ht(t)}function we(t){var e=qvt();return function(){var n=tb(t),r;if(e){var i=tb(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Kvt(this,r)}}function ve(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Xvt(t,e){if(Vi(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Vi(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function e7(t){var e=Xvt(t,"string");return Vi(e)==="symbol"?e:String(e)}function LD(t,e){for(var n=0;n0,r=n?e:1-e,i;if(r<=50)i=t||100;else{var o=r+50,s=Math.floor(o/100)*100,l=t>=o%100;i=t+s-(l?100:0)}return n?i:1-i}function s7(t){return t%400===0||t%4===0&&t%100!==0}var nyt=function(t){xe(n,t);var e=we(n);function n(){var r;ve(this,n);for(var i=arguments.length,o=new Array(i),s=0;s0}},{key:"set",value:function(r,i,o){var s=r.getUTCFullYear();if(o.isTwoDigitYear){var l=o7(o.year,s);return r.setUTCFullYear(l,0,1),r.setUTCHours(0,0,0,0),r}var c=!("era"in i)||i.era===1?o.year:1-o.year;return r.setUTCFullYear(c,0,1),r.setUTCHours(0,0,0,0),r}}]),n}(Oe),ryt=function(t){xe(n,t);var e=we(n);function n(){var r;ve(this,n);for(var i=arguments.length,o=new Array(i),s=0;s0}},{key:"set",value:function(r,i,o,s){var l=IP(r,s);if(o.isTwoDigitYear){var c=o7(o.year,l);return r.setUTCFullYear(c,0,s.firstWeekContainsDate),r.setUTCHours(0,0,0,0),wu(r,s)}var h=!("era"in i)||i.era===1?o.year:1-o.year;return r.setUTCFullYear(h,0,s.firstWeekContainsDate),r.setUTCHours(0,0,0,0),wu(r,s)}}]),n}(Oe),iyt=function(t){xe(n,t);var e=we(n);function n(){var r;ve(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&i<=4}},{key:"set",value:function(r,i,o){return r.setUTCMonth((o-1)*3,1),r.setUTCHours(0,0,0,0),r}}]),n}(Oe),ayt=function(t){xe(n,t);var e=we(n);function n(){var r;ve(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&i<=4}},{key:"set",value:function(r,i,o){return r.setUTCMonth((o-1)*3,1),r.setUTCHours(0,0,0,0),r}}]),n}(Oe),lyt=function(t){xe(n,t);var e=we(n);function n(){var r;ve(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&i<=11}},{key:"set",value:function(r,i,o){return r.setUTCMonth(o,1),r.setUTCHours(0,0,0,0),r}}]),n}(Oe),cyt=function(t){xe(n,t);var e=we(n);function n(){var r;ve(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&i<=11}},{key:"set",value:function(r,i,o){return r.setUTCMonth(o,1),r.setUTCHours(0,0,0,0),r}}]),n}(Oe);function uyt(t,e,n){Pt(2,arguments);var r=Nt(t),i=te(e),o=Kz(r,n)-i;return r.setUTCDate(r.getUTCDate()-o*7),r}var hyt=function(t){xe(n,t);var e=we(n);function n(){var r;ve(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&i<=53}},{key:"set",value:function(r,i,o,s){return wu(uyt(r,o,s),s)}}]),n}(Oe);function dyt(t,e){Pt(2,arguments);var n=Nt(t),r=te(e),i=qz(n)-r;return n.setUTCDate(n.getUTCDate()-i*7),n}var fyt=function(t){xe(n,t);var e=we(n);function n(){var r;ve(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&i<=53}},{key:"set",value:function(r,i,o){return bd(dyt(r,o))}}]),n}(Oe),pyt=[31,28,31,30,31,30,31,31,30,31,30,31],myt=[31,29,31,30,31,30,31,31,30,31,30,31],gyt=function(t){xe(n,t);var e=we(n);function n(){var r;ve(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&i<=myt[l]:i>=1&&i<=pyt[l]}},{key:"set",value:function(r,i,o){return r.setUTCDate(o),r.setUTCHours(0,0,0,0),r}}]),n}(Oe),vyt=function(t){xe(n,t);var e=we(n);function n(){var r;ve(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&i<=366:i>=1&&i<=365}},{key:"set",value:function(r,i,o){return r.setUTCMonth(0,o),r.setUTCHours(0,0,0,0),r}}]),n}(Oe);function zP(t,e,n){var r,i,o,s,l,c,h,d;Pt(2,arguments);var p=Ma(),m=te((r=(i=(o=(s=n==null?void 0:n.weekStartsOn)!==null&&s!==void 0?s:n==null||(l=n.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&o!==void 0?o:p.weekStartsOn)!==null&&i!==void 0?i:(h=p.locale)===null||h===void 0||(d=h.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&r!==void 0?r:0);if(!(m>=0&&m<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var v=Nt(t),y=te(e),_=v.getUTCDay(),T=y%7,x=(T+7)%7,w=(x=0&&i<=6}},{key:"set",value:function(r,i,o,s){return r=zP(r,o,s),r.setUTCHours(0,0,0,0),r}}]),n}(Oe),_yt=function(t){xe(n,t);var e=we(n);function n(){var r;ve(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&i<=6}},{key:"set",value:function(r,i,o,s){return r=zP(r,o,s),r.setUTCHours(0,0,0,0),r}}]),n}(Oe),byt=function(t){xe(n,t);var e=we(n);function n(){var r;ve(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&i<=6}},{key:"set",value:function(r,i,o,s){return r=zP(r,o,s),r.setUTCHours(0,0,0,0),r}}]),n}(Oe);function xyt(t,e){Pt(2,arguments);var n=te(e);n%7===0&&(n=n-7);var r=1,i=Nt(t),o=i.getUTCDay(),s=n%7,l=(s+7)%7,c=(l=1&&i<=7}},{key:"set",value:function(r,i,o){return r=xyt(r,o),r.setUTCHours(0,0,0,0),r}}]),n}(Oe),Syt=function(t){xe(n,t);var e=we(n);function n(){var r;ve(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&i<=12}},{key:"set",value:function(r,i,o){var s=r.getUTCHours()>=12;return s&&o<12?r.setUTCHours(o+12,0,0,0):!s&&o===12?r.setUTCHours(0,0,0,0):r.setUTCHours(o,0,0,0),r}}]),n}(Oe),Cyt=function(t){xe(n,t);var e=we(n);function n(){var r;ve(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&i<=23}},{key:"set",value:function(r,i,o){return r.setUTCHours(o,0,0,0),r}}]),n}(Oe),kyt=function(t){xe(n,t);var e=we(n);function n(){var r;ve(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&i<=11}},{key:"set",value:function(r,i,o){var s=r.getUTCHours()>=12;return s&&o<12?r.setUTCHours(o+12,0,0,0):r.setUTCHours(o,0,0,0),r}}]),n}(Oe),Pyt=function(t){xe(n,t);var e=we(n);function n(){var r;ve(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&i<=24}},{key:"set",value:function(r,i,o){var s=o<=24?o%24:o;return r.setUTCHours(s,0,0,0),r}}]),n}(Oe),Lyt=function(t){xe(n,t);var e=we(n);function n(){var r;ve(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&i<=59}},{key:"set",value:function(r,i,o){return r.setUTCMinutes(o,0,0),r}}]),n}(Oe),Myt=function(t){xe(n,t);var e=we(n);function n(){var r;ve(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&i<=59}},{key:"set",value:function(r,i,o){return r.setUTCSeconds(o,0),r}}]),n}(Oe),Ayt=function(t){xe(n,t);var e=we(n);function n(){var r;ve(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&N<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var V=te((y=(_=(T=(x=r==null?void 0:r.weekStartsOn)!==null&&x!==void 0?x:r==null||(w=r.locale)===null||w===void 0||(E=w.options)===null||E===void 0?void 0:E.weekStartsOn)!==null&&T!==void 0?T:j.weekStartsOn)!==null&&_!==void 0?_:(O=j.locale)===null||O===void 0||(k=O.options)===null||k===void 0?void 0:k.weekStartsOn)!==null&&y!==void 0?y:0);if(!(V>=0&&V<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(A==="")return P===""?Nt(n):new Date(NaN);var Y={firstWeekContainsDate:N,weekStartsOn:V,locale:B},nt=[new tyt],K=A.match(Byt).map(function(M){var R=M[0];if(R in rO){var z=rO[R];return z(M,B.formatLong)}return M}).join("").match(Fyt),J=[],et=PD(K),ct;try{var G=function(){var M=ct.value;!(r!=null&&r.useAdditionalWeekYearTokens)&&Jz(M)&&Q0(M,A,t),!(r!=null&&r.useAdditionalDayOfYearTokens)&&Qz(M)&&Q0(M,A,t);var R=M[0],z=Iyt[R];if(z){var at=z.incompatibleTokens;if(Array.isArray(at)){var st=J.find(function(bt){return at.includes(bt.token)||bt.token===R});if(st)throw new RangeError("The format string mustn't contain `".concat(st.fullToken,"` and `").concat(M,"` at the same time"))}else if(z.incompatibleTokens==="*"&&J.length>0)throw new RangeError("The format string mustn't contain `".concat(M,"` and any other token at the same time"));J.push({token:R,fullToken:M});var ht=z.run(P,M,B.match,Y);if(!ht)return{v:new Date(NaN)};nt.push(ht.setter),P=ht.rest}else{if(R.match(Vyt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+R+"`");if(M==="''"?M="'":R==="'"&&(M=Hyt(M)),P.indexOf(M)===0)P=P.slice(M.length);else return{v:new Date(NaN)}}};for(et.s();!(ct=et.n()).done;){var $=G();if(Vi($)==="object")return $.v}}catch(M){et.e(M)}finally{et.f()}if(P.length>0&&Uyt.test(P))return new Date(NaN);var I=nt.map(function(M){return M.priority}).sort(function(M,R){return R-M}).filter(function(M,R,z){return z.indexOf(M)===R}).map(function(M){return nt.filter(function(R){return R.priority===M}).sort(function(R,z){return z.subPriority-R.subPriority})}).map(function(M){return M[0]}),H=Nt(n);if(isNaN(H.getTime()))return new Date(NaN);var it=Zz(H,yd(H)),W={},Q=PD(I),tt;try{for(Q.s();!(tt=Q.n()).done;){var rt=tt.value;if(!rt.validate(it,Y))return new Date(NaN);var mt=rt.set(it,W,Y);Array.isArray(mt)?(it=mt[0],BP(W,mt[1])):it=mt}}catch(M){Q.e(M)}finally{Q.f()}return it}function Hyt(t){return t.match($yt)[1].replace(zyt,"'")}function Wyt(t,e){Pt(2,arguments);var n=Nt(t),r=Nt(e);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function Yyt(t,e){Pt(2,arguments);var n=nO(t),r=nO(e);return n.getTime()===r.getTime()}function Zyt(t,e){Pt(2,arguments);var n=Nt(t),r=Nt(e);return n.getFullYear()===r.getFullYear()}function wd(t,e){Pt(2,arguments);var n=Nt(t).getTime(),r=Nt(e.start).getTime(),i=Nt(e.end).getTime();if(!(r<=i))throw new RangeError("Invalid interval");return n>=r&&n<=i}function UP(t,e){Pt(2,arguments);var n=te(e);return $u(t,-n)}function _a(t,e){var n;Pt(1,arguments);var r=te((n=e==null?void 0:e.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 t=="string"||Object.prototype.toString.call(t)==="[object String]"))return new Date(NaN);var i=Xyt(t),o;if(i.date){var s=Qyt(i.date,r);o=Jyt(s.restDateString,s.year)}if(!o||isNaN(o.getTime()))return new Date(NaN);var l=o.getTime(),c=0,h;if(i.time&&(c=t_t(i.time),isNaN(c)))return new Date(NaN);if(i.timezone){if(h=e_t(i.timezone),isNaN(h))return new Date(NaN)}else{var d=new Date(l+c),p=new Date(0);return p.setFullYear(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()),p.setHours(d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds()),p}return new Date(l+c+h)}var sy={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Gyt=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,qyt=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Kyt=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Xyt(t){var e={},n=t.split(sy.dateTimeDelimiter),r;if(n.length>2)return e;if(/:/.test(n[0])?r=n[0]:(e.date=n[0],r=n[1],sy.timeZoneDelimiter.test(e.date)&&(e.date=t.split(sy.timeZoneDelimiter)[0],r=t.substr(e.date.length,t.length))),r){var i=sy.timezone.exec(r);i?(e.time=r.replace(i[1],""),e.timezone=i[1]):e.time=r}return e}function Qyt(t,e){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),r=t.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:t.slice((r[1]||r[2]).length)}}function Jyt(t,e){if(e===null)return new Date(NaN);var n=t.match(Gyt);if(!n)return new Date(NaN);var r=!!n[4],i=ap(n[1]),o=ap(n[2])-1,s=ap(n[3]),l=ap(n[4]),c=ap(n[5])-1;if(r)return s_t(e,l,c)?n_t(e,l,c):new Date(NaN);var h=new Date(0);return!i_t(e,o,s)||!o_t(e,i)?new Date(NaN):(h.setUTCFullYear(e,o,Math.max(i,s)),h)}function ap(t){return t?parseInt(t):1}function t_t(t){var e=t.match(qyt);if(!e)return NaN;var n=_2(e[1]),r=_2(e[2]),i=_2(e[3]);return a_t(n,r,i)?n*k1+r*RP+i*1e3:NaN}function _2(t){return t&&parseFloat(t.replace(",","."))||0}function e_t(t){if(t==="Z")return 0;var e=t.match(Kyt);if(!e)return 0;var n=e[1]==="+"?-1:1,r=parseInt(e[2]),i=e[3]&&parseInt(e[3])||0;return l_t(r,i)?n*(r*k1+i*RP):NaN}function n_t(t,e,n){var r=new Date(0);r.setUTCFullYear(t,0,4);var i=r.getUTCDay()||7,o=(e-1)*7+n+1-i;return r.setUTCDate(r.getUTCDate()+o),r}var r_t=[31,null,31,30,31,30,31,31,30,31,30,31];function a7(t){return t%400===0||t%4===0&&t%100!==0}function i_t(t,e,n){return e>=0&&e<=11&&n>=1&&n<=(r_t[e]||(a7(t)?29:28))}function o_t(t,e){return e>=1&&e<=(a7(t)?366:365)}function s_t(t,e,n){return e>=1&&e<=53&&n>=0&&n<=6}function a_t(t,e,n){return t===24?e===0&&n===0:n>=0&&n<60&&e>=0&&e<60&&t>=0&&t<25}function l_t(t,e){return e>=0&&e<=59}function Zr(t,e){Pt(2,arguments);var n=Nt(t),r=te(e),i=n.getFullYear(),o=n.getDate(),s=new Date(0);s.setFullYear(i,r,15),s.setHours(0,0,0,0);var l=Hvt(s);return n.setMonth(r,Math.min(o,l)),n}function c_t(t,e){if(Pt(2,arguments),Vi(e)!=="object"||e===null)throw new RangeError("values parameter must be an object");var n=Nt(t);return isNaN(n.getTime())?new Date(NaN):(e.year!=null&&n.setFullYear(e.year),e.month!=null&&(n=Zr(n,e.month)),e.date!=null&&n.setDate(te(e.date)),e.hours!=null&&n.setHours(te(e.hours)),e.minutes!=null&&n.setMinutes(te(e.minutes)),e.seconds!=null&&n.setSeconds(te(e.seconds)),e.milliseconds!=null&&n.setMilliseconds(te(e.milliseconds)),n)}function sm(t,e){Pt(2,arguments);var n=Nt(t),r=te(e);return n.setHours(r),n}function am(t,e){Pt(2,arguments);var n=Nt(t),r=te(e);return n.setMinutes(r),n}function nh(t,e){Pt(2,arguments);var n=Nt(t),r=te(e),i=Math.floor(n.getMonth()/3)+1,o=r-i;return Zr(n,n.getMonth()+o*3)}function u_t(t,e){Pt(2,arguments);var n=Nt(t),r=te(e);return n.setSeconds(r),n}function Qs(t,e){Pt(2,arguments);var n=Nt(t),r=te(e);return isNaN(n.getTime())?new Date(NaN):(n.setFullYear(r),n)}function Sd(t,e){Pt(2,arguments);var n=te(e);return go(t,-n)}function h_t(t,e){Pt(2,arguments);var n=te(e);return Uz(t,-n)}function d_t(t,e){Pt(2,arguments);var n=te(e);return AP(t,-n)}function ug(t,e){Pt(2,arguments);var n=te(e);return _d(t,-n)}const l7="yyyy-MM-dd",VP="yyyy-MM-dd HH:mm",Ll=()=>new Date,HP=t=>typeof t!="string",WP=(t,e)=>!t||!HP(t)?t:e?xd(t,e):Uvt(t),Ml=t=>WP(t,void 0),Zc=t=>WP(t,l7),eb=t=>WP(t,VP),zo=t=>HP(t)?t:_a(t),Qg=(t,e,n)=>{try{return wd(zo(t),{start:zo(e??t),end:zo(n??t)})}catch{return!1}},Sc=(t,e)=>t7(t,e)||io(t,e),Jg="all",c7={today:"Today",yesterday:"Yesterday",last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",last180Days:"Last 180 days",last365Days:"Last 365 days",[Jg]:void 0},u7=Object.keys(c7),h7=t=>t===void 0||qi(kz(Boolean,t)),nb=t=>typeof t=="string"&&u7.includes(t),f_t=u7.filter(t=>t!==Jg),MD=t=>t?zo(t):null,d7=(t,e)=>({startDate:MD(t),endDate:MD(e)}),p_t=t=>{if(!(!t||h7(t)))return t.startDate&&!t.endDate?`Since ${Zc(t.startDate)}`:!t.startDate&&t.endDate?`Until ${Zc(t.endDate)}`:`${Zc(t.startDate)} - ${Zc(t.endDate)}`},f7=t=>{if(!(!t||t===Jg))return nb(t)?c7[t]:p_t(t)},eo=t=>Fi(UP(Ll(),t)),rh=t=>({startDate:t,endDate:xu(Ll())}),Tc=t=>e=>t===e,p7=PP([[Tc("today"),()=>rh(Fi(Ll()))],[Tc("yesterday"),()=>({startDate:eo(1),endDate:xu(UP(Ll(),1))})],[Tc("last7Days"),()=>rh(eo(7))],[Tc("last30Days"),()=>rh(eo(30))],[Tc("last90Days"),()=>rh(eo(90))],[Tc("last180Days"),()=>rh(eo(180))],[Tc("last365Days"),()=>rh(eo(365))],[yz,()=>({})]]),m_t=t=>{const e=zo(t);return PP([[()=>Sc(Fi(Ll()),e),()=>"today"],[()=>Sc(eo(1),e),()=>"yesterday"],[()=>Sc(eo(7),e),()=>"last7Days"],[()=>Sc(eo(30),e),()=>"last30Days"],[()=>Sc(eo(90),e),()=>"last90Days"],[()=>Sc(eo(180),e),()=>"last180Days"],[()=>Sc(eo(365),e),()=>"last365Days"],[yz,()=>Jg]])()},g_t=t=>nb(t)?p7(t):t,di=(t,e)=>sz(t,e,{serializeError:nmt}),tv=lr("shlink/visitCreation/createNewVisits",t=>({payload:{createdVisits:t}})),AD=5e3,RD=4,jD=2,v_t=({currentPage:t,pagesCount:e})=>t>=e,y_t=(t,e)=>e*100/t,ev=({typePrefix:t,createLoaders:e,getExtraFulfilledPayload:n,shouldCancel:r})=>{const i=lr(`${t}/progressChanged`),o=lr(`${t}/large`),s=lr(`${t}/fallbackToInterval`),l=di(t,async(c,{getState:h,dispatch:d})=>{var p;const[m,v]=e(c),y=async E=>Promise.all(E.map(async O=>m(O,AD).then(Se("data")))).then(Lmt),_=async(E,O=0)=>{if(r(h))return[];const k=await y(E[O]);return d(i(y_t(E.length,O+jD))),O{const{pagination:O,data:k}=await m(E,AD);if(!O||v_t(O))return k;const P=LP(jD,O.pagesCount+1),A=sg(RD,P);return O.pagesCount-1>RD&&d(o()),k.concat(await _(A))},[x,w]=await Promise.all([T(),v((p=c.query)==null?void 0:p.excludeBots)]);return!x.length&&w&&d(s(m_t(w.date))),{...n(c),visits:x}});return Object.assign(l,{progressChanged:i,large:o,fallbackToInterval:s})},nv=(t,e)=>async n=>t?e({page:1,itemsPerPage:1,excludeBots:n}).then(({data:r})=>r[0]):Promise.resolve(void 0),rv=({name:t,asyncThunkCreator:e,initialState:n,filterCreatedVisits:r})=>{const{pending:i,rejected:o,fulfilled:s,large:l,progressChanged:c,fallbackToInterval:h}=e,{reducer:d,actions:p}=Br({name:t,initialState:n,reducers:{cancelGetVisits:v=>({...v,cancelLoad:!0})},extraReducers:v=>{v.addCase(i,()=>({...n,loading:!0})),v.addCase(o,(y,{error:_})=>({...n,error:!0,errorData:La(_)})),v.addCase(s,(y,{payload:_})=>({...y,..._,loading:!1,loadingLarge:!1,error:!1})),v.addCase(l,y=>({...y,loadingLarge:!0})),v.addCase(c,(y,{payload:_})=>({...y,progress:_})),v.addCase(h,(y,{payload:_})=>({...y,fallbackInterval:_})),v.addCase(tv,(y,{payload:_})=>{const{visits:T}=y,x=r(y,_.createdVisits).map(({visit:w})=>w);return x.length?{...y,visits:[...x,...T]}:y})}}),{cancelGetVisits:m}=p;return{reducer:d,cancelGetVisits:m}},m7="shlink/domainVisits",g7="DEFAULT",__t={visits:[],domain:"",loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},b_t=t=>ev({typePrefix:`${m7}/getDomainVisits`,createLoaders:({domain:e,query:n={},doIntervalFallback:r=!1})=>{const{getDomainVisits:i}=t(),o=async(l,c)=>i(e,{...n,page:l,itemsPerPage:c}),s=nv(r,async l=>i(e,l));return[o,s]},getExtraFulfilledPayload:({domain:e,query:n={}})=>({domain:e,query:n}),shouldCancel:e=>e().domainVisits.cancelLoad}),x_t=t=>rv({name:m7,initialState:__t,asyncThunkCreator:t,filterCreatedVisits:({domain:e,query:n={}},r)=>{const{startDate:i,endDate:o}=n;return r.filter(({shortUrl:s,visit:l})=>s&&pgt(s,e)&&Qg(l.date,i,o))}}),f_=({className:t="",placement:e,children:n})=>{const r=Bl();return b.jsxs(b.Fragment,{children:[b.jsx("span",{className:t,ref:r,children:b.jsx(zt,{icon:Tk})}),b.jsx(fi,{target:r,placement:e,children:n})]})},P1=t=>cr(e=>e.preventDefault(),t),YP=(t,e,n=1)=>LP(n,t+1).map(e),ss=t=>!Fu(t)&&!qi(t),b2=t=>qi(t)?null:t,v7=t=>t?"true":"false",x2=t=>t===void 0?void 0:v7(t),w2=({isLast:t,...e})=>b.jsx(a_,{...e,required:!1,type:"url",placeholder:"No redirect",className:t?"mb-0":""}),w_t=({isOpen:t,toggle:e,domain:n,editDomainRedirects:r})=>{var i,o,s;const[l,c]=U.useState(((i=n.redirects)==null?void 0:i.baseUrlRedirect)??""),[h,d]=U.useState(((o=n.redirects)==null?void 0:o.regular404Redirect)??""),[p,m]=U.useState(((s=n.redirects)==null?void 0:s.invalidShortUrlRedirect)??""),v=P1(async()=>r({domain:n.domain,redirects:{baseUrlRedirect:b2(l),regular404Redirect:b2(h),invalidShortUrlRedirect:b2(p)}}).then(e));return b.jsx(Ca,{isOpen:t,toggle:e,centered:!0,children:b.jsxs("form",{name:"domainRedirectsModal",onSubmit:v,children:[b.jsxs(ka,{toggle:e,children:["Edit redirects for ",b.jsx("b",{children:n.domain})]}),b.jsxs(Ss,{children:[b.jsxs(w2,{value:l,onChange:c,children:[b.jsxs(f_,{className:"me-2",placement:"bottom",children:["Visitors accessing the base url, as in ",b.jsxs("b",{children:["https://",n.domain,"/"]}),", will be redirected to this URL."]}),"Base URL"]}),b.jsxs(w2,{value:h,onChange:d,children:[b.jsxs(f_,{className:"me-2",placement:"bottom",children:["Visitors accessing a url not matching a short URL pattern, as in ",b.jsxs("b",{children:["https://",n.domain,"/???/[...]"]}),", will be redirected to this URL."]}),"Regular 404"]}),b.jsxs(w2,{value:p,isLast:!0,onChange:m,children:[b.jsx(f_,{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"]})]}),b.jsxs(Nu,{children:[b.jsx(ke,{color:"link",type:"button",onClick:e,children:"Cancel"}),b.jsx(ke,{color:"primary",children:"Save"})]})]})})},S_t=({domain:t,editDomainRedirects:e})=>{const[n,r]=zn(),i=Xg("domainVisits"),o=Bu();return b.jsxs(b1,{children:[i&&b.jsxs(Zt,{tag:nn,to:`${o}/domain/${t.domain}${t.isDefault?`_${g7}`:""}/visits`,children:[b.jsx(zt,{icon:Sk,fixedWidth:!0})," Visit stats"]}),b.jsxs(Zt,{onClick:r,children:[b.jsx(zt,{fixedWidth:!0,icon:wk})," Edit redirects"]}),b.jsx(w_t,{domain:t,isOpen:n,toggle:r,editDomainRedirects:e})]})},la=({href:t,children:e,rel:n,...r})=>b.jsx("a",{target:"_blank",rel:`noopener noreferrer${n?` ${n}`:""}`,href:t,...r,children:e??t}),T_t=({status:t,matchMedia:e=window.matchMedia})=>{const n=Bl(),r=()=>e("(max-width: 991px)").matches,[i,o]=U.useState(r());return U.useEffect(()=>{const s=()=>o(r());return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]),t==="validating"?b.jsx(zt,{fixedWidth:!0,icon:W8,spin:!0}):b.jsxs(b.Fragment,{children:[b.jsx("span",{ref:n,children:t==="valid"?b.jsx(zt,{fixedWidth:!0,icon:Hm,className:"text-muted"}):b.jsx(zt,{fixedWidth:!0,icon:hT,className:"text-danger"})}),b.jsx(fi,{target:n,placement:i?"top-start":"left",autohide:t==="valid",children:t==="valid"?"Congratulations! This domain is properly configured.":b.jsxs("span",{children:["Oops! There is some missing configuration, and short URLs shared with this domain will not work.",b.jsx("br",{}),"Check the ",b.jsx(la,{href:"https://slnk.to/multi-domain-docs",children:"documentation"})," in order to find out what is missing."]})})]})},S2=({fallback:t})=>b.jsxs("span",{className:"text-muted",children:[!t&&b.jsx("small",{children:"No redirect"}),t&&b.jsxs(b.Fragment,{children:[t," ",b.jsx("small",{children:"(as fallback)"})]})]}),E_t=()=>b.jsxs(b.Fragment,{children:[b.jsx(zt,{fixedWidth:!0,icon:ret,className:"text-primary",id:"defaultDomainIcon"}),b.jsx(fi,{target:"defaultDomainIcon",placement:"right",children:"Default domain"})]}),O_t=({domain:t,editDomainRedirects:e,checkDomainHealth:n,defaultRedirects:r})=>{const{domain:i,isDefault:o,redirects:s,status:l}=t;return U.useEffect(()=>{n(t.domain)},[]),b.jsxs("tr",{className:"responsive-table__row",children:[b.jsx("td",{className:"responsive-table__cell","data-th":"Is default domain",children:o&&b.jsx(E_t,{})}),b.jsx("th",{className:"responsive-table__cell","data-th":"Domain",children:i}),b.jsx("td",{className:"responsive-table__cell","data-th":"Base path redirect",children:(s==null?void 0:s.baseUrlRedirect)??b.jsx(S2,{fallback:r==null?void 0:r.baseUrlRedirect})}),b.jsx("td",{className:"responsive-table__cell","data-th":"Regular 404 redirect",children:(s==null?void 0:s.regular404Redirect)??b.jsx(S2,{fallback:r==null?void 0:r.regular404Redirect})}),b.jsx("td",{className:"responsive-table__cell","data-th":"Invalid short URL redirect",children:(s==null?void 0:s.invalidShortUrlRedirect)??b.jsx(S2,{fallback:r==null?void 0:r.invalidShortUrlRedirect})}),b.jsx("td",{className:"responsive-table__cell text-lg-center","data-th":"Status",children:b.jsx(T_t,{status:l})}),b.jsx("td",{className:"responsive-table__cell text-end",children:b.jsx(S_t,{domain:t,editDomainRedirects:e})})]})},ND=["","Domain","Base path redirect","Regular 404 redirect","Invalid short URL redirect","",""],C_t=({listDomains:t,domainsList:e,filterDomains:n,editDomainRedirects:r,checkDomainHealth:i})=>{var o;const{filteredDomains:s,defaultRedirects:l,loading:c,error:h,errorData:d}=e,p=l??((o=s.find(({isDefault:m})=>m))==null?void 0:o.redirects);return U.useEffect(()=>{t()},[]),c?b.jsx(aa,{loading:!0}):b.jsxs(b.Fragment,{children:[b.jsx(Wg,{className:"mb-3",onChange:n}),(()=>h?b.jsx(Ii,{type:"error",children:b.jsx(ya,{errorData:d,fallbackMessage:"Error loading domains :("})}):b.jsx(Bn,{children:b.jsxs("table",{className:"table table-hover responsive-table mb-0",children:[b.jsx("thead",{className:"responsive-table__header",children:b.jsx("tr",{children:ND.map((m,v)=>b.jsx("th",{children:m},v))})}),b.jsxs("tbody",{children:[s.length<1&&b.jsx("tr",{children:b.jsx("td",{colSpan:ND.length,className:"text-center",children:"No results found"})}),s.map(m=>b.jsx(O_t,{domain:m,editDomainRedirects:r,checkDomainHealth:i,defaultRedirects:p},m.domain))]})]})}))()]})},k_t="shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS",P_t=t=>di(k_t,async({domain:e,redirects:n})=>{const r=await t().editDomainRedirects({domain:e,...n});return{domain:e,redirects:r}}),ay="shlink/domainsList",ly={domains:[],filteredDomains:[],loading:!1,error:!1},DD=({domain:t,redirects:e})=>n=>n.domain!==t?n:{...n,redirects:e},ID=(t,e)=>n=>n.domain!==t?n:{...n,status:e},L_t=(t,e)=>{const n=di(`${ay}/listDomains`,async()=>{const{data:s,defaultRedirects:l}=await t().listDomains();return{domains:s.map(c=>({...c,status:"validating"})),defaultRedirects:l}}),r=di(`${ay}/checkDomainHealth`,async s=>{try{const{status:l}=await t().health(s);return{domain:s,status:l==="pass"?"valid":"invalid"}}catch{return{domain:s,status:"invalid"}}}),i=lr(`${ay}/filterDomains`),{reducer:o}=Br({name:ay,initialState:ly,reducers:{},extraReducers:s=>{s.addCase(n.pending,()=>({...ly,loading:!0})),s.addCase(n.rejected,(l,{error:c})=>({...ly,error:!0,errorData:La(c)})),s.addCase(n.fulfilled,(l,{payload:c})=>({...ly,...c,filteredDomains:c.domains})),s.addCase(r.fulfilled,({domains:l,filteredDomains:c,...h},{payload:d})=>({...h,domains:l.map(ID(d.domain,d.status)),filteredDomains:c.map(ID(d.domain,d.status))})),s.addCase(i,(l,{payload:c})=>({...l,filteredDomains:l.domains.filter(({domain:h})=>h.toLowerCase().match(c.toLowerCase()))})),s.addCase(e.fulfilled,(l,{payload:c})=>({...l,domains:l.domains.map(DD(c)),filteredDomains:l.filteredDomains.map(DD(c))}))}});return{reducer:o,listDomains:n,checkDomainHealth:r,filterDomains:i}},M_t=(t,e)=>{t.serviceFactory("DomainSelector",()=>egt),t.decorator("DomainSelector",e(["domainsList"],["listDomains"])),t.serviceFactory("ManageDomains",()=>C_t),t.decorator("ManageDomains",e(["domainsList"],["listDomains","filterDomains","editDomainRedirects","checkDomainHealth"])),t.serviceFactory("domainsListReducerCreator",L_t,"apiClientFactory","editDomainRedirects"),t.serviceFactory("domainsListReducer",Se("reducer"),"domainsListReducerCreator"),t.serviceFactory("listDomains",Se("listDomains"),"domainsListReducerCreator"),t.serviceFactory("filterDomains",Se("filterDomains"),"domainsListReducerCreator"),t.serviceFactory("editDomainRedirects",P_t,"apiClientFactory"),t.serviceFactory("checkDomainHealth",Se("checkDomainHealth"),"domainsListReducerCreator")},FD="shlink/mercure",A_t={loading:!0,error:!1},R_t=t=>{const e=di(`${FD}/loadMercureInfo`,({realTimeUpdates:r})=>{if(r&&!r.enabled)throw new Error("Real time updates not enabled");return t().mercureInfo()}),{reducer:n}=Br({name:FD,initialState:A_t,reducers:{},extraReducers:r=>{r.addCase(e.pending,i=>({...i,loading:!0,error:!1})),r.addCase(e.rejected,i=>({...i,loading:!1,error:!0})),r.addCase(e.fulfilled,(i,{payload:o})=>({...o,loading:!1,error:!1}))}});return{loadMercureInfo:e,reducer:n}},j_t=t=>{t.serviceFactory("mercureInfoReducerCreator",R_t,"apiClientFactory"),t.serviceFactory("mercureInfoReducer",Se("reducer"),"mercureInfoReducerCreator"),t.serviceFactory("loadMercureInfo",Se("loadMercureInfo"),"mercureInfoReducerCreator")};var kh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function iv(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var oO={exports:{}};/** @license - * eventsource.js - * Available under MIT License (MIT) - * https://github.com/Yaffle/EventSource/ - */(function(t,e){(function(n){var r=n.setTimeout,i=n.clearTimeout,o=n.XMLHttpRequest,s=n.XDomainRequest,l=n.ActiveXObject,c=n.EventSource,h=n.document,d=n.Promise,p=n.fetch,m=n.Response,v=n.TextDecoder,y=n.TextEncoder,_=n.AbortController;if(typeof window<"u"&&typeof h<"u"&&!("readyState"in h)&&h.body==null&&(h.readyState="loading",window.addEventListener("load",function(ft){h.readyState="complete"},!1)),o==null&&l!=null&&(o=function(){return new l("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(ft){function vt(){}return vt.prototype=ft,new vt}),Date.now||(Date.now=function(){return new Date().getTime()}),_==null){var T=p;p=function(ft,vt){var _t=vt.signal;return T(ft,{headers:vt.headers,credentials:vt.credentials,cache:vt.cache}).then(function(Ct){var Mt=Ct.body.getReader();return _t._reader=Mt,_t._aborted&&_t._reader.cancel(),{status:Ct.status,statusText:Ct.statusText,headers:Ct.headers,body:{getReader:function(){return Mt}}}})},_=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function x(){this.bitsNeeded=0,this.codePoint=0}x.prototype.decode=function(ft){function vt(xt,yt,Et){if(Et===1)return xt>=128>>yt&&xt<=2048>>yt&&xt<=57344>>yt&&xt<=65536>>yt&&xt<>6>15?3:yt>31?2:1;if(xt===6*2)return yt>15?3:2;if(xt===6*3)return 3;throw new Error}for(var Ct=65533,Mt="",Lt=this.bitsNeeded,jt=this.codePoint,dt=0;dt191||!vt(jt<<6|pt&63,Lt-6,_t(Lt,jt)))&&(Lt=0,jt=Ct,Mt+=String.fromCharCode(jt)),Lt===0?(pt>=0&&pt<=127?(Lt=0,jt=pt):pt>=192&&pt<=223?(Lt=6*1,jt=pt&31):pt>=224&&pt<=239?(Lt=6*2,jt=pt&15):pt>=240&&pt<=247?(Lt=6*3,jt=pt&7):(Lt=0,jt=Ct),Lt!==0&&!vt(jt,Lt,_t(Lt,jt))&&(Lt=0,jt=Ct)):(Lt-=6,jt=jt<<6|pt&63),Lt===0&&(jt<=65535?Mt+=String.fromCharCode(jt):(Mt+=String.fromCharCode(55296+(jt-65535-1>>10)),Mt+=String.fromCharCode(56320+(jt-65535-1&1023))))}return this.bitsNeeded=Lt,this.codePoint=jt,Mt};var w=function(){try{return new v().decode(new y().encode("test"),{stream:!0})==="test"}catch(ft){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+ft)}return!1};(v==null||y==null||!w())&&(v=x);var E=function(){};function O(ft){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=E,this.onload=E,this.onerror=E,this.onreadystatechange=E,this._contentType="",this._xhr=ft,this._sendTimeout=0,this._abort=E}O.prototype.open=function(ft,vt){this._abort(!0);var _t=this,Ct=this._xhr,Mt=1,Lt=0;this._abort=function(Et){_t._sendTimeout!==0&&(i(_t._sendTimeout),_t._sendTimeout=0),(Mt===1||Mt===2||Mt===3)&&(Mt=4,Ct.onload=E,Ct.onerror=E,Ct.onabort=E,Ct.onprogress=E,Ct.onreadystatechange=E,Ct.abort(),Lt!==0&&(i(Lt),Lt=0),Et||(_t.readyState=4,_t.onabort(null),_t.onreadystatechange())),Mt=0};var jt=function(){if(Mt===1){var Et=0,At="",Bt=void 0;if("contentType"in Ct)Et=200,At="OK",Bt=Ct.contentType;else try{Et=Ct.status,At=Ct.statusText,Bt=Ct.getResponseHeader("Content-Type")}catch{Et=0,At="",Bt=void 0}Et!==0&&(Mt=2,_t.readyState=2,_t.status=Et,_t.statusText=At,_t._contentType=Bt,_t.onreadystatechange())}},dt=function(){if(jt(),Mt===2||Mt===3){Mt=3;var Et="";try{Et=Ct.responseText}catch{}_t.readyState=3,_t.responseText=Et,_t.onprogress()}},pt=function(Et,At){if((At==null||At.preventDefault==null)&&(At={preventDefault:E}),dt(),Mt===1||Mt===2||Mt===3){if(Mt=4,Lt!==0&&(i(Lt),Lt=0),_t.readyState=4,Et==="load")_t.onload(At);else if(Et==="error")_t.onerror(At);else if(Et==="abort")_t.onabort(At);else throw new TypeError;_t.onreadystatechange()}},xt=function(Et){Ct!=null&&(Ct.readyState===4?(!("onload"in Ct)||!("onerror"in Ct)||!("onabort"in Ct))&&pt(Ct.responseText===""?"error":"load",Et):Ct.readyState===3?"onprogress"in Ct||dt():Ct.readyState===2&&jt())},yt=function(){Lt=r(function(){yt()},500),Ct.readyState===3&&dt()};"onload"in Ct&&(Ct.onload=function(Et){pt("load",Et)}),"onerror"in Ct&&(Ct.onerror=function(Et){pt("error",Et)}),"onabort"in Ct&&(Ct.onabort=function(Et){pt("abort",Et)}),"onprogress"in Ct&&(Ct.onprogress=dt),"onreadystatechange"in Ct&&(Ct.onreadystatechange=function(Et){xt(Et)}),("contentType"in Ct||!("ontimeout"in o.prototype))&&(vt+=(vt.indexOf("?")===-1?"?":"&")+"padding=true"),Ct.open(ft,vt,!0),"readyState"in Ct&&(Lt=r(function(){yt()},0))},O.prototype.abort=function(){this._abort(!1)},O.prototype.getResponseHeader=function(ft){return this._contentType},O.prototype.setRequestHeader=function(ft,vt){var _t=this._xhr;"setRequestHeader"in _t&&_t.setRequestHeader(ft,vt)},O.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},O.prototype.send=function(){if((!("ontimeout"in o.prototype)||!("sendAsBinary"in o.prototype)&&!("mozAnon"in o.prototype))&&h!=null&&h.readyState!=null&&h.readyState!=="complete"){var ft=this;ft._sendTimeout=r(function(){ft._sendTimeout=0,ft.send()},4);return}var vt=this._xhr;"withCredentials"in vt&&(vt.withCredentials=this.withCredentials);try{vt.send(void 0)}catch(_t){throw _t}};function k(ft){return ft.replace(/[A-Z]/g,function(vt){return String.fromCharCode(vt.charCodeAt(0)+32)})}function P(ft){for(var vt=Object.create(null),_t=ft.split(`\r -`),Ct=0;Ct<_t.length;Ct+=1){var Mt=_t[Ct],Lt=Mt.split(": "),jt=Lt.shift(),dt=Lt.join(": ");vt[k(jt)]=dt}this._map=vt}P.prototype.get=function(ft){return this._map[k(ft)]},o!=null&&o.HEADERS_RECEIVED==null&&(o.HEADERS_RECEIVED=2);function A(){}A.prototype.open=function(ft,vt,_t,Ct,Mt,Lt,jt){ft.open("GET",Mt);var dt=0;ft.onprogress=function(){var xt=ft.responseText,yt=xt.slice(dt);dt+=yt.length,_t(yt)},ft.onerror=function(xt){xt.preventDefault(),Ct(new Error("NetworkError"))},ft.onload=function(){Ct(null)},ft.onabort=function(){Ct(null)},ft.onreadystatechange=function(){if(ft.readyState===o.HEADERS_RECEIVED){var xt=ft.status,yt=ft.statusText,Et=ft.getResponseHeader("Content-Type"),At=ft.getAllResponseHeaders();vt(xt,yt,Et,new P(At))}},ft.withCredentials=Lt;for(var pt in jt)Object.prototype.hasOwnProperty.call(jt,pt)&&ft.setRequestHeader(pt,jt[pt]);return ft.send(),ft};function j(ft){this._headers=ft}j.prototype.get=function(ft){return this._headers.get(ft)};function B(){}B.prototype.open=function(ft,vt,_t,Ct,Mt,Lt,jt){var dt=null,pt=new _,xt=pt.signal,yt=new v;return p(Mt,{headers:jt,credentials:Lt?"include":"same-origin",signal:xt,cache:"no-store"}).then(function(Et){return dt=Et.body.getReader(),vt(Et.status,Et.statusText,Et.headers.get("Content-Type"),new j(Et.headers)),new d(function(At,Bt){var ie=function(){dt.read().then(function(ae){if(ae.done)At(void 0);else{var ee=yt.decode(ae.value,{stream:!0});_t(ee),ie()}}).catch(function(ae){Bt(ae)})};ie()})}).catch(function(Et){if(Et.name!=="AbortError")return Et}).then(function(Et){Ct(Et)}),{abort:function(){dt!=null&&dt.cancel(),pt.abort()}}};function N(){this._listeners=Object.create(null)}function V(ft){r(function(){throw ft},0)}N.prototype.dispatchEvent=function(ft){ft.target=this;var vt=this._listeners[ft.type];if(vt!=null)for(var _t=vt.length,Ct=0;Ct<_t;Ct+=1){var Mt=vt[Ct];try{typeof Mt.handleEvent=="function"?Mt.handleEvent(ft):Mt.call(this,ft)}catch(Lt){V(Lt)}}},N.prototype.addEventListener=function(ft,vt){ft=String(ft);var _t=this._listeners,Ct=_t[ft];Ct==null&&(Ct=[],_t[ft]=Ct);for(var Mt=!1,Lt=0;Lt"u"?typeof window<"u"?window:typeof self<"u"?self:kh:globalThis)})(oO,oO.exports);var N_t=oO.exports;const D_t=(t,e,n,r)=>{const{mercureHubUrl:i,token:o,loading:s,error:l}=t;if(s||l||!i)return;const c=({data:p})=>n(JSON.parse(p)),h=({status:p})=>p===401&&r(),d=e.map(p=>{const m=new URL(i);m.searchParams.append("topic",p);const v=new N_t.EventSourcePolyfill(m,{headers:{Authorization:`Bearer ${o}`}});return v.onmessage=c,v.onerror=h,v});return()=>d.forEach(p=>p.close())};function zl(t,e){const n=new Set;return r=>{const{createNewVisits:i,loadMercureInfo:o,mercureInfo:s}=r,{interval:l}=s,c=ju();return U.useEffect(()=>{const h=v=>l?n.add(v):i([v]),d=e(r,c),p=D_t(s,d,h,o);if(!l)return p;const m=setInterval(()=>{i([...n]),n.clear()},l*1e3*60);return cr(()=>clearInterval(m),()=>p==null?void 0:p())},[s]),b.jsx(t,{...r})}}class co{}Qt(co,"visits","https://shlink.io/new-visit"),Qt(co,"orphanVisits","https://shlink.io/new-orphan-visit"),Qt(co,"shortUrlVisits",t=>`https://shlink.io/new-visit/${t}`);const ZP="shlink/shortUrlDeletion",BD={shortCode:"",loading:!1,deleted:!1,error:!1},I_t=t=>di(`${ZP}/deleteShortUrl`,async({shortCode:e,domain:n})=>(await t().deleteShortUrl(e,n),{shortCode:e,domain:n})),y7=lr(`${ZP}/shortUrlDeleted`),F_t=t=>{const{actions:e,reducer:n}=Br({name:ZP,initialState:BD,reducers:{resetDeleteShortUrl:()=>BD},extraReducers:i=>{i.addCase(t.pending,o=>({...o,loading:!0,error:!1,deleted:!1})),i.addCase(t.rejected,(o,{error:s})=>({...o,errorData:La(s),loading:!1,error:!0,deleted:!1})),i.addCase(t.fulfilled,(o,{payload:s})=>({...o,shortCode:s.shortCode,loading:!1,error:!1,deleted:!0}))}}),{resetDeleteShortUrl:r}=e;return{reducer:n,resetDeleteShortUrl:r}},_7="shlink/shortUrlsList",b7=5,B_t={loading:!0,error:!1},$_t=t=>di(`${_7}/listShortUrls`,e=>t().listShortUrls(e??{})),z_t=(t,e,n)=>Br({name:_7,initialState:B_t,reducers:{},extraReducers:r=>{r.addCase(t.pending,i=>({...i,loading:!0,error:!1})),r.addCase(t.rejected,()=>({loading:!1,error:!0})),r.addCase(t.fulfilled,(i,{payload:o})=>({loading:!1,error:!1,shortUrls:o})),r.addCase(n.fulfilled,cr((i,{payload:o})=>i.shortUrls?th(["shortUrls","data"],[o,...i.shortUrls.data.slice(0,b7-1)],i):i,i=>i.shortUrls?th(["shortUrls","pagination","totalItems"],i.shortUrls.pagination.totalItems+1,i):i)),r.addCase(e.fulfilled,(i,{payload:o})=>i.shortUrls?th(["shortUrls","data"],i.shortUrls.data.map(s=>{const{shortCode:l,domain:c}=o;return om(s,l,c)?o:s}),i):i),r.addCase(y7,cr((i,{payload:o})=>i.shortUrls?th(["shortUrls","data"],kP(s=>om(s,o.shortCode,o.domain),i.shortUrls.data),i):i,i=>i.shortUrls?th(["shortUrls","pagination","totalItems"],i.shortUrls.pagination.totalItems-1,i):i)),r.addCase(tv,(i,{payload:o})=>{var s,l;return th(["shortUrls","data"],(l=(s=i.shortUrls)==null?void 0:s.data)==null?void 0:l.map(c=>{var h;return((h=Omt(o.createdVisits.filter(({shortUrl:d})=>d&&om(c,d.shortCode,d.domain))))==null?void 0:h.shortUrl)??c}),i)})}}),$D=10,{ceil:U_t}=Math,V_t=new Intl.NumberFormat("en-US"),Qn=t=>V_t.format(Number(t)),H_t=t=>U_t(t/$D)*$D,W_t={field:"dateCreated",dir:"DESC"},x7={realTimeUpdates:{enabled:!0},shortUrlCreation:{validateUrls:!1},ui:{theme:"light"},visits:{defaultInterval:"last30Days"},shortUrlsList:{defaultOrdering:W_t}},w7=U.createContext(x7),Y_t=w7.Provider,GP=()=>U.useContext(w7)??x7,zu=t=>GP()[t],Z_t=t=>({tag:nn,to:t}),sO=({children:t,title:e,link:n,tooltip:r})=>{const i=Bl();return b.jsxs(b.Fragment,{children:[b.jsxs(zi,{innerRef:i,className:"highlight-card",body:!0,...Z_t(n),children:[b.jsx(zt,{size:"3x",className:"highlight-card__link-icon",icon:Uft}),b.jsx(u$,{tag:"h5",className:"highlight-card__title",children:e}),b.jsx(c$,{tag:"h2",children:t})]}),r&&b.jsx(fi,{target:i,placement:"bottom",children:r})]})},zD=({loading:t,excludeBots:e,visitsSummary:n,...r})=>b.jsx(sO,{tooltip:n.bots!==void 0?b.jsxs(b.Fragment,{children:[e?"Plus":"Including"," ",b.jsx("strong",{children:Qn(n.bots)})," potential bot visits"]}):void 0,...r,children:t?"Loading...":Qn(e&&n.nonBots?n.nonBots:n.total)}),G_t=(t,e)=>zl(({shortUrlsList:n,listShortUrls:r,listTags:i,tagsList:o,loadVisitsOverview:s,visitsOverview:l})=>{const{loading:c,shortUrls:h}=n,{loading:d}=o,{loading:p,nonOrphanVisits:m,orphanVisits:v}=l,y=Bu(),_=ws(),T=zu("visits");return U.useEffect(()=>{r({itemsPerPage:b7,orderBy:{field:"dateCreated",dir:"DESC"}}),i(),s()},[]),b.jsxs(b.Fragment,{children:[b.jsxs(qr,{children:[b.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:b.jsx(zD,{title:"Visits",link:`${y}/non-orphan-visits`,excludeBots:(T==null?void 0:T.excludeBots)??!1,loading:p,visitsSummary:m})}),b.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:b.jsx(zD,{title:"Orphan visits",link:`${y}/orphan-visits`,excludeBots:(T==null?void 0:T.excludeBots)??!1,loading:p,visitsSummary:v})}),b.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:b.jsx(sO,{title:"Short URLs",link:`${y}/list-short-urls/1`,children:c?"Loading...":Qn((h==null?void 0:h.pagination.totalItems)??0)})}),b.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:b.jsx(sO,{title:"Tags",link:`${y}/manage-tags`,children:d?"Loading...":Qn(o.tags.length)})})]}),b.jsxs(zi,{className:"mb-3",children:[b.jsxs(hd,{children:[b.jsx("span",{className:"d-sm-none",children:"Create a short URL"}),b.jsx("h5",{className:"d-none d-sm-inline",children:"Create a short URL"}),b.jsx(nn,{className:"float-end",to:`${y}/create-short-url`,children:"Advanced options »"})]}),b.jsx(ud,{children:b.jsx(e,{basicMode:!0})})]}),b.jsxs(zi,{children:[b.jsxs(hd,{children:[b.jsx("span",{className:"d-sm-none",children:"Recently created URLs"}),b.jsx("h5",{className:"d-none d-sm-inline",children:"Recently created URLs"}),b.jsx(nn,{className:"float-end",to:`${y}/list-short-urls/1`,children:"See all »"})]}),b.jsx(ud,{children:b.jsx(t,{shortUrlsList:n,className:"mb-0",onTagClick:x=>_(`${y}/list-short-urls/1?tags=${encodeURIComponent(x)}`)})})]})]})},()=>[co.visits,co.orphanVisits]);function q_t(t,e){t.serviceFactory("Overview",G_t,"ShortUrlsTable","CreateShortUrl"),t.decorator("Overview",e(["shortUrlsList","tagsList","mercureInfo","visitsOverview"],["listShortUrls","listTags","createNewVisits","loadMercureInfo","loadVisitsOverview"]))}const K_t=t=>({longUrl:"",tags:[],customSlug:"",title:void 0,shortCodeLength:void 0,domain:"",validSince:void 0,validUntil:void 0,maxVisits:void 0,findIfExists:!1,validateUrl:(t==null?void 0:t.validateUrls)??!1,forwardQuery:(t==null?void 0:t.forwardQuery)??!0}),X_t=(t,e)=>({createShortUrl:n,shortUrlCreation:r,resetCreateShortUrl:i,basicMode:o=!1})=>{const s=zu("shortUrlCreation"),l=U.useMemo(()=>K_t(s),[s]);return b.jsxs(b.Fragment,{children:[b.jsx(t,{initialState:l,saving:r.saving,mode:o?"create-basic":"create",onSave:async c=>(i(),n(c))}),b.jsx(e,{creation:r,resetCreateShortUrl:i,canBeClosed:o})]})},Q_t="Left",J_t="Right",t0t="Up",e0t="Down",Ph={delta:10,preventScrollOnSwipe:!1,rotationAngle:0,trackMouse:!1,trackTouch:!0,swipeDuration:1/0,touchEventOptions:{passive:!0}},aO={first:!0,initial:[0,0],start:0,swiping:!1,xy:[0,0]},UD="mousemove",VD="mouseup",n0t="touchend",r0t="touchmove",i0t="touchstart";function o0t(t,e,n,r){return t>e?n>0?J_t:Q_t:r>0?e0t:t0t}function HD(t,e){if(e===0)return t;const n=Math.PI/180*e,r=t[0]*Math.cos(n)+t[1]*Math.sin(n),i=t[1]*Math.cos(n)-t[0]*Math.sin(n);return[r,i]}function s0t(t,e){const n=h=>{const d="touches"in h;d&&h.touches.length>1||t((p,m)=>{m.trackMouse&&!d&&(document.addEventListener(UD,r),document.addEventListener(VD,s));const{clientX:v,clientY:y}=d?h.touches[0]:h,_=HD([v,y],m.rotationAngle);return m.onTouchStartOrOnMouseDown&&m.onTouchStartOrOnMouseDown({event:h}),Object.assign(Object.assign(Object.assign({},p),aO),{initial:_.slice(),xy:_,start:h.timeStamp||0})})},r=h=>{t((d,p)=>{const m="touches"in h;if(m&&h.touches.length>1)return d;if(h.timeStamp-d.start>p.swipeDuration)return d.swiping?Object.assign(Object.assign({},d),{swiping:!1}):d;const{clientX:v,clientY:y}=m?h.touches[0]:h,[_,T]=HD([v,y],p.rotationAngle),x=_-d.xy[0],w=T-d.xy[1],E=Math.abs(x),O=Math.abs(w),k=(h.timeStamp||0)-d.start,P=Math.sqrt(E*E+O*O)/(k||1),A=[x/(k||1),w/(k||1)],j=o0t(E,O,x,w),B=typeof p.delta=="number"?p.delta:p.delta[j.toLowerCase()]||Ph.delta;if(E{t((d,p)=>{let m;if(d.swiping&&d.eventData){if(h.timeStamp-d.start{document.removeEventListener(UD,r),document.removeEventListener(VD,s)},s=h=>{o(),i(h)},l=(h,d)=>{let p=()=>{};if(h&&h.addEventListener){const m=Object.assign(Object.assign({},Ph.touchEventOptions),d.touchEventOptions),v=[[i0t,n,m],[r0t,r,Object.assign(Object.assign({},m),d.preventScrollOnSwipe?{passive:!1}:{})],[n0t,i,m]];v.forEach(([y,_,T])=>h.addEventListener(y,_,T)),p=()=>v.forEach(([y,_])=>h.removeEventListener(y,_))}return p},c={ref:h=>{h!==null&&t((d,p)=>{if(d.el===h)return d;const m={};return d.el&&d.el!==h&&d.cleanUpTouch&&(d.cleanUpTouch(),m.cleanUpTouch=void 0),p.trackTouch&&h&&(m.cleanUpTouch=l(h,p)),Object.assign(Object.assign(Object.assign({},d),{el:h}),m)})}};return e.trackMouse&&(c.onMouseDown=n),[c,l]}function a0t(t,e,n,r){return!e.trackTouch||!t.el?(t.cleanUpTouch&&t.cleanUpTouch(),Object.assign(Object.assign({},t),{cleanUpTouch:void 0})):t.cleanUpTouch?e.preventScrollOnSwipe!==n.preventScrollOnSwipe||e.touchEventOptions.passive!==n.touchEventOptions.passive?(t.cleanUpTouch(),Object.assign(Object.assign({},t),{cleanUpTouch:r(t.el,e)})):t:Object.assign(Object.assign({},t),{cleanUpTouch:r(t.el,e)})}function l0t(t){const{trackMouse:e}=t,n=U.useRef(Object.assign({},aO)),r=U.useRef(Object.assign({},Ph)),i=U.useRef(Object.assign({},r.current));i.current=Object.assign({},r.current),r.current=Object.assign(Object.assign({},Ph),t);let o;for(o in Ph)r.current[o]===void 0&&(r.current[o]=Ph[o]);const[s,l]=U.useMemo(()=>s0t(c=>n.current=c(n.current,r.current),{trackMouse:e}),[e]);return n.current=a0t(n.current,r.current,i.current,l),s}const c0t=2e3,u0t=(t,e)=>(n=!1,r=c0t)=>{const[i,o]=U.useState(n),s=U.useRef(void 0);return[i,()=>{o(!n),s.current&&e(s.current),s.current=t(()=>o(n),r)}]},h0t=(t,e)=>{const n=r=>i=>{i.event.composedPath().some(({classList:o})=>o==null?void 0:o.contains("visits-table"))||document.querySelector(".modal")||r()};return l0t({delta:40,onSwipedLeft:n(e),onSwipedRight:n(t)})},d0t=(t,e)=>{const[n,r]=U.useState(e);return[n,i=>{const{location:o,history:s}=window,l=Du(o.search);l[t]=i,s.pushState(null,"",`${o.pathname}?${Gg(l)}`),r(i)}]},f0t=(t,e)=>{const n=U.useRef(!0);U.useEffect(()=>{!n.current&&t(),n.current=!1},e)},$d=()=>{const t=ws();return()=>t(-1)},p0t=t=>({shortUrlDetail:e,getShortUrlDetail:n,shortUrlEdition:r,editShortUrl:i})=>{const{search:o}=Un(),s=ju(),l=$d(),{loading:c,error:h,errorData:d,shortUrl:p}=e,{saving:m,saved:v,error:y,errorData:_}=r,{domain:T}=Du(o),x=zu("shortUrlCreation"),w=U.useMemo(()=>mgt(p,x),[p,x]);return U.useEffect(()=>{s.shortCode&&n({shortCode:h_(s.shortCode),domain:T})},[]),c?b.jsx(aa,{loading:!0}):h?b.jsx(Ii,{type:"error",children:b.jsx(ya,{errorData:d,fallbackMessage:"An error occurred while loading short URL detail :("})}):b.jsxs(b.Fragment,{children:[b.jsx("header",{className:"mb-3",children:b.jsx(zi,{body:!0,children:b.jsxs("h2",{className:"d-sm-flex justify-content-between align-items-center mb-0",children:[b.jsx(ke,{color:"link",size:"lg",className:"p-0 me-3",onClick:l,children:b.jsx(zt,{icon:q8})}),b.jsx("span",{className:"text-center",children:b.jsxs("small",{children:["Edit ",b.jsx(la,{href:(p==null?void 0:p.shortUrl)??""})]})}),b.jsx("span",{})]})})}),b.jsx(t,{initialState:w,saving:m,mode:"edit",onSave:async E=>{p&&i({...p,data:E})}}),v&&y&&b.jsx(Ii,{type:"error",className:"mt-3",children:b.jsx(ya,{errorData:_,fallbackMessage:"An error occurred while updating short URL :("})}),v&&!y&&b.jsx(Ii,{type:"success",className:"mt-3",children:"Short URL properly edited."})]})};var L1={},m0t=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=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 p=WD[e.format]||WD.default;window.clipboardData.setData(p,t)}else d.clipboardData.clearData(),d.clipboardData.setData(e.format,t);e.onCopy&&(d.preventDefault(),e.onCopy(d.clipboardData))}),document.body.appendChild(l),o.selectNodeContents(l),s.addRange(o);var h=document.execCommand("copy");if(!h)throw new Error("copy command was unsuccessful");c=!0}catch(d){n&&console.error("unable to copy using execCommand: ",d),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",t),e.onCopy&&e.onCopy(window.clipboardData),c=!0}catch(p){n&&console.error("unable to copy using clipboardData: ",p),n&&console.error("falling back to prompt"),r=y0t("message"in e?e.message:v0t),window.prompt(r,t)}}finally{s&&(typeof s.removeRange=="function"?s.removeRange(o):s.removeAllRanges()),l&&document.body.removeChild(l),i()}return c}var b0t=_0t;function lO(t){"@babel/helpers - typeof";return lO=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},lO(t)}Object.defineProperty(L1,"__esModule",{value:!0});L1.CopyToClipboard=void 0;var cy=S7(q),x0t=S7(b0t),w0t=["text","onCopy","options","children"];function S7(t){return t&&t.__esModule?t:{default:t}}function YD(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ZD(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function T0t(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}function E0t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function GD(t,e){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 rb(t){return rb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},rb(t)}function qP(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var E7=function(t){C0t(n,t);var e=k0t(n);function n(){var r;E0t(this,n);for(var i=arguments.length,o=new Array(i),s=0;s({creation:e,resetCreateShortUrl:n,canBeClosed:r=!1})=>{const[i,o]=t(),{error:s,saved:l}=e;if(U.useEffect(()=>{n()},[]),s)return b.jsxs(Ii,{type:"error",className:"mt-3",children:[r&&b.jsx(zt,{"data-testid":"error-close-button",icon:hT,className:"float-end pointer",onClick:n}),b.jsx(ya,{errorData:e.errorData,fallbackMessage:"An error occurred while creating the URL :("})]});if(!l)return null;const{shortUrl:c}=e.result;return b.jsxs(Ii,{type:"success",className:"mt-3",children:[r&&b.jsx(zt,{"data-testid":"success-close-button",icon:hT,className:"float-end pointer",onClick:n}),b.jsxs("span",{children:[b.jsx("b",{children:"Great!"})," The short URL is ",b.jsx("b",{children:c})]}),b.jsx(O7,{text:c,onCopy:o,children:b.jsxs("button",{className:"btn btn-light btn-sm create-short-url-result__copy-btn",id:"copyBtn",type:"button",children:[b.jsx(zt,{icon:az})," Copy"]})}),b.jsx(Vg,{placement:"left",isOpen:i,target:"copyBtn",children:"Copied!"})]})},T2="delete",j0t=({shortUrl:t,toggle:e,isOpen:n,shortUrlDeletion:r,resetDeleteShortUrl:i,deleteShortUrl:o,shortUrlDeleted:s})=>{const[l,c]=U.useState("");U.useEffect(()=>i,[]);const{loading:h,error:d,deleted:p,errorData:m}=r,v=cr(i,e),y=P1(()=>o(t).then(e));return b.jsx(Ca,{isOpen:n,toggle:v,centered:!0,onClosed:()=>p&&s(t),children:b.jsxs("form",{onSubmit:y,children:[b.jsx(ka,{toggle:v,children:b.jsx("span",{className:"text-danger",children:"Delete short URL"})}),b.jsxs(Ss,{children:[b.jsxs("p",{children:[b.jsx("b",{className:"text-danger",children:"Caution!"})," You are about to delete a short URL."]}),b.jsx("p",{children:"This action cannot be undone. Once you have deleted it, all the visits stats will be lost."}),b.jsxs("p",{children:["Write ",b.jsx("b",{children:T2})," to confirm deletion."]}),b.jsx("input",{type:"text",className:"form-control",placeholder:`Insert ${T2}`,value:l,onChange:_=>c(_.target.value)}),d&&b.jsx(Ii,{type:rgt(m)?"warning":"error",small:!0,className:"mt-2",children:b.jsx(ya,{errorData:m,fallbackMessage:"Something went wrong while deleting the URL :("})})]}),b.jsxs(Nu,{children:[b.jsx("button",{type:"button",className:"btn btn-link",onClick:v,children:"Cancel"}),b.jsx("button",{type:"submit",className:"btn btn-danger",disabled:l!==T2||h,children:h?"Deleting...":"Delete"})]})]})})},C7=({amount:t=0,loading:e=!1,...n})=>b.jsxs(ke,{...n,outline:!0,color:"primary",disabled:e,children:[b.jsx(zt,{icon:Qtt})," ",e?"Exporting...":b.jsxs(b.Fragment,{children:["Export (",Qn(t),")"]})]}),M1=()=>{const t=ws(),{search:e}=Un(),n=Bu(),r=U.useMemo(cr(()=>Du(e),({orderBy:o,tags:s,excludeBots:l,excludeMaxVisitsReached:c,excludePastValidUntil:h,...d})=>{const p=o?Rut(o):void 0,m=(s==null?void 0:s.split(","))??[];return{...d,orderBy:p,tags:m,excludeBots:l!==void 0?l==="true":void 0,excludeMaxVisitsReached:c!==void 0?c==="true":void 0,excludePastValidUntil:h!==void 0?h==="true":void 0}}),[e]),i=U.useCallback(o=>{const s={...r,...o},{orderBy:l,tags:c,excludeBots:h,excludeMaxVisitsReached:d,excludePastValidUntil:p,...m}=s,v={...m,orderBy:l&&P$(l),tags:c.length>0?c.join(","):void 0,excludeBots:x2(h),excludeMaxVisitsReached:x2(d),excludePastValidUntil:x2(p)},y=Gg(v),_=qi(y)?"":`?${y}`;t(`${n}/list-short-urls/1${_}`)},[r,t,n]);return[r,i]},qD=20,N0t=(t,{exportShortUrls:e})=>({amount:n=0})=>{const[{tags:r,search:i,startDate:o,endDate:s,orderBy:l,tagsMode:c}]=M1(),[h,,d,p]=zn(),m=U.useCallback(async()=>{const v=n/qD,y=async(T=1)=>{const{data:x}=await t().listShortUrls({page:`${T}`,tags:r,searchTerm:i,startDate:o,endDate:s,orderBy:l,tagsMode:c,itemsPerPage:qD});return T>=v?x:x.concat(await y(T+1))};d();const _=await y();e(_.map(T=>{var x;const{hostname:w,pathname:E}=new URL(T.shortUrl),O=E.substring(1);return{createdAt:T.dateCreated,domain:w,shortCode:O,shortUrl:T.shortUrl,longUrl:T.longUrl,title:T.title??"",tags:T.tags.join("|"),visits:((x=T==null?void 0:T.visitsSummary)==null?void 0:x.total)??T.visitsCount}})),p()},[]);return b.jsx(C7,{loading:h,className:"btn-md-block",amount:n,onClick:m})},k7=({text:t,onCopy:e})=>b.jsx(O7,{text:t,onCopy:e,children:b.jsx(zt,{icon:az,className:"ms-2 copy-to-clipboard-icon"})}),D0t=(t,{margin:e,...n})=>{const r=`${t}/qr-code`,i=Gg({...n,margin:e>0?e:void 0});return`${r}${qi(i)?"":`?${i}`}`},I0t=({errorCorrection:t,setErrorCorrection:e})=>b.jsxs(Pa,{text:`Error correction (${t})`,children:[b.jsxs(Zt,{active:t==="L",onClick:()=>e("L"),children:[b.jsx("b",{children:"L"}),"ow"]}),b.jsxs(Zt,{active:t==="M",onClick:()=>e("M"),children:[b.jsx("b",{children:"M"}),"edium"]}),b.jsxs(Zt,{active:t==="Q",onClick:()=>e("Q"),children:[b.jsx("b",{children:"Q"}),"uartile"]}),b.jsxs(Zt,{active:t==="H",onClick:()=>e("H"),children:[b.jsx("b",{children:"H"}),"igh"]})]}),F0t=({format:t,setFormat:e})=>b.jsxs(Pa,{text:`Format (${t})`,children:[b.jsx(Zt,{active:t==="png",onClick:()=>e("png"),children:"PNG"}),b.jsx(Zt,{active:t==="svg",onClick:()=>e("svg"),children:"SVG"})]}),B0t=t=>({shortUrl:{shortUrl:e,shortCode:n},toggle:r,isOpen:i})=>{const[o,s]=U.useState(300),[l,c]=U.useState(0),[h,d]=U.useState("png"),[p,m]=U.useState("L"),v=U.useMemo(()=>D0t(e,{size:o,format:h,margin:l,errorCorrection:p}),[e,o,h,l,p]),y=U.useMemo(()=>o+l,[o,l]),_=U.useMemo(()=>{if(!(y<500))return y<800?"lg":"xl"},[y]);return b.jsxs(Ca,{isOpen:i,toggle:r,centered:!0,size:_,children:[b.jsxs(ka,{toggle:r,children:["QR code for ",b.jsx(la,{href:e,children:e})]}),b.jsxs(Ss,{children:[b.jsxs(qr,{children:[b.jsxs(Ai,{className:"d-grid col-md-6",children:[b.jsxs("label",{children:["Size: ",o,"px"]}),b.jsx("input",{type:"range",className:"form-control-range",value:o,step:10,min:50,max:1e3,onChange:T=>s(Number(T.target.value))})]}),b.jsxs(Ai,{className:"d-grid col-md-6",children:[b.jsxs("label",{htmlFor:"marginControl",children:["Margin: ",l,"px"]}),b.jsx("input",{id:"marginControl",type:"range",className:"form-control-range",value:l,step:1,min:0,max:100,onChange:T=>c(Number(T.target.value))})]}),b.jsx(Ai,{className:"d-grid col-md-6",children:b.jsx(F0t,{format:h,setFormat:d})}),b.jsx(Ai,{className:"col-md-6",children:b.jsx(I0t,{errorCorrection:p,setErrorCorrection:m})})]}),b.jsxs("div",{className:"text-center",children:[b.jsxs("div",{className:"mb-3",children:[b.jsx(la,{href:v}),b.jsx(k7,{text:v})]}),b.jsx("img",{src:v,className:"qr-code-modal__img",alt:"QR code"}),b.jsx("div",{className:"mt-3",children:b.jsxs(ke,{block:!0,color:"primary",onClick:()=>{t.saveImage(v,`${n}-qr-code.${h}`).catch(()=>{})},children:["Download ",b.jsx(zt,{icon:K8,className:"ms-1"})]})})]})]})]})},ib=({date:t,format:e=VP,relative:n=!1})=>{const r=HP(t)?t:_a(t);return b.jsx("time",{dateTime:`${Zvt(r)}000`,children:n?`${zvt(Ll(),r)} ago`:xd(r,e)})},$0t=t=>{const{meta:e,visitsCount:n,visitsSummary:r}=t,{maxVisits:i,validSince:o,validUntil:s}=e,l=(r==null?void 0:r.total)??n;return i&&l>=i?{icon:Wet,className:"text-danger",description:b.jsxs(b.Fragment,{children:["This short URL cannot be currently visited because it has reached the maximum amount of ",b.jsx("b",{children:i})," visit",i>1?"s":"","."]})}:s&&io(zo(s),Ll())?{icon:tj,className:"text-danger",description:b.jsxs(b.Fragment,{children:["This short URL cannot be visited since ",b.jsx("b",{className:"indivisible",children:eb(zo(s))}),"."]})}:o&&io(Ll(),zo(o))?{icon:tj,className:"text-warning",description:b.jsxs(b.Fragment,{children:["This short URL will start working on ",b.jsx("b",{className:"indivisible",children:eb(zo(o))}),"."]})}:{icon:Hm,className:"text-primary",description:"This short URL can be visited normally."}},z0t=({shortUrl:t})=>{const e=Bl(),{icon:n,className:r,description:i}=$0t(t);return b.jsxs(b.Fragment,{children:[b.jsx("span",{style:{cursor:i?"help":void 0},ref:e,children:b.jsx(zt,{icon:n,className:r})}),b.jsx(fi,{target:e,placement:"bottom",children:i})]})};var P7={exports:{}};/*! - Copyright (c) 2018 Jed Watson. - Licensed under the MIT License (MIT), see - http://jedwatson.github.io/classnames -*/(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var r=[],i=0;i{const i=n?`?domain=${n}`:"";return`${t}/short-code/${ggt(e)}/${r}${i}`},hO=({shortUrl:t,suffix:e,asLink:n,children:r,...i})=>{const o=Bu();return!n||!t?b.jsx("span",{...i,children:r}):b.jsx(nn,{to:V0t(o,t,e),...i,children:r})},L7=({visitsCount:t,shortUrl:e,active:n=!1,asLink:r=!1})=>{const{maxVisits:i,validSince:o,validUntil:s}=(e==null?void 0:e.meta)??{},l=!!i||!!o||!!s,c=b.jsx(hO,{shortUrl:e,suffix:"visits",asLink:r,children:b.jsx("strong",{className:de("short-url-visits-count__amount",{"short-url-visits-count__amount--big":n}),children:Qn(t)})});if(!l)return c;const h=Bl();return b.jsxs(b.Fragment,{children:[b.jsxs("span",{className:"indivisible",children:[c,b.jsxs("small",{className:"short-urls-visits-count__max-visits-control",ref:h,children:[i&&b.jsxs(b.Fragment,{children:[" / ",Qn(i)]}),b.jsx("sup",{className:"ms-1",children:b.jsx(zt,{icon:Tk})})]})]}),b.jsx(fi,{target:h,placement:"bottom",children:b.jsxs("ul",{className:"list-unstyled mb-0",children:[i&&b.jsxs("li",{className:"short-url-visits-count__tooltip-list-item",children:["This short URL will not accept more than ",b.jsx("b",{children:Qn(i)})," visit",i===1?"":"s","."]}),o&&b.jsxs("li",{className:"short-url-visits-count__tooltip-list-item",children:["This short URL will not accept visits before ",b.jsx("b",{className:"indivisible",children:eb(zo(o))}),"."]}),s&&b.jsxs("li",{className:"short-url-visits-count__tooltip-list-item",children:["This short URL will not accept visits after ",b.jsx("b",{className:"indivisible",children:eb(zo(s))}),"."]})]})})]})},KP=({text:t,children:e,clearable:n,className:r="",colorGenerator:i,onClick:o,onClose:s})=>b.jsxs("span",{className:de("badge tag",r,{"tag--light-bg":i.isColorLightForKey(t)}),style:{backgroundColor:i.getColorForKey(t),cursor:n||!o?"auto":"pointer"},onClick:o,children:[e??t,n&&b.jsx("span",{"aria-label":`Remove ${t}`,className:"close tag__close-selected-tag",onClick:s,children:"×"})]}),H0t=({tags:t,onTagClick:e,colorGenerator:n})=>qi(t)?b.jsx("i",{className:"indivisible",children:b.jsx("small",{children:"No tags"})}):b.jsx(b.Fragment,{children:t.map(r=>b.jsx(KP,{text:r,colorGenerator:n,onClick:()=>e==null?void 0:e(r)},r))}),W0t=(t,e,n)=>({shortUrl:r,onTagClick:i})=>{var o,s,l,c;const[h,d]=n(),[p,m]=n(!1,500),v=U.useRef(!0),[{excludeBots:y}]=M1(),_=zu("visits"),T=y??(_==null?void 0:_.excludeBots);return U.useEffect(()=>{!v.current&&m(),v.current=!1},[(o=r.visitsSummary)==null?void 0:o.total,(s=r.visitsSummary)==null?void 0:s.nonBots,r.visitsCount]),b.jsxs("tr",{className:"responsive-table__row",children:[b.jsx("td",{className:"indivisible short-urls-row__cell responsive-table__cell","data-th":"Created at",children:b.jsx(ib,{date:r.dateCreated})}),b.jsx("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Short URL",children:b.jsxs("span",{className:"position-relative short-urls-row__cell--indivisible",children:[b.jsx("span",{className:"short-urls-row__short-url-wrapper",children:b.jsx(la,{href:r.shortUrl})}),b.jsx(k7,{text:r.shortUrl,onCopy:d}),b.jsx("span",{className:"badge bg-warning text-black short-urls-row__copy-hint",hidden:!h,children:"Copied short URL!"})]})}),b.jsx("td",{className:"responsive-table__cell short-urls-row__cell short-urls-row__cell--break","data-th":`${r.title?"Title":"Long URL"}`,children:b.jsx(la,{href:r.longUrl,children:r.title??r.longUrl})}),r.title&&b.jsx("td",{className:"short-urls-row__cell responsive-table__cell short-urls-row__cell--break d-lg-none","data-th":"Long URL",children:b.jsx(la,{href:r.longUrl})}),b.jsx("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Tags",children:b.jsx(H0t,{tags:r.tags,colorGenerator:e,onTagClick:i})}),b.jsx("td",{className:"responsive-table__cell short-urls-row__cell text-lg-end","data-th":"Visits",children:b.jsx(L7,{visitsCount:(T?(l=r.visitsSummary)==null?void 0:l.nonBots:(c=r.visitsSummary)==null?void 0:c.total)??r.visitsCount,shortUrl:r,active:p,asLink:!0})}),b.jsx("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Status",children:b.jsx(z0t,{shortUrl:r})}),b.jsx("td",{className:"responsive-table__cell short-urls-row__cell text-end",children:b.jsx(t,{shortUrl:r})})]})},Y0t=(t,e)=>({shortUrl:n})=>{const[r,,i,o]=zn(),[s,,l,c]=zn();return b.jsxs(b1,{minWidth:190,children:[b.jsxs(Zt,{tag:hO,shortUrl:n,suffix:"visits",asLink:!0,children:[b.jsx(zt,{icon:Sk,fixedWidth:!0})," Visit stats"]}),b.jsxs(Zt,{tag:hO,shortUrl:n,suffix:"edit",asLink:!0,children:[b.jsx(zt,{icon:wk,fixedWidth:!0})," Edit short URL"]}),b.jsxs(Zt,{onClick:i,children:[b.jsx(zt,{icon:Vet,fixedWidth:!0})," QR code"]}),b.jsx(e,{shortUrl:n,isOpen:r,toggle:o}),b.jsx(Zt,{divider:!0}),b.jsxs(Zt,{className:"dropdown-item--danger",onClick:l,children:[b.jsx(zt,{icon:xk,fixedWidth:!0})," Delete short URL"]}),b.jsx(t,{shortUrl:n,isOpen:s,toggle:c})]})},M7="shlink/shortUrlCreation",KD={saving:!1,saved:!1,error:!1},Z0t=t=>di(`${M7}/createShortUrl`,e=>t().createShortUrl(e)),G0t=t=>{const{reducer:e,actions:n}=Br({name:M7,initialState:KD,reducers:{resetCreateShortUrl:()=>KD},extraReducers:i=>{i.addCase(t.pending,()=>({saving:!0,saved:!1,error:!1})),i.addCase(t.rejected,(o,{error:s})=>({saving:!1,saved:!1,error:!0,errorData:La(s)})),i.addCase(t.fulfilled,(o,{payload:s})=>({result:s,saving:!1,saved:!0,error:!1}))}}),{resetCreateShortUrl:r}=n;return{reducer:e,resetCreateShortUrl:r}},XD="shlink/shortUrlDetail",QD={loading:!1,error:!1},q0t=t=>{const e=di(`${XD}/getShortUrlDetail`,async({shortCode:r,domain:i},{getState:o})=>{var s;const{shortUrlsList:l}=o();return((s=l==null?void 0:l.shortUrls)==null?void 0:s.data.find(c=>om(c,r,i)))??await t().getShortUrl(r,i)}),{reducer:n}=Br({name:XD,initialState:QD,reducers:{},extraReducers:r=>{r.addCase(e.pending,()=>({loading:!0,error:!1})),r.addCase(e.rejected,(i,{error:o})=>({loading:!1,error:!0,errorData:La(o)})),r.addCase(e.fulfilled,(i,{payload:o})=>({...QD,shortUrl:o}))}});return{reducer:n,getShortUrlDetail:e}},A7="shlink/shortUrlEdition",K0t={saving:!1,saved:!1,error:!1},X0t=t=>di(`${A7}/editShortUrl`,({shortCode:e,domain:n,data:r})=>t().updateShortUrl(e,n,r)),Q0t=t=>Br({name:A7,initialState:K0t,reducers:{},extraReducers:e=>{e.addCase(t.pending,n=>({...n,saving:!0,error:!1,saved:!1})),e.addCase(t.rejected,(n,{error:r})=>({...n,saving:!1,error:!0,saved:!1,errorData:La(r)})),e.addCase(t.fulfilled,(n,{payload:r})=>({shortUrl:r,saving:!1,error:!1,saved:!0}))}}),J0t=({icon:t,className:e,...n})=>{const r=Bl(),i=de("icon-input-container__input",e);return b.jsxs("div",{className:"icon-input-container",children:[b.jsx(dd,{className:i,innerRef:r,...n}),b.jsx(zt,{icon:t,fixedWidth:!0,className:"icon-input-container__icon",onClick:()=>{var o;return(o=r.current)==null?void 0:o.focus()}})]})};function tbt(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,dO(t,e)}function dO(t,e){return dO=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},dO(t,e)}function ebt(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}function JD(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function nbt(t,e,n){return t===e?!0:t.correspondingElement?t.correspondingElement.classList.contains(n):t.classList.contains(n)}function rbt(t,e,n){if(t===e)return!0;for(;t.parentNode||t.host;){if(t.parentNode&&nbt(t,e,n))return!0;t=t.parentNode||t.host}return t}function ibt(t){return document.documentElement.clientWidth<=t.clientX||document.documentElement.clientHeight<=t.clientY}var obt=function(){if(!(typeof window>"u"||typeof window.addEventListener!="function")){var t=!1,e=Object.defineProperty({},"passive",{get:function(){t=!0}}),n=function(){};return window.addEventListener("testPassiveEventSupport",n,e),window.removeEventListener("testPassiveEventSupport",n,e),t}};function sbt(t){return t===void 0&&(t=0),function(){return++t}}var abt=sbt(),fO,uy={},E2={},lbt=["touchstart","touchmove"],cbt="ignore-react-onclickoutside";function t3(t,e){var n={},r=lbt.indexOf(e)!==-1;return r&&fO&&(n.passive=!t.props.preventDefault),n}function A1(t,e){var n,r,i=t.displayName||t.name||"Component";return r=n=function(o){tbt(s,o);function s(c){var h;return h=o.call(this,c)||this,h.__outsideClickHandler=function(d){if(typeof h.__clickOutsideHandlerProp=="function"){h.__clickOutsideHandlerProp(d);return}var p=h.getInstance();if(typeof p.props.handleClickOutside=="function"){p.props.handleClickOutside(d);return}if(typeof p.handleClickOutside=="function"){p.handleClickOutside(d);return}throw new Error("WrappedComponent: "+i+" lacks a handleClickOutside(event) function for processing outside click events.")},h.__getComponentNode=function(){var d=h.getInstance();return e&&typeof e.setClickOutsideRef=="function"?e.setClickOutsideRef()(d):typeof d.setClickOutsideRef=="function"?d.setClickOutsideRef():Mu.findDOMNode(d)},h.enableOnClickOutside=function(){if(!(typeof document>"u"||E2[h._uid])){typeof fO>"u"&&(fO=obt()),E2[h._uid]=!0;var d=h.props.eventTypes;d.forEach||(d=[d]),uy[h._uid]=function(p){if(h.componentNode!==null&&(h.props.preventDefault&&p.preventDefault(),h.props.stopPropagation&&p.stopPropagation(),!(h.props.excludeScrollbar&&ibt(p)))){var m=p.composed&&p.composedPath&&p.composedPath().shift()||p.target;rbt(m,h.componentNode,h.props.outsideClickIgnoreClass)===document&&h.__outsideClickHandler(p)}},d.forEach(function(p){document.addEventListener(p,uy[h._uid],t3(JD(h),p))})}},h.disableOnClickOutside=function(){delete E2[h._uid];var d=uy[h._uid];if(d&&typeof document<"u"){var p=h.props.eventTypes;p.forEach||(p=[p]),p.forEach(function(m){return document.removeEventListener(m,d,t3(JD(h),m))}),delete uy[h._uid]}},h.getRef=function(d){return h.instanceRef=d},h._uid=abt(),h}var l=s.prototype;return l.getInstance=function(){if(t.prototype&&!t.prototype.isReactComponent)return this;var c=this.instanceRef;return c.getInstance?c.getInstance():c},l.componentDidMount=function(){if(!(typeof document>"u"||!document.createElement)){var c=this.getInstance();if(e&&typeof e.handleClickOutside=="function"&&(this.__clickOutsideHandlerProp=e.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()}},l.componentDidUpdate=function(){this.componentNode=this.__getComponentNode()},l.componentWillUnmount=function(){this.disableOnClickOutside()},l.render=function(){var c=this.props;c.excludeScrollbar;var h=ebt(c,["excludeScrollbar"]);return t.prototype&&t.prototype.isReactComponent?h.ref=this.getRef:h.wrappedRef=this.getRef,h.disableOnClickOutside=this.disableOnClickOutside,h.enableOnClickOutside=this.enableOnClickOutside,U.createElement(t,h)},s}(U.Component),n.displayName="OnClickOutside("+i+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:e&&e.excludeScrollbar||!1,outsideClickIgnoreClass:cbt,preventDefault:!1,stopPropagation:!1},n.getClass=function(){return t.getClass?t.getClass():t},r}var R7=U.createContext(),j7=U.createContext();function ubt(t){var e=t.children,n=U.useState(null),r=n[0],i=n[1],o=U.useRef(!1);U.useEffect(function(){return function(){o.current=!0}},[]);var s=U.useCallback(function(l){o.current||i(l)},[]);return U.createElement(R7.Provider,{value:r},U.createElement(j7.Provider,{value:s},e))}var N7=function(t){return Array.isArray(t)?t[0]:t},D7=function(t){if(typeof t=="function"){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r"u")return!1;var e=Hi(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function Sbt(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},i=e.attributes[n]||{},o=e.elements[n];!uo(o)||!bs(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var l=i[s];l===!1?o.removeAttribute(s):o.setAttribute(s,l===!0?"":l)}))})}function Tbt(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){var i=e.elements[r],o=e.attributes[r]||{},s=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),l=s.reduce(function(c,h){return c[h]="",c},{});!uo(i)||!bs(i)||(Object.assign(i.style,l),Object.keys(o).forEach(function(c){i.removeAttribute(c)}))})}}const Ebt={name:"applyStyles",enabled:!0,phase:"write",fn:Sbt,effect:Tbt,requires:["computeStyles"]};function ms(t){return t.split("-")[0]}var su=Math.max,ob=Math.min,Ed=Math.round;function mO(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function B7(){return!/^((?!chrome|android).)*safari/i.test(mO())}function Od(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var r=t.getBoundingClientRect(),i=1,o=1;e&&uo(t)&&(i=t.offsetWidth>0&&Ed(r.width)/t.offsetWidth||1,o=t.offsetHeight>0&&Ed(r.height)/t.offsetHeight||1);var s=Su(t)?Hi(t):window,l=s.visualViewport,c=!B7()&&n,h=(r.left+(c&&l?l.offsetLeft:0))/i,d=(r.top+(c&&l?l.offsetTop:0))/o,p=r.width/i,m=r.height/o;return{width:p,height:m,top:d,right:h+p,bottom:d+m,left:h,x:h,y:d}}function JP(t){var e=Od(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function $7(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&QP(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function ba(t){return Hi(t).getComputedStyle(t)}function Obt(t){return["table","td","th"].indexOf(bs(t))>=0}function Ul(t){return((Su(t)?t.ownerDocument:t.document)||window.document).documentElement}function R1(t){return bs(t)==="html"?t:t.assignedSlot||t.parentNode||(QP(t)?t.host:null)||Ul(t)}function i3(t){return!uo(t)||ba(t).position==="fixed"?null:t.offsetParent}function Cbt(t){var e=/firefox/i.test(mO()),n=/Trident/i.test(mO());if(n&&uo(t)){var r=ba(t);if(r.position==="fixed")return null}var i=R1(t);for(QP(i)&&(i=i.host);uo(i)&&["html","body"].indexOf(bs(i))<0;){var o=ba(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||e&&o.willChange==="filter"||e&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function sv(t){for(var e=Hi(t),n=i3(t);n&&Obt(n)&&ba(n).position==="static";)n=i3(n);return n&&(bs(n)==="html"||bs(n)==="body"&&ba(n).position==="static")?e:n||Cbt(t)||e}function tL(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function lm(t,e,n){return su(t,ob(e,n))}function kbt(t,e,n){var r=lm(t,e,n);return r>n?n:r}function z7(){return{top:0,right:0,bottom:0,left:0}}function U7(t){return Object.assign({},z7(),t)}function V7(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var Pbt=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,U7(typeof t!="number"?t:V7(t,ov))};function Lbt(t){var e,n=t.state,r=t.name,i=t.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,l=ms(n.placement),c=tL(l),h=[hi,yo].indexOf(l)>=0,d=h?"height":"width";if(!(!o||!s)){var p=Pbt(i.padding,n),m=JP(o),v=c==="y"?ui:hi,y=c==="y"?vo:yo,_=n.rects.reference[d]+n.rects.reference[c]-s[c]-n.rects.popper[d],T=s[c]-n.rects.reference[c],x=sv(o),w=x?c==="y"?x.clientHeight||0:x.clientWidth||0:0,E=_/2-T/2,O=p[v],k=w-m[d]-p[y],P=w/2-m[d]/2+E,A=lm(O,P,k),j=c;n.modifiersData[r]=(e={},e[j]=A,e.centerOffset=A-P,e)}}function Mbt(t){var e=t.state,n=t.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||$7(e.elements.popper,i)&&(e.elements.arrow=i))}const Abt={name:"arrow",enabled:!0,phase:"main",fn:Lbt,effect:Mbt,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Cd(t){return t.split("-")[1]}var Rbt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function jbt(t,e){var n=t.x,r=t.y,i=e.devicePixelRatio||1;return{x:Ed(n*i)/i||0,y:Ed(r*i)/i||0}}function o3(t){var e,n=t.popper,r=t.popperRect,i=t.placement,o=t.variation,s=t.offsets,l=t.position,c=t.gpuAcceleration,h=t.adaptive,d=t.roundOffsets,p=t.isFixed,m=s.x,v=m===void 0?0:m,y=s.y,_=y===void 0?0:y,T=typeof d=="function"?d({x:v,y:_}):{x:v,y:_};v=T.x,_=T.y;var x=s.hasOwnProperty("x"),w=s.hasOwnProperty("y"),E=hi,O=ui,k=window;if(h){var P=sv(n),A="clientHeight",j="clientWidth";if(P===Hi(n)&&(P=Ul(n),ba(P).position!=="static"&&l==="absolute"&&(A="scrollHeight",j="scrollWidth")),P=P,i===ui||(i===hi||i===yo)&&o===hg){O=vo;var B=p&&P===k&&k.visualViewport?k.visualViewport.height:P[A];_-=B-r.height,_*=c?1:-1}if(i===hi||(i===ui||i===vo)&&o===hg){E=yo;var N=p&&P===k&&k.visualViewport?k.visualViewport.width:P[j];v-=N-r.width,v*=c?1:-1}}var V=Object.assign({position:l},h&&Rbt),Y=d===!0?jbt({x:v,y:_},Hi(n)):{x:v,y:_};if(v=Y.x,_=Y.y,c){var nt;return Object.assign({},V,(nt={},nt[O]=w?"0":"",nt[E]=x?"0":"",nt.transform=(k.devicePixelRatio||1)<=1?"translate("+v+"px, "+_+"px)":"translate3d("+v+"px, "+_+"px, 0)",nt))}return Object.assign({},V,(e={},e[O]=w?_+"px":"",e[E]=x?v+"px":"",e.transform="",e))}function Nbt(t){var e=t.state,n=t.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,s=o===void 0?!0:o,l=n.roundOffsets,c=l===void 0?!0:l,h={placement:ms(e.placement),variation:Cd(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,o3(Object.assign({},h,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:c})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,o3(Object.assign({},h,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const Dbt={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Nbt,data:{}};var hy={passive:!0};function Ibt(t){var e=t.state,n=t.instance,r=t.options,i=r.scroll,o=i===void 0?!0:i,s=r.resize,l=s===void 0?!0:s,c=Hi(e.elements.popper),h=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&h.forEach(function(d){d.addEventListener("scroll",n.update,hy)}),l&&c.addEventListener("resize",n.update,hy),function(){o&&h.forEach(function(d){d.removeEventListener("scroll",n.update,hy)}),l&&c.removeEventListener("resize",n.update,hy)}}const Fbt={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Ibt,data:{}};var Bbt={left:"right",right:"left",bottom:"top",top:"bottom"};function p_(t){return t.replace(/left|right|bottom|top/g,function(e){return Bbt[e]})}var $bt={start:"end",end:"start"};function s3(t){return t.replace(/start|end/g,function(e){return $bt[e]})}function eL(t){var e=Hi(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function nL(t){return Od(Ul(t)).left+eL(t).scrollLeft}function zbt(t,e){var n=Hi(t),r=Ul(t),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,l=0,c=0;if(i){o=i.width,s=i.height;var h=B7();(h||!h&&e==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}return{width:o,height:s,x:l+nL(t),y:c}}function Ubt(t){var e,n=Ul(t),r=eL(t),i=(e=t.ownerDocument)==null?void 0:e.body,o=su(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=su(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),l=-r.scrollLeft+nL(t),c=-r.scrollTop;return ba(i||n).direction==="rtl"&&(l+=su(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:l,y:c}}function rL(t){var e=ba(t),n=e.overflow,r=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function H7(t){return["html","body","#document"].indexOf(bs(t))>=0?t.ownerDocument.body:uo(t)&&rL(t)?t:H7(R1(t))}function cm(t,e){var n;e===void 0&&(e=[]);var r=H7(t),i=r===((n=t.ownerDocument)==null?void 0:n.body),o=Hi(r),s=i?[o].concat(o.visualViewport||[],rL(r)?r:[]):r,l=e.concat(s);return i?l:l.concat(cm(R1(s)))}function gO(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Vbt(t,e){var n=Od(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function a3(t,e,n){return e===I7?gO(zbt(t,n)):Su(e)?Vbt(e,n):gO(Ubt(Ul(t)))}function Hbt(t){var e=cm(R1(t)),n=["absolute","fixed"].indexOf(ba(t).position)>=0,r=n&&uo(t)?sv(t):t;return Su(r)?e.filter(function(i){return Su(i)&&$7(i,r)&&bs(i)!=="body"}):[]}function Wbt(t,e,n,r){var i=e==="clippingParents"?Hbt(t):[].concat(e),o=[].concat(i,[n]),s=o[0],l=o.reduce(function(c,h){var d=a3(t,h,r);return c.top=su(d.top,c.top),c.right=ob(d.right,c.right),c.bottom=ob(d.bottom,c.bottom),c.left=su(d.left,c.left),c},a3(t,s,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function W7(t){var e=t.reference,n=t.element,r=t.placement,i=r?ms(r):null,o=r?Cd(r):null,s=e.x+e.width/2-n.width/2,l=e.y+e.height/2-n.height/2,c;switch(i){case ui:c={x:s,y:e.y-n.height};break;case vo:c={x:s,y:e.y+e.height};break;case yo:c={x:e.x+e.width,y:l};break;case hi:c={x:e.x-n.width,y:l};break;default:c={x:e.x,y:e.y}}var h=i?tL(i):null;if(h!=null){var d=h==="y"?"height":"width";switch(o){case Td:c[h]=c[h]-(e[d]/2-n[d]/2);break;case hg:c[h]=c[h]+(e[d]/2-n[d]/2);break}}return c}function dg(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=r===void 0?t.placement:r,o=n.strategy,s=o===void 0?t.strategy:o,l=n.boundary,c=l===void 0?hbt:l,h=n.rootBoundary,d=h===void 0?I7:h,p=n.elementContext,m=p===void 0?lp:p,v=n.altBoundary,y=v===void 0?!1:v,_=n.padding,T=_===void 0?0:_,x=U7(typeof T!="number"?T:V7(T,ov)),w=m===lp?dbt:lp,E=t.rects.popper,O=t.elements[y?w:m],k=Wbt(Su(O)?O:O.contextElement||Ul(t.elements.popper),c,d,s),P=Od(t.elements.reference),A=W7({reference:P,element:E,strategy:"absolute",placement:i}),j=gO(Object.assign({},E,A)),B=m===lp?j:P,N={top:k.top-B.top+x.top,bottom:B.bottom-k.bottom+x.bottom,left:k.left-B.left+x.left,right:B.right-k.right+x.right},V=t.modifiersData.offset;if(m===lp&&V){var Y=V[i];Object.keys(N).forEach(function(nt){var K=[yo,vo].indexOf(nt)>=0?1:-1,J=[ui,vo].indexOf(nt)>=0?"y":"x";N[nt]+=Y[J]*K})}return N}function Ybt(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,l=n.flipVariations,c=n.allowedAutoPlacements,h=c===void 0?F7:c,d=Cd(r),p=d?l?r3:r3.filter(function(y){return Cd(y)===d}):ov,m=p.filter(function(y){return h.indexOf(y)>=0});m.length===0&&(m=p);var v=m.reduce(function(y,_){return y[_]=dg(t,{placement:_,boundary:i,rootBoundary:o,padding:s})[ms(_)],y},{});return Object.keys(v).sort(function(y,_){return v[y]-v[_]})}function Zbt(t){if(ms(t)===XP)return[];var e=p_(t);return[s3(t),e,s3(e)]}function Gbt(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,l=s===void 0?!0:s,c=n.fallbackPlacements,h=n.padding,d=n.boundary,p=n.rootBoundary,m=n.altBoundary,v=n.flipVariations,y=v===void 0?!0:v,_=n.allowedAutoPlacements,T=e.options.placement,x=ms(T),w=x===T,E=c||(w||!y?[p_(T)]:Zbt(T)),O=[T].concat(E).reduce(function(Q,tt){return Q.concat(ms(tt)===XP?Ybt(e,{placement:tt,boundary:d,rootBoundary:p,padding:h,flipVariations:y,allowedAutoPlacements:_}):tt)},[]),k=e.rects.reference,P=e.rects.popper,A=new Map,j=!0,B=O[0],N=0;N=0,J=K?"width":"height",et=dg(e,{placement:V,boundary:d,rootBoundary:p,altBoundary:m,padding:h}),ct=K?nt?yo:hi:nt?vo:ui;k[J]>P[J]&&(ct=p_(ct));var G=p_(ct),$=[];if(o&&$.push(et[Y]<=0),l&&$.push(et[ct]<=0,et[G]<=0),$.every(function(Q){return Q})){B=V,j=!1;break}A.set(V,$)}if(j)for(var I=y?3:1,H=function(Q){var tt=O.find(function(rt){var mt=A.get(rt);if(mt)return mt.slice(0,Q).every(function(M){return M})});if(tt)return B=tt,"break"},it=I;it>0;it--){var W=H(it);if(W==="break")break}e.placement!==B&&(e.modifiersData[r]._skip=!0,e.placement=B,e.reset=!0)}}const qbt={name:"flip",enabled:!0,phase:"main",fn:Gbt,requiresIfExists:["offset"],data:{_skip:!1}};function l3(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function c3(t){return[ui,yo,vo,hi].some(function(e){return t[e]>=0})}function Kbt(t){var e=t.state,n=t.name,r=e.rects.reference,i=e.rects.popper,o=e.modifiersData.preventOverflow,s=dg(e,{elementContext:"reference"}),l=dg(e,{altBoundary:!0}),c=l3(s,r),h=l3(l,i,o),d=c3(c),p=c3(h);e.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:h,isReferenceHidden:d,hasPopperEscaped:p},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":p})}const Xbt={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Kbt};function Qbt(t,e,n){var r=ms(t),i=[hi,ui].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,s=o[0],l=o[1];return s=s||0,l=(l||0)*i,[hi,yo].indexOf(r)>=0?{x:l,y:s}:{x:s,y:l}}function Jbt(t){var e=t.state,n=t.options,r=t.name,i=n.offset,o=i===void 0?[0,0]:i,s=F7.reduce(function(d,p){return d[p]=Qbt(p,e.rects,o),d},{}),l=s[e.placement],c=l.x,h=l.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=c,e.modifiersData.popperOffsets.y+=h),e.modifiersData[r]=s}const t1t={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Jbt};function e1t(t){var e=t.state,n=t.name;e.modifiersData[n]=W7({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const n1t={name:"popperOffsets",enabled:!0,phase:"read",fn:e1t,data:{}};function r1t(t){return t==="x"?"y":"x"}function i1t(t){var e=t.state,n=t.options,r=t.name,i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,l=s===void 0?!1:s,c=n.boundary,h=n.rootBoundary,d=n.altBoundary,p=n.padding,m=n.tether,v=m===void 0?!0:m,y=n.tetherOffset,_=y===void 0?0:y,T=dg(e,{boundary:c,rootBoundary:h,padding:p,altBoundary:d}),x=ms(e.placement),w=Cd(e.placement),E=!w,O=tL(x),k=r1t(O),P=e.modifiersData.popperOffsets,A=e.rects.reference,j=e.rects.popper,B=typeof _=="function"?_(Object.assign({},e.rects,{placement:e.placement})):_,N=typeof B=="number"?{mainAxis:B,altAxis:B}:Object.assign({mainAxis:0,altAxis:0},B),V=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,Y={x:0,y:0};if(P){if(o){var nt,K=O==="y"?ui:hi,J=O==="y"?vo:yo,et=O==="y"?"height":"width",ct=P[O],G=ct+T[K],$=ct-T[J],I=v?-j[et]/2:0,H=w===Td?A[et]:j[et],it=w===Td?-j[et]:-A[et],W=e.elements.arrow,Q=v&&W?JP(W):{width:0,height:0},tt=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:z7(),rt=tt[K],mt=tt[J],M=lm(0,A[et],Q[et]),R=E?A[et]/2-I-M-rt-N.mainAxis:H-M-rt-N.mainAxis,z=E?-A[et]/2+I+M+mt+N.mainAxis:it+M+mt+N.mainAxis,at=e.elements.arrow&&sv(e.elements.arrow),st=at?O==="y"?at.clientTop||0:at.clientLeft||0:0,ht=(nt=V==null?void 0:V[O])!=null?nt:0,bt=ct+R-ht-st,It=ct+z-ht,ft=lm(v?ob(G,bt):G,ct,v?su($,It):$);P[O]=ft,Y[O]=ft-ct}if(l){var vt,_t=O==="x"?ui:hi,Ct=O==="x"?vo:yo,Mt=P[k],Lt=k==="y"?"height":"width",jt=Mt+T[_t],dt=Mt-T[Ct],pt=[ui,hi].indexOf(x)!==-1,xt=(vt=V==null?void 0:V[k])!=null?vt:0,yt=pt?jt:Mt-A[Lt]-j[Lt]-xt+N.altAxis,Et=pt?Mt+A[Lt]+j[Lt]-xt-N.altAxis:dt,At=v&&pt?kbt(yt,Mt,Et):lm(v?yt:jt,Mt,v?Et:dt);P[k]=At,Y[k]=At-Mt}e.modifiersData[r]=Y}}const o1t={name:"preventOverflow",enabled:!0,phase:"main",fn:i1t,requiresIfExists:["offset"]};function s1t(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function a1t(t){return t===Hi(t)||!uo(t)?eL(t):s1t(t)}function l1t(t){var e=t.getBoundingClientRect(),n=Ed(e.width)/t.offsetWidth||1,r=Ed(e.height)/t.offsetHeight||1;return n!==1||r!==1}function c1t(t,e,n){n===void 0&&(n=!1);var r=uo(e),i=uo(e)&&l1t(e),o=Ul(e),s=Od(t,i,n),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((bs(e)!=="body"||rL(o))&&(l=a1t(e)),uo(e)?(c=Od(e,!0),c.x+=e.clientLeft,c.y+=e.clientTop):o&&(c.x=nL(o))),{x:s.left+l.scrollLeft-c.x,y:s.top+l.scrollTop-c.y,width:s.width,height:s.height}}function u1t(t){var e=new Map,n=new Set,r=[];t.forEach(function(o){e.set(o.name,o)});function i(o){n.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(l){if(!n.has(l)){var c=e.get(l);c&&i(c)}}),r.push(o)}return t.forEach(function(o){n.has(o.name)||i(o)}),r}function h1t(t){var e=u1t(t);return wbt.reduce(function(n,r){return n.concat(e.filter(function(i){return i.phase===r}))},[])}function d1t(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function f1t(t){var e=t.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(e).map(function(n){return e[n]})}var u3={placement:"bottom",modifiers:[],strategy:"absolute"};function h3(){for(var t=arguments.length,e=new Array(t),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}}();return function(){var n,r=sb(t);if(e){var i=sb(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(o,s){if(s&&(typeof s=="object"||typeof s=="function"))return s;if(s!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return lt(o)}(this,n)}}function _O(t){return function(e){if(Array.isArray(e))return O2(e)}(t)||function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(t)||function(e,n){if(e){if(typeof e=="string")return O2(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return O2(e,n)}}(t)||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 O2(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&arguments[1]!==void 0?arguments[1]:{},n=e.minDate,r=e.maxDate,i=e.excludeDates,o=e.excludeDateIntervals,s=e.includeDates,l=e.includeDateIntervals,c=e.filterDate;return N1(t,{minDate:n,maxDate:r})||i&&i.some(function(h){return Gr(t,h)})||o&&o.some(function(h){var d=h.start,p=h.end;return wd(t,{start:d,end:p})})||s&&!s.some(function(h){return Gr(t,h)})||l&&!l.some(function(h){var d=h.start,p=h.end;return wd(t,{start:d,end:p})})||c&&!c(Ie(t))||!1}function sL(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.excludeDates,r=e.excludeDateIntervals;return r&&r.length>0?r.some(function(i){var o=i.start,s=i.end;return wd(t,{start:o,end:s})}):n&&n.some(function(i){return Gr(t,i)})||!1}function G7(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.minDate,r=e.maxDate,i=e.excludeDates,o=e.includeDates,s=e.filterDate;return N1(t,{minDate:Wz(n),maxDate:Hz(r)})||i&&i.some(function(l){return Io(t,l)})||o&&!o.some(function(l){return Io(t,l)})||s&&!s(Ie(t))||!1}function C2(t,e,n,r){var i=le(t),o=jr(t),s=le(e),l=jr(e),c=le(r);return i===s&&i===c?o<=n&&n<=l:i=n||ci:void 0}function N1t(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.minDate,r=e.maxDate,i=e.excludeDates,o=e.includeDates,s=e.filterDate;return N1(t,{minDate:n,maxDate:r})||i&&i.some(function(l){return ab(t,l)})||o&&!o.some(function(l){return ab(t,l)})||s&&!s(Ie(t))||!1}function k2(t,e,n){if(!q0(e)||!q0(n))return!1;var r=le(e),i=le(n);return r<=t&&i>=t}function q7(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.minDate,r=e.maxDate,i=e.excludeDates,o=e.includeDates,s=e.filterDate,l=new Date(t,0,1);return N1(l,{minDate:Yz(n),maxDate:Agt(r)})||i&&i.some(function(c){return nl(l,c)})||o&&!o.some(function(c){return nl(l,c)})||s&&!s(Ie(l))||!1}function P2(t,e,n,r){var i=le(t),o=Ch(t),s=le(e),l=Ch(e),c=le(r);return i===s&&i===c?o<=n&&n<=l:i=n||ci:void 0}function N1(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.minDate,r=e.maxDate;return n&&lg(t,n)<0||r&&lg(t,r)>0}function b3(t,e){return e.some(function(n){return Ri(n)===Ri(t)&&ji(n)===ji(t)})}function x3(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.excludeTimes,r=e.includeTimes,i=e.filterTime;return n&&b3(t,n)||r&&!b3(t,r)||i&&!i(t)||!1}function w3(t,e){var n=e.minTime,r=e.maxTime;if(!n||!r)throw new Error("Both minTime and maxTime props required");var i,o=Ie(),s=sm(am(o,ji(t)),Ri(t)),l=sm(am(o,ji(n)),Ri(n)),c=sm(am(o,ji(r)),Ri(r));try{i=!wd(s,{start:l,end:c})}catch{i=!1}return i}function S3(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.minDate,r=e.includeDates,i=Sd(t,1);return n&&cg(n,i)>0||r&&r.every(function(o){return cg(o,i)>0})||!1}function T3(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.maxDate,r=e.includeDates,i=go(t,1);return n&&cg(i,n)>0||r&&r.every(function(o){return cg(i,o)>0})||!1}function E3(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.minDate,r=e.includeDates,i=ug(t,1);return n&&K0(n,i)>0||r&&r.every(function(o){return K0(o,i)>0})||!1}function O3(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.maxDate,r=e.includeDates,i=_d(t,1);return n&&K0(i,n)>0||r&&r.every(function(o){return K0(i,o)>0})||!1}function K7(t){var e=t.minDate,n=t.includeDates;if(n&&e){var r=n.filter(function(i){return lg(i,e)>=0});return bD(r)}return n?bD(n):e}function X7(t){var e=t.maxDate,n=t.includeDates;if(n&&e){var r=n.filter(function(i){return lg(i,e)<=0});return _D(r)}return n?_D(n):e}function C3(){for(var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"react-datepicker__day--highlighted",n=new Map,r=0,i=t.length;r1&&arguments[1]!==void 0?arguments[1]:um,n=Math.ceil(le(t)/e)*e;return{startPeriod:n-(e-1),endPeriod:n}}function I1t(t,e,n,r){for(var i=[],o=0;o<2*e+1;o++){var s=t+e-o,l=!0;n&&(l=le(n)<=s),r&&l&&(l=le(r)>=s),l&&i.push(s)}return i}var F1t=A1(function(t){fr(n,q.Component);var e=pr(n);function n(r){var i;hr(this,n),ot(lt(i=e.call(this,r)),"renderOptions",function(){var c=i.props.year,h=i.state.yearsList.map(function(m){return q.createElement("div",{className:c===m?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:m,onClick:i.onChange.bind(lt(i),m),"aria-selected":c===m?"true":void 0},c===m?q.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",m)}),d=i.props.minDate?le(i.props.minDate):null,p=i.props.maxDate?le(i.props.maxDate):null;return p&&i.state.yearsList.find(function(m){return m===p})||h.unshift(q.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:i.incrementYears},q.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),d&&i.state.yearsList.find(function(m){return m===d})||h.push(q.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:i.decrementYears},q.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),h}),ot(lt(i),"onChange",function(c){i.props.onChange(c)}),ot(lt(i),"handleClickOutside",function(){i.props.onCancel()}),ot(lt(i),"shiftYears",function(c){var h=i.state.yearsList.map(function(d){return d+c});i.setState({yearsList:h})}),ot(lt(i),"incrementYears",function(){return i.shiftYears(1)}),ot(lt(i),"decrementYears",function(){return i.shiftYears(-1)});var o=r.yearDropdownItemNumber,s=r.scrollableYearDropdown,l=o||(s?10:5);return i.state={yearsList:I1t(i.props.year,l,i.props.minDate,i.props.maxDate)},i.dropdownRef=U.createRef(),i}return dr(n,[{key:"componentDidMount",value:function(){var r=this.dropdownRef.current;if(r){var i=r.children?Array.from(r.children):null,o=i?i.find(function(s){return s.ariaSelected}):null;r.scrollTop=o?o.offsetTop+(o.clientHeight-r.clientHeight)/2:(r.scrollHeight-r.clientHeight)/2}}},{key:"render",value:function(){var r=de({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return q.createElement("div",{className:r,ref:this.dropdownRef},this.renderOptions())}}]),n}()),B1t=function(t){fr(n,q.Component);var e=pr(n);function n(){var r;hr(this,n);for(var i=arguments.length,o=new Array(i),s=0;s0&&arguments[0]!==void 0?arguments[0]:{},c=!1;r.getTabIndex()===0&&!l.isInputFocused&&r.isSameDay(r.props.preSelection)&&(document.activeElement&&document.activeElement!==document.body||(c=!0),r.props.inline&&!r.props.shouldFocusDayInline&&(c=!1),r.props.containerRef&&r.props.containerRef.current&&r.props.containerRef.current.contains(document.activeElement)&&document.activeElement.classList.contains("react-datepicker__day")&&(c=!0),r.props.monthShowsDuplicateDaysEnd&&r.isAfterMonth()&&(c=!1),r.props.monthShowsDuplicateDaysStart&&r.isBeforeMonth()&&(c=!1)),c&&r.dayEl.current.focus({preventScroll:!0})}),ot(lt(r),"renderDayContents",function(){return r.props.monthShowsDuplicateDaysEnd&&r.isAfterMonth()||r.props.monthShowsDuplicateDaysStart&&r.isBeforeMonth()?null:r.props.renderDayContents?r.props.renderDayContents(CD(r.props.day),r.props.day):CD(r.props.day)}),ot(lt(r),"render",function(){return q.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.isInRange()},r.renderDayContents())}),r}return dr(n,[{key:"componentDidMount",value:function(){this.handleFocusDay()}},{key:"componentDidUpdate",value:function(r){this.handleFocusDay(r)}}]),n}(),Y1t=function(t){fr(n,q.Component);var e=pr(n);function n(){var r;hr(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=6,v=!c&&!r.isWeekInMonth(p);if(m||v){if(!r.props.peekNextMonth)break;d=!0}}return l}),ot(lt(r),"onMonthClick",function(l,c){r.handleDayClick(vl(Zr(r.props.day,c)),l)}),ot(lt(r),"onMonthMouseEnter",function(l){r.handleDayMouseEnter(vl(Zr(r.props.day,l)))}),ot(lt(r),"handleMonthNavigation",function(l,c){r.isDisabled(c)||r.isExcluded(c)||(r.props.setPreSelection(c),r.MONTH_REFS[l].current&&r.MONTH_REFS[l].current.focus())}),ot(lt(r),"onMonthKeyDown",function(l,c){var h=r.props,d=h.selected,p=h.preSelection,m=h.disabledKeyboardNavigation,v=h.showTwoColumnMonthYearPicker,y=h.showFourColumnMonthYearPicker,_=h.setPreSelection,T=l.key;if(T!=="Tab"&&l.preventDefault(),!m){var x=P3(y,v),w=L2[x].verticalNavigationOffset,E=L2[x].grid;switch(T){case"Enter":r.onMonthClick(l,c),_(d);break;case"ArrowRight":r.handleMonthNavigation(c===11?0:c+1,go(p,1));break;case"ArrowLeft":r.handleMonthNavigation(c===0?11:c-1,Sd(p,1));break;case"ArrowUp":r.handleMonthNavigation(E[0].includes(c)?c+12-w:c-w,Sd(p,w));break;case"ArrowDown":r.handleMonthNavigation(E[E.length-1].includes(c)?c-12+w:c+w,go(p,w))}}}),ot(lt(r),"onQuarterClick",function(l,c){r.handleDayClick(y3(nh(r.props.day,c)),l)}),ot(lt(r),"onQuarterMouseEnter",function(l){r.handleDayMouseEnter(y3(nh(r.props.day,l)))}),ot(lt(r),"handleQuarterNavigation",function(l,c){r.isDisabled(c)||r.isExcluded(c)||(r.props.setPreSelection(c),r.QUARTER_REFS[l-1].current&&r.QUARTER_REFS[l-1].current.focus())}),ot(lt(r),"onQuarterKeyDown",function(l,c){var h=l.key;if(!r.props.disabledKeyboardNavigation)switch(h){case"Enter":r.onQuarterClick(l,c),r.props.setPreSelection(r.props.selected);break;case"ArrowRight":r.handleQuarterNavigation(c===4?1:c+1,Uz(r.props.preSelection,1));break;case"ArrowLeft":r.handleQuarterNavigation(c===1?4:c-1,h_t(r.props.preSelection,1))}}),ot(lt(r),"getMonthClassNames",function(l){var c=r.props,h=c.day,d=c.startDate,p=c.endDate,m=c.selected,v=c.minDate,y=c.maxDate,_=c.preSelection,T=c.monthClassName,x=c.excludeDates,w=c.includeDates,E=T?T(Zr(h,l)):void 0,O=Zr(h,l);return de("react-datepicker__month-text","react-datepicker__month-".concat(l),E,{"react-datepicker__month-text--disabled":(v||y||x||w)&&G7(O,r.props),"react-datepicker__month-text--selected":r.isSelectedMonth(h,l,m),"react-datepicker__month-text--keyboard-selected":!r.props.disabledKeyboardNavigation&&jr(_)===l,"react-datepicker__month-text--in-selecting-range":r.isInSelectingRangeMonth(l),"react-datepicker__month-text--in-range":C2(d,p,l,h),"react-datepicker__month-text--range-start":r.isRangeStartMonth(l),"react-datepicker__month-text--range-end":r.isRangeEndMonth(l),"react-datepicker__month-text--selecting-range-start":r.isSelectingMonthRangeStart(l),"react-datepicker__month-text--selecting-range-end":r.isSelectingMonthRangeEnd(l),"react-datepicker__month-text--today":r.isCurrentMonth(h,l)})}),ot(lt(r),"getTabIndex",function(l){var c=jr(r.props.preSelection);return r.props.disabledKeyboardNavigation||l!==c?"-1":"0"}),ot(lt(r),"getQuarterTabIndex",function(l){var c=Ch(r.props.preSelection);return r.props.disabledKeyboardNavigation||l!==c?"-1":"0"}),ot(lt(r),"getAriaLabel",function(l){var c=r.props,h=c.chooseDayAriaLabelPrefix,d=h===void 0?"Choose":h,p=c.disabledDayAriaLabelPrefix,m=p===void 0?"Not available":p,v=c.day,y=Zr(v,l),_=r.isDisabled(y)||r.isExcluded(y)?m:d;return"".concat(_," ").concat(Dn(y,"MMMM yyyy"))}),ot(lt(r),"getQuarterClassNames",function(l){var c=r.props,h=c.day,d=c.startDate,p=c.endDate,m=c.selected,v=c.minDate,y=c.maxDate,_=c.preSelection;return de("react-datepicker__quarter-text","react-datepicker__quarter-".concat(l),{"react-datepicker__quarter-text--disabled":(v||y)&&N1t(nh(h,l),r.props),"react-datepicker__quarter-text--selected":r.isSelectedQuarter(h,l,m),"react-datepicker__quarter-text--keyboard-selected":Ch(_)===l,"react-datepicker__quarter-text--in-selecting-range":r.isInSelectingRangeQuarter(l),"react-datepicker__quarter-text--in-range":P2(d,p,l,h),"react-datepicker__quarter-text--range-start":r.isRangeStartQuarter(l),"react-datepicker__quarter-text--range-end":r.isRangeEndQuarter(l)})}),ot(lt(r),"getMonthContent",function(l){var c=r.props,h=c.showFullMonthYearPicker,d=c.renderMonthContent,p=c.locale,m=Z7(l,p),v=oL(l,p);return d?d(l,m,v):h?v:m}),ot(lt(r),"getQuarterContent",function(l){var c=r.props,h=c.renderQuarterContent,d=function(p,m){return Dn(nh(Ie(),p),"QQQ",m)}(l,c.locale);return h?h(l,d):d}),ot(lt(r),"renderMonths",function(){var l=r.props,c=l.showTwoColumnMonthYearPicker,h=l.showFourColumnMonthYearPicker,d=l.day,p=l.selected;return L2[P3(h,c)].grid.map(function(m,v){return q.createElement("div",{className:"react-datepicker__month-wrapper",key:v},m.map(function(y,_){return q.createElement("div",{ref:r.MONTH_REFS[y],key:_,onClick:function(T){r.onMonthClick(T,y)},onKeyDown:function(T){r.onMonthKeyDown(T,y)},onMouseEnter:function(){return r.onMonthMouseEnter(y)},tabIndex:r.getTabIndex(y),className:r.getMonthClassNames(y),role:"option","aria-label":r.getAriaLabel(y),"aria-current":r.isCurrentMonth(d,y)?"date":void 0,"aria-selected":r.isSelectedMonth(d,y,p)},r.getMonthContent(y))}))})}),ot(lt(r),"renderQuarters",function(){var l=r.props,c=l.day,h=l.selected;return q.createElement("div",{className:"react-datepicker__quarter-wrapper"},[1,2,3,4].map(function(d,p){return q.createElement("div",{key:p,ref:r.QUARTER_REFS[p],role:"option",onClick:function(m){r.onQuarterClick(m,d)},onKeyDown:function(m){r.onQuarterKeyDown(m,d)},onMouseEnter:function(){return r.onQuarterMouseEnter(d)},className:r.getQuarterClassNames(d),"aria-selected":r.isSelectedQuarter(c,d,h),tabIndex:r.getQuarterTabIndex(d),"aria-current":r.isCurrentQuarter(c,d)?"date":void 0},r.getQuarterContent(d))}))}),ot(lt(r),"getClassNames",function(){var l=r.props,c=l.selectingDate,h=l.selectsStart,d=l.selectsEnd,p=l.showMonthYearPicker,m=l.showQuarterYearPicker;return de("react-datepicker__month",{"react-datepicker__month--selecting-range":c&&(h||d)},{"react-datepicker__monthPicker":p},{"react-datepicker__quarterPicker":m})}),r}return dr(n,[{key:"render",value:function(){var r=this.props,i=r.showMonthYearPicker,o=r.showQuarterYearPicker,s=r.day,l=r.ariaLabelPrefix,c=l===void 0?"month ":l;return q.createElement("div",{className:this.getClassNames(),onMouseLeave:this.handleMouseLeave,"aria-label":"".concat(c," ").concat(Dn(s,"yyyy-MM")),role:"listbox"},i?this.renderMonths():o?this.renderQuarters():this.renderWeeks())}}]),n}(),eU=function(t){fr(n,q.Component);var e=pr(n);function n(){var r;hr(this,n);for(var i=arguments.length,o=new Array(i),s=0;s0&&arguments[0]!==void 0?arguments[0]:{}).className||"").split(/\s+/);return Q1t.some(function(l){return s.indexOf(l)>=0})})(o.target)&&i.props.onDropdownFocus()}),ot(lt(i),"getDateInView",function(){var o=i.props,s=o.preSelection,l=o.selected,c=o.openToDate,h=K7(i.props),d=X7(i.props),p=Ie(),m=c||l||s;return m||(h&&io(p,h)?h:d&&Pl(p,d)?d:p)}),ot(lt(i),"increaseMonth",function(){i.setState(function(o){var s=o.date;return{date:go(s,1)}},function(){return i.handleMonthChange(i.state.date)})}),ot(lt(i),"decreaseMonth",function(){i.setState(function(o){var s=o.date;return{date:Sd(s,1)}},function(){return i.handleMonthChange(i.state.date)})}),ot(lt(i),"handleDayClick",function(o,s,l){i.props.onSelect(o,s,l),i.props.setPreSelection&&i.props.setPreSelection(o)}),ot(lt(i),"handleDayMouseEnter",function(o){i.setState({selectingDate:o}),i.props.onDayMouseEnter&&i.props.onDayMouseEnter(o)}),ot(lt(i),"handleMonthMouseLeave",function(){i.setState({selectingDate:null}),i.props.onMonthMouseLeave&&i.props.onMonthMouseLeave()}),ot(lt(i),"handleYearMouseEnter",function(o,s){i.setState({selectingDate:Qs(Ie(),s)}),i.props.onYearMouseEnter&&i.props.onYearMouseEnter(o,s)}),ot(lt(i),"handleYearMouseLeave",function(o,s){i.props.onYearMouseLeave&&i.props.onYearMouseLeave(o,s)}),ot(lt(i),"handleYearChange",function(o){i.props.onYearChange&&(i.props.onYearChange(o),i.setState({isRenderAriaLiveMessage:!0})),i.props.adjustDateOnChange&&(i.props.onSelect&&i.props.onSelect(o),i.props.setOpen&&i.props.setOpen(!0)),i.props.setPreSelection&&i.props.setPreSelection(o)}),ot(lt(i),"handleMonthChange",function(o){i.handleCustomMonthChange(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)}),ot(lt(i),"handleCustomMonthChange",function(o){i.props.onMonthChange&&(i.props.onMonthChange(o),i.setState({isRenderAriaLiveMessage:!0}))}),ot(lt(i),"handleMonthYearChange",function(o){i.handleYearChange(o),i.handleMonthChange(o)}),ot(lt(i),"changeYear",function(o){i.setState(function(s){var l=s.date;return{date:Qs(l,o)}},function(){return i.handleYearChange(i.state.date)})}),ot(lt(i),"changeMonth",function(o){i.setState(function(s){var l=s.date;return{date:Zr(l,o)}},function(){return i.handleMonthChange(i.state.date)})}),ot(lt(i),"changeMonthYear",function(o){i.setState(function(s){var l=s.date;return{date:Qs(Zr(l,jr(o)),le(o))}},function(){return i.handleMonthYearChange(i.state.date)})}),ot(lt(i),"header",function(){var o=iL(arguments.length>0&&arguments[0]!==void 0?arguments[0]:i.state.date,i.props.locale,i.props.calendarStartDay),s=[];return i.props.showWeekNumbers&&s.push(q.createElement("div",{key:"W",className:"react-datepicker__day-name"},i.props.weekLabel||"#")),s.concat([0,1,2,3,4,5,6].map(function(l){var c=$u(o,l),h=i.formatWeekday(c,i.props.locale),d=i.props.weekDayClassName?i.props.weekDayClassName(c):void 0;return q.createElement("div",{key:l,className:de("react-datepicker__day-name",d)},h)}))}),ot(lt(i),"formatWeekday",function(o,s){return i.props.formatWeekDay?function(l,c,h){return c(Dn(l,"EEEE",h))}(o,i.props.formatWeekDay,s):i.props.useWeekdaysShort?function(l,c){return Dn(l,"EEE",c)}(o,s):function(l,c){return Dn(l,"EEEEEE",c)}(o,s)}),ot(lt(i),"decreaseYear",function(){i.setState(function(o){var s=o.date;return{date:ug(s,i.props.showYearPicker?i.props.yearItemNumber:1)}},function(){return i.handleYearChange(i.state.date)})}),ot(lt(i),"clearSelectingDate",function(){i.setState({selectingDate:null})}),ot(lt(i),"renderPreviousButton",function(){if(!i.props.renderCustomHeader){var o;switch(!0){case i.props.showMonthYearPicker:o=E3(i.state.date,i.props);break;case i.props.showYearPicker:o=function(x){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},E=w.minDate,O=w.yearItemNumber,k=O===void 0?um:O,P=Lh(Lp(ug(x,k)),k).endPeriod,A=E&&le(E);return A&&A>P||!1}(i.state.date,i.props);break;default:o=S3(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"],l=i.decreaseMonth;(i.props.showMonthYearPicker||i.props.showQuarterYearPicker||i.props.showYearPicker)&&(l=i.decreaseYear),o&&i.props.showDisabledMonthNavigation&&(s.push("react-datepicker__navigation--previous--disabled"),l=null);var c=i.props.showMonthYearPicker||i.props.showQuarterYearPicker||i.props.showYearPicker,h=i.props,d=h.previousMonthButtonLabel,p=h.previousYearButtonLabel,m=i.props,v=m.previousMonthAriaLabel,y=v===void 0?typeof d=="string"?d:"Previous Month":v,_=m.previousYearAriaLabel,T=_===void 0?typeof p=="string"?p:"Previous Year":_;return q.createElement("button",{type:"button",className:s.join(" "),onClick:l,onKeyDown:i.props.handleOnKeyDown,"aria-label":c?T:y},q.createElement("span",{className:["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"].join(" ")},c?i.props.previousYearButtonLabel:i.props.previousMonthButtonLabel))}}}),ot(lt(i),"increaseYear",function(){i.setState(function(o){var s=o.date;return{date:_d(s,i.props.showYearPicker?i.props.yearItemNumber:1)}},function(){return i.handleYearChange(i.state.date)})}),ot(lt(i),"renderNextButton",function(){if(!i.props.renderCustomHeader){var o;switch(!0){case i.props.showMonthYearPicker:o=O3(i.state.date,i.props);break;case i.props.showYearPicker:o=function(x){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},E=w.maxDate,O=w.yearItemNumber,k=O===void 0?um:O,P=Lh(_d(x,k),k).startPeriod,A=E&&le(E);return A&&A0&&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"),q.createElement("div",{className:s.join(" ")},Dn(o,i.props.dateFormat,i.props.locale))}),ot(lt(i),"renderYearDropdown",function(){var o=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(i.props.showYearDropdown&&!o)return q.createElement(B1t,{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:le(i.state.date),scrollableYearDropdown:i.props.scrollableYearDropdown,yearDropdownItemNumber:i.props.yearDropdownItemNumber})}),ot(lt(i),"renderMonthDropdown",function(){var o=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(i.props.showMonthDropdown&&!o)return q.createElement(z1t,{dropdownMode:i.props.dropdownMode,locale:i.props.locale,onChange:i.changeMonth,month:jr(i.state.date),useShortMonthInDropdown:i.props.useShortMonthInDropdown})}),ot(lt(i),"renderMonthYearDropdown",function(){var o=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(i.props.showMonthYearDropdown&&!o)return q.createElement(H1t,{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})}),ot(lt(i),"handleTodayButtonClick",function(o){i.props.onSelect(_3(),o),i.props.setPreSelection&&i.props.setPreSelection(_3())}),ot(lt(i),"renderTodayButton",function(){if(i.props.todayButton&&!i.props.showTimeSelectOnly)return q.createElement("div",{className:"react-datepicker__today-button",onClick:function(o){return i.handleTodayButtonClick(o)}},i.props.todayButton)}),ot(lt(i),"renderDefaultHeader",function(o){var s=o.monthDate,l=o.i;return q.createElement("div",{className:"react-datepicker__header ".concat(i.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},i.renderCurrentMonth(s),q.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(i.props.dropdownMode),onFocus:i.handleDropdownFocus},i.renderMonthDropdown(l!==0),i.renderMonthYearDropdown(l!==0),i.renderYearDropdown(l!==0)),q.createElement("div",{className:"react-datepicker__day-names"},i.header(s)))}),ot(lt(i),"renderCustomHeader",function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=o.monthDate,l=o.i;if(i.props.showTimeSelect&&!i.state.monthContainer||i.props.showTimeSelectOnly)return null;var c=S3(i.state.date,i.props),h=T3(i.state.date,i.props),d=E3(i.state.date,i.props),p=O3(i.state.date,i.props),m=!i.props.showMonthYearPicker&&!i.props.showQuarterYearPicker&&!i.props.showYearPicker;return q.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:i.props.onDropdownFocus},i.props.renderCustomHeader(f3(f3({},i.state),{},{customHeaderCount:l,monthDate:s,changeMonth:i.changeMonth,changeYear:i.changeYear,decreaseMonth:i.decreaseMonth,increaseMonth:i.increaseMonth,decreaseYear:i.decreaseYear,increaseYear:i.increaseYear,prevMonthButtonDisabled:c,nextMonthButtonDisabled:h,prevYearButtonDisabled:d,nextYearButtonDisabled:p})),m&&q.createElement("div",{className:"react-datepicker__day-names"},i.header(s)))}),ot(lt(i),"renderYearHeader",function(){var o=i.state.date,s=i.props,l=s.showYearPicker,c=Lh(o,s.yearItemNumber),h=c.startPeriod,d=c.endPeriod;return q.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},l?"".concat(h," - ").concat(d):le(o))}),ot(lt(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)}}),ot(lt(i),"renderMonths",function(){if(!i.props.showTimeSelectOnly&&!i.props.showYearPicker){for(var o=[],s=i.props.showPreviousMonths?i.props.monthsShown-1:0,l=Sd(i.state.date,s),c=0;c0;o.push(q.createElement("div",{key:p,ref:function(y){i.monthContainer=y},className:"react-datepicker__month-container"},i.renderHeader({monthDate:d,i:c}),q.createElement(G1t,{chooseDayAriaLabelPrefix:i.props.chooseDayAriaLabelPrefix,disabledDayAriaLabelPrefix:i.props.disabledDayAriaLabelPrefix,weekAriaLabelPrefix:i.props.weekAriaLabelPrefix,ariaLabelPrefix:i.props.monthAriaLabelPrefix,onChange:i.changeMonthYear,day:d,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:c,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,renderMonthContent:i.props.renderMonthContent,renderQuarterContent:i.props.renderQuarterContent,renderYearContent:i.props.renderYearContent,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:m,monthShowsDuplicateDaysStart:v})))}return o}}),ot(lt(i),"renderYears",function(){if(!i.props.showTimeSelectOnly)return i.props.showYearPicker?q.createElement("div",{className:"react-datepicker__year--container"},i.renderHeader(),q.createElement(q1t,fg({onDayClick:i.handleDayClick,selectingDate:i.state.selectingDate,clearSelectingDate:i.clearSelectingDate,date:i.state.date},i.props,{onYearMouseEnter:i.handleYearMouseEnter,onYearMouseLeave:i.handleYearMouseLeave}))):void 0}),ot(lt(i),"renderTimeSection",function(){if(i.props.showTimeSelect&&(i.state.monthContainer||i.props.showTimeSelectOnly))return q.createElement(eU,{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})}),ot(lt(i),"renderInputTimeSection",function(){var o=new Date(i.props.selected),s=Va(o)&&i.props.selected?"".concat(k3(o.getHours()),":").concat(k3(o.getMinutes())):"";if(i.props.showTimeInput)return q.createElement(K1t,{date:o,timeString:s,timeInputLabel:i.props.timeInputLabel,onChange:i.props.onTimeChange,customTimeInput:i.props.customTimeInput})}),ot(lt(i),"renderAriaLiveRegion",function(){var o,s=Lh(i.state.date,i.props.yearItemNumber),l=s.startPeriod,c=s.endPeriod;return o=i.props.showYearPicker?"".concat(l," - ").concat(c):i.props.showMonthYearPicker||i.props.showQuarterYearPicker?le(i.state.date):"".concat(oL(jr(i.state.date),i.props.locale)," ").concat(le(i.state.date)),q.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},i.state.isRenderAriaLiveMessage&&o)}),ot(lt(i),"renderChildren",function(){if(i.props.children)return q.createElement("div",{className:"react-datepicker__children-container"},i.props.children)}),i.containerRef=q.createRef(),i.state={date:i.getDateInView(),selectingDate:null,monthContainer:null,isRenderAriaLiveMessage:!1},i}return dr(n,[{key:"componentDidMount",value:function(){var r=this;this.props.showTimeSelect&&(this.assignMonthContainer=void r.setState({monthContainer:r.monthContainer}))}},{key:"componentDidUpdate",value:function(r){var i=this;if(!this.props.preSelection||Gr(this.props.preSelection,r.preSelection)&&this.props.monthSelectedIn===r.monthSelectedIn)this.props.openToDate&&!Gr(this.props.openToDate,r.openToDate)&&this.setState({date:this.props.openToDate});else{var o=!Io(this.state.date,this.props.preSelection);this.setState({date:this.props.preSelection},function(){return o&&i.handleCustomMonthChange(i.state.date)})}}},{key:"render",value:function(){var r=this.props.container||X1t;return q.createElement("div",{ref:this.containerRef},q.createElement(r,{className:de("react-datepicker",this.props.className,{"react-datepicker--time-only":this.props.showTimeSelectOnly}),showPopperArrow:this.props.showPopperArrow,arrowProps:this.props.arrowProps},this.renderAriaLiveRegion(),this.renderPreviousButton(),this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.renderChildren()))}}],[{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:um}}}]),n}(),nU=function(t){fr(n,q.Component);var e=pr(n);function n(r){var i;return hr(this,n),(i=e.call(this,r)).el=document.createElement("div"),i}return dr(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 Jc.createPortal(this.props.children,this.el)}}]),n}(),txt=function(t){return!t.disabled&&t.tabIndex!==-1},rU=function(t){fr(n,q.Component);var e=pr(n);function n(r){var i;return hr(this,n),ot(lt(i=e.call(this,r)),"getTabChildren",function(){return Array.prototype.slice.call(i.tabLoopRef.current.querySelectorAll("[tabindex], a, button, input, select, textarea"),1,-1).filter(txt)}),ot(lt(i),"handleFocusStart",function(){var o=i.getTabChildren();o&&o.length>1&&o[o.length-1].focus()}),ot(lt(i),"handleFocusEnd",function(){var o=i.getTabChildren();o&&o.length>1&&o[0].focus()}),i.tabLoopRef=q.createRef(),i}return dr(n,[{key:"render",value:function(){return this.props.enableTabLoop?q.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},q.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:"0",onFocus:this.handleFocusStart}),this.props.children,q.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:"0",onFocus:this.handleFocusEnd})):this.props.children}}],[{key:"defaultProps",get:function(){return{enableTabLoop:!0}}}]),n}(),ext=function(t){fr(n,q.Component);var e=pr(n);function n(){return hr(this,n),e.apply(this,arguments)}return dr(n,[{key:"render",value:function(){var r,i=this.props,o=i.className,s=i.wrapperClassName,l=i.hidePopper,c=i.popperComponent,h=i.popperModifiers,d=i.popperPlacement,p=i.popperProps,m=i.targetComponent,v=i.enableTabLoop,y=i.popperOnKeyDown,_=i.portalId,T=i.portalHost;if(!l){var x=de("react-datepicker-popper",o);r=q.createElement(k1t,fg({modifiers:h,placement:d},p),function(E){var O=E.ref,k=E.style,P=E.placement,A=E.arrowProps;return q.createElement(rU,{enableTabLoop:v},q.createElement("div",{ref:O,style:k,className:x,"data-placement":P,onKeyDown:y},q.cloneElement(c,{arrowProps:A})))})}this.props.popperContainer&&(r=q.createElement(this.props.popperContainer,{},r)),_&&!l&&(r=q.createElement(nU,{portalId:_,portalHost:T},r));var w=de("react-datepicker-wrapper",s);return q.createElement(ubt,{className:"react-datepicker-manager"},q.createElement(A1t,null,function(E){var O=E.ref;return q.createElement("div",{ref:O,className:w},m)}),r)}}],[{key:"defaultProps",get:function(){return{hidePopper:!0,popperModifiers:[],popperProps:{},popperPlacement:"bottom-start"}}}]),n}(),L3="react-datepicker-ignore-onclickoutside",nxt=A1(J1t),M2="Date input not valid.",rxt=function(t){fr(n,q.Component);var e=pr(n);function n(r){var i;return hr(this,n),ot(lt(i=e.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:Ie()}),ot(lt(i),"calcInitialState",function(){var o,s=i.getPreSelection(),l=K7(i.props),c=X7(i.props),h=l&&io(s,Fi(l))?l:c&&Pl(s,xu(c))?c: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:h,highlightDates:C3(i.props.highlightDates),focused:!1,shouldFocusDayInline:!1,isRenderAriaLiveMessage:!1}}),ot(lt(i),"clearPreventFocusTimeout",function(){i.preventFocusTimeout&&clearTimeout(i.preventFocusTimeout)}),ot(lt(i),"setFocus",function(){i.input&&i.input.focus&&i.input.focus({preventScroll:!0})}),ot(lt(i),"setBlur",function(){i.input&&i.input.blur&&i.input.blur(),i.cancelFocusInput()}),ot(lt(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:A2},function(){o||i.setState(function(l){return{focused:!!s&&l.focused}},function(){!s&&i.setBlur(),i.setState({inputValue:null})})})}),ot(lt(i),"inputOk",function(){return jP(i.state.preSelection)}),ot(lt(i),"isCalendarOpen",function(){return i.props.open===void 0?i.state.open&&!i.props.disabled&&!i.props.readOnly:i.props.open}),ot(lt(i),"handleFocus",function(o){i.state.preventFocus||(i.props.onFocus(o),i.props.preventOpenOnFocus||i.props.readOnly||i.setOpen(!0)),i.setState({focused:!0})}),ot(lt(i),"cancelFocusInput",function(){clearTimeout(i.inputFocusTimeout),i.inputFocusTimeout=null}),ot(lt(i),"deferFocusInput",function(){i.cancelFocusInput(),i.inputFocusTimeout=setTimeout(function(){return i.setFocus()},1)}),ot(lt(i),"handleDropdownFocus",function(){i.cancelFocusInput()}),ot(lt(i),"handleBlur",function(o){(!i.state.open||i.props.withPortal||i.props.showTimeInput)&&i.props.onBlur(o),i.setState({focused:!1})}),ot(lt(i),"handleCalendarClickOutside",function(o){i.props.inline||i.setOpen(!1),i.props.onClickOutside(o),i.props.withPortal&&o.preventDefault()}),ot(lt(i),"handleChange",function(){for(var o=arguments.length,s=new Array(o),l=0;l0&&(y=y2(h,d.slice(0,h.length),new Date)),Va(y)||(y=new Date(h))),Va(y)&&T?y:null));i.props.showTimeSelectOnly&&i.props.selected&&!Gr(x,i.props.selected)&&(x=c_t(i.props.selected,x==null?{hours:Ri(i.props.selected),minutes:ji(i.props.selected),seconds:v2(i.props.selected)}:{hours:Ri(x),minutes:ji(x),seconds:v2(x)})),!x&&c.target.value||i.setSelected(x,c,!0)}}),ot(lt(i),"handleSelect",function(o,s,l){if(i.setState({preventFocus:!0},function(){return i.preventFocusTimeout=setTimeout(function(){return i.setState({preventFocus:!1})},50),i.preventFocusTimeout}),i.props.onChangeRaw&&i.props.onChangeRaw(s),i.setSelected(o,s,!1,l),i.props.showDateSelect&&i.setState({isRenderAriaLiveMessage:!0}),!i.props.shouldCloseOnSelect||i.props.showTimeSelect)i.setPreSelection(o);else if(!i.props.inline){i.props.selectsRange||i.setOpen(!1);var c=i.props,h=c.startDate,d=c.endDate;!h||d||io(o,h)||i.setOpen(!1)}}),ot(lt(i),"setSelected",function(o,s,l,c){var h=o;if(i.props.showYearPicker){if(h!==null&&q7(le(h),i.props))return}else if(i.props.showMonthYearPicker){if(h!==null&&G7(h,i.props))return}else if(h!==null&&j1(h,i.props))return;var d=i.props,p=d.onChange,m=d.selectsRange,v=d.startDate,y=d.endDate;if(!rl(i.props.selected,h)||i.props.allowSameDay||m)if(h!==null&&(!i.props.selected||l&&(i.props.showTimeSelect||i.props.showTimeSelectOnly||i.props.showTimeInput)||(h=v3(h,{hour:Ri(i.props.selected),minute:ji(i.props.selected),second:v2(i.props.selected)})),i.props.inline||i.setState({preSelection:h}),i.props.focusSelectedMonth||i.setState({monthSelectedIn:c})),m){var _=v&&!y,T=v&&y;!v&&!y?p([h,null],s):_&&(io(h,v)?p([h,null],s):p([v,h],s)),T&&p([h,null],s)}else p(h,s);l||(i.props.onSelect(h,s),i.setState({inputValue:null}))}),ot(lt(i),"setPreSelection",function(o){var s=i.props.minDate!==void 0,l=i.props.maxDate!==void 0,c=!0;if(o){var h=Fi(o);if(s&&l)c=g_(o,i.props.minDate,i.props.maxDate);else if(s){var d=Fi(i.props.minDate);c=Pl(o,d)||rl(h,d)}else if(l){var p=xu(i.props.maxDate);c=io(o,p)||rl(h,p)}}c&&i.setState({preSelection:o})}),ot(lt(i),"handleTimeChange",function(o){var s=v3(i.props.selected?i.props.selected:i.getPreSelection(),{hour:Ri(o),minute:ji(o)});i.setState({preSelection:s}),i.props.onChange(s),i.props.shouldCloseOnSelect&&i.setOpen(!1),i.props.showTimeInput&&i.setOpen(!0),(i.props.showTimeSelectOnly||i.props.showTimeSelect)&&i.setState({isRenderAriaLiveMessage:!0}),i.setState({inputValue:null})}),ot(lt(i),"onInputClick",function(){i.props.disabled||i.props.readOnly||i.setOpen(!0),i.props.onInputClick()}),ot(lt(i),"onInputKeyDown",function(o){i.props.onKeyDown(o);var s=o.key;if(i.state.open||i.props.inline||i.props.preventOpenOnFocus){if(i.state.open){if(s==="ArrowDown"||s==="ArrowUp"){o.preventDefault();var l=i.calendar.componentNode&&i.calendar.componentNode.querySelector('.react-datepicker__day[tabindex="0"]');return void(l&&l.focus({preventScroll:!0}))}var c=Ie(i.state.preSelection);s==="Enter"?(o.preventDefault(),i.inputOk()&&i.state.lastPreSelectChange===A2?(i.handleSelect(c,o),!i.props.shouldCloseOnSelect&&i.setPreSelection(c)):i.setOpen(!1)):s==="Escape"?(o.preventDefault(),i.setOpen(!1)):s==="Tab"&&o.shiftKey&&i.setOpen(!1),i.inputOk()||i.props.onInputError({code:1,msg:M2})}}else s!=="ArrowDown"&&s!=="ArrowUp"&&s!=="Enter"||i.onInputClick()}),ot(lt(i),"onPortalKeyDown",function(o){o.key==="Escape"&&(o.preventDefault(),i.setState({preventFocus:!0},function(){i.setOpen(!1),setTimeout(function(){i.setFocus(),i.setState({preventFocus:!1})})}))}),ot(lt(i),"onDayKeyDown",function(o){i.props.onKeyDown(o);var s=o.key,l=Ie(i.state.preSelection);if(s==="Enter")o.preventDefault(),i.handleSelect(l,o),!i.props.shouldCloseOnSelect&&i.setPreSelection(l);else if(s==="Escape")o.preventDefault(),i.setOpen(!1),i.inputOk()||i.props.onInputError({code:1,msg:M2});else if(!i.props.disabledKeyboardNavigation){var c;switch(s){case"ArrowLeft":c=UP(l,1);break;case"ArrowRight":c=$u(l,1);break;case"ArrowUp":c=d_t(l,1);break;case"ArrowDown":c=AP(l,1);break;case"PageUp":c=Sd(l,1);break;case"PageDown":c=go(l,1);break;case"Home":c=ug(l,1);break;case"End":c=_d(l,1)}if(!c)return void(i.props.onInputError&&i.props.onInputError({code:1,msg:M2}));if(o.preventDefault(),i.setState({lastPreSelectChange:A2}),i.props.adjustDateOnChange&&i.setSelected(c),i.setPreSelection(c),i.props.inline){var h=jr(l),d=jr(c),p=le(l),m=le(c);h!==d||p!==m?i.setState({shouldFocusDayInline:!0}):i.setState({shouldFocusDayInline:!1})}}}),ot(lt(i),"onPopperKeyDown",function(o){o.key==="Escape"&&(o.preventDefault(),i.setState({preventFocus:!0},function(){i.setOpen(!1),setTimeout(function(){i.setFocus(),i.setState({preventFocus:!1})})}))}),ot(lt(i),"onClearClick",function(o){o&&o.preventDefault&&o.preventDefault(),i.props.selectsRange?i.props.onChange([null,null],o):i.props.onChange(null,o),i.setState({inputValue:null})}),ot(lt(i),"clear",function(){i.onClearClick()}),ot(lt(i),"onScroll",function(o){typeof i.props.closeOnScroll=="boolean"&&i.props.closeOnScroll?o.target!==document&&o.target!==document.documentElement&&o.target!==document.body||i.setOpen(!1):typeof i.props.closeOnScroll=="function"&&i.props.closeOnScroll(o)&&i.setOpen(!1)}),ot(lt(i),"renderCalendar",function(){return i.props.inline||i.isCalendarOpen()?q.createElement(nxt,{ref:function(o){i.calendar=o},locale:i.props.locale,calendarStartDay:i.props.calendarStartDay,chooseDayAriaLabelPrefix:i.props.chooseDayAriaLabelPrefix,disabledDayAriaLabelPrefix:i.props.disabledDayAriaLabelPrefix,weekAriaLabelPrefix:i.props.weekAriaLabelPrefix,monthAriaLabelPrefix:i.props.monthAriaLabelPrefix,adjustDateOnChange:i.props.adjustDateOnChange,setOpen:i.setOpen,shouldCloseOnSelect:i.props.shouldCloseOnSelect,dateFormat:i.props.dateFormatCalendar,useWeekdaysShort:i.props.useWeekdaysShort,formatWeekDay:i.props.formatWeekDay,dropdownMode:i.props.dropdownMode,selected:i.props.selected,preSelection:i.state.preSelection,onSelect:i.handleSelect,onWeekSelect:i.props.onWeekSelect,openToDate:i.props.openToDate,minDate:i.props.minDate,maxDate:i.props.maxDate,selectsStart:i.props.selectsStart,selectsEnd:i.props.selectsEnd,selectsRange:i.props.selectsRange,startDate:i.props.startDate,endDate:i.props.endDate,excludeDates:i.props.excludeDates,excludeDateIntervals:i.props.excludeDateIntervals,filterDate:i.props.filterDate,onClickOutside:i.handleCalendarClickOutside,formatWeekNumber:i.props.formatWeekNumber,highlightDates:i.state.highlightDates,includeDates:i.props.includeDates,includeDateIntervals:i.props.includeDateIntervals,includeTimes:i.props.includeTimes,injectTimes:i.props.injectTimes,inline:i.props.inline,shouldFocusDayInline:i.state.shouldFocusDayInline,peekNextMonth:i.props.peekNextMonth,showMonthDropdown:i.props.showMonthDropdown,showPreviousMonths:i.props.showPreviousMonths,useShortMonthInDropdown:i.props.useShortMonthInDropdown,showMonthYearDropdown:i.props.showMonthYearDropdown,showWeekNumbers:i.props.showWeekNumbers,showYearDropdown:i.props.showYearDropdown,withPortal:i.props.withPortal,forceShowMonthNavigation:i.props.forceShowMonthNavigation,showDisabledMonthNavigation:i.props.showDisabledMonthNavigation,scrollableYearDropdown:i.props.scrollableYearDropdown,scrollableMonthYearDropdown:i.props.scrollableMonthYearDropdown,todayButton:i.props.todayButton,weekLabel:i.props.weekLabel,outsideClickIgnoreClass:L3,fixedHeight:i.props.fixedHeight,monthsShown:i.props.monthsShown,monthSelectedIn:i.state.monthSelectedIn,onDropdownFocus:i.handleDropdownFocus,onMonthChange:i.props.onMonthChange,onYearChange:i.props.onYearChange,dayClassName:i.props.dayClassName,weekDayClassName:i.props.weekDayClassName,monthClassName:i.props.monthClassName,timeClassName:i.props.timeClassName,showDateSelect:i.props.showDateSelect,showTimeSelect:i.props.showTimeSelect,showTimeSelectOnly:i.props.showTimeSelectOnly,onTimeChange:i.handleTimeChange,timeFormat:i.props.timeFormat,timeIntervals:i.props.timeIntervals,minTime:i.props.minTime,maxTime:i.props.maxTime,excludeTimes:i.props.excludeTimes,filterTime:i.props.filterTime,timeCaption:i.props.timeCaption,className:i.props.calendarClassName,container:i.props.calendarContainer,yearItemNumber:i.props.yearItemNumber,yearDropdownItemNumber:i.props.yearDropdownItemNumber,previousMonthAriaLabel:i.props.previousMonthAriaLabel,previousMonthButtonLabel:i.props.previousMonthButtonLabel,nextMonthAriaLabel:i.props.nextMonthAriaLabel,nextMonthButtonLabel:i.props.nextMonthButtonLabel,previousYearAriaLabel:i.props.previousYearAriaLabel,previousYearButtonLabel:i.props.previousYearButtonLabel,nextYearAriaLabel:i.props.nextYearAriaLabel,nextYearButtonLabel:i.props.nextYearButtonLabel,timeInputLabel:i.props.timeInputLabel,disabledKeyboardNavigation:i.props.disabledKeyboardNavigation,renderCustomHeader:i.props.renderCustomHeader,popperProps:i.props.popperProps,renderDayContents:i.props.renderDayContents,renderMonthContent:i.props.renderMonthContent,renderQuarterContent:i.props.renderQuarterContent,renderYearContent:i.props.renderYearContent,onDayMouseEnter:i.props.onDayMouseEnter,onMonthMouseLeave:i.props.onMonthMouseLeave,onYearMouseEnter:i.props.onYearMouseEnter,onYearMouseLeave:i.props.onYearMouseLeave,selectsDisabledDaysInRange:i.props.selectsDisabledDaysInRange,showTimeInput:i.props.showTimeInput,showMonthYearPicker:i.props.showMonthYearPicker,showFullMonthYearPicker:i.props.showFullMonthYearPicker,showTwoColumnMonthYearPicker:i.props.showTwoColumnMonthYearPicker,showFourColumnMonthYearPicker:i.props.showFourColumnMonthYearPicker,showYearPicker:i.props.showYearPicker,showQuarterYearPicker:i.props.showQuarterYearPicker,showPopperArrow:i.props.showPopperArrow,excludeScrollbar:i.props.excludeScrollbar,handleOnKeyDown:i.props.onKeyDown,handleOnDayKeyDown:i.onDayKeyDown,isInputFocused:i.state.focused,customTimeInput:i.props.customTimeInput,setPreSelection:i.setPreSelection},i.props.children):null}),ot(lt(i),"renderAriaLiveRegion",function(){var o,s=i.props,l=s.dateFormat,c=s.locale,h=i.props.showTimeInput||i.props.showTimeSelect?"PPPPp":"PPPP";return o=i.props.selectsRange?"Selected start date: ".concat(Ko(i.props.startDate,{dateFormat:h,locale:c}),". ").concat(i.props.endDate?"End date: "+Ko(i.props.endDate,{dateFormat:h,locale:c}):""):i.props.showTimeSelectOnly?"Selected time: ".concat(Ko(i.props.selected,{dateFormat:l,locale:c})):i.props.showYearPicker?"Selected year: ".concat(Ko(i.props.selected,{dateFormat:"yyyy",locale:c})):i.props.showMonthYearPicker?"Selected month: ".concat(Ko(i.props.selected,{dateFormat:"MMMM yyyy",locale:c})):i.props.showQuarterYearPicker?"Selected quarter: ".concat(Ko(i.props.selected,{dateFormat:"yyyy, QQQ",locale:c})):"Selected date: ".concat(Ko(i.props.selected,{dateFormat:h,locale:c})),q.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},o)}),ot(lt(i),"renderDateInput",function(){var o,s=de(i.props.className,ot({},L3,i.state.open)),l=i.props.customInput||q.createElement("input",{type:"text"}),c=i.props.customInputRef||"ref",h=typeof i.props.value=="string"?i.props.value:typeof i.state.inputValue=="string"?i.state.inputValue:i.props.selectsRange?function(d,p,m){if(!d)return"";var v=Ko(d,m),y=p?Ko(p,m):"";return"".concat(v," - ").concat(y)}(i.props.startDate,i.props.endDate,i.props):Ko(i.props.selected,i.props);return q.cloneElement(l,(ot(o={},c,function(d){i.input=d}),ot(o,"value",h),ot(o,"onBlur",i.handleBlur),ot(o,"onChange",i.handleChange),ot(o,"onClick",i.onInputClick),ot(o,"onFocus",i.handleFocus),ot(o,"onKeyDown",i.onInputKeyDown),ot(o,"id",i.props.id),ot(o,"name",i.props.name),ot(o,"form",i.props.form),ot(o,"autoFocus",i.props.autoFocus),ot(o,"placeholder",i.props.placeholderText),ot(o,"disabled",i.props.disabled),ot(o,"autoComplete",i.props.autoComplete),ot(o,"className",de(l.props.className,s)),ot(o,"title",i.props.title),ot(o,"readOnly",i.props.readOnly),ot(o,"required",i.props.required),ot(o,"tabIndex",i.props.tabIndex),ot(o,"aria-describedby",i.props.ariaDescribedBy),ot(o,"aria-invalid",i.props.ariaInvalid),ot(o,"aria-labelledby",i.props.ariaLabelledBy),ot(o,"aria-required",i.props.ariaRequired),o))}),ot(lt(i),"renderClearButton",function(){var o=i.props,s=o.isClearable,l=o.selected,c=o.startDate,h=o.endDate,d=o.clearButtonTitle,p=o.clearButtonClassName,m=p===void 0?"":p,v=o.ariaLabelClose,y=v===void 0?"Close":v;return!s||l==null&&c==null&&h==null?null:q.createElement("button",{type:"button",className:"react-datepicker__close-icon ".concat(m).trim(),"aria-label":y,onClick:i.onClearClick,title:d,tabIndex:-1})}),i.state=i.calcInitialState(),i}return dr(n,[{key:"componentDidMount",value:function(){window.addEventListener("scroll",this.onScroll,!0)}},{key:"componentDidUpdate",value:function(r,i){var o,s;r.inline&&(o=r.selected,s=this.props.selected,o&&s?jr(o)!==jr(s)||le(o)!==le(s):o!==s)&&this.setPreSelection(this.props.selected),this.state.monthSelectedIn!==void 0&&r.monthsShown!==this.props.monthsShown&&this.setState({monthSelectedIn:0}),r.highlightDates!==this.props.highlightDates&&this.setState({highlightDates:C3(this.props.highlightDates)}),i.focused||rl(r.selected,this.props.selected)||this.setState({inputValue:null}),i.open!==this.state.open&&(i.open===!1&&this.state.open===!0&&this.props.onCalendarOpen(),i.open===!0&&this.state.open===!1&&this.props.onCalendarClose())}},{key:"componentWillUnmount",value:function(){this.clearPreventFocusTimeout(),window.removeEventListener("scroll",this.onScroll,!0)}},{key:"renderInputContainer",value:function(){var r=this.props.showIcon;return q.createElement("div",{className:"react-datepicker__input-container".concat(r?" react-datepicker__view-calendar-icon":"")},r&&q.createElement("svg",{className:"react-datepicker__calendar-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},q.createElement("path",{d:"M96 32V64H48C21.5 64 0 85.5 0 112v48H448V112c0-26.5-21.5-48-48-48H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V64H160V32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192H0V464c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V192z"})),this.state.isRenderAriaLiveMessage&&this.renderAriaLiveRegion(),this.renderDateInput(),this.renderClearButton())}},{key:"render",value:function(){var r=this.renderCalendar();if(this.props.inline)return r;if(this.props.withPortal){var i=this.state.open?q.createElement(rU,{enableTabLoop:this.props.enableTabLoop},q.createElement("div",{className:"react-datepicker__portal",tabIndex:-1,onKeyDown:this.onPortalKeyDown},r)):null;return this.state.open&&this.props.portalId&&(i=q.createElement(nU,{portalId:this.props.portalId,portalHost:this.props.portalHost},i)),q.createElement("div",null,this.renderInputContainer(),i)}return q.createElement(ext,{className:this.props.popperClassName,wrapperClassName:this.props.wrapperClassName,hidePopper:!this.isCalendarOpen(),portalId:this.props.portalId,portalHost:this.props.portalHost,popperModifiers:this.props.popperModifiers,targetComponent:this.renderInputContainer(),popperContainer:this.props.popperContainer,popperComponent:r,popperPlacement:this.props.popperPlacement,popperProps:this.props.popperProps,popperOnKeyDown:this.onPopperKeyDown,enableTabLoop:this.props.enableTabLoop})}}],[{key:"defaultProps",get:function(){return{allowSameDay:!1,dateFormat:"MM/dd/yyyy",dateFormatCalendar:"LLLL yyyy",onChange:function(){},disabled:!1,disabledKeyboardNavigation:!1,dropdownMode:"scroll",onFocus:function(){},onBlur:function(){},onKeyDown:function(){},onInputClick:function(){},onSelect:function(){},onClickOutside:function(){},onMonthChange:function(){},onCalendarOpen:function(){},onCalendarClose:function(){},preventOpenOnFocus:!1,onYearChange:function(){},onInputError:function(){},monthsShown:1,readOnly:!1,withPortal:!1,selectsDisabledDaysInRange:!1,shouldCloseOnSelect:!0,showTimeSelect:!1,showTimeInput:!1,showPreviousMonths:!1,showMonthYearPicker:!1,showFullMonthYearPicker:!1,showTwoColumnMonthYearPicker:!1,showFourColumnMonthYearPicker:!1,showYearPicker:!1,showQuarterYearPicker:!1,strictParsing:!1,timeIntervals:30,timeCaption:"Time",previousMonthAriaLabel:"Previous Month",previousMonthButtonLabel:"Previous Month",nextMonthAriaLabel:"Next Month",nextMonthButtonLabel:"Next Month",previousYearAriaLabel:"Previous Year",previousYearButtonLabel:"Previous Year",nextYearAriaLabel:"Next Year",nextYearButtonLabel:"Next Year",timeInputLabel:"Time",enableTabLoop:!0,yearItemNumber:um,focusSelectedMonth:!1,showPopperArrow:!0,excludeScrollbar:!0,customTimeInput:null,calendarStartDay:void 0}}}]),n}(),ixt="input",A2="navigate";const bO=t=>{const{className:e,isClearable:n,selected:r,dateFormat:i}=t,o=!n||Fu(r),s=U.useRef();return b.jsxs("div",{className:"icon-input-container",children:[b.jsx(rxt,{...t,popperModifiers:[{name:"arrow",options:{padding:24}}],dateFormat:i??l7,className:de("icon-input-container__input form-control",e),ref:s}),o&&b.jsx(zt,{icon:$ft,className:"icon-input-container__icon",onClick:()=>{var l;return(l=s.current)==null?void 0:l.input.focus()}})]})},oxt=t=>b.jsx(bO,{...t,dateFormat:VP,showTimeSelect:!0,timeIntervals:10}),R2=({children:t,infoTooltip:e,checked:n,onChange:r})=>b.jsxs("p",{children:[b.jsx(O$,{inline:!0,checked:n,className:e?"me-2":"",onChange:r,children:t}),e&&b.jsx(f_,{placement:"right",children:e})]}),sxt=({isOpen:t,toggle:e})=>b.jsxs(Ca,{isOpen:t,toggle:e,centered:!0,size:"lg",children:[b.jsx(ka,{toggle:e,children:"Info"}),b.jsxs(Ss,{children:[b.jsxs("p",{children:["When the ",b.jsx("b",{children:b.jsx("i",{children:'"Use existing URL if found"'})})," checkbox is checked, the server will return an existing short URL if it matches provided params."]}),b.jsx("p",{children:"These are the checks performed by Shlink in order to determine if an existing short URL should be returned:"}),b.jsxs("ul",{children:[b.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."}),b.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.",b.jsx("br",{}),"If the slug is being used by another long URL, an error will be returned."]}),b.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"})]})]})]}),axt=()=>{const[t,e]=zn();return b.jsxs(b.Fragment,{children:[b.jsx("span",{title:"What does this mean?",children:b.jsx(zt,{icon:Tk,style:{cursor:"pointer"},onClick:e})}),b.jsx(sxt,{isOpen:t,toggle:e})]})},j2=t=>typeof t=="string"?_a(t):t,lxt=t=>"shortCodeLength"in t&&"customSlug"in t&&"domain"in t,cxt=(t,e)=>function({mode:n,saving:r,onSave:i,initialState:o}){const[s,l]=U.useState(o),c=()=>l(o),h=Xg("deviceLongUrls"),d=n==="edit",p=lxt(s),m=n==="create-basic",v=O=>l({...s,tags:O}),y=(O,k)=>ss(O)?O:ss(k)?null:void 0,_=P1(async()=>i({...s,validSince:Ml(s.validSince)??null,validUntil:Ml(s.validUntil)??null,maxVisits:ss(s.maxVisits)?Number(s.maxVisits):null}).then(()=>!d&&c()).catch(()=>{}));U.useEffect(()=>{l(o)},[o]);const T=(O,k,P="text",A={},j={})=>b.jsx(Ai,{...j,children:b.jsx(dd,{id:O,type:P,placeholder:k,value:s[O]??"",onChange:A.onChange??(B=>l({...s,[O]:B.target.value})),...A})}),x=(O,k,P)=>{var A;return b.jsx(J0t,{icon:P,id:O,type:"url",placeholder:k,value:((A=s.deviceLongUrls)==null?void 0:A[O])??"",onChange:j=>{var B;return l({...s,deviceLongUrls:{...s.deviceLongUrls??{},[O]:y(j.target.value,(B=o.deviceLongUrls)==null?void 0:B[O])}})}})},w=(O,k,P={})=>b.jsx(oxt,{selected:s[O]?j2(s[O]):null,placeholderText:k,isClearable:!0,onChange:A=>l({...s,[O]:A}),...P}),E=b.jsxs(b.Fragment,{children:[b.jsx(Ai,{children:b.jsx(dd,{bsSize:"lg",type:"url",placeholder:"URL to be shortened",required:!0,value:s.longUrl,onChange:O=>l({...s,longUrl:O.target.value})})}),b.jsxs(qr,{children:[m&&T("customSlug","Custom slug","text",{bsSize:"lg"},{className:"col-lg-6"}),b.jsx("div",{className:m?"col-lg-6 mb-3":"col-12",children:b.jsx(t,{selectedTags:s.tags??[],onChange:v})})]})]});return b.jsxs("form",{name:"shortUrlForm",className:"short-url-form",onSubmit:_,children:[m&&E,!m&&b.jsxs(b.Fragment,{children:[b.jsxs(qr,{children:[b.jsx("div",{className:de("mb-3",{"col-sm-6":h,"col-12":!h}),children:b.jsx(Bn,{title:"Main options",className:"mb-3",children:E})}),h&&b.jsx("div",{className:"col-sm-6 mb-3",children:b.jsxs(Bn,{title:"Device-specific long URLs",children:[b.jsx(Ai,{children:x("android","Android-specific redirection",Wft)}),b.jsx(Ai,{children:x("ios","iOS-specific redirection",Hft)}),x("desktop","Desktop-specific redirection",Yet)]})})]}),b.jsxs(qr,{children:[b.jsx("div",{className:"col-sm-6 mb-3",children:b.jsxs(Bn,{title:"Customize the short URL",children:[T("title","Title","text",{onChange:({target:O})=>l({...s,title:y(O.value,o.title)})}),!d&&p&&b.jsxs(b.Fragment,{children:[b.jsxs(qr,{children:[b.jsx("div",{className:"col-lg-6",children:T("customSlug","Custom slug","text",{disabled:ss(s.shortCodeLength)})}),b.jsx("div",{className:"col-lg-6",children:T("shortCodeLength","Short code length","number",{min:4,disabled:ss(s.customSlug)})})]}),b.jsx(e,{value:s.domain,onChange:O=>l({...s,domain:O})})]})]})}),b.jsx("div",{className:"col-sm-6 mb-3",children:b.jsxs(Bn,{title:"Limit access to the short URL",children:[T("maxVisits","Maximum number of visits allowed","number",{min:1}),b.jsx("div",{className:"mb-3",children:w("validSince","Enabled since...",{maxDate:s.validUntil?j2(s.validUntil):void 0})}),w("validUntil","Enabled until...",{minDate:s.validSince?j2(s.validSince):void 0})]})})]}),b.jsxs(qr,{children:[b.jsx("div",{className:"col-sm-6 mb-3",children:b.jsxs(Bn,{title:"Extra checks",children:[b.jsx(R2,{infoTooltip:"If checked, Shlink will try to reach the long URL, failing in case it's not publicly accessible.",checked:s.validateUrl,onChange:O=>l({...s,validateUrl:O}),children:"Validate URL"}),!d&&p&&b.jsxs("p",{children:[b.jsx(O$,{inline:!0,className:"me-2",checked:s.findIfExists,onChange:O=>l({...s,findIfExists:O}),children:"Use existing URL if found"}),b.jsx(axt,{})]})]})}),b.jsx("div",{className:"col-sm-6 mb-3",children:b.jsxs(Bn,{title:"Configure behavior",children:[b.jsx(R2,{infoTooltip:"This short URL will be included in the robots.txt for your Shlink instance, allowing web crawlers (like Google) to index it.",checked:s.crawlable,onChange:O=>l({...s,crawlable:O}),children:"Make it crawlable"}),b.jsx(R2,{infoTooltip:"When this short URL is visited, any query params appended to it will be forwarded to the long URL.",checked:s.forwardQuery,onChange:O=>l({...s,forwardQuery:O}),children:"Forward query params on redirect"})]})})]})]}),b.jsx("div",{className:"text-center",children:b.jsx(ke,{outline:!0,color:"primary",disabled:r||qi(s.longUrl),className:"btn-xs-block",children:r?"Saving...":"Save"})})]})},uxt=({active:t,allText:e,onChange:n})=>b.jsxs(b.Fragment,{children:[b.jsx(Zt,{active:t==="all",onClick:()=>n("all"),children:e}),b.jsx(Zt,{divider:!0}),f_t.map(r=>b.jsx(Zt,{active:t===r,onClick:()=>n(r),children:f7(r)},r))]}),hxt=({startDate:t=null,endDate:e=null,disabled:n=!1,onStartDateChange:r,onEndDateChange:i})=>b.jsxs("div",{className:"row",children:[b.jsx("div",{className:"col-md-6",children:b.jsx(bO,{selected:t,placeholderText:"Since...",isClearable:!0,maxDate:e??void 0,disabled:n,onChange:r})}),b.jsx("div",{className:"col-md-6",children:b.jsx(bO,{className:"mt-2 mt-md-0",selected:e,placeholderText:"Until...",isClearable:!0,minDate:t??void 0,disabled:n,onChange:o=>i(o&&xu(o))})})]}),iU=({onDatesChange:t,initialDateRange:e,defaultText:n,disabled:r,updatable:i=!1})=>{const o=nb(e),[s,l]=U.useState(o?e:void 0),[c,h]=U.useState(o?void 0:e),d=m=>{l(h7(m)?Jg:void 0),h(m),t(m)},p=m=>{l(m),h(void 0),t(p7(m))};return i&&f0t(()=>{const m=nb(e);m&&p(e),e&&!m&&d(e)},[e]),b.jsxs(Pa,{disabled:r,text:f7(s??c)??n,children:[b.jsx(uxt,{allText:n,active:s,onChange:p}),b.jsx(Zt,{divider:!0}),b.jsx(Zt,{header:!0,children:"Custom:"}),b.jsx(Zt,{text:!0,children:b.jsx(hxt,{...c,onStartDateChange:m=>d({...c,startDate:m}),onEndDateChange:m=>d({...c,endDate:m})})})]})},dxt={dateCreated:"Created at",shortCode:"Short URL",longUrl:"Long URL",title:"Title",visits:"Visits"},fxt=({onChange:t,selected:e={},className:n,supportsDisabledFiltering:r})=>{const{excludeBots:i=!1,excludeMaxVisitsReached:o=!1,excludePastValidUntil:s=!1}=e,l=c=>()=>t({...e,[c]:!(e!=null&&e[c])});return b.jsxs(Pa,{text:"Filters",dropdownClassName:n,inline:!0,end:!0,minWidth:250,children:[b.jsx(Zt,{header:!0,children:"Visits:"}),b.jsx(Zt,{active:i,onClick:l("excludeBots"),children:"Ignore visits from bots"}),r&&b.jsxs(b.Fragment,{children:[b.jsx(Zt,{divider:!0}),b.jsx(Zt,{header:!0,children:"Short URLs:"}),b.jsx(Zt,{active:o,onClick:l("excludeMaxVisitsReached"),children:"Exclude with visits reached"}),b.jsx(Zt,{active:s,onClick:l("excludePastValidUntil"),children:"Exclude enabled in the past"})]}),b.jsx(Zt,{divider:!0}),b.jsx(Zt,{disabled:!ss(e),onClick:()=>t({excludeBots:!1,excludeMaxVisitsReached:!1,excludePastValidUntil:!1}),children:b.jsx("i",{children:"Clear filters"})})]})},pxt=(t,e)=>({className:n,shortUrlsAmount:r,order:i,handleOrderBy:o})=>{const[s,l]=M1(),{search:c,tags:h,startDate:d,endDate:p,excludeBots:m,excludeMaxVisitsReached:v,excludePastValidUntil:y,tagsMode:_="any"}=s,T=Xg("filterDisabledUrls"),x=zu("visits"),w=cr(({startDate:P,endDate:A})=>({startDate:Ml(P)??void 0,endDate:Ml(A)??void 0}),l),E=cr(P=>qi(P)?void 0:P,P=>l({search:P})),O=P=>l({tags:P}),k=cr(()=>_==="any"?"all":"any",P=>l({tagsMode:P}));return b.jsxs("div",{className:de("short-urls-filtering-bar-container",n),children:[b.jsx(Wg,{initialValue:c,onChange:E}),b.jsxs(y1,{className:"mt-3",children:[b.jsx(e,{allowNew:!1,placeholder:"With tags...",selectedTags:h,onChange:O}),h.length>1&&b.jsxs(b.Fragment,{children:[b.jsx(ke,{outline:!0,color:"secondary",onClick:k,id:"tagsModeBtn","aria-label":"Change tags mode",children:b.jsx(zt,{className:"short-urls-filtering-bar__tags-icon",icon:_==="all"?G8:_et})}),b.jsx(fi,{target:"tagsModeBtn",placement:"left",children:_==="all"?"With all the tags.":"With any of the tags."})]})]}),b.jsxs(qr,{className:"flex-lg-row-reverse",children:[b.jsx("div",{className:"col-lg-8 col-xl-6 mt-3",children:b.jsxs("div",{className:"d-md-flex",children:[b.jsx("div",{className:"flex-fill",children:b.jsx(iU,{defaultText:"All short URLs",initialDateRange:d7(d,p),onDatesChange:w})}),b.jsx(fxt,{className:"ms-0 ms-md-2 mt-3 mt-md-0",selected:{excludeBots:m??(x==null?void 0:x.excludeBots),excludeMaxVisitsReached:v,excludePastValidUntil:y},onChange:l,supportsDisabledFiltering:T})]})}),b.jsx("div",{className:"col-6 col-lg-4 col-xl-6 mt-3",children:b.jsx(t,{amount:r})}),b.jsx("div",{className:"col-6 d-lg-none mt-3",children:b.jsx(Yg,{prefixed:!1,items:dxt,order:i,onChange:o})})]})]})};function hm({currentOrder:t,field:e,className:n="ms-1"}){return!t.dir||t.field!==e?null:b.jsx(zt,{icon:t.dir==="ASC"?det:Tet,className:n})}const ih=2,xO="...",oU=(t,e)=>{const n=LP(bz(ih,t-ih),Az(e-1,t+ih)+1);return t-ih>ih&&n.unshift(xO),t+iht===xO,sU=t=>pg(t)?t:Qn(t),aU=(t,e)=>pg(t)?`${t}_${e}`:`${t}`,mxt=({paginator:t,currentQueryString:e=""})=>{const{currentPage:n=0,pagesCount:r=0}=t??{},i=Bu(),o=l=>`${i}/list-short-urls/${l}${e}`;if(r<=1)return b.jsx("div",{className:"pb-3"});const s=()=>oU(n,r).map((l,c)=>b.jsx(nu,{disabled:pg(l),active:n===l,children:b.jsx(ru,{tag:nn,to:o(l),children:sU(l)})},aU(l,c)));return b.jsxs(eP,{className:"sticky-card-paginator py-3",listClassName:"flex-wrap justify-content-center mb-0",children:[b.jsx(nu,{disabled:n===1,children:b.jsx(ru,{previous:!0,tag:nn,to:o(n-1)})}),s(),b.jsx(nu,{disabled:n>=r,children:b.jsx(ru,{next:!0,tag:nn,to:o(n+1)})})]})},gxt={field:"dateCreated",dir:"DESC"},vxt=(t,e)=>zl(({listShortUrls:n,shortUrlsList:r})=>{var i,o,s;const{page:l}=ju(),c=Un(),[h,d]=M1(),p=GP(),{tags:m,search:v,startDate:y,endDate:_,orderBy:T,tagsMode:x,excludeBots:w,excludePastValidUntil:E,excludeMaxVisitsReached:O}=h,[k,P]=U.useState(T??((i=p.shortUrlsList)==null?void 0:i.defaultOrdering)??gxt),{pagination:A}=(r==null?void 0:r.shortUrls)??{},j=w??((o=p.visits)==null?void 0:o.excludeBots),B=Xg("excludeBotsOnShortUrls"),N=(J,et)=>{d({orderBy:{field:J,dir:et}}),P({field:J,dir:et})},V=J=>()=>N(J,x1(J,k.field,k.dir)),Y=J=>b.jsx(hm,{currentOrder:k,field:J}),nt=cr(J=>[...new Set([...m,J])],J=>d({tags:J})),K=({field:J,dir:et})=>B&&j&&J==="visits"?{field:"nonBotVisits",dir:et}:{field:J,dir:et};return U.useEffect(()=>{n({page:l,searchTerm:v,tags:m,startDate:y,endDate:_,orderBy:K(k),tagsMode:x,excludePastValidUntil:E,excludeMaxVisitsReached:O})},[l,v,m,y,_,k.field,k.dir,x,E,O]),b.jsxs(b.Fragment,{children:[b.jsx(e,{shortUrlsAmount:(s=r.shortUrls)==null?void 0:s.pagination.totalItems,order:k,handleOrderBy:N,className:"mb-3"}),b.jsxs(zi,{body:!0,className:"pb-0",children:[b.jsx(t,{shortUrlsList:r,orderByColumn:V,renderOrderIcon:Y,onTagClick:nt}),b.jsx(mxt,{paginator:A,currentQueryString:c.search})]})]})},()=>[co.visits]),yxt=t=>({orderByColumn:e,renderOrderIcon:n,shortUrlsList:r,onTagClick:i,className:o})=>{const{error:s,loading:l,shortUrls:c}=r,h=de({"short-urls-table__header-cell--with-action":!!e}),d=de("short-urls-table__header-cell",h),p=de("table table-hover responsive-table short-urls-table",o),m=()=>s?b.jsx("tr",{children:b.jsx("td",{colSpan:6,className:"text-center table-danger text-dark",children:"Something went wrong while loading short URLs :("})}):l?b.jsx("tr",{children:b.jsx("td",{colSpan:6,className:"text-center",children:"Loading..."})}):!l&&qi(c==null?void 0:c.data)?b.jsx("tr",{children:b.jsx("td",{colSpan:6,className:"text-center",children:"No results found"})}):c==null?void 0:c.data.map(v=>b.jsx(t,{shortUrl:v,onTagClick:i},v.shortUrl));return b.jsxs("table",{className:p,children:[b.jsx("thead",{className:"responsive-table__header short-urls-table__header",children:b.jsxs("tr",{children:[b.jsxs("th",{className:d,onClick:e==null?void 0:e("dateCreated"),children:["Created at ",n==null?void 0:n("dateCreated")]}),b.jsxs("th",{className:d,onClick:e==null?void 0:e("shortCode"),children:["Short URL ",n==null?void 0:n("shortCode")]}),b.jsxs("th",{className:"short-urls-table__header-cell",children:[b.jsxs("span",{className:h,onClick:e==null?void 0:e("title"),children:["Title ",n==null?void 0:n("title")]}),"  /  ",b.jsxs("span",{className:h,onClick:e==null?void 0:e("longUrl"),children:[b.jsx("span",{className:"indivisible",children:"Long URL"})," ",n==null?void 0:n("longUrl")]})]}),b.jsx("th",{className:"short-urls-table__header-cell",children:"Tags"}),b.jsx("th",{className:d,onClick:e==null?void 0:e("visits"),children:b.jsxs("span",{className:"indivisible",children:["Visits ",n==null?void 0:n("visits")]})}),b.jsx("th",{className:"short-urls-table__header-cell",colSpan:2})]})}),b.jsx("tbody",{children:m()})]})},_xt=(t,e)=>{t.serviceFactory("ShortUrlsList",vxt,"ShortUrlsTable","ShortUrlsFilteringBar"),t.decorator("ShortUrlsList",e(["mercureInfo","shortUrlsList"],["listShortUrls","createNewVisits","loadMercureInfo"])),t.serviceFactory("ShortUrlsTable",yxt,"ShortUrlsRow"),t.serviceFactory("ShortUrlsRow",W0t,"ShortUrlsRowMenu","ColorGenerator","useTimeoutToggle"),t.serviceFactory("ShortUrlsRowMenu",Y0t,"DeleteShortUrlModal","QrCodeModal"),t.serviceFactory("CreateShortUrlResult",R0t,"useTimeoutToggle"),t.serviceFactory("ShortUrlForm",cxt,"TagsSelector","DomainSelector"),t.serviceFactory("CreateShortUrl",X_t,"ShortUrlForm","CreateShortUrlResult"),t.decorator("CreateShortUrl",e(["shortUrlCreation"],["createShortUrl","resetCreateShortUrl"])),t.serviceFactory("EditShortUrl",p0t,"ShortUrlForm"),t.decorator("EditShortUrl",e(["shortUrlDetail","shortUrlEdition"],["getShortUrlDetail","editShortUrl"])),t.serviceFactory("DeleteShortUrlModal",()=>j0t),t.decorator("DeleteShortUrlModal",e(["shortUrlDeletion"],["deleteShortUrl","shortUrlDeleted","resetDeleteShortUrl"])),t.serviceFactory("QrCodeModal",B0t,"ImageDownloader"),t.serviceFactory("ShortUrlsFilteringBar",pxt,"ExportShortUrlsBtn","TagsSelector"),t.serviceFactory("ExportShortUrlsBtn",N0t,"apiClientFactory","ReportExporter"),t.serviceFactory("shortUrlsListReducerCreator",z_t,"listShortUrls","editShortUrl","createShortUrl"),t.serviceFactory("shortUrlsListReducer",Se("reducer"),"shortUrlsListReducerCreator"),t.serviceFactory("shortUrlCreationReducerCreator",G0t,"createShortUrl"),t.serviceFactory("shortUrlCreationReducer",Se("reducer"),"shortUrlCreationReducerCreator"),t.serviceFactory("shortUrlEditionReducerCreator",Q0t,"editShortUrl"),t.serviceFactory("shortUrlEditionReducer",Se("reducer"),"shortUrlEditionReducerCreator"),t.serviceFactory("shortUrlDeletionReducerCreator",F_t,"deleteShortUrl"),t.serviceFactory("shortUrlDeletionReducer",Se("reducer"),"shortUrlDeletionReducerCreator"),t.serviceFactory("shortUrlDetailReducerCreator",q0t,"apiClientFactory"),t.serviceFactory("shortUrlDetailReducer",Se("reducer"),"shortUrlDetailReducerCreator"),t.serviceFactory("listShortUrls",$_t,"apiClientFactory"),t.serviceFactory("createShortUrl",Z0t,"apiClientFactory"),t.serviceFactory("resetCreateShortUrl",Se("resetCreateShortUrl"),"shortUrlCreationReducerCreator"),t.serviceFactory("deleteShortUrl",I_t,"apiClientFactory"),t.serviceFactory("resetDeleteShortUrl",Se("resetDeleteShortUrl"),"shortUrlDeletionReducerCreator"),t.serviceFactory("shortUrlDeleted",()=>y7),t.serviceFactory("getShortUrlDetail",Se("getShortUrlDetail"),"shortUrlDetailReducerCreator"),t.serviceFactory("editShortUrl",X0t,"apiClientFactory")},bxt=({tag:t,toggle:e,isOpen:n,deleteTag:r,tagDelete:i,tagDeleted:o})=>{const{deleting:s,error:l,deleted:c,errorData:h}=i;return b.jsxs(Ca,{toggle:e,isOpen:n,centered:!0,onClosed:()=>c&&o(t),children:[b.jsx(ka,{toggle:e,className:"text-danger",children:"Delete tag"}),b.jsxs(Ss,{children:["Are you sure you want to delete tag ",b.jsx("b",{children:t}),"?",l&&b.jsx(Ii,{type:"error",small:!0,className:"mt-2",children:b.jsx(ya,{errorData:h,fallbackMessage:"Something went wrong while deleting the tag :("})})]}),b.jsxs(Nu,{children:[b.jsx(ke,{color:"link",onClick:e,children:"Cancel"}),b.jsx(ke,{color:"danger",disabled:s,onClick:async()=>{await r(t),e()},children:s?"Deleting tag...":"Delete tag"})]})]})};function D1(){return(D1=Object.assign||function(t){for(var e=1;e=0||(i[n]=t[n]);return i}function wO(t){var e=U.useRef(t),n=U.useRef(function(r){e.current&&e.current(r)});return e.current=t,n.current}var mg=function(t,e,n){return e===void 0&&(e=0),n===void 0&&(n=1),t>n?n:t0:T.buttons>0)&&i.current?o(M3(i.current,T,l.current)):_(!1)},y=function(){return _(!1)};function _(T){var x=c.current,w=SO(i.current),E=T?w.addEventListener:w.removeEventListener;E(x?"touchmove":"mousemove",v),E(x?"touchend":"mouseup",y)}return[function(T){var x=T.nativeEvent,w=i.current;if(w&&(A3(x),!function(O,k){return k&&!dm(O)}(x,c.current)&&w)){if(dm(x)){c.current=!0;var E=x.changedTouches||[];E.length&&(l.current=E[0].identifier)}w.focus(),o(M3(w,x,l.current)),_(!0)}},function(T){var x=T.which||T.keyCode;x<37||x>40||(T.preventDefault(),s({left:x===39?.05:x===37?-.05:0,top:x===40?.05:x===38?-.05:0}))},_]},[s,o]),d=h[0],p=h[1],m=h[2];return U.useEffect(function(){return m},[m]),q.createElement("div",D1({},r,{onTouchStart:d,onMouseDown:d,className:"react-colorful__interactive",ref:i,onKeyDown:p,tabIndex:0,role:"slider"}))}),aL=function(t){return t.filter(Boolean).join(" ")},uU=function(t){var e=t.color,n=t.left,r=t.top,i=r===void 0?.5:r,o=aL(["react-colorful__pointer",t.className]);return q.createElement("div",{className:o,style:{top:100*i+"%",left:100*n+"%"}},q.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:e}}))},Sr=function(t,e,n){return e===void 0&&(e=0),n===void 0&&(n=Math.pow(10,e)),Math.round(n*t)/n},xxt=function(t){return Oxt(TO(t))},TO=function(t){return t[0]==="#"&&(t=t.substring(1)),t.length<6?{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:t.length===4?Sr(parseInt(t[3]+t[3],16)/255,2):1}:{r:parseInt(t.substring(0,2),16),g:parseInt(t.substring(2,4),16),b:parseInt(t.substring(4,6),16),a:t.length===8?Sr(parseInt(t.substring(6,8),16)/255,2):1}},wxt=function(t){return Ext(Txt(t))},Sxt=function(t){var e=t.s,n=t.v,r=t.a,i=(200-e)*n/100;return{h:Sr(t.h),s:Sr(i>0&&i<200?e*n/100/(i<=100?i:200-i)*100:0),l:Sr(i/2),a:Sr(r,2)}},EO=function(t){var e=Sxt(t);return"hsl("+e.h+", "+e.s+"%, "+e.l+"%)"},Txt=function(t){var e=t.h,n=t.s,r=t.v,i=t.a;e=e/360*6,n/=100,r/=100;var o=Math.floor(e),s=r*(1-n),l=r*(1-(e-o)*n),c=r*(1-(1-e+o)*n),h=o%6;return{r:Sr(255*[r,l,s,s,c,r][h]),g:Sr(255*[c,r,r,l,s,s][h]),b:Sr(255*[s,s,c,r,r,l][h]),a:Sr(i,2)}},fy=function(t){var e=t.toString(16);return e.length<2?"0"+e:e},Ext=function(t){var e=t.r,n=t.g,r=t.b,i=t.a,o=i<1?fy(Sr(255*i)):"";return"#"+fy(e)+fy(n)+fy(r)+o},Oxt=function(t){var e=t.r,n=t.g,r=t.b,i=t.a,o=Math.max(e,n,r),s=o-Math.min(e,n,r),l=s?o===e?(n-r)/s:o===n?2+(r-e)/s:4+(e-n)/s:0;return{h:Sr(60*(l<0?l+6:l)),s:Sr(o?s/o*100:0),v:Sr(o/255*100),a:i}},Cxt=q.memo(function(t){var e=t.hue,n=t.onChange,r=aL(["react-colorful__hue",t.className]);return q.createElement("div",{className:r},q.createElement(cU,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:mg(e+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":Sr(e),"aria-valuemax":"360","aria-valuemin":"0"},q.createElement(uU,{className:"react-colorful__hue-pointer",left:e/360,color:EO({h:e,s:100,v:100,a:1})})))}),kxt=q.memo(function(t){var e=t.hsva,n=t.onChange,r={backgroundColor:EO({h:e.h,s:100,v:100,a:1})};return q.createElement("div",{className:"react-colorful__saturation",style:r},q.createElement(cU,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:mg(e.s+100*i.left,0,100),v:mg(e.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+Sr(e.s)+"%, Brightness "+Sr(e.v)+"%"},q.createElement(uU,{className:"react-colorful__saturation-pointer",top:1-e.v/100,left:e.s/100,color:EO(e)})))}),hU=function(t,e){if(t===e)return!0;for(var n in t)if(t[n]!==e[n])return!1;return!0},Pxt=function(t,e){return t.toLowerCase()===e.toLowerCase()||hU(TO(t),TO(e))};function Lxt(t,e,n){var r=wO(n),i=U.useState(function(){return t.toHsva(e)}),o=i[0],s=i[1],l=U.useRef({color:e,hsva:o});U.useEffect(function(){if(!t.equal(e,l.current.color)){var h=t.toHsva(e);l.current={hsva:h,color:e},s(h)}},[e,t]),U.useEffect(function(){var h;hU(o,l.current.hsva)||t.equal(h=t.fromHsva(o),l.current.color)||(l.current={hsva:o,color:h},r(h))},[o,t,r]);var c=U.useCallback(function(h){s(function(d){return Object.assign({},d,h)})},[]);return[o,c]}var Mxt=typeof window<"u"?U.useLayoutEffect:U.useEffect,Axt=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},R3=new Map,Rxt=function(t){Mxt(function(){var e=t.current?t.current.ownerDocument:document;if(e!==void 0&&!R3.has(e)){var n=e.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}`,R3.set(e,n);var r=Axt();r&&n.setAttribute("nonce",r),e.head.appendChild(n)}},[])},jxt=function(t){var e=t.className,n=t.colorModel,r=t.color,i=r===void 0?n.defaultColor:r,o=t.onChange,s=lU(t,["className","colorModel","color","onChange"]),l=U.useRef(null);Rxt(l);var c=Lxt(n,i,o),h=c[0],d=c[1],p=aL(["react-colorful",e]);return q.createElement("div",D1({},s,{ref:l,className:p}),q.createElement(kxt,{hsva:h,onChange:d}),q.createElement(Cxt,{hue:h.h,onChange:d,className:"react-colorful__last-control"}))},Nxt={defaultColor:"000",toHsva:xxt,fromHsva:function(t){return wxt({h:t.h,s:t.s,v:t.v,a:1})},equal:Pxt},Dxt=function(t){return q.createElement(jxt,D1({},t,{colorModel:Nxt}))};const Ixt=({getColorForKey:t})=>({tag:e,editTag:n,toggle:r,tagEdited:i,isOpen:o,tagEdit:s})=>{const[l,c]=U.useState(e),[h,d]=U.useState(t(e)),[p,m,,v]=zn(),{editing:y,error:_,edited:T,errorData:x}=s,w=P1(async()=>{await n({oldName:e,newName:l,color:h}),r()}),E=cr(v,()=>T&&i({oldName:e,newName:l,color:h}));return b.jsx(Ca,{isOpen:o,toggle:r,centered:!0,onClosed:E,children:b.jsxs("form",{name:"editTag",onSubmit:w,children:[b.jsx(ka,{toggle:r,children:"Edit tag"}),b.jsxs(Ss,{children:[b.jsxs(y1,{children:[b.jsx("div",{id:"colorPickerBtn",className:"input-group-text edit-tag-modal__color-picker-toggle",style:{backgroundColor:h,borderColor:h},onClick:m,children:b.jsx(zt,{icon:fet,className:"edit-tag-modal__color-icon"})}),b.jsx(tP,{isOpen:p,toggle:m,target:"colorPickerBtn",placement:"right",hideArrow:!0,popperClassName:"edit-tag-modal__popover",children:b.jsx(Dxt,{color:h,onChange:d})}),b.jsx(dd,{value:l,placeholder:"Tag",required:!0,onChange:({target:O})=>c(O.value)})]}),_&&b.jsx(Ii,{type:"error",small:!0,className:"mt-2",children:b.jsx(ya,{errorData:x,fallbackMessage:"Something went wrong while editing the tag :("})})]}),b.jsxs(Nu,{children:[b.jsx(ke,{type:"button",color:"link",onClick:r,children:"Cancel"}),b.jsx(ke,{color:"primary",disabled:y,children:y?"Saving...":"Save"})]})]})})},Fc={Enter:"Enter",Escape:"Escape",Tab:"Tab",Backspace:"Backspace",UpArrow:"ArrowUp",UpArrowCompat:"Up",DownArrow:"ArrowDown",DownArrowCompat:"Down",PageDown:"PageDown",PageUp:"PageUp"},lL=Symbol("Create new tag"),dU=Symbol("No options"),uh=()=>{},mr=q.createContext(void 0);function j3(t,e){return t===e?[]:t.filter(n=>!e.includes(n))}function Fxt(t){return t.selectionStart===0&&t.selectionEnd===0}function Bxt(t){const e=t.value.length;return t.selectionStart===e&&t.selectionEnd===e}function I1(t){return`${t}-label`}function $xt(t){return`${t}-combobox`}function zxt(t){return`${t}-input`}function fU(t){return`${t}-listbox`}function pU(t,e){return`${t}-option-${Gxt(e)}`}function Uxt(t,e){if((t==null?void 0:t.value)===lL&&t.disabled===!1)return{value:e,label:e}}function Vxt(t){const e=Uxt(t.activeOption,t.value)||t.activeOption||Qxt(t.value,t.options);return e&&!e.disabled?e:void 0}function Hxt(t,e,n){const r=e-1;return t>r?n:tn===t.value)}const qxt=/[-\\^$*+?.()|[\]{}]/g;function mU(t){return t.replace(qxt,"\\$&")}function gU(t){return new RegExp(mU(t),"i")}function Kxt(t){return new RegExp(`^${mU(t)}$`,"i")}function Xxt(t,e){if(t){const n=gU(t);return e.filter(r=>n.test(r.label))}else return[].concat(e)}function Qxt(t,e){const n=Kxt(t);return e.find(r=>n.test(r.label))||null}const Jxt={autoComplete:"off",autoCorrect:"off","data-form-type":"other",spellCheck:!1};function twt({allowBackspace:t,ariaDescribedBy:e,ariaErrorMessage:n,delimiterKeys:r}){const{id:i,comboBoxRef:o,inputRef:s,isDisabled:l,isInvalid:c,managerRef:h}=U.useContext(mr),d=U.useMemo(()=>{const y=B=>{const N=B.currentTarget.value;h.current.updateInputValue(N),document.activeElement===s.current&&h.current.listBoxExpand()},_=()=>{h.current.listBoxExpand()},T=B=>{var N;((N=o.current)==null?void 0:N.contains(B.relatedTarget))===!1&&h.current.listBoxCollapse()},x=()=>{h.current.listBoxExpand()},w=B=>{const{activeIndex:N,isExpanded:V}=h.current.state;V?(B.preventDefault(),h.current.updateActiveIndex(N+1)):(Bxt(B.currentTarget)||B.altKey)&&(B.preventDefault(),h.current.listBoxExpand())},E=B=>{const{activeIndex:N,isExpanded:V}=h.current.state;V?(B.preventDefault(),h.current.updateActiveIndex(N-1)):Fxt(B.currentTarget)&&(B.preventDefault(),h.current.listBoxExpand())},O=B=>{const{isExpanded:N,options:V}=h.current.state;N&&(B.preventDefault(),h.current.updateActiveIndex(V.length-1))},k=B=>{h.current.state.isExpanded&&(B.preventDefault(),h.current.updateActiveIndex(0))},P=()=>{h.current.state.isExpanded?h.current.listBoxCollapse():h.current.updateInputValue("")},A=()=>{if(t){const{value:B,selected:N}=h.current.state,V=N[N.length-1];B===""&&V&&h.current.selectTag(V)}},j=B=>{h.current.state.isExpanded&&(B.preventDefault(),h.current.selectTag())};return{onBlur:T,onChange:y,onClick:x,onFocus:_,onKeyDown:B=>{if(B.key===Fc.UpArrow)return E(B);if(B.key===Fc.DownArrow)return w(B);if(B.key===Fc.PageUp)return k(B);if(B.key===Fc.PageDown)return O(B);if(B.key===Fc.Escape)return P();if(B.key===Fc.Backspace)return A();if(r.includes(B.key))return j(B)}}},[t,o,r,s,h]),{activeOption:p,isExpanded:m,value:v}=h.current.state;return{...Jxt,"aria-autocomplete":"list","aria-activedescendant":p?pU(i,p):void 0,"aria-controls":fU(i),"aria-describedby":e||void 0,"aria-disabled":l,"aria-errormessage":c&&n||void 0,"aria-invalid":c,"aria-labelledby":I1(i),"aria-expanded":m,id:zxt(i),onBlur:l?uh:d.onBlur,onChange:l?uh:d.onChange,onClick:l?uh:d.onClick,onFocus:l?uh:d.onFocus,onKeyDown:l?uh:d.onKeyDown,ref:s,role:"combobox",type:"text",value:v}}const ewt={position:"absolute",width:0,height:0,visibility:"hidden",overflow:"scroll",whiteSpace:"pre"},nwt=["font-family","font-size","font-style","font-weight","letter-spacing","text-transform"];function rwt({allowResize:t=!0,text:e}){const n=U.useRef(null),{inputRef:r}=U.useContext(mr),[i,o]=U.useState(null);return U.useLayoutEffect(()=>{if(t&&r.current&&n.current&&window.getComputedStyle){const s=window.getComputedStyle(r.current);nwt.forEach(l=>{const c=s.getPropertyValue(l);n.current.style.setProperty(l,c)})}},[t,r,n]),U.useLayoutEffect(()=>{var s;if(t){const l=Math.ceil(((s=n.current)==null?void 0:s.scrollWidth)??0)+2;i!==l&&o(l)}},[t,e,i]),{width:i,sizerProps:{ref:n,style:ewt}}}function iwt(){const{id:t,inputRef:e,listBoxRef:n,managerRef:r}=U.useContext(mr),i=r.current.state.activeIndex===-1,o=U.useCallback(s=>{var l;s.target!==e.current&&((l=e.current)==null||l.focus({preventScroll:!0}))},[e]);return U.useEffect(()=>{var s;i&&((s=n.current)==null||s.scrollTo({top:0}))},[n,i]),{"aria-labelledby":I1(t),id:fU(t),onFocus:o,ref:n,role:"listbox",tabIndex:-1}}function owt({activateFirstOption:t,allowNew:e,collapseOnSelect:n,newOptionText:r,noOptionsText:i,onAdd:o,onDelete:s,onCollapse:l,onExpand:c,onInput:h,onShouldCollapse:d,onShouldExpand:p,onValidate:m,selected:v,suggestions:y,suggestionsTransform:_}){const T=U.useRef(),[x,w]=U.useState(null),[E,O]=U.useState(!1),[k,P]=U.useState(""),A=U.useMemo(()=>{const K=_(k,y);return k&&(e&&K.push({disabled:typeof m=="function"?!m(k):!1,label:r,value:lL}),K.length===0&&K.push({disabled:!0,label:i,value:dU})),K},[e,r,i,m,y,_,k]),j=x?CO(x,A):-1,B=t?Math.max(j,0):j,N=A[B],V={activeIndex:B,activeOption:N,isExpanded:E,options:A,selected:v,value:k},Y={tagsAdded:T.current?j3(v,T.current.state.selected):[],tagsDeleted:T.current?j3(T.current.state.selected,v):[]},nt={listBoxCollapse(){E&&((d==null?void 0:d(V.value))??!0)&&(O(!1),w(null),l==null||l())},listBoxExpand(){!E&&((p==null?void 0:p(V.value))??!0)&&(O(!0),w(A[B]),c==null||c())},updateActiveIndex(K){const J=Hxt(K,A.length,t?0:-1);w(A[J])},updateInputValue(K){k!==K&&(P(K),h==null||h(K))},selectTag(K){if(K??(K=Vxt(V)),K){const J=CO(K,V.selected);J>-1?s(J):o(K),n&&this.listBoxCollapse(),this.updateInputValue("")}}};return T.current={...nt,flags:Y,state:V},T}function swt(t){const{id:e,inputRef:n,managerRef:r}=U.useContext(mr),i=U.useRef(null),o=r.current.state.options[t],s=t===r.current.state.activeIndex,l=o.disabled??!1,c=CO(o,r.current.state.selected)>-1,h=U.useCallback(()=>{var p;r.current.selectTag(),(p=n.current)==null||p.focus()},[n,r]),d=U.useCallback(()=>{t!==r.current.state.activeIndex&&r.current.updateActiveIndex(t)},[t,r]);return U.useEffect(()=>{var p;s&&((p=i.current)==null||p.scrollIntoView({block:"nearest",inline:"start"}))},[s,r.current.state.options]),{option:{...o,active:s,disabled:l,index:t,selected:c},optionProps:{"aria-disabled":l,"aria-posinset":t+1,"aria-selected":l?void 0:c,"aria-setsize":r.current.state.options.length,id:pU(e,o),onClick:h,onMouseDown:d,ref:i,role:"option",tabIndex:-1}}}function awt({inputRef:t,managerRef:e}){return U.useRef({input:{blur(){var n;(n=t.current)==null||n.blur()},focus(){var n;(n=t.current)==null||n.focus()},get value(){return e.current.state.value},set value(n){typeof n!="string"&&(n=String(n)),e.current.updateInputValue(n)}},listBox:{collapse(){e.current.listBoxCollapse()},expand(){e.current.listBoxExpand()},get activeOption(){return e.current.state.activeOption},get isExpanded(){return e.current.state.isExpanded}},select(n){e.current.selectTag(n)}}).current}function lwt({onBlur:t,onFocus:e}){const[n,r]=U.useState(!1),{id:i,inputRef:o}=U.useContext(mr),s=U.useRef(null),l=U.useMemo(()=>({"aria-describedby":I1(i),id:i,onFocus(){r(!0),e==null||e()},onBlur(){var c;(c=s.current)!=null&&c.contains(document.activeElement)||(r(!1),t==null||t())},onClick(){var c;document.activeElement===s.current&&((c=o.current)==null||c.focus())},ref:s,tabIndex:-1}),[o,i,t,e,s]);return{isActive:n,rootProps:l}}function cwt(t,e){const{isDisabled:n,managerRef:r}=U.useContext(mr),i=r.current.state.selected[t],o=U.useCallback(()=>r.current.selectTag(i),[r,i]);return{tag:i,tagProps:{"aria-disabled":n,title:lb(e,i.label),onClick:n?uh:o}}}function uwt(){var t;const{inputRef:e,managerRef:n}=U.useContext(mr),r=U.useRef(),i=n.current.flags.tagsDeleted.length,o=(t=r.current)==null?void 0:t.contains(document.activeElement);return U.useLayoutEffect(()=>{var s,l;if(i){const c=(s=r.current)==null?void 0:s.contains(document.activeElement);o&&!c&&((l=e.current)==null||l.focus({preventScroll:!0}))}},[e,o,r,i]),{listRef:r}}const hwt={position:"absolute",width:1,height:1,left:-9999,overflow:"hidden",clip:"rect(0 0 0 0)"};function dwt({ariaAddedText:t,ariaDeletedText:e}){const{managerRef:n}=U.useContext(mr),r=U.useRef([]);return n.current.flags.tagsAdded.forEach(i=>{r.current.push(lb(t,i.label))}),n.current.flags.tagsDeleted.forEach(i=>{r.current.push(lb(e,i.label))}),q.createElement("div",{"aria-live":"polite","aria-relevant":"additions",role:"status",style:hwt},r.current.join(` -`))}function fwt({children:t}){const{classNames:e,comboBoxRef:n,id:r}=U.useContext(mr);return q.createElement("div",{className:e.comboBox,id:$xt(r),ref:n},t)}const pwt=({classNames:t,text:e})=>q.createElement("mark",{className:t.highlight},e);function mwt({option:t,query:e,render:n=pwt}){const{classNames:r}=U.useContext(mr);if(t.value===lL||t.value===dU)return q.createElement(q.Fragment,null,lb(t.label,e));if(e){const i=Yxt(t.label,e);if(i){const o=n({text:i[1],classNames:r});return q.createElement(q.Fragment,null,i[0],o,i[2])}}return q.createElement(q.Fragment,null,t.label)}const gwt=q.memo(mwt),vwt=({classNames:t,inputWidth:e,...n})=>q.createElement("input",{className:t.input,style:{width:e},...n});function ywt({allowBackspace:t=!0,allowResize:e=!0,ariaDescribedBy:n,ariaErrorMessage:r,delimiterKeys:i,placeholderText:o,render:s=vwt}){const{classNames:l}=U.useContext(mr),{value:c,...h}=twt({allowBackspace:t,ariaDescribedBy:n,ariaErrorMessage:r,delimiterKeys:i}),d=c.lengthq.createElement("div",{className:e.label,id:n},t);function bwt({children:t,render:e=_wt}){const{classNames:n,id:r}=U.useContext(mr);return e({children:t,classNames:n,id:I1(r)})}function xwt({children:t}){const{classNames:e,managerRef:n}=U.useContext(mr),r=iwt();return!n.current.state.isExpanded||q.Children.count(t)===0?null:q.createElement("div",{className:e.listBox,...r},t)}const wwt=({children:t,classNames:e,option:n,...r})=>{const i=[e.option];return n.active&&i.push(e.optionIsActive),q.createElement("div",{className:i.join(" "),...r},t)};function Swt({children:t,index:e,render:n=wwt}){const{classNames:r}=U.useContext(mr),{option:i,optionProps:o}=swt(e);return n({classNames:r,children:t,option:i,...o})}const Twt=({children:t,classNames:e,isActive:n,isDisabled:r,isInvalid:i,...o})=>{const s=[e.root];return n&&s.push(e.rootIsActive),r&&s.push(e.rootIsDisabled),i&&s.push(e.rootIsInvalid),q.createElement("div",{className:s.join(" "),...o},t)};function Ewt({children:t,onBlur:e,onFocus:n,render:r=Twt}){const{classNames:i,isDisabled:o,isInvalid:s}=U.useContext(mr),{isActive:l,rootProps:c}=lwt({onBlur:e,onFocus:n});return r({children:t,classNames:i,isActive:l,isDisabled:o,isInvalid:s,...c})}const Owt=({classNames:t,tag:e,...n})=>q.createElement("button",{type:"button",className:t.tag,...n},q.createElement("span",{className:t.tagName},e.label));function Cwt({render:t=Owt,index:e,title:n}){const{classNames:r}=U.useContext(mr),{tag:i,tagProps:o}=cwt(e,n);return t({classNames:r,tag:i,...o})}function kwt({children:t,label:e}){const{classNames:n}=U.useContext(mr),{listRef:r}=uwt();return q.createElement("ul",{className:n.tagList,"aria-label":e,ref:r,role:"list"},t.map(i=>q.createElement("li",{className:n.tagListItem,key:i.key,role:"listitem"},i)))}const Pwt={root:"react-tags",rootIsActive:"is-active",rootIsDisabled:"is-disabled",rootIsInvalid:"is-invalid",label:"react-tags__label",tagList:"react-tags__list",tagListItem:"react-tags__list-item",tag:"react-tags__tag",tagName:"react-tags__tag-name",comboBox:"react-tags__combobox",input:"react-tags__combobox-input",listBox:"react-tags__listbox",option:"react-tags__listbox-option",optionIsActive:"is-active",highlight:"react-tags__listbox-option-highlight"},Lwt=[Fc.Enter];function Mwt({activateFirstOption:t=!1,allowBackspace:e=!0,allowNew:n=!1,allowResize:r=!0,ariaAddedText:i="Added tag %value%",ariaDescribedBy:o,ariaErrorMessage:s,ariaDeletedText:l="Removed tag %value%",classNames:c=Pwt,collapseOnSelect:h=!1,deleteButtonText:d="Remove %value% from the list",delimiterKeys:p=Lwt,id:m="react-tags",isDisabled:v=!1,isInvalid:y=!1,labelText:_="Select tags",newOptionText:T="Add %value%",noOptionsText:x="No options found for %value%",onAdd:w,onBlur:E,onCollapse:O,onDelete:k,onExpand:P,onFocus:A,onInput:j,onShouldCollapse:B,onShouldExpand:N,onValidate:V,placeholderText:Y="Add a tag",renderHighlight:nt,renderInput:K,renderLabel:J,renderOption:et,renderRoot:ct,renderTag:G,selected:$=[],suggestions:I=[],suggestionsTransform:H=Xxt,tagListLabelText:it="Selected tags"},W){const Q=U.useRef(null),tt=U.useRef(null),rt=U.useRef(null),mt=owt({activateFirstOption:t,allowNew:n,collapseOnSelect:h,newOptionText:T,noOptionsText:x,onAdd:w,onDelete:k,onCollapse:O,onExpand:P,onInput:j,onShouldCollapse:B,onShouldExpand:N,onValidate:V,selected:$,suggestions:I,suggestionsTransform:H}),M=awt({inputRef:tt,managerRef:mt});return W&&(typeof W=="function"?W(M):W.current=M),q.createElement(mr.Provider,{value:{classNames:c,comboBoxRef:Q,id:m,inputRef:tt,isDisabled:v,isInvalid:y,listBoxRef:rt,managerRef:mt}},q.createElement(Ewt,{onBlur:E,onFocus:A,render:ct},q.createElement(bwt,{render:J},_),q.createElement(kwt,{label:it},mt.current.state.selected.map((R,z)=>q.createElement(Cwt,{key:OO(R),index:z,render:G,title:d}))),q.createElement(fwt,null,q.createElement(ywt,{allowBackspace:e,allowResize:r,ariaDescribedBy:o,ariaErrorMessage:s,delimiterKeys:p,placeholderText:Y,render:K}),q.createElement(xwt,null,mt.current.state.options.map((R,z)=>q.createElement(Swt,{key:OO(R),index:z,render:et},q.createElement(gwt,{option:R,query:mt.current.state.value,render:nt}))))),q.createElement(dwt,{ariaAddedText:i,ariaDeletedText:l})))}const Awt=q.forwardRef(Mwt),Rwt=/\s+/g,vU=t=>t.trim().toLowerCase().replace(Rwt,"-"),yU=({tag:t,colorGenerator:e})=>b.jsx("div",{style:{backgroundColor:e.getColorForKey(t)},className:"tag-bullet"}),_U="Tag not found",bU="Add tag",jwt=t=>t!==_U,Nwt=t=>t===bU,N3=t=>({label:t,value:t}),Dwt=t=>({tag:e,onClick:n})=>b.jsx(KP,{colorGenerator:t,text:e.label,clearable:!0,className:"react-tags__tag",onClose:n}),Iwt=(t,e)=>({option:n,classNames:r,...i})=>{const o=jwt(n.label),s=Nwt(n.label);return b.jsx("div",{className:de(r.option,{[r.optionIsActive]:o&&n.active,"react-tags__listbox-option--not-selectable":!o}),...i,children:o?b.jsxs(b.Fragment,{children:[!s&&b.jsx(yU,{tag:`${n.label}`,colorGenerator:t}),s?b.jsxs("i",{children:['Add "',vU((e==null?void 0:e.input.value)??""),'"']}):n.label]}):b.jsx("i",{children:n.label})})},Fwt=t=>({selectedTags:e,onChange:n,placeholder:r,listTags:i,tagsList:o,allowNew:s=!0})=>{U.useEffect(()=>{i()},[]);const l=zu("shortUrlCreation"),c=(l==null?void 0:l.tagFilteringMode)??"startsWith",h=Bl();return b.jsx(Awt,{ref:h,selected:e.map(N3),suggestions:o.tags.filter(d=>!e.includes(d)).map(N3),renderTag:Dwt(t),renderOption:Iwt(t,h.current),activateFirstOption:!0,allowNew:s,newOptionText:bU,noOptionsText:_U,placeholderText:r??"Add tags to the URL",delimiterKeys:["Enter","Tab",","],suggestionsTransform:(d,p)=>{const m=d.toLowerCase().trim();return m.length<1?[]:[...p.filter(({label:v})=>c==="includes"?v.includes(m):v.startsWith(m))].slice(0,5)},onDelete:d=>{const p=[...e];p.splice(d,1),n(p)},onAdd:({label:d})=>n([...e,...d.split(",").map(vU)])})},kO="shlink/tagDelete",Bwt={deleting:!1,deleted:!1,error:!1},xU=lr(`${kO}/tagDeleted`),$wt=t=>{const e=di(`${kO}/deleteTag`,async r=>{await t().deleteTags([r])}),{reducer:n}=Br({name:kO,initialState:Bwt,reducers:{},extraReducers:r=>{r.addCase(e.pending,()=>({deleting:!0,deleted:!1,error:!1})),r.addCase(e.rejected,(i,{error:o})=>({deleting:!1,deleted:!1,error:!0,errorData:La(o)})),r.addCase(e.fulfilled,()=>({deleting:!1,deleted:!0,error:!1}))}});return{reducer:n,deleteTag:e}},cL="shlink/tagEdit",zwt={editing:!1,edited:!1,error:!1},wU=lr(`${cL}/tagEdited`),Uwt=(t,e)=>di(`${cL}/editTag`,async({oldName:n,newName:r,color:i})=>(await t().editTag(n,r),e.setColorForKey(r,i),{oldName:n,newName:r,color:i})),Vwt=t=>Br({name:cL,initialState:zwt,reducers:{},extraReducers:e=>{e.addCase(t.pending,()=>({editing:!0,edited:!1,error:!1})),e.addCase(t.rejected,(n,{error:r})=>({editing:!1,edited:!1,error:!0,errorData:La(r)})),e.addCase(t.fulfilled,(n,{payload:r})=>({...Rz(["oldName","newName"],r),editing:!1,edited:!0,error:!1}))}}),uL="shlink/tagsList",N2={tags:[],filteredTags:[],stats:{},loading:!1,error:!1},D3=(t,e)=>n=>n===t?e:n,I3=(t,e)=>kP(n=>n===e,t),Hwt=(t,e)=>t.reduce((n,[r,i])=>{if(!n[r])return n;const{bots:o,nonBots:s}=i,l=n[r];return{...n,[r]:{...l,visitsSummary:l.visitsSummary&&{total:l.visitsSummary.total+o+s,bots:l.visitsSummary.bots+o,nonBots:l.visitsSummary.nonBots+s},visitsCount:l.visitsCount+o+s}}},{...e}),Wwt=t=>Object.entries(t.reduce((e,{shortUrl:n,visit:r})=>(n==null||n.tags.forEach(i=>{e[i]||(e[i]={bots:0,nonBots:0}),r.potentialBot?e[i].bots+=1:e[i].nonBots+=1}),e),{})),Ywt=(t,e=!0)=>di(`${uL}/listTags`,async(n,{getState:r})=>{const{tagsList:i}=r();if(!e&&!qi(i.tags))return i;const{tags:o,stats:s}=await t().tagsStats(),l=s.reduce((c,{tag:h,...d})=>(c[h]=d,c),{});return{tags:o,stats:l}}),SU=lr(`${uL}/filterTags`),Zwt=(t,e)=>Br({name:uL,initialState:N2,reducers:{},extraReducers:n=>{n.addCase(SU,(r,{payload:i})=>({...r,filteredTags:r.tags.filter(o=>o.toLowerCase().match(i.toLowerCase()))})),n.addCase(t.pending,r=>({...r,loading:!0,error:!1})),n.addCase(t.rejected,(r,{error:i})=>({...N2,error:!0,errorData:La(i)})),n.addCase(t.fulfilled,(r,{payload:i})=>({...N2,stats:i.stats,tags:i.tags,filteredTags:i.tags})),n.addCase(xU,({tags:r,filteredTags:i,...o},{payload:s})=>({...o,tags:I3(r,s),filteredTags:I3(i,s)})),n.addCase(wU,({tags:r,filteredTags:i,stats:o,...s},{payload:l})=>({...s,stats:{...o,[l.newName]:o[l.oldName]},tags:r.map(D3(l.oldName,l.newName)).sort(),filteredTags:i.map(D3(l.oldName,l.newName)).sort()})),n.addCase(tv,(r,{payload:i})=>({...r,stats:Hwt(Wwt(i.createdVisits),r.stats)})),n.addCase(e.fulfilled,({tags:r,...i},{payload:o})=>({...i,tags:r.concat(o.tags.filter(s=>!r.includes(s)))}))}}),Gwt={tag:"Tag",shortUrls:"Short URLs",visits:"Visits"},qwt=t=>zl(({filterTags:e,forceListTags:n,tagsList:r})=>{var i;const o=GP(),[s,l]=U.useState(((i=o.tags)==null?void 0:i.defaultOrdering)??{}),c=cr(()=>r.filteredTags.map(d=>{var p,m,v;const y=r.stats[d],_=((p=o.visits)!=null&&p.excludeBots?(m=y==null?void 0:y.visitsSummary)==null?void 0:m.nonBots:(v=y==null?void 0:y.visitsSummary)==null?void 0:v.total)??(y==null?void 0:y.visitsCount)??0;return{tag:d,visits:_,shortUrls:(y==null?void 0:y.shortUrlsCount)??0}}),d=>k$(d,s));if(U.useEffect(()=>{n()},[]),r.loading)return b.jsx(aa,{loading:!0});if(r.error)return b.jsx(Ii,{type:"error",children:b.jsx(ya,{errorData:r.errorData,fallbackMessage:"Error loading tags :("})});const h=d=>()=>{const p=x1(d,s.field,s.dir);l({field:p?d:void 0,dir:p})};return b.jsxs(b.Fragment,{children:[b.jsx(Wg,{className:"mb-3",onChange:e}),b.jsx(qr,{className:"mb-3",children:b.jsx("div",{className:"col-lg-6 offset-lg-6",children:b.jsx(Yg,{items:Gwt,order:s,onChange:(d,p)=>l({field:d,dir:p})})})}),(()=>{if(r.filteredTags.length<1)return b.jsx(aa,{children:"No tags found"});const d=c();return b.jsx(t,{sortedTags:d,currentOrder:s,orderByColumn:h})})()]})},()=>[co.visits]),hL=({pagesCount:t,currentPage:e,setCurrentPage:n,centered:r=!0})=>{if(t<2)return null;const i=o=>()=>!pg(o)&&n(o);return b.jsxs(eP,{listClassName:de("flex-wrap mb-0 simple-paginator",{"justify-content-center":r}),children:[b.jsx(nu,{disabled:e<=1,children:b.jsx(ru,{previous:!0,tag:"span",onClick:i(e-1)})}),oU(e,t).map((o,s)=>b.jsx(nu,{disabled:pg(o),active:e===o,children:b.jsx(ru,{role:"link",tag:"span",onClick:i(o),children:sU(o)})},aU(o,s))),b.jsx(nu,{disabled:e>=t,children:b.jsx(ru,{next:!0,tag:"span",onClick:i(e+1)})})]})},Kwt=20,Xwt=t=>({sortedTags:e,orderByColumn:n,currentOrder:r})=>{const i=U.useRef(!0),{search:o}=Un(),{page:s=1}=Du(o),[l,c]=d0t("page",Number(s)),h=sg(Kwt,e),d=h.length>1,p=h[l-1]??[];return U.useEffect(()=>{!i.current&&c(1),i.current=!1},[e]),U.useEffect(()=>{scrollTo(0,0)},[l]),b.jsxs(Bn,{bodyClassName:d?"pb-1":"",children:[b.jsxs("table",{className:"table table-hover responsive-table mb-0",children:[b.jsxs("thead",{className:"responsive-table__header",children:[b.jsxs("tr",{children:[b.jsxs("th",{className:"tags-table__header-cell",onClick:n("tag"),children:["Tag ",b.jsx(hm,{currentOrder:r,field:"tag"})]}),b.jsxs("th",{className:"tags-table__header-cell text-lg-end",onClick:n("shortUrls"),children:["Short URLs ",b.jsx(hm,{currentOrder:r,field:"shortUrls"})]}),b.jsxs("th",{className:"tags-table__header-cell text-lg-end",onClick:n("visits"),children:["Visits ",b.jsx(hm,{currentOrder:r,field:"visits"})]}),b.jsx("th",{"aria-label":"Options",className:"tags-table__header-cell"})]}),b.jsx("tr",{children:b.jsx("th",{"aria-label":"Separator",colSpan:4,className:"p-0 border-top-0"})})]}),b.jsxs("tbody",{children:[p.length===0&&b.jsx("tr",{children:b.jsx("td",{colSpan:4,className:"text-center",children:"No results found"})}),p.map(m=>b.jsx(t,{tag:m},m.tag))]})]}),d&&b.jsx("div",{className:"sticky-card-paginator",children:b.jsx(hL,{pagesCount:h.length,currentPage:l,setCurrentPage:c})})]},l)},Qwt=(t,e,n)=>({tag:r})=>{const[i,o]=zn(),[s,l]=zn(),c=Bu();return b.jsxs("tr",{className:"responsive-table__row",children:[b.jsxs("th",{className:"responsive-table__cell","data-th":"Tag",children:[b.jsx(yU,{tag:r.tag,colorGenerator:n})," ",r.tag]}),b.jsx("td",{className:"responsive-table__cell text-lg-end","data-th":"Short URLs",children:b.jsx(nn,{to:`${c}/list-short-urls/1?tags=${encodeURIComponent(r.tag)}`,children:Qn(r.shortUrls)})}),b.jsx("td",{className:"responsive-table__cell text-lg-end","data-th":"Visits",children:b.jsx(nn,{to:`${c}/tag/${r.tag}/visits`,children:Qn(r.visits)})}),b.jsx("td",{className:"responsive-table__cell text-lg-end",children:b.jsxs(b1,{children:[b.jsxs(Zt,{onClick:l,children:[b.jsx(zt,{icon:tet,fixedWidth:!0,className:"me-1"})," Edit"]}),b.jsxs(Zt,{onClick:o,children:[b.jsx(zt,{icon:get,fixedWidth:!0,className:"me-1"})," Delete"]})]})}),b.jsx(e,{tag:r.tag,toggle:l,isOpen:s}),b.jsx(t,{tag:r.tag,toggle:o,isOpen:i})]})},Jwt=(t,e)=>{t.serviceFactory("TagsSelector",Fwt,"ColorGenerator"),t.decorator("TagsSelector",e(["tagsList"],["listTags"])),t.serviceFactory("DeleteTagConfirmModal",()=>bxt),t.decorator("DeleteTagConfirmModal",e(["tagDelete"],["deleteTag","tagDeleted"])),t.serviceFactory("EditTagModal",Ixt,"ColorGenerator"),t.decorator("EditTagModal",e(["tagEdit"],["editTag","tagEdited"])),t.serviceFactory("TagsTableRow",Qwt,"DeleteTagConfirmModal","EditTagModal","ColorGenerator"),t.serviceFactory("TagsTable",Xwt,"TagsTableRow"),t.serviceFactory("TagsList",qwt,"TagsTable"),t.decorator("TagsList",e(["tagsList","mercureInfo"],["forceListTags","filterTags","createNewVisits","loadMercureInfo"])),t.serviceFactory("tagEditReducerCreator",Vwt,"editTag"),t.serviceFactory("tagEditReducer",Se("reducer"),"tagEditReducerCreator"),t.serviceFactory("tagDeleteReducerCreator",$wt,"apiClientFactory"),t.serviceFactory("tagDeleteReducer",Se("reducer"),"tagDeleteReducerCreator"),t.serviceFactory("tagsListReducerCreator",Zwt,"listTags","createShortUrl"),t.serviceFactory("tagsListReducer",Se("reducer"),"tagsListReducerCreator");const n=r=>({apiClientFactory:i})=>Ywt(i,r);t.factory("listTags",n(!1)),t.factory("forceListTags",n(!0)),t.serviceFactory("filterTags",()=>SU),t.serviceFactory("deleteTag",Se("deleteTag"),"tagDeleteReducerCreator"),t.serviceFactory("tagDeleted",()=>xU),t.serviceFactory("editTag",Uwt,"apiClientFactory","ColorGenerator"),t.serviceFactory("tagEdited",()=>wU)};var t2t="Expected a function",TU="__lodash_hash_undefined__",EU=1/0,e2t="[object Function]",n2t="[object GeneratorFunction]",r2t="[object Symbol]",i2t=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o2t=/^\w*$/,s2t=/^\./,a2t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,l2t=/[\\^$.*+?()[\]{}|]/g,c2t=/\\(\\)?/g,u2t=/^\[object .+?Constructor\]$/,h2t=typeof kh=="object"&&kh&&kh.Object===Object&&kh,d2t=typeof self=="object"&&self&&self.Object===Object&&self,dL=h2t||d2t||Function("return this")();function f2t(t,e){return t==null?void 0:t[e]}function p2t(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch{}return e}var m2t=Array.prototype,g2t=Function.prototype,OU=Object.prototype,D2=dL["__core-js_shared__"],F3=function(){var t=/[^.]+$/.exec(D2&&D2.keys&&D2.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),CU=g2t.toString,fL=OU.hasOwnProperty,kU=OU.toString,v2t=RegExp("^"+CU.call(fL).replace(l2t,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),B3=dL.Symbol,y2t=m2t.splice,_2t=PU(dL,"Map"),gg=PU(Object,"create"),$3=B3?B3.prototype:void 0,z3=$3?$3.toString:void 0;function Tu(t){var e=-1,n=t?t.length:0;for(this.clear();++e-1}function P2t(t,e){var n=this.__data__,r=F1(n,t);return r<0?n.push([t,e]):n[r][1]=e,this}zd.prototype.clear=E2t;zd.prototype.delete=O2t;zd.prototype.get=C2t;zd.prototype.has=k2t;zd.prototype.set=P2t;function Uu(t){var e=-1,n=t?t.length:0;for(this.clear();++er.toFixed(n).replace(".",e):r=>`${r}`.replace(".",e):n?r=>r.toFixed(n):r=>`${r}`}function gL(t={}){const e=typeof t.quote=="string"?t.quote:'"',n=typeof t.escapedQuote=="string"?t.escapedQuote:`${e}${e}`;return!e||e===n?r=>r:r=>(r.includes(e)&&(r=r.replace(new RegExp(e,"g"),n)),`${e}${r}${e}`)}function Q2t(t={stringFormatter:gL()}){return e=>t.stringFormatter(e.toString().slice(7,-1))}function J2t(t={stringFormatter:gL()}){return e=>{if(e===null)return"";let n=JSON.stringify(e);return n===void 0?"":(n[0]==='"'&&(n=n.replace(/^"(.+)"$/,"$1")),t.stringFormatter(n))}}function V3(t,e,n){const r=t[e];return r===void 0?n:r}function AU(t,e){try{return Array.isArray(e)?t.push(...e):t.push(e),t}catch{return t.concat(e)}}function PO(t,e){let n=!0;return t.reduce((r,i)=>(i==null&&(i=""),n?(n=!1,`${i}`):`${r}${e}${i}`),"")}var H3;(function(t){t.header="header",t.undefined="undefined",t.boolean="boolean",t.number="number",t.bigint="bigint",t.string="string",t.symbol="symbol",t.function="function",t.object="object"})(H3||(H3={}));class tSt{constructor(e){this.opts=this.preprocessOpts(e)}preprocessOpts(e){const n=Object.assign({},e);n.fields&&(n.fields=this.preprocessFieldsInfo(n.fields,n.defaultValue)),n.transforms=n.transforms||[];const r=n.formatters&&n.formatters.string||gL(),i=J2t({stringFormatter:r}),o={header:r,undefined:I2,boolean:I2,number:X2t(),bigint:I2,string:r,symbol:Q2t({stringFormatter:r}),function:i,object:i};return n.formatters=Object.assign(Object.assign({},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(e,n){return e.map(r=>{if(typeof r=="string")return{label:r,value:r.includes(".")||r.includes("[")?i=>U3(i,r,n):i=>V3(i,r,n)};if(typeof r=="object"){const i="default"in r?r.default:n;if(typeof r.value=="string"){const o=r.value;return{label:r.label||r.value,value:r.value.includes(".")||r.value.includes("[")?s=>U3(s,o,i):s=>V3(s,o,i)}}if(typeof r.value=="function"){const o=r.label||r.value.name||"",s={label:o,default:i},l=r.value;return{label:o,value(c){const h=l(c,s);return h===void 0?i:h}}}}throw new Error("Invalid field info option. "+JSON.stringify(r))})}getHeader(){return PO(this.opts.fields.map(e=>this.opts.formatters.header(e.label)),this.opts.delimiter)}preprocessRow(e){return this.opts.transforms.reduce((n,r)=>n.map(i=>r(i)).reduce(AU,[]),[e])}processRow(e){if(!e)return;const n=this.opts.fields.map(r=>this.processCell(e,r));if(!(!this.opts.includeEmptyRows&&n.every(r=>r==="")))return PO(n,this.opts.delimiter)}processCell(e,n){return this.processValue(n.value(e))}processValue(e){const n=this.opts.formatters[typeof e];return n(e)}}class eSt extends tSt{constructor(e){super(e)}parse(e){const n=this.preprocessData(e);this.opts.fields=this.opts.fields||this.preprocessFieldsInfo(n.reduce((o,s)=>(Object.keys(s).forEach(l=>{o.includes(l)||o.push(l)}),o),[]),this.opts.defaultValue);const r=this.opts.header?this.getHeader():"",i=this.processData(n);return(this.opts.withBOM?"\uFEFF":"")+r+(r&&i?this.opts.eol:"")+i}preprocessData(e){const n=Array.isArray(e)?e:[e];if(!this.opts.fields){if(e==null||n.length===0)throw new Error('Data should not be empty or the "fields" option should be included');if(typeof n[0]!="object")throw new Error('Data items should be objects or the "fields" option should be included')}return this.opts.transforms.length===0?n:n.map(r=>this.preprocessRow(r)).reduce(AU,[])}processData(e){return PO(e.map(n=>this.processRow(n)).filter(n=>n),this.opts.eol)}}var tr;(function(t){t[t.BACKSPACE=8]="BACKSPACE",t[t.FORM_FEED=12]="FORM_FEED",t[t.NEWLINE=10]="NEWLINE",t[t.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",t[t.TAB=9]="TAB",t[t.SPACE=32]="SPACE",t[t.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",t[t.QUOTATION_MARK=34]="QUOTATION_MARK",t[t.NUMBER_SIGN=35]="NUMBER_SIGN",t[t.DOLLAR_SIGN=36]="DOLLAR_SIGN",t[t.PERCENT_SIGN=37]="PERCENT_SIGN",t[t.AMPERSAND=38]="AMPERSAND",t[t.APOSTROPHE=39]="APOSTROPHE",t[t.LEFT_PARENTHESIS=40]="LEFT_PARENTHESIS",t[t.RIGHT_PARENTHESIS=41]="RIGHT_PARENTHESIS",t[t.ASTERISK=42]="ASTERISK",t[t.PLUS_SIGN=43]="PLUS_SIGN",t[t.COMMA=44]="COMMA",t[t.HYPHEN_MINUS=45]="HYPHEN_MINUS",t[t.FULL_STOP=46]="FULL_STOP",t[t.SOLIDUS=47]="SOLIDUS",t[t.DIGIT_ZERO=48]="DIGIT_ZERO",t[t.DIGIT_ONE=49]="DIGIT_ONE",t[t.DIGIT_TWO=50]="DIGIT_TWO",t[t.DIGIT_THREE=51]="DIGIT_THREE",t[t.DIGIT_FOUR=52]="DIGIT_FOUR",t[t.DIGIT_FIVE=53]="DIGIT_FIVE",t[t.DIGIT_SIX=54]="DIGIT_SIX",t[t.DIGIT_SEVEN=55]="DIGIT_SEVEN",t[t.DIGIT_EIGHT=56]="DIGIT_EIGHT",t[t.DIGIT_NINE=57]="DIGIT_NINE",t[t.COLON=58]="COLON",t[t.SEMICOLON=59]="SEMICOLON",t[t.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",t[t.EQUALS_SIGN=61]="EQUALS_SIGN",t[t.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",t[t.QUESTION_MARK=63]="QUESTION_MARK",t[t.COMMERCIAL_AT=64]="COMMERCIAL_AT",t[t.LATIN_CAPITAL_LETTER_A=65]="LATIN_CAPITAL_LETTER_A",t[t.LATIN_CAPITAL_LETTER_B=66]="LATIN_CAPITAL_LETTER_B",t[t.LATIN_CAPITAL_LETTER_C=67]="LATIN_CAPITAL_LETTER_C",t[t.LATIN_CAPITAL_LETTER_D=68]="LATIN_CAPITAL_LETTER_D",t[t.LATIN_CAPITAL_LETTER_E=69]="LATIN_CAPITAL_LETTER_E",t[t.LATIN_CAPITAL_LETTER_F=70]="LATIN_CAPITAL_LETTER_F",t[t.LATIN_CAPITAL_LETTER_G=71]="LATIN_CAPITAL_LETTER_G",t[t.LATIN_CAPITAL_LETTER_H=72]="LATIN_CAPITAL_LETTER_H",t[t.LATIN_CAPITAL_LETTER_I=73]="LATIN_CAPITAL_LETTER_I",t[t.LATIN_CAPITAL_LETTER_J=74]="LATIN_CAPITAL_LETTER_J",t[t.LATIN_CAPITAL_LETTER_K=75]="LATIN_CAPITAL_LETTER_K",t[t.LATIN_CAPITAL_LETTER_L=76]="LATIN_CAPITAL_LETTER_L",t[t.LATIN_CAPITAL_LETTER_M=77]="LATIN_CAPITAL_LETTER_M",t[t.LATIN_CAPITAL_LETTER_N=78]="LATIN_CAPITAL_LETTER_N",t[t.LATIN_CAPITAL_LETTER_O=79]="LATIN_CAPITAL_LETTER_O",t[t.LATIN_CAPITAL_LETTER_P=80]="LATIN_CAPITAL_LETTER_P",t[t.LATIN_CAPITAL_LETTER_Q=81]="LATIN_CAPITAL_LETTER_Q",t[t.LATIN_CAPITAL_LETTER_R=82]="LATIN_CAPITAL_LETTER_R",t[t.LATIN_CAPITAL_LETTER_S=83]="LATIN_CAPITAL_LETTER_S",t[t.LATIN_CAPITAL_LETTER_T=84]="LATIN_CAPITAL_LETTER_T",t[t.LATIN_CAPITAL_LETTER_U=85]="LATIN_CAPITAL_LETTER_U",t[t.LATIN_CAPITAL_LETTER_V=86]="LATIN_CAPITAL_LETTER_V",t[t.LATIN_CAPITAL_LETTER_W=87]="LATIN_CAPITAL_LETTER_W",t[t.LATIN_CAPITAL_LETTER_X=88]="LATIN_CAPITAL_LETTER_X",t[t.LATIN_CAPITAL_LETTER_Y=89]="LATIN_CAPITAL_LETTER_Y",t[t.LATIN_CAPITAL_LETTER_Z=90]="LATIN_CAPITAL_LETTER_Z",t[t.LEFT_SQUARE_BRACKET=91]="LEFT_SQUARE_BRACKET",t[t.REVERSE_SOLIDUS=92]="REVERSE_SOLIDUS",t[t.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",t[t.CIRCUMFLEX_ACCENT=94]="CIRCUMFLEX_ACCENT",t[t.LOW_LINE=95]="LOW_LINE",t[t.GRAVE_ACCENT=96]="GRAVE_ACCENT",t[t.LATIN_SMALL_LETTER_A=97]="LATIN_SMALL_LETTER_A",t[t.LATIN_SMALL_LETTER_B=98]="LATIN_SMALL_LETTER_B",t[t.LATIN_SMALL_LETTER_C=99]="LATIN_SMALL_LETTER_C",t[t.LATIN_SMALL_LETTER_D=100]="LATIN_SMALL_LETTER_D",t[t.LATIN_SMALL_LETTER_E=101]="LATIN_SMALL_LETTER_E",t[t.LATIN_SMALL_LETTER_F=102]="LATIN_SMALL_LETTER_F",t[t.LATIN_SMALL_LETTER_G=103]="LATIN_SMALL_LETTER_G",t[t.LATIN_SMALL_LETTER_H=104]="LATIN_SMALL_LETTER_H",t[t.LATIN_SMALL_LETTER_I=105]="LATIN_SMALL_LETTER_I",t[t.LATIN_SMALL_LETTER_J=106]="LATIN_SMALL_LETTER_J",t[t.LATIN_SMALL_LETTER_K=107]="LATIN_SMALL_LETTER_K",t[t.LATIN_SMALL_LETTER_L=108]="LATIN_SMALL_LETTER_L",t[t.LATIN_SMALL_LETTER_M=109]="LATIN_SMALL_LETTER_M",t[t.LATIN_SMALL_LETTER_N=110]="LATIN_SMALL_LETTER_N",t[t.LATIN_SMALL_LETTER_O=111]="LATIN_SMALL_LETTER_O",t[t.LATIN_SMALL_LETTER_P=112]="LATIN_SMALL_LETTER_P",t[t.LATIN_SMALL_LETTER_Q=113]="LATIN_SMALL_LETTER_Q",t[t.LATIN_SMALL_LETTER_R=114]="LATIN_SMALL_LETTER_R",t[t.LATIN_SMALL_LETTER_S=115]="LATIN_SMALL_LETTER_S",t[t.LATIN_SMALL_LETTER_T=116]="LATIN_SMALL_LETTER_T",t[t.LATIN_SMALL_LETTER_U=117]="LATIN_SMALL_LETTER_U",t[t.LATIN_SMALL_LETTER_V=118]="LATIN_SMALL_LETTER_V",t[t.LATIN_SMALL_LETTER_W=119]="LATIN_SMALL_LETTER_W",t[t.LATIN_SMALL_LETTER_X=120]="LATIN_SMALL_LETTER_X",t[t.LATIN_SMALL_LETTER_Y=121]="LATIN_SMALL_LETTER_Y",t[t.LATIN_SMALL_LETTER_Z=122]="LATIN_SMALL_LETTER_Z",t[t.LEFT_CURLY_BRACKET=123]="LEFT_CURLY_BRACKET",t[t.VERTICAL_LINE=124]="VERTICAL_LINE",t[t.RIGHT_CURLY_BRACKET=125]="RIGHT_CURLY_BRACKET",t[t.TILDE=126]="TILDE"})(tr||(tr={}));tr.QUOTATION_MARK+"",tr.QUOTATION_MARK,tr.REVERSE_SOLIDUS+"",tr.REVERSE_SOLIDUS,tr.SOLIDUS+"",tr.SOLIDUS,tr.LATIN_SMALL_LETTER_B+"",tr.BACKSPACE,tr.LATIN_SMALL_LETTER_F+"",tr.FORM_FEED,tr.LATIN_SMALL_LETTER_N+"",tr.NEWLINE,tr.LATIN_SMALL_LETTER_R+"",tr.CARRIAGE_RETURN,tr.LATIN_SMALL_LETTER_T+"",tr.TAB;var W3;(function(t){t[t.LEFT_BRACE=0]="LEFT_BRACE",t[t.RIGHT_BRACE=1]="RIGHT_BRACE",t[t.LEFT_BRACKET=2]="LEFT_BRACKET",t[t.RIGHT_BRACKET=3]="RIGHT_BRACKET",t[t.COLON=4]="COLON",t[t.COMMA=5]="COMMA",t[t.TRUE=6]="TRUE",t[t.FALSE=7]="FALSE",t[t.NULL=8]="NULL",t[t.STRING=9]="STRING",t[t.NUMBER=10]="NUMBER",t[t.SEPARATOR=11]="SEPARATOR"})(W3||(W3={}));var Y3;(function(t){t[t.START=0]="START",t[t.ENDED=1]="ENDED",t[t.ERROR=2]="ERROR",t[t.TRUE1=3]="TRUE1",t[t.TRUE2=4]="TRUE2",t[t.TRUE3=5]="TRUE3",t[t.FALSE1=6]="FALSE1",t[t.FALSE2=7]="FALSE2",t[t.FALSE3=8]="FALSE3",t[t.FALSE4=9]="FALSE4",t[t.NULL1=10]="NULL1",t[t.NULL2=11]="NULL2",t[t.NULL3=12]="NULL3",t[t.STRING_DEFAULT=13]="STRING_DEFAULT",t[t.STRING_AFTER_BACKSLASH=14]="STRING_AFTER_BACKSLASH",t[t.STRING_UNICODE_DIGIT_1=15]="STRING_UNICODE_DIGIT_1",t[t.STRING_UNICODE_DIGIT_2=16]="STRING_UNICODE_DIGIT_2",t[t.STRING_UNICODE_DIGIT_3=17]="STRING_UNICODE_DIGIT_3",t[t.STRING_UNICODE_DIGIT_4=18]="STRING_UNICODE_DIGIT_4",t[t.STRING_INCOMPLETE_CHAR=19]="STRING_INCOMPLETE_CHAR",t[t.NUMBER_AFTER_INITIAL_MINUS=20]="NUMBER_AFTER_INITIAL_MINUS",t[t.NUMBER_AFTER_INITIAL_ZERO=21]="NUMBER_AFTER_INITIAL_ZERO",t[t.NUMBER_AFTER_INITIAL_NON_ZERO=22]="NUMBER_AFTER_INITIAL_NON_ZERO",t[t.NUMBER_AFTER_FULL_STOP=23]="NUMBER_AFTER_FULL_STOP",t[t.NUMBER_AFTER_DECIMAL=24]="NUMBER_AFTER_DECIMAL",t[t.NUMBER_AFTER_E=25]="NUMBER_AFTER_E",t[t.NUMBER_AFTER_E_AND_SIGN=26]="NUMBER_AFTER_E_AND_SIGN",t[t.NUMBER_AFTER_E_AND_DIGIT=27]="NUMBER_AFTER_E_AND_DIGIT",t[t.SEPARATOR=28]="SEPARATOR"})(Y3||(Y3={}));var Z3;(function(t){t[t.OBJECT=0]="OBJECT",t[t.ARRAY=1]="ARRAY"})(Z3||(Z3={}));var G3;(function(t){t[t.VALUE=0]="VALUE",t[t.KEY=1]="KEY",t[t.COLON=2]="COLON",t[t.COMMA=3]="COMMA",t[t.ENDED=4]="ENDED",t[t.ERROR=5]="ERROR",t[t.SEPARATOR=6]="SEPARATOR"})(G3||(G3={}));const nSt=new eSt,rSt=t=>nSt.parse(t),iSt=6,q3="0123456789ABCDEF",oSt=128,{floor:sSt,random:aSt,sqrt:lSt,round:cSt}=Math,uSt=()=>`#${YP(iSt,()=>q3[sSt(aSt()*q3.length)]).join("")}`,K3=t=>t.toLowerCase().trim(),hSt=t=>(t.match(/../g)??[]).map(e=>parseInt(e,16)||0),dSt=(t=0,e=0,n=0)=>cSt(lSt(.299*t**2+.587*e**2+.114*n**2));class fSt{constructor(e){Qt(this,"colors"),Qt(this,"lights"),Qt(this,"getColorForKey",r=>{const i=K3(r);return this.colors[i]||this.setColorForKey(i,uSt())}),Qt(this,"setColorForKey",(r,i)=>{var o;const s=K3(r);return this.colors[s]=i,(o=this.storage)==null||o.storeTagColors(this.colors),i}),Qt(this,"isColorLightForKey",r=>{const i=this.getColorForKey(r).substring(1);if(Fu(this.lights[i])){const o=hSt(i);this.lights[i]=dSt(...o)>=oSt}return this.lights[i]});var n;this.storage=e,this.colors=((n=this.storage)==null?void 0:n.getTagColors())??{},this.lights={}}}const RU=({document:t},e,n)=>{const r=t.createElement("a");r.setAttribute("href",e),r.setAttribute("download",n),r.style.visibility="hidden",t.body.appendChild(r),r.click(),t.body.removeChild(r)},pSt=(t,e,n)=>{const r=new Blob([e],{type:"text/csv;charset=utf-8;"}),i=URL.createObjectURL(r);RU(t,i,n)};class mSt{constructor(e,n){this.fetch=e,this.window=n}async saveImage(e,n){const r=await this.fetch(e).then(o=>o.blob()),i=URL.createObjectURL(r);RU(this.window,i,n)}}class gSt{constructor(e,n){Qt(this,"exportVisits",(r,i)=>{i.length&&this.exportCsv(r,i)}),Qt(this,"exportShortUrls",r=>{r.length&&this.exportCsv("short_urls.csv",r)}),Qt(this,"exportCsv",(r,i)=>{const o=this.jsonToCsv(i);pSt(this.window,o,r)}),this.window=e,this.jsonToCsv=n}}function vSt(t){t.constant("window",window),t.constant("fetch",window.fetch.bind(window)),t.service("ImageDownloader",mSt,"fetch","window"),t.service("ColorGenerator",fSt,"TagColorsStorage"),t.constant("jsonToCsv",rSt),t.service("ReportExporter",gSt,"window","jsonToCsv"),t.constant("setTimeout",window.setTimeout),t.constant("clearTimeout",window.clearTimeout),t.serviceFactory("useTimeoutToggle",u0t,"setTimeout","clearTimeout")}const vL=t=>t.visitedUrl!==void 0,ySt=t=>t.visitedUrl!==void 0,_St=cr(Rmt(t=>vL(t.visit)?"orphanVisits":"nonOrphanVisits"),t=>({orphanVisits:[],nonOrphanVisits:[],...t})),py=(t,e)=>Mz(Se(e),t),av=({page:t,itemsPerPage:e,filter:n,dateRange:r})=>{const i=((r==null?void 0:r.startDate)&&Ml(r==null?void 0:r.startDate))??void 0,o=((r==null?void 0:r.endDate)&&Ml(r==null?void 0:r.endDate))??void 0,s=(n==null?void 0:n.excludeBots)||void 0;return{page:t,itemsPerPage:e,startDate:i,endDate:o,excludeBots:s}},lv=({visits:t,goBack:e,shortUrl:n,children:r,title:i})=>b.jsx("header",{children:b.jsxs(zi,{body:!0,children:[b.jsxs("h2",{className:"d-flex justify-content-between align-items-center mb-0",children:[b.jsx(ke,{color:"link",size:"lg",className:"p-0 me-3",onClick:e,children:b.jsx(zt,{icon:q8})}),b.jsx("span",{className:"text-center d-none d-sm-block",children:b.jsx("small",{children:i})}),b.jsxs("span",{className:"badge badge-main ms-3",children:["Visits:"," ",b.jsx(L7,{visitsCount:t.length,shortUrl:n})]})]}),b.jsx("h3",{className:"text-center d-block d-sm-none mb-0 mt-3",children:b.jsx("small",{children:i})}),r&&b.jsx("div",{className:"mt-md-2",children:r})]})}),jU=({title:t,footer:e,children:n})=>b.jsxs(zi,{role:"document",children:[b.jsx(hd,{className:"chart-card__header",children:typeof t=="function"?t():t}),b.jsx(ud,{children:n}),e&&b.jsx(l$,{className:"chart-card__footer--sticky",children:e})]});/*! - * @kurkle/color v0.3.2 - * https://github.com/kurkle/color#readme - * (c) 2023 Jukka Kurkela - * Released under the MIT License - */function cv(t){return t+.5|0}const il=(t,e,n)=>Math.max(Math.min(t,n),e);function Mp(t){return il(cv(t*2.55),0,255)}function _l(t){return il(cv(t*255),0,255)}function Js(t){return il(cv(t/2.55)/100,0,1)}function X3(t){return il(cv(t*100),0,100)}const Xi={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},LO=[..."0123456789ABCDEF"],bSt=t=>LO[t&15],xSt=t=>LO[(t&240)>>4]+LO[t&15],my=t=>(t&240)>>4===(t&15),wSt=t=>my(t.r)&&my(t.g)&&my(t.b)&&my(t.a);function SSt(t){var e=t.length,n;return t[0]==="#"&&(e===4||e===5?n={r:255&Xi[t[1]]*17,g:255&Xi[t[2]]*17,b:255&Xi[t[3]]*17,a:e===5?Xi[t[4]]*17:255}:(e===7||e===9)&&(n={r:Xi[t[1]]<<4|Xi[t[2]],g:Xi[t[3]]<<4|Xi[t[4]],b:Xi[t[5]]<<4|Xi[t[6]],a:e===9?Xi[t[7]]<<4|Xi[t[8]]:255})),n}const TSt=(t,e)=>t<255?e(t):"";function ESt(t){var e=wSt(t)?bSt:xSt;return t?"#"+e(t.r)+e(t.g)+e(t.b)+TSt(t.a,e):void 0}const OSt=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function NU(t,e,n){const r=e*Math.min(n,1-n),i=(o,s=(o+t/30)%12)=>n-r*Math.max(Math.min(s-3,9-s,1),-1);return[i(0),i(8),i(4)]}function CSt(t,e,n){const r=(i,o=(i+t/60)%6)=>n-n*e*Math.max(Math.min(o,4-o,1),0);return[r(5),r(3),r(1)]}function kSt(t,e,n){const r=NU(t,1,.5);let i;for(e+n>1&&(i=1/(e+n),e*=i,n*=i),i=0;i<3;i++)r[i]*=1-e-n,r[i]+=e;return r}function PSt(t,e,n,r,i){return t===i?(e-n)/r+(e.5?h/(2-i-o):h/(i+o),l=PSt(e,n,r,h,i),l=l*60+.5),[l|0,c||0,s]}function _L(t,e,n,r){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,r)).map(_l)}function bL(t,e,n){return _L(NU,t,e,n)}function LSt(t,e,n){return _L(kSt,t,e,n)}function MSt(t,e,n){return _L(CSt,t,e,n)}function DU(t){return(t%360+360)%360}function ASt(t){const e=OSt.exec(t);let n=255,r;if(!e)return;e[5]!==r&&(n=e[6]?Mp(+e[5]):_l(+e[5]));const i=DU(+e[2]),o=+e[3]/100,s=+e[4]/100;return e[1]==="hwb"?r=LSt(i,o,s):e[1]==="hsv"?r=MSt(i,o,s):r=bL(i,o,s),{r:r[0],g:r[1],b:r[2],a:n}}function RSt(t,e){var n=yL(t);n[0]=DU(n[0]+e),n=bL(n),t.r=n[0],t.g=n[1],t.b=n[2]}function jSt(t){if(!t)return;const e=yL(t),n=e[0],r=X3(e[1]),i=X3(e[2]);return t.a<255?`hsla(${n}, ${r}%, ${i}%, ${Js(t.a)})`:`hsl(${n}, ${r}%, ${i}%)`}const Q3={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"},J3={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 NSt(){const t={},e=Object.keys(J3),n=Object.keys(Q3);let r,i,o,s,l;for(r=0;r>16&255,o>>8&255,o&255]}return t}let gy;function DSt(t){gy||(gy=NSt(),gy.transparent=[0,0,0,0]);const e=gy[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const ISt=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function FSt(t){const e=ISt.exec(t);let n=255,r,i,o;if(e){if(e[7]!==r){const s=+e[7];n=e[8]?Mp(s):il(s*255,0,255)}return r=+e[1],i=+e[3],o=+e[5],r=255&(e[2]?Mp(r):il(r,0,255)),i=255&(e[4]?Mp(i):il(i,0,255)),o=255&(e[6]?Mp(o):il(o,0,255)),{r,g:i,b:o,a:n}}}function BSt(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${Js(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const F2=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,oh=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function $St(t,e,n){const r=oh(Js(t.r)),i=oh(Js(t.g)),o=oh(Js(t.b));return{r:_l(F2(r+n*(oh(Js(e.r))-r))),g:_l(F2(i+n*(oh(Js(e.g))-i))),b:_l(F2(o+n*(oh(Js(e.b))-o))),a:t.a+n*(e.a-t.a)}}function vy(t,e,n){if(t){let r=yL(t);r[e]=Math.max(0,Math.min(r[e]+r[e]*n,e===0?360:1)),r=bL(r),t.r=r[0],t.g=r[1],t.b=r[2]}}function IU(t,e){return t&&Object.assign(e||{},t)}function tI(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=_l(t[3]))):(e=IU(t,{r:0,g:0,b:0,a:1}),e.a=_l(e.a)),e}function zSt(t){return t.charAt(0)==="r"?FSt(t):ASt(t)}class vg{constructor(e){if(e instanceof vg)return e;const n=typeof e;let r;n==="object"?r=tI(e):n==="string"&&(r=SSt(e)||DSt(e)||zSt(e)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var e=IU(this._rgb);return e&&(e.a=Js(e.a)),e}set rgb(e){this._rgb=tI(e)}rgbString(){return this._valid?BSt(this._rgb):void 0}hexString(){return this._valid?ESt(this._rgb):void 0}hslString(){return this._valid?jSt(this._rgb):void 0}mix(e,n){if(e){const r=this.rgb,i=e.rgb;let o;const s=n===o?.5:n,l=2*s-1,c=r.a-i.a,h=((l*c===-1?l:(l+c)/(1+l*c))+1)/2;o=1-h,r.r=255&h*r.r+o*i.r+.5,r.g=255&h*r.g+o*i.g+.5,r.b=255&h*r.b+o*i.b+.5,r.a=s*r.a+(1-s)*i.a,this.rgb=r}return this}interpolate(e,n){return e&&(this._rgb=$St(this._rgb,e._rgb,n)),this}clone(){return new vg(this.rgb)}alpha(e){return this._rgb.a=_l(e),this}clearer(e){const n=this._rgb;return n.a*=1-e,this}greyscale(){const e=this._rgb,n=cv(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=n,this}opaquer(e){const n=this._rgb;return n.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return vy(this._rgb,2,e),this}darken(e){return vy(this._rgb,2,-e),this}saturate(e){return vy(this._rgb,1,e),this}desaturate(e){return vy(this._rgb,1,-e),this}rotate(e){return RSt(this._rgb,e),this}}/*! - * Chart.js v4.3.3 - * https://www.chartjs.org - * (c) 2023 Chart.js Contributors - * Released under the MIT License - */const USt=(()=>{let t=0;return()=>t++})();function $e(t){return t===null||typeof t>"u"}function bn(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function Ee(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function sr(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function ki(t,e){return sr(t)?t:e}function fn(t,e){return typeof t>"u"?e:t}const VSt=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/e,FU=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function vn(t,e,n){if(t&&typeof t.call=="function")return t.apply(n,e)}function Ar(t,e,n,r){let i,o,s;if(bn(t))if(o=t.length,r)for(i=o-1;i>=0;i--)e.call(n,t[i],i);else for(i=0;it,x:t=>t.x,y:t=>t.y};function YSt(t){const e=t.split("."),n=[];let r="";for(const i of e)r+=i,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function ZSt(t){const e=YSt(t);return n=>{for(const r of e){if(r==="")break;n=n&&n[r]}return n}}function Eu(t,e){return(nI[e]||(nI[e]=ZSt(e)))(t)}function xL(t){return t.charAt(0).toUpperCase()+t.slice(1)}const _g=t=>typeof t<"u",Al=t=>typeof t=="function",rI=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};function GSt(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const _o=Math.PI,Ni=2*_o,ub=Number.POSITIVE_INFINITY,oo=_o/2,ol=Math.log10,bl=Math.sign;function v_(t,e,n){return Math.abs(t-e)i-o).pop(),e}function bg(t){return!isNaN(parseFloat(t))&&isFinite(t)}function KSt(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}function $U(t,e,n){let r,i,o;for(r=0,i=t.length;rc&&ht[s]1;)o=i+r>>1,n(o)?i=o:r=o;return{lo:i,hi:r}}const Gc=(t,e,n,r)=>SL(t,n,r?i=>{const o=t[i][e];return ot[i][e]SL(t,n,r=>t[r][e]>=n);function tTt(t,e,n){let r=0,i=t.length;for(;rr&&t[i-1]>n;)i--;return r>0||i{const r="_onData"+xL(n),i=t[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!1,value(...o){const s=i.apply(this,o);return t._chartjs.listeners.forEach(l=>{typeof l[r]=="function"&&l[r](...o)}),s}})})}function sI(t,e){const n=t._chartjs;if(!n)return;const r=n.listeners,i=r.indexOf(e);i!==-1&&r.splice(i,1),!(r.length>0)&&(zU.forEach(o=>{delete t[o]}),delete t._chartjs)}function UU(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const VU=function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame}();function HU(t,e){let n=[],r=!1;return function(...i){n=i,r||(r=!0,VU.call(window,()=>{r=!1,t.apply(e,n)}))}}function nTt(t,e){let n;return function(...r){return e?(clearTimeout(n),n=setTimeout(t,e,r)):t.apply(this,r),e}}const rTt=t=>t==="start"?"left":t==="end"?"right":"center",aI=(t,e,n)=>t==="start"?e:t==="end"?n:(e+n)/2;function iTt(t,e,n){const r=e.length;let i=0,o=r;if(t._sorted){const{iScale:s,_parsed:l}=t,c=s.axis,{min:h,max:d,minDefined:p,maxDefined:m}=s.getUserBounds();p&&(i=oa(Math.min(Gc(l,c,h).lo,n?r:Gc(e,c,s.getPixelForValue(h)).lo),0,r-1)),m?o=oa(Math.max(Gc(l,s.axis,d,!0).hi+1,n?0:Gc(e,c,s.getPixelForValue(d),!0).hi+1),i,r)-i:o=r-i}return{start:i,count:o}}function oTt(t){const{xScale:e,yScale:n,_scaleRanges:r}=t,i={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!r)return t._scaleRanges=i,!0;const o=r.xmin!==e.min||r.xmax!==e.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),o}const yy=t=>t===0||t===1,lI=(t,e,n)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*Ni/n)),cI=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*Ni/n)+1,pm={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*oo)+1,easeOutSine:t=>Math.sin(t*oo),easeInOutSine:t=>-.5*(Math.cos(_o*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>yy(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>yy(t)?t:lI(t,.075,.3),easeOutElastic:t=>yy(t)?t:cI(t,.075,.3),easeInOutElastic(t){return yy(t)?t:t<.5?.5*lI(t*2,.1125,.45):.5+.5*cI(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return(t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-pm.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?pm.easeInBounce(t*2)*.5:pm.easeOutBounce(t*2-1)*.5+.5};function WU(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function uI(t){return WU(t)?t:new vg(t)}function B2(t){return WU(t)?t:new vg(t).saturate(.5).darken(.1).hexString()}const sTt=["x","y","borderWidth","radius","tension"],aTt=["color","borderColor","backgroundColor"];function lTt(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),t.set("animations",{colors:{type:"color",properties:aTt},numbers:{type:"number",properties:sTt}}),t.describe("animations",{_fallback:"animation"}),t.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:e=>e|0}}}})}function cTt(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const hI=new Map;function uTt(t,e){e=e||{};const n=t+JSON.stringify(e);let r=hI.get(n);return r||(r=new Intl.NumberFormat(t,e),hI.set(n,r)),r}function $1(t,e,n){return uTt(e,n).format(t)}const YU={values(t){return bn(t)?t:""+t},numeric(t,e,n){if(t===0)return"0";const r=this.chart.options.locale;let i,o=t;if(n.length>1){const h=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(h<1e-4||h>1e15)&&(i="scientific"),o=hTt(t,n)}const s=ol(Math.abs(o)),l=isNaN(s)?1:Math.max(Math.min(-1*Math.floor(s),20),0),c={notation:i,minimumFractionDigits:l,maximumFractionDigits:l};return Object.assign(c,this.options.ticks.format),$1(t,r,c)},logarithmic(t,e,n){if(t===0)return"0";const r=n[e].significand||t/Math.pow(10,Math.floor(ol(t)));return[1,2,3,5,10,15].includes(r)||e>.8*n.length?YU.numeric.call(this,t,e,n):""}};function hTt(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}var z1={formatters:YU};function dTt(t){t.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:(e,n)=>n.lineWidth,tickColor:(e,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:z1.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const Ou=Object.create(null),AO=Object.create(null);function mm(t,e){if(!e)return t;const n=e.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)=>B2(i.backgroundColor),this.hoverBorderColor=(r,i)=>B2(i.borderColor),this.hoverColor=(r,i)=>B2(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(e),this.apply(n)}set(e,n){return $2(this,e,n)}get(e){return mm(this,e)}describe(e,n){return $2(AO,e,n)}override(e,n){return $2(Ou,e,n)}route(e,n,r,i){const o=mm(this,e),s=mm(this,r),l="_"+n;Object.defineProperties(o,{[l]:{value:o[n],writable:!0},[n]:{enumerable:!0,get(){const c=this[l],h=s[i];return Ee(c)?Object.assign({},h,c):fn(c,h)},set(c){this[l]=c}}})}apply(e){e.forEach(n=>n(this))}}var In=new fTt({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[lTt,cTt,dTt]);function pTt(t){return!t||$e(t.size)||$e(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function hb(t,e,n,r,i){let o=e[i];return o||(o=e[i]=t.measureText(i).width,n.push(i)),o>r&&(r=o),r}function mTt(t,e,n,r){r=r||{};let i=r.data=r.data||{},o=r.garbageCollect=r.garbageCollect||[];r.font!==e&&(i=r.data={},o=r.garbageCollect=[],r.font=e),t.save(),t.font=e;let s=0;const l=n.length;let c,h,d,p,m;for(c=0;cn.length){for(c=0;ce.left-n&&t.xe.top-n&&t.y0&&o.strokeColor!=="";let c,h;for(t.save(),t.font=i.string,gTt(t,o),c=0;c+t||0;function qU(t,e){const n={},r=Ee(e),i=r?Object.keys(e):e,o=Ee(t)?r?s=>fn(t[s],t[e[s]]):s=>t[s]:()=>t;for(const s of i)n[s]=STt(o(s));return n}function TTt(t){return qU(t,{top:"y",right:"x",bottom:"y",left:"x"})}function ETt(t){return qU(t,["topLeft","topRight","bottomLeft","bottomRight"])}function xa(t){const e=TTt(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function kd(t,e){t=t||{},e=e||In.font;let n=fn(t.size,e.size);typeof n=="string"&&(n=parseInt(n,10));let r=fn(t.style,e.style);r&&!(""+r).match(xTt)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:fn(t.family,e.family),lineHeight:wTt(fn(t.lineHeight,e.lineHeight),n),size:n,style:r,weight:fn(t.weight,e.weight),string:""};return i.string=pTt(i),i}function _y(t,e,n,r){let i=!0,o,s,l;for(o=0,s=t.length;on&&l===0?0:l+c;return{min:s(r,-Math.abs(o)),max:s(i,o)}}function Ud(t,e){return Object.assign(Object.create(t),e)}function TL(t,e=[""],n,r,i=()=>t[0]){const o=n||t;typeof r>"u"&&(r=JU("_fallback",t));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:o,_fallback:r,_getTarget:i,override:l=>TL([l,...t],e,o,r)};return new Proxy(s,{deleteProperty(l,c){return delete l[c],delete l._keys,delete t[0][c],!0},get(l,c){return XU(l,c,()=>jTt(c,e,t,l))},getOwnPropertyDescriptor(l,c){return Reflect.getOwnPropertyDescriptor(l._scopes[0],c)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(l,c){return pI(l).includes(c)},ownKeys(l){return pI(l)},set(l,c,h){const d=l._storage||(l._storage=i());return l[c]=d[c]=h,delete l._keys,!0}})}function Pd(t,e,n,r){const i={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:KU(t,r),setContext:o=>Pd(t,o,n,r),override:o=>Pd(t.override(o),e,n,r)};return new Proxy(i,{deleteProperty(o,s){return delete o[s],delete t[s],!0},get(o,s,l){return XU(o,s,()=>kTt(o,s,l))},getOwnPropertyDescriptor(o,s){return o._descriptors.allKeys?Reflect.has(t,s)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,s)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(o,s){return Reflect.has(t,s)},ownKeys(){return Reflect.ownKeys(t)},set(o,s,l){return t[s]=l,delete o[s],!0}})}function KU(t,e={scriptable:!0,indexable:!0}){const{_scriptable:n=e.scriptable,_indexable:r=e.indexable,_allKeys:i=e.allKeys}=t;return{allKeys:i,scriptable:n,indexable:r,isScriptable:Al(n)?n:()=>n,isIndexable:Al(r)?r:()=>r}}const CTt=(t,e)=>t?t+xL(e):e,EL=(t,e)=>Ee(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function XU(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const r=n();return t[e]=r,r}function kTt(t,e,n){const{_proxy:r,_context:i,_subProxy:o,_descriptors:s}=t;let l=r[e];return Al(l)&&s.isScriptable(e)&&(l=PTt(e,l,t,n)),bn(l)&&l.length&&(l=LTt(e,l,t,s.isIndexable)),EL(e,l)&&(l=Pd(l,i,o&&o[e],s)),l}function PTt(t,e,n,r){const{_proxy:i,_context:o,_subProxy:s,_stack:l}=n;if(l.has(t))throw new Error("Recursion detected: "+Array.from(l).join("->")+"->"+t);l.add(t);let c=e(o,s||r);return l.delete(t),EL(t,c)&&(c=OL(i._scopes,i,t,c)),c}function LTt(t,e,n,r){const{_proxy:i,_context:o,_subProxy:s,_descriptors:l}=n;if(typeof o.index<"u"&&r(t))return e[o.index%e.length];if(Ee(e[0])){const c=e,h=i._scopes.filter(d=>d!==c);e=[];for(const d of c){const p=OL(h,i,t,d);e.push(Pd(p,o,s&&s[t],l))}}return e}function QU(t,e,n){return Al(t)?t(e,n):t}const MTt=(t,e)=>t===!0?e:typeof t=="string"?Eu(e,t):void 0;function ATt(t,e,n,r,i){for(const o of e){const s=MTt(n,o);if(s){t.add(s);const l=QU(s._fallback,n,i);if(typeof l<"u"&&l!==n&&l!==r)return l}else if(s===!1&&typeof r<"u"&&n!==r)return null}return!1}function OL(t,e,n,r){const i=e._rootScopes,o=QU(e._fallback,n,r),s=[...t,...i],l=new Set;l.add(r);let c=fI(l,s,n,o||n,r);return c===null||typeof o<"u"&&o!==n&&(c=fI(l,s,o,c,r),c===null)?!1:TL(Array.from(l),[""],i,o,()=>RTt(e,n,r))}function fI(t,e,n,r,i){for(;n;)n=ATt(t,e,n,r,i);return n}function RTt(t,e,n){const r=t._getTarget();e in r||(r[e]={});const i=r[e];return bn(i)&&Ee(n)?n:i||{}}function jTt(t,e,n,r){let i;for(const o of e)if(i=JU(CTt(o,t),n),typeof i<"u")return EL(t,i)?OL(n,r,t,i):i}function JU(t,e){for(const n of e){if(!n)continue;const r=n[t];if(typeof r<"u")return r}}function pI(t){let e=t._keys;return e||(e=t._keys=NTt(t._scopes)),e}function NTt(t){const e=new Set;for(const n of t)for(const r of Object.keys(n).filter(i=>!i.startsWith("_")))e.add(r);return Array.from(e)}function t9(){return typeof window<"u"&&typeof document<"u"}function CL(t){let e=t.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function fb(t,e,n){let r;return typeof t=="string"?(r=parseInt(t,10),t.indexOf("%")!==-1&&(r=r/100*e.parentNode[n])):r=t,r}const U1=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function DTt(t,e){return U1(t).getPropertyValue(e)}const ITt=["top","right","bottom","left"];function lu(t,e,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const o=ITt[i];r[o]=parseFloat(t[e+"-"+o+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const FTt=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function BTt(t,e){const n=t.touches,r=n&&n.length?n[0]:t,{offsetX:i,offsetY:o}=r;let s=!1,l,c;if(FTt(i,o,t.target))l=i,c=o;else{const h=e.getBoundingClientRect();l=r.clientX-h.left,c=r.clientY-h.top,s=!0}return{x:l,y:c,box:s}}function Bc(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:r}=e,i=U1(n),o=i.boxSizing==="border-box",s=lu(i,"padding"),l=lu(i,"border","width"),{x:c,y:h,box:d}=BTt(t,n),p=s.left+(d&&l.left),m=s.top+(d&&l.top);let{width:v,height:y}=e;return o&&(v-=s.width+l.width,y-=s.height+l.height),{x:Math.round((c-p)/v*n.width/r),y:Math.round((h-m)/y*n.height/r)}}function $Tt(t,e,n){let r,i;if(e===void 0||n===void 0){const o=CL(t);if(!o)e=t.clientWidth,n=t.clientHeight;else{const s=o.getBoundingClientRect(),l=U1(o),c=lu(l,"border","width"),h=lu(l,"padding");e=s.width-h.width-c.width,n=s.height-h.height-c.height,r=fb(l.maxWidth,o,"clientWidth"),i=fb(l.maxHeight,o,"clientHeight")}}return{width:e,height:n,maxWidth:r||ub,maxHeight:i||ub}}const by=t=>Math.round(t*10)/10;function zTt(t,e,n,r){const i=U1(t),o=lu(i,"margin"),s=fb(i.maxWidth,t,"clientWidth")||ub,l=fb(i.maxHeight,t,"clientHeight")||ub,c=$Tt(t,e,n);let{width:h,height:d}=c;if(i.boxSizing==="content-box"){const p=lu(i,"border","width"),m=lu(i,"padding");h-=m.width+p.width,d-=m.height+p.height}return h=Math.max(0,h-o.width),d=Math.max(0,r?h/r:d-o.height),h=by(Math.min(h,s,c.maxWidth)),d=by(Math.min(d,l,c.maxHeight)),h&&!d&&(d=by(h/2)),(e!==void 0||n!==void 0)&&r&&c.height&&d>c.height&&(d=c.height,h=by(Math.floor(d*r))),{width:h,height:d}}function mI(t,e,n){const r=e||1,i=Math.floor(t.height*r),o=Math.floor(t.width*r);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const s=t.canvas;return s.style&&(n||!s.style.height&&!s.style.width)&&(s.style.height=`${t.height}px`,s.style.width=`${t.width}px`),t.currentDevicePixelRatio!==r||s.height!==i||s.width!==o?(t.currentDevicePixelRatio=r,s.height=i,s.width=o,t.ctx.setTransform(r,0,0,r,0,0),!0):!1}const UTt=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch{}return t}();function gI(t,e){const n=DTt(t,e),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}/*! - * Chart.js v4.3.3 - * https://www.chartjs.org - * (c) 2023 Chart.js Contributors - * Released under the MIT License - */class VTt{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,n,r,i){const o=n.listeners[i],s=n.duration;o.forEach(l=>l({chart:e,initial:n.initial,numSteps:s,currentStep:Math.min(r-n.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=VU.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=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,l=!1,c;for(;s>=0;--s)c=o[s],c._active?(c._total>r.duration&&(r.duration=c._total),c.tick(e),l=!0):(o[s]=o[o.length-1],o.pop());l&&(i.draw(),this._notify(i,r,e,"progress")),o.length||(r.running=!1,this._notify(i,r,e,"complete"),r.initial=!1),n+=o.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){const n=this._charts;let r=n.get(e);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,r)),r}listen(e,n,r){this._getAnims(e).listeners[n].push(r)}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n)}has(e){return this._getAnims(e).items.length>0}start(e){const n=this._charts.get(e);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,i)=>Math.max(r,i._duration),0),this._refresh())}running(e){if(!this._running)return!1;const n=this._charts.get(e);return!(!n||!n.running||!n.items.length)}stop(e){const n=this._charts.get(e);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(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Zs=new VTt;const vI="transparent",HTt={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const r=uI(t||vI),i=r.valid&&uI(e||vI);return i&&i.valid?i.mix(r,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class WTt{constructor(e,n,r,i){const o=n[r];i=_y([e.to,i,o,e.from]);const s=_y([e.from,o,i]);this._active=!0,this._fn=e.fn||HTt[e.type||typeof s],this._easing=pm[e.easing]||pm.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=r,this._from=s,this._to=i,this._promises=void 0}active(){return this._active}update(e,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,e.duration)),this._total+=o,this._loop=!!e.loop,this._to=_y([e.to,n,i,e.from]),this._from=_y([e.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const n=e-this._start,r=this._duration,i=this._prop,o=this._from,s=this._loop,l=this._to;let c;if(this._active=o!==l&&(s||n1?2-c:c,c=this._easing(Math.min(1,Math.max(0,c))),this._target[i]=this._fn(o,l,c)}wait(){const e=this._promises||(this._promises=[]);return new Promise((n,r)=>{e.push({res:n,rej:r})})}_notify(e){const n=e?"res":"rej",r=this._promises||[];for(let i=0;i{const o=e[i];if(!Ee(o))return;const s={};for(const l of n)s[l]=o[l];(bn(o.properties)&&o.properties||[i]).forEach(l=>{(l===i||!r.has(l))&&r.set(l,s)})})}_animateOptions(e,n){const r=n.options,i=GTt(e,r);if(!i)return[];const o=this._createAnimations(i,r);return r.$shared&&ZTt(e.options.$animations,r).then(()=>{e.options=r},()=>{}),o}_createAnimations(e,n){const r=this._properties,i=[],o=e.$animations||(e.$animations={}),s=Object.keys(n),l=Date.now();let c;for(c=s.length-1;c>=0;--c){const h=s[c];if(h.charAt(0)==="$")continue;if(h==="options"){i.push(...this._animateOptions(e,n));continue}const d=n[h];let p=o[h];const m=r.get(h);if(p)if(m&&p.active()){p.update(m,d,l);continue}else p.cancel();if(!m||!m.duration){e[h]=d;continue}o[h]=p=new WTt(m,e,h,d),i.push(p)}return i}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}const r=this._createAnimations(e,n);if(r.length)return Zs.add(this._chart,r),!0}}function ZTt(t,e){const n=[],r=Object.keys(e);for(let i=0;i0||!n&&o<0)return i.index}return null}function wI(t,e){const{chart:n,_cachedMeta:r}=t,i=n._stacks||(n._stacks={}),{iScale:o,vScale:s,index:l}=r,c=o.axis,h=s.axis,d=QTt(o,s,r),p=e.length;let m;for(let v=0;vn[r].axis===e).shift()}function eEt(t,e){return Ud(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function nEt(t,e,n){return Ud(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function cp(t,e){const n=t.controller.index,r=t.vScale&&t.vScale.axis;if(r){e=e||t._parsed;for(const i of e){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 U2=t=>t==="reset"||t==="none",SI=(t,e)=>e?t:Object.assign({},t),rEt=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:e9(n,!0),values:null};class cu{constructor(e,n){this.chart=e,this._ctx=e.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 e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=bI(e.vScale,e),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(e){this.index!==e&&cp(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(p,m,v,y)=>p==="x"?m:p==="r"?y:v,o=n.xAxisID=fn(r.xAxisID,z2(e,"x")),s=n.yAxisID=fn(r.yAxisID,z2(e,"y")),l=n.rAxisID=fn(r.rAxisID,z2(e,"r")),c=n.indexAxis,h=n.iAxisID=i(c,o,s,l),d=n.vAxisID=i(c,s,o,l);n.xScale=this.getScaleForId(o),n.yScale=this.getScaleForId(s),n.rScale=this.getScaleForId(l),n.iScale=this.getScaleForId(h),n.vScale=this.getScaleForId(d)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const n=this._cachedMeta;return e===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&sI(this._data,this),e._stacked&&cp(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),r=this._data;if(Ee(n))this._data=XTt(n);else if(r!==n){if(r){sI(r,this);const i=this._cachedMeta;cp(i),i._parsed=[]}n&&Object.isExtensible(n)&&eTt(n,this),this._syncList=[],this._data=n}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const n=this._cachedMeta,r=this.getDataset();let i=!1;this._dataCheck();const o=n._stacked;n._stacked=bI(n.vScale,n),n.stack!==r.stack&&(i=!0,cp(n),n.stack=r.stack),this._resyncElements(e),(i||o!==n._stacked)&&wI(this,n._parsed)}configure(){const e=this.chart.config,n=e.datasetScopeKeys(this._type),r=e.getOptionScopes(this.getDataset(),n,!0);this.options=e.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,n){const{_cachedMeta:r,_data:i}=this,{iScale:o,_stacked:s}=r,l=o.axis;let c=e===0&&n===i.length?!0:r._sorted,h=e>0&&r._parsed[e-1],d,p,m;if(this._parsing===!1)r._parsed=i,r._sorted=!0,m=i;else{bn(i[e])?m=this.parseArrayData(r,i,e,n):Ee(i[e])?m=this.parseObjectData(r,i,e,n):m=this.parsePrimitiveData(r,i,e,n);const v=()=>p[l]===null||h&&p[l]_||p<_}for(m=0;m=0;--m)if(!y()){this.updateRangeFromParsed(h,e,v,c);break}}return h}getAllParsedValues(e){const n=this._cachedMeta._parsed,r=[];let i,o,s;for(i=0,o=n.length;i=0&&ethis.getContext(r,i,n),_=h.resolveNamedOptions(m,v,y,p);return _.$shared&&(_.$shared=c,o[s]=Object.freeze(SI(_,c))),_}_resolveAnimations(e,n,r){const i=this.chart,o=this._cachedDataOpts,s=`animation-${n}`,l=o[s];if(l)return l;let c;if(i.options.animation!==!1){const d=this.chart.config,p=d.datasetAnimationScopeKeys(this._type,n),m=d.getOptionScopes(this.getDataset(),p);c=d.createResolver(m,this.getContext(e,r,n))}const h=new YTt(i,c&&c.animations);return c&&c._cacheable&&(o[s]=Object.freeze(h)),h}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return!n||U2(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){const r=this.resolveDataElementOptions(e,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(e,n,r,i){U2(i)?Object.assign(e,r):this._resolveAnimations(n,i).update(e,r)}updateSharedOptions(e,n,r){e&&!U2(n)&&this._resolveAnimations(void 0,n).update(e,r)}_setStyle(e,n,r,i){e.active=i;const o=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(e,{options:!i&&this.getSharedOptions(o)||o})}removeHoverStyle(e,n,r){this._setStyle(e,r,"active",!1)}setHoverStyle(e,n,r){this._setStyle(e,r,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const n=this._data,r=this._cachedMeta.data;for(const[l,c,h]of this._syncList)this[l](c,h);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,e):o{for(h.length+=n,l=h.length-1;l>=s;l--)h[l]=h[l-n]};for(c(o),l=e;li-o))}return t._cache.$bar}function oEt(t){const e=t.iScale,n=iEt(e,t.type);let r=e._length,i,o,s,l;const c=()=>{s===32767||s===-32768||(_g(l)&&(r=Math.min(r,Math.abs(s-l)||r)),l=s)};for(i=0,o=n.length;i0?i[t-1]:null,l=tMath.abs(l)&&(c=l,h=s),e[n.axis]=h,e._custom={barStart:c,barEnd:h,start:i,end:o,min:s,max:l}}function n9(t,e,n,r){return bn(t)?lEt(t,e,n,r):e[n.axis]=n.parse(t,r),e}function TI(t,e,n,r){const i=t.iScale,o=t.vScale,s=i.getLabels(),l=i===o,c=[];let h,d,p,m;for(h=n,d=n+r;h=n?1:-1)}function uEt(t){let e,n,r,i,o;return t.horizontal?(e=t.base>t.x,n="left",r="right"):(e=t.basec.controller.options.grouped),o=r.options.stacked,s=[],l=c=>{const h=c.controller.getParsed(n),d=h&&h[c.vScale.axis];if($e(d)||isNaN(d))return!0};for(const c of i)if(!(n!==void 0&&l(c))&&((o===!1||s.indexOf(c.stack)===-1||o===void 0&&c.stack===void 0)&&s.push(c.stack),c.index===e))break;return s.length||s.push(void 0),s}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,n,r){const i=this._getStacks(e,r),o=n!==void 0?i.indexOf(n):-1;return o===-1?i.length-1:o}_getRuler(){const e=this.options,n=this._cachedMeta,r=n.iScale,i=[];let o,s;for(o=0,s=n.data.length;oMO(E,l,c,!0)?1:Math.max(O,O*n,k,k*n),y=(E,O,k)=>MO(E,l,c,!0)?-1:Math.min(O,O*n,k,k*n),_=v(0,h,p),T=v(oo,d,m),x=y(_o,h,p),w=y(_o+oo,d,m);r=(_-x)/2,i=(T-w)/2,o=-(_+x)/2,s=-(T+w)/2}return{ratioX:r,ratioY:i,offsetX:o,offsetY:s}}class Ap extends cu{constructor(e,n){super(e,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,n){const r=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=r;else{let o=c=>+r[c];if(Ee(r[e])){const{key:c="value"}=this._parsing;o=h=>+Eu(r[h],c)}let s,l;for(s=e,l=e+n;s0&&!isNaN(e)?Ni*(Math.abs(e)/n):0}getLabelAndValue(e){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],o=$1(n._parsed[e],r.options.locale);return{label:i[e]||"",value:o}}getMaxBorderWidth(e){let n=0;const r=this.chart;let i,o,s,l,c;if(!e){for(i=0,o=r.data.datasets.length;it!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),Qt(Ap,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:n,color:r}}=t.legend.options;return e.labels.map((i,o)=>{const s=t.getDatasetMeta(0).controller.getStyle(o);return{text:i,fillStyle:s.backgroundColor,strokeStyle:s.borderColor,fontColor:r,lineWidth:s.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(o),index:o}})}return[]}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update()}}}});class __ extends cu{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const n=this._cachedMeta,{dataset:r,data:i=[],_dataset:o}=n,s=this.chart._animationsDisabled;let{start:l,count:c}=iTt(n,i,s);this._drawStart=l,this._drawCount=c,oTt(n)&&(l=0,c=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!o._decimated,r.points=i;const h=this.resolveDatasetElementOptions(e);this.options.showLine||(h.borderWidth=0),h.segment=this.options.segment,this.updateElement(r,void 0,{animated:!s,options:h},e),this.updateElements(i,l,c,e)}updateElements(e,n,r,i){const o=i==="reset",{iScale:s,vScale:l,_stacked:c,_dataset:h}=this._cachedMeta,{sharedOptions:d,includeOptions:p}=this._getSharedOptions(n,i),m=s.axis,v=l.axis,{spanGaps:y,segment:_}=this.options,T=bg(y)?y:Number.POSITIVE_INFINITY,x=this.chart._animationsDisabled||o||i==="none",w=n+r,E=e.length;let O=n>0&&this.getParsed(n-1);for(let k=0;k=w){A.skip=!0;continue}const j=this.getParsed(k),B=$e(j[v]),N=A[m]=s.getPixelForValue(j[m],k),V=A[v]=o||B?l.getBasePixel():l.getPixelForValue(c?this.applyStack(l,j,c):j[v],k);A.skip=isNaN(N)||isNaN(V)||B,A.stop=k>0&&Math.abs(j[m]-O[m])>T,_&&(A.parsed=j,A.raw=h.data[k]),p&&(A.options=d||this.resolveDataElementOptions(k,P.active?"active":i)),x||this.updateElement(P,k,A,i),O=j}}getMaxOverflow(){const e=this._cachedMeta,n=e.dataset,r=n.options&&n.options.borderWidth||0,i=e.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 e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}Qt(__,"id","line"),Qt(__,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),Qt(__,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});function Oc(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class kL{constructor(e){Qt(this,"options"),this.options=e||{}}static override(e){Object.assign(kL.prototype,e)}init(){}formats(){return Oc()}parse(){return Oc()}format(){return Oc()}add(){return Oc()}diff(){return Oc()}startOf(){return Oc()}endOf(){return Oc()}}var mEt={_date:kL};function gEt(t,e,n,r){const{controller:i,data:o,_sorted:s}=t,l=i._cachedMeta.iScale;if(l&&e===l.axis&&e!=="r"&&s&&o.length){const c=l._reversePixels?JSt:Gc;if(r){if(i._sharedOptions){const h=o[0],d=typeof h.getRange=="function"&&h.getRange(e);if(d){const p=c(o,e,n-d),m=c(o,e,n+d);return{lo:p.lo,hi:m.hi}}}}else return c(o,e,n)}return{lo:0,hi:o.length-1}}function uv(t,e,n,r,i){const o=t.getSortedVisibleDatasetMetas(),s=n[e];for(let l=0,c=o.length;l{c[s](e[n],i)&&(o.push({element:c,datasetIndex:h,index:d}),l=l||c.inRange(e.x,e.y,i))}),r&&!l?[]:o}var bEt={evaluateInteractionItems:uv,modes:{index(t,e,n,r){const i=Bc(e,t),o=n.axis||"x",s=n.includeInvisible||!1,l=n.intersect?H2(t,i,o,r,s):W2(t,i,o,!1,r,s),c=[];return l.length?(t.getSortedVisibleDatasetMetas().forEach(h=>{const d=l[0].index,p=h.data[d];p&&!p.skip&&c.push({element:p,datasetIndex:h.index,index:d})}),c):[]},dataset(t,e,n,r){const i=Bc(e,t),o=n.axis||"xy",s=n.includeInvisible||!1;let l=n.intersect?H2(t,i,o,r,s):W2(t,i,o,!1,r,s);if(l.length>0){const c=l[0].datasetIndex,h=t.getDatasetMeta(c).data;l=[];for(let d=0;dn.pos===e)}function kI(t,e){return t.filter(n=>r9.indexOf(n.pos)===-1&&n.box.axis===e)}function hp(t,e){return t.sort((n,r)=>{const i=e?r:n,o=e?n:r;return i.weight===o.weight?i.index-o.index:i.weight-o.weight})}function xEt(t){const e=[];let n,r,i,o,s,l;for(n=0,r=(t||[]).length;nh.box.fullSize),!0),r=hp(up(e,"left"),!0),i=hp(up(e,"right")),o=hp(up(e,"top"),!0),s=hp(up(e,"bottom")),l=kI(e,"x"),c=kI(e,"y");return{fullSize:n,leftAndTop:r.concat(o),rightAndBottom:i.concat(c).concat(s).concat(l),chartArea:up(e,"chartArea"),vertical:r.concat(i).concat(c),horizontal:o.concat(s).concat(l)}}function PI(t,e,n,r){return Math.max(t[n],e[n])+Math.max(t[r],e[r])}function i9(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function EEt(t,e,n,r){const{pos:i,box:o}=n,s=t.maxPadding;if(!Ee(i)){n.size&&(t[i]-=n.size);const p=r[n.stack]||{size:0,count:1};p.size=Math.max(p.size,n.horizontal?o.height:o.width),n.size=p.size/p.count,t[i]+=n.size}o.getPadding&&i9(s,o.getPadding());const l=Math.max(0,e.outerWidth-PI(s,t,"left","right")),c=Math.max(0,e.outerHeight-PI(s,t,"top","bottom")),h=l!==t.w,d=c!==t.h;return t.w=l,t.h=c,n.horizontal?{same:h,other:d}:{same:d,other:h}}function OEt(t){const e=t.maxPadding;function n(r){const i=Math.max(e[r]-t[r],0);return t[r]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}function CEt(t,e){const n=e.maxPadding;function r(i){const o={left:0,top:0,right:0,bottom:0};return i.forEach(s=>{o[s]=Math.max(e[s],n[s])}),o}return r(t?["left","right"]:["top","bottom"])}function Rp(t,e,n,r){const i=[];let o,s,l,c,h,d;for(o=0,s=t.length,h=0;o{typeof _.beforeLayout=="function"&&_.beforeLayout()});const d=c.reduce((_,T)=>T.box.options&&T.box.options.display===!1?_:_+1,0)||1,p=Object.freeze({outerWidth:e,outerHeight:n,padding:i,availableWidth:o,availableHeight:s,vBoxMaxWidth:o/2/d,hBoxMaxHeight:s/2}),m=Object.assign({},i);i9(m,xa(r));const v=Object.assign({maxPadding:m,w:o,h:s,x:i.left,y:i.top},i),y=SEt(c.concat(h),p);Rp(l.fullSize,v,p,y),Rp(c,v,p,y),Rp(h,v,p,y)&&Rp(c,v,p,y),OEt(v),LI(l.leftAndTop,v,p,y),v.x+=v.w,v.y+=v.h,LI(l.rightAndBottom,v,p,y),t.chartArea={left:v.left,top:v.top,right:v.left+v.w,bottom:v.top+v.h,height:v.h,width:v.w},Ar(l.chartArea,_=>{const T=_.box;Object.assign(T,t.chartArea),T.update(v.w,v.h,{left:0,top:0,right:0,bottom:0})})}};class o9{acquireContext(e,n){}releaseContext(e){return!1}addEventListener(e,n,r){}removeEventListener(e,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(e,n,r,i){return n=Math.max(0,n||e.width),r=r||e.height,{width:n,height:Math.max(0,i?Math.floor(n/i):r)}}isAttached(e){return!0}updateConfig(e){}}class kEt extends o9{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const b_="$chartjs",PEt={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},MI=t=>t===null||t==="";function LEt(t,e){const n=t.style,r=t.getAttribute("height"),i=t.getAttribute("width");if(t[b_]={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",MI(i)){const o=gI(t,"width");o!==void 0&&(t.width=o)}if(MI(r))if(t.style.height==="")t.height=t.width/(e||2);else{const o=gI(t,"height");o!==void 0&&(t.height=o)}return t}const s9=UTt?{passive:!0}:!1;function MEt(t,e,n){t.addEventListener(e,n,s9)}function AEt(t,e,n){t.canvas.removeEventListener(e,n,s9)}function REt(t,e){const n=PEt[t.type]||t.type,{x:r,y:i}=Bc(t,e);return{type:n,chart:e,native:t,x:r!==void 0?r:null,y:i!==void 0?i:null}}function pb(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function jEt(t,e,n){const r=t.canvas,i=new MutationObserver(o=>{let s=!1;for(const l of o)s=s||pb(l.addedNodes,r),s=s&&!pb(l.removedNodes,r);s&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function NEt(t,e,n){const r=t.canvas,i=new MutationObserver(o=>{let s=!1;for(const l of o)s=s||pb(l.removedNodes,r),s=s&&!pb(l.addedNodes,r);s&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const xg=new Map;let AI=0;function a9(){const t=window.devicePixelRatio;t!==AI&&(AI=t,xg.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function DEt(t,e){xg.size||window.addEventListener("resize",a9),xg.set(t,e)}function IEt(t){xg.delete(t),xg.size||window.removeEventListener("resize",a9)}function FEt(t,e,n){const r=t.canvas,i=r&&CL(r);if(!i)return;const o=HU((l,c)=>{const h=i.clientWidth;n(l,c),h{const c=l[0],h=c.contentRect.width,d=c.contentRect.height;h===0&&d===0||o(h,d)});return s.observe(i),DEt(t,o),s}function Y2(t,e,n){n&&n.disconnect(),e==="resize"&&IEt(t)}function BEt(t,e,n){const r=t.canvas,i=HU(o=>{t.ctx!==null&&n(REt(o,t))},t);return MEt(r,e,i),i}class $Et extends o9{acquireContext(e,n){const r=e&&e.getContext&&e.getContext("2d");return r&&r.canvas===e?(LEt(e,n),r):null}releaseContext(e){const n=e.canvas;if(!n[b_])return!1;const r=n[b_].initial;["height","width"].forEach(o=>{const s=r[o];$e(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[b_],!0}addEventListener(e,n,r){this.removeEventListener(e,n);const i=e.$proxies||(e.$proxies={}),o={attach:jEt,detach:NEt,resize:FEt}[n]||BEt;i[n]=o(e,n,r)}removeEventListener(e,n){const r=e.$proxies||(e.$proxies={}),i=r[n];i&&(({attach:Y2,detach:Y2,resize:Y2}[n]||AEt)(e,n,i),r[n]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,r,i){return zTt(e,n,r,i)}isAttached(e){const n=CL(e);return!!(n&&n.isConnected)}}function zEt(t){return!t9()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?kEt:$Et}var Sy;let l9=(Sy=class{constructor(){Qt(this,"x"),Qt(this,"y"),Qt(this,"active",!1),Qt(this,"options"),Qt(this,"$animations")}tooltipPosition(t){const{x:e,y:n}=this.getProps(["x","y"],t);return{x:e,y:n}}hasValue(){return bg(this.x)&&bg(this.y)}getProps(t,e){const n=this.$animations;if(!e||!n)return this;const r={};return t.forEach(i=>{r[i]=n[i]&&n[i].active()?n[i]._to:this[i]}),r}},Qt(Sy,"defaults",{}),Qt(Sy,"defaultRoutes"),Sy);function UEt(t,e){const n=t.options.ticks,r=VEt(t),i=Math.min(n.maxTicksLimit||r,r),o=n.major.enabled?WEt(e):[],s=o.length,l=o[0],c=o[s-1],h=[];if(s>i)return YEt(e,h,o,s/i),h;const d=HEt(o,e,i);if(s>0){let p,m;const v=s>1?Math.round((c-l)/(s-1)):null;for(Ty(e,h,d,$e(v)?0:l-v,l),p=0,m=s-1;pi)return c}return Math.max(i,1)}function WEt(t){const e=[];let n,r;for(n=0,r=t.length;nt==="left"?"right":t==="right"?"left":t,RI=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,jI=(t,e)=>Math.min(e||t,t);function NI(t,e){const n=[],r=t.length/e,i=t.length;let o=0;for(;os+l)))return c}function KEt(t,e){Ar(t,n=>{const r=n.gc,i=r.length/2;let o;if(i>e){for(o=0;or?r:n,r=i&&n>r?n:r,{min:ki(n,ki(r,n)),max:ki(r,ki(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 e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){vn(this.options.beforeUpdate,[this])}update(e,n,r){const{beginAtZero:i,grace:o,ticks:s}=this.options,l=s.sampleSize;this.beforeUpdate(),this.maxWidth=e,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=OTt(this,o,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const c=l=o||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const d=this._getLabelSizes(),p=d.widest.width,m=d.highest.height,v=oa(this.chart.width-p,0,this.maxWidth);l=e.offset?this.maxWidth/r:v/(r-1),p+6>l&&(l=v/(r-(e.offset?.5:1)),c=this.maxHeight-dp(e.grid)-n.padding-DI(e.title,this.chart.options.font),h=Math.sqrt(p*p+m*m),s=wL(Math.min(Math.asin(oa((d.highest.height+6)/l,-1,1)),Math.asin(oa(c/h,-1,1))-Math.asin(oa(m/h,-1,1)))),s=Math.max(i,Math.min(o,s))),this.labelRotation=s}afterCalculateLabelRotation(){vn(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){vn(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:o}}=this,s=this._isVisible(),l=this.isHorizontal();if(s){const c=DI(i,n.options.font);if(l?(e.width=this.maxWidth,e.height=dp(o)+c):(e.height=this.maxHeight,e.width=dp(o)+c),r.display&&this.ticks.length){const{first:h,last:d,widest:p,highest:m}=this._getLabelSizes(),v=r.padding*2,y=cs(this.labelRotation),_=Math.cos(y),T=Math.sin(y);if(l){const x=r.mirror?0:T*p.width+_*m.height;e.height=Math.min(this.maxHeight,e.height+x+v)}else{const x=r.mirror?0:_*p.width+T*m.height;e.width=Math.min(this.maxWidth,e.width+x+v)}this._calculatePadding(h,d,T,_)}}this._handleMargins(),l?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,n,r,i){const{ticks:{align:o,padding:s},position:l}=this.options,c=this.labelRotation!==0,h=l!=="top"&&this.axis==="x";if(this.isHorizontal()){const d=this.getPixelForTick(0)-this.left,p=this.right-this.getPixelForTick(this.ticks.length-1);let m=0,v=0;c?h?(m=i*e.width,v=r*n.height):(m=r*e.height,v=i*n.width):o==="start"?v=n.width:o==="end"?m=e.width:o!=="inner"&&(m=e.width/2,v=n.width/2),this.paddingLeft=Math.max((m-d+s)*this.width/(this.width-d),0),this.paddingRight=Math.max((v-p+s)*this.width/(this.width-p),0)}else{let d=n.height/2,p=e.height/2;o==="start"?(d=0,p=e.height):o==="end"&&(d=n.height,p=0),this.paddingTop=d+s,this.paddingBottom=p+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(){vn(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:n}=this.options;return n==="top"||n==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let n,r;for(n=0,r=e.length;n({width:s[B]||0,height:l[B]||0});return{first:j(0),last:j(n-1),widest:j(P),highest:j(A),widths:s,heights:l}}getLabelForValue(e){return e}getPixelForValue(e,n){return NaN}getValueForPixel(e){}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const n=this._startPixel+e*this._length;return QSt(this._alignToPixels?Ec(this.chart,n,0):n)}getDecimalForPixel(e){const n=(e-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:n}=this;return e<0&&n<0?n:e>0&&n>0?e:0}getContext(e){const n=this.ticks||[];if(e>=0&&el*i?l/r:c/i:c*i0}_computeGridLineItems(e){const n=this.axis,r=this.chart,i=this.options,{grid:o,position:s,border:l}=i,c=o.offset,h=this.isHorizontal(),d=this.ticks.length+(c?1:0),p=dp(o),m=[],v=l.setContext(this.getContext()),y=v.display?v.width:0,_=y/2,T=function(J){return Ec(r,J,y)};let x,w,E,O,k,P,A,j,B,N,V,Y;if(s==="top")x=T(this.bottom),P=this.bottom-p,j=x-_,N=T(e.top)+_,Y=e.bottom;else if(s==="bottom")x=T(this.top),N=e.top,Y=T(e.bottom)-_,P=x+_,j=this.top+p;else if(s==="left")x=T(this.right),k=this.right-p,A=x-_,B=T(e.left)+_,V=e.right;else if(s==="right")x=T(this.left),B=e.left,V=T(e.right)-_,k=x+_,A=this.left+p;else if(n==="x"){if(s==="center")x=T((e.top+e.bottom)/2+.5);else if(Ee(s)){const J=Object.keys(s)[0],et=s[J];x=T(this.chart.scales[J].getPixelForValue(et))}N=e.top,Y=e.bottom,P=x+_,j=P+p}else if(n==="y"){if(s==="center")x=T((e.left+e.right)/2);else if(Ee(s)){const J=Object.keys(s)[0],et=s[J];x=T(this.chart.scales[J].getPixelForValue(et))}k=x-_,A=k-p,B=e.left,V=e.right}const nt=fn(i.ticks.maxTicksLimit,d),K=Math.max(1,Math.ceil(d/nt));for(w=0;wi.value===e);return r>=0?n.setContext(this.getContext(r)).lineWidth:0}drawGrid(e){const n=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let o,s;const l=(c,h,d)=>{!d.width||!d.color||(r.save(),r.lineWidth=d.width,r.strokeStyle=d.color,r.setLineDash(d.borderDash||[]),r.lineDashOffset=d.borderDashOffset,r.beginPath(),r.moveTo(c.x,c.y),r.lineTo(h.x,h.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(e){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=[t].concat(r).join("."),s=e[n].split("."),l=s.pop(),c=s.join(".");In.route(o,i,c,l)})}function rOt(t){return"id"in t&&"defaults"in t}class iOt{constructor(){this.controllers=new Ey(cu,"datasets",!0),this.elements=new Ey(l9,"elements"),this.plugins=new Ey(Object,"plugins"),this.scales=new Ey(Vd,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,n,r){[...n].forEach(i=>{const o=r||this._getRegistryForType(i);r||o.isForType(i)||o===this.plugins&&i.id?this._exec(e,o,i):Ar(i,s=>{const l=r||this._getRegistryForType(s);this._exec(e,l,s)})})}_exec(e,n,r){const i=xL(e);vn(r["before"+i],[],r),n[e](r),vn(r["after"+i],[],r)}_getRegistryForType(e){for(let n=0;no.filter(l=>!s.some(c=>l.plugin.id===c.plugin.id));this._notify(i(n,r),e,"stop"),this._notify(i(r,n),e,"start")}}function sOt(t){const e={},n=[],r=Object.keys(ts.plugins.items);for(let o=0;o1&&II(t[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function FI(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function fOt(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter(r=>r.xAxisID===t||r.yAxisID===t);if(n.length)return FI(t,"x",n[0])||FI(t,"y",n[0])}return{}}function pOt(t,e){const n=Ou[t.type]||{scales:{}},r=e.scales||{},i=RO(t.type,e),o=Object.create(null);return Object.keys(r).forEach(s=>{const l=r[s];if(!Ee(l))return console.error(`Invalid scale configuration for scale: ${s}`);if(l._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${s}`);const c=jO(s,l,fOt(s,t),In.scales[l.type]),h=hOt(c,i),d=n.scales||{};o[s]=fm(Object.create(null),[{axis:c},l,d[c],d[h]])}),t.data.datasets.forEach(s=>{const l=s.type||t.type,c=s.indexAxis||RO(l,e),h=(Ou[l]||{}).scales||{};Object.keys(h).forEach(d=>{const p=uOt(d,c),m=s[p+"AxisID"]||p;o[m]=o[m]||Object.create(null),fm(o[m],[{axis:p},r[m],h[d]])})}),Object.keys(o).forEach(s=>{const l=o[s];fm(l,[In.scales[l.type],In.scale])}),o}function c9(t){const e=t.options||(t.options={});e.plugins=fn(e.plugins,{}),e.scales=pOt(t,e)}function u9(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function mOt(t){return t=t||{},t.data=u9(t.data),c9(t),t}const BI=new Map,h9=new Set;function Oy(t,e){let n=BI.get(t);return n||(n=e(),BI.set(t,n),h9.add(n)),n}const fp=(t,e,n)=>{const r=Eu(e,n);r!==void 0&&t.add(r)};class gOt{constructor(e){this._config=mOt(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=u9(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),c9(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Oy(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,n){return Oy(`${e}.transition.${n}`,()=>[[`datasets.${e}.transitions.${n}`,`transitions.${n}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,n){return Oy(`${e}-${n}`,()=>[[`datasets.${e}.elements.${n}`,`datasets.${e}`,`elements.${n}`,""]])}pluginScopeKeys(e){const n=e.id,r=this.type;return Oy(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,n){const r=this._scopeCache;let i=r.get(e);return(!i||n)&&(i=new Map,r.set(e,i)),i}getOptionScopes(e,n,r){const{options:i,type:o}=this,s=this._cachedScopes(e,r),l=s.get(n);if(l)return l;const c=new Set;n.forEach(d=>{e&&(c.add(e),d.forEach(p=>fp(c,e,p))),d.forEach(p=>fp(c,i,p)),d.forEach(p=>fp(c,Ou[o]||{},p)),d.forEach(p=>fp(c,In,p)),d.forEach(p=>fp(c,AO,p))});const h=Array.from(c);return h.length===0&&h.push(Object.create(null)),h9.has(n)&&s.set(n,h),h}chartOptionScopes(){const{options:e,type:n}=this;return[e,Ou[n]||{},In.datasets[n]||{},{type:n},In,AO]}resolveNamedOptions(e,n,r,i=[""]){const o={$shared:!0},{resolver:s,subPrefixes:l}=$I(this._resolverCache,e,i);let c=s;if(yOt(s,n)){o.$shared=!1,r=Al(r)?r():r;const h=this.createResolver(e,r,l);c=Pd(s,r,h)}for(const h of n)o[h]=c[h];return o}createResolver(e,n,r=[""],i){const{resolver:o}=$I(this._resolverCache,e,r);return Ee(n)?Pd(o,n,void 0,i):o}}function $I(t,e,n){let r=t.get(e);r||(r=new Map,t.set(e,r));const i=n.join();let o=r.get(i);return o||(o={resolver:TL(e,n),subPrefixes:n.filter(s=>!s.toLowerCase().includes("hover"))},r.set(i,o)),o}const vOt=t=>Ee(t)&&Object.getOwnPropertyNames(t).reduce((e,n)=>e||Al(t[n]),!1);function yOt(t,e){const{isScriptable:n,isIndexable:r}=KU(t);for(const i of e){const o=n(i),s=r(i),l=(s||o)&&t[i];if(o&&(Al(l)||vOt(l))||s&&bn(l))return!0}return!1}var _Ot="4.3.3";const bOt=["top","bottom","left","right","chartArea"];function zI(t,e){return t==="top"||t==="bottom"||bOt.indexOf(t)===-1&&e==="x"}function UI(t,e){return function(n,r){return n[t]===r[t]?n[e]-r[e]:n[t]-r[t]}}function VI(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),vn(n&&n.onComplete,[t],e)}function xOt(t){const e=t.chart,n=e.options.animation;vn(n&&n.onProgress,[t],e)}function d9(t){return t9()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const x_={},HI=t=>{const e=d9(t);return Object.values(x_).filter(n=>n.canvas===e).pop()};function wOt(t,e,n){const r=Object.keys(t);for(const i of r){const o=+i;if(o>=e){const s=t[i];delete t[i],(n>0||o>e)&&(t[o+n]=s)}}}function SOt(t,e,n,r){return!n||t.type==="mouseout"?null:r?e:t}function TOt(t){const{xScale:e,yScale:n}=t;if(e&&n)return{left:e.left,right:e.right,top:n.top,bottom:n.bottom}}var Da;let PL=(Da=class{static register(...t){ts.add(...t),WI()}static unregister(...t){ts.remove(...t),WI()}constructor(t,e){const n=this.config=new gOt(e),r=d9(t),i=HI(r);if(i)throw new Error("Canvas is already in use. Chart with ID '"+i.id+"' must be destroyed before the canvas with ID '"+i.canvas.id+"' can be reused.");const o=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||zEt(r)),this.platform.updateConfig(n);const s=this.platform.acquireContext(r,o.aspectRatio),l=s&&s.canvas,c=l&&l.height,h=l&&l.width;if(this.id=USt(),this.ctx=s,this.canvas=l,this.width=h,this.height=c,this._options=o,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 oOt,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=nTt(d=>this.update(d),o.resizeDelay||0),this._dataChanges=[],x_[this.id]=this,!s||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Zs.listen(this,"complete",VI),Zs.listen(this,"progress",xOt),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:n,height:r,_aspectRatio:i}=this;return $e(t)?e&&i?i:r?n/r: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 ts}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():mI(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return dI(this.canvas,this.ctx),this}stop(){return Zs.stop(this),this}resize(t,e){Zs.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const n=this.options,r=this.canvas,i=n.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(r,t,e,i),s=n.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,mI(this,s,!0)&&(this.notifyPlugins("resize",{size:o}),vn(n.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const t=this.options.scales||{};Ar(t,(e,n)=>{e.id=n})}buildOrUpdateScales(){const t=this.options,e=t.scales,n=this.scales,r=Object.keys(n).reduce((o,s)=>(o[s]=!1,o),{});let i=[];e&&(i=i.concat(Object.keys(e).map(o=>{const s=e[o],l=jO(o,s),c=l==="r",h=l==="x";return{options:s,dposition:c?"chartArea":h?"bottom":"left",dtype:c?"radialLinear":h?"category":"linear"}}))),Ar(i,o=>{const s=o.options,l=s.id,c=jO(l,s),h=fn(s.type,o.dtype);(s.position===void 0||zI(s.position,c)!==zI(o.dposition))&&(s.position=o.dposition),r[l]=!0;let d=null;if(l in n&&n[l].type===h)d=n[l];else{const p=ts.getScale(h);d=new p({id:l,type:h,ctx:this.ctx,chart:this}),n[d.id]=d}d.init(s,t)}),Ar(r,(o,s)=>{o||delete n[s]}),Ar(n,o=>{wy.configure(this,o,o.options),wy.addBox(this,o)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,n=t.length;if(t.sort((r,i)=>r.index-i.index),n>e){for(let r=e;re.length&&delete this._stacks,t.forEach((n,r)=>{e.filter(i=>i===n._dataset).length===0&&this._destroyDatasetMeta(r)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let n,r;for(this._removeUnreferencedMetasets(),n=0,r=e.length;n{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const n=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const i=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let c=0,h=this.data.datasets.length;c{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(UI("z","_idx"));const{_active:s,_lastEvent:l}=this;l?this._eventHandler(l,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){Ar(this.scales,t=>{wy.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),n=new Set(t.events);(!rI(e,n)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:n,start:r,count:i}of e){const o=n==="_removeElements"?-i:i;wOt(t,r,o)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,n=i=>new Set(t.filter(o=>o[0]===i).map((o,s)=>s+","+o.splice(1).join(","))),r=n(0);for(let i=1;ii.split(",")).map(i=>({method:i[1],start:+i[2],count:+i[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;wy.update(this,this.width,this.height,t);const e=this.chartArea,n=e.width<=0||e.height<=0;this._layers=[],Ar(this.boxes,r=>{n&&r.position==="chartArea"||(r.configure&&r.configure(),this._layers.push(...r._layers()))},this),this._layers.forEach((r,i)=>{r._idx=i}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,n=this.data.datasets.length;e=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,n=t._clip,r=!n.disabled,i=TOt(t)||this.chartArea,o={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(r&&ZU(e,{left:n.left===!1?0:i.left-n.left,right:n.right===!1?this.width:i.right+n.right,top:n.top===!1?0:i.top-n.top,bottom:n.bottom===!1?this.height:i.bottom+n.bottom}),t.controller.draw(),r&&GU(e),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(t){return Mh(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,n,r){const i=bEt.modes[e];return typeof i=="function"?i(this,t,n,r):[]}getDatasetMeta(t){const e=this.data.datasets[t],n=this._metasets;let r=n.filter(i=>i&&i._dataset===e).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},n.push(r)),r}getContext(){return this.$context||(this.$context=Ud(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const n=this.getDatasetMeta(t);return typeof n.hidden=="boolean"?!n.hidden:!e.hidden}setDatasetVisibility(t,e){const n=this.getDatasetMeta(t);n.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,n){const r=n?"show":"hide",i=this.getDatasetMeta(t),o=i.controller._resolveAnimations(void 0,r);_g(e)?(i.data[e].hidden=!n,this.update()):(this.setDatasetVisibility(t,n),o.update(i,{visible:n}),this.update(s=>s.datasetIndex===t?r:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),Zs.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,i,o),t[i]=o},r=(i,o,s)=>{i.offsetX=o,i.offsetY=s,this._eventHandler(i)};Ar(this.options.events,i=>n(i,r))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,n=(l,c)=>{e.addEventListener(this,l,c),t[l]=c},r=(l,c)=>{t[l]&&(e.removeEventListener(this,l,c),delete t[l])},i=(l,c)=>{this.canvas&&this.resize(l,c)};let o;const s=()=>{r("attach",s),this.attached=!0,this.resize(),n("resize",i),n("detach",o)};o=()=>{this.attached=!1,r("resize",i),this._stop(),this._resize(0,0),n("attach",s)},e.isAttached(this.canvas)?s():o()}unbindEvents(){Ar(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},Ar(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,n){const r=n?"set":"remove";let i,o,s,l;for(e==="dataset"&&(i=this.getDatasetMeta(t[0].datasetIndex),i.controller["_"+r+"DatasetHoverStyle"]()),s=0,l=t.length;s{const o=this.getDatasetMeta(r);if(!o)throw new Error("No dataset found at index "+r);return{datasetIndex:r,element:o.data[i],index:i}});!eI(n,e)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,e))}notifyPlugins(t,e,n){return this._plugins.notify(this,t,e,n)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,n){const r=this.options.hover,i=(l,c)=>l.filter(h=>!c.some(d=>h.datasetIndex===d.datasetIndex&&h.index===d.index)),o=i(e,t),s=n?t:i(t,e);o.length&&this.updateHoverStyle(o,r.mode,!1),s.length&&r.mode&&this.updateHoverStyle(s,r.mode,!0)}_eventHandler(t,e){const n={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},r=o=>(o.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",n,r)===!1)return;const i=this._handleEvent(t,e,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,r),(i||n.changed)&&this.render(),this}_handleEvent(t,e,n){const{_active:r=[],options:i}=this,o=e,s=this._getActiveElements(t,r,n,o),l=GSt(t),c=SOt(t,this._lastEvent,n,l);n&&(this._lastEvent=null,vn(i.onHover,[t,s,this],this),l&&vn(i.onClick,[t,s,this],this));const h=!eI(s,r);return(h||e)&&(this._active=s,this._updateHoverStyles(s,r,e)),this._lastEvent=c,h}_getActiveElements(t,e,n,r){if(t.type==="mouseout")return[];if(!n)return e;const i=this.options.hover;return this.getElementsAtEventForMode(t,i.mode,i,r)}},Qt(Da,"defaults",In),Qt(Da,"instances",x_),Qt(Da,"overrides",Ou),Qt(Da,"registry",ts),Qt(Da,"version",_Ot),Qt(Da,"getChart",HI),Da);function WI(){return Ar(PL.instances,t=>t._plugins.invalidate())}function EOt(t,e){const n=[],{bounds:r,step:i,min:o,max:s,precision:l,count:c,maxTicks:h,maxDigits:d,includeBounds:p}=t,m=i||1,v=h-1,{min:y,max:_}=e,T=!$e(o),x=!$e(s),w=!$e(c),E=(_-y)/(d+1);let O=iI((_-y)/v/m)*m,k,P,A,j;if(O<1e-14&&!T&&!x)return[{value:y},{value:_}];j=Math.ceil(_/O)-Math.floor(y/O),j>v&&(O=iI(j*O/v/m)*m),$e(l)||(k=Math.pow(10,l),O=Math.ceil(O*k)/k),r==="ticks"?(P=Math.floor(y/O)*O,A=Math.ceil(_/O)*O):(P=y,A=_),T&&x&&i&&KSt((s-o)/i,O/1e3)?(j=Math.round(Math.min((s-o)/O,h)),O=(s-o)/j,P=o,A=s):w?(P=T?o:P,A=x?s:A,j=c-1,O=(A-P)/j):(j=(A-P)/O,v_(j,Math.round(j),O/1e3)?j=Math.round(j):j=Math.ceil(j));const B=Math.max(oI(O),oI(P));k=Math.pow(10,$e(l)?B:l),P=Math.round(P*k)/k,A=Math.round(A*k)/k;let N=0;for(T&&(p&&P!==o?(n.push({value:o}),Ps)break;n.push({value:V})}return x&&p&&A!==s?n.length&&v_(n[n.length-1].value,s,YI(s,E,t))?n[n.length-1].value=s:n.push({value:s}):(!x||A===s)&&n.push({value:A}),n}function YI(t,e,{horizontal:n,minRotation:r}){const i=cs(r),o=(n?Math.sin(i):Math.cos(i))||.001,s=.75*e*(""+t).length;return Math.min(e/o,s)}class mb extends Vd{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return $e(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:i,max:o}=this;const s=c=>i=n?i:c,l=c=>o=r?o:c;if(e){const c=bl(i),h=bl(o);c<0&&h<0?l(0):c>0&&h>0&&s(0)}if(i===o){let c=o===0?1:Math.abs(o*.05);l(o+c),e||s(i-c)}this.min=i,this.max=o}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=e,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 e=this.options,n=e.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:e.bounds,min:e.min,max:e.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=EOt(i,o);return e.bounds==="ticks"&&$U(s,this,"value"),e.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const e=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&e.length){const i=(r-n)/Math.max(e.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(e){return $1(e,this.chart.options.locale,this.options.ticks.format)}}class ZI extends mb{determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=sr(e)?e:0,this.max=sr(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,r=cs(this.options.ticks.minRotation),i=(e?Math.sin(r):Math.cos(r))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,o.lineHeight/i))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}Qt(ZI,"id","linear"),Qt(ZI,"defaults",{ticks:{callback:z1.formatters.numeric}});const wg=t=>Math.floor(ol(t)),Cc=(t,e)=>Math.pow(10,wg(t)+e);function GI(t){return t/Math.pow(10,wg(t))===1}function qI(t,e,n){const r=Math.pow(10,n),i=Math.floor(t/r);return Math.ceil(e/r)-i}function OOt(t,e){const n=e-t;let r=wg(n);for(;qI(t,e,r)>10;)r++;for(;qI(t,e,r)<10;)r--;return Math.min(r,wg(t))}function COt(t,{min:e,max:n}){e=ki(t.min,e);const r=[],i=wg(e);let o=OOt(e,n),s=o<0?Math.pow(10,Math.abs(o)):1;const l=Math.pow(10,o),c=i>o?Math.pow(10,i):0,h=Math.round((e-c)*s)/s,d=Math.floor((e-c)/l/10)*l*10;let p=Math.floor((h-d)/Math.pow(10,o)),m=ki(t.min,Math.round((c+d+p*Math.pow(10,o))*s)/s);for(;m=10?p=p<15?15:20:p++,p>=20&&(o++,p=2,s=o>=0?1:s),m=Math.round((c+d+p*Math.pow(10,o))*s)/s;const v=ki(t.max,m);return r.push({value:v,major:GI(v),significand:p}),r}class KI extends Vd{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,n){const r=mb.prototype.parse.apply(this,[e,n]);if(r===0){this._zero=!0;return}return sr(r)&&r>0?r:null}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=sr(e)?Math.max(0,e):null,this.max=sr(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!sr(this._userMin)&&(this.min=e===Cc(this.min,0)?Cc(this.min,-1):Cc(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let r=this.min,i=this.max;const o=l=>r=e?r:l,s=l=>i=n?i:l;r===i&&(r<=0?(o(1),s(10)):(o(Cc(r,-1)),s(Cc(i,1)))),r<=0&&o(Cc(i,-1)),i<=0&&s(Cc(r,1)),this.min=r,this.max=i}buildTicks(){const e=this.options,n={min:this._userMin,max:this._userMax},r=COt(n,this);return e.bounds==="ticks"&&$U(r,this,"value"),e.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}getLabelForValue(e){return e===void 0?"0":$1(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=ol(e),this._valueRange=ol(this.max)-ol(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(ol(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const n=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+n*this._valueRange)}}Qt(KI,"id","logarithmic"),Qt(KI,"defaults",{ticks:{callback:z1.formatters.logarithmic,major:{enabled:!0}}});function NO(t){const e=t.ticks;if(e.display&&t.display){const n=xa(e.backdropPadding);return fn(e.font&&e.font.size,In.font.size)+n.height}return 0}function kOt(t,e,n){return n=bn(n)?n:[n],{w:mTt(t,e.string,n),h:n.length*e.lineHeight}}function XI(t,e,n,r,i){return t===r||t===i?{start:e-n/2,end:e+n/2}:ti?{start:e-n,end:e}:{start:e,end:e+n}}function POt(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},n=Object.assign({},e),r=[],i=[],o=t._pointLabels.length,s=t.options.pointLabels,l=s.centerPointLabels?_o/o:0;for(let c=0;ce.r&&(l=(r.end-e.r)/o,t.r=Math.max(t.r,e.r+l)),i.starte.b&&(c=(i.end-e.b)/s,t.b=Math.max(t.b,e.b+c))}function MOt(t,e,n){const r=t.drawingArea,{extra:i,additionalAngle:o,padding:s,size:l}=n,c=t.getPointPosition(e,r+i+s,o),h=Math.round(wL(es(c.angle+oo))),d=DOt(c.y,l.h,h),p=jOt(h),m=NOt(c.x,l.w,p);return{visible:!0,x:c.x,y:d,textAlign:p,left:m,top:d,right:m+l.w,bottom:d+l.h}}function AOt(t,e){if(!e)return!0;const{left:n,top:r,right:i,bottom:o}=t;return!(Mh({x:n,y:r},e)||Mh({x:n,y:o},e)||Mh({x:i,y:r},e)||Mh({x:i,y:o},e))}function ROt(t,e,n){const r=[],i=t._pointLabels.length,o=t.options,{centerPointLabels:s,display:l}=o.pointLabels,c={extra:NO(o)/2,additionalAngle:s?_o/i:0};let h;for(let d=0;d270||n<90)&&(t-=e),t}function IOt(t,e,n){const{left:r,top:i,right:o,bottom:s}=n,{backdropColor:l}=e;if(!$e(l)){const c=ETt(e.borderRadius),h=xa(e.backdropPadding);t.fillStyle=l;const d=r-h.left,p=i-h.top,m=o-r+h.width,v=s-i+h.height;Object.values(c).some(y=>y!==0)?(t.beginPath(),_Tt(t,{x:d,y:p,w:m,h:v,radius:c}),t.fill()):t.fillRect(d,p,m,v)}}function FOt(t,e){const{ctx:n,options:{pointLabels:r}}=t;for(let i=e-1;i>=0;i--){const o=t._pointLabelItems[i];if(!o.visible)continue;const s=r.setContext(t.getPointLabelContext(i));IOt(n,s,o);const l=kd(s.font),{x:c,y:h,textAlign:d}=o;db(n,t._pointLabels[i],c,h+l.lineHeight/2,l,{color:s.color,textAlign:d,textBaseline:"middle"})}}function f9(t,e,n,r){const{ctx:i}=t;if(n)i.arc(t.xCenter,t.yCenter,e,0,Ni);else{let o=t.getPointPosition(0,e);i.moveTo(o.x,o.y);for(let s=1;s{const i=vn(this.options.pointLabels.callback,[n,r],this);return i||i===0?i:""}).filter((n,r)=>this.chart.getDataVisibility(r))}fit(){const e=this.options;e.display&&e.pointLabels.display?POt(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,n,r,i){this.xCenter+=Math.floor((e-n)/2),this.yCenter+=Math.floor((r-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,n,r,i))}getIndexAngle(e){const n=Ni/(this._pointLabels.length||1),r=this.options.startAngle||0;return es(e*n+cs(r))}getDistanceFromCenterForValue(e){if($e(e))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*n:(e-this.min)*n}getValueForDistanceFromCenter(e){if($e(e))return NaN;const n=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(e){const n=this._pointLabels||[];if(e>=0&&e{if(p!==0){c=this.getDistanceFromCenterForValue(d.value);const m=this.getContext(p),v=i.setContext(m),y=o.setContext(m);BOt(this,v,c,s,y)}}),r.display){for(e.save(),l=s-1;l>=0;l--){const d=r.setContext(this.getPointLabelContext(l)),{color:p,lineWidth:m}=d;!m||!p||(e.lineWidth=m,e.strokeStyle=p,e.setLineDash(d.borderDash),e.lineDashOffset=d.borderDashOffset,c=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),h=this.getPointPosition(l,c),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(h.x,h.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,n=this.options,r=n.ticks;if(!r.display)return;const i=this.getIndexAngle(0);let o,s;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(i),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((l,c)=>{if(c===0&&!n.reverse)return;const h=r.setContext(this.getContext(c)),d=kd(h.font);if(o=this.getDistanceFromCenterForValue(this.ticks[c].value),h.showLabelBackdrop){e.font=d.string,s=e.measureText(l.label).width,e.fillStyle=h.backdropColor;const p=xa(h.backdropPadding);e.fillRect(-s/2-p.left,-o-d.size/2-p.top,s+p.width,d.size+p.height)}db(e,l.label,0,-o,d,{color:h.color,strokeColor:h.textStrokeColor,strokeWidth:h.textStrokeWidth})}),e.restore()}drawTitle(){}}Qt(Cy,"id","radialLinear"),Qt(Cy,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:z1.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),Qt(Cy,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),Qt(Cy,"descriptors",{angleLines:{_fallback:"grid"}});const V1={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}},ri=Object.keys(V1);function QI(t,e){return t-e}function JI(t,e){if($e(e))return null;const n=t._adapter,{parser:r,round:i,isoWeekday:o}=t._parseOpts;let s=e;return typeof r=="function"&&(s=r(s)),sr(s)||(s=typeof r=="string"?n.parse(s,r):n.parse(s)),s===null?null:(i&&(s=i==="week"&&(bg(o)||o===!0)?n.startOf(s,"isoWeek",o):n.startOf(s,i)),+s)}function t4(t,e,n,r){const i=ri.length;for(let o=ri.indexOf(t);o=ri.indexOf(n);o--){const s=ri[o];if(V1[s].common&&t._adapter.diff(i,r,s)>=e-1)return s}return ri[n?ri.indexOf(n):0]}function UOt(t){for(let e=ri.indexOf(t)+1,n=ri.length;e=e?n[r]:n[i];t[o]=!0}}function VOt(t,e,n,r){const i=t._adapter,o=+i.startOf(e[0].value,r),s=e[e.length-1].value;let l,c;for(l=o;l<=s;l=+i.add(l,1,r))c=n[l],c>=0&&(e[c].major=!0);return e}function n4(t,e,n){const r=[],i={},o=e.length;let s,l;for(s=0;s+e.value))}initOffsets(e=[]){let n=0,r=0,i,o;this.options.offset&&e.length&&(i=this.getDecimalForValue(e[0]),e.length===1?n=1-i:n=(this.getDecimalForValue(e[1])-i)/2,o=this.getDecimalForValue(e[e.length-1]),e.length===1?r=o:r=(o-this.getDecimalForValue(e[e.length-2]))/2);const s=e.length<3?.5:.25;n=oa(n,0,s),r=oa(r,0,s),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const e=this._adapter,n=this.min,r=this.max,i=this.options,o=i.time,s=o.unit||t4(o.minUnit,n,r,this._getLabelCapacity(n)),l=fn(i.ticks.stepSize,1),c=s==="week"?o.isoWeekday:!1,h=bg(c)||c===!0,d={};let p=n,m,v;if(h&&(p=+e.startOf(p,"isoWeek",c)),p=+e.startOf(p,h?"day":s),e.diff(r,n,s)>1e5*l)throw new Error(n+" and "+r+" are too far apart with stepSize of "+l+" "+s);const y=i.ticks.source==="data"&&this.getDataTimestamps();for(m=p,v=0;m+_)}getLabelForValue(e){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(e,r.tooltipFormat):n.format(e,r.displayFormats.datetime)}format(e,n){const r=this.options.time.displayFormats,i=this._unit,o=n||r[i];return this._adapter.format(e,o)}_tickFormatFunction(e,n,r,i){const o=this.options,s=o.ticks.callback;if(s)return vn(s,[e,n,r],this);const l=o.time.displayFormats,c=this._unit,h=this._majorUnit,d=c&&l[c],p=h&&l[h],m=r[n],v=h&&p&&m&&m.major;return this._adapter.format(e,i||(v?p:d))}generateTickLabels(e){let n,r,i;for(n=0,r=e.length;n0?l:1}getDataTimestamps(){let e=this._cache.data||[],n,r;if(e.length)return e;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=t[r].pos&&e<=t[i].pos&&({lo:r,hi:i}=Gc(t,"pos",e)),{pos:o,time:l}=t[r],{pos:s,time:c}=t[i]):(e>=t[r].time&&e<=t[i].time&&({lo:r,hi:i}=Gc(t,"time",e)),{time:o,pos:l}=t[r],{time:s,pos:c}=t[i]);const h=s-o;return h?l+(c-l)*(e-o)/h:l}class r4 extends gb{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=ky(n,this.min),this._tableRange=ky(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:r}=this,i=[],o=[];let s,l,c,h,d;for(s=0,l=e.length;s=n&&h<=r&&i.push(h);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(s=0,l=i.length;si-o)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?e=this.normalize(n.concat(r)):e=n.length?n:r,e=this._cache.all=e,e}getDecimalForValue(e){return(ky(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,r=this.getDecimalForPixel(e)/n.factor-n.end;return ky(this._table,r*this._tableRange+this._minPos,!0)}}Qt(r4,"id","timeseries"),Qt(r4,"defaults",gb.defaults);const p9="label";function i4(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function HOt(t,e){const n=t.options;n&&e&&Object.assign(n,e)}function m9(t,e){t.labels=e}function g9(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:p9;const r=[];t.datasets=e.map(i=>{const o=t.datasets.find(s=>s[n]===i[n]);return!o||!i.data||r.includes(o)?{...i}:(r.push(o),Object.assign(o,i),o)})}function WOt(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:p9;const n={labels:[],datasets:[]};return m9(n,t.labels),g9(n,t.datasets,e),n}function v9(t,e){return t.getElementsAtEventForMode(e.nativeEvent,"nearest",{intersect:!0},!1)}function YOt(t,e){const{height:n=150,width:r=300,redraw:i=!1,datasetIdKey:o,type:s,data:l,options:c,plugins:h=[],fallbackContent:d,updateMode:p,...m}=t,v=U.useRef(null),y=U.useRef(),_=()=>{v.current&&(y.current=new PL(v.current,{type:s,data:WOt(l,o),options:c&&{...c},plugins:h}),i4(e,y.current))},T=()=>{i4(e,null),y.current&&(y.current.destroy(),y.current=null)};return U.useEffect(()=>{!i&&y.current&&c&&HOt(y.current,c)},[i,c]),U.useEffect(()=>{!i&&y.current&&m9(y.current.config.data,l.labels)},[i,l.labels]),U.useEffect(()=>{!i&&y.current&&l.datasets&&g9(y.current.config.data,l.datasets,o)},[i,l.datasets]),U.useEffect(()=>{y.current&&(i?(T(),setTimeout(_)):y.current.update(p))},[i,c,l.labels,l.datasets,p]),U.useEffect(()=>{y.current&&(T(),setTimeout(_))},[s]),U.useEffect(()=>(_(),()=>T()),[]),q.createElement("canvas",Object.assign({ref:v,role:"img",height:n,width:r},m),d)}const ZOt=U.forwardRef(YOt);function LL(t,e){return PL.register(e),U.forwardRef((n,r)=>q.createElement(ZOt,Object.assign({},n,{ref:r,type:t})))}const GOt=LL("line",__),qOt=LL("bar",y_),KOt=LL("doughnut",Ap),y9=({native:t},[e])=>{if(!(t!=null&&t.target))return;const n=t.target;n.style.cursor=e?"pointer":"default"},_9=({dataset:t,raw:e})=>`${t.label}: ${Qn(`${e}`)}`,XOt=({label:t,raw:e})=>`${t}: ${Qn(`${e}`)}`,QOt=({chart:t})=>{const{config:e}=t,{labels:n=[],datasets:r=[]}=e.data??{},[{backgroundColor:i}]=r,{defaultColor:o}=e.options??{};return b.jsx("ul",{className:"doughnut-chart-legend",children:n.map((s,l)=>b.jsxs("li",{className:"doughnut-chart-legend__item d-flex",children:[b.jsx("div",{className:"doughnut-chart-legend__item-color",style:{backgroundColor:i[l]??o}}),b.jsx("small",{className:"doughnut-chart-legend__item-text flex-fill",children:s})]},s))})},JOt=t=>[{data:t,backgroundColor:["#97BBCD","#F7464A","#46BFBD","#FDB45C","#949FB1","#57A773","#414066","#08B2E3","#B6C454","#DCDCDC","#463730"],borderColor:Fut()?Iut:Dut,borderWidth:2}],tCt=(t,e)=>({labels:t,datasets:JOt(e)}),eCt=U.memo(({stats:t})=>{const[e,n]=U.useState(),r=_s(t),i=TP(t),o={plugins:{legend:{display:!1},tooltip:{intersect:!0,callbacks:{label:XOt}}}},s=tCt(r,i);return b.jsxs("div",{className:"row",children:[b.jsx("div",{className:"col-sm-12 col-md-7",children:b.jsx(KOt,{height:300,data:s,options:o,ref:l=>{l&&n(l)}})}),b.jsx("div",{className:"col-sm-12 col-md-5",children:e&&b.jsx(QOt,{chart:e})})]})}),o4=({title:t,stats:e})=>b.jsx(jU,{title:t,children:b.jsx(eCt,{stats:e})}),nCt={"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"},b9={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"},An={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},Wr={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"},Fa={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class Tt{static getFirstMatch(e,n){const r=n.match(e);return r&&r.length>0&&r[1]||""}static getSecondMatch(e,n){const r=n.match(e);return r&&r.length>1&&r[2]||""}static matchAndReturnConst(e,n,r){if(e.test(n))return r}static getWindowsVersionName(e){switch(e){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(e){const n=e.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(e){const n=e.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(e){return e.split(".").length}static compareVersions(e,n,r=!1){const i=Tt.getVersionPrecision(e),o=Tt.getVersionPrecision(n);let s=Math.max(i,o),l=0;const c=Tt.map([e,n],h=>{const d=s-Tt.getVersionPrecision(h),p=h+new Array(d+1).join(".0");return Tt.map(p.split("."),m=>new Array(20-m.length).join("0")+m).reverse()});for(r&&(l=s-Math.min(i,o)),s-=1;s>=l;){if(c[0][s]>c[1][s])return 1;if(c[0][s]===c[1][s]){if(s===l)return 0;s-=1}else if(c[0][s]{r[l]=s[l]})}return e}static getBrowserAlias(e){return nCt[e]}static getBrowserTypeByAlias(e){return b9[e]||""}}const Be=/version\/(\d+(\.?_?\d+)+)/i,rCt=[{test:[/googlebot/i],describe(t){const e={name:"Googlebot"},n=Tt.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,t)||Tt.getFirstMatch(Be,t);return n&&(e.version=n),e}},{test:[/opera/i],describe(t){const e={name:"Opera"},n=Tt.getFirstMatch(Be,t)||Tt.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/opr\/|opios/i],describe(t){const e={name:"Opera"},n=Tt.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,t)||Tt.getFirstMatch(Be,t);return n&&(e.version=n),e}},{test:[/SamsungBrowser/i],describe(t){const e={name:"Samsung Internet for Android"},n=Tt.getFirstMatch(Be,t)||Tt.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/Whale/i],describe(t){const e={name:"NAVER Whale Browser"},n=Tt.getFirstMatch(Be,t)||Tt.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/MZBrowser/i],describe(t){const e={name:"MZ Browser"},n=Tt.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,t)||Tt.getFirstMatch(Be,t);return n&&(e.version=n),e}},{test:[/focus/i],describe(t){const e={name:"Focus"},n=Tt.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,t)||Tt.getFirstMatch(Be,t);return n&&(e.version=n),e}},{test:[/swing/i],describe(t){const e={name:"Swing"},n=Tt.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,t)||Tt.getFirstMatch(Be,t);return n&&(e.version=n),e}},{test:[/coast/i],describe(t){const e={name:"Opera Coast"},n=Tt.getFirstMatch(Be,t)||Tt.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(t){const e={name:"Opera Touch"},n=Tt.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,t)||Tt.getFirstMatch(Be,t);return n&&(e.version=n),e}},{test:[/yabrowser/i],describe(t){const e={name:"Yandex Browser"},n=Tt.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,t)||Tt.getFirstMatch(Be,t);return n&&(e.version=n),e}},{test:[/ucbrowser/i],describe(t){const e={name:"UC Browser"},n=Tt.getFirstMatch(Be,t)||Tt.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/Maxthon|mxios/i],describe(t){const e={name:"Maxthon"},n=Tt.getFirstMatch(Be,t)||Tt.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/epiphany/i],describe(t){const e={name:"Epiphany"},n=Tt.getFirstMatch(Be,t)||Tt.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/puffin/i],describe(t){const e={name:"Puffin"},n=Tt.getFirstMatch(Be,t)||Tt.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/sleipnir/i],describe(t){const e={name:"Sleipnir"},n=Tt.getFirstMatch(Be,t)||Tt.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/k-meleon/i],describe(t){const e={name:"K-Meleon"},n=Tt.getFirstMatch(Be,t)||Tt.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/micromessenger/i],describe(t){const e={name:"WeChat"},n=Tt.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,t)||Tt.getFirstMatch(Be,t);return n&&(e.version=n),e}},{test:[/qqbrowser/i],describe(t){const e={name:/qqbrowserlite/i.test(t)?"QQ Browser Lite":"QQ Browser"},n=Tt.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,t)||Tt.getFirstMatch(Be,t);return n&&(e.version=n),e}},{test:[/msie|trident/i],describe(t){const e={name:"Internet Explorer"},n=Tt.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/\sedg\//i],describe(t){const e={name:"Microsoft Edge"},n=Tt.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/edg([ea]|ios)/i],describe(t){const e={name:"Microsoft Edge"},n=Tt.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/vivaldi/i],describe(t){const e={name:"Vivaldi"},n=Tt.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/seamonkey/i],describe(t){const e={name:"SeaMonkey"},n=Tt.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/sailfish/i],describe(t){const e={name:"Sailfish"},n=Tt.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,t);return n&&(e.version=n),e}},{test:[/silk/i],describe(t){const e={name:"Amazon Silk"},n=Tt.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/phantom/i],describe(t){const e={name:"PhantomJS"},n=Tt.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/slimerjs/i],describe(t){const e={name:"SlimerJS"},n=Tt.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(t){const e={name:"BlackBerry"},n=Tt.getFirstMatch(Be,t)||Tt.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/(web|hpw)[o0]s/i],describe(t){const e={name:"WebOS Browser"},n=Tt.getFirstMatch(Be,t)||Tt.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/bada/i],describe(t){const e={name:"Bada"},n=Tt.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/tizen/i],describe(t){const e={name:"Tizen"},n=Tt.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,t)||Tt.getFirstMatch(Be,t);return n&&(e.version=n),e}},{test:[/qupzilla/i],describe(t){const e={name:"QupZilla"},n=Tt.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,t)||Tt.getFirstMatch(Be,t);return n&&(e.version=n),e}},{test:[/firefox|iceweasel|fxios/i],describe(t){const e={name:"Firefox"},n=Tt.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/electron/i],describe(t){const e={name:"Electron"},n=Tt.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/MiuiBrowser/i],describe(t){const e={name:"Miui"},n=Tt.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/chromium/i],describe(t){const e={name:"Chromium"},n=Tt.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,t)||Tt.getFirstMatch(Be,t);return n&&(e.version=n),e}},{test:[/chrome|crios|crmo/i],describe(t){const e={name:"Chrome"},n=Tt.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/GSA/i],describe(t){const e={name:"Google Search"},n=Tt.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test(t){const e=!t.test(/like android/i),n=t.test(/android/i);return e&&n},describe(t){const e={name:"Android Browser"},n=Tt.getFirstMatch(Be,t);return n&&(e.version=n),e}},{test:[/playstation 4/i],describe(t){const e={name:"PlayStation 4"},n=Tt.getFirstMatch(Be,t);return n&&(e.version=n),e}},{test:[/safari|applewebkit/i],describe(t){const e={name:"Safari"},n=Tt.getFirstMatch(Be,t);return n&&(e.version=n),e}},{test:[/.*/i],describe(t){const e=/^(.*)\/(.*) /,n=/^(.*)\/(.*)[ \t]\((.*)/,r=t.search("\\(")!==-1?n:e;return{name:Tt.getFirstMatch(r,t),version:Tt.getSecondMatch(r,t)}}}],iCt=[{test:[/Roku\/DVP/],describe(t){const e=Tt.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,t);return{name:Wr.Roku,version:e}}},{test:[/windows phone/i],describe(t){const e=Tt.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,t);return{name:Wr.WindowsPhone,version:e}}},{test:[/windows /i],describe(t){const e=Tt.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,t),n=Tt.getWindowsVersionName(e);return{name:Wr.Windows,version:e,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(t){const e={name:Wr.iOS},n=Tt.getSecondMatch(/(Version\/)(\d[\d.]+)/,t);return n&&(e.version=n),e}},{test:[/macintosh/i],describe(t){const e=Tt.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,t).replace(/[_\s]/g,"."),n=Tt.getMacOSVersionName(e),r={name:Wr.MacOS,version:e};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(t){const e=Tt.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,t).replace(/[_\s]/g,".");return{name:Wr.iOS,version:e}}},{test(t){const e=!t.test(/like android/i),n=t.test(/android/i);return e&&n},describe(t){const e=Tt.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,t),n=Tt.getAndroidVersionName(e),r={name:Wr.Android,version:e};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(t){const e=Tt.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,t),n={name:Wr.WebOS};return e&&e.length&&(n.version=e),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(t){const e=Tt.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,t)||Tt.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,t)||Tt.getFirstMatch(/\bbb(\d+)/i,t);return{name:Wr.BlackBerry,version:e}}},{test:[/bada/i],describe(t){const e=Tt.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,t);return{name:Wr.Bada,version:e}}},{test:[/tizen/i],describe(t){const e=Tt.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,t);return{name:Wr.Tizen,version:e}}},{test:[/linux/i],describe(){return{name:Wr.Linux}}},{test:[/CrOS/],describe(){return{name:Wr.ChromeOS}}},{test:[/PlayStation 4/],describe(t){const e=Tt.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,t);return{name:Wr.PlayStation4,version:e}}}],oCt=[{test:[/googlebot/i],describe(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe(t){const e=Tt.getFirstMatch(/(can-l01)/i,t)&&"Nova",n={type:An.mobile,vendor:"Huawei"};return e&&(n.model=e),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:An.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:An.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:An.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:An.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:An.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:An.tablet}}},{test(t){const e=t.test(/ipod|iphone/i),n=t.test(/like (ipod|iphone)/i);return e&&!n},describe(t){const e=Tt.getFirstMatch(/(ipod|iphone)/i,t);return{type:An.mobile,vendor:"Apple",model:e}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:An.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe(){return{type:An.mobile}}},{test(t){return t.getBrowserName(!0)==="blackberry"},describe(){return{type:An.mobile,vendor:"BlackBerry"}}},{test(t){return t.getBrowserName(!0)==="bada"},describe(){return{type:An.mobile}}},{test(t){return t.getBrowserName()==="windows phone"},describe(){return{type:An.mobile,vendor:"Microsoft"}}},{test(t){const e=Number(String(t.getOSVersion()).split(".")[0]);return t.getOSName(!0)==="android"&&e>=3},describe(){return{type:An.tablet}}},{test(t){return t.getOSName(!0)==="android"},describe(){return{type:An.mobile}}},{test(t){return t.getOSName(!0)==="macos"},describe(){return{type:An.desktop,vendor:"Apple"}}},{test(t){return t.getOSName(!0)==="windows"},describe(){return{type:An.desktop}}},{test(t){return t.getOSName(!0)==="linux"},describe(){return{type:An.desktop}}},{test(t){return t.getOSName(!0)==="playstation 4"},describe(){return{type:An.tv}}},{test(t){return t.getOSName(!0)==="roku"},describe(){return{type:An.tv}}}],sCt=[{test(t){return t.getBrowserName(!0)==="microsoft edge"},describe(t){if(/\sedg\//i.test(t))return{name:Fa.Blink};const e=Tt.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,t);return{name:Fa.EdgeHTML,version:e}}},{test:[/trident/i],describe(t){const e={name:Fa.Trident},n=Tt.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test(t){return t.test(/presto/i)},describe(t){const e={name:Fa.Presto},n=Tt.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test(t){const e=t.test(/gecko/i),n=t.test(/like gecko/i);return e&&!n},describe(t){const e={name:Fa.Gecko},n=Tt.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:Fa.Blink}}},{test:[/(apple)?webkit/i],describe(t){const e={name:Fa.WebKit},n=Tt.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}}];class s4{constructor(e,n=!1){if(e==null||e==="")throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},n!==!0&&this.parse()}getUA(){return this._ua}test(e){return e.test(this._ua)}parseBrowser(){this.parsedResult.browser={};const e=Tt.find(rCt,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 e&&(this.parsedResult.browser=e.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(e){return e?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 e=Tt.find(iCt,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 e&&(this.parsedResult.os=e.describe(this.getUA())),this.parsedResult.os}getOSName(e){const{name:n}=this.getOS();return e?String(n).toLowerCase()||"":n||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(e=!1){const{type:n}=this.getPlatform();return e?String(n).toLowerCase()||"":n||""}parsePlatform(){this.parsedResult.platform={};const e=Tt.find(oCt,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 e&&(this.parsedResult.platform=e.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};const e=Tt.find(sCt,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 e&&(this.parsedResult.engine=e.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return Tt.assign({},this.parsedResult)}satisfies(e){const n={};let r=0;const i={};let o=0;if(Object.keys(e).forEach(s=>{const l=e[s];typeof l=="string"?(i[s]=l,o+=1):typeof l=="object"&&(n[s]=l,r+=1)}),r>0){const s=Object.keys(n),l=Tt.find(s,h=>this.isOS(h));if(l){const h=this.satisfies(n[l]);if(h!==void 0)return h}const c=Tt.find(s,h=>this.isPlatform(h));if(c){const h=this.satisfies(n[c]);if(h!==void 0)return h}}if(o>0){const s=Object.keys(i),l=Tt.find(s,c=>this.isBrowser(c,!0));if(l!==void 0)return this.compareVersion(i[l])}}isBrowser(e,n=!1){const r=this.getBrowserName().toLowerCase();let i=e.toLowerCase();const o=Tt.getBrowserTypeByAlias(i);return n&&o&&(i=o.toLowerCase()),i===r}compareVersion(e){let n=[0],r=e,i=!1;const o=this.getBrowserVersion();if(typeof o=="string")return e[0]===">"||e[0]==="<"?(r=e.substr(1),e[1]==="="?(i=!0,r=e.substr(2)):n=[],e[0]===">"?n.push(1):n.push(-1)):e[0]==="="?r=e.substr(1):e[0]==="~"&&(i=!0,r=e.substr(1)),n.indexOf(Tt.compareVersions(o,r,i))>-1}isOS(e){return this.getOSName(!0)===String(e).toLowerCase()}isPlatform(e){return this.getPlatformType(!0)===String(e).toLowerCase()}isEngine(e){return this.getEngineName(!0)===String(e).toLowerCase()}is(e,n=!1){return this.isBrowser(e,n)||this.isOS(e)||this.isPlatform(e)}some(e=[]){return e.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 aCt{static getParser(e,n=!1){if(typeof e!="string")throw new Error("UserAgent should be a string");return new s4(e,n)}static parse(e){return new s4(e).getResult()}static get BROWSER_MAP(){return b9}static get ENGINE_MAP(){return Fa}static get OS_MAP(){return Wr}static get PLATFORMS_MAP(){return An}}const Py="Others",lCt=["Android Browser","Chrome","Chromium","Firefox","Internet Explorer","Microsoft Edge","Opera","Safari","Samsung Internet for Android","Vivaldi","WeChat"],cCt=t=>{if(!ss(t))return{browser:Py,os:Py};const{browser:{name:e},os:{name:n}}=aCt.parse(t);return{os:n??Py,browser:e&&lCt.includes(e)?e:Py}},uCt=t=>{var e;return ss(t)?((e=t.split("/")[t.includes("://")?2:0])==null?void 0:e.split(":")[0])??"":"Direct"},ML=(t,e)=>Object.values({...jz(e,e.map(()=>0)),...t}),a4={monthly:"Month",weekly:"Week",daily:"Day",hourly:"Hour"},hCt={hourly:t=>({hours:t}),daily:t=>({days:t}),weekly:t=>({weeks:t}),monthly:t=>({months:t})},dCt={hourly:kgt,daily:NP,weekly:Mgt,monthly:X0},AL={hourly:t=>xd(t,"yyyy-MM-dd HH:00"),daily:t=>Zc(t),weekly(t){const e=Zc(ag(t)),n=Zc(jgt(t));return`${e} - ${n}`},monthly:t=>xd(t,"yyyy-MM")},fCt=t=>{const e=new Date,n=_a(t);return PP([[()=>NP(e,n)<=2,d2("hourly")],[()=>X0(e,n)<=1,d2("daily")],[()=>X0(e,n)<=6,d2("weekly")]])()??"monthly"},l4=(t,e)=>Mz(n=>AL[t](_a(n.date)),e),pCt=(t,e)=>e.reduce((n,r)=>{const i=AL[t](_a(r.date));return n[i]=n[i]??[],n[i].push(r),n},{}),mCt=(t,e)=>{const n=dCt[t],r=AL[t],i=_a(e[0].date),o=_a(e[e.length-1].date),s=n(i,o),l=hCt[t];return[r(o),...YP(s,c=>r(vgt(o,l(c))))]},gCt=(t,e,n,r)=>{if(r)return[Object.keys(e),Object.values(e)];const i=mCt(n,t);return[i,ML(e,i)]},c4=(t,e,n)=>({label:e,data:t,fill:!1,tension:.2,borderColor:n,backgroundColor:n});let Z2=null;const vCt=(t,e,[n],r)=>{if(!r||!n)return;const{index:i}=n;Z2===t[i]?(r([]),Z2=null):(r(t[i]&&e[t[i]]?e[t[i]]:[]),Z2=t[i]??null)},yCt=({title:t,visits:e,highlightedVisits:n,highlightedLabel:r="Selected",setSelectedVisits:i})=>{const[o,s]=U.useState(e.length>0?fCt(e[e.length-1].date):"monthly"),[l,c]=zn(!0),h=U.useRef(null),d=U.useRef(null),p=U.useMemo(()=>pCt(o,e),[o,e]),m=U.useMemo(()=>l4(o,tO(e)),[o,e]),[v,y]=U.useMemo(()=>gCt(e,m,o,l),[e,o,l]),_=U.useMemo(()=>ML(l4(o,tO(n)),v),[n,o,v]),T=()=>{const O=c4(y,"Visits",nP);if(n.length===0)return[O];const k=c4(_,r,L$);return[O,k]},x=()=>({labels:v,datasets:T()}),w={maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{intersect:!1,axis:"x",callbacks:{label:_9}}},scales:{y:{beginAtZero:!0,ticks:{precision:0,callback:Qn}},x:{title:{display:!0,text:a4[o]}}},onHover:y9},E=O=>b.jsx(GOt,{ref:O,data:x(),options:w,onClick:k=>vCt(v,p,v9(O.current,k),i)});return b.jsxs(zi,{children:[b.jsxs(hd,{role:"heading",children:[t,b.jsx("div",{className:"float-end",children:b.jsxs(Hg,{children:[b.jsx(zg,{caret:!0,color:"link",className:"btn-sm p-0",children:"Group by"}),b.jsx(Nd,{end:!0,children:Object.entries(a4).map(([O,k])=>b.jsx(Zt,{active:o===O,onClick:()=>s(O),children:k},O))})]})}),b.jsx("div",{className:"float-end me-2",children:b.jsx(fd,{checked:l,onChange:c,children:b.jsx("small",{children:"Skip dates with no visits"})})})]}),b.jsxs(ud,{className:"line-chart-card__body",children:[n.length>0&&E(h),n.length===0&&E(d)]})]})},_Ct=({toggleClassName:t,ranges:e,value:n,setValue:r})=>b.jsxs(Hg,{children:[b.jsx(zg,{caret:!0,color:"link",className:t,children:"Paginate"}),b.jsxs(Nd,{end:!0,children:[e.map(i=>b.jsxs(Zt,{active:i===n,onClick:()=>r(i),children:[b.jsx("b",{children:i})," items per page"]},i)),b.jsx(Zt,{divider:!0}),b.jsx(Zt,{disabled:n===1/0,onClick:()=>r(1/0),children:b.jsx("i",{children:"Clear pagination"})})]})]}),bCt=t=>t.startsWith("hidden")?"":t,xCt=t=>!!t&&Object.keys(t).length>0,wCt=t=>t.length>20?t.length*10:void 0,SCt=(t,e,n)=>{const r={data:t,label:n?"Non-selected":"Visits",backgroundColor:jut,borderColor:nP,borderWidth:2};return e.every(i=>i===0)?[r]:[r,{label:n??"Selected",data:e,backgroundColor:Nut,borderColor:L$,borderWidth:2}]},TCt=(t,e,n,r)=>({labels:t,datasets:SCt(e,n,r)}),ECt=(t,[e],n)=>{!n||!e||n(t[e.index])},OCt=({stats:t,highlightedStats:e,highlightedLabel:n,onClick:r,max:i})=>{const o=_s(t).map(bCt),s=TP(xCt(e)?_s(e).reduce((y,_)=>(y[_]&&(y[_]-=e[_]),y),{...t}):t),l=ML(e??{},o),c=U.useRef(null),h=U.useRef(null),d={plugins:{legend:{display:!1},tooltip:{mode:"y",filter:({label:y})=>y!=="",callbacks:{label:_9}}},scales:{x:{beginAtZero:!0,stacked:!0,max:i,ticks:{precision:0,callback:Qn}},y:{stacked:!0}},onHover:y9,indexAxis:"y"},p=TCt(o,s,l,n),m=wCt(o),v=(y,_)=>b.jsx(qOt,{ref:_,data:p,options:d,height:m,onClick:T=>ECt(o,v9(_.current,T),r)},`${m}_${y}`);return b.jsxs(b.Fragment,{children:[e!==void 0&&v("with_stats",c),e===void 0&&v("without_stats",h)]})},CCt=t=>Z0(t)==="String"?Qmt(t):t,u4=([t])=>t,h4=([,t])=>t,Ly=({stats:t,highlightedStats:e,title:n,sortingItems:r,extraHeaderContent:i,withPagination:o=!0,...s})=>{const[l,c]=U.useState({}),[h,d]=U.useState(1),[p,m]=U.useState(50),v=(P,A)=>{const j=dD(P),B=l.field?qmt(cr(l.field===Object.keys(A)[0]?u4:h4,CCt),j):j;return!l.dir||l.dir==="ASC"?B:tO(B)},y=P=>{const A=P[h-1];if(h[`hidden_${B}`,0])]},_=P=>b.jsx(hL,{currentPage:h,pagesCount:P,setCurrentPage:d}),T=(P,A,j)=>{const B=v(P,A),N=B.map(u4),V=j&&dD({...jz(N,N.map(()=>0)),...j});if(B.length<=p)return{currentPageStats:iy(B),currentPageHighlightedStats:V&&iy(V)};const Y=sg(p,B),nt=V&&sg(p,V);return{currentPageStats:iy(y(Y)),currentPageHighlightedStats:nt&&iy(y(nt)),pagination:_(Y.length),max:H_t(Math.max(...B.map(h4)))}},{currentPageStats:x,currentPageHighlightedStats:w,pagination:E,max:O}=T(t,r,e&&Object.keys(e).length>0?e:void 0),k=Object.keys(x);return b.jsx(jU,{title:()=>b.jsxs(b.Fragment,{children:[n,b.jsx("div",{className:"float-end",children:b.jsx(Yg,{isButton:!1,right:!0,items:r,order:l,onChange:(P,A)=>{c({field:P,dir:A}),d(1)}})}),o&&Object.keys(t).length>50&&b.jsx("div",{className:"float-end",children:b.jsx(_Ct,{toggleClassName:"btn-sm p-0 me-3",ranges:[50,100,200,500],value:p,setValue:P=>{m(P),d(1)}})}),i&&b.jsx("div",{className:"float-end",children:i(E?k:void 0)})]}),footer:E,children:b.jsx(OCt,{stats:x,highlightedStats:w,max:O,...s})})},kCt=()=>{const t=ws(),{search:e}=Un(),{filtering:n,domain:r}=U.useMemo(cr(()=>Du(e),({startDate:i,endDate:o,orphanVisitsType:s,excludeBots:l,domain:c})=>({domain:c,filtering:{dateRange:i!=null||o!=null?d7(i,o):void 0,visitsFilter:{orphanVisitsType:s,excludeBots:Fu(l)?void 0:l==="true"}}})),[e]);return[n,i=>{const{dateRange:o,visitsFilter:s}=Umt(n,i),{excludeBots:l,orphanVisitsType:c}=s,h={startDate:(o==null?void 0:o.startDate)&&Ml(o.startDate)||"",endDate:(o==null?void 0:o.endDate)&&Ml(o.endDate)||"",excludeBots:l===void 0?void 0:v7(l),orphanVisitsType:c,domain:r},d=Gg(h),p=qi(d)?"":`?${d}`;t(p,{replace:!0,relative:"route"})}]};function x9(t,e){const n=U.useRef(e);U.useEffect(function(){e!==n.current&&t.attributionControl!=null&&(n.current!=null&&t.attributionControl.removeAttribution(n.current),e!=null&&t.attributionControl.addAttribution(e)),n.current=e},[t,e])}const PCt=1;function LCt(t){return Object.freeze({__version:PCt,map:t})}function MCt(t,e){return Object.freeze({...t,...e})}const w9=U.createContext(null),S9=w9.Provider;function T9(){const t=U.useContext(w9);if(t==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of ");return t}function ACt(t){function e(n,r){const{instance:i,context:o}=t(n).current;return U.useImperativeHandle(r,()=>i),n.children==null?null:q.createElement(S9,{value:o},n.children)}return U.forwardRef(e)}function RCt(t){function e(n,r){const[i,o]=U.useState(!1),{instance:s}=t(n,o).current;U.useImperativeHandle(r,()=>s),U.useEffect(function(){i&&s.update()},[s,i,n.children]);const l=s._contentNode;return l?Mu.createPortal(n.children,l):null}return U.forwardRef(e)}function jCt(t){function e(n,r){const{instance:i}=t(n).current;return U.useImperativeHandle(r,()=>i),null}return U.forwardRef(e)}function E9(t,e){const n=U.useRef();U.useEffect(function(){return e!=null&&t.instance.on(e),n.current=e,function(){n.current!=null&&t.instance.off(n.current),n.current=null}},[t,e])}function RL(t,e){const n=t.pane??e.pane;return n?{...t,pane:n}:t}function NCt(t,e){return function(n,r){const i=T9(),o=t(RL(n,i),i);return x9(i.map,n.attribution),E9(o.current,n.eventHandlers),e(o.current,i,n,r),o}}var DO={exports:{}};/* @preserve - * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com - * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade - */(function(t,e){(function(n,r){r(e)})(kh,function(n){var r="1.9.4";function i(a){var u,f,g,S;for(f=1,g=arguments.length;f"u"||!L||!L.Mixin)){a=E(a)?a:[a];for(var u=0;u0?Math.floor(a):Math.ceil(a)};G.prototype={clone:function(){return new G(this.x,this.y)},add:function(a){return this.clone()._add(I(a))},_add:function(a){return this.x+=a.x,this.y+=a.y,this},subtract:function(a){return this.clone()._subtract(I(a))},_subtract:function(a){return this.x-=a.x,this.y-=a.y,this},divideBy:function(a){return this.clone()._divideBy(a)},_divideBy:function(a){return this.x/=a,this.y/=a,this},multiplyBy:function(a){return this.clone()._multiplyBy(a)},_multiplyBy:function(a){return this.x*=a,this.y*=a,this},scaleBy:function(a){return new G(this.x*a.x,this.y*a.y)},unscaleBy:function(a){return new G(this.x/a.x,this.y/a.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=$(this.x),this.y=$(this.y),this},distanceTo:function(a){a=I(a);var u=a.x-this.x,f=a.y-this.y;return Math.sqrt(u*u+f*f)},equals:function(a){return a=I(a),a.x===this.x&&a.y===this.y},contains:function(a){return a=I(a),Math.abs(a.x)<=Math.abs(this.x)&&Math.abs(a.y)<=Math.abs(this.y)},toString:function(){return"Point("+m(this.x)+", "+m(this.y)+")"}};function I(a,u,f){return a instanceof G?a:E(a)?new G(a[0],a[1]):a==null?a:typeof a=="object"&&"x"in a&&"y"in a?new G(a.x,a.y):new G(a,u,f)}function H(a,u){if(a)for(var f=u?[a,u]:a,g=0,S=f.length;g=this.min.x&&f.x<=this.max.x&&u.y>=this.min.y&&f.y<=this.max.y},intersects:function(a){a=it(a);var u=this.min,f=this.max,g=a.min,S=a.max,C=S.x>=u.x&&g.x<=f.x,D=S.y>=u.y&&g.y<=f.y;return C&&D},overlaps:function(a){a=it(a);var u=this.min,f=this.max,g=a.min,S=a.max,C=S.x>u.x&&g.xu.y&&g.y=u.lat&&S.lat<=f.lat&&g.lng>=u.lng&&S.lng<=f.lng},intersects:function(a){a=Q(a);var u=this._southWest,f=this._northEast,g=a.getSouthWest(),S=a.getNorthEast(),C=S.lat>=u.lat&&g.lat<=f.lat,D=S.lng>=u.lng&&g.lng<=f.lng;return C&&D},overlaps:function(a){a=Q(a);var u=this._southWest,f=this._northEast,g=a.getSouthWest(),S=a.getNorthEast(),C=S.lat>u.lat&&g.latu.lng&&g.lng1,ln=function(){var a=!1;try{var u=Object.defineProperty({},"passive",{get:function(){a=!0}});window.addEventListener("testPassiveEventSupport",p,u),window.removeEventListener("testPassiveEventSupport",p,u)}catch{}return a}(),vr=function(){return!!document.createElement("canvas").getContext}(),Cn=!!(document.createElementNS&&It("svg").createSVGRect),Hn=!!Cn&&function(){var a=document.createElement("div");return a.innerHTML="",(a.firstChild&&a.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),kn=!Cn&&function(){try{var a=document.createElement("div");a.innerHTML='';var u=a.firstChild;return u.style.behavior="url(#default#VML)",u&&typeof u.adj=="object"}catch{return!1}}(),mi=navigator.platform.indexOf("Mac")===0,gi=navigator.platform.indexOf("Linux")===0;function Ne(a){return navigator.userAgent.toLowerCase().indexOf(a)>=0}var wt={ie:_t,ielt9:Ct,edge:Mt,webkit:Lt,android:jt,android23:dt,androidStock:xt,opera:yt,chrome:Et,gecko:At,safari:Bt,phantom:ie,opera12:ae,win:ee,ie3d:Ve,webkit3d:Fe,gecko3d:On,any3d:gr,mobile:Or,mobileWebkit:Vn,mobileWebkit3d:Vl,msPointer:pi,pointer:Hl,touch:Wu,touchNative:Wl,mobileOpera:Yl,mobileGecko:Es,retina:gn,passiveEvents:ln,canvas:vr,svg:Cn,vml:kn,inlineSvg:Hn,mac:mi,linux:gi},Yd=wt.msPointer?"MSPointerDown":"pointerdown",Zd=wt.msPointer?"MSPointerMove":"pointermove",Gd=wt.msPointer?"MSPointerUp":"pointerup",qd=wt.msPointer?"MSPointerCancel":"pointercancel",Zl={touchstart:Yd,touchmove:Zd,touchend:Gd,touchcancel:qd},Kd={touchstart:J1,touchmove:Os,touchend:Os,touchcancel:Os},vi={},Xd=!1;function G1(a,u,f){return u==="touchstart"&&Q1(),Kd[u]?(f=Kd[u].bind(this,f),a.addEventListener(Zl[u],f,!1),f):(console.warn("wrong event specified:",u),p)}function q1(a,u,f){if(!Zl[u]){console.warn("wrong event specified:",u);return}a.removeEventListener(Zl[u],f,!1)}function K1(a){vi[a.pointerId]=a}function X1(a){vi[a.pointerId]&&(vi[a.pointerId]=a)}function Qd(a){delete vi[a.pointerId]}function Q1(){Xd||(document.addEventListener(Yd,K1,!0),document.addEventListener(Zd,X1,!0),document.addEventListener(Gd,Qd,!0),document.addEventListener(qd,Qd,!0),Xd=!0)}function Os(a,u){if(u.pointerType!==(u.MSPOINTER_TYPE_MOUSE||"mouse")){u.touches=[];for(var f in vi)u.touches.push(vi[f]);u.changedTouches=[u],a(u)}}function J1(a,u){u.MSPOINTER_TYPE_TOUCH&&u.pointerType===u.MSPOINTER_TYPE_TOUCH&&me(u),Os(a,u)}function tx(a){var u={},f,g;for(g in a)f=a[g],u[g]=f&&f.bind?f.bind(a):f;return a=u,u.type="dblclick",u.detail=2,u.isTrusted=!1,u._simulated=!0,u}var ex=200;function nx(a,u){a.addEventListener("dblclick",u);var f=0,g;function S(C){if(C.detail!==1){g=C.detail;return}if(!(C.pointerType==="mouse"||C.sourceCapabilities&&!C.sourceCapabilities.firesTouchEvents)){var D=rf(C);if(!(D.some(function(X){return X instanceof HTMLLabelElement&&X.attributes.for})&&!D.some(function(X){return X instanceof HTMLInputElement||X instanceof HTMLSelectElement}))){var Z=Date.now();Z-f<=ex?(g++,g===2&&u(tx(C))):g=1,f=Z}}}return a.addEventListener("click",S),{dblclick:u,simDblclick:S}}function rx(a,u){a.removeEventListener("dblclick",u.dblclick),a.removeEventListener("click",u.simDblclick)}var Gl=Ps(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),xo=Ps(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Jd=xo==="webkitTransition"||xo==="OTransition"?xo+"End":"transitionend";function tf(a){return typeof a=="string"?document.getElementById(a):a}function wo(a,u){var f=a.style[u]||a.currentStyle&&a.currentStyle[u];if((!f||f==="auto")&&document.defaultView){var g=document.defaultView.getComputedStyle(a,null);f=g?g[u]:null}return f==="auto"?null:f}function Yt(a,u,f){var g=document.createElement(a);return g.className=u||"",f&&f.appendChild(g),g}function Jt(a){var u=a.parentNode;u&&u.removeChild(a)}function Cs(a){for(;a.firstChild;)a.removeChild(a.firstChild)}function yi(a){var u=a.parentNode;u&&u.lastChild!==a&&u.appendChild(a)}function _i(a){var u=a.parentNode;u&&u.firstChild!==a&&u.insertBefore(a,u.firstChild)}function ql(a,u){if(a.classList!==void 0)return a.classList.contains(u);var f=ks(a);return f.length>0&&new RegExp("(^|\\s)"+u+"(\\s|$)").test(f)}function Dt(a,u){if(a.classList!==void 0)for(var f=y(u),g=0,S=f.length;g0?2*window.devicePixelRatio:1;function sf(a){return wt.edge?a.wheelDeltaY/2:a.deltaY&&a.deltaMode===0?-a.deltaY/sx:a.deltaY&&a.deltaMode===1?-a.deltaY*20:a.deltaY&&a.deltaMode===2?-a.deltaY*60:a.deltaX||a.deltaZ?0:a.wheelDelta?(a.wheelDeltaY||a.wheelDelta)/2:a.detail&&Math.abs(a.detail)<32765?-a.detail*20:a.detail?a.detail/-32765*60:0}function ac(a,u){var f=u.relatedTarget;if(!f)return!0;try{for(;f&&f!==a;)f=f.parentNode}catch{return!1}return f!==a}var ax={__proto__:null,on:Rt,off:Kt,stopPropagation:Ur,disableScrollPropagation:sc,disableClickPropagation:Oo,preventDefault:me,stop:Vr,getPropagationPath:rf,getMousePosition:of,getWheelDelta:sf,isExternalTarget:ac,addListener:Rt,removeListener:Kt},af=ct.extend({run:function(a,u,f,g){this.stop(),this._el=a,this._inProgress=!0,this._duration=f||.25,this._easeOutPower=1/Math.max(g||.5,.2),this._startPos=zr(a),this._offset=u.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=V(this._animate,this),this._step()},_step:function(a){var u=+new Date-this._startTime,f=this._duration*1e3;uthis.options.maxZoom)?this.setZoom(a):this},panInsideBounds:function(a,u){this._enforcingBounds=!0;var f=this.getCenter(),g=this._limitCenter(f,this._zoom,Q(a));return f.equals(g)||this.panTo(g,u),this._enforcingBounds=!1,this},panInside:function(a,u){u=u||{};var f=I(u.paddingTopLeft||u.padding||[0,0]),g=I(u.paddingBottomRight||u.padding||[0,0]),S=this.project(this.getCenter()),C=this.project(a),D=this.getPixelBounds(),Z=it([D.min.add(f),D.max.subtract(g)]),X=Z.getSize();if(!Z.contains(C)){this._enforcingBounds=!0;var ut=C.subtract(Z.getCenter()),gt=Z.extend(C).getSize().subtract(X);S.x+=ut.x<0?-gt.x:gt.x,S.y+=ut.y<0?-gt.y:gt.y,this.panTo(this.unproject(S),u),this._enforcingBounds=!1}return this},invalidateSize:function(a){if(!this._loaded)return this;a=i({animate:!1,pan:!0},a===!0?{animate:!0}:a);var u=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var f=this.getSize(),g=u.divideBy(2).round(),S=f.divideBy(2).round(),C=g.subtract(S);return!C.x&&!C.y?this:(a.animate&&a.pan?this.panBy(C):(a.pan&&this._rawPanBy(C),this.fire("move"),a.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(s(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:u,newSize:f}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(a){if(a=this._locateOptions=i({timeout:1e4,watch:!1},a),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var u=s(this._handleGeolocationResponse,this),f=s(this._handleGeolocationError,this);return a.watch?this._locationWatchId=navigator.geolocation.watchPosition(u,f,a):navigator.geolocation.getCurrentPosition(u,f,a),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(a){if(this._container._leaflet_id){var u=a.code,f=a.message||(u===1?"permission denied":u===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:u,message:"Geolocation error: "+f+"."})}},_handleGeolocationResponse:function(a){if(this._container._leaflet_id){var u=a.coords.latitude,f=a.coords.longitude,g=new tt(u,f),S=g.toBounds(a.coords.accuracy*2),C=this._locateOptions;if(C.setView){var D=this.getBoundsZoom(S);this.setView(g,C.maxZoom?Math.min(D,C.maxZoom):D)}var Z={latlng:g,bounds:S,timestamp:a.timestamp};for(var X in a.coords)typeof a.coords[X]=="number"&&(Z[X]=a.coords[X]);this.fire("locationfound",Z)}},addHandler:function(a,u){if(!u)return this;var f=this[a]=new u(this);return this._handlers.push(f),this.options[a]&&f.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(),Jt(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(Y(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var a;for(a in this._layers)this._layers[a].remove();for(a in this._panes)Jt(this._panes[a]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(a,u){var f="leaflet-pane"+(a?" leaflet-"+a.replace("Pane","")+"-pane":""),g=Yt("div",f,u||this._mapPane);return a&&(this._panes[a]=g),g},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var a=this.getPixelBounds(),u=this.unproject(a.getBottomLeft()),f=this.unproject(a.getTopRight());return new W(u,f)},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(a,u,f){a=Q(a),f=I(f||[0,0]);var g=this.getZoom()||0,S=this.getMinZoom(),C=this.getMaxZoom(),D=a.getNorthWest(),Z=a.getSouthEast(),X=this.getSize().subtract(f),ut=it(this.project(Z,g),this.project(D,g)).getSize(),gt=wt.any3d?this.options.zoomSnap:1,Ot=X.x/ut.x,Ft=X.y/ut.y,Te=u?Math.max(Ot,Ft):Math.min(Ot,Ft);return g=this.getScaleZoom(Te,g),gt&&(g=Math.round(g/(gt/100))*(gt/100),g=u?Math.ceil(g/gt)*gt:Math.floor(g/gt)*gt),Math.max(S,Math.min(C,g))},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(a,u){var f=this._getTopLeftPoint(a,u);return new H(f,f.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(a){return this.options.crs.getProjectedBounds(a===void 0?this.getZoom():a)},getPane:function(a){return typeof a=="string"?this._panes[a]:a},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(a,u){var f=this.options.crs;return u=u===void 0?this._zoom:u,f.scale(a)/f.scale(u)},getScaleZoom:function(a,u){var f=this.options.crs;u=u===void 0?this._zoom:u;var g=f.zoom(a*f.scale(u));return isNaN(g)?1/0:g},project:function(a,u){return u=u===void 0?this._zoom:u,this.options.crs.latLngToPoint(rt(a),u)},unproject:function(a,u){return u=u===void 0?this._zoom:u,this.options.crs.pointToLatLng(I(a),u)},layerPointToLatLng:function(a){var u=I(a).add(this.getPixelOrigin());return this.unproject(u)},latLngToLayerPoint:function(a){var u=this.project(rt(a))._round();return u._subtract(this.getPixelOrigin())},wrapLatLng:function(a){return this.options.crs.wrapLatLng(rt(a))},wrapLatLngBounds:function(a){return this.options.crs.wrapLatLngBounds(Q(a))},distance:function(a,u){return this.options.crs.distance(rt(a),rt(u))},containerPointToLayerPoint:function(a){return I(a).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(a){return I(a).add(this._getMapPanePos())},containerPointToLatLng:function(a){var u=this.containerPointToLayerPoint(I(a));return this.layerPointToLatLng(u)},latLngToContainerPoint:function(a){return this.layerPointToContainerPoint(this.latLngToLayerPoint(rt(a)))},mouseEventToContainerPoint:function(a){return of(a,this._container)},mouseEventToLayerPoint:function(a){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(a))},mouseEventToLatLng:function(a){return this.layerPointToLatLng(this.mouseEventToLayerPoint(a))},_initContainer:function(a){var u=this._container=tf(a);if(u){if(u._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Rt(u,"scroll",this._onScroll,this),this._containerId=c(u)},_initLayout:function(){var a=this._container;this._fadeAnimated=this.options.fadeAnimation&&wt.any3d,Dt(a,"leaflet-container"+(wt.touch?" leaflet-touch":"")+(wt.retina?" leaflet-retina":"")+(wt.ielt9?" leaflet-oldie":"")+(wt.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var u=wo(a,"position");u!=="absolute"&&u!=="relative"&&u!=="fixed"&&u!=="sticky"&&(a.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var a=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),oe(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||(Dt(a.markerPane,"leaflet-zoom-hide"),Dt(a.shadowPane,"leaflet-zoom-hide"))},_resetView:function(a,u,f){oe(this._mapPane,new G(0,0));var g=!this._loaded;this._loaded=!0,u=this._limitZoom(u),this.fire("viewprereset");var S=this._zoom!==u;this._moveStart(S,f)._move(a,u)._moveEnd(S),this.fire("viewreset"),g&&this.fire("load")},_moveStart:function(a,u){return a&&this.fire("zoomstart"),u||this.fire("movestart"),this},_move:function(a,u,f,g){u===void 0&&(u=this._zoom);var S=this._zoom!==u;return this._zoom=u,this._lastCenter=a,this._pixelOrigin=this._getNewPixelOrigin(a),g?f&&f.pinch&&this.fire("zoom",f):((S||f&&f.pinch)&&this.fire("zoom",f),this.fire("move",f)),this},_moveEnd:function(a){return a&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return Y(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(a){oe(this._mapPane,this._getMapPanePos().subtract(a))},_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(a){this._targets={},this._targets[c(this._container)]=this;var u=a?Kt:Rt;u(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&u(window,"resize",this._onResize,this),wt.any3d&&this.options.transform3DLimit&&(a?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){Y(this._resizeRequest),this._resizeRequest=V(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var a=this._getMapPanePos();Math.max(Math.abs(a.x),Math.abs(a.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(a,u){for(var f=[],g,S=u==="mouseout"||u==="mouseover",C=a.target||a.srcElement,D=!1;C;){if(g=this._targets[c(C)],g&&(u==="click"||u==="preclick")&&this._draggableMoved(g)){D=!0;break}if(g&&g.listens(u,!0)&&(S&&!ac(C,a)||(f.push(g),S))||C===this._container)break;C=C.parentNode}return!f.length&&!D&&!S&&this.listens(u,!0)&&(f=[this]),f},_isClickDisabled:function(a){for(;a&&a!==this._container;){if(a._leaflet_disable_click)return!0;a=a.parentNode}},_handleDOMEvent:function(a){var u=a.target||a.srcElement;if(!(!this._loaded||u._leaflet_disable_events||a.type==="click"&&this._isClickDisabled(u))){var f=a.type;f==="mousedown"&&ec(u),this._fireDOMEvent(a,f)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(a,u,f){if(a.type==="click"){var g=i({},a);g.type="preclick",this._fireDOMEvent(g,g.type,f)}var S=this._findEventTargets(a,u);if(f){for(var C=[],D=0;D0?Math.round(a-u)/2:Math.max(0,Math.ceil(a))-Math.max(0,Math.floor(u))},_limitZoom:function(a){var u=this.getMinZoom(),f=this.getMaxZoom(),g=wt.any3d?this.options.zoomSnap:1;return g&&(a=Math.round(a/g)*g),Math.max(u,Math.min(f,a))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){ne(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(a,u){var f=this._getCenterOffset(a)._trunc();return(u&&u.animate)!==!0&&!this.getSize().contains(f)?!1:(this.panBy(f,u),!0)},_createAnimProxy:function(){var a=this._proxy=Yt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(a),this.on("zoomanim",function(u){var f=Gl,g=this._proxy.style[f];$r(this._proxy,this.project(u.center,u.zoom),this.getZoomScale(u.zoom,1)),g===this._proxy.style[f]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){Jt(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var a=this.getCenter(),u=this.getZoom();$r(this._proxy,this.project(a,u),this.getZoomScale(u,1))},_catchTransitionEnd:function(a){this._animatingZoom&&a.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(a,u,f){if(this._animatingZoom)return!0;if(f=f||{},!this._zoomAnimated||f.animate===!1||this._nothingToAnimate()||Math.abs(u-this._zoom)>this.options.zoomAnimationThreshold)return!1;var g=this.getZoomScale(u),S=this._getCenterOffset(a)._divideBy(1-1/g);return f.animate!==!0&&!this.getSize().contains(S)?!1:(V(function(){this._moveStart(!0,f.noMoveStart||!1)._animateZoom(a,u,!0)},this),!0)},_animateZoom:function(a,u,f,g){this._mapPane&&(f&&(this._animatingZoom=!0,this._animateToCenter=a,this._animateToZoom=u,Dt(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:a,zoom:u,noUpdate:g}),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&&ne(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 lx(a,u){return new Ut(a,u)}var cn=K.extend({options:{position:"topright"},initialize:function(a){_(this,a)},getPosition:function(){return this.options.position},setPosition:function(a){var u=this._map;return u&&u.removeControl(this),this.options.position=a,u&&u.addControl(this),this},getContainer:function(){return this._container},addTo:function(a){this.remove(),this._map=a;var u=this._container=this.onAdd(a),f=this.getPosition(),g=a._controlCorners[f];return Dt(u,"leaflet-control"),f.indexOf("bottom")!==-1?g.insertBefore(u,g.firstChild):g.appendChild(u),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(Jt(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(a){this._map&&a&&a.screenX>0&&a.screenY>0&&this._map.getContainer().focus()}}),Co=function(a){return new cn(a)};Ut.include({addControl:function(a){return a.addTo(this),this},removeControl:function(a){return a.remove(),this},_initControlPos:function(){var a=this._controlCorners={},u="leaflet-",f=this._controlContainer=Yt("div",u+"control-container",this._container);function g(S,C){var D=u+S+" "+u+C;a[S+C]=Yt("div",D,f)}g("top","left"),g("top","right"),g("bottom","left"),g("bottom","right")},_clearControlPos:function(){for(var a in this._controlCorners)Jt(this._controlCorners[a]);Jt(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var lf=cn.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(a,u,f,g){return f1,this._baseLayersList.style.display=a?"":"none"),this._separator.style.display=u&&a?"":"none",this},_onLayerChange:function(a){this._handlingClick||this._update();var u=this._getLayer(c(a.target)),f=u.overlay?a.type==="add"?"overlayadd":"overlayremove":a.type==="add"?"baselayerchange":null;f&&this._map.fire(f,u)},_createRadioElement:function(a,u){var f='",g=document.createElement("div");return g.innerHTML=f,g.firstChild},_addItem:function(a){var u=document.createElement("label"),f=this._map.hasLayer(a.layer),g;a.overlay?(g=document.createElement("input"),g.type="checkbox",g.className="leaflet-control-layers-selector",g.defaultChecked=f):g=this._createRadioElement("leaflet-base-layers_"+c(this),f),this._layerControlInputs.push(g),g.layerId=c(a.layer),Rt(g,"click",this._onInputClick,this);var S=document.createElement("span");S.innerHTML=" "+a.name;var C=document.createElement("span");u.appendChild(C),C.appendChild(g),C.appendChild(S);var D=a.overlay?this._overlaysList:this._baseLayersList;return D.appendChild(u),this._checkDisabledLayers(),u},_onInputClick:function(){if(!this._preventClick){var a=this._layerControlInputs,u,f,g=[],S=[];this._handlingClick=!0;for(var C=a.length-1;C>=0;C--)u=a[C],f=this._getLayer(u.layerId).layer,u.checked?g.push(f):u.checked||S.push(f);for(C=0;C=0;S--)u=a[S],f=this._getLayer(u.layerId).layer,u.disabled=f.options.minZoom!==void 0&&gf.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var a=this._section;this._preventClick=!0,Rt(a,"click",me),this.expand();var u=this;setTimeout(function(){Kt(a,"click",me),u._preventClick=!1})}}),cx=function(a,u,f){return new lf(a,u,f)},lc=cn.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(a){var u="leaflet-control-zoom",f=Yt("div",u+" leaflet-bar"),g=this.options;return this._zoomInButton=this._createButton(g.zoomInText,g.zoomInTitle,u+"-in",f,this._zoomIn),this._zoomOutButton=this._createButton(g.zoomOutText,g.zoomOutTitle,u+"-out",f,this._zoomOut),this._updateDisabled(),a.on("zoomend zoomlevelschange",this._updateDisabled,this),f},onRemove:function(a){a.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(a){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(a.shiftKey?3:1))},_createButton:function(a,u,f,g,S){var C=Yt("a",f,g);return C.innerHTML=a,C.href="#",C.title=u,C.setAttribute("role","button"),C.setAttribute("aria-label",u),Oo(C),Rt(C,"click",Vr),Rt(C,"click",S,this),Rt(C,"click",this._refocusOnMap,this),C},_updateDisabled:function(){var a=this._map,u="leaflet-disabled";ne(this._zoomInButton,u),ne(this._zoomOutButton,u),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||a._zoom===a.getMinZoom())&&(Dt(this._zoomOutButton,u),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||a._zoom===a.getMaxZoom())&&(Dt(this._zoomInButton,u),this._zoomInButton.setAttribute("aria-disabled","true"))}});Ut.mergeOptions({zoomControl:!0}),Ut.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new lc,this.addControl(this.zoomControl))});var ux=function(a){return new lc(a)},cf=cn.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(a){var u="leaflet-control-scale",f=Yt("div",u),g=this.options;return this._addScales(g,u+"-line",f),a.on(g.updateWhenIdle?"moveend":"move",this._update,this),a.whenReady(this._update,this),f},onRemove:function(a){a.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(a,u,f){a.metric&&(this._mScale=Yt("div",u,f)),a.imperial&&(this._iScale=Yt("div",u,f))},_update:function(){var a=this._map,u=a.getSize().y/2,f=a.distance(a.containerPointToLatLng([0,u]),a.containerPointToLatLng([this.options.maxWidth,u]));this._updateScales(f)},_updateScales:function(a){this.options.metric&&a&&this._updateMetric(a),this.options.imperial&&a&&this._updateImperial(a)},_updateMetric:function(a){var u=this._getRoundNum(a),f=u<1e3?u+" m":u/1e3+" km";this._updateScale(this._mScale,f,u/a)},_updateImperial:function(a){var u=a*3.2808399,f,g,S;u>5280?(f=u/5280,g=this._getRoundNum(f),this._updateScale(this._iScale,g+" mi",g/f)):(S=this._getRoundNum(u),this._updateScale(this._iScale,S+" ft",S/u))},_updateScale:function(a,u,f){a.style.width=Math.round(this.options.maxWidth*f)+"px",a.innerHTML=u},_getRoundNum:function(a){var u=Math.pow(10,(Math.floor(a)+"").length-1),f=a/u;return f=f>=10?10:f>=5?5:f>=3?3:f>=2?2:1,u*f}}),hx=function(a){return new cf(a)},dx='',cc=cn.extend({options:{position:"bottomright",prefix:''+(wt.inlineSvg?dx+" ":"")+"Leaflet"},initialize:function(a){_(this,a),this._attributions={}},onAdd:function(a){a.attributionControl=this,this._container=Yt("div","leaflet-control-attribution"),Oo(this._container);for(var u in a._layers)a._layers[u].getAttribution&&this.addAttribution(a._layers[u].getAttribution());return this._update(),a.on("layeradd",this._addAttribution,this),this._container},onRemove:function(a){a.off("layeradd",this._addAttribution,this)},_addAttribution:function(a){a.layer.getAttribution&&(this.addAttribution(a.layer.getAttribution()),a.layer.once("remove",function(){this.removeAttribution(a.layer.getAttribution())},this))},setPrefix:function(a){return this.options.prefix=a,this._update(),this},addAttribution:function(a){return a?(this._attributions[a]||(this._attributions[a]=0),this._attributions[a]++,this._update(),this):this},removeAttribution:function(a){return a?(this._attributions[a]&&(this._attributions[a]--,this._update()),this):this},_update:function(){if(this._map){var a=[];for(var u in this._attributions)this._attributions[u]&&a.push(u);var f=[];this.options.prefix&&f.push(this.options.prefix),a.length&&f.push(a.join(", ")),this._container.innerHTML=f.join(' ')}}});Ut.mergeOptions({attributionControl:!0}),Ut.addInitHook(function(){this.options.attributionControl&&new cc().addTo(this)});var fx=function(a){return new cc(a)};cn.Layers=lf,cn.Zoom=lc,cn.Scale=cf,cn.Attribution=cc,Co.layers=cx,Co.zoom=ux,Co.scale=hx,Co.attribution=fx;var Ln=K.extend({initialize:function(a){this._map=a},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}});Ln.addTo=function(a,u){return a.addHandler(u,this),this};var px={Events:et},uf=wt.touch?"touchstart mousedown":"mousedown",yr=ct.extend({options:{clickTolerance:3},initialize:function(a,u,f,g){_(this,g),this._element=a,this._dragStartTarget=u||a,this._preventOutline=f},enable:function(){this._enabled||(Rt(this._dragStartTarget,uf,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(yr._dragging===this&&this.finishDrag(!0),Kt(this._dragStartTarget,uf,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(a){if(this._enabled&&(this._moved=!1,!ql(this._element,"leaflet-zoom-anim"))){if(a.touches&&a.touches.length!==1){yr._dragging===this&&this.finishDrag();return}if(!(yr._dragging||a.shiftKey||a.which!==1&&a.button!==1&&!a.touches)&&(yr._dragging=this,this._preventOutline&&ec(this._element),Ql(),So(),!this._moving)){this.fire("down");var u=a.touches?a.touches[0]:a,f=ef(this._element);this._startPoint=new G(u.clientX,u.clientY),this._startPos=zr(this._element),this._parentScale=nc(f);var g=a.type==="mousedown";Rt(document,g?"mousemove":"touchmove",this._onMove,this),Rt(document,g?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(a){if(this._enabled){if(a.touches&&a.touches.length>1){this._moved=!0;return}var u=a.touches&&a.touches.length===1?a.touches[0]:a,f=new G(u.clientX,u.clientY)._subtract(this._startPoint);!f.x&&!f.y||Math.abs(f.x)+Math.abs(f.y)C&&(D=Z,C=X);C>f&&(u[D]=1,hc(a,u,f,g,D),hc(a,u,f,D,S))}function yx(a,u){for(var f=[a[0]],g=1,S=0,C=a.length;gu&&(f.push(a[g]),S=g);return Su.max.x&&(f|=2),a.yu.max.y&&(f|=8),f}function _x(a,u){var f=u.x-a.x,g=u.y-a.y;return f*f+g*g}function ko(a,u,f,g){var S=u.x,C=u.y,D=f.x-S,Z=f.y-C,X=D*D+Z*Z,ut;return X>0&&(ut=((a.x-S)*D+(a.y-C)*Z)/X,ut>1?(S=f.x,C=f.y):ut>0&&(S+=D*ut,C+=Z*ut)),D=a.x-S,Z=a.y-C,g?D*D+Z*Z:new G(S,C)}function We(a){return!E(a[0])||typeof a[0][0]!="object"&&typeof a[0][0]<"u"}function vf(a){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),We(a)}function yf(a,u){var f,g,S,C,D,Z,X,ut;if(!a||a.length===0)throw new Error("latlngs not passed");We(a)||(console.warn("latlngs are not flat! Only the first ring will be used"),a=a[0]);var gt=rt([0,0]),Ot=Q(a),Ft=Ot.getNorthWest().distanceTo(Ot.getSouthWest())*Ot.getNorthEast().distanceTo(Ot.getNorthWest());Ft<1700&&(gt=uc(a));var Te=a.length,ce=[];for(f=0;fg){X=(C-g)/S,ut=[Z.x-X*(Z.x-D.x),Z.y-X*(Z.y-D.y)];break}var Pe=u.unproject(I(ut));return rt([Pe.lat+gt.lat,Pe.lng+gt.lng])}var bx={__proto__:null,simplify:ff,pointToSegmentDistance:pf,closestPointOnSegment:gx,clipSegment:gf,_getEdgeIntersection:As,_getBitCode:Hr,_sqClosestPointOnSegment:ko,isFlat:We,_flat:vf,polylineCenter:yf},dc={project:function(a){return new G(a.lng,a.lat)},unproject:function(a){return new tt(a.y,a.x)},bounds:new H([-180,-90],[180,90])},fc={R:6378137,R_MINOR:6356752314245179e-9,bounds:new H([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(a){var u=Math.PI/180,f=this.R,g=a.lat*u,S=this.R_MINOR/f,C=Math.sqrt(1-S*S),D=C*Math.sin(g),Z=Math.tan(Math.PI/4-g/2)/Math.pow((1-D)/(1+D),C/2);return g=-f*Math.log(Math.max(Z,1e-10)),new G(a.lng*u*f,g)},unproject:function(a){for(var u=180/Math.PI,f=this.R,g=this.R_MINOR/f,S=Math.sqrt(1-g*g),C=Math.exp(-a.y/f),D=Math.PI/2-2*Math.atan(C),Z=0,X=.1,ut;Z<15&&Math.abs(X)>1e-7;Z++)ut=S*Math.sin(D),ut=Math.pow((1-ut)/(1+ut),S/2),X=Math.PI/2-2*Math.atan(C*ut)-D,D+=X;return new tt(D*u,a.x*u/f)}},xx={__proto__:null,LonLat:dc,Mercator:fc,SphericalMercator:z},wx=i({},M,{code:"EPSG:3395",projection:fc,transformation:function(){var a=.5/(Math.PI*fc.R);return st(a,.5,-a,.5)}()}),_f=i({},M,{code:"EPSG:4326",projection:dc,transformation:st(1/180,1,-1/180,.5)}),Sx=i({},mt,{projection:dc,transformation:st(1,0,-1,0),scale:function(a){return Math.pow(2,a)},zoom:function(a){return Math.log(a)/Math.LN2},distance:function(a,u){var f=u.lng-a.lng,g=u.lat-a.lat;return Math.sqrt(f*f+g*g)},infinite:!0});mt.Earth=M,mt.EPSG3395=wx,mt.EPSG3857=ht,mt.EPSG900913=bt,mt.EPSG4326=_f,mt.Simple=Sx;var un=ct.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(a){return a.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(a){return a&&a.removeLayer(this),this},getPane:function(a){return this._map.getPane(a?this.options[a]||a:this.options.pane)},addInteractiveTarget:function(a){return this._map._targets[c(a)]=this,this},removeInteractiveTarget:function(a){return delete this._map._targets[c(a)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(a){var u=a.target;if(u.hasLayer(this)){if(this._map=u,this._zoomAnimated=u._zoomAnimated,this.getEvents){var f=this.getEvents();u.on(f,this),this.once("remove",function(){u.off(f,this)},this)}this.onAdd(u),this.fire("add"),u.fire("layeradd",{layer:this})}}});Ut.include({addLayer:function(a){if(!a._layerAdd)throw new Error("The provided object is not a Layer.");var u=c(a);return this._layers[u]?this:(this._layers[u]=a,a._mapToAdd=this,a.beforeAdd&&a.beforeAdd(this),this.whenReady(a._layerAdd,a),this)},removeLayer:function(a){var u=c(a);return this._layers[u]?(this._loaded&&a.onRemove(this),delete this._layers[u],this._loaded&&(this.fire("layerremove",{layer:a}),a.fire("remove")),a._map=a._mapToAdd=null,this):this},hasLayer:function(a){return c(a)in this._layers},eachLayer:function(a,u){for(var f in this._layers)a.call(u,this._layers[f]);return this},_addLayers:function(a){a=a?E(a)?a:[a]:[];for(var u=0,f=a.length;uthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&u[0]instanceof tt&&u[0].equals(u[f-1])&&u.pop(),u},_setLatLngs:function(a){Yn.prototype._setLatLngs.call(this,a),We(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return We(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var a=this._renderer._bounds,u=this.options.weight,f=new G(u,u);if(a=new H(a.min.subtract(f),a.max.add(f)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(a))){if(this.options.noClip){this._parts=this._rings;return}for(var g=0,S=this._rings.length,C;ga.y!=S.y>a.y&&a.x<(S.x-g.x)*(a.y-g.y)/(S.y-g.y)+g.x&&(u=!u);return u||Yn.prototype._containsPoint.call(this,a,!0)}});function Mx(a,u){return new wi(a,u)}var Zn=Wn.extend({initialize:function(a,u){_(this,u),this._layers={},a&&this.addData(a)},addData:function(a){var u=E(a)?a:a.features,f,g,S;if(u){for(f=0,g=u.length;f0&&S.push(S[0].slice()),S}function Si(a,u){return a.feature?i({},a.feature,{geometry:u}):Fs(u)}function Fs(a){return a.type==="Feature"||a.type==="FeatureCollection"?a:{type:"Feature",properties:{},geometry:a}}var vc={toGeoJSON:function(a){return Si(this,{type:"Point",coordinates:gc(this.getLatLng(),a)})}};Rs.include(vc),pc.include(vc),js.include(vc),Yn.include({toGeoJSON:function(a){var u=!We(this._latlngs),f=Is(this._latlngs,u?1:0,!1,a);return Si(this,{type:(u?"Multi":"")+"LineString",coordinates:f})}}),wi.include({toGeoJSON:function(a){var u=!We(this._latlngs),f=u&&!We(this._latlngs[0]),g=Is(this._latlngs,f?2:u?1:0,!0,a);return u||(g=[g]),Si(this,{type:(f?"Multi":"")+"Polygon",coordinates:g})}}),bi.include({toMultiPoint:function(a){var u=[];return this.eachLayer(function(f){u.push(f.toGeoJSON(a).geometry.coordinates)}),Si(this,{type:"MultiPoint",coordinates:u})},toGeoJSON:function(a){var u=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(u==="MultiPoint")return this.toMultiPoint(a);var f=u==="GeometryCollection",g=[];return this.eachLayer(function(S){if(S.toGeoJSON){var C=S.toGeoJSON(a);if(f)g.push(C.geometry);else{var D=Fs(C);D.type==="FeatureCollection"?g.push.apply(g,D.features):g.push(D)}}}),f?Si(this,{geometries:g,type:"GeometryCollection"}):{type:"FeatureCollection",features:g}}});function wf(a,u){return new Zn(a,u)}var Ax=wf,Bs=un.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(a,u,f){this._url=a,this._bounds=Q(u),_(this,f)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(Dt(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){Jt(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(a){return this.options.opacity=a,this._image&&this._updateOpacity(),this},setStyle:function(a){return a.opacity&&this.setOpacity(a.opacity),this},bringToFront:function(){return this._map&&yi(this._image),this},bringToBack:function(){return this._map&&_i(this._image),this},setUrl:function(a){return this._url=a,this._image&&(this._image.src=a),this},setBounds:function(a){return this._bounds=Q(a),this._map&&this._reset(),this},getEvents:function(){var a={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(a.zoomanim=this._animateZoom),a},setZIndex:function(a){return this.options.zIndex=a,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var a=this._url.tagName==="IMG",u=this._image=a?this._url:Yt("img");if(Dt(u,"leaflet-image-layer"),this._zoomAnimated&&Dt(u,"leaflet-zoom-animated"),this.options.className&&Dt(u,this.options.className),u.onselectstart=p,u.onmousemove=p,u.onload=s(this.fire,this,"load"),u.onerror=s(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(u.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),a){this._url=u.src;return}u.src=this._url,u.alt=this.options.alt},_animateZoom:function(a){var u=this._map.getZoomScale(a.zoom),f=this._map._latLngBoundsToNewLayerBounds(this._bounds,a.zoom,a.center).min;$r(this._image,f,u)},_reset:function(){var a=this._image,u=new H(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),f=u.getSize();oe(a,u.min),a.style.width=f.x+"px",a.style.height=f.y+"px"},_updateOpacity:function(){He(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var a=this.options.errorOverlayUrl;a&&this._url!==a&&(this._url=a,this._image.src=a)},getCenter:function(){return this._bounds.getCenter()}}),Rx=function(a,u,f){return new Bs(a,u,f)},Sf=Bs.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var a=this._url.tagName==="VIDEO",u=this._image=a?this._url:Yt("video");if(Dt(u,"leaflet-image-layer"),this._zoomAnimated&&Dt(u,"leaflet-zoom-animated"),this.options.className&&Dt(u,this.options.className),u.onselectstart=p,u.onmousemove=p,u.onloadeddata=s(this.fire,this,"load"),a){for(var f=u.getElementsByTagName("source"),g=[],S=0;S0?g:[u.src];return}E(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(u.style,"objectFit")&&(u.style.objectFit="fill"),u.autoplay=!!this.options.autoplay,u.loop=!!this.options.loop,u.muted=!!this.options.muted,u.playsInline=!!this.options.playsInline;for(var C=0;CS?(u.height=S+"px",Dt(a,C)):ne(a,C),this._containerWidth=this._container.offsetWidth},_animateZoom:function(a){var u=this._map._latLngToNewLayerPoint(this._latlng,a.zoom,a.center),f=this._getAnchor();oe(this._container,u.add(f))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var a=this._map,u=parseInt(wo(this._container,"marginBottom"),10)||0,f=this._container.offsetHeight+u,g=this._containerWidth,S=new G(this._containerLeft,-f-this._containerBottom);S._add(zr(this._container));var C=a.layerPointToContainerPoint(S),D=I(this.options.autoPanPadding),Z=I(this.options.autoPanPaddingTopLeft||D),X=I(this.options.autoPanPaddingBottomRight||D),ut=a.getSize(),gt=0,Ot=0;C.x+g+X.x>ut.x&&(gt=C.x+g-ut.x+X.x),C.x-gt-Z.x<0&&(gt=C.x-Z.x),C.y+f+X.y>ut.y&&(Ot=C.y+f-ut.y+X.y),C.y-Ot-Z.y<0&&(Ot=C.y-Z.y),(gt||Ot)&&(this.options.keepInView&&(this._autopanning=!0),a.fire("autopanstart").panBy([gt,Ot]))}},_getAnchor:function(){return I(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Dx=function(a,u){return new $s(a,u)};Ut.mergeOptions({closePopupOnClick:!0}),Ut.include({openPopup:function(a,u,f){return this._initOverlay($s,a,u,f).openOn(this),this},closePopup:function(a){return a=arguments.length?a:this._popup,a&&a.close(),this}}),un.include({bindPopup:function(a,u){return this._popup=this._initOverlay($s,this._popup,a,u),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(a){return this._popup&&(this instanceof Wn||(this._popup._source=this),this._popup._prepareOpen(a||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(a){return this._popup&&this._popup.setContent(a),this},getPopup:function(){return this._popup},_openPopup:function(a){if(!(!this._popup||!this._map)){Vr(a);var u=a.layer||a.target;if(this._popup._source===u&&!(u instanceof _r)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(a.latlng);return}this._popup._source=u,this.openPopup(a.latlng)}},_movePopup:function(a){this._popup.setLatLng(a.latlng)},_onKeyPress:function(a){a.originalEvent.keyCode===13&&this._openPopup(a)}});var zs=Mn.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(a){Mn.prototype.onAdd.call(this,a),this.setOpacity(this.options.opacity),a.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(a){Mn.prototype.onRemove.call(this,a),a.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var a=Mn.prototype.getEvents.call(this);return this.options.permanent||(a.preclick=this.close),a},_initLayout:function(){var a="leaflet-tooltip",u=a+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=Yt("div",u),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+c(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(a){var u,f,g=this._map,S=this._container,C=g.latLngToContainerPoint(g.getCenter()),D=g.layerPointToContainerPoint(a),Z=this.options.direction,X=S.offsetWidth,ut=S.offsetHeight,gt=I(this.options.offset),Ot=this._getAnchor();Z==="top"?(u=X/2,f=ut):Z==="bottom"?(u=X/2,f=0):Z==="center"?(u=X/2,f=ut/2):Z==="right"?(u=0,f=ut/2):Z==="left"?(u=X,f=ut/2):D.xthis.options.maxZoom||fg?this._retainParent(S,C,D,g):!1)},_retainChildren:function(a,u,f,g){for(var S=2*a;S<2*a+2;S++)for(var C=2*u;C<2*u+2;C++){var D=new G(S,C);D.z=f+1;var Z=this._tileCoordsToKey(D),X=this._tiles[Z];if(X&&X.active){X.retain=!0;continue}else X&&X.loaded&&(X.retain=!0);f+1this.options.maxZoom||this.options.minZoom!==void 0&&S1){this._setView(a,f);return}for(var Ot=S.min.y;Ot<=S.max.y;Ot++)for(var Ft=S.min.x;Ft<=S.max.x;Ft++){var Te=new G(Ft,Ot);if(Te.z=this._tileZoom,!!this._isValidTile(Te)){var ce=this._tiles[this._tileCoordsToKey(Te)];ce?ce.current=!0:D.push(Te)}}if(D.sort(function(Pe,Ei){return Pe.distanceTo(C)-Ei.distanceTo(C)}),D.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Ye=document.createDocumentFragment();for(Ft=0;Ftf.max.x)||!u.wrapLat&&(a.yf.max.y))return!1}if(!this.options.bounds)return!0;var g=this._tileCoordsToBounds(a);return Q(this.options.bounds).overlaps(g)},_keyToBounds:function(a){return this._tileCoordsToBounds(this._keyToTileCoords(a))},_tileCoordsToNwSe:function(a){var u=this._map,f=this.getTileSize(),g=a.scaleBy(f),S=g.add(f),C=u.unproject(g,a.z),D=u.unproject(S,a.z);return[C,D]},_tileCoordsToBounds:function(a){var u=this._tileCoordsToNwSe(a),f=new W(u[0],u[1]);return this.options.noWrap||(f=this._map.wrapLatLngBounds(f)),f},_tileCoordsToKey:function(a){return a.x+":"+a.y+":"+a.z},_keyToTileCoords:function(a){var u=a.split(":"),f=new G(+u[0],+u[1]);return f.z=+u[2],f},_removeTile:function(a){var u=this._tiles[a];u&&(Jt(u.el),delete this._tiles[a],this.fire("tileunload",{tile:u.el,coords:this._keyToTileCoords(a)}))},_initTile:function(a){Dt(a,"leaflet-tile");var u=this.getTileSize();a.style.width=u.x+"px",a.style.height=u.y+"px",a.onselectstart=p,a.onmousemove=p,wt.ielt9&&this.options.opacity<1&&He(a,this.options.opacity)},_addTile:function(a,u){var f=this._getTilePos(a),g=this._tileCoordsToKey(a),S=this.createTile(this._wrapCoords(a),s(this._tileReady,this,a));this._initTile(S),this.createTile.length<2&&V(s(this._tileReady,this,a,null,S)),oe(S,f),this._tiles[g]={el:S,coords:a,current:!0},u.appendChild(S),this.fire("tileloadstart",{tile:S,coords:a})},_tileReady:function(a,u,f){u&&this.fire("tileerror",{error:u,tile:f,coords:a});var g=this._tileCoordsToKey(a);f=this._tiles[g],f&&(f.loaded=+new Date,this._map._fadeAnimated?(He(f.el,0),Y(this._fadeFrame),this._fadeFrame=V(this._updateOpacity,this)):(f.active=!0,this._pruneTiles()),u||(Dt(f.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:f.el,coords:a})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),wt.ielt9||!this._map._fadeAnimated?V(this._pruneTiles,this):setTimeout(s(this._pruneTiles,this),250)))},_getTilePos:function(a){return a.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(a){var u=new G(this._wrapX?d(a.x,this._wrapX):a.x,this._wrapY?d(a.y,this._wrapY):a.y);return u.z=a.z,u},_pxBoundsToTileRange:function(a){var u=this.getTileSize();return new H(a.min.unscaleBy(u).floor(),a.max.unscaleBy(u).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var a in this._tiles)if(!this._tiles[a].loaded)return!1;return!0}});function Bx(a){return new Lo(a)}var Ti=Lo.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(a,u){this._url=a,u=_(this,u),u.detectRetina&&wt.retina&&u.maxZoom>0?(u.tileSize=Math.floor(u.tileSize/2),u.zoomReverse?(u.zoomOffset--,u.minZoom=Math.min(u.maxZoom,u.minZoom+1)):(u.zoomOffset++,u.maxZoom=Math.max(u.minZoom,u.maxZoom-1)),u.minZoom=Math.max(0,u.minZoom)):u.zoomReverse?u.minZoom=Math.min(u.maxZoom,u.minZoom):u.maxZoom=Math.max(u.minZoom,u.maxZoom),typeof u.subdomains=="string"&&(u.subdomains=u.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(a,u){return this._url===a&&u===void 0&&(u=!0),this._url=a,u||this.redraw(),this},createTile:function(a,u){var f=document.createElement("img");return Rt(f,"load",s(this._tileOnLoad,this,u,f)),Rt(f,"error",s(this._tileOnError,this,u,f)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(f.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(f.referrerPolicy=this.options.referrerPolicy),f.alt="",f.src=this.getTileUrl(a),f},getTileUrl:function(a){var u={r:wt.retina?"@2x":"",s:this._getSubdomain(a),x:a.x,y:a.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var f=this._globalTileRange.max.y-a.y;this.options.tms&&(u.y=f),u["-y"]=f}return w(this._url,i(u,this.options))},_tileOnLoad:function(a,u){wt.ielt9?setTimeout(s(a,this,null,u),0):a(null,u)},_tileOnError:function(a,u,f){var g=this.options.errorTileUrl;g&&u.getAttribute("src")!==g&&(u.src=g),a(f,u)},_onTileRemove:function(a){a.tile.onload=null},_getZoomForUrl:function(){var a=this._tileZoom,u=this.options.maxZoom,f=this.options.zoomReverse,g=this.options.zoomOffset;return f&&(a=u-a),a+g},_getSubdomain:function(a){var u=Math.abs(a.x+a.y)%this.options.subdomains.length;return this.options.subdomains[u]},_abortLoading:function(){var a,u;for(a in this._tiles)if(this._tiles[a].coords.z!==this._tileZoom&&(u=this._tiles[a].el,u.onload=p,u.onerror=p,!u.complete)){u.src=k;var f=this._tiles[a].coords;Jt(u),delete this._tiles[a],this.fire("tileabort",{tile:u,coords:f})}},_removeTile:function(a){var u=this._tiles[a];if(u)return u.el.setAttribute("src",k),Lo.prototype._removeTile.call(this,a)},_tileReady:function(a,u,f){if(!(!this._map||f&&f.getAttribute("src")===k))return Lo.prototype._tileReady.call(this,a,u,f)}});function Of(a,u){return new Ti(a,u)}var Cf=Ti.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(a,u){this._url=a;var f=i({},this.defaultWmsParams);for(var g in u)g in this.options||(f[g]=u[g]);u=_(this,u);var S=u.detectRetina&&wt.retina?2:1,C=this.getTileSize();f.width=C.x*S,f.height=C.y*S,this.wmsParams=f},onAdd:function(a){this._crs=this.options.crs||a.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var u=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[u]=this._crs.code,Ti.prototype.onAdd.call(this,a)},getTileUrl:function(a){var u=this._tileCoordsToNwSe(a),f=this._crs,g=it(f.project(u[0]),f.project(u[1])),S=g.min,C=g.max,D=(this._wmsVersion>=1.3&&this._crs===_f?[S.y,S.x,C.y,C.x]:[S.x,S.y,C.x,C.y]).join(","),Z=Ti.prototype.getTileUrl.call(this,a);return Z+T(this.wmsParams,Z,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+D},setParams:function(a,u){return i(this.wmsParams,a),u||this.redraw(),this}});function $x(a,u){return new Cf(a,u)}Ti.WMS=Cf,Of.wms=$x;var Gn=un.extend({options:{padding:.1},initialize:function(a){_(this,a),c(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),Dt(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 a={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(a.zoomanim=this._onAnimZoom),a},_onAnimZoom:function(a){this._updateTransform(a.center,a.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(a,u){var f=this._map.getZoomScale(u,this._zoom),g=this._map.getSize().multiplyBy(.5+this.options.padding),S=this._map.project(this._center,u),C=g.multiplyBy(-f).add(S).subtract(this._map._getNewPixelOrigin(a,u));wt.any3d?$r(this._container,C,f):oe(this._container,C)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var a in this._layers)this._layers[a]._reset()},_onZoomEnd:function(){for(var a in this._layers)this._layers[a]._project()},_updatePaths:function(){for(var a in this._layers)this._layers[a]._update()},_update:function(){var a=this.options.padding,u=this._map.getSize(),f=this._map.containerPointToLayerPoint(u.multiplyBy(-a)).round();this._bounds=new H(f,f.add(u.multiplyBy(1+a*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),kf=Gn.extend({options:{tolerance:0},getEvents:function(){var a=Gn.prototype.getEvents.call(this);return a.viewprereset=this._onViewPreReset,a},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Gn.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var a=this._container=document.createElement("canvas");Rt(a,"mousemove",this._onMouseMove,this),Rt(a,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Rt(a,"mouseout",this._handleMouseOut,this),a._leaflet_disable_events=!0,this._ctx=a.getContext("2d")},_destroyContainer:function(){Y(this._redrawRequest),delete this._ctx,Jt(this._container),Kt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var a;this._redrawBounds=null;for(var u in this._layers)a=this._layers[u],a._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Gn.prototype._update.call(this);var a=this._bounds,u=this._container,f=a.getSize(),g=wt.retina?2:1;oe(u,a.min),u.width=g*f.x,u.height=g*f.y,u.style.width=f.x+"px",u.style.height=f.y+"px",wt.retina&&this._ctx.scale(2,2),this._ctx.translate(-a.min.x,-a.min.y),this.fire("update")}},_reset:function(){Gn.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(a){this._updateDashArray(a),this._layers[c(a)]=a;var u=a._order={layer:a,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=u),this._drawLast=u,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(a){this._requestRedraw(a)},_removePath:function(a){var u=a._order,f=u.next,g=u.prev;f?f.prev=g:this._drawLast=g,g?g.next=f:this._drawFirst=f,delete a._order,delete this._layers[c(a)],this._requestRedraw(a)},_updatePath:function(a){this._extendRedrawBounds(a),a._project(),a._update(),this._requestRedraw(a)},_updateStyle:function(a){this._updateDashArray(a),this._requestRedraw(a)},_updateDashArray:function(a){if(typeof a.options.dashArray=="string"){var u=a.options.dashArray.split(/[, ]+/),f=[],g,S;for(S=0;S')}}catch{}return function(a){return document.createElement("<"+a+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),zx={_initContainer:function(){this._container=Yt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Gn.prototype._update.call(this),this.fire("update"))},_initPath:function(a){var u=a._container=Mo("shape");Dt(u,"leaflet-vml-shape "+(this.options.className||"")),u.coordsize="1 1",a._path=Mo("path"),u.appendChild(a._path),this._updateStyle(a),this._layers[c(a)]=a},_addPath:function(a){var u=a._container;this._container.appendChild(u),a.options.interactive&&a.addInteractiveTarget(u)},_removePath:function(a){var u=a._container;Jt(u),a.removeInteractiveTarget(u),delete this._layers[c(a)]},_updateStyle:function(a){var u=a._stroke,f=a._fill,g=a.options,S=a._container;S.stroked=!!g.stroke,S.filled=!!g.fill,g.stroke?(u||(u=a._stroke=Mo("stroke")),S.appendChild(u),u.weight=g.weight+"px",u.color=g.color,u.opacity=g.opacity,g.dashArray?u.dashStyle=E(g.dashArray)?g.dashArray.join(" "):g.dashArray.replace(/( *, *)/g," "):u.dashStyle="",u.endcap=g.lineCap.replace("butt","flat"),u.joinstyle=g.lineJoin):u&&(S.removeChild(u),a._stroke=null),g.fill?(f||(f=a._fill=Mo("fill")),S.appendChild(f),f.color=g.fillColor||g.color,f.opacity=g.fillOpacity):f&&(S.removeChild(f),a._fill=null)},_updateCircle:function(a){var u=a._point.round(),f=Math.round(a._radius),g=Math.round(a._radiusY||f);this._setPath(a,a._empty()?"M0 0":"AL "+u.x+","+u.y+" "+f+","+g+" 0,"+65535*360)},_setPath:function(a,u){a._path.v=u},_bringToFront:function(a){yi(a._container)},_bringToBack:function(a){_i(a._container)}},Us=wt.vml?Mo:It,Ao=Gn.extend({_initContainer:function(){this._container=Us("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Us("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Jt(this._container),Kt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Gn.prototype._update.call(this);var a=this._bounds,u=a.getSize(),f=this._container;(!this._svgSize||!this._svgSize.equals(u))&&(this._svgSize=u,f.setAttribute("width",u.x),f.setAttribute("height",u.y)),oe(f,a.min),f.setAttribute("viewBox",[a.min.x,a.min.y,u.x,u.y].join(" ")),this.fire("update")}},_initPath:function(a){var u=a._path=Us("path");a.options.className&&Dt(u,a.options.className),a.options.interactive&&Dt(u,"leaflet-interactive"),this._updateStyle(a),this._layers[c(a)]=a},_addPath:function(a){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(a._path),a.addInteractiveTarget(a._path)},_removePath:function(a){Jt(a._path),a.removeInteractiveTarget(a._path),delete this._layers[c(a)]},_updatePath:function(a){a._project(),a._update()},_updateStyle:function(a){var u=a._path,f=a.options;u&&(f.stroke?(u.setAttribute("stroke",f.color),u.setAttribute("stroke-opacity",f.opacity),u.setAttribute("stroke-width",f.weight),u.setAttribute("stroke-linecap",f.lineCap),u.setAttribute("stroke-linejoin",f.lineJoin),f.dashArray?u.setAttribute("stroke-dasharray",f.dashArray):u.removeAttribute("stroke-dasharray"),f.dashOffset?u.setAttribute("stroke-dashoffset",f.dashOffset):u.removeAttribute("stroke-dashoffset")):u.setAttribute("stroke","none"),f.fill?(u.setAttribute("fill",f.fillColor||f.color),u.setAttribute("fill-opacity",f.fillOpacity),u.setAttribute("fill-rule",f.fillRule||"evenodd")):u.setAttribute("fill","none"))},_updatePoly:function(a,u){this._setPath(a,ft(a._parts,u))},_updateCircle:function(a){var u=a._point,f=Math.max(Math.round(a._radius),1),g=Math.max(Math.round(a._radiusY),1)||f,S="a"+f+","+g+" 0 1,0 ",C=a._empty()?"M0 0":"M"+(u.x-f)+","+u.y+S+f*2+",0 "+S+-f*2+",0 ";this._setPath(a,C)},_setPath:function(a,u){a._path.setAttribute("d",u)},_bringToFront:function(a){yi(a._path)},_bringToBack:function(a){_i(a._path)}});wt.vml&&Ao.include(zx);function Lf(a){return wt.svg||wt.vml?new Ao(a):null}Ut.include({getRenderer:function(a){var u=a.options.renderer||this._getPaneRenderer(a.options.pane)||this.options.renderer||this._renderer;return u||(u=this._renderer=this._createRenderer()),this.hasLayer(u)||this.addLayer(u),u},_getPaneRenderer:function(a){if(a==="overlayPane"||a===void 0)return!1;var u=this._paneRenderers[a];return u===void 0&&(u=this._createRenderer({pane:a}),this._paneRenderers[a]=u),u},_createRenderer:function(a){return this.options.preferCanvas&&Pf(a)||Lf(a)}});var Mf=wi.extend({initialize:function(a,u){wi.prototype.initialize.call(this,this._boundsToLatLngs(a),u)},setBounds:function(a){return this.setLatLngs(this._boundsToLatLngs(a))},_boundsToLatLngs:function(a){return a=Q(a),[a.getSouthWest(),a.getNorthWest(),a.getNorthEast(),a.getSouthEast()]}});function Ux(a,u){return new Mf(a,u)}Ao.create=Us,Ao.pointsToPath=ft,Zn.geometryToLayer=Ns,Zn.coordsToLatLng=mc,Zn.coordsToLatLngs=Ds,Zn.latLngToCoords=gc,Zn.latLngsToCoords=Is,Zn.getFeature=Si,Zn.asFeature=Fs,Ut.mergeOptions({boxZoom:!0});var Af=Ln.extend({initialize:function(a){this._map=a,this._container=a._container,this._pane=a._panes.overlayPane,this._resetStateTimeout=0,a.on("unload",this._destroy,this)},addHooks:function(){Rt(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Kt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Jt(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(a){if(!a.shiftKey||a.which!==1&&a.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),So(),Ql(),this._startPoint=this._map.mouseEventToContainerPoint(a),Rt(document,{contextmenu:Vr,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(a){this._moved||(this._moved=!0,this._box=Yt("div","leaflet-zoom-box",this._container),Dt(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(a);var u=new H(this._point,this._startPoint),f=u.getSize();oe(this._box,u.min),this._box.style.width=f.x+"px",this._box.style.height=f.y+"px"},_finish:function(){this._moved&&(Jt(this._box),ne(this._container,"leaflet-crosshair")),To(),Jl(),Kt(document,{contextmenu:Vr,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(a){if(!(a.which!==1&&a.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(s(this._resetState,this),0);var u=new W(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(u).fire("boxzoomend",{boxZoomBounds:u})}},_onKeyDown:function(a){a.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});Ut.addInitHook("addHandler","boxZoom",Af),Ut.mergeOptions({doubleClickZoom:!0});var Rf=Ln.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(a){var u=this._map,f=u.getZoom(),g=u.options.zoomDelta,S=a.originalEvent.shiftKey?f-g:f+g;u.options.doubleClickZoom==="center"?u.setZoom(S):u.setZoomAround(a.containerPoint,S)}});Ut.addInitHook("addHandler","doubleClickZoom",Rf),Ut.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var jf=Ln.extend({addHooks:function(){if(!this._draggable){var a=this._map;this._draggable=new yr(a._mapPane,a._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),a.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),a.on("zoomend",this._onZoomEnd,this),a.whenReady(this._onZoomEnd,this))}Dt(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){ne(this._map._container,"leaflet-grab"),ne(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 a=this._map;if(a._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var u=Q(this._map.options.maxBounds);this._offsetLimit=it(this._map.latLngToContainerPoint(u.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(u.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;a.fire("movestart").fire("dragstart"),a.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(a){if(this._map.options.inertia){var u=this._lastTime=+new Date,f=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(f),this._times.push(u),this._prunePositions(u)}this._map.fire("move",a).fire("drag",a)},_prunePositions:function(a){for(;this._positions.length>1&&a-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var a=this._map.getSize().divideBy(2),u=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=u.subtract(a).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(a,u){return a-(a-u)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var a=this._draggable._newPos.subtract(this._draggable._startPos),u=this._offsetLimit;a.xu.max.x&&(a.x=this._viscousLimit(a.x,u.max.x)),a.y>u.max.y&&(a.y=this._viscousLimit(a.y,u.max.y)),this._draggable._newPos=this._draggable._startPos.add(a)}},_onPreDragWrap:function(){var a=this._worldWidth,u=Math.round(a/2),f=this._initialWorldOffset,g=this._draggable._newPos.x,S=(g-u+f)%a+u-f,C=(g+u+f)%a-u-f,D=Math.abs(S+f)0?C:-C))-u;this._delta=0,this._startTime=null,D&&(a.options.scrollWheelZoom==="center"?a.setZoom(u+D):a.setZoomAround(this._lastMousePos,u+D))}});Ut.addInitHook("addHandler","scrollWheelZoom",Df);var Vx=600;Ut.mergeOptions({tapHold:wt.touchNative&&wt.safari&&wt.mobile,tapTolerance:15});var If=Ln.extend({addHooks:function(){Rt(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Kt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(a){if(clearTimeout(this._holdTimeout),a.touches.length===1){var u=a.touches[0];this._startPos=this._newPos=new G(u.clientX,u.clientY),this._holdTimeout=setTimeout(s(function(){this._cancel(),this._isTapValid()&&(Rt(document,"touchend",me),Rt(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",u))},this),Vx),Rt(document,"touchend touchcancel contextmenu",this._cancel,this),Rt(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function a(){Kt(document,"touchend",me),Kt(document,"touchend touchcancel",a)},_cancel:function(){clearTimeout(this._holdTimeout),Kt(document,"touchend touchcancel contextmenu",this._cancel,this),Kt(document,"touchmove",this._onMove,this)},_onMove:function(a){var u=a.touches[0];this._newPos=new G(u.clientX,u.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(a,u){var f=new MouseEvent(a,{bubbles:!0,cancelable:!0,view:window,screenX:u.screenX,screenY:u.screenY,clientX:u.clientX,clientY:u.clientY});f._simulated=!0,u.target.dispatchEvent(f)}});Ut.addInitHook("addHandler","tapHold",If),Ut.mergeOptions({touchZoom:wt.touch,bounceAtZoomLimits:!0});var Ff=Ln.extend({addHooks:function(){Dt(this._map._container,"leaflet-touch-zoom"),Rt(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){ne(this._map._container,"leaflet-touch-zoom"),Kt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(a){var u=this._map;if(!(!a.touches||a.touches.length!==2||u._animatingZoom||this._zooming)){var f=u.mouseEventToContainerPoint(a.touches[0]),g=u.mouseEventToContainerPoint(a.touches[1]);this._centerPoint=u.getSize()._divideBy(2),this._startLatLng=u.containerPointToLatLng(this._centerPoint),u.options.touchZoom!=="center"&&(this._pinchStartLatLng=u.containerPointToLatLng(f.add(g)._divideBy(2))),this._startDist=f.distanceTo(g),this._startZoom=u.getZoom(),this._moved=!1,this._zooming=!0,u._stop(),Rt(document,"touchmove",this._onTouchMove,this),Rt(document,"touchend touchcancel",this._onTouchEnd,this),me(a)}},_onTouchMove:function(a){if(!(!a.touches||a.touches.length!==2||!this._zooming)){var u=this._map,f=u.mouseEventToContainerPoint(a.touches[0]),g=u.mouseEventToContainerPoint(a.touches[1]),S=f.distanceTo(g)/this._startDist;if(this._zoom=u.getScaleZoom(S,this._startZoom),!u.options.bounceAtZoomLimits&&(this._zoomu.getMaxZoom()&&S>1)&&(this._zoom=u._limitZoom(this._zoom)),u.options.touchZoom==="center"){if(this._center=this._startLatLng,S===1)return}else{var C=f._add(g)._divideBy(2)._subtract(this._centerPoint);if(S===1&&C.x===0&&C.y===0)return;this._center=u.unproject(u.project(this._pinchStartLatLng,this._zoom).subtract(C),this._zoom)}this._moved||(u._moveStart(!0,!1),this._moved=!0),Y(this._animRequest);var D=s(u._move,u,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=V(D,this,!0),me(a)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,Y(this._animRequest),Kt(document,"touchmove",this._onTouchMove,this),Kt(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))}});Ut.addInitHook("addHandler","touchZoom",Ff),Ut.BoxZoom=Af,Ut.DoubleClickZoom=Rf,Ut.Drag=jf,Ut.Keyboard=Nf,Ut.ScrollWheelZoom=Df,Ut.TapHold=If,Ut.TouchZoom=Ff,n.Bounds=H,n.Browser=wt,n.CRS=mt,n.Canvas=kf,n.Circle=pc,n.CircleMarker=js,n.Class=K,n.Control=cn,n.DivIcon=Ef,n.DivOverlay=Mn,n.DomEvent=ax,n.DomUtil=ox,n.Draggable=yr,n.Evented=ct,n.FeatureGroup=Wn,n.GeoJSON=Zn,n.GridLayer=Lo,n.Handler=Ln,n.Icon=xi,n.ImageOverlay=Bs,n.LatLng=tt,n.LatLngBounds=W,n.Layer=un,n.LayerGroup=bi,n.LineUtil=bx,n.Map=Ut,n.Marker=Rs,n.Mixin=px,n.Path=_r,n.Point=G,n.PolyUtil=mx,n.Polygon=wi,n.Polyline=Yn,n.Popup=$s,n.PosAnimation=af,n.Projection=xx,n.Rectangle=Mf,n.Renderer=Gn,n.SVG=Ao,n.SVGOverlay=Tf,n.TileLayer=Ti,n.Tooltip=zs,n.Transformation=at,n.Util=nt,n.VideoOverlay=Sf,n.bind=s,n.bounds=it,n.canvas=Pf,n.circle=Px,n.circleMarker=kx,n.control=Co,n.divIcon=Fx,n.extend=i,n.featureGroup=Ex,n.geoJSON=wf,n.geoJson=Ax,n.gridLayer=Bx,n.icon=Ox,n.imageOverlay=Rx,n.latLng=rt,n.latLngBounds=Q,n.layerGroup=Tx,n.map=lx,n.marker=Cx,n.point=I,n.polygon=Mx,n.polyline=Lx,n.popup=Dx,n.rectangle=Ux,n.setOptions=_,n.stamp=c,n.svg=Lf,n.svgOverlay=Nx,n.tileLayer=Of,n.tooltip=Ix,n.transformation=st,n.version=r,n.videoOverlay=jx;var Hx=window.L;n.noConflict=function(){return window.L=Hx,this},window.L=n})})(DO,DO.exports);var H1=DO.exports;function jL(t,e,n){return Object.freeze({instance:t,context:e,container:n})}function NL(t,e){return e==null?function(n,r){const i=U.useRef();return i.current||(i.current=t(n,r)),i}:function(n,r){const i=U.useRef();i.current||(i.current=t(n,r));const o=U.useRef(n),{instance:s}=i.current;return U.useEffect(function(){o.current!==n&&(e(s,n,o.current),o.current=n)},[s,n,r]),i}}function DCt(t,e){U.useEffect(function(){return(e.layerContainer??e.map).addLayer(t.instance),function(){var n;(n=e.layerContainer)==null||n.removeLayer(t.instance),e.map.removeLayer(t.instance)}},[e,t])}function O9(t){return function(e){const n=T9(),r=t(RL(e,n),n);return x9(n.map,e.attribution),E9(r.current,e.eventHandlers),DCt(r.current,n),r}}function ICt(t,e){const n=NL(t,e),r=O9(n);return ACt(r)}function FCt(t,e){const n=NL(t),r=NCt(n,e);return RCt(r)}function BCt(t,e){const n=NL(t,e),r=O9(n);return jCt(r)}function $Ct(t,e,n){const{opacity:r,zIndex:i}=e;r!=null&&r!==n.opacity&&t.setOpacity(r),i!=null&&i!==n.zIndex&&t.setZIndex(i)}function IO(){return IO=Object.assign||function(t){for(var e=1;e(v==null?void 0:v.map)??null,[v]);const _=U.useCallback(x=>{if(x!==null&&v===null){const w=new H1.Map(x,d);n!=null&&h!=null?w.setView(n,h):t!=null&&w.fitBounds(t,e),c!=null&&w.whenReady(c),y(LCt(w))}},[]);U.useEffect(()=>()=>{v==null||v.map.remove()},[v]);const T=v?q.createElement(S9,{value:v},r):s??null;return q.createElement("div",IO({},m,{ref:_}),T)}const UCt=U.forwardRef(zCt),VCt=ICt(function({position:t,...e},n){const r=new H1.Marker(t,e);return jL(r,MCt(n,{overlayContainer:r}))},function(t,e,n){e.position!==n.position&&t.setLatLng(e.position),e.icon!=null&&e.icon!==n.icon&&t.setIcon(e.icon),e.zIndexOffset!=null&&e.zIndexOffset!==n.zIndexOffset&&t.setZIndexOffset(e.zIndexOffset),e.opacity!=null&&e.opacity!==n.opacity&&t.setOpacity(e.opacity),t.dragging!=null&&e.draggable!==n.draggable&&(e.draggable===!0?t.dragging.enable():t.dragging.disable())}),HCt=FCt(function(t,e){const n=new H1.Popup(t,e.overlayContainer);return jL(n,e)},function(t,e,{position:n},r){U.useEffect(function(){const{instance:i}=t;function o(l){l.popup===i&&(i.update(),r(!0))}function s(l){l.popup===i&&r(!1)}return e.map.on({popupopen:o,popupclose:s}),e.overlayContainer==null?(n!=null&&i.setLatLng(n),i.openOn(e.map)):e.overlayContainer.bindPopup(i),function(){var l;e.map.off({popupopen:o,popupclose:s}),(l=e.overlayContainer)==null||l.unbindPopup(),e.map.removeLayer(i)}},[t,e,r,n])}),WCt=BCt(function({url:t,...e},n){const r=new H1.TileLayer(t,RL(e,n));return jL(r,n)},function(t,e,n){$Ct(t,e,n);const{url:r}=e;r!=null&&r!==n.url&&t.setUrl(r)}),YCt=()=>b.jsx(WCt,{attribution:'© OpenStreetMap contributors',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),ZCt=t=>{if(t.length===0)return{};if(t.length>1)return{bounds:t.map(Se("latLong"))};const[{latLong:e}]=t;return{zoom:10,center:e}},C9=({toggle:t,isOpen:e,title:n,locations:r=[]})=>b.jsx(Ca,{toggle:t,isOpen:e,className:"map-modal__modal",contentClassName:"map-modal__modal-content",children:b.jsxs(Ss,{className:"map-modal__modal-body",children:[b.jsxs("h3",{className:"map-modal__modal-title",children:[n,b.jsx("button",{type:"button",className:"btn-close float-end","aria-label":"Close",onClick:t})]}),b.jsxs(UCt,{...ZCt(r),children:[b.jsx(YCt,{}),r.map(({cityName:i,latLong:o,count:s},l)=>b.jsx(VCt,{position:o,children:b.jsxs(HCt,{children:[b.jsx("b",{children:s})," visit",s>1?"s":""," from ",b.jsx("b",{children:i})]})},l))]})]})}),GCt=({modalTitle:t,activeCities:e,locations:n=[]})=>{const[r,,i,o]=zn(),[s,l,c]=zn(),[h,d]=U.useState([]),p=_1(),m=_=>e?_.filter(({cityName:T})=>e==null?void 0:e.includes(T)):_,v=()=>{if(!e){d(n),i();return}c()},y=_=>()=>{d(_?m(n):n),i()};return b.jsxs(b.Fragment,{children:[b.jsx(ke,{color:"link",className:"open-map-modal-btn__btn",id:p,onClick:v,children:b.jsx(zt,{icon:Z8})}),b.jsx(fi,{placement:"left",target:p,children:"Show in map"}),b.jsx($g,{isOpen:s,toggle:l,inNavbar:!0,children:b.jsxs(Nd,{end:!0,children:[b.jsx(Zt,{onClick:y(!1),children:"Show all locations"}),b.jsx(Zt,{onClick:y(!0),children:"Show locations in current page"})]})}),b.jsx(C9,{toggle:o,isOpen:r,title:t,locations:h})]})},qCt=({onChange:t,selected:e={},className:n,isOrphanVisits:r})=>{const{orphanVisitsType:i,excludeBots:o=!1}=e,s=l=>({active:i===l,onClick:()=>t({...e,orphanVisitsType:l===(e==null?void 0:e.orphanVisitsType)?void 0:l})});return b.jsxs(Pa,{text:"Filters",dropdownClassName:n,inline:!0,end:!0,minWidth:250,children:[b.jsx(Zt,{header:!0,children:"Bots:"}),b.jsx(Zt,{active:o,onClick:()=>t({...e,excludeBots:!(e!=null&&e.excludeBots)}),children:"Exclude potential bots"}),r&&b.jsxs(b.Fragment,{children:[b.jsx(Zt,{divider:!0}),b.jsx(Zt,{header:!0,children:"Orphan visits type:"}),b.jsx(Zt,{...s("base_url"),children:"Base URL"}),b.jsx(Zt,{...s("invalid_short_url"),children:"Invalid short URL"}),b.jsx(Zt,{...s("regular_404"),children:"Regular 404"})]}),b.jsx(Zt,{divider:!0}),b.jsx(Zt,{disabled:!ss(e),onClick:()=>t({excludeBots:!1,orphanVisitsType:void 0}),children:b.jsx("i",{children:"Clear filters"})})]})},k9=(t,e)=>!Fu(t)&&ss(t[e]),d4=t=>typeof t=="number"?t:t?parseFloat(t):0,KCt=(t,{os:e})=>{t[e]=(t[e]||0)+1},XCt=(t,{browser:e})=>{t[e]=(t[e]||0)+1},QCt=(t,{referer:e})=>{t[e]=(t[e]||0)+1},P9=t=>(e,n)=>{const r=k9(n,t)?n[t]:"Unknown";e[r]=(e[r]||0)+1},JCt=P9("country"),tkt=P9("city"),ekt=(t,e)=>{if(!k9(e,"city")||e.city==="Unknown")return;const{city:n,latitude:r,longitude:i}=e,o=t[n]||{cityName:n,count:0,latLong:[d4(r),d4(i)]};o.count+=1,t[n]=o},nkt=(t,e)=>{if(!ySt(e))return;const{visitedUrl:n}=e;t[n]=(t[n]||0)+1},L9=t=>t.reduce((e,n)=>(KCt(e.os,n),XCt(e.browsers,n),QCt(e.referrers,n),JCt(e.countries,n),tkt(e.cities,n),ekt(e.citiesForMap,n),nkt(e.visitedUrls,n),e),{os:{},browsers:{},referrers:{},countries:{},cities:{},citiesForMap:{},visitedUrls:{}}),M9=Sz(t=>{const{userAgent:e,date:n,referer:r,visitLocation:i,potentialBot:o}=t,s={date:n,potentialBot:o,...cCt(e),referer:uCt(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 vL(t)?{...s,type:t.type,visitedUrl:t.visitedUrl}:s}),rkt=Object.freeze(Object.defineProperty({__proto__:null,normalizeVisits:M9,processStatsFromVisits:L9},Symbol.toStringTag,{value:"Module"})),jp=20,ikt=({browser:t,os:e,referer:n,country:r,city:i,...o},s)=>`${t} ${e} ${n} ${r} ${i} ${o.visitedUrl}`.toLowerCase().includes(s.toLowerCase()),okt=(t,e)=>e.filter(n=>ikt(n,t)),skt=(t,e)=>k$(e,t),akt=(t,e,n)=>{const r=e?okt(e,t):[...t],i=skt(n,r),o=i.length;return{visitsGroups:sg(jp,i),total:o}},lkt=({visits:t,selectedVisits:e=[],setSelectedVisits:n,matchMedia:r=window.matchMedia,isOrphanVisits:i=!1})=>{var o,s;const l="visits-table__header-cell visits-table__sticky",c=()=>r("(max-width: 767px)").matches,[h,d]=U.useState(c()),[p,m]=U.useState(void 0),[v,y]=U.useState({}),_=U.useMemo(()=>akt(t,p,v),[p,v]),T=U.useRef(!0),[x,w]=U.useState(1),E=x*jp,O=E-jp,k=8+Number(i),P=j=>()=>y({field:j,dir:x1(j,v.field,v.dir)}),A=j=>b.jsx(hm,{currentOrder:v,field:j,className:"visits-table__header-icon"});return U.useEffect(()=>{const j=()=>d(c());return window.addEventListener("resize",j),()=>window.removeEventListener("resize",j)},[]),U.useEffect(()=>{w(1),!T.current&&n([]),T.current=!1},[p]),b.jsx("div",{className:"table-responsive-md",children:b.jsxs("table",{className:"table table-bordered table-hover table-sm visits-table",children:[b.jsxs("thead",{className:"visits-table__header",children:[b.jsxs("tr",{children:[b.jsx("th",{className:`${l} text-center`,onClick:()=>n(e.length<_.total?_.visitsGroups.flat():[]),children:b.jsx(zt,{icon:Hm,className:de({"text-primary":e.length>0})})}),b.jsxs("th",{className:`${l} text-center`,onClick:P("potentialBot"),children:[b.jsx(zt,{icon:ej}),A("potentialBot")]}),b.jsxs("th",{className:l,onClick:P("date"),children:["Date",A("date")]}),b.jsxs("th",{className:l,onClick:P("country"),children:["Country",A("country")]}),b.jsxs("th",{className:l,onClick:P("city"),children:["City",A("city")]}),b.jsxs("th",{className:l,onClick:P("browser"),children:["Browser",A("browser")]}),b.jsxs("th",{className:l,onClick:P("os"),children:["OS",A("os")]}),b.jsxs("th",{className:l,onClick:P("referer"),children:["Referrer",A("referer")]}),i&&b.jsxs("th",{className:l,onClick:P("visitedUrl"),children:["Visited URL",A("visitedUrl")]})]}),b.jsx("tr",{children:b.jsx("td",{colSpan:k,className:"p-0",children:b.jsx(Wg,{noBorder:!0,large:!1,onChange:m})})})]}),b.jsxs("tbody",{children:[!((o=_.visitsGroups[x-1])!=null&&o.length)&&b.jsx("tr",{children:b.jsx("td",{colSpan:k,className:"text-center",children:"No visits found with current filtering"})}),(s=_.visitsGroups[x-1])==null?void 0:s.map((j,B)=>{const N=e.includes(j);return b.jsxs("tr",{style:{cursor:"pointer"},className:de({"table-active":N}),onClick:()=>n(N?e.filter(V=>V!==j):[...e,j]),children:[b.jsx("td",{className:"text-center",children:N&&b.jsx(zt,{icon:Hm,className:"text-primary"})}),b.jsx("td",{className:"text-center",children:j.potentialBot&&b.jsxs(b.Fragment,{children:[b.jsx(zt,{icon:ej,id:`botIcon${B}`}),b.jsx(fi,{placement:"right",target:`botIcon${B}`,children:"Potentially a visit from a bot or crawler"})]})}),b.jsx("td",{children:b.jsx(ib,{date:j.date})}),b.jsx("td",{children:j.country}),b.jsx("td",{children:j.city}),b.jsx("td",{children:j.browser}),b.jsx("td",{children:j.os}),b.jsx("td",{children:j.referer}),i&&b.jsx("td",{children:j.visitedUrl})]},B)})]}),_.total>jp&&b.jsx("tfoot",{children:b.jsx("tr",{children:b.jsx("td",{colSpan:k,className:"visits-table__footer-cell visits-table__sticky",children:b.jsxs("div",{className:"row",children:[b.jsx("div",{className:"col-md-6",children:b.jsx(hL,{pagesCount:Math.ceil(_.total/jp),currentPage:x,setCurrentPage:w,centered:h})}),b.jsx("div",{className:de("col-md-6",{"d-flex align-items-center flex-row-reverse":!h,"text-center mt-3":h}),children:b.jsxs("div",{children:["Visits ",b.jsx("b",{children:Qn(O+1)})," to"," ",b.jsx("b",{children:Qn(Az(E,_.total))})," of"," ",b.jsx("b",{children:Qn(_.total)})]})})]})})})})]})})},sh={byTime:{title:"By time",subPath:"by-time",icon:Ktt},byContext:{title:"By context",subPath:"by-context",icon:Sk},byLocation:{title:"By location",subPath:"by-location",icon:Z8},list:{title:"List",subPath:"list",icon:Y8}};let My;const hv=({children:t,visitsInfo:e,getVisits:n,cancelGetVisits:r,exportCsv:i,isOrphanVisits:o=!1})=>{const{visits:s,loading:l,loadingLarge:c,error:h,errorData:d,progress:p,fallbackInterval:m}=e,[{dateRange:v,visitsFilter:y},_]=kCt(),T=zu("visits"),x=cr(({startDate:W,endDate:Q})=>({dateRange:{startDate:W??void 0,endDate:Q??void 0}}),_),w=U.useRef(v??m??(T==null?void 0:T.defaultInterval)??"last30Days"),[E,O]=U.useState([]),[k,P]=U.useState(),A=U.useRef(!0),{search:j}=Un(),B=W=>W?`${W}${j}`:j,N=U.useMemo(()=>M9(s),[s]),{os:V,browsers:Y,referrers:nt,countries:K,cities:J,citiesForMap:et,visitedUrls:ct}=U.useMemo(()=>L9(N),[N]),G=U.useMemo(()=>({...y,excludeBots:y.excludeBots??(T==null?void 0:T.excludeBots)}),[y]),$=TP(et),I=W=>{My=void 0,O(W)},H=W=>Q=>{const tt=`${W}_${Q}`;My===tt?(O([]),P(void 0),My=void 0):(O(N.filter(Ymt(W,Q))),P(Q),My=tt)};U.useEffect(()=>r,[]),U.useEffect(()=>{const W=A.current?v??g_t(w.current):v;n({dateRange:W,filter:G},A.current),A.current=!1},[v,y]),U.useEffect(()=>{m&&w.current===((T==null?void 0:T.defaultInterval)??"last30Days")&&(w.current=m)},[m]);const it=()=>c?b.jsxs(aa,{loading:!0,children:["This is going to take a while... :S",b.jsx(p$,{value:p,striped:p===100,className:"mt-3"})]}):l?b.jsx(aa,{loading:!0}):h?b.jsx(Ii,{type:"error",children:b.jsx(ya,{errorData:d,fallbackMessage:"An error occurred while loading visits :("})}):qi(s)?b.jsx(aa,{children:"There are no visits matching current filter"}):b.jsxs(b.Fragment,{children:[b.jsx(C$,{fill:!0,children:Object.values(sh).map(({title:W,icon:Q,subPath:tt},rt)=>b.jsxs(em,{to:B(tt),replace:!0,children:[b.jsx(zt,{icon:Q}),b.jsx("span",{className:"ms-2 d-none d-sm-inline",children:W})]},rt))}),b.jsx(qr,{children:b.jsxs(a1,{children:[b.jsx(Ce,{path:sh.byTime.subPath,element:b.jsx("div",{className:"col-12 mt-3",children:b.jsx(yCt,{title:"Visits during time",visits:N,highlightedVisits:E,highlightedLabel:k,setSelectedVisits:I})})}),b.jsx(Ce,{path:sh.byContext.subPath,element:b.jsxs(b.Fragment,{children:[b.jsx("div",{className:de("mt-3 col-lg-6",{"col-xl-4":!o}),children:b.jsx(o4,{title:"Operating systems",stats:V})}),b.jsx("div",{className:de("mt-3 col-lg-6",{"col-xl-4":!o}),children:b.jsx(o4,{title:"Browsers",stats:Y})}),b.jsx("div",{className:de("mt-3",{"col-xl-4":!o,"col-lg-6":o}),children:b.jsx(Ly,{title:"Referrers",stats:nt,withPagination:!1,highlightedStats:py(E,"referer"),highlightedLabel:k,sortingItems:{name:"Referrer name",amount:"Visits amount"},onClick:H("referer")})}),o&&b.jsx("div",{className:"mt-3 col-lg-6",children:b.jsx(Ly,{title:"Visited URLs",stats:ct,highlightedLabel:k,highlightedStats:py(E,"visitedUrl"),sortingItems:{visitedUrl:"Visited URL",amount:"Visits amount"},onClick:H("visitedUrl")})})]})}),b.jsx(Ce,{path:sh.byLocation.subPath,element:b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"col-lg-6 mt-3",children:b.jsx(Ly,{title:"Countries",stats:K,highlightedStats:py(E,"country"),highlightedLabel:k,sortingItems:{name:"Country name",amount:"Visits amount"},onClick:H("country")})}),b.jsx("div",{className:"col-lg-6 mt-3",children:b.jsx(Ly,{title:"Cities",stats:J,highlightedStats:py(E,"city"),highlightedLabel:k,extraHeaderContent:W=>$.length>0&&b.jsx(GCt,{modalTitle:"Cities",locations:$,activeCities:W}),sortingItems:{name:"City name",amount:"Visits amount"},onClick:H("city")})})]})}),b.jsx(Ce,{path:sh.list.subPath,element:b.jsx("div",{className:"col-12",children:b.jsx(lkt,{visits:N,selectedVisits:E,setSelectedVisits:I,isOrphanVisits:o})})}),b.jsx(Ce,{path:"*",element:b.jsx(dk,{replace:!0,to:B(sh.byTime.subPath)})})]})})]});return b.jsxs(b.Fragment,{children:[t,b.jsx("section",{className:"mt-3",children:b.jsxs("div",{className:"row flex-md-row-reverse",children:[b.jsx("div",{className:"col-lg-7 col-xl-6",children:b.jsxs("div",{className:"d-md-flex",children:[b.jsx("div",{className:"flex-fill",children:b.jsx(iU,{updatable:!0,disabled:l,initialDateRange:w.current,defaultText:"All visits",onDatesChange:x})}),b.jsx(qCt,{className:"ms-0 ms-md-2 mt-3 mt-md-0",isOrphanVisits:o,selected:G,onChange:W=>_({visitsFilter:W})})]})}),s.length>0&&b.jsx("div",{className:"col-lg-5 col-xl-6 mt-3 mt-lg-0",children:b.jsxs("div",{className:"d-flex",children:[b.jsx(C7,{className:"btn-md-block",amount:N.length,onClick:()=>i(N)}),b.jsxs(ke,{outline:!0,disabled:E.length===0,className:"btn-md-block ms-2",onClick:()=>I([]),children:["Clear selection ",E.length>0&&b.jsxs(b.Fragment,{children:["(",Qn(E.length),")"]})]})]})})]})}),b.jsx("section",{className:"mt-3",children:it()})]})},ckt=({exportVisits:t})=>zl(({getDomainVisits:e,domainVisits:n,cancelGetDomainVisits:r})=>{const i=$d(),{domain:o=""}=ju(),[s,l=s]=o.split("_");return b.jsx(hv,{getVisits:(c,h)=>e({domain:l,query:av(c),doIntervalFallback:h}),cancelGetVisits:r,visitsInfo:n,exportCsv:c=>t(`domain_${s}_visits.csv`,c),children:b.jsx(lv,{goBack:i,visits:n.visits,title:`"${s}" visits`})})},()=>[co.visits]),ukt=({exportVisits:t})=>zl(({getNonOrphanVisits:e,nonOrphanVisits:n,cancelGetNonOrphanVisits:r})=>{const i=$d();return b.jsx(hv,{getVisits:(o,s)=>e({query:av(o),doIntervalFallback:s}),cancelGetVisits:r,visitsInfo:n,exportCsv:o=>t("non_orphan_visits.csv",o),children:b.jsx(lv,{title:"Non-orphan visits",goBack:i,visits:n.visits})})},()=>[co.visits]),hkt=({exportVisits:t})=>zl(({getOrphanVisits:e,orphanVisits:n,cancelGetOrphanVisits:r})=>{const i=$d();return b.jsx(hv,{getVisits:(o,s)=>{var l;return e({query:av(o),orphanVisitsType:(l=o.filter)==null?void 0:l.orphanVisitsType,doIntervalFallback:s})},cancelGetVisits:r,visitsInfo:n,exportCsv:o=>t("orphan_visits.csv",o),isOrphanVisits:!0,children:b.jsx(lv,{title:"Orphan visits",goBack:i,visits:n.visits})})},()=>[co.orphanVisits]),A9="shlink/orphanVisits",dkt={visits:[],loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},fkt=t=>ev({typePrefix:`${A9}/getNonOrphanVisits`,createLoaders:({query:e={},doIntervalFallback:n=!1})=>{const{getNonOrphanVisits:r}=t(),i=async(s,l)=>r({...e,page:s,itemsPerPage:l}),o=nv(n,r);return[i,o]},getExtraFulfilledPayload:({query:e={}})=>({query:e}),shouldCancel:e=>e().orphanVisits.cancelLoad}),pkt=t=>rv({name:A9,initialState:dkt,asyncThunkCreator:t,filterCreatedVisits:({query:e={}},n)=>{const{startDate:r,endDate:i}=e;return n.filter(({visit:o})=>Qg(o.date,r,i))}}),R9="shlink/orphanVisits",mkt={visits:[],loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},gkt=(t,e)=>!e||e===t.type,vkt=t=>ev({typePrefix:`${R9}/getOrphanVisits`,createLoaders:({orphanVisitsType:e,query:n={},doIntervalFallback:r=!1})=>{const{getOrphanVisits:i}=t(),o=async(l,c)=>i({...n,page:l,itemsPerPage:c}).then(h=>{const d=h.data.filter(p=>vL(p)&&gkt(p,e));return{...h,data:d}}),s=nv(r,i);return[o,s]},getExtraFulfilledPayload:({query:e={}})=>({query:e}),shouldCancel:e=>e().orphanVisits.cancelLoad}),ykt=t=>rv({name:R9,initialState:mkt,asyncThunkCreator:t,filterCreatedVisits:({query:e={}},n)=>{const{startDate:r,endDate:i}=e;return n.filter(({visit:o,shortUrl:s})=>!s&&Qg(o.date,r,i))}}),j9="shlink/shortUrlVisits",_kt={visits:[],shortCode:"",domain:void 0,loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},bkt=t=>ev({typePrefix:`${j9}/getShortUrlVisits`,createLoaders:({shortCode:e,query:n={},doIntervalFallback:r=!1})=>{const{getShortUrlVisits:i}=t(),o=async(l,c)=>i(e,{...n,page:l,itemsPerPage:c}),s=nv(r,async l=>i(e,{...l,domain:n.domain}));return[o,s]},getExtraFulfilledPayload:({shortCode:e,query:n={}})=>({shortCode:e,query:n,domain:n.domain}),shouldCancel:e=>e().shortUrlVisits.cancelLoad}),xkt=t=>rv({name:j9,initialState:_kt,asyncThunkCreator:t,filterCreatedVisits:({shortCode:e,domain:n,query:r={}},i)=>{const{startDate:o,endDate:s}=r;return i.filter(({shortUrl:l,visit:c})=>l&&om(l,e,n)&&Qg(c.date,o,s))}}),N9="shlink/tagVisits",wkt={visits:[],tag:"",loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},Skt=t=>ev({typePrefix:`${N9}/getTagVisits`,createLoaders:({tag:e,query:n={},doIntervalFallback:r=!1})=>{const{getTagVisits:i}=t(),o=async(l,c)=>i(e,{...n,page:l,itemsPerPage:c}),s=nv(r,async l=>i(e,l));return[o,s]},getExtraFulfilledPayload:({tag:e,query:n={}})=>({tag:e,query:n}),shouldCancel:e=>e().tagVisits.cancelLoad}),Tkt=t=>rv({name:N9,initialState:wkt,asyncThunkCreator:t,filterCreatedVisits:({tag:e,query:n={}},r)=>{const{startDate:i,endDate:o}=n;return r.filter(({shortUrl:s,visit:l})=>(s==null?void 0:s.tags.includes(e))&&Qg(l.date,i,o))}}),D9="shlink/visitsOverview",Ay={nonOrphanVisits:{total:0},orphanVisits:{total:0},loading:!1,error:!1},f4=t=>t.filter(({visit:e})=>e.potentialBot).length,Ekt=t=>di(`${D9}/loadVisitsOverview`,()=>t().getVisitsOverview().then(({nonOrphanVisits:e,visitsCount:n,orphanVisits:r,orphanVisitsCount:i})=>({nonOrphanVisits:{total:(e==null?void 0:e.total)??n,nonBots:e==null?void 0:e.nonBots,bots:e==null?void 0:e.bots},orphanVisits:{total:(r==null?void 0:r.total)??i,nonBots:r==null?void 0:r.nonBots,bots:r==null?void 0:r.bots}}))),Okt=t=>Br({name:D9,initialState:Ay,reducers:{},extraReducers:e=>{e.addCase(t.pending,()=>({...Ay,loading:!0})),e.addCase(t.rejected,()=>({...Ay,error:!0})),e.addCase(t.fulfilled,(n,{payload:r})=>({...Ay,...r})),e.addCase(tv,({nonOrphanVisits:n,orphanVisits:r,...i},{payload:o})=>{const{nonOrphanVisits:s,orphanVisits:l}=_St(o.createdVisits),c=s.length,h=f4(s),d=c-h,p=l.length,m=f4(l),v=p-m;return{...i,nonOrphanVisits:{total:n.total+c,bots:n.bots&&n.bots+h,nonBots:n.nonBots&&n.nonBots+d},orphanVisits:{total:r.total+p,bots:r.bots&&r.bots+m,nonBots:r.nonBots&&r.nonBots+v}}})}}),Ckt=({shortUrlDetail:t,shortUrlVisits:e,goBack:n})=>{const{shortUrl:r,loading:i}=t,{visits:o}=e,s=(r==null?void 0:r.shortUrl)??"",l=(r==null?void 0:r.longUrl)??"",c=r==null?void 0:r.title;return b.jsxs(lv,{title:b.jsxs(b.Fragment,{children:["Visits for ",b.jsx(la,{href:s})]}),goBack:n,visits:o,shortUrl:r,children:[b.jsx("hr",{}),b.jsxs("div",{children:["Created: ",(()=>r?b.jsxs("span",{children:[b.jsx("b",{id:"created",className:"short-url-visits-header__created-at",children:b.jsx(ib,{date:r.dateCreated,relative:!0})}),b.jsx(fi,{placement:"bottom",target:"created",children:b.jsx(ib,{date:r.dateCreated})})]}):b.jsx("small",{children:"Loading..."}))()]}),b.jsxs("div",{className:"long-url-container",children:[`${c?"Title":"Long URL"}: `,i&&b.jsx("small",{children:"Loading..."}),!i&&b.jsx(la,{href:l,children:c??l})]})]})},kkt=({exportVisits:t})=>zl(({shortUrlVisits:e,shortUrlDetail:n,getShortUrlVisits:r,getShortUrlDetail:i,cancelGetShortUrlVisits:o})=>{const{shortCode:s=""}=ju(),{search:l}=Un(),c=$d(),{domain:h}=Du(l),d=(m,v)=>r({shortCode:h_(s),query:{...av(m),domain:h},doIntervalFallback:v}),p=m=>{var v;return t(`short-url_${(v=n.shortUrl)==null?void 0:v.shortUrl.replace(/https?:\/\//g,"")}_visits.csv`,m)};return U.useEffect(()=>{i({shortCode:h_(s),domain:h})},[]),b.jsx(hv,{getVisits:d,cancelGetVisits:o,visitsInfo:e,exportCsv:p,children:b.jsx(Ckt,{shortUrlDetail:n,shortUrlVisits:e,goBack:c})})},(e,n)=>n.shortCode?[co.shortUrlVisits(h_(n.shortCode))]:[]),Pkt=({tagVisits:t,goBack:e,colorGenerator:n})=>{const{visits:r,tag:i}=t;return b.jsx(lv,{title:b.jsxs("span",{className:"d-flex align-items-center justify-content-center",children:[b.jsx("span",{className:"me-2",children:"Visits for"}),b.jsx(KP,{text:i,colorGenerator:n})]}),goBack:e,visits:r})},Lkt=(t,{exportVisits:e})=>zl(({getTagVisits:n,tagVisits:r,cancelGetTagVisits:i})=>{const o=$d(),{tag:s=""}=ju();return b.jsx(hv,{getVisits:(l,c)=>n({tag:s,query:av(l),doIntervalFallback:c}),cancelGetVisits:i,visitsInfo:r,exportCsv:l=>e(`tag_${s}_visits.csv`,l),children:b.jsx(Pkt,{tagVisits:r,goBack:o,colorGenerator:t})})},()=>[co.visits]),Mkt=(t,e)=>{t.serviceFactory("MapModal",()=>C9),t.serviceFactory("ShortUrlVisits",kkt,"ReportExporter"),t.decorator("ShortUrlVisits",e(["shortUrlVisits","shortUrlDetail","mercureInfo"],["getShortUrlVisits","getShortUrlDetail","cancelGetShortUrlVisits","createNewVisits","loadMercureInfo"])),t.serviceFactory("TagVisits",Lkt,"ColorGenerator","ReportExporter"),t.decorator("TagVisits",e(["tagVisits","mercureInfo"],["getTagVisits","cancelGetTagVisits","createNewVisits","loadMercureInfo"])),t.serviceFactory("DomainVisits",ckt,"ReportExporter"),t.decorator("DomainVisits",e(["domainVisits","mercureInfo"],["getDomainVisits","cancelGetDomainVisits","createNewVisits","loadMercureInfo"])),t.serviceFactory("OrphanVisits",hkt,"ReportExporter"),t.decorator("OrphanVisits",e(["orphanVisits","mercureInfo"],["getOrphanVisits","cancelGetOrphanVisits","createNewVisits","loadMercureInfo"])),t.serviceFactory("NonOrphanVisits",ukt,"ReportExporter"),t.decorator("NonOrphanVisits",e(["nonOrphanVisits","mercureInfo"],["getNonOrphanVisits","cancelGetNonOrphanVisits","createNewVisits","loadMercureInfo"])),t.serviceFactory("VisitsParser",()=>rkt),t.serviceFactory("getShortUrlVisits",bkt,"apiClientFactory"),t.serviceFactory("cancelGetShortUrlVisits",Se("cancelGetVisits"),"shortUrlVisitsReducerCreator"),t.serviceFactory("getTagVisits",Skt,"apiClientFactory"),t.serviceFactory("cancelGetTagVisits",Se("cancelGetVisits"),"tagVisitsReducerCreator"),t.serviceFactory("getDomainVisits",b_t,"apiClientFactory"),t.serviceFactory("cancelGetDomainVisits",Se("cancelGetVisits"),"domainVisitsReducerCreator"),t.serviceFactory("getOrphanVisits",vkt,"apiClientFactory"),t.serviceFactory("cancelGetOrphanVisits",Se("cancelGetVisits"),"orphanVisitsReducerCreator"),t.serviceFactory("getNonOrphanVisits",fkt,"apiClientFactory"),t.serviceFactory("cancelGetNonOrphanVisits",Se("cancelGetVisits"),"nonOrphanVisitsReducerCreator"),t.serviceFactory("createNewVisits",()=>tv),t.serviceFactory("loadVisitsOverview",Ekt,"apiClientFactory"),t.serviceFactory("visitsOverviewReducerCreator",Okt,"loadVisitsOverview"),t.serviceFactory("visitsOverviewReducer",Se("reducer"),"visitsOverviewReducerCreator"),t.serviceFactory("domainVisitsReducerCreator",x_t,"getDomainVisits"),t.serviceFactory("domainVisitsReducer",Se("reducer"),"domainVisitsReducerCreator"),t.serviceFactory("nonOrphanVisitsReducerCreator",pkt,"getNonOrphanVisits"),t.serviceFactory("nonOrphanVisitsReducer",Se("reducer"),"nonOrphanVisitsReducerCreator"),t.serviceFactory("orphanVisitsReducerCreator",ykt,"getOrphanVisits"),t.serviceFactory("orphanVisitsReducer",Se("reducer"),"orphanVisitsReducerCreator"),t.serviceFactory("shortUrlVisitsReducerCreator",xkt,"getShortUrlVisits"),t.serviceFactory("shortUrlVisitsReducer",Se("reducer"),"shortUrlVisitsReducerCreator"),t.serviceFactory("tagVisitsReducerCreator",Tkt,"getTagVisits"),t.serviceFactory("tagVisitsReducer",Se("reducer"),"tagVisitsReducerCreator")},pp=({children:t,to:e,className:n,...r})=>b.jsx(S8,{className:({isActive:i})=>de("aside-menu__item",n,{"aside-menu__item--selected":i}),to:e,...r,children:t}),Akt=({routePrefix:t,showOnMobile:e=!1})=>{const{pathname:n}=Un(),r=de("aside-menu",{"aside-menu--hidden":!e}),i=o=>`${t}${o}`;return b.jsx("aside",{className:r,children:b.jsxs("nav",{className:"nav flex-column aside-menu__nav",children:[b.jsxs(pp,{to:i("/overview"),children:[b.jsx(zt,{fixedWidth:!0,icon:ket}),b.jsx("span",{className:"aside-menu__item-text",children:"Overview"})]}),b.jsxs(pp,{to:i("/list-short-urls/1"),className:de({"aside-menu__item--selected":n.match("/list-short-urls")!==null}),children:[b.jsx(zt,{fixedWidth:!0,icon:Y8}),b.jsx("span",{className:"aside-menu__item-text",children:"List short URLs"})]}),b.jsxs(pp,{to:i("/create-short-url"),children:[b.jsx(zt,{fixedWidth:!0,icon:Ret,flip:"horizontal"}),b.jsx("span",{className:"aside-menu__item-text",children:"Create short URL"})]}),b.jsxs(pp,{to:i("/manage-tags"),children:[b.jsx(zt,{fixedWidth:!0,icon:G8}),b.jsx("span",{className:"aside-menu__item-text",children:"Manage tags"})]}),b.jsxs(pp,{to:i("/manage-domains"),children:[b.jsx(zt,{fixedWidth:!0,icon:set}),b.jsx("span",{className:"aside-menu__item-text",children:"Manage domains"})]})]})})},Rkt=(t,e,n,r,i,o,s,l,c,h,d)=>({createNotFound:p})=>{const m=Un(),v=Bu(),y=Ru(),[_,T]=U.useMemo(()=>y?[U.Fragment,{}]:[w8,{basename:v}],[y]),[x,w,E,O]=zn();U.useEffect(()=>O(),[m]);const k=Xg("domainVisits"),P=de("shlink-layout__burger-icon",{"shlink-layout__burger-icon--active":x}),A=h0t(E,O);return b.jsxs(_,{...T,children:[b.jsx(zt,{icon:eet,className:P,onClick:w}),b.jsx("div",{...A,className:"shlink-layout__swipeable",children:b.jsxs("div",{className:"shlink-layout__swipeable-inner",children:[b.jsx(Akt,{routePrefix:v,showOnMobile:x}),b.jsx("div",{className:"shlink-layout__container",onClick:()=>O(),children:b.jsx("div",{className:"container-xl",children:b.jsxs(a1,{children:[b.jsx(Ce,{index:!0,element:b.jsx(dk,{replace:!0,to:"overview"})}),b.jsx(Ce,{path:"/overview",element:b.jsx(c,{})}),b.jsx(Ce,{path:"/list-short-urls/:page",element:b.jsx(e,{})}),b.jsx(Ce,{path:"/create-short-url",element:b.jsx(n,{})}),b.jsx(Ce,{path:"/short-code/:shortCode/visits/*",element:b.jsx(r,{})}),b.jsx(Ce,{path:"/short-code/:shortCode/edit",element:b.jsx(h,{})}),b.jsx(Ce,{path:"/tag/:tag/visits/*",element:b.jsx(i,{})}),k&&b.jsx(Ce,{path:"/domain/:domain/visits/*",element:b.jsx(o,{})}),b.jsx(Ce,{path:"/orphan-visits/*",element:b.jsx(s,{})}),b.jsx(Ce,{path:"/non-orphan-visits/*",element:b.jsx(l,{})}),b.jsx(Ce,{path:"/manage-tags",element:b.jsx(t,{})}),b.jsx(Ce,{path:"/manage-domains",element:b.jsx(d,{})}),p&&b.jsx(Ce,{path:"*",element:p("/list-short-urls/1")})]})})})]})})]})},jkt=!0,Nkt=t=>iz({devTools:!jkt,reducer:vP({mercureInfo:t.mercureInfoReducer,shortUrlsList:t.shortUrlsListReducer,shortUrlCreation:t.shortUrlCreationReducer,shortUrlDeletion:t.shortUrlDeletionReducer,shortUrlEdition:t.shortUrlEditionReducer,shortUrlDetail:t.shortUrlDetailReducer,shortUrlVisits:t.shortUrlVisitsReducer,tagVisits:t.tagVisitsReducer,domainVisits:t.domainVisitsReducer,orphanVisits:t.orphanVisitsReducer,nonOrphanVisits:t.nonOrphanVisitsReducer,tagsList:t.tagsListReducer,tagDelete:t.tagDeleteReducer,tagEdit:t.tagEditReducer,domainsList:t.domainsListReducer,visitsOverview:t.visitsOverviewReducer}),middleware:e=>e({immutableCheck:!1,serializableCheck:!1})}),Dkt=t=>{t.serviceFactory("Main",Rkt,"TagsList","ShortUrlsList","CreateShortUrl","ShortUrlVisits","TagVisits","DomainVisits","OrphanVisits","NonOrphanVisits","Overview","EditShortUrl","ManageDomains"),t.factory("store",Nkt)},Ts=new fpt,{container:Ikt}=Ts,Fkt=(t,e)=>(...n)=>t[e](...n),Bkt=(t,e)=>({...t,[e]:Fkt(Ikt,e)}),dv=(t,e=[])=>d8(t?Rz(t):null,e.reduce(Bkt,{}));Dkt(Ts);_xt(Ts,dv);Jwt(Ts,dv);Mkt(Ts,dv);j_t(Ts);M_t(Ts,dv);q_t(Ts,dv);vSt(Ts);let p4;const $kt=t=>({serverVersion:e,apiClient:n,settings:r,routesPrefix:i="",createNotFound:o,tagColorsStorage:s})=>{const l=hgt(e),c=U.useRef(),[h,d]=U.useState();return U.useEffect(()=>{p4=n,t.value("apiClientFactory",()=>p4),s&&t.value("TagColorsStorage",s);const{container:p}=t,{Main:m,store:v,loadMercureInfo:y}=p;c.current=b.jsx(m,{createNotFound:o}),d(v),v.dispatch(y(r))},[n,s]),h?b.jsx(f8,{store:h,children:b.jsx(Y_t,{value:r,children:b.jsx(dgt,{value:l,children:b.jsx(fgt,{value:i,children:c.current})})})}):b.jsx(b.Fragment,{})},zkt=$kt(Ts);function vb(t){return e=>{const{resetSelectedServer:n}=e;return U.useEffect(()=>{n()},[]),b.jsx(t,{...e})}}const Ukt=({location:t},{error:e})=>class extends U.Component{constructor(n){super(n),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(n){e(n)}render(){const{hasError:n}=this.state;if(n)return b.jsx("div",{className:"home",children:b.jsxs(Bn,{className:"p-4",children:[b.jsx("h1",{children:"Oops! This is awkward :S"}),b.jsx("p",{children:"It seems that something went wrong. Try refreshing the page or just click this button."}),b.jsx("br",{}),b.jsx(ke,{outline:!0,color:"primary",onClick:()=>t.reload(),children:"Take me back"})]})});const{children:r}=this.props;return r}},I9=({href:t,children:e,rel:n,...r})=>b.jsx("a",{target:"_blank",rel:`noopener noreferrer${n?` ${n}`:""}`,href:t,...r,children:e??t});const Vkt=({id:t,name:e})=>b.jsxs(b$,{tag:nn,to:`/server/${t}`,className:"servers-list__server-item",children:[e,b.jsx(zt,{icon:Fet,className:"servers-list__server-item-icon"})]}),F9=({servers:t,children:e,embedded:n=!1})=>b.jsxs(b.Fragment,{children:[e&&b.jsx("h5",{className:"mb-md-3",children:e}),t.length>0&&b.jsx(v$,{className:qt("servers-list__list-group",{"servers-list__list-group--embedded":n}),children:t.map(({id:r,name:i})=>b.jsx(Vkt,{id:r,name:i},r))})]}),B9=({color:t=nP,className:e})=>b.jsx("svg",{className:e,viewBox:"0 0 512 512",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:b.jsxs("g",{fill:t,children:[b.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"}),b.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"}),b.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"}),b.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 Hkt=({servers:t})=>{const e=ws(),n=_k(t),r=!c0(n);return U.useEffect(()=>{const i=n.find(({autoConnect:o})=>o);i&&e(`/server/${i.id}`)},[]),b.jsx("div",{className:"home",children:b.jsx(zi,{className:"home__main-card",children:b.jsxs(qr,{className:"g-0",children:[b.jsx("div",{className:"col-md-5 d-none d-md-block",children:b.jsx("div",{className:"home__logo-wrapper",children:b.jsx("div",{className:"home__logo",children:b.jsx(B9,{})})})}),b.jsxs("div",{className:"col-md-7 home__servers-container",children:[b.jsx("div",{className:"home__title-wrapper",children:b.jsx("h1",{className:"home__title",children:"Welcome!"})}),b.jsx(F9,{embedded:!0,servers:n,children:!r&&b.jsxs("div",{className:"p-4 text-center",children:[b.jsx("p",{className:"mb-5",children:"This application will help you manage your Shlink servers."}),b.jsx("p",{children:b.jsxs(nn,{to:"/server/create",className:"btn btn-outline-primary btn-lg me-2",children:[b.jsx(zt,{icon:Ek})," ",b.jsx("span",{className:"ms-1",children:"Add a server"})]})}),b.jsx("p",{className:"mb-0 mt-5",children:b.jsx(I9,{href:"https://shlink.io/documentation",children:b.jsxs("small",{children:[b.jsx("span",{className:"me-1",children:"Learn more about Shlink"})," ",b.jsx(zt,{icon:yet})]})})})]})})]})]})})})};const Wkt=t=>()=>{const[e,n,,r]=zn(),i=Un(),{pathname:o}=i;U.useEffect(r,[i]);const s="/settings",l=qt("main-header__toggle-icon",{"main-header__toggle-icon--opened":e});return b.jsxs(NB,{color:"primary",dark:!0,fixed:"top",className:"main-header",expand:"md",children:[b.jsxs(DB,{tag:nn,to:"/",children:[b.jsx(B9,{className:"main-header__brand-logo",color:"white"})," Shlink"]}),b.jsx(IB,{onClick:n,children:b.jsx(zt,{icon:Det,className:l})}),b.jsx(Nat,{navbar:!0,isOpen:e,children:b.jsxs(zk,{navbar:!0,className:"ms-auto",children:[b.jsx(FB,{children:b.jsxs(zB,{tag:nn,to:s,active:o.startsWith(s),children:[b.jsx(zt,{icon:Uet}),"  Settings"]})}),b.jsx(t,{})]})})]})},Ykt=({children:t})=>{const e=Un();return U.useEffect(()=>{scrollTo(0,0)},[e]),b.jsx(b.Fragment,{children:t})},Zkt=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,m4=t=>{if(typeof t!="string")throw new TypeError("Invalid argument expected string");const e=t.match(Zkt);if(!e)throw new Error(`Invalid argument not valid semver ('${t}' received)`);return e.shift(),e},g4=t=>t==="*"||t==="x"||t==="X",v4=t=>{const e=parseInt(t,10);return isNaN(e)?t:e},Gkt=(t,e)=>typeof t!=typeof e?[String(t),String(e)]:[t,e],qkt=(t,e)=>{if(g4(t)||g4(e))return 0;const[n,r]=Gkt(v4(t),v4(e));return n>r?1:n{for(let n=0;n{const n=m4(t),r=m4(e),i=n.pop(),o=r.pop(),s=y4(n,r);return s!==0?s:i&&o?y4(i.split("."),o.split(".")):i||o?i?-1:1:0},Xkt=(t,e,n)=>{Qkt(n);const r=Kkt(t,e);return $9[n].includes(r)},$9={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},_4=Object.keys($9),Qkt=t=>{if(typeof t!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof t}`);if(_4.indexOf(t)===-1)throw new Error(`Invalid operator, expected one of ${_4.join("|")}`)},z9=U8($8,t=>{try{return Xkt(t,t,"=")}catch{return!1}}),U9=t=>z9(t)?`v${t}`:t,V9=(t="latest")=>e=>z9(e)?e:t,Jkt="%_VERSION_%",tPt=tu(V9(),U9),b4=({project:t,version:e})=>b.jsx(I9,{href:`https://github.com/shlinkio/${t}/releases/${e}`,className:"text-muted",children:b.jsx("b",{children:e})}),ePt=({selectedServer:t,clientVersion:e=Jkt})=>{const n=tPt(e);return b.jsxs("small",{className:"text-muted",children:[H8(t)&&b.jsxs(b.Fragment,{children:["Server: ",b.jsx(b4,{project:"shlink",version:t.printableVersion})," - "]}),"Client: ",b.jsx(b4,{project:"shlink-web-client",version:n})]})};const nPt=/^\/server\/[a-zA-Z0-9-]*\/(?!edit)/,rPt=({selectedServer:t})=>{const{pathname:e}=Un(),n=U.useMemo(()=>nPt.test(e),[e]),r=qt("text-center",{"shlink-versions-container--with-sidebar":n});return b.jsx("div",{className:r,children:b.jsx(ePt,{selectedServer:t})})};const Hd=({children:t})=>b.jsx("div",{className:"no-menu-wrapper container-xl",children:t});function H9(t,e){return n=>{const r=ju(),{selectServer:i,selectedServer:o}=n;return U.useEffect(()=>{r.serverId&&i(r.serverId)},[r.serverId]),o?Ytt(o)?b.jsx(e,{}):b.jsx(t,{...n}):b.jsx(Hd,{children:b.jsx(aa,{loading:!0})})}}const iPt=(t,e,n,r)=>H9(({selectedServer:i,settings:o})=>{const s=H8(i),l=s?`/server/${i.id}`:"";return s?b.jsx(n,{serverVersion:i.version,apiClient:t(i),settings:o,routesPrefix:l,tagColorsStorage:e,createNotFound:c=>b.jsx(G$,{to:`${l}${c}`,children:"List short URLs"})}):b.jsx(r,{})},r),x4={"Content-Type":"application/json"},w4=t=>t!=null&&t.body?t?{...t,headers:{...t.headers??{},...x4}}:{headers:x4}:t;class oPt{constructor(e){St(this,"fetchJson",(e,n)=>this.fetch(e,w4(n)).then(async r=>{const i=await r.json();if(!r.ok)throw i;return i}));St(this,"fetchEmpty",(e,n)=>this.fetch(e,w4(n)).then(async r=>{if(!r.ok)throw await r.json()}));this.fetch=e}}const sPt=(t,e)=>{t.constant("window",window),t.constant("console",console),t.constant("fetch",window.fetch.bind(window)),t.service("HttpClient",oPt,"fetch"),t.serviceFactory("ScrollToTop",()=>Ykt),t.serviceFactory("MainHeader",Wkt,"ServersDropdown"),t.serviceFactory("Home",()=>Hkt),t.decorator("Home",vb),t.decorator("Home",e(["servers"],["resetSelectedServer"])),t.serviceFactory("ShlinkWebComponent",()=>zkt),t.serviceFactory("ShlinkWebComponentContainer",iPt,"buildShlinkApiClient","TagColorsStorage","ShlinkWebComponent","ServerError"),t.decorator("ShlinkWebComponentContainer",e(["selectedServer","settings"],["selectServer"])),t.serviceFactory("ShlinkVersionsContainer",()=>rPt),t.decorator("ShlinkVersionsContainer",e(["selectedServer"])),t.serviceFactory("ErrorHandler",Ukt,"window","console")};let Ry;const aPt=new Uint8Array(16);function lPt(){if(!Ry&&(Ry=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ry))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ry(aPt)}const xr=[];for(let t=0;t<256;++t)xr.push((t+256).toString(16).slice(1));function cPt(t,e=0){return(xr[t[e+0]]+xr[t[e+1]]+xr[t[e+2]]+xr[t[e+3]]+"-"+xr[t[e+4]]+xr[t[e+5]]+"-"+xr[t[e+6]]+xr[t[e+7]]+"-"+xr[t[e+8]]+xr[t[e+9]]+"-"+xr[t[e+10]]+xr[t[e+11]]+xr[t[e+12]]+xr[t[e+13]]+xr[t[e+14]]+xr[t[e+15]]).toLowerCase()}const uPt=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),S4={randomUUID:uPt};function W9(t,e,n){if(S4.randomUUID&&!e&&!t)return S4.randomUUID();t=t||{};const r=t.random||(t.rng||lPt)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,e){n=n||0;for(let i=0;i<16;++i)e[n+i]=r[i];return e}return cPt(r)}const hPt=2e3,dPt=(t,e)=>(n=!1,r=hPt)=>{const[i,o]=U.useState(n),s=U.useRef(void 0);return[i,()=>{o(!n),s.current&&e(s.current),s.current=t(()=>o(n),r)}]},Y9=()=>{const t=ws();return()=>t(-1)},fPt=()=>{const{search:t}=Un();return Du(t)},Z9=({isOpen:t,duplicatedServers:e,onDiscard:n,onSave:r})=>{const i=e.length>1;return b.jsxs(Ca,{centered:!0,isOpen:t,children:[b.jsxs(ka,{children:["Duplicated server",i&&"s"]}),b.jsxs(Ss,{children:[b.jsx("p",{children:i?"The next servers already exist:":"There is already a server with:"}),b.jsx("ul",{children:e.map(({url:o,apiKey:s},l)=>i?b.jsxs("li",{children:[b.jsx("b",{children:o})," - ",b.jsx("b",{children:s})]},l):b.jsxs(U.Fragment,{children:[b.jsxs("li",{children:["URL: ",b.jsx("b",{children:o})]}),b.jsxs("li",{children:["API key: ",b.jsx("b",{children:s})]})]},l))}),b.jsxs("span",{children:[i?"Do you want to ignore duplicated servers":"Do you want to save this server anyway","?"]})]}),b.jsxs(Nu,{children:[b.jsx(ke,{color:"link",onClick:n,children:i?"Ignore duplicated":"Discard"}),b.jsx(ke,{color:"primary",onClick:r,children:"Save anyway"})]})]})},pPt=t=>tu(e=>e.preventDefault(),t),G9=({onSubmit:t,initialValues:e,children:n,title:r})=>{const[i,o]=U.useState(""),[s,l]=U.useState(""),[c,h]=U.useState(""),d=pPt(()=>t({name:i,url:s,apiKey:c}));return U.useEffect(()=>{e&&o(e.name),e&&l(e.url),e&&h(e.apiKey)},[e]),b.jsxs("form",{className:"server-form",name:"serverForm",onSubmit:d,children:[b.jsxs(Bn,{className:"mb-3",title:r,children:[b.jsx(a_,{value:i,onChange:o,children:"Name"}),b.jsx(a_,{type:"url",value:s,onChange:l,children:"URL"}),b.jsx(a_,{value:c,onChange:h,children:"API key"})]}),b.jsx("div",{className:"text-end",children:n})]})},T4=4e3,E4=({type:t})=>b.jsx("div",{className:"mt-3",children:b.jsxs(Ii,{type:t,children:[t==="success"&&"Servers properly imported. You can now select one from the list :)",t==="error"&&"The servers could not be imported. Make sure the format is correct."]})}),mPt=(t,e)=>({servers:n,createServers:r})=>{const i=ws(),o=Y9(),s=!!Object.keys(n).length,[l,c]=e(!1,T4),[h,d]=e(!1,T4),[p,m]=zn(),[v,y]=U.useState(),_=()=>{if(!v)return;const T=W9();r([{...v,id:T}]),i(`/server/${T}`)};return U.useEffect(()=>{Object.values(n).some(({url:x,apiKey:w})=>(v==null?void 0:v.url)===x&&(v==null?void 0:v.apiKey)===w)?m():_()},[v]),b.jsxs(Hd,{children:[b.jsxs(G9,{title:b.jsx("h5",{className:"mb-0",children:"Add new server"}),onSubmit:y,children:[!s&&b.jsx(t,{tooltipPlacement:"top",onImport:c,onImportError:d}),s&&b.jsx(ke,{outline:!0,onClick:o,children:"Cancel"}),b.jsx(ke,{outline:!0,color:"primary",className:"ms-2",children:"Create server"})]}),l&&b.jsx(E4,{type:"success"}),h&&b.jsx(E4,{type:"error"}),b.jsx(Z9,{isOpen:p,duplicatedServers:v?[v]:[],onDiscard:o,onSave:_})]})},gPt=t=>({server:e,className:n,children:r,textClassName:i})=>{const[o,,s,l]=zn();return b.jsxs(b.Fragment,{children:[b.jsxs("span",{className:n,onClick:s,children:[!r&&b.jsx(zt,{fixedWidth:!0,icon:xk}),b.jsx("span",{className:i,children:r??"Remove this server"})]}),b.jsx(t,{server:e,isOpen:o,toggle:l})]})},vPt=({server:t,toggle:e,isOpen:n,deleteServer:r,redirectHome:i=!0})=>{const o=ws(),s=U.useRef(!1),l=()=>{s.current=!0,e()},c=()=>{s.current&&(r(t),i&&o("/"))};return b.jsxs(Ca,{isOpen:n,toggle:e,centered:!0,onClosed:c,children:[b.jsx(ka,{toggle:e,className:"text-danger",children:"Remove server"}),b.jsxs(Ss,{children:[b.jsxs("p",{children:["Are you sure you want to remove ",b.jsx("b",{children:t?t.name:""}),"?"]}),b.jsx("p",{children:b.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."})})]}),b.jsxs(Nu,{children:[b.jsx(ke,{color:"link",onClick:e,children:"Cancel"}),b.jsx(ke,{color:"danger",onClick:l,children:"Delete"})]})]})},yPt=t=>H9(({editServer:e,selectedServer:n,selectServer:r})=>{const i=Y9(),{reconnect:o}=fPt();if(!qp(n))return null;const s=l=>{e(n.id,l),o==="true"&&r(n.id),i()};return b.jsx(Hd,{children:b.jsxs(G9,{title:b.jsxs("h5",{className:"mb-0",children:['Edit "',n.name,'"']}),initialValues:n,onSubmit:s,children:[b.jsx(ke,{outline:!0,className:"me-2",onClick:i,children:"Cancel"}),b.jsx(ke,{outline:!0,color:"primary",children:"Save"})]})})},t);const O4=t=>({url:e,apiKey:n})=>t.some(r=>r.url===e&&r.apiKey===n),_Pt=({importServersFromFile:t})=>({createServers:e,servers:n,children:r,onImport:i=()=>{},onImportError:o=()=>{},tooltipPlacement:s="bottom",className:l=""})=>{const c=Bl(),[h,d]=U.useState(),[p,m]=U.useState([]),[v,,y,_]=zn(),T=tu(e,i),x=tu(()=>T(h??[]),_),w=tu(()=>T((h??[]).filter(stt(O4(p)))),_),E=async({target:O})=>{var k;return t((k=O.files)==null?void 0:k[0]).then(d).then(()=>{O.value=null}).catch(o)};return U.useEffect(()=>{if(!h)return;const O=Object.values(n),k=h.filter(O4(O)),P=!!k.length;P?m(k):T(h),P&&y()},[h]),b.jsxs(b.Fragment,{children:[b.jsxs(ke,{outline:!0,id:"importBtn",className:l,onClick:()=>{var O;return(O=c.current)==null?void 0:O.click()},children:[b.jsx(zt,{icon:uet,fixedWidth:!0})," ",r??"Import from file"]}),b.jsxs(fi,{placement:s,target:"importBtn",children:["You can create servers by importing a CSV file with columns ",b.jsx("b",{children:"name"}),", ",b.jsx("b",{children:"apiKey"})," and ",b.jsx("b",{children:"url"}),"."]}),b.jsx("input",{type:"file",accept:"text/csv",className:"import-servers-btn__csv-select",ref:c,onChange:E}),b.jsx(Z9,{isOpen:v,duplicatedServers:p,onDiscard:w,onSave:x})]})};const bPt=t=>({servers:e,selectedServer:n})=>b.jsx(Hd,{children:b.jsxs("div",{className:"server-error__container flex-column",children:[b.jsxs(aa,{className:"w-100 mb-3 mb-md-5",type:"error",fullWidth:!0,children:[!qp(n)&&"Could not find this Shlink server.",qp(n)&&b.jsxs(b.Fragment,{children:[b.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."]})]}),b.jsxs(F9,{servers:Object.values(e),children:["These are the Shlink servers currently configured. Choose one of them or ",b.jsx(nn,{to:"/server/create",children:"add a new one"}),"."]}),qp(n)&&b.jsx("div",{className:"container mt-3 mt-md-5",children:b.jsxs("h5",{children:["Alternatively, if you think you may have miss-configured this server, you can ",b.jsx(t,{server:n,className:"server-error__delete-btn",children:"remove it"})," or ",b.jsx(nn,{to:`/server/${n.id}/edit?reconnect=true`,children:"edit it"}),"."]})})]})}),xPt=4e3,wPt=(t,e,n,r)=>({servers:i})=>{const o=Object.values(i),[s,l]=U.useState(o),c=m=>l(o.filter(({name:v,url:y})=>`${v} ${y}`.toLowerCase().match(m.toLowerCase()))),h=s.some(({autoConnect:m})=>!!m),[d,p]=n(!1,xPt);return U.useEffect(()=>{l(Object.values(i))},[i]),b.jsxs(Hd,{children:[b.jsx(Wg,{className:"mb-3",onChange:c}),b.jsxs(qr,{className:"mb-3",children:[b.jsxs("div",{className:"col-md-6 d-flex d-md-block mb-2 mb-md-0",children:[b.jsx(e,{className:"flex-fill",onImportError:p,children:"Import servers"}),o.length>0&&b.jsxs(ke,{outline:!0,className:"ms-2 flex-fill",onClick:async()=>t.exportServers(),children:[b.jsx(zt,{icon:K8,fixedWidth:!0})," Export servers"]})]}),b.jsx("div",{className:"col-md-6 text-md-end d-flex d-md-block",children:b.jsxs(ke,{outline:!0,color:"primary",className:"flex-fill",tag:nn,to:"/server/create",children:[b.jsx(zt,{icon:Ek,fixedWidth:!0})," Add a server"]})})]}),b.jsx(Bn,{children:b.jsxs("table",{className:"table table-hover responsive-table mb-0",children:[b.jsx("thead",{className:"responsive-table__header",children:b.jsxs("tr",{children:[h&&b.jsx("th",{"aria-label":"Auto-connect",style:{width:"50px"}}),b.jsx("th",{children:"Name"}),b.jsx("th",{children:"Base URL"}),b.jsx("th",{"aria-label":"Options"})]})}),b.jsxs("tbody",{children:[!s.length&&b.jsx("tr",{className:"text-center",children:b.jsx("td",{colSpan:4,children:"No servers found."})}),s.map(m=>b.jsx(r,{server:m,hasAutoConnect:h},m.id))]})]})}),d&&b.jsx("div",{className:"mt-3",children:b.jsx(Ii,{type:"error",children:"The servers could not be imported. Make sure the format is correct."})})]})},SPt=t=>({server:e,hasAutoConnect:n})=>b.jsxs("tr",{className:"responsive-table__row",children:[n&&b.jsx("td",{className:"responsive-table__cell","data-th":"Auto-connect",children:e.autoConnect&&b.jsxs(b.Fragment,{children:[b.jsx(zt,{icon:Hm,className:"text-primary",id:"autoConnectIcon"}),b.jsx(fi,{target:"autoConnectIcon",placement:"right",children:"Auto-connect to this server"})]})}),b.jsx("th",{className:"responsive-table__cell","data-th":"Name",children:b.jsx(nn,{to:`/server/${e.id}`,children:e.name})}),b.jsx("td",{className:"responsive-table__cell","data-th":"Base URL",children:e.url}),b.jsx("td",{className:"responsive-table__cell text-end",children:b.jsx(t,{server:e})})]}),TPt=t=>({server:e,setAutoConnect:n})=>{const[r,,i,o]=zn(),s=`/server/${e.id}`,{autoConnect:l}=e,c=l?aet:Vft;return b.jsxs(b1,{minWidth:170,children:[b.jsxs(Zt,{tag:nn,to:s,children:[b.jsx(zt,{icon:oet,fixedWidth:!0})," Connect"]}),b.jsxs(Zt,{tag:nn,to:`${s}/edit`,children:[b.jsx(zt,{icon:wk,fixedWidth:!0})," Edit server"]}),b.jsxs(Zt,{onClick:()=>n(e,!l),children:[b.jsx(zt,{icon:c,fixedWidth:!0})," ",l?"Do not a":"A","uto-connect"]}),b.jsx(Zt,{divider:!0}),b.jsxs(Zt,{className:"dropdown-item--danger",onClick:i,children:[b.jsx(zt,{icon:xk,fixedWidth:!0})," Remove server"]}),b.jsx(t,{redirectHome:!1,server:e,isOpen:r,toggle:o})]})},q9=(t,e)=>sz(t,e,{serializeError:$8}),EPt={},OPt=t=>t.id?t:a0("id",W9(),t),CPt=I8((t,e)=>a0(e.id,e,t),{}),{actions:kPt,reducer:PPt}=Br({name:"shlink/servers",initialState:EPt,reducers:{editServer:{prepare:(t,e)=>({payload:{serverId:t,serverData:e}}),reducer:(t,{payload:e})=>{const{serverId:n,serverData:r}=e;return t[n]?a0(n,{...t[n],...r},t):t}},deleteServer:(t,{payload:e})=>Ctt(e.id,t),setAutoConnect:{prepare:({id:t},e)=>({payload:{serverId:t,autoConnect:e}}),reducer:(t,{payload:e})=>{const{serverId:n,autoConnect:r}=e;return t[n]?r?Mtt(Wtt(t).map(([i,o])=>[i,{...o,autoConnect:i===n}])):a0(n,{...t[n],autoConnect:r},t):t}},createServers:{prepare:tu(yk(OPt),CPt,t=>({payload:t})),reducer:(t,{payload:e})=>({...t,...e})}}}),{editServer:LPt,deleteServer:MPt,setAutoConnect:APt,createServers:K9}=kPt,RPt=PPt,jPt=t=>Array.isArray(t)?t.filter(V8):[],NPt=t=>q9("shlink/remoteServers/fetchServers",async(e,{dispatch:n})=>{const r=await t.fetchJson(`${i0.homepage}/servers.json`),i=jPt(r);n(K9(i))}),DL="shlink/selectedServer",DPt="1.0.0",IPt="999.999.999",FPt="latest",BPt=tu(t=>t===FPt?IPt:t,V9(DPt)),$Pt=U8(t=>`${t.id}_${t.url}_${t.apiKey}`,async(t,e)=>e().then(({version:n})=>({version:BPt(n),printableVersion:U9(n)}))),C4=null,IL=lr(`${DL}/resetSelectedServer`),zPt=t=>q9(`${DL}/selectServer`,async(e,{dispatch:n,getState:r})=>{n(IL());const{servers:i}=r(),o=i[e];if(!o)return{serverNotFound:!0};try{const{health:s}=t(o),{version:l,printableVersion:c}=await $Pt(o,s);return{...o,version:l,printableVersion:c}}catch{return{...o,serverNotReachable:!0}}}),UPt=t=>Br({name:DL,initialState:C4,reducers:{},extraReducers:e=>{e.addCase(IL,()=>C4),e.addCase(t.fulfilled,(n,{payload:r})=>r)}}),VPt=({servers:t,selectedServer:e})=>{const n=_k(t),r=()=>c0(n)?b.jsxs(Zt,{tag:nn,to:"/server/create",children:[b.jsx(zt,{icon:Ek})," ",b.jsx("span",{className:"ms-1",children:"Add a server"})]}):b.jsxs(b.Fragment,{children:[n.map(({name:i,id:o})=>b.jsx(Zt,{tag:nn,to:`/server/${o}`,active:Ztt(e)===o,children:i},o)),b.jsx(Zt,{divider:!0}),b.jsxs(Zt,{tag:nn,to:"/manage-servers",children:[b.jsx(zt,{icon:JR})," ",b.jsx("span",{className:"ms-1",children:"Manage servers"})]})]});return b.jsxs(Hg,{nav:!0,inNavbar:!0,children:[b.jsxs(zg,{nav:!0,caret:!0,children:[b.jsx(zt,{icon:JR})," ",b.jsx("span",{className:"ms-1",children:"Servers"})]}),b.jsx(Nd,{end:!0,style:{right:0},children:r()})]})},HPt=({document:t},e,n)=>{const r=t.createElement("a");r.setAttribute("href",e),r.setAttribute("download",n),r.style.visibility="hidden",t.body.appendChild(r),r.click(),t.body.removeChild(r)},WPt=(t,e,n)=>{const r=new Blob([e],{type:"text/csv;charset=utf-8;"}),i=URL.createObjectURL(r);HPt(t,i,n)},YPt="shlink-servers.csv";class ZPt{constructor(e,n,r){St(this,"exportServers",async()=>{const e=_k(this.storage.get("servers")??{}).map(Gtt);try{const n=this.jsonToCsv(e);WPt(this.window,n,YPt)}catch(n){console.error(n)}});this.storage=e,this.window=n,this.jsonToCsv=r}}const GPt=t=>typeof t.url=="string"&&typeof t.apiKey=="string"&&typeof t.name=="string",qPt=t=>Array.isArray(t)&&t.every(GPt);class KPt{constructor(e,n){St(this,"importServersFromFile",async e=>{if(!e)throw new Error("No file provided");const n=this.fileReaderFactory();return new Promise((r,i)=>{n.addEventListener("loadend",async o=>{var s,l;try{const c=((l=(s=o.target)==null?void 0:s.result)==null?void 0:l.toString())??"",h=await this.csvToJson(c);if(!qPt(h))throw new Error("Provided file does not have the right format.");r(h)}catch(c){i(c)}}),n.readAsText(e)})});this.csvToJson=e,this.fileReaderFactory=n}}const XPt=(t,e)=>{t.serviceFactory("ManageServers",wPt,"ServersExporter","ImportServersBtn","useTimeoutToggle","ManageServersRow"),t.decorator("ManageServers",vb),t.decorator("ManageServers",e(["selectedServer","servers"],["resetSelectedServer"])),t.serviceFactory("ManageServersRow",SPt,"ManageServersRowDropdown"),t.serviceFactory("ManageServersRowDropdown",TPt,"DeleteServerModal"),t.decorator("ManageServersRowDropdown",e(null,["setAutoConnect"])),t.serviceFactory("CreateServer",mPt,"ImportServersBtn","useTimeoutToggle"),t.decorator("CreateServer",vb),t.decorator("CreateServer",e(["selectedServer","servers"],["createServers","resetSelectedServer"])),t.serviceFactory("EditServer",yPt,"ServerError"),t.decorator("EditServer",e(["selectedServer"],["editServer","selectServer","resetSelectedServer"])),t.serviceFactory("ServersDropdown",()=>VPt),t.decorator("ServersDropdown",e(["servers","selectedServer"])),t.serviceFactory("DeleteServerModal",()=>vPt),t.decorator("DeleteServerModal",e(null,["deleteServer"])),t.serviceFactory("DeleteServerButton",gPt,"DeleteServerModal"),t.serviceFactory("ImportServersBtn",_Pt,"ServersImporter"),t.decorator("ImportServersBtn",e(["servers"],["createServers"])),t.serviceFactory("ServerError",bPt,"DeleteServerButton"),t.decorator("ServerError",e(["servers","selectedServer"])),t.constant("fileReaderFactory",()=>new FileReader),t.service("ServersImporter",KPt,"csvToJson","fileReaderFactory"),t.service("ServersExporter",ZPt,"Storage","window","jsonToCsv"),t.serviceFactory("selectServer",zPt,"buildShlinkApiClient","loadMercureInfo"),t.serviceFactory("createServers",()=>K9),t.serviceFactory("deleteServer",()=>MPt),t.serviceFactory("editServer",()=>LPt),t.serviceFactory("setAutoConnect",()=>APt),t.serviceFactory("fetchServers",NPt,"HttpClient"),t.serviceFactory("resetSelectedServer",()=>IL),t.serviceFactory("selectedServerReducerCreator",UPt,"selectServer"),t.serviceFactory("selectedServerReducer",WJ("reducer"),"selectedServerReducerCreator")},Hh=({children:t})=>b.jsx("small",{className:"form-text text-muted d-block",children:t}),QPt=t=>t?`${t}`:"",JPt=({settings:t,toggleRealTimeUpdates:e,setRealTimeUpdatesInterval:n})=>{const{realTimeUpdates:r={enabled:!0}}=t,i=_1();return b.jsxs(Bn,{title:"Real-time updates",className:"h-100",children:[b.jsx(Ai,{children:b.jsxs(fd,{checked:r.enabled,onChange:e,children:["Enable or disable real-time updates.",b.jsxs(Hh,{children:["Real-time updates are currently being ",b.jsx("b",{children:r.enabled?"processed":"ignored"}),"."]})]})}),b.jsxs(Id,{noMargin:!0,label:"Real-time updates frequency (in minutes):",labelClassName:qt("form-label",{"text-muted":!r.enabled}),id:i,children:[b.jsx(dd,{type:"number",min:0,placeholder:"Immediate",disabled:!r.enabled,value:QPt(r.interval),id:i,onChange:({target:o})=>n(Number(o.value))}),r.enabled&&b.jsxs(Hh,{children:[r.interval!==void 0&&r.interval>0&&b.jsxs("span",{children:["Updates will be reflected in the UI every ",b.jsx("b",{children:r.interval})," minute",r.interval>1&&"s","."]}),!r.interval&&"Updates will be reflected in the UI as soon as they happen."]})]})]})},X9={field:"dateCreated",dir:"DESC"},tLt={realTimeUpdates:{enabled:!0},shortUrlCreation:{validateUrls:!1},ui:{theme:"light"},visits:{defaultInterval:"last30Days"},shortUrlsList:{defaultOrdering:X9}},eLt=(t,{payload:e})=>Btt(t,e),kc=t=>({reducer:eLt,prepare:t}),Pc=t=>({payload:t}),{reducer:nLt,actions:rLt}=Br({name:"shlink/settings",initialState:tLt,reducers:{toggleRealTimeUpdates:kc(t=>Pc({realTimeUpdates:{enabled:t}})),setRealTimeUpdatesInterval:kc(t=>Pc({realTimeUpdates:{interval:t}})),setShortUrlCreationSettings:kc(t=>Pc({shortUrlCreation:t})),setShortUrlsListSettings:kc(t=>Pc({shortUrlsList:t})),setUiSettings:kc(t=>Pc({ui:t})),setVisitsSettings:kc(t=>Pc({visits:t})),setTagsSettings:kc(t=>Pc({tags:t}))}}),{toggleRealTimeUpdates:iLt,setRealTimeUpdatesInterval:oLt,setShortUrlCreationSettings:sLt,setShortUrlsListSettings:aLt,setUiSettings:lLt,setVisitsSettings:cLt,setTagsSettings:uLt}=rLt,hLt=nLt,G2=({items:t})=>b.jsx(b.Fragment,{children:t.map((e,n)=>b.jsx("div",{className:"mb-3",children:e},n))}),dLt=(t,e,n,r,i,o)=>()=>b.jsxs(Hd,{children:[b.jsxs(C$,{className:"mb-3",children:[b.jsx(em,{to:"general",children:"General"}),b.jsx(em,{to:"short-urls",children:"Short URLs"}),b.jsx(em,{to:"other-items",children:"Other items"})]}),b.jsxs(a1,{children:[b.jsx(Ce,{path:"general",element:b.jsx(G2,{items:[b.jsx(r,{}),b.jsx(t,{})]})}),b.jsx(Ce,{path:"short-urls",element:b.jsx(G2,{items:[b.jsx(e,{}),b.jsx(n,{})]})}),b.jsx(Ce,{path:"other-items",element:b.jsx(G2,{items:[b.jsx(o,{}),b.jsx(i,{})]})}),b.jsx(Ce,{path:"*",element:b.jsx(dk,{replace:!0,to:"general"})})]})]}),q2=t=>t==="includes"?"Suggest tags including input":"Suggest tags starting with input",fLt=t=>t==="includes"?b.jsxs(b.Fragment,{children:["The list of suggested tags will contain those ",b.jsx("b",{children:"including"})," provided input."]}):b.jsxs(b.Fragment,{children:["The list of suggested tags will contain those ",b.jsx("b",{children:"starting with"})," provided input."]}),pLt=({settings:t,setShortUrlCreationSettings:e})=>{const n=t.shortUrlCreation??{validateUrls:!1},r=i=>()=>e({...n??{validateUrls:!1},tagFilteringMode:i});return b.jsxs(Bn,{title:"Short URLs form",className:"h-100",children:[b.jsx(Ai,{children:b.jsxs(fd,{checked:n.validateUrls??!1,onChange:i=>e({...n,validateUrls:i}),children:["Request validation on long URLs when creating new short URLs.",b.jsxs(Hh,{children:["The initial state of the ",b.jsx("b",{children:"Validate URL"})," checkbox will be ",b.jsx("b",{children:n.validateUrls?"checked":"unchecked"}),"."]})]})}),b.jsx(Ai,{children:b.jsxs(fd,{checked:n.forwardQuery??!0,onChange:i=>e({...n,forwardQuery:i}),children:["Make all new short URLs forward their query params to the long URL.",b.jsxs(Hh,{children:["The initial state of the ",b.jsx("b",{children:"Forward query params on redirect"})," checkbox will be ",b.jsx("b",{children:n.forwardQuery??!0?"checked":"unchecked"}),"."]})]})}),b.jsxs(Id,{noMargin:!0,label:"Tag suggestions search mode:",children:[b.jsxs(Pa,{text:q2(n.tagFilteringMode),children:[b.jsx(Zt,{active:!n.tagFilteringMode||n.tagFilteringMode==="startsWith",onClick:r("startsWith"),children:q2("startsWith")}),b.jsx(Zt,{active:n.tagFilteringMode==="includes",onClick:r("includes"),children:q2("includes")})]}),b.jsx(Hh,{children:fLt(n.tagFilteringMode)})]})]})},mLt={dateCreated:"Created at",shortCode:"Short URL",longUrl:"Long URL",title:"Title",visits:"Visits"},gLt=({settings:{shortUrlsList:t},setShortUrlsListSettings:e})=>b.jsx(Bn,{title:"Short URLs list",className:"h-100",children:b.jsx(Id,{noMargin:!0,label:"Default ordering for short URLs list:",children:b.jsx(Yg,{items:mLt,order:(t==null?void 0:t.defaultOrdering)??X9,onChange:(n,r)=>e({defaultOrdering:{field:n,dir:r}})})})}),vLt={tag:"Tag",shortUrls:"Short URLs",visits:"Visits"},yLt=({settings:{tags:t},setTagsSettings:e})=>b.jsx(Bn,{title:"Tags",className:"h-100",children:b.jsx(Id,{noMargin:!0,label:"Default ordering for tags list:",children:b.jsx(Yg,{items:vLt,order:(t==null?void 0:t.defaultOrdering)??{},onChange:(n,r)=>e({...t,defaultOrdering:{field:n,dir:r}})})})});const _Lt=({settings:{ui:t},setUiSettings:e})=>b.jsxs(Bn,{title:"User interface",className:"h-100",children:[b.jsx(zt,{icon:(t==null?void 0:t.theme)==="dark"?Het:Aet,className:"user-interface__theme-icon"}),b.jsx(fd,{checked:(t==null?void 0:t.theme)==="dark",onChange:n=>{const r=n?"dark":"light";e({...t,theme:r}),M$(r)},children:"Use dark theme."})]}),Q9={today:"Today",yesterday:"Yesterday",last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",last180Days:"Last 180 days",last365Days:"Last 365 days"},bLt=(t,e)=>!t||t==="all"?e:Q9[t],xLt=({onChange:t,active:e,allText:n})=>b.jsxs(Pa,{text:bLt(e,n),children:[b.jsx(Zt,{active:e==="all",onClick:()=>t("all"),children:n}),b.jsx(Zt,{divider:!0}),Object.entries(Q9).map(([r,i])=>b.jsx(Zt,{active:e===r,onClick:()=>t(r),children:i},r))]}),k4=t=>{var e;return((e=t.visits)==null?void 0:e.defaultInterval)??"last30Days"},wLt=({settings:t,setVisitsSettings:e})=>{var n,r;return b.jsxs(Bn,{title:"Visits",className:"h-100",children:[b.jsx(Ai,{children:b.jsxs(fd,{checked:!!((n=t.visits)!=null&&n.excludeBots),onChange:i=>e({defaultInterval:k4(t),excludeBots:i}),children:["Exclude bots wherever possible (this option‘s effect might depend on Shlink server‘s version).",b.jsxs(Hh,{children:["The visits coming from potential bots will be ",b.jsx("b",{children:(r=t.visits)!=null&&r.excludeBots?"excluded":"included"}),"."]})]})}),b.jsx(Id,{noMargin:!0,label:"Default interval to load on visits sections:",children:b.jsx(xLt,{allText:"All visits",active:k4(t),onChange:i=>e({defaultInterval:i})})})]})},SLt=(t,e)=>{t.serviceFactory("Settings",dLt,"RealTimeUpdatesSettings","ShortUrlCreationSettings","ShortUrlsListSettings","UserInterfaceSettings","VisitsSettings","TagsSettings"),t.decorator("Settings",vb),t.decorator("Settings",e(null,["resetSelectedServer"])),t.serviceFactory("RealTimeUpdatesSettings",()=>JPt),t.decorator("RealTimeUpdatesSettings",e(["settings"],["toggleRealTimeUpdates","setRealTimeUpdatesInterval"])),t.serviceFactory("ShortUrlCreationSettings",()=>pLt),t.decorator("ShortUrlCreationSettings",e(["settings"],["setShortUrlCreationSettings"])),t.serviceFactory("UserInterfaceSettings",()=>_Lt),t.decorator("UserInterfaceSettings",e(["settings"],["setUiSettings"])),t.serviceFactory("VisitsSettings",()=>wLt),t.decorator("VisitsSettings",e(["settings"],["setVisitsSettings"])),t.serviceFactory("TagsSettings",()=>yLt),t.decorator("TagsSettings",e(["settings"],["setTagsSettings"])),t.serviceFactory("ShortUrlsListSettings",()=>gLt),t.decorator("ShortUrlsListSettings",e(["settings"],["setShortUrlsListSettings"])),t.serviceFactory("toggleRealTimeUpdates",()=>iLt),t.serviceFactory("setRealTimeUpdatesInterval",()=>oLt),t.serviceFactory("setShortUrlCreationSettings",()=>sLt),t.serviceFactory("setShortUrlsListSettings",()=>aLt),t.serviceFactory("setUiSettings",()=>lLt),t.serviceFactory("setVisitsSettings",()=>cLt),t.serviceFactory("setTagsSettings",()=>uLt)};var TLt="Expected a function",J9="__lodash_hash_undefined__",tV=1/0,ELt="[object Function]",OLt="[object GeneratorFunction]",CLt="[object Symbol]",kLt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,PLt=/^\w*$/,LLt=/^\./,MLt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ALt=/[\\^$.*+?()[\]{}|]/g,RLt=/\\(\\)?/g,jLt=/^\[object .+?Constructor\]$/,NLt=typeof mp=="object"&&mp&&mp.Object===Object&&mp,DLt=typeof self=="object"&&self&&self.Object===Object&&self,FL=NLt||DLt||Function("return this")();function ILt(t,e){return t==null?void 0:t[e]}function FLt(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch{}return e}var BLt=Array.prototype,$Lt=Function.prototype,eV=Object.prototype,K2=FL["__core-js_shared__"],P4=function(){var t=/[^.]+$/.exec(K2&&K2.keys&&K2.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),nV=$Lt.toString,BL=eV.hasOwnProperty,rV=eV.toString,zLt=RegExp("^"+nV.call(BL).replace(ALt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),L4=FL.Symbol,ULt=BLt.splice,VLt=iV(FL,"Map"),Sg=iV(Object,"create"),M4=L4?L4.prototype:void 0,A4=M4?M4.toString:void 0;function Cu(t){var e=-1,n=t?t.length:0;for(this.clear();++e-1}function JLt(t,e){var n=this.__data__,r=W1(n,t);return r<0?n.push([t,e]):n[r][1]=e,this}Wd.prototype.clear=qLt;Wd.prototype.delete=KLt;Wd.prototype.get=XLt;Wd.prototype.has=QLt;Wd.prototype.set=JLt;function Vu(t){var e=-1,n=t?t.length:0;for(this.clear();++er.toFixed(n).replace(".",e):r=>`${r}`.replace(".",e):n?r=>r.toFixed(n):r=>`${r}`}function UL(t={}){const e=typeof t.quote=="string"?t.quote:'"',n=typeof t.escapedQuote=="string"?t.escapedQuote:`${e}${e}`;return!e||e===n?r=>r:r=>(r.includes(e)&&(r=r.replace(new RegExp(e,"g"),n)),`${e}${r}${e}`)}function wMt(t={stringFormatter:UL()}){return e=>t.stringFormatter(e.toString().slice(7,-1))}function SMt(t={stringFormatter:UL()}){return e=>{if(e===null)return"";let n=JSON.stringify(e);return n===void 0?"":(n[0]==='"'&&(n=n.replace(/^"(.+)"$/,"$1")),t.stringFormatter(n))}}function j4(t,e,n){const r=t[e];return r===void 0?n:r}function aV(t,e){try{return Array.isArray(e)?t.push(...e):t.push(e),t}catch{return t.concat(e)}}function FO(t,e){let n=!0;return t.reduce((r,i)=>(i==null&&(i=""),n?(n=!1,`${i}`):`${r}${e}${i}`),"")}var N4;(function(t){t.header="header",t.undefined="undefined",t.boolean="boolean",t.number="number",t.bigint="bigint",t.string="string",t.symbol="symbol",t.function="function",t.object="object"})(N4||(N4={}));class TMt{constructor(e){this.opts=this.preprocessOpts(e)}preprocessOpts(e){const n=Object.assign({},e);n.fields&&(n.fields=this.preprocessFieldsInfo(n.fields,n.defaultValue)),n.transforms=n.transforms||[];const r=n.formatters&&n.formatters.string||UL(),i=SMt({stringFormatter:r}),o={header:r,undefined:X2,boolean:X2,number:xMt(),bigint:X2,string:r,symbol:wMt({stringFormatter:r}),function:i,object:i};return n.formatters=Object.assign(Object.assign({},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(e,n){return e.map(r=>{if(typeof r=="string")return{label:r,value:r.includes(".")||r.includes("[")?i=>R4(i,r,n):i=>j4(i,r,n)};if(typeof r=="object"){const i="default"in r?r.default:n;if(typeof r.value=="string"){const o=r.value;return{label:r.label||r.value,value:r.value.includes(".")||r.value.includes("[")?s=>R4(s,o,i):s=>j4(s,o,i)}}if(typeof r.value=="function"){const o=r.label||r.value.name||"",s={label:o,default:i},l=r.value;return{label:o,value(c){const h=l(c,s);return h===void 0?i:h}}}}throw new Error("Invalid field info option. "+JSON.stringify(r))})}getHeader(){return FO(this.opts.fields.map(e=>this.opts.formatters.header(e.label)),this.opts.delimiter)}preprocessRow(e){return this.opts.transforms.reduce((n,r)=>n.map(i=>r(i)).reduce(aV,[]),[e])}processRow(e){if(!e)return;const n=this.opts.fields.map(r=>this.processCell(e,r));if(!(!this.opts.includeEmptyRows&&n.every(r=>r==="")))return FO(n,this.opts.delimiter)}processCell(e,n){return this.processValue(n.value(e))}processValue(e){const n=this.opts.formatters[typeof e];return n(e)}}class EMt extends TMt{constructor(e){super(e)}parse(e){const n=this.preprocessData(e);this.opts.fields=this.opts.fields||this.preprocessFieldsInfo(n.reduce((s,l)=>(Object.keys(l).forEach(c=>{s.includes(c)||s.push(c)}),s),[]),this.opts.defaultValue);const r=this.opts.header?this.getHeader():"",i=this.processData(n);return(this.opts.withBOM?"\uFEFF":"")+r+(r&&i?this.opts.eol:"")+i}preprocessData(e){const n=Array.isArray(e)?e:[e];if(!this.opts.fields){if(e==null||n.length===0)throw new Error('Data should not be empty or the "fields" option should be included');if(typeof n[0]!="object")throw new Error('Data items should be objects or the "fields" option should be included')}return this.opts.transforms.length===0?n:n.map(r=>this.preprocessRow(r)).reduce(aV,[])}processData(e){return FO(e.map(n=>this.processRow(n)).filter(n=>n),this.opts.eol)}}var er;(function(t){t[t.BACKSPACE=8]="BACKSPACE",t[t.FORM_FEED=12]="FORM_FEED",t[t.NEWLINE=10]="NEWLINE",t[t.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",t[t.TAB=9]="TAB",t[t.SPACE=32]="SPACE",t[t.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",t[t.QUOTATION_MARK=34]="QUOTATION_MARK",t[t.NUMBER_SIGN=35]="NUMBER_SIGN",t[t.DOLLAR_SIGN=36]="DOLLAR_SIGN",t[t.PERCENT_SIGN=37]="PERCENT_SIGN",t[t.AMPERSAND=38]="AMPERSAND",t[t.APOSTROPHE=39]="APOSTROPHE",t[t.LEFT_PARENTHESIS=40]="LEFT_PARENTHESIS",t[t.RIGHT_PARENTHESIS=41]="RIGHT_PARENTHESIS",t[t.ASTERISK=42]="ASTERISK",t[t.PLUS_SIGN=43]="PLUS_SIGN",t[t.COMMA=44]="COMMA",t[t.HYPHEN_MINUS=45]="HYPHEN_MINUS",t[t.FULL_STOP=46]="FULL_STOP",t[t.SOLIDUS=47]="SOLIDUS",t[t.DIGIT_ZERO=48]="DIGIT_ZERO",t[t.DIGIT_ONE=49]="DIGIT_ONE",t[t.DIGIT_TWO=50]="DIGIT_TWO",t[t.DIGIT_THREE=51]="DIGIT_THREE",t[t.DIGIT_FOUR=52]="DIGIT_FOUR",t[t.DIGIT_FIVE=53]="DIGIT_FIVE",t[t.DIGIT_SIX=54]="DIGIT_SIX",t[t.DIGIT_SEVEN=55]="DIGIT_SEVEN",t[t.DIGIT_EIGHT=56]="DIGIT_EIGHT",t[t.DIGIT_NINE=57]="DIGIT_NINE",t[t.COLON=58]="COLON",t[t.SEMICOLON=59]="SEMICOLON",t[t.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",t[t.EQUALS_SIGN=61]="EQUALS_SIGN",t[t.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",t[t.QUESTION_MARK=63]="QUESTION_MARK",t[t.COMMERCIAL_AT=64]="COMMERCIAL_AT",t[t.LATIN_CAPITAL_LETTER_A=65]="LATIN_CAPITAL_LETTER_A",t[t.LATIN_CAPITAL_LETTER_B=66]="LATIN_CAPITAL_LETTER_B",t[t.LATIN_CAPITAL_LETTER_C=67]="LATIN_CAPITAL_LETTER_C",t[t.LATIN_CAPITAL_LETTER_D=68]="LATIN_CAPITAL_LETTER_D",t[t.LATIN_CAPITAL_LETTER_E=69]="LATIN_CAPITAL_LETTER_E",t[t.LATIN_CAPITAL_LETTER_F=70]="LATIN_CAPITAL_LETTER_F",t[t.LATIN_CAPITAL_LETTER_G=71]="LATIN_CAPITAL_LETTER_G",t[t.LATIN_CAPITAL_LETTER_H=72]="LATIN_CAPITAL_LETTER_H",t[t.LATIN_CAPITAL_LETTER_I=73]="LATIN_CAPITAL_LETTER_I",t[t.LATIN_CAPITAL_LETTER_J=74]="LATIN_CAPITAL_LETTER_J",t[t.LATIN_CAPITAL_LETTER_K=75]="LATIN_CAPITAL_LETTER_K",t[t.LATIN_CAPITAL_LETTER_L=76]="LATIN_CAPITAL_LETTER_L",t[t.LATIN_CAPITAL_LETTER_M=77]="LATIN_CAPITAL_LETTER_M",t[t.LATIN_CAPITAL_LETTER_N=78]="LATIN_CAPITAL_LETTER_N",t[t.LATIN_CAPITAL_LETTER_O=79]="LATIN_CAPITAL_LETTER_O",t[t.LATIN_CAPITAL_LETTER_P=80]="LATIN_CAPITAL_LETTER_P",t[t.LATIN_CAPITAL_LETTER_Q=81]="LATIN_CAPITAL_LETTER_Q",t[t.LATIN_CAPITAL_LETTER_R=82]="LATIN_CAPITAL_LETTER_R",t[t.LATIN_CAPITAL_LETTER_S=83]="LATIN_CAPITAL_LETTER_S",t[t.LATIN_CAPITAL_LETTER_T=84]="LATIN_CAPITAL_LETTER_T",t[t.LATIN_CAPITAL_LETTER_U=85]="LATIN_CAPITAL_LETTER_U",t[t.LATIN_CAPITAL_LETTER_V=86]="LATIN_CAPITAL_LETTER_V",t[t.LATIN_CAPITAL_LETTER_W=87]="LATIN_CAPITAL_LETTER_W",t[t.LATIN_CAPITAL_LETTER_X=88]="LATIN_CAPITAL_LETTER_X",t[t.LATIN_CAPITAL_LETTER_Y=89]="LATIN_CAPITAL_LETTER_Y",t[t.LATIN_CAPITAL_LETTER_Z=90]="LATIN_CAPITAL_LETTER_Z",t[t.LEFT_SQUARE_BRACKET=91]="LEFT_SQUARE_BRACKET",t[t.REVERSE_SOLIDUS=92]="REVERSE_SOLIDUS",t[t.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",t[t.CIRCUMFLEX_ACCENT=94]="CIRCUMFLEX_ACCENT",t[t.LOW_LINE=95]="LOW_LINE",t[t.GRAVE_ACCENT=96]="GRAVE_ACCENT",t[t.LATIN_SMALL_LETTER_A=97]="LATIN_SMALL_LETTER_A",t[t.LATIN_SMALL_LETTER_B=98]="LATIN_SMALL_LETTER_B",t[t.LATIN_SMALL_LETTER_C=99]="LATIN_SMALL_LETTER_C",t[t.LATIN_SMALL_LETTER_D=100]="LATIN_SMALL_LETTER_D",t[t.LATIN_SMALL_LETTER_E=101]="LATIN_SMALL_LETTER_E",t[t.LATIN_SMALL_LETTER_F=102]="LATIN_SMALL_LETTER_F",t[t.LATIN_SMALL_LETTER_G=103]="LATIN_SMALL_LETTER_G",t[t.LATIN_SMALL_LETTER_H=104]="LATIN_SMALL_LETTER_H",t[t.LATIN_SMALL_LETTER_I=105]="LATIN_SMALL_LETTER_I",t[t.LATIN_SMALL_LETTER_J=106]="LATIN_SMALL_LETTER_J",t[t.LATIN_SMALL_LETTER_K=107]="LATIN_SMALL_LETTER_K",t[t.LATIN_SMALL_LETTER_L=108]="LATIN_SMALL_LETTER_L",t[t.LATIN_SMALL_LETTER_M=109]="LATIN_SMALL_LETTER_M",t[t.LATIN_SMALL_LETTER_N=110]="LATIN_SMALL_LETTER_N",t[t.LATIN_SMALL_LETTER_O=111]="LATIN_SMALL_LETTER_O",t[t.LATIN_SMALL_LETTER_P=112]="LATIN_SMALL_LETTER_P",t[t.LATIN_SMALL_LETTER_Q=113]="LATIN_SMALL_LETTER_Q",t[t.LATIN_SMALL_LETTER_R=114]="LATIN_SMALL_LETTER_R",t[t.LATIN_SMALL_LETTER_S=115]="LATIN_SMALL_LETTER_S",t[t.LATIN_SMALL_LETTER_T=116]="LATIN_SMALL_LETTER_T",t[t.LATIN_SMALL_LETTER_U=117]="LATIN_SMALL_LETTER_U",t[t.LATIN_SMALL_LETTER_V=118]="LATIN_SMALL_LETTER_V",t[t.LATIN_SMALL_LETTER_W=119]="LATIN_SMALL_LETTER_W",t[t.LATIN_SMALL_LETTER_X=120]="LATIN_SMALL_LETTER_X",t[t.LATIN_SMALL_LETTER_Y=121]="LATIN_SMALL_LETTER_Y",t[t.LATIN_SMALL_LETTER_Z=122]="LATIN_SMALL_LETTER_Z",t[t.LEFT_CURLY_BRACKET=123]="LEFT_CURLY_BRACKET",t[t.VERTICAL_LINE=124]="VERTICAL_LINE",t[t.RIGHT_CURLY_BRACKET=125]="RIGHT_CURLY_BRACKET",t[t.TILDE=126]="TILDE"})(er||(er={}));er.QUOTATION_MARK+"",er.QUOTATION_MARK,er.REVERSE_SOLIDUS+"",er.REVERSE_SOLIDUS,er.SOLIDUS+"",er.SOLIDUS,er.LATIN_SMALL_LETTER_B+"",er.BACKSPACE,er.LATIN_SMALL_LETTER_F+"",er.FORM_FEED,er.LATIN_SMALL_LETTER_N+"",er.NEWLINE,er.LATIN_SMALL_LETTER_R+"",er.CARRIAGE_RETURN,er.LATIN_SMALL_LETTER_T+"",er.TAB;var D4;(function(t){t[t.LEFT_BRACE=0]="LEFT_BRACE",t[t.RIGHT_BRACE=1]="RIGHT_BRACE",t[t.LEFT_BRACKET=2]="LEFT_BRACKET",t[t.RIGHT_BRACKET=3]="RIGHT_BRACKET",t[t.COLON=4]="COLON",t[t.COMMA=5]="COMMA",t[t.TRUE=6]="TRUE",t[t.FALSE=7]="FALSE",t[t.NULL=8]="NULL",t[t.STRING=9]="STRING",t[t.NUMBER=10]="NUMBER",t[t.SEPARATOR=11]="SEPARATOR"})(D4||(D4={}));var I4;(function(t){t[t.START=0]="START",t[t.ENDED=1]="ENDED",t[t.ERROR=2]="ERROR",t[t.TRUE1=3]="TRUE1",t[t.TRUE2=4]="TRUE2",t[t.TRUE3=5]="TRUE3",t[t.FALSE1=6]="FALSE1",t[t.FALSE2=7]="FALSE2",t[t.FALSE3=8]="FALSE3",t[t.FALSE4=9]="FALSE4",t[t.NULL1=10]="NULL1",t[t.NULL2=11]="NULL2",t[t.NULL3=12]="NULL3",t[t.STRING_DEFAULT=13]="STRING_DEFAULT",t[t.STRING_AFTER_BACKSLASH=14]="STRING_AFTER_BACKSLASH",t[t.STRING_UNICODE_DIGIT_1=15]="STRING_UNICODE_DIGIT_1",t[t.STRING_UNICODE_DIGIT_2=16]="STRING_UNICODE_DIGIT_2",t[t.STRING_UNICODE_DIGIT_3=17]="STRING_UNICODE_DIGIT_3",t[t.STRING_UNICODE_DIGIT_4=18]="STRING_UNICODE_DIGIT_4",t[t.STRING_INCOMPLETE_CHAR=19]="STRING_INCOMPLETE_CHAR",t[t.NUMBER_AFTER_INITIAL_MINUS=20]="NUMBER_AFTER_INITIAL_MINUS",t[t.NUMBER_AFTER_INITIAL_ZERO=21]="NUMBER_AFTER_INITIAL_ZERO",t[t.NUMBER_AFTER_INITIAL_NON_ZERO=22]="NUMBER_AFTER_INITIAL_NON_ZERO",t[t.NUMBER_AFTER_FULL_STOP=23]="NUMBER_AFTER_FULL_STOP",t[t.NUMBER_AFTER_DECIMAL=24]="NUMBER_AFTER_DECIMAL",t[t.NUMBER_AFTER_E=25]="NUMBER_AFTER_E",t[t.NUMBER_AFTER_E_AND_SIGN=26]="NUMBER_AFTER_E_AND_SIGN",t[t.NUMBER_AFTER_E_AND_DIGIT=27]="NUMBER_AFTER_E_AND_DIGIT",t[t.SEPARATOR=28]="SEPARATOR"})(I4||(I4={}));var F4;(function(t){t[t.OBJECT=0]="OBJECT",t[t.ARRAY=1]="ARRAY"})(F4||(F4={}));var B4;(function(t){t[t.VALUE=0]="VALUE",t[t.KEY=1]="KEY",t[t.COLON=2]="COLON",t[t.COMMA=3]="COMMA",t[t.ENDED=4]="ENDED",t[t.ERROR=5]="ERROR",t[t.SEPARATOR=6]="SEPARATOR"})(B4||(B4={}));var OMt=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,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(l){return r[l]}).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(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch{typeof window=="object"&&(n=window)}t.exports=n},function(t,e,n){var r=n(6),i=Object.keys||function(y){var _=[];for(var T in y)_.push(T);return _};t.exports=p;var o=n(5);o.inherits=n(2);var s=n(23),l=n(14);o.inherits(p,s);for(var c=i(l.prototype),h=0;h - * @license MIT - */var i=n(38),o=n(39),s=n(40);function l(){return h.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function c(M,R){if(l()=l())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+l().toString(16)+" bytes");return 0|M}function _(M,R){if(h.isBuffer(M))return M.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(M)||M instanceof ArrayBuffer))return M.byteLength;typeof M!="string"&&(M=""+M);var z=M.length;if(z===0)return 0;for(var at=!1;;)switch(R){case"ascii":case"latin1":case"binary":return z;case"utf8":case"utf-8":case void 0:return tt(M).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*z;case"hex":return z>>>1;case"base64":return rt(M).length;default:if(at)return tt(M).length;R=(""+R).toLowerCase(),at=!0}}function T(M,R,z){var at=M[R];M[R]=M[z],M[z]=at}function x(M,R,z,at,st){if(M.length===0)return-1;if(typeof z=="string"?(at=z,z=0):z>2147483647?z=2147483647:z<-2147483648&&(z=-2147483648),z=+z,isNaN(z)&&(z=st?0:M.length-1),z<0&&(z=M.length+z),z>=M.length){if(st)return-1;z=M.length-1}else if(z<0){if(!st)return-1;z=0}if(typeof R=="string"&&(R=h.from(R,at)),h.isBuffer(R))return R.length===0?-1:w(M,R,z,at,st);if(typeof R=="number")return R&=255,h.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?st?Uint8Array.prototype.indexOf.call(M,R,z):Uint8Array.prototype.lastIndexOf.call(M,R,z):w(M,[R],z,at,st);throw new TypeError("val must be string, number or Buffer")}function w(M,R,z,at,st){var ht,bt=1,It=M.length,ft=R.length;if(at!==void 0&&((at=String(at).toLowerCase())==="ucs2"||at==="ucs-2"||at==="utf16le"||at==="utf-16le")){if(M.length<2||R.length<2)return-1;bt=2,It/=2,ft/=2,z/=2}function vt(Lt,jt){return bt===1?Lt[jt]:Lt.readUInt16BE(jt*bt)}if(st){var _t=-1;for(ht=z;htIt&&(z=It-ft),ht=z;ht>=0;ht--){for(var Ct=!0,Mt=0;Mtst&&(at=st):at=st;var ht=R.length;if(ht%2!=0)throw new TypeError("Invalid hex string");at>ht/2&&(at=ht/2);for(var bt=0;bt>8,ft=bt%256,vt.push(ft),vt.push(It);return vt}(R,M.length-z),M,z,at)}function B(M,R,z){return R===0&&z===M.length?i.fromByteArray(M):i.fromByteArray(M.slice(R,z))}function N(M,R,z){z=Math.min(M.length,z);for(var at=[],st=R;st239?4:vt>223?3:vt>191?2:1;if(st+Ct<=z)switch(Ct){case 1:vt<128&&(_t=vt);break;case 2:(192&(ht=M[st+1]))==128&&(ft=(31&vt)<<6|63&ht)>127&&(_t=ft);break;case 3:ht=M[st+1],bt=M[st+2],(192&ht)==128&&(192&bt)==128&&(ft=(15&vt)<<12|(63&ht)<<6|63&bt)>2047&&(ft<55296||ft>57343)&&(_t=ft);break;case 4:ht=M[st+1],bt=M[st+2],It=M[st+3],(192&ht)==128&&(192&bt)==128&&(192&It)==128&&(ft=(15&vt)<<18|(63&ht)<<12|(63&bt)<<6|63&It)>65535&&ft<1114112&&(_t=ft)}_t===null?(_t=65533,Ct=1):_t>65535&&(_t-=65536,at.push(_t>>>10&1023|55296),_t=56320|1023&_t),at.push(_t),st+=Ct}return function(Mt){var Lt=Mt.length;if(Lt<=V)return String.fromCharCode.apply(String,Mt);for(var jt="",dt=0;dtthis.length||((at===void 0||at>this.length)&&(at=this.length),at<=0)||(at>>>=0)<=(z>>>=0))return"";for(R||(R="utf8");;)switch(R){case"hex":return K(this,z,at);case"utf8":case"utf-8":return N(this,z,at);case"ascii":return Y(this,z,at);case"latin1":case"binary":return nt(this,z,at);case"base64":return B(this,z,at);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return J(this,z,at);default:if(st)throw new TypeError("Unknown encoding: "+R);R=(R+"").toLowerCase(),st=!0}}).apply(this,arguments)},h.prototype.equals=function(M){if(!h.isBuffer(M))throw new TypeError("Argument must be a Buffer");return this===M||h.compare(this,M)===0},h.prototype.inspect=function(){var M="",R=e.INSPECT_MAX_BYTES;return this.length>0&&(M=this.toString("hex",0,R).match(/.{2}/g).join(" "),this.length>R&&(M+=" ... ")),""},h.prototype.compare=function(M,R,z,at,st){if(!h.isBuffer(M))throw new TypeError("Argument must be a Buffer");if(R===void 0&&(R=0),z===void 0&&(z=M?M.length:0),at===void 0&&(at=0),st===void 0&&(st=this.length),R<0||z>M.length||at<0||st>this.length)throw new RangeError("out of range index");if(at>=st&&R>=z)return 0;if(at>=st)return-1;if(R>=z)return 1;if(R>>>=0,z>>>=0,at>>>=0,st>>>=0,this===M)return 0;for(var ht=st-at,bt=z-R,It=Math.min(ht,bt),ft=this.slice(at,st),vt=M.slice(R,z),_t=0;_tst)&&(z=st),M.length>0&&(z<0||R<0)||R>this.length)throw new RangeError("Attempt to write outside buffer bounds");at||(at="utf8");for(var ht=!1;;)switch(at){case"hex":return E(this,M,R,z);case"utf8":case"utf-8":return O(this,M,R,z);case"ascii":return k(this,M,R,z);case"latin1":case"binary":return P(this,M,R,z);case"base64":return A(this,M,R,z);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,M,R,z);default:if(ht)throw new TypeError("Unknown encoding: "+at);at=(""+at).toLowerCase(),ht=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var V=4096;function Y(M,R,z){var at="";z=Math.min(M.length,z);for(var st=R;stat)&&(z=at);for(var st="",ht=R;htz)throw new RangeError("Trying to access beyond buffer length")}function ct(M,R,z,at,st,ht){if(!h.isBuffer(M))throw new TypeError('"buffer" argument must be a Buffer instance');if(R>st||RM.length)throw new RangeError("Index out of range")}function G(M,R,z,at){R<0&&(R=65535+R+1);for(var st=0,ht=Math.min(M.length-z,2);st>>8*(at?st:1-st)}function $(M,R,z,at){R<0&&(R=4294967295+R+1);for(var st=0,ht=Math.min(M.length-z,4);st>>8*(at?st:3-st)&255}function I(M,R,z,at,st,ht){if(z+at>M.length)throw new RangeError("Index out of range");if(z<0)throw new RangeError("Index out of range")}function H(M,R,z,at,st){return st||I(M,0,z,4),o.write(M,R,z,at,23,4),z+4}function it(M,R,z,at,st){return st||I(M,0,z,8),o.write(M,R,z,at,52,8),z+8}h.prototype.slice=function(M,R){var z,at=this.length;if(M=~~M,R=R===void 0?at:~~R,M<0?(M+=at)<0&&(M=0):M>at&&(M=at),R<0?(R+=at)<0&&(R=0):R>at&&(R=at),R0&&(st*=256);)at+=this[M+--R]*st;return at},h.prototype.readUInt8=function(M,R){return R||et(M,1,this.length),this[M]},h.prototype.readUInt16LE=function(M,R){return R||et(M,2,this.length),this[M]|this[M+1]<<8},h.prototype.readUInt16BE=function(M,R){return R||et(M,2,this.length),this[M]<<8|this[M+1]},h.prototype.readUInt32LE=function(M,R){return R||et(M,4,this.length),(this[M]|this[M+1]<<8|this[M+2]<<16)+16777216*this[M+3]},h.prototype.readUInt32BE=function(M,R){return R||et(M,4,this.length),16777216*this[M]+(this[M+1]<<16|this[M+2]<<8|this[M+3])},h.prototype.readIntLE=function(M,R,z){M|=0,R|=0,z||et(M,R,this.length);for(var at=this[M],st=1,ht=0;++ht=(st*=128)&&(at-=Math.pow(2,8*R)),at},h.prototype.readIntBE=function(M,R,z){M|=0,R|=0,z||et(M,R,this.length);for(var at=R,st=1,ht=this[M+--at];at>0&&(st*=256);)ht+=this[M+--at]*st;return ht>=(st*=128)&&(ht-=Math.pow(2,8*R)),ht},h.prototype.readInt8=function(M,R){return R||et(M,1,this.length),128&this[M]?-1*(255-this[M]+1):this[M]},h.prototype.readInt16LE=function(M,R){R||et(M,2,this.length);var z=this[M]|this[M+1]<<8;return 32768&z?4294901760|z:z},h.prototype.readInt16BE=function(M,R){R||et(M,2,this.length);var z=this[M+1]|this[M]<<8;return 32768&z?4294901760|z:z},h.prototype.readInt32LE=function(M,R){return R||et(M,4,this.length),this[M]|this[M+1]<<8|this[M+2]<<16|this[M+3]<<24},h.prototype.readInt32BE=function(M,R){return R||et(M,4,this.length),this[M]<<24|this[M+1]<<16|this[M+2]<<8|this[M+3]},h.prototype.readFloatLE=function(M,R){return R||et(M,4,this.length),o.read(this,M,!0,23,4)},h.prototype.readFloatBE=function(M,R){return R||et(M,4,this.length),o.read(this,M,!1,23,4)},h.prototype.readDoubleLE=function(M,R){return R||et(M,8,this.length),o.read(this,M,!0,52,8)},h.prototype.readDoubleBE=function(M,R){return R||et(M,8,this.length),o.read(this,M,!1,52,8)},h.prototype.writeUIntLE=function(M,R,z,at){M=+M,R|=0,z|=0,at||ct(this,M,R,z,Math.pow(2,8*z)-1,0);var st=1,ht=0;for(this[R]=255&M;++ht=0&&(ht*=256);)this[R+st]=M/ht&255;return R+z},h.prototype.writeUInt8=function(M,R,z){return M=+M,R|=0,z||ct(this,M,R,1,255,0),h.TYPED_ARRAY_SUPPORT||(M=Math.floor(M)),this[R]=255&M,R+1},h.prototype.writeUInt16LE=function(M,R,z){return M=+M,R|=0,z||ct(this,M,R,2,65535,0),h.TYPED_ARRAY_SUPPORT?(this[R]=255&M,this[R+1]=M>>>8):G(this,M,R,!0),R+2},h.prototype.writeUInt16BE=function(M,R,z){return M=+M,R|=0,z||ct(this,M,R,2,65535,0),h.TYPED_ARRAY_SUPPORT?(this[R]=M>>>8,this[R+1]=255&M):G(this,M,R,!1),R+2},h.prototype.writeUInt32LE=function(M,R,z){return M=+M,R|=0,z||ct(this,M,R,4,4294967295,0),h.TYPED_ARRAY_SUPPORT?(this[R+3]=M>>>24,this[R+2]=M>>>16,this[R+1]=M>>>8,this[R]=255&M):$(this,M,R,!0),R+4},h.prototype.writeUInt32BE=function(M,R,z){return M=+M,R|=0,z||ct(this,M,R,4,4294967295,0),h.TYPED_ARRAY_SUPPORT?(this[R]=M>>>24,this[R+1]=M>>>16,this[R+2]=M>>>8,this[R+3]=255&M):$(this,M,R,!1),R+4},h.prototype.writeIntLE=function(M,R,z,at){if(M=+M,R|=0,!at){var st=Math.pow(2,8*z-1);ct(this,M,R,z,st-1,-st)}var ht=0,bt=1,It=0;for(this[R]=255&M;++ht>0)-It&255;return R+z},h.prototype.writeIntBE=function(M,R,z,at){if(M=+M,R|=0,!at){var st=Math.pow(2,8*z-1);ct(this,M,R,z,st-1,-st)}var ht=z-1,bt=1,It=0;for(this[R+ht]=255&M;--ht>=0&&(bt*=256);)M<0&&It===0&&this[R+ht+1]!==0&&(It=1),this[R+ht]=(M/bt>>0)-It&255;return R+z},h.prototype.writeInt8=function(M,R,z){return M=+M,R|=0,z||ct(this,M,R,1,127,-128),h.TYPED_ARRAY_SUPPORT||(M=Math.floor(M)),M<0&&(M=255+M+1),this[R]=255&M,R+1},h.prototype.writeInt16LE=function(M,R,z){return M=+M,R|=0,z||ct(this,M,R,2,32767,-32768),h.TYPED_ARRAY_SUPPORT?(this[R]=255&M,this[R+1]=M>>>8):G(this,M,R,!0),R+2},h.prototype.writeInt16BE=function(M,R,z){return M=+M,R|=0,z||ct(this,M,R,2,32767,-32768),h.TYPED_ARRAY_SUPPORT?(this[R]=M>>>8,this[R+1]=255&M):G(this,M,R,!1),R+2},h.prototype.writeInt32LE=function(M,R,z){return M=+M,R|=0,z||ct(this,M,R,4,2147483647,-2147483648),h.TYPED_ARRAY_SUPPORT?(this[R]=255&M,this[R+1]=M>>>8,this[R+2]=M>>>16,this[R+3]=M>>>24):$(this,M,R,!0),R+4},h.prototype.writeInt32BE=function(M,R,z){return M=+M,R|=0,z||ct(this,M,R,4,2147483647,-2147483648),M<0&&(M=4294967295+M+1),h.TYPED_ARRAY_SUPPORT?(this[R]=M>>>24,this[R+1]=M>>>16,this[R+2]=M>>>8,this[R+3]=255&M):$(this,M,R,!1),R+4},h.prototype.writeFloatLE=function(M,R,z){return H(this,M,R,!0,z)},h.prototype.writeFloatBE=function(M,R,z){return H(this,M,R,!1,z)},h.prototype.writeDoubleLE=function(M,R,z){return it(this,M,R,!0,z)},h.prototype.writeDoubleBE=function(M,R,z){return it(this,M,R,!1,z)},h.prototype.copy=function(M,R,z,at){if(z||(z=0),at||at===0||(at=this.length),R>=M.length&&(R=M.length),R||(R=0),at>0&&at=this.length)throw new RangeError("sourceStart out of bounds");if(at<0)throw new RangeError("sourceEnd out of bounds");at>this.length&&(at=this.length),M.length-R=0;--st)M[st+R]=this[st+z];else if(ht<1e3||!h.TYPED_ARRAY_SUPPORT)for(st=0;st>>=0,z=z===void 0?this.length:z>>>0,M||(M=0),typeof M=="number")for(ht=R;ht55295&&z<57344){if(!st){if(z>56319){(R-=3)>-1&&ht.push(239,191,189);continue}if(bt+1===at){(R-=3)>-1&&ht.push(239,191,189);continue}st=z;continue}if(z<56320){(R-=3)>-1&&ht.push(239,191,189),st=z;continue}z=65536+(st-55296<<10|z-56320)}else st&&(R-=3)>-1&&ht.push(239,191,189);if(st=null,z<128){if((R-=1)<0)break;ht.push(z)}else if(z<2048){if((R-=2)<0)break;ht.push(z>>6|192,63&z|128)}else if(z<65536){if((R-=3)<0)break;ht.push(z>>12|224,z>>6&63|128,63&z|128)}else{if(!(z<1114112))throw new Error("Invalid code point");if((R-=4)<0)break;ht.push(z>>18|240,z>>12&63|128,z>>6&63|128,63&z|128)}}return ht}function rt(M){return i.toByteArray(function(R){if((R=function(z){return z.trim?z.trim():z.replace(/^\s+|\s+$/g,"")}(R).replace(W,"")).length<2)return"";for(;R.length%4!=0;)R+="=";return R}(M))}function mt(M,R,z,at){for(var st=0;st=R.length||st>=M.length);++st)R[st+z]=M[st];return st}}).call(this,n(0))},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function l(T){if(n===setTimeout)return setTimeout(T,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(T,0);try{return n(T,0)}catch{try{return n.call(null,T,0)}catch{return n.call(this,T,0)}}}(function(){try{n=typeof setTimeout=="function"?setTimeout:o}catch{n=o}try{r=typeof clearTimeout=="function"?clearTimeout:s}catch{r=s}})();var c,h=[],d=!1,p=-1;function m(){d&&c&&(d=!1,c.length?h=c.concat(h):p=-1,h.length&&v())}function v(){if(!d){var T=l(m);d=!0;for(var x=h.length;x;){for(c=h,h=[];++p1)for(var w=1;w=0&&(l._idleTimeoutId=setTimeout(function(){l._onTimeout&&l._onTimeout()},c))},n(35),e.setImmediate=typeof self<"u"&&self.setImmediate||r!==void 0&&r.setImmediate||this&&this.setImmediate,e.clearImmediate=typeof self<"u"&&self.clearImmediate||r!==void 0&&r.clearImmediate||this&&this.clearImmediate}).call(this,n(0))},function(t,e){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}t.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(l){return typeof l=="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 l,c,h,d,p,m;if(this._events||(this._events={}),s==="error"&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if((l=arguments[1])instanceof Error)throw l;var v=new Error('Uncaught, unspecified "error" event. ('+l+")");throw v.context=l,v}if(o(c=this._events[s]))return!1;if(r(c))switch(arguments.length){case 1:c.call(this);break;case 2:c.call(this,arguments[1]);break;case 3:c.call(this,arguments[1],arguments[2]);break;default:d=Array.prototype.slice.call(arguments,1),c.apply(this,d)}else if(i(c))for(d=Array.prototype.slice.call(arguments,1),h=(m=c.slice()).length,p=0;p0&&this._events[s].length>c&&(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,l){if(!r(l))throw TypeError("listener must be a function");var c=!1;function h(){this.removeListener(s,h),c||(c=!0,l.apply(this,arguments))}return h.listener=l,this.on(s,h),this},n.prototype.removeListener=function(s,l){var c,h,d,p;if(!r(l))throw TypeError("listener must be a function");if(!this._events||!this._events[s])return this;if(d=(c=this._events[s]).length,h=-1,c===l||r(c.listener)&&c.listener===l)delete this._events[s],this._events.removeListener&&this.emit("removeListener",s,l);else if(i(c)){for(p=d;p-- >0;)if(c[p]===l||c[p].listener&&c[p].listener===l){h=p;break}if(h<0)return this;c.length===1?(c.length=0,delete this._events[s]):c.splice(h,1),this._events.removeListener&&this.emit("removeListener",s,l)}return this},n.prototype.removeAllListeners=function(s){var l,c;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(l in this._events)l!=="removeListener"&&this.removeAllListeners(l);return this.removeAllListeners("removeListener"),this._events={},this}if(r(c=this._events[s]))this.removeListener(s,c);else if(c)for(;c.length;)this.removeListener(s,c[c.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 l=this._events[s];if(r(l))return 1;if(l)return l.length}return 0},n.listenerCount=function(s,l){return s.listenerCount(l)}},function(t,e,n){(e=t.exports=n(23)).Stream=e,e.Readable=e,e.Writable=n(14),e.Duplex=n(1),e.Transform=n(27),e.PassThrough=n(45)},function(t,e,n){(function(r,i,o){var s=n(6);function l(N){var V=this;this.next=null,this.entry=null,this.finish=function(){(function(Y,nt,K){var J=Y.entry;for(Y.entry=null;J;){var et=J.callback;nt.pendingcb--,et(void 0),J=J.next}nt.corkedRequestsFree?nt.corkedRequestsFree.next=Y:nt.corkedRequestsFree=Y})(V,N)}}t.exports=E;var c,h=!r.browser&&["v0.10","v0.9."].indexOf(r.version.slice(0,5))>-1?i:s.nextTick;E.WritableState=w;var d=n(5);d.inherits=n(2);var p,m={deprecate:n(44)},v=n(24),y=n(7).Buffer,_=o.Uint8Array||function(){},T=n(25);function x(){}function w(N,V){c=c||n(1),N=N||{};var Y=V instanceof c;this.objectMode=!!N.objectMode,Y&&(this.objectMode=this.objectMode||!!N.writableObjectMode);var nt=N.highWaterMark,K=N.writableHighWaterMark,J=this.objectMode?16:16384;this.highWaterMark=nt||nt===0?nt:Y&&(K||K===0)?K:J,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 et=N.decodeStrings===!1;this.decodeStrings=!et,this.defaultEncoding=N.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ct){(function(G,$){var I=G._writableState,H=I.sync,it=I.writecb;if(function(Q){Q.writing=!1,Q.writecb=null,Q.length-=Q.writelen,Q.writelen=0}(I),$)(function(Q,tt,rt,mt,M){--tt.pendingcb,rt?(s.nextTick(M,mt),s.nextTick(B,Q,tt),Q._writableState.errorEmitted=!0,Q.emit("error",mt)):(M(mt),Q._writableState.errorEmitted=!0,Q.emit("error",mt),B(Q,tt))})(G,I,H,$,it);else{var W=A(I);W||I.corked||I.bufferProcessing||!I.bufferedRequest||P(G,I),H?h(k,G,I,W,it):k(G,I,W,it)}})(V,ct)},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 l(this)}function E(N){if(c=c||n(1),!(p.call(E,this)||this instanceof c))return new E(N);this._writableState=new w(N,this),this.writable=!0,N&&(typeof N.write=="function"&&(this._write=N.write),typeof N.writev=="function"&&(this._writev=N.writev),typeof N.destroy=="function"&&(this._destroy=N.destroy),typeof N.final=="function"&&(this._final=N.final)),v.call(this)}function O(N,V,Y,nt,K,J,et){V.writelen=nt,V.writecb=et,V.writing=!0,V.sync=!0,Y?N._writev(K,V.onwrite):N._write(K,J,V.onwrite),V.sync=!1}function k(N,V,Y,nt){Y||function(K,J){J.length===0&&J.needDrain&&(J.needDrain=!1,K.emit("drain"))}(N,V),V.pendingcb--,nt(),B(N,V)}function P(N,V){V.bufferProcessing=!0;var Y=V.bufferedRequest;if(N._writev&&Y&&Y.next){var nt=V.bufferedRequestCount,K=new Array(nt),J=V.corkedRequestsFree;J.entry=Y;for(var et=0,ct=!0;Y;)K[et]=Y,Y.isBuf||(ct=!1),Y=Y.next,et+=1;K.allBuffers=ct,O(N,V,!0,V.length,K,"",J.finish),V.pendingcb++,V.lastBufferedRequest=null,J.next?(V.corkedRequestsFree=J.next,J.next=null):V.corkedRequestsFree=new l(V),V.bufferedRequestCount=0}else{for(;Y;){var G=Y.chunk,$=Y.encoding,I=Y.callback;if(O(N,V,!1,V.objectMode?1:G.length,G,$,I),Y=Y.next,V.bufferedRequestCount--,V.writing)break}Y===null&&(V.lastBufferedRequest=null)}V.bufferedRequest=Y,V.bufferProcessing=!1}function A(N){return N.ending&&N.length===0&&N.bufferedRequest===null&&!N.finished&&!N.writing}function j(N,V){N._final(function(Y){V.pendingcb--,Y&&N.emit("error",Y),V.prefinished=!0,N.emit("prefinish"),B(N,V)})}function B(N,V){var Y=A(V);return Y&&(function(nt,K){K.prefinished||K.finalCalled||(typeof nt._final=="function"?(K.pendingcb++,K.finalCalled=!0,s.nextTick(j,nt,K)):(K.prefinished=!0,nt.emit("prefinish")))}(N,V),V.pendingcb===0&&(V.finished=!0,N.emit("finish"))),Y}d.inherits(E,v),w.prototype.getBuffer=function(){for(var N=this.bufferedRequest,V=[];N;)V.push(N),N=N.next;return V},function(){try{Object.defineProperty(w.prototype,"buffer",{get:m.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"?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(E,Symbol.hasInstance,{value:function(N){return!!p.call(this,N)||this===E&&N&&N._writableState instanceof w}})):p=function(N){return N instanceof this},E.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},E.prototype.write=function(N,V,Y){var nt=this._writableState,K=!1,J=!nt.objectMode&&function(et){return y.isBuffer(et)||et instanceof _}(N);return J&&!y.isBuffer(N)&&(N=function(et){return y.from(et)}(N)),typeof V=="function"&&(Y=V,V=null),J?V="buffer":V||(V=nt.defaultEncoding),typeof Y!="function"&&(Y=x),nt.ended?function(et,ct){var G=new Error("write after end");et.emit("error",G),s.nextTick(ct,G)}(this,Y):(J||function(et,ct,G,$){var I=!0,H=!1;return G===null?H=new TypeError("May not write null values to stream"):typeof G=="string"||G===void 0||ct.objectMode||(H=new TypeError("Invalid non-string/buffer chunk")),H&&(et.emit("error",H),s.nextTick($,H),I=!1),I}(this,nt,N,Y))&&(nt.pendingcb++,K=function(et,ct,G,$,I,H){if(!G){var it=function(rt,mt,M){return rt.objectMode||rt.decodeStrings===!1||typeof mt!="string"||(mt=y.from(mt,M)),mt}(ct,$,I);$!==it&&(G=!0,I="buffer",$=it)}var W=ct.objectMode?1:$.length;ct.length+=W;var Q=ct.length-1))throw new TypeError("Unknown encoding: "+N);return this._writableState.defaultEncoding=N,this},Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),E.prototype._write=function(N,V,Y){Y(new Error("_write() is not implemented"))},E.prototype._writev=null,E.prototype.end=function(N,V,Y){var nt=this._writableState;typeof N=="function"?(Y=N,N=null,V=null):typeof V=="function"&&(Y=V,V=null),N!=null&&this.write(N,V),nt.corked&&(nt.corked=1,this.uncork()),nt.ending||nt.finished||function(K,J,et){J.ending=!0,B(K,J),et&&(J.finished?s.nextTick(et):K.once("finish",et)),J.ended=!0,K.writable=!1}(this,nt,Y)},Object.defineProperty(E.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(N){this._writableState&&(this._writableState.destroyed=N)}}),E.prototype.destroy=T.destroy,E.prototype._undestroy=T.undestroy,E.prototype._destroy=function(N,V){this.end(),V(N)}}).call(this,n(4),n(11).setImmediate,n(0))},function(t,e,n){(function(r,i,o){t.exports=function s(l,c,h){function d(v,y){if(!c[v]){if(!l[v]){var _=typeof _dereq_=="function"&&_dereq_;if(!y&&_)return _(v,!0);if(p)return p(v,!0);var T=new Error("Cannot find module '"+v+"'");throw T.code="MODULE_NOT_FOUND",T}var x=c[v]={exports:{}};l[v][0].call(x.exports,function(w){return d(l[v][1][w]||w)},x,x.exports,s,l,c,h)}return c[v].exports}for(var p=typeof _dereq_=="function"&&_dereq_,m=0;m0;){var w=x.shift();if(typeof w=="function"){var E=x.shift(),O=x.shift();w.call(E,O)}else w._settlePromises()}},v.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},v.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},v.prototype._reset=function(){this._isTickUsed=!1},l.exports=v,l.exports.firstLineError=h},{"./queue":26,"./schedule":29,"./util":36}],3:[function(s,l,c){l.exports=function(h,d,p,m){var v=!1,y=function(w,E){this._reject(E)},_=function(w,E){E.promiseRejectionQueued=!0,E.bindingPromise._then(y,y,null,this,w)},T=function(w,E){!(50397184&this._bitField)&&this._resolveCallback(E.target)},x=function(w,E){E.promiseRejectionQueued||this._reject(w)};h.prototype.bind=function(w){v||(v=!0,h.prototype._propagateFrom=m.propagateFromFunction(),h.prototype._boundValue=m.boundValueFunction());var E=p(w),O=new h(d);O._propagateFrom(this,1);var k=this._target();if(O._setBoundTo(E),E instanceof h){var P={promiseRejectionQueued:!1,promise:O,target:k,bindingPromise:E};k._then(d,_,void 0,O,P),E._then(T,x,void 0,O,P),O._setOnCancel(E)}else O._resolveCallback(k);return O},h.prototype._setBoundTo=function(w){w!==void 0?(this._bitField=2097152|this._bitField,this._boundTo=w):this._bitField=-2097153&this._bitField},h.prototype._isBound=function(){return(2097152&this._bitField)==2097152},h.bind=function(w,E){return h.resolve(E).bind(w)}}},{}],4:[function(s,l,c){var h;typeof Promise<"u"&&(h=Promise);var d=s("./promise")();d.noConflict=function(){try{Promise===d&&(Promise=h)}catch{}return d},l.exports=d},{"./promise":22}],5:[function(s,l,c){var h=Object.create;if(h){var d=h(null),p=h(null);d[" size"]=p[" size"]=0}l.exports=function(m){var v=s("./util"),y=v.canEvaluate;function _(w){return function(E,O){var k;if(E!=null&&(k=E[O]),typeof k!="function"){var P="Object "+v.classString(E)+" has no method '"+v.toString(O)+"'";throw new m.TypeError(P)}return k}(w,this.pop()).apply(w,this)}function T(w){return w[this]}function x(w){var E=+this;return E<0&&(E=Math.max(0,E+w.length)),w[E]}v.isIdentifier,m.prototype.call=function(w){var E=[].slice.call(arguments,1);return E.push(w),this._then(_,void 0,void 0,E,void 0)},m.prototype.get=function(w){var E;if(typeof w=="number")E=x;else if(y){var O=(void 0)(w);E=O!==null?O:T}else E=T;return this._then(E,void 0,void 0,w,void 0)}}},{"./util":36}],6:[function(s,l,c){l.exports=function(h,d,p,m){var v=s("./util"),y=v.tryCatch,_=v.errorObj,T=h._async;h.prototype.break=h.prototype.cancel=function(){if(!m.cancellation())return this._warn("cancellation is disabled");for(var x=this,w=x;x._isCancellable();){if(!x._cancelBy(w)){w._isFollowing()?w._followee().cancel():w._cancelBranched();break}var E=x._cancellationParent;if(E==null||!E._isCancellable()){x._isFollowing()?x._followee().cancel():x._cancelBranched();break}x._isFollowing()&&x._followee().cancel(),x._setWillBeCancelled(),w=x,x=E}},h.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},h.prototype._enoughBranchesHaveCancelled=function(){return this._branchesRemainingToCancel===void 0||this._branchesRemainingToCancel<=0},h.prototype._cancelBy=function(x){return x===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},h.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},h.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),T.invoke(this._cancelPromises,this,void 0))},h.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},h.prototype._unsetOnCancel=function(){this._onCancelField=void 0},h.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},h.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},h.prototype._doInvokeOnCancel=function(x,w){if(v.isArray(x))for(var E=0;E=0)return p[y]}return h.prototype._promiseCreated=function(){},h.prototype._pushContext=function(){},h.prototype._popContext=function(){return null},h._peekContext=h.prototype._peekContext=function(){},m.prototype._pushContext=function(){this._trace!==void 0&&(this._trace._promiseCreated=null,p.push(this._trace))},m.prototype._popContext=function(){if(this._trace!==void 0){var y=p.pop(),_=y._promiseCreated;return y._promiseCreated=null,_}return null},m.CapturedTrace=null,m.create=function(){if(d)return new m},m.deactivateLongStackTraces=function(){},m.activateLongStackTraces=function(){var y=h.prototype._pushContext,_=h.prototype._popContext,T=h._peekContext,x=h.prototype._peekContext,w=h.prototype._promiseCreated;m.deactivateLongStackTraces=function(){h.prototype._pushContext=y,h.prototype._popContext=_,h._peekContext=T,h.prototype._peekContext=x,h.prototype._promiseCreated=w,d=!1},d=!0,h.prototype._pushContext=m.prototype._pushContext,h.prototype._popContext=m.prototype._popContext,h._peekContext=h.prototype._peekContext=v,h.prototype._promiseCreated=function(){var E=this._peekContext();E&&E._promiseCreated==null&&(E._promiseCreated=this)}},m}},{}],9:[function(s,l,c){l.exports=function(h,d){var p,m,v,y=h._getDomain,_=h._async,T=s("./errors").Warning,x=s("./util"),w=x.canAttachTrace,E=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,O=/\((?:timers\.js):\d+:\d+\)/,k=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,P=null,A=null,j=!1,B=x.env("BLUEBIRD_DEBUG")!=0,N=!(x.env("BLUEBIRD_WARNINGS")==0||!B&&!x.env("BLUEBIRD_WARNINGS")),V=!(x.env("BLUEBIRD_LONG_STACK_TRACES")==0||!B&&!x.env("BLUEBIRD_LONG_STACK_TRACES")),Y=x.env("BLUEBIRD_W_FORGOTTEN_RETURN")!=0&&(N||!!x.env("BLUEBIRD_W_FORGOTTEN_RETURN"));h.prototype.suppressUnhandledRejections=function(){var dt=this._target();dt._bitField=-1048577&dt._bitField|524288},h.prototype._ensurePossibleRejectionHandled=function(){if(!(524288&this._bitField)){this._setRejectionIsUnhandled();var dt=this;setTimeout(function(){dt._notifyUnhandledRejection()},1)}},h.prototype._notifyUnhandledRejectionIsHandled=function(){bt("rejectionHandled",p,void 0,this)},h.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},h.prototype._returnedNonUndefined=function(){return(268435456&this._bitField)!=0},h.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var dt=this._settledValue();this._setUnhandledRejectionIsNotified(),bt("unhandledRejection",m,dt,this)}},h.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},h.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},h.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},h.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},h.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},h.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},h.prototype._warn=function(dt,pt,xt){return z(dt,pt,xt||this)},h.onPossiblyUnhandledRejection=function(dt){var pt=y();m=typeof dt=="function"?pt===null?dt:x.domainBind(pt,dt):void 0},h.onUnhandledRejectionHandled=function(dt){var pt=y();p=typeof dt=="function"?pt===null?dt:x.domainBind(pt,dt):void 0};var nt=function(){};h.longStackTraces=function(){if(_.haveItemsQueued()&&!jt.longStackTraces)throw new Error(`cannot enable long stack traces after promises have been created - - See http://goo.gl/MqrFmX -`);if(!jt.longStackTraces&&ft()){var dt=h.prototype._captureStackTrace,pt=h.prototype._attachExtraTrace;jt.longStackTraces=!0,nt=function(){if(_.haveItemsQueued()&&!jt.longStackTraces)throw new Error(`cannot enable long stack traces after promises have been created - - See http://goo.gl/MqrFmX -`);h.prototype._captureStackTrace=dt,h.prototype._attachExtraTrace=pt,d.deactivateLongStackTraces(),_.enableTrampoline(),jt.longStackTraces=!1},h.prototype._captureStackTrace=M,h.prototype._attachExtraTrace=R,d.activateLongStackTraces(),_.disableTrampolineIfNecessary()}},h.hasLongStackTraces=function(){return jt.longStackTraces&&ft()};var K=function(){try{if(typeof CustomEvent=="function"){var dt=new CustomEvent("CustomEvent");return x.global.dispatchEvent(dt),function(pt,xt){var yt=new CustomEvent(pt.toLowerCase(),{detail:xt,cancelable:!0});return!x.global.dispatchEvent(yt)}}return typeof Event=="function"?(dt=new Event("CustomEvent"),x.global.dispatchEvent(dt),function(pt,xt){var yt=new Event(pt.toLowerCase(),{cancelable:!0});return yt.detail=xt,!x.global.dispatchEvent(yt)}):((dt=document.createEvent("CustomEvent")).initCustomEvent("testingtheevent",!1,!0,{}),x.global.dispatchEvent(dt),function(pt,xt){var yt=document.createEvent("CustomEvent");return yt.initCustomEvent(pt.toLowerCase(),!1,!0,xt),!x.global.dispatchEvent(yt)})}catch{}return function(){return!1}}(),J=x.isNode?function(){return r.emit.apply(r,arguments)}:x.global?function(dt){var pt="on"+dt.toLowerCase(),xt=x.global[pt];return!!xt&&(xt.apply(x.global,[].slice.call(arguments,1)),!0)}:function(){return!1};function et(dt,pt){return{promise:pt}}var ct={promiseCreated:et,promiseFulfilled:et,promiseRejected:et,promiseResolved:et,promiseCancelled:et,promiseChained:function(dt,pt,xt){return{promise:pt,child:xt}},warning:function(dt,pt){return{warning:pt}},unhandledRejection:function(dt,pt,xt){return{reason:pt,promise:xt}},rejectionHandled:et},G=function(dt){var pt=!1;try{pt=J.apply(null,arguments)}catch(yt){_.throwLater(yt),pt=!0}var xt=!1;try{xt=K(dt,ct[dt].apply(null,arguments))}catch(yt){_.throwLater(yt),xt=!0}return xt||pt};function $(){return!1}function I(dt,pt,xt){var yt=this;try{dt(pt,xt,function(Et){if(typeof Et!="function")throw new TypeError("onCancel must be a function, got: "+x.toString(Et));yt._attachCancellationCallback(Et)})}catch(Et){return Et}}function H(dt){if(!this._isCancellable())return this;var pt=this._onCancel();pt!==void 0?x.isArray(pt)?pt.push(dt):this._setOnCancel([pt,dt]):this._setOnCancel(dt)}function it(){return this._onCancelField}function W(dt){this._onCancelField=dt}function Q(){this._cancellationParent=void 0,this._onCancelField=void 0}function tt(dt,pt){if(1&pt){this._cancellationParent=dt;var xt=dt._branchesRemainingToCancel;xt===void 0&&(xt=0),dt._branchesRemainingToCancel=xt+1}2&pt&&dt._isBound()&&this._setBoundTo(dt._boundTo)}h.config=function(dt){if("longStackTraces"in(dt=Object(dt))&&(dt.longStackTraces?h.longStackTraces():!dt.longStackTraces&&h.hasLongStackTraces()&&nt()),"warnings"in dt){var pt=dt.warnings;jt.warnings=!!pt,Y=jt.warnings,x.isObject(pt)&&"wForgottenReturn"in pt&&(Y=!!pt.wForgottenReturn)}if("cancellation"in dt&&dt.cancellation&&!jt.cancellation){if(_.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");h.prototype._clearCancellationData=Q,h.prototype._propagateFrom=tt,h.prototype._onCancel=it,h.prototype._setOnCancel=W,h.prototype._attachCancellationCallback=H,h.prototype._execute=I,rt=tt,jt.cancellation=!0}return"monitoring"in dt&&(dt.monitoring&&!jt.monitoring?(jt.monitoring=!0,h.prototype._fireEvent=G):!dt.monitoring&&jt.monitoring&&(jt.monitoring=!1,h.prototype._fireEvent=$)),h},h.prototype._fireEvent=$,h.prototype._execute=function(dt,pt,xt){try{dt(pt,xt)}catch(yt){return yt}},h.prototype._onCancel=function(){},h.prototype._setOnCancel=function(dt){},h.prototype._attachCancellationCallback=function(dt){},h.prototype._captureStackTrace=function(){},h.prototype._attachExtraTrace=function(){},h.prototype._clearCancellationData=function(){},h.prototype._propagateFrom=function(dt,pt){};var rt=function(dt,pt){2&pt&&dt._isBound()&&this._setBoundTo(dt._boundTo)};function mt(){var dt=this._boundTo;return dt!==void 0&&dt instanceof h?dt.isFulfilled()?dt.value():void 0:dt}function M(){this._trace=new Mt(this._peekContext())}function R(dt,pt){if(w(dt)){var xt=this._trace;if(xt!==void 0&&pt&&(xt=xt._parent),xt!==void 0)xt.attachExtraTrace(dt);else if(!dt.__stackCleaned__){var yt=st(dt);x.notEnumerableProp(dt,"stack",yt.message+` -`+yt.stack.join(` -`)),x.notEnumerableProp(dt,"__stackCleaned__",!0)}}}function z(dt,pt,xt){if(jt.warnings){var yt,Et=new T(dt);if(pt)xt._attachExtraTrace(Et);else if(jt.longStackTraces&&(yt=h._peekContext()))yt.attachExtraTrace(Et);else{var At=st(Et);Et.stack=At.message+` -`+At.stack.join(` -`)}G("warning",Et)||ht(Et,"",!0)}}function at(dt){for(var pt=[],xt=0;xt0?function(yt){for(var Et=yt.stack.replace(/\s+$/g,"").split(` -`),At=0;At0&&yt.name!="SyntaxError"&&(Et=Et.slice(At)),Et}(dt):[" (No stack trace)"],{message:xt,stack:dt.name=="SyntaxError"?pt:at(pt)}}function ht(dt,pt,xt){if(typeof console<"u"){var yt;if(x.isObject(dt)){var Et=dt.stack;yt=pt+A(Et,dt)}else yt=pt+String(dt);typeof v=="function"?v(yt,xt):typeof console.log!="function"&&typeof console.log!="object"||console.log(yt)}}function bt(dt,pt,xt,yt){var Et=!1;try{typeof pt=="function"&&(Et=!0,dt==="rejectionHandled"?pt(yt):pt(xt,yt))}catch(At){_.throwLater(At)}dt==="unhandledRejection"?G(dt,xt,yt)||Et||ht(xt,"Unhandled rejection "):G(dt,yt)}function It(dt){var pt;if(typeof dt=="function")pt="[function "+(dt.name||"anonymous")+"]";else{if(pt=dt&&typeof dt.toString=="function"?dt.toString():x.toString(dt),/\[object [a-zA-Z0-9$_]+\]/.test(pt))try{pt=JSON.stringify(dt)}catch{}pt.length===0&&(pt="(empty array)")}return"(<"+function(xt){return xt.length<41?xt:xt.substr(0,38)+"..."}(pt)+">, no stack trace)"}function ft(){return typeof Lt=="function"}var vt=function(){return!1},_t=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function Ct(dt){var pt=dt.match(_t);if(pt)return{fileName:pt[1],line:parseInt(pt[2],10)}}function Mt(dt){this._parent=dt,this._promisesCreated=0;var pt=this._length=1+(dt===void 0?0:dt._length);Lt(this,Mt),pt>32&&this.uncycle()}x.inherits(Mt,Error),d.CapturedTrace=Mt,Mt.prototype.uncycle=function(){var dt=this._length;if(!(dt<2)){for(var pt=[],xt={},yt=0,Et=this;Et!==void 0;++yt)pt.push(Et),Et=Et._parent;for(yt=(dt=this._length=yt)-1;yt>=0;--yt){var At=pt[yt].stack;xt[At]===void 0&&(xt[At]=yt)}for(yt=0;yt0&&(pt[Bt-1]._parent=void 0,pt[Bt-1]._length=1),pt[yt]._parent=void 0,pt[yt]._length=1;var ie=yt>0?pt[yt-1]:this;Bt=0;--ee)pt[ee]._length=ae,ae++;return}}}},Mt.prototype.attachExtraTrace=function(dt){if(!dt.__stackCleaned__){this.uncycle();for(var pt=st(dt),xt=pt.message,yt=[pt.stack],Et=this;Et!==void 0;)yt.push(at(Et.stack.split(` -`))),Et=Et._parent;(function(At){for(var Bt=At[0],ie=1;ie=0;--On)if(ae[On]===Ve){Fe=On;break}for(On=Fe;On>=0;--On){var gr=ae[On];if(Bt[ee]!==gr)break;Bt.pop(),ee--}Bt=ae}})(yt),function(At){for(var Bt=0;Bt=0)return P=/@/,A=pt,j=!0,function(At){At.stack=new Error().stack};try{throw new Error}catch(At){yt="stack"in At}return"stack"in Et||!yt||typeof Error.stackTraceLimit!="number"?(A=function(At,Bt){return typeof At=="string"?At:typeof Bt!="object"&&typeof Bt!="function"||Bt.name===void 0||Bt.message===void 0?It(Bt):Bt.toString()},null):(P=dt,A=pt,function(At){Error.stackTraceLimit+=6;try{throw new Error}catch(Bt){At.stack=Bt.stack}Error.stackTraceLimit-=6})}();typeof console<"u"&&console.warn!==void 0&&(v=function(dt){console.warn(dt)},x.isNode&&r.stderr.isTTY?v=function(dt,pt){var xt=pt?"\x1B[33m":"\x1B[31m";console.warn(xt+dt+`\x1B[0m -`)}:x.isNode||typeof new Error().stack!="string"||(v=function(dt,pt){console.warn("%c"+dt,pt?"color: darkorange":"color: red")}));var jt={warnings:N,longStackTraces:!1,cancellation:!1,monitoring:!1};return V&&h.longStackTraces(),{longStackTraces:function(){return jt.longStackTraces},warnings:function(){return jt.warnings},cancellation:function(){return jt.cancellation},monitoring:function(){return jt.monitoring},propagateFromFunction:function(){return rt},boundValueFunction:function(){return mt},checkForgottenReturns:function(dt,pt,xt,yt,Et){if(dt===void 0&&pt!==null&&Y){if(Et!==void 0&&Et._returnedNonUndefined()||!(65535&yt._bitField))return;xt&&(xt+=" ");var At="",Bt="";if(pt._trace){for(var ie=pt._trace.stack.split(` -`),ae=at(ie),ee=ae.length-1;ee>=0;--ee){var Ve=ae[ee];if(!O.test(Ve)){var Fe=Ve.match(k);Fe&&(At="at "+Fe[1]+":"+Fe[2]+":"+Fe[3]+" ");break}}if(ae.length>0){var On=ae[0];for(ee=0;ee0&&(Bt=` -`+ie[ee-1]);break}}}var gr="a promise was created in a "+xt+"handler "+At+"but was not returned from it, see http://goo.gl/rRqMUw"+Bt;yt._warn(gr,!0,pt)}},setBounds:function(dt,pt){if(ft()){for(var xt,yt,Et=dt.stack.split(` -`),At=pt.stack.split(` -`),Bt=-1,ie=-1,ae=0;ae=ie||(vt=function(Ve){if(E.test(Ve))return!0;var Fe=Ct(Ve);return!!(Fe&&Fe.fileName===xt&&Bt<=Fe.line&&Fe.line<=ie)})}},warn:z,deprecated:function(dt,pt){var xt=dt+" is deprecated and will be removed in a future version.";return pt&&(xt+=" Use "+pt+" instead."),z(xt)},CapturedTrace:Mt,fireDomEvent:K,fireGlobalEvent:J}}},{"./errors":12,"./util":36}],10:[function(s,l,c){l.exports=function(h){function d(){return this.value}function p(){throw this.reason}h.prototype.return=h.prototype.thenReturn=function(m){return m instanceof h&&m.suppressUnhandledRejections(),this._then(d,void 0,void 0,{value:m},void 0)},h.prototype.throw=h.prototype.thenThrow=function(m){return this._then(p,void 0,void 0,{reason:m},void 0)},h.prototype.catchThrow=function(m){if(arguments.length<=1)return this._then(void 0,p,void 0,{reason:m},void 0);var v=arguments[1];return this.caught(m,function(){throw v})},h.prototype.catchReturn=function(m){if(arguments.length<=1)return m instanceof h&&m.suppressUnhandledRejections(),this._then(void 0,d,void 0,{value:m},void 0);var v=arguments[1];return v instanceof h&&v.suppressUnhandledRejections(),this.caught(m,function(){return v})}}},{}],11:[function(s,l,c){l.exports=function(h,d){var p=h.reduce,m=h.all;function v(){return m(this)}h.prototype.each=function(y){return p(this,y,d,0)._then(v,void 0,void 0,this,void 0)},h.prototype.mapSeries=function(y){return p(this,y,d,d)},h.each=function(y,_){return p(y,_,d,0)._then(v,void 0,void 0,y,void 0)},h.mapSeries=function(y,_){return p(y,_,d,d)}}},{}],12:[function(s,l,c){var h,d,p=s("./es5"),m=p.freeze,v=s("./util"),y=v.inherits,_=v.notEnumerableProp;function T(N,V){function Y(nt){if(!(this instanceof Y))return new Y(nt);_(this,"message",typeof nt=="string"?nt:V),_(this,"name",N),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return y(Y,Error),Y}var x=T("Warning","warning"),w=T("CancellationError","cancellation error"),E=T("TimeoutError","timeout error"),O=T("AggregateError","aggregate error");try{h=TypeError,d=RangeError}catch{h=T("TypeError","type error"),d=T("RangeError","range error")}for(var k="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),P=0;P1?P.cancelPromise._reject(A):P.cancelPromise._cancel(),P.cancelPromise=null,!0)}function E(){return k.call(this,this.promise._target()._settledValue())}function O(P){if(!w(this,P))return y.e=P,y}function k(P){var A=this.promise,j=this.handler;if(!this.called){this.called=!0;var B=this.isFinallyHandler()?j.call(A._boundValue()):j.call(A._boundValue(),P);if(B===p)return B;if(B!==void 0){A._setReturnedNonUndefined();var N=d(B,A);if(N instanceof h){if(this.cancelPromise!=null){if(N._isCancelled()){var V=new v("late cancellation observer");return A._attachExtraTrace(V),y.e=V,y}N.isPending()&&N._attachCancellationCallback(new x(this))}return N._then(E,O,void 0,this,void 0)}}}return A.isRejected()?(w(this),y.e=P,y):(w(this),P)}return T.prototype.isFinallyHandler=function(){return this.type===0},x.prototype._resultCancelled=function(){w(this.finallyHandler)},h.prototype._passThrough=function(P,A,j,B){return typeof P!="function"?this.then():this._then(j,B,void 0,new T(this,A,P),void 0)},h.prototype.lastly=h.prototype.finally=function(P){return this._passThrough(P,0,k,k)},h.prototype.tap=function(P){return this._passThrough(P,1,k)},h.prototype.tapCatch=function(P){var A=arguments.length;if(A===1)return this._passThrough(P,1,void 0,k);var j,B=new Array(A-1),N=0;for(j=0;j0&&typeof arguments[x]=="function"&&(T=arguments[x]);var w=[].slice.call(arguments);T&&w.pop();var E=new d(w).promise();return T!==void 0?E.spread(T):E}}},{"./util":36}],18:[function(s,l,c){l.exports=function(h,d,p,m,v,y){var _=h._getDomain,T=s("./util"),x=T.tryCatch,w=T.errorObj,E=h._async;function O(P,A,j,B){this.constructor$(P),this._promise._captureStackTrace();var N=_();this._callback=N===null?A:T.domainBind(N,A),this._preservedValues=B===v?new Array(this.length()):null,this._limit=j,this._inFlight=0,this._queue=[],E.invoke(this._asyncInit,this,void 0)}function k(P,A,j,B){if(typeof A!="function")return p("expecting a function but got "+T.classString(A));var N=0;if(j!==void 0){if(typeof j!="object"||j===null)return h.reject(new TypeError("options argument must be an object but it is "+T.classString(j)));if(typeof j.concurrency!="number")return h.reject(new TypeError("'concurrency' must be a number but it is "+T.classString(j.concurrency)));N=j.concurrency}return new O(P,A,N=typeof N=="number"&&isFinite(N)&&N>=1?N:0,B).promise()}T.inherits(O,d),O.prototype._asyncInit=function(){this._init$(void 0,-2)},O.prototype._init=function(){},O.prototype._promiseFulfilled=function(P,A){var j=this._values,B=this.length(),N=this._preservedValues,V=this._limit;if(A<0){if(j[A=-1*A-1]=P,V>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(V>=1&&this._inFlight>=V)return j[A]=P,this._queue.push(A),!1;N!==null&&(N[A]=P);var Y=this._promise,nt=this._callback,K=Y._boundValue();Y._pushContext();var J=x(nt).call(K,P,A,B),et=Y._popContext();if(y.checkForgottenReturns(J,et,N!==null?"Promise.filter":"Promise.map",Y),J===w)return this._reject(J.e),!0;var ct=m(J,this._promise);if(ct instanceof h){var G=(ct=ct._target())._bitField;if(!(50397184&G))return V>=1&&this._inFlight++,j[A]=ct,ct._proxy(this,-1*(A+1)),!1;if(!(33554432&G))return 16777216&G?(this._reject(ct._reason()),!0):(this._cancel(),!0);J=ct._value()}j[A]=J}return++this._totalResolved>=B&&(N!==null?this._filter(j,N):this._resolve(j),!0)},O.prototype._drainQueue=function(){for(var P=this._queue,A=this._limit,j=this._values;P.length>0&&this._inFlight1){v.deprecated("calling Promise.try with more than 1 argument");var E=arguments[1],O=arguments[2];x=y.isArray(E)?_(T).apply(O,E):_(T).call(O,E)}else x=_(T)();var k=w._popContext();return v.checkForgottenReturns(x,k,"Promise.try",w),w._resolveFromSyncValue(x),w},h.prototype._resolveFromSyncValue=function(T){T===y.errorObj?this._rejectCallback(T.e,!1):this._resolveCallback(T,!0)}}},{"./util":36}],20:[function(s,l,c){var h=s("./util"),d=h.maybeWrapAsError,p=s("./errors").OperationalError,m=s("./es5"),v=/^(?:name|message|stack|cause)$/;function y(_){var T;if(function(O){return O instanceof Error&&m.getPrototypeOf(O)===Error.prototype}(_)){(T=new p(_)).name=_.name,T.message=_.message,T.stack=_.stack;for(var x=m.keys(_),w=0;w1){var tt,rt=new Array(Q-1),mt=0;for(tt=0;tt0&&typeof W!="function"&&typeof Q!="function"){var tt=".then() only accepts functions but was passed: "+_.classString(W);arguments.length>1&&(tt+=", "+_.classString(Q)),this._warn(tt)}return this._then(W,Q,void 0,void 0,void 0)},$.prototype.done=function(W,Q){this._then(W,Q,void 0,void 0,void 0)._setIsFinal()},$.prototype.spread=function(W){return typeof W!="function"?p("expecting a function but got "+_.classString(W)):this.all()._then(W,void 0,void 0,A,void 0)},$.prototype.toJSON=function(){var W={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(W.fulfillmentValue=this.value(),W.isFulfilled=!0):this.isRejected()&&(W.rejectionReason=this.reason(),W.isRejected=!0),W},$.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new N(this).promise()},$.prototype.error=function(W){return this.caught(_.originatesFromRejection,W)},$.getNewLibraryCopy=l.exports,$.is=function(W){return W instanceof $},$.fromNode=$.fromCallback=function(W){var Q=new $(P);Q._captureStackTrace();var tt=arguments.length>1&&!!Object(arguments[1]).multiArgs,rt=G(W)(et(Q,tt));return rt===ct&&Q._rejectCallback(rt.e,!0),Q._isFateSealed()||Q._setAsyncGuaranteed(),Q},$.all=function(W){return new N(W).promise()},$.cast=function(W){var Q=B(W);return Q instanceof $||((Q=new $(P))._captureStackTrace(),Q._setFulfilled(),Q._rejectionHandler0=W),Q},$.resolve=$.fulfilled=$.cast,$.reject=$.rejected=function(W){var Q=new $(P);return Q._captureStackTrace(),Q._rejectCallback(W,!0),Q},$.setScheduler=function(W){if(typeof W!="function")throw new O("expecting a function but got "+_.classString(W));return w.setScheduler(W)},$.prototype._then=function(W,Q,tt,rt,mt){var M=mt!==void 0,R=M?mt:new $(P),z=this._target(),at=z._bitField;M||(R._propagateFrom(this,3),R._captureStackTrace(),rt===void 0&&2097152&this._bitField&&(rt=50397184&at?this._boundValue():z===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,R));var st=v();if(50397184&at){var ht,bt,It=z._settlePromiseCtx;33554432&at?(bt=z._rejectionHandler0,ht=W):16777216&at?(bt=z._fulfillmentHandler0,ht=Q,z._unsetRejectionIsUnhandled()):(It=z._settlePromiseLateCancellationObserver,bt=new k("late cancellation observer"),z._attachExtraTrace(bt),ht=Q),w.invoke(It,z,{handler:st===null?ht:typeof ht=="function"&&_.domainBind(st,ht),promise:R,receiver:rt,value:bt})}else z._addCallbacks(W,Q,R,rt,st);return R},$.prototype._length=function(){return 65535&this._bitField},$.prototype._isFateSealed=function(){return(117506048&this._bitField)!=0},$.prototype._isFollowing=function(){return(67108864&this._bitField)==67108864},$.prototype._setLength=function(W){this._bitField=-65536&this._bitField|65535&W},$.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},$.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},$.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},$.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},$.prototype._isFinal=function(){return(4194304&this._bitField)>0},$.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},$.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},$.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},$.prototype._setAsyncGuaranteed=function(){w.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},$.prototype._receiverAt=function(W){var Q=W===0?this._receiver0:this[4*W-4+3];if(Q!==y)return Q===void 0&&this._isBound()?this._boundValue():Q},$.prototype._promiseAt=function(W){return this[4*W-4+2]},$.prototype._fulfillmentHandlerAt=function(W){return this[4*W-4+0]},$.prototype._rejectionHandlerAt=function(W){return this[4*W-4+1]},$.prototype._boundValue=function(){},$.prototype._migrateCallback0=function(W){W._bitField;var Q=W._fulfillmentHandler0,tt=W._rejectionHandler0,rt=W._promise0,mt=W._receiverAt(0);mt===void 0&&(mt=y),this._addCallbacks(Q,tt,rt,mt,null)},$.prototype._migrateCallbackAt=function(W,Q){var tt=W._fulfillmentHandlerAt(Q),rt=W._rejectionHandlerAt(Q),mt=W._promiseAt(Q),M=W._receiverAt(Q);M===void 0&&(M=y),this._addCallbacks(tt,rt,mt,M,null)},$.prototype._addCallbacks=function(W,Q,tt,rt,mt){var M=this._length();if(M>=65531&&(M=0,this._setLength(0)),M===0)this._promise0=tt,this._receiver0=rt,typeof W=="function"&&(this._fulfillmentHandler0=mt===null?W:_.domainBind(mt,W)),typeof Q=="function"&&(this._rejectionHandler0=mt===null?Q:_.domainBind(mt,Q));else{var R=4*M-4;this[R+2]=tt,this[R+3]=rt,typeof W=="function"&&(this[R+0]=mt===null?W:_.domainBind(mt,W)),typeof Q=="function"&&(this[R+1]=mt===null?Q:_.domainBind(mt,Q))}return this._setLength(M+1),M},$.prototype._proxy=function(W,Q){this._addCallbacks(void 0,void 0,Q,W,null)},$.prototype._resolveCallback=function(W,Q){if(!(117506048&this._bitField)){if(W===this)return this._rejectCallback(h(),!1);var tt=B(W,this);if(!(tt instanceof $))return this._fulfill(W);Q&&this._propagateFrom(tt,2);var rt=tt._target();if(rt!==this){var mt=rt._bitField;if(50397184&mt)if(33554432&mt)this._fulfill(rt._value());else if(16777216&mt)this._reject(rt._reason());else{var z=new k("late cancellation observer");rt._attachExtraTrace(z),this._reject(z)}else{var M=this._length();M>0&&rt._migrateCallback0(this);for(var R=1;R>>16)){if(W===this){var tt=h();return this._attachExtraTrace(tt),this._reject(tt)}this._setFulfilled(),this._rejectionHandler0=W,(65535&Q)>0&&(134217728&Q?this._settlePromises():w.settlePromises(this))}},$.prototype._reject=function(W){var Q=this._bitField;if(!((117506048&Q)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=W,this._isFinal())return w.fatalError(W,_.isNode);(65535&Q)>0?w.settlePromises(this):this._ensurePossibleRejectionHandled()}},$.prototype._fulfillPromises=function(W,Q){for(var tt=1;tt0){if(16842752&W){var tt=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,tt,W),this._rejectPromises(Q,tt)}else{var rt=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,rt,W),this._fulfillPromises(Q,rt)}this._setLength(0)}this._clearCancellationData()},$.prototype._settledValue=function(){var W=this._bitField;return 33554432&W?this._rejectionHandler0:16777216&W?this._fulfillmentHandler0:void 0},$.defer=$.pending=function(){return nt.deprecated("Promise.defer","new Promise"),{promise:new $(P),resolve:I,reject:H}},_.notEnumerableProp($,"_makeSelfResolutionError",h),s("./method")($,P,B,p,nt),s("./bind")($,P,B,nt),s("./cancel")($,N,p,nt),s("./direct_resolve")($),s("./synchronous_inspection")($),s("./join")($,N,B,P,w,v),$.Promise=$,$.version="3.5.1",s("./map.js")($,N,p,B,P,nt),s("./call_get.js")($),s("./using.js")($,p,B,Y,P,nt),s("./timers.js")($,P,nt),s("./generators.js")($,p,P,B,m,nt),s("./nodeify.js")($),s("./promisify.js")($,P),s("./props.js")($,N,B,p),s("./race.js")($,P,B,p),s("./reduce.js")($,N,p,B,P,nt),s("./settle.js")($,N,nt),s("./some.js")($,N,p),s("./filter.js")($,P),s("./each.js")($,P),s("./any.js")($),_.toFastProperties($),_.toFastProperties($.prototype),it({a:1}),it({b:2}),it({c:3}),it(1),it(function(){}),it(void 0),it(!1),it(new $(P)),nt.setBounds(x.firstLineError,_.lastLineError),$}},{"./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,l,c){l.exports=function(h,d,p,m,v){var y=s("./util");function _(T){var x=this._promise=new h(d);T instanceof h&&x._propagateFrom(T,3),x._setOnCancel(this),this._values=T,this._length=0,this._totalResolved=0,this._init(void 0,-2)}return y.isArray,y.inherits(_,v),_.prototype.length=function(){return this._length},_.prototype.promise=function(){return this._promise},_.prototype._init=function T(x,w){var E=p(this._values,this._promise);if(E instanceof h){var O=(E=E._target())._bitField;if(this._values=E,(50397184&O)==0)return this._promise._setAsyncGuaranteed(),E._then(T,this._reject,void 0,this,w);if(!(33554432&O))return 16777216&O?this._reject(E._reason()):this._cancel();E=E._value()}if((E=y.asArray(E))!==null)E.length!==0?this._iterate(E):w===-5?this._resolveEmptyArray():this._resolve(function(P){switch(w){case-2:return[];case-3:return{};case-6:return new Map}}());else{var k=m("expecting an array or an iterable object but got "+y.classString(E)).reason();this._promise._rejectCallback(k,!1)}},_.prototype._iterate=function(T){var x=this.getActualLength(T.length);this._length=x,this._values=this.shouldCopyValues()?new Array(x):this._values;for(var w=this._promise,E=!1,O=null,k=0;k=this._length&&(this._resolve(this._values),!0)},_.prototype._promiseCancelled=function(){return this._cancel(),!0},_.prototype._promiseRejected=function(T){return this._totalResolved++,this._reject(T),!0},_.prototype._resultCancelled=function(){if(!this._isResolved()){var T=this._values;if(this._cancel(),T instanceof h)T.cancel();else for(var x=0;x=this._length){var P;if(this._isMap)P=function(N){for(var V=new v,Y=N.length/2|0,nt=0;nt>1},h.prototype.props=function(){return E(this)},h.props=function(O){return E(O)}}},{"./es5":13,"./util":36}],26:[function(s,l,c){function h(d){this._capacity=d,this._length=0,this._front=0}h.prototype._willBeOverCapacity=function(d){return this._capacity"u"){var m=i.setImmediate,v=r.nextTick;h=d.isRecentNode?function(_){m.call(i,_)}:function(_){v.call(r,_)}}else if(typeof p=="function"&&typeof p.resolve=="function"){var y=p.resolve();h=function(_){y.then(_)}}else h=typeof MutationObserver>"u"||typeof window<"u"&&window.navigator&&(window.navigator.standalone||window.cordova)?o!==void 0?function(_){o(_)}:typeof setTimeout<"u"?function(_){setTimeout(_,0)}:function(){throw new Error(`No async scheduler available - - See http://goo.gl/MqrFmX -`)}:function(){var _=document.createElement("div"),T={attributes:!0},x=!1,w=document.createElement("div");return new MutationObserver(function(){_.classList.toggle("foo"),x=!1}).observe(w,T),function(E){var O=new MutationObserver(function(){O.disconnect(),E()});O.observe(_,T),x||(x=!0,w.classList.toggle("foo"))}}();l.exports=h},{"./util":36}],30:[function(s,l,c){l.exports=function(h,d,p){var m=h.PromiseInspection;function v(y){this.constructor$(y)}s("./util").inherits(v,d),v.prototype._promiseResolved=function(y,_){return this._values[y]=_,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},v.prototype._promiseFulfilled=function(y,_){var T=new m;return T._bitField=33554432,T._settledValueField=y,this._promiseResolved(_,T)},v.prototype._promiseRejected=function(y,_){var T=new m;return T._bitField=16777216,T._settledValueField=y,this._promiseResolved(_,T)},h.settle=function(y){return p.deprecated(".settle()",".reflect()"),new v(y).promise()},h.prototype.settle=function(){return h.settle(this)}}},{"./util":36}],31:[function(s,l,c){l.exports=function(h,d,p){var m=s("./util"),v=s("./errors").RangeError,y=s("./errors").AggregateError,_=m.isArray,T={};function x(E){this.constructor$(E),this._howMany=0,this._unwrap=!1,this._initialized=!1}function w(E,O){if((0|O)!==O||O<0)return p(`expecting a positive integer - - See http://goo.gl/MqrFmX -`);var k=new x(E),P=k.promise();return k.setHowMany(O),k.init(),P}m.inherits(x,d),x.prototype._init=function(){if(this._initialized)if(this._howMany!==0){this._init$(void 0,-5);var E=_(this._values);!this._isResolved()&&E&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}else this._resolve([])},x.prototype.init=function(){this._initialized=!0,this._init()},x.prototype.setUnwrap=function(){this._unwrap=!0},x.prototype.howMany=function(){return this._howMany},x.prototype.setHowMany=function(E){this._howMany=E},x.prototype._promiseFulfilled=function(E){return this._addFulfilled(E),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),this.howMany()===1&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},x.prototype._promiseRejected=function(E){return this._addRejected(E),this._checkOutcome()},x.prototype._promiseCancelled=function(){return this._values instanceof h||this._values==null?this._cancel():(this._addRejected(T),this._checkOutcome())},x.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var E=new y,O=this.length();O0?this._reject(E):this._cancel(),!0}return!1},x.prototype._fulfilled=function(){return this._totalResolved},x.prototype._rejected=function(){return this._values.length-this.length()},x.prototype._addRejected=function(E){this._values.push(E)},x.prototype._addFulfilled=function(E){this._values[this._totalResolved++]=E},x.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},x.prototype._getRangeError=function(E){var O="Input array must contain at least "+this._howMany+" items but contains only "+E+" items";return new v(O)},x.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},h.some=function(E,O){return w(E,O)},h.prototype.some=function(E){return w(this,E)},h._SomePromiseArray=x}},{"./errors":12,"./util":36}],32:[function(s,l,c){l.exports=function(h){function d(x){x!==void 0?(x=x._target(),this._bitField=x._bitField,this._settledValueField=x._isFateSealed()?x._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}d.prototype._settledValue=function(){return this._settledValueField};var p=d.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()},m=d.prototype.error=d.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()},v=d.prototype.isFulfilled=function(){return(33554432&this._bitField)!=0},y=d.prototype.isRejected=function(){return(16777216&this._bitField)!=0},_=d.prototype.isPending=function(){return(50397184&this._bitField)==0},T=d.prototype.isResolved=function(){return(50331648&this._bitField)!=0};d.prototype.isCancelled=function(){return(8454144&this._bitField)!=0},h.prototype.__isCancelled=function(){return(65536&this._bitField)==65536},h.prototype._isCancelled=function(){return this._target().__isCancelled()},h.prototype.isCancelled=function(){return(8454144&this._target()._bitField)!=0},h.prototype.isPending=function(){return _.call(this._target())},h.prototype.isRejected=function(){return y.call(this._target())},h.prototype.isFulfilled=function(){return v.call(this._target())},h.prototype.isResolved=function(){return T.call(this._target())},h.prototype.value=function(){return p.call(this._target())},h.prototype.reason=function(){var x=this._target();return x._unsetRejectionIsUnhandled(),m.call(x)},h.prototype._value=function(){return this._settledValue()},h.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},h.PromiseInspection=d}},{}],33:[function(s,l,c){l.exports=function(h,d){var p=s("./util"),m=p.errorObj,v=p.isObject,y={}.hasOwnProperty;return function(_,T){if(v(_)){if(_ instanceof h)return _;var x=function(E){try{return function(O){return O.then}(E)}catch(O){return m.e=O,m}}(_);if(x===m){T&&T._pushContext();var w=h.reject(x.e);return T&&T._popContext(),w}if(typeof x=="function")return function(E){try{return y.call(E,"_promise0")}catch{return!1}}(_)?(w=new h(d),_._then(w._fulfill,w._reject,void 0,w,null),w):function(E,O,k){var P=new h(d),A=P;k&&k._pushContext(),P._captureStackTrace(),k&&k._popContext();var j=!0,B=p.tryCatch(O).call(E,function(N){P&&(P._resolveCallback(N),P=null)},function(N){P&&(P._rejectCallback(N,j,!0),P=null)});return j=!1,P&&B===m&&(P._rejectCallback(B.e,!0,!0),P=null),A}(_,x,T)}return _}}},{"./util":36}],34:[function(s,l,c){l.exports=function(h,d,p){var m=s("./util"),v=h.TimeoutError;function y(E){this.handle=E}y.prototype._resultCancelled=function(){clearTimeout(this.handle)};var _=function(E){return T(+this).thenReturn(E)},T=h.delay=function(E,O){var k,P;return O!==void 0?(k=h.resolve(O)._then(_,null,null,E,void 0),p.cancellation()&&O instanceof h&&k._setOnCancel(O)):(k=new h(d),P=setTimeout(function(){k._fulfill()},+E),p.cancellation()&&k._setOnCancel(new y(P)),k._captureStackTrace()),k._setAsyncGuaranteed(),k};function x(E){return clearTimeout(this.handle),E}function w(E){throw clearTimeout(this.handle),E}h.prototype.delay=function(E){return T(E,this)},h.prototype.timeout=function(E,O){var k,P;E=+E;var A=new y(setTimeout(function(){k.isPending()&&function(j,B,N){var V;V=typeof B!="string"?B instanceof Error?B:new v("operation timed out"):new v(B),m.markAsOriginatingFromRejection(V),j._attachExtraTrace(V),j._reject(V),N!=null&&N.cancel()}(k,O,P)},E));return p.cancellation()?(P=this.then(),(k=P._then(x,w,void 0,A,void 0))._setOnCancel(A)):k=this._then(x,w,void 0,A,void 0),k}}},{"./util":36}],35:[function(s,l,c){l.exports=function(h,d,p,m,v,y){var _=s("./util"),T=s("./errors").TypeError,x=s("./util").inherits,w=_.errorObj,E=_.tryCatch,O={};function k(V){setTimeout(function(){throw V},0)}function P(V,Y){var nt=0,K=V.length,J=new h(v);return function et(){if(nt>=K)return J._fulfill();var ct=function(G){var $=p(G);return $!==G&&typeof G._isDisposable=="function"&&typeof G._getDisposer=="function"&&G._isDisposable()&&$._setDisposable(G._getDisposer()),$}(V[nt++]);if(ct instanceof h&&ct._isDisposable()){try{ct=p(ct._getDisposer().tryDispose(Y),V.promise)}catch(G){return k(G)}if(ct instanceof h)return ct._then(et,k,null,null,null)}et()}(),J}function A(V,Y,nt){this._data=V,this._promise=Y,this._context=nt}function j(V,Y,nt){this.constructor$(V,Y,nt)}function B(V){return A.isDisposer(V)?(this.resources[this.index]._setDisposable(V),V.promise()):V}function N(V){this.length=V,this.promise=null,this[V-1]=null}A.prototype.data=function(){return this._data},A.prototype.promise=function(){return this._promise},A.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():O},A.prototype.tryDispose=function(V){var Y=this.resource(),nt=this._context;nt!==void 0&&nt._pushContext();var K=Y!==O?this.doDispose(Y,V):null;return nt!==void 0&&nt._popContext(),this._promise._unsetDisposable(),this._data=null,K},A.isDisposer=function(V){return V!=null&&typeof V.resource=="function"&&typeof V.tryDispose=="function"},x(j,A),j.prototype.doDispose=function(V,Y){return this.data().call(V,V,Y)},N.prototype._resultCancelled=function(){for(var V=this.length,Y=0;Y0},h.prototype._getDisposer=function(){return this._disposer},h.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},h.prototype.disposer=function(V){if(typeof V=="function")return new j(V,this,m());throw new T}}},{"./errors":12,"./util":36}],36:[function(s,l,c){var h,d=s("./es5"),p=typeof navigator>"u",m={e:{}},v=typeof self<"u"?self:typeof window<"u"?window:i!==void 0?i:this!==void 0?this:null;function y(){try{var K=h;return h=null,K.apply(this,arguments)}catch(J){return m.e=J,m}}function _(K){return K==null||K===!0||K===!1||typeof K=="string"||typeof K=="number"}function T(K,J,et){if(_(K))return K;var ct={value:et,configurable:!0,enumerable:!1,writable:!0};return d.defineProperty(K,J,ct),K}var x=function(){var K=[Array.prototype,Object.prototype,Function.prototype],J=function(G){for(var $=0;$1,ct=J.length>0&&!(J.length===1&&J[0]==="constructor"),G=w.test(K+"")&&d.names(K).length>0;if(et||ct||G)return!0}return!1}catch{return!1}},isIdentifier:function(K){return E.test(K)},inheritedDataKeys:x,getDataPropertyOrDefault:function(K,J,et){if(!d.isES5)return{}.hasOwnProperty.call(K,J)?K[J]:void 0;var ct=Object.getOwnPropertyDescriptor(K,J);return ct!=null?ct.get==null&&ct.set==null?ct.value:et:void 0},thrower:function(K){throw K},isArray:d.isArray,asArray:B,notEnumerableProp:T,isPrimitive:_,isObject:function(K){return typeof K=="function"||typeof K=="object"&&K!==null},isError:k,canEvaluate:p,errorObj:m,tryCatch:function(K){return h=K,y},inherits:function(K,J){var et={}.hasOwnProperty;function ct(){for(var G in this.constructor=K,this.constructor$=J,J.prototype)et.call(J.prototype,G)&&G.charAt(G.length-1)!=="$"&&(this[G+"$"]=J.prototype[G])}return ct.prototype=J.prototype,K.prototype=new ct,K.prototype},withAppended:function(K,J){var et,ct=K.length,G=new Array(ct+1);for(et=0;et10||K[0]>0}(),nt.isNode&&nt.toFastProperties(r);try{throw new Error}catch(K){nt.lastLineError=K}l.exports=nt},{"./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(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(r,i){if(!i.eol&&r){for(var o=0,s=r.length;o0?(typeof H=="string"||rt.objectMode||Object.getPrototypeOf(H)===d.prototype||(H=function(mt){return d.from(mt)}(H)),W?rt.endEmitted?I.emit("error",new Error("stream.unshift() after end event")):P(I,rt,H,!0):rt.ended?I.emit("error",new Error("stream.push() after EOF")):(rt.reading=!1,rt.decoder&&!it?(H=rt.decoder.write(H),rt.objectMode||H.length!==0?P(I,rt,H,!1):V(I,rt)):P(I,rt,H,!1))):W||(rt.reading=!1)),function(mt){return!mt.ended&&(mt.needReadable||mt.lengthH.highWaterMark&&(H.highWaterMark=function(it){return it>=A?it=A:(it--,it|=it>>>1,it|=it>>>2,it|=it>>>4,it|=it>>>8,it|=it>>>16,it++),it}(I)),I<=H.length?I:H.ended?H.length:(H.needReadable=!0,0))}function B(I){var H=I._readableState;H.needReadable=!1,H.emittedReadable||(y("emitReadable",H.flowing),H.emittedReadable=!0,H.sync?o.nextTick(N,I):N(I))}function N(I){y("emit readable"),I.emit("readable"),J(I)}function V(I,H){H.readingMore||(H.readingMore=!0,o.nextTick(Y,I,H))}function Y(I,H){for(var it=H.length;!H.reading&&!H.flowing&&!H.ended&&H.length=H.length?(it=H.decoder?H.buffer.join(""):H.buffer.length===1?H.buffer.head.data:H.buffer.concat(H.length),H.buffer.clear()):it=function(W,Q,tt){var rt;return Wst.length?st.length:mt;if(ht===st.length?at+=st:at+=st.slice(0,mt),(mt-=ht)==0){ht===st.length?(++z,R.next?M.head=R.next:M.head=M.tail=null):(M.head=R,R.data=st.slice(ht));break}++z}return M.length-=z,at}(W,Q):function(mt,M){var R=d.allocUnsafe(mt),z=M.head,at=1;for(z.data.copy(R),mt-=z.data.length;z=z.next;){var st=z.data,ht=mt>st.length?st.length:mt;if(st.copy(R,R.length-mt,0,ht),(mt-=ht)==0){ht===st.length?(++at,z.next?M.head=z.next:M.head=M.tail=null):(M.head=z,z.data=st.slice(ht));break}++at}return M.length-=at,R}(W,Q),rt}(I,H.buffer,H.decoder),it);var it}function ct(I){var H=I._readableState;if(H.length>0)throw new Error('"endReadable()" called on non-empty stream');H.endEmitted||(H.ended=!0,o.nextTick(G,H,I))}function G(I,H){I.endEmitted||I.length!==0||(I.endEmitted=!0,H.readable=!1,H.emit("end"))}function $(I,H){for(var it=0,W=I.length;it=H.highWaterMark||H.ended))return y("read: emitReadable",H.length,H.ended),H.length===0&&H.ended?ct(this):B(this),null;if((I=j(I,H))===0&&H.ended)return H.length===0&&ct(this),null;var W,Q=H.needReadable;return y("need readable",Q),(H.length===0||H.length-I0?et(I,H):null)===null?(H.needReadable=!0,I=0):H.length-=I,H.length===0&&(H.ended||(H.needReadable=!0),it!==I&&H.ended&&ct(this)),W!==null&&this.emit("data",W),W},O.prototype._read=function(I){this.emit("error",new Error("_read() is not implemented"))},O.prototype.pipe=function(I,H){var it=this,W=this._readableState;switch(W.pipesCount){case 0:W.pipes=I;break;case 1:W.pipes=[W.pipes,I];break;default:W.pipes.push(I)}W.pipesCount+=1,y("pipe count=%d opts=%j",W.pipesCount,H);var Q=H&&H.end===!1||I===i.stdout||I===i.stderr?ht:tt;function tt(){y("onend"),I.end()}W.endEmitted?o.nextTick(Q):it.once("end",Q),I.on("unpipe",function bt(It,ft){y("onunpipe"),It===it&&ft&&ft.hasUnpiped===!1&&(ft.hasUnpiped=!0,y("cleanup"),I.removeListener("close",at),I.removeListener("finish",st),I.removeListener("drain",rt),I.removeListener("error",z),I.removeListener("unpipe",bt),it.removeListener("end",tt),it.removeListener("end",ht),it.removeListener("data",R),mt=!0,!W.awaitDrain||I._writableState&&!I._writableState.needDrain||rt())});var rt=function(bt){return function(){var It=bt._readableState;y("pipeOnDrain",It.awaitDrain),It.awaitDrain&&It.awaitDrain--,It.awaitDrain===0&&c(bt,"data")&&(It.flowing=!0,J(bt))}}(it);I.on("drain",rt);var mt=!1,M=!1;function R(bt){y("ondata"),M=!1,I.write(bt)!==!1||M||((W.pipesCount===1&&W.pipes===I||W.pipesCount>1&&$(W.pipes,I)!==-1)&&!mt&&(y("false write response, pause",it._readableState.awaitDrain),it._readableState.awaitDrain++,M=!0),it.pause())}function z(bt){y("onerror",bt),ht(),I.removeListener("error",z),c(I,"error")===0&&I.emit("error",bt)}function at(){I.removeListener("finish",st),ht()}function st(){y("onfinish"),I.removeListener("close",at),ht()}function ht(){y("unpipe"),it.unpipe(I)}return it.on("data",R),function(bt,It,ft){if(typeof bt.prependListener=="function")return bt.prependListener(It,ft);bt._events&&bt._events[It]?l(bt._events[It])?bt._events[It].unshift(ft):bt._events[It]=[ft,bt._events[It]]:bt.on(It,ft)}(I,"error",z),I.once("close",at),I.once("finish",st),I.emit("pipe",it),W.flowing||(y("pipe resume"),it.resume()),I},O.prototype.unpipe=function(I){var H=this._readableState,it={hasUnpiped:!1};if(H.pipesCount===0)return this;if(H.pipesCount===1)return I&&I!==H.pipes?this:(I||(I=H.pipes),H.pipes=null,H.pipesCount=0,H.flowing=!1,I&&I.emit("unpipe",this,it),this);if(!I){var W=H.pipes,Q=H.pipesCount;H.pipes=null,H.pipesCount=0,H.flowing=!1;for(var tt=0;tt>5==6?2:y>>4==14?3:y>>3==30?4:y>>6==2?-1:-2}function l(y){var _=this.lastTotal-this.lastNeed,T=function(x,w,E){if((192&w[0])!=128)return x.lastNeed=0,"�";if(x.lastNeed>1&&w.length>1){if((192&w[1])!=128)return x.lastNeed=1,"�";if(x.lastNeed>2&&w.length>2&&(192&w[2])!=128)return x.lastNeed=2,"�"}}(this,y);return T!==void 0?T:this.lastNeed<=y.length?(y.copy(this.lastChar,_,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(y.copy(this.lastChar,_,0,y.length),void(this.lastNeed-=y.length))}function c(y,_){if((y.length-_)%2==0){var T=y.toString("utf16le",_);if(T){var x=T.charCodeAt(T.length-1);if(x>=55296&&x<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=y[y.length-2],this.lastChar[1]=y[y.length-1],T.slice(0,-1)}return T}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=y[y.length-1],y.toString("utf16le",_,y.length-1)}function h(y){var _=y&&y.length?this.write(y):"";if(this.lastNeed){var T=this.lastTotal-this.lastNeed;return _+this.lastChar.toString("utf16le",0,T)}return _}function d(y,_){var T=(y.length-_)%3;return T===0?y.toString("base64",_):(this.lastNeed=3-T,this.lastTotal=3,T===1?this.lastChar[0]=y[y.length-1]:(this.lastChar[0]=y[y.length-2],this.lastChar[1]=y[y.length-1]),y.toString("base64",_,y.length-T))}function p(y){var _=y&&y.length?this.write(y):"";return this.lastNeed?_+this.lastChar.toString("base64",0,3-this.lastNeed):_}function m(y){return y.toString(this.encoding)}function v(y){return y&&y.length?this.write(y):""}e.StringDecoder=o,o.prototype.write=function(y){if(y.length===0)return"";var _,T;if(this.lastNeed){if((_=this.fillLast(y))===void 0)return"";T=this.lastNeed,this.lastNeed=0}else T=0;return T=0?(P>0&&(w.lastNeed=P-1),P):--k=0?(P>0&&(w.lastNeed=P-2),P):--k=0?(P>0&&(P===2?P=0:w.lastNeed=P-3),P):0}(this,y,_);if(!this.lastNeed)return y.toString("utf8",_);this.lastTotal=T;var x=y.length-(T-this.lastNeed);return y.copy(this.lastChar,0,x),y.toString("utf8",_,x)},o.prototype.fillLast=function(y){if(this.lastNeed<=y.length)return y.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);y.copy(this.lastChar,this.lastTotal-this.lastNeed,0,y.length),this.lastNeed-=y.length}},function(t,e,n){t.exports=o;var r=n(1),i=n(5);function o(c){if(!(this instanceof o))return new o(c);r.call(this,c),this._transformState={afterTransform:(function(h,d){var p=this._transformState;p.transforming=!1;var m=p.writecb;if(!m)return this.emit("error",new Error("write callback called multiple times"));p.writechunk=null,p.writecb=null,d!=null&&this.push(d),m(h);var v=this._readableState;v.reading=!1,(v.needReadable||v.length-1&&s.push(i[l]);return s},e.trimLeft=String.prototype.trimLeft?function(i){return i.trimLeft()}:function(i){return i.replace(/^\s+/,"")},e.trimRight=String.prototype.trimRight?function(i){return i.trimRight()}:function(i){return i.replace(/\s+$/,"")}}).call(this,n(3).Buffer)},function(t,e,n){var r=this&&this.__extends||function(){var o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var c in l)l.hasOwnProperty(c)&&(s[c]=l[c])};return function(s,l){function c(){this.constructor=s}o(s,l),s.prototype=l===null?Object.create(l):(c.prototype=l.prototype,new c)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=function(o){function s(l,c,h){var d=o.call(this,"Error: "+l+". JSON Line number: "+c+(h?" near: "+h:""))||this;return d.err=l,d.line=c,d.extra=h,d.name="CSV Parse Error",d}return r(s,o),s.column_mismatched=function(l,c){return new s("column_mismatched",l,c)},s.unclosed_quote=function(l,c){return new s("unclosed_quote",l,c)},s.fromJSON=function(l){return new s(l.err,l.line,l.extra)},s.prototype.toJSON=function(){return{err:this.err,line:this.line,extra:this.extra}},s}(Error);e.default=i},function(t,e,n){var r=n(18),i=n(68),o=n(69),s=r?r.toStringTag:void 0;t.exports=function(l){return l==null?l===void 0?"[object Undefined]":"[object Null]":s&&s in Object(l)?i(l):o(l)}},function(t,e){t.exports=function(n,r){return n===r||n!=n&&r!=r}},function(t,e,n){t.exports=n(33)},function(t,e,n){var r=n(34),i=function(o,s){return new r.Converter(o,s)};i.csv=i,i.Converter=r.Converter,t.exports=i},function(t,e,n){(function(r){var i=this&&this.__extends||function(){var v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,_){y.__proto__=_}||function(y,_){for(var T in _)_.hasOwnProperty(T)&&(y[T]=_[T])};return function(y,_){function T(){this.constructor=y}v(y,_),y.prototype=_===null?Object.create(_):(T.prototype=_.prototype,new T)}}(),o=this&&this.__importDefault||function(v){return v&&v.__esModule?v:{default:v}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(36),l=n(50),c=n(51),h=o(n(15)),d=n(52),p=n(105),m=function(v){function y(_,T){T===void 0&&(T={});var x=v.call(this,T)||this;return x.options=T,x.params=l.mergeParams(_),x.runtime=c.initParseRuntime(x),x.result=new p.Result(x),x.processor=new d.ProcessorLocal(x),x.once("error",function(w){r(function(){x.result.processError(w),x.emit("done",w)})}),x.once("done",function(){x.processor.destroy()}),x}return i(y,v),y.prototype.preRawData=function(_){return this.runtime.preRawDataHook=_,this},y.prototype.preFileLine=function(_){return this.runtime.preFileLineHook=_,this},y.prototype.subscribe=function(_,T,x){return this.parseRuntime.subscribe={onNext:_,onError:T,onCompleted:x},this},y.prototype.fromFile=function(_,T){var x=this,w=n(!function(){var E=new Error("Cannot find module 'fs'");throw E.code="MODULE_NOT_FOUND",E}());return w.exists(_,function(E){E?w.createReadStream(_,T).pipe(x):x.emit("error",new Error("File does not exist. Check to make sure the file path to your csv is correct."))}),this},y.prototype.fromStream=function(_){return _.pipe(this),this},y.prototype.fromString=function(_){_.toString();var T=new s.Readable,x=0;return T._read=function(w){if(x>=_.length)this.push(null);else{var E=_.substr(x,w);this.push(E),x+=w}},this.fromStream(T)},y.prototype.then=function(_,T){var x=this;return new h.default(function(w,E){x.parseRuntime.then={onfulfilled:function(O){w(_?_(O):O)},onrejected:function(O){T?w(T(O)):E(O)}}})},Object.defineProperty(y.prototype,"parseParam",{get:function(){return this.params},enumerable:!0,configurable:!0}),Object.defineProperty(y.prototype,"parseRuntime",{get:function(){return this.runtime},enumerable:!0,configurable:!0}),y.prototype._transform=function(_,T,x){var w=this;this.processor.process(_).then(function(E){if(E.length>0)return w.runtime.started=!0,w.result.processResult(E)}).then(function(){w.emit("drained"),x()},function(E){w.runtime.hasError=!0,w.runtime.error=E,w.emit("error",E),x()})},y.prototype._flush=function(_){var T=this;this.processor.flush().then(function(x){if(x.length>0)return T.result.processResult(x)}).then(function(){T.processEnd(_)},function(x){T.emit("error",x),_()})},y.prototype.processEnd=function(_){this.result.endProcess(),this.emit("done"),_()},Object.defineProperty(y.prototype,"parsedLineNumber",{get:function(){return this.runtime.parsedLineNumber},enumerable:!0,configurable:!0}),y}(s.Transform);e.Converter=m}).call(this,n(11).setImmediate)},function(t,e,n){(function(r,i){(function(o,s){if(!o.setImmediate){var l,c=1,h={},d=!1,p=o.document,m=Object.getPrototypeOf&&Object.getPrototypeOf(o);m=m&&m.setTimeout?m:o,{}.toString.call(o.process)==="[object process]"?l=function(_){i.nextTick(function(){y(_)})}:function(){if(o.postMessage&&!o.importScripts){var _=!0,T=o.onmessage;return o.onmessage=function(){_=!1},o.postMessage("","*"),o.onmessage=T,_}}()?function(){var _="setImmediate$"+Math.random()+"$",T=function(x){x.source===o&&typeof x.data=="string"&&x.data.indexOf(_)===0&&y(+x.data.slice(_.length))};o.addEventListener?o.addEventListener("message",T,!1):o.attachEvent("onmessage",T),l=function(x){o.postMessage(_+x,"*")}}():o.MessageChannel?function(){var _=new MessageChannel;_.port1.onmessage=function(T){y(T.data)},l=function(T){_.port2.postMessage(T)}}():p&&"onreadystatechange"in p.createElement("script")?function(){var _=p.documentElement;l=function(T){var x=p.createElement("script");x.onreadystatechange=function(){y(T),x.onreadystatechange=null,_.removeChild(x),x=null},_.appendChild(x)}}():l=function(_){setTimeout(y,0,_)},m.setImmediate=function(_){typeof _!="function"&&(_=new Function(""+_));for(var T=new Array(arguments.length-1),x=0;x"u"?r===void 0?this:r:self)}).call(this,n(0),n(4))},function(t,e,n){t.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 l=this;function c(_){o.writable&&o.write(_)===!1&&l.pause&&l.pause()}function h(){l.readable&&l.resume&&l.resume()}l.on("data",c),o.on("drain",h),o._isStdio||s&&s.end===!1||(l.on("end",p),l.on("close",m));var d=!1;function p(){d||(d=!0,o.end())}function m(){d||(d=!0,typeof o.destroy=="function"&&o.destroy())}function v(_){if(y(),r.listenerCount(this,"error")===0)throw _}function y(){l.removeListener("data",c),o.removeListener("drain",h),l.removeListener("end",p),l.removeListener("close",m),l.removeListener("error",v),o.removeListener("error",v),l.removeListener("end",y),l.removeListener("close",y),o.removeListener("close",y)}return l.on("error",v),o.on("error",v),l.on("end",y),l.on("close",y),o.on("close",y),o.emit("pipe",l),o}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(r){return n.call(r)=="[object Array]"}},function(t,e,n){e.byteLength=function(m){var v=h(m),y=v[0],_=v[1];return 3*(y+_)/4-_},e.toByteArray=function(m){for(var v,y=h(m),_=y[0],T=y[1],x=new o(3*(_+T)/4-T),w=0,E=T>0?_-4:_,O=0;O>16&255,x[w++]=v>>8&255,x[w++]=255&v;return T===2&&(v=i[m.charCodeAt(O)]<<2|i[m.charCodeAt(O+1)]>>4,x[w++]=255&v),T===1&&(v=i[m.charCodeAt(O)]<<10|i[m.charCodeAt(O+1)]<<4|i[m.charCodeAt(O+2)]>>2,x[w++]=v>>8&255,x[w++]=255&v),x},e.fromByteArray=function(m){for(var v,y=m.length,_=y%3,T=[],x=0,w=y-_;xw?w:x+16383));return _===1?(v=m[y-1],T.push(r[v>>2]+r[v<<4&63]+"==")):_===2&&(v=(m[y-2]<<8)+m[y-1],T.push(r[v>>10]+r[v>>4&63]+r[v<<2&63]+"=")),T.join("")};for(var r=[],i=[],o=typeof Uint8Array<"u"?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=0,c=s.length;l0)throw new Error("Invalid string. Length must be a multiple of 4");var y=m.indexOf("=");return y===-1&&(y=v),[y,y===v?0:4-y%4]}function d(m){return r[m>>18&63]+r[m>>12&63]+r[m>>6&63]+r[63&m]}function p(m,v,y){for(var _,T=[],x=v;x>1,m=-7,v=i?s-1:0,y=i?-1:1,_=n[r+v];for(v+=y,l=_&(1<<-m)-1,_>>=-m,m+=h;m>0;l=256*l+n[r+v],v+=y,m-=8);for(c=l&(1<<-m)-1,l>>=-m,m+=o;m>0;c=256*c+n[r+v],v+=y,m-=8);if(l===0)l=1-p;else{if(l===d)return c?NaN:1/0*(_?-1:1);c+=Math.pow(2,o),l-=p}return(_?-1:1)*c*Math.pow(2,l-o)},e.write=function(n,r,i,o,s,l){var c,h,d,p=8*l-s-1,m=(1<>1,y=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,_=o?0:l-1,T=o?1:-1,x=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(h=isNaN(r)?1:0,c=m):(c=Math.floor(Math.log(r)/Math.LN2),r*(d=Math.pow(2,-c))<1&&(c--,d*=2),(r+=c+v>=1?y/d:y*Math.pow(2,1-v))*d>=2&&(c++,d/=2),c+v>=m?(h=0,c=m):c+v>=1?(h=(r*d-1)*Math.pow(2,s),c+=v):(h=r*Math.pow(2,v-1)*Math.pow(2,s),c=0));s>=8;n[i+_]=255&h,_+=T,h/=256,s-=8);for(c=c<0;n[i+_]=255&c,_+=T,c/=256,p-=8);n[i+_-T]|=128*x}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(r){return n.call(r)=="[object Array]"}},function(t,e){},function(t,e,n){var r=n(7).Buffer,i=n(43);function o(s,l,c){s.copy(l,c)}t.exports=function(){function s(){(function(l,c){if(!(l instanceof c))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(l){var c={data:l,next:null};this.length>0?this.tail.next=c:this.head=c,this.tail=c,++this.length},s.prototype.unshift=function(l){var c={data:l,next:this.head};this.length===0&&(this.tail=c),this.head=c,++this.length},s.prototype.shift=function(){if(this.length!==0){var l=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,l}},s.prototype.clear=function(){this.head=this.tail=null,this.length=0},s.prototype.join=function(l){if(this.length===0)return"";for(var c=this.head,h=""+c.data;c=c.next;)h+=l+c.data;return h},s.prototype.concat=function(l){if(this.length===0)return r.alloc(0);if(this.length===1)return this.head.data;for(var c=r.allocUnsafe(l>>>0),h=this.head,d=0;h;)o(h.data,c,d),d+=h.data.length,h=h.next;return c},s}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var s=i.inspect({length:this.length});return this.constructor.name+" "+s})},function(t,e){},function(t,e,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"}t.exports=function(o,s){if(i("noDeprecation"))return o;var l=!1;return function(){if(!l){if(i("throwDeprecation"))throw new Error(s);i("traceDeprecation")?console.trace(s):console.warn(s),l=!0}return o.apply(this,arguments)}}}).call(this,n(0))},function(t,e,n){t.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,l,c){c(null,s)}},function(t,e,n){t.exports=n(14)},function(t,e,n){t.exports=n(1)},function(t,e,n){t.exports=n(13).Transform},function(t,e,n){t.exports=n(13).PassThrough},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.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(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.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(t,e,n){(function(r){var i=this&&this.__extends||function(){var T=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,w){x.__proto__=w}||function(x,w){for(var E in w)w.hasOwnProperty(E)&&(x[E]=w[E])};return function(x,w){function E(){this.constructor=x}T(x,w),x.prototype=w===null?Object.create(w):(E.prototype=w.prototype,new E)}}(),o=this&&this.__importDefault||function(T){return T&&T.__esModule?T:{default:T}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(53),l=o(n(15)),c=n(54),h=o(n(16)),d=n(57),p=n(28),m=n(58),v=o(n(59)),y=o(n(29)),_=function(T){function x(){var w=T!==null&&T.apply(this,arguments)||this;return w.rowSplit=new m.RowSplit(w.converter),w.eolEmitted=!1,w._needEmitEol=void 0,w.headEmitted=!1,w._needEmitHead=void 0,w}return i(x,T),x.prototype.flush=function(){var w=this;if(this.runtime.csvLineBuffer&&this.runtime.csvLineBuffer.length>0){var E=this.runtime.csvLineBuffer;return this.runtime.csvLineBuffer=void 0,this.process(E,!0).then(function(O){return w.runtime.csvLineBuffer&&w.runtime.csvLineBuffer.length>0?l.default.reject(y.default.unclosed_quote(w.runtime.parsedLineNumber,w.runtime.csvLineBuffer.toString())):l.default.resolve(O)})}return l.default.resolve([])},x.prototype.destroy=function(){return l.default.resolve()},Object.defineProperty(x.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(x.prototype,"needEmitHead",{get:function(){return this._needEmitHead===void 0&&(this._needEmitHead=this.converter.listeners("header").length>0),this._needEmitHead},enumerable:!0,configurable:!0}),x.prototype.process=function(w,E){var O,k=this;return E===void 0&&(E=!1),O=E?w.toString():c.prepareData(w,this.converter.parseRuntime),l.default.resolve().then(function(){return k.runtime.preRawDataHook?k.runtime.preRawDataHook(O):O}).then(function(P){return P&&P.length>0?k.processCSV(P,E):l.default.resolve([])})},x.prototype.processCSV=function(w,E){var O=this,k=this.params,P=this.runtime;P.eol||h.default(w,P),this.needEmitEol&&!this.eolEmitted&&P.eol&&(this.converter.emit("eol",P.eol),this.eolEmitted=!0),k.ignoreEmpty&&!P.started&&(w=p.trimLeft(w));var A=d.stringToLines(w,P);return E?(A.lines.push(A.partial),A.partial=""):this.prependLeftBuf(p.bufFromString(A.partial)),A.lines.length>0?(P.preFileLineHook?this.runPreLineHook(A.lines):l.default.resolve(A.lines)).then(function(j){return P.started||O.runtime.headers?O.processCSVBody(j):O.processDataWithHead(j)}):l.default.resolve([])},x.prototype.processDataWithHead=function(w){if(this.params.noheader)this.params.headers?this.runtime.headers=this.params.headers:this.runtime.headers=[];else{for(var E="",O=[];w.length;){var k=E+w.shift(),P=this.rowSplit.parse(k);if(P.closed){O=P.cells,E="";break}E=k+h.default(k,this.runtime)}if(this.prependLeftBuf(p.bufFromString(E)),O.length===0)return[];this.params.headers?this.runtime.headers=this.params.headers:this.runtime.headers=O}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)},x.prototype.filterHeader=function(){if(this.runtime.selectedColumns=[],this.runtime.headers){for(var w=this.runtime.headers,E=0;E=A.length)N();else if(j.preFileLineHook){var V=A[B],Y=j.preFileLineHook(V,j.parsedLineNumber+B);if(B++,Y&&Y.then)Y.then(function(nt){A[B-1]=nt,P(A,j,B,N)});else{for(A[B-1]=Y;B0?r.concat([p.csvLineBuffer,d]):d}(s,l);l.csvLineBuffer=void 0;var h=function(d,p){var m=d.length-1;if(128&d[m]){for(;(192&d[m])==128;)m--;m--}return m!=d.length-1?(p.csvLineBuffer=d.slice(m+1),d.slice(0,m+1)):d}(c,l).toString("utf8");return l.started===!1?o.default(h):h}}).call(this,n(3).Buffer)},function(t,e,n){(function(r){var i=n(56);t.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(t,e){t.exports=function(n){for(var r=0;r0),this._needEmitDelimiter},enumerable:!0,configurable:!0}),c.prototype.parse=function(h){if(h.length===0||this.conv.parseParam.ignoreEmpty&&h.trim().length===0)return{cells:[],closed:!0};var d=this.quote,p=this.trim;this.escape,(this.conv.parseRuntime.delimiter instanceof Array||this.conv.parseRuntime.delimiter.toLowerCase()==="auto")&&(this.conv.parseRuntime.delimiter=this.getDelimiter(h)),this.needEmitDelimiter&&!this.delimiterEmitted&&(this.conv.emit("delimiter",this.conv.parseRuntime.delimiter),this.delimiterEmitted=!0);var m=this.conv.parseRuntime.delimiter,v=h.split(m);if(d==="off"){if(p)for(var y=0;yp&&(m=v,p=y)}),m},c.prototype.isQuoteOpen=function(h){var d=this.quote,p=this.escape;return h[0]===d&&(h[1]!==d||h[1]===p&&(h[2]===d||h.length===2))},c.prototype.isQuoteClose=function(h){var d=this.quote,p=this.escape;this.conv.parseParam.trim&&(h=o.trimRight(h));for(var m=0,v=h.length-1;h[v]===d||h[v]===p;)v--,m++;return m%2!=0},c.prototype.escapeQuote=function(h){var d="es|"+this.quote+"|"+this.escape;this.cachedRegExp[d]===void 0&&(this.cachedRegExp[d]=new RegExp("\\"+this.escape+"\\"+this.quote,"g"));var p=this.cachedRegExp[d];return h.replace(p,this.quote)},c.prototype.parseMultiLines=function(h){for(var d=[],p="";h.length;){var m=p+h.shift(),v=this.parse(m);v.cells.length===0&&this.conv.parseParam.ignoreEmpty||(v.closed||this.conv.parseParam.alwaysSplitAtEOL?(this.conv.parseRuntime.selectedColumns?d.push(o.filterArray(v.cells,this.conv.parseRuntime.selectedColumns)):d.push(v.cells),p=""):p=m+(i.default(m,this.conv.parseRuntime)||` -`))}return{rowsCells:d,partial:p}},c}();e.RowSplit=l},function(t,e,n){var r=this&&this.__importDefault||function(x){return x&&x.__esModule?x:{default:x}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(29)),o=r(n(60)),s=/^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$/;function l(x,w,E){if(w.parseParam.checkColumn&&w.parseRuntime.headers&&x.length!==w.parseRuntime.headers.length)throw i.default.column_mismatched(w.parseRuntime.parsedLineNumber+E);return function(O,k,P){for(var A=!1,j={},B=0,N=O.length;B-1){for(var P=w.split("."),A=!0;P.length>0;)if(P.shift().length===0){A=!1;break}!A||O.parseParam.colParser[w]&&O.parseParam.colParser[w].flat?O.parseRuntime.columnValueSetter[k]=p:O.parseRuntime.columnValueSetter[k]=m}else O.parseRuntime.columnValueSetter[k]=p;O.parseParam.nullObject===!0&&E==="null"&&(E=null),O.parseRuntime.columnValueSetter[k](x,w,E)}function p(x,w,E){x[w]=E}function m(x,w,E){o.default(x,w,E)}function v(x,w,E,O){return O.parseRuntime.headerType[E]?O.parseRuntime.headerType[E]:w.indexOf("number#!")>-1?O.parseRuntime.headerType[E]=y:w.indexOf("string#!")>-1?O.parseRuntime.headerType[E]=_:O.parseParam.checkType?O.parseRuntime.headerType[E]=T:O.parseRuntime.headerType[E]=_}function y(x){var w=parseFloat(x);return isNaN(w)?x:w}function _(x){return x.toString()}function T(x){var w=x.trim();return w===""?_(x):s.test(w)?y(x):w.length===5&&w.toLowerCase()==="false"||w.length===4&&w.toLowerCase()==="true"?function(E){var O=E.trim();return O.length!==5||O.toLowerCase()!=="false"}(x):w[0]==="{"&&w[w.length-1]==="}"||w[0]==="["&&w[w.length-1]==="]"?function(E){try{return JSON.parse(E)}catch{return E}}(x):_(x)}},function(t,e,n){var r=n(61);t.exports=function(i,o,s){return i==null?i:r(i,o,s)}},function(t,e,n){var r=n(62),i=n(74),o=n(103),s=n(20),l=n(104);t.exports=function(c,h,d,p){if(!s(c))return c;for(var m=-1,v=(h=i(h,c)).length,y=v-1,_=c;_!=null&&++m-1}},function(t,e,n){var r=n(9);t.exports=function(i,o){var s=this.__data__,l=r(s,i);return l<0?(++this.size,s.push([i,o])):s[l][1]=o,this}},function(t,e,n){var r=n(17)(n(19),"Map");t.exports=r},function(t,e,n){var r=n(10);t.exports=function(i){var o=r(this,i).delete(i);return this.size-=o?1:0,o}},function(t,e){t.exports=function(n){var r=typeof n;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?n!=="__proto__":n===null}},function(t,e,n){var r=n(10);t.exports=function(i){return r(this,i).get(i)}},function(t,e,n){var r=n(10);t.exports=function(i){return r(this,i).has(i)}},function(t,e,n){var r=n(10);t.exports=function(i,o){var s=r(this,i),l=s.size;return s.set(i,o),this.size+=s.size==l?0:1,this}},function(t,e,n){var r=n(101);t.exports=function(i){return i==null?"":r(i)}},function(t,e,n){var r=n(18),i=n(102),o=n(21),s=n(22),l=r?r.prototype:void 0,c=l?l.toString:void 0;t.exports=function h(d){if(typeof d=="string")return d;if(o(d))return i(d,h)+"";if(s(d))return c?c.call(d):"";var p=d+"";return p=="0"&&1/d==-1/0?"-0":p}},function(t,e){t.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(c.prototype,"needEmitAll",{get:function(){return!!this.converter.parseRuntime.then&&this.converter.parseParam.needEmitAll},enumerable:!0,configurable:!0}),c.prototype.processResult=function(h){var d=this,p=this.converter.parseRuntime.parsedLineNumber;return this.needPushDownstream&&this.converter.parseParam.downstreamFormat==="array"&&p===0&&l(this.converter,"["+o.EOL),new i.default(function(m,v){d.needEmitLine?function y(_,T,x,w,E){if(x>=_.length)E();else if(T.parseRuntime.subscribe&&T.parseRuntime.subscribe.onNext){var O=T.parseRuntime.subscribe.onNext,k=_[x],P=O(k,T.parseRuntime.parsedLineNumber+x);if(x++,P&&P.then)P.then(function(){(function(j,B,N,V,Y,nt,K){Y&&l(N,K),y(j,N,V,Y,nt)})(_,0,T,x,w,E,k)},E);else{for(w&&l(T,k);x<_.length;){var A=_[x];O(A,T.parseRuntime.parsedLineNumber+x),x++,w&&l(T,A)}E()}}else{if(w)for(;x<_.length;)A=_[x++],l(T,A);E()}}(h,d.converter,0,d.needPushDownstream,function(y){y?v(y):(d.appendFinalResult(h),m())}):(d.appendFinalResult(h),m())})},c.prototype.appendFinalResult=function(h){this.needEmitAll&&(this.finalResult=this.finalResult.concat(h)),this.converter.parseRuntime.parsedLineNumber+=h.length},c.prototype.processError=function(h){this.converter.parseRuntime.subscribe&&this.converter.parseRuntime.subscribe.onError&&this.converter.parseRuntime.subscribe.onError(h),this.converter.parseRuntime.then&&this.converter.parseRuntime.then.onrejected&&this.converter.parseRuntime.then.onrejected(h)},c.prototype.endProcess=function(){this.converter.parseRuntime.then&&this.converter.parseRuntime.then.onfulfilled&&(this.needEmitAll?this.converter.parseRuntime.then.onfulfilled(this.finalResult):this.converter.parseRuntime.then.onfulfilled([])),this.converter.parseRuntime.subscribe&&this.converter.parseRuntime.subscribe.onCompleted&&this.converter.parseRuntime.subscribe.onCompleted(),this.needPushDownstream&&this.converter.parseParam.downstreamFormat==="array"&&l(this.converter,"]"+o.EOL)},c}();function l(c,h){if(typeof h!="object"||c.options.objectMode)c.push(h);else{var d=JSON.stringify(h);c.push(d+(c.parseParam.downstreamFormat==="array"?","+o.EOL:o.EOL),"utf8")}}e.Result=s},function(t,e){e.endianness=function(){return"LE"},e.hostname=function(){return typeof location<"u"?location.hostname:""},e.loadavg=function(){return[]},e.uptime=function(){return 0},e.freemem=function(){return Number.MAX_VALUE},e.totalmem=function(){return Number.MAX_VALUE},e.cpus=function(){return[]},e.type=function(){return"Browser"},e.release=function(){return typeof navigator<"u"?navigator.appVersion:""},e.networkInterfaces=e.getNetworkInterfaces=function(){return{}},e.arch=function(){return"javascript"},e.platform=function(){return"browser"},e.tmpdir=e.tmpDir=function(){return"/tmp"},e.EOL=` -`,e.homedir=function(){return"/"}}]);const CMt=xs(OMt),kMt=t=>new Promise(e=>{CMt().fromString(t).then(e)}),PMt=new EMt,LMt=t=>PMt.parse(t),MMt="shlink",$4=t=>`${MMt}.${t}`;class AMt{constructor(e){St(this,"get",e=>{const n=this.localStorage.getItem($4(e));return n?JSON.parse(n):void 0});St(this,"set",(e,n)=>this.localStorage.setItem($4(e),JSON.stringify(n)));this.localStorage=e}}class RMt{constructor(e){this.storage=e}getTagColors(){return this.storage.get("colors")??{}}storeTagColors(e){this.storage.set("colors",e)}}const jMt=t=>{t.constant("localStorage",window.localStorage),t.service("Storage",AMt,"localStorage"),t.service("TagColorsStorage",RMt,"Storage"),t.constant("csvToJson",kMt),t.constant("jsonToCsv",LMt),t.constant("setTimeout",window.setTimeout),t.constant("clearTimeout",window.clearTimeout),t.serviceFactory("useTimeoutToggle",dPt,"setTimeout","clearTimeout")},Hu=new vJ,{container:VL}=Hu,NMt=(t,e)=>(...n)=>t[e](...n),DMt=(t,e)=>({...t,[e]:NMt(VL,e)}),Z1=(t,e=[])=>d8(t?Vtt(t):null,e.reduce(DMt,{}));Fft(Hu,Z1);sPt(Hu,Z1);Vdt(Hu);XPt(Hu,Z1);jMt(Hu);SLt(Hu,Z1);var HL={},BO={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.isPlainObject=e.clone=e.recursive=e.merge=e.main=void 0,t.exports=e=n,e.default=n;function n(){for(var h=[],d=0;d$.length)&&(I=$.length);for(var H=0,it=Array(I);HvP({appUpdated:Ift,servers:RPt,selectedServer:t.selectedServerReducer,settings:hLt}),BMt=t=>{var e;return t.settings&&((e=t.settings.visits)==null?void 0:e.defaultInterval)==="last180days"&&t.settings.visits&&(t.settings.visits.defaultInterval="last180Days"),t},$Mt=!0,lV={states:["settings","servers"],namespace:"shlink",namespaceSeparator:".",debounce:300},zMt=BMt(HL.load(lV)),UMt=t=>iz({devTools:!$Mt,reducer:FMt(t),preloadedState:zMt,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat(HL.save(lV))}),VMt=!!(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 HMt(t){if("serviceWorker"in navigator){if(new URL(i0.homepage,window.location.href).origin!==window.location.origin)return;window.addEventListener("load",()=>{const n=`${i0.homepage}/service-worker.js`;VMt?(WMt(n,t),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")})):cV(n,t)})}}function cV(t,e){navigator.serviceWorker.register(t).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."),e&&e.onUpdate&&e.onUpdate(n)):(console.log("Content is cached for offline use."),e&&e.onSuccess&&e.onSuccess(n)))})}}).catch(n=>{console.error("Error during service worker registration:",n)})}function WMt(t,e){fetch(t,{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()})}):cV(t,e)}).catch(()=>{console.log("No internet connection found. App is running in offline mode.")})}var $O={exports:{}};/* @preserve - * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com - * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade - */(function(t,e){(function(n,r){r(e)})(mp,function(n){var r="1.9.4";function i(a){var u,f,g,S;for(f=1,g=arguments.length;f"u"||!L||!L.Mixin)){a=E(a)?a:[a];for(var u=0;u0?Math.floor(a):Math.ceil(a)};G.prototype={clone:function(){return new G(this.x,this.y)},add:function(a){return this.clone()._add(I(a))},_add:function(a){return this.x+=a.x,this.y+=a.y,this},subtract:function(a){return this.clone()._subtract(I(a))},_subtract:function(a){return this.x-=a.x,this.y-=a.y,this},divideBy:function(a){return this.clone()._divideBy(a)},_divideBy:function(a){return this.x/=a,this.y/=a,this},multiplyBy:function(a){return this.clone()._multiplyBy(a)},_multiplyBy:function(a){return this.x*=a,this.y*=a,this},scaleBy:function(a){return new G(this.x*a.x,this.y*a.y)},unscaleBy:function(a){return new G(this.x/a.x,this.y/a.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=$(this.x),this.y=$(this.y),this},distanceTo:function(a){a=I(a);var u=a.x-this.x,f=a.y-this.y;return Math.sqrt(u*u+f*f)},equals:function(a){return a=I(a),a.x===this.x&&a.y===this.y},contains:function(a){return a=I(a),Math.abs(a.x)<=Math.abs(this.x)&&Math.abs(a.y)<=Math.abs(this.y)},toString:function(){return"Point("+m(this.x)+", "+m(this.y)+")"}};function I(a,u,f){return a instanceof G?a:E(a)?new G(a[0],a[1]):a==null?a:typeof a=="object"&&"x"in a&&"y"in a?new G(a.x,a.y):new G(a,u,f)}function H(a,u){if(a)for(var f=u?[a,u]:a,g=0,S=f.length;g=this.min.x&&f.x<=this.max.x&&u.y>=this.min.y&&f.y<=this.max.y},intersects:function(a){a=it(a);var u=this.min,f=this.max,g=a.min,S=a.max,C=S.x>=u.x&&g.x<=f.x,D=S.y>=u.y&&g.y<=f.y;return C&&D},overlaps:function(a){a=it(a);var u=this.min,f=this.max,g=a.min,S=a.max,C=S.x>u.x&&g.xu.y&&g.y=u.lat&&S.lat<=f.lat&&g.lng>=u.lng&&S.lng<=f.lng},intersects:function(a){a=Q(a);var u=this._southWest,f=this._northEast,g=a.getSouthWest(),S=a.getNorthEast(),C=S.lat>=u.lat&&g.lat<=f.lat,D=S.lng>=u.lng&&g.lng<=f.lng;return C&&D},overlaps:function(a){a=Q(a);var u=this._southWest,f=this._northEast,g=a.getSouthWest(),S=a.getNorthEast(),C=S.lat>u.lat&&g.latu.lng&&g.lng1,ln=function(){var a=!1;try{var u=Object.defineProperty({},"passive",{get:function(){a=!0}});window.addEventListener("testPassiveEventSupport",p,u),window.removeEventListener("testPassiveEventSupport",p,u)}catch{}return a}(),vr=function(){return!!document.createElement("canvas").getContext}(),Cn=!!(document.createElementNS&&It("svg").createSVGRect),Hn=!!Cn&&function(){var a=document.createElement("div");return a.innerHTML="",(a.firstChild&&a.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),kn=!Cn&&function(){try{var a=document.createElement("div");a.innerHTML='';var u=a.firstChild;return u.style.behavior="url(#default#VML)",u&&typeof u.adj=="object"}catch{return!1}}(),mi=navigator.platform.indexOf("Mac")===0,gi=navigator.platform.indexOf("Linux")===0;function Ne(a){return navigator.userAgent.toLowerCase().indexOf(a)>=0}var wt={ie:_t,ielt9:Ct,edge:Mt,webkit:Lt,android:jt,android23:dt,androidStock:xt,opera:yt,chrome:Et,gecko:At,safari:Bt,phantom:ie,opera12:ae,win:ee,ie3d:Ve,webkit3d:Fe,gecko3d:On,any3d:gr,mobile:Or,mobileWebkit:Vn,mobileWebkit3d:Vl,msPointer:pi,pointer:Hl,touch:Wu,touchNative:Wl,mobileOpera:Yl,mobileGecko:Es,retina:gn,passiveEvents:ln,canvas:vr,svg:Cn,vml:kn,inlineSvg:Hn,mac:mi,linux:gi},Yd=wt.msPointer?"MSPointerDown":"pointerdown",Zd=wt.msPointer?"MSPointerMove":"pointermove",Gd=wt.msPointer?"MSPointerUp":"pointerup",qd=wt.msPointer?"MSPointerCancel":"pointercancel",Zl={touchstart:Yd,touchmove:Zd,touchend:Gd,touchcancel:qd},Kd={touchstart:J1,touchmove:Os,touchend:Os,touchcancel:Os},vi={},Xd=!1;function G1(a,u,f){return u==="touchstart"&&Q1(),Kd[u]?(f=Kd[u].bind(this,f),a.addEventListener(Zl[u],f,!1),f):(console.warn("wrong event specified:",u),p)}function q1(a,u,f){if(!Zl[u]){console.warn("wrong event specified:",u);return}a.removeEventListener(Zl[u],f,!1)}function K1(a){vi[a.pointerId]=a}function X1(a){vi[a.pointerId]&&(vi[a.pointerId]=a)}function Qd(a){delete vi[a.pointerId]}function Q1(){Xd||(document.addEventListener(Yd,K1,!0),document.addEventListener(Zd,X1,!0),document.addEventListener(Gd,Qd,!0),document.addEventListener(qd,Qd,!0),Xd=!0)}function Os(a,u){if(u.pointerType!==(u.MSPOINTER_TYPE_MOUSE||"mouse")){u.touches=[];for(var f in vi)u.touches.push(vi[f]);u.changedTouches=[u],a(u)}}function J1(a,u){u.MSPOINTER_TYPE_TOUCH&&u.pointerType===u.MSPOINTER_TYPE_TOUCH&&me(u),Os(a,u)}function tx(a){var u={},f,g;for(g in a)f=a[g],u[g]=f&&f.bind?f.bind(a):f;return a=u,u.type="dblclick",u.detail=2,u.isTrusted=!1,u._simulated=!0,u}var ex=200;function nx(a,u){a.addEventListener("dblclick",u);var f=0,g;function S(C){if(C.detail!==1){g=C.detail;return}if(!(C.pointerType==="mouse"||C.sourceCapabilities&&!C.sourceCapabilities.firesTouchEvents)){var D=rf(C);if(!(D.some(function(X){return X instanceof HTMLLabelElement&&X.attributes.for})&&!D.some(function(X){return X instanceof HTMLInputElement||X instanceof HTMLSelectElement}))){var Z=Date.now();Z-f<=ex?(g++,g===2&&u(tx(C))):g=1,f=Z}}}return a.addEventListener("click",S),{dblclick:u,simDblclick:S}}function rx(a,u){a.removeEventListener("dblclick",u.dblclick),a.removeEventListener("click",u.simDblclick)}var Gl=Ps(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),xo=Ps(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Jd=xo==="webkitTransition"||xo==="OTransition"?xo+"End":"transitionend";function tf(a){return typeof a=="string"?document.getElementById(a):a}function wo(a,u){var f=a.style[u]||a.currentStyle&&a.currentStyle[u];if((!f||f==="auto")&&document.defaultView){var g=document.defaultView.getComputedStyle(a,null);f=g?g[u]:null}return f==="auto"?null:f}function Yt(a,u,f){var g=document.createElement(a);return g.className=u||"",f&&f.appendChild(g),g}function Jt(a){var u=a.parentNode;u&&u.removeChild(a)}function Cs(a){for(;a.firstChild;)a.removeChild(a.firstChild)}function yi(a){var u=a.parentNode;u&&u.lastChild!==a&&u.appendChild(a)}function _i(a){var u=a.parentNode;u&&u.firstChild!==a&&u.insertBefore(a,u.firstChild)}function ql(a,u){if(a.classList!==void 0)return a.classList.contains(u);var f=ks(a);return f.length>0&&new RegExp("(^|\\s)"+u+"(\\s|$)").test(f)}function Dt(a,u){if(a.classList!==void 0)for(var f=y(u),g=0,S=f.length;g0?2*window.devicePixelRatio:1;function sf(a){return wt.edge?a.wheelDeltaY/2:a.deltaY&&a.deltaMode===0?-a.deltaY/sx:a.deltaY&&a.deltaMode===1?-a.deltaY*20:a.deltaY&&a.deltaMode===2?-a.deltaY*60:a.deltaX||a.deltaZ?0:a.wheelDelta?(a.wheelDeltaY||a.wheelDelta)/2:a.detail&&Math.abs(a.detail)<32765?-a.detail*20:a.detail?a.detail/-32765*60:0}function ac(a,u){var f=u.relatedTarget;if(!f)return!0;try{for(;f&&f!==a;)f=f.parentNode}catch{return!1}return f!==a}var ax={__proto__:null,on:Rt,off:Kt,stopPropagation:Ur,disableScrollPropagation:sc,disableClickPropagation:Oo,preventDefault:me,stop:Vr,getPropagationPath:rf,getMousePosition:of,getWheelDelta:sf,isExternalTarget:ac,addListener:Rt,removeListener:Kt},af=ct.extend({run:function(a,u,f,g){this.stop(),this._el=a,this._inProgress=!0,this._duration=f||.25,this._easeOutPower=1/Math.max(g||.5,.2),this._startPos=zr(a),this._offset=u.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=V(this._animate,this),this._step()},_step:function(a){var u=+new Date-this._startTime,f=this._duration*1e3;uthis.options.maxZoom)?this.setZoom(a):this},panInsideBounds:function(a,u){this._enforcingBounds=!0;var f=this.getCenter(),g=this._limitCenter(f,this._zoom,Q(a));return f.equals(g)||this.panTo(g,u),this._enforcingBounds=!1,this},panInside:function(a,u){u=u||{};var f=I(u.paddingTopLeft||u.padding||[0,0]),g=I(u.paddingBottomRight||u.padding||[0,0]),S=this.project(this.getCenter()),C=this.project(a),D=this.getPixelBounds(),Z=it([D.min.add(f),D.max.subtract(g)]),X=Z.getSize();if(!Z.contains(C)){this._enforcingBounds=!0;var ut=C.subtract(Z.getCenter()),gt=Z.extend(C).getSize().subtract(X);S.x+=ut.x<0?-gt.x:gt.x,S.y+=ut.y<0?-gt.y:gt.y,this.panTo(this.unproject(S),u),this._enforcingBounds=!1}return this},invalidateSize:function(a){if(!this._loaded)return this;a=i({animate:!1,pan:!0},a===!0?{animate:!0}:a);var u=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var f=this.getSize(),g=u.divideBy(2).round(),S=f.divideBy(2).round(),C=g.subtract(S);return!C.x&&!C.y?this:(a.animate&&a.pan?this.panBy(C):(a.pan&&this._rawPanBy(C),this.fire("move"),a.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(s(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:u,newSize:f}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(a){if(a=this._locateOptions=i({timeout:1e4,watch:!1},a),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var u=s(this._handleGeolocationResponse,this),f=s(this._handleGeolocationError,this);return a.watch?this._locationWatchId=navigator.geolocation.watchPosition(u,f,a):navigator.geolocation.getCurrentPosition(u,f,a),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(a){if(this._container._leaflet_id){var u=a.code,f=a.message||(u===1?"permission denied":u===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:u,message:"Geolocation error: "+f+"."})}},_handleGeolocationResponse:function(a){if(this._container._leaflet_id){var u=a.coords.latitude,f=a.coords.longitude,g=new tt(u,f),S=g.toBounds(a.coords.accuracy*2),C=this._locateOptions;if(C.setView){var D=this.getBoundsZoom(S);this.setView(g,C.maxZoom?Math.min(D,C.maxZoom):D)}var Z={latlng:g,bounds:S,timestamp:a.timestamp};for(var X in a.coords)typeof a.coords[X]=="number"&&(Z[X]=a.coords[X]);this.fire("locationfound",Z)}},addHandler:function(a,u){if(!u)return this;var f=this[a]=new u(this);return this._handlers.push(f),this.options[a]&&f.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(),Jt(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(Y(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var a;for(a in this._layers)this._layers[a].remove();for(a in this._panes)Jt(this._panes[a]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(a,u){var f="leaflet-pane"+(a?" leaflet-"+a.replace("Pane","")+"-pane":""),g=Yt("div",f,u||this._mapPane);return a&&(this._panes[a]=g),g},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var a=this.getPixelBounds(),u=this.unproject(a.getBottomLeft()),f=this.unproject(a.getTopRight());return new W(u,f)},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(a,u,f){a=Q(a),f=I(f||[0,0]);var g=this.getZoom()||0,S=this.getMinZoom(),C=this.getMaxZoom(),D=a.getNorthWest(),Z=a.getSouthEast(),X=this.getSize().subtract(f),ut=it(this.project(Z,g),this.project(D,g)).getSize(),gt=wt.any3d?this.options.zoomSnap:1,Ot=X.x/ut.x,Ft=X.y/ut.y,Te=u?Math.max(Ot,Ft):Math.min(Ot,Ft);return g=this.getScaleZoom(Te,g),gt&&(g=Math.round(g/(gt/100))*(gt/100),g=u?Math.ceil(g/gt)*gt:Math.floor(g/gt)*gt),Math.max(S,Math.min(C,g))},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(a,u){var f=this._getTopLeftPoint(a,u);return new H(f,f.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(a){return this.options.crs.getProjectedBounds(a===void 0?this.getZoom():a)},getPane:function(a){return typeof a=="string"?this._panes[a]:a},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(a,u){var f=this.options.crs;return u=u===void 0?this._zoom:u,f.scale(a)/f.scale(u)},getScaleZoom:function(a,u){var f=this.options.crs;u=u===void 0?this._zoom:u;var g=f.zoom(a*f.scale(u));return isNaN(g)?1/0:g},project:function(a,u){return u=u===void 0?this._zoom:u,this.options.crs.latLngToPoint(rt(a),u)},unproject:function(a,u){return u=u===void 0?this._zoom:u,this.options.crs.pointToLatLng(I(a),u)},layerPointToLatLng:function(a){var u=I(a).add(this.getPixelOrigin());return this.unproject(u)},latLngToLayerPoint:function(a){var u=this.project(rt(a))._round();return u._subtract(this.getPixelOrigin())},wrapLatLng:function(a){return this.options.crs.wrapLatLng(rt(a))},wrapLatLngBounds:function(a){return this.options.crs.wrapLatLngBounds(Q(a))},distance:function(a,u){return this.options.crs.distance(rt(a),rt(u))},containerPointToLayerPoint:function(a){return I(a).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(a){return I(a).add(this._getMapPanePos())},containerPointToLatLng:function(a){var u=this.containerPointToLayerPoint(I(a));return this.layerPointToLatLng(u)},latLngToContainerPoint:function(a){return this.layerPointToContainerPoint(this.latLngToLayerPoint(rt(a)))},mouseEventToContainerPoint:function(a){return of(a,this._container)},mouseEventToLayerPoint:function(a){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(a))},mouseEventToLatLng:function(a){return this.layerPointToLatLng(this.mouseEventToLayerPoint(a))},_initContainer:function(a){var u=this._container=tf(a);if(u){if(u._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Rt(u,"scroll",this._onScroll,this),this._containerId=c(u)},_initLayout:function(){var a=this._container;this._fadeAnimated=this.options.fadeAnimation&&wt.any3d,Dt(a,"leaflet-container"+(wt.touch?" leaflet-touch":"")+(wt.retina?" leaflet-retina":"")+(wt.ielt9?" leaflet-oldie":"")+(wt.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var u=wo(a,"position");u!=="absolute"&&u!=="relative"&&u!=="fixed"&&u!=="sticky"&&(a.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var a=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),oe(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||(Dt(a.markerPane,"leaflet-zoom-hide"),Dt(a.shadowPane,"leaflet-zoom-hide"))},_resetView:function(a,u,f){oe(this._mapPane,new G(0,0));var g=!this._loaded;this._loaded=!0,u=this._limitZoom(u),this.fire("viewprereset");var S=this._zoom!==u;this._moveStart(S,f)._move(a,u)._moveEnd(S),this.fire("viewreset"),g&&this.fire("load")},_moveStart:function(a,u){return a&&this.fire("zoomstart"),u||this.fire("movestart"),this},_move:function(a,u,f,g){u===void 0&&(u=this._zoom);var S=this._zoom!==u;return this._zoom=u,this._lastCenter=a,this._pixelOrigin=this._getNewPixelOrigin(a),g?f&&f.pinch&&this.fire("zoom",f):((S||f&&f.pinch)&&this.fire("zoom",f),this.fire("move",f)),this},_moveEnd:function(a){return a&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return Y(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(a){oe(this._mapPane,this._getMapPanePos().subtract(a))},_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(a){this._targets={},this._targets[c(this._container)]=this;var u=a?Kt:Rt;u(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&u(window,"resize",this._onResize,this),wt.any3d&&this.options.transform3DLimit&&(a?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){Y(this._resizeRequest),this._resizeRequest=V(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var a=this._getMapPanePos();Math.max(Math.abs(a.x),Math.abs(a.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(a,u){for(var f=[],g,S=u==="mouseout"||u==="mouseover",C=a.target||a.srcElement,D=!1;C;){if(g=this._targets[c(C)],g&&(u==="click"||u==="preclick")&&this._draggableMoved(g)){D=!0;break}if(g&&g.listens(u,!0)&&(S&&!ac(C,a)||(f.push(g),S))||C===this._container)break;C=C.parentNode}return!f.length&&!D&&!S&&this.listens(u,!0)&&(f=[this]),f},_isClickDisabled:function(a){for(;a&&a!==this._container;){if(a._leaflet_disable_click)return!0;a=a.parentNode}},_handleDOMEvent:function(a){var u=a.target||a.srcElement;if(!(!this._loaded||u._leaflet_disable_events||a.type==="click"&&this._isClickDisabled(u))){var f=a.type;f==="mousedown"&&ec(u),this._fireDOMEvent(a,f)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(a,u,f){if(a.type==="click"){var g=i({},a);g.type="preclick",this._fireDOMEvent(g,g.type,f)}var S=this._findEventTargets(a,u);if(f){for(var C=[],D=0;D0?Math.round(a-u)/2:Math.max(0,Math.ceil(a))-Math.max(0,Math.floor(u))},_limitZoom:function(a){var u=this.getMinZoom(),f=this.getMaxZoom(),g=wt.any3d?this.options.zoomSnap:1;return g&&(a=Math.round(a/g)*g),Math.max(u,Math.min(f,a))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){ne(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(a,u){var f=this._getCenterOffset(a)._trunc();return(u&&u.animate)!==!0&&!this.getSize().contains(f)?!1:(this.panBy(f,u),!0)},_createAnimProxy:function(){var a=this._proxy=Yt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(a),this.on("zoomanim",function(u){var f=Gl,g=this._proxy.style[f];$r(this._proxy,this.project(u.center,u.zoom),this.getZoomScale(u.zoom,1)),g===this._proxy.style[f]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){Jt(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var a=this.getCenter(),u=this.getZoom();$r(this._proxy,this.project(a,u),this.getZoomScale(u,1))},_catchTransitionEnd:function(a){this._animatingZoom&&a.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(a,u,f){if(this._animatingZoom)return!0;if(f=f||{},!this._zoomAnimated||f.animate===!1||this._nothingToAnimate()||Math.abs(u-this._zoom)>this.options.zoomAnimationThreshold)return!1;var g=this.getZoomScale(u),S=this._getCenterOffset(a)._divideBy(1-1/g);return f.animate!==!0&&!this.getSize().contains(S)?!1:(V(function(){this._moveStart(!0,f.noMoveStart||!1)._animateZoom(a,u,!0)},this),!0)},_animateZoom:function(a,u,f,g){this._mapPane&&(f&&(this._animatingZoom=!0,this._animateToCenter=a,this._animateToZoom=u,Dt(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:a,zoom:u,noUpdate:g}),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&&ne(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 lx(a,u){return new Ut(a,u)}var cn=K.extend({options:{position:"topright"},initialize:function(a){_(this,a)},getPosition:function(){return this.options.position},setPosition:function(a){var u=this._map;return u&&u.removeControl(this),this.options.position=a,u&&u.addControl(this),this},getContainer:function(){return this._container},addTo:function(a){this.remove(),this._map=a;var u=this._container=this.onAdd(a),f=this.getPosition(),g=a._controlCorners[f];return Dt(u,"leaflet-control"),f.indexOf("bottom")!==-1?g.insertBefore(u,g.firstChild):g.appendChild(u),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(Jt(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(a){this._map&&a&&a.screenX>0&&a.screenY>0&&this._map.getContainer().focus()}}),Co=function(a){return new cn(a)};Ut.include({addControl:function(a){return a.addTo(this),this},removeControl:function(a){return a.remove(),this},_initControlPos:function(){var a=this._controlCorners={},u="leaflet-",f=this._controlContainer=Yt("div",u+"control-container",this._container);function g(S,C){var D=u+S+" "+u+C;a[S+C]=Yt("div",D,f)}g("top","left"),g("top","right"),g("bottom","left"),g("bottom","right")},_clearControlPos:function(){for(var a in this._controlCorners)Jt(this._controlCorners[a]);Jt(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var lf=cn.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(a,u,f,g){return f1,this._baseLayersList.style.display=a?"":"none"),this._separator.style.display=u&&a?"":"none",this},_onLayerChange:function(a){this._handlingClick||this._update();var u=this._getLayer(c(a.target)),f=u.overlay?a.type==="add"?"overlayadd":"overlayremove":a.type==="add"?"baselayerchange":null;f&&this._map.fire(f,u)},_createRadioElement:function(a,u){var f='",g=document.createElement("div");return g.innerHTML=f,g.firstChild},_addItem:function(a){var u=document.createElement("label"),f=this._map.hasLayer(a.layer),g;a.overlay?(g=document.createElement("input"),g.type="checkbox",g.className="leaflet-control-layers-selector",g.defaultChecked=f):g=this._createRadioElement("leaflet-base-layers_"+c(this),f),this._layerControlInputs.push(g),g.layerId=c(a.layer),Rt(g,"click",this._onInputClick,this);var S=document.createElement("span");S.innerHTML=" "+a.name;var C=document.createElement("span");u.appendChild(C),C.appendChild(g),C.appendChild(S);var D=a.overlay?this._overlaysList:this._baseLayersList;return D.appendChild(u),this._checkDisabledLayers(),u},_onInputClick:function(){if(!this._preventClick){var a=this._layerControlInputs,u,f,g=[],S=[];this._handlingClick=!0;for(var C=a.length-1;C>=0;C--)u=a[C],f=this._getLayer(u.layerId).layer,u.checked?g.push(f):u.checked||S.push(f);for(C=0;C=0;S--)u=a[S],f=this._getLayer(u.layerId).layer,u.disabled=f.options.minZoom!==void 0&&gf.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var a=this._section;this._preventClick=!0,Rt(a,"click",me),this.expand();var u=this;setTimeout(function(){Kt(a,"click",me),u._preventClick=!1})}}),cx=function(a,u,f){return new lf(a,u,f)},lc=cn.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(a){var u="leaflet-control-zoom",f=Yt("div",u+" leaflet-bar"),g=this.options;return this._zoomInButton=this._createButton(g.zoomInText,g.zoomInTitle,u+"-in",f,this._zoomIn),this._zoomOutButton=this._createButton(g.zoomOutText,g.zoomOutTitle,u+"-out",f,this._zoomOut),this._updateDisabled(),a.on("zoomend zoomlevelschange",this._updateDisabled,this),f},onRemove:function(a){a.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(a){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(a.shiftKey?3:1))},_createButton:function(a,u,f,g,S){var C=Yt("a",f,g);return C.innerHTML=a,C.href="#",C.title=u,C.setAttribute("role","button"),C.setAttribute("aria-label",u),Oo(C),Rt(C,"click",Vr),Rt(C,"click",S,this),Rt(C,"click",this._refocusOnMap,this),C},_updateDisabled:function(){var a=this._map,u="leaflet-disabled";ne(this._zoomInButton,u),ne(this._zoomOutButton,u),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||a._zoom===a.getMinZoom())&&(Dt(this._zoomOutButton,u),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||a._zoom===a.getMaxZoom())&&(Dt(this._zoomInButton,u),this._zoomInButton.setAttribute("aria-disabled","true"))}});Ut.mergeOptions({zoomControl:!0}),Ut.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new lc,this.addControl(this.zoomControl))});var ux=function(a){return new lc(a)},cf=cn.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(a){var u="leaflet-control-scale",f=Yt("div",u),g=this.options;return this._addScales(g,u+"-line",f),a.on(g.updateWhenIdle?"moveend":"move",this._update,this),a.whenReady(this._update,this),f},onRemove:function(a){a.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(a,u,f){a.metric&&(this._mScale=Yt("div",u,f)),a.imperial&&(this._iScale=Yt("div",u,f))},_update:function(){var a=this._map,u=a.getSize().y/2,f=a.distance(a.containerPointToLatLng([0,u]),a.containerPointToLatLng([this.options.maxWidth,u]));this._updateScales(f)},_updateScales:function(a){this.options.metric&&a&&this._updateMetric(a),this.options.imperial&&a&&this._updateImperial(a)},_updateMetric:function(a){var u=this._getRoundNum(a),f=u<1e3?u+" m":u/1e3+" km";this._updateScale(this._mScale,f,u/a)},_updateImperial:function(a){var u=a*3.2808399,f,g,S;u>5280?(f=u/5280,g=this._getRoundNum(f),this._updateScale(this._iScale,g+" mi",g/f)):(S=this._getRoundNum(u),this._updateScale(this._iScale,S+" ft",S/u))},_updateScale:function(a,u,f){a.style.width=Math.round(this.options.maxWidth*f)+"px",a.innerHTML=u},_getRoundNum:function(a){var u=Math.pow(10,(Math.floor(a)+"").length-1),f=a/u;return f=f>=10?10:f>=5?5:f>=3?3:f>=2?2:1,u*f}}),hx=function(a){return new cf(a)},dx='',cc=cn.extend({options:{position:"bottomright",prefix:''+(wt.inlineSvg?dx+" ":"")+"Leaflet"},initialize:function(a){_(this,a),this._attributions={}},onAdd:function(a){a.attributionControl=this,this._container=Yt("div","leaflet-control-attribution"),Oo(this._container);for(var u in a._layers)a._layers[u].getAttribution&&this.addAttribution(a._layers[u].getAttribution());return this._update(),a.on("layeradd",this._addAttribution,this),this._container},onRemove:function(a){a.off("layeradd",this._addAttribution,this)},_addAttribution:function(a){a.layer.getAttribution&&(this.addAttribution(a.layer.getAttribution()),a.layer.once("remove",function(){this.removeAttribution(a.layer.getAttribution())},this))},setPrefix:function(a){return this.options.prefix=a,this._update(),this},addAttribution:function(a){return a?(this._attributions[a]||(this._attributions[a]=0),this._attributions[a]++,this._update(),this):this},removeAttribution:function(a){return a?(this._attributions[a]&&(this._attributions[a]--,this._update()),this):this},_update:function(){if(this._map){var a=[];for(var u in this._attributions)this._attributions[u]&&a.push(u);var f=[];this.options.prefix&&f.push(this.options.prefix),a.length&&f.push(a.join(", ")),this._container.innerHTML=f.join(' ')}}});Ut.mergeOptions({attributionControl:!0}),Ut.addInitHook(function(){this.options.attributionControl&&new cc().addTo(this)});var fx=function(a){return new cc(a)};cn.Layers=lf,cn.Zoom=lc,cn.Scale=cf,cn.Attribution=cc,Co.layers=cx,Co.zoom=ux,Co.scale=hx,Co.attribution=fx;var Ln=K.extend({initialize:function(a){this._map=a},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}});Ln.addTo=function(a,u){return a.addHandler(u,this),this};var px={Events:et},uf=wt.touch?"touchstart mousedown":"mousedown",yr=ct.extend({options:{clickTolerance:3},initialize:function(a,u,f,g){_(this,g),this._element=a,this._dragStartTarget=u||a,this._preventOutline=f},enable:function(){this._enabled||(Rt(this._dragStartTarget,uf,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(yr._dragging===this&&this.finishDrag(!0),Kt(this._dragStartTarget,uf,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(a){if(this._enabled&&(this._moved=!1,!ql(this._element,"leaflet-zoom-anim"))){if(a.touches&&a.touches.length!==1){yr._dragging===this&&this.finishDrag();return}if(!(yr._dragging||a.shiftKey||a.which!==1&&a.button!==1&&!a.touches)&&(yr._dragging=this,this._preventOutline&&ec(this._element),Ql(),So(),!this._moving)){this.fire("down");var u=a.touches?a.touches[0]:a,f=ef(this._element);this._startPoint=new G(u.clientX,u.clientY),this._startPos=zr(this._element),this._parentScale=nc(f);var g=a.type==="mousedown";Rt(document,g?"mousemove":"touchmove",this._onMove,this),Rt(document,g?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(a){if(this._enabled){if(a.touches&&a.touches.length>1){this._moved=!0;return}var u=a.touches&&a.touches.length===1?a.touches[0]:a,f=new G(u.clientX,u.clientY)._subtract(this._startPoint);!f.x&&!f.y||Math.abs(f.x)+Math.abs(f.y)C&&(D=Z,C=X);C>f&&(u[D]=1,hc(a,u,f,g,D),hc(a,u,f,D,S))}function yx(a,u){for(var f=[a[0]],g=1,S=0,C=a.length;gu&&(f.push(a[g]),S=g);return Su.max.x&&(f|=2),a.yu.max.y&&(f|=8),f}function _x(a,u){var f=u.x-a.x,g=u.y-a.y;return f*f+g*g}function ko(a,u,f,g){var S=u.x,C=u.y,D=f.x-S,Z=f.y-C,X=D*D+Z*Z,ut;return X>0&&(ut=((a.x-S)*D+(a.y-C)*Z)/X,ut>1?(S=f.x,C=f.y):ut>0&&(S+=D*ut,C+=Z*ut)),D=a.x-S,Z=a.y-C,g?D*D+Z*Z:new G(S,C)}function We(a){return!E(a[0])||typeof a[0][0]!="object"&&typeof a[0][0]<"u"}function vf(a){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),We(a)}function yf(a,u){var f,g,S,C,D,Z,X,ut;if(!a||a.length===0)throw new Error("latlngs not passed");We(a)||(console.warn("latlngs are not flat! Only the first ring will be used"),a=a[0]);var gt=rt([0,0]),Ot=Q(a),Ft=Ot.getNorthWest().distanceTo(Ot.getSouthWest())*Ot.getNorthEast().distanceTo(Ot.getNorthWest());Ft<1700&&(gt=uc(a));var Te=a.length,ce=[];for(f=0;fg){X=(C-g)/S,ut=[Z.x-X*(Z.x-D.x),Z.y-X*(Z.y-D.y)];break}var Pe=u.unproject(I(ut));return rt([Pe.lat+gt.lat,Pe.lng+gt.lng])}var bx={__proto__:null,simplify:ff,pointToSegmentDistance:pf,closestPointOnSegment:gx,clipSegment:gf,_getEdgeIntersection:As,_getBitCode:Hr,_sqClosestPointOnSegment:ko,isFlat:We,_flat:vf,polylineCenter:yf},dc={project:function(a){return new G(a.lng,a.lat)},unproject:function(a){return new tt(a.y,a.x)},bounds:new H([-180,-90],[180,90])},fc={R:6378137,R_MINOR:6356752314245179e-9,bounds:new H([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(a){var u=Math.PI/180,f=this.R,g=a.lat*u,S=this.R_MINOR/f,C=Math.sqrt(1-S*S),D=C*Math.sin(g),Z=Math.tan(Math.PI/4-g/2)/Math.pow((1-D)/(1+D),C/2);return g=-f*Math.log(Math.max(Z,1e-10)),new G(a.lng*u*f,g)},unproject:function(a){for(var u=180/Math.PI,f=this.R,g=this.R_MINOR/f,S=Math.sqrt(1-g*g),C=Math.exp(-a.y/f),D=Math.PI/2-2*Math.atan(C),Z=0,X=.1,ut;Z<15&&Math.abs(X)>1e-7;Z++)ut=S*Math.sin(D),ut=Math.pow((1-ut)/(1+ut),S/2),X=Math.PI/2-2*Math.atan(C*ut)-D,D+=X;return new tt(D*u,a.x*u/f)}},xx={__proto__:null,LonLat:dc,Mercator:fc,SphericalMercator:z},wx=i({},M,{code:"EPSG:3395",projection:fc,transformation:function(){var a=.5/(Math.PI*fc.R);return st(a,.5,-a,.5)}()}),_f=i({},M,{code:"EPSG:4326",projection:dc,transformation:st(1/180,1,-1/180,.5)}),Sx=i({},mt,{projection:dc,transformation:st(1,0,-1,0),scale:function(a){return Math.pow(2,a)},zoom:function(a){return Math.log(a)/Math.LN2},distance:function(a,u){var f=u.lng-a.lng,g=u.lat-a.lat;return Math.sqrt(f*f+g*g)},infinite:!0});mt.Earth=M,mt.EPSG3395=wx,mt.EPSG3857=ht,mt.EPSG900913=bt,mt.EPSG4326=_f,mt.Simple=Sx;var un=ct.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(a){return a.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(a){return a&&a.removeLayer(this),this},getPane:function(a){return this._map.getPane(a?this.options[a]||a:this.options.pane)},addInteractiveTarget:function(a){return this._map._targets[c(a)]=this,this},removeInteractiveTarget:function(a){return delete this._map._targets[c(a)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(a){var u=a.target;if(u.hasLayer(this)){if(this._map=u,this._zoomAnimated=u._zoomAnimated,this.getEvents){var f=this.getEvents();u.on(f,this),this.once("remove",function(){u.off(f,this)},this)}this.onAdd(u),this.fire("add"),u.fire("layeradd",{layer:this})}}});Ut.include({addLayer:function(a){if(!a._layerAdd)throw new Error("The provided object is not a Layer.");var u=c(a);return this._layers[u]?this:(this._layers[u]=a,a._mapToAdd=this,a.beforeAdd&&a.beforeAdd(this),this.whenReady(a._layerAdd,a),this)},removeLayer:function(a){var u=c(a);return this._layers[u]?(this._loaded&&a.onRemove(this),delete this._layers[u],this._loaded&&(this.fire("layerremove",{layer:a}),a.fire("remove")),a._map=a._mapToAdd=null,this):this},hasLayer:function(a){return c(a)in this._layers},eachLayer:function(a,u){for(var f in this._layers)a.call(u,this._layers[f]);return this},_addLayers:function(a){a=a?E(a)?a:[a]:[];for(var u=0,f=a.length;uthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&u[0]instanceof tt&&u[0].equals(u[f-1])&&u.pop(),u},_setLatLngs:function(a){Yn.prototype._setLatLngs.call(this,a),We(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return We(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var a=this._renderer._bounds,u=this.options.weight,f=new G(u,u);if(a=new H(a.min.subtract(f),a.max.add(f)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(a))){if(this.options.noClip){this._parts=this._rings;return}for(var g=0,S=this._rings.length,C;ga.y!=S.y>a.y&&a.x<(S.x-g.x)*(a.y-g.y)/(S.y-g.y)+g.x&&(u=!u);return u||Yn.prototype._containsPoint.call(this,a,!0)}});function Mx(a,u){return new wi(a,u)}var Zn=Wn.extend({initialize:function(a,u){_(this,u),this._layers={},a&&this.addData(a)},addData:function(a){var u=E(a)?a:a.features,f,g,S;if(u){for(f=0,g=u.length;f0&&S.push(S[0].slice()),S}function Si(a,u){return a.feature?i({},a.feature,{geometry:u}):Fs(u)}function Fs(a){return a.type==="Feature"||a.type==="FeatureCollection"?a:{type:"Feature",properties:{},geometry:a}}var vc={toGeoJSON:function(a){return Si(this,{type:"Point",coordinates:gc(this.getLatLng(),a)})}};Rs.include(vc),pc.include(vc),js.include(vc),Yn.include({toGeoJSON:function(a){var u=!We(this._latlngs),f=Is(this._latlngs,u?1:0,!1,a);return Si(this,{type:(u?"Multi":"")+"LineString",coordinates:f})}}),wi.include({toGeoJSON:function(a){var u=!We(this._latlngs),f=u&&!We(this._latlngs[0]),g=Is(this._latlngs,f?2:u?1:0,!0,a);return u||(g=[g]),Si(this,{type:(f?"Multi":"")+"Polygon",coordinates:g})}}),bi.include({toMultiPoint:function(a){var u=[];return this.eachLayer(function(f){u.push(f.toGeoJSON(a).geometry.coordinates)}),Si(this,{type:"MultiPoint",coordinates:u})},toGeoJSON:function(a){var u=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(u==="MultiPoint")return this.toMultiPoint(a);var f=u==="GeometryCollection",g=[];return this.eachLayer(function(S){if(S.toGeoJSON){var C=S.toGeoJSON(a);if(f)g.push(C.geometry);else{var D=Fs(C);D.type==="FeatureCollection"?g.push.apply(g,D.features):g.push(D)}}}),f?Si(this,{geometries:g,type:"GeometryCollection"}):{type:"FeatureCollection",features:g}}});function wf(a,u){return new Zn(a,u)}var Ax=wf,Bs=un.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(a,u,f){this._url=a,this._bounds=Q(u),_(this,f)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(Dt(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){Jt(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(a){return this.options.opacity=a,this._image&&this._updateOpacity(),this},setStyle:function(a){return a.opacity&&this.setOpacity(a.opacity),this},bringToFront:function(){return this._map&&yi(this._image),this},bringToBack:function(){return this._map&&_i(this._image),this},setUrl:function(a){return this._url=a,this._image&&(this._image.src=a),this},setBounds:function(a){return this._bounds=Q(a),this._map&&this._reset(),this},getEvents:function(){var a={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(a.zoomanim=this._animateZoom),a},setZIndex:function(a){return this.options.zIndex=a,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var a=this._url.tagName==="IMG",u=this._image=a?this._url:Yt("img");if(Dt(u,"leaflet-image-layer"),this._zoomAnimated&&Dt(u,"leaflet-zoom-animated"),this.options.className&&Dt(u,this.options.className),u.onselectstart=p,u.onmousemove=p,u.onload=s(this.fire,this,"load"),u.onerror=s(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(u.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),a){this._url=u.src;return}u.src=this._url,u.alt=this.options.alt},_animateZoom:function(a){var u=this._map.getZoomScale(a.zoom),f=this._map._latLngBoundsToNewLayerBounds(this._bounds,a.zoom,a.center).min;$r(this._image,f,u)},_reset:function(){var a=this._image,u=new H(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),f=u.getSize();oe(a,u.min),a.style.width=f.x+"px",a.style.height=f.y+"px"},_updateOpacity:function(){He(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var a=this.options.errorOverlayUrl;a&&this._url!==a&&(this._url=a,this._image.src=a)},getCenter:function(){return this._bounds.getCenter()}}),Rx=function(a,u,f){return new Bs(a,u,f)},Sf=Bs.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var a=this._url.tagName==="VIDEO",u=this._image=a?this._url:Yt("video");if(Dt(u,"leaflet-image-layer"),this._zoomAnimated&&Dt(u,"leaflet-zoom-animated"),this.options.className&&Dt(u,this.options.className),u.onselectstart=p,u.onmousemove=p,u.onloadeddata=s(this.fire,this,"load"),a){for(var f=u.getElementsByTagName("source"),g=[],S=0;S0?g:[u.src];return}E(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(u.style,"objectFit")&&(u.style.objectFit="fill"),u.autoplay=!!this.options.autoplay,u.loop=!!this.options.loop,u.muted=!!this.options.muted,u.playsInline=!!this.options.playsInline;for(var C=0;CS?(u.height=S+"px",Dt(a,C)):ne(a,C),this._containerWidth=this._container.offsetWidth},_animateZoom:function(a){var u=this._map._latLngToNewLayerPoint(this._latlng,a.zoom,a.center),f=this._getAnchor();oe(this._container,u.add(f))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var a=this._map,u=parseInt(wo(this._container,"marginBottom"),10)||0,f=this._container.offsetHeight+u,g=this._containerWidth,S=new G(this._containerLeft,-f-this._containerBottom);S._add(zr(this._container));var C=a.layerPointToContainerPoint(S),D=I(this.options.autoPanPadding),Z=I(this.options.autoPanPaddingTopLeft||D),X=I(this.options.autoPanPaddingBottomRight||D),ut=a.getSize(),gt=0,Ot=0;C.x+g+X.x>ut.x&&(gt=C.x+g-ut.x+X.x),C.x-gt-Z.x<0&&(gt=C.x-Z.x),C.y+f+X.y>ut.y&&(Ot=C.y+f-ut.y+X.y),C.y-Ot-Z.y<0&&(Ot=C.y-Z.y),(gt||Ot)&&(this.options.keepInView&&(this._autopanning=!0),a.fire("autopanstart").panBy([gt,Ot]))}},_getAnchor:function(){return I(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Dx=function(a,u){return new $s(a,u)};Ut.mergeOptions({closePopupOnClick:!0}),Ut.include({openPopup:function(a,u,f){return this._initOverlay($s,a,u,f).openOn(this),this},closePopup:function(a){return a=arguments.length?a:this._popup,a&&a.close(),this}}),un.include({bindPopup:function(a,u){return this._popup=this._initOverlay($s,this._popup,a,u),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(a){return this._popup&&(this instanceof Wn||(this._popup._source=this),this._popup._prepareOpen(a||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(a){return this._popup&&this._popup.setContent(a),this},getPopup:function(){return this._popup},_openPopup:function(a){if(!(!this._popup||!this._map)){Vr(a);var u=a.layer||a.target;if(this._popup._source===u&&!(u instanceof _r)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(a.latlng);return}this._popup._source=u,this.openPopup(a.latlng)}},_movePopup:function(a){this._popup.setLatLng(a.latlng)},_onKeyPress:function(a){a.originalEvent.keyCode===13&&this._openPopup(a)}});var zs=Mn.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(a){Mn.prototype.onAdd.call(this,a),this.setOpacity(this.options.opacity),a.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(a){Mn.prototype.onRemove.call(this,a),a.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var a=Mn.prototype.getEvents.call(this);return this.options.permanent||(a.preclick=this.close),a},_initLayout:function(){var a="leaflet-tooltip",u=a+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=Yt("div",u),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+c(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(a){var u,f,g=this._map,S=this._container,C=g.latLngToContainerPoint(g.getCenter()),D=g.layerPointToContainerPoint(a),Z=this.options.direction,X=S.offsetWidth,ut=S.offsetHeight,gt=I(this.options.offset),Ot=this._getAnchor();Z==="top"?(u=X/2,f=ut):Z==="bottom"?(u=X/2,f=0):Z==="center"?(u=X/2,f=ut/2):Z==="right"?(u=0,f=ut/2):Z==="left"?(u=X,f=ut/2):D.xthis.options.maxZoom||fg?this._retainParent(S,C,D,g):!1)},_retainChildren:function(a,u,f,g){for(var S=2*a;S<2*a+2;S++)for(var C=2*u;C<2*u+2;C++){var D=new G(S,C);D.z=f+1;var Z=this._tileCoordsToKey(D),X=this._tiles[Z];if(X&&X.active){X.retain=!0;continue}else X&&X.loaded&&(X.retain=!0);f+1this.options.maxZoom||this.options.minZoom!==void 0&&S1){this._setView(a,f);return}for(var Ot=S.min.y;Ot<=S.max.y;Ot++)for(var Ft=S.min.x;Ft<=S.max.x;Ft++){var Te=new G(Ft,Ot);if(Te.z=this._tileZoom,!!this._isValidTile(Te)){var ce=this._tiles[this._tileCoordsToKey(Te)];ce?ce.current=!0:D.push(Te)}}if(D.sort(function(Pe,Ei){return Pe.distanceTo(C)-Ei.distanceTo(C)}),D.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Ye=document.createDocumentFragment();for(Ft=0;Ftf.max.x)||!u.wrapLat&&(a.yf.max.y))return!1}if(!this.options.bounds)return!0;var g=this._tileCoordsToBounds(a);return Q(this.options.bounds).overlaps(g)},_keyToBounds:function(a){return this._tileCoordsToBounds(this._keyToTileCoords(a))},_tileCoordsToNwSe:function(a){var u=this._map,f=this.getTileSize(),g=a.scaleBy(f),S=g.add(f),C=u.unproject(g,a.z),D=u.unproject(S,a.z);return[C,D]},_tileCoordsToBounds:function(a){var u=this._tileCoordsToNwSe(a),f=new W(u[0],u[1]);return this.options.noWrap||(f=this._map.wrapLatLngBounds(f)),f},_tileCoordsToKey:function(a){return a.x+":"+a.y+":"+a.z},_keyToTileCoords:function(a){var u=a.split(":"),f=new G(+u[0],+u[1]);return f.z=+u[2],f},_removeTile:function(a){var u=this._tiles[a];u&&(Jt(u.el),delete this._tiles[a],this.fire("tileunload",{tile:u.el,coords:this._keyToTileCoords(a)}))},_initTile:function(a){Dt(a,"leaflet-tile");var u=this.getTileSize();a.style.width=u.x+"px",a.style.height=u.y+"px",a.onselectstart=p,a.onmousemove=p,wt.ielt9&&this.options.opacity<1&&He(a,this.options.opacity)},_addTile:function(a,u){var f=this._getTilePos(a),g=this._tileCoordsToKey(a),S=this.createTile(this._wrapCoords(a),s(this._tileReady,this,a));this._initTile(S),this.createTile.length<2&&V(s(this._tileReady,this,a,null,S)),oe(S,f),this._tiles[g]={el:S,coords:a,current:!0},u.appendChild(S),this.fire("tileloadstart",{tile:S,coords:a})},_tileReady:function(a,u,f){u&&this.fire("tileerror",{error:u,tile:f,coords:a});var g=this._tileCoordsToKey(a);f=this._tiles[g],f&&(f.loaded=+new Date,this._map._fadeAnimated?(He(f.el,0),Y(this._fadeFrame),this._fadeFrame=V(this._updateOpacity,this)):(f.active=!0,this._pruneTiles()),u||(Dt(f.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:f.el,coords:a})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),wt.ielt9||!this._map._fadeAnimated?V(this._pruneTiles,this):setTimeout(s(this._pruneTiles,this),250)))},_getTilePos:function(a){return a.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(a){var u=new G(this._wrapX?d(a.x,this._wrapX):a.x,this._wrapY?d(a.y,this._wrapY):a.y);return u.z=a.z,u},_pxBoundsToTileRange:function(a){var u=this.getTileSize();return new H(a.min.unscaleBy(u).floor(),a.max.unscaleBy(u).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var a in this._tiles)if(!this._tiles[a].loaded)return!1;return!0}});function Bx(a){return new Lo(a)}var Ti=Lo.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(a,u){this._url=a,u=_(this,u),u.detectRetina&&wt.retina&&u.maxZoom>0?(u.tileSize=Math.floor(u.tileSize/2),u.zoomReverse?(u.zoomOffset--,u.minZoom=Math.min(u.maxZoom,u.minZoom+1)):(u.zoomOffset++,u.maxZoom=Math.max(u.minZoom,u.maxZoom-1)),u.minZoom=Math.max(0,u.minZoom)):u.zoomReverse?u.minZoom=Math.min(u.maxZoom,u.minZoom):u.maxZoom=Math.max(u.minZoom,u.maxZoom),typeof u.subdomains=="string"&&(u.subdomains=u.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(a,u){return this._url===a&&u===void 0&&(u=!0),this._url=a,u||this.redraw(),this},createTile:function(a,u){var f=document.createElement("img");return Rt(f,"load",s(this._tileOnLoad,this,u,f)),Rt(f,"error",s(this._tileOnError,this,u,f)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(f.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(f.referrerPolicy=this.options.referrerPolicy),f.alt="",f.src=this.getTileUrl(a),f},getTileUrl:function(a){var u={r:wt.retina?"@2x":"",s:this._getSubdomain(a),x:a.x,y:a.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var f=this._globalTileRange.max.y-a.y;this.options.tms&&(u.y=f),u["-y"]=f}return w(this._url,i(u,this.options))},_tileOnLoad:function(a,u){wt.ielt9?setTimeout(s(a,this,null,u),0):a(null,u)},_tileOnError:function(a,u,f){var g=this.options.errorTileUrl;g&&u.getAttribute("src")!==g&&(u.src=g),a(f,u)},_onTileRemove:function(a){a.tile.onload=null},_getZoomForUrl:function(){var a=this._tileZoom,u=this.options.maxZoom,f=this.options.zoomReverse,g=this.options.zoomOffset;return f&&(a=u-a),a+g},_getSubdomain:function(a){var u=Math.abs(a.x+a.y)%this.options.subdomains.length;return this.options.subdomains[u]},_abortLoading:function(){var a,u;for(a in this._tiles)if(this._tiles[a].coords.z!==this._tileZoom&&(u=this._tiles[a].el,u.onload=p,u.onerror=p,!u.complete)){u.src=k;var f=this._tiles[a].coords;Jt(u),delete this._tiles[a],this.fire("tileabort",{tile:u,coords:f})}},_removeTile:function(a){var u=this._tiles[a];if(u)return u.el.setAttribute("src",k),Lo.prototype._removeTile.call(this,a)},_tileReady:function(a,u,f){if(!(!this._map||f&&f.getAttribute("src")===k))return Lo.prototype._tileReady.call(this,a,u,f)}});function Of(a,u){return new Ti(a,u)}var Cf=Ti.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(a,u){this._url=a;var f=i({},this.defaultWmsParams);for(var g in u)g in this.options||(f[g]=u[g]);u=_(this,u);var S=u.detectRetina&&wt.retina?2:1,C=this.getTileSize();f.width=C.x*S,f.height=C.y*S,this.wmsParams=f},onAdd:function(a){this._crs=this.options.crs||a.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var u=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[u]=this._crs.code,Ti.prototype.onAdd.call(this,a)},getTileUrl:function(a){var u=this._tileCoordsToNwSe(a),f=this._crs,g=it(f.project(u[0]),f.project(u[1])),S=g.min,C=g.max,D=(this._wmsVersion>=1.3&&this._crs===_f?[S.y,S.x,C.y,C.x]:[S.x,S.y,C.x,C.y]).join(","),Z=Ti.prototype.getTileUrl.call(this,a);return Z+T(this.wmsParams,Z,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+D},setParams:function(a,u){return i(this.wmsParams,a),u||this.redraw(),this}});function $x(a,u){return new Cf(a,u)}Ti.WMS=Cf,Of.wms=$x;var Gn=un.extend({options:{padding:.1},initialize:function(a){_(this,a),c(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),Dt(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 a={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(a.zoomanim=this._onAnimZoom),a},_onAnimZoom:function(a){this._updateTransform(a.center,a.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(a,u){var f=this._map.getZoomScale(u,this._zoom),g=this._map.getSize().multiplyBy(.5+this.options.padding),S=this._map.project(this._center,u),C=g.multiplyBy(-f).add(S).subtract(this._map._getNewPixelOrigin(a,u));wt.any3d?$r(this._container,C,f):oe(this._container,C)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var a in this._layers)this._layers[a]._reset()},_onZoomEnd:function(){for(var a in this._layers)this._layers[a]._project()},_updatePaths:function(){for(var a in this._layers)this._layers[a]._update()},_update:function(){var a=this.options.padding,u=this._map.getSize(),f=this._map.containerPointToLayerPoint(u.multiplyBy(-a)).round();this._bounds=new H(f,f.add(u.multiplyBy(1+a*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),kf=Gn.extend({options:{tolerance:0},getEvents:function(){var a=Gn.prototype.getEvents.call(this);return a.viewprereset=this._onViewPreReset,a},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Gn.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var a=this._container=document.createElement("canvas");Rt(a,"mousemove",this._onMouseMove,this),Rt(a,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Rt(a,"mouseout",this._handleMouseOut,this),a._leaflet_disable_events=!0,this._ctx=a.getContext("2d")},_destroyContainer:function(){Y(this._redrawRequest),delete this._ctx,Jt(this._container),Kt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var a;this._redrawBounds=null;for(var u in this._layers)a=this._layers[u],a._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Gn.prototype._update.call(this);var a=this._bounds,u=this._container,f=a.getSize(),g=wt.retina?2:1;oe(u,a.min),u.width=g*f.x,u.height=g*f.y,u.style.width=f.x+"px",u.style.height=f.y+"px",wt.retina&&this._ctx.scale(2,2),this._ctx.translate(-a.min.x,-a.min.y),this.fire("update")}},_reset:function(){Gn.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(a){this._updateDashArray(a),this._layers[c(a)]=a;var u=a._order={layer:a,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=u),this._drawLast=u,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(a){this._requestRedraw(a)},_removePath:function(a){var u=a._order,f=u.next,g=u.prev;f?f.prev=g:this._drawLast=g,g?g.next=f:this._drawFirst=f,delete a._order,delete this._layers[c(a)],this._requestRedraw(a)},_updatePath:function(a){this._extendRedrawBounds(a),a._project(),a._update(),this._requestRedraw(a)},_updateStyle:function(a){this._updateDashArray(a),this._requestRedraw(a)},_updateDashArray:function(a){if(typeof a.options.dashArray=="string"){var u=a.options.dashArray.split(/[, ]+/),f=[],g,S;for(S=0;S')}}catch{}return function(a){return document.createElement("<"+a+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),zx={_initContainer:function(){this._container=Yt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Gn.prototype._update.call(this),this.fire("update"))},_initPath:function(a){var u=a._container=Mo("shape");Dt(u,"leaflet-vml-shape "+(this.options.className||"")),u.coordsize="1 1",a._path=Mo("path"),u.appendChild(a._path),this._updateStyle(a),this._layers[c(a)]=a},_addPath:function(a){var u=a._container;this._container.appendChild(u),a.options.interactive&&a.addInteractiveTarget(u)},_removePath:function(a){var u=a._container;Jt(u),a.removeInteractiveTarget(u),delete this._layers[c(a)]},_updateStyle:function(a){var u=a._stroke,f=a._fill,g=a.options,S=a._container;S.stroked=!!g.stroke,S.filled=!!g.fill,g.stroke?(u||(u=a._stroke=Mo("stroke")),S.appendChild(u),u.weight=g.weight+"px",u.color=g.color,u.opacity=g.opacity,g.dashArray?u.dashStyle=E(g.dashArray)?g.dashArray.join(" "):g.dashArray.replace(/( *, *)/g," "):u.dashStyle="",u.endcap=g.lineCap.replace("butt","flat"),u.joinstyle=g.lineJoin):u&&(S.removeChild(u),a._stroke=null),g.fill?(f||(f=a._fill=Mo("fill")),S.appendChild(f),f.color=g.fillColor||g.color,f.opacity=g.fillOpacity):f&&(S.removeChild(f),a._fill=null)},_updateCircle:function(a){var u=a._point.round(),f=Math.round(a._radius),g=Math.round(a._radiusY||f);this._setPath(a,a._empty()?"M0 0":"AL "+u.x+","+u.y+" "+f+","+g+" 0,"+65535*360)},_setPath:function(a,u){a._path.v=u},_bringToFront:function(a){yi(a._container)},_bringToBack:function(a){_i(a._container)}},Us=wt.vml?Mo:It,Ao=Gn.extend({_initContainer:function(){this._container=Us("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Us("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Jt(this._container),Kt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Gn.prototype._update.call(this);var a=this._bounds,u=a.getSize(),f=this._container;(!this._svgSize||!this._svgSize.equals(u))&&(this._svgSize=u,f.setAttribute("width",u.x),f.setAttribute("height",u.y)),oe(f,a.min),f.setAttribute("viewBox",[a.min.x,a.min.y,u.x,u.y].join(" ")),this.fire("update")}},_initPath:function(a){var u=a._path=Us("path");a.options.className&&Dt(u,a.options.className),a.options.interactive&&Dt(u,"leaflet-interactive"),this._updateStyle(a),this._layers[c(a)]=a},_addPath:function(a){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(a._path),a.addInteractiveTarget(a._path)},_removePath:function(a){Jt(a._path),a.removeInteractiveTarget(a._path),delete this._layers[c(a)]},_updatePath:function(a){a._project(),a._update()},_updateStyle:function(a){var u=a._path,f=a.options;u&&(f.stroke?(u.setAttribute("stroke",f.color),u.setAttribute("stroke-opacity",f.opacity),u.setAttribute("stroke-width",f.weight),u.setAttribute("stroke-linecap",f.lineCap),u.setAttribute("stroke-linejoin",f.lineJoin),f.dashArray?u.setAttribute("stroke-dasharray",f.dashArray):u.removeAttribute("stroke-dasharray"),f.dashOffset?u.setAttribute("stroke-dashoffset",f.dashOffset):u.removeAttribute("stroke-dashoffset")):u.setAttribute("stroke","none"),f.fill?(u.setAttribute("fill",f.fillColor||f.color),u.setAttribute("fill-opacity",f.fillOpacity),u.setAttribute("fill-rule",f.fillRule||"evenodd")):u.setAttribute("fill","none"))},_updatePoly:function(a,u){this._setPath(a,ft(a._parts,u))},_updateCircle:function(a){var u=a._point,f=Math.max(Math.round(a._radius),1),g=Math.max(Math.round(a._radiusY),1)||f,S="a"+f+","+g+" 0 1,0 ",C=a._empty()?"M0 0":"M"+(u.x-f)+","+u.y+S+f*2+",0 "+S+-f*2+",0 ";this._setPath(a,C)},_setPath:function(a,u){a._path.setAttribute("d",u)},_bringToFront:function(a){yi(a._path)},_bringToBack:function(a){_i(a._path)}});wt.vml&&Ao.include(zx);function Lf(a){return wt.svg||wt.vml?new Ao(a):null}Ut.include({getRenderer:function(a){var u=a.options.renderer||this._getPaneRenderer(a.options.pane)||this.options.renderer||this._renderer;return u||(u=this._renderer=this._createRenderer()),this.hasLayer(u)||this.addLayer(u),u},_getPaneRenderer:function(a){if(a==="overlayPane"||a===void 0)return!1;var u=this._paneRenderers[a];return u===void 0&&(u=this._createRenderer({pane:a}),this._paneRenderers[a]=u),u},_createRenderer:function(a){return this.options.preferCanvas&&Pf(a)||Lf(a)}});var Mf=wi.extend({initialize:function(a,u){wi.prototype.initialize.call(this,this._boundsToLatLngs(a),u)},setBounds:function(a){return this.setLatLngs(this._boundsToLatLngs(a))},_boundsToLatLngs:function(a){return a=Q(a),[a.getSouthWest(),a.getNorthWest(),a.getNorthEast(),a.getSouthEast()]}});function Ux(a,u){return new Mf(a,u)}Ao.create=Us,Ao.pointsToPath=ft,Zn.geometryToLayer=Ns,Zn.coordsToLatLng=mc,Zn.coordsToLatLngs=Ds,Zn.latLngToCoords=gc,Zn.latLngsToCoords=Is,Zn.getFeature=Si,Zn.asFeature=Fs,Ut.mergeOptions({boxZoom:!0});var Af=Ln.extend({initialize:function(a){this._map=a,this._container=a._container,this._pane=a._panes.overlayPane,this._resetStateTimeout=0,a.on("unload",this._destroy,this)},addHooks:function(){Rt(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Kt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Jt(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(a){if(!a.shiftKey||a.which!==1&&a.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),So(),Ql(),this._startPoint=this._map.mouseEventToContainerPoint(a),Rt(document,{contextmenu:Vr,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(a){this._moved||(this._moved=!0,this._box=Yt("div","leaflet-zoom-box",this._container),Dt(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(a);var u=new H(this._point,this._startPoint),f=u.getSize();oe(this._box,u.min),this._box.style.width=f.x+"px",this._box.style.height=f.y+"px"},_finish:function(){this._moved&&(Jt(this._box),ne(this._container,"leaflet-crosshair")),To(),Jl(),Kt(document,{contextmenu:Vr,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(a){if(!(a.which!==1&&a.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(s(this._resetState,this),0);var u=new W(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(u).fire("boxzoomend",{boxZoomBounds:u})}},_onKeyDown:function(a){a.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});Ut.addInitHook("addHandler","boxZoom",Af),Ut.mergeOptions({doubleClickZoom:!0});var Rf=Ln.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(a){var u=this._map,f=u.getZoom(),g=u.options.zoomDelta,S=a.originalEvent.shiftKey?f-g:f+g;u.options.doubleClickZoom==="center"?u.setZoom(S):u.setZoomAround(a.containerPoint,S)}});Ut.addInitHook("addHandler","doubleClickZoom",Rf),Ut.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var jf=Ln.extend({addHooks:function(){if(!this._draggable){var a=this._map;this._draggable=new yr(a._mapPane,a._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),a.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),a.on("zoomend",this._onZoomEnd,this),a.whenReady(this._onZoomEnd,this))}Dt(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){ne(this._map._container,"leaflet-grab"),ne(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 a=this._map;if(a._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var u=Q(this._map.options.maxBounds);this._offsetLimit=it(this._map.latLngToContainerPoint(u.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(u.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;a.fire("movestart").fire("dragstart"),a.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(a){if(this._map.options.inertia){var u=this._lastTime=+new Date,f=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(f),this._times.push(u),this._prunePositions(u)}this._map.fire("move",a).fire("drag",a)},_prunePositions:function(a){for(;this._positions.length>1&&a-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var a=this._map.getSize().divideBy(2),u=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=u.subtract(a).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(a,u){return a-(a-u)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var a=this._draggable._newPos.subtract(this._draggable._startPos),u=this._offsetLimit;a.xu.max.x&&(a.x=this._viscousLimit(a.x,u.max.x)),a.y>u.max.y&&(a.y=this._viscousLimit(a.y,u.max.y)),this._draggable._newPos=this._draggable._startPos.add(a)}},_onPreDragWrap:function(){var a=this._worldWidth,u=Math.round(a/2),f=this._initialWorldOffset,g=this._draggable._newPos.x,S=(g-u+f)%a+u-f,C=(g+u+f)%a-u-f,D=Math.abs(S+f)0?C:-C))-u;this._delta=0,this._startTime=null,D&&(a.options.scrollWheelZoom==="center"?a.setZoom(u+D):a.setZoomAround(this._lastMousePos,u+D))}});Ut.addInitHook("addHandler","scrollWheelZoom",Df);var Vx=600;Ut.mergeOptions({tapHold:wt.touchNative&&wt.safari&&wt.mobile,tapTolerance:15});var If=Ln.extend({addHooks:function(){Rt(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Kt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(a){if(clearTimeout(this._holdTimeout),a.touches.length===1){var u=a.touches[0];this._startPos=this._newPos=new G(u.clientX,u.clientY),this._holdTimeout=setTimeout(s(function(){this._cancel(),this._isTapValid()&&(Rt(document,"touchend",me),Rt(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",u))},this),Vx),Rt(document,"touchend touchcancel contextmenu",this._cancel,this),Rt(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function a(){Kt(document,"touchend",me),Kt(document,"touchend touchcancel",a)},_cancel:function(){clearTimeout(this._holdTimeout),Kt(document,"touchend touchcancel contextmenu",this._cancel,this),Kt(document,"touchmove",this._onMove,this)},_onMove:function(a){var u=a.touches[0];this._newPos=new G(u.clientX,u.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(a,u){var f=new MouseEvent(a,{bubbles:!0,cancelable:!0,view:window,screenX:u.screenX,screenY:u.screenY,clientX:u.clientX,clientY:u.clientY});f._simulated=!0,u.target.dispatchEvent(f)}});Ut.addInitHook("addHandler","tapHold",If),Ut.mergeOptions({touchZoom:wt.touch,bounceAtZoomLimits:!0});var Ff=Ln.extend({addHooks:function(){Dt(this._map._container,"leaflet-touch-zoom"),Rt(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){ne(this._map._container,"leaflet-touch-zoom"),Kt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(a){var u=this._map;if(!(!a.touches||a.touches.length!==2||u._animatingZoom||this._zooming)){var f=u.mouseEventToContainerPoint(a.touches[0]),g=u.mouseEventToContainerPoint(a.touches[1]);this._centerPoint=u.getSize()._divideBy(2),this._startLatLng=u.containerPointToLatLng(this._centerPoint),u.options.touchZoom!=="center"&&(this._pinchStartLatLng=u.containerPointToLatLng(f.add(g)._divideBy(2))),this._startDist=f.distanceTo(g),this._startZoom=u.getZoom(),this._moved=!1,this._zooming=!0,u._stop(),Rt(document,"touchmove",this._onTouchMove,this),Rt(document,"touchend touchcancel",this._onTouchEnd,this),me(a)}},_onTouchMove:function(a){if(!(!a.touches||a.touches.length!==2||!this._zooming)){var u=this._map,f=u.mouseEventToContainerPoint(a.touches[0]),g=u.mouseEventToContainerPoint(a.touches[1]),S=f.distanceTo(g)/this._startDist;if(this._zoom=u.getScaleZoom(S,this._startZoom),!u.options.bounceAtZoomLimits&&(this._zoomu.getMaxZoom()&&S>1)&&(this._zoom=u._limitZoom(this._zoom)),u.options.touchZoom==="center"){if(this._center=this._startLatLng,S===1)return}else{var C=f._add(g)._divideBy(2)._subtract(this._centerPoint);if(S===1&&C.x===0&&C.y===0)return;this._center=u.unproject(u.project(this._pinchStartLatLng,this._zoom).subtract(C),this._zoom)}this._moved||(u._moveStart(!0,!1),this._moved=!0),Y(this._animRequest);var D=s(u._move,u,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=V(D,this,!0),me(a)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,Y(this._animRequest),Kt(document,"touchmove",this._onTouchMove,this),Kt(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))}});Ut.addInitHook("addHandler","touchZoom",Ff),Ut.BoxZoom=Af,Ut.DoubleClickZoom=Rf,Ut.Drag=jf,Ut.Keyboard=Nf,Ut.ScrollWheelZoom=Df,Ut.TapHold=If,Ut.TouchZoom=Ff,n.Bounds=H,n.Browser=wt,n.CRS=mt,n.Canvas=kf,n.Circle=pc,n.CircleMarker=js,n.Class=K,n.Control=cn,n.DivIcon=Ef,n.DivOverlay=Mn,n.DomEvent=ax,n.DomUtil=ox,n.Draggable=yr,n.Evented=ct,n.FeatureGroup=Wn,n.GeoJSON=Zn,n.GridLayer=Lo,n.Handler=Ln,n.Icon=xi,n.ImageOverlay=Bs,n.LatLng=tt,n.LatLngBounds=W,n.Layer=un,n.LayerGroup=bi,n.LineUtil=bx,n.Map=Ut,n.Marker=Rs,n.Mixin=px,n.Path=_r,n.Point=G,n.PolyUtil=mx,n.Polygon=wi,n.Polyline=Yn,n.Popup=$s,n.PosAnimation=af,n.Projection=xx,n.Rectangle=Mf,n.Renderer=Gn,n.SVG=Ao,n.SVGOverlay=Tf,n.TileLayer=Ti,n.Tooltip=zs,n.Transformation=at,n.Util=nt,n.VideoOverlay=Sf,n.bind=s,n.bounds=it,n.canvas=Pf,n.circle=Px,n.circleMarker=kx,n.control=Co,n.divIcon=Fx,n.extend=i,n.featureGroup=Ex,n.geoJSON=wf,n.geoJson=Ax,n.gridLayer=Bx,n.icon=Ox,n.imageOverlay=Rx,n.latLng=rt,n.latLngBounds=Q,n.layerGroup=Tx,n.map=lx,n.marker=Cx,n.point=I,n.polygon=Mx,n.polyline=Lx,n.popup=Dx,n.rectangle=Ux,n.setOptions=_,n.stamp=c,n.svg=Lf,n.svgOverlay=Nx,n.tileLayer=Of,n.tooltip=Ix,n.transformation=st,n.version=r,n.videoOverlay=jx;var Hx=window.L;n.noConflict=function(){return window.L=Hx,this},window.L=n})})($O,$O.exports);var YMt=$O.exports;const z4=xs(YMt),ZMt="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=",GMt="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==",qMt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC",KMt=()=>{delete z4.Icon.Default.prototype._getIconUrl,z4.Icon.Default.mergeOptions({iconRetinaUrl:GMt,iconUrl:ZMt,shadowUrl:qMt})};KMt();const uV=UMt(VL),{App:XMt,ScrollToTop:QMt,ErrorHandler:JMt,appUpdateAvailable:tAt}=VL;QF(document.getElementById("root")).render(b.jsx(f8,{store:uV,children:b.jsx(w8,{basename:i0.homepage,children:b.jsx(JMt,{children:b.jsx(QMt,{children:b.jsx(XMt,{})})})})}));HMt({onUpdate(){uV.dispatch(tAt())}}); diff --git a/feature/external-web-component/assets/index-e0a5be8d.js b/feature/external-web-component/assets/index-e0a5be8d.js new file mode 100644 index 00000000..41ea038a --- /dev/null +++ b/feature/external-web-component/assets/index-e0a5be8d.js @@ -0,0 +1,1007 @@ +var h7=Object.defineProperty;var p7=(e,t,n)=>t in e?h7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var gt=(e,t,n)=>(p7(e,typeof t!="symbol"?t+"":t,n),n);function m7(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 a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).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 Bp=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function sa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vN={exports:{}},yy={},yN={exports:{}},ot={};/** + * @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 Ah=Symbol.for("react.element"),g7=Symbol.for("react.portal"),v7=Symbol.for("react.fragment"),y7=Symbol.for("react.strict_mode"),_7=Symbol.for("react.profiler"),b7=Symbol.for("react.provider"),w7=Symbol.for("react.context"),x7=Symbol.for("react.forward_ref"),S7=Symbol.for("react.suspense"),E7=Symbol.for("react.memo"),T7=Symbol.for("react.lazy"),PC=Symbol.iterator;function O7(e){return e===null||typeof e!="object"?null:(e=PC&&e[PC]||e["@@iterator"],typeof e=="function"?e:null)}var _N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},bN=Object.assign,wN={};function Iu(e,t,n){this.props=e,this.context=t,this.refs=wN,this.updater=n||_N}Iu.prototype.isReactComponent={};Iu.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")};Iu.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function xN(){}xN.prototype=Iu.prototype;function z2(e,t,n){this.props=e,this.context=t,this.refs=wN,this.updater=n||_N}var V2=z2.prototype=new xN;V2.constructor=z2;bN(V2,Iu.prototype);V2.isPureReactComponent=!0;var LC=Array.isArray,SN=Object.prototype.hasOwnProperty,H2={current:null},EN={key:!0,ref:!0,__self:!0,__source:!0};function TN(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)SN.call(t,r)&&!EN.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1>>1,ie=q[H];if(0>>1;Hi(re,D))aei(he,re)?(q[H]=he,q[ae]=D,H=ae):(q[H]=re,q[K]=D,H=K);else if(aei(he,D))q[H]=he,q[ae]=D,H=ae;else break e}}return I}function i(q,I){var D=q.sortIndex-I.sortIndex;return D!==0?D:q.id-I.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],c=[],d=1,f=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(q){for(var I=n(c);I!==null;){if(I.callback===null)r(c);else if(I.startTime<=q)r(c),I.sortIndex=I.expirationTime,t(l,I);else break;I=n(c)}}function E(q){if(y=!1,S(q),!v)if(n(l)!==null)v=!0,te(C);else{var I=n(c);I!==null&&le(E,I.startTime-q)}}function C(q,I){v=!1,y&&(y=!1,_(N),N=-1),m=!0;var D=p;try{for(S(I),f=n(l);f!==null&&(!(f.expirationTime>I)||q&&!V());){var H=f.callback;if(typeof H=="function"){f.callback=null,p=f.priorityLevel;var ie=H(f.expirationTime<=I);I=e.unstable_now(),typeof ie=="function"?f.callback=ie:f===n(l)&&r(l),S(I)}else r(l);f=n(l)}if(f!==null)var z=!0;else{var K=n(c);K!==null&&le(E,K.startTime-I),z=!1}return z}finally{f=null,p=D,m=!1}}var k=!1,j=null,N=-1,U=5,R=-1;function V(){return!(e.unstable_now()-Rq||125H?(q.sortIndex=D,t(c,q),n(l)===null&&q===n(c)&&(y?(_(N),N=-1):y=!0,le(E,D-H))):(q.sortIndex=ie,t(l,q),v||m||(v=!0,te(C))),q},e.unstable_shouldYield=V,e.unstable_wrapCallback=function(q){var I=p;return function(){var D=p;p=I;try{return q.apply(this,arguments)}finally{p=D}}}})(PN);kN.exports=PN;var F7=kN.exports;/** + * @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 LN=F,Zr=F7;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"),ab=Object.prototype.hasOwnProperty,$7=/^[: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]*$/,MC={},AC={};function U7(e){return ab.call(AC,e)?!0:ab.call(MC,e)?!1:$7.test(e)?AC[e]=!0:(MC[e]=!0,!1)}function B7(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 z7(e,t,n,r){if(t===null||typeof t>"u"||B7(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 Er(e,t,n,r,i,o,a){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=a}var er={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){er[e]=new Er(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];er[t]=new Er(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){er[e]=new Er(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){er[e]=new Er(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){er[e]=new Er(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){er[e]=new Er(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){er[e]=new Er(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){er[e]=new Er(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){er[e]=new Er(e,5,!1,e.toLowerCase(),null,!1,!1)});var Y2=/[\-:]([a-z])/g;function G2(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(Y2,G2);er[t]=new Er(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(Y2,G2);er[t]=new Er(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(Y2,G2);er[t]=new Er(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){er[e]=new Er(e,1,!1,e.toLowerCase(),null,!1,!1)});er.xlinkHref=new Er("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){er[e]=new Er(e,1,!1,e.toLowerCase(),null,!0,!0)});function q2(e,t,n,r){var i=er.hasOwnProperty(t)?er[t]:null;(i!==null?i.type!==0:r||!(2s||i[a]!==o[s]){var l=` +`+i[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{y_=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Nd(e):""}function V7(e){switch(e.tag){case 5:return Nd(e.type);case 16:return Nd("Lazy");case 13:return Nd("Suspense");case 19:return Nd("SuspenseList");case 0:case 2:case 15:return e=__(e.type,!1),e;case 11:return e=__(e.type.render,!1),e;case 1:return e=__(e.type,!0),e;default:return""}}function ub(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 xc:return"Fragment";case wc:return"Portal";case sb:return"Profiler";case K2:return"StrictMode";case lb:return"Suspense";case cb:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case AN:return(e.displayName||"Context")+".Consumer";case MN:return(e._context.displayName||"Context")+".Provider";case Z2:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Q2:return t=e.displayName||null,t!==null?t:ub(e.type)||"Memo";case Ca:t=e._payload,e=e._init;try{return ub(e(t))}catch{}}return null}function H7(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 ub(t);case 8:return t===K2?"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 os(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function RN(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function W7(e){var t=RN(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(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Hp(e){e._valueTracker||(e._valueTracker=W7(e))}function DN(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=RN(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Lg(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 db(e,t){var n=t.checked;return Zt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function RC(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=os(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 IN(e,t){t=t.checked,t!=null&&q2(e,"checked",t,!1)}function fb(e,t){IN(e,t);var n=os(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")?hb(e,t.type,n):t.hasOwnProperty("defaultValue")&&hb(e,t.type,os(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function DC(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 hb(e,t,n){(t!=="number"||Lg(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Rd=Array.isArray;function Bc(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Wp.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Mf(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Kd={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},Y7=["Webkit","ms","Moz","O"];Object.keys(Kd).forEach(function(e){Y7.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Kd[t]=Kd[e]})});function BN(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Kd.hasOwnProperty(e)&&Kd[e]?(""+t).trim():t+"px"}function zN(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=BN(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var G7=Zt({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 gb(e,t){if(t){if(G7[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 vb(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 yb=null;function X2(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var _b=null,zc=null,Vc=null;function $C(e){if(e=Dh(e)){if(typeof _b!="function")throw Error(Ee(280));var t=e.stateNode;t&&(t=Sy(t),_b(e.stateNode,e.type,t))}}function VN(e){zc?Vc?Vc.push(e):Vc=[e]:zc=e}function HN(){if(zc){var e=zc,t=Vc;if(Vc=zc=null,$C(e),t)for(e=0;e>>=0,e===0?32:31-(iB(e)/oB|0)|0}var Yp=64,Gp=4194304;function Dd(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 Ng(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=Dd(s):(o&=a,o!==0&&(r=Dd(o)))}else a=n&~i,a!==0?r=Dd(a):o!==0&&(r=Dd(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 Nh(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Hi(t),e[t]=n}function cB(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=Qd),qC=String.fromCharCode(32),KC=!1;function uR(e,t){switch(e){case"keyup":return IB.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function dR(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Sc=!1;function $B(e,t){switch(e){case"compositionend":return dR(t);case"keypress":return t.which!==32?null:(KC=!0,qC);case"textInput":return e=t.data,e===qC&&KC?null:e;default:return null}}function UB(e,t){if(Sc)return e==="compositionend"||!aS&&uR(e,t)?(e=lR(),Jm=rS=Na=null,Sc=!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=JC(n)}}function mR(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?mR(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function gR(){for(var e=window,t=Lg();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Lg(e.document)}return t}function sS(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 KB(e){var t=gR(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&mR(n.ownerDocument.documentElement,n)){if(r!==null&&sS(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=ek(n,o);var a=ek(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.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,Ec=null,Tb=null,Jd=null,Ob=!1;function tk(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ob||Ec==null||Ec!==Lg(r)||(r=Ec,"selectionStart"in r&&sS(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}),Jd&&Ff(Jd,r)||(Jd=r,r=Ig(Tb,"onSelect"),0Cc||(e.current=Mb[Cc],Mb[Cc]=null,Cc--)}function Lt(e,t){Cc++,Mb[Cc]=e.current,e.current=t}var as={},cr=vs(as),Lr=vs(!1),ml=as;function tu(e,t){var n=e.type.contextTypes;if(!n)return as;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 jr(e){return e=e.childContextTypes,e!=null}function $g(){It(Lr),It(cr)}function lk(e,t,n){if(cr.current!==as)throw Error(Ee(168));Lt(cr,t),Lt(Lr,n)}function TR(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,H7(e)||"Unknown",i));return Zt({},n,r)}function Ug(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||as,ml=cr.current,Lt(cr,e),Lt(Lr,Lr.current),!0}function ck(e,t,n){var r=e.stateNode;if(!r)throw Error(Ee(169));n?(e=TR(e,t,ml),r.__reactInternalMemoizedMergedChildContext=e,It(Lr),It(cr),Lt(cr,e)):It(Lr),Lt(Lr,n)}var Io=null,Ey=!1,A_=!1;function OR(e){Io===null?Io=[e]:Io.push(e)}function s9(e){Ey=!0,OR(e)}function ys(){if(!A_&&Io!==null){A_=!0;var e=0,t=xt;try{var n=Io;for(xt=1;e>=a,i-=a,Bo=1<<32-Hi(t)+i|n<N?(U=j,j=null):U=j.sibling;var R=p(_,j,S[N],E);if(R===null){j===null&&(j=U);break}e&&j&&R.alternate===null&&t(_,j),w=o(R,w,N),k===null?C=R:k.sibling=R,k=R,j=U}if(N===S.length)return n(_,j),zt&&Us(_,N),C;if(j===null){for(;NN?(U=j,j=null):U=j.sibling;var V=p(_,j,R.value,E);if(V===null){j===null&&(j=U);break}e&&j&&V.alternate===null&&t(_,j),w=o(V,w,N),k===null?C=V:k.sibling=V,k=V,j=U}if(R.done)return n(_,j),zt&&Us(_,N),C;if(j===null){for(;!R.done;N++,R=S.next())R=f(_,R.value,E),R!==null&&(w=o(R,w,N),k===null?C=R:k.sibling=R,k=R);return zt&&Us(_,N),C}for(j=r(_,j);!R.done;N++,R=S.next())R=m(j,_,N,R.value,E),R!==null&&(e&&R.alternate!==null&&j.delete(R.key===null?N:R.key),w=o(R,w,N),k===null?C=R:k.sibling=R,k=R);return e&&j.forEach(function(Y){return t(_,Y)}),zt&&Us(_,N),C}function x(_,w,S,E){if(typeof S=="object"&&S!==null&&S.type===xc&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case Vp:e:{for(var C=S.key,k=w;k!==null;){if(k.key===C){if(C=S.type,C===xc){if(k.tag===7){n(_,k.sibling),w=i(k,S.props.children),w.return=_,_=w;break e}}else if(k.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Ca&&gk(C)===k.type){n(_,k.sibling),w=i(k,S.props),w.ref=vd(_,k,S),w.return=_,_=w;break e}n(_,k);break}else t(_,k);k=k.sibling}S.type===xc?(w=rl(S.props.children,_.mode,E,S.key),w.return=_,_=w):(E=sg(S.type,S.key,S.props,null,_.mode,E),E.ref=vd(_,w,S),E.return=_,_=E)}return a(_);case wc: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=B_(S,_.mode,E),w.return=_,_=w}return a(_);case Ca:return k=S._init,x(_,w,k(S._payload),E)}if(Rd(S))return v(_,w,S,E);if(fd(S))return y(_,w,S,E);em(_,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=U_(S,_.mode,E),w.return=_,_=w),a(_)):n(_,w)}return x}var ru=NR(!0),RR=NR(!1),Ih={},go=vs(Ih),zf=vs(Ih),Vf=vs(Ih);function Xs(e){if(e===Ih)throw Error(Ee(174));return e}function gS(e,t){switch(Lt(Vf,t),Lt(zf,e),Lt(go,Ih),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:mb(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=mb(t,e)}It(go),Lt(go,t)}function iu(){It(go),It(zf),It(Vf)}function DR(e){Xs(Vf.current);var t=Xs(go.current),n=mb(t,e.type);t!==n&&(Lt(zf,e),Lt(go,n))}function vS(e){zf.current===e&&(It(go),It(zf))}var Gt=vs(0);function Yg(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 N_=[];function yS(){for(var e=0;en?n:4,e(!0);var r=R_.transition;R_.transition={};try{e(!1),t()}finally{xt=n,R_.transition=r}}function XR(){return Ei().memoizedState}function d9(e,t,n){var r=Xa(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},JR(e))eD(t,n);else if(n=LR(e,t,n,r),n!==null){var i=xr();Wi(n,e,r,i),tD(n,t,r)}}function f9(e,t,n){var r=Xa(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(JR(e))eD(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Gi(s,a)){var l=t.interleaved;l===null?(i.next=i,pS(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=LR(e,t,i,r),n!==null&&(i=xr(),Wi(n,e,r,i),tD(n,t,r))}}function JR(e){var t=e.alternate;return e===Kt||t!==null&&t===Kt}function eD(e,t){ef=Gg=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function tD(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,eS(e,n)}}var qg={readContext:Si,useCallback:tr,useContext:tr,useEffect:tr,useImperativeHandle:tr,useInsertionEffect:tr,useLayoutEffect:tr,useMemo:tr,useReducer:tr,useRef:tr,useState:tr,useDebugValue:tr,useDeferredValue:tr,useTransition:tr,useMutableSource:tr,useSyncExternalStore:tr,useId:tr,unstable_isNewReconciler:!1},h9={readContext:Si,useCallback:function(e,t){return oo().memoizedState=[e,t===void 0?null:t],e},useContext:Si,useEffect:yk,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,rg(4194308,4,GR.bind(null,t,e),n)},useLayoutEffect:function(e,t){return rg(4194308,4,e,t)},useInsertionEffect:function(e,t){return rg(4,2,e,t)},useMemo:function(e,t){var n=oo();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=oo();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=d9.bind(null,Kt,e),[r.memoizedState,e]},useRef:function(e){var t=oo();return e={current:e},t.memoizedState=e},useState:vk,useDebugValue:SS,useDeferredValue:function(e){return oo().memoizedState=e},useTransition:function(){var e=vk(!1),t=e[0];return e=u9.bind(null,e[1]),oo().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Kt,i=oo();if(zt){if(n===void 0)throw Error(Ee(407));n=n()}else{if(n=t(),Rn===null)throw Error(Ee(349));vl&30||$R(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,yk(BR.bind(null,r,o,e),[e]),r.flags|=2048,Yf(9,UR.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=oo(),t=Rn.identifierPrefix;if(zt){var n=zo,r=Bo;n=(r&~(1<<32-Hi(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Hf++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[lo]=t,e[Bf]=r,uD(e,t,!1,!1),t.stateNode=e;e:{switch(a=vb(n,r),n){case"dialog":jt("cancel",e),jt("close",e),i=r;break;case"iframe":case"object":case"embed":jt("load",e),i=r;break;case"video":case"audio":for(i=0;iau&&(t.flags|=128,r=!0,yd(o,!1),t.lanes=4194304)}else{if(!r)if(e=Yg(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),yd(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!zt)return nr(t),null}else 2*cn()-o.renderingStartTime>au&&n!==1073741824&&(t.flags|=128,r=!0,yd(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=cn(),t.sibling=null,n=Gt.current,Lt(Gt,r?n&1|2:n&1),t):(nr(t),null);case 22:case 23:return PS(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Br&1073741824&&(nr(t),t.subtreeFlags&6&&(t.flags|=8192)):nr(t),null;case 24:return null;case 25:return null}throw Error(Ee(156,t.tag))}function w9(e,t){switch(cS(t),t.tag){case 1:return jr(t.type)&&$g(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return iu(),It(Lr),It(cr),yS(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return vS(t),null;case 13:if(It(Gt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ee(340));nu()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return It(Gt),null;case 4:return iu(),null;case 10:return hS(t.type._context),null;case 22:case 23:return PS(),null;case 24:return null;default:return null}}var nm=!1,ar=!1,x9=typeof WeakSet=="function"?WeakSet:Set,$e=null;function jc(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Xt(e,t,r)}else n.current=null}function Hb(e,t,n){try{n()}catch(r){Xt(e,t,r)}}var Ck=!1;function S9(e,t){if(Cb=Rg,e=gR(),sS(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 a=0,s=-1,l=-1,c=0,d=0,f=e,p=null;t:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(s=a+i),f!==o||r!==0&&f.nodeType!==3||(l=a+r),f.nodeType===3&&(a+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break t;if(p===n&&++c===i&&(s=a),p===o&&++d===r&&(l=a),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(kb={focusedElem:e,selectionRange:n},Rg=!1,$e=t;$e!==null;)if(t=$e,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,$e=e;else for(;$e!==null;){t=$e;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:Di(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(E){Xt(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,$e=e;break}$e=t.return}return v=Ck,Ck=!1,v}function tf(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&&Hb(t,n,o)}i=i.next}while(i!==r)}}function Cy(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 Wb(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 hD(e){var t=e.alternate;t!==null&&(e.alternate=null,hD(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[lo],delete t[Bf],delete t[jb],delete t[o9],delete t[a9])),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 pD(e){return e.tag===5||e.tag===3||e.tag===4}function kk(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||pD(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 Yb(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=Fg));else if(r!==4&&(e=e.child,e!==null))for(Yb(e,t,n),e=e.sibling;e!==null;)Yb(e,t,n),e=e.sibling}function Gb(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(Gb(e,t,n),e=e.sibling;e!==null;)Gb(e,t,n),e=e.sibling}var Qn=null,Ii=!1;function ba(e,t,n){for(n=n.child;n!==null;)mD(e,t,n),n=n.sibling}function mD(e,t,n){if(mo&&typeof mo.onCommitFiberUnmount=="function")try{mo.onCommitFiberUnmount(_y,n)}catch{}switch(n.tag){case 5:ar||jc(n,t);case 6:var r=Qn,i=Ii;Qn=null,ba(e,t,n),Qn=r,Ii=i,Qn!==null&&(Ii?(e=Qn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Qn.removeChild(n.stateNode));break;case 18:Qn!==null&&(Ii?(e=Qn,n=n.stateNode,e.nodeType===8?M_(e.parentNode,n):e.nodeType===1&&M_(e,n),Df(e)):M_(Qn,n.stateNode));break;case 4:r=Qn,i=Ii,Qn=n.stateNode.containerInfo,Ii=!0,ba(e,t,n),Qn=r,Ii=i;break;case 0:case 11:case 14:case 15:if(!ar&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&Hb(n,t,a),i=i.next}while(i!==r)}ba(e,t,n);break;case 1:if(!ar&&(jc(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){Xt(n,t,s)}ba(e,t,n);break;case 21:ba(e,t,n);break;case 22:n.mode&1?(ar=(r=ar)||n.memoizedState!==null,ba(e,t,n),ar=r):ba(e,t,n);break;default:ba(e,t,n)}}function Pk(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new x9),t.forEach(function(r){var i=M9.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Ri(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=cn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*T9(r/1960))-r,10e?16:e,Ra===null)var r=!1;else{if(e=Ra,Ra=null,Qg=0,ut&6)throw Error(Ee(331));var i=ut;for(ut|=4,$e=e.current;$e!==null;){var o=$e,a=o.child;if($e.flags&16){var s=o.deletions;if(s!==null){for(var l=0;lcn()-CS?nl(e,0):OS|=n),Mr(e,t)}function SD(e,t){t===0&&(e.mode&1?(t=Gp,Gp<<=1,!(Gp&130023424)&&(Gp=4194304)):t=1);var n=xr();e=Qo(e,t),e!==null&&(Nh(e,t,n),Mr(e,n))}function j9(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),SD(e,n)}function M9(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),SD(e,n)}var ED;ED=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Lr.current)Pr=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Pr=!1,_9(e,t,n);Pr=!!(e.flags&131072)}else Pr=!1,zt&&t.flags&1048576&&CR(t,zg,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ig(e,t),e=t.pendingProps;var i=tu(t,cr.current);Wc(t,n),i=bS(null,t,r,e,i,n);var o=wS();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,jr(r)?(o=!0,Ug(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,mS(t),i.updater=Ty,t.stateNode=i,i._reactInternals=t,Ib(t,r,e,n),t=Ub(null,t,r,!0,o,n)):(t.tag=0,zt&&o&&lS(t),vr(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ig(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=N9(r),e=Di(r,e),i){case 0:t=$b(null,t,r,e,n);break e;case 1:t=Ek(null,t,r,e,n);break e;case 11:t=xk(null,t,r,e,n);break e;case 14:t=Sk(null,t,r,Di(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:Di(r,i),$b(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Di(r,i),Ek(e,t,r,i,n);case 3:e:{if(sD(t),e===null)throw Error(Ee(387));r=t.pendingProps,o=t.memoizedState,i=o.element,jR(e,t),Wg(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=ou(Error(Ee(423)),t),t=Tk(e,t,r,n,i);break e}else if(r!==i){i=ou(Error(Ee(424)),t),t=Tk(e,t,r,n,i);break e}else for(Vr=Ka(t.stateNode.containerInfo.firstChild),Gr=t,zt=!0,Fi=null,n=RR(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(nu(),r===i){t=Xo(e,t,n);break e}vr(e,t,r,n)}t=t.child}return t;case 5:return DR(t),e===null&&Nb(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,Pb(r,i)?a=null:o!==null&&Pb(r,o)&&(t.flags|=32),aD(e,t),vr(e,t,a,n),t.child;case 6:return e===null&&Nb(t),null;case 13:return lD(e,t,n);case 4:return gS(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ru(t,null,r,n):vr(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Di(r,i),xk(e,t,r,i,n);case 7:return vr(e,t,t.pendingProps,n),t.child;case 8:return vr(e,t,t.pendingProps.children,n),t.child;case 12:return vr(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,Lt(Vg,r._currentValue),r._currentValue=a,o!==null)if(Gi(o.value,a)){if(o.children===i.children&&!Lr.current){t=Xo(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=Yo(-1,n&-n),l.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?l.next=l:(l.next=d.next,d.next=l),c.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),Rb(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Ee(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),Rb(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}vr(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Wc(t,n),i=Si(i),r=r(i),t.flags|=1,vr(e,t,r,n),t.child;case 14:return r=t.type,i=Di(r,t.pendingProps),i=Di(r.type,i),Sk(e,t,r,i,n);case 15:return iD(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Di(r,i),ig(e,t),t.tag=1,jr(r)?(e=!0,Ug(t)):e=!1,Wc(t,n),AR(t,r,i),Ib(t,r,i,n),Ub(null,t,r,!0,e,n);case 19:return cD(e,t,n);case 22:return oD(e,t,n)}throw Error(Ee(156,t.tag))};function TD(e,t){return QN(e,t)}function A9(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 mi(e,t,n,r){return new A9(e,t,n,r)}function jS(e){return e=e.prototype,!(!e||!e.isReactComponent)}function N9(e){if(typeof e=="function")return jS(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Z2)return 11;if(e===Q2)return 14}return 2}function Ja(e,t){var n=e.alternate;return n===null?(n=mi(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 sg(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")jS(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case xc:return rl(n.children,i,o,t);case K2:a=8,i|=8;break;case sb:return e=mi(12,n,t,i|2),e.elementType=sb,e.lanes=o,e;case lb:return e=mi(13,n,t,i),e.elementType=lb,e.lanes=o,e;case cb:return e=mi(19,n,t,i),e.elementType=cb,e.lanes=o,e;case NN:return Py(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case MN:a=10;break e;case AN:a=9;break e;case Z2:a=11;break e;case Q2:a=14;break e;case Ca:a=16,r=null;break e}throw Error(Ee(130,e==null?e:typeof e,""))}return t=mi(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function rl(e,t,n,r){return e=mi(7,e,r,t),e.lanes=n,e}function Py(e,t,n,r){return e=mi(22,e,r,t),e.elementType=NN,e.lanes=n,e.stateNode={isHidden:!1},e}function U_(e,t,n){return e=mi(6,e,null,t),e.lanes=n,e}function B_(e,t,n){return t=mi(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function R9(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=w_(0),this.expirationTimes=w_(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=w_(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function MS(e,t,n,r,i,o,a,s,l){return e=new R9(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=mi(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},mS(o),e}function D9(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(PD)}catch(e){console.error(e)}}PD(),CN.exports=ni;var Al=CN.exports;const il=sa(Al);var LD,Ik=Al;LD=Ik.createRoot,Ik.hydrateRoot;var jD={exports:{}},MD={};/** + * @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 su=F;function B9(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var z9=typeof Object.is=="function"?Object.is:B9,V9=su.useState,H9=su.useEffect,W9=su.useLayoutEffect,Y9=su.useDebugValue;function G9(e,t){var n=t(),r=V9({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return W9(function(){i.value=n,i.getSnapshot=t,z_(i)&&o({inst:i})},[e,n,t]),H9(function(){return z_(i)&&o({inst:i}),e(function(){z_(i)&&o({inst:i})})},[e]),Y9(n),n}function z_(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!z9(e,n)}catch{return!0}}function q9(e,t){return t()}var K9=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?q9:G9;MD.useSyncExternalStore=su.useSyncExternalStore!==void 0?su.useSyncExternalStore:K9;jD.exports=MD;var AD=jD.exports,Z9={};/** + * @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 Ny=F,Q9=AD;function X9(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var J9=typeof Object.is=="function"?Object.is:X9,ez=Q9.useSyncExternalStore,tz=Ny.useRef,nz=Ny.useEffect,rz=Ny.useMemo,iz=Ny.useDebugValue;Z9.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=tz(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=rz(function(){function l(m){if(!c){if(c=!0,d=m,m=r(m),i!==void 0&&a.hasValue){var v=a.value;if(i(v,m))return f=v}return f=m}if(v=f,J9(d,m))return v;var y=r(m);return i!==void 0&&i(v,y)?v:(d=m,f=y)}var c=!1,d,f,p=n===void 0?null:n;return[function(){return l(t())},p===null?void 0:function(){return l(p())}]},[t,n,r,i]);var s=ez(e,o[0],o[1]);return nz(function(){a.hasValue=!0,a.value=s},[s]),iz(s),s};function oz(e){e()}let ND=oz;const az=e=>ND=e,sz=()=>ND,Fk=Symbol.for("react-redux-context"),$k=typeof globalThis<"u"?globalThis:{};function lz(){var e;if(!F.createContext)return{};const t=(e=$k[Fk])!=null?e:$k[Fk]=new Map;let n=t.get(F.createContext);return n||(n=F.createContext(null),t.set(F.createContext,n)),n}const RD=lz(),cz=()=>{throw new Error("uSES not initialized!")};function Gc(){return Gc=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}var DD={exports:{}},St={};/** @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 Fn=typeof Symbol=="function"&&Symbol.for,IS=Fn?Symbol.for("react.element"):60103,FS=Fn?Symbol.for("react.portal"):60106,Ry=Fn?Symbol.for("react.fragment"):60107,Dy=Fn?Symbol.for("react.strict_mode"):60108,Iy=Fn?Symbol.for("react.profiler"):60114,Fy=Fn?Symbol.for("react.provider"):60109,$y=Fn?Symbol.for("react.context"):60110,$S=Fn?Symbol.for("react.async_mode"):60111,Uy=Fn?Symbol.for("react.concurrent_mode"):60111,By=Fn?Symbol.for("react.forward_ref"):60112,zy=Fn?Symbol.for("react.suspense"):60113,uz=Fn?Symbol.for("react.suspense_list"):60120,Vy=Fn?Symbol.for("react.memo"):60115,Hy=Fn?Symbol.for("react.lazy"):60116,dz=Fn?Symbol.for("react.block"):60121,fz=Fn?Symbol.for("react.fundamental"):60117,hz=Fn?Symbol.for("react.responder"):60118,pz=Fn?Symbol.for("react.scope"):60119;function ii(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case IS:switch(e=e.type,e){case $S:case Uy:case Ry:case Iy:case Dy:case zy:return e;default:switch(e=e&&e.$$typeof,e){case $y:case By:case Hy:case Vy:case Fy:return e;default:return t}}case FS:return t}}}function ID(e){return ii(e)===Uy}St.AsyncMode=$S;St.ConcurrentMode=Uy;St.ContextConsumer=$y;St.ContextProvider=Fy;St.Element=IS;St.ForwardRef=By;St.Fragment=Ry;St.Lazy=Hy;St.Memo=Vy;St.Portal=FS;St.Profiler=Iy;St.StrictMode=Dy;St.Suspense=zy;St.isAsyncMode=function(e){return ID(e)||ii(e)===$S};St.isConcurrentMode=ID;St.isContextConsumer=function(e){return ii(e)===$y};St.isContextProvider=function(e){return ii(e)===Fy};St.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===IS};St.isForwardRef=function(e){return ii(e)===By};St.isFragment=function(e){return ii(e)===Ry};St.isLazy=function(e){return ii(e)===Hy};St.isMemo=function(e){return ii(e)===Vy};St.isPortal=function(e){return ii(e)===FS};St.isProfiler=function(e){return ii(e)===Iy};St.isStrictMode=function(e){return ii(e)===Dy};St.isSuspense=function(e){return ii(e)===zy};St.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Ry||e===Uy||e===Iy||e===Dy||e===zy||e===uz||typeof e=="object"&&e!==null&&(e.$$typeof===Hy||e.$$typeof===Vy||e.$$typeof===Fy||e.$$typeof===$y||e.$$typeof===By||e.$$typeof===fz||e.$$typeof===hz||e.$$typeof===pz||e.$$typeof===dz)};St.typeOf=ii;DD.exports=St;var mz=DD.exports,US=mz,gz={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},vz={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},yz={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},FD={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},BS={};BS[US.ForwardRef]=yz;BS[US.Memo]=FD;function Uk(e){return US.isMemo(e)?FD:BS[e.$$typeof]||gz}var _z=Object.defineProperty,bz=Object.getOwnPropertyNames,Bk=Object.getOwnPropertySymbols,wz=Object.getOwnPropertyDescriptor,xz=Object.getPrototypeOf,zk=Object.prototype;function $D(e,t,n){if(typeof t!="string"){if(zk){var r=xz(t);r&&r!==zk&&$D(e,r,n)}var i=bz(t);Bk&&(i=i.concat(Bk(t)));for(var o=Uk(e),a=Uk(t),s=0;st(i(...o)))}return n}function Xb(e){return function(n){const r=e(n);function i(){return r}return i.dependsOnOwnProps=!1,i}}function Hk(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function BD(e,t){return function(r,{displayName:i}){const o=function(s,l){return o.dependsOnOwnProps?o.mapToProps(s,l):o.mapToProps(s,void 0)};return o.dependsOnOwnProps=!0,o.mapToProps=function(s,l){o.mapToProps=e,o.dependsOnOwnProps=Hk(e);let c=o(s,l);return typeof c=="function"&&(o.mapToProps=c,o.dependsOnOwnProps=Hk(c),c=o(s,l)),c},o}}function HS(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function Mz(e){return e&&typeof e=="object"?Xb(t=>jz(e,t)):e?typeof e=="function"?BD(e):HS(e,"mapDispatchToProps"):Xb(t=>({dispatch:t}))}function Az(e){return e?typeof e=="function"?BD(e):HS(e,"mapStateToProps"):Xb(()=>({}))}function Nz(e,t,n){return Gc({},n,e,t)}function Rz(e){return function(n,{displayName:r,areMergedPropsEqual:i}){let o=!1,a;return function(l,c,d){const f=e(l,c,d);return o?i(f,a)||(a=f):(o=!0,a=f),a}}}function Dz(e){return e?typeof e=="function"?Rz(e):HS(e,"mergeProps"):()=>Nz}function Iz(){const e=sz();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 Wk={notify(){},get:()=>[]};function zD(e,t){let n,r=Wk;function i(f){return l(),r.subscribe(f)}function o(){r.notify()}function a(){d.onStateChange&&d.onStateChange()}function s(){return!!n}function l(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=Iz())}function c(){n&&(n(),n=void 0,r.clear(),r=Wk)}const d={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:c,getListeners:()=>r};return d}const Fz=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ev=Fz?F.useLayoutEffect:F.useEffect;function Yk(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function V_(e,t){if(Yk(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{VD=e},Bz=[null,null];function zz(e,t,n){ev(()=>e(...t),n)}function Vz(e,t,n,r,i,o){e.current=r,n.current=!1,i.current&&(i.current=null,o())}function Hz(e,t,n,r,i,o,a,s,l,c,d){if(!e)return()=>{};let f=!1,p=null;const m=()=>{if(f||!s.current)return;const y=t.getState();let x,_;try{x=r(y,i.current)}catch(w){_=w,p=w}_||(p=null),x===o.current?a.current||c():(o.current=x,l.current=x,a.current=!0,d())};return n.onStateChange=m,n.trySubscribe(),m(),()=>{if(f=!0,n.tryUnsubscribe(),n.onStateChange=null,p)throw p}}function Wz(e,t){return e===t}function HD(e,t,n,{pure:r,areStatesEqual:i=Wz,areOwnPropsEqual:o=V_,areStatePropsEqual:a=V_,areMergedPropsEqual:s=V_,forwardRef:l=!1,context:c=RD}={}){const d=c,f=Az(e),p=Mz(t),m=Dz(n),v=!!e;return x=>{const _=x.displayName||x.name||"Component",w=`Connect(${_})`,S={shouldHandleStateChanges:v,displayName:w,wrappedComponentName:_,WrappedComponent:x,initMapStateToProps:f,initMapDispatchToProps:p,initMergeProps:m,areStatesEqual:i,areStatePropsEqual:a,areOwnPropsEqual:o,areMergedPropsEqual:s};function E(j){const[N,U,R]=F.useMemo(()=>{const{reactReduxForwardedRef:J}=j,se=DS(j,$z);return[j.context,J,se]},[j]),V=F.useMemo(()=>N&&N.Consumer&&Cz.isContextConsumer(F.createElement(N.Consumer,null))?N:d,[N,d]),Y=F.useContext(V),X=!!j.store&&!!j.store.getState&&!!j.store.dispatch,G=!!Y&&!!Y.store,Z=X?j.store:Y.store,te=G?Y.getServerState:Z.getState,le=F.useMemo(()=>Lz(Z.dispatch,S),[Z]),[q,I]=F.useMemo(()=>{if(!v)return Bz;const J=zD(Z,X?void 0:Y.subscription),se=J.notifyNestedSubs.bind(J);return[J,se]},[Z,X,Y]),D=F.useMemo(()=>X?Y:Gc({},Y,{subscription:q}),[X,Y,q]),H=F.useRef(),ie=F.useRef(R),z=F.useRef(),K=F.useRef(!1);F.useRef(!1);const re=F.useRef(!1),ae=F.useRef();ev(()=>(re.current=!0,()=>{re.current=!1}),[]);const he=F.useMemo(()=>()=>z.current&&R===ie.current?z.current:le(Z.getState(),R),[Z,R]),O=F.useMemo(()=>se=>q?Hz(v,Z,q,le,ie,H,K,re,z,I,se):()=>{},[q]);zz(Vz,[ie,H,K,R,z,I]);let M;try{M=VD(O,he,te?()=>le(te(),R):he)}catch(J){throw ae.current&&(J.message+=` +The error may be correlated with this previous error: +${ae.current.stack} + +`),J}ev(()=>{ae.current=void 0,z.current=void 0,H.current=M});const $=F.useMemo(()=>F.createElement(x,Gc({},M,{ref:U})),[U,x,M]);return F.useMemo(()=>v?F.createElement(V.Provider,{value:D},$):$,[V,$,D])}const k=F.memo(E);if(k.WrappedComponent=x,k.displayName=E.displayName=w,l){const N=F.forwardRef(function(R,V){return F.createElement(k,Gc({},R,{reactReduxForwardedRef:V}))});return N.displayName=w,N.WrappedComponent=x,Vk(N,x)}return Vk(k,x)}}function WD({store:e,context:t,children:n,serverState:r,stabilityCheck:i="once",noopCheck:o="once"}){const a=F.useMemo(()=>{const c=zD(e);return{store:e,subscription:c,getServerState:r?()=>r:void 0,stabilityCheck:i,noopCheck:o}},[e,r,i,o]),s=F.useMemo(()=>e.getState(),[e]);ev(()=>{const{subscription:c}=a;return c.onStateChange=c.notifyNestedSubs,c.trySubscribe(),s!==e.getState()&&c.notifyNestedSubs(),()=>{c.tryUnsubscribe(),c.onStateChange=void 0}},[a,s]);const l=t||RD;return F.createElement(l.Provider,{value:a},n)}Uz(AD.useSyncExternalStore);az(Al.unstable_batchedUpdates);/** + * @remix-run/router v1.7.2 + * + * 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 qf(){return qf=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function WS(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Gz(){return Math.random().toString(36).substr(2,8)}function qk(e,t){return{usr:e.state,key:e.key,idx:t}}function Jb(e,t,n,r){return n===void 0&&(n=null),qf({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Uu(t):t,{state:n,key:t&&t.key||r||Gz()})}function tv(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 Uu(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 qz(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,a=i.history,s=Da.Pop,l=null,c=d();c==null&&(c=0,a.replaceState(qf({},a.state,{idx:c}),""));function d(){return(a.state||{idx:null}).idx}function f(){s=Da.Pop;let x=d(),_=x==null?null:x-c;c=x,l&&l({action:s,location:y.location,delta:_})}function p(x,_){s=Da.Push;let w=Jb(y.location,x,_);n&&n(w,x),c=d()+1;let S=qk(w,c),E=y.createHref(w);try{a.pushState(S,"",E)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;i.location.assign(E)}o&&l&&l({action:s,location:y.location,delta:1})}function m(x,_){s=Da.Replace;let w=Jb(y.location,x,_);n&&n(w,x),c=d();let S=qk(w,c),E=y.createHref(w);a.replaceState(S,"",E),o&&l&&l({action:s,location:y.location,delta:0})}function v(x){let _=i.location.origin!=="null"?i.location.origin:i.location.href,w=typeof x=="string"?x:tv(x);return hn(_,"No window.location.(origin|href) available to create URL for href: "+w),new URL(w,_)}let y={get action(){return s},get location(){return e(i,a)},listen(x){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(Gk,f),l=x,()=>{i.removeEventListener(Gk,f),l=null}},createHref(x){return t(i,x)},createURL:v,encodeLocation(x){let _=v(x);return{pathname:_.pathname,search:_.search,hash:_.hash}},push:p,replace:m,go(x){return a.go(x)}};return y}var Kk;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Kk||(Kk={}));function Kz(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?Uu(t):t,i=YS(r.pathname||"/",n);if(i==null)return null;let o=YD(e);Zz(o);let a=null;for(let s=0;a==null&&s{let l={relativePath:s===void 0?o.path||"":s,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};l.relativePath.startsWith("/")&&(hn(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=es([r,l.relativePath]),d=n.concat(l);o.children&&o.children.length>0&&(hn(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),YD(o.children,t,d,c)),!(o.path==null&&!o.index)&&t.push({path:c,score:rV(c,o.index),routesMeta:d})};return e.forEach((o,a)=>{var s;if(o.path===""||!((s=o.path)!=null&&s.includes("?")))i(o,a);else for(let l of GD(o.path))i(o,a,l)}),t}function GD(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 a=GD(r.join("/")),s=[];return s.push(...a.map(l=>l===""?o:[o,l].join("/"))),i&&s.push(...a),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function Zz(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:iV(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Qz=/^:\w+$/,Xz=3,Jz=2,eV=1,tV=10,nV=-2,Zk=e=>e==="*";function rV(e,t){let n=e.split("/"),r=n.length;return n.some(Zk)&&(r+=nV),t&&(r+=Jz),n.filter(i=>!Zk(i)).reduce((i,o)=>i+(Qz.test(o)?Xz:o===""?eV:tV),r)}function iV(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 oV(e,t){let{routesMeta:n}=e,r={},i="/",o=[];for(let a=0;a{if(d==="*"){let p=s[f]||"";a=o.slice(0,o.length-p.length).replace(/(.)\/+$/,"$1")}return c[d]=cV(s[f]||"",d),c},{}),pathname:o,pathnameBase:a,pattern:e}}function sV(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),WS(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,(a,s)=>(r.push(s),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function lV(e){try{return decodeURI(e)}catch(t){return WS(!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 cV(e,t){try{return decodeURIComponent(e)}catch(n){return WS(!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 YS(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 uV(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Uu(e):e;return{pathname:n?n.startsWith("/")?n:dV(n,t):t,search:hV(r),hash:pV(i)}}function dV(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 H_(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 GS(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function qS(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Uu(e):(i=qf({},e),hn(!i.pathname||!i.pathname.includes("?"),H_("?","pathname","search",i)),hn(!i.pathname||!i.pathname.includes("#"),H_("#","pathname","hash",i)),hn(!i.search||!i.search.includes("#"),H_("#","search","hash",i)));let o=e===""||i.pathname==="",a=o?"/":i.pathname,s;if(r||a==null)s=n;else{let f=t.length-1;if(a.startsWith("..")){let p=a.split("/");for(;p[0]==="..";)p.shift(),f-=1;i.pathname=p.join("/")}s=f>=0?t[f]:"/"}let l=uV(i,s),c=a&&a!=="/"&&a.endsWith("/"),d=(o||a===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||d)&&(l.pathname+="/"),l}const es=e=>e.join("/").replace(/\/\/+/g,"/"),fV=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),hV=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,pV=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function mV(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const qD=["post","put","patch","delete"];new Set(qD);const gV=["get",...qD];new Set(gV);/** + * React Router v6.14.2 + * + * 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 nv(){return nv=Object.assign?Object.assign.bind():function(e){for(var t=1;tl.pathnameBase)),a=F.useRef(!1);return QD(()=>{a.current=!0}),F.useCallback(function(l,c){if(c===void 0&&(c={}),!a.current)return;if(typeof l=="number"){n.go(l);return}let d=qS(l,JSON.parse(o),i,c.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:es([t,d.pathname])),(c.replace?n.replace:n.push)(d,c.state,c)},[t,n,o,i,e])}function Dl(){let{matches:e}=F.useContext(ca),t=e[e.length-1];return t?t.params:{}}function ZS(e,t){let{relative:n}=t===void 0?{}:t,{matches:r}=F.useContext(ca),{pathname:i}=bn(),o=JSON.stringify(GS(r).map(a=>a.pathnameBase));return F.useMemo(()=>qS(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function _V(e,t){return bV(e,t)}function bV(e,t,n){Rl()||hn(!1);let{navigator:r}=F.useContext(Nl),{matches:i}=F.useContext(ca),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let s=o?o.pathnameBase:"/";o&&o.route;let l=bn(),c;if(t){var d;let y=typeof t=="string"?Uu(t):t;s==="/"||(d=y.pathname)!=null&&d.startsWith(s)||hn(!1),c=y}else c=l;let f=c.pathname||"/",p=s==="/"?f:f.slice(s.length)||"/",m=Kz(e,{pathname:p}),v=TV(m&&m.map(y=>Object.assign({},y,{params:Object.assign({},a,y.params),pathname:es([s,r.encodeLocation?r.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?s:es([s,r.encodeLocation?r.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),i,n);return t&&v?F.createElement(t0.Provider,{value:{location:nv({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Da.Pop}},v):v}function wV(){let e=PV(),t=mV(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},o=null;return F.createElement(F.Fragment,null,F.createElement("h2",null,"Unexpected Application Error!"),F.createElement("h3",{style:{fontStyle:"italic"}},t),n?F.createElement("pre",{style:i},n):null,o)}const xV=F.createElement(wV,null);class SV extends F.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?F.createElement(ca.Provider,{value:this.props.routeContext},F.createElement(ZD.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function EV(e){let{routeContext:t,match:n,children:r}=e,i=F.useContext(KS);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),F.createElement(ca.Provider,{value:t},r)}function TV(e,t,n){var r;if(t===void 0&&(t=[]),n===void 0&&(n=null),e==null){var i;if((i=n)!=null&&i.errors)e=n.matches;else return null}let o=e,a=(r=n)==null?void 0:r.errors;if(a!=null){let s=o.findIndex(l=>l.route.id&&(a==null?void 0:a[l.route.id]));s>=0||hn(!1),o=o.slice(0,Math.min(o.length,s+1))}return o.reduceRight((s,l,c)=>{let d=l.route.id?a==null?void 0:a[l.route.id]:null,f=null;n&&(f=l.route.errorElement||xV);let p=t.concat(o.slice(0,c+1)),m=()=>{let v;return d?v=f:l.route.Component?v=F.createElement(l.route.Component,null):l.route.element?v=l.route.element:v=s,F.createElement(EV,{match:l,routeContext:{outlet:s,matches:p,isDataRoute:n!=null},children:v})};return n&&(l.route.ErrorBoundary||l.route.errorElement||c===0)?F.createElement(SV,{location:n.location,revalidation:n.revalidation,component:f,error:d,children:m(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):m()},null)}var ew;(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"})(ew||(ew={}));var Kf;(function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId"})(Kf||(Kf={}));function OV(e){let t=F.useContext(KS);return t||hn(!1),t}function CV(e){let t=F.useContext(KD);return t||hn(!1),t}function kV(e){let t=F.useContext(ca);return t||hn(!1),t}function XD(e){let t=kV(),n=t.matches[t.matches.length-1];return n.route.id||hn(!1),n.route.id}function PV(){var e;let t=F.useContext(ZD),n=CV(Kf.UseRouteError),r=XD(Kf.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function LV(){let{router:e}=OV(ew.UseNavigateStable),t=XD(Kf.UseNavigateStable),n=F.useRef(!1);return QD(()=>{n.current=!0}),F.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,nv({fromRouteId:t},o)))},[e,t])}function QS(e){let{to:t,replace:n,state:r,relative:i}=e;Rl()||hn(!1);let{matches:o}=F.useContext(ca),{pathname:a}=bn(),s=Oo(),l=qS(t,GS(o).map(d=>d.pathnameBase),a,i==="path"),c=JSON.stringify(l);return F.useEffect(()=>s(JSON.parse(c),{replace:n,state:r,relative:i}),[s,c,i,n,r]),null}function yt(e){hn(!1)}function jV(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Da.Pop,navigator:o,static:a=!1}=e;Rl()&&hn(!1);let s=t.replace(/^\/*/,"/"),l=F.useMemo(()=>({basename:s,navigator:o,static:a}),[s,o,a]);typeof r=="string"&&(r=Uu(r));let{pathname:c="/",search:d="",hash:f="",state:p=null,key:m="default"}=r,v=F.useMemo(()=>{let y=YS(c,s);return y==null?null:{location:{pathname:y,search:d,hash:f,state:p,key:m},navigationType:i}},[s,c,d,f,p,m,i]);return v==null?null:F.createElement(Nl.Provider,{value:l},F.createElement(t0.Provider,{children:n,value:v}))}function n0(e){let{children:t,location:n}=e;return _V(tw(t),n)}var Qk;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(Qk||(Qk={}));new Promise(()=>{});function tw(e,t){t===void 0&&(t=[]);let n=[];return F.Children.forEach(e,(r,i)=>{if(!F.isValidElement(r))return;let o=[...t,i];if(r.type===F.Fragment){n.push.apply(n,tw(r.props.children,o));return}r.type!==yt&&hn(!1),!r.props.index||!r.props.children||hn(!1);let a={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=tw(r.props.children,o)),n.push(a)}),n}/** + * React Router DOM v6.14.2 + * + * 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 rv(){return rv=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function MV(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function AV(e,t){return e.button===0&&(!t||t==="_self")&&!MV(e)}const NV=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],RV=["aria-current","caseSensitive","className","end","style","to","children"],DV="startTransition",Xk=j7[DV];function e4(e){let{basename:t,children:n,future:r,window:i}=e,o=F.useRef();o.current==null&&(o.current=Yz({window:i,v5Compat:!0}));let a=o.current,[s,l]=F.useState({action:a.action,location:a.location}),{v7_startTransition:c}=r||{},d=F.useCallback(f=>{c&&Xk?Xk(()=>l(f)):l(f)},[l,c]);return F.useLayoutEffect(()=>a.listen(d),[a,d]),F.createElement(jV,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:a})}const IV=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",FV=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ut=F.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:a,state:s,target:l,to:c,preventScrollReset:d}=t,f=JD(t,NV),{basename:p}=F.useContext(Nl),m,v=!1;if(typeof c=="string"&&FV.test(c)&&(m=c,IV))try{let w=new URL(window.location.href),S=c.startsWith("//")?new URL(w.protocol+c):new URL(c),E=YS(S.pathname,p);S.origin===w.origin&&E!=null?c=E+S.search+S.hash:v=!0}catch{}let y=vV(c,{relative:i}),x=$V(c,{replace:a,state:s,target:l,preventScrollReset:d,relative:i});function _(w){r&&r(w),w.defaultPrevented||x(w)}return F.createElement("a",rv({},f,{href:m||y,onClick:v||o?r:_,ref:n,target:l}))}),t4=F.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:o="",end:a=!1,style:s,to:l,children:c}=t,d=JD(t,RV),f=ZS(l,{relative:d.relative}),p=bn(),m=F.useContext(KD),{navigator:v}=F.useContext(Nl),y=v.encodeLocation?v.encodeLocation(f).pathname:f.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||!a&&x.startsWith(y)&&x.charAt(y.length)==="/",S=_!=null&&(_===y||!a&&_.startsWith(y)&&_.charAt(y.length)==="/"),E=w?r:void 0,C;typeof o=="function"?C=o({isActive:w,isPending:S}):C=[o,w?"active":null,S?"pending":null].filter(Boolean).join(" ");let k=typeof s=="function"?s({isActive:w,isPending:S}):s;return F.createElement(Ut,rv({},d,{"aria-current":E,className:C,ref:n,style:k,to:l}),typeof c=="function"?c({isActive:w,isPending:S}):c)});var Jk;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(Jk||(Jk={}));var eP;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(eP||(eP={}));function $V(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:a}=t===void 0?{}:t,s=Oo(),l=bn(),c=ZS(e,{relative:a});return F.useCallback(d=>{if(AV(d,n)){d.preventDefault();let f=r!==void 0?r:tv(l)===tv(c);s(e,{replace:f,state:i,preventScrollReset:o,relative:a})}},[l,s,c,r,i,n,e,o,a])}const UV="shlink-web-client",BV="A React-based progressive web application for shlink",zV="/shlink-web-client/feature/external-web-component",VV="https://github.com/shlinkio/shlink-web-client",HV="MIT",WV={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:"vitest run --run","test:watch":"vitest --watch","test:ci":"npm run test -- --coverage","test:verbose":"npm run test -- --verbose"},YV={"@fortawesome/fontawesome-free":"^6.4.2","@fortawesome/fontawesome-svg-core":"^6.4.2","@fortawesome/free-brands-svg-icons":"^6.4.2","@fortawesome/free-regular-svg-icons":"^6.4.2","@fortawesome/free-solid-svg-icons":"^6.4.2","@fortawesome/react-fontawesome":"^0.2.0","@json2csv/plainjs":"^7.0.1","@reduxjs/toolkit":"^1.9.5","@shlinkio/shlink-frontend-kit":"^0.2.0","@shlinkio/shlink-web-component":"^0.1.1",bootstrap:"5.2.3",bottlejs:"^2.0.1",classnames:"^2.3.2","compare-versions":"^6.1.0",csvtojson:"^2.0.10","date-fns":"^2.30.0",ramda:"^0.27.2",react:"^18.2.0","react-dom":"^18.2.0","react-external-link":"^2.2.0","react-redux":"^8.1.2","react-router-dom":"^6.14.2",reactstrap:"^9.2.0","redux-localstorage-simple":"^2.5.1",uuid:"^9.0.0","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"},GV={"@shlinkio/eslint-config-js-coding-standard":"~2.2.0","@shlinkio/stylelint-config-css-coding-standard":"~1.1.1","@testing-library/jest-dom":"^5.17.0","@testing-library/react":"^14.0.0","@testing-library/user-event":"^14.4.3","@total-typescript/shoehorn":"^0.1.1","@types/leaflet":"^1.9.3","@types/ramda":"^0.27.66","@types/react":"^18.2.19","@types/react-dom":"^18.2.7","@types/uuid":"^9.0.2","@vitejs/plugin-react":"^4.0.4","@vitest/coverage-v8":"^0.34.1","adm-zip":"^0.5.10",chalk:"^5.3.0",eslint:"^8.46.0",history:"^5.3.0",jsdom:"^22.1.0",sass:"^1.64.2",stylelint:"^15.10.2",typescript:"^5.1.6",vite:"^4.4.9","vite-plugin-pwa":"^0.16.4",vitest:"^0.34.1"},qV=[">0.2%","not dead","not ie <= 11","not op_mini all"],iv={name:UV,description:BV,private:!1,homepage:zV,repository:VV,license:HV,scripts:WV,dependencies:YV,devDependencies:GV,browserslist:qV};var qi,wo=".",n4="function",r4="string",i4="__global__",XS="Provider",KV=0,JS=Array.prototype.slice,ZV=function(t,n){var r=t[n];if(r===void 0&&qi.config.strict)throw new Error("Bottle was unable to resolve a service. `"+n+"` is undefined.");return r},r0=function(t){var n;return this.nested[t]||(n=qi.pop(),this.nested[t]=n,this.factory(t,function(){return n.container})),this.nested[t]},o4=function(t){return t.split(wo).reduce(ZV,this)},QV=function(t,n,r,i){var o={configurable:!0,enumerable:!0};return t.length?o.get=function(){var s=0,l=function(d){if(d)throw d;t[s]&&t[s++](r,l)};return l(),r}:(o.value=r,o.writable=!0),Object.defineProperty(i,n,o),i[n]},XV=function(t,n){var r,i;return typeof t===n4&&(n=t,t=i4),r=t.split(wo),i=r.shift(),r.length?r0.call(this,i).middleware(r.join(wo),n):(this.middlewares[i]||(this.middlewares[i]=[]),this.middlewares[i].push(n)),this},JV=function(t,n){return n(t)},tP=function(t,n){return(t[n]||[]).concat(t.__global__||[])},eH=function(t,n){var r,i,o,a,s;return this.id,o=this.container,a=this.decorators,s=this.middlewares,r=t+XS,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],d;return c&&(d=tP(a,t).reduce(JV,c.$get(o)),delete o[r],delete o[t]),d===void 0?d:QV(tP(s,t),t,d,o)}},Object.defineProperties(o,i),this},a4=function(t,n){var r,i;return r=t.split(wo),this.providerMap[t]&&r.length===1&&!this.container[t+XS]?console.error(t+" provider already instantiated."):(this.originalProviders[t]=n,this.providerMap[t]=!0,i=r.shift(),r.length?(r0.call(this,i).provider(r.join(wo),n),this):eH.call(this,i,n))},eE=function(t,n){return a4.call(this,t,function(){this.$get=n})},s4=function(t,n,r){var i=arguments.length>3?JS.call(arguments,3):[],o=this;return eE.call(this,t,function(){var s=n,l=i.map(o4,o.container);return r?new(n.bind.apply(n,[null].concat(l))):s.apply(null,l)})},tH=function(t,n){return s4.apply(this,[t,n,!0].concat(JS.call(arguments,2)))},nH=function(t,n){return s4.apply(this,[t,n,!1].concat(JS.call(arguments,2)))},l4=function(t,n){Object.defineProperty(this,t,{configurable:!0,enumerable:!0,value:n,writable:!0})},c4=function(t,n){var r=t[n];return r||(r={},l4.call(t,n,r)),r},rH=function(t,n){var r;return r=t.split(wo),t=r.pop(),l4.call(r.reduce(c4,this.container),t,n),this},iH=function(t,n){Object.defineProperty(this,t,{configurable:!1,enumerable:!0,value:n,writable:!1})},oH=function(t,n){var r=t.split(wo);return t=r.pop(),iH.call(r.reduce(c4,this.container),t,n),this},u4=function(t,n){var r,i;return typeof t===n4&&(n=t,t=i4),r=t.split(wo),i=r.shift(),r.length?r0.call(this,i).decorator(r.join(wo),n):(this.decorators[i]||(this.decorators[i]=[]),this.decorators[i].push(n)),this},aH=function(t){return this.deferred.push(t),this},sH=function(t){return(t||[]).map(o4,this.container)},lH=function(t,n){return eE.call(this,t,function(i){return{instance:n.bind(n,i)}})},cH=function(t){return!/^\$(?:decorator|register|list)$|Provider$/.test(t)},tE=function(t){return Object.keys(t||this.container||{}).filter(cH)},ov={},uH=function(t){var n;return typeof t===r4?(n=ov[t],n||(ov[t]=n=new qi,n.constant("BOTTLE_NAME",t)),n):new qi},dH=function(t){typeof t===r4?delete ov[t]:ov={}},d4=function(t){var n=t.$value===void 0?t:t.$value;return this[t.$type||"service"].apply(this,[t.$name,n].concat(t.$inject||[]))},nP=function(t){delete this.providerMap[t],delete this.container[t],delete this.container[t+XS]},fH=function(t){var n=this.originalProviders,r=Array.isArray(t);Object.keys(this.originalProviders).forEach(function(o){if(!(r&&t.indexOf(o)===-1)){var a=o.split(wo);a.length>1&&a.forEach(nP,r0.call(this,a[0])),nP.call(this,o),this.provider(o,n[o])}},this)},hH=function(t){return this.deferred.forEach(function(r){r(t)}),this};qi=function e(t){if(!(this instanceof e))return e.pop(t);this.id=KV++,this.decorators={},this.middlewares={},this.nested={},this.providerMap={},this.originalProviders={},this.deferred=[],this.container={$decorator:u4.bind(this),$register:d4.bind(this),$list:tE.bind(this)}};qi.prototype={constant:oH,decorator:u4,defer:aH,digest:sH,factory:eE,instanceFactory:lH,list:tE,middleware:XV,provider:a4,resetProviders:fH,register:d4,resolve:hH,service:tH,serviceFactory:nH,value:rH};qi.pop=uH;qi.clear=dH;qi.list=tE;qi.config={strict:!1};const pH=qi;function Mt(e){return e!=null&&typeof e=="object"&&e["@@functional/placeholder"]===!0}function en(e){return function t(n){return arguments.length===0||Mt(n)?t:e.apply(this,arguments)}}function Rt(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return Mt(n)?t:en(function(i){return e(n,i)});default:return Mt(n)&&Mt(r)?t:Mt(n)?en(function(i){return e(i,r)}):Mt(r)?en(function(i){return e(n,i)}):e(n,r)}}}function mH(e,t){e=e||[],t=t||[];var n,r=e.length,i=t.length,o=[];for(n=0;n=arguments.length)?s=t[a]:(s=arguments[i],i+=1),r[a]=s,Mt(s)||(o-=1),a+=1}return o<=0?n.apply(this,r):Fh(o,f4(e,r,n))}}var gH=Rt(function(t,n){return t===1?en(n):Fh(t,f4(t,[],n))});const nw=gH;function $h(e){return function t(n,r,i){switch(arguments.length){case 0:return t;case 1:return Mt(n)?t:Rt(function(o,a){return e(n,o,a)});case 2:return Mt(n)&&Mt(r)?t:Mt(n)?Rt(function(o,a){return e(o,r,a)}):Mt(r)?Rt(function(o,a){return e(n,o,a)}):en(function(o){return e(n,r,o)});default:return Mt(n)&&Mt(r)&&Mt(i)?t:Mt(n)&&Mt(r)?Rt(function(o,a){return e(o,a,i)}):Mt(n)&&Mt(i)?Rt(function(o,a){return e(o,r,a)}):Mt(r)&&Mt(i)?Rt(function(o,a){return e(n,o,a)}):Mt(n)?en(function(o){return e(o,r,i)}):Mt(r)?en(function(o){return e(n,o,i)}):Mt(i)?en(function(o){return e(n,r,o)}):e(n,r,i)}}}const i0=Array.isArray||function(t){return t!=null&&t.length>=0&&Object.prototype.toString.call(t)==="[object Array]"};function vH(e){return e!=null&&typeof e["@@transducer/step"]=="function"}function h4(e,t,n){return function(){if(arguments.length===0)return n();var r=Array.prototype.slice.call(arguments,0),i=r.pop();if(!i0(i)){for(var o=0;o0?t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1):!1});const bH=_H;var wH=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 xH(e){return new wH(e)}var SH=Rt(function(t,n){return Fh(t.length,function(){return t.apply(n,arguments)})});const EH=SH;function TH(e,t,n){for(var r=0,i=n.length;r=0;)n=sP[r],ho(n,t)&&!jH(i,n)&&(i[i.length]=n),r-=1;return i});const Zf=MH;var AH=Rt(h4(["fantasy-land/map","map"],kH,function(t,n){switch(Object.prototype.toString.call(n)){case"[object Function]":return nw(n.length,function(){return t.call(this,n.apply(this,arguments))});case"[object Object]":return Uh(function(r,i){return r[i]=t(n[i]),r},{},Zf(n));default:return yH(t,n)}}));const rE=AH,NH=Number.isInteger||function(t){return t<<0===t};var RH=Rt(function(t,n){var r=t<0?n.length+t:t;return nE(n)?n.charAt(r):n[r]});const DH=RH;var IH=Rt(function(t,n){return t.map(function(r){for(var i=n,o=0,a;o=0;){if(n[o]===e)return r[o]===t;o-=1}switch(i){case"Map":return e.size!==t.size?!1:fP(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size!==t.size?!1:fP(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 a=Zf(e);if(a.length!==Zf(t).length)return!1;var s=n.concat([e]),l=r.concat([t]);for(o=a.length-1;o>=0;){var c=a[o];if(!(ho(c,t)&&oE(t[c],e[c],s,l)))return!1;o-=1}return!0}var hW=Rt(function(t,n){return oE(t,n,[],[])});const pW=hW;function mW(e){return function(){return!e.apply(this,arguments)}}function gW(e,t){for(var n=0,r=t.length,i=[];n!!(e!=null&&e.url)&&!!(e!=null&&e.apiKey),of=e=>!!(e!=null&&e.id),x4=e=>!!(e!=null&&e.version),VW=e=>!!(e!=null&&e.serverNotFound),HW=e=>of(e)?e.id:"",WW=e=>FW(["id","autoConnect"],e);var YW={prefix:"fas",iconName:"calendar-days",icon:[448,512,["calendar-alt"],"f073","M128 0c17.7 0 32 14.3 32 32V64H288V32c0-17.7 14.3-32 32-32s32 14.3 32 32V64h48c26.5 0 48 21.5 48 48v48H0V112C0 85.5 21.5 64 48 64H96V32c0-17.7 14.3-32 32-32zM0 192H448V464c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V192zm64 80v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V272c0-8.8-7.2-16-16-16H80c-8.8 0-16 7.2-16 16zm128 0v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V272c0-8.8-7.2-16-16-16H208c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V272c0-8.8-7.2-16-16-16H336zM64 400v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V400c0-8.8-7.2-16-16-16H80c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V400c0-8.8-7.2-16-16-16H208zm112 16v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V400c0-8.8-7.2-16-16-16H336c-8.8 0-16 7.2-16 16z"]},GW=YW,qW={prefix:"fas",iconName:"circle-minus",icon:[512,512,["minus-circle"],"f056","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM184 232H328c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z"]},aE=qW,KW={prefix:"fas",iconName:"file-csv",icon:[512,512,[],"f6dd","M0 64C0 28.7 28.7 0 64 0H224V128c0 17.7 14.3 32 32 32H384V304H176c-35.3 0-64 28.7-64 64V512H64c-35.3 0-64-28.7-64-64V64zm384 64H256V0L384 128zM200 352h16c22.1 0 40 17.9 40 40v8c0 8.8-7.2 16-16 16s-16-7.2-16-16v-8c0-4.4-3.6-8-8-8H200c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8h16c4.4 0 8-3.6 8-8v-8c0-8.8 7.2-16 16-16s16 7.2 16 16v8c0 22.1-17.9 40-40 40H200c-22.1 0-40-17.9-40-40V392c0-22.1 17.9-40 40-40zm133.1 0H368c8.8 0 16 7.2 16 16s-7.2 16-16 16H333.1c-7.2 0-13.1 5.9-13.1 13.1c0 5.2 3 9.9 7.8 12l37.4 16.6c16.3 7.2 26.8 23.4 26.8 41.2c0 24.9-20.2 45.1-45.1 45.1H304c-8.8 0-16-7.2-16-16s7.2-16 16-16h42.9c7.2 0 13.1-5.9 13.1-13.1c0-5.2-3-9.9-7.8-12l-37.4-16.6c-16.3-7.2-26.8-23.4-26.8-41.2c0-24.9 20.2-45.1 45.1-45.1zm98.9 0c8.8 0 16 7.2 16 16v31.6c0 23 5.5 45.6 16 66c10.5-20.3 16-42.9 16-66V368c0-8.8 7.2-16 16-16s16 7.2 16 16v31.6c0 34.7-10.3 68.7-29.6 97.6l-5.1 7.7c-3 4.5-8 7.1-13.3 7.1s-10.3-2.7-13.3-7.1l-5.1-7.7c-19.3-28.9-29.6-62.9-29.6-97.6V368c0-8.8 7.2-16 16-16z"]},ZW={prefix:"fas",iconName:"pencil",icon:[512,512,[9999,61504,"pencil-alt"],"f303","M410.3 231l11.3-11.3-33.9-33.9-62.1-62.1L291.7 89.8l-11.3 11.3-22.6 22.6L58.6 322.9c-10.4 10.4-18 23.3-22.2 37.4L1 480.7c-2.5 8.4-.2 17.5 6.1 23.7s15.3 8.5 23.7 6.1l120.3-35.4c14.1-4.2 27-11.8 37.4-22.2L387.7 253.7 410.3 231zM160 399.4l-9.1 22.7c-4 3.1-8.5 5.4-13.3 6.9L59.4 452l23-78.1c1.4-4.9 3.8-9.4 6.9-13.3l22.7-9.1v32c0 8.8 7.2 16 16 16h32zM362.7 18.7L348.3 33.2 325.7 55.8 314.3 67.1l33.9 33.9 62.1 62.1 33.9 33.9 11.3-11.3 22.6-22.6 14.5-14.5c25-25 25-65.5 0-90.5L453.3 18.7c-25-25-65.5-25-90.5 0zm-47.4 168l-144 144c-6.2 6.2-16.4 6.2-22.6 0s-6.2-16.4 0-22.6l144-144c6.2-6.2 16.4-6.2 22.6 0s6.2 16.4 0 22.6z"]},QW=ZW,S4={prefix:"fas",iconName:"circle-notch",icon:[512,512,[],"f1ce","M222.7 32.1c5 16.9-4.6 34.8-21.5 39.8C121.8 95.6 64 169.1 64 256c0 106 86 192 192 192s192-86 192-192c0-86.9-57.8-160.4-137.1-184.1c-16.9-5-26.6-22.9-21.5-39.8s22.9-26.6 39.8-21.5C434.9 42.1 512 140 512 256c0 141.4-114.6 256-256 256S0 397.4 0 256C0 140 77.1 42.1 182.9 10.6c16.9-5 34.8 4.6 39.8 21.5z"]},XW={prefix:"fas",iconName:"bars",icon:[448,512,["navicon"],"f0c9","M0 96C0 78.3 14.3 64 32 64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z"]},E4={prefix:"fas",iconName:"list",icon:[512,512,["list-squares"],"f03a","M40 48C26.7 48 16 58.7 16 72v48c0 13.3 10.7 24 24 24H88c13.3 0 24-10.7 24-24V72c0-13.3-10.7-24-24-24H40zM192 64c-17.7 0-32 14.3-32 32s14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H192zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H192zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H192zM16 232v48c0 13.3 10.7 24 24 24H88c13.3 0 24-10.7 24-24V232c0-13.3-10.7-24-24-24H40c-13.3 0-24 10.7-24 24zM40 368c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24H88c13.3 0 24-10.7 24-24V392c0-13.3-10.7-24-24-24H40z"]},JW={prefix:"fas",iconName:"circle-dot",icon:[512,512,[128280,"dot-circle"],"f192","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-352a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"]},eY=JW,tY={prefix:"fas",iconName:"pen-to-square",icon:[512,512,["edit"],"f044","M471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7zm-299.2 220c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3 172.4 241.7zM96 64C43 64 0 107 0 160V416c0 53 43 96 96 96H352c53 0 96-43 96-96V320c0-17.7-14.3-32-32-32s-32 14.3-32 32v96c0 17.7-14.3 32-32 32H96c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H96z"]},sE=tY,nY={prefix:"fas",iconName:"plug",icon:[384,512,[128268],"f1e6","M96 0C78.3 0 64 14.3 64 32v96h64V32c0-17.7-14.3-32-32-32zM288 0c-17.7 0-32 14.3-32 32v96h64V32c0-17.7-14.3-32-32-32zM32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32v32c0 77.4 55 142 128 156.8V480c0 17.7 14.3 32 32 32s32-14.3 32-32V412.8C297 398 352 333.4 352 256V224c17.7 0 32-14.3 32-32s-14.3-32-32-32H32z"]},rY={prefix:"fas",iconName:"globe",icon:[512,512,[127760],"f0ac","M352 256c0 22.2-1.2 43.6-3.3 64H163.3c-2.2-20.4-3.3-41.8-3.3-64s1.2-43.6 3.3-64H348.7c2.2 20.4 3.3 41.8 3.3 64zm28.8-64H503.9c5.3 20.5 8.1 41.9 8.1 64s-2.8 43.5-8.1 64H380.8c2.1-20.6 3.2-42 3.2-64s-1.1-43.4-3.2-64zm112.6-32H376.7c-10-63.9-29.8-117.4-55.3-151.6c78.3 20.7 142 77.5 171.9 151.6zm-149.1 0H167.7c6.1-36.4 15.5-68.6 27-94.7c10.5-23.6 22.2-40.7 33.5-51.5C239.4 3.2 248.7 0 256 0s16.6 3.2 27.8 13.8c11.3 10.8 23 27.9 33.5 51.5c11.6 26 20.9 58.2 27 94.7zm-209 0H18.6C48.6 85.9 112.2 29.1 190.6 8.4C165.1 42.6 145.3 96.1 135.3 160zM8.1 192H131.2c-2.1 20.6-3.2 42-3.2 64s1.1 43.4 3.2 64H8.1C2.8 299.5 0 278.1 0 256s2.8-43.5 8.1-64zM194.7 446.6c-11.6-26-20.9-58.2-27-94.6H344.3c-6.1 36.4-15.5 68.6-27 94.6c-10.5 23.6-22.2 40.7-33.5 51.5C272.6 508.8 263.3 512 256 512s-16.6-3.2-27.8-13.8c-11.3-10.8-23-27.9-33.5-51.5zM135.3 352c10 63.9 29.8 117.4 55.3 151.6C112.2 482.9 48.6 426.1 18.6 352H135.3zm358.1 0c-30 74.1-93.6 130.9-171.9 151.6c25.5-34.2 45.2-87.7 55.3-151.6H493.4z"]},iY={prefix:"fas",iconName:"ban",icon:[512,512,[128683,"cancel"],"f05e","M367.2 412.5L99.5 144.8C77.1 176.1 64 214.5 64 256c0 106 86 192 192 192c41.5 0 79.9-13.1 111.2-35.5zm45.3-45.3C434.9 335.9 448 297.5 448 256c0-106-86-192-192-192c-41.5 0-79.9 13.1-111.2 35.5L412.5 367.2zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z"]},hP={prefix:"fas",iconName:"server",icon:[512,512,[],"f233","M64 32C28.7 32 0 60.7 0 96v64c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zm280 72a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm48 24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0zM64 288c-35.3 0-64 28.7-64 64v64c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V352c0-35.3-28.7-64-64-64H64zm280 72a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm56 24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0z"]},oY={prefix:"fas",iconName:"file-arrow-up",icon:[384,512,["file-upload"],"f574","M64 0C28.7 0 0 28.7 0 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V160H256c-17.7 0-32-14.3-32-32V0H64zM256 0V128H384L256 0zM216 408c0 13.3-10.7 24-24 24s-24-10.7-24-24V305.9l-31 31c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l72-72c9.4-9.4 24.6-9.4 33.9 0l72 72c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-31-31V408z"]},aY=oY,sY={prefix:"fas",iconName:"map-location-dot",icon:[576,512,["map-marked-alt"],"f5a0","M408 120c0 54.6-73.1 151.9-105.2 192c-7.7 9.6-22 9.6-29.6 0C241.1 271.9 168 174.6 168 120C168 53.7 221.7 0 288 0s120 53.7 120 120zm8 80.4c3.5-6.9 6.7-13.8 9.6-20.6c.5-1.2 1-2.5 1.5-3.7l116-46.4C558.9 123.4 576 135 576 152V422.8c0 9.8-6 18.6-15.1 22.3L416 503V200.4zM137.6 138.3c2.4 14.1 7.2 28.3 12.8 41.5c2.9 6.8 6.1 13.7 9.6 20.6V451.8L32.9 502.7C17.1 509 0 497.4 0 480.4V209.6c0-9.8 6-18.6 15.1-22.3l122.6-49zM327.8 332c13.9-17.4 35.7-45.7 56.2-77V504.3L192 449.4V255c20.5 31.3 42.3 59.6 56.2 77c20.5 25.6 59.1 25.6 79.6 0zM288 152a40 40 0 1 0 0-80 40 40 0 1 0 0 80z"]},T4=sY,lY={prefix:"fas",iconName:"caret-up",icon:[320,512,[],"f0d8","M182.6 137.4c-12.5-12.5-32.8-12.5-45.3 0l-128 128c-9.2 9.2-11.9 22.9-6.9 34.9s16.6 19.8 29.6 19.8H288c12.9 0 24.6-7.8 29.6-19.8s2.2-25.7-6.9-34.9l-128-128z"]},cY={prefix:"fas",iconName:"palette",icon:[512,512,[127912],"f53f","M512 256c0 .9 0 1.8 0 2.7c-.4 36.5-33.6 61.3-70.1 61.3H344c-26.5 0-48 21.5-48 48c0 3.4 .4 6.7 1 9.9c2.1 10.2 6.5 20 10.8 29.9c6.1 13.8 12.1 27.5 12.1 42c0 31.8-21.6 60.7-53.4 62c-3.5 .1-7 .2-10.6 .2C114.6 512 0 397.4 0 256S114.6 0 256 0S512 114.6 512 256zM128 288a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm0-96a32 32 0 1 0 0-64 32 32 0 1 0 0 64zM288 96a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm96 96a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"]},uY={prefix:"fas",iconName:"arrow-down-wide-short",icon:[576,512,["sort-amount-asc","sort-amount-down"],"f160","M151.6 469.6C145.5 476.2 137 480 128 480s-17.5-3.8-23.6-10.4l-88-96c-11.9-13-11.1-33.3 2-45.2s33.3-11.1 45.2 2L96 365.7V64c0-17.7 14.3-32 32-32s32 14.3 32 32V365.7l32.4-35.4c11.9-13 32.2-13.9 45.2-2s13.9 32.2 2 45.2l-88 96zM320 480c-17.7 0-32-14.3-32-32s14.3-32 32-32h32c17.7 0 32 14.3 32 32s-14.3 32-32 32H320zm0-128c-17.7 0-32-14.3-32-32s14.3-32 32-32h96c17.7 0 32 14.3 32 32s-14.3 32-32 32H320zm0-128c-17.7 0-32-14.3-32-32s14.3-32 32-32H480c17.7 0 32 14.3 32 32s-14.3 32-32 32H320zm0-128c-17.7 0-32-14.3-32-32s14.3-32 32-32H544c17.7 0 32 14.3 32 32s-14.3 32-32 32H320z"]},dY=uY,lE={prefix:"fas",iconName:"chart-pie",icon:[576,512,["pie-chart"],"f200","M304 240V16.6c0-9 7-16.6 16-16.6C443.7 0 544 100.3 544 224c0 9-7.6 16-16.6 16H304zM32 272C32 150.7 122.1 50.3 239 34.3c9.2-1.3 17 6.1 17 15.4V288L412.5 444.5c6.7 6.7 6.2 17.7-1.5 23.1C371.8 495.6 323.8 512 272 512C139.5 512 32 404.6 32 272zm526.4 16c9.3 0 16.6 7.8 15.4 17c-7.7 55.9-34.6 105.6-73.9 142.3c-6 5.6-15.4 5.2-21.2-.7L320 288H558.4z"]},O4={prefix:"fas",iconName:"tags",icon:[512,512,[],"f02c","M345 39.1L472.8 168.4c52.4 53 52.4 138.2 0 191.2L360.8 472.9c-9.3 9.4-24.5 9.5-33.9 .2s-9.5-24.5-.2-33.9L438.6 325.9c33.9-34.3 33.9-89.4 0-123.7L310.9 72.9c-9.3-9.4-9.2-24.6 .2-33.9s24.6-9.2 33.9 .2zM0 229.5V80C0 53.5 21.5 32 48 32H197.5c17 0 33.3 6.7 45.3 18.7l168 168c25 25 25 65.5 0 90.5L277.3 442.7c-25 25-65.5 25-90.5 0l-168-168C6.7 262.7 0 246.5 0 229.5zM144 144a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"]},pP={prefix:"fas",iconName:"calendar-xmark",icon:[512,512,["calendar-times"],"f273","M160 0c17.7 0 32 14.3 32 32V64H320V32c0-17.7 14.3-32 32-32s32 14.3 32 32V64h48c26.5 0 48 21.5 48 48v48H32V112c0-26.5 21.5-48 48-48h48V32c0-17.7 14.3-32 32-32zM32 192H480V464c0 26.5-21.5 48-48 48H80c-26.5 0-48-21.5-48-48V192zM337 305c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-47 47-47-47c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l47 47-47 47c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l47-47 47 47c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-47-47 47-47z"]},fY={prefix:"fas",iconName:"trash",icon:[448,512,[],"f1f8","M135.2 17.7L128 32H32C14.3 32 0 46.3 0 64S14.3 96 32 96H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H320l-7.2-14.3C307.4 6.8 296.3 0 284.2 0H163.8c-12.1 0-23.2 6.8-28.6 17.7zM416 128H32L53.2 467c1.6 25.3 22.6 45 47.9 45H346.9c25.3 0 46.3-19.7 47.9-45L416 128z"]},C4={prefix:"fas",iconName:"arrow-left",icon:[448,512,[8592],"f060","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.2 288 416 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-306.7 0L214.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"]},hY={prefix:"fas",iconName:"up-right-from-square",icon:[512,512,["external-link-alt"],"f35d","M352 0c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9L370.7 96 201.4 265.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L416 141.3l41.4 41.4c9.2 9.2 22.9 11.9 34.9 6.9s19.8-16.6 19.8-29.6V32c0-17.7-14.3-32-32-32H352zM80 32C35.8 32 0 67.8 0 112V432c0 44.2 35.8 80 80 80H400c44.2 0 80-35.8 80-80V320c0-17.7-14.3-32-32-32s-32 14.3-32 32V432c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16V112c0-8.8 7.2-16 16-16H192c17.7 0 32-14.3 32-32s-14.3-32-32-32H80z"]},pY=hY,mY={prefix:"fas",iconName:"tag",icon:[448,512,[127991],"f02b","M0 80V229.5c0 17 6.7 33.3 18.7 45.3l176 176c25 25 65.5 25 90.5 0L418.7 317.3c25-25 25-65.5 0-90.5l-176-176c-12-12-28.3-18.7-45.3-18.7H48C21.5 32 0 53.5 0 80zm112 32a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]},gY={prefix:"fas",iconName:"circle-info",icon:[512,512,["info-circle"],"f05a","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336h24V272H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]},cE=gY,vY={prefix:"fas",iconName:"arrow-rotate-left",icon:[512,512,[8634,"arrow-left-rotate","arrow-rotate-back","arrow-rotate-backward","undo"],"f0e2","M125.7 160H176c17.7 0 32 14.3 32 32s-14.3 32-32 32H48c-17.7 0-32-14.3-32-32V64c0-17.7 14.3-32 32-32s32 14.3 32 32v51.2L97.6 97.6c87.5-87.5 229.3-87.5 316.8 0s87.5 229.3 0 316.8s-229.3 87.5-316.8 0c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0c62.5 62.5 163.8 62.5 226.3 0s62.5-163.8 0-226.3s-163.8-62.5-226.3 0L125.7 160z"]},yY=vY,_Y={prefix:"fas",iconName:"caret-down",icon:[320,512,[],"f0d7","M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z"]},bY={prefix:"fas",iconName:"ellipsis-vertical",icon:[128,512,["ellipsis-v"],"f142","M64 360a56 56 0 1 0 0 112 56 56 0 1 0 0-112zm0-160a56 56 0 1 0 0 112 56 56 0 1 0 0-112zM120 96A56 56 0 1 0 8 96a56 56 0 1 0 112 0z"]},wY=bY,xY={prefix:"fas",iconName:"house",icon:[576,512,[127968,63498,63500,"home","home-alt","home-lg-alt"],"f015","M575.8 255.5c0 18-15 32.1-32 32.1h-32l.7 160.2c0 2.7-.2 5.4-.5 8.1V472c0 22.1-17.9 40-40 40H456c-1.1 0-2.2 0-3.3-.1c-1.4 .1-2.8 .1-4.2 .1H416 392c-22.1 0-40-17.9-40-40V448 384c0-17.7-14.3-32-32-32H256c-17.7 0-32 14.3-32 32v64 24c0 22.1-17.9 40-40 40H160 128.1c-1.5 0-3-.1-4.5-.2c-1.2 .1-2.4 .2-3.6 .2H104c-22.1 0-40-17.9-40-40V360c0-.9 0-1.9 .1-2.8V287.6H32c-18 0-32-14-32-32.1c0-9 3-17 10-24L266.4 8c7-7 15-8 22-8s15 2 21 7L564.8 231.5c8 7 12 15 11 24z"]},SY=xY,EY={prefix:"fas",iconName:"arrow-up-wide-short",icon:[576,512,["sort-amount-up"],"f161","M151.6 42.4C145.5 35.8 137 32 128 32s-17.5 3.8-23.6 10.4l-88 96c-11.9 13-11.1 33.3 2 45.2s33.3 11.1 45.2-2L96 146.3V448c0 17.7 14.3 32 32 32s32-14.3 32-32V146.3l32.4 35.4c11.9 13 32.2 13.9 45.2 2s13.9-32.2 2-45.2l-88-96zM320 480h32c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32s14.3 32 32 32zm0-128h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32s14.3 32 32 32zm0-128H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32s14.3 32 32 32zm0-128H544c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32s14.3 32 32 32z"]},TY=EY,OY={prefix:"fas",iconName:"file-arrow-down",icon:[384,512,["file-download"],"f56d","M64 0C28.7 0 0 28.7 0 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V160H256c-17.7 0-32-14.3-32-32V0H64zM256 0V128H384L256 0zM216 232V334.1l31-31c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-72 72c-9.4 9.4-24.6 9.4-33.9 0l-72-72c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l31 31V232c0-13.3 10.7-24 24-24s24 10.7 24 24z"]},k4=OY,CY={prefix:"fas",iconName:"sun",icon:[512,512,[9728],"f185","M361.5 1.2c5 2.1 8.6 6.6 9.6 11.9L391 121l107.9 19.8c5.3 1 9.8 4.6 11.9 9.6s1.5 10.7-1.6 15.2L446.9 256l62.3 90.3c3.1 4.5 3.7 10.2 1.6 15.2s-6.6 8.6-11.9 9.6L391 391 371.1 498.9c-1 5.3-4.6 9.8-9.6 11.9s-10.7 1.5-15.2-1.6L256 446.9l-90.3 62.3c-4.5 3.1-10.2 3.7-15.2 1.6s-8.6-6.6-9.6-11.9L121 391 13.1 371.1c-5.3-1-9.8-4.6-11.9-9.6s-1.5-10.7 1.6-15.2L65.1 256 2.8 165.7c-3.1-4.5-3.7-10.2-1.6-15.2s6.6-8.6 11.9-9.6L121 121 140.9 13.1c1-5.3 4.6-9.8 9.6-11.9s10.7-1.5 15.2 1.6L256 65.1 346.3 2.8c4.5-3.1 10.2-3.7 15.2-1.6zM160 256a96 96 0 1 1 192 0 96 96 0 1 1 -192 0zm224 0a128 128 0 1 0 -256 0 128 128 0 1 0 256 0z"]},kY={prefix:"fas",iconName:"link",icon:[640,512,[128279,"chain"],"f0c1","M579.8 267.7c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114L422.3 334.8c-31.5 31.5-82.5 31.5-114 0c-27.9-27.9-31.5-71.8-8.6-103.8l1.1-1.6c10.3-14.4 6.9-34.4-7.4-44.6s-34.4-6.9-44.6 7.4l-1.1 1.6C206.5 251.2 213 330 263 380c56.5 56.5 148 56.5 204.5 0L579.8 267.7zM60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5L217.7 177.2c31.5-31.5 82.5-31.5 114 0c27.9 27.9 31.5 71.8 8.6 103.9l-1.1 1.6c-10.3 14.4-6.9 34.4 7.4 44.6s34.4 6.9 44.6-7.4l1.1-1.6C433.5 260.8 427 182 377 132c-56.5-56.5-148-56.5-204.5 0L60.2 244.3z"]},PY={prefix:"fas",iconName:"magnifying-glass",icon:[512,512,[128269,"search"],"f002","M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"]},LY=PY,jY={prefix:"fas",iconName:"chevron-down",icon:[512,512,[],"f078","M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"]},uE={prefix:"fas",iconName:"plus",icon:[448,512,[10133,61543,"add"],"2b","M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H48c-17.7 0-32 14.3-32 32s14.3 32 32 32H192V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H400c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z"]},MY={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]},rw=MY,AY={prefix:"fas",iconName:"chevron-right",icon:[320,512,[9002],"f054","M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"]},NY={prefix:"fas",iconName:"rotate",icon:[512,512,[128260,"sync-alt"],"f2f1","M142.9 142.9c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2s12.5 14.8 22.2 14.8H463.5c0 0 0 0 0 0H472c13.3 0 24-10.7 24-24V72c0-9.7-5.8-18.5-14.8-22.2s-19.3-1.7-26.2 5.2L413.4 96.6c-87.6-86.5-228.7-86.2-315.8 1C73.2 122 55.6 150.7 44.8 181.4c-5.9 16.7 2.9 34.9 19.5 40.8s34.9-2.9 40.8-19.5c7.7-21.8 20.2-42.3 37.8-59.8zM16 312v7.6 .7V440c0 9.7 5.8 18.5 14.8 22.2s19.3 1.7 26.2-5.2l41.6-41.6c87.6 86.5 228.7 86.2 315.8-1c24.4-24.4 42.1-53.1 52.9-83.7c5.9-16.7-2.9-34.9-19.5-40.8s-34.9 2.9-40.8 19.5c-7.7 21.8-20.2 42.3-37.8 59.8c-62.2 62.2-162.7 62.5-225.3 1L185 329c6.9-6.9 8.9-17.2 5.2-26.2s-12.5-14.8-22.2-14.8H48.4h-.7H40c-13.3 0-24 10.7-24 24z"]},RY=NY,mP={prefix:"fas",iconName:"robot",icon:[640,512,[129302],"f544","M320 0c17.7 0 32 14.3 32 32V96H472c39.8 0 72 32.2 72 72V440c0 39.8-32.2 72-72 72H168c-39.8 0-72-32.2-72-72V168c0-39.8 32.2-72 72-72H288V32c0-17.7 14.3-32 32-32zM208 384c-8.8 0-16 7.2-16 16s7.2 16 16 16h32c8.8 0 16-7.2 16-16s-7.2-16-16-16H208zm96 0c-8.8 0-16 7.2-16 16s7.2 16 16 16h32c8.8 0 16-7.2 16-16s-7.2-16-16-16H304zm96 0c-8.8 0-16 7.2-16 16s7.2 16 16 16h32c8.8 0 16-7.2 16-16s-7.2-16-16-16H400zM264 256a40 40 0 1 0 -80 0 40 40 0 1 0 80 0zm152 40a40 40 0 1 0 0-80 40 40 0 1 0 0 80zM48 224H64V416H48c-26.5 0-48-21.5-48-48V272c0-26.5 21.5-48 48-48zm544 0c26.5 0 48 21.5 48 48v96c0 26.5-21.5 48-48 48H576V224h16z"]},DY={prefix:"fas",iconName:"gears",icon:[640,512,["cogs"],"f085","M308.5 135.3c7.1-6.3 9.9-16.2 6.2-25c-2.3-5.3-4.8-10.5-7.6-15.5L304 89.4c-3-5-6.3-9.9-9.8-14.6c-5.7-7.6-15.7-10.1-24.7-7.1l-28.2 9.3c-10.7-8.8-23-16-36.2-20.9L199 27.1c-1.9-9.3-9.1-16.7-18.5-17.8C173.9 8.4 167.2 8 160.4 8h-.7c-6.8 0-13.5 .4-20.1 1.2c-9.4 1.1-16.6 8.6-18.5 17.8L115 56.1c-13.3 5-25.5 12.1-36.2 20.9L50.5 67.8c-9-3-19-.5-24.7 7.1c-3.5 4.7-6.8 9.6-9.9 14.6l-3 5.3c-2.8 5-5.3 10.2-7.6 15.6c-3.7 8.7-.9 18.6 6.2 25l22.2 19.8C32.6 161.9 32 168.9 32 176s.6 14.1 1.7 20.9L11.5 216.7c-7.1 6.3-9.9 16.2-6.2 25c2.3 5.3 4.8 10.5 7.6 15.6l3 5.2c3 5.1 6.3 9.9 9.9 14.6c5.7 7.6 15.7 10.1 24.7 7.1l28.2-9.3c10.7 8.8 23 16 36.2 20.9l6.1 29.1c1.9 9.3 9.1 16.7 18.5 17.8c6.7 .8 13.5 1.2 20.4 1.2s13.7-.4 20.4-1.2c9.4-1.1 16.6-8.6 18.5-17.8l6.1-29.1c13.3-5 25.5-12.1 36.2-20.9l28.2 9.3c9 3 19 .5 24.7-7.1c3.5-4.7 6.8-9.5 9.8-14.6l3.1-5.4c2.8-5 5.3-10.2 7.6-15.5c3.7-8.7 .9-18.6-6.2-25l-22.2-19.8c1.1-6.8 1.7-13.8 1.7-20.9s-.6-14.1-1.7-20.9l22.2-19.8zM112 176a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zM504.7 500.5c6.3 7.1 16.2 9.9 25 6.2c5.3-2.3 10.5-4.8 15.5-7.6l5.4-3.1c5-3 9.9-6.3 14.6-9.8c7.6-5.7 10.1-15.7 7.1-24.7l-9.3-28.2c8.8-10.7 16-23 20.9-36.2l29.1-6.1c9.3-1.9 16.7-9.1 17.8-18.5c.8-6.7 1.2-13.5 1.2-20.4s-.4-13.7-1.2-20.4c-1.1-9.4-8.6-16.6-17.8-18.5L583.9 307c-5-13.3-12.1-25.5-20.9-36.2l9.3-28.2c3-9 .5-19-7.1-24.7c-4.7-3.5-9.6-6.8-14.6-9.9l-5.3-3c-5-2.8-10.2-5.3-15.6-7.6c-8.7-3.7-18.6-.9-25 6.2l-19.8 22.2c-6.8-1.1-13.8-1.7-20.9-1.7s-14.1 .6-20.9 1.7l-19.8-22.2c-6.3-7.1-16.2-9.9-25-6.2c-5.3 2.3-10.5 4.8-15.6 7.6l-5.2 3c-5.1 3-9.9 6.3-14.6 9.9c-7.6 5.7-10.1 15.7-7.1 24.7l9.3 28.2c-8.8 10.7-16 23-20.9 36.2L315.1 313c-9.3 1.9-16.7 9.1-17.8 18.5c-.8 6.7-1.2 13.5-1.2 20.4s.4 13.7 1.2 20.4c1.1 9.4 8.6 16.6 17.8 18.5l29.1 6.1c5 13.3 12.1 25.5 20.9 36.2l-9.3 28.2c-3 9-.5 19 7.1 24.7c4.7 3.5 9.5 6.8 14.6 9.8l5.4 3.1c5 2.8 10.2 5.3 15.5 7.6c8.7 3.7 18.6 .9 25-6.2l19.8-22.2c6.8 1.1 13.8 1.7 20.9 1.7s14.1-.6 20.9-1.7l19.8 22.2zM464 304a48 48 0 1 1 0 96 48 48 0 1 1 0-96z"]},IY=DY,FY={prefix:"fas",iconName:"qrcode",icon:[448,512,[],"f029","M0 80C0 53.5 21.5 32 48 32h96c26.5 0 48 21.5 48 48v96c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80zM64 96v64h64V96H64zM0 336c0-26.5 21.5-48 48-48h96c26.5 0 48 21.5 48 48v96c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V336zm64 16v64h64V352H64zM304 32h96c26.5 0 48 21.5 48 48v96c0 26.5-21.5 48-48 48H304c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48zm80 64H320v64h64V96zM256 304c0-8.8 7.2-16 16-16h64c8.8 0 16 7.2 16 16s7.2 16 16 16h32c8.8 0 16-7.2 16-16s7.2-16 16-16s16 7.2 16 16v96c0 8.8-7.2 16-16 16H368c-8.8 0-16-7.2-16-16s-7.2-16-16-16s-16 7.2-16 16v64c0 8.8-7.2 16-16 16H272c-8.8 0-16-7.2-16-16V304zM368 480a16 16 0 1 1 0-32 16 16 0 1 1 0 32zm64 0a16 16 0 1 1 0-32 16 16 0 1 1 0 32z"]},$Y={prefix:"fas",iconName:"moon",icon:[384,512,[127769,9214],"f186","M223.5 32C100 32 0 132.3 0 256S100 480 223.5 480c60.6 0 115.5-24.2 155.8-63.4c5-4.9 6.3-12.5 3.1-18.7s-10.1-9.7-17-8.5c-9.8 1.7-19.8 2.6-30.1 2.6c-96.9 0-175.5-78.8-175.5-176c0-65.8 36-123.1 89.3-153.3c6.1-3.5 9.2-10.5 7.7-17.3s-7.3-11.9-14.3-12.5c-6.3-.5-12.6-.8-19-.8z"]},UY={prefix:"fas",iconName:"link-slash",icon:[640,512,["chain-broken","chain-slash","unlink"],"f127","M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L489.3 358.2l90.5-90.5c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114l-96 96-31.9-25C430.9 239.6 420.1 175.1 377 132c-52.2-52.3-134.5-56.2-191.3-11.7L38.8 5.1zM239 162c30.1-14.9 67.7-9.9 92.8 15.3c20 20 27.5 48.3 21.7 74.5L239 162zM406.6 416.4L220.9 270c-2.1 39.8 12.2 80.1 42.2 110c38.9 38.9 94.4 51 143.6 36.3zm-290-228.5L60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5l61.8-61.8-50.6-39.9z"]},BY={prefix:"fas",iconName:"desktop",icon:[576,512,[128421,61704,"desktop-alt"],"f390","M64 0C28.7 0 0 28.7 0 64V352c0 35.3 28.7 64 64 64H240l-10.7 32H160c-17.7 0-32 14.3-32 32s14.3 32 32 32H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H346.7L336 416H512c35.3 0 64-28.7 64-64V64c0-35.3-28.7-64-64-64H64zM512 64V288H64V64H512z"]},Qf={prefix:"fas",iconName:"check",icon:[448,512,[10003,10004],"f00c","M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"]};function gP(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 Ie(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1;i--){var o=n[i],a=(o.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(a)>-1&&(r=o)}return Ft.head.insertBefore(t,r),e}}var fG="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function nh(){for(var e=12,t="";e-- >0;)t+=fG[Math.random()*62|0];return t}function Bu(e){for(var t=[],n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function gE(e){return e.classList?Bu(e.classList):(e.getAttribute("class")||"").split(" ").filter(function(t){return t})}function U4(e){return"".concat(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function hG(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,'="').concat(U4(e[n]),'" ')},"").trim()}function o0(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,": ").concat(e[n].trim(),";")},"")}function vE(e){return e.size!==po.size||e.x!==po.x||e.y!==po.y||e.rotate!==po.rotate||e.flipX||e.flipY}function pG(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,") "),a="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),s="rotate(".concat(t.rotate," 0 0)"),l={transform:"".concat(o," ").concat(a," ").concat(s)},c={transform:"translate(".concat(r/2*-1," -256)")};return{outer:i,inner:l,path:c}}function mG(e){var t=e.transform,n=e.width,r=n===void 0?ow:n,i=e.height,o=i===void 0?ow:i,a=e.startCentered,s=a===void 0?!1:a,l="";return s&&A4?l+="translate(".concat(t.x/wa-r/2,"em, ").concat(t.y/wa-o/2,"em) "):s?l+="translate(calc(-50% + ".concat(t.x/wa,"em), calc(-50% + ").concat(t.y/wa,"em)) "):l+="translate(".concat(t.x/wa,"em, ").concat(t.y/wa,"em) "),l+="scale(".concat(t.size/wa*(t.flipX?-1:1),", ").concat(t.size/wa*(t.flipY?-1:1),") "),l+="rotate(".concat(t.rotate,"deg) "),l}var gG=`: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-sharp-light: normal 300 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 B4(){var e=N4,t=R4,n=Be.cssPrefix,r=Be.replacementClass,i=gG;if(n!==e||r!==t){var o=new RegExp("\\.".concat(e,"\\-"),"g"),a=new RegExp("\\--".concat(e,"\\-"),"g"),s=new RegExp("\\.".concat(t),"g");i=i.replace(o,".".concat(n,"-")).replace(a,"--".concat(n,"-")).replace(s,".".concat(r))}return i}var SP=!1;function Y_(){Be.autoAddCss&&!SP&&(dG(B4()),SP=!0)}var vG={mixout:function(){return{dom:{css:B4,insertCss:Y_}}},hooks:function(){return{beforeDOMElementCreation:function(){Y_()},beforeI2svg:function(){Y_()}}}},ea=ss||{};ea[Jo]||(ea[Jo]={});ea[Jo].styles||(ea[Jo].styles={});ea[Jo].hooks||(ea[Jo].hooks={});ea[Jo].shims||(ea[Jo].shims=[]);var Bi=ea[Jo],z4=[],yG=function e(){Ft.removeEventListener("DOMContentLoaded",e),dv=1,z4.map(function(t){return t()})},dv=!1;ua&&(dv=(Ft.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(Ft.readyState),dv||Ft.addEventListener("DOMContentLoaded",yG));function _G(e){ua&&(dv?setTimeout(e,0):z4.push(e))}function Vh(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"?U4(e):"<".concat(t," ").concat(hG(r),">").concat(o.map(Vh).join(""),"")}function EP(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}var bG=function(t,n){return function(r,i,o,a){return t.call(n,r,i,o,a)}},G_=function(t,n,r,i){var o=Object.keys(t),a=o.length,s=i!==void 0?bG(n,i):n,l,c,d;for(r===void 0?(l=1,d=t[o[0]]):(l=0,d=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 TP(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 lw(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.skipHooks,i=r===void 0?!1:r,o=TP(t);typeof Bi.hooks.addPack=="function"&&!i?Bi.hooks.addPack(e,TP(t)):Bi.styles[e]=Ie(Ie({},Bi.styles[e]||{}),o),e==="fas"&&lw("fa",t)}var dm,fm,hm,Ac=Bi.styles,SG=Bi.shims,EG=(dm={},On(dm,Nt,Object.values(eh[Nt])),On(dm,Jt,Object.values(eh[Jt])),dm),yE=null,V4={},H4={},W4={},Y4={},G4={},TG=(fm={},On(fm,Nt,Object.keys(Xf[Nt])),On(fm,Jt,Object.keys(Xf[Jt])),fm);function OG(e){return~aG.indexOf(e)}function CG(e,t){var n=t.split("-"),r=n[0],i=n.slice(1).join("-");return r===e&&i!==""&&!OG(i)?i:null}var q4=function(){var t=function(o){return G_(Ac,function(a,s,l){return a[l]=G_(s,o,{}),a},{})};V4=t(function(i,o,a){if(o[3]&&(i[o[3]]=a),o[2]){var s=o[2].filter(function(l){return typeof l=="number"});s.forEach(function(l){i[l.toString(16)]=a})}return i}),H4=t(function(i,o,a){if(i[a]=a,o[2]){var s=o[2].filter(function(l){return typeof l=="string"});s.forEach(function(l){i[l]=a})}return i}),G4=t(function(i,o,a){var s=o[2];return i[a]=a,s.forEach(function(l){i[l]=a}),i});var n="far"in Ac||Be.autoFetchSvg,r=G_(SG,function(i,o){var a=o[0],s=o[1],l=o[2];return s==="far"&&!n&&(s="fas"),typeof a=="string"&&(i.names[a]={prefix:s,iconName:l}),typeof a=="number"&&(i.unicodes[a.toString(16)]={prefix:s,iconName:l}),i},{names:{},unicodes:{}});W4=r.names,Y4=r.unicodes,yE=a0(Be.styleDefault,{family:Be.familyDefault})};uG(function(e){yE=a0(e.styleDefault,{family:Be.familyDefault})});q4();function _E(e,t){return(V4[e]||{})[t]}function kG(e,t){return(H4[e]||{})[t]}function el(e,t){return(G4[e]||{})[t]}function K4(e){return W4[e]||{prefix:null,iconName:null}}function PG(e){var t=Y4[e],n=_E("fas",e);return t||(n?{prefix:"fas",iconName:n}:null)||{prefix:null,iconName:null}}function ls(){return yE}var bE=function(){return{prefix:null,iconName:null,rest:[]}};function a0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.family,r=n===void 0?Nt:n,i=Xf[r][e],o=Jf[r][e]||Jf[r][i],a=e in Bi.styles?e:null;return o||a||null}var OP=(hm={},On(hm,Nt,Object.keys(eh[Nt])),On(hm,Jt,Object.keys(eh[Jt])),hm);function s0(e){var t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.skipLookups,i=r===void 0?!1:r,o=(t={},On(t,Nt,"".concat(Be.cssPrefix,"-").concat(Nt)),On(t,Jt,"".concat(Be.cssPrefix,"-").concat(Jt)),t),a=null,s=Nt;(e.includes(o[Nt])||e.some(function(c){return OP[Nt].includes(c)}))&&(s=Nt),(e.includes(o[Jt])||e.some(function(c){return OP[Jt].includes(c)}))&&(s=Jt);var l=e.reduce(function(c,d){var f=CG(Be.cssPrefix,d);if(Ac[d]?(d=EG[s].includes(d)?eG[s][d]:d,a=d,c.prefix=d):TG[s].indexOf(d)>-1?(a=d,c.prefix=a0(d,{family:s})):f?c.iconName=f:d!==Be.replacementClass&&d!==o[Nt]&&d!==o[Jt]&&c.rest.push(d),!i&&c.prefix&&c.iconName){var p=a==="fa"?K4(c.iconName):{},m=el(c.prefix,c.iconName);p.prefix&&(a=null),c.iconName=p.iconName||m||c.iconName,c.prefix=p.prefix||c.prefix,c.prefix==="far"&&!Ac.far&&Ac.fas&&!Be.autoFetchSvg&&(c.prefix="fas")}return c},bE());return(e.includes("fa-brands")||e.includes("fab"))&&(l.prefix="fab"),(e.includes("fa-duotone")||e.includes("fad"))&&(l.prefix="fad"),!l.prefix&&s===Jt&&(Ac.fass||Be.autoFetchSvg)&&(l.prefix="fass",l.iconName=el(l.prefix,l.iconName)||l.iconName),(l.prefix==="fa"||a==="fa")&&(l.prefix=ls()||"fas"),l}var LG=function(){function e(){zY(this,e),this.definitions={}}return VY(e,[{key:"add",value:function(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o0&&d.forEach(function(f){typeof f=="string"&&(n[s][f]=c)}),n[s][l]=c}),n}}]),e}(),CP=[],Nc={},qc={},jG=Object.keys(qc);function MG(e,t){var n=t.mixoutsTo;return CP=e,Nc={},Object.keys(qc).forEach(function(r){jG.indexOf(r)===-1&&delete qc[r]}),CP.forEach(function(r){var i=r.mixout?r.mixout():{};if(Object.keys(i).forEach(function(a){typeof i[a]=="function"&&(n[a]=i[a]),uv(i[a])==="object"&&Object.keys(i[a]).forEach(function(s){n[a]||(n[a]={}),n[a][s]=i[a][s]})}),r.hooks){var o=r.hooks();Object.keys(o).forEach(function(a){Nc[a]||(Nc[a]=[]),Nc[a].push(o[a])})}r.provides&&r.provides(qc)}),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 ua?(wl("beforeI2svg",t),ta("pseudoElements2svg",t),ta("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;Be.autoReplaceSvg===!1&&(Be.autoReplaceSvg=!0),Be.observeMutations=!0,_G(function(){DG({autoReplaceSvgRoot:n}),wl("watch",t)})}},RG={icon:function(t){if(t===null)return null;if(uv(t)==="object"&&t.prefix&&t.iconName)return{prefix:t.prefix,iconName:el(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=a0(t[0]);return{prefix:r,iconName:el(r,n)||n}}if(typeof t=="string"&&(t.indexOf("".concat(Be.cssPrefix,"-"))>-1||t.match(tG))){var i=s0(t.split(" "),{skipLookups:!0});return{prefix:i.prefix||ls(),iconName:el(i.prefix,i.iconName)||i.iconName}}if(typeof t=="string"){var o=ls();return{prefix:o,iconName:el(o,t)||t}}}},oi={noAuto:AG,config:Be,dom:NG,parse:RG,library:Z4,findIconDefinition:uw,toHtml:Vh},DG=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot,r=n===void 0?Ft:n;(Object.keys(Bi.styles).length>0||Be.autoFetchSvg)&&ua&&Be.autoReplaceSvg&&oi.dom.i2svg({node:r})};function l0(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(function(r){return Vh(r)})}}),Object.defineProperty(e,"node",{get:function(){if(ua){var r=Ft.createElement("div");return r.innerHTML=e.html,r.children}}}),e}function IG(e){var t=e.children,n=e.main,r=e.mask,i=e.attributes,o=e.styles,a=e.transform;if(vE(a)&&n.found&&!r.found){var s=n.width,l=n.height,c={x:s/l/2,y:.5};i.style=o0(Ie(Ie({},o),{},{"transform-origin":"".concat(c.x+a.x/16,"em ").concat(c.y+a.y/16,"em")}))}return[{tag:"svg",attributes:i,children:t}]}function FG(e){var t=e.prefix,n=e.iconName,r=e.children,i=e.attributes,o=e.symbol,a=o===!0?"".concat(t,"-").concat(Be.cssPrefix,"-").concat(n):o;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:Ie(Ie({},i),{},{id:a}),children:r}]}]}function wE(e){var t=e.icons,n=t.main,r=t.mask,i=e.prefix,o=e.iconName,a=e.transform,s=e.symbol,l=e.title,c=e.maskId,d=e.titleId,f=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=[Be.replacementClass,o?"".concat(Be.cssPrefix,"-").concat(o):""].filter(function(U){return f.classes.indexOf(U)===-1}).filter(function(U){return U!==""||!!U}).concat(f.classes).join(" "),S={children:[],attributes:Ie(Ie({},f.attributes),{},{"data-prefix":i,"data-icon":o,class:w,role:f.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(y," ").concat(x)})},E=_&&!~f.classes.indexOf("fa-fw")?{width:"".concat(y/x*16*.0625,"em")}:{};m&&(S.attributes[bl]=""),l&&(S.children.push({tag:"title",attributes:{id:S.attributes["aria-labelledby"]||"title-".concat(d||nh())},children:[l]}),delete S.attributes.title);var C=Ie(Ie({},S),{},{prefix:i,iconName:o,main:n,mask:r,maskId:c,transform:a,symbol:s,styles:Ie(Ie({},E),f.styles)}),k=r.found&&n.found?ta("generateAbstractMask",C)||{children:[],attributes:{}}:ta("generateAbstractIcon",C)||{children:[],attributes:{}},j=k.children,N=k.attributes;return C.children=j,C.attributes=N,s?FG(C):IG(C)}function kP(e){var t=e.content,n=e.width,r=e.height,i=e.transform,o=e.title,a=e.extra,s=e.watchable,l=s===void 0?!1:s,c=Ie(Ie(Ie({},a.attributes),o?{title:o}:{}),{},{class:a.classes.join(" ")});l&&(c[bl]="");var d=Ie({},a.styles);vE(i)&&(d.transform=mG({transform:i,startCentered:!0,width:n,height:r}),d["-webkit-transform"]=d.transform);var f=o0(d);f.length>0&&(c.style=f);var p=[];return p.push({tag:"span",attributes:c,children:[t]}),o&&p.push({tag:"span",attributes:{class:"sr-only"},children:[o]}),p}function $G(e){var t=e.content,n=e.title,r=e.extra,i=Ie(Ie(Ie({},r.attributes),n?{title:n}:{}),{},{class:r.classes.join(" ")}),o=o0(r.styles);o.length>0&&(i.style=o);var a=[];return a.push({tag:"span",attributes:i,children:[t]}),n&&a.push({tag:"span",attributes:{class:"sr-only"},children:[n]}),a}var q_=Bi.styles;function dw(e){var t=e[0],n=e[1],r=e.slice(4),i=dE(r,1),o=i[0],a=null;return Array.isArray(o)?a={tag:"g",attributes:{class:"".concat(Be.cssPrefix,"-").concat(Js.GROUP)},children:[{tag:"path",attributes:{class:"".concat(Be.cssPrefix,"-").concat(Js.SECONDARY),fill:"currentColor",d:o[0]}},{tag:"path",attributes:{class:"".concat(Be.cssPrefix,"-").concat(Js.PRIMARY),fill:"currentColor",d:o[1]}}]}:a={tag:"path",attributes:{fill:"currentColor",d:o}},{found:!0,width:t,height:n,icon:a}}var UG={found:!1,width:512,height:512};function BG(e,t){!D4&&!Be.showMissingIcons&&e&&console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}function fw(e,t){var n=t;return t==="fa"&&Be.styleDefault!==null&&(t=ls()),new Promise(function(r,i){if(ta("missingIconAbstract"),n==="fa"){var o=K4(e)||{};e=o.iconName||e,t=o.prefix||t}if(e&&t&&q_[t]&&q_[t][e]){var a=q_[t][e];return r(dw(a))}BG(e,t),r(Ie(Ie({},UG),{},{icon:Be.showMissingIcons&&e?ta("missingIconAbstract")||{}:{}}))})}var PP=function(){},hw=Be.measurePerformance&&om&&om.mark&&om.measure?om:{mark:PP,measure:PP},Fd='FA "6.4.2"',zG=function(t){return hw.mark("".concat(Fd," ").concat(t," begins")),function(){return Q4(t)}},Q4=function(t){hw.mark("".concat(Fd," ").concat(t," ends")),hw.measure("".concat(Fd," ").concat(t),"".concat(Fd," ").concat(t," begins"),"".concat(Fd," ").concat(t," ends"))},xE={begin:zG,end:Q4},lg=function(){};function LP(e){var t=e.getAttribute?e.getAttribute(bl):null;return typeof t=="string"}function VG(e){var t=e.getAttribute?e.getAttribute(hE):null,n=e.getAttribute?e.getAttribute(pE):null;return t&&n}function HG(e){return e&&e.classList&&e.classList.contains&&e.classList.contains(Be.replacementClass)}function WG(){if(Be.autoReplaceSvg===!0)return cg.replace;var e=cg[Be.autoReplaceSvg];return e||cg.replace}function YG(e){return Ft.createElementNS("http://www.w3.org/2000/svg",e)}function GG(e){return Ft.createElement(e)}function X4(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.ceFn,r=n===void 0?e.tag==="svg"?YG:GG:n;if(typeof e=="string")return Ft.createTextNode(e);var i=r(e.tag);Object.keys(e.attributes||[]).forEach(function(a){i.setAttribute(a,e.attributes[a])});var o=e.children||[];return o.forEach(function(a){i.appendChild(X4(a,{ceFn:r}))}),i}function qG(e){var t=" ".concat(e.outerHTML," ");return t="".concat(t,"Font Awesome fontawesome.com "),t}var cg={replace:function(t){var n=t[0];if(n.parentNode)if(t[1].forEach(function(i){n.parentNode.insertBefore(X4(i),n)}),n.getAttribute(bl)===null&&Be.keepOriginalSource){var r=Ft.createComment(qG(n));n.parentNode.replaceChild(r,n)}else n.remove()},nest:function(t){var n=t[0],r=t[1];if(~gE(n).indexOf(Be.replacementClass))return cg.replace(t);var i=new RegExp("".concat(Be.cssPrefix,"-.*"));if(delete r[0].attributes.id,r[0].attributes.class){var o=r[0].attributes.class.split(" ").reduce(function(s,l){return l===Be.replacementClass||l.match(i)?s.toSvg.push(l):s.toNode.push(l),s},{toNode:[],toSvg:[]});r[0].attributes.class=o.toSvg.join(" "),o.toNode.length===0?n.removeAttribute("class"):n.setAttribute("class",o.toNode.join(" "))}var a=r.map(function(s){return Vh(s)}).join(` +`);n.setAttribute(bl,""),n.innerHTML=a}};function jP(e){e()}function J4(e,t){var n=typeof t=="function"?t:lg;if(e.length===0)n();else{var r=jP;Be.mutateApproach===XY&&(r=ss.requestAnimationFrame||jP),r(function(){var i=WG(),o=xE.begin("mutate");e.map(i),o(),n()})}}var SE=!1;function eI(){SE=!0}function pw(){SE=!1}var fv=null;function MP(e){if(wP&&Be.observeMutations){var t=e.treeCallback,n=t===void 0?lg:t,r=e.nodeCallback,i=r===void 0?lg:r,o=e.pseudoElementsCallback,a=o===void 0?lg:o,s=e.observeMutationsRoot,l=s===void 0?Ft:s;fv=new wP(function(c){if(!SE){var d=ls();Bu(c).forEach(function(f){if(f.type==="childList"&&f.addedNodes.length>0&&!LP(f.addedNodes[0])&&(Be.searchPseudoElements&&a(f.target),n(f.target)),f.type==="attributes"&&f.target.parentNode&&Be.searchPseudoElements&&a(f.target.parentNode),f.type==="attributes"&&LP(f.target)&&~oG.indexOf(f.attributeName))if(f.attributeName==="class"&&VG(f.target)){var p=s0(gE(f.target)),m=p.prefix,v=p.iconName;f.target.setAttribute(hE,m||d),v&&f.target.setAttribute(pE,v)}else HG(f.target)&&i(f.target)})}}),ua&&fv.observe(l,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function KG(){fv&&fv.disconnect()}function ZG(e){var t=e.getAttribute("style"),n=[];return t&&(n=t.split(";").reduce(function(r,i){var o=i.split(":"),a=o[0],s=o.slice(1);return a&&s.length>0&&(r[a]=s.join(":").trim()),r},{})),n}function QG(e){var t=e.getAttribute("data-prefix"),n=e.getAttribute("data-icon"),r=e.innerText!==void 0?e.innerText.trim():"",i=s0(gE(e));return i.prefix||(i.prefix=ls()),t&&n&&(i.prefix=t,i.iconName=n),i.iconName&&i.prefix||(i.prefix&&r.length>0&&(i.iconName=kG(i.prefix,e.innerText)||_E(i.prefix,sw(e.innerText))),!i.iconName&&Be.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(i.iconName=e.firstChild.data)),i}function XG(e){var t=Bu(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 Be.autoA11y&&(n?t["aria-labelledby"]="".concat(Be.replacementClass,"-title-").concat(r||nh()):(t["aria-hidden"]="true",t.focusable="false")),t}function JG(){return{iconName:null,title:null,titleId:null,prefix:null,transform:po,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function AP(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0},n=QG(e),r=n.iconName,i=n.prefix,o=n.rest,a=XG(e),s=cw("parseNodeAttributes",{},e),l=t.styleParser?ZG(e):[];return Ie({iconName:r,title:e.getAttribute("title"),titleId:e.getAttribute("data-fa-title-id"),prefix:i,transform:po,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:o,styles:l,attributes:a}},s)}var eq=Bi.styles;function tI(e){var t=Be.autoReplaceSvg==="nest"?AP(e,{styleParser:!1}):AP(e);return~t.extra.classes.indexOf(I4)?ta("generateLayersText",e,t):ta("generateSvgReplacementMutation",e,t)}var cs=new Set;mE.map(function(e){cs.add("fa-".concat(e))});Object.keys(Xf[Nt]).map(cs.add.bind(cs));Object.keys(Xf[Jt]).map(cs.add.bind(cs));cs=Bh(cs);function NP(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!ua)return Promise.resolve();var n=Ft.documentElement.classList,r=function(f){return n.add("".concat(xP,"-").concat(f))},i=function(f){return n.remove("".concat(xP,"-").concat(f))},o=Be.autoFetchSvg?cs:mE.map(function(d){return"fa-".concat(d)}).concat(Object.keys(eq));o.includes("fa")||o.push("fa");var a=[".".concat(I4,":not([").concat(bl,"])")].concat(o.map(function(d){return".".concat(d,":not([").concat(bl,"])")})).join(", ");if(a.length===0)return Promise.resolve();var s=[];try{s=Bu(e.querySelectorAll(a))}catch{}if(s.length>0)r("pending"),i("complete");else return Promise.resolve();var l=xE.begin("onTree"),c=s.reduce(function(d,f){try{var p=tI(f);p&&d.push(p)}catch(m){D4||m.name==="MissingIcon"&&console.error(m)}return d},[]);return new Promise(function(d,f){Promise.all(c).then(function(p){J4(p,function(){r("active"),r("complete"),i("pending"),typeof t=="function"&&t(),l(),d()})}).catch(function(p){l(),f(p)})})}function tq(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;tI(e).then(function(n){n&&J4([n],t)})}function nq(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=(t||{}).icon?t:uw(t||{}),i=n.mask;return i&&(i=(i||{}).icon?i:uw(i||{})),e(r,Ie(Ie({},n),{},{mask:i}))}}var rq=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.transform,i=r===void 0?po:r,o=n.symbol,a=o===void 0?!1:o,s=n.mask,l=s===void 0?null:s,c=n.maskId,d=c===void 0?null:c,f=n.title,p=f===void 0?null:f,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,E=S===void 0?{}:S;if(t){var C=t.prefix,k=t.iconName,j=t.icon;return l0(Ie({type:"icon"},t),function(){return wl("beforeDOMElementCreation",{iconDefinition:t,params:n}),Be.autoA11y&&(p?w["aria-labelledby"]="".concat(Be.replacementClass,"-title-").concat(v||nh()):(w["aria-hidden"]="true",w.focusable="false")),wE({icons:{main:dw(j),mask:l?dw(l.icon):{found:!1,width:null,height:null,icon:{}}},prefix:C,iconName:k,transform:Ie(Ie({},po),i),symbol:a,title:p,maskId:d,titleId:v,extra:{attributes:w,styles:E,classes:x}})})}},iq={mixout:function(){return{icon:nq(rq)}},hooks:function(){return{mutationObserverCallbacks:function(n){return n.treeCallback=NP,n.nodeCallback=tq,n}}},provides:function(t){t.i2svg=function(n){var r=n.node,i=r===void 0?Ft:r,o=n.callback,a=o===void 0?function(){}:o;return NP(i,a)},t.generateSvgReplacementMutation=function(n,r){var i=r.iconName,o=r.title,a=r.titleId,s=r.prefix,l=r.transform,c=r.symbol,d=r.mask,f=r.maskId,p=r.extra;return new Promise(function(m,v){Promise.all([fw(i,s),d.iconName?fw(d.iconName,d.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(y){var x=dE(y,2),_=x[0],w=x[1];m([n,wE({icons:{main:_,mask:w},prefix:s,iconName:i,transform:l,symbol:c,maskId:f,title:o,titleId:a,extra:p,watchable:!0})])}).catch(v)})},t.generateAbstractIcon=function(n){var r=n.children,i=n.attributes,o=n.main,a=n.transform,s=n.styles,l=o0(s);l.length>0&&(i.style=l);var c;return vE(a)&&(c=ta("generateAbstractTransformGrouping",{main:o,transform:a,containerWidth:o.width,iconWidth:o.width})),r.push(c||o.icon),{children:r,attributes:i}}}},oq={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 l0({type:"layer"},function(){wl("beforeDOMElementCreation",{assembler:n,params:r});var a=[];return n(function(s){Array.isArray(s)?s.map(function(l){a=a.concat(l.abstract)}):a=a.concat(s.abstract)}),[{tag:"span",attributes:{class:["".concat(Be.cssPrefix,"-layers")].concat(Bh(o)).join(" ")},children:a}]})}}}},aq={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,a=r.classes,s=a===void 0?[]:a,l=r.attributes,c=l===void 0?{}:l,d=r.styles,f=d===void 0?{}:d;return l0({type:"counter",content:n},function(){return wl("beforeDOMElementCreation",{content:n,params:r}),$G({content:n.toString(),title:o,extra:{attributes:c,styles:f,classes:["".concat(Be.cssPrefix,"-layers-counter")].concat(Bh(s))}})})}}}},sq={mixout:function(){return{text:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.transform,o=i===void 0?po:i,a=r.title,s=a===void 0?null:a,l=r.classes,c=l===void 0?[]:l,d=r.attributes,f=d===void 0?{}:d,p=r.styles,m=p===void 0?{}:p;return l0({type:"text",content:n},function(){return wl("beforeDOMElementCreation",{content:n,params:r}),kP({content:n,transform:Ie(Ie({},po),o),title:s,extra:{attributes:f,styles:m,classes:["".concat(Be.cssPrefix,"-layers-text")].concat(Bh(c))}})})}}},provides:function(t){t.generateLayersText=function(n,r){var i=r.title,o=r.transform,a=r.extra,s=null,l=null;if(A4){var c=parseInt(getComputedStyle(n).fontSize,10),d=n.getBoundingClientRect();s=d.width/c,l=d.height/c}return Be.autoA11y&&!i&&(a.attributes["aria-hidden"]="true"),Promise.resolve([n,kP({content:n.innerHTML,width:s,height:l,transform:o,title:i,extra:a,watchable:!0})])}}},lq=new RegExp('"',"ug"),RP=[1105920,1112319];function cq(e){var t=e.replace(lq,""),n=xG(t,0),r=n>=RP[0]&&n<=RP[1],i=t.length===2?t[0]===t[1]:!1;return{value:sw(i?t[0]:t),isSecondary:r||i}}function DP(e,t){var n="".concat(QY).concat(t.replace(":","-"));return new Promise(function(r,i){if(e.getAttribute(n)!==null)return r();var o=Bu(e.children),a=o.filter(function(j){return j.getAttribute(aw)===t})[0],s=ss.getComputedStyle(e,t),l=s.getPropertyValue("font-family").match(nG),c=s.getPropertyValue("font-weight"),d=s.getPropertyValue("content");if(a&&!l)return e.removeChild(a),r();if(l&&d!=="none"&&d!==""){var f=s.getPropertyValue("content"),p=~["Sharp"].indexOf(l[2])?Jt:Nt,m=~["Solid","Regular","Light","Thin","Duotone","Brands","Kit"].indexOf(l[2])?Jf[p][l[2].toLowerCase()]:rG[p][c],v=cq(f),y=v.value,x=v.isSecondary,_=l[0].startsWith("FontAwesome"),w=_E(m,y),S=w;if(_){var E=PG(y);E.iconName&&E.prefix&&(w=E.iconName,m=E.prefix)}if(w&&!x&&(!a||a.getAttribute(hE)!==m||a.getAttribute(pE)!==S)){e.setAttribute(n,S),a&&e.removeChild(a);var C=JG(),k=C.extra;k.attributes[aw]=t,fw(w,m).then(function(j){var N=wE(Ie(Ie({},C),{},{icons:{main:j,mask:bE()},prefix:m,iconName:S,extra:k,watchable:!0})),U=Ft.createElementNS("http://www.w3.org/2000/svg","svg");t==="::before"?e.insertBefore(U,e.firstChild):e.appendChild(U),U.outerHTML=N.map(function(R){return Vh(R)}).join(` +`),e.removeAttribute(n),r()}).catch(i)}else r()}else r()})}function uq(e){return Promise.all([DP(e,"::before"),DP(e,"::after")])}function dq(e){return e.parentNode!==document.head&&!~JY.indexOf(e.tagName.toUpperCase())&&!e.getAttribute(aw)&&(!e.parentNode||e.parentNode.tagName!=="svg")}function IP(e){if(ua)return new Promise(function(t,n){var r=Bu(e.querySelectorAll("*")).filter(dq).map(uq),i=xE.begin("searchPseudoElements");eI(),Promise.all(r).then(function(){i(),pw(),t()}).catch(function(){i(),pw(),n()})})}var fq={hooks:function(){return{mutationObserverCallbacks:function(n){return n.pseudoElementsCallback=IP,n}}},provides:function(t){t.pseudoElements2svg=function(n){var r=n.node,i=r===void 0?Ft:r;Be.searchPseudoElements&&IP(i)}}},FP=!1,hq={mixout:function(){return{dom:{unwatch:function(){eI(),FP=!0}}}},hooks:function(){return{bootstrap:function(){MP(cw("mutationObserverCallbacks",{}))},noAuto:function(){KG()},watch:function(n){var r=n.observeMutationsRoot;FP?pw():MP(cw("mutationObserverCallbacks",{observeMutationsRoot:r}))}}}},$P=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("-"),a=o[0],s=o.slice(1).join("-");if(a&&s==="h")return r.flipX=!0,r;if(a&&s==="v")return r.flipY=!0,r;if(s=parseFloat(s),isNaN(s))return r;switch(a){case"grow":r.size=r.size+s;break;case"shrink":r.size=r.size-s;break;case"left":r.x=r.x-s;break;case"right":r.x=r.x+s;break;case"up":r.y=r.y-s;break;case"down":r.y=r.y+s;break;case"rotate":r.rotate=r.rotate+s;break}return r},n)},pq={mixout:function(){return{parse:{transform:function(n){return $P(n)}}}},hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-transform");return i&&(n.transform=$P(i)),n}}},provides:function(t){t.generateAbstractTransformGrouping=function(n){var r=n.main,i=n.transform,o=n.containerWidth,a=n.iconWidth,s={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),") "),d="rotate(".concat(i.rotate," 0 0)"),f={transform:"".concat(l," ").concat(c," ").concat(d)},p={transform:"translate(".concat(a/2*-1," -256)")},m={outer:s,inner:f,path:p};return{tag:"g",attributes:Ie({},m.outer),children:[{tag:"g",attributes:Ie({},m.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:Ie(Ie({},r.icon.attributes),m.path)}]}]}}}},K_={x:0,y:0,width:"100%",height:"100%"};function UP(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 mq(e){return e.tag==="g"?e.children:[e]}var gq={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-mask"),o=i?s0(i.split(" ").map(function(a){return a.trim()})):bE();return o.prefix||(o.prefix=ls()),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,a=n.mask,s=n.maskId,l=n.transform,c=o.width,d=o.icon,f=a.width,p=a.icon,m=pG({transform:l,containerWidth:f,iconWidth:c}),v={tag:"rect",attributes:Ie(Ie({},K_),{},{fill:"white"})},y=d.children?{children:d.children.map(UP)}:{},x={tag:"g",attributes:Ie({},m.inner),children:[UP(Ie({tag:d.tag,attributes:Ie(Ie({},d.attributes),m.path)},y))]},_={tag:"g",attributes:Ie({},m.outer),children:[x]},w="mask-".concat(s||nh()),S="clip-".concat(s||nh()),E={tag:"mask",attributes:Ie(Ie({},K_),{},{id:w,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[v,_]},C={tag:"defs",children:[{tag:"clipPath",attributes:{id:S},children:mq(p)},E]};return r.push(C,{tag:"rect",attributes:Ie({fill:"currentColor","clip-path":"url(#".concat(S,")"),mask:"url(#".concat(w,")")},K_)}),{children:r,attributes:i}}}},vq={provides:function(t){var n=!1;ss.matchMedia&&(n=ss.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:Ie(Ie({},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 a=Ie(Ie({},o),{},{attributeName:"opacity"}),s={tag:"circle",attributes:Ie(Ie({},i),{},{cx:"256",cy:"364",r:"28"}),children:[]};return n||s.children.push({tag:"animate",attributes:Ie(Ie({},o),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:Ie(Ie({},a),{},{values:"1;0;1;1;0;1;"})}),r.push(s),r.push({tag:"path",attributes:Ie(Ie({},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:Ie(Ie({},a),{},{values:"1;0;0;0;0;1;"})}]}),n||r.push({tag:"path",attributes:Ie(Ie({},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:Ie(Ie({},a),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:r}}}},yq={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}}}},_q=[vG,iq,oq,aq,sq,fq,hq,pq,gq,vq,yq];MG(_q,{mixoutsTo:oi});oi.noAuto;oi.config;oi.library;oi.dom;var mw=oi.parse;oi.findIconDefinition;oi.toHtml;var bq=oi.icon;oi.layer;oi.text;oi.counter;var nI={exports:{}},wq="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",xq=wq,Sq=xq;function rI(){}function iI(){}iI.resetWarningCache=rI;var Eq=function(){function e(r,i,o,a,s,l){if(l!==Sq){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:iI,resetWarningCache:rI};return n.PropTypes=n,n};nI.exports=Eq();var Tq=nI.exports;const A=sa(Tq);function BP(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 Ia(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function Cq(e,t){if(e==null)return{};var n=Oq(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 gw(e){return kq(e)||Pq(e)||Lq(e)||jq()}function kq(e){if(Array.isArray(e))return vw(e)}function Pq(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Lq(e,t){if(e){if(typeof e=="string")return vw(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 vw(e,t)}}function vw(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 aI(e,l)}),i=Object.keys(t.attributes||{}).reduce(function(l,c){var d=t.attributes[c];switch(c){case"class":l.attrs.className=d,delete t.attributes.class;break;case"style":l.attrs.style=Dq(d);break;default:c.indexOf("aria-")===0||c.indexOf("data-")===0?l.attrs[c.toLowerCase()]=d:l.attrs[oI(c)]=d}return l},{attrs:{}}),o=n.style,a=o===void 0?{}:o,s=Cq(n,Nq);return i.attrs.style=Ia(Ia({},i.attrs.style),a),e.apply(void 0,[t.tag,Ia(Ia({},i.attrs),s)].concat(gw(r)))}var sI=!1;try{sI=!0}catch{}function Iq(){if(!sI&&console&&typeof console.error=="function"){var e;(e=console).error.apply(e,arguments)}}function zP(e){if(e&&hv(e)==="object"&&e.prefix&&e.iconName&&e.icon)return e;if(mw.icon)return mw.icon(e);if(e===null)return null;if(e&&hv(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 Z_(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?Rc({},e,t):{}}var De=W.forwardRef(function(e,t){var n=e.icon,r=e.mask,i=e.symbol,o=e.className,a=e.title,s=e.titleId,l=e.maskId,c=zP(n),d=Z_("classes",[].concat(gw(Mq(e)),gw(o.split(" ")))),f=Z_("transform",typeof e.transform=="string"?mw.transform(e.transform):e.transform),p=Z_("mask",zP(r)),m=bq(c,Ia(Ia(Ia(Ia({},d),f),p),{},{symbol:i,title:a,titleId:s,maskId:l}));if(!m)return Iq("Could not find icon",c),null;var v=m.abstract,y={ref:t};return Object.keys(e).forEach(function(x){De.defaultProps.hasOwnProperty(x)||(y[x]=e[x])}),Fq(v[0],y)});De.displayName="FontAwesomeIcon";De.propTypes={beat:A.bool,border:A.bool,beatFade:A.bool,bounce:A.bool,className:A.string,fade:A.bool,flash:A.bool,mask:A.oneOfType([A.object,A.array,A.string]),maskId:A.string,fixedWidth:A.bool,inverse:A.bool,flip:A.oneOf([!0,!1,"horizontal","vertical","both"]),icon:A.oneOfType([A.object,A.array,A.string]),listItem:A.bool,pull:A.oneOf(["right","left"]),pulse:A.bool,rotation:A.oneOf([0,90,180,270]),shake:A.bool,size:A.oneOf(["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:A.bool,spinPulse:A.bool,spinReverse:A.bool,symbol:A.oneOfType([A.bool,A.string]),title:A.string,titleId:A.string,transform:A.oneOfType([A.string,A.object]),swapOpacity:A.bool};De.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 Fq=aI.bind(null,W.createElement),lI={exports:{}};/*! + 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;i0?"".concat(e,"px"):null}function Bq(){return document.body.clientWidth0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Hq;return t?e.split(" ").map(function(n){return t[n]||n}).join(" "):e}function _s(e,t){var n={};return Object.keys(e).forEach(function(r){t.indexOf(r)===-1&&(n[r]=e[r])}),n}function uI(e,t){for(var n=Array.isArray(t)?t:[t],r=n.length,i,o={};r>0;)r-=1,i=n[r],o[i]=e[i];return o}var VP={};function yw(e){VP[e]||(typeof console<"u"&&console.error(e),VP[e]=!0)}function dI(e,t){return function(r,i,o){r[i]!==null&&typeof r[i]<"u"&&yw('"'.concat(i,'" property of "').concat(o,`" has been deprecated. +`).concat(t));for(var a=arguments.length,s=new Array(a>3?a-3:0),l=3;l"u"?"undefined":cu(window))==="object"&&window.Element||function(){};function EE(e,t,n){if(!(e[t]instanceof Wq))return new Error("Invalid prop `"+t+"` supplied to `"+n+"`. Expected prop to be an instance of Element. Validation failed.")}var uu=A.oneOfType([A.string,A.func,EE,A.shape({current:A.any})]),it=A.oneOfType([A.func,A.string,A.shape({$$typeof:A.symbol,render:A.func}),A.arrayOf(A.oneOfType([A.func,A.string,A.shape({$$typeof:A.symbol,render:A.func})]))]),pv={Fade:150,Collapse:350,Modal:300,Carousel:600,Offcanvas:300},mv=["in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","onEnter","onEntering","onEntered","onExit","onExiting","onExited"],pm={ENTERING:"entering",ENTERED:"entered",EXITING:"exiting",EXITED:"exited"},bt={esc:27,space:32,enter:13,tab:9,up:38,down:40,home:36,end:35,n:78,p:80},Yq=["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"],TE=!!(typeof window<"u"&&window.document&&window.document.createElement);function Gq(e){return e&&cu(e)==="object"?"current"in e:!1}function fI(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}function _w(e){var t=cu(e);return e!=null&&(t==="object"||t==="function")}function HP(e){var t=cu(e),n=0/0;if(t==="number")return e;if(t==="symbol"||t==="object"&&fI(e)==="[object Symbol]")return n;if(_w(e)){var r=typeof e.valueOf=="function"?e.valueOf():e;e=_w(r)?"".concat(r):r}if(t!=="string")return e===0?e:+e;e=e.replace(/^\s+|\s+$/g,"");var i=/^0b[01]+$/i.test(e);return i||/^0o[0-7]+$/i.test(e)?parseInt(e.slice(2),i?2:8):/^[-+]0x[0-9a-f]+$/i.test(e)?n:+e}function qq(e){if(!_w(e))return!1;var t=fI(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object Proxy]"}function Kq(e){if(Gq(e))return e.current;if(qq(e))return e();if(typeof e=="string"&&TE){var t=document.querySelectorAll(e);if(t.length||(t=document.querySelectorAll("#".concat(e))),!t.length)throw new Error("The target '".concat(e,"' could not be identified in the dom, tip: check spelling"));return t}return e}function WP(e){return e===null?!1:Array.isArray(e)||TE&&typeof e.length=="number"}function rh(e,t){var n=Kq(e);return t?WP(n)?n:n===null?[]:[n]:WP(n)?n[0]:n}var Zq=["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"])'],Qq=["className","cssModule","noGutters","tag","widths"];function bw(){return bw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Jq(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}var eK=["xs","sm","md","lg","xl","xxl"],ic=A.oneOfType([A.number,A.string]),tK={tag:it,noGutters:dI(A.bool,"Please use Bootstrap 5 gutter utility classes. https://getbootstrap.com/docs/5.0/layout/gutters/"),className:A.string,cssModule:A.object,xs:ic,sm:ic,md:ic,lg:ic,xl:ic,xxl:ic,widths:A.array};function br(e){var t=e.className,n=e.cssModule,r=e.noGutters,i=e.tag,o=i===void 0?"div":i,a=e.widths,s=a===void 0?eK:a,l=Xq(e,Qq),c=[];s.forEach(function(f,p){var m=e[f];if(delete l[f],!!m){var v=!p;c.push(v?"row-cols-".concat(m):"row-cols-".concat(f,"-").concat(m))}});var d=He(Ve(t,r?"gx-0":null,"row",c),n);return W.createElement(o,bw({},l,{className:d}))}br.propTypes=tK;var nK=["expand","className","cssModule","light","dark","fixed","sticky","color","container","tag","children"];function ww(){return ww=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function iK(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}var oK={children:A.node,className:A.string,color:A.string,container:A.oneOfType([A.bool,A.string]),cssModule:A.object,dark:A.bool,expand:A.oneOfType([A.bool,A.string]),fixed:A.string,light:A.bool,role:A.string,sticky:A.string,tag:it},aK=function(t){return t===!1?!1:t===!0||t==="xs"?"navbar-expand":"navbar-expand-".concat(t)};function hI(e){var t,n=e.expand,r=n===void 0?!1:n,i=e.className,o=e.cssModule,a=e.light,s=e.dark,l=e.fixed,c=e.sticky,d=e.color,f=e.container,p=f===void 0?"fluid":f,m=e.tag,v=m===void 0?"nav":m,y=e.children,x=rK(e,nK),_=He(Ve(i,"navbar",aK(r),(t={"navbar-light":a,"navbar-dark":s},Q_(t,"bg-".concat(d),d),Q_(t,"fixed-".concat(l),l),Q_(t,"sticky-".concat(c),c),t)),o),w=p&&p===!0?"container":"container-".concat(p);return W.createElement(v,ww({},x,{className:_}),p?W.createElement("div",{className:w},y):y)}hI.propTypes=oK;var sK=["className","cssModule","tag"];function xw(){return xw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function cK(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}var uK={className:A.string,cssModule:A.object,tag:it};function pI(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"a":r,o=lK(e,sK),a=He(Ve(t,"navbar-brand"),n);return W.createElement(i,xw({},o,{className:a}))}pI.propTypes=uK;var dK=["className","cssModule","children","tag"];function Sw(){return Sw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function mK(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}var gK={className:A.string,cssModule:A.object,tag:it,type:A.string,children:A.node};function mI(e){var t=e.className,n=e.cssModule,r=e.children,i=e.tag,o=i===void 0?"button":i,a=pK(e,dK),s=He(Ve(t,"navbar-toggler"),n);return W.createElement(o,Sw({"aria-label":"Toggle navigation"},fK({type:"button"},a),{className:s}),r||W.createElement("span",{className:He("navbar-toggler-icon",n)}))}mI.propTypes=gK;var vK=["className","cssModule","tabs","pills","vertical","horizontal","justified","fill","navbar","card","tag"];function Ew(){return Ew=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function _K(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}var bK={card:A.bool,className:A.string,cssModule:A.object,fill:A.bool,horizontal:A.oneOf(["center","end"]),justified:A.bool,navbar:A.bool,pills:A.bool,tabs:A.bool,tag:it,vertical:A.oneOfType([A.bool,A.string])},wK=function(t){return t===!1?!1:t===!0||t==="xs"?"flex-column":"flex-".concat(t,"-column")};function OE(e){var t=e.className,n=e.cssModule,r=e.tabs,i=e.pills,o=e.vertical,a=o===void 0?!1:o,s=e.horizontal,l=e.justified,c=e.fill,d=e.navbar,f=e.card,p=e.tag,m=p===void 0?"ul":p,v=yK(e,vK),y=He(Ve(t,d?"navbar-nav":"nav",s?"justify-content-".concat(s):!1,wK(a),{"nav-tabs":r,"card-header-tabs":f&&r,"nav-pills":i,"card-header-pills":f&&i,"nav-justified":l,"nav-fill":c}),n);return W.createElement(m,Ew({},v,{className:y}))}OE.propTypes=bK;var xK=["className","cssModule","active","tag"];function Tw(){return Tw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function EK(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}var TK={active:A.bool,className:A.string,cssModule:A.object,tag:it};function gI(e){var t=e.className,n=e.cssModule,r=e.active,i=e.tag,o=i===void 0?"li":i,a=SK(e,xK),s=He(Ve(t,"nav-item",r?"active":!1),n);return W.createElement(o,Tw({},a,{className:s}))}gI.propTypes=TK;function Ow(e){"@babel/helpers - typeof";return Ow=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},Ow(e)}var OK=["className","cssModule","active","tag","innerRef"];function Cw(){return Cw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function kK(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 PK(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function GP(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 gv(e){return gv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},gv(e)}var RK={active:A.bool,className:A.string,cssModule:A.object,disabled:A.bool,href:A.any,innerRef:A.oneOfType([A.object,A.func,A.string]),onClick:A.func,tag:it},yI=function(e){jK(n,e);var t=MK(n);function n(r){var i;return PK(this,n),i=t.call(this,r),i.onClick=i.onClick.bind(vI(i)),i}return LK(n,[{key:"onClick",value:function(i){if(this.props.disabled){i.preventDefault();return}this.props.href==="#"&&i.preventDefault(),this.props.onClick&&this.props.onClick(i)}},{key:"render",value:function(){var i=this.props,o=i.className,a=i.cssModule,s=i.active,l=i.tag,c=l===void 0?"a":l,d=i.innerRef,f=CK(i,OK),p=He(Ve(o,"nav-link",{disabled:f.disabled,active:s}),a);return W.createElement(c,Cw({},f,{ref:d,onClick:this.onClick,className:p}))}}]),n}(W.Component);yI.propTypes=RK;const _I=yI;var DK=["className","cssModule","variant","innerRef"];function Pw(){return Pw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function UK(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}var BK={active:A.bool,"aria-label":A.string,onClick:A.func,variant:A.oneOf(["white"]),className:A.string,cssModule:A.object,innerRef:A.oneOfType([A.object,A.string,A.func])};function bI(e){var t=e.className;e.cssModule;var n=e.variant,r=e.innerRef,i=$K(e,DK),o=He(Ve(t,"btn-close",n&&"btn-close-".concat(n)));return W.createElement("button",Pw({ref:r,type:"button",className:o},IK({"aria-label":"close"},i)))}bI.propTypes=BK;var zK=["active","aria-label","block","className","close","cssModule","color","outline","size","tag","innerRef"];function Lw(){return Lw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function HK(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}var WK={active:A.bool,"aria-label":A.string,block:A.bool,children:A.node,className:A.string,cssModule:A.object,close:A.bool,color:A.string,disabled:A.bool,innerRef:A.oneOfType([A.object,A.func,A.string]),onClick:A.func,outline:A.bool,size:A.string,tag:it};function _t(e){var t=F.useCallback(function(w){if(e.disabled){w.preventDefault();return}if(e.onClick)return e.onClick(w)},[e.onClick,e.disabled]),n=e.active,r=e["aria-label"],i=e.block,o=e.className,a=e.close,s=e.cssModule,l=e.color,c=l===void 0?"secondary":l,d=e.outline,f=e.size,p=e.tag,m=p===void 0?"button":p,v=e.innerRef,y=VK(e,zK);if(a)return W.createElement(bI,y);var x="btn".concat(d?"-outline":"","-").concat(c),_=He(Ve(o,"btn",x,f?"btn-".concat(f):!1,i?"d-block w-100":!1,{active:n,disabled:e.disabled}),s);return y.href&&m==="button"&&(m="a"),W.createElement(m,Lw({type:m==="button"&&y.onClick?"button":void 0},y,{className:_,ref:v,onClick:t,"aria-label":r}))}_t.propTypes=WK;var wI=F.createContext(),xI=F.createContext();function KP(e){var t=e.children,n=F.useState(null),r=n[0],i=n[1],o=F.useRef(!1);F.useEffect(function(){return function(){o.current=!0}},[]);var a=F.useCallback(function(s){o.current||i(s)},[]);return F.createElement(wI.Provider,{value:r},F.createElement(xI.Provider,{value:a},t))}var SI=function(t){return Array.isArray(t)?t[0]:t},EI=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=Qr(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function iZ(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];!_i(o)||!xo(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function oZ(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]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,c){return l[c]="",l},{});!_i(i)||!xo(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const aZ={name:"applyStyles",enabled:!0,phase:"write",fn:iZ,effect:oZ,requires:["computeStyles"]};function vo(e){return e.split("-")[0]}var al=Math.max,vv=Math.min,fu=Math.round;function Mw(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function CI(){return!/^((?!chrome|android).)*safari/i.test(Mw())}function hu(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&_i(e)&&(i=e.offsetWidth>0&&fu(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&fu(r.height)/e.offsetHeight||1);var a=xl(e)?Qr(e):window,s=a.visualViewport,l=!CI()&&n,c=(r.left+(l&&s?s.offsetLeft:0))/i,d=(r.top+(l&&s?s.offsetTop:0))/o,f=r.width/i,p=r.height/o;return{width:f,height:p,top:d,right:c+f,bottom:d+p,left:c,x:c,y:d}}function PE(e){var t=hu(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 kI(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&kE(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function na(e){return Qr(e).getComputedStyle(e)}function sZ(e){return["table","td","th"].indexOf(xo(e))>=0}function bs(e){return((xl(e)?e.ownerDocument:e.document)||window.document).documentElement}function c0(e){return xo(e)==="html"?e:e.assignedSlot||e.parentNode||(kE(e)?e.host:null)||bs(e)}function JP(e){return!_i(e)||na(e).position==="fixed"?null:e.offsetParent}function lZ(e){var t=/firefox/i.test(Mw()),n=/Trident/i.test(Mw());if(n&&_i(e)){var r=na(e);if(r.position==="fixed")return null}var i=c0(e);for(kE(i)&&(i=i.host);_i(i)&&["html","body"].indexOf(xo(i))<0;){var o=na(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 Wh(e){for(var t=Qr(e),n=JP(e);n&&sZ(n)&&na(n).position==="static";)n=JP(n);return n&&(xo(n)==="html"||xo(n)==="body"&&na(n).position==="static")?t:n||lZ(e)||t}function LE(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function lf(e,t,n){return al(e,vv(t,n))}function cZ(e,t,n){var r=lf(e,t,n);return r>n?n:r}function PI(){return{top:0,right:0,bottom:0,left:0}}function LI(e){return Object.assign({},PI(),e)}function jI(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var uZ=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,LI(typeof t!="number"?t:jI(t,Hh))};function dZ(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=vo(n.placement),l=LE(s),c=[Nr,Oi].indexOf(s)>=0,d=c?"height":"width";if(!(!o||!a)){var f=uZ(i.padding,n),p=PE(o),m=l==="y"?Ar:Nr,v=l==="y"?Ti:Oi,y=n.rects.reference[d]+n.rects.reference[l]-a[l]-n.rects.popper[d],x=a[l]-n.rects.reference[l],_=Wh(o),w=_?l==="y"?_.clientHeight||0:_.clientWidth||0:0,S=y/2-x/2,E=f[m],C=w-p[d]-f[v],k=w/2-p[d]/2+S,j=lf(E,k,C),N=l;n.modifiersData[r]=(t={},t[N]=j,t.centerOffset=j-k,t)}}function fZ(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)||kI(t.elements.popper,i)&&(t.elements.arrow=i))}const hZ={name:"arrow",enabled:!0,phase:"main",fn:dZ,effect:fZ,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function pu(e){return e.split("-")[1]}var pZ={top:"auto",right:"auto",bottom:"auto",left:"auto"};function mZ(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:fu(n*i)/i||0,y:fu(r*i)/i||0}}function eL(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,f=e.isFixed,p=a.x,m=p===void 0?0:p,v=a.y,y=v===void 0?0:v,x=typeof d=="function"?d({x:m,y}):{x:m,y};m=x.x,y=x.y;var _=a.hasOwnProperty("x"),w=a.hasOwnProperty("y"),S=Nr,E=Ar,C=window;if(c){var k=Wh(n),j="clientHeight",N="clientWidth";if(k===Qr(n)&&(k=bs(n),na(k).position!=="static"&&s==="absolute"&&(j="scrollHeight",N="scrollWidth")),k=k,i===Ar||(i===Nr||i===Oi)&&o===ih){E=Ti;var U=f&&k===C&&C.visualViewport?C.visualViewport.height:k[j];y-=U-r.height,y*=l?1:-1}if(i===Nr||(i===Ar||i===Ti)&&o===ih){S=Oi;var R=f&&k===C&&C.visualViewport?C.visualViewport.width:k[N];m-=R-r.width,m*=l?1:-1}}var V=Object.assign({position:s},c&&pZ),Y=d===!0?mZ({x:m,y},Qr(n)):{x:m,y};if(m=Y.x,y=Y.y,l){var X;return Object.assign({},V,(X={},X[E]=w?"0":"",X[S]=_?"0":"",X.transform=(C.devicePixelRatio||1)<=1?"translate("+m+"px, "+y+"px)":"translate3d("+m+"px, "+y+"px, 0)",X))}return Object.assign({},V,(t={},t[E]=w?y+"px":"",t[S]=_?m+"px":"",t.transform="",t))}function gZ(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,c={placement:vo(t.placement),variation:pu(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,eL(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,eL(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 vZ={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:gZ,data:{}};var mm={passive:!0};function yZ(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=Qr(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(d){d.addEventListener("scroll",n.update,mm)}),s&&l.addEventListener("resize",n.update,mm),function(){o&&c.forEach(function(d){d.removeEventListener("scroll",n.update,mm)}),s&&l.removeEventListener("resize",n.update,mm)}}const _Z={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:yZ,data:{}};var bZ={left:"right",right:"left",bottom:"top",top:"bottom"};function ug(e){return e.replace(/left|right|bottom|top/g,function(t){return bZ[t]})}var wZ={start:"end",end:"start"};function tL(e){return e.replace(/start|end/g,function(t){return wZ[t]})}function jE(e){var t=Qr(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function ME(e){return hu(bs(e)).left+jE(e).scrollLeft}function xZ(e,t){var n=Qr(e),r=bs(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var c=CI();(c||!c&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+ME(e),y:l}}function SZ(e){var t,n=bs(e),r=jE(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=al(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=al(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+ME(e),l=-r.scrollTop;return na(i||n).direction==="rtl"&&(s+=al(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function AE(e){var t=na(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function MI(e){return["html","body","#document"].indexOf(xo(e))>=0?e.ownerDocument.body:_i(e)&&AE(e)?e:MI(c0(e))}function cf(e,t){var n;t===void 0&&(t=[]);var r=MI(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Qr(r),a=i?[o].concat(o.visualViewport||[],AE(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(cf(c0(a)))}function Aw(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function EZ(e,t){var n=hu(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 nL(e,t,n){return t===TI?Aw(xZ(e,n)):xl(t)?EZ(t,n):Aw(SZ(bs(e)))}function TZ(e){var t=cf(c0(e)),n=["absolute","fixed"].indexOf(na(e).position)>=0,r=n&&_i(e)?Wh(e):e;return xl(r)?t.filter(function(i){return xl(i)&&kI(i,r)&&xo(i)!=="body"}):[]}function OZ(e,t,n,r){var i=t==="clippingParents"?TZ(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,c){var d=nL(e,c,r);return l.top=al(d.top,l.top),l.right=vv(d.right,l.right),l.bottom=vv(d.bottom,l.bottom),l.left=al(d.left,l.left),l},nL(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function AI(e){var t=e.reference,n=e.element,r=e.placement,i=r?vo(r):null,o=r?pu(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Ar:l={x:a,y:t.y-n.height};break;case Ti:l={x:a,y:t.y+t.height};break;case Oi:l={x:t.x+t.width,y:s};break;case Nr:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var c=i?LE(i):null;if(c!=null){var d=c==="y"?"height":"width";switch(o){case du:l[c]=l[c]-(t[d]/2-n[d]/2);break;case ih:l[c]=l[c]+(t[d]/2-n[d]/2);break}}return l}function oh(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?YK:s,c=n.rootBoundary,d=c===void 0?TI:c,f=n.elementContext,p=f===void 0?bd:f,m=n.altBoundary,v=m===void 0?!1:m,y=n.padding,x=y===void 0?0:y,_=LI(typeof x!="number"?x:jI(x,Hh)),w=p===bd?GK:bd,S=e.rects.popper,E=e.elements[v?w:p],C=OZ(xl(E)?E:E.contextElement||bs(e.elements.popper),l,d,a),k=hu(e.elements.reference),j=AI({reference:k,element:S,strategy:"absolute",placement:i}),N=Aw(Object.assign({},S,j)),U=p===bd?N:k,R={top:C.top-U.top+_.top,bottom:U.bottom-C.bottom+_.bottom,left:C.left-U.left+_.left,right:U.right-C.right+_.right},V=e.modifiersData.offset;if(p===bd&&V){var Y=V[i];Object.keys(R).forEach(function(X){var G=[Oi,Ti].indexOf(X)>=0?1:-1,Z=[Ar,Ti].indexOf(X)>=0?"y":"x";R[X]+=Y[Z]*G})}return R}function CZ(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?OI:l,d=pu(r),f=d?s?XP:XP.filter(function(v){return pu(v)===d}):Hh,p=f.filter(function(v){return c.indexOf(v)>=0});p.length===0&&(p=f);var m=p.reduce(function(v,y){return v[y]=oh(e,{placement:y,boundary:i,rootBoundary:o,padding:a})[vo(y)],v},{});return Object.keys(m).sort(function(v,y){return m[v]-m[y]})}function kZ(e){if(vo(e)===CE)return[];var t=ug(e);return[tL(e),t,tL(t)]}function PZ(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,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,c=n.padding,d=n.boundary,f=n.rootBoundary,p=n.altBoundary,m=n.flipVariations,v=m===void 0?!0:m,y=n.allowedAutoPlacements,x=t.options.placement,_=vo(x),w=_===x,S=l||(w||!v?[ug(x)]:kZ(x)),E=[x].concat(S).reduce(function(K,re){return K.concat(vo(re)===CE?CZ(t,{placement:re,boundary:d,rootBoundary:f,padding:c,flipVariations:v,allowedAutoPlacements:y}):re)},[]),C=t.rects.reference,k=t.rects.popper,j=new Map,N=!0,U=E[0],R=0;R=0,Z=G?"width":"height",te=oh(t,{placement:V,boundary:d,rootBoundary:f,altBoundary:p,padding:c}),le=G?X?Oi:Nr:X?Ti:Ar;C[Z]>k[Z]&&(le=ug(le));var q=ug(le),I=[];if(o&&I.push(te[Y]<=0),s&&I.push(te[le]<=0,te[q]<=0),I.every(function(K){return K})){U=V,N=!1;break}j.set(V,I)}if(N)for(var D=v?3:1,H=function(re){var ae=E.find(function(he){var O=j.get(he);if(O)return O.slice(0,re).every(function(M){return M})});if(ae)return U=ae,"break"},ie=D;ie>0;ie--){var z=H(ie);if(z==="break")break}t.placement!==U&&(t.modifiersData[r]._skip=!0,t.placement=U,t.reset=!0)}}const LZ={name:"flip",enabled:!0,phase:"main",fn:PZ,requiresIfExists:["offset"],data:{_skip:!1}};function rL(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 iL(e){return[Ar,Oi,Ti,Nr].some(function(t){return e[t]>=0})}function jZ(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=oh(t,{elementContext:"reference"}),s=oh(t,{altBoundary:!0}),l=rL(a,r),c=rL(s,i,o),d=iL(l),f=iL(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":f})}const MZ={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:jZ};function AZ(e,t,n){var r=vo(e),i=[Nr,Ar].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Nr,Oi].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function NZ(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=OI.reduce(function(d,f){return d[f]=AZ(f,t.rects,o),d},{}),s=a[t.placement],l=s.x,c=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}const RZ={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:NZ};function DZ(e){var t=e.state,n=e.name;t.modifiersData[n]=AI({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const IZ={name:"popperOffsets",enabled:!0,phase:"read",fn:DZ,data:{}};function FZ(e){return e==="x"?"y":"x"}function $Z(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,c=n.rootBoundary,d=n.altBoundary,f=n.padding,p=n.tether,m=p===void 0?!0:p,v=n.tetherOffset,y=v===void 0?0:v,x=oh(t,{boundary:l,rootBoundary:c,padding:f,altBoundary:d}),_=vo(t.placement),w=pu(t.placement),S=!w,E=LE(_),C=FZ(E),k=t.modifiersData.popperOffsets,j=t.rects.reference,N=t.rects.popper,U=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,R=typeof U=="number"?{mainAxis:U,altAxis:U}:Object.assign({mainAxis:0,altAxis:0},U),V=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,Y={x:0,y:0};if(k){if(o){var X,G=E==="y"?Ar:Nr,Z=E==="y"?Ti:Oi,te=E==="y"?"height":"width",le=k[E],q=le+x[G],I=le-x[Z],D=m?-N[te]/2:0,H=w===du?j[te]:N[te],ie=w===du?-N[te]:-j[te],z=t.elements.arrow,K=m&&z?PE(z):{width:0,height:0},re=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:PI(),ae=re[G],he=re[Z],O=lf(0,j[te],K[te]),M=S?j[te]/2-D-O-ae-R.mainAxis:H-O-ae-R.mainAxis,$=S?-j[te]/2+D+O+he+R.mainAxis:ie+O+he+R.mainAxis,ee=t.elements.arrow&&Wh(t.elements.arrow),J=ee?E==="y"?ee.clientTop||0:ee.clientLeft||0:0,se=(X=V==null?void 0:V[E])!=null?X:0,ge=le+M-se-J,Me=le+$-se,ue=lf(m?vv(q,ge):q,le,m?al(I,Me):I);k[E]=ue,Y[E]=ue-le}if(s){var me,_e=E==="x"?Ar:Nr,Se=E==="x"?Ti:Oi,ke=k[C],Ce=C==="y"?"height":"width",je=ke+x[_e],ce=ke-x[Se],fe=[Ar,Nr].indexOf(_)!==-1,ye=(me=V==null?void 0:V[C])!=null?me:0,ve=fe?je:ke-j[Ce]-N[Ce]-ye+R.altAxis,xe=fe?ke+j[Ce]+N[Ce]-ye-R.altAxis:ce,Pe=m&&fe?cZ(ve,ke,xe):lf(m?ve:je,ke,m?xe:ce);k[C]=Pe,Y[C]=Pe-ke}t.modifiersData[r]=Y}}const UZ={name:"preventOverflow",enabled:!0,phase:"main",fn:$Z,requiresIfExists:["offset"]};function BZ(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function zZ(e){return e===Qr(e)||!_i(e)?jE(e):BZ(e)}function VZ(e){var t=e.getBoundingClientRect(),n=fu(t.width)/e.offsetWidth||1,r=fu(t.height)/e.offsetHeight||1;return n!==1||r!==1}function HZ(e,t,n){n===void 0&&(n=!1);var r=_i(t),i=_i(t)&&VZ(t),o=bs(t),a=hu(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((xo(t)!=="body"||AE(o))&&(s=zZ(t)),_i(t)?(l=hu(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=ME(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function WZ(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 a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function YZ(e){var t=WZ(e);return rZ.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function GZ(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function qZ(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 oL={placement:"bottom",modifiers:[],strategy:"absolute"};function aL(){for(var e=arguments.length,t=new Array(e),n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function mQ(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 gQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sL(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.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},yv(e)}var xQ={a11y:A.bool,disabled:A.bool,direction:A.oneOf(["up","down","start","end","left","right"]),group:A.bool,isOpen:A.bool,nav:A.bool,active:A.bool,size:A.string,tag:it,toggle:A.func,children:A.node,className:A.string,cssModule:A.object,dropup:A.bool,inNavbar:A.bool,setActiveFromChild:A.bool,menuRole:A.oneOf(["listbox","menu"])},SQ={a11y:!0,isOpen:!1,direction:"down",nav:!1,active:!1,inNavbar:!1,setActiveFromChild:!1},EQ=[bt.space,bt.enter,bt.up,bt.down,bt.end,bt.home],u0=function(e){yQ(n,e);var t=_Q(n);function n(r){var i;return gQ(this,n),i=t.call(this,r),i.addEvents=i.addEvents.bind(Ta(i)),i.handleDocumentClick=i.handleDocumentClick.bind(Ta(i)),i.handleKeyDown=i.handleKeyDown.bind(Ta(i)),i.removeEvents=i.removeEvents.bind(Ta(i)),i.toggle=i.toggle.bind(Ta(i)),i.handleMenuRef=i.handleMenuRef.bind(Ta(i)),i.handleToggleRef=i.handleToggleRef.bind(Ta(i)),i.containerRef=W.createRef(),i.menuRef=W.createRef(),i.toggleRef=W.createRef(),i}return vQ(n,[{key:"componentDidMount",value:function(){this.handleProps()}},{key:"componentDidUpdate",value:function(i){this.props.isOpen!==i.isOpen&&this.handleProps()}},{key:"componentWillUnmount",value:function(){this.removeEvents()}},{key:"handleMenuRef",value:function(i){this.menuRef.current=i}},{key:"handleToggleRef",value:function(i){this.toggleRef.current=i}},{key:"handleDocumentClick",value:function(i){if(!(i&&(i.which===3||i.type==="keyup"&&i.which!==bt.tab))){var o=this.getContainer(),a=this.getMenu(),s=this.getToggle(),l=s.contains(i.target),c=a&&a.contains(i.target)&&a!==i.target,d=!1;o&&(d=o.classList.contains("input-group")&&o.classList.contains("dropdown")&&i.target.tagName==="INPUT"),!((l&&!d||c)&&(i.type!=="keyup"||i.which===bt.tab))&&this.toggle(i)}}},{key:"handleKeyDown",value:function(i){var o=this,a=i.target.getAttribute("role")==="menuitem"||i.target.getAttribute("role")==="option",s=this.getMenuCtrl()===i.target,l=bt.tab===i.which;if(!(/input|textarea/i.test(i.target.tagName)||l&&!this.props.a11y||l&&!(a||s))&&((EQ.indexOf(i.which)!==-1||i.which>=48&&i.which<=90)&&i.preventDefault(),!this.props.disabled)){if(s)if([bt.space,bt.enter,bt.up,bt.down].indexOf(i.which)>-1)this.props.isOpen||this.toggle(i),setTimeout(function(){var w;return(w=o.getMenuItems()[0])===null||w===void 0?void 0:w.focus()});else if(this.props.isOpen&&l){var c;i.preventDefault(),(c=this.getMenuItems()[0])===null||c===void 0||c.focus()}else this.props.isOpen&&i.which===bt.esc&&this.toggle(i);if(this.props.isOpen&&a){if([bt.tab,bt.esc].indexOf(i.which)>-1)this.toggle(i),this.getMenuCtrl().focus();else if([bt.space,bt.enter].indexOf(i.which)>-1)i.target.click(),this.getMenuCtrl().focus();else if([bt.down,bt.up].indexOf(i.which)>-1||[bt.n,bt.p].indexOf(i.which)>-1&&i.ctrlKey){var d=this.getMenuItems(),f=d.indexOf(i.target);bt.up===i.which||bt.p===i.which&&i.ctrlKey?f=f!==0?f-1:d.length-1:(bt.down===i.which||bt.n===i.which&&i.ctrlKey)&&(f=f===d.length-1?0:f+1),d[f].focus()}else if(bt.end===i.which){var p=this.getMenuItems();p[p.length-1].focus()}else if(bt.home===i.which){var m=this.getMenuItems();m[0].focus()}else if(i.which>=48&&i.which<=90)for(var v=this.getMenuItems(),y=String.fromCharCode(i.which).toLowerCase(),x=0;x=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function CQ(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 kQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lL(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 _v(e){return _v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},_v(e)}var NQ={children:A.node,active:A.bool,disabled:A.bool,divider:A.bool,tag:it,header:A.bool,onClick:A.func,className:A.string,cssModule:A.object,toggle:A.bool,text:A.bool},NE=function(e){LQ(n,e);var t=jQ(n);function n(r){var i;return kQ(this,n),i=t.call(this,r),i.onClick=i.onClick.bind(Uw(i)),i.getTabIndex=i.getTabIndex.bind(Uw(i)),i}return PQ(n,[{key:"onClick",value:function(i){var o,a=this.props,s=a.disabled,l=a.header,c=a.divider,d=a.text;if(s||l||c||d){i.preventDefault();return}this.props.onClick&&this.props.onClick(i),(!((o=this.props.toggle)!==null&&o!==void 0)||o)&&this.context.toggle(i)}},{key:"getRole",value:function(){return this.context.menuRole==="listbox"?"option":"menuitem"}},{key:"getTabIndex",value:function(){var i=this.props,o=i.disabled,a=i.header,s=i.divider,l=i.text;return o||a||s||l?"-1":"0"}},{key:"render",value:function(){var i=this.getTabIndex(),o=i>-1?this.getRole():void 0,a=_s(this.props,["toggle"]),s=a.className,l=a.cssModule,c=a.divider,d=a.tag,f=d===void 0?"button":d,p=a.header,m=a.active,v=a.text,y=OQ(a,TQ),x=He(Ve(s,{disabled:y.disabled,"dropdown-item":!c&&!p&&!v,active:m,"dropdown-header":p,"dropdown-divider":c,"dropdown-item-text":v}),l);return f==="button"&&(p?f="h6":c?f="div":y.href?f="a":v&&(f="span")),W.createElement(f,Fw({type:f==="button"&&(y.onClick||this.props.toggle)?"button":void 0},y,{tabIndex:i,role:o,className:x,onClick:this.onClick}))}}]),n}(W.Component);NE.propTypes=NQ;NE.contextType=ah;const Ue=NE;function Bw(e){"@babel/helpers - typeof";return Bw=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},Bw(e)}var RQ=["className","cssModule","dark","end","right","tag","flip","modifiers","persist","strategy","container","updateOnSelect"];function bv(){return bv=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function VQ(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 HQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dL(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.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},wv(e)}var QQ={tag:it,children:A.node.isRequired,dark:A.bool,end:A.bool,flip:A.bool,modifiers:A.array,className:A.string,cssModule:A.object,style:A.object,persist:A.bool,strategy:A.string,container:uu,updateOnSelect:A.bool,right:dI(A.bool,'Please use "end" instead.')},XQ={up:"top",left:"left",right:"right",start:"left",end:"right",down:"bottom"},RE=function(e){YQ(n,e);var t=GQ(n);function n(){return HQ(this,n),t.apply(this,arguments)}return WQ(n,[{key:"getRole",value:function(){return this.context.menuRole==="listbox"?"listbox":"menu"}},{key:"render",value:function(){var i=this,o=this.props,a=o.className,s=o.cssModule,l=o.dark,c=o.end,d=o.right,f=o.tag,p=f===void 0?"div":f,m=o.flip,v=m===void 0?!0:m,y=o.modifiers,x=y===void 0?[]:y,_=o.persist,w=o.strategy,S=o.container,E=o.updateOnSelect,C=zQ(o,RQ),k=He(Ve(a,"dropdown-menu",{"dropdown-menu-dark":l,"dropdown-menu-end":c||d,show:this.context.isOpen}),s),j=p;if(_||this.context.isOpen&&!this.context.inNavbar){var N=XQ[this.context.direction]||"bottom",U=c||d?"end":"start",R="".concat(N,"-").concat(U),V=[].concat(IQ(x),[{name:"flip",enabled:!!v}]),Y=W.createElement(NI,{placement:R,modifiers:V,strategy:w},function(G){var Z=G.ref,te=G.style,le=G.placement,q=G.update,I=uL(uL({},i.props.style),te),D=function(ie){Z(ie);var z=i.context.onMenuRef;z&&z(ie)};return W.createElement(j,bv({tabIndex:"-1",role:i.getRole(),ref:D},C,{style:I,"aria-hidden":!i.context.isOpen,className:k,"data-popper-placement":le,onClick:function(){return E&&q()}}))});return S?il.createPortal(Y,rh(S)):Y}var X=this.context.onMenuRef;return W.createElement(j,bv({tabIndex:"-1",role:this.getRole()},C,{ref:X,"aria-hidden":!this.context.isOpen,className:k,"data-popper-placement":C.placement}))}}]),n}(W.Component);RE.propTypes=QQ;RE.contextType=ah;const zu=RE;function Hw(e){"@babel/helpers - typeof";return Hw=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},Hw(e)}var JQ=["className","color","cssModule","caret","split","nav","tag","innerRef"];function eX(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xv(){return xv=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function nX(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 rX(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fL(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.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Sv(e)}var cX={caret:A.bool,color:A.string,children:A.node,className:A.string,cssModule:A.object,disabled:A.bool,onClick:A.func,"aria-haspopup":A.bool,split:A.bool,tag:it,nav:A.bool,innerRef:A.oneOfType([A.object,A.string,A.func])},uX={color:"secondary","aria-haspopup":!0},d0=function(e){oX(n,e);var t=aX(n);function n(r){var i;return rX(this,n),i=t.call(this,r),i.onClick=i.onClick.bind(DI(i)),i}return iX(n,[{key:"onClick",value:function(i){if(this.props.disabled||this.context.disabled){i.preventDefault();return}this.props.nav&&!this.props.tag&&i.preventDefault(),this.props.onClick&&this.props.onClick(i),this.context.toggle(i)}},{key:"getRole",value:function(){return this.context.menuRole||this.props["aria-haspopup"]}},{key:"render",value:function(){var i=this,o=this.props,a=o.className,s=o.color,l=o.cssModule,c=o.caret,d=o.split,f=o.nav,p=o.tag,m=o.innerRef,v=tX(o,JQ),y=v["aria-label"]||"Toggle Dropdown",x=He(Ve(a,{"dropdown-toggle":c||d,"dropdown-toggle-split":d,"nav-link":f}),l),_=typeof v.children<"u"?v.children:W.createElement("span",{className:"visually-hidden"},y),w;return f&&!p?(w="a",v.href="#"):p?w=p:(w=_t,v.color=s,v.cssModule=l),this.context.inNavbar?W.createElement(w,xv({},v,{className:x,onClick:this.onClick,ref:this.context.onToggleRef,"aria-expanded":this.context.isOpen,"aria-haspopup":this.getRole(),children:_})):W.createElement(fQ,{innerRef:m},function(S){var E=S.ref,C=function(j){E(j);var N=i.context.onToggleRef;N&&N(j)};return W.createElement(w,xv({},v,eX({},typeof w=="string"?"ref":"innerRef",C),{className:x,onClick:i.onClick,"aria-expanded":i.context.isOpen,"aria-haspopup":i.getRole(),children:_}))})}}]),n}(W.Component);d0.propTypes=cX;d0.defaultProps=uX;d0.contextType=ah;const Gh=d0;function Yw(e,t){return Yw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Yw(e,t)}function dX(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Yw(e,t)}const hL={disabled:!1},II=W.createContext(null);var $d="unmounted",zs="exited",Vs="entering",vc="entered",Gw="exiting",da=function(e){dX(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=zs,o.appearStatus=Vs):l=vc:r.unmountOnExit||r.mountOnEnter?l=$d:l=zs,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===$d?{status:zs}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==Vs&&a!==vc&&(o=Vs):(a===Vs||a===vc)&&(o=Gw)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){i===void 0&&(i=!1),o!==null?(this.cancelNextCallback(),o===Vs?this.performEnter(i):this.performExit()):this.props.unmountOnExit&&this.state.status===zs&&this.setState({status:$d})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[il.findDOMNode(this),s],c=l[0],d=l[1],f=this.getTimeouts(),p=s?f.appear:f.enter;if(!i&&!a||hL.disabled){this.safeSetState({status:vc},function(){o.props.onEntered(c)});return}this.props.onEnter(c,d),this.safeSetState({status:Vs},function(){o.props.onEntering(c,d),o.onTransitionEnd(p,function(){o.safeSetState({status:vc},function(){o.props.onEntered(c,d)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:il.findDOMNode(this);if(!o||hL.disabled){this.safeSetState({status:zs},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:Gw},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:zs},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:il.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],c=l[0],d=l[1];this.props.addEndListener(c,d)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===$d)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=DS(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return W.createElement(II.Provider,{value:null},typeof a=="function"?a(i,s):W.cloneElement(W.Children.only(a),s))},t}(W.Component);da.contextType=II;da.propTypes={};function oc(){}da.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:oc,onEntering:oc,onEntered:oc,onExit:oc,onExiting:oc,onExited:oc};da.UNMOUNTED=$d;da.EXITED=zs;da.ENTERING=Vs;da.ENTERED=vc;da.EXITING=Gw;const Vu=da;var fX=["tag","baseClass","baseClassActive","className","cssModule","children","innerRef"];function Ev(){return Ev=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function pX(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 pL(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 sh(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function _X(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 bX(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mL(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.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ov(e)}function gL(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 mu(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function AX(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}var NX={body:A.bool,className:A.string,color:A.string,cssModule:A.object,innerRef:A.oneOfType([A.object,A.string,A.func]),inverse:A.bool,outline:A.bool,tag:it};function Xr(e){var t=e.className,n=e.cssModule,r=e.color,i=e.body,o=e.inverse,a=e.outline,s=e.tag,l=s===void 0?"div":s,c=e.innerRef,d=MX(e,jX),f=He(Ve(t,"card",o?"text-white":!1,i?"card-body":!1,r?"".concat(a?"border":"bg","-").concat(r):!1),n);return W.createElement(l,Zw({},d,{className:f,ref:c}))}Xr.propTypes=NX;var RX=["className","cssModule","innerRef","tag"];function Qw(){return Qw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function IX(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}var FX={className:A.string,cssModule:A.object,innerRef:A.oneOfType([A.object,A.string,A.func]),tag:it};function gu(e){var t=e.className,n=e.cssModule,r=e.innerRef,i=e.tag,o=i===void 0?"div":i,a=DX(e,RX),s=He(Ve(t,"card-body"),n);return W.createElement(o,Qw({},a,{className:s,ref:r}))}gu.propTypes=FX;var $X=["className","cssModule","tag"];function Xw(){return Xw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function BX(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}var zX={className:A.string,cssModule:A.object,tag:it};function UI(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=UX(e,$X),a=He(Ve(t,"card-footer"),n);return W.createElement(i,Xw({},o,{className:a}))}UI.propTypes=zX;var VX=["className","cssModule","tag"];function Jw(){return Jw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function WX(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}var YX={className:A.string,cssModule:A.object,tag:it};function vu(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=HX(e,VX),a=He(Ve(t,"card-header"),n);return W.createElement(i,Jw({},o,{className:a}))}vu.propTypes=YX;var GX=["className","cssModule","tag"];function ex(){return ex=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function KX(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}var ZX={className:A.string,cssModule:A.object,tag:it};function BI(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"p":r,o=qX(e,GX),a=He(Ve(t,"card-text"),n);return W.createElement(i,ex({},o,{className:a}))}BI.propTypes=ZX;var QX=["className","cssModule","tag"];function tx(){return tx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function JX(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}var eJ={className:A.string,cssModule:A.object,tag:it};function zI(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=XX(e,QX),a=He(Ve(t,"card-title"),n);return W.createElement(i,tx({},o,{className:a}))}zI.propTypes=eJ;function nx(e){"@babel/helpers - typeof";return nx=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},nx(e)}var tJ=["cssModule","children","isOpen","flip","target","offset","fallbackPlacements","placementPrefix","arrowClassName","hideArrow","popperClassName","tag","container","modifiers","strategy","boundariesElement","onClosed","fade","transition","placement"];function rx(){return rx=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function sJ(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 lJ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yL(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.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Cv(e)}function _L(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 fg(e){for(var t=1;t"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.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},kv(e)}var f0={children:A.oneOfType([A.node,A.func]),placement:A.oneOf(Yq),target:uu.isRequired,container:uu,isOpen:A.bool,disabled:A.bool,hideArrow:A.bool,boundariesElement:A.oneOfType([A.string,EE]),className:A.string,innerClassName:A.string,arrowClassName:A.string,popperClassName:A.string,cssModule:A.object,toggle:A.func,autohide:A.bool,placementPrefix:A.string,delay:A.oneOfType([A.shape({show:A.number,hide:A.number}),A.number]),modifiers:A.array,strategy:A.string,offset:A.arrayOf(A.number),innerRef:A.oneOfType([A.func,A.string,A.object]),trigger:A.string,fade:A.bool,flip:A.bool},VI={show:0,hide:50},TJ={isOpen:!1,hideArrow:!1,autohide:!1,delay:VI,toggle:function(){},trigger:"click",fade:!0};function HI(e,t){return t&&(e===t||t.contains(e))}function wL(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return t&&t.length&&t.filter(function(n){return HI(e,n)})[0]}var FE=function(e){wJ(n,e);var t=xJ(n);function n(r){var i;return _J(this,n),i=t.call(this,r),i._targets=[],i.currentTargetElement=null,i.addTargetEvents=i.addTargetEvents.bind($r(i)),i.handleDocumentClick=i.handleDocumentClick.bind($r(i)),i.removeTargetEvents=i.removeTargetEvents.bind($r(i)),i.toggle=i.toggle.bind($r(i)),i.showWithDelay=i.showWithDelay.bind($r(i)),i.hideWithDelay=i.hideWithDelay.bind($r(i)),i.onMouseOverTooltipContent=i.onMouseOverTooltipContent.bind($r(i)),i.onMouseLeaveTooltipContent=i.onMouseLeaveTooltipContent.bind($r(i)),i.show=i.show.bind($r(i)),i.hide=i.hide.bind($r(i)),i.onEscKeyDown=i.onEscKeyDown.bind($r(i)),i.getRef=i.getRef.bind($r(i)),i.state={isOpen:r.isOpen},i._isMounted=!1,i}return bJ(n,[{key:"componentDidMount",value:function(){this._isMounted=!0,this.updateTarget()}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.removeTargetEvents(),this._targets=null,this.clearShowTimeout(),this.clearHideTimeout()}},{key:"handleDocumentClick",value:function(i){var o=this.props.trigger.split(" ");o.indexOf("legacy")>-1&&(this.props.isOpen||wL(i.target,this._targets))?(this._hideTimeout&&this.clearHideTimeout(),this.props.isOpen&&!HI(i.target,this._popover)?this.hideWithDelay(i):this.props.isOpen||this.showWithDelay(i)):o.indexOf("click")>-1&&wL(i.target,this._targets)&&(this._hideTimeout&&this.clearHideTimeout(),this.props.isOpen?this.hideWithDelay(i):this.showWithDelay(i))}},{key:"onMouseOverTooltipContent",value:function(){this.props.trigger.indexOf("hover")>-1&&!this.props.autohide&&(this._hideTimeout&&this.clearHideTimeout(),this.state.isOpen&&!this.props.isOpen&&this.toggle())}},{key:"onMouseLeaveTooltipContent",value:function(i){this.props.trigger.indexOf("hover")>-1&&!this.props.autohide&&(this._showTimeout&&this.clearShowTimeout(),i.persist(),this._hideTimeout=setTimeout(this.hide.bind(this,i),this.getDelay("hide")))}},{key:"onEscKeyDown",value:function(i){i.key==="Escape"&&this.hide(i)}},{key:"getRef",value:function(i){var o=this.props.innerRef;o&&(typeof o=="function"?o(i):lh(o)==="object"&&(o.current=i)),this._popover=i}},{key:"getDelay",value:function(i){var o=this.props.delay;return lh(o)==="object"?isNaN(o[i])?VI[i]:o[i]:o}},{key:"getCurrentTarget",value:function(i){if(!i)return null;var o=this._targets.indexOf(i);return o>=0?this._targets[o]:this.getCurrentTarget(i.parentElement)}},{key:"show",value:function(i){if(!this.props.isOpen){if(this.clearShowTimeout(),this.currentTargetElement=i?i.currentTarget||this.getCurrentTarget(i.target):null,i&&i.composedPath&&typeof i.composedPath=="function"){var o=i.composedPath();this.currentTargetElement=o&&o[0]||this.currentTargetElement}this.toggle(i)}}},{key:"showWithDelay",value:function(i){this._hideTimeout&&this.clearHideTimeout(),this._showTimeout=setTimeout(this.show.bind(this,i),this.getDelay("show"))}},{key:"hide",value:function(i){this.props.isOpen&&(this.clearHideTimeout(),this.currentTargetElement=null,this.toggle(i))}},{key:"hideWithDelay",value:function(i){this._showTimeout&&this.clearShowTimeout(),this._hideTimeout=setTimeout(this.hide.bind(this,i),this.getDelay("hide"))}},{key:"clearShowTimeout",value:function(){clearTimeout(this._showTimeout),this._showTimeout=void 0}},{key:"clearHideTimeout",value:function(){clearTimeout(this._hideTimeout),this._hideTimeout=void 0}},{key:"addEventOnTargets",value:function(i,o,a){this._targets.forEach(function(s){s.addEventListener(i,o,a)})}},{key:"removeEventOnTargets",value:function(i,o,a){this._targets.forEach(function(s){s.removeEventListener(i,o,a)})}},{key:"addTargetEvents",value:function(){if(this.props.trigger){var i=this.props.trigger.split(" ");i.indexOf("manual")===-1&&((i.indexOf("click")>-1||i.indexOf("legacy")>-1)&&document.addEventListener("click",this.handleDocumentClick,!0),this._targets&&this._targets.length&&(i.indexOf("hover")>-1&&(this.addEventOnTargets("mouseover",this.showWithDelay,!0),this.addEventOnTargets("mouseout",this.hideWithDelay,!0)),i.indexOf("focus")>-1&&(this.addEventOnTargets("focusin",this.show,!0),this.addEventOnTargets("focusout",this.hide,!0)),this.addEventOnTargets("keydown",this.onEscKeyDown,!0)))}}},{key:"removeTargetEvents",value:function(){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)}},{key:"updateTarget",value:function(){var i=rh(this.props.target,!0);i!==this._targets&&(this.removeTargetEvents(),this._targets=i?Array.from(i):[],this.currentTargetElement=this.currentTargetElement||this._targets[0],this.addTargetEvents())}},{key:"toggle",value:function(i){return this.props.disabled||!this._isMounted?i&&i.preventDefault():this.props.toggle(i)}},{key:"render",value:function(){var i=this;this.props.isOpen&&this.updateTarget();var o=this.currentTargetElement||this._targets[0];if(!o)return null;var a=this.props,s=a.className,l=a.cssModule,c=a.innerClassName,d=a.isOpen,f=a.hideArrow,p=a.boundariesElement,m=a.placement,v=a.placementPrefix,y=a.arrowClassName,x=a.popperClassName,_=a.container,w=a.modifiers,S=a.strategy,E=a.offset,C=a.fade,k=a.flip,j=a.children,N=_s(this.props,Object.keys(f0)),U=He(x,l),R=He(c,l);return W.createElement(yJ,{className:s,target:o,isOpen:d,hideArrow:f,boundariesElement:p,placement:m,placementPrefix:v,arrowClassName:y,popperClassName:U,container:_,modifiers:w,strategy:S,offset:E,cssModule:l,fade:C,flip:k},function(V){var Y=V.update;return W.createElement("div",ax({},N,{ref:i.getRef,className:R,role:"tooltip",onMouseOver:i.onMouseOverTooltipContent,onMouseLeave:i.onMouseLeaveTooltipContent,onKeyDown:i.onEscKeyDown}),typeof j=="function"?j({update:Y}):j)})}}],[{key:"getDerivedStateFromProps",value:function(i,o){return i.isOpen&&!o.isOpen?{isOpen:i.isOpen}:null}}]),n}(W.Component);FE.propTypes=f0;FE.defaultProps=TJ;const WI=FE;function lx(){return lx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function LJ(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}var jJ={animated:A.bool,bar:A.bool,barAriaLabelledBy:A.string,barAriaValueText:A.string,barClassName:A.string,barStyle:A.object,children:A.node,className:A.string,cssModule:A.object,color:A.string,max:A.oneOfType([A.string,A.number]),min:A.oneOfType([A.string,A.number]),multi:A.bool,striped:A.bool,style:A.object,tag:it,value:A.oneOfType([A.string,A.number])};function YI(e){var t=e.children,n=e.className,r=e.barClassName,i=e.cssModule,o=e.value,a=o===void 0?0:o,s=e.min,l=s===void 0?0:s,c=e.max,d=c===void 0?100:c,f=e.animated,p=e.striped,m=e.color,v=e.bar,y=e.multi,x=e.tag,_=x===void 0?"div":x,w=e.style,S=w===void 0?{}:w,E=e.barStyle,C=E===void 0?{}:E,k=e.barAriaValueText,j=e.barAriaLabelledBy,N=PJ(e,CJ),U=HP(a)/HP(d)*100,R=He(Ve(n,"progress"),i),V=He(Ve("progress-bar",v&&n||r,f?"progress-bar-animated":null,m?"bg-".concat(m):null,p||f?"progress-bar-striped":null),i),Y={className:V,style:X_(X_(X_({},v?S:{}),C),{},{width:"".concat(U,"%")}),role:"progressbar","aria-valuenow":a,"aria-valuemin":l,"aria-valuemax":d,"aria-valuetext":k,"aria-labelledby":j,children:t};return v?W.createElement(_,Pv({},N,Y)):W.createElement(_,Pv({},N,{style:S,className:R}),y?t:W.createElement("div",Y))}YI.propTypes=jJ;function cx(e){"@babel/helpers - typeof";return cx=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},cx(e)}function MJ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function SL(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.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Lv(e)}var $J={children:A.node.isRequired,node:A.any},GI=function(e){NJ(n,e);var t=RJ(n);function n(){return MJ(this,n),t.apply(this,arguments)}return AJ(n,[{key:"componentWillUnmount",value:function(){this.defaultNode&&document.body.removeChild(this.defaultNode),this.defaultNode=null}},{key:"render",value:function(){return TE?(!this.props.node&&!this.defaultNode&&(this.defaultNode=document.createElement("div"),document.body.appendChild(this.defaultNode)),il.createPortal(this.props.children,this.props.node||this.defaultNode)):null}}]),n}(W.Component);GI.propTypes=$J;const UJ=GI;function dx(e){"@babel/helpers - typeof";return dx=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},dx(e)}function EL(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 sc(e){for(var t=1;t"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.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},jv(e)}function Mv(){}var OL=A.shape(wr.propTypes),qI={autoFocus:A.bool,backdrop:A.oneOfType([A.bool,A.oneOf(["static"])]),backdropClassName:A.string,backdropTransition:OL,centered:A.bool,children:A.node,contentClassName:A.string,className:A.string,container:uu,cssModule:A.object,external:A.node,fade:A.bool,fullscreen:A.oneOfType([A.bool,A.oneOf(["sm","md","lg","xl"])]),innerRef:A.oneOfType([A.object,A.string,A.func]),isOpen:A.bool,keyboard:A.bool,labelledBy:A.string,modalClassName:A.string,modalTransition:OL,onClosed:A.func,onEnter:A.func,onExit:A.func,onOpened:A.func,returnFocusAfterClose:A.bool,role:A.string,scrollable:A.bool,size:A.string,toggle:A.func,trapFocus:A.bool,unmountOnClose:A.bool,wrapClassName:A.string,zIndex:A.oneOfType([A.number,A.string])},GJ=Object.keys(qI),qJ={isOpen:!1,autoFocus:!0,centered:!1,scrollable:!1,role:"dialog",backdrop:!0,keyboard:!0,zIndex:1050,fade:!0,onOpened:Mv,onClosed:Mv,modalTransition:{timeout:pv.Modal},backdropTransition:{mountOnEnter:!0,timeout:pv.Fade},unmountOnClose:!0,returnFocusAfterClose:!0,container:"body",trapFocus:!1},qh=function(e){VJ(n,e);var t=HJ(n);function n(r){var i;return BJ(this,n),i=t.call(this,r),i._element=null,i._originalBodyPadding=null,i.getFocusableChildren=i.getFocusableChildren.bind(di(i)),i.handleBackdropClick=i.handleBackdropClick.bind(di(i)),i.handleBackdropMouseDown=i.handleBackdropMouseDown.bind(di(i)),i.handleEscape=i.handleEscape.bind(di(i)),i.handleStaticBackdropAnimation=i.handleStaticBackdropAnimation.bind(di(i)),i.handleTab=i.handleTab.bind(di(i)),i.onOpened=i.onOpened.bind(di(i)),i.onClosed=i.onClosed.bind(di(i)),i.manageFocusAfterClose=i.manageFocusAfterClose.bind(di(i)),i.clearBackdropAnimationTimeout=i.clearBackdropAnimationTimeout.bind(di(i)),i.trapFocus=i.trapFocus.bind(di(i)),i.state={isOpen:!1,showStaticBackdropAnimation:!1},i}return zJ(n,[{key:"componentDidMount",value:function(){var i=this.props,o=i.isOpen,a=i.autoFocus,s=i.onEnter;o&&(this.init(),this.setState({isOpen:!0}),a&&this.setFocus()),s&&s(),document.addEventListener("focus",this.trapFocus,!0),this._isMounted=!0}},{key:"componentDidUpdate",value:function(i,o){if(this.props.isOpen&&!i.isOpen){this.init(),this.setState({isOpen:!0});return}this.props.autoFocus&&this.state.isOpen&&!o.isOpen&&this.setFocus(),this._element&&i.zIndex!==this.props.zIndex&&(this._element.style.zIndex=this.props.zIndex)}},{key:"componentWillUnmount",value:function(){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}},{key:"handleBackdropClick",value:function(i){if(i.target===this._mouseDownElement){i.stopPropagation();var o=this._dialog?this._dialog.parentNode:null;if(o&&i.target===o&&this.props.backdrop==="static"&&this.handleStaticBackdropAnimation(),!this.props.isOpen||this.props.backdrop!==!0)return;o&&i.target===o&&this.props.toggle&&this.props.toggle(i)}}},{key:"handleTab",value:function(i){if(i.which===9&&!(this.modalIndex0&&(i.preventDefault(),i.stopPropagation(),o[0].focus())}}},{key:"init",value:function(){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=rh(this.props.container),this._mountContainer.appendChild(this._element)),this._originalBodyPadding=zq(),n.openCount<1&&(n.originalBodyOverflow=window.getComputedStyle(document.body).overflow),Vq(),n.openCount===0&&(document.body.className=Ve(document.body.className,He("modal-open",this.props.cssModule)),document.body.style.overflow="hidden"),this.modalIndex=n.openCount,n.openCount+=1}},{key:"destroy",value:function(){this._element&&(this._mountContainer.removeChild(this._element),this._element=null),this.manageFocusAfterClose()}},{key:"manageFocusAfterClose",value:function(){if(this._triggeringElement){var i=this.props.returnFocusAfterClose;this._triggeringElement.focus&&i&&this._triggeringElement.focus(),this._triggeringElement=null}}},{key:"close",value:function(){if(n.openCount<=1){var i=He("modal-open",this.props.cssModule),o=new RegExp("(^| )".concat(i,"( |$)"));document.body.className=document.body.className.replace(o," ").trim(),document.body.style.overflow=n.originalBodyOverflow}this.manageFocusAfterClose(),n.openCount=Math.max(0,n.openCount-1),cI(this._originalBodyPadding)}},{key:"clearBackdropAnimationTimeout",value:function(){this._backdropAnimationTimeout&&(clearTimeout(this._backdropAnimationTimeout),this._backdropAnimationTimeout=void 0)}},{key:"renderModalDialog",value:function(){var i,o=this,a=_s(this.props,GJ),s="modal-dialog";return W.createElement("div",uf({},a,{className:He(Ve(s,this.props.className,(i={},yc(i,"modal-".concat(this.props.size),this.props.size),yc(i,"".concat(s,"-centered"),this.props.centered),yc(i,"".concat(s,"-scrollable"),this.props.scrollable),yc(i,"modal-fullscreen",this.props.fullscreen===!0),yc(i,"modal-fullscreen-".concat(this.props.fullscreen,"-down"),typeof this.props.fullscreen=="string"),i)),this.props.cssModule),role:"document",ref:function(c){o._dialog=c}}),W.createElement("div",{className:He(Ve("modal-content",this.props.contentClassName),this.props.cssModule)},this.props.children))}},{key:"render",value:function(){var i=this.props.unmountOnClose;if(this._element&&(this.state.isOpen||!i)){var o=!!this._element&&!this.state.isOpen&&!i;this._element.style.display=o?"none":"block";var a=this.props,s=a.wrapClassName,l=a.modalClassName,c=a.backdropClassName,d=a.cssModule,f=a.isOpen,p=a.backdrop,m=a.role,v=a.labelledBy,y=a.external,x=a.innerRef,_={onClick:this.handleBackdropClick,onMouseDown:this.handleBackdropMouseDown,onKeyUp:this.handleEscape,onKeyDown:this.handleTab,style:{display:"block"},"aria-labelledby":v,"aria-modal":!0,role:m,tabIndex:"-1"},w=this.props.fade,S=sc(sc(sc({},wr.defaultProps),this.props.modalTransition),{},{baseClass:w?this.props.modalTransition.baseClass:"",timeout:w?this.props.modalTransition.timeout:0}),E=sc(sc(sc({},wr.defaultProps),this.props.backdropTransition),{},{baseClass:w?this.props.backdropTransition.baseClass:"",timeout:w?this.props.backdropTransition.timeout:0}),C=p&&(w?W.createElement(wr,uf({},E,{in:f&&!!p,cssModule:d,className:He(Ve("modal-backdrop",c),d)})):W.createElement("div",{className:He(Ve("modal-backdrop","show",c),d)}));return W.createElement(UJ,{node:this._element},W.createElement("div",{className:He(s)},W.createElement(wr,uf({},_,S,{in:f,onEntered:this.onOpened,onExited:this.onClosed,cssModule:d,className:He(Ve("modal",l,this.state.showStaticBackdropAnimation&&"modal-static"),d),innerRef:x}),y,this.renderModalDialog()),C))}return null}}]),n}(W.Component);qh.propTypes=qI;qh.defaultProps=qJ;qh.openCount=0;qh.originalBodyOverflow=null;const fa=qh;var KJ=["className","cssModule","children","toggle","tag","wrapTag","closeAriaLabel","close"];function hx(){return hx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function QJ(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}var XJ={children:A.node,className:A.string,close:A.object,closeAriaLabel:A.string,cssModule:A.object,tag:it,toggle:A.func,wrapTag:it};function ha(e){var t,n=e.className,r=e.cssModule,i=e.children,o=e.toggle,a=e.tag,s=a===void 0?"h5":a,l=e.wrapTag,c=l===void 0?"div":l,d=e.closeAriaLabel,f=d===void 0?"Close":d,p=e.close,m=ZJ(e,KJ),v=He(Ve(n,"modal-header"),r);return!p&&o&&(t=W.createElement("button",{type:"button",onClick:o,className:He("btn-close",r),"aria-label":f})),W.createElement(c,hx({},m,{className:v}),W.createElement(s,{className:He("modal-title",r)},i),p||t)}ha.propTypes=XJ;var JJ=["className","cssModule","tag"];function px(){return px=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function tee(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}var nee={className:A.string,cssModule:A.object,tag:it};function Co(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=eee(e,JJ),a=He(Ve(t,"modal-body"),n);return W.createElement(i,px({},o,{className:a}))}Co.propTypes=nee;var ree=["className","cssModule","tag"];function mx(){return mx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function oee(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}var aee={className:A.string,cssModule:A.object,tag:it};function Il(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=iee(e,ree),a=He(Ve(t,"modal-footer"),n);return W.createElement(i,mx({},o,{className:a}))}Il.propTypes=aee;function gx(){return gx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function uee(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}var dee={className:A.string,cssModule:A.object,flush:A.bool,horizontal:A.oneOfType([A.bool,A.string]),numbered:A.bool,tag:it},fee=function(t){return t===!1?!1:t===!0||t==="xs"?"list-group-horizontal":"list-group-horizontal-".concat(t)};function KI(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"ul":r,o=e.flush,a=e.horizontal,s=a===void 0?!1:a,l=e.numbered,c=l===void 0?!1:l,d=cee(e,lee),f=He(Ve(t,"list-group",o?"list-group-flush":fee(s),{"list-group-numbered":c}),n);return W.createElement(i,vx({},d,{className:f}))}KI.propTypes=dee;var hee=["className","cssModule","row","disabled","check","inline","floating","tag","switch"];function yx(){return yx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function mee(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}var gee={children:A.node,row:A.bool,check:A.bool,switch:A.bool,inline:A.bool,floating:A.bool,disabled:A.bool,tag:it,className:A.string,cssModule:A.object};function Hr(e){var t=e.className,n=e.cssModule,r=e.row,i=e.disabled,o=e.check,a=e.inline,s=e.floating,l=e.tag,c=l===void 0?"div":l,d=e.switch,f=pee(e,hee),p=o||d,m=He(Ve(t,r?"row":!1,p?"form-check":"mb-3",d?"form-switch":!1,p&&a?"form-check-inline":!1,p&&i?"disabled":!1,s&&"form-floating"),n);return c==="fieldset"&&(f.disabled=i),W.createElement(c,yx({},f,{className:m}))}Hr.propTypes=gee;function _x(e){"@babel/helpers - typeof";return _x=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},_x(e)}var vee=["className","cssModule","type","bsSize","valid","invalid","tag","addon","plaintext","innerRef"];function bx(){return bx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function _ee(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 bee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function CL(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.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Av(e)}var Oee={children:A.node,type:A.string,size:A.oneOfType([A.number,A.string]),bsSize:A.string,valid:A.bool,invalid:A.bool,tag:it,innerRef:A.oneOfType([A.object,A.func,A.string]),plaintext:A.bool,addon:A.bool,className:A.string,cssModule:A.object},ZI=function(e){xee(n,e);var t=See(n);function n(r){var i;return bee(this,n),i=t.call(this,r),i.getRef=i.getRef.bind(xx(i)),i.focus=i.focus.bind(xx(i)),i}return wee(n,[{key:"getRef",value:function(i){this.props.innerRef&&this.props.innerRef(i),this.ref=i}},{key:"focus",value:function(){this.ref&&this.ref.focus()}},{key:"render",value:function(){var i=this.props,o=i.className,a=i.cssModule,s=i.type,l=s===void 0?"text":s,c=i.bsSize,d=i.valid,f=i.invalid,p=i.tag,m=i.addon,v=i.plaintext,y=i.innerRef,x=yee(i,vee),_=["switch","radio","checkbox"].indexOf(l)>-1,w=/\D/g,S=l==="textarea",E=l==="select",C=l==="range",k=p||(E||S?l:"input"),j="form-control";v?(j="".concat(j,"-plaintext"),k=p||"input"):C?j="form-range":E?j="form-select":_&&(m?j=null:j="form-check-input"),x.size&&w.test(x.size)&&(yw(`Please use the prop "bsSize" instead of the "size" to bootstrap's input sizing.`),c=x.size,delete x.size);var N=He(Ve(o,f&&"is-invalid",d&&"is-valid",c?E?"form-select-".concat(c):"form-control-".concat(c):!1,j),a);return(k==="input"||p&&typeof p=="function")&&(x.type=l==="switch"?"checkbox":l),x.children&&!(v||l==="select"||typeof k!="string"||k==="select")&&(yw('Input with a type of "'.concat(l,'" cannot have children. Please use "value"/"defaultValue" instead.')),delete x.children),W.createElement(k,bx({},x,{ref:y,className:N,"aria-invalid":f}))}}]),n}(W.Component);ZI.propTypes=Oee;const yu=ZI;var Cee=["className","cssModule","tag","type","size"];function Nv(){return Nv=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Pee(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}var Lee={className:A.string,cssModule:A.object,size:A.string,tag:it,type:A.string};function h0(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r;e.type;var o=e.size,a=kee(e,Cee),s=He(Ve(t,"input-group",o?"input-group-".concat(o):null),n);return e.type==="dropdown"?W.createElement(Yh,Nv({},a,{className:s})):W.createElement(RI.Provider,{value:{insideInputGroup:!0}},W.createElement(i,Nv({},a,{className:s})))}h0.propTypes=Lee;var jee=["className","listClassName","cssModule","size","tag","listTag","aria-label"];function Sx(){return Sx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Nee(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}var Ree={children:A.node,className:A.string,listClassName:A.string,cssModule:A.object,size:A.string,tag:it,listTag:it,"aria-label":A.string};function UE(e){var t=e.className,n=e.listClassName,r=e.cssModule,i=e.size,o=e.tag,a=o===void 0?"nav":o,s=e.listTag,l=s===void 0?"ul":s,c=e["aria-label"],d=c===void 0?"pagination":c,f=Aee(e,jee),p=He(Ve(t),r),m=He(Ve(n,"pagination",Mee({},"pagination-".concat(i),!!i)),r);return W.createElement(a,{className:p,"aria-label":d},W.createElement(l,Sx({},f,{className:m})))}UE.propTypes=Ree;var Dee=["active","className","cssModule","disabled","tag"];function Ex(){return Ex=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Fee(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}var $ee={active:A.bool,children:A.node,className:A.string,cssModule:A.object,disabled:A.bool,tag:it};function sl(e){var t=e.active,n=e.className,r=e.cssModule,i=e.disabled,o=e.tag,a=o===void 0?"li":o,s=Iee(e,Dee),l=He(Ve(n,"page-item",{active:t,disabled:i}),r);return W.createElement(a,Ex({},s,{className:l}))}sl.propTypes=$ee;var Uee=["className","cssModule","next","previous","first","last","tag"];function Tx(){return Tx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function zee(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}var Vee={"aria-label":A.string,children:A.node,className:A.string,cssModule:A.object,next:A.bool,previous:A.bool,first:A.bool,last:A.bool,tag:it};function ll(e){var t=e.className,n=e.cssModule,r=e.next,i=e.previous,o=e.first,a=e.last,s=e.tag,l=s===void 0?"a":s,c=Bee(e,Uee),d=He(Ve(t,"page-link"),n),f;i?f="Previous":r?f="Next":o?f="First":a&&(f="Last");var p=e["aria-label"]||f,m;i?m="‹":r?m="›":o?m="«":a&&(m="»");var v=e.children;return v&&Array.isArray(v)&&v.length===0&&(v=null),!c.href&&l==="a"&&(l="button"),(i||r||o||a)&&(v=[W.createElement("span",{"aria-hidden":"true",key:"caret"},v||m),W.createElement("span",{className:"visually-hidden",key:"ariaLabel"},p)]),W.createElement(l,Tx({},c,{className:d,"aria-label":p}),v)}ll.propTypes=Vee;var Hee=["className","closeClassName","closeAriaLabel","cssModule","tag","color","isOpen","toggle","children","transition","fade","innerRef"];function Ox(){return Ox=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Gee(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}var qee={children:A.node,className:A.string,closeClassName:A.string,closeAriaLabel:A.string,color:A.string,cssModule:A.object,fade:A.bool,innerRef:A.oneOfType([A.object,A.string,A.func]),isOpen:A.bool,tag:it,toggle:A.func,transition:A.shape(wr.propTypes)};function QI(e){var t=e.className,n=e.closeClassName,r=e.closeAriaLabel,i=r===void 0?"Close":r,o=e.cssModule,a=e.tag,s=a===void 0?"div":a,l=e.color,c=l===void 0?"success":l,d=e.isOpen,f=d===void 0?!0:d,p=e.toggle,m=e.children,v=e.transition,y=v===void 0?wd(wd({},wr.defaultProps),{},{unmountOnExit:!0}):v,x=e.fade,_=x===void 0?!0:x,w=e.innerRef,S=Yee(e,Hee),E=He(Ve(t,"alert","alert-".concat(c),{"alert-dismissible":p}),o),C=He(Ve("btn-close",n),o),k=wd(wd(wd({},wr.defaultProps),y),{},{baseClass:_?y.baseClass:"",timeout:_?y.timeout:0});return W.createElement(wr,Ox({},S,k,{tag:s,className:E,in:f,role:"alert",innerRef:w}),p?W.createElement("button",{type:"button",className:C,"aria-label":i,onClick:p}):null,m)}QI.propTypes=qee;var Kee=["className","cssModule","tag","active","disabled","action","color"];function Cx(){return Cx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Qee(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}var Xee={action:A.bool,active:A.bool,className:A.string,cssModule:A.object,color:A.string,disabled:A.bool,tag:it},Jee=function(t){t.preventDefault()};function XI(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"li":r,o=e.active,a=e.disabled,s=e.action,l=e.color,c=Zee(e,Kee),d=He(Ve(t,o?"active":!1,a?"disabled":!1,s?"list-group-item-action":!1,l?"list-group-item-".concat(l):!1,"list-group-item"),n);return a&&(c.onClick=Jee),W.createElement(i,Cx({},c,{className:d}))}XI.propTypes=Xee;function kx(e){"@babel/helpers - typeof";return kx=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},kx(e)}function PL(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 ete(e){for(var t=1;t"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.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Rv(e)}var lte=["defaultOpen"],Zh=function(e){ite(n,e);var t=ote(n);function n(r){var i;return nte(this,n),i=t.call(this,r),i.state={isOpen:r.defaultOpen||!1},i.toggle=i.toggle.bind(JI(i)),i}return rte(n,[{key:"toggle",value:function(i){var o=this;this.setState(function(a){return{isOpen:!a.isOpen}},function(){o.props.onToggle&&o.props.onToggle(i,o.state.isOpen)})}},{key:"render",value:function(){return W.createElement(Yh,Px({isOpen:this.state.isOpen,toggle:this.toggle},_s(this.props,lte)))}}]),n}(F.Component);Zh.propTypes=ete({defaultOpen:A.bool,onToggle:A.func},Yh.propTypes);function jx(e){"@babel/helpers - typeof";return jx=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},jx(e)}function jL(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 cte(e){for(var t=1;t"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.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Dv(e)}var vte=["defaultOpen"],Fr=function(e){hte(n,e);var t=pte(n);function n(r){var i;return dte(this,n),i=t.call(this,r),i.state={isOpen:r.defaultOpen||!1},i.toggle=i.toggle.bind(e6(i)),i}return fte(n,[{key:"toggle",value:function(){this.setState(function(i){return{isOpen:!i.isOpen}})}},{key:"render",value:function(){return W.createElement(Kh,Mx({isOpen:this.state.isOpen,toggle:this.toggle},_s(this.props,vte)))}}]),n}(F.Component);Fr.propTypes=cte({defaultOpen:A.bool},Kh.propTypes);function t6(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function yte(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):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 n6={exports:{}};/*! + 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;i({error:"border-danger",default:""})[e],wte=e=>({error:"text-danger",default:"text-muted"})[e],Go=({className:e,children:t,loading:n=!1,type:r="default",fullWidth:i=!1})=>{const o=bi({"col-md-12":i,"col-md-10 offset-md-1":!i});return g.jsx(br,{className:bi("g-0",e),children:g.jsx("div",{className:o,children:g.jsx(Xr,{className:bte(r),body:!0,children:g.jsxs("h3",{className:bi("text-center mb-0",wte(r)),children:[n&&g.jsx(De,{icon:S4,spin:!0}),n&&g.jsx("span",{className:"ms-2",children:t??"Loading..."}),!n&&t]})})})})},vn=({title:e,children:t,bodyClassName:n,...r})=>g.jsxs(Xr,{...r,children:[e&&g.jsx(vu,{role:"heading",children:e}),g.jsx(gu,{className:n,children:t})]}),qr=({children:e,type:t,className:n,small:r=!1})=>g.jsx(br,{className:n,children:g.jsx("div",{className:bi({"col-md-10 offset-md-1":!r,"col-12":r}),children:g.jsx(vn,{role:"document",className:bi("text-center",{"bg-main":t==="success","bg-danger":t==="error","bg-warning":t==="warning","text-white":t!=="warning"}),bodyClassName:bi({"p-2":r}),children:e})})});let gm;const xte=new Uint8Array(16);function Ste(){if(!gm&&(gm=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!gm))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return gm(xte)}const Kn=[];for(let e=0;e<256;++e)Kn.push((e+256).toString(16).slice(1));function Ete(e,t=0){return(Kn[e[t+0]]+Kn[e[t+1]]+Kn[e[t+2]]+Kn[e[t+3]]+"-"+Kn[e[t+4]]+Kn[e[t+5]]+"-"+Kn[e[t+6]]+Kn[e[t+7]]+"-"+Kn[e[t+8]]+Kn[e[t+9]]+"-"+Kn[e[t+10]]+Kn[e[t+11]]+Kn[e[t+12]]+Kn[e[t+13]]+Kn[e[t+14]]+Kn[e[t+15]]).toLowerCase()}const Tte=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),AL={randomUUID:Tte};function Ote(e,t,n){if(AL.randomUUID&&!t&&!e)return AL.randomUUID();e=e||{};const r=e.random||(e.rng||Ste)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return Ete(r)}const _n=(e=!1)=>{const[t,n]=F.useState(e);return[t,()=>n(!t),()=>n(!0),()=>n(!1)]},p0=()=>{const{current:e}=F.useRef(`dom-${Ote()}`);return e},ws=()=>F.useRef(null),r6=({checked:e=!1,onChange:t,className:n,children:r,type:i,inline:o=!1})=>{const a=p0(),s=d=>t==null?void 0:t(d.target.checked,d),l={"form-switch":i==="switch","form-checkbox":i==="checkbox"},c=o?{display:"inline-block"}:{};return g.jsxs("span",{className:bi("form-check",l,n),style:c,children:[g.jsx("input",{type:"checkbox",className:"form-check-input",id:a,checked:e,onChange:s}),g.jsx("label",{className:"form-check-label",htmlFor:a,children:r})]})},i6=e=>g.jsx(r6,{type:"checkbox",...e}),_u=e=>g.jsx(r6,{type:"switch",...e}),Hu=({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]}),hg=({children:e,value:t,onChange:n,type:r,required:i,placeholder:o,className:a,labelClassName:s})=>{const l=p0();return g.jsx(Hu,{label:g.jsxs(g.Fragment,{children:[e,":"]}),className:a??"",labelClassName:s,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)})})},Cte=500;let pg;const NL=()=>{pg&&clearTimeout(pg),pg=null},Qh=({onChange:e,className:t,large:n=!0,noBorder:r=!1,initialValue:i="",setTimeout_:o=setTimeout})=>{const[a,s]=F.useState(i),l=(c,d=Cte)=>{s(c),NL(),pg=o(()=>{e(c),NL()},d)};return g.jsxs("div",{className:bi("search-field",t),children:[g.jsx("input",{type:"text",className:bi("form-control search-field__input",{"form-control-lg":n,"search-field__input--no-border":r}),placeholder:"Search...",value:a,onChange:c=>l(c.target.value)}),g.jsx(De,{icon:LY,className:"search-field__icon"}),g.jsx("button",{"aria-label":"Clear search",type:"button",className:"close search-field__close btn-close",hidden:a==="",id:"search-field__close",onClick:()=>l("",0)})]})},pa=({text:e,disabled:t=!1,className:n,children:r,dropdownClassName:i,noCaret:o,end:a=!1,minWidth:s,inline:l,size:c})=>{const[d,f]=_n(),p=bi("dropdown-btn__toggle",n,{"btn-block":!l,"dropdown-btn__toggle--with-caret":!o}),m={minWidth:s&&`${s}px`};return g.jsxs(Yh,{isOpen:d,toggle:f,disabled:t,className:i,children:[g.jsx(Gh,{size:c,caret:!o,className:p,color:"primary",children:e}),g.jsx(zu,{className:"w-100",end:a,style:m,children:r})]})},m0=({children:e,minWidth:t})=>g.jsx(pa,{text:g.jsx(De,{className:"px-1",icon:wY}),size:"sm",minWidth:t,end:!0,noCaret:!0,inline:!0,children:e}),df=({children:e,...t})=>g.jsx(_I,{className:"nav-pills__nav-link",tag:t4,...t,children:e}),o6=({children:e,fill:t=!1,className:n=""})=>g.jsx(Xr,{className:`nav-pills__nav p-0 overflow-hidden ${n}`,body:!0,children:g.jsx(OE,{pills:!0,fill:t,children:F.Children.map(e,r=>{if(!F.isValidElement(r)||r.type!==df)throw new Error("Only NavPillItem children are allowed inside NavPills.");return r})})}),g0=(e,t,n)=>e!==t?"ASC":n?{ASC:"DESC",DESC:void 0}[n]:"ASC",a6=(e,{field:t,dir:n})=>!t||!n?e:e.sort((r,i)=>{const o=n==="ASC"?1:-1,a=n==="ASC"?-1:1;return r[t]>i[t]?o:a}),s6=e=>e.dir?`${e.field}-${e.dir}`:void 0,kte=e=>{const[t,n]=e.split("-");return{field:t,dir:n}};function Xh({items:e,order:t,onChange:n,isButton:r=!0,right:i=!1,prefixed:o=!0}){const a=s=>()=>{const l=g0(s,t.field,t.dir);n(l?s:void 0,l)};return g.jsxs(Zh,{children:[g.jsxs(Gh,{caret:!0,color:r?"primary":"link",className:bi({"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(zu,{end:i,className:bi("w-100",{"ordering-dropdown__menu--link":!r}),children:[Object.entries(e).map(([s,l])=>g.jsxs(Ue,{active:t.field===s,onClick:a(s),children:[l,t.field===s&&g.jsx(De,{icon:t.dir==="ASC"?TY:dY,className:"ordering-dropdown__sort-icon"})]},s)),g.jsx(Ue,{divider:!0}),g.jsx(Ue,{disabled:!t.field,onClick:()=>n(),children:g.jsx("i",{children:"Clear selection"})})]})]})}const BE="#4696e5",Pte="rgba(70, 150, 229, 0.4)",l6="#f77f28",Lte="rgba(247, 127, 40, 0.4)",jte="white",Mte="#161b22",c6=e=>{var t;return(t=document.querySelector("html"))==null?void 0:t.setAttribute("data-theme",e)},Ate=()=>{var e;return((e=document.querySelector("html"))==null?void 0:e.getAttribute("data-theme"))==="dark"};var Nte=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var r=42;e[t]=r;for(t in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var i=Object.getOwnPropertySymbols(e);if(i.length!==1||i[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==r||o.enumerable!==!0)return!1}return!0},RL=typeof Symbol<"u"&&Symbol,Rte=Nte,Dte=function(){return typeof RL!="function"||typeof Symbol!="function"||typeof RL("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Rte()},DL={foo:{}},Ite=Object,Fte=function(){return{__proto__:DL}.foo===DL.foo&&!({__proto__:null}instanceof Ite)},$te="Function.prototype.bind called on incompatible ",J_=Array.prototype.slice,Ute=Object.prototype.toString,Bte="[object Function]",zte=function(e){var t=this;if(typeof t!="function"||Ute.call(t)!==Bte)throw new TypeError($te+t);for(var n=J_.call(arguments,1),r,i=function(){if(this instanceof r){var c=t.apply(this,n.concat(J_.call(arguments)));return Object(c)===c?c:this}else return t.apply(e,n.concat(J_.call(arguments)))},o=Math.max(0,t.length-n.length),a=[],s=0;s"u"||!Mn?at:Mn(Uint8Array),ul={"%AggregateError%":typeof AggregateError>"u"?at:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?at:ArrayBuffer,"%ArrayIteratorPrototype%":lc&&Mn?Mn([][Symbol.iterator]()):at,"%AsyncFromSyncIteratorPrototype%":at,"%AsyncFunction%":_c,"%AsyncGenerator%":_c,"%AsyncGeneratorFunction%":_c,"%AsyncIteratorPrototype%":_c,"%Atomics%":typeof Atomics>"u"?at:Atomics,"%BigInt%":typeof BigInt>"u"?at:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?at:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?at:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?at:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?at:Float32Array,"%Float64Array%":typeof Float64Array>"u"?at:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?at:FinalizationRegistry,"%Function%":u6,"%GeneratorFunction%":_c,"%Int8Array%":typeof Int8Array>"u"?at:Int8Array,"%Int16Array%":typeof Int16Array>"u"?at:Int16Array,"%Int32Array%":typeof Int32Array>"u"?at:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":lc&&Mn?Mn(Mn([][Symbol.iterator]())):at,"%JSON%":typeof JSON=="object"?JSON:at,"%Map%":typeof Map>"u"?at:Map,"%MapIteratorPrototype%":typeof Map>"u"||!lc||!Mn?at:Mn(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?at:Promise,"%Proxy%":typeof Proxy>"u"?at:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?at:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?at:Set,"%SetIteratorPrototype%":typeof Set>"u"||!lc||!Mn?at:Mn(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?at:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":lc&&Mn?Mn(""[Symbol.iterator]()):at,"%Symbol%":lc?Symbol:at,"%SyntaxError%":bu,"%ThrowTypeError%":Yte,"%TypedArray%":qte,"%TypeError%":Kc,"%Uint8Array%":typeof Uint8Array>"u"?at:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?at:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?at:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?at:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?at:WeakMap,"%WeakRef%":typeof WeakRef>"u"?at:WeakRef,"%WeakSet%":typeof WeakSet>"u"?at:WeakSet};if(Mn)try{null.error}catch(e){var Kte=Mn(Mn(e));ul["%Error.prototype%"]=Kte}var Zte=function e(t){var n;if(t==="%AsyncFunction%")n=e1("async function () {}");else if(t==="%GeneratorFunction%")n=e1("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=e1("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&Mn&&(n=Mn(i.prototype))}return ul[t]=n,n},IL={"%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"]},Jh=zE,Iv=Wte,Qte=Jh.call(Function.call,Array.prototype.concat),Xte=Jh.call(Function.apply,Array.prototype.splice),FL=Jh.call(Function.call,String.prototype.replace),Fv=Jh.call(Function.call,String.prototype.slice),Jte=Jh.call(Function.call,RegExp.prototype.exec),ene=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,tne=/\\(\\)?/g,nne=function(e){var t=Fv(e,0,1),n=Fv(e,-1);if(t==="%"&&n!=="%")throw new bu("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new bu("invalid intrinsic syntax, expected opening `%`");var r=[];return FL(e,ene,function(i,o,a,s){r[r.length]=a?FL(s,tne,"$1"):o||i}),r},rne=function(e,t){var n=e,r;if(Iv(IL,n)&&(r=IL[n],n="%"+r[0]+"%"),Iv(ul,n)){var i=ul[n];if(i===_c&&(i=Zte(n)),typeof i>"u"&&!t)throw new Kc("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new bu("intrinsic "+e+" does not exist!")},VE=function(e,t){if(typeof e!="string"||e.length===0)throw new Kc("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new Kc('"allowMissing" argument must be a boolean');if(Jte(/^%?[^%]*%?$/,e)===null)throw new bu("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=nne(e),r=n.length>0?n[0]:"",i=rne("%"+r+"%",t),o=i.name,a=i.value,s=!1,l=i.alias;l&&(r=l[0],Xte(n,Qte([0,1],l)));for(var c=1,d=!0;c=n.length){var v=cl(a,f);d=!!v,d&&"get"in v&&!("originalValue"in v.get)?a=v.get:a=a[f]}else d=Iv(a,f),a=a[f];d&&!s&&(ul[o]=a)}}return a},d6={exports:{}};(function(e){var t=zE,n=VE,r=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),o=n("%Reflect.apply%",!0)||t.call(i,r),a=n("%Object.getOwnPropertyDescriptor%",!0),s=n("%Object.defineProperty%",!0),l=n("%Math.max%");if(s)try{s({},"a",{value:1})}catch{s=null}e.exports=function(d){var f=o(t,i,arguments);if(a&&s){var p=a(f,"length");p.configurable&&s(f,"length",{value:1+l(0,d.length-(arguments.length-1))})}return f};var c=function(){return o(t,r,arguments)};s?s(e.exports,"apply",{value:c}):e.exports.apply=c})(d6);var ine=d6.exports,f6=VE,h6=ine,one=h6(f6("String.prototype.indexOf")),ane=function(e,t){var n=f6(e,!!t);return typeof n=="function"&&one(e,".prototype.")>-1?h6(n):n};const sne={},lne=Object.freeze(Object.defineProperty({__proto__:null,default:sne},Symbol.toStringTag,{value:"Module"})),cne=yte(lne);var HE=typeof Map=="function"&&Map.prototype,n1=Object.getOwnPropertyDescriptor&&HE?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,$v=HE&&n1&&typeof n1.get=="function"?n1.get:null,$L=HE&&Map.prototype.forEach,WE=typeof Set=="function"&&Set.prototype,r1=Object.getOwnPropertyDescriptor&&WE?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Uv=WE&&r1&&typeof r1.get=="function"?r1.get:null,UL=WE&&Set.prototype.forEach,une=typeof WeakMap=="function"&&WeakMap.prototype,ff=une?WeakMap.prototype.has:null,dne=typeof WeakSet=="function"&&WeakSet.prototype,hf=dne?WeakSet.prototype.has:null,fne=typeof WeakRef=="function"&&WeakRef.prototype,BL=fne?WeakRef.prototype.deref:null,hne=Boolean.prototype.valueOf,pne=Object.prototype.toString,mne=Function.prototype.toString,gne=String.prototype.match,YE=String.prototype.slice,Fa=String.prototype.replace,vne=String.prototype.toUpperCase,zL=String.prototype.toLowerCase,p6=RegExp.prototype.test,VL=Array.prototype.concat,so=Array.prototype.join,yne=Array.prototype.slice,HL=Math.floor,Nx=typeof BigInt=="function"?BigInt.prototype.valueOf:null,i1=Object.getOwnPropertySymbols,Rx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,wu=typeof Symbol=="function"&&typeof Symbol.iterator=="object",ur=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===wu||"symbol")?Symbol.toStringTag:null,m6=Object.prototype.propertyIsEnumerable,WL=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function YL(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||p6.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-HL(-e):HL(e);if(r!==e){var i=String(r),o=YE.call(t,i.length+1);return Fa.call(i,n,"$&_")+"."+Fa.call(Fa.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Fa.call(t,n,"$&_")}var Dx=cne,GL=Dx.custom,qL=v6(GL)?GL:null,_ne=function e(t,n,r,i){var o=n||{};if(Pa(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Pa(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 a=Pa(o,"customInspect")?o.customInspect:!0;if(typeof a!="boolean"&&a!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Pa(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(Pa(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=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 _6(t,o);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return s?YL(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return s?YL(t,c):c}var d=typeof o.depth>"u"?5:o.depth;if(typeof r>"u"&&(r=0),r>=d&&d>0&&typeof t=="object")return Ix(t)?"[Array]":"[Object]";var f=Ine(o,r);if(typeof i>"u")i=[];else if(y6(i,t)>=0)return"[Circular]";function p(X,G,Z){if(G&&(i=yne.call(i),i.push(G)),Z){var te={depth:o.depth};return Pa(o,"quoteStyle")&&(te.quoteStyle=o.quoteStyle),e(X,te,r+1,i)}return e(X,o,r+1,i)}if(typeof t=="function"&&!KL(t)){var m=kne(t),v=vm(t,p);return"[Function"+(m?": "+m:" (anonymous)")+"]"+(v.length>0?" { "+so.call(v,", ")+" }":"")}if(v6(t)){var y=wu?Fa.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Rx.call(t);return typeof t=="object"&&!wu?xd(y):y}if(Nne(t)){for(var x="<"+zL.call(String(t.nodeName)),_=t.attributes||[],w=0;w<_.length;w++)x+=" "+_[w].name+"="+g6(bne(_[w].value),"double",o);return x+=">",t.childNodes&&t.childNodes.length&&(x+="..."),x+="",x}if(Ix(t)){if(t.length===0)return"[]";var S=vm(t,p);return f&&!Dne(S)?"["+Fx(S,f)+"]":"[ "+so.call(S,", ")+" ]"}if(xne(t)){var E=vm(t,p);return!("cause"in Error.prototype)&&"cause"in t&&!m6.call(t,"cause")?"{ ["+String(t)+"] "+so.call(VL.call("[cause]: "+p(t.cause),E),", ")+" }":E.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+so.call(E,", ")+" }"}if(typeof t=="object"&&a){if(qL&&typeof t[qL]=="function"&&Dx)return Dx(t,{depth:d-r});if(a!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(Pne(t)){var C=[];return $L&&$L.call(t,function(X,G){C.push(p(G,t,!0)+" => "+p(X,t))}),ZL("Map",$v.call(t),C,f)}if(Mne(t)){var k=[];return UL&&UL.call(t,function(X){k.push(p(X,t))}),ZL("Set",Uv.call(t),k,f)}if(Lne(t))return o1("WeakMap");if(Ane(t))return o1("WeakSet");if(jne(t))return o1("WeakRef");if(Ene(t))return xd(p(Number(t)));if(One(t))return xd(p(Nx.call(t)));if(Tne(t))return xd(hne.call(t));if(Sne(t))return xd(p(String(t)));if(!wne(t)&&!KL(t)){var j=vm(t,p),N=WL?WL(t)===Object.prototype:t instanceof Object||t.constructor===Object,U=t instanceof Object?"":"null prototype",R=!N&&ur&&Object(t)===t&&ur in t?YE.call(xs(t),8,-1):U?"Object":"",V=N||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",Y=V+(R||U?"["+so.call(VL.call([],R||[],U||[]),": ")+"] ":"");return j.length===0?Y+"{}":f?Y+"{"+Fx(j,f)+"}":Y+"{ "+so.call(j,", ")+" }"}return String(t)};function g6(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function bne(e){return Fa.call(String(e),/"/g,""")}function Ix(e){return xs(e)==="[object Array]"&&(!ur||!(typeof e=="object"&&ur in e))}function wne(e){return xs(e)==="[object Date]"&&(!ur||!(typeof e=="object"&&ur in e))}function KL(e){return xs(e)==="[object RegExp]"&&(!ur||!(typeof e=="object"&&ur in e))}function xne(e){return xs(e)==="[object Error]"&&(!ur||!(typeof e=="object"&&ur in e))}function Sne(e){return xs(e)==="[object String]"&&(!ur||!(typeof e=="object"&&ur in e))}function Ene(e){return xs(e)==="[object Number]"&&(!ur||!(typeof e=="object"&&ur in e))}function Tne(e){return xs(e)==="[object Boolean]"&&(!ur||!(typeof e=="object"&&ur in e))}function v6(e){if(wu)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Rx)return!1;try{return Rx.call(e),!0}catch{}return!1}function One(e){if(!e||typeof e!="object"||!Nx)return!1;try{return Nx.call(e),!0}catch{}return!1}var Cne=Object.prototype.hasOwnProperty||function(e){return e in this};function Pa(e,t){return Cne.call(e,t)}function xs(e){return pne.call(e)}function kne(e){if(e.name)return e.name;var t=gne.call(mne.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function y6(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 _6(YE.call(e,0,t.maxStringLength),t)+r}var i=Fa.call(Fa.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Rne);return g6(i,"single",t)}function Rne(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":"")+vne.call(t.toString(16))}function xd(e){return"Object("+e+")"}function o1(e){return e+" { ? }"}function ZL(e,t,n,r){var i=r?Fx(n,r):so.call(n,", ");return e+" ("+t+") {"+i+"}"}function Dne(e){for(var t=0;t=0)return!1;return!0}function Ine(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=so.call(Array(e.indent+1)," ");else return null;return{base:n,prev:so.call(Array(t+1),n)}}function Fx(e,t){if(e.length===0)return"";var n=` +`+t.prev+t.base;return n+so.call(e,","+n)+` +`+t.prev}function vm(e,t){var n=Ix(e),r=[];if(n){r.length=e.length;for(var i=0;i1;){var t=e.pop(),n=t.obj[t.prop];if(Ks(n)){for(var r=[],i=0;i=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||i===Xne.RFC1738&&(l===40||l===41)){a+=o.charAt(s);continue}if(l<128){a=a+no[l];continue}if(l<2048){a=a+(no[192|l>>6]+no[128|l&63]);continue}if(l<55296||l>=57344){a=a+(no[224|l>>12]+no[128|l>>6&63]+no[128|l&63]);continue}s+=1,l=65536+((l&1023)<<10|o.charCodeAt(s)&1023),a+=no[240|l>>18]+no[128|l>>12&63]+no[128|l>>6&63]+no[128|l&63]}return a},ire=function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r"u"&&(S=0)}if(typeof l=="function"?_=l(n,_):_ instanceof Date?_=f(_):r==="comma"&&Fo(_)&&(_=mg.maybeMap(_,function(te){return te instanceof Date?f(te):te})),_===null){if(o)return s&&!v?s(n,rr.encoder,y,"key",p):n;_=""}if(fre(_)||mg.isBuffer(_)){if(s){var k=v?n:s(n,rr.encoder,y,"key",p);return[m(k)+"="+m(s(_,rr.encoder,y,"value",p))]}return[m(n)+"="+m(String(_))]}var j=[];if(typeof _>"u")return j;var N;if(r==="comma"&&Fo(_))v&&s&&(_=mg.maybeMap(_,s)),N=[{value:_.length>0?_.join(",")||null:void 0}];else if(Fo(l))N=l;else{var U=Object.keys(_);N=c?U.sort(c):U}for(var R=i&&Fo(_)&&_.length===1?n+"[]":n,V=0;V"u"?rr.allowDots:!!e.allowDots,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:rr.charsetSentinel,delimiter:typeof e.delimiter>"u"?rr.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:rr.encode,encoder:typeof e.encoder=="function"?e.encoder:rr.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:rr.encodeValuesOnly,filter:i,format:n,formatter:r,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:rr.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:rr.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:rr.strictNullHandling}},mre=function(e,t){var n=e,r=pre(t),i,o;typeof r.filter=="function"?(o=r.filter,n=o("",n)):Fo(r.filter)&&(o=r.filter,i=o);var a=[];if(typeof n!="object"||n===null)return"";var s;t&&t.arrayFormat in QL?s=t.arrayFormat:t&&"indices"in t?s=t.indices?"indices":"repeat":s="indices";var l=QL[s];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 d=x6(),f=0;f0?v+m:""},xu=w6,$x=Object.prototype.hasOwnProperty,gre=Array.isArray,jn={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:xu.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},vre=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},E6=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},yre="utf8=%26%2310003%3B",_re="utf8=%E2%9C%93",bre=function(e,t){var n={__proto__:null},r=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,i=t.parameterLimit===1/0?void 0:t.parameterLimit,o=r.split(t.delimiter,i),a=-1,s,l=t.charset;if(t.charsetSentinel)for(s=0;s-1&&(m=gre(m)?[m]:m),$x.call(n,p)?n[p]=xu.combine(n[p],m):n[p]=m}return n},wre=function(e,t,n,r){for(var i=r?t:E6(t,n),o=e.length-1;o>=0;--o){var a,s=e[o];if(s==="[]"&&n.parseArrays)a=[].concat(i);else{a=n.plainObjects?Object.create(null):{};var l=s.charAt(0)==="["&&s.charAt(s.length-1)==="]"?s.slice(1,-1):s,c=parseInt(l,10);!n.parseArrays&&l===""?a={0:i}:!isNaN(c)&&s!==l&&String(c)===l&&c>=0&&n.parseArrays&&c<=n.arrayLimit?(a=[],a[c]=i):l!=="__proto__"&&(a[l]=i)}i=a}return i},xre=function(e,t,n,r){if(e){var i=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,s=n.depth>0&&o.exec(i),l=s?i.slice(0,s.index):i,c=[];if(l){if(!n.plainObjects&&$x.call(Object.prototype,l)&&!n.allowPrototypes)return;c.push(l)}for(var d=0;n.depth>0&&(s=a.exec(i))!==null&&d"u"?jn.charset:e.charset;return{allowDots:typeof e.allowDots>"u"?jn.allowDots:!!e.allowDots,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:jn.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:jn.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:jn.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:jn.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:jn.comma,decoder:typeof e.decoder=="function"?e.decoder:jn.decoder,delimiter:typeof e.delimiter=="string"||xu.isRegExp(e.delimiter)?e.delimiter:jn.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:jn.depth,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:jn.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:jn.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:jn.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:jn.strictNullHandling}},Ere=function(e,t){var n=Sre(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?bre(e,n):e,i=n.plainObjects?Object.create(null):{},o=Object.keys(r),a=0;aT6.parse(e,{ignoreQueryPrefix:!0}),ep=e=>T6.stringify(e,{arrayFormat:"brackets"});var v0=(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))(v0||{}),y0=(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))(y0||{});const Pre=(e,t)=>{const[n,r]=e.split("://"),[,...i]=r.split("/"),o=i.length?`/${i.join("/")}`:"";return`${n}://${t}${o}`},Lre=(e,t)=>`${e}/rest/v${t}`,jre=_4(g4),Mre=({orderBy:e={},excludeMaxVisitsReached:t,excludePastValidUntil:n,...r})=>({...r,excludeMaxVisitsReached:t===!0?"true":void 0,excludePastValidUntil:n===!0?"true":void 0,orderBy:s6(e)}),Are=e=>e===null||!(typeof e=="object"&&"type"in e&&"status"in e)?!1:(e.type===v0.NOT_FOUND||e.type===y0.NOT_FOUND)&&e.status===404;class Nre{constructor(t,n,r){gt(this,"apiVersion");gt(this,"listShortUrls",async(t={})=>this.performRequest({url:"/short-urls",query:Mre(t)}).then(({shortUrls:n})=>n));gt(this,"createShortUrl",async t=>{const n=_4(r=>cv(r)||g4(r),t);return this.performRequest({url:"/short-urls",method:"POST",body:n})});gt(this,"getShortUrlVisits",async(t,n)=>this.performRequest({url:`/short-urls/${t}/visits`,query:n}).then(({visits:r})=>r));gt(this,"getTagVisits",async(t,n)=>this.performRequest({url:`/tags/${t}/visits`,query:n}).then(({visits:r})=>r));gt(this,"getDomainVisits",async(t,n)=>this.performRequest({url:`/domains/${t}/visits`,query:n}).then(({visits:r})=>r));gt(this,"getOrphanVisits",async t=>this.performRequest({url:"/visits/orphan",query:t}).then(({visits:n})=>n));gt(this,"getNonOrphanVisits",async t=>this.performRequest({url:"/visits/non-orphan",query:t}).then(({visits:n})=>n));gt(this,"getVisitsOverview",async()=>this.performRequest({url:"/visits"}).then(({visits:t})=>t));gt(this,"getShortUrl",async(t,n)=>this.performRequest({url:`/short-urls/${t}`,query:{domain:n}}));gt(this,"deleteShortUrl",async(t,n)=>this.performEmptyRequest({url:`/short-urls/${t}`,method:"DELETE",query:{domain:n}}));gt(this,"updateShortUrl",async(t,n,r)=>this.performRequest({url:`/short-urls/${t}`,method:"PATCH",query:{domain:n},body:r}));gt(this,"listTags",async()=>this.performRequest({url:"/tags",query:{withStats:"true"}}).then(({tags:t})=>t).then(({data:t,stats:n})=>({tags:t,stats:n})));gt(this,"tagsStats",async()=>this.performRequest({url:"/tags/stats"}).then(({tags:t})=>t).then(({data:t})=>({tags:t.map(({tag:n})=>n),stats:t})));gt(this,"deleteTags",async t=>this.performEmptyRequest({url:"/tags",method:"DELETE",query:{tags:t}}).then(()=>({tags:t})));gt(this,"editTag",async(t,n)=>this.performEmptyRequest({url:"/tags",method:"PUT",body:{oldName:t,newName:n}}).then(()=>({oldName:t,newName:n})));gt(this,"health",async t=>this.performRequest({url:"/health",domain:t}));gt(this,"mercureInfo",async()=>this.performRequest({url:"/mercure-info"}));gt(this,"listDomains",async()=>this.performRequest({url:"/domains"}).then(({domains:t})=>t));gt(this,"editDomainRedirects",async t=>this.performRequest({url:"/domains/redirects",method:"PATCH",body:t}));gt(this,"performRequest",async t=>this.httpClient.fetchJson(...this.toFetchParams(t)).catch(this.handleFetchError(()=>this.httpClient.fetchJson(...this.toFetchParams(t)))));gt(this,"performEmptyRequest",async t=>this.httpClient.fetchEmpty(...this.toFetchParams(t)).catch(this.handleFetchError(()=>this.httpClient.fetchEmpty(...this.toFetchParams(t)))));gt(this,"toFetchParams",({url:t,method:n="GET",query:r={},body:i,domain:o})=>{const a=ep(jre(r)),s=cv(a)?"":`?${a}`,l=o?Pre(this.baseUrl,o):this.baseUrl;return[`${Lre(l,this.apiVersion)}${t}${s}`,{method:n,body:i&&JSON.stringify(i),headers:{"X-Api-Key":this.apiKey}}]});gt(this,"handleFetchError",t=>n=>{if(!Are(n))throw n;return this.apiVersion=2,t()});this.httpClient=t,this.baseUrl=n,this.apiKey=r,this.apiVersion=3}}const c1={},Rre=e=>typeof e=="function",Dre=e=>{const{selectedServer:t}=e();if(!w4(t))throw new Error("There's no selected server or it is not found");return t},Ire=e=>t=>{const{url:n,apiKey:r}=Rre(t)?Dre(t):t,i=`${n}_${r}`;return c1[i]||(c1[i]=new Nre(e,n,r)),c1[i]},Fre=e=>{e.serviceFactory("buildShlinkApiClient",Ire,"HttpClient")};const $re=({isOpen:e,toggle:t,forceUpdate:n})=>{const[r,,i]=_n(),o=()=>{i(),n()};return g.jsxs(QI,{className:"app-update-banner",isOpen:e,toggle:t,tag:vn,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(_t,{role:"button",disabled:r,className:"ms-2",color:"secondary",size:"sm",onClick:o,children:[!r&&g.jsxs(g.Fragment,{children:["Restart now ",g.jsx(De,{icon:RY,className:"ms-1"})]}),r&&g.jsx(g.Fragment,{children:"Restarting..."})]})]})]})},O6=({to:e="/",children:t="Home"})=>g.jsx("div",{className:"home",children:g.jsxs(vn,{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(Ut,{to:e,className:"btn btn-outline-primary btn-lg",children:t})]})}),Ure=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"})})};const Bre=(e,t,n,r,i,o,a,s)=>({fetchServers:l,servers:c,settings:d,appUpdated:f,resetAppUpdate:p})=>{const v=bn().pathname==="/";return F.useEffect(()=>{var y;Object.keys(c).length===0&&l(),c6(((y=d.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:Ve("shlink-wrapper",{"d-flex d-md-block align-items-center":v}),children:g.jsxs(n0,{children:[g.jsx(yt,{index:!0,element:g.jsx(t,{})}),g.jsx(yt,{path:"/settings/*",element:g.jsx(o,{})}),g.jsx(yt,{path:"/manage-servers",element:g.jsx(a,{})}),g.jsx(yt,{path:"/server/create",element:g.jsx(r,{})}),g.jsx(yt,{path:"/server/:serverId/edit",element:g.jsx(i,{})}),g.jsx(yt,{path:"/server/:serverId/*",element:g.jsx(n,{})}),g.jsx(yt,{path:"*",element:g.jsx(O6,{})})]})}),g.jsx("div",{className:"shlink-footer",children:g.jsx(s,{})})]}),g.jsx($re,{isOpen:f,toggle:p,forceUpdate:Ure})]})};function Ui(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:ZE(e)?2:QE(e)?3:0}function Zc(e,t){return Yu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function zre(e,t){return Yu(e)===2?e.get(t):e[t]}function C6(e,t,n){var r=Yu(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function k6(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function ZE(e){return qre&&e instanceof Map}function QE(e){return Kre&&e instanceof Set}function Hs(e){return e.o||e.t}function XE(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=L6(e);delete t[Bt];for(var n=Qc(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=Vre),Object.freeze(e),t&&Sl(e,function(n,r){return JE(r,!0)},!0)),e}function Vre(){Ui(2)}function eT(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function yo(e){var t=Vx[e];return t||Ui(18,e),t}function Hre(e,t){Vx[e]||(Vx[e]=t)}function Ux(){return ch}function u1(e,t){t&&(yo("Patches"),e.u=[],e.s=[],e.v=t)}function Bv(e){Bx(e),e.p.forEach(Wre),e.p=null}function Bx(e){e===ch&&(ch=e.l)}function JL(e){return ch={p:[],l:ch,h:e,m:!0,_:0}}function Wre(e){var t=e[Bt];t.i===0||t.i===1?t.j():t.g=!0}function d1(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.O||yo("ES5").S(t,e,r),r?(n[Bt].P&&(Bv(t),Ui(4)),ra(e)&&(e=zv(t,e),t.l||Vv(t,e)),t.u&&yo("Patches").M(n[Bt].t,e,t.u,t.s)):e=zv(t,n,[]),Bv(t),t.u&&t.v(t.u,t.s),e!==P6?e:void 0}function zv(e,t,n){if(eT(t))return t;var r=t[Bt];if(!r)return Sl(t,function(s,l){return ej(e,r,t,s,l,n)},!0),t;if(r.A!==e)return t;if(!r.P)return Vv(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=XE(r.k):r.o,o=i,a=!1;r.i===3&&(o=new Set(i),i.clear(),a=!0),Sl(o,function(s,l){return ej(e,r,i,s,l,n,a)}),Vv(e,i,!1),n&&e.u&&yo("Patches").N(r,n,e.u,e.s)}return r.o}function ej(e,t,n,r,i,o,a){if(us(i)){var s=zv(e,i,o&&t&&t.i!==3&&!Zc(t.R,r)?o.concat(r):void 0);if(C6(n,r,s),!us(s))return;e.m=!1}else a&&n.add(i);if(ra(i)&&!eT(i)){if(!e.h.D&&e._<1)return;zv(e,i),t&&t.A.l||Vv(e,i)}}function Vv(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&JE(t,n)}function f1(e,t){var n=e[Bt];return(n?Hs(n):e)[t]}function tj(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 Aa(e){e.P||(e.P=!0,e.l&&Aa(e.l))}function h1(e){e.o||(e.o=XE(e.t))}function zx(e,t,n){var r=ZE(t)?yo("MapSet").F(t,n):QE(t)?yo("MapSet").T(t,n):e.O?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:Ux(),P:!1,I:!1,R:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,c=uh;a&&(l=[s],c=Bd);var d=Proxy.revocable(l,c),f=d.revoke,p=d.proxy;return s.k=p,s.j=f,p}(t,n):yo("ES5").J(t,n);return(n?n.A:Ux()).p.push(r),r}function Yre(e){return us(e)||Ui(22,e),function t(n){if(!ra(n))return n;var r,i=n[Bt],o=Yu(n);if(i){if(!i.P&&(i.i<4||!yo("ES5").K(i)))return i.t;i.I=!0,r=nj(n,o),i.I=!1}else r=nj(n,o);return Sl(r,function(a,s){i&&zre(i.t,a)===s||C6(r,a,t(s))}),o===3?new Set(r):r}(e)}function nj(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return XE(e)}function Gre(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var l=this[Bt];return uh.get(l,o)},set:function(l){var c=this[Bt];uh.set(c,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][Bt];if(!s.P)switch(s.i){case 5:r(s)&&Aa(s);break;case 4:n(s)&&Aa(s)}}}function n(o){for(var a=o.t,s=o.k,l=Qc(s),c=l.length-1;c>=0;c--){var d=l[c];if(d!==Bt){var f=a[d];if(f===void 0&&!Zc(a,d))return!0;var p=s[d],m=p&&p[Bt];if(m?m.t!==f:!k6(p,f))return!0}}var v=!!a[Bt];return l.length!==Qc(a).length+(v?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var l=0;l1?_-1:0),S=1;S<_;S++)w[S-1]=arguments[S];return l.produce(y,function(E){var C;return(C=o).call.apply(C,[x,E].concat(w))})}}var c;if(typeof o!="function"&&Ui(6),a!==void 0&&typeof a!="function"&&Ui(7),ra(i)){var d=JL(r),f=zx(r,i,void 0),p=!0;try{c=o(f),p=!1}finally{p?Bv(d):Bx(d)}return typeof Promise<"u"&&c instanceof Promise?c.then(function(y){return u1(d,a),d1(y,d)},function(y){throw Bv(d),y}):(u1(d,a),d1(c,d))}if(!i||typeof i!="object"){if((c=o(i))===void 0&&(c=i),c===P6&&(c=void 0),r.D&&JE(c,!0),a){var m=[],v=[];yo("Patches").M(i,c,m,v),a(m,v)}return c}Ui(21,i)},this.produceWithPatches=function(i,o){if(typeof i=="function")return function(c){for(var d=arguments.length,f=Array(d>1?d-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 a=yo("Patches").$;return us(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),Jr=new Qre,j6=Jr.produce;Jr.produceWithPatches.bind(Jr);Jr.setAutoFreeze.bind(Jr);Jr.setUseProxies.bind(Jr);Jr.applyPatches.bind(Jr);Jr.createDraft.bind(Jr);Jr.finishDraft.bind(Jr);function dh(e){"@babel/helpers - typeof";return dh=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},dh(e)}function Xre(e,t){if(dh(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(dh(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Jre(e){var t=Xre(e,"string");return dh(t)==="symbol"?t:String(t)}function eie(e,t,n){return t=Jre(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aj(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 sj(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(ir(1));return n(M6)(e,t)}if(typeof e!="function")throw new Error(ir(2));var i=e,o=t,a=[],s=a,l=!1;function c(){s===a&&(s=a.slice())}function d(){if(l)throw new Error(ir(3));return o}function f(y){if(typeof y!="function")throw new Error(ir(4));if(l)throw new Error(ir(5));var x=!0;return c(),s.push(y),function(){if(x){if(l)throw new Error(ir(6));x=!1,c();var w=s.indexOf(y);s.splice(w,1),a=null}}}function p(y){if(!tie(y))throw new Error(ir(7));if(typeof y.type>"u")throw new Error(ir(8));if(l)throw new Error(ir(9));try{l=!0,o=i(o,y)}finally{l=!1}for(var x=a=s,_=0;_"u")throw new Error(ir(12));if(typeof n(void 0,{type:Hv.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ir(13))})}function nT(e){for(var t=Object.keys(e),n={},r=0;r"u")throw c&&c.type,new Error(ir(14));f[m]=x,d=d||x!==y}return d=d||o.length!==Object.keys(l).length,d?f:l}}function Wv(){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,resetAppUpdate:()=>!1}}),{appUpdateAvailable:Lie,resetAppUpdate:jie}=kie,Mie=Pie,Aie=(e,t)=>{e.serviceFactory("App",Bre,"MainHeader","Home","ShlinkWebComponentContainer","CreateServer","EditServer","Settings","ManageServers","ShlinkVersionsContainer"),e.decorator("App",t(["servers","settings","appUpdated"],["fetchServers","resetAppUpdate"])),e.serviceFactory("appUpdateAvailable",()=>Lie),e.serviceFactory("resetAppUpdate",()=>jie)};var Nie={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"]},Rie=Nie,Die={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"]},Iie=Die,Fie={prefix:"far",iconName:"circle",icon:[512,512,[128308,128309,128992,128993,128994,128995,128996,9679,9898,9899,11044,61708,61915],"f111","M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z"]},$6={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"]},$ie={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"]},Uie={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"]},Bie=Object.defineProperty,zie=(e,t,n)=>t in e?Bie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Te=(e,t,n)=>(zie(e,typeof t!="symbol"?t+"":t,n),n);/*! + * @kurkle/color v0.3.2 + * https://github.com/kurkle/color#readme + * (c) 2023 Jukka Kurkela + * Released under the MIT License + */function tp(e){return e+.5|0}const $a=(e,t,n)=>Math.max(Math.min(e,n),t);function zd(e){return $a(tp(e*2.55),0,255)}function ns(e){return $a(tp(e*255),0,255)}function $o(e){return $a(tp(e/2.55)/100,0,1)}function pj(e){return $a(tp(e*100),0,100)}const ui={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},Wx=[..."0123456789ABCDEF"],Vie=e=>Wx[e&15],Hie=e=>Wx[(e&240)>>4]+Wx[e&15],bm=e=>(e&240)>>4===(e&15),Wie=e=>bm(e.r)&&bm(e.g)&&bm(e.b)&&bm(e.a);function Yie(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&ui[e[1]]*17,g:255&ui[e[2]]*17,b:255&ui[e[3]]*17,a:t===5?ui[e[4]]*17:255}:(t===7||t===9)&&(n={r:ui[e[1]]<<4|ui[e[2]],g:ui[e[3]]<<4|ui[e[4]],b:ui[e[5]]<<4|ui[e[6]],a:t===9?ui[e[7]]<<4|ui[e[8]]:255})),n}const Gie=(e,t)=>e<255?t(e):"";function qie(e){var t=Wie(e)?Vie:Hie;return e?"#"+t(e.r)+t(e.g)+t(e.b)+Gie(e.a,t):void 0}const Kie=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function U6(e,t,n){const r=t*Math.min(n,1-n),i=(o,a=(o+e/30)%12)=>n-r*Math.max(Math.min(a-3,9-a,1),-1);return[i(0),i(8),i(4)]}function Zie(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 Qie(e,t,n){const r=U6(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 Xie(e,t,n,r,i){return e===i?(t-n)/r+(t.5?c/(2-i-o):c/(i+o),s=Xie(t,n,r,c,i),s=s*60+.5),[s|0,l||0,a]}function oT(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(ns)}function aT(e,t,n){return oT(U6,e,t,n)}function Jie(e,t,n){return oT(Qie,e,t,n)}function eoe(e,t,n){return oT(Zie,e,t,n)}function B6(e){return(e%360+360)%360}function toe(e){const t=Kie.exec(e);let n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?zd(+t[5]):ns(+t[5]));const i=B6(+t[2]),o=+t[3]/100,a=+t[4]/100;return t[1]==="hwb"?r=Jie(i,o,a):t[1]==="hsv"?r=eoe(i,o,a):r=aT(i,o,a),{r:r[0],g:r[1],b:r[2],a:n}}function noe(e,t){var n=iT(e);n[0]=B6(n[0]+t),n=aT(n),e.r=n[0],e.g=n[1],e.b=n[2]}function roe(e){if(!e)return;const t=iT(e),n=t[0],r=pj(t[1]),i=pj(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${i}%, ${$o(e.a)})`:`hsl(${n}, ${r}%, ${i}%)`}const mj={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"},gj={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 ioe(){const e={},t=Object.keys(gj),n=Object.keys(mj);let r,i,o,a,s;for(r=0;r>16&255,o>>8&255,o&255]}return e}let wm;function ooe(e){wm||(wm=ioe(),wm.transparent=[0,0,0,0]);const t=wm[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const aoe=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function soe(e){const t=aoe.exec(e);let n=255,r,i,o;if(t){if(t[7]!==r){const a=+t[7];n=t[8]?zd(a):$a(a*255,0,255)}return r=+t[1],i=+t[3],o=+t[5],r=255&(t[2]?zd(r):$a(r,0,255)),i=255&(t[4]?zd(i):$a(i,0,255)),o=255&(t[6]?zd(o):$a(o,0,255)),{r,g:i,b:o,a:n}}}function loe(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${$o(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const v1=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,cc=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function coe(e,t,n){const r=cc($o(e.r)),i=cc($o(e.g)),o=cc($o(e.b));return{r:ns(v1(r+n*(cc($o(t.r))-r))),g:ns(v1(i+n*(cc($o(t.g))-i))),b:ns(v1(o+n*(cc($o(t.b))-o))),a:e.a+n*(t.a-e.a)}}function xm(e,t,n){if(e){let r=iT(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=aT(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function z6(e,t){return e&&Object.assign(t||{},e)}function vj(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=ns(e[3]))):(t=z6(e,{r:0,g:0,b:0,a:1}),t.a=ns(t.a)),t}function uoe(e){return e.charAt(0)==="r"?soe(e):toe(e)}class fh{constructor(t){if(t instanceof fh)return t;const n=typeof t;let r;n==="object"?r=vj(t):n==="string"&&(r=Yie(t)||ooe(t)||uoe(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var t=z6(this._rgb);return t&&(t.a=$o(t.a)),t}set rgb(t){this._rgb=vj(t)}rgbString(){return this._valid?loe(this._rgb):void 0}hexString(){return this._valid?qie(this._rgb):void 0}hslString(){return this._valid?roe(this._rgb):void 0}mix(t,n){if(t){const r=this.rgb,i=t.rgb;let o;const a=n===o?.5:n,s=2*a-1,l=r.a-i.a,c=((s*l===-1?s:(s+l)/(1+s*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=a*r.a+(1-a)*i.a,this.rgb=r}return this}interpolate(t,n){return t&&(this._rgb=coe(this._rgb,t._rgb,n)),this}clone(){return new fh(this.rgb)}alpha(t){return this._rgb.a=ns(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=tp(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 xm(this._rgb,2,t),this}darken(t){return xm(this._rgb,2,-t),this}saturate(t){return xm(this._rgb,1,t),this}desaturate(t){return xm(this._rgb,1,-t),this}rotate(t){return noe(this._rgb,t),this}}/*! + * Chart.js v4.3.3 + * https://www.chartjs.org + * (c) 2023 Chart.js Contributors + * Released under the MIT License + */function Ao(){}const doe=(()=>{let e=0;return()=>e++})();function dt(e){return e===null||typeof e>"u"}function Dt(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 nt(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function tn(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Ur(e,t){return tn(e)?e:t}function Ke(e,t){return typeof e>"u"?t:e}const foe=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,V6=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function Pt(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function wt(e,t,n,r){let i,o,a;if(Dt(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 moe(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 goe(e){const t=moe(e);return n=>{for(const r of t){if(r==="")break;n=n&&n[r]}return n}}function ds(e,t){return(yj[t]||(yj[t]=goe(t)))(e)}function sT(e){return e.charAt(0).toUpperCase()+e.slice(1)}const ph=e=>typeof e<"u",fs=e=>typeof e=="function",_j=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function voe(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const Ht=Math.PI,$t=2*Ht,yoe=$t+Ht,qv=Number.POSITIVE_INFINITY,_oe=Ht/180,nn=Ht/2,Ms=Ht/4,bj=Ht*2/3,Ua=Math.log10,_o=Math.sign;function gf(e,t,n){return Math.abs(e-t)i-o).pop(),t}function Eu(e){return!isNaN(parseFloat(e))&&isFinite(e)}function woe(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function W6(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 cT(e,t,n){n=n||(a=>e[a]1;)o=i+r>>1,n(o)?i=o:r=o;return{lo:i,hi:r}}const Ho=(e,t,n,r)=>cT(e,n,r?i=>{const o=e[i][t];return oe[i][t]cT(e,n,r=>e[r][t]>=n);function Toe(e,t,n){let r=0,i=e.length;for(;rr&&e[i-1]>n;)i--;return r>0||i{const r="_onData"+sT(n),i=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...o){const a=i.apply(this,o);return e._chartjs.listeners.forEach(s=>{typeof s[r]=="function"&&s[r](...o)}),a}})})}function Sj(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)&&(G6.forEach(o=>{delete e[o]}),delete e._chartjs)}function q6(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const K6=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function Z6(e,t){let n=[],r=!1;return function(...i){n=i,r||(r=!0,K6.call(window,()=>{r=!1,e.apply(t,n)}))}}function Coe(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}const uT=e=>e==="start"?"left":e==="end"?"right":"center",or=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,koe=(e,t,n,r)=>e===(r?"left":"right")?n:e==="center"?(t+n)/2:t;function Q6(e,t,n){const r=t.length;let i=0,o=r;if(e._sorted){const{iScale:a,_parsed:s}=e,l=a.axis,{min:c,max:d,minDefined:f,maxDefined:p}=a.getUserBounds();f&&(i=Nn(Math.min(Ho(s,l,c).lo,n?r:Ho(t,l,a.getPixelForValue(c)).lo),0,r-1)),p?o=Nn(Math.max(Ho(s,a.axis,d,!0).hi+1,n?0:Ho(t,l,a.getPixelForValue(d),!0).hi+1),i,r)-i:o=r-i}return{start:i,count:o}}function X6(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 Sm=e=>e===0||e===1,Ej=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*$t/n)),Tj=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*$t/n)+1,vf={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*nn)+1,easeOutSine:e=>Math.sin(e*nn),easeInOutSine:e=>-.5*(Math.cos(Ht*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=>Sm(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=>Sm(e)?e:Ej(e,.075,.3),easeOutElastic:e=>Sm(e)?e:Tj(e,.075,.3),easeInOutElastic(e){return Sm(e)?e:e<.5?.5*Ej(e*2,.1125,.45):.5+.5*Tj(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-vf.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?vf.easeInBounce(e*2)*.5:vf.easeOutBounce(e*2-1)*.5+.5};function dT(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function Oj(e){return dT(e)?e:new fh(e)}function y1(e){return dT(e)?e:new fh(e).saturate(.5).darken(.1).hexString()}const Poe=["x","y","borderWidth","radius","tension"],Loe=["color","borderColor","backgroundColor"];function joe(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:Loe},numbers:{type:"number",properties:Poe}}),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 Moe(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Cj=new Map;function Aoe(e,t){t=t||{};const n=e+JSON.stringify(t);let r=Cj.get(n);return r||(r=new Intl.NumberFormat(e,t),Cj.set(n,r)),r}function np(e,t,n){return Aoe(t,n).format(e)}const J6={values(e){return Dt(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=Noe(e,n)}const a=Ua(Math.abs(o)),s=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:i,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(l,this.options.ticks.format),np(e,r,l)},logarithmic(e,t,n){if(e===0)return"0";const r=n[t].significand||e/Math.pow(10,Math.floor(Ua(e)));return[1,2,3,5,10,15].includes(r)||t>.8*n.length?J6.numeric.call(this,e,t,n):""}};function Noe(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 _0={formatters:J6};function Roe(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:_0.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 El=Object.create(null),Gx=Object.create(null);function yf(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)=>y1(i.backgroundColor),this.hoverBorderColor=(r,i)=>y1(i.borderColor),this.hoverColor=(r,i)=>y1(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 _1(this,t,n)}get(t){return yf(this,t)}describe(t,n){return _1(Gx,t,n)}override(t,n){return _1(El,t,n)}route(t,n,r,i){const o=yf(this,t),a=yf(this,r),s="_"+n;Object.defineProperties(o,{[s]:{value:o[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[s],c=a[i];return nt(l)?Object.assign({},c,l):Ke(l,c)},set(l){this[s]=l}}})}apply(t){t.forEach(n=>n(this))}}var rn=new Doe({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[joe,Moe,Roe]);function Ioe(e){return!e||dt(e.size)||dt(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function Kv(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 Foe(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 a=0;const s=n.length;let l,c,d,f,p;for(l=0;ln.length){for(l=0;l0&&e.stroke()}}function Wo(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,Boe(e,o),l=0;l+e||0;function fT(e,t){const n={},r=nt(t),i=r?Object.keys(t):t,o=nt(e)?r?a=>Ke(e[a],e[t[a]]):a=>e[a]:()=>e;for(const a of i)n[a]=Goe(o(a));return n}function t5(e){return fT(e,{top:"y",right:"x",bottom:"y",left:"x"})}function dl(e){return fT(e,["topLeft","topRight","bottomLeft","bottomRight"])}function dr(e){const t=t5(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function En(e,t){e=e||{},t=t||rn.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(Woe)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:Ke(e.family,t.family),lineHeight:Yoe(Ke(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:Ke(e.weight,t.weight),string:""};return i.string=Ioe(i),i}function Vd(e,t,n,r){let i=!0,o,a,s;for(o=0,a=e.length;on&&s===0?0:s+l;return{min:a(r,-Math.abs(o)),max:a(i,o)}}function Ss(e,t){return Object.assign(Object.create(e),t)}function hT(e,t=[""],n,r,i=()=>e[0]){const o=n||e;typeof r>"u"&&(r=o5("_fallback",e));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:o,_fallback:r,_getTarget:i,override:s=>hT([s,...e],t,o,r)};return new Proxy(a,{deleteProperty(s,l){return delete s[l],delete s._keys,delete e[0][l],!0},get(s,l){return r5(s,l,()=>nae(l,t,e,s))},getOwnPropertyDescriptor(s,l){return Reflect.getOwnPropertyDescriptor(s._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(s,l){return Lj(s).includes(l)},ownKeys(s){return Lj(s)},set(s,l,c){const d=s._storage||(s._storage=i());return s[l]=d[l]=c,delete s._keys,!0}})}function Tu(e,t,n,r){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:n5(e,r),setContext:o=>Tu(e,o,n,r),override:o=>Tu(e.override(o),t,n,r)};return new Proxy(i,{deleteProperty(o,a){return delete o[a],delete e[a],!0},get(o,a,s){return r5(o,a,()=>Zoe(o,a,s))},getOwnPropertyDescriptor(o,a){return o._descriptors.allKeys?Reflect.has(e,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,a)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(o,a){return Reflect.has(e,a)},ownKeys(){return Reflect.ownKeys(e)},set(o,a,s){return e[a]=s,delete o[a],!0}})}function n5(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:fs(n)?n:()=>n,isIndexable:fs(r)?r:()=>r}}const Koe=(e,t)=>e?e+sT(t):t,pT=(e,t)=>nt(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function r5(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t))return e[t];const r=n();return e[t]=r,r}function Zoe(e,t,n){const{_proxy:r,_context:i,_subProxy:o,_descriptors:a}=e;let s=r[t];return fs(s)&&a.isScriptable(t)&&(s=Qoe(t,s,e,n)),Dt(s)&&s.length&&(s=Xoe(t,s,e,a.isIndexable)),pT(t,s)&&(s=Tu(s,i,o&&o[t],a)),s}function Qoe(e,t,n,r){const{_proxy:i,_context:o,_subProxy:a,_stack:s}=n;if(s.has(e))throw new Error("Recursion detected: "+Array.from(s).join("->")+"->"+e);s.add(e);let l=t(o,a||r);return s.delete(e),pT(e,l)&&(l=mT(i._scopes,i,e,l)),l}function Xoe(e,t,n,r){const{_proxy:i,_context:o,_subProxy:a,_descriptors:s}=n;if(typeof o.index<"u"&&r(e))return t[o.index%t.length];if(nt(t[0])){const l=t,c=i._scopes.filter(d=>d!==l);t=[];for(const d of l){const f=mT(c,i,e,d);t.push(Tu(f,o,a&&a[e],s))}}return t}function i5(e,t,n){return fs(e)?e(t,n):e}const Joe=(e,t)=>e===!0?t:typeof e=="string"?ds(t,e):void 0;function eae(e,t,n,r,i){for(const o of t){const a=Joe(n,o);if(a){e.add(a);const s=i5(a._fallback,n,i);if(typeof s<"u"&&s!==n&&s!==r)return s}else if(a===!1&&typeof r<"u"&&n!==r)return null}return!1}function mT(e,t,n,r){const i=t._rootScopes,o=i5(t._fallback,n,r),a=[...e,...i],s=new Set;s.add(r);let l=Pj(s,a,n,o||n,r);return l===null||typeof o<"u"&&o!==n&&(l=Pj(s,a,o,l,r),l===null)?!1:hT(Array.from(s),[""],i,o,()=>tae(t,n,r))}function Pj(e,t,n,r,i){for(;n;)n=eae(e,t,n,r,i);return n}function tae(e,t,n){const r=e._getTarget();t in r||(r[t]={});const i=r[t];return Dt(i)&&nt(n)?n:i||{}}function nae(e,t,n,r){let i;for(const o of t)if(i=o5(Koe(o,e),n),typeof i<"u")return pT(e,i)?mT(n,r,e,i):i}function o5(e,t){for(const n of t){if(!n)continue;const r=n[e];if(typeof r<"u")return r}}function Lj(e){let t=e._keys;return t||(t=e._keys=rae(e._scopes)),t}function rae(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 a5(e,t,n,r){const{iScale:i}=e,{key:o="r"}=this._parsing,a=new Array(r);let s,l,c,d;for(s=0,l=r;ste==="x"?"y":"x";function oae(e,t,n,r){const i=e.skip?t:e,o=t,a=n.skip?t:n,s=Yx(o,i),l=Yx(a,o);let c=s/(s+l),d=l/(s+l);c=isNaN(c)?0:c,d=isNaN(d)?0:d;const f=r*c,p=r*d;return{previous:{x:o.x-f*(a.x-i.x),y:o.y-f*(a.y-i.y)},next:{x:o.x+p*(a.x-i.x),y:o.y+p*(a.y-i.y)}}}function aae(e,t,n){const r=e.length;let i,o,a,s,l,c=Ou(e,0);for(let d=0;d!c.skip)),t.cubicInterpolationMode==="monotone")lae(e,i);else{let c=r?e[e.length-1]:e[0];for(o=0,a=e.length;oe.ownerDocument.defaultView.getComputedStyle(e,null);function dae(e,t){return x0(e).getPropertyValue(t)}const fae=["top","right","bottom","left"];function fl(e,t,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const o=fae[i];r[o]=parseFloat(e[t+"-"+o+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const hae=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function pae(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:o}=r;let a=!1,s,l;if(hae(i,o,e.target))s=i,l=o;else{const c=t.getBoundingClientRect();s=r.clientX-c.left,l=r.clientY-c.top,a=!0}return{x:s,y:l,box:a}}function Ws(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,i=x0(n),o=i.boxSizing==="border-box",a=fl(i,"padding"),s=fl(i,"border","width"),{x:l,y:c,box:d}=pae(e,n),f=a.left+(d&&s.left),p=a.top+(d&&s.top);let{width:m,height:v}=t;return o&&(m-=a.width+s.width,v-=a.height+s.height),{x:Math.round((l-f)/m*n.width/r),y:Math.round((c-p)/v*n.height/r)}}function mae(e,t,n){let r,i;if(t===void 0||n===void 0){const o=gT(e);if(!o)t=e.clientWidth,n=e.clientHeight;else{const a=o.getBoundingClientRect(),s=x0(o),l=fl(s,"border","width"),c=fl(s,"padding");t=a.width-c.width-l.width,n=a.height-c.height-l.height,r=Zv(s.maxWidth,o,"clientWidth"),i=Zv(s.maxHeight,o,"clientHeight")}}return{width:t,height:n,maxWidth:r||qv,maxHeight:i||qv}}const Tm=e=>Math.round(e*10)/10;function gae(e,t,n,r){const i=x0(e),o=fl(i,"margin"),a=Zv(i.maxWidth,e,"clientWidth")||qv,s=Zv(i.maxHeight,e,"clientHeight")||qv,l=mae(e,t,n);let{width:c,height:d}=l;if(i.boxSizing==="content-box"){const f=fl(i,"border","width"),p=fl(i,"padding");c-=p.width+f.width,d-=p.height+f.height}return c=Math.max(0,c-o.width),d=Math.max(0,r?c/r:d-o.height),c=Tm(Math.min(c,a,l.maxWidth)),d=Tm(Math.min(d,s,l.maxHeight)),c&&!d&&(d=Tm(c/2)),(t!==void 0||n!==void 0)&&r&&l.height&&d>l.height&&(d=l.height,c=Tm(Math.floor(d*r))),{width:c,height:d}}function jj(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 a=e.canvas;return a.style&&(n||!a.style.height&&!a.style.width)&&(a.style.height=`${e.height}px`,a.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||a.height!==i||a.width!==o?(e.currentDevicePixelRatio=r,a.height=i,a.width=o,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}const vae=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 Mj(e,t){const n=dae(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function Ys(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function yae(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 _ae(e,t,n,r){const i={x:e.cp2x,y:e.cp2y},o={x:t.cp1x,y:t.cp1y},a=Ys(e,i,n),s=Ys(i,o,n),l=Ys(o,t,n),c=Ys(a,s,n),d=Ys(s,l,n);return Ys(c,d,n)}const bae=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}}},wae=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function Xc(e,t,n){return e?bae(t,n):wae()}function c5(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 u5(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function d5(e){return e==="angle"?{between:mh,compare:xoe,normalize:zr}:{between:Vo,compare:(t,n)=>t-n,normalize:t=>t}}function Aj({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 xae(e,t,n){const{property:r,start:i,end:o}=n,{between:a,normalize:s}=d5(r),l=t.length;let{start:c,end:d,loop:f}=e,p,m;if(f){for(c+=l,d+=l,p=0,m=l;pl(i,S,_)&&s(i,S)!==0,C=()=>s(o,_)===0||l(o,S,_),k=()=>y||E(),j=()=>!y||C();for(let N=d,U=d;N<=f;++N)w=t[N%a],!w.skip&&(_=c(w[r]),_!==S&&(y=l(_,i,o),x===null&&k()&&(x=s(_,i)===0?N:U),x!==null&&j()&&(v.push(Aj({start:x,end:N,loop:p,count:a,style:m})),x=null),U=N,S=_));return x!==null&&v.push(Aj({start:x,end:f,loop:p,count:a,style:m})),v}function h5(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 Eae(e,t,n,r){const i=e.length,o=[];let a=t,s=e[t],l;for(l=t+1;l<=n;++l){const c=e[l%i];c.skip||c.stop?s.skip||(r=!1,o.push({start:t%i,end:(l-1)%i,loop:r}),t=a=c.stop?l:null):(a=l,s.skip&&(t=l)),s=c}return a!==null&&o.push({start:t%i,end:a%i,loop:r}),o}function Tae(e,t){const n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];const o=!!e._loop,{start:a,end:s}=Sae(n,i,o,r);if(r===!0)return Nj(e,[{start:a,end:s,loop:o}],n,t);const l=ss({chart:t,initial:n.initial,numSteps:a,currentStep:Math.min(r-n.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=K6.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 a=o.length-1,s=!1,l;for(;a>=0;--a)l=o[a],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(t),s=!0):(o[a]=o[o.length-1],o.pop());s&&(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 No=new kae;const Dj="transparent",Pae={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=Oj(e||Dj),i=r.valid&&Oj(t||Dj);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class Lae{constructor(t,n,r,i){const o=n[r];i=Vd([t.to,i,o,t.from]);const a=Vd([t.from,o,i]);this._active=!0,this._fn=t.fn||Pae[t.type||typeof a],this._easing=vf[t.easing]||vf.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=a,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,a=this._duration-o;this._start=r,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=Vd([t.to,n,i,t.from]),this._from=Vd([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,a=this._loop,s=this._to;let l;if(this._active=o!==s&&(a||n1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(o,s,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(!nt(o))return;const a={};for(const s of n)a[s]=o[s];(Dt(o.properties)&&o.properties||[i]).forEach(s=>{(s===i||!r.has(s))&&r.set(s,a)})})}_animateOptions(t,n){const r=n.options,i=Mae(t,r);if(!i)return[];const o=this._createAnimations(i,r);return r.$shared&&jae(t.options.$animations,r).then(()=>{t.options=r},()=>{}),o}_createAnimations(t,n){const r=this._properties,i=[],o=t.$animations||(t.$animations={}),a=Object.keys(n),s=Date.now();let l;for(l=a.length-1;l>=0;--l){const c=a[l];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(t,n));continue}const d=n[c];let f=o[c];const p=r.get(c);if(f)if(p&&f.active()){f.update(p,d,s);continue}else f.cancel();if(!p||!p.duration){t[c]=d;continue}o[c]=f=new Lae(p,t,c,d),i.push(f)}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 No.add(this._chart,r),!0}}function jae(e,t){const n=[],r=Object.keys(t);for(let i=0;i0||!n&&o<0)return i.index}return null}function Bj(e,t){const{chart:n,_cachedMeta:r}=e,i=n._stacks||(n._stacks={}),{iScale:o,vScale:a,index:s}=r,l=o.axis,c=a.axis,d=Dae(o,a,r),f=t.length;let p;for(let m=0;mn[r].axis===t).shift()}function $ae(e,t){return Ss(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function Uae(e,t,n){return Ss(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function Sd(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 w1=e=>e==="reset"||e==="none",zj=(e,t)=>t?e:Object.assign({},e),Bae=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:m5(n,!0),values:null};class Yi{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=$j(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&&Sd(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(f,p,m,v)=>f==="x"?p:f==="r"?v:m,o=n.xAxisID=Ke(r.xAxisID,b1(t,"x")),a=n.yAxisID=Ke(r.yAxisID,b1(t,"y")),s=n.rAxisID=Ke(r.rAxisID,b1(t,"r")),l=n.indexAxis,c=n.iAxisID=i(l,o,a,s),d=n.vAxisID=i(l,a,o,s);n.xScale=this.getScaleForId(o),n.yScale=this.getScaleForId(a),n.rScale=this.getScaleForId(s),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(d)}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&&Sj(this._data,this),t._stacked&&Sd(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(nt(n))this._data=Rae(n);else if(r!==n){if(r){Sj(r,this);const i=this._cachedMeta;Sd(i),i._parsed=[]}n&&Object.isExtensible(n)&&Ooe(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=$j(n.vScale,n),n.stack!==r.stack&&(i=!0,Sd(n),n.stack=r.stack),this._resyncElements(t),(i||o!==n._stacked)&&Bj(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:a}=r,s=o.axis;let l=t===0&&n===i.length?!0:r._sorted,c=t>0&&r._parsed[t-1],d,f,p;if(this._parsing===!1)r._parsed=i,r._sorted=!0,p=i;else{Dt(i[t])?p=this.parseArrayData(r,i,t,n):nt(i[t])?p=this.parseObjectData(r,i,t,n):p=this.parsePrimitiveData(r,i,t,n);const m=()=>f[s]===null||c&&f[s]y||f=0;--p)if(!v()){this.updateRangeFromParsed(c,t,m,l);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed,r=[];let i,o,a;for(i=0,o=n.length;i=0&&tthis.getContext(r,i,n),y=c.resolveNamedOptions(p,m,v,f);return y.$shared&&(y.$shared=l,o[a]=Object.freeze(zj(y,l))),y}_resolveAnimations(t,n,r){const i=this.chart,o=this._cachedDataOpts,a=`animation-${n}`,s=o[a];if(s)return s;let l;if(i.options.animation!==!1){const d=this.chart.config,f=d.datasetAnimationScopeKeys(this._type,n),p=d.getOptionScopes(this.getDataset(),f);l=d.createResolver(p,this.getContext(t,r,n))}const c=new p5(i,l&&l.animations);return l&&l._cacheable&&(o[a]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||w1(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),i=this._sharedOptions,o=this.getSharedOptions(r),a=this.includeOptions(n,o)||o!==i;return this.updateSharedOptions(o,n,r),{sharedOptions:o,includeOptions:a}}updateElement(t,n,r,i){w1(i)?Object.assign(t,r):this._resolveAnimations(n,i).update(t,r)}updateSharedOptions(t,n,r){t&&!w1(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[s,l,c]of this._syncList)this[s](l,c);this._syncList=[];const i=r.length,o=n.length,a=Math.min(o,i);a&&this.parse(0,a),o>i?this._insertElements(i,o-i,t):o{for(c.length+=n,s=c.length-1;s>=a;s--)c[s]=c[s-n]};for(l(o),s=t;si-o))}return e._cache.$bar}function Vae(e){const t=e.iScale,n=zae(t,e.type);let r=t._length,i,o,a,s;const l=()=>{a===32767||a===-32768||(ph(s)&&(r=Math.min(r,Math.abs(a-s)||r)),s=a)};for(i=0,o=n.length;i0?i[e-1]:null,s=eMath.abs(s)&&(l=s,c=a),t[n.axis]=c,t._custom={barStart:l,barEnd:c,start:i,end:o,min:a,max:s}}function g5(e,t,n,r){return Dt(e)?Yae(e,t,n,r):t[n.axis]=n.parse(e,r),t}function Vj(e,t,n,r){const i=e.iScale,o=e.vScale,a=i.getLabels(),s=i===o,l=[];let c,d,f,p;for(c=n,d=n+r;c=n?1:-1)}function qae(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,a=[],s=l=>{const c=l.controller.getParsed(n),d=c&&c[l.vScale.axis];if(dt(d)||isNaN(d))return!0};for(const l of i)if(!(n!==void 0&&s(l))&&((o===!1||a.indexOf(l.stack)===-1||o===void 0&&l.stack===void 0)&&a.push(l.stack),l.index===t))break;return a.length||a.push(void 0),a}_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,a;for(o=0,a=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,a=this.getParsed(t),s=i.getLabelForValue(a.x),l=o.getLabelForValue(a.y),c=a._custom;return{label:r[t]||"",value:"("+s+", "+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:a,vScale:s}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(n,i),d=a.axis,f=s.axis;for(let p=n;pmh(S,s,l,!0)?1:Math.max(E,E*n,C,C*n),v=(S,E,C)=>mh(S,s,l,!0)?-1:Math.min(E,E*n,C,C*n),y=m(0,c,f),x=m(nn,d,p),_=v(Ht,c,f),w=v(Ht+nn,d,p);r=(y-_)/2,i=(x-w)/2,o=-(y+_)/2,a=-(x+w)/2}return{ratioX:r,ratioY:i,offsetX:o,offsetY:a}}class Ba extends Yi{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(nt(r[t])){const{key:l="value"}=this._parsing;o=c=>+ds(r[c],l)}let a,s;for(a=t,s=t+n;a0&&!isNaN(t)?$t*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],o=np(n._parsed[t],r.options.locale);return{label:i[t]||"",value:o}}getMaxBorderWidth(t){let n=0;const r=this.chart;let i,o,a,s,l;if(!t){for(i=0,o=r.data.datasets.length;ie!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")}),Te(Ba,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const t=e.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:n,color:r}}=e.legend.options;return t.labels.map((i,o)=>{const a=e.getDatasetMeta(0).controller.getStyle(o);return{text:i,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,fontColor:r,lineWidth:a.borderWidth,pointStyle:n,hidden:!e.getDataVisibility(o),index:o}})}return[]}},onClick(e,t,n){n.chart.toggleDataVisibility(t.index),n.chart.update()}}}});class bf extends Yi{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:r,data:i=[],_dataset:o}=n,a=this.chart._animationsDisabled;let{start:s,count:l}=Q6(n,i,a);this._drawStart=s,this._drawCount=l,X6(n)&&(s=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:!a,options:c},t),this.updateElements(i,s,l,t)}updateElements(t,n,r,i){const o=i==="reset",{iScale:a,vScale:s,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:d,includeOptions:f}=this._getSharedOptions(n,i),p=a.axis,m=s.axis,{spanGaps:v,segment:y}=this.options,x=Eu(v)?v:Number.POSITIVE_INFINITY,_=this.chart._animationsDisabled||o||i==="none",w=n+r,S=t.length;let E=n>0&&this.getParsed(n-1);for(let C=0;C=w){j.skip=!0;continue}const N=this.getParsed(C),U=dt(N[m]),R=j[p]=a.getPixelForValue(N[p],C),V=j[m]=o||U?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,N,l):N[m],C);j.skip=isNaN(R)||isNaN(V)||U,j.stop=C>0&&Math.abs(N[p]-E[p])>x,y&&(j.parsed=N,j.raw=c.data[C]),f&&(j.options=d||this.resolveDataElementOptions(C,k.active?"active":i)),_||this.updateElement(k,C,j,i),E=N}}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)),a=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,o,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}Te(bf,"id","line"),Te(bf,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),Te(bf,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class wf extends Yi{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=np(n._parsed[t].r,r.options.locale);return{label:i[t]||"",value:o}}parseObjectData(t,n,r,i){return a5.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),a=Math.max(r.cutoutPercentage?o/100*r.cutoutPercentage:1,0),s=(o-a)/t.getVisibleDatasetCount();this.outerRadius=o-s*this.index,this.innerRadius=this.outerRadius-s}updateElements(t,n,r,i){const o=i==="reset",a=this.chart,s=a.options.animation,l=this._cachedMeta.rScale,c=l.xCenter,d=l.yCenter,f=l.getIndexAngle(0)-.5*Ht;let p=f,m;const v=360/this.countVisibleElements();for(m=0;m{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&n++}),n}_computeAngle(t,n,r){return this.chart.getDataVisibility(t)?zi(this.resolveDataElementOptions(t,n).angle||r):0}}Te(wf,"id","polarArea"),Te(wf,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),Te(wf,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const t=e.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:n,color:r}}=e.legend.options;return t.labels.map((i,o)=>{const a=e.getDatasetMeta(0).controller.getStyle(o);return{text:i,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,fontColor:r,lineWidth:a.borderWidth,pointStyle:n,hidden:!e.getDataVisibility(o),index:o}})}return[]}},onClick(e,t,n){n.chart.toggleDataVisibility(t.index),n.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class Kx extends Ba{}Te(Kx,"id","pie"),Te(Kx,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class vg extends Yi{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 a5.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 a=this.resolveDatasetElementOptions(t);this.options.showLine||(a.borderWidth=0);const s={_loop:!0,_fullLoop:o.length===i.length,options:a};this.updateElement(r,void 0,s,t)}this.updateElements(i,0,i.length,t)}updateElements(t,n,r,i){const o=this._cachedMeta.rScale,a=i==="reset";for(let s=n;s0&&this.getParsed(n-1);for(let E=n;E0&&Math.abs(k[m]-S[m])>_,x&&(j.parsed=k,j.raw=c.data[E]),p&&(j.options=f||this.resolveDataElementOptions(E,C.active?"active":i)),w||this.updateElement(C,E,j,i),S=k}this.updateSharedOptions(f,i,d)}getMaxOverflow(){const t=this._cachedMeta,n=t.data||[];if(!this.options.showLine){let s=0;for(let l=n.length-1;l>=0;--l)s=Math.max(s,n[l].size(this.resolveDataElementOptions(l))/2);return s>0&&s}const r=t.dataset,i=r.options&&r.options.borderWidth||0;if(!n.length)return i;const o=n[0].size(this.resolveDataElementOptions(0)),a=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,o,a)/2}}Te(yg,"id","scatter"),Te(yg,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),Te(yg,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var Jae=Object.freeze({__proto__:null,BarController:_f,BubbleController:gg,DoughnutController:Ba,LineController:bf,PieController:Kx,PolarAreaController:wf,RadarController:vg,ScatterController:yg});function Ns(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class vT{constructor(t){Te(this,"options"),this.options=t||{}}static override(t){Object.assign(vT.prototype,t)}init(){}formats(){return Ns()}parse(){return Ns()}format(){return Ns()}add(){return Ns()}diff(){return Ns()}startOf(){return Ns()}endOf(){return Ns()}}var ese={_date:vT};function tse(e,t,n,r){const{controller:i,data:o,_sorted:a}=e,s=i._cachedMeta.iScale;if(s&&t===s.axis&&t!=="r"&&a&&o.length){const l=s._reversePixels?Eoe:Ho;if(r){if(i._sharedOptions){const c=o[0],d=typeof c.getRange=="function"&&c.getRange(t);if(d){const f=l(o,t,n-d),p=l(o,t,n+d);return{lo:f.lo,hi:p.hi}}}}else return l(o,t,n)}return{lo:0,hi:o.length-1}}function rp(e,t,n,r,i){const o=e.getSortedVisibleDatasetMetas(),a=n[t];for(let s=0,l=o.length;s{l[a](t[n],i)&&(o.push({element:l,datasetIndex:c,index:d}),s=s||l.inRange(t.x,t.y,i))}),r&&!s?[]:o}var ose={evaluateInteractionItems:rp,modes:{index(e,t,n,r){const i=Ws(t,e),o=n.axis||"x",a=n.includeInvisible||!1,s=n.intersect?S1(e,i,o,r,a):E1(e,i,o,!1,r,a),l=[];return s.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const d=s[0].index,f=c.data[d];f&&!f.skip&&l.push({element:f,datasetIndex:c.index,index:d})}),l):[]},dataset(e,t,n,r){const i=Ws(t,e),o=n.axis||"xy",a=n.includeInvisible||!1;let s=n.intersect?S1(e,i,o,r,a):E1(e,i,o,!1,r,a);if(s.length>0){const l=s[0].datasetIndex,c=e.getDatasetMeta(l).data;s=[];for(let d=0;dn.pos===t)}function Gj(e,t){return e.filter(n=>v5.indexOf(n.pos)===-1&&n.box.axis===t)}function Td(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 ase(e){const t=[];let n,r,i,o,a,s;for(n=0,r=(e||[]).length;nc.box.fullSize),!0),r=Td(Ed(t,"left"),!0),i=Td(Ed(t,"right")),o=Td(Ed(t,"top"),!0),a=Td(Ed(t,"bottom")),s=Gj(t,"x"),l=Gj(t,"y");return{fullSize:n,leftAndTop:r.concat(o),rightAndBottom:i.concat(l).concat(a).concat(s),chartArea:Ed(t,"chartArea"),vertical:r.concat(i).concat(l),horizontal:o.concat(a).concat(s)}}function qj(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function y5(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 use(e,t,n,r){const{pos:i,box:o}=n,a=e.maxPadding;if(!nt(i)){n.size&&(e[i]-=n.size);const f=r[n.stack]||{size:0,count:1};f.size=Math.max(f.size,n.horizontal?o.height:o.width),n.size=f.size/f.count,e[i]+=n.size}o.getPadding&&y5(a,o.getPadding());const s=Math.max(0,t.outerWidth-qj(a,e,"left","right")),l=Math.max(0,t.outerHeight-qj(a,e,"top","bottom")),c=s!==e.w,d=l!==e.h;return e.w=s,e.h=l,n.horizontal?{same:c,other:d}:{same:d,other:c}}function dse(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 fse(e,t){const n=t.maxPadding;function r(i){const o={left:0,top:0,right:0,bottom:0};return i.forEach(a=>{o[a]=Math.max(t[a],n[a])}),o}return r(e?["left","right"]:["top","bottom"])}function Hd(e,t,n,r){const i=[];let o,a,s,l,c,d;for(o=0,a=e.length,c=0;o{typeof y.beforeLayout=="function"&&y.beforeLayout()});const d=l.reduce((y,x)=>x.box.options&&x.box.options.display===!1?y:y+1,0)||1,f=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/d,hBoxMaxHeight:a/2}),p=Object.assign({},i);y5(p,dr(r));const m=Object.assign({maxPadding:p,w:o,h:a,x:i.left,y:i.top},i),v=lse(l.concat(c),f);Hd(s.fullSize,m,f,v),Hd(l,m,f,v),Hd(c,m,f,v)&&Hd(l,m,f,v),dse(m),Kj(s.leftAndTop,m,f,v),m.x+=m.w,m.y+=m.h,Kj(s.rightAndBottom,m,f,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},wt(s.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 _5{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 hse extends _5{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const _g="$chartjs",pse={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Zj=e=>e===null||e==="";function mse(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[_g]={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",Zj(i)){const o=Mj(e,"width");o!==void 0&&(e.width=o)}if(Zj(r))if(e.style.height==="")e.height=e.width/(t||2);else{const o=Mj(e,"height");o!==void 0&&(e.height=o)}return e}const b5=vae?{passive:!0}:!1;function gse(e,t,n){e.addEventListener(t,n,b5)}function vse(e,t,n){e.canvas.removeEventListener(t,n,b5)}function yse(e,t){const n=pse[e.type]||e.type,{x:r,y:i}=Ws(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:i!==void 0?i:null}}function Qv(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function _se(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let a=!1;for(const s of o)a=a||Qv(s.addedNodes,r),a=a&&!Qv(s.removedNodes,r);a&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function bse(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let a=!1;for(const s of o)a=a||Qv(s.removedNodes,r),a=a&&!Qv(s.addedNodes,r);a&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const vh=new Map;let Qj=0;function w5(){const e=window.devicePixelRatio;e!==Qj&&(Qj=e,vh.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function wse(e,t){vh.size||window.addEventListener("resize",w5),vh.set(e,t)}function xse(e){vh.delete(e),vh.size||window.removeEventListener("resize",w5)}function Sse(e,t,n){const r=e.canvas,i=r&&gT(r);if(!i)return;const o=Z6((s,l)=>{const c=i.clientWidth;n(s,l),c{const l=s[0],c=l.contentRect.width,d=l.contentRect.height;c===0&&d===0||o(c,d)});return a.observe(i),wse(e,o),a}function T1(e,t,n){n&&n.disconnect(),t==="resize"&&xse(e)}function Ese(e,t,n){const r=e.canvas,i=Z6(o=>{e.ctx!==null&&n(yse(o,e))},e);return gse(r,t,i),i}class Tse extends _5{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(mse(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[_g])return!1;const r=n[_g].initial;["height","width"].forEach(o=>{const a=r[o];dt(a)?n.removeAttribute(o):n.setAttribute(o,a)});const i=r.style||{};return Object.keys(i).forEach(o=>{n.style[o]=i[o]}),n.width=n.width,delete n[_g],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),o={attach:_se,detach:bse,resize:Sse}[n]||Ese;i[n]=o(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),i=r[n];i&&(({attach:T1,detach:T1,resize:T1}[n]||vse)(t,n,i),r[n]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,i){return gae(t,n,r,i)}isAttached(t){const n=gT(t);return!!(n&&n.isConnected)}}function Ose(e){return!l5()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?hse:Tse}var Cm;let ma=(Cm=class{constructor(){Te(this,"x"),Te(this,"y"),Te(this,"active",!1),Te(this,"options"),Te(this,"$animations")}tooltipPosition(e){const{x:t,y:n}=this.getProps(["x","y"],e);return{x:t,y:n}}hasValue(){return Eu(this.x)&&Eu(this.y)}getProps(e,t){const n=this.$animations;if(!t||!n)return this;const r={};return e.forEach(i=>{r[i]=n[i]&&n[i].active()?n[i]._to:this[i]}),r}},Te(Cm,"defaults",{}),Te(Cm,"defaultRoutes"),Cm);function Cse(e,t){const n=e.options.ticks,r=kse(e),i=Math.min(n.maxTicksLimit||r,r),o=n.major.enabled?Lse(t):[],a=o.length,s=o[0],l=o[a-1],c=[];if(a>i)return jse(t,c,o,a/i),c;const d=Pse(o,t,i);if(a>0){let f,p;const m=a>1?Math.round((l-s)/(a-1)):null;for(km(t,c,d,dt(m)?0:s-m,s),f=0,p=a-1;fi)return l}return Math.max(i,1)}function Lse(e){const t=[];let n,r;for(n=0,r=e.length;ne==="left"?"right":e==="right"?"left":e,Xj=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,Jj=(e,t)=>Math.min(t||e,e);function eM(e,t){const n=[],r=e.length/t,i=e.length;let o=0;for(;oa+s)))return l}function Rse(e,t){wt(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:Ur(n,Ur(r,n)),max:Ur(r,Ur(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(){Pt(this.options.beforeUpdate,[this])}update(t,n,r){const{beginAtZero:i,grace:o,ticks:a}=this.options,s=a.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=qoe(this,o,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=s=o||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const d=this._getLabelSizes(),f=d.widest.width,p=d.highest.height,m=Nn(this.chart.width-f,0,this.maxWidth);s=t.offset?this.maxWidth/r:m/(r-1),f+6>s&&(s=m/(r-(t.offset?.5:1)),l=this.maxHeight-Od(t.grid)-n.padding-tM(t.title,this.chart.options.font),c=Math.sqrt(f*f+p*p),a=lT(Math.min(Math.asin(Nn((d.highest.height+6)/s,-1,1)),Math.asin(Nn(l/c,-1,1))-Math.asin(Nn(p/c,-1,1)))),a=Math.max(i,Math.min(o,a))),this.labelRotation=a}afterCalculateLabelRotation(){Pt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Pt(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:o}}=this,a=this._isVisible(),s=this.isHorizontal();if(a){const l=tM(i,n.options.font);if(s?(t.width=this.maxWidth,t.height=Od(o)+l):(t.height=this.maxHeight,t.width=Od(o)+l),r.display&&this.ticks.length){const{first:c,last:d,widest:f,highest:p}=this._getLabelSizes(),m=r.padding*2,v=zi(this.labelRotation),y=Math.cos(v),x=Math.sin(v);if(s){const _=r.mirror?0:x*f.width+y*p.height;t.height=Math.min(this.maxHeight,t.height+_+m)}else{const _=r.mirror?0:y*f.width+x*p.height;t.width=Math.min(this.maxWidth,t.width+_+m)}this._calculatePadding(c,d,x,y)}}this._handleMargins(),s?(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:a},position:s}=this.options,l=this.labelRotation!==0,c=s!=="top"&&this.axis==="x";if(this.isHorizontal()){const d=this.getPixelForTick(0)-this.left,f=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-d+a)*this.width/(this.width-d),0),this.paddingRight=Math.max((m-f+a)*this.width/(this.width-f),0)}else{let d=n.height/2,f=t.height/2;o==="start"?(d=0,f=t.height):o==="end"&&(d=n.height,f=0),this.paddingTop=d+a,this.paddingBottom=f+a}}_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(){Pt(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:a[U]||0,height:s[U]||0});return{first:N(0),last:N(n-1),widest:N(k),highest:N(j),widths:a,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 Soe(this._alignToPixels?As(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&&ts*i?s/r:l/i:l*i0}_computeGridLineItems(t){const n=this.axis,r=this.chart,i=this.options,{grid:o,position:a,border:s}=i,l=o.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),f=Od(o),p=[],m=s.setContext(this.getContext()),v=m.display?m.width:0,y=v/2,x=function(Z){return As(r,Z,v)};let _,w,S,E,C,k,j,N,U,R,V,Y;if(a==="top")_=x(this.bottom),k=this.bottom-f,N=_-y,R=x(t.top)+y,Y=t.bottom;else if(a==="bottom")_=x(this.top),R=t.top,Y=x(t.bottom)-y,k=_+y,N=this.top+f;else if(a==="left")_=x(this.right),C=this.right-f,j=_-y,U=x(t.left)+y,V=t.right;else if(a==="right")_=x(this.left),U=t.left,V=x(t.right)-y,C=_+y,j=this.left+f;else if(n==="x"){if(a==="center")_=x((t.top+t.bottom)/2+.5);else if(nt(a)){const Z=Object.keys(a)[0],te=a[Z];_=x(this.chart.scales[Z].getPixelForValue(te))}R=t.top,Y=t.bottom,k=_+y,N=k+f}else if(n==="y"){if(a==="center")_=x((t.left+t.right)/2);else if(nt(a)){const Z=Object.keys(a)[0],te=a[Z];_=x(this.chart.scales[Z].getPixelForValue(te))}C=_-y,j=C-f,U=t.left,V=t.right}const X=Ke(i.ticks.maxTicksLimit,d),G=Math.max(1,Math.ceil(d/X));for(w=0;wi.value===t);return r>=0?n.setContext(this.getContext(r)).lineWidth:0}drawGrid(t){const n=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,a;const s=(l,c,d)=>{!d.width||!d.color||(r.save(),r.lineWidth=d.width,r.strokeStyle=d.color,r.setLineDash(d.borderDash||[]),r.lineDashOffset=d.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,a=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,a;for(o=0,a=n.length;o{const r=n.split("."),i=r.pop(),o=[e].concat(r).join("."),a=t[n].split("."),s=a.pop(),l=a.join(".");rn.route(o,i,l,s)})}function zse(e){return"id"in e&&"defaults"in e}class Vse{constructor(){this.controllers=new Pm(Yi,"datasets",!0),this.elements=new Pm(ma,"elements"),this.plugins=new Pm(Object,"plugins"),this.scales=new Pm($l,"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):wt(i,a=>{const s=r||this._getRegistryForType(a);this._exec(t,s,a)})})}_exec(t,n,r){const i=sT(t);Pt(r["before"+i],[],r),n[t](r),Pt(r["after"+i],[],r)}_getRegistryForType(t){for(let n=0;no.filter(s=>!a.some(l=>s.plugin.id===l.plugin.id));this._notify(i(n,r),t,"stop"),this._notify(i(r,n),t,"start")}}function Wse(e){const t={},n=[],r=Object.keys(ao.plugins.items);for(let o=0;o1&&nM(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function rM(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function Xse(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(r=>r.xAxisID===e||r.yAxisID===e);if(n.length)return rM(e,"x",n[0])||rM(e,"y",n[0])}return{}}function Jse(e,t){const n=El[e.type]||{scales:{}},r=t.scales||{},i=Zx(e.type,t),o=Object.create(null);return Object.keys(r).forEach(a=>{const s=r[a];if(!nt(s))return console.error(`Invalid scale configuration for scale: ${a}`);if(s._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);const l=Qx(a,s,Xse(a,e),rn.scales[s.type]),c=Zse(l,i),d=n.scales||{};o[a]=mf(Object.create(null),[{axis:l},s,d[l],d[c]])}),e.data.datasets.forEach(a=>{const s=a.type||e.type,l=a.indexAxis||Zx(s,t),c=(El[s]||{}).scales||{};Object.keys(c).forEach(d=>{const f=Kse(d,l),p=a[f+"AxisID"]||f;o[p]=o[p]||Object.create(null),mf(o[p],[{axis:f},r[p],c[d]])})}),Object.keys(o).forEach(a=>{const s=o[a];mf(s,[rn.scales[s.type],rn.scale])}),o}function x5(e){const t=e.options||(e.options={});t.plugins=Ke(t.plugins,{}),t.scales=Jse(e,t)}function S5(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function ele(e){return e=e||{},e.data=S5(e.data),x5(e),e}const iM=new Map,E5=new Set;function Lm(e,t){let n=iM.get(e);return n||(n=t(),iM.set(e,n),E5.add(n)),n}const Cd=(e,t,n)=>{const r=ds(t,n);r!==void 0&&e.add(r)};class tle{constructor(t){this._config=ele(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=S5(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(),x5(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Lm(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return Lm(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return Lm(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return Lm(`${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,a=this._cachedScopes(t,r),s=a.get(n);if(s)return s;const l=new Set;n.forEach(d=>{t&&(l.add(t),d.forEach(f=>Cd(l,t,f))),d.forEach(f=>Cd(l,i,f)),d.forEach(f=>Cd(l,El[o]||{},f)),d.forEach(f=>Cd(l,rn,f)),d.forEach(f=>Cd(l,Gx,f))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),E5.has(n)&&a.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,El[n]||{},rn.datasets[n]||{},{type:n},rn,Gx]}resolveNamedOptions(t,n,r,i=[""]){const o={$shared:!0},{resolver:a,subPrefixes:s}=oM(this._resolverCache,t,i);let l=a;if(rle(a,n)){o.$shared=!1,r=fs(r)?r():r;const c=this.createResolver(t,r,s);l=Tu(a,r,c)}for(const c of n)o[c]=l[c];return o}createResolver(t,n,r=[""],i){const{resolver:o}=oM(this._resolverCache,t,r);return nt(n)?Tu(o,n,void 0,i):o}}function oM(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:hT(t,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},r.set(i,o)),o}const nle=e=>nt(e)&&Object.getOwnPropertyNames(e).reduce((t,n)=>t||fs(e[n]),!1);function rle(e,t){const{isScriptable:n,isIndexable:r}=n5(e);for(const i of t){const o=n(i),a=r(i),s=(a||o)&&e[i];if(o&&(fs(s)||nle(s))||a&&Dt(s))return!0}return!1}var ile="4.3.3";const ole=["top","bottom","left","right","chartArea"];function aM(e,t){return e==="top"||e==="bottom"||ole.indexOf(e)===-1&&t==="x"}function sM(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function lM(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),Pt(n&&n.onComplete,[e],t)}function ale(e){const t=e.chart,n=t.options.animation;Pt(n&&n.onProgress,[e],t)}function T5(e){return l5()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const bg={},cM=e=>{const t=T5(e);return Object.values(bg).filter(n=>n.canvas===t).pop()};function sle(e,t,n){const r=Object.keys(e);for(const i of r){const o=+i;if(o>=t){const a=e[i];delete e[i],(n>0||o>t)&&(e[o+n]=a)}}}function lle(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}function cle(e){const{xScale:t,yScale:n}=e;if(t&&n)return{left:t.left,right:t.right,top:n.top,bottom:n.bottom}}var Sa;let S0=(Sa=class{static register(...e){ao.add(...e),uM()}static unregister(...e){ao.remove(...e),uM()}constructor(e,t){const n=this.config=new tle(t),r=T5(e),i=cM(r);if(i)throw new Error("Canvas is already in use. Chart with ID '"+i.id+"' must be destroyed before the canvas with ID '"+i.canvas.id+"' can be reused.");const o=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||Ose(r)),this.platform.updateConfig(n);const a=this.platform.acquireContext(r,o.aspectRatio),s=a&&a.canvas,l=s&&s.height,c=s&&s.width;if(this.id=doe(),this.ctx=a,this.canvas=s,this.width=c,this.height=l,this._options=o,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 Hse,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Coe(d=>this.update(d),o.resizeDelay||0),this._dataChanges=[],bg[this.id]=this,!a||!s){console.error("Failed to create chart: can't acquire context from the given item");return}No.listen(this,"complete",lM),No.listen(this,"progress",ale),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:t},width:n,height:r,_aspectRatio:i}=this;return dt(e)?t&&i?i:r?n/r:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return ao}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():jj(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return kj(this.canvas,this.ctx),this}stop(){return No.stop(this),this}resize(e,t){No.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}_resize(e,t){const n=this.options,r=this.canvas,i=n.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(r,e,t,i),a=n.devicePixelRatio||this.platform.getDevicePixelRatio(),s=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,jj(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),Pt(n.onResize,[this,o],this),this.attached&&this._doResize(s)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};wt(e,(t,n)=>{t.id=n})}buildOrUpdateScales(){const e=this.options,t=e.scales,n=this.scales,r=Object.keys(n).reduce((o,a)=>(o[a]=!1,o),{});let i=[];t&&(i=i.concat(Object.keys(t).map(o=>{const a=t[o],s=Qx(o,a),l=s==="r",c=s==="x";return{options:a,dposition:l?"chartArea":c?"bottom":"left",dtype:l?"radialLinear":c?"category":"linear"}}))),wt(i,o=>{const a=o.options,s=a.id,l=Qx(s,a),c=Ke(a.type,o.dtype);(a.position===void 0||aM(a.position,l)!==aM(o.dposition))&&(a.position=o.dposition),r[s]=!0;let d=null;if(s in n&&n[s].type===c)d=n[s];else{const f=ao.getScale(c);d=new f({id:s,type:c,ctx:this.ctx,chart:this}),n[d.id]=d}d.init(a,e)}),wt(r,(o,a)=>{o||delete n[a]}),wt(n,o=>{lr.configure(this,o,o.options),lr.addBox(this,o)})}_updateMetasets(){const e=this._metasets,t=this.data.datasets.length,n=e.length;if(e.sort((r,i)=>r.index-i.index),n>t){for(let r=t;rt.length&&delete this._stacks,e.forEach((n,r)=>{t.filter(i=>i===n._dataset).length===0&&this._destroyDatasetMeta(r)})}buildOrUpdateControllers(){const e=[],t=this.data.datasets;let n,r;for(this._removeUnreferencedMetasets(),n=0,r=t.length;n{this.getDatasetMeta(t).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const t=this.config;t.update();const n=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const i=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let l=0,c=this.data.datasets.length;l{l.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(sM("z","_idx"));const{_active:a,_lastEvent:s}=this;s?this._eventHandler(s,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){wt(this.scales,e=>{lr.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,t=new Set(Object.keys(this._listeners)),n=new Set(e.events);(!_j(t,n)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,t=this._getUniformDataChanges()||[];for(const{method:n,start:r,count:i}of t){const o=n==="_removeElements"?-i:i;sle(e,r,o)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const t=this.data.datasets.length,n=i=>new Set(e.filter(o=>o[0]===i).map((o,a)=>a+","+o.splice(1).join(","))),r=n(0);for(let i=1;ii.split(",")).map(i=>({method:i[1],start:+i[2],count:+i[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;lr.update(this,this.width,this.height,e);const t=this.chartArea,n=t.width<=0||t.height<=0;this._layers=[],wt(this.boxes,r=>{n&&r.position==="chartArea"||(r.configure&&r.configure(),this._layers.push(...r._layers()))},this),this._layers.forEach((r,i)=>{r._idx=i}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let t=0,n=this.data.datasets.length;t=0;--t)this._drawDataset(e[t]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const t=this.ctx,n=e._clip,r=!n.disabled,i=cle(e)||this.chartArea,o={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(r&&b0(t,{left:n.left===!1?0:i.left-n.left,right:n.right===!1?this.width:i.right+n.right,top:n.top===!1?0:i.top-n.top,bottom:n.bottom===!1?this.height:i.bottom+n.bottom}),e.controller.draw(),r&&w0(t),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(e){return Wo(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,n,r){const i=ose.modes[t];return typeof i=="function"?i(this,e,n,r):[]}getDatasetMeta(e){const t=this.data.datasets[e],n=this._metasets;let r=n.filter(i=>i&&i._dataset===t).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:e,_dataset:t,_parsed:[],_sorted:!1},n.push(r)),r}getContext(){return this.$context||(this.$context=Ss(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const t=this.data.datasets[e];if(!t)return!1;const n=this.getDatasetMeta(e);return typeof n.hidden=="boolean"?!n.hidden:!t.hidden}setDatasetVisibility(e,t){const n=this.getDatasetMeta(e);n.hidden=!t}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,t,n){const r=n?"show":"hide",i=this.getDatasetMeta(e),o=i.controller._resolveAnimations(void 0,r);ph(t)?(i.data[t].hidden=!n,this.update()):(this.setDatasetVisibility(e,n),o.update(i,{visible:n}),this.update(a=>a.datasetIndex===e?r:void 0))}hide(e,t){this._updateVisibility(e,t,!1)}show(e,t){this._updateVisibility(e,t,!0)}_destroyDatasetMeta(e){const t=this._metasets[e];t&&t.controller&&t.controller._destroy(),delete this._metasets[e]}_stop(){let e,t;for(this.stop(),No.remove(this),e=0,t=this.data.datasets.length;e{t.addEventListener(this,i,o),e[i]=o},r=(i,o,a)=>{i.offsetX=o,i.offsetY=a,this._eventHandler(i)};wt(this.options.events,i=>n(i,r))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,t=this.platform,n=(s,l)=>{t.addEventListener(this,s,l),e[s]=l},r=(s,l)=>{e[s]&&(t.removeEventListener(this,s,l),delete e[s])},i=(s,l)=>{this.canvas&&this.resize(s,l)};let o;const a=()=>{r("attach",a),this.attached=!0,this.resize(),n("resize",i),n("detach",o)};o=()=>{this.attached=!1,r("resize",i),this._stop(),this._resize(0,0),n("attach",a)},t.isAttached(this.canvas)?a():o()}unbindEvents(){wt(this._listeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._listeners={},wt(this._responsiveListeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,t,n){const r=n?"set":"remove";let i,o,a,s;for(t==="dataset"&&(i=this.getDatasetMeta(e[0].datasetIndex),i.controller["_"+r+"DatasetHoverStyle"]()),a=0,s=e.length;a{const o=this.getDatasetMeta(r);if(!o)throw new Error("No dataset found at index "+r);return{datasetIndex:r,element:o.data[i],index:i}});!Yv(n,t)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,t))}notifyPlugins(e,t,n){return this._plugins.notify(this,e,t,n)}isPluginEnabled(e){return this._plugins._cache.filter(t=>t.plugin.id===e).length===1}_updateHoverStyles(e,t,n){const r=this.options.hover,i=(s,l)=>s.filter(c=>!l.some(d=>c.datasetIndex===d.datasetIndex&&c.index===d.index)),o=i(t,e),a=n?e:i(e,t);o.length&&this.updateHoverStyle(o,r.mode,!1),a.length&&r.mode&&this.updateHoverStyle(a,r.mode,!0)}_eventHandler(e,t){const n={event:e,replay:t,cancelable:!0,inChartArea:this.isPointInArea(e)},r=o=>(o.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",n,r)===!1)return;const i=this._handleEvent(e,t,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,r),(i||n.changed)&&this.render(),this}_handleEvent(e,t,n){const{_active:r=[],options:i}=this,o=t,a=this._getActiveElements(e,r,n,o),s=voe(e),l=lle(e,this._lastEvent,n,s);n&&(this._lastEvent=null,Pt(i.onHover,[e,a,this],this),s&&Pt(i.onClick,[e,a,this],this));const c=!Yv(a,r);return(c||t)&&(this._active=a,this._updateHoverStyles(a,r,t)),this._lastEvent=l,c}_getActiveElements(e,t,n,r){if(e.type==="mouseout")return[];if(!n)return t;const i=this.options.hover;return this.getElementsAtEventForMode(e,i.mode,i,r)}},Te(Sa,"defaults",rn),Te(Sa,"instances",bg),Te(Sa,"overrides",El),Te(Sa,"registry",ao),Te(Sa,"version",ile),Te(Sa,"getChart",cM),Sa);function uM(){return wt(S0.instances,e=>e._plugins.invalidate())}function ule(e,t,n){const{startAngle:r,pixelMargin:i,x:o,y:a,outerRadius:s,innerRadius:l}=t;let c=i/s;e.beginPath(),e.arc(o,a,s,r-c,n+c),l>i?(c=i/l,e.arc(o,a,l,n+c,r-c,!0)):e.arc(o,a,i,n+nn,r-nn),e.closePath(),e.clip()}function dle(e){return fT(e,["outerStart","outerEnd","innerStart","innerEnd"])}function fle(e,t,n,r){const i=dle(e.options.borderRadius),o=(n-t)/2,a=Math.min(o,r*t/2),s=l=>{const c=(n-Math.min(o,l))*r/2;return Nn(l,0,Math.min(o,c))};return{outerStart:s(i.outerStart),outerEnd:s(i.outerEnd),innerStart:Nn(i.innerStart,0,a),innerEnd:Nn(i.innerEnd,0,a)}}function uc(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function Xv(e,t,n,r,i,o){const{x:a,y:s,startAngle:l,pixelMargin:c,innerRadius:d}=t,f=Math.max(t.outerRadius+r+n-c,0),p=d>0?d+r+n+c:0;let m=0;const v=i-l;if(r){const Z=d>0?d-r:0,te=f>0?f-r:0,le=(Z+te)/2,q=le!==0?v*le/(le+r):v;m=(v-q)/2}const y=Math.max(.001,v*f-n/Ht)/f,x=(v-y)/2,_=l+x+m,w=i-x-m,{outerStart:S,outerEnd:E,innerStart:C,innerEnd:k}=fle(t,p,f,w-_),j=f-S,N=f-E,U=_+S/j,R=w-E/N,V=p+C,Y=p+k,X=_+C/V,G=w-k/Y;if(e.beginPath(),o){const Z=(U+R)/2;if(e.arc(a,s,f,U,Z),e.arc(a,s,f,Z,R),E>0){const I=uc(N,R,a,s);e.arc(I.x,I.y,E,R,w+nn)}const te=uc(Y,w,a,s);if(e.lineTo(te.x,te.y),k>0){const I=uc(Y,G,a,s);e.arc(I.x,I.y,k,w+nn,G+Math.PI)}const le=(w-k/p+(_+C/p))/2;if(e.arc(a,s,p,w-k/p,le,!0),e.arc(a,s,p,le,_+C/p,!0),C>0){const I=uc(V,X,a,s);e.arc(I.x,I.y,C,X+Math.PI,_-nn)}const q=uc(j,_,a,s);if(e.lineTo(q.x,q.y),S>0){const I=uc(j,U,a,s);e.arc(I.x,I.y,S,_-nn,U)}}else{e.moveTo(a,s);const Z=Math.cos(U)*f+a,te=Math.sin(U)*f+s;e.lineTo(Z,te);const le=Math.cos(R)*f+a,q=Math.sin(R)*f+s;e.lineTo(le,q)}e.closePath()}function hle(e,t,n,r,i){const{fullCircles:o,startAngle:a,circumference:s}=t;let l=t.endAngle;if(o){Xv(e,t,n,r,l,i);for(let c=0;c=$t||mh(o,s,l),v=Vo(a,c+p,d+p);return m&&v}getCenterPoint(t){const{x:n,y:r,startAngle:i,endAngle:o,innerRadius:a,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:l,spacing:c}=this.options,d=(i+o)/2,f=(a+s+c+l)/2;return{x:n+Math.cos(d)*f,y:r+Math.sin(d)*f}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:n,circumference:r}=this,i=(n.offset||0)/4,o=(n.spacing||0)/2,a=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=r>$t?Math.floor(r/$t):0,r===0||this.innerRadius<0||this.outerRadius<0)return;t.save();const s=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(s)*i,Math.sin(s)*i);const l=1-Math.sin(Math.min(Ht,r||0)),c=i*l;t.fillStyle=n.backgroundColor,t.strokeStyle=n.borderColor,hle(t,this,c,o,a),ple(t,this,c,o,a),t.restore()}}Te(Wd,"id","arc"),Te(Wd,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),Te(Wd,"defaultRoutes",{backgroundColor:"backgroundColor"}),Te(Wd,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"});function O5(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 mle(e,t,n){e.lineTo(n.x,n.y)}function gle(e){return e.stepped?$oe:e.tension||e.cubicInterpolationMode==="monotone"?Uoe:mle}function C5(e,t,n={}){const r=e.length,{start:i=0,end:o=r-1}=n,{start:a,end:s}=t,l=Math.max(i,a),c=Math.min(o,s),d=is&&o>s;return{count:r,start:l,loop:t.loop,ilen:c(a+(c?s-E:E))%o,S=()=>{y!==x&&(e.lineTo(d,x),e.lineTo(d,y),e.lineTo(d,_))};for(l&&(m=i[w(0)],e.moveTo(m.x,m.y)),p=0;p<=s;++p){if(m=i[w(p)],m.skip)continue;const E=m.x,C=m.y,k=E|0;k===v?(Cx&&(x=C),d=(f*d+E)/++f):(S(),e.lineTo(E,C),v=k,f=0,y=x=C),_=C}S()}function Xx(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?yle:vle}function _le(e){return e.stepped?yae:e.tension||e.cubicInterpolationMode==="monotone"?_ae:Ys}function ble(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),O5(e,t.options),e.stroke(i)}function wle(e,t,n,r){const{segments:i,options:o}=t,a=Xx(t);for(const s of i)O5(e,o,s.style),e.beginPath(),a(e,t,s,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const xle=typeof Path2D=="function";function Sle(e,t,n,r){xle&&!t.options.segment?ble(e,t,n,r):wle(e,t,n,r)}class za extends ma{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;uae(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=Tae(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,a=h5(this,{property:n,start:i,end:i});if(!a.length)return;const s=[],l=_le(r);let c,d;for(c=0,d=a.length;ce!=="borderDash"&&e!=="fill"});function dM(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 P5(e){return Jx[e%Jx.length]}function L5(e){return fM[e%fM.length]}function Lle(e,t){return e.borderColor=P5(t),e.backgroundColor=L5(t),++t}function jle(e,t){return e.backgroundColor=e.data.map(()=>P5(t++)),t}function Mle(e,t){return e.backgroundColor=e.data.map(()=>L5(t++)),t}function Ale(e){let t=0;return(n,r)=>{const i=e.getDatasetMeta(r).controller;i instanceof Ba?t=jle(n,t):i instanceof wf?t=Mle(n,t):i&&(t=Lle(n,t))}}function hM(e){let t;for(t in e)if(e[t].borderColor||e[t].backgroundColor)return!0;return!1}function Nle(e){return e&&(e.borderColor||e.backgroundColor)}var Rle={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,t,n){if(!n.enabled)return;const{data:{datasets:r},options:i}=e.config,{elements:o}=i;if(!n.forceOverride&&(hM(r)||Nle(i)||o&&hM(o)))return;const a=Ale(e);r.forEach(a)}};function Dle(e,t,n,r,i){const o=i.samples||r;if(o>=n)return e.slice(t,t+n);const a=[],s=(n-2)/(o-2);let l=0;const c=t+n-1;let d=t,f,p,m,v,y;for(a[l++]=e[d],f=0;fm&&(m=v,p=e[w],y=w);a[l++]=p,d=y}return a[l++]=e[c],a}function Ile(e,t,n,r){let i=0,o=0,a,s,l,c,d,f,p,m,v,y;const x=[],_=t+n-1,w=e[t].x,S=e[_].x-w;for(a=t;ay&&(y=c,p=a),i=(o*i+s.x)/++o;else{const C=a-1;if(!dt(f)&&!dt(p)){const k=Math.min(f,p),j=Math.max(f,p);k!==m&&k!==C&&x.push({...e[k],x:i}),j!==m&&j!==C&&x.push({...e[j],x:i})}a>0&&C!==m&&x.push(e[C]),x.push(s),d=E,o=0,v=y=c,f=p=m=a}}return x}function j5(e){if(e._decimated){const t=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function pM(e){e.data.datasets.forEach(t=>{j5(t)})}function Fle(e,t){const n=t.length;let r=0,i;const{iScale:o}=e,{min:a,max:s,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(r=Nn(Ho(t,o.axis,a).lo,0,n-1)),c?i=Nn(Ho(t,o.axis,s).hi+1,r,n)-r:i=n-r,{start:r,count:i}}var $le={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,t,n)=>{if(!n.enabled){pM(e);return}const r=e.width;e.data.datasets.forEach((i,o)=>{const{_data:a,indexAxis:s}=i,l=e.getDatasetMeta(o),c=a||i.data;if(Vd([s,e.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const d=e.scales[l.xAxisID];if(d.type!=="linear"&&d.type!=="time"||e.options.parsing)return;let{start:f,count:p}=Fle(l,c);const m=n.threshold||4*r;if(p<=m){j5(i);return}dt(a)&&(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=Dle(c,f,p,r,n);break;case"min-max":v=Ile(c,f,p,r);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}i._decimated=v})},destroy(e){pM(e)}};function Ule(e,t,n){const r=e.segments,i=e.points,o=t.points,a=[];for(const s of r){let{start:l,end:c}=s;c=yT(l,c,i);const d=e2(n,i[l],i[c],s.loop);if(!t.segments){a.push({source:s,target:d,start:i[l],end:i[c]});continue}const f=h5(t,d);for(const p of f){const m=e2(n,o[p.start],o[p.end],p.loop),v=f5(s,i,m);for(const y of v)a.push({source:y,target:p,start:{[n]:mM(d,m,"start",Math.max)},end:{[n]:mM(d,m,"end",Math.min)}})}}return a}function e2(e,t,n,r){if(r)return;let i=t[e],o=n[e];return e==="angle"&&(i=zr(i),o=zr(o)),{property:e,start:i,end:o}}function Ble(e,t){const{x:n=null,y:r=null}=e||{},i=t.points,o=[];return t.segments.forEach(({start:a,end:s})=>{s=yT(a,s,i);const l=i[a],c=i[s];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 yT(e,t,n){for(;t>e;t--){const r=n[t];if(!isNaN(r.x)&&!isNaN(r.y))break}return t}function mM(e,t,n,r){return e&&t?r(e[n],t[n]):e?e[n]:t?t[n]:0}function M5(e,t){let n=[],r=!1;return Dt(e)?(r=!0,n=e):n=Ble(e,t),n.length?new za({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function gM(e){return e&&e.fill!==!1}function zle(e,t,n){let r=e[t].fill;const i=[t];let o;if(!n)return r;for(;r!==!1&&i.indexOf(r)===-1;){if(!tn(r))return r;if(o=e[r],!o)return!1;if(o.visible)return r;i.push(r),r=o.fill}return!1}function Vle(e,t,n){const r=Gle(e);if(nt(r))return isNaN(r.value)?!1:r;let i=parseFloat(r);return tn(i)&&Math.floor(i)===i?Hle(r[0],t,i,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function Hle(e,t,n,r){return(e==="-"||e==="+")&&(n=t+n),n===t||n<0||n>=r?!1:n}function Wle(e,t){let n=null;return e==="start"?n=t.bottom:e==="end"?n=t.top:nt(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function Yle(e,t,n){let r;return e==="start"?r=n:e==="end"?r=t.options.reverse?t.min:t.max:nt(e)?r=e.value:r=t.getBaseValue(),r}function Gle(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 qle(e){const{scale:t,index:n,line:r}=e,i=[],o=r.segments,a=r.points,s=Kle(t,n);s.push(M5({x:null,y:t.bottom},r));for(let l=0;l=0;--a){const s=i[a].$filler;s&&(s.line.updateControlPoints(o,s.axis),r&&s.fill&&k1(e.ctx,s,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;gM(o)&&k1(e.ctx,o,e.chartArea)}},beforeDatasetDraw(e,t,n){const r=t.meta.$filler;!gM(r)||n.drawTime!=="beforeDatasetDraw"||k1(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const bM=(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)}},ace=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class wM extends ma{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=Pt(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=En(r.font),o=i.size,a=this._computeTitleHeight(),{boxWidth:s,itemHeight:l}=bM(r,o);let c,d;n.font=i.string,this.isHorizontal()?(c=this.maxWidth,d=this._fitRows(a,o,s,l)+10):(d=this.maxHeight,c=this._fitCols(a,i,s,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(d,t.maxHeight||this.maxHeight)}_fitRows(t,n,r,i){const{ctx:o,maxWidth:a,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],d=i+s;let f=t;o.textAlign="left",o.textBaseline="middle";let p=-1,m=-d;return this.legendItems.forEach((v,y)=>{const x=r+n/2+o.measureText(v.text).width;(y===0||c[c.length-1]+x+2*s>a)&&(f+=d,c[c.length-(y>0?0:1)]=0,m+=d,p++),l[y]={left:0,top:m,row:p,width:x,height:i},c[c.length-1]+=x+s}),f}_fitCols(t,n,r,i){const{ctx:o,maxHeight:a,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],d=a-t;let f=s,p=0,m=0,v=0,y=0;return this.legendItems.forEach((x,_)=>{const{itemWidth:w,itemHeight:S}=sce(r,n,o,x,i);_>0&&m+S+2*s>d&&(f+=p+s,c.push({width:p,height:m}),v+=p+s,y++,p=m=0),l[_]={left:v,top:m,col:y,width:w,height:S},p=Math.max(p,w),m+=S+s}),f+=p,c.push({width:p,height:m}),f}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:i},rtl:o}}=this,a=Xc(o,this.left,this.width);if(this.isHorizontal()){let s=0,l=or(r,this.left+i,this.right-this.lineWidths[s]);for(const c of n)s!==c.row&&(s=c.row,l=or(r,this.left+i,this.right-this.lineWidths[s])),c.top+=this.top+t+i,c.left=a.leftForLtr(a.x(l),c.width),l+=c.width+i}else{let s=0,l=or(r,this.top+t+i,this.bottom-this.columnSizes[s].height);for(const c of n)c.col!==s&&(s=c.col,l=or(r,this.top+t+i,this.bottom-this.columnSizes[s].height)),c.top=l,c.left+=this.left+i,c.left=a.leftForLtr(a.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;b0(t,this),this._draw(),w0(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:i}=this,{align:o,labels:a}=t,s=rn.color,l=Xc(t.rtl,this.left,this.width),c=En(a.font),{padding:d}=a,f=c.size,p=f/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}=bM(a,f),_=function(k,j,N){if(isNaN(v)||v<=0||isNaN(y)||y<0)return;i.save();const U=Ke(N.lineWidth,1);if(i.fillStyle=Ke(N.fillStyle,s),i.lineCap=Ke(N.lineCap,"butt"),i.lineDashOffset=Ke(N.lineDashOffset,0),i.lineJoin=Ke(N.lineJoin,"miter"),i.lineWidth=U,i.strokeStyle=Ke(N.strokeStyle,s),i.setLineDash(Ke(N.lineDash,[])),a.usePointStyle){const R={radius:y*Math.SQRT2/2,pointStyle:N.pointStyle,rotation:N.rotation,borderWidth:U},V=l.xPlus(k,v/2),Y=j+p;e5(i,R,V,Y,a.pointStyleWidth&&v)}else{const R=j+Math.max((f-y)/2,0),V=l.leftForLtr(k,v),Y=dl(N.borderRadius);i.beginPath(),Object.values(Y).some(X=>X!==0)?gh(i,{x:V,y:R,w:v,h:y,radius:Y}):i.rect(V,R,v,y),i.fill(),U!==0&&i.stroke()}i.restore()},w=function(k,j,N){Tl(i,N.text,k,j+x/2,c,{strikethrough:N.hidden,textAlign:l.textAlign(N.textAlign)})},S=this.isHorizontal(),E=this._computeTitleHeight();S?m={x:or(o,this.left+d,this.right-r[0]),y:this.top+d+E,line:0}:m={x:this.left+d,y:or(o,this.top+E+d,this.bottom-n[0].height),line:0},c5(this.ctx,t.textDirection);const C=x+d;this.legendItems.forEach((k,j)=>{i.strokeStyle=k.fontColor,i.fillStyle=k.fontColor;const N=i.measureText(k.text).width,U=l.textAlign(k.textAlign||(k.textAlign=a.textAlign)),R=v+p+N;let V=m.x,Y=m.y;l.setWidth(this.width),S?j>0&&V+R+d>this.right&&(Y=m.y+=C,m.line++,V=m.x=or(o,this.left+d,this.right-r[m.line])):j>0&&Y+C>this.bottom&&(V=m.x=V+n[m.line].width+d,m.line++,Y=m.y=or(o,this.top+E+d,this.bottom-n[m.line].height));const X=l.x(V);if(_(X,Y,k),V=koe(U,V+v+p,S?V+R:this.right,t.rtl),w(l.x(V),Y,k),S)m.x+=R+d;else if(typeof k.text!="string"){const G=c.lineHeight;m.y+=N5(k,G)+d}else m.y+=C}),u5(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=En(n.font),i=dr(n.padding);if(!n.display)return;const o=Xc(t.rtl,this.left,this.width),a=this.ctx,s=n.position,l=r.size/2,c=i.top+l;let d,f=this.left,p=this.width;if(this.isHorizontal())p=Math.max(...this.lineWidths),d=this.top+c,f=or(t.align,f,this.right-p);else{const v=this.columnSizes.reduce((y,x)=>Math.max(y,x.height),0);d=c+or(t.align,this.top,this.bottom-v-t.labels.padding-this._computeTitleHeight())}const m=or(s,f,f+p);a.textAlign=o.textAlign(uT(s)),a.textBaseline="middle",a.strokeStyle=n.color,a.fillStyle=n.color,a.font=r.string,Tl(a,n.text,m,d,r)}_computeTitleHeight(){const t=this.options.title,n=En(t.font),r=dr(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,i,o;if(Vo(t,this.left,this.right)&&Vo(n,this.top,this.bottom)){for(o=this.legendHitBoxes,r=0;ro.length>a.length?o:a)),t+n.size/2+r.measureText(i).width}function cce(e,t,n){let r=e;return typeof t.text!="string"&&(r=N5(t,n)),r}function N5(e,t){const n=e.text?e.text.length:0;return t*n}function uce(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var dce={id:"legend",_element:wM,start(e,t,n){const r=e.legend=new wM({ctx:e.ctx,options:n,chart:e});lr.configure(e,r,n),lr.addBox(e,r)},stop(e){lr.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;lr.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:a,borderRadius:s}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(n?0:void 0),d=dr(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:(d.width+d.height)/4,strokeStyle:c.borderColor,pointStyle:r||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:a&&(s||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 _T extends ma{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=Dt(r.text)?r.text.length:1;this._padding=dr(r.padding);const o=i*En(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:a}=this,s=a.align;let l=0,c,d,f;return this.isHorizontal()?(d=or(s,r,o),f=n+t,c=o-r):(a.position==="left"?(d=r+t,f=or(s,i,n),l=Ht*-.5):(d=o-t,f=or(s,n,i),l=Ht*.5),c=i-n),{titleX:d,titleY:f,maxWidth:c,rotation:l}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const r=En(n.font),i=r.lineHeight/2+this._padding.top,{titleX:o,titleY:a,maxWidth:s,rotation:l}=this._drawArgs(i);Tl(t,n.text,0,0,r,{color:n.color,maxWidth:s,rotation:l,textAlign:uT(n.align),textBaseline:"middle",translation:[o,a]})}}function fce(e,t){const n=new _T({ctx:e.ctx,options:t,chart:e});lr.configure(e,n,t),lr.addBox(e,n),e.titleBlock=n}var hce={id:"title",_element:_T,start(e,t,n){fce(e,n)},stop(e){const t=e.titleBlock;lr.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const r=e.titleBlock;lr.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 jm=new WeakMap;var pce={id:"subtitle",start(e,t,n){const r=new _T({ctx:e.ctx,options:n,chart:e});lr.configure(e,r,n),lr.addBox(e,r),jm.set(e,r)},stop(e){lr.removeBox(e,jm.get(e)),jm.delete(e)},beforeUpdate(e,t,n){const r=jm.get(e);lr.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 xf={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 mce(e,t){const{element:n,datasetIndex:r,index:i}=t,o=e.getDatasetMeta(r).controller,{label:a,value:s}=o.getLabelAndValue(i);return{chart:e,label:a,parsed:o.getParsed(i),raw:e.data.datasets[r].data[i],formattedValue:s,dataset:o.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function xM(e,t){const n=e.chart.ctx,{body:r,footer:i,title:o}=e,{boxWidth:a,boxHeight:s}=t,l=En(t.bodyFont),c=En(t.titleFont),d=En(t.footerFont),f=o.length,p=i.length,m=r.length,v=dr(t.padding);let y=v.height,x=0,_=r.reduce((E,C)=>E+C.before.length+C.lines.length+C.after.length,0);if(_+=e.beforeBody.length+e.afterBody.length,f&&(y+=f*c.lineHeight+(f-1)*t.titleSpacing+t.titleMarginBottom),_){const E=t.displayColors?Math.max(s,l.lineHeight):l.lineHeight;y+=m*E+(_-m)*l.lineHeight+(_-1)*t.bodySpacing}p&&(y+=t.footerMarginTop+p*d.lineHeight+(p-1)*t.footerSpacing);let w=0;const S=function(E){x=Math.max(x,n.measureText(E).width+w)};return n.save(),n.font=c.string,wt(e.title,S),n.font=l.string,wt(e.beforeBody.concat(e.afterBody),S),w=t.displayColors?a+2+t.boxPadding:0,wt(r,E=>{wt(E.before,S),wt(E.lines,S),wt(E.after,S)}),w=0,n.font=d.string,wt(e.footer,S),n.restore(),x+=v.width,{width:x,height:y}}function gce(e,t){const{y:n,height:r}=t;return ne.height-r/2?"bottom":"center"}function vce(e,t,n,r){const{x:i,width:o}=r,a=n.caretSize+n.caretPadding;if(e==="left"&&i+o+a>t.width||e==="right"&&i-o-a<0)return!0}function yce(e,t,n,r){const{x:i,width:o}=n,{width:a,chartArea:{left:s,right:l}}=e;let c="center";return r==="center"?c=i<=(s+l)/2?"left":"right":i<=o/2?c="left":i>=a-o/2&&(c="right"),vce(c,e,t,n)&&(c="center"),c}function SM(e,t,n){const r=n.yAlign||t.yAlign||gce(e,n);return{xAlign:n.xAlign||t.xAlign||yce(e,t,n,r),yAlign:r}}function _ce(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function bce(e,t,n){let{y:r,height:i}=e;return t==="top"?r+=n:t==="bottom"?r-=i+n:r-=i/2,r}function EM(e,t,n,r){const{caretSize:i,caretPadding:o,cornerRadius:a}=e,{xAlign:s,yAlign:l}=n,c=i+o,{topLeft:d,topRight:f,bottomLeft:p,bottomRight:m}=dl(a);let v=_ce(t,s);const y=bce(t,l,c);return l==="center"?s==="left"?v+=c:s==="right"&&(v-=c):s==="left"?v-=Math.max(d,p)+i:s==="right"&&(v+=Math.max(f,m)+i),{x:Nn(v,0,r.width-t.width),y:Nn(y,0,r.height-t.height)}}function Mm(e,t,n){const r=dr(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function TM(e){return io([],Ro(e))}function wce(e,t,n){return Ss(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function OM(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const R5={beforeTitle:Ao,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"?R5[t].call(n,r):i}class t2 extends ma{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 p5(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=wce(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,i=Or(r,"beforeTitle",this,t),o=Or(r,"title",this,t),a=Or(r,"afterTitle",this,t);let s=[];return s=io(s,Ro(i)),s=io(s,Ro(o)),s=io(s,Ro(a)),s}getBeforeBody(t,n){return TM(Or(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,i=[];return wt(t,o=>{const a={before:[],lines:[],after:[]},s=OM(r,o);io(a.before,Ro(Or(s,"beforeLabel",this,o))),io(a.lines,Or(s,"label",this,o)),io(a.after,Ro(Or(s,"afterLabel",this,o))),i.push(a)}),i}getAfterBody(t,n){return TM(Or(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,i=Or(r,"beforeFooter",this,t),o=Or(r,"footer",this,t),a=Or(r,"afterFooter",this,t);let s=[];return s=io(s,Ro(i)),s=io(s,Ro(o)),s=io(s,Ro(a)),s}_createItems(t){const n=this._active,r=this.chart.data,i=[],o=[],a=[];let s=[],l,c;for(l=0,c=n.length;lt.filter(d,f,p,r))),t.itemSort&&(s=s.sort((d,f)=>t.itemSort(d,f,r))),wt(s,d=>{const f=OM(t.callbacks,d);i.push(Or(f,"labelColor",this,d)),o.push(Or(f,"labelPointStyle",this,d)),a.push(Or(f,"labelTextColor",this,d))}),this.labelColors=i,this.labelPointStyles=o,this.labelTextColors=a,this.dataPoints=s,s}update(t,n){const r=this.options.setContext(this.getContext()),i=this._active;let o,a=[];if(!i.length)this.opacity!==0&&(o={opacity:0});else{const s=xf[r.position].call(this,i,this._eventPosition);a=this._createItems(r),this.title=this.getTitle(a,r),this.beforeBody=this.getBeforeBody(a,r),this.body=this.getBody(a,r),this.afterBody=this.getAfterBody(a,r),this.footer=this.getFooter(a,r);const l=this._size=xM(this,r),c=Object.assign({},s,l),d=SM(this.chart,r,c),f=EM(r,c,d,this.chart);this.xAlign=d.xAlign,this.yAlign=d.yAlign,o={opacity:1,x:f.x,y:f.y,width:l.width,height:l.height,caretX:s.x,caretY:s.y}}this._tooltipItems=a,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:a,cornerRadius:s}=r,{topLeft:l,topRight:c,bottomLeft:d,bottomRight:f}=dl(s),{x:p,y:m}=t,{width:v,height:y}=n;let x,_,w,S,E,C;return o==="center"?(E=m+y/2,i==="left"?(x=p,_=x-a,S=E+a,C=E-a):(x=p+v,_=x+a,S=E-a,C=E+a),w=x):(i==="left"?_=p+Math.max(l,d)+a:i==="right"?_=p+v-Math.max(c,f)-a:_=this.caretX,o==="top"?(S=m,E=S-a,x=_-a,w=_+a):(S=m+y,E=S+a,x=_+a,w=_-a),C=S),{x1:x,x2:_,x3:w,y1:S,y2:E,y3:C}}drawTitle(t,n,r){const i=this.title,o=i.length;let a,s,l;if(o){const c=Xc(r.rtl,this.x,this.width);for(t.x=Mm(this,r.titleAlign,r),n.textAlign=c.textAlign(r.titleAlign),n.textBaseline="middle",a=En(r.titleFont),s=r.titleSpacing,n.fillStyle=r.titleColor,n.font=a.string,l=0;lw!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,gh(t,{x:y,y:v,w:c,h:l,radius:_}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),gh(t,{x,y:v+1,w:c-2,h:l-2,radius:_}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(y,v,c,l),t.strokeRect(y,v,c,l),t.fillStyle=a.backgroundColor,t.fillRect(x,v+1,c-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:i}=this,{bodySpacing:o,bodyAlign:a,displayColors:s,boxHeight:l,boxWidth:c,boxPadding:d}=r,f=En(r.bodyFont);let p=f.lineHeight,m=0;const v=Xc(r.rtl,this.x,this.width),y=function(N){n.fillText(N,v.x(t.x+m),t.y+p/2),t.y+=p+o},x=v.textAlign(a);let _,w,S,E,C,k,j;for(n.textAlign=a,n.textBaseline="middle",n.font=f.string,t.x=Mm(this,x,r),n.fillStyle=r.bodyColor,wt(this.beforeBody,y),m=s&&x!=="right"?a==="center"?c/2+d:c+2+d:0,E=0,k=i.length;E0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,i=r&&r.x,o=r&&r.y;if(i||o){const a=xf[t.position].call(this,this._active,this._eventPosition);if(!a)return;const s=this._size=xM(this,t),l=Object.assign({},a,this._size),c=SM(n,t,l),d=EM(t,l,c,n);(i._to!==d.x||o._to!==d.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=s.width,this.height=s.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,d))}}_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 a=dr(n.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&s&&(t.save(),t.globalAlpha=r,this.drawBackground(o,t,i,n),c5(t,n.textDirection),o.y+=a.top,this.drawTitle(o,t,n),this.drawBody(o,t,n),this.drawFooter(o,t,n),u5(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,i=t.map(({datasetIndex:s,index:l})=>{const c=this.chart.getDatasetMeta(s);if(!c)throw new Error("Cannot find a dataset at index "+s);return{datasetIndex:s,element:c.data[l],index:l}}),o=!Yv(r,i),a=this._positionChanged(i,n);(o||a)&&(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||[],a=this._getActiveElements(t,o,n,r),s=this._positionChanged(a,t),l=n||!Yv(a,o)||s;return l&&(this._active=a,(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 a=this.chart.getElementsAtEventForMode(t,o.mode,o,r);return o.reverse&&a.reverse(),a}_positionChanged(t,n){const{caretX:r,caretY:i,options:o}=this,a=xf[o.position].call(this,t,n);return a!==!1&&(r!==a.x||i!==a.y)}}Te(t2,"positioners",xf);var xce={id:"tooltip",_element:t2,positioners:xf,afterInit(e,t,n){n&&(e.tooltip=new t2({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:R5},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"]},Sce=Object.freeze({__proto__:null,Colors:Rle,Decimation:$le,Filler:oce,Legend:dce,SubTitle:pce,Title:hce,Tooltip:xce});const Ece=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function Tce(e,t,n,r){const i=e.indexOf(t);if(i===-1)return Ece(e,t,n,r);const o=e.lastIndexOf(t);return i!==o?n:i}const Oce=(e,t)=>e===null?null:Nn(Math.round(e),0,t);function D5(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}}Te(n2,"id","category"),Te(n2,"defaults",{ticks:{callback:D5}});function Cce(e,t){const n=[],{bounds:r,step:i,min:o,max:a,precision:s,count:l,maxTicks:c,maxDigits:d,includeBounds:f}=e,p=i||1,m=c-1,{min:v,max:y}=t,x=!dt(o),_=!dt(a),w=!dt(l),S=(y-v)/(d+1);let E=wj((y-v)/m/p)*p,C,k,j,N;if(E<1e-14&&!x&&!_)return[{value:v},{value:y}];N=Math.ceil(y/E)-Math.floor(v/E),N>m&&(E=wj(N*E/m/p)*p),dt(s)||(C=Math.pow(10,s),E=Math.ceil(E*C)/C),r==="ticks"?(k=Math.floor(v/E)*E,j=Math.ceil(y/E)*E):(k=v,j=y),x&&_&&i&&woe((a-o)/i,E/1e3)?(N=Math.round(Math.min((a-o)/E,c)),E=(a-o)/N,k=o,j=a):w?(k=x?o:k,j=_?a:j,N=l-1,E=(j-k)/N):(N=(j-k)/E,gf(N,Math.round(N),E/1e3)?N=Math.round(N):N=Math.ceil(N));const U=Math.max(xj(E),xj(k));C=Math.pow(10,dt(s)?U:s),k=Math.round(k*C)/C,j=Math.round(j*C)/C;let R=0;for(x&&(f&&k!==o?(n.push({value:o}),ka)break;n.push({value:V})}return _&&f&&j!==a?n.length&&gf(n[n.length-1].value,a,CM(a,S,e))?n[n.length-1].value=a:n.push({value:a}):(!_||j===a)&&n.push({value:j}),n}function CM(e,t,{horizontal:n,minRotation:r}){const i=zi(r),o=(n?Math.sin(i):Math.cos(i))||.001,a=.75*t*(""+e).length;return Math.min(t/o,a)}class Jv extends $l{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return dt(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:i,max:o}=this;const a=l=>i=n?i:l,s=l=>o=r?o:l;if(t){const l=_o(i),c=_o(o);l<0&&c<0?s(0):l>0&&c>0&&a(0)}if(i===o){let l=o===0?1:Math.abs(o*.05);s(o+l),t||a(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,a=Cce(i,o);return t.bounds==="ticks"&&W6(a,this,"value"),t.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}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 np(t,this.chart.options.locale,this.options.ticks.format)}}class r2 extends Jv{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=tn(t)?t:0,this.max=tn(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=zi(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}}Te(r2,"id","linear"),Te(r2,"defaults",{ticks:{callback:_0.formatters.numeric}});const yh=e=>Math.floor(Ua(e)),Rs=(e,t)=>Math.pow(10,yh(e)+t);function kM(e){return e/Math.pow(10,yh(e))===1}function PM(e,t,n){const r=Math.pow(10,n),i=Math.floor(e/r);return Math.ceil(t/r)-i}function kce(e,t){const n=t-e;let r=yh(n);for(;PM(e,t,r)>10;)r++;for(;PM(e,t,r)<10;)r--;return Math.min(r,yh(e))}function Pce(e,{min:t,max:n}){t=Ur(e.min,t);const r=[],i=yh(t);let o=kce(t,n),a=o<0?Math.pow(10,Math.abs(o)):1;const s=Math.pow(10,o),l=i>o?Math.pow(10,i):0,c=Math.round((t-l)*a)/a,d=Math.floor((t-l)/s/10)*s*10;let f=Math.floor((c-d)/Math.pow(10,o)),p=Ur(e.min,Math.round((l+d+f*Math.pow(10,o))*a)/a);for(;p=10?f=f<15?15:20:f++,f>=20&&(o++,f=2,a=o>=0?1:a),p=Math.round((l+d+f*Math.pow(10,o))*a)/a;const m=Ur(e.max,p);return r.push({value:m,major:kM(m),significand:f}),r}class i2 extends $l{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){const r=Jv.prototype.parse.apply(this,[t,n]);if(r===0){this._zero=!0;return}return tn(r)&&r>0?r:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=tn(t)?Math.max(0,t):null,this.max=tn(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!tn(this._userMin)&&(this.min=t===Rs(this.min,0)?Rs(this.min,-1):Rs(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let r=this.min,i=this.max;const o=s=>r=t?r:s,a=s=>i=n?i:s;r===i&&(r<=0?(o(1),a(10)):(o(Rs(r,-1)),a(Rs(i,1)))),r<=0&&o(Rs(i,-1)),i<=0&&a(Rs(r,1)),this.min=r,this.max=i}buildTicks(){const t=this.options,n={min:this._userMin,max:this._userMax},r=Pce(n,this);return t.bounds==="ticks"&&W6(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":np(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=Ua(t),this._valueRange=Ua(this.max)-Ua(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Ua(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}Te(i2,"id","logarithmic"),Te(i2,"defaults",{ticks:{callback:_0.formatters.logarithmic,major:{enabled:!0}}});function o2(e){const t=e.ticks;if(t.display&&e.display){const n=dr(t.backdropPadding);return Ke(t.font&&t.font.size,rn.font.size)+n.height}return 0}function Lce(e,t,n){return n=Dt(n)?n:[n],{w:Foe(e,t.string,n),h:n.length*t.lineHeight}}function LM(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 jce(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,a=e.options.pointLabels,s=a.centerPointLabels?Ht/o:0;for(let l=0;lt.r&&(s=(r.end-t.r)/o,e.r=Math.max(e.r,t.r+s)),i.startt.b&&(l=(i.end-t.b)/a,e.b=Math.max(e.b,t.b+l))}function Ace(e,t,n){const r=e.drawingArea,{extra:i,additionalAngle:o,padding:a,size:s}=n,l=e.getPointPosition(t,r+i+a,o),c=Math.round(lT(zr(l.angle+nn))),d=Fce(l.y,s.h,c),f=Dce(c),p=Ice(l.x,s.w,f);return{visible:!0,x:l.x,y:d,textAlign:f,left:p,top:d,right:p+s.w,bottom:d+s.h}}function Nce(e,t){if(!t)return!0;const{left:n,top:r,right:i,bottom:o}=e;return!(Wo({x:n,y:r},t)||Wo({x:n,y:o},t)||Wo({x:i,y:r},t)||Wo({x:i,y:o},t))}function Rce(e,t,n){const r=[],i=e._pointLabels.length,o=e.options,{centerPointLabels:a,display:s}=o.pointLabels,l={extra:o2(o)/2,additionalAngle:a?Ht/i:0};let c;for(let d=0;d270||n<90)&&(e-=t),e}function $ce(e,t,n){const{left:r,top:i,right:o,bottom:a}=n,{backdropColor:s}=t;if(!dt(s)){const l=dl(t.borderRadius),c=dr(t.backdropPadding);e.fillStyle=s;const d=r-c.left,f=i-c.top,p=o-r+c.width,m=a-i+c.height;Object.values(l).some(v=>v!==0)?(e.beginPath(),gh(e,{x:d,y:f,w:p,h:m,radius:l}),e.fill()):e.fillRect(d,f,p,m)}}function Uce(e,t){const{ctx:n,options:{pointLabels:r}}=e;for(let i=t-1;i>=0;i--){const o=e._pointLabelItems[i];if(!o.visible)continue;const a=r.setContext(e.getPointLabelContext(i));$ce(n,a,o);const s=En(a.font),{x:l,y:c,textAlign:d}=o;Tl(n,e._pointLabels[i],l,c+s.lineHeight/2,s,{color:a.color,textAlign:d,textBaseline:"middle"})}}function I5(e,t,n,r){const{ctx:i}=e;if(n)i.arc(e.xCenter,e.yCenter,t,0,$t);else{let o=e.getPointPosition(0,t);i.moveTo(o.x,o.y);for(let a=1;a{const i=Pt(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?jce(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=$t/(this._pointLabels.length||1),r=this.options.startAngle||0;return zr(t*n+zi(r))}getDistanceFromCenterForValue(t){if(dt(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(dt(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(f!==0){l=this.getDistanceFromCenterForValue(d.value);const p=this.getContext(f),m=i.setContext(p),v=o.setContext(p);Bce(this,m,l,a,v)}}),r.display){for(t.save(),s=a-1;s>=0;s--){const d=r.setContext(this.getPointLabelContext(s)),{color:f,lineWidth:p}=d;!p||!f||(t.lineWidth=p,t.strokeStyle=f,t.setLineDash(d.borderDash),t.lineDashOffset=d.borderDashOffset,l=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),c=this.getPointPosition(s,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,a;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(i),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((s,l)=>{if(l===0&&!n.reverse)return;const c=r.setContext(this.getContext(l)),d=En(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=d.string,a=t.measureText(s.label).width,t.fillStyle=c.backdropColor;const f=dr(c.backdropPadding);t.fillRect(-a/2-f.left,-o-d.size/2-f.top,a+f.width,d.size+f.height)}Tl(t,s.label,0,-o,d,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),t.restore()}drawTitle(){}}Te(Yd,"id","radialLinear"),Te(Yd,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:_0.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}}),Te(Yd,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),Te(Yd,"descriptors",{angleLines:{_fallback:"grid"}});const E0={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}},kr=Object.keys(E0);function jM(e,t){return e-t}function MM(e,t){if(dt(t))return null;const n=e._adapter,{parser:r,round:i,isoWeekday:o}=e._parseOpts;let a=t;return typeof r=="function"&&(a=r(a)),tn(a)||(a=typeof r=="string"?n.parse(a,r):n.parse(a)),a===null?null:(i&&(a=i==="week"&&(Eu(o)||o===!0)?n.startOf(a,"isoWeek",o):n.startOf(a,i)),+a)}function AM(e,t,n,r){const i=kr.length;for(let o=kr.indexOf(e);o=kr.indexOf(n);o--){const a=kr[o];if(E0[a].common&&e._adapter.diff(i,r,a)>=t-1)return a}return kr[n?kr.indexOf(n):0]}function Hce(e){for(let t=kr.indexOf(e)+1,n=kr.length;t=t?n[r]:n[i];e[o]=!0}}function Wce(e,t,n,r){const i=e._adapter,o=+i.startOf(t[0].value,r),a=t[t.length-1].value;let s,l;for(s=o;s<=a;s=+i.add(s,1,r))l=n[s],l>=0&&(t[l].major=!0);return t}function RM(e,t,n){const r=[],i={},o=t.length;let a,s;for(a=0;a+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 a=t.length<3?.5:.25;n=Nn(n,0,a),r=Nn(r,0,a),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,a=o.unit||AM(o.minUnit,n,r,this._getLabelCapacity(n)),s=Ke(i.ticks.stepSize,1),l=a==="week"?o.isoWeekday:!1,c=Eu(l)||l===!0,d={};let f=n,p,m;if(c&&(f=+t.startOf(f,"isoWeek",l)),f=+t.startOf(f,c?"day":a),t.diff(r,n,a)>1e5*s)throw new Error(n+" and "+r+" are too far apart with stepSize of "+s+" "+a);const v=i.ticks.source==="data"&&this.getDataTimestamps();for(p=f,m=0;p+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)}format(t,n){const r=this.options.time.displayFormats,i=this._unit,o=n||r[i];return this._adapter.format(t,o)}_tickFormatFunction(t,n,r,i){const o=this.options,a=o.ticks.callback;if(a)return Pt(a,[t,n,r],this);const s=o.time.displayFormats,l=this._unit,c=this._majorUnit,d=l&&s[l],f=c&&s[c],p=r[n],m=c&&f&&p&&p.major;return this._adapter.format(t,i||(m?f:d))}generateTickLabels(t){let n,r,i;for(n=0,r=t.length;n0?s: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}=Ho(e,"pos",t)),{pos:o,time:s}=e[r],{pos:a,time:l}=e[i]):(t>=e[r].time&&t<=e[i].time&&({lo:r,hi:i}=Ho(e,"time",t)),{time:o,pos:s}=e[r],{time:a,pos:l}=e[i]);const c=a-o;return c?s+(l-s)*(t-o)/c:s}class a2 extends _h{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=Am(n,this.min),this._tableRange=Am(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,i=[],o=[];let a,s,l,c,d;for(a=0,s=t.length;a=n&&c<=r&&i.push(c);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(a=0,s=i.length;ai-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?t=this.normalize(n.concat(r)):t=n.length?n:r,t=this._cache.all=t,t}getDecimalForValue(t){return(Am(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return Am(this._table,r*this._tableRange+this._minPos,!0)}}Te(a2,"id","timeseries"),Te(a2,"defaults",_h.defaults);var Yce=Object.freeze({__proto__:null,CategoryScale:n2,LinearScale:r2,LogarithmicScale:i2,RadialLinearScale:Yd,TimeScale:_h,TimeSeriesScale:a2});const Gce=[Jae,Ple,Sce,Yce];S0.register(...Gce);var Ki,So=".",F5="function",$5="string",U5="__global__",bT="Provider",qce=0,wT=Array.prototype.slice,Kce=function(e,t){var n=e[t];if(n===void 0&&Ki.config.strict)throw new Error("Bottle was unable to resolve a service. `"+t+"` is undefined.");return n},T0=function(e){var t;return this.nested[e]||(t=Ki.pop(),this.nested[e]=t,this.factory(e,function(){return t.container})),this.nested[e]},B5=function(e){return e.split(So).reduce(Kce,this)},Zce=function(e,t,n,r){var i={configurable:!0,enumerable:!0};return e.length?i.get=function(){var o=0,a=function(s){if(s)throw s;e[o]&&e[o++](n,a)};return a(),n}:(i.value=n,i.writable=!0),Object.defineProperty(r,t,i),r[t]},Qce=function(e,t){var n,r;return typeof e===F5&&(t=e,e=U5),n=e.split(So),r=n.shift(),n.length?T0.call(this,r).middleware(n.join(So),t):(this.middlewares[r]||(this.middlewares[r]=[]),this.middlewares[r].push(t)),this},Xce=function(e,t){return t(e)},DM=function(e,t){return(e[t]||[]).concat(e.__global__||[])},Jce=function(e,t){var n,r,i,o,a;return this.id,i=this.container,o=this.decorators,a=this.middlewares,n=e+bT,r=Object.create(null),r[n]={configurable:!0,enumerable:!0,get:function(){var s=new t;return delete i[n],i[n]=s,s}},r[e]={configurable:!0,enumerable:!0,get:function(){var s=i[n],l;return s&&(l=DM(o,e).reduce(Xce,s.$get(i)),delete i[n],delete i[e]),l===void 0?l:Zce(DM(a,e),e,l,i)}},Object.defineProperties(i,r),this},z5=function(e,t){var n,r;return n=e.split(So),this.providerMap[e]&&n.length===1&&!this.container[e+bT]?console.error(e+" provider already instantiated."):(this.originalProviders[e]=t,this.providerMap[e]=!0,r=n.shift(),n.length?(T0.call(this,r).provider(n.join(So),t),this):Jce.call(this,r,t))},xT=function(e,t){return z5.call(this,e,function(){this.$get=t})},V5=function(e,t,n){var r=arguments.length>3?wT.call(arguments,3):[],i=this;return xT.call(this,e,function(){var o=t,a=r.map(B5,i.container);return n?new(t.bind.apply(t,[null].concat(a))):o.apply(null,a)})},eue=function(e,t){return V5.apply(this,[e,t,!0].concat(wT.call(arguments,2)))},tue=function(e,t){return V5.apply(this,[e,t,!1].concat(wT.call(arguments,2)))},H5=function(e,t){Object.defineProperty(this,e,{configurable:!0,enumerable:!0,value:t,writable:!0})},W5=function(e,t){var n=e[t];return n||(n={},H5.call(e,t,n)),n},nue=function(e,t){var n;return n=e.split(So),e=n.pop(),H5.call(n.reduce(W5,this.container),e,t),this},rue=function(e,t){Object.defineProperty(this,e,{configurable:!1,enumerable:!0,value:t,writable:!1})},iue=function(e,t){var n=e.split(So);return e=n.pop(),rue.call(n.reduce(W5,this.container),e,t),this},Y5=function(e,t){var n,r;return typeof e===F5&&(t=e,e=U5),n=e.split(So),r=n.shift(),n.length?T0.call(this,r).decorator(n.join(So),t):(this.decorators[r]||(this.decorators[r]=[]),this.decorators[r].push(t)),this},oue=function(e){return this.deferred.push(e),this},aue=function(e){return(e||[]).map(B5,this.container)},sue=function(e,t){return xT.call(this,e,function(n){return{instance:t.bind(t,n)}})},lue=function(e){return!/^\$(?:decorator|register|list)$|Provider$/.test(e)},ST=function(e){return Object.keys(e||this.container||{}).filter(lue)},ey={},cue=function(e){var t;return typeof e===$5?(t=ey[e],t||(ey[e]=t=new Ki,t.constant("BOTTLE_NAME",e)),t):new Ki},uue=function(e){typeof e===$5?delete ey[e]:ey={}},G5=function(e){var t=e.$value===void 0?e:e.$value;return this[e.$type||"service"].apply(this,[e.$name,t].concat(e.$inject||[]))},IM=function(e){delete this.providerMap[e],delete this.container[e],delete this.container[e+bT]},due=function(e){var t=this.originalProviders,n=Array.isArray(e);Object.keys(this.originalProviders).forEach(function(r){if(!(n&&e.indexOf(r)===-1)){var i=r.split(So);i.length>1&&i.forEach(IM,T0.call(this,i[0])),IM.call(this,r),this.provider(r,t[r])}},this)},fue=function(e){return this.deferred.forEach(function(t){t(e)}),this};Ki=function e(t){if(!(this instanceof e))return e.pop(t);this.id=qce++,this.decorators={},this.middlewares={},this.nested={},this.providerMap={},this.originalProviders={},this.deferred=[],this.container={$decorator:Y5.bind(this),$register:G5.bind(this),$list:ST.bind(this)}};Ki.prototype={constant:iue,decorator:Y5,defer:oue,digest:aue,factory:xT,instanceFactory:sue,list:ST,middleware:Qce,provider:z5,resetProviders:due,register:G5,resolve:fue,service:eue,serviceFactory:tue,value:nue};Ki.pop=cue;Ki.clear=uue;Ki.list=ST;Ki.config={strict:!1};const hue=Ki;var pue=function(){return!0};const q5=pue;function At(e){return e!=null&&typeof e=="object"&&e["@@functional/placeholder"]===!0}function Vt(e){return function t(n){return arguments.length===0||At(n)?t:e.apply(this,arguments)}}function Tt(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return At(n)?t:Vt(function(i){return e(n,i)});default:return At(n)&&At(r)?t:At(n)?Vt(function(i){return e(i,r)}):At(r)?Vt(function(i){return e(n,i)}):e(n,r)}}}function ip(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(n){return t.apply(this,arguments)};case 2:return function(n,r){return t.apply(this,arguments)};case 3:return function(n,r,i){return t.apply(this,arguments)};case 4:return function(n,r,i,o){return t.apply(this,arguments)};case 5:return function(n,r,i,o,a){return t.apply(this,arguments)};case 6:return function(n,r,i,o,a,s){return t.apply(this,arguments)};case 7:return function(n,r,i,o,a,s,l){return t.apply(this,arguments)};case 8:return function(n,r,i,o,a,s,l,c){return t.apply(this,arguments)};case 9:return function(n,r,i,o,a,s,l,c,d){return t.apply(this,arguments)};case 10:return function(n,r,i,o,a,s,l,c,d,f){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function O0(e,t,n){return function(){for(var r=[],i=0,o=e,a=0;a=arguments.length)?s=t[a]:(s=arguments[i],i+=1),r[a]=s,At(s)||(o-=1),a+=1}return o<=0?n.apply(this,r):ip(o,O0(e,r,n))}}var mue=Tt(function(e,t){return e===1?Vt(t):ip(e,O0(e,[],t))});const K5=mue;function Ul(e){return function t(n,r,i){switch(arguments.length){case 0:return t;case 1:return At(n)?t:Tt(function(o,a){return e(n,o,a)});case 2:return At(n)&&At(r)?t:At(n)?Tt(function(o,a){return e(o,r,a)}):At(r)?Tt(function(o,a){return e(n,o,a)}):Vt(function(o){return e(n,r,o)});default:return At(n)&&At(r)&&At(i)?t:At(n)&&At(r)?Tt(function(o,a){return e(o,a,i)}):At(n)&&At(i)?Tt(function(o,a){return e(o,r,a)}):At(r)&&At(i)?Tt(function(o,a){return e(n,o,a)}):At(n)?Vt(function(o){return e(o,r,i)}):At(r)?Vt(function(o){return e(n,o,i)}):At(i)?Vt(function(o){return e(n,r,o)}):e(n,r,i)}}}const op=Array.isArray||function(e){return e!=null&&e.length>=0&&Object.prototype.toString.call(e)==="[object Array]"};function gue(e){return e!=null&&typeof e["@@transducer/step"]=="function"}function ET(e,t,n){return function(){if(arguments.length===0)return n();var r=Array.prototype.slice.call(arguments,0),i=r.pop();if(!op(i)){for(var o=0;oe?t:e});const Z5=vue;function Sg(e,t){for(var n=0,r=t.length,i=Array(r);n0?e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1):!1});const Q5=yue;var _ue=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 bue(e){return new _ue(e)}var wue=Tt(function(e,t){return ip(e.length,function(){return e.apply(t,arguments)})});const xue=wue;function Sue(e,t,n){for(var r=0,i=n.length;r=0;)t=zM[n],gi(t,e)&&!Pue(r,t)&&(r[r.length]=t),n-=1;return r});const Eo=Lue;var jue=Tt(ET(["fantasy-land/map","map"],Oue,function(e,t){switch(Object.prototype.toString.call(t)){case"[object Function]":return K5(t.length,function(){return e.call(this,t.apply(this,arguments))});case"[object Object]":return k0(function(n,r){return n[r]=e(t[r]),n},{},Eo(t));default:return Sg(e,t)}}));const J5=jue,s2=Number.isInteger||function(e){return e<<0===e};var Mue=Tt(function(e,t){var n=e<0?t.length+e:e;return C0(t)?t.charAt(n):t[n]});const e8=Mue;var Aue=Tt(function(e,t){return e.map(function(n){for(var r=t,i=0,o;i1){var o=!Bl(r)&&gi(i,r)?r[i]:s2(t[1])?[]:{};n=e(Array.prototype.slice.call(t,1),n,o)}if(s2(i)&&op(r)){var a=[].concat(r);return a[i]=n,a}else return zue(i,n,r)});const dc=Hue;function Wue(e){var t=Object.prototype.toString.call(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object AsyncGeneratorFunction]"}function Yue(e){return function t(n){for(var r,i,o,a=[],s=0,l=n.length;s=0;){if(n[o]===e)return r[o]===t;o-=1}switch(i){case"Map":return e.size!==t.size?!1:YM(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size!==t.size?!1:YM(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 a=Eo(e);if(a.length!==Eo(t).length)return!1;var s=n.concat([e]),l=r.concat([t]);for(o=a.length-1;o>=0;){var c=a[o];if(!(gi(c,t)&&CT(t[c],e[c],s,l)))return!1;o-=1}return!0}var ode=Tt(function(e,t){return CT(e,t,[],[])});const kT=ode;function ade(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 j1(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 kd=function(e){return(e<10?"0":"")+e},lde=typeof Date.prototype.toISOString=="function"?function(e){return e.toISOString()}:function(e){return e.getUTCFullYear()+"-"+kd(e.getUTCMonth()+1)+"-"+kd(e.getUTCDate())+"T"+kd(e.getUTCHours())+":"+kd(e.getUTCMinutes())+":"+kd(e.getUTCSeconds())+"."+(e.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};const cde=lde;function ude(e){return function(){return!e.apply(this,arguments)}}function dde(e,t){for(var n=0,r=t.length,i=[];n":o8(o,a)},r=function(o,a){return Sg(function(s){return j1(s)+": "+n(o[s])},a.slice().sort())};switch(Object.prototype.toString.call(e)){case"[object Arguments]":return"(function() { return arguments; }("+Sg(n,e).join(", ")+"))";case"[object Array]":return"["+Sg(n,e).concat(r(e,PT(function(o){return/^\d+$/.test(o)},Eo(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):j1(cde(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())+")":j1(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,Eo(e)).join(", ")+"}"}}var vde=Vt(function(e){return o8(e,[])});const yde=vde;var _de=Vt(function(e){var t=t8(Z5,0,J5(function(n){return n[0].length},e));return ip(t,function(){for(var n=0;no?1:0})});const Kde=qde;var Zde=Tt(function(e,t){if(e<=0)throw new Error("First argument to splitEvery must be a positive integer");for(var n=[],r=0;r{const[i,,o,a]=_n(),{domains:s}=n,l=ai(t),c=()=>r("");return F.useEffect(()=>{e()},[]),i?g.jsxs(h0,{children:[g.jsx(yu,{value:t??"",placeholder:"Domain",onChange:d=>r(d.target.value)}),g.jsx(_t,{id:"backToDropdown",outline:!0,type:"button",className:"domains-dropdown__back-btn","aria-label":"Back to domains list",onClick:In(c,a),children:g.jsx(De,{icon:yY})}),g.jsx(Fr,{target:"backToDropdown",placement:"left",trigger:"hover",children:"Existing domains"})]}):g.jsxs(pa,{text:l?"Domain":`Domain: ${t}`,className:l?"domains-dropdown__toggle-btn":"domains-dropdown__toggle-btn--active",children:[s.map(({domain:d,isDefault:f})=>g.jsxs(Ue,{active:(t===d||f)&&l,onClick:()=>r(d),children:[d,f&&g.jsx("span",{className:"float-end text-muted",children:"default"})]},d)),g.jsx(Ue,{divider:!0}),g.jsx(Ue,{onClick:In(c,o),children:g.jsx("i",{children:"New domain"})})]})},nfe=e=>(e==null?void 0:e.type)===v0.INVALID_ARGUMENT||(e==null?void 0:e.type)===y0.INVALID_ARGUMENT,rfe=e=>(e==null?void 0:e.type)==="INVALID_SHORTCODE_DELETION"||(e==null?void 0:e.type)===v0.INVALID_SHORT_URL_DELETION||(e==null?void 0:e.type)===y0.INVALID_SHORT_URL_DELETION,ife=e=>!!e&&typeof e=="object"&&["type","detail","title","status"].every(t=>t in e),ga=e=>ife(e)?e:void 0,ia=({errorData:e,fallbackMessage:t})=>g.jsxs(g.Fragment,{children:[(e==null?void 0:e.detail)??t,nfe(e)&&g.jsxs("p",{className:"mb-0",children:["Invalid elements: [",e.invalidElements.join(", "),"]"]})]}),ofe=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,KM=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(ofe);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},ZM=e=>e==="*"||e==="x"||e==="X",QM=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},afe=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],sfe=(e,t)=>{if(ZM(e)||ZM(t))return 0;const[n,r]=afe(QM(e),QM(t));return n>r?1:n{for(let n=0;n{const n=KM(e),r=KM(t),i=n.pop(),o=r.pop(),a=XM(n,r);return a!==0?a:i&&o?XM(i.split("."),o.split(".")):i||o?i?-1:1:0},JM=(e,t,n)=>{cfe(n);const r=lfe(e,t);return d8[n].includes(r)},d8={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},e3=Object.keys(d8),cfe=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(e3.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${e3.join("|")}`)},ufe=(e,{maxVersion:t,minVersion:n})=>{const r=!n||JM(e,n,">=");return(!t||JM(e,t,"<="))&&r},f8={domainVisits:"3.1.0",excludeBotsOnShortUrls:"3.4.0",filterDisabledUrls:"3.4.0",deviceLongUrls:"3.5.0"};Object.freeze(f8);const Rm=(e,t)=>ufe(t,{minVersion:f8[e]}),h8=e=>({domainVisits:Rm("domainVisits",e),excludeBotsOnShortUrls:Rm("excludeBotsOnShortUrls",e),filterDisabledUrls:Rm("filterDisabledUrls",e),deviceLongUrls:Rm("deviceLongUrls",e)}),dfe=e=>F.useMemo(()=>h8(e),[e]),p8=F.createContext(h8("0.0.0")),ffe=p8.Provider,ap=e=>F.useContext(p8)[e],m8=F.createContext(""),hfe=m8.Provider,zl=()=>F.useContext(m8),Sf=(e,t,n)=>Bl(n)?e.shortCode===t&&!e.domain:e.shortCode===t&&e.domain===n,pfe=(e,t)=>!e.domain&&t===Y8?!0:e.domain===t,mfe=(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&&{android:e.deviceLongUrls.android??void 0,ios:e.deviceLongUrls.ios??void 0,desktop:e.deviceLongUrls.desktop??void 0},validateUrl:n}:{longUrl:"",validateUrl:n}},g8="__",gfe=e=>e.replaceAll("/",g8),Eg=e=>e.replaceAll(g8,"/");function ei(e){"@babel/helpers - typeof";return ei=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},ei(e)}function Ye(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 Le(e){Oe(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||ei(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 Vl(e,t){Oe(2,arguments);var n=Le(e),r=Ye(t);return isNaN(r)?new Date(NaN):(r&&n.setDate(n.getDate()+r),n)}function Ci(e,t){Oe(2,arguments);var n=Le(e),r=Ye(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 a=o.getDate();return i>=a?o:(n.setFullYear(o.getFullYear(),o.getMonth(),i),n)}function vfe(e,t){if(Oe(2,arguments),!t||ei(t)!=="object")return new Date(NaN);var n=t.years?Ye(t.years):0,r=t.months?Ye(t.months):0,i=t.weeks?Ye(t.weeks):0,o=t.days?Ye(t.days):0,a=t.hours?Ye(t.hours):0,s=t.minutes?Ye(t.minutes):0,l=t.seconds?Ye(t.seconds):0,c=Le(e),d=r||n?Ci(c,r+n*12):c,f=o||i?Vl(d,o+i*7):d,p=s+a*60,m=l+p*60,v=m*1e3,y=new Date(f.getTime()+v);return y}function MT(e,t){Oe(2,arguments);var n=Le(e).getTime(),r=Ye(t);return new Date(n+r)}var yfe=36e5;function _fe(e,t){Oe(2,arguments);var n=Ye(t);return MT(e,n*yfe)}var bfe={};function va(){return bfe}function v8(e,t){var n,r,i,o,a,s,l,c;Oe(1,arguments);var d=va(),f=Ye((n=(r=(i=(o=t==null?void 0:t.weekStartsOn)!==null&&o!==void 0?o:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:d.weekStartsOn)!==null&&r!==void 0?r:(l=d.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Le(e),m=p.getDay(),v=(m=i.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function xfe(e){Oe(1,arguments);var t=wfe(e),n=new Date(0);n.setFullYear(t,0,4),n.setHours(0,0,0,0);var r=xh(n);return r}function Cu(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 Kr(e){Oe(1,arguments);var t=Le(e);return t.setHours(0,0,0,0),t}var Sfe=864e5;function Sh(e,t){Oe(2,arguments);var n=Kr(e),r=Kr(t),i=n.getTime()-Cu(n),o=r.getTime()-Cu(r);return Math.round((i-o)/Sfe)}var Efe=6e4;function c2(e,t){Oe(2,arguments);var n=Ye(t);return MT(e,n*Efe)}function y8(e,t){Oe(2,arguments);var n=Ye(t),r=n*3;return Ci(e,r)}function AT(e,t){Oe(2,arguments);var n=Ye(t),r=n*7;return Vl(e,r)}function ku(e,t){Oe(2,arguments);var n=Ye(t);return Ci(e,n*12)}function t3(e){Oe(1,arguments);var t;if(e&&typeof e.forEach=="function")t=e;else if(ei(e)==="object"&&e!==null)t=Array.prototype.slice.call(e);else return new Date(NaN);var n;return t.forEach(function(r){var i=Le(r);(n===void 0||ni||isNaN(i.getDate()))&&(n=i)}),n||new Date(NaN)}function Tg(e,t){Oe(2,arguments);var n=Le(e),r=Le(t),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}var NT=6e4,P0=36e5,Tfe=1e3;function Ofe(e,t){Oe(2,arguments);var n=Kr(e),r=Kr(t);return n.getTime()===r.getTime()}function RT(e){return Oe(1,arguments),e instanceof Date||ei(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function ry(e){if(Oe(1,arguments),!RT(e)&&typeof e!="number")return!1;var t=Le(e);return!isNaN(Number(t))}function Eh(e,t){Oe(2,arguments);var n=Le(e),r=Le(t),i=n.getFullYear()-r.getFullYear(),o=n.getMonth()-r.getMonth();return i*12+o}function Ic(e){Oe(1,arguments);var t=Le(e),n=Math.floor(t.getMonth()/3)+1;return n}function iy(e,t){Oe(2,arguments);var n=Le(e),r=Le(t);return n.getFullYear()-r.getFullYear()}function r3(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 DT(e,t){Oe(2,arguments);var n=Le(e),r=Le(t),i=r3(n,r),o=Math.abs(Sh(n,r));n.setDate(n.getDate()-i*o);var a=+(r3(n,r)===-i),s=i*(o-a);return s===0?0:s}function _8(e,t){return Oe(2,arguments),Le(e).getTime()-Le(t).getTime()}var i3={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}},Cfe="trunc";function IT(e){return e?i3[e]:i3[Cfe]}function kfe(e,t,n){Oe(2,arguments);var r=_8(e,t)/P0;return IT(n==null?void 0:n.roundingMethod)(r)}function Ol(e){Oe(1,arguments);var t=Le(e);return t.setHours(23,59,59,999),t}function b8(e){Oe(1,arguments);var t=Le(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function Pfe(e){Oe(1,arguments);var t=Le(e);return Ol(t).getTime()===b8(t).getTime()}function oy(e,t){Oe(2,arguments);var n=Le(e),r=Le(t),i=Tg(n,r),o=Math.abs(Eh(n,r)),a;if(o<1)a=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-i*o);var s=Tg(n,r)===-i;Pfe(Le(e))&&o===1&&Tg(e,r)===1&&(s=!1),a=i*(o-Number(s))}return a===0?0:a}function Lfe(e,t,n){Oe(2,arguments);var r=_8(e,t)/1e3;return IT(n==null?void 0:n.roundingMethod)(r)}function jfe(e,t,n){Oe(2,arguments);var r=DT(e,t)/7;return IT(n==null?void 0:n.roundingMethod)(r)}function u2(e){Oe(1,arguments);var t=Le(e),n=t.getMonth(),r=n-n%3;return t.setMonth(r,1),t.setHours(0,0,0,0),t}function w8(e){Oe(1,arguments);var t=Le(e);return t.setDate(1),t.setHours(0,0,0,0),t}function Mfe(e){Oe(1,arguments);var t=Le(e),n=t.getFullYear();return t.setFullYear(n+1,0,0),t.setHours(23,59,59,999),t}function x8(e){Oe(1,arguments);var t=Le(e),n=new Date(0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Afe(e,t){var n,r,i,o,a,s,l,c;Oe(1,arguments);var d=va(),f=Ye((n=(r=(i=(o=t==null?void 0:t.weekStartsOn)!==null&&o!==void 0?o:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:d.weekStartsOn)!==null&&r!==void 0?r:(l=d.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Le(e),m=p.getDay(),v=(m=i.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function Ife(e){Oe(1,arguments);var t=E8(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var r=Pu(n);return r}var Ffe=6048e5;function T8(e){Oe(1,arguments);var t=Le(e),n=Pu(t).getTime()-Ife(t).getTime();return Math.round(n/Ffe)+1}function Cl(e,t){var n,r,i,o,a,s,l,c;Oe(1,arguments);var d=va(),f=Ye((n=(r=(i=(o=t==null?void 0:t.weekStartsOn)!==null&&o!==void 0?o:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:d.weekStartsOn)!==null&&r!==void 0?r:(l=d.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Le(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(f+1,0,m),v.setUTCHours(0,0,0,0);var y=Cl(v,t),x=new Date(0);x.setUTCFullYear(f,0,m),x.setUTCHours(0,0,0,0);var _=Cl(x,t);return d.getTime()>=y.getTime()?f+1:d.getTime()>=_.getTime()?f:f-1}function $fe(e,t){var n,r,i,o,a,s,l,c;Oe(1,arguments);var d=va(),f=Ye((n=(r=(i=(o=t==null?void 0:t.firstWeekContainsDate)!==null&&o!==void 0?o:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&i!==void 0?i:d.firstWeekContainsDate)!==null&&r!==void 0?r:(l=d.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&n!==void 0?n:1),p=FT(e,t),m=new Date(0);m.setUTCFullYear(p,0,f),m.setUTCHours(0,0,0,0);var v=Cl(m,t);return v}var Ufe=6048e5;function O8(e,t){Oe(1,arguments);var n=Le(e),r=Cl(n,t).getTime()-$fe(n,t).getTime();return Math.round(r/Ufe)+1}function tt(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length0?n:1-n;return tt(t==="yy"?r%100:r,t.length)},M:function(e,t){var n=e.getUTCMonth();return t==="M"?String(n+1):tt(n+1,2)},d:function(e,t){return tt(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(e,t){return tt(e.getUTCHours()%12||12,t.length)},H:function(e,t){return tt(e.getUTCHours(),t.length)},m:function(e,t){return tt(e.getUTCMinutes(),t.length)},s:function(e,t){return tt(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,r=e.getUTCMilliseconds(),i=Math.floor(r*Math.pow(10,n-3));return tt(i,t.length)}};const Ea=Bfe;var fc={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},zfe={G:function(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){var r=e.getUTCFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return Ea.y(e,t)},Y:function(e,t,n,r){var i=FT(e,r),o=i>0?i:1-i;if(t==="YY"){var a=o%100;return tt(a,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):tt(o,t.length)},R:function(e,t){var n=E8(e);return tt(n,t.length)},u:function(e,t){var n=e.getUTCFullYear();return tt(n,t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return tt(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return tt(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return Ea.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return tt(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){var i=O8(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):tt(i,t.length)},I:function(e,t,n){var r=T8(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):tt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):Ea.d(e,t)},D:function(e,t,n){var r=Dfe(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):tt(r,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var i=e.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return tt(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var i=e.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return tt(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return tt(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=e.getUTCHours(),i=r/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){var r=e.getUTCHours(),i;switch(r===12?i=fc.noon:r===0?i=fc.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r=e.getUTCHours(),i;switch(r>=17?i=fc.evening:r>=12?i=fc.afternoon:r>=4?i=fc.morning:i=fc.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){var r=e.getUTCHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Ea.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):Ea.H(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):tt(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):tt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):Ea.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):Ea.s(e,t)},S:function(e,t){return Ea.S(e,t)},X:function(e,t,n,r){var i=r._originalDate||e,o=i.getTimezoneOffset();if(o===0)return"Z";switch(t){case"X":return a3(o);case"XXXX":case"XX":return Gs(o);case"XXXXX":case"XXX":default:return Gs(o,":")}},x:function(e,t,n,r){var i=r._originalDate||e,o=i.getTimezoneOffset();switch(t){case"x":return a3(o);case"xxxx":case"xx":return Gs(o);case"xxxxx":case"xxx":default:return Gs(o,":")}},O:function(e,t,n,r){var i=r._originalDate||e,o=i.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+o3(o,":");case"OOOO":default:return"GMT"+Gs(o,":")}},z:function(e,t,n,r){var i=r._originalDate||e,o=i.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+o3(o,":");case"zzzz":default:return"GMT"+Gs(o,":")}},t:function(e,t,n,r){var i=r._originalDate||e,o=Math.floor(i.getTime()/1e3);return tt(o,t.length)},T:function(e,t,n,r){var i=r._originalDate||e,o=i.getTime();return tt(o,t.length)}};function o3(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 a=t||"";return n+String(i)+a+tt(o,2)}function a3(e,t){if(e%60===0){var n=e>0?"-":"+";return n+tt(Math.abs(e)/60,2)}return Gs(e,t)}function Gs(e,t){var n=t||"",r=e>0?"-":"+",i=Math.abs(e),o=tt(Math.floor(i/60),2),a=tt(i%60,2);return r+o+n+a}const Vfe=zfe;var s3=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},C8=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Hfe=function(e,t){var n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return s3(e,t);var o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",s3(r,t)).replace("{{time}}",C8(i,t))},Wfe={p:C8,P:Hfe};const d2=Wfe;var Yfe=["D","DD"],Gfe=["YY","YYYY"];function k8(e){return Yfe.indexOf(e)!==-1}function P8(e){return Gfe.indexOf(e)!==-1}function ay(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 qfe={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"}},Kfe=function(e,t,n){var r,i=qfe[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};const Zfe=Kfe;function M1(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 Qfe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Xfe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Jfe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},ehe={date:M1({formats:Qfe,defaultWidth:"full"}),time:M1({formats:Xfe,defaultWidth:"full"}),dateTime:M1({formats:Jfe,defaultWidth:"full"})};const the=ehe;var nhe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},rhe=function(e,t,n,r){return nhe[e]};const ihe=rhe;function Pd(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,a=n!=null&&n.width?String(n.width):o;i=e.formattingValues[a]||e.formattingValues[o]}else{var s=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[l]||e.values[s]}var c=e.argumentCallback?e.argumentCallback(t):t;return i[c]}}var ohe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},ahe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},she={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"]},lhe={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"]},che={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"}},uhe={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"}},dhe=function(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},fhe={ordinalNumber:dhe,era:Pd({values:ohe,defaultWidth:"wide"}),quarter:Pd({values:ahe,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Pd({values:she,defaultWidth:"wide"}),day:Pd({values:lhe,defaultWidth:"wide"}),dayPeriod:Pd({values:che,defaultWidth:"wide",formattingValues:uhe,defaultFormattingWidth:"wide"})};const hhe=fhe;function Ld(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 a=o[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?mhe(s,function(f){return f.test(a)}):phe(s,function(f){return f.test(a)}),c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;var d=t.slice(a.length);return{value:c,rest:d}}}function phe(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function mhe(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 a=e.valueCallback?e.valueCallback(o[0]):o[0];a=n.valueCallback?n.valueCallback(a):a;var s=t.slice(i.length);return{value:a,rest:s}}}var vhe=/^(\d+)(th|st|nd|rd)?/i,yhe=/\d+/i,_he={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},bhe={any:[/^b/i,/^(a|c)/i]},whe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},xhe={any:[/1/i,/2/i,/3/i,/4/i]},She={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},Ehe={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]},The={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},Ohe={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]},Che={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},khe={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}},Phe={ordinalNumber:ghe({matchPattern:vhe,parsePattern:yhe,valueCallback:function(e){return parseInt(e,10)}}),era:Ld({matchPatterns:_he,defaultMatchWidth:"wide",parsePatterns:bhe,defaultParseWidth:"any"}),quarter:Ld({matchPatterns:whe,defaultMatchWidth:"wide",parsePatterns:xhe,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Ld({matchPatterns:She,defaultMatchWidth:"wide",parsePatterns:Ehe,defaultParseWidth:"any"}),day:Ld({matchPatterns:The,defaultMatchWidth:"wide",parsePatterns:Ohe,defaultParseWidth:"any"}),dayPeriod:Ld({matchPatterns:Che,defaultMatchWidth:"any",parsePatterns:khe,defaultParseWidth:"any"})};const Lhe=Phe;var jhe={code:"en-US",formatDistance:Zfe,formatLong:the,formatRelative:ihe,localize:hhe,match:Lhe,options:{weekStartsOn:0,firstWeekContainsDate:1}};const $T=jhe;var Mhe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ahe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Nhe=/^'([^]*?)'?$/,Rhe=/''/g,Dhe=/[a-zA-Z]/;function Lu(e,t,n){var r,i,o,a,s,l,c,d,f,p,m,v,y,x,_,w,S,E;Oe(2,arguments);var C=String(t),k=va(),j=(r=(i=n==null?void 0:n.locale)!==null&&i!==void 0?i:k.locale)!==null&&r!==void 0?r:$T,N=Ye((o=(a=(s=(l=n==null?void 0:n.firstWeekContainsDate)!==null&&l!==void 0?l:n==null||(c=n.locale)===null||c===void 0||(d=c.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&s!==void 0?s:k.firstWeekContainsDate)!==null&&a!==void 0?a:(f=k.locale)===null||f===void 0||(p=f.options)===null||p===void 0?void 0:p.firstWeekContainsDate)!==null&&o!==void 0?o:1);if(!(N>=1&&N<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var U=Ye((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||(E=S.options)===null||E===void 0?void 0:E.weekStartsOn)!==null&&m!==void 0?m:0);if(!(U>=0&&U<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!j.localize)throw new RangeError("locale must contain localize property");if(!j.formatLong)throw new RangeError("locale must contain formatLong property");var R=Le(e);if(!ry(R))throw new RangeError("Invalid time value");var V=Cu(R),Y=S8(R,V),X={firstWeekContainsDate:N,weekStartsOn:U,locale:j,_originalDate:R},G=C.match(Ahe).map(function(Z){var te=Z[0];if(te==="p"||te==="P"){var le=d2[te];return le(Z,j.formatLong)}return Z}).join("").match(Mhe).map(function(Z){if(Z==="''")return"'";var te=Z[0];if(te==="'")return Ihe(Z);var le=Vfe[te];if(le)return!(n!=null&&n.useAdditionalWeekYearTokens)&&P8(Z)&&ay(Z,t,String(e)),!(n!=null&&n.useAdditionalDayOfYearTokens)&&k8(Z)&&ay(Z,t,String(e)),le(Y,Z,j.localize,X);if(te.match(Dhe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+te+"`");return Z}).join("");return G}function Ihe(e){var t=e.match(Nhe);return t?t[1].replace(Rhe,"'"):e}function UT(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 Fhe(e){return UT({},e)}var l3=1440,$he=2520,A1=43200,Uhe=86400;function Bhe(e,t,n){var r,i;Oe(2,arguments);var o=va(),a=(r=(i=n==null?void 0:n.locale)!==null&&i!==void 0?i:o.locale)!==null&&r!==void 0?r:$T;if(!a.formatDistance)throw new RangeError("locale must contain formatDistance property");var s=Tg(e,t);if(isNaN(s))throw new RangeError("Invalid time value");var l=UT(Fhe(n),{addSuffix:!!(n!=null&&n.addSuffix),comparison:s}),c,d;s>0?(c=Le(t),d=Le(e)):(c=Le(e),d=Le(t));var f=Lfe(d,c),p=(Cu(d)-Cu(c))/1e3,m=Math.round((f-p)/60),v;if(m<2)return n!=null&&n.includeSeconds?f<5?a.formatDistance("lessThanXSeconds",5,l):f<10?a.formatDistance("lessThanXSeconds",10,l):f<20?a.formatDistance("lessThanXSeconds",20,l):f<40?a.formatDistance("halfAMinute",0,l):f<60?a.formatDistance("lessThanXMinutes",1,l):a.formatDistance("xMinutes",1,l):m===0?a.formatDistance("lessThanXMinutes",1,l):a.formatDistance("xMinutes",m,l);if(m<45)return a.formatDistance("xMinutes",m,l);if(m<90)return a.formatDistance("aboutXHours",1,l);if(mr.getTime()}function vi(e,t){Oe(2,arguments);var n=Le(e),r=Le(t);return n.getTime()e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(l){throw l},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,a=!1,s;return{s:function(){n=n.call(e)},n:function(){var l=n.next();return o=l.done,l},e:function(l){a=!0,s=l},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(a)throw s}}}}function Fe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f2(e,t){return f2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},f2(e,t)}function ft(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f2(e,t)}function ly(e){return ly=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ly(e)}function Khe(){if(typeof Reflect>"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 Zhe(e,t){if(t&&(ei(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Fe(e)}function ht(e){var t=Khe();return function(){var n=ly(e),r;if(t){var i=ly(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Zhe(this,r)}}function st(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qhe(e,t){if(ei(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ei(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function j8(e){var t=Qhe(e,"string");return ei(t)==="symbol"?t:String(t)}function f3(e,t){for(var n=0;n0,r=n?t:1-t,i;if(r<=50)i=e||100;else{var o=r+50,a=Math.floor(o/100)*100,s=e>=o%100;i=e+a-(s?100:0)}return n?i:1-i}function D8(e){return e%400===0||e%4===0&&e%100!==0}var npe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a0}},{key:"set",value:function(r,i,o){var a=r.getUTCFullYear();if(o.isTwoDigitYear){var s=R8(o.year,a);return r.setUTCFullYear(s,0,1),r.setUTCHours(0,0,0,0),r}var l=!("era"in i)||i.era===1?o.year:1-o.year;return r.setUTCFullYear(l,0,1),r.setUTCHours(0,0,0,0),r}}]),n}(vt),rpe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a0}},{key:"set",value:function(r,i,o,a){var s=FT(r,a);if(o.isTwoDigitYear){var l=R8(o.year,s);return r.setUTCFullYear(l,0,a.firstWeekContainsDate),r.setUTCHours(0,0,0,0),Cl(r,a)}var c=!("era"in i)||i.era===1?o.year:1-o.year;return r.setUTCFullYear(c,0,a.firstWeekContainsDate),r.setUTCHours(0,0,0,0),Cl(r,a)}}]),n}(vt),ipe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=1&&i<=4}},{key:"set",value:function(r,i,o){return r.setUTCMonth((o-1)*3,1),r.setUTCHours(0,0,0,0),r}}]),n}(vt),spe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=1&&i<=4}},{key:"set",value:function(r,i,o){return r.setUTCMonth((o-1)*3,1),r.setUTCHours(0,0,0,0),r}}]),n}(vt),lpe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=0&&i<=11}},{key:"set",value:function(r,i,o){return r.setUTCMonth(o,1),r.setUTCHours(0,0,0,0),r}}]),n}(vt),cpe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=0&&i<=11}},{key:"set",value:function(r,i,o){return r.setUTCMonth(o,1),r.setUTCHours(0,0,0,0),r}}]),n}(vt);function upe(e,t,n){Oe(2,arguments);var r=Le(e),i=Ye(t),o=O8(r,n)-i;return r.setUTCDate(r.getUTCDate()-o*7),r}var dpe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=1&&i<=53}},{key:"set",value:function(r,i,o,a){return Cl(upe(r,o,a),a)}}]),n}(vt);function fpe(e,t){Oe(2,arguments);var n=Le(e),r=Ye(t),i=T8(n)-r;return n.setUTCDate(n.getUTCDate()-i*7),n}var hpe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=1&&i<=53}},{key:"set",value:function(r,i,o){return Pu(fpe(r,o))}}]),n}(vt),ppe=[31,28,31,30,31,30,31,31,30,31,30,31],mpe=[31,29,31,30,31,30,31,31,30,31,30,31],gpe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=1&&i<=mpe[s]:i>=1&&i<=ppe[s]}},{key:"set",value:function(r,i,o){return r.setUTCDate(o),r.setUTCHours(0,0,0,0),r}}]),n}(vt),vpe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=1&&i<=366:i>=1&&i<=365}},{key:"set",value:function(r,i,o){return r.setUTCMonth(0,o),r.setUTCHours(0,0,0,0),r}}]),n}(vt);function zT(e,t,n){var r,i,o,a,s,l,c,d;Oe(2,arguments);var f=va(),p=Ye((r=(i=(o=(a=n==null?void 0:n.weekStartsOn)!==null&&a!==void 0?a:n==null||(s=n.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&o!==void 0?o:f.weekStartsOn)!==null&&i!==void 0?i:(c=f.locale)===null||c===void 0||(d=c.options)===null||d===void 0?void 0:d.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=Le(e),v=Ye(t),y=m.getUTCDay(),x=v%7,_=(x+7)%7,w=(_=0&&i<=6}},{key:"set",value:function(r,i,o,a){return r=zT(r,o,a),r.setUTCHours(0,0,0,0),r}}]),n}(vt),_pe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=0&&i<=6}},{key:"set",value:function(r,i,o,a){return r=zT(r,o,a),r.setUTCHours(0,0,0,0),r}}]),n}(vt),bpe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=0&&i<=6}},{key:"set",value:function(r,i,o,a){return r=zT(r,o,a),r.setUTCHours(0,0,0,0),r}}]),n}(vt);function wpe(e,t){Oe(2,arguments);var n=Ye(t);n%7===0&&(n=n-7);var r=1,i=Le(e),o=i.getUTCDay(),a=n%7,s=(a+7)%7,l=(s=1&&i<=7}},{key:"set",value:function(r,i,o){return r=wpe(r,o),r.setUTCHours(0,0,0,0),r}}]),n}(vt),Spe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=1&&i<=12}},{key:"set",value:function(r,i,o){var a=r.getUTCHours()>=12;return a&&o<12?r.setUTCHours(o+12,0,0,0):!a&&o===12?r.setUTCHours(0,0,0,0):r.setUTCHours(o,0,0,0),r}}]),n}(vt),Cpe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=0&&i<=23}},{key:"set",value:function(r,i,o){return r.setUTCHours(o,0,0,0),r}}]),n}(vt),kpe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=0&&i<=11}},{key:"set",value:function(r,i,o){var a=r.getUTCHours()>=12;return a&&o<12?r.setUTCHours(o+12,0,0,0):r.setUTCHours(o,0,0,0),r}}]),n}(vt),Ppe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=1&&i<=24}},{key:"set",value:function(r,i,o){var a=o<=24?o%24:o;return r.setUTCHours(a,0,0,0),r}}]),n}(vt),Lpe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=0&&i<=59}},{key:"set",value:function(r,i,o){return r.setUTCMinutes(o,0,0),r}}]),n}(vt),jpe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=0&&i<=59}},{key:"set",value:function(r,i,o){return r.setUTCSeconds(o,0),r}}]),n}(vt),Mpe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=1&&R<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var V=Ye((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:N.weekStartsOn)!==null&&y!==void 0?y:(E=N.locale)===null||E===void 0||(C=E.options)===null||C===void 0?void 0:C.weekStartsOn)!==null&&v!==void 0?v:0);if(!(V>=0&&V<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(j==="")return k===""?Le(n):new Date(NaN);var Y={firstWeekContainsDate:R,weekStartsOn:V,locale:U},X=[new epe],G=j.match($pe).map(function(O){var M=O[0];if(M in d2){var $=d2[M];return $(O,U.formatLong)}return O}).join("").match(Fpe),Z=[],te=d3(G),le;try{var q=function(){var O=le.value;!(r!=null&&r.useAdditionalWeekYearTokens)&&P8(O)&&ay(O,j,e),!(r!=null&&r.useAdditionalDayOfYearTokens)&&k8(O)&&ay(O,j,e);var M=O[0],$=Ipe[M];if($){var ee=$.incompatibleTokens;if(Array.isArray(ee)){var J=Z.find(function(ge){return ee.includes(ge.token)||ge.token===M});if(J)throw new RangeError("The format string mustn't contain `".concat(J.fullToken,"` and `").concat(O,"` at the same time"))}else if($.incompatibleTokens==="*"&&Z.length>0)throw new RangeError("The format string mustn't contain `".concat(O,"` and any other token at the same time"));Z.push({token:M,fullToken:O});var se=$.run(k,O,U.match,Y);if(!se)return{v:new Date(NaN)};X.push(se.setter),k=se.rest}else{if(M.match(Vpe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+M+"`");if(O==="''"?O="'":M==="'"&&(O=Hpe(O)),k.indexOf(O)===0)k=k.slice(O.length);else return{v:new Date(NaN)}}};for(te.s();!(le=te.n()).done;){var I=q();if(ei(I)==="object")return I.v}}catch(O){te.e(O)}finally{te.f()}if(k.length>0&&zpe.test(k))return new Date(NaN);var D=X.map(function(O){return O.priority}).sort(function(O,M){return M-O}).filter(function(O,M,$){return $.indexOf(O)===M}).map(function(O){return X.filter(function(M){return M.priority===O}).sort(function(M,$){return $.subPriority-M.subPriority})}).map(function(O){return O[0]}),H=Le(n);if(isNaN(H.getTime()))return new Date(NaN);var ie=S8(H,Cu(H)),z={},K=d3(D),re;try{for(K.s();!(re=K.n()).done;){var ae=re.value;if(!ae.validate(ie,Y))return new Date(NaN);var he=ae.set(ie,z,Y);Array.isArray(he)?(ie=he[0],UT(z,he[1])):ie=he}}catch(O){K.e(O)}finally{K.f()}return ie}function Hpe(e){return e.match(Upe)[1].replace(Bpe,"'")}function Wpe(e,t){Oe(2,arguments);var n=Le(e),r=Le(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function Ype(e,t){Oe(2,arguments);var n=u2(e),r=u2(t);return n.getTime()===r.getTime()}function Gpe(e,t){Oe(2,arguments);var n=Le(e),r=Le(t);return n.getFullYear()===r.getFullYear()}function ju(e,t){Oe(2,arguments);var n=Le(e).getTime(),r=Le(t.start).getTime(),i=Le(t.end).getTime();if(!(r<=i))throw new RangeError("Invalid interval");return n>=r&&n<=i}function VT(e,t){Oe(2,arguments);var n=Ye(t);return Vl(e,-n)}function oa(e,t){var n;Oe(1,arguments);var r=Ye((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=Qpe(e),o;if(i.date){var a=Xpe(i.date,r);o=Jpe(a.restDateString,a.year)}if(!o||isNaN(o.getTime()))return new Date(NaN);var s=o.getTime(),l=0,c;if(i.time&&(l=eme(i.time),isNaN(l)))return new Date(NaN);if(i.timezone){if(c=tme(i.timezone),isNaN(c))return new Date(NaN)}else{var d=new Date(s+l),f=new Date(0);return f.setFullYear(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()),f.setHours(d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds()),f}return new Date(s+l+c)}var Dm={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},qpe=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Kpe=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Zpe=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Qpe(e){var t={},n=e.split(Dm.dateTimeDelimiter),r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],Dm.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Dm.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){var i=Dm.timezone.exec(r);i?(t.time=r.replace(i[1],""),t.timezone=i[1]):t.time=r}return t}function Xpe(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 Jpe(e,t){if(t===null)return new Date(NaN);var n=e.match(qpe);if(!n)return new Date(NaN);var r=!!n[4],i=jd(n[1]),o=jd(n[2])-1,a=jd(n[3]),s=jd(n[4]),l=jd(n[5])-1;if(r)return ame(t,s,l)?nme(t,s,l):new Date(NaN);var c=new Date(0);return!ime(t,o,a)||!ome(t,i)?new Date(NaN):(c.setUTCFullYear(t,o,Math.max(i,a)),c)}function jd(e){return e?parseInt(e):1}function eme(e){var t=e.match(Kpe);if(!t)return NaN;var n=D1(t[1]),r=D1(t[2]),i=D1(t[3]);return sme(n,r,i)?n*P0+r*NT+i*1e3:NaN}function D1(e){return e&&parseFloat(e.replace(",","."))||0}function tme(e){if(e==="Z")return 0;var t=e.match(Zpe);if(!t)return 0;var n=t[1]==="+"?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return lme(r,i)?n*(r*P0+i*NT):NaN}function nme(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 rme=[31,null,31,30,31,30,31,31,30,31,30,31];function I8(e){return e%400===0||e%4===0&&e%100!==0}function ime(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(rme[t]||(I8(e)?29:28))}function ome(e,t){return t>=1&&t<=(I8(e)?366:365)}function ame(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function sme(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function lme(e,t){return t>=0&&t<=59}function yr(e,t){Oe(2,arguments);var n=Le(e),r=Ye(t),i=n.getFullYear(),o=n.getDate(),a=new Date(0);a.setFullYear(i,r,15),a.setHours(0,0,0,0);var s=Hhe(a);return n.setMonth(r,Math.min(o,s)),n}function cme(e,t){if(Oe(2,arguments),ei(t)!=="object"||t===null)throw new RangeError("values parameter must be an object");var n=Le(e);return isNaN(n.getTime())?new Date(NaN):(t.year!=null&&n.setFullYear(t.year),t.month!=null&&(n=yr(n,t.month)),t.date!=null&&n.setDate(Ye(t.date)),t.hours!=null&&n.setHours(Ye(t.hours)),t.minutes!=null&&n.setMinutes(Ye(t.minutes)),t.seconds!=null&&n.setSeconds(Ye(t.seconds)),t.milliseconds!=null&&n.setMilliseconds(Ye(t.milliseconds)),n)}function Ef(e,t){Oe(2,arguments);var n=Le(e),r=Ye(t);return n.setHours(r),n}function Tf(e,t){Oe(2,arguments);var n=Le(e),r=Ye(t);return n.setMinutes(r),n}function hc(e,t){Oe(2,arguments);var n=Le(e),r=Ye(t),i=Math.floor(n.getMonth()/3)+1,o=r-i;return yr(n,n.getMonth()+o*3)}function ume(e,t){Oe(2,arguments);var n=Le(e),r=Ye(t);return n.setSeconds(r),n}function Uo(e,t){Oe(2,arguments);var n=Le(e),r=Ye(t);return isNaN(n.getTime())?new Date(NaN):(n.setFullYear(r),n)}function Mu(e,t){Oe(2,arguments);var n=Ye(t);return Ci(e,-n)}function dme(e,t){Oe(2,arguments);var n=Ye(t);return y8(e,-n)}function fme(e,t){Oe(2,arguments);var n=Ye(t);return AT(e,-n)}function Th(e,t){Oe(2,arguments);var n=Ye(t);return ku(e,-n)}const F8="yyyy-MM-dd",HT="yyyy-MM-dd HH:mm",ps=()=>new Date,WT=e=>typeof e!="string",YT=(e,t)=>!e||!WT(e)?e:t?Lu(e,t):zhe(e),ms=e=>YT(e,void 0),tl=e=>YT(e,F8),cy=e=>YT(e,HT),Vi=e=>WT(e)?e:oa(e),sp=(e,t,n)=>{try{return ju(Vi(e),{start:Vi(t??e),end:Vi(n??e)})}catch{return!1}},Ds=(e,t)=>L8(e,t)||vi(e,t),lp="all",$8={today:"Today",yesterday:"Yesterday",last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",last180Days:"Last 180 days",last365Days:"Last 365 days",[lp]:void 0},U8=Object.keys($8),B8=e=>e===void 0||ai(i8(Boolean,e)),uy=e=>typeof e=="string"&&U8.includes(e),hme=U8.filter(e=>e!==lp),h3=e=>e?Vi(e):null,z8=(e,t)=>({startDate:h3(e),endDate:h3(t)}),pme=e=>{if(!(!e||B8(e)))return e.startDate&&!e.endDate?`Since ${tl(e.startDate)}`:!e.startDate&&e.endDate?`Until ${tl(e.endDate)}`:`${tl(e.startDate)} - ${tl(e.endDate)}`},V8=e=>{if(!(!e||e===lp))return uy(e)?$8[e]:pme(e)},pi=e=>Kr(VT(ps(),e)),pc=e=>({startDate:e,endDate:Ol(ps())}),Is=e=>t=>e===t,H8=LT([[Is("today"),()=>pc(Kr(ps()))],[Is("yesterday"),()=>({startDate:pi(1),endDate:Ol(VT(ps(),1))})],[Is("last7Days"),()=>pc(pi(7))],[Is("last30Days"),()=>pc(pi(30))],[Is("last90Days"),()=>pc(pi(90))],[Is("last180Days"),()=>pc(pi(180))],[Is("last365Days"),()=>pc(pi(365))],[q5,()=>({})]]),mme=e=>{const t=Vi(e);return LT([[()=>Ds(Kr(ps()),t),()=>"today"],[()=>Ds(pi(1),t),()=>"yesterday"],[()=>Ds(pi(7),t),()=>"last7Days"],[()=>Ds(pi(30),t),()=>"last30Days"],[()=>Ds(pi(90),t),()=>"last90Days"],[()=>Ds(pi(180),t),()=>"last180Days"],[()=>Ds(pi(365),t),()=>"last365Days"],[q5,()=>lp]])()},gme=e=>uy(e)?H8(e):e,Ir=(e,t)=>F6(e,t,{serializeError:nde}),cp=Dn("shlink/visitCreation/createNewVisits",e=>({payload:{createdVisits:e}})),p3=5e3,m3=4,g3=2,vme=({currentPage:e,pagesCount:t})=>e>=t,yme=(e,t)=>t*100/e,up=({typePrefix:e,createLoaders:t,getExtraFulfilledPayload:n,shouldCancel:r})=>{const i=Dn(`${e}/progressChanged`),o=Dn(`${e}/large`),a=Dn(`${e}/fallbackToInterval`),s=Ir(e,async(l,{getState:c,dispatch:d})=>{var f;const[p,m]=t(l),v=async S=>Promise.all(S.map(async E=>p(E,p3).then(mt("data")))).then(Lde),y=async(S,E=0)=>{if(r(c))return[];const C=await v(S[E]);return d(i(yme(S.length,E+g3))),E{const{pagination:E,data:C}=await p(S,p3);if(!E||vme(E))return C;const k=jT(g3,E.pagesCount+1),j=wh(m3,k);return E.pagesCount-1>m3&&d(o()),C.concat(await y(j))},[_,w]=await Promise.all([x(),m((f=l.query)==null?void 0:f.excludeBots)]);return!_.length&&w&&d(a(mme(w.date))),{...n(l),visits:_}});return Object.assign(s,{progressChanged:i,large:o,fallbackToInterval:a})},dp=(e,t)=>async n=>e?t({page:1,itemsPerPage:1,excludeBots:n}).then(({data:r})=>r[0]):Promise.resolve(void 0),fp=({name:e,asyncThunkCreator:t,initialState:n,filterCreatedVisits:r})=>{const{pending:i,rejected:o,fulfilled:a,large:s,progressChanged:l,fallbackToInterval:c}=t,{reducer:d,actions:f}=fr({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:ga(y)})),m.addCase(a,(v,{payload:y})=>({...v,...y,loading:!1,loadingLarge:!1,error:!1})),m.addCase(s,v=>({...v,loadingLarge:!0})),m.addCase(l,(v,{payload:y})=>({...v,progress:y})),m.addCase(c,(v,{payload:y})=>({...v,fallbackInterval:y})),m.addCase(cp,(v,{payload:y})=>{const{visits:x}=v,_=r(v,y.createdVisits).map(({visit:w})=>w);return _.length?{...v,visits:[..._,...x]}:v})}}),{cancelGetVisits:p}=f;return{reducer:d,cancelGetVisits:p}},W8="shlink/domainVisits",Y8="DEFAULT",_me={visits:[],domain:"",loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},bme=e=>up({typePrefix:`${W8}/getDomainVisits`,createLoaders:({domain:t,query:n={},doIntervalFallback:r=!1})=>{const{getDomainVisits:i}=e(),o=async(s,l)=>i(t,{...n,page:s,itemsPerPage:l}),a=dp(r,async s=>i(t,s));return[o,a]},getExtraFulfilledPayload:({domain:t,query:n={}})=>({domain:t,query:n}),shouldCancel:t=>t().domainVisits.cancelLoad}),wme=e=>fp({name:W8,initialState:_me,asyncThunkCreator:e,filterCreatedVisits:({domain:t,query:n={}},r)=>{const{startDate:i,endDate:o}=n;return r.filter(({shortUrl:a,visit:s})=>a&&pfe(a,t)&&sp(s.date,i,o))}}),Og=({className:e="",placement:t,children:n})=>{const r=ws();return g.jsxs(g.Fragment,{children:[g.jsx("span",{className:e,ref:r,children:g.jsx(De,{icon:cE})}),g.jsx(Fr,{target:r,placement:t,children:n})]})},L0=e=>In(t=>t.preventDefault(),e),GT=(e,t,n=1)=>jT(n,e+1).map(t),fo=e=>!Bl(e)&&!ai(e),I1=e=>ai(e)?null:e,G8=e=>e?"true":"false",F1=e=>e===void 0?void 0:G8(e),$1=({isLast:e,...t})=>g.jsx(hg,{...t,required:!1,type:"url",placeholder:"No redirect",className:e?"mb-0":""}),xme=({isOpen:e,toggle:t,domain:n,editDomainRedirects:r})=>{var i,o,a;const[s,l]=F.useState(((i=n.redirects)==null?void 0:i.baseUrlRedirect)??""),[c,d]=F.useState(((o=n.redirects)==null?void 0:o.regular404Redirect)??""),[f,p]=F.useState(((a=n.redirects)==null?void 0:a.invalidShortUrlRedirect)??""),m=L0(async()=>r({domain:n.domain,redirects:{baseUrlRedirect:I1(s),regular404Redirect:I1(c),invalidShortUrlRedirect:I1(f)}}).then(t));return g.jsx(fa,{isOpen:e,toggle:t,centered:!0,children:g.jsxs("form",{name:"domainRedirectsModal",onSubmit:m,children:[g.jsxs(ha,{toggle:t,children:["Edit redirects for ",g.jsx("b",{children:n.domain})]}),g.jsxs(Co,{children:[g.jsxs($1,{value:s,onChange:l,children:[g.jsxs(Og,{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($1,{value:c,onChange:d,children:[g.jsxs(Og,{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($1,{value:f,isLast:!0,onChange:p,children:[g.jsx(Og,{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(Il,{children:[g.jsx(_t,{color:"link",type:"button",onClick:t,children:"Cancel"}),g.jsx(_t,{color:"primary",children:"Save"})]})]})})},Sme=({domain:e,editDomainRedirects:t})=>{const[n,r]=_n(),i=ap("domainVisits"),o=zl();return g.jsxs(m0,{children:[i&&g.jsxs(Ue,{tag:Ut,to:`${o}/domain/${e.domain}${e.isDefault?`_${Y8}`:""}/visits`,children:[g.jsx(De,{icon:lE,fixedWidth:!0})," Visit stats"]}),g.jsxs(Ue,{onClick:r,children:[g.jsx(De,{fixedWidth:!0,icon:sE})," Edit redirects"]}),g.jsx(xme,{domain:e,isOpen:n,toggle:r,editDomainRedirects:t})]})},qo=({href:e,children:t,rel:n,...r})=>g.jsx("a",{target:"_blank",rel:`noopener noreferrer${n?` ${n}`:""}`,href:e,...r,children:t??e}),Eme=({status:e,matchMedia:t=window.matchMedia})=>{const n=ws(),r=()=>t("(max-width: 991px)").matches,[i,o]=F.useState(r());return F.useEffect(()=>{const a=()=>o(r());return window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)},[]),e==="validating"?g.jsx(De,{fixedWidth:!0,icon:S4,spin:!0}):g.jsxs(g.Fragment,{children:[g.jsx("span",{ref:n,children:e==="valid"?g.jsx(De,{fixedWidth:!0,icon:Qf,className:"text-muted"}):g.jsx(De,{fixedWidth:!0,icon:rw,className:"text-danger"})}),g.jsx(Fr,{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(qo,{href:"https://slnk.to/multi-domain-docs",children:"documentation"})," in order to find out what is missing."]})})]})},U1=({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)"})]})]}),Tme=()=>g.jsxs(g.Fragment,{children:[g.jsx(De,{fixedWidth:!0,icon:eY,className:"text-primary",id:"defaultDomainIcon"}),g.jsx(Fr,{target:"defaultDomainIcon",placement:"right",children:"Default domain"})]}),Ome=({domain:e,editDomainRedirects:t,checkDomainHealth:n,defaultRedirects:r})=>{const{domain:i,isDefault:o,redirects:a,status:s}=e;return F.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:o&&g.jsx(Tme,{})}),g.jsx("th",{className:"responsive-table__cell","data-th":"Domain",children:i}),g.jsx("td",{className:"responsive-table__cell","data-th":"Base path redirect",children:(a==null?void 0:a.baseUrlRedirect)??g.jsx(U1,{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(U1,{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(U1,{fallback:r==null?void 0:r.invalidShortUrlRedirect})}),g.jsx("td",{className:"responsive-table__cell text-lg-center","data-th":"Status",children:g.jsx(Eme,{status:s})}),g.jsx("td",{className:"responsive-table__cell text-end",children:g.jsx(Sme,{domain:e,editDomainRedirects:t})})]})},v3=["","Domain","Base path redirect","Regular 404 redirect","Invalid short URL redirect","",""],Cme=({listDomains:e,domainsList:t,filterDomains:n,editDomainRedirects:r,checkDomainHealth:i})=>{var o;const{filteredDomains:a,defaultRedirects:s,loading:l,error:c,errorData:d}=t,f=s??((o=a.find(({isDefault:p})=>p))==null?void 0:o.redirects);return F.useEffect(()=>{e()},[]),l?g.jsx(Go,{loading:!0}):g.jsxs(g.Fragment,{children:[g.jsx(Qh,{className:"mb-3",onChange:n}),(()=>c?g.jsx(qr,{type:"error",children:g.jsx(ia,{errorData:d,fallbackMessage:"Error loading domains :("})}):g.jsx(vn,{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:v3.map((p,m)=>g.jsx("th",{children:p},m))})}),g.jsxs("tbody",{children:[a.length<1&&g.jsx("tr",{children:g.jsx("td",{colSpan:v3.length,className:"text-center",children:"No results found"})}),a.map(p=>g.jsx(Ome,{domain:p,editDomainRedirects:r,checkDomainHealth:i,defaultRedirects:f},p.domain))]})]})}))()]})},kme="shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS",Pme=e=>Ir(kme,async({domain:t,redirects:n})=>{const r=await e().editDomainRedirects({domain:t,...n});return{domain:t,redirects:r}}),Im="shlink/domainsList",Fm={domains:[],filteredDomains:[],loading:!1,error:!1},y3=({domain:e,redirects:t})=>n=>n.domain!==e?n:{...n,redirects:t},_3=(e,t)=>n=>n.domain!==e?n:{...n,status:t},Lme=(e,t)=>{const n=Ir(`${Im}/listDomains`,async()=>{const{data:a,defaultRedirects:s}=await e().listDomains();return{domains:a.map(l=>({...l,status:"validating"})),defaultRedirects:s}}),r=Ir(`${Im}/checkDomainHealth`,async a=>{try{const{status:s}=await e().health(a);return{domain:a,status:s==="pass"?"valid":"invalid"}}catch{return{domain:a,status:"invalid"}}}),i=Dn(`${Im}/filterDomains`),{reducer:o}=fr({name:Im,initialState:Fm,reducers:{},extraReducers:a=>{a.addCase(n.pending,()=>({...Fm,loading:!0})),a.addCase(n.rejected,(s,{error:l})=>({...Fm,error:!0,errorData:ga(l)})),a.addCase(n.fulfilled,(s,{payload:l})=>({...Fm,...l,filteredDomains:l.domains})),a.addCase(r.fulfilled,({domains:s,filteredDomains:l,...c},{payload:d})=>({...c,domains:s.map(_3(d.domain,d.status)),filteredDomains:l.map(_3(d.domain,d.status))})),a.addCase(i,(s,{payload:l})=>({...s,filteredDomains:s.domains.filter(({domain:c})=>c.toLowerCase().match(l.toLowerCase()))})),a.addCase(t.fulfilled,(s,{payload:l})=>({...s,domains:s.domains.map(y3(l)),filteredDomains:s.filteredDomains.map(y3(l))}))}});return{reducer:o,listDomains:n,checkDomainHealth:r,filterDomains:i}},jme=(e,t)=>{e.serviceFactory("DomainSelector",()=>tfe),e.decorator("DomainSelector",t(["domainsList"],["listDomains"])),e.serviceFactory("ManageDomains",()=>Cme),e.decorator("ManageDomains",t(["domainsList"],["listDomains","filterDomains","editDomainRedirects","checkDomainHealth"])),e.serviceFactory("domainsListReducerCreator",Lme,"apiClientFactory","editDomainRedirects"),e.serviceFactory("domainsListReducer",mt("reducer"),"domainsListReducerCreator"),e.serviceFactory("listDomains",mt("listDomains"),"domainsListReducerCreator"),e.serviceFactory("filterDomains",mt("filterDomains"),"domainsListReducerCreator"),e.serviceFactory("editDomainRedirects",Pme,"apiClientFactory"),e.serviceFactory("checkDomainHealth",mt("checkDomainHealth"),"domainsListReducerCreator")},b3="shlink/mercure",Mme={loading:!0,error:!1},Ame=e=>{const t=Ir(`${b3}/loadMercureInfo`,({realTimeUpdates:r})=>{if(r&&!r.enabled)throw new Error("Real time updates not enabled");return e().mercureInfo()}),{reducer:n}=fr({name:b3,initialState:Mme,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}},Nme=e=>{e.serviceFactory("mercureInfoReducerCreator",Ame,"apiClientFactory"),e.serviceFactory("mercureInfoReducer",mt("reducer"),"mercureInfoReducerCreator"),e.serviceFactory("loadMercureInfo",mt("loadMercureInfo"),"mercureInfoReducerCreator")};var Fc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Gu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var h2={exports:{}};/** @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,a=n.XDomainRequest,s=n.ActiveXObject,l=n.EventSource,c=n.document,d=n.Promise,f=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&&s!=null&&(o=function(){return new s("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(ue){function me(){}return me.prototype=ue,new me}),Date.now||(Date.now=function(){return new Date().getTime()}),y==null){var x=f;f=function(ue,me){var _e=me.signal;return x(ue,{headers:me.headers,credentials:me.credentials,cache:me.cache}).then(function(Se){var ke=Se.body.getReader();return _e._reader=ke,_e._aborted&&_e._reader.cancel(),{status:Se.status,statusText:Se.statusText,headers:Se.headers,body:{getReader:function(){return ke}}}})},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 me(ye,ve,xe){if(xe===1)return ye>=128>>ve&&ye<=2048>>ve&&ye<=57344>>ve&&ye<=65536>>ve&&ye<>6>15?3:ve>31?2:1;if(ye===6*2)return ve>15?3:2;if(ye===6*3)return 3;throw new Error}for(var Se=65533,ke="",Ce=this.bitsNeeded,je=this.codePoint,ce=0;ce191||!me(je<<6|fe&63,Ce-6,_e(Ce,je)))&&(Ce=0,je=Se,ke+=String.fromCharCode(je)),Ce===0?(fe>=0&&fe<=127?(Ce=0,je=fe):fe>=192&&fe<=223?(Ce=6*1,je=fe&31):fe>=224&&fe<=239?(Ce=6*2,je=fe&15):fe>=240&&fe<=247?(Ce=6*3,je=fe&7):(Ce=0,je=Se),Ce!==0&&!me(je,Ce,_e(Ce,je))&&(Ce=0,je=Se)):(Ce-=6,je=je<<6|fe&63),Ce===0&&(je<=65535?ke+=String.fromCharCode(je):(ke+=String.fromCharCode(55296+(je-65535-1>>10)),ke+=String.fromCharCode(56320+(je-65535-1&1023))))}return this.bitsNeeded=Ce,this.codePoint=je,ke};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 E(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}E.prototype.open=function(ue,me){this._abort(!0);var _e=this,Se=this._xhr,ke=1,Ce=0;this._abort=function(xe){_e._sendTimeout!==0&&(i(_e._sendTimeout),_e._sendTimeout=0),(ke===1||ke===2||ke===3)&&(ke=4,Se.onload=S,Se.onerror=S,Se.onabort=S,Se.onprogress=S,Se.onreadystatechange=S,Se.abort(),Ce!==0&&(i(Ce),Ce=0),xe||(_e.readyState=4,_e.onabort(null),_e.onreadystatechange())),ke=0};var je=function(){if(ke===1){var xe=0,Pe="",Ne=void 0;if("contentType"in Se)xe=200,Pe="OK",Ne=Se.contentType;else try{xe=Se.status,Pe=Se.statusText,Ne=Se.getResponseHeader("Content-Type")}catch{xe=0,Pe="",Ne=void 0}xe!==0&&(ke=2,_e.readyState=2,_e.status=xe,_e.statusText=Pe,_e._contentType=Ne,_e.onreadystatechange())}},ce=function(){if(je(),ke===2||ke===3){ke=3;var xe="";try{xe=Se.responseText}catch{}_e.readyState=3,_e.responseText=xe,_e.onprogress()}},fe=function(xe,Pe){if((Pe==null||Pe.preventDefault==null)&&(Pe={preventDefault:S}),ce(),ke===1||ke===2||ke===3){if(ke=4,Ce!==0&&(i(Ce),Ce=0),_e.readyState=4,xe==="load")_e.onload(Pe);else if(xe==="error")_e.onerror(Pe);else if(xe==="abort")_e.onabort(Pe);else throw new TypeError;_e.onreadystatechange()}},ye=function(xe){Se!=null&&(Se.readyState===4?(!("onload"in Se)||!("onerror"in Se)||!("onabort"in Se))&&fe(Se.responseText===""?"error":"load",xe):Se.readyState===3?"onprogress"in Se||ce():Se.readyState===2&&je())},ve=function(){Ce=r(function(){ve()},500),Se.readyState===3&&ce()};"onload"in Se&&(Se.onload=function(xe){fe("load",xe)}),"onerror"in Se&&(Se.onerror=function(xe){fe("error",xe)}),"onabort"in Se&&(Se.onabort=function(xe){fe("abort",xe)}),"onprogress"in Se&&(Se.onprogress=ce),"onreadystatechange"in Se&&(Se.onreadystatechange=function(xe){ye(xe)}),("contentType"in Se||!("ontimeout"in o.prototype))&&(me+=(me.indexOf("?")===-1?"?":"&")+"padding=true"),Se.open(ue,me,!0),"readyState"in Se&&(Ce=r(function(){ve()},0))},E.prototype.abort=function(){this._abort(!1)},E.prototype.getResponseHeader=function(ue){return this._contentType},E.prototype.setRequestHeader=function(ue,me){var _e=this._xhr;"setRequestHeader"in _e&&_e.setRequestHeader(ue,me)},E.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},E.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 me=this._xhr;"withCredentials"in me&&(me.withCredentials=this.withCredentials);try{me.send(void 0)}catch(_e){throw _e}};function C(ue){return ue.replace(/[A-Z]/g,function(me){return String.fromCharCode(me.charCodeAt(0)+32)})}function k(ue){for(var me=Object.create(null),_e=ue.split(`\r +`),Se=0;Se<_e.length;Se+=1){var ke=_e[Se],Ce=ke.split(": "),je=Ce.shift(),ce=Ce.join(": ");me[C(je)]=ce}this._map=me}k.prototype.get=function(ue){return this._map[C(ue)]},o!=null&&o.HEADERS_RECEIVED==null&&(o.HEADERS_RECEIVED=2);function j(){}j.prototype.open=function(ue,me,_e,Se,ke,Ce,je){ue.open("GET",ke);var ce=0;ue.onprogress=function(){var ye=ue.responseText,ve=ye.slice(ce);ce+=ve.length,_e(ve)},ue.onerror=function(ye){ye.preventDefault(),Se(new Error("NetworkError"))},ue.onload=function(){Se(null)},ue.onabort=function(){Se(null)},ue.onreadystatechange=function(){if(ue.readyState===o.HEADERS_RECEIVED){var ye=ue.status,ve=ue.statusText,xe=ue.getResponseHeader("Content-Type"),Pe=ue.getAllResponseHeaders();me(ye,ve,xe,new k(Pe))}},ue.withCredentials=Ce;for(var fe in je)Object.prototype.hasOwnProperty.call(je,fe)&&ue.setRequestHeader(fe,je[fe]);return ue.send(),ue};function N(ue){this._headers=ue}N.prototype.get=function(ue){return this._headers.get(ue)};function U(){}U.prototype.open=function(ue,me,_e,Se,ke,Ce,je){var ce=null,fe=new y,ye=fe.signal,ve=new m;return f(ke,{headers:je,credentials:Ce?"include":"same-origin",signal:ye,cache:"no-store"}).then(function(xe){return ce=xe.body.getReader(),me(xe.status,xe.statusText,xe.headers.get("Content-Type"),new N(xe.headers)),new d(function(Pe,Ne){var Qe=function(){ce.read().then(function(et){if(et.done)Pe(void 0);else{var Ge=ve.decode(et.value,{stream:!0});_e(Ge),Qe()}}).catch(function(et){Ne(et)})};Qe()})}).catch(function(xe){if(xe.name!=="AbortError")return xe}).then(function(xe){Se(xe)}),{abort:function(){ce!=null&&ce.cancel(),fe.abort()}}};function R(){this._listeners=Object.create(null)}function V(ue){r(function(){throw ue},0)}R.prototype.dispatchEvent=function(ue){ue.target=this;var me=this._listeners[ue.type];if(me!=null)for(var _e=me.length,Se=0;Se<_e;Se+=1){var ke=me[Se];try{typeof ke.handleEvent=="function"?ke.handleEvent(ue):ke.call(this,ue)}catch(Ce){V(Ce)}}},R.prototype.addEventListener=function(ue,me){ue=String(ue);var _e=this._listeners,Se=_e[ue];Se==null&&(Se=[],_e[ue]=Se);for(var ke=!1,Ce=0;Ce"u"?typeof window<"u"?window:typeof self<"u"?self:Fc:globalThis)})(h2,h2.exports);var Rme=h2.exports;const Dme=(e,t,n,r)=>{const{mercureHubUrl:i,token:o,loading:a,error:s}=e;if(a||s||!i)return;const l=({data:f})=>n(JSON.parse(f)),c=({status:f})=>f===401&&r(),d=t.map(f=>{const p=new URL(i);p.searchParams.append("topic",f);const m=new Rme.EventSourcePolyfill(p,{headers:{Authorization:`Bearer ${o}`}});return m.onmessage=l,m.onerror=c,m});return()=>d.forEach(f=>f.close())};function Es(e,t){const n=new Set;return r=>{const{createNewVisits:i,loadMercureInfo:o,mercureInfo:a}=r,{interval:s}=a,l=Dl();return F.useEffect(()=>{const c=m=>s?n.add(m):i([m]),d=t(r,l),f=Dme(a,d,c,o);if(!s)return f;const p=setInterval(()=>{i([...n]),n.clear()},s*1e3*60);return In(()=>clearInterval(p),()=>f==null?void 0:f())},[a]),g.jsx(e,{...r})}}class wi{}Te(wi,"visits","https://shlink.io/new-visit"),Te(wi,"orphanVisits","https://shlink.io/new-orphan-visit"),Te(wi,"shortUrlVisits",e=>`https://shlink.io/new-visit/${e}`);const qT="shlink/shortUrlDeletion",w3={shortCode:"",loading:!1,deleted:!1,error:!1},Ime=e=>Ir(`${qT}/deleteShortUrl`,async({shortCode:t,domain:n})=>(await e().deleteShortUrl(t,n),{shortCode:t,domain:n})),q8=Dn(`${qT}/shortUrlDeleted`),Fme=e=>{const{actions:t,reducer:n}=fr({name:qT,initialState:w3,reducers:{resetDeleteShortUrl:()=>w3},extraReducers:i=>{i.addCase(e.pending,o=>({...o,loading:!0,error:!1,deleted:!1})),i.addCase(e.rejected,(o,{error:a})=>({...o,errorData:ga(a),loading:!1,error:!0,deleted:!1})),i.addCase(e.fulfilled,(o,{payload:a})=>({...o,shortCode:a.shortCode,loading:!1,error:!1,deleted:!0}))}}),{resetDeleteShortUrl:r}=t;return{reducer:n,resetDeleteShortUrl:r}},K8="shlink/shortUrlsList",Z8=5,$me={loading:!0,error:!1},Ume=e=>Ir(`${K8}/listShortUrls`,t=>e().listShortUrls(t??{})),Bme=(e,t,n)=>fr({name:K8,initialState:$me,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,In((i,{payload:o})=>i.shortUrls?dc(["shortUrls","data"],[o,...i.shortUrls.data.slice(0,Z8-1)],i):i,i=>i.shortUrls?dc(["shortUrls","pagination","totalItems"],i.shortUrls.pagination.totalItems+1,i):i)),r.addCase(t.fulfilled,(i,{payload:o})=>i.shortUrls?dc(["shortUrls","data"],i.shortUrls.data.map(a=>{const{shortCode:s,domain:l}=o;return Sf(a,s,l)?o:a}),i):i),r.addCase(q8,In((i,{payload:o})=>i.shortUrls?dc(["shortUrls","data"],PT(a=>Sf(a,o.shortCode,o.domain),i.shortUrls.data),i):i,i=>i.shortUrls?dc(["shortUrls","pagination","totalItems"],i.shortUrls.pagination.totalItems-1,i):i)),r.addCase(cp,(i,{payload:o})=>{var a,s;return dc(["shortUrls","data"],(s=(a=i.shortUrls)==null?void 0:a.data)==null?void 0:s.map(l=>{var c;return((c=Ode(o.createdVisits.filter(({shortUrl:d})=>d&&Sf(l,d.shortCode,d.domain))))==null?void 0:c.shortUrl)??l}),i)})}}),x3=10,{ceil:zme}=Math,Vme=new Intl.NumberFormat("en-US"),Tn=e=>Vme.format(Number(e)),Hme=e=>zme(e/x3)*x3,Wme={field:"dateCreated",dir:"DESC"},Q8={realTimeUpdates:{enabled:!0},shortUrlCreation:{validateUrls:!1},ui:{theme:"light"},visits:{defaultInterval:"last30Days"},shortUrlsList:{defaultOrdering:Wme}},X8=F.createContext(Q8),Yme=X8.Provider,KT=()=>F.useContext(X8)??Q8,Hl=e=>KT()[e],Gme=e=>({tag:Ut,to:e}),p2=({children:e,title:t,link:n,tooltip:r})=>{const i=ws();return g.jsxs(g.Fragment,{children:[g.jsxs(Xr,{innerRef:i,className:"highlight-card",body:!0,...Gme(n),children:[g.jsx(De,{size:"3x",className:"highlight-card__link-icon",icon:Iie}),g.jsx(zI,{tag:"h5",className:"highlight-card__title",children:t}),g.jsx(BI,{tag:"h2",children:e})]}),r&&g.jsx(Fr,{target:i,placement:"bottom",children:r})]})},S3=({loading:e,excludeBots:t,visitsSummary:n,...r})=>g.jsx(p2,{tooltip:n.bots!==void 0?g.jsxs(g.Fragment,{children:[t?"Plus":"Including"," ",g.jsx("strong",{children:Tn(n.bots)})," potential bot visits"]}):void 0,...r,children:e?"Loading...":Tn(t&&n.nonBots?n.nonBots:n.total)}),qme=(e,t)=>Es(({shortUrlsList:n,listShortUrls:r,listTags:i,tagsList:o,loadVisitsOverview:a,visitsOverview:s})=>{const{loading:l,shortUrls:c}=n,{loading:d}=o,{loading:f,nonOrphanVisits:p,orphanVisits:m}=s,v=zl(),y=Oo(),x=Hl("visits");return F.useEffect(()=>{r({itemsPerPage:Z8,orderBy:{field:"dateCreated",dir:"DESC"}}),i(),a()},[]),g.jsxs(g.Fragment,{children:[g.jsxs(br,{children:[g.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:g.jsx(S3,{title:"Visits",link:`${v}/non-orphan-visits`,excludeBots:(x==null?void 0:x.excludeBots)??!1,loading:f,visitsSummary:p})}),g.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:g.jsx(S3,{title:"Orphan visits",link:`${v}/orphan-visits`,excludeBots:(x==null?void 0:x.excludeBots)??!1,loading:f,visitsSummary:m})}),g.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:g.jsx(p2,{title:"Short URLs",link:`${v}/list-short-urls/1`,children:l?"Loading...":Tn((c==null?void 0:c.pagination.totalItems)??0)})}),g.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:g.jsx(p2,{title:"Tags",link:`${v}/manage-tags`,children:d?"Loading...":Tn(o.tags.length)})})]}),g.jsxs(Xr,{className:"mb-3",children:[g.jsxs(vu,{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(Ut,{className:"float-end",to:`${v}/create-short-url`,children:"Advanced options »"})]}),g.jsx(gu,{children:g.jsx(t,{basicMode:!0})})]}),g.jsxs(Xr,{children:[g.jsxs(vu,{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(Ut,{className:"float-end",to:`${v}/list-short-urls/1`,children:"See all »"})]}),g.jsx(gu,{children:g.jsx(e,{shortUrlsList:n,className:"mb-0",onTagClick:_=>y(`${v}/list-short-urls/1?tags=${encodeURIComponent(_)}`)})})]})]})},()=>[wi.visits,wi.orphanVisits]);function Kme(e,t){e.serviceFactory("Overview",qme,"ShortUrlsTable","CreateShortUrl"),e.decorator("Overview",t(["shortUrlsList","tagsList","mercureInfo","visitsOverview"],["listShortUrls","listTags","createNewVisits","loadMercureInfo","loadVisitsOverview"]))}const Zme=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}),Qme=(e,t)=>({createShortUrl:n,shortUrlCreation:r,resetCreateShortUrl:i,basicMode:o=!1})=>{const a=Hl("shortUrlCreation"),s=F.useMemo(()=>Zme(a),[a]);return g.jsxs(g.Fragment,{children:[g.jsx(e,{initialState:s,saving:r.saving,mode:o?"create-basic":"create",onSave:async l=>(i(),n(l))}),g.jsx(t,{creation:r,resetCreateShortUrl:i,canBeClosed:o})]})},Xme="Left",Jme="Right",ege="Up",tge="Down",$c={delta:10,preventScrollOnSwipe:!1,rotationAngle:0,trackMouse:!1,trackTouch:!0,swipeDuration:1/0,touchEventOptions:{passive:!0}},m2={first:!0,initial:[0,0],start:0,swiping:!1,xy:[0,0]},E3="mousemove",T3="mouseup",nge="touchend",rge="touchmove",ige="touchstart";function oge(e,t,n,r){return e>t?n>0?Jme:Xme:r>0?tge:ege}function O3(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 age(e,t){const n=c=>{const d="touches"in c;d&&c.touches.length>1||e((f,p)=>{p.trackMouse&&!d&&(document.addEventListener(E3,r),document.addEventListener(T3,a));const{clientX:m,clientY:v}=d?c.touches[0]:c,y=O3([m,v],p.rotationAngle);return p.onTouchStartOrOnMouseDown&&p.onTouchStartOrOnMouseDown({event:c}),Object.assign(Object.assign(Object.assign({},f),m2),{initial:y.slice(),xy:y,start:c.timeStamp||0})})},r=c=>{e((d,f)=>{const p="touches"in c;if(p&&c.touches.length>1)return d;if(c.timeStamp-d.start>f.swipeDuration)return d.swiping?Object.assign(Object.assign({},d),{swiping:!1}):d;const{clientX:m,clientY:v}=p?c.touches[0]:c,[y,x]=O3([m,v],f.rotationAngle),_=y-d.xy[0],w=x-d.xy[1],S=Math.abs(_),E=Math.abs(w),C=(c.timeStamp||0)-d.start,k=Math.sqrt(S*S+E*E)/(C||1),j=[_/(C||1),w/(C||1)],N=oge(S,E,_,w),U=typeof f.delta=="number"?f.delta:f.delta[N.toLowerCase()]||$c.delta;if(S{e((d,f)=>{let p;if(d.swiping&&d.eventData){if(c.timeStamp-d.start{document.removeEventListener(E3,r),document.removeEventListener(T3,a)},a=c=>{o(),i(c)},s=(c,d)=>{let f=()=>{};if(c&&c.addEventListener){const p=Object.assign(Object.assign({},$c.touchEventOptions),d.touchEventOptions),m=[[ige,n,p],[rge,r,Object.assign(Object.assign({},p),d.preventScrollOnSwipe?{passive:!1}:{})],[nge,i,p]];m.forEach(([v,y,x])=>c.addEventListener(v,y,x)),f=()=>m.forEach(([v,y])=>c.removeEventListener(v,y))}return f},l={ref:c=>{c!==null&&e((d,f)=>{if(d.el===c)return d;const p={};return d.el&&d.el!==c&&d.cleanUpTouch&&(d.cleanUpTouch(),p.cleanUpTouch=void 0),f.trackTouch&&c&&(p.cleanUpTouch=s(c,f)),Object.assign(Object.assign(Object.assign({},d),{el:c}),p)})}};return t.trackMouse&&(l.onMouseDown=n),[l,s]}function sge(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 lge(e){const{trackMouse:t}=e,n=F.useRef(Object.assign({},m2)),r=F.useRef(Object.assign({},$c)),i=F.useRef(Object.assign({},r.current));i.current=Object.assign({},r.current),r.current=Object.assign(Object.assign({},$c),e);let o;for(o in $c)r.current[o]===void 0&&(r.current[o]=$c[o]);const[a,s]=F.useMemo(()=>age(l=>n.current=l(n.current,r.current),{trackMouse:t}),[t]);return n.current=sge(n.current,r.current,i.current,s),a}const cge=2e3,uge=(e,t)=>(n=!1,r=cge)=>{const[i,o]=F.useState(n),a=F.useRef(void 0);return[i,()=>{o(!n),a.current&&t(a.current),a.current=e(()=>o(n),r)}]},dge=(e,t)=>{const n=r=>i=>{i.event.composedPath().some(({classList:o})=>o==null?void 0:o.contains("visits-table"))||document.querySelector(".modal")||r()};return lge({delta:40,onSwipedLeft:n(t),onSwipedRight:n(e)})},fge=(e,t)=>{const[n,r]=F.useState(t);return[n,i=>{const{location:o,history:a}=window,s=Fl(o.search);s[e]=i,a.pushState(null,"",`${o.pathname}?${ep(s)}`),r(i)}]},hge=(e,t)=>{const n=F.useRef(!0);F.useEffect(()=>{!n.current&&e(),n.current=!1},t)},qu=()=>{const e=Oo();return()=>e(-1)},pge=e=>({shortUrlDetail:t,getShortUrlDetail:n,shortUrlEdition:r,editShortUrl:i})=>{const{search:o}=bn(),a=Dl(),s=qu(),{loading:l,error:c,errorData:d,shortUrl:f}=t,{saving:p,saved:m,error:v,errorData:y}=r,{domain:x}=Fl(o),_=Hl("shortUrlCreation"),w=F.useMemo(()=>mfe(f,_),[f,_]);return F.useEffect(()=>{a.shortCode&&n({shortCode:Eg(a.shortCode),domain:x})},[]),l?g.jsx(Go,{loading:!0}):c?g.jsx(qr,{type:"error",children:g.jsx(ia,{errorData:d,fallbackMessage:"An error occurred while loading short URL detail :("})}):g.jsxs(g.Fragment,{children:[g.jsx("header",{className:"mb-3",children:g.jsx(Xr,{body:!0,children:g.jsxs("h2",{className:"d-sm-flex justify-content-between align-items-center mb-0",children:[g.jsx(_t,{color:"link",size:"lg",className:"p-0 me-3",onClick:s,children:g.jsx(De,{icon:C4})}),g.jsx("span",{className:"text-center",children:g.jsxs("small",{children:["Edit ",g.jsx(qo,{href:(f==null?void 0:f.shortUrl)??""})]})}),g.jsx("span",{})]})})}),g.jsx(e,{initialState:w,saving:p,mode:"edit",onSave:async S=>{f&&i({...f,data:S})}}),m&&v&&g.jsx(qr,{type:"error",className:"mt-3",children:g.jsx(ia,{errorData:y,fallbackMessage:"An error occurred while updating short URL :("})}),m&&!v&&g.jsx(qr,{type:"success",className:"mt-3",children:"Short URL properly edited."})]})};var j0={},mge=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 f=C3[t.format]||C3.default;window.clipboardData.setData(f,e)}else d.clipboardData.clearData(),d.clipboardData.setData(t.format,e);t.onCopy&&(d.preventDefault(),t.onCopy(d.clipboardData))}),document.body.appendChild(s),o.selectNodeContents(s),a.addRange(o);var c=document.execCommand("copy");if(!c)throw new Error("copy command was unsuccessful");l=!0}catch(d){n&&console.error("unable to copy using execCommand: ",d),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),l=!0}catch(f){n&&console.error("unable to copy using clipboardData: ",f),n&&console.error("falling back to prompt"),r=yge("message"in t?t.message:vge),window.prompt(r,e)}}finally{a&&(typeof a.removeRange=="function"?a.removeRange(o):a.removeAllRanges()),s&&document.body.removeChild(s),i()}return l}var bge=_ge;function g2(e){"@babel/helpers - typeof";return g2=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},g2(e)}Object.defineProperty(j0,"__esModule",{value:!0});j0.CopyToClipboard=void 0;var $m=J8(W),wge=J8(bge),xge=["text","onCopy","options","children"];function J8(e){return e&&e.__esModule?e:{default: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 P3(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ege(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 Tge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function L3(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 dy(e){return dy=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},dy(e)}function ZT(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var tF=function(e){Cge(n,e);var t=kge(n);function n(){var r;Tge(this,n);for(var i=arguments.length,o=new Array(i),a=0;a({creation:t,resetCreateShortUrl:n,canBeClosed:r=!1})=>{const[i,o]=e(),{error:a,saved:s}=t;if(F.useEffect(()=>{n()},[]),a)return g.jsxs(qr,{type:"error",className:"mt-3",children:[r&&g.jsx(De,{"data-testid":"error-close-button",icon:rw,className:"float-end pointer",onClick:n}),g.jsx(ia,{errorData:t.errorData,fallbackMessage:"An error occurred while creating the URL :("})]});if(!s)return null;const{shortUrl:l}=t.result;return g.jsxs(qr,{type:"success",className:"mt-3",children:[r&&g.jsx(De,{"data-testid":"success-close-button",icon:rw,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(nF,{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(De,{icon:$6})," Copy"]})}),g.jsx(Kh,{placement:"left",isOpen:i,target:"copyBtn",children:"Copied!"})]})},B1="delete",Nge=({shortUrl:e,toggle:t,isOpen:n,shortUrlDeletion:r,resetDeleteShortUrl:i,deleteShortUrl:o,shortUrlDeleted:a})=>{const[s,l]=F.useState("");F.useEffect(()=>i,[]);const{loading:c,error:d,deleted:f,errorData:p}=r,m=In(i,t),v=L0(()=>o(e).then(t));return g.jsx(fa,{isOpen:n,toggle:m,centered:!0,onClosed:()=>f&&a(e),children:g.jsxs("form",{onSubmit:v,children:[g.jsx(ha,{toggle:m,children:g.jsx("span",{className:"text-danger",children:"Delete short URL"})}),g.jsxs(Co,{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:B1})," to confirm deletion."]}),g.jsx("input",{type:"text",className:"form-control",placeholder:`Insert ${B1}`,value:s,onChange:y=>l(y.target.value)}),d&&g.jsx(qr,{type:rfe(p)?"warning":"error",small:!0,className:"mt-2",children:g.jsx(ia,{errorData:p,fallbackMessage:"Something went wrong while deleting the URL :("})})]}),g.jsxs(Il,{children:[g.jsx("button",{type:"button",className:"btn btn-link",onClick:m,children:"Cancel"}),g.jsx("button",{type:"submit",className:"btn btn-danger",disabled:s!==B1||c,children:c?"Deleting...":"Delete"})]})]})})},rF=({amount:e=0,loading:t=!1,...n})=>g.jsxs(_t,{...n,outline:!0,color:"primary",disabled:t,children:[g.jsx(De,{icon:KW})," ",t?"Exporting...":g.jsxs(g.Fragment,{children:["Export (",Tn(e),")"]})]}),M0=()=>{const e=Oo(),{search:t}=bn(),n=zl(),r=F.useMemo(In(()=>Fl(t),({orderBy:o,tags:a,excludeBots:s,excludeMaxVisitsReached:l,excludePastValidUntil:c,...d})=>{const f=o?kte(o):void 0,p=(a==null?void 0:a.split(","))??[];return{...d,orderBy:f,tags:p,excludeBots:s!==void 0?s==="true":void 0,excludeMaxVisitsReached:l!==void 0?l==="true":void 0,excludePastValidUntil:c!==void 0?c==="true":void 0}}),[t]),i=F.useCallback(o=>{const a={...r,...o},{orderBy:s,tags:l,excludeBots:c,excludeMaxVisitsReached:d,excludePastValidUntil:f,...p}=a,m={...p,orderBy:s&&s6(s),tags:l.length>0?l.join(","):void 0,excludeBots:F1(c),excludeMaxVisitsReached:F1(d),excludePastValidUntil:F1(f)},v=ep(m),y=ai(v)?"":`?${v}`;e(`${n}/list-short-urls/1${y}`)},[r,e,n]);return[r,i]},j3=20,Rge=(e,{exportShortUrls:t})=>({amount:n=0})=>{const[{tags:r,search:i,startDate:o,endDate:a,orderBy:s,tagsMode:l}]=M0(),[c,,d,f]=_n(),p=F.useCallback(async()=>{const m=n/j3,v=async(x=1)=>{const{data:_}=await e().listShortUrls({page:`${x}`,tags:r,searchTerm:i,startDate:o,endDate:a,orderBy:s,tagsMode:l,itemsPerPage:j3});return x>=m?_:_.concat(await v(x+1))};d();const y=await v();t(y.map(x=>{var _;const{hostname:w,pathname:S}=new URL(x.shortUrl),E=S.substring(1);return{createdAt:x.dateCreated,domain:w,shortCode:E,shortUrl:x.shortUrl,longUrl:x.longUrl,title:x.title??"",tags:x.tags.join("|"),visits:((_=x==null?void 0:x.visitsSummary)==null?void 0:_.total)??x.visitsCount}})),f()},[]);return g.jsx(rF,{loading:c,className:"btn-md-block",amount:n,onClick:p})},iF=({text:e,onCopy:t})=>g.jsx(nF,{text:e,onCopy:t,children:g.jsx(De,{icon:$6,className:"ms-2 copy-to-clipboard-icon"})}),Dge=(e,{margin:t,...n})=>{const r=`${e}/qr-code`,i=ep({...n,margin:t>0?t:void 0});return`${r}${ai(i)?"":`?${i}`}`},Ige=({errorCorrection:e,setErrorCorrection:t})=>g.jsxs(pa,{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"]})]}),Fge=({format:e,setFormat:t})=>g.jsxs(pa,{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"})]}),$ge=e=>({shortUrl:{shortUrl:t,shortCode:n},toggle:r,isOpen:i})=>{const[o,a]=F.useState(300),[s,l]=F.useState(0),[c,d]=F.useState("png"),[f,p]=F.useState("L"),m=F.useMemo(()=>Dge(t,{size:o,format:c,margin:s,errorCorrection:f}),[t,o,c,s,f]),v=F.useMemo(()=>o+s,[o,s]),y=F.useMemo(()=>{if(!(v<500))return v<800?"lg":"xl"},[v]);return g.jsxs(fa,{isOpen:i,toggle:r,centered:!0,size:y,children:[g.jsxs(ha,{toggle:r,children:["QR code for ",g.jsx(qo,{href:t,children:t})]}),g.jsxs(Co,{children:[g.jsxs(br,{children:[g.jsxs(Hr,{className:"d-grid col-md-6",children:[g.jsxs("label",{children:["Size: ",o,"px"]}),g.jsx("input",{type:"range",className:"form-control-range",value:o,step:10,min:50,max:1e3,onChange:x=>a(Number(x.target.value))})]}),g.jsxs(Hr,{className:"d-grid col-md-6",children:[g.jsxs("label",{htmlFor:"marginControl",children:["Margin: ",s,"px"]}),g.jsx("input",{id:"marginControl",type:"range",className:"form-control-range",value:s,step:1,min:0,max:100,onChange:x=>l(Number(x.target.value))})]}),g.jsx(Hr,{className:"d-grid col-md-6",children:g.jsx(Fge,{format:c,setFormat:d})}),g.jsx(Hr,{className:"col-md-6",children:g.jsx(Ige,{errorCorrection:f,setErrorCorrection:p})})]}),g.jsxs("div",{className:"text-center",children:[g.jsxs("div",{className:"mb-3",children:[g.jsx(qo,{href:m}),g.jsx(iF,{text:m})]}),g.jsx("img",{src:m,className:"qr-code-modal__img",alt:"QR code"}),g.jsx("div",{className:"mt-3",children:g.jsxs(_t,{block:!0,color:"primary",onClick:()=>{e.saveImage(m,`${n}-qr-code.${c}`).catch(()=>{})},children:["Download ",g.jsx(De,{icon:k4,className:"ms-1"})]})})]})]})]})},fy=({date:e,format:t=HT,relative:n=!1})=>{const r=WT(e)?e:oa(e);return g.jsx("time",{dateTime:`${Ghe(r)}000`,children:n?`${Bhe(ps(),r)} ago`:Lu(r,t)})},Uge=e=>{const{meta:t,visitsCount:n,visitsSummary:r}=e,{maxVisits:i,validSince:o,validUntil:a}=t,s=(r==null?void 0:r.total)??n;return i&&s>=i?{icon:UY,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":"","."]})}:a&&vi(Vi(a),ps())?{icon:pP,className:"text-danger",description:g.jsxs(g.Fragment,{children:["This short URL cannot be visited since ",g.jsx("b",{className:"indivisible",children:cy(Vi(a))}),"."]})}:o&&vi(ps(),Vi(o))?{icon:pP,className:"text-warning",description:g.jsxs(g.Fragment,{children:["This short URL will start working on ",g.jsx("b",{className:"indivisible",children:cy(Vi(o))}),"."]})}:{icon:Qf,className:"text-primary",description:"This short URL can be visited normally."}},Bge=({shortUrl:e})=>{const t=ws(),{icon:n,className:r,description:i}=Uge(e);return g.jsxs(g.Fragment,{children:[g.jsx("span",{style:{cursor:i?"help":void 0},ref:t,children:g.jsx(De,{icon:n,className:r})}),g.jsx(Fr,{target:t,placement:"bottom",children:i})]})};var oF={exports:{}};/*! + 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;i{const i=n?`?domain=${n}`:"";return`${e}/short-code/${gfe(t)}/${r}${i}`},_2=({shortUrl:e,suffix:t,asLink:n,children:r,...i})=>{const o=zl();return!n||!e?g.jsx("span",{...i,children:r}):g.jsx(Ut,{to:Vge(o,e,t),...i,children:r})},aF=({visitsCount:e,shortUrl:t,active:n=!1,asLink:r=!1})=>{const{maxVisits:i,validSince:o,validUntil:a}=(t==null?void 0:t.meta)??{},s=!!i||!!o||!!a,l=g.jsx(_2,{shortUrl:t,suffix:"visits",asLink:r,children:g.jsx("strong",{className:rt("short-url-visits-count__amount",{"short-url-visits-count__amount--big":n}),children:Tn(e)})});if(!s)return l;const c=ws();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:[" / ",Tn(i)]}),g.jsx("sup",{className:"ms-1",children:g.jsx(De,{icon:cE})})]})]}),g.jsx(Fr,{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:Tn(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:cy(Vi(o))}),"."]}),a&&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:cy(Vi(a))}),"."]})]})})]})},QT=({text:e,children:t,clearable:n,className:r="",colorGenerator:i,onClick:o,onClose:a})=>g.jsxs("span",{className:rt("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:a,children:"×"})]}),Hge=({tags:e,onTagClick:t,colorGenerator:n})=>ai(e)?g.jsx("i",{className:"indivisible",children:g.jsx("small",{children:"No tags"})}):g.jsx(g.Fragment,{children:e.map(r=>g.jsx(QT,{text:r,colorGenerator:n,onClick:()=>t==null?void 0:t(r)},r))}),Wge=(e,t,n)=>({shortUrl:r,onTagClick:i})=>{var o,a,s,l;const[c,d]=n(),[f,p]=n(!1,500),m=F.useRef(!0),[{excludeBots:v}]=M0(),y=Hl("visits"),x=v??(y==null?void 0:y.excludeBots);return F.useEffect(()=>{!m.current&&p(),m.current=!1},[(o=r.visitsSummary)==null?void 0:o.total,(a=r.visitsSummary)==null?void 0:a.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(fy,{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(qo,{href:r.shortUrl})}),g.jsx(iF,{text:r.shortUrl,onCopy:d}),g.jsx("span",{className:"badge bg-warning text-black short-urls-row__copy-hint",hidden:!c,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(qo,{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(qo,{href:r.longUrl})}),g.jsx("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Tags",children:g.jsx(Hge,{tags:r.tags,colorGenerator:t,onTagClick:i})}),g.jsx("td",{className:"responsive-table__cell short-urls-row__cell text-lg-end","data-th":"Visits",children:g.jsx(aF,{visitsCount:(x?(s=r.visitsSummary)==null?void 0:s.nonBots:(l=r.visitsSummary)==null?void 0:l.total)??r.visitsCount,shortUrl:r,active:f,asLink:!0})}),g.jsx("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Status",children:g.jsx(Bge,{shortUrl:r})}),g.jsx("td",{className:"responsive-table__cell short-urls-row__cell text-end",children:g.jsx(e,{shortUrl:r})})]})},Yge=(e,t)=>({shortUrl:n})=>{const[r,,i,o]=_n(),[a,,s,l]=_n();return g.jsxs(m0,{minWidth:190,children:[g.jsxs(Ue,{tag:_2,shortUrl:n,suffix:"visits",asLink:!0,children:[g.jsx(De,{icon:lE,fixedWidth:!0})," Visit stats"]}),g.jsxs(Ue,{tag:_2,shortUrl:n,suffix:"edit",asLink:!0,children:[g.jsx(De,{icon:sE,fixedWidth:!0})," Edit short URL"]}),g.jsxs(Ue,{onClick:i,children:[g.jsx(De,{icon:FY,fixedWidth:!0})," QR code"]}),g.jsx(t,{shortUrl:n,isOpen:r,toggle:o}),g.jsx(Ue,{divider:!0}),g.jsxs(Ue,{className:"dropdown-item--danger",onClick:s,children:[g.jsx(De,{icon:aE,fixedWidth:!0})," Delete short URL"]}),g.jsx(e,{shortUrl:n,isOpen:a,toggle:l})]})},sF="shlink/shortUrlCreation",M3={saving:!1,saved:!1,error:!1},Gge=e=>Ir(`${sF}/createShortUrl`,t=>e().createShortUrl(t)),qge=e=>{const{reducer:t,actions:n}=fr({name:sF,initialState:M3,reducers:{resetCreateShortUrl:()=>M3},extraReducers:i=>{i.addCase(e.pending,()=>({saving:!0,saved:!1,error:!1})),i.addCase(e.rejected,(o,{error:a})=>({saving:!1,saved:!1,error:!0,errorData:ga(a)})),i.addCase(e.fulfilled,(o,{payload:a})=>({result:a,saving:!1,saved:!0,error:!1}))}}),{resetCreateShortUrl:r}=n;return{reducer:t,resetCreateShortUrl:r}},A3="shlink/shortUrlDetail",N3={loading:!1,error:!1},Kge=e=>{const t=Ir(`${A3}/getShortUrlDetail`,async({shortCode:r,domain:i},{getState:o})=>{var a;const{shortUrlsList:s}=o();return((a=s==null?void 0:s.shortUrls)==null?void 0:a.data.find(l=>Sf(l,r,i)))??await e().getShortUrl(r,i)}),{reducer:n}=fr({name:A3,initialState:N3,reducers:{},extraReducers:r=>{r.addCase(t.pending,()=>({loading:!0,error:!1})),r.addCase(t.rejected,(i,{error:o})=>({loading:!1,error:!0,errorData:ga(o)})),r.addCase(t.fulfilled,(i,{payload:o})=>({...N3,shortUrl:o}))}});return{reducer:n,getShortUrlDetail:t}},lF="shlink/shortUrlEdition",Zge={saving:!1,saved:!1,error:!1},Qge=e=>Ir(`${lF}/editShortUrl`,({shortCode:t,domain:n,data:r})=>e().updateShortUrl(t,n,r)),Xge=e=>fr({name:lF,initialState:Zge,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:ga(r)})),t.addCase(e.fulfilled,(n,{payload:r})=>({shortUrl:r,saving:!1,error:!1,saved:!0}))}}),Jge=({icon:e,className:t,...n})=>{const r=ws(),i=rt("icon-input-container__input",t);return g.jsxs("div",{className:"icon-input-container",children:[g.jsx(yu,{className:i,innerRef:r,...n}),g.jsx(De,{icon:e,fixedWidth:!0,className:"icon-input-container__icon",onClick:()=>{var o;return(o=r.current)==null?void 0:o.focus()}})]})};function eve(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,b2(e,t)}function b2(e,t){return b2=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},b2(e,t)}function tve(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 R3(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nve(e,t,n){return e===t?!0:e.correspondingElement?e.correspondingElement.classList.contains(n):e.classList.contains(n)}function rve(e,t,n){if(e===t)return!0;for(;e.parentNode||e.host;){if(e.parentNode&&nve(e,t,n))return!0;e=e.parentNode||e.host}return e}function ive(e){return document.documentElement.clientWidth<=e.clientX||document.documentElement.clientHeight<=e.clientY}var ove=function(){if(!(typeof window>"u"||typeof window.addEventListener!="function")){var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}}),n=function(){};return window.addEventListener("testPassiveEventSupport",n,t),window.removeEventListener("testPassiveEventSupport",n,t),e}};function ave(e){return e===void 0&&(e=0),function(){return++e}}var sve=ave(),w2,Um={},z1={},lve=["touchstart","touchmove"],cve="ignore-react-onclickoutside";function D3(e,t){var n={},r=lve.indexOf(t)!==-1;return r&&w2&&(n.passive=!e.props.preventDefault),n}function A0(e,t){var n,r,i=e.displayName||e.name||"Component";return r=n=function(o){eve(a,o);function a(l){var c;return c=o.call(this,l)||this,c.__outsideClickHandler=function(d){if(typeof c.__clickOutsideHandlerProp=="function"){c.__clickOutsideHandlerProp(d);return}var f=c.getInstance();if(typeof f.props.handleClickOutside=="function"){f.props.handleClickOutside(d);return}if(typeof f.handleClickOutside=="function"){f.handleClickOutside(d);return}throw new Error("WrappedComponent: "+i+" lacks a handleClickOutside(event) function for processing outside click events.")},c.__getComponentNode=function(){var d=c.getInstance();return t&&typeof t.setClickOutsideRef=="function"?t.setClickOutsideRef()(d):typeof d.setClickOutsideRef=="function"?d.setClickOutsideRef():Al.findDOMNode(d)},c.enableOnClickOutside=function(){if(!(typeof document>"u"||z1[c._uid])){typeof w2>"u"&&(w2=ove()),z1[c._uid]=!0;var d=c.props.eventTypes;d.forEach||(d=[d]),Um[c._uid]=function(f){if(c.componentNode!==null&&(c.props.preventDefault&&f.preventDefault(),c.props.stopPropagation&&f.stopPropagation(),!(c.props.excludeScrollbar&&ive(f)))){var p=f.composed&&f.composedPath&&f.composedPath().shift()||f.target;rve(p,c.componentNode,c.props.outsideClickIgnoreClass)===document&&c.__outsideClickHandler(f)}},d.forEach(function(f){document.addEventListener(f,Um[c._uid],D3(R3(c),f))})}},c.disableOnClickOutside=function(){delete z1[c._uid];var d=Um[c._uid];if(d&&typeof document<"u"){var f=c.props.eventTypes;f.forEach||(f=[f]),f.forEach(function(p){return document.removeEventListener(p,d,D3(R3(c),p))}),delete Um[c._uid]}},c.getRef=function(d){return c.instanceRef=d},c._uid=sve(),c}var s=a.prototype;return s.getInstance=function(){if(e.prototype&&!e.prototype.isReactComponent)return this;var l=this.instanceRef;return l.getInstance?l.getInstance():l},s.componentDidMount=function(){if(!(typeof document>"u"||!document.createElement)){var l=this.getInstance();if(t&&typeof t.handleClickOutside=="function"&&(this.__clickOutsideHandlerProp=t.handleClickOutside(l),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()}},s.componentDidUpdate=function(){this.componentNode=this.__getComponentNode()},s.componentWillUnmount=function(){this.disableOnClickOutside()},s.render=function(){var l=this.props;l.excludeScrollbar;var c=tve(l,["excludeScrollbar"]);return e.prototype&&e.prototype.isReactComponent?c.ref=this.getRef:c.wrappedRef=this.getRef,c.disableOnClickOutside=this.disableOnClickOutside,c.enableOnClickOutside=this.enableOnClickOutside,F.createElement(e,c)},a}(F.Component),n.displayName="OnClickOutside("+i+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:cve,preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},r}var cF=F.createContext(),uF=F.createContext();function uve(e){var t=e.children,n=F.useState(null),r=n[0],i=n[1],o=F.useRef(!1);F.useEffect(function(){return function(){o.current=!0}},[]);var a=F.useCallback(function(s){o.current||i(s)},[]);return F.createElement(cF.Provider,{value:r},F.createElement(uF.Provider,{value:a},t))}var dF=function(e){return Array.isArray(e)?e[0]:e},fF=function(e){if(typeof e=="function"){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r"u")return!1;var t=ti(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Sve(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];!xi(o)||!To(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function Eve(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]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,c){return l[c]="",l},{});!xi(i)||!To(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const Tve={name:"applyStyles",enabled:!0,phase:"write",fn:Sve,effect:Eve,requires:["computeStyles"]};function bo(e){return e.split("-")[0]}var hl=Math.max,hy=Math.min,Nu=Math.round;function S2(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function mF(){return!/^((?!chrome|android).)*safari/i.test(S2())}function Ru(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&xi(e)&&(i=e.offsetWidth>0&&Nu(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Nu(r.height)/e.offsetHeight||1);var a=kl(e)?ti(e):window,s=a.visualViewport,l=!mF()&&n,c=(r.left+(l&&s?s.offsetLeft:0))/i,d=(r.top+(l&&s?s.offsetTop:0))/o,f=r.width/i,p=r.height/o;return{width:f,height:p,top:d,right:c+f,bottom:d+p,left:c,x:c,y:d}}function eO(e){var t=Ru(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 gF(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&JT(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function aa(e){return ti(e).getComputedStyle(e)}function Ove(e){return["table","td","th"].indexOf(To(e))>=0}function Ts(e){return((kl(e)?e.ownerDocument:e.document)||window.document).documentElement}function N0(e){return To(e)==="html"?e:e.assignedSlot||e.parentNode||(JT(e)?e.host:null)||Ts(e)}function U3(e){return!xi(e)||aa(e).position==="fixed"?null:e.offsetParent}function Cve(e){var t=/firefox/i.test(S2()),n=/Trident/i.test(S2());if(n&&xi(e)){var r=aa(e);if(r.position==="fixed")return null}var i=N0(e);for(JT(i)&&(i=i.host);xi(i)&&["html","body"].indexOf(To(i))<0;){var o=aa(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 pp(e){for(var t=ti(e),n=U3(e);n&&Ove(n)&&aa(n).position==="static";)n=U3(n);return n&&(To(n)==="html"||To(n)==="body"&&aa(n).position==="static")?t:n||Cve(e)||t}function tO(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Of(e,t,n){return hl(e,hy(t,n))}function kve(e,t,n){var r=Of(e,t,n);return r>n?n:r}function vF(){return{top:0,right:0,bottom:0,left:0}}function yF(e){return Object.assign({},vF(),e)}function _F(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Pve=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,yF(typeof e!="number"?e:_F(e,hp))};function Lve(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=bo(n.placement),l=tO(s),c=[Dr,Pi].indexOf(s)>=0,d=c?"height":"width";if(!(!o||!a)){var f=Pve(i.padding,n),p=eO(o),m=l==="y"?Rr:Dr,v=l==="y"?ki:Pi,y=n.rects.reference[d]+n.rects.reference[l]-a[l]-n.rects.popper[d],x=a[l]-n.rects.reference[l],_=pp(o),w=_?l==="y"?_.clientHeight||0:_.clientWidth||0:0,S=y/2-x/2,E=f[m],C=w-p[d]-f[v],k=w/2-p[d]/2+S,j=Of(E,k,C),N=l;n.modifiersData[r]=(t={},t[N]=j,t.centerOffset=j-k,t)}}function jve(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)||gF(t.elements.popper,i)&&(t.elements.arrow=i))}const Mve={name:"arrow",enabled:!0,phase:"main",fn:Lve,effect:jve,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Du(e){return e.split("-")[1]}var Ave={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Nve(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:Nu(n*i)/i||0,y:Nu(r*i)/i||0}}function B3(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,f=e.isFixed,p=a.x,m=p===void 0?0:p,v=a.y,y=v===void 0?0:v,x=typeof d=="function"?d({x:m,y}):{x:m,y};m=x.x,y=x.y;var _=a.hasOwnProperty("x"),w=a.hasOwnProperty("y"),S=Dr,E=Rr,C=window;if(c){var k=pp(n),j="clientHeight",N="clientWidth";if(k===ti(n)&&(k=Ts(n),aa(k).position!=="static"&&s==="absolute"&&(j="scrollHeight",N="scrollWidth")),k=k,i===Rr||(i===Dr||i===Pi)&&o===Oh){E=ki;var U=f&&k===C&&C.visualViewport?C.visualViewport.height:k[j];y-=U-r.height,y*=l?1:-1}if(i===Dr||(i===Rr||i===ki)&&o===Oh){S=Pi;var R=f&&k===C&&C.visualViewport?C.visualViewport.width:k[N];m-=R-r.width,m*=l?1:-1}}var V=Object.assign({position:s},c&&Ave),Y=d===!0?Nve({x:m,y},ti(n)):{x:m,y};if(m=Y.x,y=Y.y,l){var X;return Object.assign({},V,(X={},X[E]=w?"0":"",X[S]=_?"0":"",X.transform=(C.devicePixelRatio||1)<=1?"translate("+m+"px, "+y+"px)":"translate3d("+m+"px, "+y+"px, 0)",X))}return Object.assign({},V,(t={},t[E]=w?y+"px":"",t[S]=_?m+"px":"",t.transform="",t))}function Rve(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,c={placement:bo(t.placement),variation:Du(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,B3(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,B3(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 Dve={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Rve,data:{}};var Bm={passive:!0};function Ive(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=ti(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(d){d.addEventListener("scroll",n.update,Bm)}),s&&l.addEventListener("resize",n.update,Bm),function(){o&&c.forEach(function(d){d.removeEventListener("scroll",n.update,Bm)}),s&&l.removeEventListener("resize",n.update,Bm)}}const Fve={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Ive,data:{}};var $ve={left:"right",right:"left",bottom:"top",top:"bottom"};function Cg(e){return e.replace(/left|right|bottom|top/g,function(t){return $ve[t]})}var Uve={start:"end",end:"start"};function z3(e){return e.replace(/start|end/g,function(t){return Uve[t]})}function nO(e){var t=ti(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function rO(e){return Ru(Ts(e)).left+nO(e).scrollLeft}function Bve(e,t){var n=ti(e),r=Ts(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var c=mF();(c||!c&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+rO(e),y:l}}function zve(e){var t,n=Ts(e),r=nO(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=hl(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=hl(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+rO(e),l=-r.scrollTop;return aa(i||n).direction==="rtl"&&(s+=hl(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function iO(e){var t=aa(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function bF(e){return["html","body","#document"].indexOf(To(e))>=0?e.ownerDocument.body:xi(e)&&iO(e)?e:bF(N0(e))}function Cf(e,t){var n;t===void 0&&(t=[]);var r=bF(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=ti(r),a=i?[o].concat(o.visualViewport||[],iO(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(Cf(N0(a)))}function E2(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Vve(e,t){var n=Ru(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 V3(e,t,n){return t===hF?E2(Bve(e,n)):kl(t)?Vve(t,n):E2(zve(Ts(e)))}function Hve(e){var t=Cf(N0(e)),n=["absolute","fixed"].indexOf(aa(e).position)>=0,r=n&&xi(e)?pp(e):e;return kl(r)?t.filter(function(i){return kl(i)&&gF(i,r)&&To(i)!=="body"}):[]}function Wve(e,t,n,r){var i=t==="clippingParents"?Hve(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,c){var d=V3(e,c,r);return l.top=hl(d.top,l.top),l.right=hy(d.right,l.right),l.bottom=hy(d.bottom,l.bottom),l.left=hl(d.left,l.left),l},V3(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function wF(e){var t=e.reference,n=e.element,r=e.placement,i=r?bo(r):null,o=r?Du(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Rr:l={x:a,y:t.y-n.height};break;case ki:l={x:a,y:t.y+t.height};break;case Pi:l={x:t.x+t.width,y:s};break;case Dr:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var c=i?tO(i):null;if(c!=null){var d=c==="y"?"height":"width";switch(o){case Au:l[c]=l[c]-(t[d]/2-n[d]/2);break;case Oh:l[c]=l[c]+(t[d]/2-n[d]/2);break}}return l}function Ch(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?dve:s,c=n.rootBoundary,d=c===void 0?hF:c,f=n.elementContext,p=f===void 0?Md:f,m=n.altBoundary,v=m===void 0?!1:m,y=n.padding,x=y===void 0?0:y,_=yF(typeof x!="number"?x:_F(x,hp)),w=p===Md?fve:Md,S=e.rects.popper,E=e.elements[v?w:p],C=Wve(kl(E)?E:E.contextElement||Ts(e.elements.popper),l,d,a),k=Ru(e.elements.reference),j=wF({reference:k,element:S,strategy:"absolute",placement:i}),N=E2(Object.assign({},S,j)),U=p===Md?N:k,R={top:C.top-U.top+_.top,bottom:U.bottom-C.bottom+_.bottom,left:C.left-U.left+_.left,right:U.right-C.right+_.right},V=e.modifiersData.offset;if(p===Md&&V){var Y=V[i];Object.keys(R).forEach(function(X){var G=[Pi,ki].indexOf(X)>=0?1:-1,Z=[Rr,ki].indexOf(X)>=0?"y":"x";R[X]+=Y[Z]*G})}return R}function Yve(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?pF:l,d=Du(r),f=d?s?$3:$3.filter(function(v){return Du(v)===d}):hp,p=f.filter(function(v){return c.indexOf(v)>=0});p.length===0&&(p=f);var m=p.reduce(function(v,y){return v[y]=Ch(e,{placement:y,boundary:i,rootBoundary:o,padding:a})[bo(y)],v},{});return Object.keys(m).sort(function(v,y){return m[v]-m[y]})}function Gve(e){if(bo(e)===XT)return[];var t=Cg(e);return[z3(e),t,z3(t)]}function qve(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,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,c=n.padding,d=n.boundary,f=n.rootBoundary,p=n.altBoundary,m=n.flipVariations,v=m===void 0?!0:m,y=n.allowedAutoPlacements,x=t.options.placement,_=bo(x),w=_===x,S=l||(w||!v?[Cg(x)]:Gve(x)),E=[x].concat(S).reduce(function(K,re){return K.concat(bo(re)===XT?Yve(t,{placement:re,boundary:d,rootBoundary:f,padding:c,flipVariations:v,allowedAutoPlacements:y}):re)},[]),C=t.rects.reference,k=t.rects.popper,j=new Map,N=!0,U=E[0],R=0;R=0,Z=G?"width":"height",te=Ch(t,{placement:V,boundary:d,rootBoundary:f,altBoundary:p,padding:c}),le=G?X?Pi:Dr:X?ki:Rr;C[Z]>k[Z]&&(le=Cg(le));var q=Cg(le),I=[];if(o&&I.push(te[Y]<=0),s&&I.push(te[le]<=0,te[q]<=0),I.every(function(K){return K})){U=V,N=!1;break}j.set(V,I)}if(N)for(var D=v?3:1,H=function(K){var re=E.find(function(ae){var he=j.get(ae);if(he)return he.slice(0,K).every(function(O){return O})});if(re)return U=re,"break"},ie=D;ie>0;ie--){var z=H(ie);if(z==="break")break}t.placement!==U&&(t.modifiersData[r]._skip=!0,t.placement=U,t.reset=!0)}}const Kve={name:"flip",enabled:!0,phase:"main",fn:qve,requiresIfExists:["offset"],data:{_skip:!1}};function H3(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 W3(e){return[Rr,Pi,ki,Dr].some(function(t){return e[t]>=0})}function Zve(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Ch(t,{elementContext:"reference"}),s=Ch(t,{altBoundary:!0}),l=H3(a,r),c=H3(s,i,o),d=W3(l),f=W3(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":f})}const Qve={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Zve};function Xve(e,t,n){var r=bo(e),i=[Dr,Rr].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Dr,Pi].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function Jve(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=pF.reduce(function(d,f){return d[f]=Xve(f,t.rects,o),d},{}),s=a[t.placement],l=s.x,c=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}const eye={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Jve};function tye(e){var t=e.state,n=e.name;t.modifiersData[n]=wF({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const nye={name:"popperOffsets",enabled:!0,phase:"read",fn:tye,data:{}};function rye(e){return e==="x"?"y":"x"}function iye(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,c=n.rootBoundary,d=n.altBoundary,f=n.padding,p=n.tether,m=p===void 0?!0:p,v=n.tetherOffset,y=v===void 0?0:v,x=Ch(t,{boundary:l,rootBoundary:c,padding:f,altBoundary:d}),_=bo(t.placement),w=Du(t.placement),S=!w,E=tO(_),C=rye(E),k=t.modifiersData.popperOffsets,j=t.rects.reference,N=t.rects.popper,U=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,R=typeof U=="number"?{mainAxis:U,altAxis:U}:Object.assign({mainAxis:0,altAxis:0},U),V=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,Y={x:0,y:0};if(k){if(o){var X,G=E==="y"?Rr:Dr,Z=E==="y"?ki:Pi,te=E==="y"?"height":"width",le=k[E],q=le+x[G],I=le-x[Z],D=m?-N[te]/2:0,H=w===Au?j[te]:N[te],ie=w===Au?-N[te]:-j[te],z=t.elements.arrow,K=m&&z?eO(z):{width:0,height:0},re=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:vF(),ae=re[G],he=re[Z],O=Of(0,j[te],K[te]),M=S?j[te]/2-D-O-ae-R.mainAxis:H-O-ae-R.mainAxis,$=S?-j[te]/2+D+O+he+R.mainAxis:ie+O+he+R.mainAxis,ee=t.elements.arrow&&pp(t.elements.arrow),J=ee?E==="y"?ee.clientTop||0:ee.clientLeft||0:0,se=(X=V==null?void 0:V[E])!=null?X:0,ge=le+M-se-J,Me=le+$-se,ue=Of(m?hy(q,ge):q,le,m?hl(I,Me):I);k[E]=ue,Y[E]=ue-le}if(s){var me,_e=E==="x"?Rr:Dr,Se=E==="x"?ki:Pi,ke=k[C],Ce=C==="y"?"height":"width",je=ke+x[_e],ce=ke-x[Se],fe=[Rr,Dr].indexOf(_)!==-1,ye=(me=V==null?void 0:V[C])!=null?me:0,ve=fe?je:ke-j[Ce]-N[Ce]-ye+R.altAxis,xe=fe?ke+j[Ce]+N[Ce]-ye-R.altAxis:ce,Pe=m&&fe?kve(ve,ke,xe):Of(m?ve:je,ke,m?xe:ce);k[C]=Pe,Y[C]=Pe-ke}t.modifiersData[r]=Y}}const oye={name:"preventOverflow",enabled:!0,phase:"main",fn:iye,requiresIfExists:["offset"]};function aye(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function sye(e){return e===ti(e)||!xi(e)?nO(e):aye(e)}function lye(e){var t=e.getBoundingClientRect(),n=Nu(t.width)/e.offsetWidth||1,r=Nu(t.height)/e.offsetHeight||1;return n!==1||r!==1}function cye(e,t,n){n===void 0&&(n=!1);var r=xi(t),i=xi(t)&&lye(t),o=Ts(t),a=Ru(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((To(t)!=="body"||iO(o))&&(s=sye(t)),xi(t)?(l=Ru(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=rO(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function uye(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 a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function dye(e){var t=uye(e);return xve.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function fye(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function hye(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 Y3={placement:"bottom",modifiers:[],strategy:"absolute"};function G3(){for(var e=arguments.length,t=new Array(e),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}}();return function(){var n,r=py(e);if(t){var i=py(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(o,a){if(a&&(typeof a=="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ne(o)}(this,n)}}function C2(e){return function(t){if(Array.isArray(t))return V1(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 V1(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 V1(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 V1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate,i=t.excludeDates,o=t.excludeDateIntervals,a=t.includeDates,s=t.includeDateIntervals,l=t.filterDate;return D0(e,{minDate:n,maxDate:r})||i&&i.some(function(c){return _r(e,c)})||o&&o.some(function(c){var d=c.start,f=c.end;return ju(e,{start:d,end:f})})||a&&!a.some(function(c){return _r(e,c)})||s&&!s.some(function(c){var d=c.start,f=c.end;return ju(e,{start:d,end:f})})||l&&!l(Ot(e))||!1}function sO(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,a=i.end;return ju(e,{start:o,end:a})}):n&&n.some(function(i){return _r(e,i)})||!1}function EF(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate,i=t.excludeDates,o=t.includeDates,a=t.filterDate;return D0(e,{minDate:w8(n),maxDate:b8(r)})||i&&i.some(function(s){return $i(e,s)})||o&&!o.some(function(s){return $i(e,s)})||a&&!a(Ot(e))||!1}function H1(e,t,n,r){var i=Je(e),o=sr(e),a=Je(t),s=sr(t),l=Je(r);return i===a&&i===l?o<=n&&n<=s:i=n||li:void 0}function Rye(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate,i=t.excludeDates,o=t.includeDates,a=t.filterDate;return D0(e,{minDate:n,maxDate:r})||i&&i.some(function(s){return my(e,s)})||o&&!o.some(function(s){return my(e,s)})||a&&!a(Ot(e))||!1}function W1(e,t,n){if(!ry(t)||!ry(n))return!1;var r=Je(t),i=Je(n);return r<=e&&i>=e}function TF(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate,i=t.excludeDates,o=t.includeDates,a=t.filterDate,s=new Date(e,0,1);return D0(s,{minDate:x8(n),maxDate:Mfe(r)})||i&&i.some(function(l){return Ha(s,l)})||o&&!o.some(function(l){return Ha(s,l)})||a&&!a(Ot(s))||!1}function Y1(e,t,n,r){var i=Je(e),o=Ic(e),a=Je(t),s=Ic(t),l=Je(r);return i===a&&i===l?o<=n&&n<=s:i=n||li:void 0}function D0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate;return n&&Sh(e,n)<0||r&&Sh(e,r)>0}function nA(e,t){return t.some(function(n){return Wr(n)===Wr(e)&&Yr(n)===Yr(e)})}function rA(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.excludeTimes,r=t.includeTimes,i=t.filterTime;return n&&nA(e,n)||r&&!nA(e,r)||i&&!i(e)||!1}function iA(e,t){var n=t.minTime,r=t.maxTime;if(!n||!r)throw new Error("Both minTime and maxTime props required");var i,o=Ot(),a=Ef(Tf(o,Yr(e)),Wr(e)),s=Ef(Tf(o,Yr(n)),Wr(n)),l=Ef(Tf(o,Yr(r)),Wr(r));try{i=!ju(a,{start:s,end:l})}catch{i=!1}return i}function oA(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.includeDates,i=Mu(e,1);return n&&Eh(n,i)>0||r&&r.every(function(o){return Eh(o,i)>0})||!1}function aA(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.maxDate,r=t.includeDates,i=Ci(e,1);return n&&Eh(i,n)>0||r&&r.every(function(o){return Eh(i,o)>0})||!1}function sA(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.includeDates,i=Th(e,1);return n&&iy(n,i)>0||r&&r.every(function(o){return iy(o,i)>0})||!1}function lA(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.maxDate,r=t.includeDates,i=ku(e,1);return n&&iy(i,n)>0||r&&r.every(function(o){return iy(i,o)>0})||!1}function OF(e){var t=e.minDate,n=e.includeDates;if(n&&t){var r=n.filter(function(i){return Sh(i,t)>=0});return n3(r)}return n?n3(n):t}function CF(e){var t=e.maxDate,n=e.includeDates;if(n&&t){var r=n.filter(function(i){return Sh(i,t)<=0});return t3(r)}return n?t3(n):t}function cA(){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]:kf,n=Math.ceil(Je(e)/t)*t;return{startPeriod:n-(t-1),endPeriod:n}}function Iye(e,t,n,r){for(var i=[],o=0;o<2*t+1;o++){var a=e+t-o,s=!0;n&&(s=Je(n)<=a),r&&s&&(s=Je(r)>=a),s&&i.push(a)}return i}var Fye=A0(function(e){Bn(n,W.Component);var t=zn(n);function n(r){var i;$n(this,n),Q(ne(i=t.call(this,r)),"renderOptions",function(){var l=i.props.year,c=i.state.yearsList.map(function(p){return W.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(ne(i),p),"aria-selected":l===p?"true":void 0},l===p?W.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",p)}),d=i.props.minDate?Je(i.props.minDate):null,f=i.props.maxDate?Je(i.props.maxDate):null;return f&&i.state.yearsList.find(function(p){return p===f})||c.unshift(W.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:i.incrementYears},W.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),d&&i.state.yearsList.find(function(p){return p===d})||c.push(W.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:i.decrementYears},W.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),c}),Q(ne(i),"onChange",function(l){i.props.onChange(l)}),Q(ne(i),"handleClickOutside",function(){i.props.onCancel()}),Q(ne(i),"shiftYears",function(l){var c=i.state.yearsList.map(function(d){return d+l});i.setState({yearsList:c})}),Q(ne(i),"incrementYears",function(){return i.shiftYears(1)}),Q(ne(i),"decrementYears",function(){return i.shiftYears(-1)});var o=r.yearDropdownItemNumber,a=r.scrollableYearDropdown,s=o||(a?10:5);return i.state={yearsList:Iye(i.props.year,s,i.props.minDate,i.props.maxDate)},i.dropdownRef=F.createRef(),i}return Un(n,[{key:"componentDidMount",value:function(){var r=this.dropdownRef.current;if(r){var i=r.children?Array.from(r.children):null,o=i?i.find(function(a){return a.ariaSelected}):null;r.scrollTop=o?o.offsetTop+(o.clientHeight-r.clientHeight)/2:(r.scrollHeight-r.clientHeight)/2}}},{key:"render",value:function(){var r=rt({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return W.createElement("div",{className:r,ref:this.dropdownRef},this.renderOptions())}}]),n}()),$ye=function(e){Bn(n,W.Component);var t=zn(n);function n(){var r;$n(this,n);for(var i=arguments.length,o=new Array(i),a=0;a0&&arguments[0]!==void 0?arguments[0]:{},l=!1;r.getTabIndex()===0&&!s.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),r.props.monthShowsDuplicateDaysEnd&&r.isAfterMonth()&&(l=!1),r.props.monthShowsDuplicateDaysStart&&r.isBeforeMonth()&&(l=!1)),l&&r.dayEl.current.focus({preventScroll:!0})}),Q(ne(r),"renderDayContents",function(){return r.props.monthShowsDuplicateDaysEnd&&r.isAfterMonth()||r.props.monthShowsDuplicateDaysStart&&r.isBeforeMonth()?null:r.props.renderDayContents?r.props.renderDayContents(c3(r.props.day),r.props.day):c3(r.props.day)}),Q(ne(r),"render",function(){return W.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.isInRange()},r.renderDayContents())}),r}return Un(n,[{key:"componentDidMount",value:function(){this.handleFocusDay()}},{key:"componentDidUpdate",value:function(r){this.handleFocusDay(r)}}]),n}(),Yye=function(e){Bn(n,W.Component);var t=zn(n);function n(){var r;$n(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=6,m=!l&&!r.isWeekInMonth(f);if(p||m){if(!r.props.peekNextMonth)break;d=!0}}return s}),Q(ne(r),"onMonthClick",function(s,l){r.handleDayClick(rs(yr(r.props.day,l)),s)}),Q(ne(r),"onMonthMouseEnter",function(s){r.handleDayMouseEnter(rs(yr(r.props.day,s)))}),Q(ne(r),"handleMonthNavigation",function(s,l){r.isDisabled(l)||r.isExcluded(l)||(r.props.setPreSelection(l),r.MONTH_REFS[s].current&&r.MONTH_REFS[s].current.focus())}),Q(ne(r),"onMonthKeyDown",function(s,l){var c=r.props,d=c.selected,f=c.preSelection,p=c.disabledKeyboardNavigation,m=c.showTwoColumnMonthYearPicker,v=c.showFourColumnMonthYearPicker,y=c.setPreSelection,x=s.key;if(x!=="Tab"&&s.preventDefault(),!p){var _=dA(v,m),w=G1[_].verticalNavigationOffset,S=G1[_].grid;switch(x){case"Enter":r.onMonthClick(s,l),y(d);break;case"ArrowRight":r.handleMonthNavigation(l===11?0:l+1,Ci(f,1));break;case"ArrowLeft":r.handleMonthNavigation(l===0?11:l-1,Mu(f,1));break;case"ArrowUp":r.handleMonthNavigation(S[0].includes(l)?l+12-w:l-w,Mu(f,w));break;case"ArrowDown":r.handleMonthNavigation(S[S.length-1].includes(l)?l-12+w:l+w,Ci(f,w))}}}),Q(ne(r),"onQuarterClick",function(s,l){r.handleDayClick(eA(hc(r.props.day,l)),s)}),Q(ne(r),"onQuarterMouseEnter",function(s){r.handleDayMouseEnter(eA(hc(r.props.day,s)))}),Q(ne(r),"handleQuarterNavigation",function(s,l){r.isDisabled(l)||r.isExcluded(l)||(r.props.setPreSelection(l),r.QUARTER_REFS[s-1].current&&r.QUARTER_REFS[s-1].current.focus())}),Q(ne(r),"onQuarterKeyDown",function(s,l){var c=s.key;if(!r.props.disabledKeyboardNavigation)switch(c){case"Enter":r.onQuarterClick(s,l),r.props.setPreSelection(r.props.selected);break;case"ArrowRight":r.handleQuarterNavigation(l===4?1:l+1,y8(r.props.preSelection,1));break;case"ArrowLeft":r.handleQuarterNavigation(l===1?4:l-1,dme(r.props.preSelection,1))}}),Q(ne(r),"getMonthClassNames",function(s){var l=r.props,c=l.day,d=l.startDate,f=l.endDate,p=l.selected,m=l.minDate,v=l.maxDate,y=l.preSelection,x=l.monthClassName,_=l.excludeDates,w=l.includeDates,S=x?x(yr(c,s)):void 0,E=yr(c,s);return rt("react-datepicker__month-text","react-datepicker__month-".concat(s),S,{"react-datepicker__month-text--disabled":(m||v||_||w)&&EF(E,r.props),"react-datepicker__month-text--selected":r.isSelectedMonth(c,s,p),"react-datepicker__month-text--keyboard-selected":!r.props.disabledKeyboardNavigation&&sr(y)===s,"react-datepicker__month-text--in-selecting-range":r.isInSelectingRangeMonth(s),"react-datepicker__month-text--in-range":H1(d,f,s,c),"react-datepicker__month-text--range-start":r.isRangeStartMonth(s),"react-datepicker__month-text--range-end":r.isRangeEndMonth(s),"react-datepicker__month-text--selecting-range-start":r.isSelectingMonthRangeStart(s),"react-datepicker__month-text--selecting-range-end":r.isSelectingMonthRangeEnd(s),"react-datepicker__month-text--today":r.isCurrentMonth(c,s)})}),Q(ne(r),"getTabIndex",function(s){var l=sr(r.props.preSelection);return r.props.disabledKeyboardNavigation||s!==l?"-1":"0"}),Q(ne(r),"getQuarterTabIndex",function(s){var l=Ic(r.props.preSelection);return r.props.disabledKeyboardNavigation||s!==l?"-1":"0"}),Q(ne(r),"getAriaLabel",function(s){var l=r.props,c=l.chooseDayAriaLabelPrefix,d=c===void 0?"Choose":c,f=l.disabledDayAriaLabelPrefix,p=f===void 0?"Not available":f,m=l.day,v=yr(m,s),y=r.isDisabled(v)||r.isExcluded(v)?p:d;return"".concat(y," ").concat(fn(v,"MMMM yyyy"))}),Q(ne(r),"getQuarterClassNames",function(s){var l=r.props,c=l.day,d=l.startDate,f=l.endDate,p=l.selected,m=l.minDate,v=l.maxDate,y=l.preSelection;return rt("react-datepicker__quarter-text","react-datepicker__quarter-".concat(s),{"react-datepicker__quarter-text--disabled":(m||v)&&Rye(hc(c,s),r.props),"react-datepicker__quarter-text--selected":r.isSelectedQuarter(c,s,p),"react-datepicker__quarter-text--keyboard-selected":Ic(y)===s,"react-datepicker__quarter-text--in-selecting-range":r.isInSelectingRangeQuarter(s),"react-datepicker__quarter-text--in-range":Y1(d,f,s,c),"react-datepicker__quarter-text--range-start":r.isRangeStartQuarter(s),"react-datepicker__quarter-text--range-end":r.isRangeEndQuarter(s)})}),Q(ne(r),"getMonthContent",function(s){var l=r.props,c=l.showFullMonthYearPicker,d=l.renderMonthContent,f=l.locale,p=SF(s,f),m=aO(s,f);return d?d(s,p,m):c?m:p}),Q(ne(r),"getQuarterContent",function(s){var l=r.props,c=l.renderQuarterContent,d=function(f,p){return fn(hc(Ot(),f),"QQQ",p)}(s,l.locale);return c?c(s,d):d}),Q(ne(r),"renderMonths",function(){var s=r.props,l=s.showTwoColumnMonthYearPicker,c=s.showFourColumnMonthYearPicker,d=s.day,f=s.selected;return G1[dA(c,l)].grid.map(function(p,m){return W.createElement("div",{className:"react-datepicker__month-wrapper",key:m},p.map(function(v,y){return W.createElement("div",{ref:r.MONTH_REFS[v],key:y,onClick:function(x){r.onMonthClick(x,v)},onKeyDown:function(x){r.onMonthKeyDown(x,v)},onMouseEnter:function(){return r.onMonthMouseEnter(v)},tabIndex:r.getTabIndex(v),className:r.getMonthClassNames(v),role:"option","aria-label":r.getAriaLabel(v),"aria-current":r.isCurrentMonth(d,v)?"date":void 0,"aria-selected":r.isSelectedMonth(d,v,f)},r.getMonthContent(v))}))})}),Q(ne(r),"renderQuarters",function(){var s=r.props,l=s.day,c=s.selected;return W.createElement("div",{className:"react-datepicker__quarter-wrapper"},[1,2,3,4].map(function(d,f){return W.createElement("div",{key:f,ref:r.QUARTER_REFS[f],role:"option",onClick:function(p){r.onQuarterClick(p,d)},onKeyDown:function(p){r.onQuarterKeyDown(p,d)},onMouseEnter:function(){return r.onQuarterMouseEnter(d)},className:r.getQuarterClassNames(d),"aria-selected":r.isSelectedQuarter(l,d,c),tabIndex:r.getQuarterTabIndex(d),"aria-current":r.isCurrentQuarter(l,d)?"date":void 0},r.getQuarterContent(d))}))}),Q(ne(r),"getClassNames",function(){var s=r.props,l=s.selectingDate,c=s.selectsStart,d=s.selectsEnd,f=s.showMonthYearPicker,p=s.showQuarterYearPicker;return rt("react-datepicker__month",{"react-datepicker__month--selecting-range":l&&(c||d)},{"react-datepicker__monthPicker":f},{"react-datepicker__quarterPicker":p})}),r}return Un(n,[{key:"render",value:function(){var r=this.props,i=r.showMonthYearPicker,o=r.showQuarterYearPicker,a=r.day,s=r.ariaLabelPrefix,l=s===void 0?"month ":s;return W.createElement("div",{className:this.getClassNames(),onMouseLeave:this.handleMouseLeave,"aria-label":"".concat(l," ").concat(fn(a,"yyyy-MM")),role:"listbox"},i?this.renderMonths():o?this.renderQuarters():this.renderWeeks())}}]),n}(),jF=function(e){Bn(n,W.Component);var t=zn(n);function n(){var r;$n(this,n);for(var i=arguments.length,o=new Array(i),a=0;a0&&arguments[0]!==void 0?arguments[0]:{}).className||"").split(/\s+/);return Xye.some(function(s){return a.indexOf(s)>=0})})(o.target)&&i.props.onDropdownFocus()}),Q(ne(i),"getDateInView",function(){var o=i.props,a=o.preSelection,s=o.selected,l=o.openToDate,c=OF(i.props),d=CF(i.props),f=Ot(),p=l||s||a;return p||(c&&vi(f,c)?c:d&&hs(f,d)?d:f)}),Q(ne(i),"increaseMonth",function(){i.setState(function(o){var a=o.date;return{date:Ci(a,1)}},function(){return i.handleMonthChange(i.state.date)})}),Q(ne(i),"decreaseMonth",function(){i.setState(function(o){var a=o.date;return{date:Mu(a,1)}},function(){return i.handleMonthChange(i.state.date)})}),Q(ne(i),"handleDayClick",function(o,a,s){i.props.onSelect(o,a,s),i.props.setPreSelection&&i.props.setPreSelection(o)}),Q(ne(i),"handleDayMouseEnter",function(o){i.setState({selectingDate:o}),i.props.onDayMouseEnter&&i.props.onDayMouseEnter(o)}),Q(ne(i),"handleMonthMouseLeave",function(){i.setState({selectingDate:null}),i.props.onMonthMouseLeave&&i.props.onMonthMouseLeave()}),Q(ne(i),"handleYearMouseEnter",function(o,a){i.setState({selectingDate:Uo(Ot(),a)}),i.props.onYearMouseEnter&&i.props.onYearMouseEnter(o,a)}),Q(ne(i),"handleYearMouseLeave",function(o,a){i.props.onYearMouseLeave&&i.props.onYearMouseLeave(o,a)}),Q(ne(i),"handleYearChange",function(o){i.props.onYearChange&&(i.props.onYearChange(o),i.setState({isRenderAriaLiveMessage:!0})),i.props.adjustDateOnChange&&(i.props.onSelect&&i.props.onSelect(o),i.props.setOpen&&i.props.setOpen(!0)),i.props.setPreSelection&&i.props.setPreSelection(o)}),Q(ne(i),"handleMonthChange",function(o){i.handleCustomMonthChange(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)}),Q(ne(i),"handleCustomMonthChange",function(o){i.props.onMonthChange&&(i.props.onMonthChange(o),i.setState({isRenderAriaLiveMessage:!0}))}),Q(ne(i),"handleMonthYearChange",function(o){i.handleYearChange(o),i.handleMonthChange(o)}),Q(ne(i),"changeYear",function(o){i.setState(function(a){var s=a.date;return{date:Uo(s,o)}},function(){return i.handleYearChange(i.state.date)})}),Q(ne(i),"changeMonth",function(o){i.setState(function(a){var s=a.date;return{date:yr(s,o)}},function(){return i.handleMonthChange(i.state.date)})}),Q(ne(i),"changeMonthYear",function(o){i.setState(function(a){var s=a.date;return{date:Uo(yr(s,sr(o)),Je(o))}},function(){return i.handleMonthYearChange(i.state.date)})}),Q(ne(i),"header",function(){var o=oO(arguments.length>0&&arguments[0]!==void 0?arguments[0]:i.state.date,i.props.locale,i.props.calendarStartDay),a=[];return i.props.showWeekNumbers&&a.push(W.createElement("div",{key:"W",className:"react-datepicker__day-name"},i.props.weekLabel||"#")),a.concat([0,1,2,3,4,5,6].map(function(s){var l=Vl(o,s),c=i.formatWeekday(l,i.props.locale),d=i.props.weekDayClassName?i.props.weekDayClassName(l):void 0;return W.createElement("div",{key:s,className:rt("react-datepicker__day-name",d)},c)}))}),Q(ne(i),"formatWeekday",function(o,a){return i.props.formatWeekDay?function(s,l,c){return l(fn(s,"EEEE",c))}(o,i.props.formatWeekDay,a):i.props.useWeekdaysShort?function(s,l){return fn(s,"EEE",l)}(o,a):function(s,l){return fn(s,"EEEEEE",l)}(o,a)}),Q(ne(i),"decreaseYear",function(){i.setState(function(o){var a=o.date;return{date:Th(a,i.props.showYearPicker?i.props.yearItemNumber:1)}},function(){return i.handleYearChange(i.state.date)})}),Q(ne(i),"clearSelectingDate",function(){i.setState({selectingDate:null})}),Q(ne(i),"renderPreviousButton",function(){if(!i.props.renderCustomHeader){var o;switch(!0){case i.props.showMonthYearPicker:o=sA(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,E=w.yearItemNumber,C=E===void 0?kf:E,k=Uc(Gd(Th(_,C)),C).endPeriod,j=S&&Je(S);return j&&j>k||!1}(i.state.date,i.props);break;default:o=oA(i.state.date,i.props)}if((i.props.forceShowMonthNavigation||i.props.showDisabledMonthNavigation||!o)&&!i.props.showTimeSelectOnly){var a=["react-datepicker__navigation","react-datepicker__navigation--previous"],s=i.decreaseMonth;(i.props.showMonthYearPicker||i.props.showQuarterYearPicker||i.props.showYearPicker)&&(s=i.decreaseYear),o&&i.props.showDisabledMonthNavigation&&(a.push("react-datepicker__navigation--previous--disabled"),s=null);var l=i.props.showMonthYearPicker||i.props.showQuarterYearPicker||i.props.showYearPicker,c=i.props,d=c.previousMonthButtonLabel,f=c.previousYearButtonLabel,p=i.props,m=p.previousMonthAriaLabel,v=m===void 0?typeof d=="string"?d:"Previous Month":m,y=p.previousYearAriaLabel,x=y===void 0?typeof f=="string"?f:"Previous Year":y;return W.createElement("button",{type:"button",className:a.join(" "),onClick:s,onKeyDown:i.props.handleOnKeyDown,"aria-label":l?x:v},W.createElement("span",{className:["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"].join(" ")},l?i.props.previousYearButtonLabel:i.props.previousMonthButtonLabel))}}}),Q(ne(i),"increaseYear",function(){i.setState(function(o){var a=o.date;return{date:ku(a,i.props.showYearPicker?i.props.yearItemNumber:1)}},function(){return i.handleYearChange(i.state.date)})}),Q(ne(i),"renderNextButton",function(){if(!i.props.renderCustomHeader){var o;switch(!0){case i.props.showMonthYearPicker:o=lA(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,E=w.yearItemNumber,C=E===void 0?kf:E,k=Uc(ku(_,C),C).startPeriod,j=S&&Je(S);return j&&j0&&arguments[0]!==void 0?arguments[0]:i.state.date,a=["react-datepicker__current-month"];return i.props.showYearDropdown&&a.push("react-datepicker__current-month--hasYearDropdown"),i.props.showMonthDropdown&&a.push("react-datepicker__current-month--hasMonthDropdown"),i.props.showMonthYearDropdown&&a.push("react-datepicker__current-month--hasMonthYearDropdown"),W.createElement("div",{className:a.join(" ")},fn(o,i.props.dateFormat,i.props.locale))}),Q(ne(i),"renderYearDropdown",function(){var o=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(i.props.showYearDropdown&&!o)return W.createElement($ye,{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:Je(i.state.date),scrollableYearDropdown:i.props.scrollableYearDropdown,yearDropdownItemNumber:i.props.yearDropdownItemNumber})}),Q(ne(i),"renderMonthDropdown",function(){var o=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(i.props.showMonthDropdown&&!o)return W.createElement(Bye,{dropdownMode:i.props.dropdownMode,locale:i.props.locale,onChange:i.changeMonth,month:sr(i.state.date),useShortMonthInDropdown:i.props.useShortMonthInDropdown})}),Q(ne(i),"renderMonthYearDropdown",function(){var o=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(i.props.showMonthYearDropdown&&!o)return W.createElement(Hye,{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})}),Q(ne(i),"handleTodayButtonClick",function(o){i.props.onSelect(tA(),o),i.props.setPreSelection&&i.props.setPreSelection(tA())}),Q(ne(i),"renderTodayButton",function(){if(i.props.todayButton&&!i.props.showTimeSelectOnly)return W.createElement("div",{className:"react-datepicker__today-button",onClick:function(o){return i.handleTodayButtonClick(o)}},i.props.todayButton)}),Q(ne(i),"renderDefaultHeader",function(o){var a=o.monthDate,s=o.i;return W.createElement("div",{className:"react-datepicker__header ".concat(i.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},i.renderCurrentMonth(a),W.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(i.props.dropdownMode),onFocus:i.handleDropdownFocus},i.renderMonthDropdown(s!==0),i.renderMonthYearDropdown(s!==0),i.renderYearDropdown(s!==0)),W.createElement("div",{className:"react-datepicker__day-names"},i.header(a)))}),Q(ne(i),"renderCustomHeader",function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=o.monthDate,s=o.i;if(i.props.showTimeSelect&&!i.state.monthContainer||i.props.showTimeSelectOnly)return null;var l=oA(i.state.date,i.props),c=aA(i.state.date,i.props),d=sA(i.state.date,i.props),f=lA(i.state.date,i.props),p=!i.props.showMonthYearPicker&&!i.props.showQuarterYearPicker&&!i.props.showYearPicker;return W.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:i.props.onDropdownFocus},i.props.renderCustomHeader(K3(K3({},i.state),{},{customHeaderCount:s,monthDate:a,changeMonth:i.changeMonth,changeYear:i.changeYear,decreaseMonth:i.decreaseMonth,increaseMonth:i.increaseMonth,decreaseYear:i.decreaseYear,increaseYear:i.increaseYear,prevMonthButtonDisabled:l,nextMonthButtonDisabled:c,prevYearButtonDisabled:d,nextYearButtonDisabled:f})),p&&W.createElement("div",{className:"react-datepicker__day-names"},i.header(a)))}),Q(ne(i),"renderYearHeader",function(){var o=i.state.date,a=i.props,s=a.showYearPicker,l=Uc(o,a.yearItemNumber),c=l.startPeriod,d=l.endPeriod;return W.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},s?"".concat(c," - ").concat(d):Je(o))}),Q(ne(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)}}),Q(ne(i),"renderMonths",function(){if(!i.props.showTimeSelectOnly&&!i.props.showYearPicker){for(var o=[],a=i.props.showPreviousMonths?i.props.monthsShown-1:0,s=Mu(i.state.date,a),l=0;l0;o.push(W.createElement("div",{key:f,ref:function(v){i.monthContainer=v},className:"react-datepicker__month-container"},i.renderHeader({monthDate:d,i:l}),W.createElement(qye,{chooseDayAriaLabelPrefix:i.props.chooseDayAriaLabelPrefix,disabledDayAriaLabelPrefix:i.props.disabledDayAriaLabelPrefix,weekAriaLabelPrefix:i.props.weekAriaLabelPrefix,ariaLabelPrefix:i.props.monthAriaLabelPrefix,onChange:i.changeMonthYear,day:d,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,renderMonthContent:i.props.renderMonthContent,renderQuarterContent:i.props.renderQuarterContent,renderYearContent:i.props.renderYearContent,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}}),Q(ne(i),"renderYears",function(){if(!i.props.showTimeSelectOnly)return i.props.showYearPicker?W.createElement("div",{className:"react-datepicker__year--container"},i.renderHeader(),W.createElement(Kye,kh({onDayClick:i.handleDayClick,selectingDate:i.state.selectingDate,clearSelectingDate:i.clearSelectingDate,date:i.state.date},i.props,{onYearMouseEnter:i.handleYearMouseEnter,onYearMouseLeave:i.handleYearMouseLeave}))):void 0}),Q(ne(i),"renderTimeSection",function(){if(i.props.showTimeSelect&&(i.state.monthContainer||i.props.showTimeSelectOnly))return W.createElement(jF,{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})}),Q(ne(i),"renderInputTimeSection",function(){var o=new Date(i.props.selected),a=La(o)&&i.props.selected?"".concat(uA(o.getHours()),":").concat(uA(o.getMinutes())):"";if(i.props.showTimeInput)return W.createElement(Zye,{date:o,timeString:a,timeInputLabel:i.props.timeInputLabel,onChange:i.props.onTimeChange,customTimeInput:i.props.customTimeInput})}),Q(ne(i),"renderAriaLiveRegion",function(){var o,a=Uc(i.state.date,i.props.yearItemNumber),s=a.startPeriod,l=a.endPeriod;return o=i.props.showYearPicker?"".concat(s," - ").concat(l):i.props.showMonthYearPicker||i.props.showQuarterYearPicker?Je(i.state.date):"".concat(aO(sr(i.state.date),i.props.locale)," ").concat(Je(i.state.date)),W.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},i.state.isRenderAriaLiveMessage&&o)}),Q(ne(i),"renderChildren",function(){if(i.props.children)return W.createElement("div",{className:"react-datepicker__children-container"},i.props.children)}),i.containerRef=W.createRef(),i.state={date:i.getDateInView(),selectingDate:null,monthContainer:null,isRenderAriaLiveMessage:!1},i}return Un(n,[{key:"componentDidMount",value:function(){var r=this;this.props.showTimeSelect&&(this.assignMonthContainer=void r.setState({monthContainer:r.monthContainer}))}},{key:"componentDidUpdate",value:function(r){var i=this;if(!this.props.preSelection||_r(this.props.preSelection,r.preSelection)&&this.props.monthSelectedIn===r.monthSelectedIn)this.props.openToDate&&!_r(this.props.openToDate,r.openToDate)&&this.setState({date:this.props.openToDate});else{var o=!$i(this.state.date,this.props.preSelection);this.setState({date:this.props.preSelection},function(){return o&&i.handleCustomMonthChange(i.state.date)})}}},{key:"render",value:function(){var r=this.props.container||Qye;return W.createElement("div",{ref:this.containerRef},W.createElement(r,{className:rt("react-datepicker",this.props.className,{"react-datepicker--time-only":this.props.showTimeSelectOnly}),showPopperArrow:this.props.showPopperArrow,arrowProps:this.props.arrowProps},this.renderAriaLiveRegion(),this.renderPreviousButton(),this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.renderChildren()))}}],[{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:kf}}}]),n}(),MF=function(e){Bn(n,W.Component);var t=zn(n);function n(r){var i;return $n(this,n),(i=t.call(this,r)).el=document.createElement("div"),i}return Un(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 il.createPortal(this.props.children,this.el)}}]),n}(),e0e=function(e){return!e.disabled&&e.tabIndex!==-1},AF=function(e){Bn(n,W.Component);var t=zn(n);function n(r){var i;return $n(this,n),Q(ne(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(e0e)}),Q(ne(i),"handleFocusStart",function(){var o=i.getTabChildren();o&&o.length>1&&o[o.length-1].focus()}),Q(ne(i),"handleFocusEnd",function(){var o=i.getTabChildren();o&&o.length>1&&o[0].focus()}),i.tabLoopRef=W.createRef(),i}return Un(n,[{key:"render",value:function(){return this.props.enableTabLoop?W.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},W.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:"0",onFocus:this.handleFocusStart}),this.props.children,W.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:"0",onFocus:this.handleFocusEnd})):this.props.children}}],[{key:"defaultProps",get:function(){return{enableTabLoop:!0}}}]),n}(),t0e=function(e){Bn(n,W.Component);var t=zn(n);function n(){return $n(this,n),t.apply(this,arguments)}return Un(n,[{key:"render",value:function(){var r,i=this.props,o=i.className,a=i.wrapperClassName,s=i.hidePopper,l=i.popperComponent,c=i.popperModifiers,d=i.popperPlacement,f=i.popperProps,p=i.targetComponent,m=i.enableTabLoop,v=i.popperOnKeyDown,y=i.portalId,x=i.portalHost;if(!s){var _=rt("react-datepicker-popper",o);r=W.createElement(kye,kh({modifiers:c,placement:d},f),function(S){var E=S.ref,C=S.style,k=S.placement,j=S.arrowProps;return W.createElement(AF,{enableTabLoop:m},W.createElement("div",{ref:E,style:C,className:_,"data-placement":k,onKeyDown:v},W.cloneElement(l,{arrowProps:j})))})}this.props.popperContainer&&(r=W.createElement(this.props.popperContainer,{},r)),y&&!s&&(r=W.createElement(MF,{portalId:y,portalHost:x},r));var w=rt("react-datepicker-wrapper",a);return W.createElement(uve,{className:"react-datepicker-manager"},W.createElement(Mye,null,function(S){var E=S.ref;return W.createElement("div",{ref:E,className:w},p)}),r)}}],[{key:"defaultProps",get:function(){return{hidePopper:!0,popperModifiers:[],popperProps:{},popperPlacement:"bottom-start"}}}]),n}(),fA="react-datepicker-ignore-onclickoutside",n0e=A0(Jye),q1="Date input not valid.",r0e=function(e){Bn(n,W.Component);var t=zn(n);function n(r){var i;return $n(this,n),Q(ne(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:Ot()}),Q(ne(i),"calcInitialState",function(){var o,a=i.getPreSelection(),s=OF(i.props),l=CF(i.props),c=s&&vi(a,Kr(s))?s:l&&hs(a,Ol(l))?l:a;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:cA(i.props.highlightDates),focused:!1,shouldFocusDayInline:!1,isRenderAriaLiveMessage:!1}}),Q(ne(i),"clearPreventFocusTimeout",function(){i.preventFocusTimeout&&clearTimeout(i.preventFocusTimeout)}),Q(ne(i),"setFocus",function(){i.input&&i.input.focus&&i.input.focus({preventScroll:!0})}),Q(ne(i),"setBlur",function(){i.input&&i.input.blur&&i.input.blur(),i.cancelFocusInput()}),Q(ne(i),"setOpen",function(o){var a=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:K1},function(){o||i.setState(function(s){return{focused:!!a&&s.focused}},function(){!a&&i.setBlur(),i.setState({inputValue:null})})})}),Q(ne(i),"inputOk",function(){return RT(i.state.preSelection)}),Q(ne(i),"isCalendarOpen",function(){return i.props.open===void 0?i.state.open&&!i.props.disabled&&!i.props.readOnly:i.props.open}),Q(ne(i),"handleFocus",function(o){i.state.preventFocus||(i.props.onFocus(o),i.props.preventOpenOnFocus||i.props.readOnly||i.setOpen(!0)),i.setState({focused:!0})}),Q(ne(i),"cancelFocusInput",function(){clearTimeout(i.inputFocusTimeout),i.inputFocusTimeout=null}),Q(ne(i),"deferFocusInput",function(){i.cancelFocusInput(),i.inputFocusTimeout=setTimeout(function(){return i.setFocus()},1)}),Q(ne(i),"handleDropdownFocus",function(){i.cancelFocusInput()}),Q(ne(i),"handleBlur",function(o){(!i.state.open||i.props.withPortal||i.props.showTimeInput)&&i.props.onBlur(o),i.setState({focused:!1})}),Q(ne(i),"handleCalendarClickOutside",function(o){i.props.inline||i.setOpen(!1),i.props.onClickOutside(o),i.props.withPortal&&o.preventDefault()}),Q(ne(i),"handleChange",function(){for(var o=arguments.length,a=new Array(o),s=0;s0&&(v=R1(c,d.slice(0,c.length),new Date)),La(v)||(v=new Date(c))),La(v)&&x?v:null));i.props.showTimeSelectOnly&&i.props.selected&&!_r(_,i.props.selected)&&(_=cme(i.props.selected,_==null?{hours:Wr(i.props.selected),minutes:Yr(i.props.selected),seconds:N1(i.props.selected)}:{hours:Wr(_),minutes:Yr(_),seconds:N1(_)})),!_&&l.target.value||i.setSelected(_,l,!0)}}),Q(ne(i),"handleSelect",function(o,a,s){if(i.setState({preventFocus:!0},function(){return i.preventFocusTimeout=setTimeout(function(){return i.setState({preventFocus:!1})},50),i.preventFocusTimeout}),i.props.onChangeRaw&&i.props.onChangeRaw(a),i.setSelected(o,a,!1,s),i.props.showDateSelect&&i.setState({isRenderAriaLiveMessage:!0}),!i.props.shouldCloseOnSelect||i.props.showTimeSelect)i.setPreSelection(o);else if(!i.props.inline){i.props.selectsRange||i.setOpen(!1);var l=i.props,c=l.startDate,d=l.endDate;!c||d||vi(o,c)||i.setOpen(!1)}}),Q(ne(i),"setSelected",function(o,a,s,l){var c=o;if(i.props.showYearPicker){if(c!==null&&TF(Je(c),i.props))return}else if(i.props.showMonthYearPicker){if(c!==null&&EF(c,i.props))return}else if(c!==null&&R0(c,i.props))return;var d=i.props,f=d.onChange,p=d.selectsRange,m=d.startDate,v=d.endDate;if(!Wa(i.props.selected,c)||i.props.allowSameDay||p)if(c!==null&&(!i.props.selected||s&&(i.props.showTimeSelect||i.props.showTimeSelectOnly||i.props.showTimeInput)||(c=J3(c,{hour:Wr(i.props.selected),minute:Yr(i.props.selected),second:N1(i.props.selected)})),i.props.inline||i.setState({preSelection:c}),i.props.focusSelectedMonth||i.setState({monthSelectedIn:l})),p){var y=m&&!v,x=m&&v;!m&&!v?f([c,null],a):y&&(vi(c,m)?f([c,null],a):f([m,c],a)),x&&f([c,null],a)}else f(c,a);s||(i.props.onSelect(c,a),i.setState({inputValue:null}))}),Q(ne(i),"setPreSelection",function(o){var a=i.props.minDate!==void 0,s=i.props.maxDate!==void 0,l=!0;if(o){var c=Kr(o);if(a&&s)l=Pg(o,i.props.minDate,i.props.maxDate);else if(a){var d=Kr(i.props.minDate);l=hs(o,d)||Wa(c,d)}else if(s){var f=Ol(i.props.maxDate);l=vi(o,f)||Wa(c,f)}}l&&i.setState({preSelection:o})}),Q(ne(i),"handleTimeChange",function(o){var a=J3(i.props.selected?i.props.selected:i.getPreSelection(),{hour:Wr(o),minute:Yr(o)});i.setState({preSelection:a}),i.props.onChange(a),i.props.shouldCloseOnSelect&&i.setOpen(!1),i.props.showTimeInput&&i.setOpen(!0),(i.props.showTimeSelectOnly||i.props.showTimeSelect)&&i.setState({isRenderAriaLiveMessage:!0}),i.setState({inputValue:null})}),Q(ne(i),"onInputClick",function(){i.props.disabled||i.props.readOnly||i.setOpen(!0),i.props.onInputClick()}),Q(ne(i),"onInputKeyDown",function(o){i.props.onKeyDown(o);var a=o.key;if(i.state.open||i.props.inline||i.props.preventOpenOnFocus){if(i.state.open){if(a==="ArrowDown"||a==="ArrowUp"){o.preventDefault();var s=i.calendar.componentNode&&i.calendar.componentNode.querySelector('.react-datepicker__day[tabindex="0"]');return void(s&&s.focus({preventScroll:!0}))}var l=Ot(i.state.preSelection);a==="Enter"?(o.preventDefault(),i.inputOk()&&i.state.lastPreSelectChange===K1?(i.handleSelect(l,o),!i.props.shouldCloseOnSelect&&i.setPreSelection(l)):i.setOpen(!1)):a==="Escape"?(o.preventDefault(),i.setOpen(!1)):a==="Tab"&&o.shiftKey&&i.setOpen(!1),i.inputOk()||i.props.onInputError({code:1,msg:q1})}}else a!=="ArrowDown"&&a!=="ArrowUp"&&a!=="Enter"||i.onInputClick()}),Q(ne(i),"onPortalKeyDown",function(o){o.key==="Escape"&&(o.preventDefault(),i.setState({preventFocus:!0},function(){i.setOpen(!1),setTimeout(function(){i.setFocus(),i.setState({preventFocus:!1})})}))}),Q(ne(i),"onDayKeyDown",function(o){i.props.onKeyDown(o);var a=o.key,s=Ot(i.state.preSelection);if(a==="Enter")o.preventDefault(),i.handleSelect(s,o),!i.props.shouldCloseOnSelect&&i.setPreSelection(s);else if(a==="Escape")o.preventDefault(),i.setOpen(!1),i.inputOk()||i.props.onInputError({code:1,msg:q1});else if(!i.props.disabledKeyboardNavigation){var l;switch(a){case"ArrowLeft":l=VT(s,1);break;case"ArrowRight":l=Vl(s,1);break;case"ArrowUp":l=fme(s,1);break;case"ArrowDown":l=AT(s,1);break;case"PageUp":l=Mu(s,1);break;case"PageDown":l=Ci(s,1);break;case"Home":l=Th(s,1);break;case"End":l=ku(s,1)}if(!l)return void(i.props.onInputError&&i.props.onInputError({code:1,msg:q1}));if(o.preventDefault(),i.setState({lastPreSelectChange:K1}),i.props.adjustDateOnChange&&i.setSelected(l),i.setPreSelection(l),i.props.inline){var c=sr(s),d=sr(l),f=Je(s),p=Je(l);c!==d||f!==p?i.setState({shouldFocusDayInline:!0}):i.setState({shouldFocusDayInline:!1})}}}),Q(ne(i),"onPopperKeyDown",function(o){o.key==="Escape"&&(o.preventDefault(),i.setState({preventFocus:!0},function(){i.setOpen(!1),setTimeout(function(){i.setFocus(),i.setState({preventFocus:!1})})}))}),Q(ne(i),"onClearClick",function(o){o&&o.preventDefault&&o.preventDefault(),i.props.selectsRange?i.props.onChange([null,null],o):i.props.onChange(null,o),i.setState({inputValue:null})}),Q(ne(i),"clear",function(){i.onClearClick()}),Q(ne(i),"onScroll",function(o){typeof i.props.closeOnScroll=="boolean"&&i.props.closeOnScroll?o.target!==document&&o.target!==document.documentElement&&o.target!==document.body||i.setOpen(!1):typeof i.props.closeOnScroll=="function"&&i.props.closeOnScroll(o)&&i.setOpen(!1)}),Q(ne(i),"renderCalendar",function(){return i.props.inline||i.isCalendarOpen()?W.createElement(n0e,{ref:function(o){i.calendar=o},locale:i.props.locale,calendarStartDay:i.props.calendarStartDay,chooseDayAriaLabelPrefix:i.props.chooseDayAriaLabelPrefix,disabledDayAriaLabelPrefix:i.props.disabledDayAriaLabelPrefix,weekAriaLabelPrefix:i.props.weekAriaLabelPrefix,monthAriaLabelPrefix:i.props.monthAriaLabelPrefix,adjustDateOnChange:i.props.adjustDateOnChange,setOpen:i.setOpen,shouldCloseOnSelect:i.props.shouldCloseOnSelect,dateFormat:i.props.dateFormatCalendar,useWeekdaysShort:i.props.useWeekdaysShort,formatWeekDay:i.props.formatWeekDay,dropdownMode:i.props.dropdownMode,selected:i.props.selected,preSelection:i.state.preSelection,onSelect:i.handleSelect,onWeekSelect:i.props.onWeekSelect,openToDate:i.props.openToDate,minDate:i.props.minDate,maxDate:i.props.maxDate,selectsStart:i.props.selectsStart,selectsEnd:i.props.selectsEnd,selectsRange:i.props.selectsRange,startDate:i.props.startDate,endDate:i.props.endDate,excludeDates:i.props.excludeDates,excludeDateIntervals:i.props.excludeDateIntervals,filterDate:i.props.filterDate,onClickOutside:i.handleCalendarClickOutside,formatWeekNumber:i.props.formatWeekNumber,highlightDates:i.state.highlightDates,includeDates:i.props.includeDates,includeDateIntervals:i.props.includeDateIntervals,includeTimes:i.props.includeTimes,injectTimes:i.props.injectTimes,inline:i.props.inline,shouldFocusDayInline:i.state.shouldFocusDayInline,peekNextMonth:i.props.peekNextMonth,showMonthDropdown:i.props.showMonthDropdown,showPreviousMonths:i.props.showPreviousMonths,useShortMonthInDropdown:i.props.useShortMonthInDropdown,showMonthYearDropdown:i.props.showMonthYearDropdown,showWeekNumbers:i.props.showWeekNumbers,showYearDropdown:i.props.showYearDropdown,withPortal:i.props.withPortal,forceShowMonthNavigation:i.props.forceShowMonthNavigation,showDisabledMonthNavigation:i.props.showDisabledMonthNavigation,scrollableYearDropdown:i.props.scrollableYearDropdown,scrollableMonthYearDropdown:i.props.scrollableMonthYearDropdown,todayButton:i.props.todayButton,weekLabel:i.props.weekLabel,outsideClickIgnoreClass:fA,fixedHeight:i.props.fixedHeight,monthsShown:i.props.monthsShown,monthSelectedIn:i.state.monthSelectedIn,onDropdownFocus:i.handleDropdownFocus,onMonthChange:i.props.onMonthChange,onYearChange:i.props.onYearChange,dayClassName:i.props.dayClassName,weekDayClassName:i.props.weekDayClassName,monthClassName:i.props.monthClassName,timeClassName:i.props.timeClassName,showDateSelect:i.props.showDateSelect,showTimeSelect:i.props.showTimeSelect,showTimeSelectOnly:i.props.showTimeSelectOnly,onTimeChange:i.handleTimeChange,timeFormat:i.props.timeFormat,timeIntervals:i.props.timeIntervals,minTime:i.props.minTime,maxTime:i.props.maxTime,excludeTimes:i.props.excludeTimes,filterTime:i.props.filterTime,timeCaption:i.props.timeCaption,className:i.props.calendarClassName,container:i.props.calendarContainer,yearItemNumber:i.props.yearItemNumber,yearDropdownItemNumber:i.props.yearDropdownItemNumber,previousMonthAriaLabel:i.props.previousMonthAriaLabel,previousMonthButtonLabel:i.props.previousMonthButtonLabel,nextMonthAriaLabel:i.props.nextMonthAriaLabel,nextMonthButtonLabel:i.props.nextMonthButtonLabel,previousYearAriaLabel:i.props.previousYearAriaLabel,previousYearButtonLabel:i.props.previousYearButtonLabel,nextYearAriaLabel:i.props.nextYearAriaLabel,nextYearButtonLabel:i.props.nextYearButtonLabel,timeInputLabel:i.props.timeInputLabel,disabledKeyboardNavigation:i.props.disabledKeyboardNavigation,renderCustomHeader:i.props.renderCustomHeader,popperProps:i.props.popperProps,renderDayContents:i.props.renderDayContents,renderMonthContent:i.props.renderMonthContent,renderQuarterContent:i.props.renderQuarterContent,renderYearContent:i.props.renderYearContent,onDayMouseEnter:i.props.onDayMouseEnter,onMonthMouseLeave:i.props.onMonthMouseLeave,onYearMouseEnter:i.props.onYearMouseEnter,onYearMouseLeave:i.props.onYearMouseLeave,selectsDisabledDaysInRange:i.props.selectsDisabledDaysInRange,showTimeInput:i.props.showTimeInput,showMonthYearPicker:i.props.showMonthYearPicker,showFullMonthYearPicker:i.props.showFullMonthYearPicker,showTwoColumnMonthYearPicker:i.props.showTwoColumnMonthYearPicker,showFourColumnMonthYearPicker:i.props.showFourColumnMonthYearPicker,showYearPicker:i.props.showYearPicker,showQuarterYearPicker:i.props.showQuarterYearPicker,showPopperArrow:i.props.showPopperArrow,excludeScrollbar:i.props.excludeScrollbar,handleOnKeyDown:i.props.onKeyDown,handleOnDayKeyDown:i.onDayKeyDown,isInputFocused:i.state.focused,customTimeInput:i.props.customTimeInput,setPreSelection:i.setPreSelection},i.props.children):null}),Q(ne(i),"renderAriaLiveRegion",function(){var o,a=i.props,s=a.dateFormat,l=a.locale,c=i.props.showTimeInput||i.props.showTimeSelect?"PPPPp":"PPPP";return o=i.props.selectsRange?"Selected start date: ".concat(ro(i.props.startDate,{dateFormat:c,locale:l}),". ").concat(i.props.endDate?"End date: "+ro(i.props.endDate,{dateFormat:c,locale:l}):""):i.props.showTimeSelectOnly?"Selected time: ".concat(ro(i.props.selected,{dateFormat:s,locale:l})):i.props.showYearPicker?"Selected year: ".concat(ro(i.props.selected,{dateFormat:"yyyy",locale:l})):i.props.showMonthYearPicker?"Selected month: ".concat(ro(i.props.selected,{dateFormat:"MMMM yyyy",locale:l})):i.props.showQuarterYearPicker?"Selected quarter: ".concat(ro(i.props.selected,{dateFormat:"yyyy, QQQ",locale:l})):"Selected date: ".concat(ro(i.props.selected,{dateFormat:c,locale:l})),W.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},o)}),Q(ne(i),"renderDateInput",function(){var o,a=rt(i.props.className,Q({},fA,i.state.open)),s=i.props.customInput||W.createElement("input",{type:"text"}),l=i.props.customInputRef||"ref",c=typeof i.props.value=="string"?i.props.value:typeof i.state.inputValue=="string"?i.state.inputValue:i.props.selectsRange?function(d,f,p){if(!d)return"";var m=ro(d,p),v=f?ro(f,p):"";return"".concat(m," - ").concat(v)}(i.props.startDate,i.props.endDate,i.props):ro(i.props.selected,i.props);return W.cloneElement(s,(Q(o={},l,function(d){i.input=d}),Q(o,"value",c),Q(o,"onBlur",i.handleBlur),Q(o,"onChange",i.handleChange),Q(o,"onClick",i.onInputClick),Q(o,"onFocus",i.handleFocus),Q(o,"onKeyDown",i.onInputKeyDown),Q(o,"id",i.props.id),Q(o,"name",i.props.name),Q(o,"form",i.props.form),Q(o,"autoFocus",i.props.autoFocus),Q(o,"placeholder",i.props.placeholderText),Q(o,"disabled",i.props.disabled),Q(o,"autoComplete",i.props.autoComplete),Q(o,"className",rt(s.props.className,a)),Q(o,"title",i.props.title),Q(o,"readOnly",i.props.readOnly),Q(o,"required",i.props.required),Q(o,"tabIndex",i.props.tabIndex),Q(o,"aria-describedby",i.props.ariaDescribedBy),Q(o,"aria-invalid",i.props.ariaInvalid),Q(o,"aria-labelledby",i.props.ariaLabelledBy),Q(o,"aria-required",i.props.ariaRequired),o))}),Q(ne(i),"renderClearButton",function(){var o=i.props,a=o.isClearable,s=o.selected,l=o.startDate,c=o.endDate,d=o.clearButtonTitle,f=o.clearButtonClassName,p=f===void 0?"":f,m=o.ariaLabelClose,v=m===void 0?"Close":m;return!a||s==null&&l==null&&c==null?null:W.createElement("button",{type:"button",className:"react-datepicker__close-icon ".concat(p).trim(),"aria-label":v,onClick:i.onClearClick,title:d,tabIndex:-1})}),i.state=i.calcInitialState(),i}return Un(n,[{key:"componentDidMount",value:function(){window.addEventListener("scroll",this.onScroll,!0)}},{key:"componentDidUpdate",value:function(r,i){var o,a;r.inline&&(o=r.selected,a=this.props.selected,o&&a?sr(o)!==sr(a)||Je(o)!==Je(a):o!==a)&&this.setPreSelection(this.props.selected),this.state.monthSelectedIn!==void 0&&r.monthsShown!==this.props.monthsShown&&this.setState({monthSelectedIn:0}),r.highlightDates!==this.props.highlightDates&&this.setState({highlightDates:cA(this.props.highlightDates)}),i.focused||Wa(r.selected,this.props.selected)||this.setState({inputValue:null}),i.open!==this.state.open&&(i.open===!1&&this.state.open===!0&&this.props.onCalendarOpen(),i.open===!0&&this.state.open===!1&&this.props.onCalendarClose())}},{key:"componentWillUnmount",value:function(){this.clearPreventFocusTimeout(),window.removeEventListener("scroll",this.onScroll,!0)}},{key:"renderInputContainer",value:function(){var r=this.props.showIcon;return W.createElement("div",{className:"react-datepicker__input-container".concat(r?" react-datepicker__view-calendar-icon":"")},r&&W.createElement("svg",{className:"react-datepicker__calendar-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},W.createElement("path",{d:"M96 32V64H48C21.5 64 0 85.5 0 112v48H448V112c0-26.5-21.5-48-48-48H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V64H160V32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192H0V464c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V192z"})),this.state.isRenderAriaLiveMessage&&this.renderAriaLiveRegion(),this.renderDateInput(),this.renderClearButton())}},{key:"render",value:function(){var r=this.renderCalendar();if(this.props.inline)return r;if(this.props.withPortal){var i=this.state.open?W.createElement(AF,{enableTabLoop:this.props.enableTabLoop},W.createElement("div",{className:"react-datepicker__portal",tabIndex:-1,onKeyDown:this.onPortalKeyDown},r)):null;return this.state.open&&this.props.portalId&&(i=W.createElement(MF,{portalId:this.props.portalId,portalHost:this.props.portalHost},i)),W.createElement("div",null,this.renderInputContainer(),i)}return W.createElement(t0e,{className:this.props.popperClassName,wrapperClassName:this.props.wrapperClassName,hidePopper:!this.isCalendarOpen(),portalId:this.props.portalId,portalHost:this.props.portalHost,popperModifiers:this.props.popperModifiers,targetComponent:this.renderInputContainer(),popperContainer:this.props.popperContainer,popperComponent:r,popperPlacement:this.props.popperPlacement,popperProps:this.props.popperProps,popperOnKeyDown:this.onPopperKeyDown,enableTabLoop:this.props.enableTabLoop})}}],[{key:"defaultProps",get:function(){return{allowSameDay:!1,dateFormat:"MM/dd/yyyy",dateFormatCalendar:"LLLL yyyy",onChange:function(){},disabled:!1,disabledKeyboardNavigation:!1,dropdownMode:"scroll",onFocus:function(){},onBlur:function(){},onKeyDown:function(){},onInputClick:function(){},onSelect:function(){},onClickOutside:function(){},onMonthChange:function(){},onCalendarOpen:function(){},onCalendarClose:function(){},preventOpenOnFocus:!1,onYearChange:function(){},onInputError:function(){},monthsShown:1,readOnly:!1,withPortal:!1,selectsDisabledDaysInRange:!1,shouldCloseOnSelect:!0,showTimeSelect:!1,showTimeInput:!1,showPreviousMonths:!1,showMonthYearPicker:!1,showFullMonthYearPicker:!1,showTwoColumnMonthYearPicker:!1,showFourColumnMonthYearPicker:!1,showYearPicker:!1,showQuarterYearPicker:!1,strictParsing:!1,timeIntervals:30,timeCaption:"Time",previousMonthAriaLabel:"Previous Month",previousMonthButtonLabel:"Previous Month",nextMonthAriaLabel:"Next Month",nextMonthButtonLabel:"Next Month",previousYearAriaLabel:"Previous Year",previousYearButtonLabel:"Previous Year",nextYearAriaLabel:"Next Year",nextYearButtonLabel:"Next Year",timeInputLabel:"Time",enableTabLoop:!0,yearItemNumber:kf,focusSelectedMonth:!1,showPopperArrow:!0,excludeScrollbar:!0,customTimeInput:null,calendarStartDay:void 0}}}]),n}(),i0e="input",K1="navigate";const k2=e=>{const{className:t,isClearable:n,selected:r,dateFormat:i}=e,o=!n||Bl(r),a=F.useRef();return g.jsxs("div",{className:"icon-input-container",children:[g.jsx(r0e,{...e,popperModifiers:[{name:"arrow",options:{padding:24}}],dateFormat:i??F8,className:rt("icon-input-container__input form-control",t),ref:a}),o&&g.jsx(De,{icon:Rie,className:"icon-input-container__icon",onClick:()=>{var s;return(s=a.current)==null?void 0:s.input.focus()}})]})},o0e=e=>g.jsx(k2,{...e,dateFormat:HT,showTimeSelect:!0,timeIntervals:10}),Z1=({children:e,infoTooltip:t,checked:n,onChange:r})=>g.jsxs("p",{children:[g.jsx(i6,{inline:!0,checked:n,className:t?"me-2":"",onChange:r,children:e}),t&&g.jsx(Og,{placement:"right",children:t})]}),a0e=({isOpen:e,toggle:t})=>g.jsxs(fa,{isOpen:e,toggle:t,centered:!0,size:"lg",children:[g.jsx(ha,{toggle:t,children:"Info"}),g.jsxs(Co,{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"})]})]})]}),s0e=()=>{const[e,t]=_n();return g.jsxs(g.Fragment,{children:[g.jsx("span",{title:"What does this mean?",children:g.jsx(De,{icon:cE,style:{cursor:"pointer"},onClick:t})}),g.jsx(a0e,{isOpen:e,toggle:t})]})},Q1=e=>typeof e=="string"?oa(e):e,l0e=e=>"shortCodeLength"in e&&"customSlug"in e&&"domain"in e,c0e=(e,t)=>function({mode:n,saving:r,onSave:i,initialState:o}){const[a,s]=F.useState(o),l=()=>s(o),c=ap("deviceLongUrls"),d=n==="edit",f=l0e(a),p=n==="create-basic",m=E=>s({...a,tags:E}),v=(E,C)=>fo(E)?E:fo(C)?null:void 0,y=L0(async()=>i({...a,validSince:ms(a.validSince)??null,validUntil:ms(a.validUntil)??null,maxVisits:fo(a.maxVisits)?Number(a.maxVisits):null}).then(()=>!d&&l()).catch(()=>{}));F.useEffect(()=>{s(o)},[o]);const x=(E,C,k="text",j={},N={})=>g.jsx(Hr,{...N,children:g.jsx(yu,{id:E,type:k,placeholder:C,value:a[E]??"",onChange:j.onChange??(U=>s({...a,[E]:U.target.value})),...j})}),_=(E,C,k)=>{var j;return g.jsx(Jge,{icon:k,id:E,type:"url",placeholder:C,value:((j=a.deviceLongUrls)==null?void 0:j[E])??"",onChange:N=>{var U;return s({...a,deviceLongUrls:{...a.deviceLongUrls??{},[E]:v(N.target.value,(U=o.deviceLongUrls)==null?void 0:U[E])}})}})},w=(E,C,k={})=>g.jsx(o0e,{selected:a[E]?Q1(a[E]):null,placeholderText:C,isClearable:!0,onChange:j=>s({...a,[E]:j}),...k}),S=g.jsxs(g.Fragment,{children:[g.jsx(Hr,{children:g.jsx(yu,{bsSize:"lg",type:"url",placeholder:"URL to be shortened",required:!0,value:a.longUrl,onChange:E=>s({...a,longUrl:E.target.value})})}),g.jsxs(br,{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})})]})]});return g.jsxs("form",{name:"shortUrlForm",className:"short-url-form",onSubmit:y,children:[p&&S,!p&&g.jsxs(g.Fragment,{children:[g.jsxs(br,{children:[g.jsx("div",{className:rt("mb-3",{"col-sm-6":c,"col-12":!c}),children:g.jsx(vn,{title:"Main options",className:"mb-3",children:S})}),c&&g.jsx("div",{className:"col-sm-6 mb-3",children:g.jsxs(vn,{title:"Device-specific long URLs",children:[g.jsx(Hr,{children:_("android","Android-specific redirection",Uie)}),g.jsx(Hr,{children:_("ios","iOS-specific redirection",$ie)}),_("desktop","Desktop-specific redirection",BY)]})})]}),g.jsxs(br,{children:[g.jsx("div",{className:"col-sm-6 mb-3",children:g.jsxs(vn,{title:"Customize the short URL",children:[x("title","Title","text",{onChange:({target:E})=>s({...a,title:v(E.value,o.title)})}),!d&&f&&g.jsxs(g.Fragment,{children:[g.jsxs(br,{children:[g.jsx("div",{className:"col-lg-6",children:x("customSlug","Custom slug","text",{disabled:fo(a.shortCodeLength)})}),g.jsx("div",{className:"col-lg-6",children:x("shortCodeLength","Short code length","number",{min:4,disabled:fo(a.customSlug)})})]}),g.jsx(t,{value:a.domain,onChange:E=>s({...a,domain:E})})]})]})}),g.jsx("div",{className:"col-sm-6 mb-3",children:g.jsxs(vn,{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?Q1(a.validUntil):void 0})}),w("validUntil","Enabled until...",{minDate:a.validSince?Q1(a.validSince):void 0})]})})]}),g.jsxs(br,{children:[g.jsx("div",{className:"col-sm-6 mb-3",children:g.jsxs(vn,{title:"Extra checks",children:[g.jsx(Z1,{infoTooltip:"If checked, Shlink will try to reach the long URL, failing in case it's not publicly accessible.",checked:a.validateUrl,onChange:E=>s({...a,validateUrl:E}),children:"Validate URL"}),!d&&f&&g.jsxs("p",{children:[g.jsx(i6,{inline:!0,className:"me-2",checked:a.findIfExists,onChange:E=>s({...a,findIfExists:E}),children:"Use existing URL if found"}),g.jsx(s0e,{})]})]})}),g.jsx("div",{className:"col-sm-6 mb-3",children:g.jsxs(vn,{title:"Configure behavior",children:[g.jsx(Z1,{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:E=>s({...a,crawlable:E}),children:"Make it crawlable"}),g.jsx(Z1,{infoTooltip:"When this short URL is visited, any query params appended to it will be forwarded to the long URL.",checked:a.forwardQuery,onChange:E=>s({...a,forwardQuery:E}),children:"Forward query params on redirect"})]})})]})]}),g.jsx("div",{className:"text-center",children:g.jsx(_t,{outline:!0,color:"primary",disabled:r||ai(a.longUrl),className:"btn-xs-block",children:r?"Saving...":"Save"})})]})},u0e=({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}),hme.map(r=>g.jsx(Ue,{active:e===r,onClick:()=>n(r),children:V8(r)},r))]}),d0e=({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(k2,{selected:e,placeholderText:"Since...",isClearable:!0,maxDate:t??void 0,disabled:n,onChange:r})}),g.jsx("div",{className:"col-md-6",children:g.jsx(k2,{className:"mt-2 mt-md-0",selected:t,placeholderText:"Until...",isClearable:!0,minDate:e??void 0,disabled:n,onChange:o=>i(o&&Ol(o))})})]}),NF=({onDatesChange:e,initialDateRange:t,defaultText:n,disabled:r,updatable:i=!1})=>{const o=uy(t),[a,s]=F.useState(o?t:void 0),[l,c]=F.useState(o?void 0:t),d=p=>{s(B8(p)?lp:void 0),c(p),e(p)},f=p=>{s(p),c(void 0),e(H8(p))};return i&&hge(()=>{const p=uy(t);p&&f(t),t&&!p&&d(t)},[t]),g.jsxs(pa,{disabled:r,text:V8(a??l)??n,children:[g.jsx(u0e,{allText:n,active:a,onChange:f}),g.jsx(Ue,{divider:!0}),g.jsx(Ue,{header:!0,children:"Custom:"}),g.jsx(Ue,{text:!0,children:g.jsx(d0e,{...l,onStartDateChange:p=>d({...l,startDate:p}),onEndDateChange:p=>d({...l,endDate:p})})})]})},f0e={dateCreated:"Created at",shortCode:"Short URL",longUrl:"Long URL",title:"Title",visits:"Visits"},h0e=({onChange:e,selected:t={},className:n,supportsDisabledFiltering:r})=>{const{excludeBots:i=!1,excludeMaxVisitsReached:o=!1,excludePastValidUntil:a=!1}=t,s=l=>()=>e({...t,[l]:!(t!=null&&t[l])});return g.jsxs(pa,{text:"Filters",dropdownClassName:n,inline:!0,end:!0,minWidth:250,children:[g.jsx(Ue,{header:!0,children:"Visits:"}),g.jsx(Ue,{active:i,onClick:s("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:s("excludeMaxVisitsReached"),children:"Exclude with visits reached"}),g.jsx(Ue,{active:a,onClick:s("excludePastValidUntil"),children:"Exclude enabled in the past"})]}),g.jsx(Ue,{divider:!0}),g.jsx(Ue,{disabled:!fo(t),onClick:()=>e({excludeBots:!1,excludeMaxVisitsReached:!1,excludePastValidUntil:!1}),children:g.jsx("i",{children:"Clear filters"})})]})},p0e=(e,t)=>({className:n,shortUrlsAmount:r,order:i,handleOrderBy:o})=>{const[a,s]=M0(),{search:l,tags:c,startDate:d,endDate:f,excludeBots:p,excludeMaxVisitsReached:m,excludePastValidUntil:v,tagsMode:y="any"}=a,x=ap("filterDisabledUrls"),_=Hl("visits"),w=In(({startDate:k,endDate:j})=>({startDate:ms(k)??void 0,endDate:ms(j)??void 0}),s),S=In(k=>ai(k)?void 0:k,k=>s({search:k})),E=k=>s({tags:k}),C=In(()=>y==="any"?"all":"any",k=>s({tagsMode:k}));return g.jsxs("div",{className:rt("short-urls-filtering-bar-container",n),children:[g.jsx(Qh,{initialValue:l,onChange:S}),g.jsxs(h0,{className:"mt-3",children:[g.jsx(t,{allowNew:!1,placeholder:"With tags...",selectedTags:c,onChange:E}),c.length>1&&g.jsxs(g.Fragment,{children:[g.jsx(_t,{outline:!0,color:"secondary",onClick:C,id:"tagsModeBtn","aria-label":"Change tags mode",children:g.jsx(De,{className:"short-urls-filtering-bar__tags-icon",icon:y==="all"?O4:mY})}),g.jsx(Fr,{target:"tagsModeBtn",placement:"left",children:y==="all"?"With all the tags.":"With any of the tags."})]})]}),g.jsxs(br,{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(NF,{defaultText:"All short URLs",initialDateRange:z8(d,f),onDatesChange:w})}),g.jsx(h0e,{className:"ms-0 ms-md-2 mt-3 mt-md-0",selected:{excludeBots:p??(_==null?void 0:_.excludeBots),excludeMaxVisitsReached:m,excludePastValidUntil:v},onChange:s,supportsDisabledFiltering:x})]})}),g.jsx("div",{className:"col-6 col-lg-4 col-xl-6 mt-3",children:g.jsx(e,{amount:r})}),g.jsx("div",{className:"col-6 d-lg-none mt-3",children:g.jsx(Xh,{prefixed:!1,items:f0e,order:i,onChange:o})})]})]})};function Pf({currentOrder:e,field:t,className:n="ms-1"}){return!e.dir||e.field!==t?null:g.jsx(De,{icon:e.dir==="ASC"?lY:_Y,className:n})}const mc=2,P2="...",RF=(e,t)=>{const n=jT(Z5(mc,e-mc),l8(t-1,e+mc)+1);return e-mc>mc&&n.unshift(P2),e+mce===P2,DF=e=>Ph(e)?e:Tn(e),IF=(e,t)=>Ph(e)?`${e}_${t}`:`${e}`,m0e=({paginator:e,currentQueryString:t=""})=>{const{currentPage:n=0,pagesCount:r=0}=e??{},i=zl(),o=s=>`${i}/list-short-urls/${s}${t}`;if(r<=1)return g.jsx("div",{className:"pb-3"});const a=()=>RF(n,r).map((s,l)=>g.jsx(sl,{disabled:Ph(s),active:n===s,children:g.jsx(ll,{tag:Ut,to:o(s),children:DF(s)})},IF(s,l)));return g.jsxs(UE,{className:"sticky-card-paginator py-3",listClassName:"flex-wrap justify-content-center mb-0",children:[g.jsx(sl,{disabled:n===1,children:g.jsx(ll,{previous:!0,tag:Ut,to:o(n-1)})}),a(),g.jsx(sl,{disabled:n>=r,children:g.jsx(ll,{next:!0,tag:Ut,to:o(n+1)})})]})},g0e={field:"dateCreated",dir:"DESC"},v0e=(e,t)=>Es(({listShortUrls:n,shortUrlsList:r})=>{var i,o,a;const{page:s}=Dl(),l=bn(),[c,d]=M0(),f=KT(),{tags:p,search:m,startDate:v,endDate:y,orderBy:x,tagsMode:_,excludeBots:w,excludePastValidUntil:S,excludeMaxVisitsReached:E}=c,[C,k]=F.useState(x??((i=f.shortUrlsList)==null?void 0:i.defaultOrdering)??g0e),{pagination:j}=(r==null?void 0:r.shortUrls)??{},N=w??((o=f.visits)==null?void 0:o.excludeBots),U=ap("excludeBotsOnShortUrls"),R=(Z,te)=>{d({orderBy:{field:Z,dir:te}}),k({field:Z,dir:te})},V=Z=>()=>R(Z,g0(Z,C.field,C.dir)),Y=Z=>g.jsx(Pf,{currentOrder:C,field:Z}),X=In(Z=>[...new Set([...p,Z])],Z=>d({tags:Z})),G=({field:Z,dir:te})=>U&&N&&Z==="visits"?{field:"nonBotVisits",dir:te}:{field:Z,dir:te};return F.useEffect(()=>{n({page:s,searchTerm:m,tags:p,startDate:v,endDate:y,orderBy:G(C),tagsMode:_,excludePastValidUntil:S,excludeMaxVisitsReached:E})},[s,m,p,v,y,C.field,C.dir,_,S,E]),g.jsxs(g.Fragment,{children:[g.jsx(t,{shortUrlsAmount:(a=r.shortUrls)==null?void 0:a.pagination.totalItems,order:C,handleOrderBy:R,className:"mb-3"}),g.jsxs(Xr,{body:!0,className:"pb-0",children:[g.jsx(e,{shortUrlsList:r,orderByColumn:V,renderOrderIcon:Y,onTagClick:X}),g.jsx(m0e,{paginator:j,currentQueryString:l.search})]})]})},()=>[wi.visits]),y0e=e=>({orderByColumn:t,renderOrderIcon:n,shortUrlsList:r,onTagClick:i,className:o})=>{const{error:a,loading:s,shortUrls:l}=r,c=rt({"short-urls-table__header-cell--with-action":!!t}),d=rt("short-urls-table__header-cell",c),f=rt("table table-hover responsive-table short-urls-table",o),p=()=>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 :("})}):s?g.jsx("tr",{children:g.jsx("td",{colSpan:6,className:"text-center",children:"Loading..."})}):!s&&ai(l==null?void 0:l.data)?g.jsx("tr",{children:g.jsx("td",{colSpan:6,className:"text-center",children:"No results found"})}):l==null?void 0:l.data.map(m=>g.jsx(e,{shortUrl:m,onTagClick:i},m.shortUrl));return g.jsxs("table",{className:f,children:[g.jsx("thead",{className:"responsive-table__header short-urls-table__header",children:g.jsxs("tr",{children:[g.jsxs("th",{className:d,onClick:t==null?void 0:t("dateCreated"),children:["Created at ",n==null?void 0:n("dateCreated")]}),g.jsxs("th",{className:d,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:c,onClick:t==null?void 0:t("title"),children:["Title ",n==null?void 0:n("title")]}),"  /  ",g.jsxs("span",{className:c,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:d,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:p()})]})},_0e=(e,t)=>{e.serviceFactory("ShortUrlsList",v0e,"ShortUrlsTable","ShortUrlsFilteringBar"),e.decorator("ShortUrlsList",t(["mercureInfo","shortUrlsList"],["listShortUrls","createNewVisits","loadMercureInfo"])),e.serviceFactory("ShortUrlsTable",y0e,"ShortUrlsRow"),e.serviceFactory("ShortUrlsRow",Wge,"ShortUrlsRowMenu","ColorGenerator","useTimeoutToggle"),e.serviceFactory("ShortUrlsRowMenu",Yge,"DeleteShortUrlModal","QrCodeModal"),e.serviceFactory("CreateShortUrlResult",Age,"useTimeoutToggle"),e.serviceFactory("ShortUrlForm",c0e,"TagsSelector","DomainSelector"),e.serviceFactory("CreateShortUrl",Qme,"ShortUrlForm","CreateShortUrlResult"),e.decorator("CreateShortUrl",t(["shortUrlCreation"],["createShortUrl","resetCreateShortUrl"])),e.serviceFactory("EditShortUrl",pge,"ShortUrlForm"),e.decorator("EditShortUrl",t(["shortUrlDetail","shortUrlEdition"],["getShortUrlDetail","editShortUrl"])),e.serviceFactory("DeleteShortUrlModal",()=>Nge),e.decorator("DeleteShortUrlModal",t(["shortUrlDeletion"],["deleteShortUrl","shortUrlDeleted","resetDeleteShortUrl"])),e.serviceFactory("QrCodeModal",$ge,"ImageDownloader"),e.serviceFactory("ShortUrlsFilteringBar",p0e,"ExportShortUrlsBtn","TagsSelector"),e.serviceFactory("ExportShortUrlsBtn",Rge,"apiClientFactory","ReportExporter"),e.serviceFactory("shortUrlsListReducerCreator",Bme,"listShortUrls","editShortUrl","createShortUrl"),e.serviceFactory("shortUrlsListReducer",mt("reducer"),"shortUrlsListReducerCreator"),e.serviceFactory("shortUrlCreationReducerCreator",qge,"createShortUrl"),e.serviceFactory("shortUrlCreationReducer",mt("reducer"),"shortUrlCreationReducerCreator"),e.serviceFactory("shortUrlEditionReducerCreator",Xge,"editShortUrl"),e.serviceFactory("shortUrlEditionReducer",mt("reducer"),"shortUrlEditionReducerCreator"),e.serviceFactory("shortUrlDeletionReducerCreator",Fme,"deleteShortUrl"),e.serviceFactory("shortUrlDeletionReducer",mt("reducer"),"shortUrlDeletionReducerCreator"),e.serviceFactory("shortUrlDetailReducerCreator",Kge,"apiClientFactory"),e.serviceFactory("shortUrlDetailReducer",mt("reducer"),"shortUrlDetailReducerCreator"),e.serviceFactory("listShortUrls",Ume,"apiClientFactory"),e.serviceFactory("createShortUrl",Gge,"apiClientFactory"),e.serviceFactory("resetCreateShortUrl",mt("resetCreateShortUrl"),"shortUrlCreationReducerCreator"),e.serviceFactory("deleteShortUrl",Ime,"apiClientFactory"),e.serviceFactory("resetDeleteShortUrl",mt("resetDeleteShortUrl"),"shortUrlDeletionReducerCreator"),e.serviceFactory("shortUrlDeleted",()=>q8),e.serviceFactory("getShortUrlDetail",mt("getShortUrlDetail"),"shortUrlDetailReducerCreator"),e.serviceFactory("editShortUrl",Qge,"apiClientFactory")},b0e=({tag:e,toggle:t,isOpen:n,deleteTag:r,tagDelete:i,tagDeleted:o})=>{const{deleting:a,error:s,deleted:l,errorData:c}=i;return g.jsxs(fa,{toggle:t,isOpen:n,centered:!0,onClosed:()=>l&&o(e),children:[g.jsx(ha,{toggle:t,className:"text-danger",children:"Delete tag"}),g.jsxs(Co,{children:["Are you sure you want to delete tag ",g.jsx("b",{children:e}),"?",s&&g.jsx(qr,{type:"error",small:!0,className:"mt-2",children:g.jsx(ia,{errorData:c,fallbackMessage:"Something went wrong while deleting the tag :("})})]}),g.jsxs(Il,{children:[g.jsx(_t,{color:"link",onClick:t,children:"Cancel"}),g.jsx(_t,{color:"danger",disabled:a,onClick:async()=>{await r(e),t()},children:a?"Deleting tag...":"Delete tag"})]})]})};function I0(){return(I0=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function L2(e){var t=F.useRef(e),n=F.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var Lh=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(hA(i.current,x,s.current)):y(!1)},v=function(){return y(!1)};function y(x){var _=l.current,w=j2(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&&(pA(_),!function(E,C){return C&&!Lf(E)}(_,l.current)&&w)){if(Lf(_)){l.current=!0;var S=_.changedTouches||[];S.length&&(s.current=S[0].identifier)}w.focus(),o(hA(w,_,s.current)),y(!0)}},function(x){var _=x.which||x.keyCode;_<37||_>40||(x.preventDefault(),a({left:_===39?.05:_===37?-.05:0,top:_===40?.05:_===38?-.05:0}))},y]},[a,o]),d=c[0],f=c[1],p=c[2];return F.useEffect(function(){return p},[p]),W.createElement("div",I0({},r,{onTouchStart:d,onMouseDown:d,className:"react-colorful__interactive",ref:i,onKeyDown:f,tabIndex:0,role:"slider"}))}),lO=function(e){return e.filter(Boolean).join(" ")},UF=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=lO(["react-colorful__pointer",e.className]);return W.createElement("div",{className:o,style:{top:100*i+"%",left:100*n+"%"}},W.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},Xn=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},w0e=function(e){return O0e(M2(e))},M2=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?Xn(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?Xn(parseInt(e.substring(6,8),16)/255,2):1}},x0e=function(e){return T0e(E0e(e))},S0e=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:Xn(e.h),s:Xn(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:Xn(i/2),a:Xn(r,2)}},A2=function(e){var t=S0e(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},E0e=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),a=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),c=o%6;return{r:Xn(255*[r,s,a,a,l,r][c]),g:Xn(255*[l,r,r,s,a,a][c]),b:Xn(255*[a,a,l,r,r,s][c]),a:Xn(i,2)}},Vm=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},T0e=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=i<1?Vm(Xn(255*i)):"";return"#"+Vm(t)+Vm(n)+Vm(r)+o},O0e=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),s=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:Xn(60*(s<0?s+6:s)),s:Xn(o?a/o*100:0),v:Xn(o/255*100),a:i}},C0e=W.memo(function(e){var t=e.hue,n=e.onChange,r=lO(["react-colorful__hue",e.className]);return W.createElement("div",{className:r},W.createElement($F,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:Lh(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":Xn(t),"aria-valuemax":"360","aria-valuemin":"0"},W.createElement(UF,{className:"react-colorful__hue-pointer",left:t/360,color:A2({h:t,s:100,v:100,a:1})})))}),k0e=W.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:A2({h:t.h,s:100,v:100,a:1})};return W.createElement("div",{className:"react-colorful__saturation",style:r},W.createElement($F,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:Lh(t.s+100*i.left,0,100),v:Lh(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+Xn(t.s)+"%, Brightness "+Xn(t.v)+"%"},W.createElement(UF,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:A2(t)})))}),BF=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},P0e=function(e,t){return e.toLowerCase()===t.toLowerCase()||BF(M2(e),M2(t))};function L0e(e,t,n){var r=L2(n),i=F.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],s=F.useRef({color:t,hsva:o});F.useEffect(function(){if(!e.equal(t,s.current.color)){var c=e.toHsva(t);s.current={hsva:c,color:t},a(c)}},[t,e]),F.useEffect(function(){var c;BF(o,s.current.hsva)||e.equal(c=e.fromHsva(o),s.current.color)||(s.current={hsva:o,color:c},r(c))},[o,e,r]);var l=F.useCallback(function(c){a(function(d){return Object.assign({},d,c)})},[]);return[o,l]}var j0e=typeof window<"u"?F.useLayoutEffect:F.useEffect,M0e=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},mA=new Map,A0e=function(e){j0e(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!mA.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}`,mA.set(t,n);var r=M0e();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},N0e=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=FF(e,["className","colorModel","color","onChange"]),s=F.useRef(null);A0e(s);var l=L0e(n,i,o),c=l[0],d=l[1],f=lO(["react-colorful",t]);return W.createElement("div",I0({},a,{ref:s,className:f}),W.createElement(k0e,{hsva:c,onChange:d}),W.createElement(C0e,{hue:c.h,onChange:d,className:"react-colorful__last-control"}))},R0e={defaultColor:"000",toHsva:w0e,fromHsva:function(e){return x0e({h:e.h,s:e.s,v:e.v,a:1})},equal:P0e},D0e=function(e){return W.createElement(N0e,I0({},e,{colorModel:R0e}))};const I0e=({getColorForKey:e})=>({tag:t,editTag:n,toggle:r,tagEdited:i,isOpen:o,tagEdit:a})=>{const[s,l]=F.useState(t),[c,d]=F.useState(e(t)),[f,p,,m]=_n(),{editing:v,error:y,edited:x,errorData:_}=a,w=L0(async()=>{await n({oldName:t,newName:s,color:c}),r()}),S=In(m,()=>x&&i({oldName:t,newName:s,color:c}));return g.jsx(fa,{isOpen:o,toggle:r,centered:!0,onClosed:S,children:g.jsxs("form",{name:"editTag",onSubmit:w,children:[g.jsx(ha,{toggle:r,children:"Edit tag"}),g.jsxs(Co,{children:[g.jsxs(h0,{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(De,{icon:cY,className:"edit-tag-modal__color-icon"})}),g.jsx($E,{isOpen:f,toggle:p,target:"colorPickerBtn",placement:"right",hideArrow:!0,popperClassName:"edit-tag-modal__popover",children:g.jsx(D0e,{color:c,onChange:d})}),g.jsx(yu,{value:s,placeholder:"Tag",required:!0,onChange:({target:E})=>l(E.value)})]}),y&&g.jsx(qr,{type:"error",small:!0,className:"mt-2",children:g.jsx(ia,{errorData:_,fallbackMessage:"Something went wrong while editing the tag :("})})]}),g.jsxs(Il,{children:[g.jsx(_t,{type:"button",color:"link",onClick:r,children:"Cancel"}),g.jsx(_t,{color:"primary",disabled:v,children:v?"Saving...":"Save"})]})]})})},qs={Enter:"Enter",Escape:"Escape",Tab:"Tab",Backspace:"Backspace",UpArrow:"ArrowUp",UpArrowCompat:"Up",DownArrow:"ArrowDown",DownArrowCompat:"Down",PageDown:"PageDown",PageUp:"PageUp"},cO=Symbol("Create new tag"),zF=Symbol("No options"),bc=()=>{},Vn=W.createContext(void 0);function gA(e,t){return e===t?[]:e.filter(n=>!t.includes(n))}function F0e(e){return e.selectionStart===0&&e.selectionEnd===0}function $0e(e){const t=e.value.length;return e.selectionStart===t&&e.selectionEnd===t}function F0(e){return`${e}-label`}function U0e(e){return`${e}-combobox`}function B0e(e){return`${e}-input`}function VF(e){return`${e}-listbox`}function HF(e,t){return`${e}-option-${q0e(t)}`}function z0e(e,t){if((e==null?void 0:e.value)===cO&&e.disabled===!1)return{value:t,label:t}}function V0e(e){const t=z0e(e.activeOption,e.value)||e.activeOption||X0e(e.value,e.options);return t&&!t.disabled?t:void 0}function H0e(e,t,n){const r=t-1;return e>r?n:en===e.value)}const K0e=/[-\\^$*+?.()|[\]{}]/g;function WF(e){return e.replace(K0e,"\\$&")}function YF(e){return new RegExp(WF(e),"i")}function Z0e(e){return new RegExp(`^${WF(e)}$`,"i")}function Q0e(e,t){if(e){const n=YF(e);return t.filter(r=>n.test(r.label))}else return[].concat(t)}function X0e(e,t){const n=Z0e(e);return t.find(r=>n.test(r.label))||null}const J0e={autoComplete:"off",autoCorrect:"off","data-form-type":"other",spellCheck:!1};function e_e({allowBackspace:e,ariaDescribedBy:t,ariaErrorMessage:n,delimiterKeys:r}){const{id:i,comboBoxRef:o,inputRef:a,isDisabled:s,isInvalid:l,managerRef:c}=F.useContext(Vn),d=F.useMemo(()=>{const v=U=>{const R=U.currentTarget.value;c.current.updateInputValue(R),document.activeElement===a.current&&c.current.listBoxExpand()},y=()=>{c.current.listBoxExpand()},x=U=>{var R;((R=o.current)==null?void 0:R.contains(U.relatedTarget))===!1&&c.current.listBoxCollapse()},_=()=>{c.current.listBoxExpand()},w=U=>{const{activeIndex:R,isExpanded:V}=c.current.state;V?(U.preventDefault(),c.current.updateActiveIndex(R+1)):($0e(U.currentTarget)||U.altKey)&&(U.preventDefault(),c.current.listBoxExpand())},S=U=>{const{activeIndex:R,isExpanded:V}=c.current.state;V?(U.preventDefault(),c.current.updateActiveIndex(R-1)):F0e(U.currentTarget)&&(U.preventDefault(),c.current.listBoxExpand())},E=U=>{const{isExpanded:R,options:V}=c.current.state;R&&(U.preventDefault(),c.current.updateActiveIndex(V.length-1))},C=U=>{c.current.state.isExpanded&&(U.preventDefault(),c.current.updateActiveIndex(0))},k=()=>{c.current.state.isExpanded?c.current.listBoxCollapse():c.current.updateInputValue("")},j=()=>{if(e){const{value:U,selected:R}=c.current.state,V=R[R.length-1];U===""&&V&&c.current.selectTag(V)}},N=U=>{c.current.state.isExpanded&&(U.preventDefault(),c.current.selectTag())};return{onBlur:x,onChange:v,onClick:_,onFocus:y,onKeyDown:U=>{if(U.key===qs.UpArrow)return S(U);if(U.key===qs.DownArrow)return w(U);if(U.key===qs.PageUp)return C(U);if(U.key===qs.PageDown)return E(U);if(U.key===qs.Escape)return k();if(U.key===qs.Backspace)return j();if(r.includes(U.key))return N(U)}}},[e,o,r,a,c]),{activeOption:f,isExpanded:p,value:m}=c.current.state;return{...J0e,"aria-autocomplete":"list","aria-activedescendant":f?HF(i,f):void 0,"aria-controls":VF(i),"aria-describedby":t||void 0,"aria-disabled":s,"aria-errormessage":l&&n||void 0,"aria-invalid":l,"aria-labelledby":F0(i),"aria-expanded":p,id:B0e(i),onBlur:s?bc:d.onBlur,onChange:s?bc:d.onChange,onClick:s?bc:d.onClick,onFocus:s?bc:d.onFocus,onKeyDown:s?bc:d.onKeyDown,ref:a,role:"combobox",type:"text",value:m}}const t_e={position:"absolute",width:0,height:0,visibility:"hidden",overflow:"scroll",whiteSpace:"pre"},n_e=["font-family","font-size","font-style","font-weight","letter-spacing","text-transform"];function r_e({allowResize:e=!0,text:t}){const n=F.useRef(null),{inputRef:r}=F.useContext(Vn),[i,o]=F.useState(null);return F.useLayoutEffect(()=>{if(e&&r.current&&n.current&&window.getComputedStyle){const a=window.getComputedStyle(r.current);n_e.forEach(s=>{const l=a.getPropertyValue(s);n.current.style.setProperty(s,l)})}},[e,r,n]),F.useLayoutEffect(()=>{var a;if(e){const s=Math.ceil(((a=n.current)==null?void 0:a.scrollWidth)??0)+2;i!==s&&o(s)}},[e,t,i]),{width:i,sizerProps:{ref:n,style:t_e}}}function i_e(){const{id:e,inputRef:t,listBoxRef:n,managerRef:r}=F.useContext(Vn),i=r.current.state.activeIndex===-1,o=F.useCallback(a=>{var s;a.target!==t.current&&((s=t.current)==null||s.focus({preventScroll:!0}))},[t]);return F.useEffect(()=>{var a;i&&((a=n.current)==null||a.scrollTo({top:0}))},[n,i]),{"aria-labelledby":F0(e),id:VF(e),onFocus:o,ref:n,role:"listbox",tabIndex:-1}}function o_e({activateFirstOption:e,allowNew:t,collapseOnSelect:n,newOptionText:r,noOptionsText:i,onAdd:o,onDelete:a,onCollapse:s,onExpand:l,onInput:c,onShouldCollapse:d,onShouldExpand:f,onValidate:p,selected:m,suggestions:v,suggestionsTransform:y}){const x=F.useRef(),[_,w]=F.useState(null),[S,E]=F.useState(!1),[C,k]=F.useState(""),j=F.useMemo(()=>{const G=y(C,v);return C&&(t&&G.push({disabled:typeof p=="function"?!p(C):!1,label:r,value:cO}),G.length===0&&G.push({disabled:!0,label:i,value:zF})),G},[t,r,i,p,v,y,C]),N=_?R2(_,j):-1,U=e?Math.max(N,0):N,R=j[U],V={activeIndex:U,activeOption:R,isExpanded:S,options:j,selected:m,value:C},Y={tagsAdded:x.current?gA(m,x.current.state.selected):[],tagsDeleted:x.current?gA(x.current.state.selected,m):[]},X={listBoxCollapse(){S&&((d==null?void 0:d(V.value))??!0)&&(E(!1),w(null),s==null||s())},listBoxExpand(){!S&&((f==null?void 0:f(V.value))??!0)&&(E(!0),w(j[U]),l==null||l())},updateActiveIndex(G){const Z=H0e(G,j.length,e?0:-1);w(j[Z])},updateInputValue(G){C!==G&&(k(G),c==null||c(G))},selectTag(G){if(G??(G=V0e(V)),G){const Z=R2(G,V.selected);Z>-1?a(Z):o(G),n&&this.listBoxCollapse(),this.updateInputValue("")}}};return x.current={...X,flags:Y,state:V},x}function a_e(e){const{id:t,inputRef:n,managerRef:r}=F.useContext(Vn),i=F.useRef(null),o=r.current.state.options[e],a=e===r.current.state.activeIndex,s=o.disabled??!1,l=R2(o,r.current.state.selected)>-1,c=F.useCallback(()=>{var f;r.current.selectTag(),(f=n.current)==null||f.focus()},[n,r]),d=F.useCallback(()=>{e!==r.current.state.activeIndex&&r.current.updateActiveIndex(e)},[e,r]);return F.useEffect(()=>{var f;a&&((f=i.current)==null||f.scrollIntoView({block:"nearest",inline:"start"}))},[a,r.current.state.options]),{option:{...o,active:a,disabled:s,index:e,selected:l},optionProps:{"aria-disabled":s,"aria-posinset":e+1,"aria-selected":s?void 0:l,"aria-setsize":r.current.state.options.length,id:HF(t,o),onClick:c,onMouseDown:d,ref:i,role:"option",tabIndex:-1}}}function s_e({inputRef:e,managerRef:t}){return F.useRef({input:{blur(){var n;(n=e.current)==null||n.blur()},focus(){var n;(n=e.current)==null||n.focus()},get value(){return t.current.state.value},set value(n){typeof n!="string"&&(n=String(n)),t.current.updateInputValue(n)}},listBox:{collapse(){t.current.listBoxCollapse()},expand(){t.current.listBoxExpand()},get activeOption(){return t.current.state.activeOption},get isExpanded(){return t.current.state.isExpanded}},select(n){t.current.selectTag(n)}}).current}function l_e({onBlur:e,onFocus:t}){const[n,r]=F.useState(!1),{id:i,inputRef:o}=F.useContext(Vn),a=F.useRef(null),s=F.useMemo(()=>({"aria-describedby":F0(i),id:i,onFocus(){r(!0),t==null||t()},onBlur(){var l;(l=a.current)!=null&&l.contains(document.activeElement)||(r(!1),e==null||e())},onClick(){var l;document.activeElement===a.current&&((l=o.current)==null||l.focus())},ref:a,tabIndex:-1}),[o,i,e,t,a]);return{isActive:n,rootProps:s}}function c_e(e,t){const{isDisabled:n,managerRef:r}=F.useContext(Vn),i=r.current.state.selected[e],o=F.useCallback(()=>r.current.selectTag(i),[r,i]);return{tag:i,tagProps:{"aria-disabled":n,title:gy(t,i.label),onClick:n?bc:o}}}function u_e(){var e;const{inputRef:t,managerRef:n}=F.useContext(Vn),r=F.useRef(),i=n.current.flags.tagsDeleted.length,o=(e=r.current)==null?void 0:e.contains(document.activeElement);return F.useLayoutEffect(()=>{var a,s;if(i){const l=(a=r.current)==null?void 0:a.contains(document.activeElement);o&&!l&&((s=t.current)==null||s.focus({preventScroll:!0}))}},[t,o,r,i]),{listRef:r}}const d_e={position:"absolute",width:1,height:1,left:-9999,overflow:"hidden",clip:"rect(0 0 0 0)"};function f_e({ariaAddedText:e,ariaDeletedText:t}){const{managerRef:n}=F.useContext(Vn),r=F.useRef([]);return n.current.flags.tagsAdded.forEach(i=>{r.current.push(gy(e,i.label))}),n.current.flags.tagsDeleted.forEach(i=>{r.current.push(gy(t,i.label))}),W.createElement("div",{"aria-live":"polite","aria-relevant":"additions",role:"status",style:d_e},r.current.join(` +`))}function h_e({children:e}){const{classNames:t,comboBoxRef:n,id:r}=F.useContext(Vn);return W.createElement("div",{className:t.comboBox,id:U0e(r),ref:n},e)}const p_e=({classNames:e,text:t})=>W.createElement("mark",{className:e.highlight},t);function m_e({option:e,query:t,render:n=p_e}){const{classNames:r}=F.useContext(Vn);if(e.value===cO||e.value===zF)return W.createElement(W.Fragment,null,gy(e.label,t));if(t){const i=Y0e(e.label,t);if(i){const o=n({text:i[1],classNames:r});return W.createElement(W.Fragment,null,i[0],o,i[2])}}return W.createElement(W.Fragment,null,e.label)}const g_e=W.memo(m_e),v_e=({classNames:e,inputWidth:t,...n})=>W.createElement("input",{className:e.input,style:{width:t},...n});function y_e({allowBackspace:e=!0,allowResize:t=!0,ariaDescribedBy:n,ariaErrorMessage:r,delimiterKeys:i,placeholderText:o,render:a=v_e}){const{classNames:s}=F.useContext(Vn),{value:l,...c}=e_e({allowBackspace:e,ariaDescribedBy:n,ariaErrorMessage:r,delimiterKeys:i}),d=l.lengthW.createElement("div",{className:t.label,id:n},e);function b_e({children:e,render:t=__e}){const{classNames:n,id:r}=F.useContext(Vn);return t({children:e,classNames:n,id:F0(r)})}function w_e({children:e}){const{classNames:t,managerRef:n}=F.useContext(Vn),r=i_e();return!n.current.state.isExpanded||W.Children.count(e)===0?null:W.createElement("div",{className:t.listBox,...r},e)}const x_e=({children:e,classNames:t,option:n,...r})=>{const i=[t.option];return n.active&&i.push(t.optionIsActive),W.createElement("div",{className:i.join(" "),...r},e)};function S_e({children:e,index:t,render:n=x_e}){const{classNames:r}=F.useContext(Vn),{option:i,optionProps:o}=a_e(t);return n({classNames:r,children:e,option:i,...o})}const E_e=({children:e,classNames:t,isActive:n,isDisabled:r,isInvalid:i,...o})=>{const a=[t.root];return n&&a.push(t.rootIsActive),r&&a.push(t.rootIsDisabled),i&&a.push(t.rootIsInvalid),W.createElement("div",{className:a.join(" "),...o},e)};function T_e({children:e,onBlur:t,onFocus:n,render:r=E_e}){const{classNames:i,isDisabled:o,isInvalid:a}=F.useContext(Vn),{isActive:s,rootProps:l}=l_e({onBlur:t,onFocus:n});return r({children:e,classNames:i,isActive:s,isDisabled:o,isInvalid:a,...l})}const O_e=({classNames:e,tag:t,...n})=>W.createElement("button",{type:"button",className:e.tag,...n},W.createElement("span",{className:e.tagName},t.label));function C_e({render:e=O_e,index:t,title:n}){const{classNames:r}=F.useContext(Vn),{tag:i,tagProps:o}=c_e(t,n);return e({classNames:r,tag:i,...o})}function k_e({children:e,label:t}){const{classNames:n}=F.useContext(Vn),{listRef:r}=u_e();return W.createElement("ul",{className:n.tagList,"aria-label":t,ref:r,role:"list"},e.map(i=>W.createElement("li",{className:n.tagListItem,key:i.key,role:"listitem"},i)))}const P_e={root:"react-tags",rootIsActive:"is-active",rootIsDisabled:"is-disabled",rootIsInvalid:"is-invalid",label:"react-tags__label",tagList:"react-tags__list",tagListItem:"react-tags__list-item",tag:"react-tags__tag",tagName:"react-tags__tag-name",comboBox:"react-tags__combobox",input:"react-tags__combobox-input",listBox:"react-tags__listbox",option:"react-tags__listbox-option",optionIsActive:"is-active",highlight:"react-tags__listbox-option-highlight"},L_e=[qs.Enter];function j_e({activateFirstOption:e=!1,allowBackspace:t=!0,allowNew:n=!1,allowResize:r=!0,ariaAddedText:i="Added tag %value%",ariaDescribedBy:o,ariaErrorMessage:a,ariaDeletedText:s="Removed tag %value%",classNames:l=P_e,collapseOnSelect:c=!1,deleteButtonText:d="Remove %value% from the list",delimiterKeys:f=L_e,id:p="react-tags",isDisabled:m=!1,isInvalid:v=!1,labelText:y="Select tags",newOptionText:x="Add %value%",noOptionsText:_="No options found for %value%",onAdd:w,onBlur:S,onCollapse:E,onDelete:C,onExpand:k,onFocus:j,onInput:N,onShouldCollapse:U,onShouldExpand:R,onValidate:V,placeholderText:Y="Add a tag",renderHighlight:X,renderInput:G,renderLabel:Z,renderOption:te,renderRoot:le,renderTag:q,selected:I=[],suggestions:D=[],suggestionsTransform:H=Q0e,tagListLabelText:ie="Selected tags"},z){const K=F.useRef(null),re=F.useRef(null),ae=F.useRef(null),he=o_e({activateFirstOption:e,allowNew:n,collapseOnSelect:c,newOptionText:x,noOptionsText:_,onAdd:w,onDelete:C,onCollapse:E,onExpand:k,onInput:N,onShouldCollapse:U,onShouldExpand:R,onValidate:V,selected:I,suggestions:D,suggestionsTransform:H}),O=s_e({inputRef:re,managerRef:he});return z&&(typeof z=="function"?z(O):z.current=O),W.createElement(Vn.Provider,{value:{classNames:l,comboBoxRef:K,id:p,inputRef:re,isDisabled:m,isInvalid:v,listBoxRef:ae,managerRef:he}},W.createElement(T_e,{onBlur:S,onFocus:j,render:le},W.createElement(b_e,{render:Z},y),W.createElement(k_e,{label:ie},he.current.state.selected.map((M,$)=>W.createElement(C_e,{key:N2(M),index:$,render:q,title:d}))),W.createElement(h_e,null,W.createElement(y_e,{allowBackspace:t,allowResize:r,ariaDescribedBy:o,ariaErrorMessage:a,delimiterKeys:f,placeholderText:Y,render:G}),W.createElement(w_e,null,he.current.state.options.map((M,$)=>W.createElement(S_e,{key:N2(M),index:$,render:te},W.createElement(g_e,{option:M,query:he.current.state.value,render:X}))))),W.createElement(f_e,{ariaAddedText:i,ariaDeletedText:s})))}const M_e=W.forwardRef(j_e),A_e=/\s+/g,GF=e=>e.trim().toLowerCase().replace(A_e,"-"),qF=({tag:e,colorGenerator:t})=>g.jsx("div",{style:{backgroundColor:t.getColorForKey(e)},className:"tag-bullet"}),KF="Tag not found",ZF="Add tag",N_e=e=>e!==KF,R_e=e=>e===ZF,vA=e=>({label:e,value:e}),D_e=e=>({tag:t,onClick:n})=>g.jsx(QT,{colorGenerator:e,text:t.label,clearable:!0,className:"react-tags__tag",onClose:n}),I_e=(e,t)=>({option:n,classNames:r,...i})=>{const o=N_e(n.label),a=R_e(n.label);return g.jsx("div",{className:rt(r.option,{[r.optionIsActive]:o&&n.active,"react-tags__listbox-option--not-selectable":!o}),...i,children:o?g.jsxs(g.Fragment,{children:[!a&&g.jsx(qF,{tag:`${n.label}`,colorGenerator:e}),a?g.jsxs("i",{children:['Add "',GF((t==null?void 0:t.input.value)??""),'"']}):n.label]}):g.jsx("i",{children:n.label})})},F_e=e=>({selectedTags:t,onChange:n,placeholder:r,listTags:i,tagsList:o,allowNew:a=!0})=>{F.useEffect(()=>{i()},[]);const s=Hl("shortUrlCreation"),l=(s==null?void 0:s.tagFilteringMode)??"startsWith",c=ws();return g.jsx(M_e,{ref:c,selected:t.map(vA),suggestions:o.tags.filter(d=>!t.includes(d)).map(vA),renderTag:D_e(e),renderOption:I_e(e,c.current),activateFirstOption:!0,allowNew:a,newOptionText:ZF,noOptionsText:KF,placeholderText:r??"Add tags to the URL",delimiterKeys:["Enter","Tab",","],suggestionsTransform:(d,f)=>{const p=d.toLowerCase().trim();return p.length<1?[]:[...f.filter(({label:m})=>l==="includes"?m.includes(p):m.startsWith(p))].slice(0,5)},onDelete:d=>{const f=[...t];f.splice(d,1),n(f)},onAdd:({label:d})=>n([...t,...d.split(",").map(GF)])})},D2="shlink/tagDelete",$_e={deleting:!1,deleted:!1,error:!1},QF=Dn(`${D2}/tagDeleted`),U_e=e=>{const t=Ir(`${D2}/deleteTag`,async r=>{await e().deleteTags([r])}),{reducer:n}=fr({name:D2,initialState:$_e,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:ga(o)})),r.addCase(t.fulfilled,()=>({deleting:!1,deleted:!0,error:!1}))}});return{reducer:n,deleteTag:t}},uO="shlink/tagEdit",B_e={editing:!1,edited:!1,error:!1},XF=Dn(`${uO}/tagEdited`),z_e=(e,t)=>Ir(`${uO}/editTag`,async({oldName:n,newName:r,color:i})=>(await e().editTag(n,r),t.setColorForKey(r,i),{oldName:n,newName:r,color:i})),V_e=e=>fr({name:uO,initialState:B_e,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:ga(r)})),t.addCase(e.fulfilled,(n,{payload:r})=>({...c8(["oldName","newName"],r),editing:!1,edited:!0,error:!1}))}}),dO="shlink/tagsList",X1={tags:[],filteredTags:[],stats:{},loading:!1,error:!1},yA=(e,t)=>n=>n===e?t:n,_A=(e,t)=>PT(n=>n===t,e),H_e=(e,t)=>e.reduce((n,[r,i])=>{if(!n[r])return n;const{bots:o,nonBots:a}=i,s=n[r];return{...n,[r]:{...s,visitsSummary:s.visitsSummary&&{total:s.visitsSummary.total+o+a,bots:s.visitsSummary.bots+o,nonBots:s.visitsSummary.nonBots+a},visitsCount:s.visitsCount+o+a}}},{...t}),W_e=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),{})),Y_e=(e,t=!0)=>Ir(`${dO}/listTags`,async(n,{getState:r})=>{const{tagsList:i}=r();if(!t&&!ai(i.tags))return i;const{tags:o,stats:a}=await e().tagsStats(),s=a.reduce((l,{tag:c,...d})=>(l[c]=d,l),{});return{tags:o,stats:s}}),JF=Dn(`${dO}/filterTags`),G_e=(e,t)=>fr({name:dO,initialState:X1,reducers:{},extraReducers:n=>{n.addCase(JF,(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})=>({...X1,error:!0,errorData:ga(i)})),n.addCase(e.fulfilled,(r,{payload:i})=>({...X1,stats:i.stats,tags:i.tags,filteredTags:i.tags})),n.addCase(QF,({tags:r,filteredTags:i,...o},{payload:a})=>({...o,tags:_A(r,a),filteredTags:_A(i,a)})),n.addCase(XF,({tags:r,filteredTags:i,stats:o,...a},{payload:s})=>({...a,stats:{...o,[s.newName]:o[s.oldName]},tags:r.map(yA(s.oldName,s.newName)).sort(),filteredTags:i.map(yA(s.oldName,s.newName)).sort()})),n.addCase(cp,(r,{payload:i})=>({...r,stats:H_e(W_e(i.createdVisits),r.stats)})),n.addCase(t.fulfilled,({tags:r,...i},{payload:o})=>({...i,tags:r.concat(o.tags.filter(a=>!r.includes(a)))}))}}),q_e={tag:"Tag",shortUrls:"Short URLs",visits:"Visits"},K_e=e=>Es(({filterTags:t,forceListTags:n,tagsList:r})=>{var i;const o=KT(),[a,s]=F.useState(((i=o.tags)==null?void 0:i.defaultOrdering)??{}),l=In(()=>r.filteredTags.map(d=>{var f,p,m;const v=r.stats[d],y=((f=o.visits)!=null&&f.excludeBots?(p=v==null?void 0:v.visitsSummary)==null?void 0:p.nonBots:(m=v==null?void 0:v.visitsSummary)==null?void 0:m.total)??(v==null?void 0:v.visitsCount)??0;return{tag:d,visits:y,shortUrls:(v==null?void 0:v.shortUrlsCount)??0}}),d=>a6(d,a));if(F.useEffect(()=>{n()},[]),r.loading)return g.jsx(Go,{loading:!0});if(r.error)return g.jsx(qr,{type:"error",children:g.jsx(ia,{errorData:r.errorData,fallbackMessage:"Error loading tags :("})});const c=d=>()=>{const f=g0(d,a.field,a.dir);s({field:f?d:void 0,dir:f})};return g.jsxs(g.Fragment,{children:[g.jsx(Qh,{className:"mb-3",onChange:t}),g.jsx(br,{className:"mb-3",children:g.jsx("div",{className:"col-lg-6 offset-lg-6",children:g.jsx(Xh,{items:q_e,order:a,onChange:(d,f)=>s({field:d,dir:f})})})}),(()=>{if(r.filteredTags.length<1)return g.jsx(Go,{children:"No tags found"});const d=l();return g.jsx(e,{sortedTags:d,currentOrder:a,orderByColumn:c})})()]})},()=>[wi.visits]),fO=({pagesCount:e,currentPage:t,setCurrentPage:n,centered:r=!0})=>{if(e<2)return null;const i=o=>()=>!Ph(o)&&n(o);return g.jsxs(UE,{listClassName:rt("flex-wrap mb-0 simple-paginator",{"justify-content-center":r}),children:[g.jsx(sl,{disabled:t<=1,children:g.jsx(ll,{previous:!0,tag:"span",onClick:i(t-1)})}),RF(t,e).map((o,a)=>g.jsx(sl,{disabled:Ph(o),active:t===o,children:g.jsx(ll,{role:"link",tag:"span",onClick:i(o),children:DF(o)})},IF(o,a))),g.jsx(sl,{disabled:t>=e,children:g.jsx(ll,{next:!0,tag:"span",onClick:i(t+1)})})]})},Z_e=20,Q_e=e=>({sortedTags:t,orderByColumn:n,currentOrder:r})=>{const i=F.useRef(!0),{search:o}=bn(),{page:a=1}=Fl(o),[s,l]=fge("page",Number(a)),c=wh(Z_e,t),d=c.length>1,f=c[s-1]??[];return F.useEffect(()=>{!i.current&&l(1),i.current=!1},[t]),F.useEffect(()=>{scrollTo(0,0)},[s]),g.jsxs(vn,{bodyClassName:d?"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:n("tag"),children:["Tag ",g.jsx(Pf,{currentOrder:r,field:"tag"})]}),g.jsxs("th",{className:"tags-table__header-cell text-lg-end",onClick:n("shortUrls"),children:["Short URLs ",g.jsx(Pf,{currentOrder:r,field:"shortUrls"})]}),g.jsxs("th",{className:"tags-table__header-cell text-lg-end",onClick:n("visits"),children:["Visits ",g.jsx(Pf,{currentOrder:r,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:[f.length===0&&g.jsx("tr",{children:g.jsx("td",{colSpan:4,className:"text-center",children:"No results found"})}),f.map(p=>g.jsx(e,{tag:p},p.tag))]})]}),d&&g.jsx("div",{className:"sticky-card-paginator",children:g.jsx(fO,{pagesCount:c.length,currentPage:s,setCurrentPage:l})})]},s)},X_e=(e,t,n)=>({tag:r})=>{const[i,o]=_n(),[a,s]=_n(),l=zl();return g.jsxs("tr",{className:"responsive-table__row",children:[g.jsxs("th",{className:"responsive-table__cell","data-th":"Tag",children:[g.jsx(qF,{tag:r.tag,colorGenerator:n})," ",r.tag]}),g.jsx("td",{className:"responsive-table__cell text-lg-end","data-th":"Short URLs",children:g.jsx(Ut,{to:`${l}/list-short-urls/1?tags=${encodeURIComponent(r.tag)}`,children:Tn(r.shortUrls)})}),g.jsx("td",{className:"responsive-table__cell text-lg-end","data-th":"Visits",children:g.jsx(Ut,{to:`${l}/tag/${r.tag}/visits`,children:Tn(r.visits)})}),g.jsx("td",{className:"responsive-table__cell text-lg-end",children:g.jsxs(m0,{children:[g.jsxs(Ue,{onClick:s,children:[g.jsx(De,{icon:QW,fixedWidth:!0,className:"me-1"})," Edit"]}),g.jsxs(Ue,{onClick:o,children:[g.jsx(De,{icon:fY,fixedWidth:!0,className:"me-1"})," Delete"]})]})}),g.jsx(t,{tag:r.tag,toggle:s,isOpen:a}),g.jsx(e,{tag:r.tag,toggle:o,isOpen:i})]})},J_e=(e,t)=>{e.serviceFactory("TagsSelector",F_e,"ColorGenerator"),e.decorator("TagsSelector",t(["tagsList"],["listTags"])),e.serviceFactory("DeleteTagConfirmModal",()=>b0e),e.decorator("DeleteTagConfirmModal",t(["tagDelete"],["deleteTag","tagDeleted"])),e.serviceFactory("EditTagModal",I0e,"ColorGenerator"),e.decorator("EditTagModal",t(["tagEdit"],["editTag","tagEdited"])),e.serviceFactory("TagsTableRow",X_e,"DeleteTagConfirmModal","EditTagModal","ColorGenerator"),e.serviceFactory("TagsTable",Q_e,"TagsTableRow"),e.serviceFactory("TagsList",K_e,"TagsTable"),e.decorator("TagsList",t(["tagsList","mercureInfo"],["forceListTags","filterTags","createNewVisits","loadMercureInfo"])),e.serviceFactory("tagEditReducerCreator",V_e,"editTag"),e.serviceFactory("tagEditReducer",mt("reducer"),"tagEditReducerCreator"),e.serviceFactory("tagDeleteReducerCreator",U_e,"apiClientFactory"),e.serviceFactory("tagDeleteReducer",mt("reducer"),"tagDeleteReducerCreator"),e.serviceFactory("tagsListReducerCreator",G_e,"listTags","createShortUrl"),e.serviceFactory("tagsListReducer",mt("reducer"),"tagsListReducerCreator");const n=r=>({apiClientFactory:i})=>Y_e(i,r);e.factory("listTags",n(!1)),e.factory("forceListTags",n(!0)),e.serviceFactory("filterTags",()=>JF),e.serviceFactory("deleteTag",mt("deleteTag"),"tagDeleteReducerCreator"),e.serviceFactory("tagDeleted",()=>QF),e.serviceFactory("editTag",z_e,"apiClientFactory","ColorGenerator"),e.serviceFactory("tagEdited",()=>XF)};var e1e="Expected a function",e$="__lodash_hash_undefined__",t$=1/0,t1e="[object Function]",n1e="[object GeneratorFunction]",r1e="[object Symbol]",i1e=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o1e=/^\w*$/,a1e=/^\./,s1e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,l1e=/[\\^$.*+?()[\]{}|]/g,c1e=/\\(\\)?/g,u1e=/^\[object .+?Constructor\]$/,d1e=typeof Fc=="object"&&Fc&&Fc.Object===Object&&Fc,f1e=typeof self=="object"&&self&&self.Object===Object&&self,hO=d1e||f1e||Function("return this")();function h1e(e,t){return e==null?void 0:e[t]}function p1e(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var m1e=Array.prototype,g1e=Function.prototype,n$=Object.prototype,J1=hO["__core-js_shared__"],bA=function(){var e=/[^.]+$/.exec(J1&&J1.keys&&J1.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),r$=g1e.toString,pO=n$.hasOwnProperty,i$=n$.toString,v1e=RegExp("^"+r$.call(pO).replace(l1e,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),wA=hO.Symbol,y1e=m1e.splice,_1e=o$(hO,"Map"),jh=o$(Object,"create"),xA=wA?wA.prototype:void 0,SA=xA?xA.toString:void 0;function Pl(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1}function P1e(e,t){var n=this.__data__,r=$0(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}Ku.prototype.clear=T1e;Ku.prototype.delete=O1e;Ku.prototype.get=C1e;Ku.prototype.has=k1e;Ku.prototype.set=P1e;function Wl(e){var t=-1,n=e?e.length:0;for(this.clear();++tr.toFixed(n).replace(".",t):r=>`${r}`.replace(".",t):n?r=>r.toFixed(n):r=>`${r}`}function vO(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 X1e(e={stringFormatter:vO()}){return t=>e.stringFormatter(t.toString().slice(7,-1))}function J1e(e={stringFormatter:vO()}){return t=>{if(t===null)return"";let n=JSON.stringify(t);return n===void 0?"":(n[0]==='"'&&(n=n.replace(/^"(.+)"$/,"$1")),e.stringFormatter(n))}}function TA(e,t,n){const r=e[t];return r===void 0?n:r}function l$(e,t){try{return Array.isArray(t)?e.push(...t):e.push(t),e}catch{return e.concat(t)}}function I2(e,t){let n=!0;return e.reduce((r,i)=>(i==null&&(i=""),n?(n=!1,`${i}`):`${r}${t}${i}`),"")}var OA;(function(e){e.header="header",e.undefined="undefined",e.boolean="boolean",e.number="number",e.bigint="bigint",e.string="string",e.symbol="symbol",e.function="function",e.object="object"})(OA||(OA={}));class ebe{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||vO(),i=J1e({stringFormatter:r}),o={header:r,undefined:eb,boolean:eb,number:Q1e(),bigint:eb,string:r,symbol:X1e({stringFormatter:r}),function:i,object:i};return n.formatters=Object.assign(Object.assign({},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=>EA(i,r,n):i=>TA(i,r,n)};if(typeof r=="object"){const i="default"in r?r.default:n;if(typeof r.value=="string"){const o=r.value;return{label:r.label||r.value,value:r.value.includes(".")||r.value.includes("[")?a=>EA(a,o,i):a=>TA(a,o,i)}}if(typeof r.value=="function"){const o=r.label||r.value.name||"",a={label:o,default:i},s=r.value;return{label:o,value(l){const c=s(l,a);return c===void 0?i:c}}}}throw new Error("Invalid field info option. "+JSON.stringify(r))})}getHeader(){return I2(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(l$,[]),[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 I2(n,this.opts.delimiter)}processCell(t,n){return this.processValue(n.value(t))}processValue(t){const n=this.opts.formatters[typeof t];return n(t)}}class tbe extends ebe{constructor(t){super(t)}parse(t){const n=this.preprocessData(t);this.opts.fields=this.opts.fields||this.preprocessFieldsInfo(n.reduce((o,a)=>(Object.keys(a).forEach(s=>{o.includes(s)||o.push(s)}),o),[]),this.opts.defaultValue);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){if(t==null||n.length===0)throw new Error('Data should not be empty or the "fields" option should be included');if(typeof n[0]!="object")throw new Error('Data items should be objects or the "fields" option should be included')}return this.opts.transforms.length===0?n:n.map(r=>this.preprocessRow(r)).reduce(l$,[])}processData(t){return I2(t.map(n=>this.processRow(n)).filter(n=>n),this.opts.eol)}}var Pn;(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"})(Pn||(Pn={}));Pn.QUOTATION_MARK+"",Pn.QUOTATION_MARK,Pn.REVERSE_SOLIDUS+"",Pn.REVERSE_SOLIDUS,Pn.SOLIDUS+"",Pn.SOLIDUS,Pn.LATIN_SMALL_LETTER_B+"",Pn.BACKSPACE,Pn.LATIN_SMALL_LETTER_F+"",Pn.FORM_FEED,Pn.LATIN_SMALL_LETTER_N+"",Pn.NEWLINE,Pn.LATIN_SMALL_LETTER_R+"",Pn.CARRIAGE_RETURN,Pn.LATIN_SMALL_LETTER_T+"",Pn.TAB;var CA;(function(e){e[e.LEFT_BRACE=0]="LEFT_BRACE",e[e.RIGHT_BRACE=1]="RIGHT_BRACE",e[e.LEFT_BRACKET=2]="LEFT_BRACKET",e[e.RIGHT_BRACKET=3]="RIGHT_BRACKET",e[e.COLON=4]="COLON",e[e.COMMA=5]="COMMA",e[e.TRUE=6]="TRUE",e[e.FALSE=7]="FALSE",e[e.NULL=8]="NULL",e[e.STRING=9]="STRING",e[e.NUMBER=10]="NUMBER",e[e.SEPARATOR=11]="SEPARATOR"})(CA||(CA={}));var kA;(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"})(kA||(kA={}));var PA;(function(e){e[e.OBJECT=0]="OBJECT",e[e.ARRAY=1]="ARRAY"})(PA||(PA={}));var LA;(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"})(LA||(LA={}));const nbe=new tbe,rbe=e=>nbe.parse(e),ibe=6,jA="0123456789ABCDEF",obe=128,{floor:abe,random:sbe,sqrt:lbe,round:cbe}=Math,ube=()=>`#${GT(ibe,()=>jA[abe(sbe()*jA.length)]).join("")}`,MA=e=>e.toLowerCase().trim(),dbe=e=>(e.match(/../g)??[]).map(t=>parseInt(t,16)||0),fbe=(e=0,t=0,n=0)=>cbe(lbe(.299*e**2+.587*t**2+.114*n**2));class hbe{constructor(t){Te(this,"colors"),Te(this,"lights"),Te(this,"getColorForKey",r=>{const i=MA(r);return this.colors[i]||this.setColorForKey(i,ube())}),Te(this,"setColorForKey",(r,i)=>{var o;const a=MA(r);return this.colors[a]=i,(o=this.storage)==null||o.storeTagColors(this.colors),i}),Te(this,"isColorLightForKey",r=>{const i=this.getColorForKey(r).substring(1);if(Bl(this.lights[i])){const o=dbe(i);this.lights[i]=fbe(...o)>=obe}return this.lights[i]});var n;this.storage=t,this.colors=((n=this.storage)==null?void 0:n.getTagColors())??{},this.lights={}}}const c$=({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)},pbe=(e,t,n)=>{const r=new Blob([t],{type:"text/csv;charset=utf-8;"}),i=URL.createObjectURL(r);c$(e,i,n)};class mbe{constructor(t,n){this.fetch=t,this.window=n}async saveImage(t,n){const r=await this.fetch(t).then(o=>o.blob()),i=URL.createObjectURL(r);c$(this.window,i,n)}}class gbe{constructor(t,n){Te(this,"exportVisits",(r,i)=>{i.length&&this.exportCsv(r,i)}),Te(this,"exportShortUrls",r=>{r.length&&this.exportCsv("short_urls.csv",r)}),Te(this,"exportCsv",(r,i)=>{const o=this.jsonToCsv(i);pbe(this.window,o,r)}),this.window=t,this.jsonToCsv=n}}function vbe(e){e.constant("window",window),e.constant("fetch",window.fetch.bind(window)),e.service("ImageDownloader",mbe,"fetch","window"),e.service("ColorGenerator",hbe,"TagColorsStorage"),e.constant("jsonToCsv",rbe),e.service("ReportExporter",gbe,"window","jsonToCsv"),e.constant("setTimeout",window.setTimeout),e.constant("clearTimeout",window.clearTimeout),e.serviceFactory("useTimeoutToggle",uge,"setTimeout","clearTimeout")}const yO=e=>e.visitedUrl!==void 0,ybe=e=>e.visitedUrl!==void 0,_be=In(Ade(e=>yO(e.visit)?"orphanVisits":"nonOrphanVisits"),e=>({orphanVisits:[],nonOrphanVisits:[],...e})),Hm=(e,t)=>s8(mt(t),e),mp=({page:e,itemsPerPage:t,filter:n,dateRange:r})=>{const i=((r==null?void 0:r.startDate)&&ms(r==null?void 0:r.startDate))??void 0,o=((r==null?void 0:r.endDate)&&ms(r==null?void 0:r.endDate))??void 0,a=(n==null?void 0:n.excludeBots)||void 0;return{page:e,itemsPerPage:t,startDate:i,endDate:o,excludeBots:a}},gp=({visits:e,goBack:t,shortUrl:n,children:r,title:i})=>g.jsx("header",{children:g.jsxs(Xr,{body:!0,children:[g.jsxs("h2",{className:"d-flex justify-content-between align-items-center mb-0",children:[g.jsx(_t,{color:"link",size:"lg",className:"p-0 me-3",onClick:t,children:g.jsx(De,{icon:C4})}),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(aF,{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})]})}),u$=({title:e,footer:t,children:n})=>g.jsxs(Xr,{role:"document",children:[g.jsx(vu,{className:"chart-card__header",children:typeof e=="function"?e():e}),g.jsx(gu,{children:n}),t&&g.jsx(UI,{className:"chart-card__footer--sticky",children:t})]}),d$="label";function AA(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function bbe(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function f$(e,t){e.labels=t}function h$(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:d$;const r=[];e.datasets=t.map(i=>{const o=e.datasets.find(a=>a[n]===i[n]);return!o||!i.data||r.includes(o)?{...i}:(r.push(o),Object.assign(o,i),o)})}function wbe(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:d$;const n={labels:[],datasets:[]};return f$(n,e.labels),h$(n,e.datasets,t),n}function p$(e,t){return e.getElementsAtEventForMode(t.nativeEvent,"nearest",{intersect:!0},!1)}function xbe(e,t){const{height:n=150,width:r=300,redraw:i=!1,datasetIdKey:o,type:a,data:s,options:l,plugins:c=[],fallbackContent:d,updateMode:f,...p}=e,m=F.useRef(null),v=F.useRef(),y=()=>{m.current&&(v.current=new S0(m.current,{type:a,data:wbe(s,o),options:l&&{...l},plugins:c}),AA(t,v.current))},x=()=>{AA(t,null),v.current&&(v.current.destroy(),v.current=null)};return F.useEffect(()=>{!i&&v.current&&l&&bbe(v.current,l)},[i,l]),F.useEffect(()=>{!i&&v.current&&f$(v.current.config.data,s.labels)},[i,s.labels]),F.useEffect(()=>{!i&&v.current&&s.datasets&&h$(v.current.config.data,s.datasets,o)},[i,s.datasets]),F.useEffect(()=>{v.current&&(i?(x(),setTimeout(y)):v.current.update(f))},[i,l,s.labels,s.datasets,f]),F.useEffect(()=>{v.current&&(x(),setTimeout(y))},[a]),F.useEffect(()=>(y(),()=>x()),[]),W.createElement("canvas",Object.assign({ref:m,role:"img",height:n,width:r},p),d)}const Sbe=F.forwardRef(xbe);function _O(e,t){return S0.register(t),F.forwardRef((n,r)=>W.createElement(Sbe,Object.assign({},n,{ref:r,type:e})))}const Ebe=_O("line",bf),Tbe=_O("bar",_f),Obe=_O("doughnut",Ba),m$=({native:e},[t])=>{if(!(e!=null&&e.target))return;const n=e.target;n.style.cursor=t?"pointer":"default"},g$=({dataset:e,raw:t})=>`${e.label}: ${Tn(`${t}`)}`,Cbe=({label:e,raw:t})=>`${e}: ${Tn(`${t}`)}`,kbe=({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((a,s)=>g.jsxs("li",{className:"doughnut-chart-legend__item d-flex",children:[g.jsx("div",{className:"doughnut-chart-legend__item-color",style:{backgroundColor:i[s]??o}}),g.jsx("small",{className:"doughnut-chart-legend__item-text flex-fill",children:a})]},a))})},Pbe=e=>[{data:e,backgroundColor:["#97BBCD","#F7464A","#46BFBD","#FDB45C","#949FB1","#57A773","#414066","#08B2E3","#B6C454","#DCDCDC","#463730"],borderColor:Ate()?Mte:jte,borderWidth:2}],Lbe=(e,t)=>({labels:e,datasets:Pbe(t)}),jbe=F.memo(({stats:e})=>{const[t,n]=F.useState(),r=Eo(e),i=TT(e),o={plugins:{legend:{display:!1},tooltip:{intersect:!0,callbacks:{label:Cbe}}}},a=Lbe(r,i);return g.jsxs("div",{className:"row",children:[g.jsx("div",{className:"col-sm-12 col-md-7",children:g.jsx(Obe,{height:300,data:a,options:o,ref:s=>{s&&n(s)}})}),g.jsx("div",{className:"col-sm-12 col-md-5",children:t&&g.jsx(kbe,{chart:t})})]})}),NA=({title:e,stats:t})=>g.jsx(u$,{title:e,children:g.jsx(jbe,{stats:t})}),Mbe={"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"},v$={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"},ln={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},gr={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"},Oa={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class be{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=be.getVersionPrecision(t),o=be.getVersionPrecision(n);let a=Math.max(i,o),s=0;const l=be.map([t,n],c=>{const d=a-be.getVersionPrecision(c),f=c+new Array(d+1).join(".0");return be.map(f.split("."),p=>new Array(20-p.length).join("0")+p).reverse()});for(r&&(s=a-Math.min(i,o)),a-=1;a>=s;){if(l[0][a]>l[1][a])return 1;if(l[0][a]===l[1][a]){if(a===s)return 0;a-=1}else if(l[0][a]{r[s]=a[s]})}return t}static getBrowserAlias(t){return Mbe[t]}static getBrowserTypeByAlias(t){return v$[t]||""}}const Ct=/version\/(\d+(\.?_?\d+)+)/i,Abe=[{test:[/googlebot/i],describe(e){const t={name:"Googlebot"},n=be.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||be.getFirstMatch(Ct,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){const t={name:"Opera"},n=be.getFirstMatch(Ct,e)||be.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){const t={name:"Opera"},n=be.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||be.getFirstMatch(Ct,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){const t={name:"Samsung Internet for Android"},n=be.getFirstMatch(Ct,e)||be.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=be.getFirstMatch(Ct,e)||be.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){const t={name:"MZ Browser"},n=be.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||be.getFirstMatch(Ct,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){const t={name:"Focus"},n=be.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||be.getFirstMatch(Ct,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){const t={name:"Swing"},n=be.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||be.getFirstMatch(Ct,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){const t={name:"Opera Coast"},n=be.getFirstMatch(Ct,e)||be.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=be.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||be.getFirstMatch(Ct,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){const t={name:"Yandex Browser"},n=be.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||be.getFirstMatch(Ct,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){const t={name:"UC Browser"},n=be.getFirstMatch(Ct,e)||be.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){const t={name:"Maxthon"},n=be.getFirstMatch(Ct,e)||be.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){const t={name:"Epiphany"},n=be.getFirstMatch(Ct,e)||be.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){const t={name:"Puffin"},n=be.getFirstMatch(Ct,e)||be.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){const t={name:"Sleipnir"},n=be.getFirstMatch(Ct,e)||be.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=be.getFirstMatch(Ct,e)||be.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){const t={name:"WeChat"},n=be.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||be.getFirstMatch(Ct,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=be.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||be.getFirstMatch(Ct,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){const t={name:"Internet Explorer"},n=be.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){const t={name:"Microsoft Edge"},n=be.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=be.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){const t={name:"Vivaldi"},n=be.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){const t={name:"SeaMonkey"},n=be.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){const t={name:"Sailfish"},n=be.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=be.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){const t={name:"PhantomJS"},n=be.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){const t={name:"SlimerJS"},n=be.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=be.getFirstMatch(Ct,e)||be.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=be.getFirstMatch(Ct,e)||be.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=be.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){const t={name:"Tizen"},n=be.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||be.getFirstMatch(Ct,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){const t={name:"QupZilla"},n=be.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||be.getFirstMatch(Ct,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){const t={name:"Firefox"},n=be.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=be.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe(e){const t={name:"Miui"},n=be.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe(e){const t={name:"Chromium"},n=be.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||be.getFirstMatch(Ct,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){const t={name:"Chrome"},n=be.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=be.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=be.getFirstMatch(Ct,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){const t={name:"PlayStation 4"},n=be.getFirstMatch(Ct,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){const t={name:"Safari"},n=be.getFirstMatch(Ct,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){const t=/^(.*)\/(.*) /,n=/^(.*)\/(.*)[ \t]\((.*)/,r=e.search("\\(")!==-1?n:t;return{name:be.getFirstMatch(r,e),version:be.getSecondMatch(r,e)}}}],Nbe=[{test:[/Roku\/DVP/],describe(e){const t=be.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:gr.Roku,version:t}}},{test:[/windows phone/i],describe(e){const t=be.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:gr.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){const t=be.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=be.getWindowsVersionName(t);return{name:gr.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){const t={name:gr.iOS},n=be.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){const t=be.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=be.getMacOSVersionName(t),r={name:gr.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){const t=be.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:gr.iOS,version:t}}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t=be.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=be.getAndroidVersionName(t),r={name:gr.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){const t=be.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:gr.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t=be.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||be.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||be.getFirstMatch(/\bbb(\d+)/i,e);return{name:gr.BlackBerry,version:t}}},{test:[/bada/i],describe(e){const t=be.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:gr.Bada,version:t}}},{test:[/tizen/i],describe(e){const t=be.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:gr.Tizen,version:t}}},{test:[/linux/i],describe(){return{name:gr.Linux}}},{test:[/CrOS/],describe(){return{name:gr.ChromeOS}}},{test:[/PlayStation 4/],describe(e){const t=be.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:gr.PlayStation4,version:t}}}],Rbe=[{test:[/googlebot/i],describe(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe(e){const t=be.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:ln.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:ln.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:ln.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:ln.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:ln.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:ln.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:ln.tablet}}},{test(e){const t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){const t=be.getFirstMatch(/(ipod|iphone)/i,e);return{type:ln.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:ln.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe(){return{type:ln.mobile}}},{test(e){return e.getBrowserName(!0)==="blackberry"},describe(){return{type:ln.mobile,vendor:"BlackBerry"}}},{test(e){return e.getBrowserName(!0)==="bada"},describe(){return{type:ln.mobile}}},{test(e){return e.getBrowserName()==="windows phone"},describe(){return{type:ln.mobile,vendor:"Microsoft"}}},{test(e){const t=Number(String(e.getOSVersion()).split(".")[0]);return e.getOSName(!0)==="android"&&t>=3},describe(){return{type:ln.tablet}}},{test(e){return e.getOSName(!0)==="android"},describe(){return{type:ln.mobile}}},{test(e){return e.getOSName(!0)==="macos"},describe(){return{type:ln.desktop,vendor:"Apple"}}},{test(e){return e.getOSName(!0)==="windows"},describe(){return{type:ln.desktop}}},{test(e){return e.getOSName(!0)==="linux"},describe(){return{type:ln.desktop}}},{test(e){return e.getOSName(!0)==="playstation 4"},describe(){return{type:ln.tv}}},{test(e){return e.getOSName(!0)==="roku"},describe(){return{type:ln.tv}}}],Dbe=[{test(e){return e.getBrowserName(!0)==="microsoft edge"},describe(e){if(/\sedg\//i.test(e))return{name:Oa.Blink};const t=be.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:Oa.EdgeHTML,version:t}}},{test:[/trident/i],describe(e){const t={name:Oa.Trident},n=be.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){return e.test(/presto/i)},describe(e){const t={name:Oa.Presto},n=be.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:Oa.Gecko},n=be.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:Oa.Blink}}},{test:[/(apple)?webkit/i],describe(e){const t={name:Oa.WebKit},n=be.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];class RA{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=be.find(Abe,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=be.find(Nbe,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=be.find(Rbe,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=be.find(Dbe,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 be.assign({},this.parsedResult)}satisfies(t){const n={};let r=0;const i={};let o=0;if(Object.keys(t).forEach(a=>{const s=t[a];typeof s=="string"?(i[a]=s,o+=1):typeof s=="object"&&(n[a]=s,r+=1)}),r>0){const a=Object.keys(n),s=be.find(a,c=>this.isOS(c));if(s){const c=this.satisfies(n[s]);if(c!==void 0)return c}const l=be.find(a,c=>this.isPlatform(c));if(l){const c=this.satisfies(n[l]);if(c!==void 0)return c}}if(o>0){const a=Object.keys(i),s=be.find(a,l=>this.isBrowser(l,!0));if(s!==void 0)return this.compareVersion(i[s])}}isBrowser(t,n=!1){const r=this.getBrowserName().toLowerCase();let i=t.toLowerCase();const o=be.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(be.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 Ibe{static getParser(t,n=!1){if(typeof t!="string")throw new Error("UserAgent should be a string");return new RA(t,n)}static parse(t){return new RA(t).getResult()}static get BROWSER_MAP(){return v$}static get ENGINE_MAP(){return Oa}static get OS_MAP(){return gr}static get PLATFORMS_MAP(){return ln}}const Wm="Others",Fbe=["Android Browser","Chrome","Chromium","Firefox","Internet Explorer","Microsoft Edge","Opera","Safari","Samsung Internet for Android","Vivaldi","WeChat"],$be=e=>{if(!fo(e))return{browser:Wm,os:Wm};const{browser:{name:t},os:{name:n}}=Ibe.parse(e);return{os:n??Wm,browser:t&&Fbe.includes(t)?t:Wm}},Ube=e=>{var t;return fo(e)?((t=e.split("/")[e.includes("://")?2:0])==null?void 0:t.split(":")[0])??"":"Direct"},bO=(e,t)=>Object.values({...u8(t,t.map(()=>0)),...e}),DA={monthly:"Month",weekly:"Week",daily:"Day",hourly:"Hour"},Bbe={hourly:e=>({hours:e}),daily:e=>({days:e}),weekly:e=>({weeks:e}),monthly:e=>({months:e})},zbe={hourly:kfe,daily:DT,weekly:jfe,monthly:oy},wO={hourly:e=>Lu(e,"yyyy-MM-dd HH:00"),daily:e=>tl(e),weekly(e){const t=tl(xh(e)),n=tl(Nfe(e));return`${t} - ${n}`},monthly:e=>Lu(e,"yyyy-MM")},Vbe=e=>{const t=new Date,n=oa(e);return LT([[()=>DT(t,n)<=2,P1("hourly")],[()=>oy(t,n)<=1,P1("daily")],[()=>oy(t,n)<=6,P1("weekly")]])()??"monthly"},IA=(e,t)=>s8(n=>wO[e](oa(n.date)),t),Hbe=(e,t)=>t.reduce((n,r)=>{const i=wO[e](oa(r.date));return n[i]=n[i]??[],n[i].push(r),n},{}),Wbe=(e,t)=>{const n=zbe[e],r=wO[e],i=oa(t[0].date),o=oa(t[t.length-1].date),a=n(i,o),s=Bbe[e];return[r(o),...GT(a,l=>r(vfe(o,s(l))))]},Ybe=(e,t,n,r)=>{if(r)return[Object.keys(t),Object.values(t)];const i=Wbe(n,e);return[i,bO(t,i)]},FA=(e,t,n)=>({label:t,data:e,fill:!1,tension:.2,borderColor:n,backgroundColor:n});let tb=null;const Gbe=(e,t,[n],r)=>{if(!r||!n)return;const{index:i}=n;tb===e[i]?(r([]),tb=null):(r(e[i]&&t[e[i]]?t[e[i]]:[]),tb=e[i]??null)},qbe=({title:e,visits:t,highlightedVisits:n,highlightedLabel:r="Selected",setSelectedVisits:i})=>{const[o,a]=F.useState(t.length>0?Vbe(t[t.length-1].date):"monthly"),[s,l]=_n(!0),c=F.useRef(null),d=F.useRef(null),f=F.useMemo(()=>Hbe(o,t),[o,t]),p=F.useMemo(()=>IA(o,l2(t)),[o,t]),[m,v]=F.useMemo(()=>Ybe(t,p,o,s),[t,o,s]),y=F.useMemo(()=>bO(IA(o,l2(n)),m),[n,o,m]),x=()=>{const E=FA(v,"Visits",BE);if(n.length===0)return[E];const C=FA(y,r,l6);return[E,C]},_=()=>({labels:m,datasets:x()}),w={maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{intersect:!1,axis:"x",callbacks:{label:g$}}},scales:{y:{beginAtZero:!0,ticks:{precision:0,callback:Tn}},x:{title:{display:!0,text:DA[o]}}},onHover:m$},S=E=>g.jsx(Ebe,{ref:E,data:_(),options:w,onClick:C=>Gbe(m,f,p$(E.current,C),i)});return g.jsxs(Xr,{children:[g.jsxs(vu,{role:"heading",children:[e,g.jsx("div",{className:"float-end",children:g.jsxs(Zh,{children:[g.jsx(Gh,{caret:!0,color:"link",className:"btn-sm p-0",children:"Group by"}),g.jsx(zu,{end:!0,children:Object.entries(DA).map(([E,C])=>g.jsx(Ue,{active:o===E,onClick:()=>a(E),children:C},E))})]})}),g.jsx("div",{className:"float-end me-2",children:g.jsx(_u,{checked:s,onChange:l,children:g.jsx("small",{children:"Skip dates with no visits"})})})]}),g.jsxs(gu,{className:"line-chart-card__body",children:[n.length>0&&S(c),n.length===0&&S(d)]})]})},Kbe=({toggleClassName:e,ranges:t,value:n,setValue:r})=>g.jsxs(Zh,{children:[g.jsx(Gh,{caret:!0,color:"link",className:e,children:"Paginate"}),g.jsxs(zu,{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"})})]})]}),Zbe=e=>e.startsWith("hidden")?"":e,Qbe=e=>!!e&&Object.keys(e).length>0,Xbe=e=>e.length>20?e.length*10:void 0,Jbe=(e,t,n)=>{const r={data:e,label:n?"Non-selected":"Visits",backgroundColor:Pte,borderColor:BE,borderWidth:2};return t.every(i=>i===0)?[r]:[r,{label:n??"Selected",data:t,backgroundColor:Lte,borderColor:l6,borderWidth:2}]},ewe=(e,t,n,r)=>({labels:e,datasets:Jbe(t,n,r)}),twe=(e,[t],n)=>{!n||!t||n(e[t.index])},nwe=({stats:e,highlightedStats:t,highlightedLabel:n,onClick:r,max:i})=>{const o=Eo(e).map(Zbe),a=TT(Qbe(t)?Eo(t).reduce((v,y)=>(v[y]&&(v[y]-=t[y]),v),{...e}):e),s=bO(t??{},o),l=F.useRef(null),c=F.useRef(null),d={plugins:{legend:{display:!1},tooltip:{mode:"y",filter:({label:v})=>v!=="",callbacks:{label:g$}}},scales:{x:{beginAtZero:!0,stacked:!0,max:i,ticks:{precision:0,callback:Tn}},y:{stacked:!0}},onHover:m$,indexAxis:"y"},f=ewe(o,a,s,n),p=Xbe(o),m=(v,y)=>g.jsx(Tbe,{ref:y,data:f,options:d,height:p,onClick:x=>twe(o,p$(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)]})},rwe=e=>ty(e)==="String"?Xde(e):e,$A=([e])=>e,UA=([,e])=>e,Ym=({stats:e,highlightedStats:t,title:n,sortingItems:r,extraHeaderContent:i,withPagination:o=!0,...a})=>{const[s,l]=F.useState({}),[c,d]=F.useState(1),[f,p]=F.useState(50),m=(k,j)=>{const N=qM(k),U=s.field?Kde(In(s.field===Object.keys(j)[0]?$A:UA,rwe),N):N;return!s.dir||s.dir==="ASC"?U:l2(U)},v=k=>{const j=k[c-1];if(c[`hidden_${U}`,0])]},y=k=>g.jsx(fO,{currentPage:c,pagesCount:k,setCurrentPage:d}),x=(k,j,N)=>{const U=m(k,j),R=U.map($A),V=N&&qM({...u8(R,R.map(()=>0)),...N});if(U.length<=f)return{currentPageStats:Nm(U),currentPageHighlightedStats:V&&Nm(V)};const Y=wh(f,U),X=V&&wh(f,V);return{currentPageStats:Nm(v(Y)),currentPageHighlightedStats:X&&Nm(v(X)),pagination:y(Y.length),max:Hme(Math.max(...U.map(UA)))}},{currentPageStats:_,currentPageHighlightedStats:w,pagination:S,max:E}=x(e,r,t&&Object.keys(t).length>0?t:void 0),C=Object.keys(_);return g.jsx(u$,{title:()=>g.jsxs(g.Fragment,{children:[n,g.jsx("div",{className:"float-end",children:g.jsx(Xh,{isButton:!1,right:!0,items:r,order:s,onChange:(k,j)=>{l({field:k,dir:j}),d(1)}})}),o&&Object.keys(e).length>50&&g.jsx("div",{className:"float-end",children:g.jsx(Kbe,{toggleClassName:"btn-sm p-0 me-3",ranges:[50,100,200,500],value:f,setValue:k=>{p(k),d(1)}})}),i&&g.jsx("div",{className:"float-end",children:i(S?C:void 0)})]}),footer:S,children:g.jsx(nwe,{stats:_,highlightedStats:w,max:E,...a})})},iwe=()=>{const e=Oo(),{search:t}=bn(),{filtering:n,domain:r}=F.useMemo(In(()=>Fl(t),({startDate:i,endDate:o,orphanVisitsType:a,excludeBots:s,domain:l})=>({domain:l,filtering:{dateRange:i!=null||o!=null?z8(i,o):void 0,visitsFilter:{orphanVisitsType:a,excludeBots:Bl(s)?void 0:s==="true"}}})),[t]);return[n,i=>{const{dateRange:o,visitsFilter:a}=zde(n,i),{excludeBots:s,orphanVisitsType:l}=a,c={startDate:(o==null?void 0:o.startDate)&&ms(o.startDate)||"",endDate:(o==null?void 0:o.endDate)&&ms(o.endDate)||"",excludeBots:s===void 0?void 0:G8(s),orphanVisitsType:l,domain:r},d=ep(c),f=ai(d)?"":`?${d}`;e(f,{replace:!0,relative:"route"})}]};function y$(e,t){const n=F.useRef(t);F.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 owe=1;function awe(e){return Object.freeze({__version:owe,map:e})}function swe(e,t){return Object.freeze({...e,...t})}const _$=F.createContext(null),b$=_$.Provider;function w$(){const e=F.useContext(_$);if(e==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of ");return e}function lwe(e){function t(n,r){const{instance:i,context:o}=e(n).current;return F.useImperativeHandle(r,()=>i),n.children==null?null:W.createElement(b$,{value:o},n.children)}return F.forwardRef(t)}function cwe(e){function t(n,r){const[i,o]=F.useState(!1),{instance:a}=e(n,o).current;F.useImperativeHandle(r,()=>a),F.useEffect(function(){i&&a.update()},[a,i,n.children]);const s=a._contentNode;return s?Al.createPortal(n.children,s):null}return F.forwardRef(t)}function uwe(e){function t(n,r){const{instance:i}=e(n).current;return F.useImperativeHandle(r,()=>i),null}return F.forwardRef(t)}function x$(e,t){const n=F.useRef();F.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 xO(e,t){const n=e.pane??t.pane;return n?{...e,pane:n}:e}function dwe(e,t){return function(n,r){const i=w$(),o=e(xO(n,i),i);return y$(i.map,n.attribution),x$(o.current,n.eventHandlers),t(o.current,i,n,r),o}}var F2={exports:{}};/* @preserve + * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com + * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade + */(function(e,t){(function(n,r){r(t)})(Fc,function(n){var r="1.9.4";function i(u){var h,b,T,P;for(b=1,T=arguments.length;b"u"||!L||!L.Mixin)){u=S(u)?u:[u];for(var h=0;h0?Math.floor(u):Math.ceil(u)};q.prototype={clone:function(){return new q(this.x,this.y)},add:function(u){return this.clone()._add(D(u))},_add:function(u){return this.x+=u.x,this.y+=u.y,this},subtract:function(u){return this.clone()._subtract(D(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 q(this.x*u.x,this.y*u.y)},unscaleBy:function(u){return new q(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=I(this.x),this.y=I(this.y),this},distanceTo:function(u){u=D(u);var h=u.x-this.x,b=u.y-this.y;return Math.sqrt(h*h+b*b)},equals:function(u){return u=D(u),u.x===this.x&&u.y===this.y},contains:function(u){return u=D(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 D(u,h,b){return u instanceof q?u:S(u)?new q(u[0],u[1]):u==null?u:typeof u=="object"&&"x"in u&&"y"in u?new q(u.x,u.y):new q(u,h,b)}function H(u,h){if(u)for(var b=h?[u,h]:u,T=0,P=b.length;T=this.min.x&&b.x<=this.max.x&&h.y>=this.min.y&&b.y<=this.max.y},intersects:function(u){u=ie(u);var h=this.min,b=this.max,T=u.min,P=u.max,B=P.x>=h.x&&T.x<=b.x,oe=P.y>=h.y&&T.y<=b.y;return B&&oe},overlaps:function(u){u=ie(u);var h=this.min,b=this.max,T=u.min,P=u.max,B=P.x>h.x&&T.xh.y&&T.y=h.lat&&P.lat<=b.lat&&T.lng>=h.lng&&P.lng<=b.lng},intersects:function(u){u=K(u);var h=this._southWest,b=this._northEast,T=u.getSouthWest(),P=u.getNorthEast(),B=P.lat>=h.lat&&T.lat<=b.lat,oe=P.lng>=h.lng&&T.lng<=b.lng;return B&&oe},overlaps:function(u){u=K(u);var h=this._southWest,b=this._northEast,T=u.getSouthWest(),P=u.getNorthEast(),B=P.lat>h.lat&&T.lath.lng&&T.lng1,an=function(){var u=!1;try{var h=Object.defineProperty({},"passive",{get:function(){u=!0}});window.addEventListener("testPassiveEventSupport",f,h),window.removeEventListener("testPassiveEventSupport",f,h)}catch{}return u}(),pr=function(){return!!document.createElement("canvas").getContext}(),Wn=!!(document.createElementNS&&Me("svg").createSVGRect),Yn=!!Wn&&function(){var u=document.createElement("div");return u.innerHTML="",(u.firstChild&&u.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),wn=!Wn&&function(){try{var u=document.createElement("div");u.innerHTML='';var h=u.firstChild;return h.style.behavior="url(#default#VML)",h&&typeof h.adj=="object"}catch{return!1}}(),ji=navigator.platform.indexOf("Mac")===0,Mi=navigator.platform.indexOf("Linux")===0;function Gn(u){return navigator.userAgent.toLowerCase().indexOf(u)>=0}var ze={ie:_e,ielt9:Se,edge:ke,webkit:Ce,android:je,android23:ce,androidStock:ye,opera:ve,chrome:xe,gecko:Pe,safari:Ne,phantom:Qe,opera12:et,win:Ge,ie3d:Qt,webkit3d:Wt,gecko3d:Cn,any3d:hr,mobile:Zi,mobileWebkit:Hn,mobileWebkit3d:Xu,msPointer:Qi,pointer:bp,touch:xp,touchNative:wp,mobileOpera:Ju,mobileGecko:Os,retina:pn,passiveEvents:an,canvas:pr,svg:Wn,vml:wn,inlineSvg:Yn,mac:ji,linux:Mi},NO=ze.msPointer?"MSPointerDown":"pointerdown",RO=ze.msPointer?"MSPointerMove":"pointermove",DO=ze.msPointer?"MSPointerUp":"pointerup",IO=ze.msPointer?"MSPointerCancel":"pointercancel",H0={touchstart:NO,touchmove:RO,touchend:DO,touchcancel:IO},FO={touchstart:hU,touchmove:Sp,touchend:Sp,touchcancel:Sp},ql={},$O=!1;function lU(u,h,b){return h==="touchstart"&&fU(),FO[h]?(b=FO[h].bind(this,b),u.addEventListener(H0[h],b,!1),b):(console.warn("wrong event specified:",h),f)}function cU(u,h,b){if(!H0[h]){console.warn("wrong event specified:",h);return}u.removeEventListener(H0[h],b,!1)}function uU(u){ql[u.pointerId]=u}function dU(u){ql[u.pointerId]&&(ql[u.pointerId]=u)}function UO(u){delete ql[u.pointerId]}function fU(){$O||(document.addEventListener(NO,uU,!0),document.addEventListener(RO,dU,!0),document.addEventListener(DO,UO,!0),document.addEventListener(IO,UO,!0),$O=!0)}function Sp(u,h){if(h.pointerType!==(h.MSPOINTER_TYPE_MOUSE||"mouse")){h.touches=[];for(var b in ql)h.touches.push(ql[b]);h.changedTouches=[h],u(h)}}function hU(u,h){h.MSPOINTER_TYPE_TOUCH&&h.pointerType===h.MSPOINTER_TYPE_TOUCH&&qn(h),Sp(u,h)}function pU(u){var h={},b,T;for(T in u)b=u[T],h[T]=b&&b.bind?b.bind(u):b;return u=h,h.type="dblclick",h.detail=2,h.isTrusted=!1,h._simulated=!0,h}var mU=200;function gU(u,h){u.addEventListener("dblclick",h);var b=0,T;function P(B){if(B.detail!==1){T=B.detail;return}if(!(B.pointerType==="mouse"||B.sourceCapabilities&&!B.sourceCapabilities.firesTouchEvents)){var oe=WO(B);if(!(oe.some(function(pe){return pe instanceof HTMLLabelElement&&pe.attributes.for})&&!oe.some(function(pe){return pe instanceof HTMLInputElement||pe instanceof HTMLSelectElement}))){var de=Date.now();de-b<=mU?(T++,T===2&&h(pU(B))):T=1,b=de}}}return u.addEventListener("click",P),{dblclick:h,simDblclick:P}}function vU(u,h){u.removeEventListener("dblclick",h.dblclick),u.removeEventListener("click",h.simDblclick)}var W0=Op(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ed=Op(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),BO=ed==="webkitTransition"||ed==="OTransition"?ed+"End":"transitionend";function zO(u){return typeof u=="string"?document.getElementById(u):u}function td(u,h){var b=u.style[h]||u.currentStyle&&u.currentStyle[h];if((!b||b==="auto")&&document.defaultView){var T=document.defaultView.getComputedStyle(u,null);b=T?T[h]:null}return b==="auto"?null:b}function pt(u,h,b){var T=document.createElement(u);return T.className=h||"",b&&b.appendChild(T),T}function Yt(u){var h=u.parentNode;h&&h.removeChild(u)}function Ep(u){for(;u.firstChild;)u.removeChild(u.firstChild)}function Kl(u){var h=u.parentNode;h&&h.lastChild!==u&&h.appendChild(u)}function Zl(u){var h=u.parentNode;h&&h.firstChild!==u&&h.insertBefore(u,h.firstChild)}function Y0(u,h){if(u.classList!==void 0)return u.classList.contains(h);var b=Tp(u);return b.length>0&&new RegExp("(^|\\s)"+h+"(\\s|$)").test(b)}function Ze(u,h){if(u.classList!==void 0)for(var b=v(h),T=0,P=b.length;T0?2*window.devicePixelRatio:1;function GO(u){return ze.edge?u.wheelDeltaY/2:u.deltaY&&u.deltaMode===0?-u.deltaY/bU: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 i_(u,h){var b=h.relatedTarget;if(!b)return!0;try{for(;b&&b!==u;)b=b.parentNode}catch{return!1}return b!==u}var wU={__proto__:null,on:qe,off:kt,stopPropagation:Ps,disableScrollPropagation:r_,disableClickPropagation:od,preventDefault:qn,stop:Ls,getPropagationPath:WO,getMousePosition:YO,getWheelDelta:GO,isExternalTarget:i_,addListener:qe,removeListener:kt},qO=le.extend({run:function(u,h,b,T){this.stop(),this._el=u,this._inProgress=!0,this._duration=b||.25,this._easeOutPower=1/Math.max(T||.5,.2),this._startPos=ks(u),this._offset=h.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=V(this._animate,this),this._step()},_step:function(u){var h=+new Date-this._startTime,b=this._duration*1e3;hthis.options.maxZoom)?this.setZoom(u):this},panInsideBounds:function(u,h){this._enforcingBounds=!0;var b=this.getCenter(),T=this._limitCenter(b,this._zoom,K(u));return b.equals(T)||this.panTo(T,h),this._enforcingBounds=!1,this},panInside:function(u,h){h=h||{};var b=D(h.paddingTopLeft||h.padding||[0,0]),T=D(h.paddingBottomRight||h.padding||[0,0]),P=this.project(this.getCenter()),B=this.project(u),oe=this.getPixelBounds(),de=ie([oe.min.add(b),oe.max.subtract(T)]),pe=de.getSize();if(!de.contains(B)){this._enforcingBounds=!0;var we=B.subtract(de.getCenter()),Re=de.extend(B).getSize().subtract(pe);P.x+=we.x<0?-Re.x:Re.x,P.y+=we.y<0?-Re.y:Re.y,this.panTo(this.unproject(P),h),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 h=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var b=this.getSize(),T=h.divideBy(2).round(),P=b.divideBy(2).round(),B=T.subtract(P);return!B.x&&!B.y?this:(u.animate&&u.pan?this.panBy(B):(u.pan&&this._rawPanBy(B),this.fire("move"),u.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(a(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:h,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 h=a(this._handleGeolocationResponse,this),b=a(this._handleGeolocationError,this);return u.watch?this._locationWatchId=navigator.geolocation.watchPosition(h,b,u):navigator.geolocation.getCurrentPosition(h,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 h=u.code,b=u.message||(h===1?"permission denied":h===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:h,message:"Geolocation error: "+b+"."})}},_handleGeolocationResponse:function(u){if(this._container._leaflet_id){var h=u.coords.latitude,b=u.coords.longitude,T=new re(h,b),P=T.toBounds(u.coords.accuracy*2),B=this._locateOptions;if(B.setView){var oe=this.getBoundsZoom(P);this.setView(T,B.maxZoom?Math.min(oe,B.maxZoom):oe)}var de={latlng:T,bounds:P,timestamp:u.timestamp};for(var pe in u.coords)typeof u.coords[pe]=="number"&&(de[pe]=u.coords[pe]);this.fire("locationfound",de)}},addHandler:function(u,h){if(!h)return this;var b=this[u]=new h(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(),Yt(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)Yt(this._panes[u]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(u,h){var b="leaflet-pane"+(u?" leaflet-"+u.replace("Pane","")+"-pane":""),T=pt("div",b,h||this._mapPane);return u&&(this._panes[u]=T),T},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(),h=this.unproject(u.getBottomLeft()),b=this.unproject(u.getTopRight());return new z(h,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,h,b){u=K(u),b=D(b||[0,0]);var T=this.getZoom()||0,P=this.getMinZoom(),B=this.getMaxZoom(),oe=u.getNorthWest(),de=u.getSouthEast(),pe=this.getSize().subtract(b),we=ie(this.project(de,T),this.project(oe,T)).getSize(),Re=ze.any3d?this.options.zoomSnap:1,We=pe.x/we.x,Xe=pe.y/we.y,mr=h?Math.max(We,Xe):Math.min(We,Xe);return T=this.getScaleZoom(mr,T),Re&&(T=Math.round(T/(Re/100))*(Re/100),T=h?Math.ceil(T/Re)*Re:Math.floor(T/Re)*Re),Math.max(P,Math.min(B,T))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new q(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(u,h){var b=this._getTopLeftPoint(u,h);return new H(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,h){var b=this.options.crs;return h=h===void 0?this._zoom:h,b.scale(u)/b.scale(h)},getScaleZoom:function(u,h){var b=this.options.crs;h=h===void 0?this._zoom:h;var T=b.zoom(u*b.scale(h));return isNaN(T)?1/0:T},project:function(u,h){return h=h===void 0?this._zoom:h,this.options.crs.latLngToPoint(ae(u),h)},unproject:function(u,h){return h=h===void 0?this._zoom:h,this.options.crs.pointToLatLng(D(u),h)},layerPointToLatLng:function(u){var h=D(u).add(this.getPixelOrigin());return this.unproject(h)},latLngToLayerPoint:function(u){var h=this.project(ae(u))._round();return h._subtract(this.getPixelOrigin())},wrapLatLng:function(u){return this.options.crs.wrapLatLng(ae(u))},wrapLatLngBounds:function(u){return this.options.crs.wrapLatLngBounds(K(u))},distance:function(u,h){return this.options.crs.distance(ae(u),ae(h))},containerPointToLayerPoint:function(u){return D(u).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(u){return D(u).add(this._getMapPanePos())},containerPointToLatLng:function(u){var h=this.containerPointToLayerPoint(D(u));return this.layerPointToLatLng(h)},latLngToContainerPoint:function(u){return this.layerPointToContainerPoint(this.latLngToLayerPoint(ae(u)))},mouseEventToContainerPoint:function(u){return YO(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 h=this._container=zO(u);if(h){if(h._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");qe(h,"scroll",this._onScroll,this),this._containerId=l(h)},_initLayout:function(){var u=this._container;this._fadeAnimated=this.options.fadeAnimation&&ze.any3d,Ze(u,"leaflet-container"+(ze.touch?" leaflet-touch":"")+(ze.retina?" leaflet-retina":"")+(ze.ielt9?" leaflet-oldie":"")+(ze.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var h=td(u,"position");h!=="absolute"&&h!=="relative"&&h!=="fixed"&&h!=="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),mn(this._mapPane,new q(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Ze(u.markerPane,"leaflet-zoom-hide"),Ze(u.shadowPane,"leaflet-zoom-hide"))},_resetView:function(u,h,b){mn(this._mapPane,new q(0,0));var T=!this._loaded;this._loaded=!0,h=this._limitZoom(h),this.fire("viewprereset");var P=this._zoom!==h;this._moveStart(P,b)._move(u,h)._moveEnd(P),this.fire("viewreset"),T&&this.fire("load")},_moveStart:function(u,h){return u&&this.fire("zoomstart"),h||this.fire("movestart"),this},_move:function(u,h,b,T){h===void 0&&(h=this._zoom);var P=this._zoom!==h;return this._zoom=h,this._lastCenter=u,this._pixelOrigin=this._getNewPixelOrigin(u),T?b&&b.pinch&&this.fire("zoom",b):((P||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){mn(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 h=u?kt:qe;h(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&h(window,"resize",this._onResize,this),ze.any3d&&this.options.transform3DLimit&&(u?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){Y(this._resizeRequest),this._resizeRequest=V(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,h){for(var b=[],T,P=h==="mouseout"||h==="mouseover",B=u.target||u.srcElement,oe=!1;B;){if(T=this._targets[l(B)],T&&(h==="click"||h==="preclick")&&this._draggableMoved(T)){oe=!0;break}if(T&&T.listens(h,!0)&&(P&&!i_(B,u)||(b.push(T),P))||B===this._container)break;B=B.parentNode}return!b.length&&!oe&&!P&&this.listens(h,!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 h=u.target||u.srcElement;if(!(!this._loaded||h._leaflet_disable_events||u.type==="click"&&this._isClickDisabled(h))){var b=u.type;b==="mousedown"&&X0(h),this._fireDOMEvent(u,b)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(u,h,b){if(u.type==="click"){var T=i({},u);T.type="preclick",this._fireDOMEvent(T,T.type,b)}var P=this._findEventTargets(u,h);if(b){for(var B=[],oe=0;oe0?Math.round(u-h)/2:Math.max(0,Math.ceil(u))-Math.max(0,Math.floor(h))},_limitZoom:function(u){var h=this.getMinZoom(),b=this.getMaxZoom(),T=ze.any3d?this.options.zoomSnap:1;return T&&(u=Math.round(u/T)*T),Math.max(h,Math.min(b,u))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){sn(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(u,h){var b=this._getCenterOffset(u)._trunc();return(h&&h.animate)!==!0&&!this.getSize().contains(b)?!1:(this.panBy(b,h),!0)},_createAnimProxy:function(){var u=this._proxy=pt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(u),this.on("zoomanim",function(h){var b=W0,T=this._proxy.style[b];Cs(this._proxy,this.project(h.center,h.zoom),this.getZoomScale(h.zoom,1)),T===this._proxy.style[b]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){Yt(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var u=this.getCenter(),h=this.getZoom();Cs(this._proxy,this.project(u,h),this.getZoomScale(h,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,h,b){if(this._animatingZoom)return!0;if(b=b||{},!this._zoomAnimated||b.animate===!1||this._nothingToAnimate()||Math.abs(h-this._zoom)>this.options.zoomAnimationThreshold)return!1;var T=this.getZoomScale(h),P=this._getCenterOffset(u)._divideBy(1-1/T);return b.animate!==!0&&!this.getSize().contains(P)?!1:(V(function(){this._moveStart(!0,b.noMoveStart||!1)._animateZoom(u,h,!0)},this),!0)},_animateZoom:function(u,h,b,T){this._mapPane&&(b&&(this._animatingZoom=!0,this._animateToCenter=u,this._animateToZoom=h,Ze(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:u,zoom:h,noUpdate:T}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(a(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&sn(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 xU(u,h){return new ct(u,h)}var Ai=G.extend({options:{position:"topright"},initialize:function(u){y(this,u)},getPosition:function(){return this.options.position},setPosition:function(u){var h=this._map;return h&&h.removeControl(this),this.options.position=u,h&&h.addControl(this),this},getContainer:function(){return this._container},addTo:function(u){this.remove(),this._map=u;var h=this._container=this.onAdd(u),b=this.getPosition(),T=u._controlCorners[b];return Ze(h,"leaflet-control"),b.indexOf("bottom")!==-1?T.insertBefore(h,T.firstChild):T.appendChild(h),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(Yt(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()}}),ad=function(u){return new Ai(u)};ct.include({addControl:function(u){return u.addTo(this),this},removeControl:function(u){return u.remove(),this},_initControlPos:function(){var u=this._controlCorners={},h="leaflet-",b=this._controlContainer=pt("div",h+"control-container",this._container);function T(P,B){var oe=h+P+" "+h+B;u[P+B]=pt("div",oe,b)}T("top","left"),T("top","right"),T("bottom","left"),T("bottom","right")},_clearControlPos:function(){for(var u in this._controlCorners)Yt(this._controlCorners[u]);Yt(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var KO=Ai.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(u,h,b,T){return b1,this._baseLayersList.style.display=u?"":"none"),this._separator.style.display=h&&u?"":"none",this},_onLayerChange:function(u){this._handlingClick||this._update();var h=this._getLayer(l(u.target)),b=h.overlay?u.type==="add"?"overlayadd":"overlayremove":u.type==="add"?"baselayerchange":null;b&&this._map.fire(b,h)},_createRadioElement:function(u,h){var b='",T=document.createElement("div");return T.innerHTML=b,T.firstChild},_addItem:function(u){var h=document.createElement("label"),b=this._map.hasLayer(u.layer),T;u.overlay?(T=document.createElement("input"),T.type="checkbox",T.className="leaflet-control-layers-selector",T.defaultChecked=b):T=this._createRadioElement("leaflet-base-layers_"+l(this),b),this._layerControlInputs.push(T),T.layerId=l(u.layer),qe(T,"click",this._onInputClick,this);var P=document.createElement("span");P.innerHTML=" "+u.name;var B=document.createElement("span");h.appendChild(B),B.appendChild(T),B.appendChild(P);var oe=u.overlay?this._overlaysList:this._baseLayersList;return oe.appendChild(h),this._checkDisabledLayers(),h},_onInputClick:function(){if(!this._preventClick){var u=this._layerControlInputs,h,b,T=[],P=[];this._handlingClick=!0;for(var B=u.length-1;B>=0;B--)h=u[B],b=this._getLayer(h.layerId).layer,h.checked?T.push(b):h.checked||P.push(b);for(B=0;B=0;P--)h=u[P],b=this._getLayer(h.layerId).layer,h.disabled=b.options.minZoom!==void 0&&Tb.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var u=this._section;this._preventClick=!0,qe(u,"click",qn),this.expand();var h=this;setTimeout(function(){kt(u,"click",qn),h._preventClick=!1})}}),SU=function(u,h,b){return new KO(u,h,b)},o_=Ai.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(u){var h="leaflet-control-zoom",b=pt("div",h+" leaflet-bar"),T=this.options;return this._zoomInButton=this._createButton(T.zoomInText,T.zoomInTitle,h+"-in",b,this._zoomIn),this._zoomOutButton=this._createButton(T.zoomOutText,T.zoomOutTitle,h+"-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,h,b,T,P){var B=pt("a",b,T);return B.innerHTML=u,B.href="#",B.title=h,B.setAttribute("role","button"),B.setAttribute("aria-label",h),od(B),qe(B,"click",Ls),qe(B,"click",P,this),qe(B,"click",this._refocusOnMap,this),B},_updateDisabled:function(){var u=this._map,h="leaflet-disabled";sn(this._zoomInButton,h),sn(this._zoomOutButton,h),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||u._zoom===u.getMinZoom())&&(Ze(this._zoomOutButton,h),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||u._zoom===u.getMaxZoom())&&(Ze(this._zoomInButton,h),this._zoomInButton.setAttribute("aria-disabled","true"))}});ct.mergeOptions({zoomControl:!0}),ct.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new o_,this.addControl(this.zoomControl))});var EU=function(u){return new o_(u)},ZO=Ai.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(u){var h="leaflet-control-scale",b=pt("div",h),T=this.options;return this._addScales(T,h+"-line",b),u.on(T.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,h,b){u.metric&&(this._mScale=pt("div",h,b)),u.imperial&&(this._iScale=pt("div",h,b))},_update:function(){var u=this._map,h=u.getSize().y/2,b=u.distance(u.containerPointToLatLng([0,h]),u.containerPointToLatLng([this.options.maxWidth,h]));this._updateScales(b)},_updateScales:function(u){this.options.metric&&u&&this._updateMetric(u),this.options.imperial&&u&&this._updateImperial(u)},_updateMetric:function(u){var h=this._getRoundNum(u),b=h<1e3?h+" m":h/1e3+" km";this._updateScale(this._mScale,b,h/u)},_updateImperial:function(u){var h=u*3.2808399,b,T,P;h>5280?(b=h/5280,T=this._getRoundNum(b),this._updateScale(this._iScale,T+" mi",T/b)):(P=this._getRoundNum(h),this._updateScale(this._iScale,P+" ft",P/h))},_updateScale:function(u,h,b){u.style.width=Math.round(this.options.maxWidth*b)+"px",u.innerHTML=h},_getRoundNum:function(u){var h=Math.pow(10,(Math.floor(u)+"").length-1),b=u/h;return b=b>=10?10:b>=5?5:b>=3?3:b>=2?2:1,h*b}}),TU=function(u){return new ZO(u)},OU='',a_=Ai.extend({options:{position:"bottomright",prefix:''+(ze.inlineSvg?OU+" ":"")+"Leaflet"},initialize:function(u){y(this,u),this._attributions={}},onAdd:function(u){u.attributionControl=this,this._container=pt("div","leaflet-control-attribution"),od(this._container);for(var h in u._layers)u._layers[h].getAttribution&&this.addAttribution(u._layers[h].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 h in this._attributions)this._attributions[h]&&u.push(h);var b=[];this.options.prefix&&b.push(this.options.prefix),u.length&&b.push(u.join(", ")),this._container.innerHTML=b.join(' ')}}});ct.mergeOptions({attributionControl:!0}),ct.addInitHook(function(){this.options.attributionControl&&new a_().addTo(this)});var CU=function(u){return new a_(u)};Ai.Layers=KO,Ai.Zoom=o_,Ai.Scale=ZO,Ai.Attribution=a_,ad.layers=SU,ad.zoom=EU,ad.scale=TU,ad.attribution=CU;var Ji=G.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}});Ji.addTo=function(u,h){return u.addHandler(h,this),this};var kU={Events:te},QO=ze.touch?"touchstart mousedown":"mousedown",ya=le.extend({options:{clickTolerance:3},initialize:function(u,h,b,T){y(this,T),this._element=u,this._dragStartTarget=h||u,this._preventOutline=b},enable:function(){this._enabled||(qe(this._dragStartTarget,QO,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(ya._dragging===this&&this.finishDrag(!0),kt(this._dragStartTarget,QO,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(u){if(this._enabled&&(this._moved=!1,!Y0(this._element,"leaflet-zoom-anim"))){if(u.touches&&u.touches.length!==1){ya._dragging===this&&this.finishDrag();return}if(!(ya._dragging||u.shiftKey||u.which!==1&&u.button!==1&&!u.touches)&&(ya._dragging=this,this._preventOutline&&X0(this._element),K0(),nd(),!this._moving)){this.fire("down");var h=u.touches?u.touches[0]:u,b=VO(this._element);this._startPoint=new q(h.clientX,h.clientY),this._startPos=ks(this._element),this._parentScale=J0(b);var T=u.type==="mousedown";qe(document,T?"mousemove":"touchmove",this._onMove,this),qe(document,T?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(u){if(this._enabled){if(u.touches&&u.touches.length>1){this._moved=!0;return}var h=u.touches&&u.touches.length===1?u.touches[0]:u,b=new q(h.clientX,h.clientY)._subtract(this._startPoint);!b.x&&!b.y||Math.abs(b.x)+Math.abs(b.y)B&&(oe=de,B=pe);B>b&&(h[oe]=1,l_(u,h,b,T,oe),l_(u,h,b,oe,P))}function MU(u,h){for(var b=[u[0]],T=1,P=0,B=u.length;Th&&(b.push(u[T]),P=T);return Ph.max.x&&(b|=2),u.yh.max.y&&(b|=8),b}function AU(u,h){var b=h.x-u.x,T=h.y-u.y;return b*b+T*T}function sd(u,h,b,T){var P=h.x,B=h.y,oe=b.x-P,de=b.y-B,pe=oe*oe+de*de,we;return pe>0&&(we=((u.x-P)*oe+(u.y-B)*de)/pe,we>1?(P=b.x,B=b.y):we>0&&(P+=oe*we,B+=de*we)),oe=u.x-P,de=u.y-B,T?oe*oe+de*de:new q(P,B)}function li(u){return!S(u[0])||typeof u[0][0]!="object"&&typeof u[0][0]<"u"}function iC(u){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),li(u)}function oC(u,h){var b,T,P,B,oe,de,pe,we;if(!u||u.length===0)throw new Error("latlngs not passed");li(u)||(console.warn("latlngs are not flat! Only the first ring will be used"),u=u[0]);var Re=ae([0,0]),We=K(u),Xe=We.getNorthWest().distanceTo(We.getSouthWest())*We.getNorthEast().distanceTo(We.getNorthWest());Xe<1700&&(Re=s_(u));var mr=u.length,kn=[];for(b=0;bT){pe=(B-T)/P,we=[de.x-pe*(de.x-oe.x),de.y-pe*(de.y-oe.y)];break}var Tr=h.unproject(D(we));return ae([Tr.lat+Re.lat,Tr.lng+Re.lng])}var NU={__proto__:null,simplify:eC,pointToSegmentDistance:tC,closestPointOnSegment:LU,clipSegment:rC,_getEdgeIntersection:Pp,_getBitCode:js,_sqClosestPointOnSegment:sd,isFlat:li,_flat:iC,polylineCenter:oC},c_={project:function(u){return new q(u.lng,u.lat)},unproject:function(u){return new re(u.y,u.x)},bounds:new H([-180,-90],[180,90])},u_={R:6378137,R_MINOR:6356752314245179e-9,bounds:new H([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(u){var h=Math.PI/180,b=this.R,T=u.lat*h,P=this.R_MINOR/b,B=Math.sqrt(1-P*P),oe=B*Math.sin(T),de=Math.tan(Math.PI/4-T/2)/Math.pow((1-oe)/(1+oe),B/2);return T=-b*Math.log(Math.max(de,1e-10)),new q(u.lng*h*b,T)},unproject:function(u){for(var h=180/Math.PI,b=this.R,T=this.R_MINOR/b,P=Math.sqrt(1-T*T),B=Math.exp(-u.y/b),oe=Math.PI/2-2*Math.atan(B),de=0,pe=.1,we;de<15&&Math.abs(pe)>1e-7;de++)we=P*Math.sin(oe),we=Math.pow((1-we)/(1+we),P/2),pe=Math.PI/2-2*Math.atan(B*we)-oe,oe+=pe;return new re(oe*h,u.x*h/b)}},RU={__proto__:null,LonLat:c_,Mercator:u_,SphericalMercator:$},DU=i({},O,{code:"EPSG:3395",projection:u_,transformation:function(){var u=.5/(Math.PI*u_.R);return J(u,.5,-u,.5)}()}),aC=i({},O,{code:"EPSG:4326",projection:c_,transformation:J(1/180,1,-1/180,.5)}),IU=i({},he,{projection:c_,transformation:J(1,0,-1,0),scale:function(u){return Math.pow(2,u)},zoom:function(u){return Math.log(u)/Math.LN2},distance:function(u,h){var b=h.lng-u.lng,T=h.lat-u.lat;return Math.sqrt(b*b+T*T)},infinite:!0});he.Earth=O,he.EPSG3395=DU,he.EPSG3857=se,he.EPSG900913=ge,he.EPSG4326=aC,he.Simple=IU;var Ni=le.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 h=u.target;if(h.hasLayer(this)){if(this._map=h,this._zoomAnimated=h._zoomAnimated,this.getEvents){var b=this.getEvents();h.on(b,this),this.once("remove",function(){h.off(b,this)},this)}this.onAdd(h),this.fire("add"),h.fire("layeradd",{layer:this})}}});ct.include({addLayer:function(u){if(!u._layerAdd)throw new Error("The provided object is not a Layer.");var h=l(u);return this._layers[h]?this:(this._layers[h]=u,u._mapToAdd=this,u.beforeAdd&&u.beforeAdd(this),this.whenReady(u._layerAdd,u),this)},removeLayer:function(u){var h=l(u);return this._layers[h]?(this._loaded&&u.onRemove(this),delete this._layers[h],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,h){for(var b in this._layers)u.call(h,this._layers[b]);return this},_addLayers:function(u){u=u?S(u)?u:[u]:[];for(var h=0,b=u.length;hthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&h[0]instanceof re&&h[0].equals(h[b-1])&&h.pop(),h},_setLatLngs:function(u){Lo.prototype._setLatLngs.call(this,u),li(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return li(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var u=this._renderer._bounds,h=this.options.weight,b=new q(h,h);if(u=new H(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 T=0,P=this._rings.length,B;Tu.y!=P.y>u.y&&u.x<(P.x-T.x)*(u.y-T.y)/(P.y-T.y)+T.x&&(h=!h);return h||Lo.prototype._containsPoint.call(this,u,!0)}});function WU(u,h){return new Jl(u,h)}var jo=Po.extend({initialize:function(u,h){y(this,h),this._layers={},u&&this.addData(u)},addData:function(u){var h=S(u)?u:u.features,b,T,P;if(h){for(b=0,T=h.length;b0&&P.push(P[0].slice()),P}function ec(u,h){return u.feature?i({},u.feature,{geometry:h}):Rp(h)}function Rp(u){return u.type==="Feature"||u.type==="FeatureCollection"?u:{type:"Feature",properties:{},geometry:u}}var p_={toGeoJSON:function(u){return ec(this,{type:"Point",coordinates:h_(this.getLatLng(),u)})}};Lp.include(p_),d_.include(p_),jp.include(p_),Lo.include({toGeoJSON:function(u){var h=!li(this._latlngs),b=Np(this._latlngs,h?1:0,!1,u);return ec(this,{type:(h?"Multi":"")+"LineString",coordinates:b})}}),Jl.include({toGeoJSON:function(u){var h=!li(this._latlngs),b=h&&!li(this._latlngs[0]),T=Np(this._latlngs,b?2:h?1:0,!0,u);return h||(T=[T]),ec(this,{type:(b?"Multi":"")+"Polygon",coordinates:T})}}),Ql.include({toMultiPoint:function(u){var h=[];return this.eachLayer(function(b){h.push(b.toGeoJSON(u).geometry.coordinates)}),ec(this,{type:"MultiPoint",coordinates:h})},toGeoJSON:function(u){var h=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(h==="MultiPoint")return this.toMultiPoint(u);var b=h==="GeometryCollection",T=[];return this.eachLayer(function(P){if(P.toGeoJSON){var B=P.toGeoJSON(u);if(b)T.push(B.geometry);else{var oe=Rp(B);oe.type==="FeatureCollection"?T.push.apply(T,oe.features):T.push(oe)}}}),b?ec(this,{geometries:T,type:"GeometryCollection"}):{type:"FeatureCollection",features:T}}});function cC(u,h){return new jo(u,h)}var YU=cC,Dp=Ni.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(u,h,b){this._url=u,this._bounds=K(h),y(this,b)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(Ze(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){Yt(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(u){return this.options.opacity=u,this._image&&this._updateOpacity(),this},setStyle:function(u){return u.opacity&&this.setOpacity(u.opacity),this},bringToFront:function(){return this._map&&Kl(this._image),this},bringToBack:function(){return this._map&&Zl(this._image),this},setUrl:function(u){return this._url=u,this._image&&(this._image.src=u),this},setBounds:function(u){return this._bounds=K(u),this._map&&this._reset(),this},getEvents:function(){var u={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(u.zoomanim=this._animateZoom),u},setZIndex:function(u){return this.options.zIndex=u,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var u=this._url.tagName==="IMG",h=this._image=u?this._url:pt("img");if(Ze(h,"leaflet-image-layer"),this._zoomAnimated&&Ze(h,"leaflet-zoom-animated"),this.options.className&&Ze(h,this.options.className),h.onselectstart=f,h.onmousemove=f,h.onload=a(this.fire,this,"load"),h.onerror=a(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(h.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),u){this._url=h.src;return}h.src=this._url,h.alt=this.options.alt},_animateZoom:function(u){var h=this._map.getZoomScale(u.zoom),b=this._map._latLngBoundsToNewLayerBounds(this._bounds,u.zoom,u.center).min;Cs(this._image,b,h)},_reset:function(){var u=this._image,h=new H(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),b=h.getSize();mn(u,h.min),u.style.width=b.x+"px",u.style.height=b.y+"px"},_updateOpacity:function(){si(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var u=this.options.errorOverlayUrl;u&&this._url!==u&&(this._url=u,this._image.src=u)},getCenter:function(){return this._bounds.getCenter()}}),GU=function(u,h,b){return new Dp(u,h,b)},uC=Dp.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var u=this._url.tagName==="VIDEO",h=this._image=u?this._url:pt("video");if(Ze(h,"leaflet-image-layer"),this._zoomAnimated&&Ze(h,"leaflet-zoom-animated"),this.options.className&&Ze(h,this.options.className),h.onselectstart=f,h.onmousemove=f,h.onloadeddata=a(this.fire,this,"load"),u){for(var b=h.getElementsByTagName("source"),T=[],P=0;P0?T:[h.src];return}S(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(h.style,"objectFit")&&(h.style.objectFit="fill"),h.autoplay=!!this.options.autoplay,h.loop=!!this.options.loop,h.muted=!!this.options.muted,h.playsInline=!!this.options.playsInline;for(var B=0;BP?(h.height=P+"px",Ze(u,B)):sn(u,B),this._containerWidth=this._container.offsetWidth},_animateZoom:function(u){var h=this._map._latLngToNewLayerPoint(this._latlng,u.zoom,u.center),b=this._getAnchor();mn(this._container,h.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,h=parseInt(td(this._container,"marginBottom"),10)||0,b=this._container.offsetHeight+h,T=this._containerWidth,P=new q(this._containerLeft,-b-this._containerBottom);P._add(ks(this._container));var B=u.layerPointToContainerPoint(P),oe=D(this.options.autoPanPadding),de=D(this.options.autoPanPaddingTopLeft||oe),pe=D(this.options.autoPanPaddingBottomRight||oe),we=u.getSize(),Re=0,We=0;B.x+T+pe.x>we.x&&(Re=B.x+T-we.x+pe.x),B.x-Re-de.x<0&&(Re=B.x-de.x),B.y+b+pe.y>we.y&&(We=B.y+b-we.y+pe.y),B.y-We-de.y<0&&(We=B.y-de.y),(Re||We)&&(this.options.keepInView&&(this._autopanning=!0),u.fire("autopanstart").panBy([Re,We]))}},_getAnchor:function(){return D(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),ZU=function(u,h){return new Ip(u,h)};ct.mergeOptions({closePopupOnClick:!0}),ct.include({openPopup:function(u,h,b){return this._initOverlay(Ip,u,h,b).openOn(this),this},closePopup:function(u){return u=arguments.length?u:this._popup,u&&u.close(),this}}),Ni.include({bindPopup:function(u,h){return this._popup=this._initOverlay(Ip,this._popup,u,h),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 Po||(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)){Ls(u);var h=u.layer||u.target;if(this._popup._source===h&&!(h instanceof _a)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(u.latlng);return}this._popup._source=h,this.openPopup(u.latlng)}},_movePopup:function(u){this._popup.setLatLng(u.latlng)},_onKeyPress:function(u){u.originalEvent.keyCode===13&&this._openPopup(u)}});var Fp=eo.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(u){eo.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){eo.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=eo.prototype.getEvents.call(this);return this.options.permanent||(u.preclick=this.close),u},_initLayout:function(){var u="leaflet-tooltip",h=u+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=pt("div",h),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+l(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(u){var h,b,T=this._map,P=this._container,B=T.latLngToContainerPoint(T.getCenter()),oe=T.layerPointToContainerPoint(u),de=this.options.direction,pe=P.offsetWidth,we=P.offsetHeight,Re=D(this.options.offset),We=this._getAnchor();de==="top"?(h=pe/2,b=we):de==="bottom"?(h=pe/2,b=0):de==="center"?(h=pe/2,b=we/2):de==="right"?(h=0,b=we/2):de==="left"?(h=pe,b=we/2):oe.xthis.options.maxZoom||bT?this._retainParent(P,B,oe,T):!1)},_retainChildren:function(u,h,b,T){for(var P=2*u;P<2*u+2;P++)for(var B=2*h;B<2*h+2;B++){var oe=new q(P,B);oe.z=b+1;var de=this._tileCoordsToKey(oe),pe=this._tiles[de];if(pe&&pe.active){pe.retain=!0;continue}else pe&&pe.loaded&&(pe.retain=!0);b+1this.options.maxZoom||this.options.minZoom!==void 0&&P1){this._setView(u,b);return}for(var We=P.min.y;We<=P.max.y;We++)for(var Xe=P.min.x;Xe<=P.max.x;Xe++){var mr=new q(Xe,We);if(mr.z=this._tileZoom,!!this._isValidTile(mr)){var kn=this._tiles[this._tileCoordsToKey(mr)];kn?kn.current=!0:oe.push(mr)}}if(oe.sort(function(Tr,nc){return Tr.distanceTo(B)-nc.distanceTo(B)}),oe.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var ci=document.createDocumentFragment();for(Xe=0;Xeb.max.x)||!h.wrapLat&&(u.yb.max.y))return!1}if(!this.options.bounds)return!0;var T=this._tileCoordsToBounds(u);return K(this.options.bounds).overlaps(T)},_keyToBounds:function(u){return this._tileCoordsToBounds(this._keyToTileCoords(u))},_tileCoordsToNwSe:function(u){var h=this._map,b=this.getTileSize(),T=u.scaleBy(b),P=T.add(b),B=h.unproject(T,u.z),oe=h.unproject(P,u.z);return[B,oe]},_tileCoordsToBounds:function(u){var h=this._tileCoordsToNwSe(u),b=new z(h[0],h[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 h=u.split(":"),b=new q(+h[0],+h[1]);return b.z=+h[2],b},_removeTile:function(u){var h=this._tiles[u];h&&(Yt(h.el),delete this._tiles[u],this.fire("tileunload",{tile:h.el,coords:this._keyToTileCoords(u)}))},_initTile:function(u){Ze(u,"leaflet-tile");var h=this.getTileSize();u.style.width=h.x+"px",u.style.height=h.y+"px",u.onselectstart=f,u.onmousemove=f,ze.ielt9&&this.options.opacity<1&&si(u,this.options.opacity)},_addTile:function(u,h){var b=this._getTilePos(u),T=this._tileCoordsToKey(u),P=this.createTile(this._wrapCoords(u),a(this._tileReady,this,u));this._initTile(P),this.createTile.length<2&&V(a(this._tileReady,this,u,null,P)),mn(P,b),this._tiles[T]={el:P,coords:u,current:!0},h.appendChild(P),this.fire("tileloadstart",{tile:P,coords:u})},_tileReady:function(u,h,b){h&&this.fire("tileerror",{error:h,tile:b,coords:u});var T=this._tileCoordsToKey(u);b=this._tiles[T],b&&(b.loaded=+new Date,this._map._fadeAnimated?(si(b.el,0),Y(this._fadeFrame),this._fadeFrame=V(this._updateOpacity,this)):(b.active=!0,this._pruneTiles()),h||(Ze(b.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:b.el,coords:u})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),ze.ielt9||!this._map._fadeAnimated?V(this._pruneTiles,this):setTimeout(a(this._pruneTiles,this),250)))},_getTilePos:function(u){return u.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(u){var h=new q(this._wrapX?d(u.x,this._wrapX):u.x,this._wrapY?d(u.y,this._wrapY):u.y);return h.z=u.z,h},_pxBoundsToTileRange:function(u){var h=this.getTileSize();return new H(u.min.unscaleBy(h).floor(),u.max.unscaleBy(h).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var u in this._tiles)if(!this._tiles[u].loaded)return!1;return!0}});function JU(u){return new cd(u)}var tc=cd.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(u,h){this._url=u,h=y(this,h),h.detectRetina&&ze.retina&&h.maxZoom>0?(h.tileSize=Math.floor(h.tileSize/2),h.zoomReverse?(h.zoomOffset--,h.minZoom=Math.min(h.maxZoom,h.minZoom+1)):(h.zoomOffset++,h.maxZoom=Math.max(h.minZoom,h.maxZoom-1)),h.minZoom=Math.max(0,h.minZoom)):h.zoomReverse?h.minZoom=Math.min(h.maxZoom,h.minZoom):h.maxZoom=Math.max(h.minZoom,h.maxZoom),typeof h.subdomains=="string"&&(h.subdomains=h.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(u,h){return this._url===u&&h===void 0&&(h=!0),this._url=u,h||this.redraw(),this},createTile:function(u,h){var b=document.createElement("img");return qe(b,"load",a(this._tileOnLoad,this,h,b)),qe(b,"error",a(this._tileOnError,this,h,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 h={r:ze.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&&(h.y=b),h["-y"]=b}return w(this._url,i(h,this.options))},_tileOnLoad:function(u,h){ze.ielt9?setTimeout(a(u,this,null,h),0):u(null,h)},_tileOnError:function(u,h,b){var T=this.options.errorTileUrl;T&&h.getAttribute("src")!==T&&(h.src=T),u(b,h)},_onTileRemove:function(u){u.tile.onload=null},_getZoomForUrl:function(){var u=this._tileZoom,h=this.options.maxZoom,b=this.options.zoomReverse,T=this.options.zoomOffset;return b&&(u=h-u),u+T},_getSubdomain:function(u){var h=Math.abs(u.x+u.y)%this.options.subdomains.length;return this.options.subdomains[h]},_abortLoading:function(){var u,h;for(u in this._tiles)if(this._tiles[u].coords.z!==this._tileZoom&&(h=this._tiles[u].el,h.onload=f,h.onerror=f,!h.complete)){h.src=C;var b=this._tiles[u].coords;Yt(h),delete this._tiles[u],this.fire("tileabort",{tile:h,coords:b})}},_removeTile:function(u){var h=this._tiles[u];if(h)return h.el.setAttribute("src",C),cd.prototype._removeTile.call(this,u)},_tileReady:function(u,h,b){if(!(!this._map||b&&b.getAttribute("src")===C))return cd.prototype._tileReady.call(this,u,h,b)}});function hC(u,h){return new tc(u,h)}var pC=tc.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,h){this._url=u;var b=i({},this.defaultWmsParams);for(var T in h)T in this.options||(b[T]=h[T]);h=y(this,h);var P=h.detectRetina&&ze.retina?2:1,B=this.getTileSize();b.width=B.x*P,b.height=B.y*P,this.wmsParams=b},onAdd:function(u){this._crs=this.options.crs||u.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var h=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[h]=this._crs.code,tc.prototype.onAdd.call(this,u)},getTileUrl:function(u){var h=this._tileCoordsToNwSe(u),b=this._crs,T=ie(b.project(h[0]),b.project(h[1])),P=T.min,B=T.max,oe=(this._wmsVersion>=1.3&&this._crs===aC?[P.y,P.x,B.y,B.x]:[P.x,P.y,B.x,B.y]).join(","),de=tc.prototype.getTileUrl.call(this,u);return de+x(this.wmsParams,de,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+oe},setParams:function(u,h){return i(this.wmsParams,u),h||this.redraw(),this}});function e7(u,h){return new pC(u,h)}tc.WMS=pC,hC.wms=e7;var Mo=Ni.extend({options:{padding:.1},initialize:function(u){y(this,u),l(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),Ze(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,h){var b=this._map.getZoomScale(h,this._zoom),T=this._map.getSize().multiplyBy(.5+this.options.padding),P=this._map.project(this._center,h),B=T.multiplyBy(-b).add(P).subtract(this._map._getNewPixelOrigin(u,h));ze.any3d?Cs(this._container,B,b):mn(this._container,B)},_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,h=this._map.getSize(),b=this._map.containerPointToLayerPoint(h.multiplyBy(-u)).round();this._bounds=new H(b,b.add(h.multiplyBy(1+u*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),mC=Mo.extend({options:{tolerance:0},getEvents:function(){var u=Mo.prototype.getEvents.call(this);return u.viewprereset=this._onViewPreReset,u},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Mo.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var u=this._container=document.createElement("canvas");qe(u,"mousemove",this._onMouseMove,this),qe(u,"click dblclick mousedown mouseup contextmenu",this._onClick,this),qe(u,"mouseout",this._handleMouseOut,this),u._leaflet_disable_events=!0,this._ctx=u.getContext("2d")},_destroyContainer:function(){Y(this._redrawRequest),delete this._ctx,Yt(this._container),kt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var u;this._redrawBounds=null;for(var h in this._layers)u=this._layers[h],u._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Mo.prototype._update.call(this);var u=this._bounds,h=this._container,b=u.getSize(),T=ze.retina?2:1;mn(h,u.min),h.width=T*b.x,h.height=T*b.y,h.style.width=b.x+"px",h.style.height=b.y+"px",ze.retina&&this._ctx.scale(2,2),this._ctx.translate(-u.min.x,-u.min.y),this.fire("update")}},_reset:function(){Mo.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(u){this._updateDashArray(u),this._layers[l(u)]=u;var h=u._order={layer:u,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=h),this._drawLast=h,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(u){this._requestRedraw(u)},_removePath:function(u){var h=u._order,b=h.next,T=h.prev;b?b.prev=T:this._drawLast=T,T?T.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 h=u.options.dashArray.split(/[, ]+/),b=[],T,P;for(P=0;P')}}catch{}return function(u){return document.createElement("<"+u+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),t7={_initContainer:function(){this._container=pt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Mo.prototype._update.call(this),this.fire("update"))},_initPath:function(u){var h=u._container=ud("shape");Ze(h,"leaflet-vml-shape "+(this.options.className||"")),h.coordsize="1 1",u._path=ud("path"),h.appendChild(u._path),this._updateStyle(u),this._layers[l(u)]=u},_addPath:function(u){var h=u._container;this._container.appendChild(h),u.options.interactive&&u.addInteractiveTarget(h)},_removePath:function(u){var h=u._container;Yt(h),u.removeInteractiveTarget(h),delete this._layers[l(u)]},_updateStyle:function(u){var h=u._stroke,b=u._fill,T=u.options,P=u._container;P.stroked=!!T.stroke,P.filled=!!T.fill,T.stroke?(h||(h=u._stroke=ud("stroke")),P.appendChild(h),h.weight=T.weight+"px",h.color=T.color,h.opacity=T.opacity,T.dashArray?h.dashStyle=S(T.dashArray)?T.dashArray.join(" "):T.dashArray.replace(/( *, *)/g," "):h.dashStyle="",h.endcap=T.lineCap.replace("butt","flat"),h.joinstyle=T.lineJoin):h&&(P.removeChild(h),u._stroke=null),T.fill?(b||(b=u._fill=ud("fill")),P.appendChild(b),b.color=T.fillColor||T.color,b.opacity=T.fillOpacity):b&&(P.removeChild(b),u._fill=null)},_updateCircle:function(u){var h=u._point.round(),b=Math.round(u._radius),T=Math.round(u._radiusY||b);this._setPath(u,u._empty()?"M0 0":"AL "+h.x+","+h.y+" "+b+","+T+" 0,"+65535*360)},_setPath:function(u,h){u._path.v=h},_bringToFront:function(u){Kl(u._container)},_bringToBack:function(u){Zl(u._container)}},$p=ze.vml?ud:Me,dd=Mo.extend({_initContainer:function(){this._container=$p("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=$p("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Yt(this._container),kt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Mo.prototype._update.call(this);var u=this._bounds,h=u.getSize(),b=this._container;(!this._svgSize||!this._svgSize.equals(h))&&(this._svgSize=h,b.setAttribute("width",h.x),b.setAttribute("height",h.y)),mn(b,u.min),b.setAttribute("viewBox",[u.min.x,u.min.y,h.x,h.y].join(" ")),this.fire("update")}},_initPath:function(u){var h=u._path=$p("path");u.options.className&&Ze(h,u.options.className),u.options.interactive&&Ze(h,"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){Yt(u._path),u.removeInteractiveTarget(u._path),delete this._layers[l(u)]},_updatePath:function(u){u._project(),u._update()},_updateStyle:function(u){var h=u._path,b=u.options;h&&(b.stroke?(h.setAttribute("stroke",b.color),h.setAttribute("stroke-opacity",b.opacity),h.setAttribute("stroke-width",b.weight),h.setAttribute("stroke-linecap",b.lineCap),h.setAttribute("stroke-linejoin",b.lineJoin),b.dashArray?h.setAttribute("stroke-dasharray",b.dashArray):h.removeAttribute("stroke-dasharray"),b.dashOffset?h.setAttribute("stroke-dashoffset",b.dashOffset):h.removeAttribute("stroke-dashoffset")):h.setAttribute("stroke","none"),b.fill?(h.setAttribute("fill",b.fillColor||b.color),h.setAttribute("fill-opacity",b.fillOpacity),h.setAttribute("fill-rule",b.fillRule||"evenodd")):h.setAttribute("fill","none"))},_updatePoly:function(u,h){this._setPath(u,ue(u._parts,h))},_updateCircle:function(u){var h=u._point,b=Math.max(Math.round(u._radius),1),T=Math.max(Math.round(u._radiusY),1)||b,P="a"+b+","+T+" 0 1,0 ",B=u._empty()?"M0 0":"M"+(h.x-b)+","+h.y+P+b*2+",0 "+P+-b*2+",0 ";this._setPath(u,B)},_setPath:function(u,h){u._path.setAttribute("d",h)},_bringToFront:function(u){Kl(u._path)},_bringToBack:function(u){Zl(u._path)}});ze.vml&&dd.include(t7);function vC(u){return ze.svg||ze.vml?new dd(u):null}ct.include({getRenderer:function(u){var h=u.options.renderer||this._getPaneRenderer(u.options.pane)||this.options.renderer||this._renderer;return h||(h=this._renderer=this._createRenderer()),this.hasLayer(h)||this.addLayer(h),h},_getPaneRenderer:function(u){if(u==="overlayPane"||u===void 0)return!1;var h=this._paneRenderers[u];return h===void 0&&(h=this._createRenderer({pane:u}),this._paneRenderers[u]=h),h},_createRenderer:function(u){return this.options.preferCanvas&&gC(u)||vC(u)}});var yC=Jl.extend({initialize:function(u,h){Jl.prototype.initialize.call(this,this._boundsToLatLngs(u),h)},setBounds:function(u){return this.setLatLngs(this._boundsToLatLngs(u))},_boundsToLatLngs:function(u){return u=K(u),[u.getSouthWest(),u.getNorthWest(),u.getNorthEast(),u.getSouthEast()]}});function n7(u,h){return new yC(u,h)}dd.create=$p,dd.pointsToPath=ue,jo.geometryToLayer=Mp,jo.coordsToLatLng=f_,jo.coordsToLatLngs=Ap,jo.latLngToCoords=h_,jo.latLngsToCoords=Np,jo.getFeature=ec,jo.asFeature=Rp,ct.mergeOptions({boxZoom:!0});var _C=Ji.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(){qe(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){kt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Yt(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(),nd(),K0(),this._startPoint=this._map.mouseEventToContainerPoint(u),qe(document,{contextmenu:Ls,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(u){this._moved||(this._moved=!0,this._box=pt("div","leaflet-zoom-box",this._container),Ze(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(u);var h=new H(this._point,this._startPoint),b=h.getSize();mn(this._box,h.min),this._box.style.width=b.x+"px",this._box.style.height=b.y+"px"},_finish:function(){this._moved&&(Yt(this._box),sn(this._container,"leaflet-crosshair")),rd(),Z0(),kt(document,{contextmenu:Ls,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(a(this._resetState,this),0);var h=new z(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(h).fire("boxzoomend",{boxZoomBounds:h})}},_onKeyDown:function(u){u.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});ct.addInitHook("addHandler","boxZoom",_C),ct.mergeOptions({doubleClickZoom:!0});var bC=Ji.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(u){var h=this._map,b=h.getZoom(),T=h.options.zoomDelta,P=u.originalEvent.shiftKey?b-T:b+T;h.options.doubleClickZoom==="center"?h.setZoom(P):h.setZoomAround(u.containerPoint,P)}});ct.addInitHook("addHandler","doubleClickZoom",bC),ct.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var wC=Ji.extend({addHooks:function(){if(!this._draggable){var u=this._map;this._draggable=new ya(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))}Ze(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){sn(this._map._container,"leaflet-grab"),sn(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 h=K(this._map.options.maxBounds);this._offsetLimit=ie(this._map.latLngToContainerPoint(h.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(h.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 h=this._lastTime=+new Date,b=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(b),this._times.push(h),this._prunePositions(h)}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),h=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=h.subtract(u).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(u,h){return u-(u-h)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var u=this._draggable._newPos.subtract(this._draggable._startPos),h=this._offsetLimit;u.xh.max.x&&(u.x=this._viscousLimit(u.x,h.max.x)),u.y>h.max.y&&(u.y=this._viscousLimit(u.y,h.max.y)),this._draggable._newPos=this._draggable._startPos.add(u)}},_onPreDragWrap:function(){var u=this._worldWidth,h=Math.round(u/2),b=this._initialWorldOffset,T=this._draggable._newPos.x,P=(T-h+b)%u+h-b,B=(T+h+b)%u-h-b,oe=Math.abs(P+b)0?B:-B))-h;this._delta=0,this._startTime=null,oe&&(u.options.scrollWheelZoom==="center"?u.setZoom(h+oe):u.setZoomAround(this._lastMousePos,h+oe))}});ct.addInitHook("addHandler","scrollWheelZoom",SC);var r7=600;ct.mergeOptions({tapHold:ze.touchNative&&ze.safari&&ze.mobile,tapTolerance:15});var EC=Ji.extend({addHooks:function(){qe(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){kt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(u){if(clearTimeout(this._holdTimeout),u.touches.length===1){var h=u.touches[0];this._startPos=this._newPos=new q(h.clientX,h.clientY),this._holdTimeout=setTimeout(a(function(){this._cancel(),this._isTapValid()&&(qe(document,"touchend",qn),qe(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",h))},this),r7),qe(document,"touchend touchcancel contextmenu",this._cancel,this),qe(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function u(){kt(document,"touchend",qn),kt(document,"touchend touchcancel",u)},_cancel:function(){clearTimeout(this._holdTimeout),kt(document,"touchend touchcancel contextmenu",this._cancel,this),kt(document,"touchmove",this._onMove,this)},_onMove:function(u){var h=u.touches[0];this._newPos=new q(h.clientX,h.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(u,h){var b=new MouseEvent(u,{bubbles:!0,cancelable:!0,view:window,screenX:h.screenX,screenY:h.screenY,clientX:h.clientX,clientY:h.clientY});b._simulated=!0,h.target.dispatchEvent(b)}});ct.addInitHook("addHandler","tapHold",EC),ct.mergeOptions({touchZoom:ze.touch,bounceAtZoomLimits:!0});var TC=Ji.extend({addHooks:function(){Ze(this._map._container,"leaflet-touch-zoom"),qe(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){sn(this._map._container,"leaflet-touch-zoom"),kt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(u){var h=this._map;if(!(!u.touches||u.touches.length!==2||h._animatingZoom||this._zooming)){var b=h.mouseEventToContainerPoint(u.touches[0]),T=h.mouseEventToContainerPoint(u.touches[1]);this._centerPoint=h.getSize()._divideBy(2),this._startLatLng=h.containerPointToLatLng(this._centerPoint),h.options.touchZoom!=="center"&&(this._pinchStartLatLng=h.containerPointToLatLng(b.add(T)._divideBy(2))),this._startDist=b.distanceTo(T),this._startZoom=h.getZoom(),this._moved=!1,this._zooming=!0,h._stop(),qe(document,"touchmove",this._onTouchMove,this),qe(document,"touchend touchcancel",this._onTouchEnd,this),qn(u)}},_onTouchMove:function(u){if(!(!u.touches||u.touches.length!==2||!this._zooming)){var h=this._map,b=h.mouseEventToContainerPoint(u.touches[0]),T=h.mouseEventToContainerPoint(u.touches[1]),P=b.distanceTo(T)/this._startDist;if(this._zoom=h.getScaleZoom(P,this._startZoom),!h.options.bounceAtZoomLimits&&(this._zoomh.getMaxZoom()&&P>1)&&(this._zoom=h._limitZoom(this._zoom)),h.options.touchZoom==="center"){if(this._center=this._startLatLng,P===1)return}else{var B=b._add(T)._divideBy(2)._subtract(this._centerPoint);if(P===1&&B.x===0&&B.y===0)return;this._center=h.unproject(h.project(this._pinchStartLatLng,this._zoom).subtract(B),this._zoom)}this._moved||(h._moveStart(!0,!1),this._moved=!0),Y(this._animRequest);var oe=a(h._move,h,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=V(oe,this,!0),qn(u)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,Y(this._animRequest),kt(document,"touchmove",this._onTouchMove,this),kt(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))}});ct.addInitHook("addHandler","touchZoom",TC),ct.BoxZoom=_C,ct.DoubleClickZoom=bC,ct.Drag=wC,ct.Keyboard=xC,ct.ScrollWheelZoom=SC,ct.TapHold=EC,ct.TouchZoom=TC,n.Bounds=H,n.Browser=ze,n.CRS=he,n.Canvas=mC,n.Circle=d_,n.CircleMarker=jp,n.Class=G,n.Control=Ai,n.DivIcon=fC,n.DivOverlay=eo,n.DomEvent=wU,n.DomUtil=_U,n.Draggable=ya,n.Evented=le,n.FeatureGroup=Po,n.GeoJSON=jo,n.GridLayer=cd,n.Handler=Ji,n.Icon=Xl,n.ImageOverlay=Dp,n.LatLng=re,n.LatLngBounds=z,n.Layer=Ni,n.LayerGroup=Ql,n.LineUtil=NU,n.Map=ct,n.Marker=Lp,n.Mixin=kU,n.Path=_a,n.Point=q,n.PolyUtil=PU,n.Polygon=Jl,n.Polyline=Lo,n.Popup=Ip,n.PosAnimation=qO,n.Projection=RU,n.Rectangle=yC,n.Renderer=Mo,n.SVG=dd,n.SVGOverlay=dC,n.TileLayer=tc,n.Tooltip=Fp,n.Transformation=ee,n.Util=X,n.VideoOverlay=uC,n.bind=a,n.bounds=ie,n.canvas=gC,n.circle=VU,n.circleMarker=zU,n.control=ad,n.divIcon=XU,n.extend=i,n.featureGroup=$U,n.geoJSON=cC,n.geoJson=YU,n.gridLayer=JU,n.icon=UU,n.imageOverlay=GU,n.latLng=ae,n.latLngBounds=K,n.layerGroup=FU,n.map=xU,n.marker=BU,n.point=D,n.polygon=WU,n.polyline=HU,n.popup=ZU,n.rectangle=n7,n.setOptions=y,n.stamp=l,n.svg=vC,n.svgOverlay=KU,n.tileLayer=hC,n.tooltip=QU,n.transformation=J,n.version=r,n.videoOverlay=qU;var i7=window.L;n.noConflict=function(){return window.L=i7,this},window.L=n})})(F2,F2.exports);var vp=F2.exports;const BA=Gu(vp);function SO(e,t,n){return Object.freeze({instance:e,context:t,container:n})}function EO(e,t){return t==null?function(n,r){const i=F.useRef();return i.current||(i.current=e(n,r)),i}:function(n,r){const i=F.useRef();i.current||(i.current=e(n,r));const o=F.useRef(n),{instance:a}=i.current;return F.useEffect(function(){o.current!==n&&(t(a,n,o.current),o.current=n)},[a,n,r]),i}}function fwe(e,t){F.useEffect(function(){return(t.layerContainer??t.map).addLayer(e.instance),function(){var n;(n=t.layerContainer)==null||n.removeLayer(e.instance),t.map.removeLayer(e.instance)}},[t,e])}function S$(e){return function(t){const n=w$(),r=e(xO(t,n),n);return y$(n.map,t.attribution),x$(r.current,t.eventHandlers),fwe(r.current,n),r}}function hwe(e,t){const n=EO(e,t),r=S$(n);return lwe(r)}function pwe(e,t){const n=EO(e),r=dwe(n,t);return cwe(r)}function mwe(e,t){const n=EO(e,t),r=S$(n);return uwe(r)}function gwe(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 $2(){return $2=Object.assign||function(e){for(var t=1;t(m==null?void 0:m.map)??null,[m]);const y=F.useCallback(_=>{if(_!==null&&m===null){const w=new vp.Map(_,d);n!=null&&c!=null?w.setView(n,c):e!=null&&w.fitBounds(e,t),l!=null&&w.whenReady(l),v(awe(w))}},[]);F.useEffect(()=>()=>{m==null||m.map.remove()},[m]);const x=m?W.createElement(b$,{value:m},r):a??null;return W.createElement("div",$2({},p,{ref:y}),x)}const ywe=F.forwardRef(vwe),_we=hwe(function({position:e,...t},n){const r=new vp.Marker(e,t);return SO(r,swe(n,{overlayContainer:r}))},function(e,t,n){t.position!==n.position&&e.setLatLng(t.position),t.icon!=null&&t.icon!==n.icon&&e.setIcon(t.icon),t.zIndexOffset!=null&&t.zIndexOffset!==n.zIndexOffset&&e.setZIndexOffset(t.zIndexOffset),t.opacity!=null&&t.opacity!==n.opacity&&e.setOpacity(t.opacity),e.dragging!=null&&t.draggable!==n.draggable&&(t.draggable===!0?e.dragging.enable():e.dragging.disable())}),bwe=pwe(function(e,t){const n=new vp.Popup(e,t.overlayContainer);return SO(n,t)},function(e,t,{position:n},r){F.useEffect(function(){const{instance:i}=e;function o(s){s.popup===i&&(i.update(),r(!0))}function a(s){s.popup===i&&r(!1)}return t.map.on({popupopen:o,popupclose:a}),t.overlayContainer==null?(n!=null&&i.setLatLng(n),i.openOn(t.map)):t.overlayContainer.bindPopup(i),function(){var s;t.map.off({popupopen:o,popupclose:a}),(s=t.overlayContainer)==null||s.unbindPopup(),t.map.removeLayer(i)}},[e,t,r,n])}),wwe=mwe(function({url:e,...t},n){const r=new vp.TileLayer(e,xO(t,n));return SO(r,n)},function(e,t,n){gwe(e,t,n);const{url:r}=t;r!=null&&r!==n.url&&e.setUrl(r)}),xwe=()=>g.jsx(wwe,{attribution:'© OpenStreetMap contributors',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),Swe=e=>{if(e.length===0)return{};if(e.length>1)return{bounds:e.map(mt("latLong"))};const[{latLong:t}]=e;return{zoom:10,center:t}},E$=({toggle:e,isOpen:t,title:n,locations:r=[]})=>g.jsx(fa,{toggle:e,isOpen:t,className:"map-modal__modal",contentClassName:"map-modal__modal-content",children:g.jsxs(Co,{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(ywe,{...Swe(r),children:[g.jsx(xwe,{}),r.map(({cityName:i,latLong:o,count:a},s)=>g.jsx(_we,{position:o,children:g.jsxs(bwe,{children:[g.jsx("b",{children:a})," visit",a>1?"s":""," from ",g.jsx("b",{children:i})]})},s))]})]})}),Ewe=({modalTitle:e,activeCities:t,locations:n=[]})=>{const[r,,i,o]=_n(),[a,s,l]=_n(),[c,d]=F.useState([]),f=p0(),p=y=>t?y.filter(({cityName:x})=>t==null?void 0:t.includes(x)):y,m=()=>{if(!t){d(n),i();return}l()},v=y=>()=>{d(y?p(n):n),i()};return g.jsxs(g.Fragment,{children:[g.jsx(_t,{color:"link",className:"open-map-modal-btn__btn",id:f,onClick:m,children:g.jsx(De,{icon:T4})}),g.jsx(Fr,{placement:"left",target:f,children:"Show in map"}),g.jsx(Yh,{isOpen:a,toggle:s,inNavbar:!0,children:g.jsxs(zu,{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(E$,{toggle:o,isOpen:r,title:e,locations:c})]})},Twe=({onChange:e,selected:t={},className:n,isOrphanVisits:r})=>{const{orphanVisitsType:i,excludeBots:o=!1}=t,a=s=>({active:i===s,onClick:()=>e({...t,orphanVisitsType:s===(t==null?void 0:t.orphanVisitsType)?void 0:s})});return g.jsxs(pa,{text:"Filters",dropdownClassName:n,inline:!0,end:!0,minWidth:250,children:[g.jsx(Ue,{header:!0,children:"Bots:"}),g.jsx(Ue,{active:o,onClick:()=>e({...t,excludeBots:!(t!=null&&t.excludeBots)}),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,{...a("base_url"),children:"Base URL"}),g.jsx(Ue,{...a("invalid_short_url"),children:"Invalid short URL"}),g.jsx(Ue,{...a("regular_404"),children:"Regular 404"})]}),g.jsx(Ue,{divider:!0}),g.jsx(Ue,{disabled:!fo(t),onClick:()=>e({excludeBots:!1,orphanVisitsType:void 0}),children:g.jsx("i",{children:"Clear filters"})})]})},T$=(e,t)=>!Bl(e)&&fo(e[t]),zA=e=>typeof e=="number"?e:e?parseFloat(e):0,Owe=(e,{os:t})=>{e[t]=(e[t]||0)+1},Cwe=(e,{browser:t})=>{e[t]=(e[t]||0)+1},kwe=(e,{referer:t})=>{e[t]=(e[t]||0)+1},O$=e=>(t,n)=>{const r=T$(n,e)?n[e]:"Unknown";t[r]=(t[r]||0)+1},Pwe=O$("country"),Lwe=O$("city"),jwe=(e,t)=>{if(!T$(t,"city")||t.city==="Unknown")return;const{city:n,latitude:r,longitude:i}=t,o=e[n]||{cityName:n,count:0,latLong:[zA(r),zA(i)]};o.count+=1,e[n]=o},Mwe=(e,t)=>{if(!ybe(t))return;const{visitedUrl:n}=t;e[n]=(e[n]||0)+1},C$=e=>e.reduce((t,n)=>(Owe(t.os,n),Cwe(t.browsers,n),kwe(t.referrers,n),Pwe(t.countries,n),Lwe(t.cities,n),jwe(t.citiesForMap,n),Mwe(t.visitedUrls,n),t),{os:{},browsers:{},referrers:{},countries:{},cities:{},citiesForMap:{},visitedUrls:{}}),k$=J5(e=>{const{userAgent:t,date:n,referer:r,visitLocation:i,potentialBot:o}=e,a={date:n,potentialBot:o,...$be(t),referer:Ube(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 yO(e)?{...a,type:e.type,visitedUrl:e.visitedUrl}:a}),Awe=Object.freeze(Object.defineProperty({__proto__:null,normalizeVisits:k$,processStatsFromVisits:C$},Symbol.toStringTag,{value:"Module"})),qd=20,Nwe=({browser:e,os:t,referer:n,country:r,city:i,...o},a)=>`${e} ${t} ${n} ${r} ${i} ${o.visitedUrl}`.toLowerCase().includes(a.toLowerCase()),Rwe=(e,t)=>t.filter(n=>Nwe(n,e)),Dwe=(e,t)=>a6(t,e),Iwe=(e,t,n)=>{const r=t?Rwe(t,e):[...e],i=Dwe(n,r),o=i.length;return{visitsGroups:wh(qd,i),total:o}},Fwe=({visits:e,selectedVisits:t=[],setSelectedVisits:n,matchMedia:r=window.matchMedia,isOrphanVisits:i=!1})=>{var o,a;const s="visits-table__header-cell visits-table__sticky",l=()=>r("(max-width: 767px)").matches,[c,d]=F.useState(l()),[f,p]=F.useState(void 0),[m,v]=F.useState({}),y=F.useMemo(()=>Iwe(e,f,m),[f,m]),x=F.useRef(!0),[_,w]=F.useState(1),S=_*qd,E=S-qd,C=8+Number(i),k=N=>()=>v({field:N,dir:g0(N,m.field,m.dir)}),j=N=>g.jsx(Pf,{currentOrder:m,field:N,className:"visits-table__header-icon"});return F.useEffect(()=>{const N=()=>d(l());return window.addEventListener("resize",N),()=>window.removeEventListener("resize",N)},[]),F.useEffect(()=>{w(1),!x.current&&n([]),x.current=!1},[f]),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:`${s} text-center`,onClick:()=>n(t.length0})})}),g.jsxs("th",{className:`${s} text-center`,onClick:k("potentialBot"),children:[g.jsx(De,{icon:mP}),j("potentialBot")]}),g.jsxs("th",{className:s,onClick:k("date"),children:["Date",j("date")]}),g.jsxs("th",{className:s,onClick:k("country"),children:["Country",j("country")]}),g.jsxs("th",{className:s,onClick:k("city"),children:["City",j("city")]}),g.jsxs("th",{className:s,onClick:k("browser"),children:["Browser",j("browser")]}),g.jsxs("th",{className:s,onClick:k("os"),children:["OS",j("os")]}),g.jsxs("th",{className:s,onClick:k("referer"),children:["Referrer",j("referer")]}),i&&g.jsxs("th",{className:s,onClick:k("visitedUrl"),children:["Visited URL",j("visitedUrl")]})]}),g.jsx("tr",{children:g.jsx("td",{colSpan:C,className:"p-0",children:g.jsx(Qh,{noBorder:!0,large:!1,onChange:p})})})]}),g.jsxs("tbody",{children:[!((o=y.visitsGroups[_-1])!=null&&o.length)&&g.jsx("tr",{children:g.jsx("td",{colSpan:C,className:"text-center",children:"No visits found with current filtering"})}),(a=y.visitsGroups[_-1])==null?void 0:a.map((N,U)=>{const R=t.includes(N);return g.jsxs("tr",{style:{cursor:"pointer"},className:rt({"table-active":R}),onClick:()=>n(R?t.filter(V=>V!==N):[...t,N]),children:[g.jsx("td",{className:"text-center",children:R&&g.jsx(De,{icon:Qf,className:"text-primary"})}),g.jsx("td",{className:"text-center",children:N.potentialBot&&g.jsxs(g.Fragment,{children:[g.jsx(De,{icon:mP,id:`botIcon${U}`}),g.jsx(Fr,{placement:"right",target:`botIcon${U}`,children:"Potentially a visit from a bot or crawler"})]})}),g.jsx("td",{children:g.jsx(fy,{date:N.date})}),g.jsx("td",{children:N.country}),g.jsx("td",{children:N.city}),g.jsx("td",{children:N.browser}),g.jsx("td",{children:N.os}),g.jsx("td",{children:N.referer}),i&&g.jsx("td",{children:N.visitedUrl})]},U)})]}),y.total>qd&&g.jsx("tfoot",{children:g.jsx("tr",{children:g.jsx("td",{colSpan:C,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(fO,{pagesCount:Math.ceil(y.total/qd),currentPage:_,setCurrentPage:w,centered:c})}),g.jsx("div",{className:rt("col-md-6",{"d-flex align-items-center flex-row-reverse":!c,"text-center mt-3":c}),children:g.jsxs("div",{children:["Visits ",g.jsx("b",{children:Tn(E+1)})," to"," ",g.jsx("b",{children:Tn(l8(S,y.total))})," of"," ",g.jsx("b",{children:Tn(y.total)})]})})]})})})})]})})},gc={byTime:{title:"By time",subPath:"by-time",icon:GW},byContext:{title:"By context",subPath:"by-context",icon:lE},byLocation:{title:"By location",subPath:"by-location",icon:T4},list:{title:"List",subPath:"list",icon:E4}};let Gm;const yp=({children:e,visitsInfo:t,getVisits:n,cancelGetVisits:r,exportCsv:i,isOrphanVisits:o=!1})=>{const{visits:a,loading:s,loadingLarge:l,error:c,errorData:d,progress:f,fallbackInterval:p}=t,[{dateRange:m,visitsFilter:v},y]=iwe(),x=Hl("visits"),_=In(({startDate:z,endDate:K})=>({dateRange:{startDate:z??void 0,endDate:K??void 0}}),y),w=F.useRef(m??p??(x==null?void 0:x.defaultInterval)??"last30Days"),[S,E]=F.useState([]),[C,k]=F.useState(),j=F.useRef(!0),{search:N}=bn(),U=z=>z?`${z}${N}`:N,R=F.useMemo(()=>k$(a),[a]),{os:V,browsers:Y,referrers:X,countries:G,cities:Z,citiesForMap:te,visitedUrls:le}=F.useMemo(()=>C$(R),[R]),q=F.useMemo(()=>({...v,excludeBots:v.excludeBots??(x==null?void 0:x.excludeBots)}),[v]),I=TT(te),D=z=>{Gm=void 0,E(z)},H=z=>K=>{const re=`${z}_${K}`;Gm===re?(E([]),k(void 0),Gm=void 0):(E(R.filter(Yde(z,K))),k(K),Gm=re)};F.useEffect(()=>r,[]),F.useEffect(()=>{const z=j.current?m??gme(w.current):m;n({dateRange:z,filter:q},j.current),j.current=!1},[m,v]),F.useEffect(()=>{p&&w.current===((x==null?void 0:x.defaultInterval)??"last30Days")&&(w.current=p)},[p]);const ie=()=>l?g.jsxs(Go,{loading:!0,children:["This is going to take a while... :S",g.jsx(YI,{value:f,striped:f===100,className:"mt-3"})]}):s?g.jsx(Go,{loading:!0}):c?g.jsx(qr,{type:"error",children:g.jsx(ia,{errorData:d,fallbackMessage:"An error occurred while loading visits :("})}):ai(a)?g.jsx(Go,{children:"There are no visits matching current filter"}):g.jsxs(g.Fragment,{children:[g.jsx(o6,{fill:!0,children:Object.values(gc).map(({title:z,icon:K,subPath:re},ae)=>g.jsxs(df,{to:U(re),replace:!0,children:[g.jsx(De,{icon:K}),g.jsx("span",{className:"ms-2 d-none d-sm-inline",children:z})]},ae))}),g.jsx(br,{children:g.jsxs(n0,{children:[g.jsx(yt,{path:gc.byTime.subPath,element:g.jsx("div",{className:"col-12 mt-3",children:g.jsx(qbe,{title:"Visits during time",visits:R,highlightedVisits:S,highlightedLabel:C,setSelectedVisits:D})})}),g.jsx(yt,{path:gc.byContext.subPath,element:g.jsxs(g.Fragment,{children:[g.jsx("div",{className:rt("mt-3 col-lg-6",{"col-xl-4":!o}),children:g.jsx(NA,{title:"Operating systems",stats:V})}),g.jsx("div",{className:rt("mt-3 col-lg-6",{"col-xl-4":!o}),children:g.jsx(NA,{title:"Browsers",stats:Y})}),g.jsx("div",{className:rt("mt-3",{"col-xl-4":!o,"col-lg-6":o}),children:g.jsx(Ym,{title:"Referrers",stats:X,withPagination:!1,highlightedStats:Hm(S,"referer"),highlightedLabel:C,sortingItems:{name:"Referrer name",amount:"Visits amount"},onClick:H("referer")})}),o&&g.jsx("div",{className:"mt-3 col-lg-6",children:g.jsx(Ym,{title:"Visited URLs",stats:le,highlightedLabel:C,highlightedStats:Hm(S,"visitedUrl"),sortingItems:{visitedUrl:"Visited URL",amount:"Visits amount"},onClick:H("visitedUrl")})})]})}),g.jsx(yt,{path:gc.byLocation.subPath,element:g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"col-lg-6 mt-3",children:g.jsx(Ym,{title:"Countries",stats:G,highlightedStats:Hm(S,"country"),highlightedLabel:C,sortingItems:{name:"Country name",amount:"Visits amount"},onClick:H("country")})}),g.jsx("div",{className:"col-lg-6 mt-3",children:g.jsx(Ym,{title:"Cities",stats:Z,highlightedStats:Hm(S,"city"),highlightedLabel:C,extraHeaderContent:z=>I.length>0&&g.jsx(Ewe,{modalTitle:"Cities",locations:I,activeCities:z}),sortingItems:{name:"City name",amount:"Visits amount"},onClick:H("city")})})]})}),g.jsx(yt,{path:gc.list.subPath,element:g.jsx("div",{className:"col-12",children:g.jsx(Fwe,{visits:R,selectedVisits:S,setSelectedVisits:D,isOrphanVisits:o})})}),g.jsx(yt,{path:"*",element:g.jsx(QS,{replace:!0,to:U(gc.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(NF,{updatable:!0,disabled:s,initialDateRange:w.current,defaultText:"All visits",onDatesChange:_})}),g.jsx(Twe,{className:"ms-0 ms-md-2 mt-3 mt-md-0",isOrphanVisits:o,selected:q,onChange:z=>y({visitsFilter:z})})]})}),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(rF,{className:"btn-md-block",amount:R.length,onClick:()=>i(R)}),g.jsxs(_t,{outline:!0,disabled:S.length===0,className:"btn-md-block ms-2",onClick:()=>D([]),children:["Clear selection ",S.length>0&&g.jsxs(g.Fragment,{children:["(",Tn(S.length),")"]})]})]})})]})}),g.jsx("section",{className:"mt-3",children:ie()})]})},$we=({exportVisits:e})=>Es(({getDomainVisits:t,domainVisits:n,cancelGetDomainVisits:r})=>{const i=qu(),{domain:o=""}=Dl(),[a,s=a]=o.split("_");return g.jsx(yp,{getVisits:(l,c)=>t({domain:s,query:mp(l),doIntervalFallback:c}),cancelGetVisits:r,visitsInfo:n,exportCsv:l=>e(`domain_${a}_visits.csv`,l),children:g.jsx(gp,{goBack:i,visits:n.visits,title:`"${a}" visits`})})},()=>[wi.visits]),Uwe=({exportVisits:e})=>Es(({getNonOrphanVisits:t,nonOrphanVisits:n,cancelGetNonOrphanVisits:r})=>{const i=qu();return g.jsx(yp,{getVisits:(o,a)=>t({query:mp(o),doIntervalFallback:a}),cancelGetVisits:r,visitsInfo:n,exportCsv:o=>e("non_orphan_visits.csv",o),children:g.jsx(gp,{title:"Non-orphan visits",goBack:i,visits:n.visits})})},()=>[wi.visits]),Bwe=({exportVisits:e})=>Es(({getOrphanVisits:t,orphanVisits:n,cancelGetOrphanVisits:r})=>{const i=qu();return g.jsx(yp,{getVisits:(o,a)=>{var s;return t({query:mp(o),orphanVisitsType:(s=o.filter)==null?void 0:s.orphanVisitsType,doIntervalFallback:a})},cancelGetVisits:r,visitsInfo:n,exportCsv:o=>e("orphan_visits.csv",o),isOrphanVisits:!0,children:g.jsx(gp,{title:"Orphan visits",goBack:i,visits:n.visits})})},()=>[wi.orphanVisits]),P$="shlink/orphanVisits",zwe={visits:[],loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},Vwe=e=>up({typePrefix:`${P$}/getNonOrphanVisits`,createLoaders:({query:t={},doIntervalFallback:n=!1})=>{const{getNonOrphanVisits:r}=e(),i=async(a,s)=>r({...t,page:a,itemsPerPage:s}),o=dp(n,r);return[i,o]},getExtraFulfilledPayload:({query:t={}})=>({query:t}),shouldCancel:t=>t().orphanVisits.cancelLoad}),Hwe=e=>fp({name:P$,initialState:zwe,asyncThunkCreator:e,filterCreatedVisits:({query:t={}},n)=>{const{startDate:r,endDate:i}=t;return n.filter(({visit:o})=>sp(o.date,r,i))}}),L$="shlink/orphanVisits",Wwe={visits:[],loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},Ywe=(e,t)=>!t||t===e.type,Gwe=e=>up({typePrefix:`${L$}/getOrphanVisits`,createLoaders:({orphanVisitsType:t,query:n={},doIntervalFallback:r=!1})=>{const{getOrphanVisits:i}=e(),o=async(s,l)=>i({...n,page:s,itemsPerPage:l}).then(c=>{const d=c.data.filter(f=>yO(f)&&Ywe(f,t));return{...c,data:d}}),a=dp(r,i);return[o,a]},getExtraFulfilledPayload:({query:t={}})=>({query:t}),shouldCancel:t=>t().orphanVisits.cancelLoad}),qwe=e=>fp({name:L$,initialState:Wwe,asyncThunkCreator:e,filterCreatedVisits:({query:t={}},n)=>{const{startDate:r,endDate:i}=t;return n.filter(({visit:o,shortUrl:a})=>!a&&sp(o.date,r,i))}}),j$="shlink/shortUrlVisits",Kwe={visits:[],shortCode:"",domain:void 0,loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},Zwe=e=>up({typePrefix:`${j$}/getShortUrlVisits`,createLoaders:({shortCode:t,query:n={},doIntervalFallback:r=!1})=>{const{getShortUrlVisits:i}=e(),o=async(s,l)=>i(t,{...n,page:s,itemsPerPage:l}),a=dp(r,async s=>i(t,{...s,domain:n.domain}));return[o,a]},getExtraFulfilledPayload:({shortCode:t,query:n={}})=>({shortCode:t,query:n,domain:n.domain}),shouldCancel:t=>t().shortUrlVisits.cancelLoad}),Qwe=e=>fp({name:j$,initialState:Kwe,asyncThunkCreator:e,filterCreatedVisits:({shortCode:t,domain:n,query:r={}},i)=>{const{startDate:o,endDate:a}=r;return i.filter(({shortUrl:s,visit:l})=>s&&Sf(s,t,n)&&sp(l.date,o,a))}}),M$="shlink/tagVisits",Xwe={visits:[],tag:"",loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},Jwe=e=>up({typePrefix:`${M$}/getTagVisits`,createLoaders:({tag:t,query:n={},doIntervalFallback:r=!1})=>{const{getTagVisits:i}=e(),o=async(s,l)=>i(t,{...n,page:s,itemsPerPage:l}),a=dp(r,async s=>i(t,s));return[o,a]},getExtraFulfilledPayload:({tag:t,query:n={}})=>({tag:t,query:n}),shouldCancel:t=>t().tagVisits.cancelLoad}),exe=e=>fp({name:M$,initialState:Xwe,asyncThunkCreator:e,filterCreatedVisits:({tag:t,query:n={}},r)=>{const{startDate:i,endDate:o}=n;return r.filter(({shortUrl:a,visit:s})=>(a==null?void 0:a.tags.includes(t))&&sp(s.date,i,o))}}),A$="shlink/visitsOverview",qm={nonOrphanVisits:{total:0},orphanVisits:{total:0},loading:!1,error:!1},VA=e=>e.filter(({visit:t})=>t.potentialBot).length,txe=e=>Ir(`${A$}/loadVisitsOverview`,()=>e().getVisitsOverview().then(({nonOrphanVisits:t,visitsCount:n,orphanVisits:r,orphanVisitsCount:i})=>({nonOrphanVisits:{total:(t==null?void 0:t.total)??n,nonBots:t==null?void 0:t.nonBots,bots:t==null?void 0:t.bots},orphanVisits:{total:(r==null?void 0:r.total)??i,nonBots:r==null?void 0:r.nonBots,bots:r==null?void 0:r.bots}}))),nxe=e=>fr({name:A$,initialState:qm,reducers:{},extraReducers:t=>{t.addCase(e.pending,()=>({...qm,loading:!0})),t.addCase(e.rejected,()=>({...qm,error:!0})),t.addCase(e.fulfilled,(n,{payload:r})=>({...qm,...r})),t.addCase(cp,({nonOrphanVisits:n,orphanVisits:r,...i},{payload:o})=>{const{nonOrphanVisits:a,orphanVisits:s}=_be(o.createdVisits),l=a.length,c=VA(a),d=l-c,f=s.length,p=VA(s),m=f-p;return{...i,nonOrphanVisits:{total:n.total+l,bots:n.bots&&n.bots+c,nonBots:n.nonBots&&n.nonBots+d},orphanVisits:{total:r.total+f,bots:r.bots&&r.bots+p,nonBots:r.nonBots&&r.nonBots+m}}})}}),rxe=({shortUrlDetail:e,shortUrlVisits:t,goBack:n})=>{const{shortUrl:r,loading:i}=e,{visits:o}=t,a=(r==null?void 0:r.shortUrl)??"",s=(r==null?void 0:r.longUrl)??"",l=r==null?void 0:r.title;return g.jsxs(gp,{title:g.jsxs(g.Fragment,{children:["Visits for ",g.jsx(qo,{href:a})]}),goBack:n,visits:o,shortUrl:r,children:[g.jsx("hr",{}),g.jsxs("div",{children:["Created: ",(()=>r?g.jsxs("span",{children:[g.jsx("b",{id:"created",className:"short-url-visits-header__created-at",children:g.jsx(fy,{date:r.dateCreated,relative:!0})}),g.jsx(Fr,{placement:"bottom",target:"created",children:g.jsx(fy,{date:r.dateCreated})})]}):g.jsx("small",{children:"Loading..."}))()]}),g.jsxs("div",{className:"long-url-container",children:[`${l?"Title":"Long URL"}: `,i&&g.jsx("small",{children:"Loading..."}),!i&&g.jsx(qo,{href:s,children:l??s})]})]})},ixe=({exportVisits:e})=>Es(({shortUrlVisits:t,shortUrlDetail:n,getShortUrlVisits:r,getShortUrlDetail:i,cancelGetShortUrlVisits:o})=>{const{shortCode:a=""}=Dl(),{search:s}=bn(),l=qu(),{domain:c}=Fl(s),d=(p,m)=>r({shortCode:Eg(a),query:{...mp(p),domain:c},doIntervalFallback:m}),f=p=>{var m;return e(`short-url_${(m=n.shortUrl)==null?void 0:m.shortUrl.replace(/https?:\/\//g,"")}_visits.csv`,p)};return F.useEffect(()=>{i({shortCode:Eg(a),domain:c})},[]),g.jsx(yp,{getVisits:d,cancelGetVisits:o,visitsInfo:t,exportCsv:f,children:g.jsx(rxe,{shortUrlDetail:n,shortUrlVisits:t,goBack:l})})},(t,n)=>n.shortCode?[wi.shortUrlVisits(Eg(n.shortCode))]:[]),oxe=({tagVisits:e,goBack:t,colorGenerator:n})=>{const{visits:r,tag:i}=e;return g.jsx(gp,{title:g.jsxs("span",{className:"d-flex align-items-center justify-content-center",children:[g.jsx("span",{className:"me-2",children:"Visits for"}),g.jsx(QT,{text:i,colorGenerator:n})]}),goBack:t,visits:r})},axe=(e,{exportVisits:t})=>Es(({getTagVisits:n,tagVisits:r,cancelGetTagVisits:i})=>{const o=qu(),{tag:a=""}=Dl();return g.jsx(yp,{getVisits:(s,l)=>n({tag:a,query:mp(s),doIntervalFallback:l}),cancelGetVisits:i,visitsInfo:r,exportCsv:s=>t(`tag_${a}_visits.csv`,s),children:g.jsx(oxe,{tagVisits:r,goBack:o,colorGenerator:e})})},()=>[wi.visits]),sxe=(e,t)=>{e.serviceFactory("MapModal",()=>E$),e.serviceFactory("ShortUrlVisits",ixe,"ReportExporter"),e.decorator("ShortUrlVisits",t(["shortUrlVisits","shortUrlDetail","mercureInfo"],["getShortUrlVisits","getShortUrlDetail","cancelGetShortUrlVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("TagVisits",axe,"ColorGenerator","ReportExporter"),e.decorator("TagVisits",t(["tagVisits","mercureInfo"],["getTagVisits","cancelGetTagVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("DomainVisits",$we,"ReportExporter"),e.decorator("DomainVisits",t(["domainVisits","mercureInfo"],["getDomainVisits","cancelGetDomainVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("OrphanVisits",Bwe,"ReportExporter"),e.decorator("OrphanVisits",t(["orphanVisits","mercureInfo"],["getOrphanVisits","cancelGetOrphanVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("NonOrphanVisits",Uwe,"ReportExporter"),e.decorator("NonOrphanVisits",t(["nonOrphanVisits","mercureInfo"],["getNonOrphanVisits","cancelGetNonOrphanVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("VisitsParser",()=>Awe),e.serviceFactory("getShortUrlVisits",Zwe,"apiClientFactory"),e.serviceFactory("cancelGetShortUrlVisits",mt("cancelGetVisits"),"shortUrlVisitsReducerCreator"),e.serviceFactory("getTagVisits",Jwe,"apiClientFactory"),e.serviceFactory("cancelGetTagVisits",mt("cancelGetVisits"),"tagVisitsReducerCreator"),e.serviceFactory("getDomainVisits",bme,"apiClientFactory"),e.serviceFactory("cancelGetDomainVisits",mt("cancelGetVisits"),"domainVisitsReducerCreator"),e.serviceFactory("getOrphanVisits",Gwe,"apiClientFactory"),e.serviceFactory("cancelGetOrphanVisits",mt("cancelGetVisits"),"orphanVisitsReducerCreator"),e.serviceFactory("getNonOrphanVisits",Vwe,"apiClientFactory"),e.serviceFactory("cancelGetNonOrphanVisits",mt("cancelGetVisits"),"nonOrphanVisitsReducerCreator"),e.serviceFactory("createNewVisits",()=>cp),e.serviceFactory("loadVisitsOverview",txe,"apiClientFactory"),e.serviceFactory("visitsOverviewReducerCreator",nxe,"loadVisitsOverview"),e.serviceFactory("visitsOverviewReducer",mt("reducer"),"visitsOverviewReducerCreator"),e.serviceFactory("domainVisitsReducerCreator",wme,"getDomainVisits"),e.serviceFactory("domainVisitsReducer",mt("reducer"),"domainVisitsReducerCreator"),e.serviceFactory("nonOrphanVisitsReducerCreator",Hwe,"getNonOrphanVisits"),e.serviceFactory("nonOrphanVisitsReducer",mt("reducer"),"nonOrphanVisitsReducerCreator"),e.serviceFactory("orphanVisitsReducerCreator",qwe,"getOrphanVisits"),e.serviceFactory("orphanVisitsReducer",mt("reducer"),"orphanVisitsReducerCreator"),e.serviceFactory("shortUrlVisitsReducerCreator",Qwe,"getShortUrlVisits"),e.serviceFactory("shortUrlVisitsReducer",mt("reducer"),"shortUrlVisitsReducerCreator"),e.serviceFactory("tagVisitsReducerCreator",exe,"getTagVisits"),e.serviceFactory("tagVisitsReducer",mt("reducer"),"tagVisitsReducerCreator")},Ad=({children:e,to:t,className:n,...r})=>g.jsx(t4,{className:({isActive:i})=>rt("aside-menu__item",n,{"aside-menu__item--selected":i}),to:t,...r,children:e}),lxe=({routePrefix:e,showOnMobile:t=!1})=>{const{pathname:n}=bn(),r=rt("aside-menu",{"aside-menu--hidden":!t}),i=o=>`${e}${o}`;return g.jsx("aside",{className:r,children:g.jsxs("nav",{className:"nav flex-column aside-menu__nav",children:[g.jsxs(Ad,{to:i("/overview"),children:[g.jsx(De,{fixedWidth:!0,icon:SY}),g.jsx("span",{className:"aside-menu__item-text",children:"Overview"})]}),g.jsxs(Ad,{to:i("/list-short-urls/1"),className:rt({"aside-menu__item--selected":n.match("/list-short-urls")!==null}),children:[g.jsx(De,{fixedWidth:!0,icon:E4}),g.jsx("span",{className:"aside-menu__item-text",children:"List short URLs"})]}),g.jsxs(Ad,{to:i("/create-short-url"),children:[g.jsx(De,{fixedWidth:!0,icon:kY,flip:"horizontal"}),g.jsx("span",{className:"aside-menu__item-text",children:"Create short URL"})]}),g.jsxs(Ad,{to:i("/manage-tags"),children:[g.jsx(De,{fixedWidth:!0,icon:O4}),g.jsx("span",{className:"aside-menu__item-text",children:"Manage tags"})]}),g.jsxs(Ad,{to:i("/manage-domains"),children:[g.jsx(De,{fixedWidth:!0,icon:rY}),g.jsx("span",{className:"aside-menu__item-text",children:"Manage domains"})]})]})})},cxe=(e,t,n,r,i,o,a,s,l,c,d)=>({createNotFound:f})=>{const p=bn(),m=zl(),v=Rl(),[y,x]=F.useMemo(()=>v?[F.Fragment,{}]:[e4,{basename:m}],[v]),[_,w,S,E]=_n();F.useEffect(()=>E(),[p]);const C=ap("domainVisits"),k=rt("shlink-layout__burger-icon",{"shlink-layout__burger-icon--active":_}),j=dge(S,E);return g.jsxs(y,{...x,children:[g.jsx(De,{icon:XW,className:k,onClick:w}),g.jsx("div",{...j,className:"shlink-layout__swipeable",children:g.jsxs("div",{className:"shlink-layout__swipeable-inner",children:[g.jsx(lxe,{routePrefix:m,showOnMobile:_}),g.jsx("div",{className:"shlink-layout__container",onClick:()=>E(),children:g.jsx("div",{className:"container-xl",children:g.jsxs(n0,{children:[g.jsx(yt,{index:!0,element:g.jsx(QS,{replace:!0,to:"overview"})}),g.jsx(yt,{path:"/overview",element:g.jsx(l,{})}),g.jsx(yt,{path:"/list-short-urls/:page",element:g.jsx(t,{})}),g.jsx(yt,{path:"/create-short-url",element:g.jsx(n,{})}),g.jsx(yt,{path:"/short-code/:shortCode/visits/*",element:g.jsx(r,{})}),g.jsx(yt,{path:"/short-code/:shortCode/edit",element:g.jsx(c,{})}),g.jsx(yt,{path:"/tag/:tag/visits/*",element:g.jsx(i,{})}),C&&g.jsx(yt,{path:"/domain/:domain/visits/*",element:g.jsx(o,{})}),g.jsx(yt,{path:"/orphan-visits/*",element:g.jsx(a,{})}),g.jsx(yt,{path:"/non-orphan-visits/*",element:g.jsx(s,{})}),g.jsx(yt,{path:"/manage-tags",element:g.jsx(e,{})}),g.jsx(yt,{path:"/manage-domains",element:g.jsx(d,{})}),f&&g.jsx(yt,{path:"*",element:f("/list-short-urls/1")})]})})})]})})]})},uxe=!0,dxe=e=>D6({devTools:!uxe,reducer:nT({mercureInfo:e.mercureInfoReducer,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,domainsList:e.domainsListReducer,visitsOverview:e.visitsOverviewReducer}),middleware:t=>t({immutableCheck:!1,serializableCheck:!1})}),fxe=e=>{e.serviceFactory("Main",cxe,"TagsList","ShortUrlsList","CreateShortUrl","ShortUrlVisits","TagVisits","DomainVisits","OrphanVisits","NonOrphanVisits","Overview","EditShortUrl","ManageDomains"),e.factory("store",dxe)},ko=new hue,{container:hxe}=ko,pxe=(e,t)=>(...n)=>e[t](...n),mxe=(e,t)=>({...e,[t]:pxe(hxe,t)}),_p=(e,t=[])=>HD(e?c8(e):null,t.reduce(mxe,{}));fxe(ko);_0e(ko,_p);J_e(ko,_p);sxe(ko,_p);Nme(ko);jme(ko,_p);Kme(ko,_p);vbe(ko);let HA;const gxe=e=>({serverVersion:t,apiClient:n,settings:r,routesPrefix:i="",createNotFound:o,tagColorsStorage:a})=>{const s=dfe(t),l=F.useRef(),[c,d]=F.useState();return F.useEffect(()=>{HA=n,e.value("apiClientFactory",()=>HA),a&&e.value("TagColorsStorage",a);const{container:f}=e,{Main:p,store:m,loadMercureInfo:v}=f;l.current=g.jsx(p,{createNotFound:o}),d(m),m.dispatch(v(r))},[n,a]),c?g.jsx(WD,{store:c,children:g.jsx(Yme,{value:r,children:g.jsx(ffe,{value:s,children:g.jsx(hfe,{value:i,children:l.current})})})}):g.jsx(g.Fragment,{})},vxe="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=",yxe="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==",_xe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC",bxe=()=>{delete BA.Icon.Default.prototype._getIconUrl,BA.Icon.Default.mergeOptions({iconRetinaUrl:yxe,iconUrl:vxe,shadowUrl:_xe})};bxe();const wxe=gxe(ko);function vy(e){return t=>{const{resetSelectedServer:n}=t;return F.useEffect(()=>{n()},[]),g.jsx(e,{...t})}}const xxe=({location:e},{error:t})=>class extends F.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(vn,{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(_t,{outline:!0,color:"primary",onClick:()=>e.reload(),children:"Take me back"})]})});const{children:r}=this.props;return r}},N$=({href:e,children:t,rel:n,...r})=>g.jsx("a",{target:"_blank",rel:`noopener noreferrer${n?` ${n}`:""}`,href:e,...r,children:t??e});const Sxe=({id:e,name:t})=>g.jsxs(XI,{tag:Ut,to:`/server/${e}`,className:"servers-list__server-item",children:[t,g.jsx(De,{icon:AY,className:"servers-list__server-item-icon"})]}),R$=({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(KI,{className:Ve("servers-list__list-group",{"servers-list__list-group--embedded":n}),children:e.map(({id:r,name:i})=>g.jsx(Sxe,{id:r,name:i},r))})]}),D$=({color:e=BE,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 Exe=({servers:e})=>{const t=Oo(),n=iE(e),r=!cv(n);return F.useEffect(()=>{const i=n.find(({autoConnect:o})=>o);i&&t(`/server/${i.id}`)},[]),g.jsx("div",{className:"home",children:g.jsx(Xr,{className:"home__main-card",children:g.jsxs(br,{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(D$,{})})})}),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(R$,{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(Ut,{to:"/server/create",className:"btn btn-outline-primary btn-lg me-2",children:[g.jsx(De,{icon:uE})," ",g.jsx("span",{className:"ms-1",children:"Add a server"})]})}),g.jsx("p",{className:"mb-0 mt-5",children:g.jsx(N$,{href:"https://shlink.io/documentation",children:g.jsxs("small",{children:[g.jsx("span",{className:"me-1",children:"Learn more about Shlink"})," ",g.jsx(De,{icon:pY})]})})})]})})]})]})})})};const Txe=e=>()=>{const[t,n,,r]=_n(),i=bn(),{pathname:o}=i;F.useEffect(r,[i]);const a="/settings",s=Ve("main-header__toggle-icon",{"main-header__toggle-icon--opened":t});return g.jsxs(hI,{color:"primary",dark:!0,fixed:"top",className:"main-header",expand:"md",children:[g.jsxs(pI,{tag:Ut,to:"/",children:[g.jsx(D$,{className:"main-header__brand-logo",color:"white"})," Shlink"]}),g.jsx(mI,{onClick:n,children:g.jsx(De,{icon:jY,className:s})}),g.jsx(LX,{navbar:!0,isOpen:t,children:g.jsxs(OE,{navbar:!0,className:"ms-auto",children:[g.jsx(gI,{children:g.jsxs(_I,{tag:Ut,to:a,active:o.startsWith(a),children:[g.jsx(De,{icon:IY}),"  Settings"]})}),g.jsx(e,{})]})})]})},Oxe=({children:e})=>{const t=bn();return F.useEffect(()=>{scrollTo(0,0)},[t]),g.jsx(g.Fragment,{children:e})},Cxe=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,WA=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(Cxe);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},YA=e=>e==="*"||e==="x"||e==="X",GA=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},kxe=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],Pxe=(e,t)=>{if(YA(e)||YA(t))return 0;const[n,r]=kxe(GA(e),GA(t));return n>r?1:n{for(let n=0;n{const n=WA(e),r=WA(t),i=n.pop(),o=r.pop(),a=qA(n,r);return a!==0?a:i&&o?qA(i.split("."),o.split(".")):i||o?i?-1:1:0},jxe=(e,t,n)=>{Mxe(n);const r=Lxe(e,t);return I$[n].includes(r)},I$={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},KA=Object.keys(I$),Mxe=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(KA.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${KA.join("|")}`)},F$=b4(y4,e=>{try{return jxe(e,e,"=")}catch{return!1}}),$$=e=>F$(e)?`v${e}`:e,U$=(e="latest")=>t=>F$(t)?t:e,Axe="%_VERSION_%",Nxe=ol(U$(),$$),ZA=({project:e,version:t})=>g.jsx(N$,{href:`https://github.com/shlinkio/${e}/releases/${t}`,className:"text-muted",children:g.jsx("b",{children:t})}),Rxe=({selectedServer:e,clientVersion:t=Axe})=>{const n=Nxe(t);return g.jsxs("small",{className:"text-muted",children:[x4(e)&&g.jsxs(g.Fragment,{children:["Server: ",g.jsx(ZA,{project:"shlink",version:e.printableVersion})," - "]}),"Client: ",g.jsx(ZA,{project:"shlink-web-client",version:n})]})};const Dxe=/^\/server\/[a-zA-Z0-9-]*\/(?!edit)/,Ixe=({selectedServer:e})=>{const{pathname:t}=bn(),n=F.useMemo(()=>Dxe.test(t),[t]),r=Ve("text-center",{"shlink-versions-container--with-sidebar":n});return g.jsx("div",{className:r,children:g.jsx(Rxe,{selectedServer:e})})};const Zu=({children:e})=>g.jsx("div",{className:"no-menu-wrapper container-xl",children:e});function B$(e,t){return n=>{const r=Dl(),{selectServer:i,selectedServer:o}=n;return F.useEffect(()=>{r.serverId&&i(r.serverId)},[r.serverId]),o?VW(o)?g.jsx(t,{}):g.jsx(e,{...n}):g.jsx(Zu,{children:g.jsx(Go,{loading:!0})})}}const Fxe=(e,t,n,r)=>B$(({selectedServer:i,settings:o})=>{const a=x4(i),s=a?`/server/${i.id}`:"";return a?g.jsx(n,{serverVersion:i.version,apiClient:e(i),settings:o,routesPrefix:s,tagColorsStorage:t,createNotFound:l=>g.jsx(O6,{to:`${s}${l}`,children:"List short URLs"})}):g.jsx(r,{})},r),QA={"Content-Type":"application/json"},XA=e=>e!=null&&e.body?e?{...e,headers:{...e.headers??{},...QA}}:{headers:QA}:e;class $xe{constructor(t){gt(this,"fetchJson",(t,n)=>this.fetch(t,XA(n)).then(async r=>{const i=await r.json();if(!r.ok)throw i;return i}));gt(this,"fetchEmpty",(t,n)=>this.fetch(t,XA(n)).then(async r=>{if(!r.ok)throw await r.json()}));this.fetch=t}}const Uxe=(e,t)=>{e.constant("window",window),e.constant("console",console),e.constant("fetch",window.fetch.bind(window)),e.service("HttpClient",$xe,"fetch"),e.serviceFactory("ScrollToTop",()=>Oxe),e.serviceFactory("MainHeader",Txe,"ServersDropdown"),e.serviceFactory("Home",()=>Exe),e.decorator("Home",vy),e.decorator("Home",t(["servers"],["resetSelectedServer"])),e.serviceFactory("ShlinkWebComponent",()=>wxe),e.serviceFactory("ShlinkWebComponentContainer",Fxe,"buildShlinkApiClient","TagColorsStorage","ShlinkWebComponent","ServerError"),e.decorator("ShlinkWebComponentContainer",t(["selectedServer","settings"],["selectServer"])),e.serviceFactory("ShlinkVersionsContainer",()=>Ixe),e.decorator("ShlinkVersionsContainer",t(["selectedServer"])),e.serviceFactory("ErrorHandler",xxe,"window","console")};let Km;const Bxe=new Uint8Array(16);function zxe(){if(!Km&&(Km=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Km))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Km(Bxe)}const Zn=[];for(let e=0;e<256;++e)Zn.push((e+256).toString(16).slice(1));function Vxe(e,t=0){return(Zn[e[t+0]]+Zn[e[t+1]]+Zn[e[t+2]]+Zn[e[t+3]]+"-"+Zn[e[t+4]]+Zn[e[t+5]]+"-"+Zn[e[t+6]]+Zn[e[t+7]]+"-"+Zn[e[t+8]]+Zn[e[t+9]]+"-"+Zn[e[t+10]]+Zn[e[t+11]]+Zn[e[t+12]]+Zn[e[t+13]]+Zn[e[t+14]]+Zn[e[t+15]]).toLowerCase()}const Hxe=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),JA={randomUUID:Hxe};function z$(e,t,n){if(JA.randomUUID&&!t&&!e)return JA.randomUUID();e=e||{};const r=e.random||(e.rng||zxe)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return Vxe(r)}const Wxe=2e3,Yxe=(e,t)=>(n=!1,r=Wxe)=>{const[i,o]=F.useState(n),a=F.useRef(void 0);return[i,()=>{o(!n),a.current&&t(a.current),a.current=e(()=>o(n),r)}]},V$=()=>{const e=Oo();return()=>e(-1)},Gxe=()=>{const{search:e}=bn();return Fl(e)},H$=({isOpen:e,duplicatedServers:t,onDiscard:n,onSave:r})=>{const i=t.length>1;return g.jsxs(fa,{centered:!0,isOpen:e,children:[g.jsxs(ha,{children:["Duplicated server",i&&"s"]}),g.jsxs(Co,{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:a},s)=>i?g.jsxs("li",{children:[g.jsx("b",{children:o})," - ",g.jsx("b",{children:a})]},s):g.jsxs(F.Fragment,{children:[g.jsxs("li",{children:["URL: ",g.jsx("b",{children:o})]}),g.jsxs("li",{children:["API key: ",g.jsx("b",{children:a})]})]},s))}),g.jsxs("span",{children:[i?"Do you want to ignore duplicated servers":"Do you want to save this server anyway","?"]})]}),g.jsxs(Il,{children:[g.jsx(_t,{color:"link",onClick:n,children:i?"Ignore duplicated":"Discard"}),g.jsx(_t,{color:"primary",onClick:r,children:"Save anyway"})]})]})},qxe=e=>ol(t=>t.preventDefault(),e),W$=({onSubmit:e,initialValues:t,children:n,title:r})=>{const[i,o]=F.useState(""),[a,s]=F.useState(""),[l,c]=F.useState(""),d=qxe(()=>e({name:i,url:a,apiKey:l}));return F.useEffect(()=>{t&&o(t.name),t&&s(t.url),t&&c(t.apiKey)},[t]),g.jsxs("form",{className:"server-form",name:"serverForm",onSubmit:d,children:[g.jsxs(vn,{className:"mb-3",title:r,children:[g.jsx(hg,{value:i,onChange:o,children:"Name"}),g.jsx(hg,{type:"url",value:a,onChange:s,children:"URL"}),g.jsx(hg,{value:l,onChange:c,children:"API key"})]}),g.jsx("div",{className:"text-end",children:n})]})},eN=4e3,tN=({type:e})=>g.jsx("div",{className:"mt-3",children:g.jsxs(qr,{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."]})}),Kxe=(e,t)=>({servers:n,createServers:r})=>{const i=Oo(),o=V$(),a=!!Object.keys(n).length,[s,l]=t(!1,eN),[c,d]=t(!1,eN),[f,p]=_n(),[m,v]=F.useState(),y=()=>{if(!m)return;const x=z$();r([{...m,id:x}]),i(`/server/${x}`)};return F.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(Zu,{children:[g.jsxs(W$,{title:g.jsx("h5",{className:"mb-0",children:"Add new server"}),onSubmit:v,children:[!a&&g.jsx(e,{tooltipPlacement:"top",onImport:l,onImportError:d}),a&&g.jsx(_t,{outline:!0,onClick:o,children:"Cancel"}),g.jsx(_t,{outline:!0,color:"primary",className:"ms-2",children:"Create server"})]}),s&&g.jsx(tN,{type:"success"}),c&&g.jsx(tN,{type:"error"}),g.jsx(H$,{isOpen:f,duplicatedServers:m?[m]:[],onDiscard:o,onSave:y})]})},Zxe=e=>({server:t,className:n,children:r,textClassName:i})=>{const[o,,a,s]=_n();return g.jsxs(g.Fragment,{children:[g.jsxs("span",{className:n,onClick:a,children:[!r&&g.jsx(De,{fixedWidth:!0,icon:aE}),g.jsx("span",{className:i,children:r??"Remove this server"})]}),g.jsx(e,{server:t,isOpen:o,toggle:s})]})},Qxe=({server:e,toggle:t,isOpen:n,deleteServer:r,redirectHome:i=!0})=>{const o=Oo(),a=F.useRef(!1),s=()=>{a.current=!0,t()},l=()=>{a.current&&(r(e),i&&o("/"))};return g.jsxs(fa,{isOpen:n,toggle:t,centered:!0,onClosed:l,children:[g.jsx(ha,{toggle:t,className:"text-danger",children:"Remove server"}),g.jsxs(Co,{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(Il,{children:[g.jsx(_t,{color:"link",onClick:t,children:"Cancel"}),g.jsx(_t,{color:"danger",onClick:s,children:"Delete"})]})]})},Xxe=e=>B$(({editServer:t,selectedServer:n,selectServer:r})=>{const i=V$(),{reconnect:o}=Gxe();if(!of(n))return null;const a=s=>{t(n.id,s),o==="true"&&r(n.id),i()};return g.jsx(Zu,{children:g.jsxs(W$,{title:g.jsxs("h5",{className:"mb-0",children:['Edit "',n.name,'"']}),initialValues:n,onSubmit:a,children:[g.jsx(_t,{outline:!0,className:"me-2",onClick:i,children:"Cancel"}),g.jsx(_t,{outline:!0,color:"primary",children:"Save"})]})})},e);const nN=e=>({url:t,apiKey:n})=>e.some(r=>r.url===t&&r.apiKey===n),Jxe=({importServersFromFile:e})=>({createServers:t,servers:n,children:r,onImport:i=()=>{},onImportError:o=()=>{},tooltipPlacement:a="bottom",className:s=""})=>{const l=ws(),[c,d]=F.useState(),[f,p]=F.useState([]),[m,,v,y]=_n(),x=ol(t,i),_=ol(()=>x(c??[]),y),w=ol(()=>x((c??[]).filter(rW(nN(f)))),y),S=async({target:E})=>{var C;return e((C=E.files)==null?void 0:C[0]).then(d).then(()=>{E.value=null}).catch(o)};return F.useEffect(()=>{if(!c)return;const E=Object.values(n),C=c.filter(nN(E)),k=!!C.length;k?p(C):x(c),k&&v()},[c]),g.jsxs(g.Fragment,{children:[g.jsxs(_t,{outline:!0,id:"importBtn",className:s,onClick:()=>{var E;return(E=l.current)==null?void 0:E.click()},children:[g.jsx(De,{icon:aY,fixedWidth:!0})," ",r??"Import from file"]}),g.jsxs(Fr,{placement:a,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(H$,{isOpen:m,duplicatedServers:f,onDiscard:w,onSave:_})]})};const e2e=e=>({servers:t,selectedServer:n})=>g.jsx(Zu,{children:g.jsxs("div",{className:"server-error__container flex-column",children:[g.jsxs(Go,{className:"w-100 mb-3 mb-md-5",type:"error",fullWidth:!0,children:[!of(n)&&"Could not find this Shlink server.",of(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(R$,{servers:Object.values(t),children:["These are the Shlink servers currently configured. Choose one of them or ",g.jsx(Ut,{to:"/server/create",children:"add a new one"}),"."]}),of(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(Ut,{to:`/server/${n.id}/edit?reconnect=true`,children:"edit it"}),"."]})})]})}),t2e=4e3,n2e=(e,t,n,r)=>({servers:i})=>{const o=Object.values(i),[a,s]=F.useState(o),l=p=>s(o.filter(({name:m,url:v})=>`${m} ${v}`.toLowerCase().match(p.toLowerCase()))),c=a.some(({autoConnect:p})=>!!p),[d,f]=n(!1,t2e);return F.useEffect(()=>{s(Object.values(i))},[i]),g.jsxs(Zu,{children:[g.jsx(Qh,{className:"mb-3",onChange:l}),g.jsxs(br,{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:f,children:"Import servers"}),o.length>0&&g.jsxs(_t,{outline:!0,className:"ms-2 flex-fill",onClick:async()=>e.exportServers(),children:[g.jsx(De,{icon:k4,fixedWidth:!0})," Export servers"]})]}),g.jsx("div",{className:"col-md-6 text-md-end d-flex d-md-block",children:g.jsxs(_t,{outline:!0,color:"primary",className:"flex-fill",tag:Ut,to:"/server/create",children:[g.jsx(De,{icon:uE,fixedWidth:!0})," Add a server"]})})]}),g.jsx(vn,{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:[!a.length&&g.jsx("tr",{className:"text-center",children:g.jsx("td",{colSpan:4,children:"No servers found."})}),a.map(p=>g.jsx(r,{server:p,hasAutoConnect:c},p.id))]})]})}),d&&g.jsx("div",{className:"mt-3",children:g.jsx(qr,{type:"error",children:"The servers could not be imported. Make sure the format is correct."})})]})},r2e=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(De,{icon:Qf,className:"text-primary",id:"autoConnectIcon"}),g.jsx(Fr,{target:"autoConnectIcon",placement:"right",children:"Auto-connect to this server"})]})}),g.jsx("th",{className:"responsive-table__cell","data-th":"Name",children:g.jsx(Ut,{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})})]}),i2e=e=>({server:t,setAutoConnect:n})=>{const[r,,i,o]=_n(),a=`/server/${t.id}`,{autoConnect:s}=t,l=s?iY:Fie;return g.jsxs(m0,{minWidth:170,children:[g.jsxs(Ue,{tag:Ut,to:a,children:[g.jsx(De,{icon:nY,fixedWidth:!0})," Connect"]}),g.jsxs(Ue,{tag:Ut,to:`${a}/edit`,children:[g.jsx(De,{icon:sE,fixedWidth:!0})," Edit server"]}),g.jsxs(Ue,{onClick:()=>n(t,!s),children:[g.jsx(De,{icon:l,fixedWidth:!0})," ",s?"Do not a":"A","uto-connect"]}),g.jsx(Ue,{divider:!0}),g.jsxs(Ue,{className:"dropdown-item--danger",onClick:i,children:[g.jsx(De,{icon:aE,fixedWidth:!0})," Remove server"]}),g.jsx(e,{redirectHome:!1,server:t,isOpen:r,toggle:o})]})},Y$=(e,t)=>F6(e,t,{serializeError:y4}),o2e={},a2e=e=>e.id?e:sv("id",z$(),e),s2e=m4((e,t)=>sv(t.id,t,e),{}),{actions:l2e,reducer:c2e}=fr({name:"shlink/servers",initialState:o2e,reducers:{editServer:{prepare:(e,t)=>({payload:{serverId:e,serverData:t}}),reducer:(e,{payload:t})=>{const{serverId:n,serverData:r}=t;return e[n]?sv(n,{...e[n],...r},e):e}},deleteServer:(e,{payload:t})=>EW(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?kW(zW(e).map(([i,o])=>[i,{...o,autoConnect:i===n}])):sv(n,{...e[n],autoConnect:r},e):e}},createServers:{prepare:ol(rE(a2e),s2e,e=>({payload:e})),reducer:(e,{payload:t})=>({...e,...t})}}}),{editServer:u2e,deleteServer:d2e,setAutoConnect:f2e,createServers:G$}=l2e,h2e=c2e,p2e=e=>Array.isArray(e)?e.filter(w4):[],m2e=e=>Y$("shlink/remoteServers/fetchServers",async(t,{dispatch:n})=>{const r=await e.fetchJson(`${iv.homepage}/servers.json`),i=p2e(r);n(G$(i))}),TO="shlink/selectedServer",g2e="1.0.0",v2e="999.999.999",y2e="latest",_2e=ol(e=>e===y2e?v2e:e,U$(g2e)),b2e=b4(e=>`${e.id}_${e.url}_${e.apiKey}`,async(e,t)=>t().then(({version:n})=>({version:_2e(n),printableVersion:$$(n)}))),rN=null,OO=Dn(`${TO}/resetSelectedServer`),w2e=e=>Y$(`${TO}/selectServer`,async(t,{dispatch:n,getState:r})=>{n(OO());const{servers:i}=r(),o=i[t];if(!o)return{serverNotFound:!0};try{const{health:a}=e(o),{version:s,printableVersion:l}=await b2e(o,a);return{...o,version:s,printableVersion:l}}catch{return{...o,serverNotReachable:!0}}}),x2e=e=>fr({name:TO,initialState:rN,reducers:{},extraReducers:t=>{t.addCase(OO,()=>rN),t.addCase(e.fulfilled,(n,{payload:r})=>r)}}),S2e=({servers:e,selectedServer:t})=>{const n=iE(e),r=()=>cv(n)?g.jsxs(Ue,{tag:Ut,to:"/server/create",children:[g.jsx(De,{icon:uE})," ",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:Ut,to:`/server/${o}`,active:HW(t)===o,children:i},o)),g.jsx(Ue,{divider:!0}),g.jsxs(Ue,{tag:Ut,to:"/manage-servers",children:[g.jsx(De,{icon:hP})," ",g.jsx("span",{className:"ms-1",children:"Manage servers"})]})]});return g.jsxs(Zh,{nav:!0,inNavbar:!0,children:[g.jsxs(Gh,{nav:!0,caret:!0,children:[g.jsx(De,{icon:hP})," ",g.jsx("span",{className:"ms-1",children:"Servers"})]}),g.jsx(zu,{end:!0,style:{right:0},children:r()})]})},E2e=({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)},T2e=(e,t,n)=>{const r=new Blob([t],{type:"text/csv;charset=utf-8;"}),i=URL.createObjectURL(r);E2e(e,i,n)},O2e="shlink-servers.csv";class C2e{constructor(t,n,r){gt(this,"exportServers",async()=>{const t=iE(this.storage.get("servers")??{}).map(WW);try{const n=this.jsonToCsv(t);T2e(this.window,n,O2e)}catch(n){console.error(n)}});this.storage=t,this.window=n,this.jsonToCsv=r}}const k2e=e=>typeof e.url=="string"&&typeof e.apiKey=="string"&&typeof e.name=="string",P2e=e=>Array.isArray(e)&&e.every(k2e);class L2e{constructor(t,n){gt(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 a,s;try{const l=((s=(a=o.target)==null?void 0:a.result)==null?void 0:s.toString())??"",c=await this.csvToJson(l);if(!P2e(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 j2e=(e,t)=>{e.serviceFactory("ManageServers",n2e,"ServersExporter","ImportServersBtn","useTimeoutToggle","ManageServersRow"),e.decorator("ManageServers",vy),e.decorator("ManageServers",t(["selectedServer","servers"],["resetSelectedServer"])),e.serviceFactory("ManageServersRow",r2e,"ManageServersRowDropdown"),e.serviceFactory("ManageServersRowDropdown",i2e,"DeleteServerModal"),e.decorator("ManageServersRowDropdown",t(null,["setAutoConnect"])),e.serviceFactory("CreateServer",Kxe,"ImportServersBtn","useTimeoutToggle"),e.decorator("CreateServer",vy),e.decorator("CreateServer",t(["selectedServer","servers"],["createServers","resetSelectedServer"])),e.serviceFactory("EditServer",Xxe,"ServerError"),e.decorator("EditServer",t(["selectedServer"],["editServer","selectServer","resetSelectedServer"])),e.serviceFactory("ServersDropdown",()=>S2e),e.decorator("ServersDropdown",t(["servers","selectedServer"])),e.serviceFactory("DeleteServerModal",()=>Qxe),e.decorator("DeleteServerModal",t(null,["deleteServer"])),e.serviceFactory("DeleteServerButton",Zxe,"DeleteServerModal"),e.serviceFactory("ImportServersBtn",Jxe,"ServersImporter"),e.decorator("ImportServersBtn",t(["servers"],["createServers"])),e.serviceFactory("ServerError",e2e,"DeleteServerButton"),e.decorator("ServerError",t(["servers","selectedServer"])),e.constant("fileReaderFactory",()=>new FileReader),e.service("ServersImporter",L2e,"csvToJson","fileReaderFactory"),e.service("ServersExporter",C2e,"Storage","window","jsonToCsv"),e.serviceFactory("selectServer",w2e,"buildShlinkApiClient","loadMercureInfo"),e.serviceFactory("createServers",()=>G$),e.serviceFactory("deleteServer",()=>d2e),e.serviceFactory("editServer",()=>u2e),e.serviceFactory("setAutoConnect",()=>f2e),e.serviceFactory("fetchServers",m2e,"HttpClient"),e.serviceFactory("resetSelectedServer",()=>OO),e.serviceFactory("selectedServerReducerCreator",x2e,"selectServer"),e.serviceFactory("selectedServerReducer",zH("reducer"),"selectedServerReducerCreator")},Jc=({children:e})=>g.jsx("small",{className:"form-text text-muted d-block",children:e}),M2e=e=>e?`${e}`:"",A2e=({settings:e,toggleRealTimeUpdates:t,setRealTimeUpdatesInterval:n})=>{const{realTimeUpdates:r={enabled:!0}}=e,i=p0();return g.jsxs(vn,{title:"Real-time updates",className:"h-100",children:[g.jsx(Hr,{children:g.jsxs(_u,{checked:r.enabled,onChange:t,children:["Enable or disable real-time updates.",g.jsxs(Jc,{children:["Real-time updates are currently being ",g.jsx("b",{children:r.enabled?"processed":"ignored"}),"."]})]})}),g.jsxs(Hu,{noMargin:!0,label:"Real-time updates frequency (in minutes):",labelClassName:Ve("form-label",{"text-muted":!r.enabled}),id:i,children:[g.jsx(yu,{type:"number",min:0,placeholder:"Immediate",disabled:!r.enabled,value:M2e(r.interval),id:i,onChange:({target:o})=>n(Number(o.value))}),r.enabled&&g.jsxs(Jc,{children:[r.interval!==void 0&&r.interval>0&&g.jsxs("span",{children:["Updates will be reflected in the UI every ",g.jsx("b",{children:r.interval})," minute",r.interval>1&&"s","."]}),!r.interval&&"Updates will be reflected in the UI as soon as they happen."]})]})]})},q$={field:"dateCreated",dir:"DESC"},N2e={realTimeUpdates:{enabled:!0},shortUrlCreation:{validateUrls:!1},ui:{theme:"light"},visits:{defaultInterval:"last30Days"},shortUrlsList:{defaultOrdering:q$}},R2e=(e,{payload:t})=>DW(e,t),Fs=e=>({reducer:R2e,prepare:e}),$s=e=>({payload:e}),{reducer:D2e,actions:I2e}=fr({name:"shlink/settings",initialState:N2e,reducers:{toggleRealTimeUpdates:Fs(e=>$s({realTimeUpdates:{enabled:e}})),setRealTimeUpdatesInterval:Fs(e=>$s({realTimeUpdates:{interval:e}})),setShortUrlCreationSettings:Fs(e=>$s({shortUrlCreation:e})),setShortUrlsListSettings:Fs(e=>$s({shortUrlsList:e})),setUiSettings:Fs(e=>$s({ui:e})),setVisitsSettings:Fs(e=>$s({visits:e})),setTagsSettings:Fs(e=>$s({tags:e}))}}),{toggleRealTimeUpdates:F2e,setRealTimeUpdatesInterval:$2e,setShortUrlCreationSettings:U2e,setShortUrlsListSettings:B2e,setUiSettings:z2e,setVisitsSettings:V2e,setTagsSettings:H2e}=I2e,W2e=D2e,nb=({items:e})=>g.jsx(g.Fragment,{children:e.map((t,n)=>g.jsx("div",{className:"mb-3",children:t},n))}),Y2e=(e,t,n,r,i,o)=>()=>g.jsxs(Zu,{children:[g.jsxs(o6,{className:"mb-3",children:[g.jsx(df,{to:"general",children:"General"}),g.jsx(df,{to:"short-urls",children:"Short URLs"}),g.jsx(df,{to:"other-items",children:"Other items"})]}),g.jsxs(n0,{children:[g.jsx(yt,{path:"general",element:g.jsx(nb,{items:[g.jsx(r,{}),g.jsx(e,{})]})}),g.jsx(yt,{path:"short-urls",element:g.jsx(nb,{items:[g.jsx(t,{}),g.jsx(n,{})]})}),g.jsx(yt,{path:"other-items",element:g.jsx(nb,{items:[g.jsx(o,{}),g.jsx(i,{})]})}),g.jsx(yt,{path:"*",element:g.jsx(QS,{replace:!0,to:"general"})})]})]}),rb=e=>e==="includes"?"Suggest tags including input":"Suggest tags starting with input",G2e=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."]}),q2e=({settings:e,setShortUrlCreationSettings:t})=>{const n=e.shortUrlCreation??{validateUrls:!1},r=i=>()=>t({...n??{validateUrls:!1},tagFilteringMode:i});return g.jsxs(vn,{title:"Short URLs form",className:"h-100",children:[g.jsx(Hr,{children:g.jsxs(_u,{checked:n.validateUrls??!1,onChange:i=>t({...n,validateUrls:i}),children:["Request validation on long URLs when creating new short URLs.",g.jsxs(Jc,{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(Hr,{children:g.jsxs(_u,{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(Jc,{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(Hu,{noMargin:!0,label:"Tag suggestions search mode:",children:[g.jsxs(pa,{text:rb(n.tagFilteringMode),children:[g.jsx(Ue,{active:!n.tagFilteringMode||n.tagFilteringMode==="startsWith",onClick:r("startsWith"),children:rb("startsWith")}),g.jsx(Ue,{active:n.tagFilteringMode==="includes",onClick:r("includes"),children:rb("includes")})]}),g.jsx(Jc,{children:G2e(n.tagFilteringMode)})]})]})},K2e={dateCreated:"Created at",shortCode:"Short URL",longUrl:"Long URL",title:"Title",visits:"Visits"},Z2e=({settings:{shortUrlsList:e},setShortUrlsListSettings:t})=>g.jsx(vn,{title:"Short URLs list",className:"h-100",children:g.jsx(Hu,{noMargin:!0,label:"Default ordering for short URLs list:",children:g.jsx(Xh,{items:K2e,order:(e==null?void 0:e.defaultOrdering)??q$,onChange:(n,r)=>t({defaultOrdering:{field:n,dir:r}})})})}),Q2e={tag:"Tag",shortUrls:"Short URLs",visits:"Visits"},X2e=({settings:{tags:e},setTagsSettings:t})=>g.jsx(vn,{title:"Tags",className:"h-100",children:g.jsx(Hu,{noMargin:!0,label:"Default ordering for tags list:",children:g.jsx(Xh,{items:Q2e,order:(e==null?void 0:e.defaultOrdering)??{},onChange:(n,r)=>t({...e,defaultOrdering:{field:n,dir:r}})})})});const J2e=({settings:{ui:e},setUiSettings:t})=>g.jsxs(vn,{title:"User interface",className:"h-100",children:[g.jsx(De,{icon:(e==null?void 0:e.theme)==="dark"?$Y:CY,className:"user-interface__theme-icon"}),g.jsx(_u,{checked:(e==null?void 0:e.theme)==="dark",onChange:n=>{const r=n?"dark":"light";t({...e,theme:r}),c6(r)},children:"Use dark theme."})]}),K$={today:"Today",yesterday:"Yesterday",last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",last180Days:"Last 180 days",last365Days:"Last 365 days"},eSe=(e,t)=>!e||e==="all"?t:K$[e],tSe=({onChange:e,active:t,allText:n})=>g.jsxs(pa,{text:eSe(t,n),children:[g.jsx(Ue,{active:t==="all",onClick:()=>e("all"),children:n}),g.jsx(Ue,{divider:!0}),Object.entries(K$).map(([r,i])=>g.jsx(Ue,{active:t===r,onClick:()=>e(r),children:i},r))]}),iN=e=>{var t;return((t=e.visits)==null?void 0:t.defaultInterval)??"last30Days"},nSe=({settings:e,setVisitsSettings:t})=>{var n,r;return g.jsxs(vn,{title:"Visits",className:"h-100",children:[g.jsx(Hr,{children:g.jsxs(_u,{checked:!!((n=e.visits)!=null&&n.excludeBots),onChange:i=>t({defaultInterval:iN(e),excludeBots:i}),children:["Exclude bots wherever possible (this option‘s effect might depend on Shlink server‘s version).",g.jsxs(Jc,{children:["The visits coming from potential bots will be ",g.jsx("b",{children:(r=e.visits)!=null&&r.excludeBots?"excluded":"included"}),"."]})]})}),g.jsx(Hu,{noMargin:!0,label:"Default interval to load on visits sections:",children:g.jsx(tSe,{allText:"All visits",active:iN(e),onChange:i=>t({defaultInterval:i})})})]})},rSe=(e,t)=>{e.serviceFactory("Settings",Y2e,"RealTimeUpdatesSettings","ShortUrlCreationSettings","ShortUrlsListSettings","UserInterfaceSettings","VisitsSettings","TagsSettings"),e.decorator("Settings",vy),e.decorator("Settings",t(null,["resetSelectedServer"])),e.serviceFactory("RealTimeUpdatesSettings",()=>A2e),e.decorator("RealTimeUpdatesSettings",t(["settings"],["toggleRealTimeUpdates","setRealTimeUpdatesInterval"])),e.serviceFactory("ShortUrlCreationSettings",()=>q2e),e.decorator("ShortUrlCreationSettings",t(["settings"],["setShortUrlCreationSettings"])),e.serviceFactory("UserInterfaceSettings",()=>J2e),e.decorator("UserInterfaceSettings",t(["settings"],["setUiSettings"])),e.serviceFactory("VisitsSettings",()=>nSe),e.decorator("VisitsSettings",t(["settings"],["setVisitsSettings"])),e.serviceFactory("TagsSettings",()=>X2e),e.decorator("TagsSettings",t(["settings"],["setTagsSettings"])),e.serviceFactory("ShortUrlsListSettings",()=>Z2e),e.decorator("ShortUrlsListSettings",t(["settings"],["setShortUrlsListSettings"])),e.serviceFactory("toggleRealTimeUpdates",()=>F2e),e.serviceFactory("setRealTimeUpdatesInterval",()=>$2e),e.serviceFactory("setShortUrlCreationSettings",()=>U2e),e.serviceFactory("setShortUrlsListSettings",()=>B2e),e.serviceFactory("setUiSettings",()=>z2e),e.serviceFactory("setVisitsSettings",()=>V2e),e.serviceFactory("setTagsSettings",()=>H2e)};var iSe="Expected a function",Z$="__lodash_hash_undefined__",Q$=1/0,oSe="[object Function]",aSe="[object GeneratorFunction]",sSe="[object Symbol]",lSe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,cSe=/^\w*$/,uSe=/^\./,dSe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,fSe=/[\\^$.*+?()[\]{}|]/g,hSe=/\\(\\)?/g,pSe=/^\[object .+?Constructor\]$/,mSe=typeof Bp=="object"&&Bp&&Bp.Object===Object&&Bp,gSe=typeof self=="object"&&self&&self.Object===Object&&self,CO=mSe||gSe||Function("return this")();function vSe(e,t){return e==null?void 0:e[t]}function ySe(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var _Se=Array.prototype,bSe=Function.prototype,X$=Object.prototype,ib=CO["__core-js_shared__"],oN=function(){var e=/[^.]+$/.exec(ib&&ib.keys&&ib.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),J$=bSe.toString,kO=X$.hasOwnProperty,eU=X$.toString,wSe=RegExp("^"+J$.call(kO).replace(fSe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),aN=CO.Symbol,xSe=_Se.splice,SSe=tU(CO,"Map"),Mh=tU(Object,"create"),sN=aN?aN.prototype:void 0,lN=sN?sN.toString:void 0;function Ll(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1}function ASe(e,t){var n=this.__data__,r=B0(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}Qu.prototype.clear=PSe;Qu.prototype.delete=LSe;Qu.prototype.get=jSe;Qu.prototype.has=MSe;Qu.prototype.set=ASe;function Yl(e){var t=-1,n=e?e.length:0;for(this.clear();++tr.toFixed(n).replace(".",t):r=>`${r}`.replace(".",t):n?r=>r.toFixed(n):r=>`${r}`}function jO(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 nEe(e={stringFormatter:jO()}){return t=>e.stringFormatter(t.toString().slice(7,-1))}function rEe(e={stringFormatter:jO()}){return t=>{if(t===null)return"";let n=JSON.stringify(t);return n===void 0?"":(n[0]==='"'&&(n=n.replace(/^"(.+)"$/,"$1")),e.stringFormatter(n))}}function uN(e,t,n){const r=e[t];return r===void 0?n:r}function iU(e,t){try{return Array.isArray(t)?e.push(...t):e.push(t),e}catch{return e.concat(t)}}function U2(e,t){let n=!0;return e.reduce((r,i)=>(i==null&&(i=""),n?(n=!1,`${i}`):`${r}${t}${i}`),"")}var dN;(function(e){e.header="header",e.undefined="undefined",e.boolean="boolean",e.number="number",e.bigint="bigint",e.string="string",e.symbol="symbol",e.function="function",e.object="object"})(dN||(dN={}));class iEe{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||jO(),i=rEe({stringFormatter:r}),o={header:r,undefined:ob,boolean:ob,number:tEe(),bigint:ob,string:r,symbol:nEe({stringFormatter:r}),function:i,object:i};return n.formatters=Object.assign(Object.assign({},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=>cN(i,r,n):i=>uN(i,r,n)};if(typeof r=="object"){const i="default"in r?r.default:n;if(typeof r.value=="string"){const o=r.value;return{label:r.label||r.value,value:r.value.includes(".")||r.value.includes("[")?a=>cN(a,o,i):a=>uN(a,o,i)}}if(typeof r.value=="function"){const o=r.label||r.value.name||"",a={label:o,default:i},s=r.value;return{label:o,value(l){const c=s(l,a);return c===void 0?i:c}}}}throw new Error("Invalid field info option. "+JSON.stringify(r))})}getHeader(){return U2(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(iU,[]),[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 U2(n,this.opts.delimiter)}processCell(t,n){return this.processValue(n.value(t))}processValue(t){const n=this.opts.formatters[typeof t];return n(t)}}class oEe extends iEe{constructor(t){super(t)}parse(t){const n=this.preprocessData(t);this.opts.fields=this.opts.fields||this.preprocessFieldsInfo(n.reduce((a,s)=>(Object.keys(s).forEach(l=>{a.includes(l)||a.push(l)}),a),[]),this.opts.defaultValue);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){if(t==null||n.length===0)throw new Error('Data should not be empty or the "fields" option should be included');if(typeof n[0]!="object")throw new Error('Data items should be objects or the "fields" option should be included')}return this.opts.transforms.length===0?n:n.map(r=>this.preprocessRow(r)).reduce(iU,[])}processData(t){return U2(t.map(n=>this.processRow(n)).filter(n=>n),this.opts.eol)}}var Ln;(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"})(Ln||(Ln={}));Ln.QUOTATION_MARK+"",Ln.QUOTATION_MARK,Ln.REVERSE_SOLIDUS+"",Ln.REVERSE_SOLIDUS,Ln.SOLIDUS+"",Ln.SOLIDUS,Ln.LATIN_SMALL_LETTER_B+"",Ln.BACKSPACE,Ln.LATIN_SMALL_LETTER_F+"",Ln.FORM_FEED,Ln.LATIN_SMALL_LETTER_N+"",Ln.NEWLINE,Ln.LATIN_SMALL_LETTER_R+"",Ln.CARRIAGE_RETURN,Ln.LATIN_SMALL_LETTER_T+"",Ln.TAB;var fN;(function(e){e[e.LEFT_BRACE=0]="LEFT_BRACE",e[e.RIGHT_BRACE=1]="RIGHT_BRACE",e[e.LEFT_BRACKET=2]="LEFT_BRACKET",e[e.RIGHT_BRACKET=3]="RIGHT_BRACKET",e[e.COLON=4]="COLON",e[e.COMMA=5]="COMMA",e[e.TRUE=6]="TRUE",e[e.FALSE=7]="FALSE",e[e.NULL=8]="NULL",e[e.STRING=9]="STRING",e[e.NUMBER=10]="NUMBER",e[e.SEPARATOR=11]="SEPARATOR"})(fN||(fN={}));var hN;(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"})(hN||(hN={}));var pN;(function(e){e[e.OBJECT=0]="OBJECT",e[e.ARRAY=1]="ARRAY"})(pN||(pN={}));var mN;(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"})(mN||(mN={}));var aEe=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 a in r)n.d(o,a,(function(s){return r[s]}).bind(null,a));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=f;var o=n(5);o.inherits=n(2);var a=n(23),s=n(14);o.inherits(f,a);for(var l=i(s.prototype),c=0;c + * @license MIT + */var i=n(38),o=n(39),a=n(40);function s(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function l(O,M){if(s()=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|O}function y(O,M){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 $=O.length;if($===0)return 0;for(var ee=!1;;)switch(M){case"ascii":case"latin1":case"binary":return $;case"utf8":case"utf-8":case void 0:return re(O).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*$;case"hex":return $>>>1;case"base64":return ae(O).length;default:if(ee)return re(O).length;M=(""+M).toLowerCase(),ee=!0}}function x(O,M,$){var ee=O[M];O[M]=O[$],O[$]=ee}function _(O,M,$,ee,J){if(O.length===0)return-1;if(typeof $=="string"?(ee=$,$=0):$>2147483647?$=2147483647:$<-2147483648&&($=-2147483648),$=+$,isNaN($)&&($=J?0:O.length-1),$<0&&($=O.length+$),$>=O.length){if(J)return-1;$=O.length-1}else if($<0){if(!J)return-1;$=0}if(typeof M=="string"&&(M=c.from(M,ee)),c.isBuffer(M))return M.length===0?-1:w(O,M,$,ee,J);if(typeof M=="number")return M&=255,c.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?J?Uint8Array.prototype.indexOf.call(O,M,$):Uint8Array.prototype.lastIndexOf.call(O,M,$):w(O,[M],$,ee,J);throw new TypeError("val must be string, number or Buffer")}function w(O,M,$,ee,J){var se,ge=1,Me=O.length,ue=M.length;if(ee!==void 0&&((ee=String(ee).toLowerCase())==="ucs2"||ee==="ucs-2"||ee==="utf16le"||ee==="utf-16le")){if(O.length<2||M.length<2)return-1;ge=2,Me/=2,ue/=2,$/=2}function me(Ce,je){return ge===1?Ce[je]:Ce.readUInt16BE(je*ge)}if(J){var _e=-1;for(se=$;seMe&&($=Me-ue),se=$;se>=0;se--){for(var Se=!0,ke=0;keJ&&(ee=J):ee=J;var se=M.length;if(se%2!=0)throw new TypeError("Invalid hex string");ee>se/2&&(ee=se/2);for(var ge=0;ge>8,ue=ge%256,me.push(ue),me.push(Me);return me}(M,O.length-$),O,$,ee)}function U(O,M,$){return M===0&&$===O.length?i.fromByteArray(O):i.fromByteArray(O.slice(M,$))}function R(O,M,$){$=Math.min(O.length,$);for(var ee=[],J=M;J<$;){var se,ge,Me,ue,me=O[J],_e=null,Se=me>239?4:me>223?3:me>191?2:1;if(J+Se<=$)switch(Se){case 1:me<128&&(_e=me);break;case 2:(192&(se=O[J+1]))==128&&(ue=(31&me)<<6|63&se)>127&&(_e=ue);break;case 3:se=O[J+1],ge=O[J+2],(192&se)==128&&(192&ge)==128&&(ue=(15&me)<<12|(63&se)<<6|63&ge)>2047&&(ue<55296||ue>57343)&&(_e=ue);break;case 4:se=O[J+1],ge=O[J+2],Me=O[J+3],(192&se)==128&&(192&ge)==128&&(192&Me)==128&&(ue=(15&me)<<18|(63&se)<<12|(63&ge)<<6|63&Me)>65535&&ue<1114112&&(_e=ue)}_e===null?(_e=65533,Se=1):_e>65535&&(_e-=65536,ee.push(_e>>>10&1023|55296),_e=56320|1023&_e),ee.push(_e),J+=Se}return function(ke){var Ce=ke.length;if(Ce<=V)return String.fromCharCode.apply(String,ke);for(var je="",ce=0;cethis.length||((ee===void 0||ee>this.length)&&(ee=this.length),ee<=0)||(ee>>>=0)<=($>>>=0))return"";for(M||(M="utf8");;)switch(M){case"hex":return G(this,$,ee);case"utf8":case"utf-8":return R(this,$,ee);case"ascii":return Y(this,$,ee);case"latin1":case"binary":return X(this,$,ee);case"base64":return U(this,$,ee);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Z(this,$,ee);default:if(J)throw new TypeError("Unknown encoding: "+M);M=(M+"").toLowerCase(),J=!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="",M=t.INSPECT_MAX_BYTES;return this.length>0&&(O=this.toString("hex",0,M).match(/.{2}/g).join(" "),this.length>M&&(O+=" ... ")),""},c.prototype.compare=function(O,M,$,ee,J){if(!c.isBuffer(O))throw new TypeError("Argument must be a Buffer");if(M===void 0&&(M=0),$===void 0&&($=O?O.length:0),ee===void 0&&(ee=0),J===void 0&&(J=this.length),M<0||$>O.length||ee<0||J>this.length)throw new RangeError("out of range index");if(ee>=J&&M>=$)return 0;if(ee>=J)return-1;if(M>=$)return 1;if(M>>>=0,$>>>=0,ee>>>=0,J>>>=0,this===O)return 0;for(var se=J-ee,ge=$-M,Me=Math.min(se,ge),ue=this.slice(ee,J),me=O.slice(M,$),_e=0;_eJ)&&($=J),O.length>0&&($<0||M<0)||M>this.length)throw new RangeError("Attempt to write outside buffer bounds");ee||(ee="utf8");for(var se=!1;;)switch(ee){case"hex":return S(this,O,M,$);case"utf8":case"utf-8":return E(this,O,M,$);case"ascii":return C(this,O,M,$);case"latin1":case"binary":return k(this,O,M,$);case"base64":return j(this,O,M,$);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,O,M,$);default:if(se)throw new TypeError("Unknown encoding: "+ee);ee=(""+ee).toLowerCase(),se=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var V=4096;function Y(O,M,$){var ee="";$=Math.min(O.length,$);for(var J=M;J<$;++J)ee+=String.fromCharCode(127&O[J]);return ee}function X(O,M,$){var ee="";$=Math.min(O.length,$);for(var J=M;J<$;++J)ee+=String.fromCharCode(O[J]);return ee}function G(O,M,$){var ee=O.length;(!M||M<0)&&(M=0),(!$||$<0||$>ee)&&($=ee);for(var J="",se=M;se<$;++se)J+=K(O[se]);return J}function Z(O,M,$){for(var ee=O.slice(M,$),J="",se=0;se$)throw new RangeError("Trying to access beyond buffer length")}function le(O,M,$,ee,J,se){if(!c.isBuffer(O))throw new TypeError('"buffer" argument must be a Buffer instance');if(M>J||MO.length)throw new RangeError("Index out of range")}function q(O,M,$,ee){M<0&&(M=65535+M+1);for(var J=0,se=Math.min(O.length-$,2);J>>8*(ee?J:1-J)}function I(O,M,$,ee){M<0&&(M=4294967295+M+1);for(var J=0,se=Math.min(O.length-$,4);J>>8*(ee?J:3-J)&255}function D(O,M,$,ee,J,se){if($+ee>O.length)throw new RangeError("Index out of range");if($<0)throw new RangeError("Index out of range")}function H(O,M,$,ee,J){return J||D(O,0,$,4),o.write(O,M,$,ee,23,4),$+4}function ie(O,M,$,ee,J){return J||D(O,0,$,8),o.write(O,M,$,ee,52,8),$+8}c.prototype.slice=function(O,M){var $,ee=this.length;if(O=~~O,M=M===void 0?ee:~~M,O<0?(O+=ee)<0&&(O=0):O>ee&&(O=ee),M<0?(M+=ee)<0&&(M=0):M>ee&&(M=ee),M0&&(J*=256);)ee+=this[O+--M]*J;return ee},c.prototype.readUInt8=function(O,M){return M||te(O,1,this.length),this[O]},c.prototype.readUInt16LE=function(O,M){return M||te(O,2,this.length),this[O]|this[O+1]<<8},c.prototype.readUInt16BE=function(O,M){return M||te(O,2,this.length),this[O]<<8|this[O+1]},c.prototype.readUInt32LE=function(O,M){return M||te(O,4,this.length),(this[O]|this[O+1]<<8|this[O+2]<<16)+16777216*this[O+3]},c.prototype.readUInt32BE=function(O,M){return M||te(O,4,this.length),16777216*this[O]+(this[O+1]<<16|this[O+2]<<8|this[O+3])},c.prototype.readIntLE=function(O,M,$){O|=0,M|=0,$||te(O,M,this.length);for(var ee=this[O],J=1,se=0;++se=(J*=128)&&(ee-=Math.pow(2,8*M)),ee},c.prototype.readIntBE=function(O,M,$){O|=0,M|=0,$||te(O,M,this.length);for(var ee=M,J=1,se=this[O+--ee];ee>0&&(J*=256);)se+=this[O+--ee]*J;return se>=(J*=128)&&(se-=Math.pow(2,8*M)),se},c.prototype.readInt8=function(O,M){return M||te(O,1,this.length),128&this[O]?-1*(255-this[O]+1):this[O]},c.prototype.readInt16LE=function(O,M){M||te(O,2,this.length);var $=this[O]|this[O+1]<<8;return 32768&$?4294901760|$:$},c.prototype.readInt16BE=function(O,M){M||te(O,2,this.length);var $=this[O+1]|this[O]<<8;return 32768&$?4294901760|$:$},c.prototype.readInt32LE=function(O,M){return M||te(O,4,this.length),this[O]|this[O+1]<<8|this[O+2]<<16|this[O+3]<<24},c.prototype.readInt32BE=function(O,M){return M||te(O,4,this.length),this[O]<<24|this[O+1]<<16|this[O+2]<<8|this[O+3]},c.prototype.readFloatLE=function(O,M){return M||te(O,4,this.length),o.read(this,O,!0,23,4)},c.prototype.readFloatBE=function(O,M){return M||te(O,4,this.length),o.read(this,O,!1,23,4)},c.prototype.readDoubleLE=function(O,M){return M||te(O,8,this.length),o.read(this,O,!0,52,8)},c.prototype.readDoubleBE=function(O,M){return M||te(O,8,this.length),o.read(this,O,!1,52,8)},c.prototype.writeUIntLE=function(O,M,$,ee){O=+O,M|=0,$|=0,ee||le(this,O,M,$,Math.pow(2,8*$)-1,0);var J=1,se=0;for(this[M]=255&O;++se<$&&(J*=256);)this[M+se]=O/J&255;return M+$},c.prototype.writeUIntBE=function(O,M,$,ee){O=+O,M|=0,$|=0,ee||le(this,O,M,$,Math.pow(2,8*$)-1,0);var J=$-1,se=1;for(this[M+J]=255&O;--J>=0&&(se*=256);)this[M+J]=O/se&255;return M+$},c.prototype.writeUInt8=function(O,M,$){return O=+O,M|=0,$||le(this,O,M,1,255,0),c.TYPED_ARRAY_SUPPORT||(O=Math.floor(O)),this[M]=255&O,M+1},c.prototype.writeUInt16LE=function(O,M,$){return O=+O,M|=0,$||le(this,O,M,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[M]=255&O,this[M+1]=O>>>8):q(this,O,M,!0),M+2},c.prototype.writeUInt16BE=function(O,M,$){return O=+O,M|=0,$||le(this,O,M,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[M]=O>>>8,this[M+1]=255&O):q(this,O,M,!1),M+2},c.prototype.writeUInt32LE=function(O,M,$){return O=+O,M|=0,$||le(this,O,M,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[M+3]=O>>>24,this[M+2]=O>>>16,this[M+1]=O>>>8,this[M]=255&O):I(this,O,M,!0),M+4},c.prototype.writeUInt32BE=function(O,M,$){return O=+O,M|=0,$||le(this,O,M,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[M]=O>>>24,this[M+1]=O>>>16,this[M+2]=O>>>8,this[M+3]=255&O):I(this,O,M,!1),M+4},c.prototype.writeIntLE=function(O,M,$,ee){if(O=+O,M|=0,!ee){var J=Math.pow(2,8*$-1);le(this,O,M,$,J-1,-J)}var se=0,ge=1,Me=0;for(this[M]=255&O;++se<$&&(ge*=256);)O<0&&Me===0&&this[M+se-1]!==0&&(Me=1),this[M+se]=(O/ge>>0)-Me&255;return M+$},c.prototype.writeIntBE=function(O,M,$,ee){if(O=+O,M|=0,!ee){var J=Math.pow(2,8*$-1);le(this,O,M,$,J-1,-J)}var se=$-1,ge=1,Me=0;for(this[M+se]=255&O;--se>=0&&(ge*=256);)O<0&&Me===0&&this[M+se+1]!==0&&(Me=1),this[M+se]=(O/ge>>0)-Me&255;return M+$},c.prototype.writeInt8=function(O,M,$){return O=+O,M|=0,$||le(this,O,M,1,127,-128),c.TYPED_ARRAY_SUPPORT||(O=Math.floor(O)),O<0&&(O=255+O+1),this[M]=255&O,M+1},c.prototype.writeInt16LE=function(O,M,$){return O=+O,M|=0,$||le(this,O,M,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[M]=255&O,this[M+1]=O>>>8):q(this,O,M,!0),M+2},c.prototype.writeInt16BE=function(O,M,$){return O=+O,M|=0,$||le(this,O,M,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[M]=O>>>8,this[M+1]=255&O):q(this,O,M,!1),M+2},c.prototype.writeInt32LE=function(O,M,$){return O=+O,M|=0,$||le(this,O,M,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[M]=255&O,this[M+1]=O>>>8,this[M+2]=O>>>16,this[M+3]=O>>>24):I(this,O,M,!0),M+4},c.prototype.writeInt32BE=function(O,M,$){return O=+O,M|=0,$||le(this,O,M,4,2147483647,-2147483648),O<0&&(O=4294967295+O+1),c.TYPED_ARRAY_SUPPORT?(this[M]=O>>>24,this[M+1]=O>>>16,this[M+2]=O>>>8,this[M+3]=255&O):I(this,O,M,!1),M+4},c.prototype.writeFloatLE=function(O,M,$){return H(this,O,M,!0,$)},c.prototype.writeFloatBE=function(O,M,$){return H(this,O,M,!1,$)},c.prototype.writeDoubleLE=function(O,M,$){return ie(this,O,M,!0,$)},c.prototype.writeDoubleBE=function(O,M,$){return ie(this,O,M,!1,$)},c.prototype.copy=function(O,M,$,ee){if($||($=0),ee||ee===0||(ee=this.length),M>=O.length&&(M=O.length),M||(M=0),ee>0&&ee<$&&(ee=$),ee===$||O.length===0||this.length===0)return 0;if(M<0)throw new RangeError("targetStart out of bounds");if($<0||$>=this.length)throw new RangeError("sourceStart out of bounds");if(ee<0)throw new RangeError("sourceEnd out of bounds");ee>this.length&&(ee=this.length),O.length-M=0;--J)O[J+M]=this[J+$];else if(se<1e3||!c.TYPED_ARRAY_SUPPORT)for(J=0;J>>=0,$=$===void 0?this.length:$>>>0,O||(O=0),typeof O=="number")for(se=M;se<$;++se)this[se]=O;else{var ge=c.isBuffer(O)?O:re(new c(O,ee).toString()),Me=ge.length;for(se=0;se<$-M;++se)this[se+M]=ge[se%Me]}return this};var z=/[^+\/0-9A-Za-z-_]/g;function K(O){return O<16?"0"+O.toString(16):O.toString(16)}function re(O,M){var $;M=M||1/0;for(var ee=O.length,J=null,se=[],ge=0;ge55295&&$<57344){if(!J){if($>56319){(M-=3)>-1&&se.push(239,191,189);continue}if(ge+1===ee){(M-=3)>-1&&se.push(239,191,189);continue}J=$;continue}if($<56320){(M-=3)>-1&&se.push(239,191,189),J=$;continue}$=65536+(J-55296<<10|$-56320)}else J&&(M-=3)>-1&&se.push(239,191,189);if(J=null,$<128){if((M-=1)<0)break;se.push($)}else if($<2048){if((M-=2)<0)break;se.push($>>6|192,63&$|128)}else if($<65536){if((M-=3)<0)break;se.push($>>12|224,$>>6&63|128,63&$|128)}else{if(!($<1114112))throw new Error("Invalid code point");if((M-=4)<0)break;se.push($>>18|240,$>>12&63|128,$>>6&63|128,63&$|128)}}return se}function ae(O){return i.toByteArray(function(M){if((M=function($){return $.trim?$.trim():$.replace(/^\s+|\s+$/g,"")}(M).replace(z,"")).length<2)return"";for(;M.length%4!=0;)M+="=";return M}(O))}function he(O,M,$,ee){for(var J=0;J=M.length||J>=O.length);++J)M[J+$]=O[J];return J}}).call(this,n(0))},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(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:a}catch{r=a}})();var l,c=[],d=!1,f=-1;function p(){d&&l&&(d=!1,l.length?c=l.concat(c):f=-1,c.length&&m())}function m(){if(!d){var x=s(p);d=!0;for(var _=c.length;_;){for(l=c,c=[];++f<_;)l&&l[f].run();f=-1,_=c.length}l=null,d=!1,function(w){if(r===clearTimeout)return clearTimeout(w);if((r===a||!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&&(s._idleTimeoutId=setTimeout(function(){s._onTimeout&&s._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(a){return typeof a=="function"}function i(a){return typeof a=="object"&&a!==null}function o(a){return a===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(a){if(!function(s){return typeof s=="number"}(a)||a<0||isNaN(a))throw TypeError("n must be a positive number");return this._maxListeners=a,this},n.prototype.emit=function(a){var s,l,c,d,f,p;if(this._events||(this._events={}),a==="error"&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if((s=arguments[1])instanceof Error)throw s;var m=new Error('Uncaught, unspecified "error" event. ('+s+")");throw m.context=s,m}if(o(l=this._events[a]))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:d=Array.prototype.slice.call(arguments,1),l.apply(this,d)}else if(i(l))for(d=Array.prototype.slice.call(arguments,1),c=(p=l.slice()).length,f=0;f0&&this._events[a].length>l&&(this._events[a].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[a].length),typeof console.trace=="function"&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(a,s){if(!r(s))throw TypeError("listener must be a function");var l=!1;function c(){this.removeListener(a,c),l||(l=!0,s.apply(this,arguments))}return c.listener=s,this.on(a,c),this},n.prototype.removeListener=function(a,s){var l,c,d,f;if(!r(s))throw TypeError("listener must be a function");if(!this._events||!this._events[a])return this;if(d=(l=this._events[a]).length,c=-1,l===s||r(l.listener)&&l.listener===s)delete this._events[a],this._events.removeListener&&this.emit("removeListener",a,s);else if(i(l)){for(f=d;f-- >0;)if(l[f]===s||l[f].listener&&l[f].listener===s){c=f;break}if(c<0)return this;l.length===1?(l.length=0,delete this._events[a]):l.splice(c,1),this._events.removeListener&&this.emit("removeListener",a,s)}return this},n.prototype.removeAllListeners=function(a){var s,l;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[a]&&delete this._events[a],this;if(arguments.length===0){for(s in this._events)s!=="removeListener"&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events={},this}if(r(l=this._events[a]))this.removeListener(a,l);else if(l)for(;l.length;)this.removeListener(a,l[l.length-1]);return delete this._events[a],this},n.prototype.listeners=function(a){return this._events&&this._events[a]?r(this._events[a])?[this._events[a]]:this._events[a].slice():[]},n.prototype.listenerCount=function(a){if(this._events){var s=this._events[a];if(r(s))return 1;if(s)return s.length}return 0},n.listenerCount=function(a,s){return a.listenerCount(s)}},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 a=n(6);function s(R){var V=this;this.next=null,this.entry=null,this.finish=function(){(function(Y,X,G){var Z=Y.entry;for(Y.entry=null;Z;){var te=Z.callback;X.pendingcb--,te(void 0),Z=Z.next}X.corkedRequestsFree?X.corkedRequestsFree.next=Y:X.corkedRequestsFree=Y})(V,R)}}e.exports=S;var l,c=!r.browser&&["v0.10","v0.9."].indexOf(r.version.slice(0,5))>-1?i:a.nextTick;S.WritableState=w;var d=n(5);d.inherits=n(2);var f,p={deprecate:n(44)},m=n(24),v=n(7).Buffer,y=o.Uint8Array||function(){},x=n(25);function _(){}function w(R,V){l=l||n(1),R=R||{};var Y=V instanceof l;this.objectMode=!!R.objectMode,Y&&(this.objectMode=this.objectMode||!!R.writableObjectMode);var X=R.highWaterMark,G=R.writableHighWaterMark,Z=this.objectMode?16:16384;this.highWaterMark=X||X===0?X:Y&&(G||G===0)?G:Z,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 te=R.decodeStrings===!1;this.decodeStrings=!te,this.defaultEncoding=R.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(le){(function(q,I){var D=q._writableState,H=D.sync,ie=D.writecb;if(function(K){K.writing=!1,K.writecb=null,K.length-=K.writelen,K.writelen=0}(D),I)(function(K,re,ae,he,O){--re.pendingcb,ae?(a.nextTick(O,he),a.nextTick(U,K,re),K._writableState.errorEmitted=!0,K.emit("error",he)):(O(he),K._writableState.errorEmitted=!0,K.emit("error",he),U(K,re))})(q,D,H,I,ie);else{var z=j(D);z||D.corked||D.bufferProcessing||!D.bufferedRequest||k(q,D),H?c(C,q,D,z,ie):C(q,D,z,ie)}})(V,le)},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 s(this)}function S(R){if(l=l||n(1),!(f.call(S,this)||this instanceof l))return new S(R);this._writableState=new w(R,this),this.writable=!0,R&&(typeof R.write=="function"&&(this._write=R.write),typeof R.writev=="function"&&(this._writev=R.writev),typeof R.destroy=="function"&&(this._destroy=R.destroy),typeof R.final=="function"&&(this._final=R.final)),m.call(this)}function E(R,V,Y,X,G,Z,te){V.writelen=X,V.writecb=te,V.writing=!0,V.sync=!0,Y?R._writev(G,V.onwrite):R._write(G,Z,V.onwrite),V.sync=!1}function C(R,V,Y,X){Y||function(G,Z){Z.length===0&&Z.needDrain&&(Z.needDrain=!1,G.emit("drain"))}(R,V),V.pendingcb--,X(),U(R,V)}function k(R,V){V.bufferProcessing=!0;var Y=V.bufferedRequest;if(R._writev&&Y&&Y.next){var X=V.bufferedRequestCount,G=new Array(X),Z=V.corkedRequestsFree;Z.entry=Y;for(var te=0,le=!0;Y;)G[te]=Y,Y.isBuf||(le=!1),Y=Y.next,te+=1;G.allBuffers=le,E(R,V,!0,V.length,G,"",Z.finish),V.pendingcb++,V.lastBufferedRequest=null,Z.next?(V.corkedRequestsFree=Z.next,Z.next=null):V.corkedRequestsFree=new s(V),V.bufferedRequestCount=0}else{for(;Y;){var q=Y.chunk,I=Y.encoding,D=Y.callback;if(E(R,V,!1,V.objectMode?1:q.length,q,I,D),Y=Y.next,V.bufferedRequestCount--,V.writing)break}Y===null&&(V.lastBufferedRequest=null)}V.bufferedRequest=Y,V.bufferProcessing=!1}function j(R){return R.ending&&R.length===0&&R.bufferedRequest===null&&!R.finished&&!R.writing}function N(R,V){R._final(function(Y){V.pendingcb--,Y&&R.emit("error",Y),V.prefinished=!0,R.emit("prefinish"),U(R,V)})}function U(R,V){var Y=j(V);return Y&&(function(X,G){G.prefinished||G.finalCalled||(typeof X._final=="function"?(G.pendingcb++,G.finalCalled=!0,a.nextTick(N,X,G)):(G.prefinished=!0,X.emit("prefinish")))}(R,V),V.pendingcb===0&&(V.finished=!0,R.emit("finish"))),Y}d.inherits(S,m),w.prototype.getBuffer=function(){for(var R=this.bufferedRequest,V=[];R;)V.push(R),R=R.next;return V},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"?(f=Function.prototype[Symbol.hasInstance],Object.defineProperty(S,Symbol.hasInstance,{value:function(R){return!!f.call(this,R)||this===S&&R&&R._writableState instanceof w}})):f=function(R){return R instanceof this},S.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},S.prototype.write=function(R,V,Y){var X=this._writableState,G=!1,Z=!X.objectMode&&function(te){return v.isBuffer(te)||te instanceof y}(R);return Z&&!v.isBuffer(R)&&(R=function(te){return v.from(te)}(R)),typeof V=="function"&&(Y=V,V=null),Z?V="buffer":V||(V=X.defaultEncoding),typeof Y!="function"&&(Y=_),X.ended?function(te,le){var q=new Error("write after end");te.emit("error",q),a.nextTick(le,q)}(this,Y):(Z||function(te,le,q,I){var D=!0,H=!1;return q===null?H=new TypeError("May not write null values to stream"):typeof q=="string"||q===void 0||le.objectMode||(H=new TypeError("Invalid non-string/buffer chunk")),H&&(te.emit("error",H),a.nextTick(I,H),D=!1),D}(this,X,R,Y))&&(X.pendingcb++,G=function(te,le,q,I,D,H){if(!q){var ie=function(ae,he,O){return ae.objectMode||ae.decodeStrings===!1||typeof he!="string"||(he=v.from(he,O)),he}(le,I,D);I!==ie&&(q=!0,D="buffer",I=ie)}var z=le.objectMode?1:I.length;le.length+=z;var K=le.length-1))throw new TypeError("Unknown encoding: "+R);return this._writableState.defaultEncoding=R,this},Object.defineProperty(S.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),S.prototype._write=function(R,V,Y){Y(new Error("_write() is not implemented"))},S.prototype._writev=null,S.prototype.end=function(R,V,Y){var X=this._writableState;typeof R=="function"?(Y=R,R=null,V=null):typeof V=="function"&&(Y=V,V=null),R!=null&&this.write(R,V),X.corked&&(X.corked=1,this.uncork()),X.ending||X.finished||function(G,Z,te){Z.ending=!0,U(G,Z),te&&(Z.finished?a.nextTick(te):G.once("finish",te)),Z.ended=!0,G.writable=!1}(this,X,Y)},Object.defineProperty(S.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(R){this._writableState&&(this._writableState.destroyed=R)}}),S.prototype.destroy=x.destroy,S.prototype._undestroy=x.undestroy,S.prototype._destroy=function(R,V){this.end(),V(R)}}).call(this,n(4),n(11).setImmediate,n(0))},function(e,t,n){(function(r,i,o){e.exports=function a(s,l,c){function d(m,v){if(!l[m]){if(!s[m]){var y=typeof _dereq_=="function"&&_dereq_;if(!v&&y)return y(m,!0);if(f)return f(m,!0);var x=new Error("Cannot find module '"+m+"'");throw x.code="MODULE_NOT_FOUND",x}var _=l[m]={exports:{}};s[m][0].call(_.exports,function(w){return d(s[m][1][w]||w)},_,_.exports,a,s,l,c)}return l[m].exports}for(var f=typeof _dereq_=="function"&&_dereq_,p=0;p0;){var w=_.shift();if(typeof w=="function"){var S=_.shift(),E=_.shift();w.call(S,E)}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},s.exports=m,s.exports.firstLineError=c},{"./queue":26,"./schedule":29,"./util":36}],3:[function(a,s,l){s.exports=function(c,d,f,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=f(w),E=new c(d);E._propagateFrom(this,1);var C=this._target();if(E._setBoundTo(S),S instanceof c){var k={promiseRejectionQueued:!1,promise:E,target:C,bindingPromise:S};C._then(d,y,void 0,E,k),S._then(x,_,void 0,E,k),E._setOnCancel(S)}else E._resolveCallback(C);return E},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(a,s,l){var c;typeof Promise<"u"&&(c=Promise);var d=a("./promise")();d.noConflict=function(){try{Promise===d&&(Promise=c)}catch{}return d},s.exports=d},{"./promise":22}],5:[function(a,s,l){var c=Object.create;if(c){var d=c(null),f=c(null);d[" size"]=f[" size"]=0}s.exports=function(p){var m=a("./util"),v=m.canEvaluate;function y(w){return function(S,E){var C;if(S!=null&&(C=S[E]),typeof C!="function"){var k="Object "+m.classString(S)+" has no method '"+m.toString(E)+"'";throw new p.TypeError(k)}return C}(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 E=(void 0)(w);S=E!==null?E:x}else S=x;return this._then(S,void 0,void 0,w,void 0)}}},{"./util":36}],6:[function(a,s,l){s.exports=function(c,d,f,p){var m=a("./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 E=v(_).call(this._boundValue());E===y&&(this._attachExtraTrace(E.e),x.throwLater(E.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(a,s,l){s.exports=function(c){var d=a("./util"),f=a("./es5").keys,p=d.tryCatch,m=d.errorObj;return function(v,y,x){return function(_){var w=x._boundValue();e:for(var S=0;S=0)return f[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,f.push(this._trace))},p.prototype._popContext=function(){if(this._trace!==void 0){var v=f.pop(),y=v._promiseCreated;return v._promiseCreated=null,y}return null},p.CapturedTrace=null,p.create=function(){if(d)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,d=!1},d=!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(a,s,l){s.exports=function(c,d){var f,p,m,v=c._getDomain,y=c._async,x=a("./errors").Warning,_=a("./util"),w=_.canAttachTrace,S=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,E=/\((?:timers\.js):\d+:\d+\)/,C=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,k=null,j=null,N=!1,U=_.env("BLUEBIRD_DEBUG")!=0,R=!(_.env("BLUEBIRD_WARNINGS")==0||!U&&!_.env("BLUEBIRD_WARNINGS")),V=!(_.env("BLUEBIRD_LONG_STACK_TRACES")==0||!U&&!_.env("BLUEBIRD_LONG_STACK_TRACES")),Y=_.env("BLUEBIRD_W_FORGOTTEN_RETURN")!=0&&(R||!!_.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",f,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,fe,ye){return $(ce,fe,ye||this)},c.onPossiblyUnhandledRejection=function(ce){var fe=v();p=typeof ce=="function"?fe===null?ce:_.domainBind(fe,ce):void 0},c.onUnhandledRejectionHandled=function(ce){var fe=v();f=typeof ce=="function"?fe===null?ce:_.domainBind(fe,ce):void 0};var X=function(){};c.longStackTraces=function(){if(y.haveItemsQueued()&&!je.longStackTraces)throw new Error(`cannot enable long stack traces after promises have been created + + See http://goo.gl/MqrFmX +`);if(!je.longStackTraces&&ue()){var ce=c.prototype._captureStackTrace,fe=c.prototype._attachExtraTrace;je.longStackTraces=!0,X=function(){if(y.haveItemsQueued()&&!je.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=fe,d.deactivateLongStackTraces(),y.enableTrampoline(),je.longStackTraces=!1},c.prototype._captureStackTrace=O,c.prototype._attachExtraTrace=M,d.activateLongStackTraces(),y.disableTrampolineIfNecessary()}},c.hasLongStackTraces=function(){return je.longStackTraces&&ue()};var G=function(){try{if(typeof CustomEvent=="function"){var ce=new CustomEvent("CustomEvent");return _.global.dispatchEvent(ce),function(fe,ye){var ve=new CustomEvent(fe.toLowerCase(),{detail:ye,cancelable:!0});return!_.global.dispatchEvent(ve)}}return typeof Event=="function"?(ce=new Event("CustomEvent"),_.global.dispatchEvent(ce),function(fe,ye){var ve=new Event(fe.toLowerCase(),{cancelable:!0});return ve.detail=ye,!_.global.dispatchEvent(ve)}):((ce=document.createEvent("CustomEvent")).initCustomEvent("testingtheevent",!1,!0,{}),_.global.dispatchEvent(ce),function(fe,ye){var ve=document.createEvent("CustomEvent");return ve.initCustomEvent(fe.toLowerCase(),!1,!0,ye),!_.global.dispatchEvent(ve)})}catch{}return function(){return!1}}(),Z=_.isNode?function(){return r.emit.apply(r,arguments)}:_.global?function(ce){var fe="on"+ce.toLowerCase(),ye=_.global[fe];return!!ye&&(ye.apply(_.global,[].slice.call(arguments,1)),!0)}:function(){return!1};function te(ce,fe){return{promise:fe}}var le={promiseCreated:te,promiseFulfilled:te,promiseRejected:te,promiseResolved:te,promiseCancelled:te,promiseChained:function(ce,fe,ye){return{promise:fe,child:ye}},warning:function(ce,fe){return{warning:fe}},unhandledRejection:function(ce,fe,ye){return{reason:fe,promise:ye}},rejectionHandled:te},q=function(ce){var fe=!1;try{fe=Z.apply(null,arguments)}catch(ve){y.throwLater(ve),fe=!0}var ye=!1;try{ye=G(ce,le[ce].apply(null,arguments))}catch(ve){y.throwLater(ve),ye=!0}return ye||fe};function I(){return!1}function D(ce,fe,ye){var ve=this;try{ce(fe,ye,function(xe){if(typeof xe!="function")throw new TypeError("onCancel must be a function, got: "+_.toString(xe));ve._attachCancellationCallback(xe)})}catch(xe){return xe}}function H(ce){if(!this._isCancellable())return this;var fe=this._onCancel();fe!==void 0?_.isArray(fe)?fe.push(ce):this._setOnCancel([fe,ce]):this._setOnCancel(ce)}function ie(){return this._onCancelField}function z(ce){this._onCancelField=ce}function K(){this._cancellationParent=void 0,this._onCancelField=void 0}function re(ce,fe){if(1&fe){this._cancellationParent=ce;var ye=ce._branchesRemainingToCancel;ye===void 0&&(ye=0),ce._branchesRemainingToCancel=ye+1}2&fe&&ce._isBound()&&this._setBoundTo(ce._boundTo)}c.config=function(ce){if("longStackTraces"in(ce=Object(ce))&&(ce.longStackTraces?c.longStackTraces():!ce.longStackTraces&&c.hasLongStackTraces()&&X()),"warnings"in ce){var fe=ce.warnings;je.warnings=!!fe,Y=je.warnings,_.isObject(fe)&&"wForgottenReturn"in fe&&(Y=!!fe.wForgottenReturn)}if("cancellation"in ce&&ce.cancellation&&!je.cancellation){if(y.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");c.prototype._clearCancellationData=K,c.prototype._propagateFrom=re,c.prototype._onCancel=ie,c.prototype._setOnCancel=z,c.prototype._attachCancellationCallback=H,c.prototype._execute=D,ae=re,je.cancellation=!0}return"monitoring"in ce&&(ce.monitoring&&!je.monitoring?(je.monitoring=!0,c.prototype._fireEvent=q):!ce.monitoring&&je.monitoring&&(je.monitoring=!1,c.prototype._fireEvent=I)),c},c.prototype._fireEvent=I,c.prototype._execute=function(ce,fe,ye){try{ce(fe,ye)}catch(ve){return ve}},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,fe){};var ae=function(ce,fe){2&fe&&ce._isBound()&&this._setBoundTo(ce._boundTo)};function he(){var ce=this._boundTo;return ce!==void 0&&ce instanceof c?ce.isFulfilled()?ce.value():void 0:ce}function O(){this._trace=new ke(this._peekContext())}function M(ce,fe){if(w(ce)){var ye=this._trace;if(ye!==void 0&&fe&&(ye=ye._parent),ye!==void 0)ye.attachExtraTrace(ce);else if(!ce.__stackCleaned__){var ve=J(ce);_.notEnumerableProp(ce,"stack",ve.message+` +`+ve.stack.join(` +`)),_.notEnumerableProp(ce,"__stackCleaned__",!0)}}}function $(ce,fe,ye){if(je.warnings){var ve,xe=new x(ce);if(fe)ye._attachExtraTrace(xe);else if(je.longStackTraces&&(ve=c._peekContext()))ve.attachExtraTrace(xe);else{var Pe=J(xe);xe.stack=Pe.message+` +`+Pe.stack.join(` +`)}q("warning",xe)||se(xe,"",!0)}}function ee(ce){for(var fe=[],ye=0;ye0?function(ve){for(var xe=ve.stack.replace(/\s+$/g,"").split(` +`),Pe=0;Pe0&&ve.name!="SyntaxError"&&(xe=xe.slice(Pe)),xe}(ce):[" (No stack trace)"],{message:ye,stack:ce.name=="SyntaxError"?fe:ee(fe)}}function se(ce,fe,ye){if(typeof console<"u"){var ve;if(_.isObject(ce)){var xe=ce.stack;ve=fe+j(xe,ce)}else ve=fe+String(ce);typeof m=="function"?m(ve,ye):typeof console.log!="function"&&typeof console.log!="object"||console.log(ve)}}function ge(ce,fe,ye,ve){var xe=!1;try{typeof fe=="function"&&(xe=!0,ce==="rejectionHandled"?fe(ve):fe(ye,ve))}catch(Pe){y.throwLater(Pe)}ce==="unhandledRejection"?q(ce,ye,ve)||xe||se(ye,"Unhandled rejection "):q(ce,ve)}function Me(ce){var fe;if(typeof ce=="function")fe="[function "+(ce.name||"anonymous")+"]";else{if(fe=ce&&typeof ce.toString=="function"?ce.toString():_.toString(ce),/\[object [a-zA-Z0-9$_]+\]/.test(fe))try{fe=JSON.stringify(ce)}catch{}fe.length===0&&(fe="(empty array)")}return"(<"+function(ye){return ye.length<41?ye:ye.substr(0,38)+"..."}(fe)+">, no stack trace)"}function ue(){return typeof Ce=="function"}var me=function(){return!1},_e=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function Se(ce){var fe=ce.match(_e);if(fe)return{fileName:fe[1],line:parseInt(fe[2],10)}}function ke(ce){this._parent=ce,this._promisesCreated=0;var fe=this._length=1+(ce===void 0?0:ce._length);Ce(this,ke),fe>32&&this.uncycle()}_.inherits(ke,Error),d.CapturedTrace=ke,ke.prototype.uncycle=function(){var ce=this._length;if(!(ce<2)){for(var fe=[],ye={},ve=0,xe=this;xe!==void 0;++ve)fe.push(xe),xe=xe._parent;for(ve=(ce=this._length=ve)-1;ve>=0;--ve){var Pe=fe[ve].stack;ye[Pe]===void 0&&(ye[Pe]=ve)}for(ve=0;ve0&&(fe[Ne-1]._parent=void 0,fe[Ne-1]._length=1),fe[ve]._parent=void 0,fe[ve]._length=1;var Qe=ve>0?fe[ve-1]:this;Ne=0;--Ge)fe[Ge]._length=et,et++;return}}}},ke.prototype.attachExtraTrace=function(ce){if(!ce.__stackCleaned__){this.uncycle();for(var fe=J(ce),ye=fe.message,ve=[fe.stack],xe=this;xe!==void 0;)ve.push(ee(xe.stack.split(` +`))),xe=xe._parent;(function(Pe){for(var Ne=Pe[0],Qe=1;Qe=0;--Cn)if(et[Cn]===Qt){Wt=Cn;break}for(Cn=Wt;Cn>=0;--Cn){var hr=et[Cn];if(Ne[Ge]!==hr)break;Ne.pop(),Ge--}Ne=et}})(ve),function(Pe){for(var Ne=0;Ne=0)return k=/@/,j=fe,N=!0,function(Pe){Pe.stack=new Error().stack};try{throw new Error}catch(Pe){ve="stack"in Pe}return"stack"in xe||!ve||typeof Error.stackTraceLimit!="number"?(j=function(Pe,Ne){return typeof Pe=="string"?Pe:typeof Ne!="object"&&typeof Ne!="function"||Ne.name===void 0||Ne.message===void 0?Me(Ne):Ne.toString()},null):(k=ce,j=fe,function(Pe){Error.stackTraceLimit+=6;try{throw new Error}catch(Ne){Pe.stack=Ne.stack}Error.stackTraceLimit-=6})}();typeof console<"u"&&console.warn!==void 0&&(m=function(ce){console.warn(ce)},_.isNode&&r.stderr.isTTY?m=function(ce,fe){var ye=fe?"\x1B[33m":"\x1B[31m";console.warn(ye+ce+`\x1B[0m +`)}:_.isNode||typeof new Error().stack!="string"||(m=function(ce,fe){console.warn("%c"+ce,fe?"color: darkorange":"color: red")}));var je={warnings:R,longStackTraces:!1,cancellation:!1,monitoring:!1};return V&&c.longStackTraces(),{longStackTraces:function(){return je.longStackTraces},warnings:function(){return je.warnings},cancellation:function(){return je.cancellation},monitoring:function(){return je.monitoring},propagateFromFunction:function(){return ae},boundValueFunction:function(){return he},checkForgottenReturns:function(ce,fe,ye,ve,xe){if(ce===void 0&&fe!==null&&Y){if(xe!==void 0&&xe._returnedNonUndefined()||!(65535&ve._bitField))return;ye&&(ye+=" ");var Pe="",Ne="";if(fe._trace){for(var Qe=fe._trace.stack.split(` +`),et=ee(Qe),Ge=et.length-1;Ge>=0;--Ge){var Qt=et[Ge];if(!E.test(Qt)){var Wt=Qt.match(C);Wt&&(Pe="at "+Wt[1]+":"+Wt[2]+":"+Wt[3]+" ");break}}if(et.length>0){var Cn=et[0];for(Ge=0;Ge0&&(Ne=` +`+Qe[Ge-1]);break}}}var hr="a promise was created in a "+ye+"handler "+Pe+"but was not returned from it, see http://goo.gl/rRqMUw"+Ne;ve._warn(hr,!0,fe)}},setBounds:function(ce,fe){if(ue()){for(var ye,ve,xe=ce.stack.split(` +`),Pe=fe.stack.split(` +`),Ne=-1,Qe=-1,et=0;et=Qe||(me=function(Qt){if(S.test(Qt))return!0;var Wt=Se(Qt);return!!(Wt&&Wt.fileName===ye&&Ne<=Wt.line&&Wt.line<=Qe)})}},warn:$,deprecated:function(ce,fe){var ye=ce+" is deprecated and will be removed in a future version.";return fe&&(ye+=" Use "+fe+" instead."),$(ye)},CapturedTrace:ke,fireDomEvent:G,fireGlobalEvent:Z}}},{"./errors":12,"./util":36}],10:[function(a,s,l){s.exports=function(c){function d(){return this.value}function f(){throw this.reason}c.prototype.return=c.prototype.thenReturn=function(p){return p instanceof c&&p.suppressUnhandledRejections(),this._then(d,void 0,void 0,{value:p},void 0)},c.prototype.throw=c.prototype.thenThrow=function(p){return this._then(f,void 0,void 0,{reason:p},void 0)},c.prototype.catchThrow=function(p){if(arguments.length<=1)return this._then(void 0,f,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,d,void 0,{value:p},void 0);var m=arguments[1];return m instanceof c&&m.suppressUnhandledRejections(),this.caught(p,function(){return m})}}},{}],11:[function(a,s,l){s.exports=function(c,d){var f=c.reduce,p=c.all;function m(){return p(this)}c.prototype.each=function(v){return f(this,v,d,0)._then(m,void 0,void 0,this,void 0)},c.prototype.mapSeries=function(v){return f(this,v,d,d)},c.each=function(v,y){return f(v,y,d,0)._then(m,void 0,void 0,v,void 0)},c.mapSeries=function(v,y){return f(v,y,d,d)}}},{}],12:[function(a,s,l){var c,d,f=a("./es5"),p=f.freeze,m=a("./util"),v=m.inherits,y=m.notEnumerableProp;function x(R,V){function Y(X){if(!(this instanceof Y))return new Y(X);y(this,"message",typeof X=="string"?X:V),y(this,"name",R),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"),E=x("AggregateError","aggregate error");try{c=TypeError,d=RangeError}catch{c=x("TypeError","type error"),d=x("RangeError","range error")}for(var C="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),k=0;k1?k.cancelPromise._reject(j):k.cancelPromise._cancel(),k.cancelPromise=null,!0)}function S(){return C.call(this,this.promise._target()._settledValue())}function E(k){if(!w(this,k))return v.e=k,v}function C(k){var j=this.promise,N=this.handler;if(!this.called){this.called=!0;var U=this.isFinallyHandler()?N.call(j._boundValue()):N.call(j._boundValue(),k);if(U===f)return U;if(U!==void 0){j._setReturnedNonUndefined();var R=d(U,j);if(R instanceof c){if(this.cancelPromise!=null){if(R._isCancelled()){var V=new m("late cancellation observer");return j._attachExtraTrace(V),v.e=V,v}R.isPending()&&R._attachCancellationCallback(new _(this))}return R._then(S,E,void 0,this,void 0)}}}return j.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,j,N,U){return typeof k!="function"?this.then():this._then(N,U,void 0,new x(this,j,k),void 0)},c.prototype.lastly=c.prototype.finally=function(k){return this._passThrough(k,0,C,C)},c.prototype.tap=function(k){return this._passThrough(k,1,C)},c.prototype.tapCatch=function(k){var j=arguments.length;if(j===1)return this._passThrough(k,1,void 0,C);var N,U=new Array(j-1),R=0;for(N=0;N0&&typeof arguments[_]=="function"&&(x=arguments[_]);var w=[].slice.call(arguments);x&&w.pop();var S=new d(w).promise();return x!==void 0?S.spread(x):S}}},{"./util":36}],18:[function(a,s,l){s.exports=function(c,d,f,p,m,v){var y=c._getDomain,x=a("./util"),_=x.tryCatch,w=x.errorObj,S=c._async;function E(k,j,N,U){this.constructor$(k),this._promise._captureStackTrace();var R=y();this._callback=R===null?j:x.domainBind(R,j),this._preservedValues=U===m?new Array(this.length()):null,this._limit=N,this._inFlight=0,this._queue=[],S.invoke(this._asyncInit,this,void 0)}function C(k,j,N,U){if(typeof j!="function")return f("expecting a function but got "+x.classString(j));var R=0;if(N!==void 0){if(typeof N!="object"||N===null)return c.reject(new TypeError("options argument must be an object but it is "+x.classString(N)));if(typeof N.concurrency!="number")return c.reject(new TypeError("'concurrency' must be a number but it is "+x.classString(N.concurrency)));R=N.concurrency}return new E(k,j,R=typeof R=="number"&&isFinite(R)&&R>=1?R:0,U).promise()}x.inherits(E,d),E.prototype._asyncInit=function(){this._init$(void 0,-2)},E.prototype._init=function(){},E.prototype._promiseFulfilled=function(k,j){var N=this._values,U=this.length(),R=this._preservedValues,V=this._limit;if(j<0){if(N[j=-1*j-1]=k,V>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(V>=1&&this._inFlight>=V)return N[j]=k,this._queue.push(j),!1;R!==null&&(R[j]=k);var Y=this._promise,X=this._callback,G=Y._boundValue();Y._pushContext();var Z=_(X).call(G,k,j,U),te=Y._popContext();if(v.checkForgottenReturns(Z,te,R!==null?"Promise.filter":"Promise.map",Y),Z===w)return this._reject(Z.e),!0;var le=p(Z,this._promise);if(le instanceof c){var q=(le=le._target())._bitField;if(!(50397184&q))return V>=1&&this._inFlight++,N[j]=le,le._proxy(this,-1*(j+1)),!1;if(!(33554432&q))return 16777216&q?(this._reject(le._reason()),!0):(this._cancel(),!0);Z=le._value()}N[j]=Z}return++this._totalResolved>=U&&(R!==null?this._filter(N,R):this._resolve(N),!0)},E.prototype._drainQueue=function(){for(var k=this._queue,j=this._limit,N=this._values;k.length>0&&this._inFlight1){m.deprecated("calling Promise.try with more than 1 argument");var S=arguments[1],E=arguments[2];_=v.isArray(S)?y(x).apply(E,S):y(x).call(E,S)}else _=y(x)();var C=w._popContext();return m.checkForgottenReturns(_,C,"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(a,s,l){var c=a("./util"),d=c.maybeWrapAsError,f=a("./errors").OperationalError,p=a("./es5"),m=/^(?:name|message|stack|cause)$/;function v(y){var x;if(function(E){return E instanceof Error&&p.getPrototypeOf(E)===Error.prototype}(y)){(x=new f(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}s.exports=function(y,x){return function(_,w){if(y!==null){if(_){var S=v(d(_));y._attachExtraTrace(S),y._reject(S)}else if(x){var E=[].slice.call(arguments,1);y._fulfill(E)}else y._fulfill(w);y=null}}}},{"./errors":12,"./es5":13,"./util":36}],21:[function(a,s,l){s.exports=function(c){var d=a("./util"),f=c._async,p=d.tryCatch,m=d.errorObj;function v(_,w){if(!d.isArray(_))return y.call(this,_,w);var S=p(w).apply(this._boundValue(),[null].concat(_));S===m&&f.throwLater(S.e)}function y(_,w){var S=this._boundValue(),E=_===void 0?p(w).call(S,null):p(w).call(S,null,_);E===m&&f.throwLater(E.e)}function x(_,w){if(!_){var S=new Error(_+"");S.cause=_,_=S}var E=p(w).call(this._boundValue(),_);E===m&&f.throwLater(E.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(a,s,l){s.exports=function(){var c=function(){return new E(`circular promise resolution chain + + See http://goo.gl/MqrFmX +`)},d=function(){return new I.PromiseInspection(this._target())},f=function(z){return I.reject(new E(z))};function p(){}var m,v={},y=a("./util");m=y.isNode?function(){var z=r.domain;return z===void 0&&(z=null),z}:function(){return null},y.notEnumerableProp(I,"_getDomain",m);var x=a("./es5"),_=a("./async"),w=new _;x.defineProperty(I,"_async",{value:w});var S=a("./errors"),E=I.TypeError=S.TypeError;I.RangeError=S.RangeError;var C=I.CancellationError=S.CancellationError;I.TimeoutError=S.TimeoutError,I.OperationalError=S.OperationalError,I.RejectionError=S.OperationalError,I.AggregateError=S.AggregateError;var k=function(){},j={},N={},U=a("./thenables")(I,k),R=a("./promise_array")(I,k,U,f,p),V=a("./context")(I),Y=V.create,X=a("./debuggability")(I,V),G=(X.CapturedTrace,a("./finally")(I,U,N)),Z=a("./catch_filter")(N),te=a("./nodeback"),le=y.errorObj,q=y.tryCatch;function I(z){z!==k&&function(K,re){if(K==null||K.constructor!==I)throw new E(`the promise constructor cannot be invoked directly + + See http://goo.gl/MqrFmX +`);if(typeof re!="function")throw new E("expecting a function but got "+y.classString(re))}(this,z),this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,this._resolveFromExecutor(z),this._promiseCreated(),this._fireEvent("promiseCreated",this)}function D(z){this.promise._resolveCallback(z)}function H(z){this.promise._rejectCallback(z,!1)}function ie(z){var K=new I(k);K._fulfillmentHandler0=z,K._rejectionHandler0=z,K._promise0=z,K._receiver0=z}return I.prototype.toString=function(){return"[object Promise]"},I.prototype.caught=I.prototype.catch=function(z){var K=arguments.length;if(K>1){var re,ae=new Array(K-1),he=0;for(re=0;re0&&typeof z!="function"&&typeof K!="function"){var re=".then() only accepts functions but was passed: "+y.classString(z);arguments.length>1&&(re+=", "+y.classString(K)),this._warn(re)}return this._then(z,K,void 0,void 0,void 0)},I.prototype.done=function(z,K){this._then(z,K,void 0,void 0,void 0)._setIsFinal()},I.prototype.spread=function(z){return typeof z!="function"?f("expecting a function but got "+y.classString(z)):this.all()._then(z,void 0,void 0,j,void 0)},I.prototype.toJSON=function(){var z={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(z.fulfillmentValue=this.value(),z.isFulfilled=!0):this.isRejected()&&(z.rejectionReason=this.reason(),z.isRejected=!0),z},I.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new R(this).promise()},I.prototype.error=function(z){return this.caught(y.originatesFromRejection,z)},I.getNewLibraryCopy=s.exports,I.is=function(z){return z instanceof I},I.fromNode=I.fromCallback=function(z){var K=new I(k);K._captureStackTrace();var re=arguments.length>1&&!!Object(arguments[1]).multiArgs,ae=q(z)(te(K,re));return ae===le&&K._rejectCallback(ae.e,!0),K._isFateSealed()||K._setAsyncGuaranteed(),K},I.all=function(z){return new R(z).promise()},I.cast=function(z){var K=U(z);return K instanceof I||((K=new I(k))._captureStackTrace(),K._setFulfilled(),K._rejectionHandler0=z),K},I.resolve=I.fulfilled=I.cast,I.reject=I.rejected=function(z){var K=new I(k);return K._captureStackTrace(),K._rejectCallback(z,!0),K},I.setScheduler=function(z){if(typeof z!="function")throw new E("expecting a function but got "+y.classString(z));return w.setScheduler(z)},I.prototype._then=function(z,K,re,ae,he){var O=he!==void 0,M=O?he:new I(k),$=this._target(),ee=$._bitField;O||(M._propagateFrom(this,3),M._captureStackTrace(),ae===void 0&&2097152&this._bitField&&(ae=50397184&ee?this._boundValue():$===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,M));var J=m();if(50397184&ee){var se,ge,Me=$._settlePromiseCtx;33554432&ee?(ge=$._rejectionHandler0,se=z):16777216&ee?(ge=$._fulfillmentHandler0,se=K,$._unsetRejectionIsUnhandled()):(Me=$._settlePromiseLateCancellationObserver,ge=new C("late cancellation observer"),$._attachExtraTrace(ge),se=K),w.invoke(Me,$,{handler:J===null?se:typeof se=="function"&&y.domainBind(J,se),promise:M,receiver:ae,value:ge})}else $._addCallbacks(z,K,M,ae,J);return M},I.prototype._length=function(){return 65535&this._bitField},I.prototype._isFateSealed=function(){return(117506048&this._bitField)!=0},I.prototype._isFollowing=function(){return(67108864&this._bitField)==67108864},I.prototype._setLength=function(z){this._bitField=-65536&this._bitField|65535&z},I.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},I.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},I.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},I.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},I.prototype._isFinal=function(){return(4194304&this._bitField)>0},I.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},I.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},I.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},I.prototype._setAsyncGuaranteed=function(){w.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},I.prototype._receiverAt=function(z){var K=z===0?this._receiver0:this[4*z-4+3];if(K!==v)return K===void 0&&this._isBound()?this._boundValue():K},I.prototype._promiseAt=function(z){return this[4*z-4+2]},I.prototype._fulfillmentHandlerAt=function(z){return this[4*z-4+0]},I.prototype._rejectionHandlerAt=function(z){return this[4*z-4+1]},I.prototype._boundValue=function(){},I.prototype._migrateCallback0=function(z){z._bitField;var K=z._fulfillmentHandler0,re=z._rejectionHandler0,ae=z._promise0,he=z._receiverAt(0);he===void 0&&(he=v),this._addCallbacks(K,re,ae,he,null)},I.prototype._migrateCallbackAt=function(z,K){var re=z._fulfillmentHandlerAt(K),ae=z._rejectionHandlerAt(K),he=z._promiseAt(K),O=z._receiverAt(K);O===void 0&&(O=v),this._addCallbacks(re,ae,he,O,null)},I.prototype._addCallbacks=function(z,K,re,ae,he){var O=this._length();if(O>=65531&&(O=0,this._setLength(0)),O===0)this._promise0=re,this._receiver0=ae,typeof z=="function"&&(this._fulfillmentHandler0=he===null?z:y.domainBind(he,z)),typeof K=="function"&&(this._rejectionHandler0=he===null?K:y.domainBind(he,K));else{var M=4*O-4;this[M+2]=re,this[M+3]=ae,typeof z=="function"&&(this[M+0]=he===null?z:y.domainBind(he,z)),typeof K=="function"&&(this[M+1]=he===null?K:y.domainBind(he,K))}return this._setLength(O+1),O},I.prototype._proxy=function(z,K){this._addCallbacks(void 0,void 0,K,z,null)},I.prototype._resolveCallback=function(z,K){if(!(117506048&this._bitField)){if(z===this)return this._rejectCallback(c(),!1);var re=U(z,this);if(!(re instanceof I))return this._fulfill(z);K&&this._propagateFrom(re,2);var ae=re._target();if(ae!==this){var he=ae._bitField;if(50397184&he)if(33554432&he)this._fulfill(ae._value());else if(16777216&he)this._reject(ae._reason());else{var $=new C("late cancellation observer");ae._attachExtraTrace($),this._reject($)}else{var O=this._length();O>0&&ae._migrateCallback0(this);for(var M=1;M>>16)){if(z===this){var re=c();return this._attachExtraTrace(re),this._reject(re)}this._setFulfilled(),this._rejectionHandler0=z,(65535&K)>0&&(134217728&K?this._settlePromises():w.settlePromises(this))}},I.prototype._reject=function(z){var K=this._bitField;if(!((117506048&K)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=z,this._isFinal())return w.fatalError(z,y.isNode);(65535&K)>0?w.settlePromises(this):this._ensurePossibleRejectionHandled()}},I.prototype._fulfillPromises=function(z,K){for(var re=1;re0){if(16842752&z){var re=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,re,z),this._rejectPromises(K,re)}else{var ae=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,ae,z),this._fulfillPromises(K,ae)}this._setLength(0)}this._clearCancellationData()},I.prototype._settledValue=function(){var z=this._bitField;return 33554432&z?this._rejectionHandler0:16777216&z?this._fulfillmentHandler0:void 0},I.defer=I.pending=function(){return X.deprecated("Promise.defer","new Promise"),{promise:new I(k),resolve:D,reject:H}},y.notEnumerableProp(I,"_makeSelfResolutionError",c),a("./method")(I,k,U,f,X),a("./bind")(I,k,U,X),a("./cancel")(I,R,f,X),a("./direct_resolve")(I),a("./synchronous_inspection")(I),a("./join")(I,R,U,k,w,m),I.Promise=I,I.version="3.5.1",a("./map.js")(I,R,f,U,k,X),a("./call_get.js")(I),a("./using.js")(I,f,U,Y,k,X),a("./timers.js")(I,k,X),a("./generators.js")(I,f,k,U,p,X),a("./nodeify.js")(I),a("./promisify.js")(I,k),a("./props.js")(I,R,U,f),a("./race.js")(I,k,U,f),a("./reduce.js")(I,R,f,U,k,X),a("./settle.js")(I,R,X),a("./some.js")(I,R,f),a("./filter.js")(I,k),a("./each.js")(I,k),a("./any.js")(I),y.toFastProperties(I),y.toFastProperties(I.prototype),ie({a:1}),ie({b:2}),ie({c:3}),ie(1),ie(function(){}),ie(void 0),ie(!1),ie(new I(k)),X.setBounds(_.firstLineError,y.lastLineError),I}},{"./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(a,s,l){s.exports=function(c,d,f,p,m){var v=a("./util");function y(x){var _=this._promise=new c(d);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=f(this._values,this._promise);if(S instanceof c){var E=(S=S._target())._bitField;if(this._values=S,(50397184&E)==0)return this._promise._setAsyncGuaranteed(),S._then(x,this._reject,void 0,this,w);if(!(33554432&E))return 16777216&E?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 C=p("expecting an array or an iterable object but got "+v.classString(S)).reason();this._promise._rejectCallback(C,!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,E=null,C=0;C<_;++C){var k=f(x[C],w);E=k instanceof c?(k=k._target())._bitField:null,S?E!==null&&k.suppressUnhandledRejections():E!==null?50397184&E?S=33554432&E?this._promiseFulfilled(k._value(),C):16777216&E?this._promiseRejected(k._reason(),C):this._promiseCancelled(C):(k._proxy(this,C),this._values[C]=k):S=this._promiseFulfilled(k,C)}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(R){for(var V=new m,Y=R.length/2|0,X=0;X>1},c.prototype.props=function(){return S(this)},c.props=function(E){return S(E)}}},{"./es5":13,"./util":36}],26:[function(a,s,l){function c(d){this._capacity=d,this._length=0,this._front=0}c.prototype._willBeOverCapacity=function(d){return this._capacity"u"){var p=i.setImmediate,m=r.nextTick;c=d.isRecentNode?function(y){p.call(i,y)}:function(y){m.call(r,y)}}else if(typeof f=="function"&&typeof f.resolve=="function"){var v=f.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 E=new MutationObserver(function(){E.disconnect(),S()});E.observe(y,x),_||(_=!0,w.classList.toggle("foo"))}}();s.exports=c},{"./util":36}],30:[function(a,s,l){s.exports=function(c,d,f){var p=c.PromiseInspection;function m(v){this.constructor$(v)}a("./util").inherits(m,d),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 f.deprecated(".settle()",".reflect()"),new m(v).promise()},c.prototype.settle=function(){return c.settle(this)}}},{"./util":36}],31:[function(a,s,l){s.exports=function(c,d,f){var p=a("./util"),m=a("./errors").RangeError,v=a("./errors").AggregateError,y=p.isArray,x={};function _(S){this.constructor$(S),this._howMany=0,this._unwrap=!1,this._initialized=!1}function w(S,E){if((0|E)!==E||E<0)return f(`expecting a positive integer + + See http://goo.gl/MqrFmX +`);var C=new _(S),k=C.promise();return C.setHowMany(E),C.init(),k}p.inherits(_,d),_.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,E=this.length();E0?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 E="Input array must contain at least "+this._howMany+" items but contains only "+S+" items";return new m(E)},_.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},c.some=function(S,E){return w(S,E)},c.prototype.some=function(S){return w(this,S)},c._SomePromiseArray=_}},{"./errors":12,"./util":36}],32:[function(a,s,l){s.exports=function(c){function d(_){_!==void 0?(_=_._target(),this._bitField=_._bitField,this._settledValueField=_._isFateSealed()?_._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}d.prototype._settledValue=function(){return this._settledValueField};var f=d.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=d.prototype.error=d.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=d.prototype.isFulfilled=function(){return(33554432&this._bitField)!=0},v=d.prototype.isRejected=function(){return(16777216&this._bitField)!=0},y=d.prototype.isPending=function(){return(50397184&this._bitField)==0},x=d.prototype.isResolved=function(){return(50331648&this._bitField)!=0};d.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 f.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=d}},{}],33:[function(a,s,l){s.exports=function(c,d){var f=a("./util"),p=f.errorObj,m=f.isObject,v={}.hasOwnProperty;return function(y,x){if(m(y)){if(y instanceof c)return y;var _=function(S){try{return function(E){return E.then}(S)}catch(E){return p.e=E,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(d),y._then(w._fulfill,w._reject,void 0,w,null),w):function(S,E,C){var k=new c(d),j=k;C&&C._pushContext(),k._captureStackTrace(),C&&C._popContext();var N=!0,U=f.tryCatch(E).call(S,function(R){k&&(k._resolveCallback(R),k=null)},function(R){k&&(k._rejectCallback(R,N,!0),k=null)});return N=!1,k&&U===p&&(k._rejectCallback(U.e,!0,!0),k=null),j}(y,_,x)}return y}}},{"./util":36}],34:[function(a,s,l){s.exports=function(c,d,f){var p=a("./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,E){var C,k;return E!==void 0?(C=c.resolve(E)._then(y,null,null,S,void 0),f.cancellation()&&E instanceof c&&C._setOnCancel(E)):(C=new c(d),k=setTimeout(function(){C._fulfill()},+S),f.cancellation()&&C._setOnCancel(new v(k)),C._captureStackTrace()),C._setAsyncGuaranteed(),C};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,E){var C,k;S=+S;var j=new v(setTimeout(function(){C.isPending()&&function(N,U,R){var V;V=typeof U!="string"?U instanceof Error?U:new m("operation timed out"):new m(U),p.markAsOriginatingFromRejection(V),N._attachExtraTrace(V),N._reject(V),R!=null&&R.cancel()}(C,E,k)},S));return f.cancellation()?(k=this.then(),(C=k._then(_,w,void 0,j,void 0))._setOnCancel(j)):C=this._then(_,w,void 0,j,void 0),C}}},{"./util":36}],35:[function(a,s,l){s.exports=function(c,d,f,p,m,v){var y=a("./util"),x=a("./errors").TypeError,_=a("./util").inherits,w=y.errorObj,S=y.tryCatch,E={};function C(V){setTimeout(function(){throw V},0)}function k(V,Y){var X=0,G=V.length,Z=new c(m);return function te(){if(X>=G)return Z._fulfill();var le=function(q){var I=f(q);return I!==q&&typeof q._isDisposable=="function"&&typeof q._getDisposer=="function"&&q._isDisposable()&&I._setDisposable(q._getDisposer()),I}(V[X++]);if(le instanceof c&&le._isDisposable()){try{le=f(le._getDisposer().tryDispose(Y),V.promise)}catch(q){return C(q)}if(le instanceof c)return le._then(te,C,null,null,null)}te()}(),Z}function j(V,Y,X){this._data=V,this._promise=Y,this._context=X}function N(V,Y,X){this.constructor$(V,Y,X)}function U(V){return j.isDisposer(V)?(this.resources[this.index]._setDisposable(V),V.promise()):V}function R(V){this.length=V,this.promise=null,this[V-1]=null}j.prototype.data=function(){return this._data},j.prototype.promise=function(){return this._promise},j.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():E},j.prototype.tryDispose=function(V){var Y=this.resource(),X=this._context;X!==void 0&&X._pushContext();var G=Y!==E?this.doDispose(Y,V):null;return X!==void 0&&X._popContext(),this._promise._unsetDisposable(),this._data=null,G},j.isDisposer=function(V){return V!=null&&typeof V.resource=="function"&&typeof V.tryDispose=="function"},_(N,j),N.prototype.doDispose=function(V,Y){return this.data().call(V,V,Y)},R.prototype._resultCancelled=function(){for(var V=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(V){if(typeof V=="function")return new N(V,this,p());throw new x}}},{"./errors":12,"./util":36}],36:[function(a,s,l){var c,d=a("./es5"),f=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 G=c;return c=null,G.apply(this,arguments)}catch(Z){return p.e=Z,p}}function y(G){return G==null||G===!0||G===!1||typeof G=="string"||typeof G=="number"}function x(G,Z,te){if(y(G))return G;var le={value:te,configurable:!0,enumerable:!1,writable:!0};return d.defineProperty(G,Z,le),G}var _=function(){var G=[Array.prototype,Object.prototype,Function.prototype],Z=function(q){for(var I=0;I1,le=Z.length>0&&!(Z.length===1&&Z[0]==="constructor"),q=w.test(G+"")&&d.names(G).length>0;if(te||le||q)return!0}return!1}catch{return!1}},isIdentifier:function(G){return S.test(G)},inheritedDataKeys:_,getDataPropertyOrDefault:function(G,Z,te){if(!d.isES5)return{}.hasOwnProperty.call(G,Z)?G[Z]:void 0;var le=Object.getOwnPropertyDescriptor(G,Z);return le!=null?le.get==null&&le.set==null?le.value:te:void 0},thrower:function(G){throw G},isArray:d.isArray,asArray:U,notEnumerableProp:x,isPrimitive:y,isObject:function(G){return typeof G=="function"||typeof G=="object"&&G!==null},isError:C,canEvaluate:f,errorObj:p,tryCatch:function(G){return c=G,v},inherits:function(G,Z){var te={}.hasOwnProperty;function le(){for(var q in this.constructor=G,this.constructor$=Z,Z.prototype)te.call(Z.prototype,q)&&q.charAt(q.length-1)!=="$"&&(this[q+"$"]=Z.prototype[q])}return le.prototype=Z.prototype,G.prototype=new le,G.prototype},withAppended:function(G,Z){var te,le=G.length,q=new Array(le+1);for(te=0;te10||G[0]>0}(),X.isNode&&X.toFastProperties(r);try{throw new Error}catch(G){X.lastLineError=G}s.exports=X},{"./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,a=r.length;o0?(typeof H=="string"||ae.objectMode||Object.getPrototypeOf(H)===d.prototype||(H=function(he){return d.from(he)}(H)),z?ae.endEmitted?D.emit("error",new Error("stream.unshift() after end event")):k(D,ae,H,!0):ae.ended?D.emit("error",new Error("stream.push() after EOF")):(ae.reading=!1,ae.decoder&&!ie?(H=ae.decoder.write(H),ae.objectMode||H.length!==0?k(D,ae,H,!1):V(D,ae)):k(D,ae,H,!1))):z||(ae.reading=!1)),function(he){return!he.ended&&(he.needReadable||he.lengthH.highWaterMark&&(H.highWaterMark=function(ie){return ie>=j?ie=j:(ie--,ie|=ie>>>1,ie|=ie>>>2,ie|=ie>>>4,ie|=ie>>>8,ie|=ie>>>16,ie++),ie}(D)),D<=H.length?D:H.ended?H.length:(H.needReadable=!0,0))}function U(D){var H=D._readableState;H.needReadable=!1,H.emittedReadable||(v("emitReadable",H.flowing),H.emittedReadable=!0,H.sync?o.nextTick(R,D):R(D))}function R(D){v("emit readable"),D.emit("readable"),Z(D)}function V(D,H){H.readingMore||(H.readingMore=!0,o.nextTick(Y,D,H))}function Y(D,H){for(var ie=H.length;!H.reading&&!H.flowing&&!H.ended&&H.length=H.length?(ie=H.decoder?H.buffer.join(""):H.buffer.length===1?H.buffer.head.data:H.buffer.concat(H.length),H.buffer.clear()):ie=function(z,K,re){var ae;return zJ.length?J.length:he;if(se===J.length?ee+=J:ee+=J.slice(0,he),(he-=se)==0){se===J.length?(++$,M.next?O.head=M.next:O.head=O.tail=null):(O.head=M,M.data=J.slice(se));break}++$}return O.length-=$,ee}(z,K):function(he,O){var M=d.allocUnsafe(he),$=O.head,ee=1;for($.data.copy(M),he-=$.data.length;$=$.next;){var J=$.data,se=he>J.length?J.length:he;if(J.copy(M,M.length-he,0,se),(he-=se)==0){se===J.length?(++ee,$.next?O.head=$.next:O.head=O.tail=null):(O.head=$,$.data=J.slice(se));break}++ee}return O.length-=ee,M}(z,K),ae}(D,H.buffer,H.decoder),ie);var ie}function le(D){var H=D._readableState;if(H.length>0)throw new Error('"endReadable()" called on non-empty stream');H.endEmitted||(H.ended=!0,o.nextTick(q,H,D))}function q(D,H){D.endEmitted||D.length!==0||(D.endEmitted=!0,H.readable=!1,H.emit("end"))}function I(D,H){for(var ie=0,z=D.length;ie=H.highWaterMark||H.ended))return v("read: emitReadable",H.length,H.ended),H.length===0&&H.ended?le(this):U(this),null;if((D=N(D,H))===0&&H.ended)return H.length===0&&le(this),null;var z,K=H.needReadable;return v("need readable",K),(H.length===0||H.length-D0?te(D,H):null)===null?(H.needReadable=!0,D=0):H.length-=D,H.length===0&&(H.ended||(H.needReadable=!0),ie!==D&&H.ended&&le(this)),z!==null&&this.emit("data",z),z},E.prototype._read=function(D){this.emit("error",new Error("_read() is not implemented"))},E.prototype.pipe=function(D,H){var ie=this,z=this._readableState;switch(z.pipesCount){case 0:z.pipes=D;break;case 1:z.pipes=[z.pipes,D];break;default:z.pipes.push(D)}z.pipesCount+=1,v("pipe count=%d opts=%j",z.pipesCount,H);var K=H&&H.end===!1||D===i.stdout||D===i.stderr?se:re;function re(){v("onend"),D.end()}z.endEmitted?o.nextTick(K):ie.once("end",K),D.on("unpipe",function ge(Me,ue){v("onunpipe"),Me===ie&&ue&&ue.hasUnpiped===!1&&(ue.hasUnpiped=!0,v("cleanup"),D.removeListener("close",ee),D.removeListener("finish",J),D.removeListener("drain",ae),D.removeListener("error",$),D.removeListener("unpipe",ge),ie.removeListener("end",re),ie.removeListener("end",se),ie.removeListener("data",M),he=!0,!z.awaitDrain||D._writableState&&!D._writableState.needDrain||ae())});var ae=function(ge){return function(){var Me=ge._readableState;v("pipeOnDrain",Me.awaitDrain),Me.awaitDrain&&Me.awaitDrain--,Me.awaitDrain===0&&l(ge,"data")&&(Me.flowing=!0,Z(ge))}}(ie);D.on("drain",ae);var he=!1,O=!1;function M(ge){v("ondata"),O=!1,D.write(ge)!==!1||O||((z.pipesCount===1&&z.pipes===D||z.pipesCount>1&&I(z.pipes,D)!==-1)&&!he&&(v("false write response, pause",ie._readableState.awaitDrain),ie._readableState.awaitDrain++,O=!0),ie.pause())}function $(ge){v("onerror",ge),se(),D.removeListener("error",$),l(D,"error")===0&&D.emit("error",ge)}function ee(){D.removeListener("finish",J),se()}function J(){v("onfinish"),D.removeListener("close",ee),se()}function se(){v("unpipe"),ie.unpipe(D)}return ie.on("data",M),function(ge,Me,ue){if(typeof ge.prependListener=="function")return ge.prependListener(Me,ue);ge._events&&ge._events[Me]?s(ge._events[Me])?ge._events[Me].unshift(ue):ge._events[Me]=[ue,ge._events[Me]]:ge.on(Me,ue)}(D,"error",$),D.once("close",ee),D.once("finish",J),D.emit("pipe",ie),z.flowing||(v("pipe resume"),ie.resume()),D},E.prototype.unpipe=function(D){var H=this._readableState,ie={hasUnpiped:!1};if(H.pipesCount===0)return this;if(H.pipesCount===1)return D&&D!==H.pipes?this:(D||(D=H.pipes),H.pipes=null,H.pipesCount=0,H.flowing=!1,D&&D.emit("unpipe",this,ie),this);if(!D){var z=H.pipes,K=H.pipesCount;H.pipes=null,H.pipesCount=0,H.flowing=!1;for(var re=0;re>5==6?2:v>>4==14?3:v>>3==30?4:v>>6==2?-1:-2}function s(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 d(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 f(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):--C=0?(k>0&&(w.lastNeed=k-2),k):--C=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,d){var f=this._transformState;f.transforming=!1;var p=f.writecb;if(!p)return this.emit("error",new Error("write callback called multiple times"));f.writechunk=null,f.writecb=null,d!=null&&this.push(d),p(c);var m=this._readableState;m.reading=!1,(m.needReadable||m.length-1&&a.push(i[s]);return a},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(a,s){a.__proto__=s}||function(a,s){for(var l in s)s.hasOwnProperty(l)&&(a[l]=s[l])};return function(a,s){function l(){this.constructor=a}o(a,s),a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(o){function a(s,l,c){var d=o.call(this,"Error: "+s+". JSON Line number: "+l+(c?" near: "+c:""))||this;return d.err=s,d.line=l,d.extra=c,d.name="CSV Parse Error",d}return r(a,o),a.column_mismatched=function(s,l){return new a("column_mismatched",s,l)},a.unclosed_quote=function(s,l){return new a("unclosed_quote",s,l)},a.fromJSON=function(s){return new a(s.err,s.line,s.extra)},a.prototype.toJSON=function(){return{err:this.err,line:this.line,extra:this.extra}},a}(Error);t.default=i},function(e,t,n){var r=n(18),i=n(68),o=n(69),a=r?r.toStringTag:void 0;e.exports=function(s){return s==null?s===void 0?"[object Undefined]":"[object Null]":a&&a in Object(s)?i(s):o(s)}},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,a){return new r.Converter(o,a)};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 a=n(36),s=n(50),l=n(51),c=o(n(15)),d=n(52),f=n(105),p=function(m){function v(y,x){x===void 0&&(x={});var _=m.call(this,x)||this;return _.options=x,_.params=s.mergeParams(y),_.runtime=l.initParseRuntime(_),_.result=new f.Result(_),_.processor=new d.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 a.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(E){w(y?y(E):E)},onrejected:function(E){x?w(x(E)):S(E)}}})},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}(a.Transform);t.Converter=p}).call(this,n(11).setImmediate)},function(e,t,n){(function(r,i){(function(o,a){if(!o.setImmediate){var s,l=1,c={},d=!1,f=o.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(o);p=p&&p.setTimeout?p:o,{}.toString.call(o.process)==="[object process]"?s=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),s=function(_){o.postMessage(y+_,"*")}}():o.MessageChannel?function(){var y=new MessageChannel;y.port1.onmessage=function(x){v(x.data)},s=function(x){y.port2.postMessage(x)}}():f&&"onreadystatechange"in f.createElement("script")?function(){var y=f.documentElement;s=function(x){var _=f.createElement("script");_.onreadystatechange=function(){v(x),_.onreadystatechange=null,y.removeChild(_),_=null},y.appendChild(_)}}():s=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,a){var s=this;function l(y){o.writable&&o.write(y)===!1&&s.pause&&s.pause()}function c(){s.readable&&s.resume&&s.resume()}s.on("data",l),o.on("drain",c),o._isStdio||a&&a.end===!1||(s.on("end",f),s.on("close",p));var d=!1;function f(){d||(d=!0,o.end())}function p(){d||(d=!0,typeof o.destroy=="function"&&o.destroy())}function m(y){if(v(),r.listenerCount(this,"error")===0)throw y}function v(){s.removeListener("data",l),o.removeListener("drain",c),s.removeListener("end",f),s.removeListener("close",p),s.removeListener("error",m),o.removeListener("error",m),s.removeListener("end",v),s.removeListener("close",v),o.removeListener("close",v)}return s.on("error",m),o.on("error",m),s.on("end",v),s.on("close",v),o.on("close",v),o.emit("pipe",s),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,E=0;E>16&255,_[w++]=m>>8&255,_[w++]=255&m;return x===2&&(m=i[p.charCodeAt(E)]<<2|i[p.charCodeAt(E+1)]>>4,_[w++]=255&m),x===1&&(m=i[p.charCodeAt(E)]<<10|i[p.charCodeAt(E+1)]<<4|i[p.charCodeAt(E+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,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=a.length;s0)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 d(p){return r[p>>18&63]+r[p>>12&63]+r[p>>6&63]+r[63&p]}function f(p,m,v){for(var y,x=[],_=m;_>1,p=-7,m=i?a-1:0,v=i?-1:1,y=n[r+m];for(m+=v,s=y&(1<<-p)-1,y>>=-p,p+=c;p>0;s=256*s+n[r+m],m+=v,p-=8);for(l=s&(1<<-p)-1,s>>=-p,p+=o;p>0;l=256*l+n[r+m],m+=v,p-=8);if(s===0)s=1-f;else{if(s===d)return l?NaN:1/0*(y?-1:1);l+=Math.pow(2,o),s-=f}return(y?-1:1)*l*Math.pow(2,s-o)},t.write=function(n,r,i,o,a,s){var l,c,d,f=8*s-a-1,p=(1<>1,v=a===23?Math.pow(2,-24)-Math.pow(2,-77):0,y=o?0:s-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*(d=Math.pow(2,-l))<1&&(l--,d*=2),(r+=l+m>=1?v/d:v*Math.pow(2,1-m))*d>=2&&(l++,d/=2),l+m>=p?(c=0,l=p):l+m>=1?(c=(r*d-1)*Math.pow(2,a),l+=m):(c=r*Math.pow(2,m-1)*Math.pow(2,a),l=0));a>=8;n[i+y]=255&c,y+=x,c/=256,a-=8);for(l=l<0;n[i+y]=255&l,y+=x,l/=256,f-=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(a,s,l){a.copy(s,l)}e.exports=function(){function a(){(function(s,l){if(!(s instanceof l))throw new TypeError("Cannot call a class as a function")})(this,a),this.head=null,this.tail=null,this.length=0}return a.prototype.push=function(s){var l={data:s,next:null};this.length>0?this.tail.next=l:this.head=l,this.tail=l,++this.length},a.prototype.unshift=function(s){var l={data:s,next:this.head};this.length===0&&(this.tail=l),this.head=l,++this.length},a.prototype.shift=function(){if(this.length!==0){var s=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,s}},a.prototype.clear=function(){this.head=this.tail=null,this.length=0},a.prototype.join=function(s){if(this.length===0)return"";for(var l=this.head,c=""+l.data;l=l.next;)c+=s+l.data;return c},a.prototype.concat=function(s){if(this.length===0)return r.alloc(0);if(this.length===1)return this.head.data;for(var l=r.allocUnsafe(s>>>0),c=this.head,d=0;c;)o(c.data,l,d),d+=c.data.length,c=c.next;return l},a}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var a=i.inspect({length:this.length});return this.constructor.name+" "+a})},function(e,t){},function(e,t,n){(function(r){function i(o){try{if(!r.localStorage)return!1}catch{return!1}var a=r.localStorage[o];return a!=null&&String(a).toLowerCase()==="true"}e.exports=function(o,a){if(i("noDeprecation"))return o;var s=!1;return function(){if(!s){if(i("throwDeprecation"))throw new Error(a);i("traceDeprecation")?console.trace(a):console.warn(a),s=!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(a){if(!(this instanceof o))return new o(a);r.call(this,a)}i.inherits=n(2),i.inherits(o,r),o.prototype._transform=function(a,s,l){l(null,a)}},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 a=n(53),s=o(n(15)),l=n(54),c=o(n(16)),d=n(57),f=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(E){return w.runtime.csvLineBuffer&&w.runtime.csvLineBuffer.length>0?s.default.reject(v.default.unclosed_quote(w.runtime.parsedLineNumber,w.runtime.csvLineBuffer.toString())):s.default.resolve(E)})}return s.default.resolve([])},_.prototype.destroy=function(){return s.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 E,C=this;return S===void 0&&(S=!1),E=S?w.toString():l.prepareData(w,this.converter.parseRuntime),s.default.resolve().then(function(){return C.runtime.preRawDataHook?C.runtime.preRawDataHook(E):E}).then(function(k){return k&&k.length>0?C.processCSV(k,S):s.default.resolve([])})},_.prototype.processCSV=function(w,S){var E=this,C=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),C.ignoreEmpty&&!k.started&&(w=f.trimLeft(w));var j=d.stringToLines(w,k);return S?(j.lines.push(j.partial),j.partial=""):this.prependLeftBuf(f.bufFromString(j.partial)),j.lines.length>0?(k.preFileLineHook?this.runPreLineHook(j.lines):s.default.resolve(j.lines)).then(function(N){return k.started||E.runtime.headers?E.processCSVBody(N):E.processDataWithHead(N)}):s.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="",E=[];w.length;){var C=S+w.shift(),k=this.rowSplit.parse(C);if(k.closed){E=k.cells,S="";break}S=C+c.default(C,this.runtime)}if(this.prependLeftBuf(f.bufFromString(S)),E.length===0)return[];this.params.headers?this.runtime.headers=this.params.headers:this.runtime.headers=E}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=j.length)R();else if(N.preFileLineHook){var V=j[U],Y=N.preFileLineHook(V,N.parsedLineNumber+U);if(U++,Y&&Y.then)Y.then(function(X){j[U-1]=X,k(j,N,U,R)});else{for(j[U-1]=Y;U0?r.concat([f.csvLineBuffer,d]):d}(a,s);s.csvLineBuffer=void 0;var c=function(d,f){var p=d.length-1;if(128&d[p]){for(;(192&d[p])==128;)p--;p--}return p!=d.length-1?(f.csvLineBuffer=d.slice(p+1),d.slice(0,p+1)):d}(l,s).toString("utf8");return s.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 d=this.quote,f=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(d==="off"){if(f)for(var v=0;vf&&(p=m,f=v)}),p},l.prototype.isQuoteOpen=function(c){var d=this.quote,f=this.escape;return c[0]===d&&(c[1]!==d||c[1]===f&&(c[2]===d||c.length===2))},l.prototype.isQuoteClose=function(c){var d=this.quote,f=this.escape;this.conv.parseParam.trim&&(c=o.trimRight(c));for(var p=0,m=c.length-1;c[m]===d||c[m]===f;)m--,p++;return p%2!=0},l.prototype.escapeQuote=function(c){var d="es|"+this.quote+"|"+this.escape;this.cachedRegExp[d]===void 0&&(this.cachedRegExp[d]=new RegExp("\\"+this.escape+"\\"+this.quote,"g"));var f=this.cachedRegExp[d];return c.replace(f,this.quote)},l.prototype.parseMultiLines=function(c){for(var d=[],f="";c.length;){var p=f+c.shift(),m=this.parse(p);m.cells.length===0&&this.conv.parseParam.ignoreEmpty||(m.closed||this.conv.parseParam.alwaysSplitAtEOL?(this.conv.parseRuntime.selectedColumns?d.push(o.filterArray(m.cells,this.conv.parseRuntime.selectedColumns)):d.push(m.cells),f=""):f=p+(i.default(p,this.conv.parseRuntime)||` +`))}return{rowsCells:d,partial:f}},l}();t.RowSplit=s},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)),a=/^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$/;function s(_,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(E,C,k){for(var j=!1,N={},U=0,R=E.length;U-1){for(var k=w.split("."),j=!0;k.length>0;)if(k.shift().length===0){j=!1;break}!j||E.parseParam.colParser[w]&&E.parseParam.colParser[w].flat?E.parseRuntime.columnValueSetter[C]=f:E.parseRuntime.columnValueSetter[C]=p}else E.parseRuntime.columnValueSetter[C]=f;E.parseParam.nullObject===!0&&S==="null"&&(S=null),E.parseRuntime.columnValueSetter[C](_,w,S)}function f(_,w,S){_[w]=S}function p(_,w,S){o.default(_,w,S)}function m(_,w,S,E){return E.parseRuntime.headerType[S]?E.parseRuntime.headerType[S]:w.indexOf("number#!")>-1?E.parseRuntime.headerType[S]=v:w.indexOf("string#!")>-1?E.parseRuntime.headerType[S]=y:E.parseParam.checkType?E.parseRuntime.headerType[S]=x:E.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(_):a.test(w)?v(_):w.length===5&&w.toLowerCase()==="false"||w.length===4&&w.toLowerCase()==="true"?function(S){var E=S.trim();return E.length!==5||E.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,a){return i==null?i:r(i,o,a)}},function(e,t,n){var r=n(62),i=n(74),o=n(103),a=n(20),s=n(104);e.exports=function(l,c,d,f){if(!a(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 a=this.__data__,s=r(a,i);return s<0?(++this.size,a.push([i,o])):a[s][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 a=r(this,i),s=a.size;return a.set(i,o),this.size+=a.size==s?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),a=n(22),s=r?r.prototype:void 0,l=s?s.toString:void 0;e.exports=function c(d){if(typeof d=="string")return d;if(o(d))return i(d,c)+"";if(a(d))return l?l.call(d):"";var f=d+"";return f=="0"&&1/d==-1/0?"-0":f}},function(e,t){e.exports=function(n,r){for(var i=-1,o=n==null?0:n.length,a=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 d=this,f=this.converter.parseRuntime.parsedLineNumber;return this.needPushDownstream&&this.converter.parseParam.downstreamFormat==="array"&&f===0&&s(this.converter,"["+o.EOL),new i.default(function(p,m){d.needEmitLine?function v(y,x,_,w,S){if(_>=y.length)S();else if(x.parseRuntime.subscribe&&x.parseRuntime.subscribe.onNext){var E=x.parseRuntime.subscribe.onNext,C=y[_],k=E(C,x.parseRuntime.parsedLineNumber+_);if(_++,k&&k.then)k.then(function(){(function(N,U,R,V,Y,X,G){Y&&s(R,G),v(N,R,V,Y,X)})(y,0,x,_,w,S,C)},S);else{for(w&&s(x,C);_new Promise(t=>{sEe().fromString(e).then(t)}),cEe=new oEe,uEe=e=>cEe.parse(e),dEe="shlink",gN=e=>`${dEe}.${e}`;class fEe{constructor(t){gt(this,"get",t=>{const n=this.localStorage.getItem(gN(t));return n?JSON.parse(n):void 0});gt(this,"set",(t,n)=>this.localStorage.setItem(gN(t),JSON.stringify(n)));this.localStorage=t}}class hEe{constructor(t){this.storage=t}getTagColors(){return this.storage.get("colors")??{}}storeTagColors(t){this.storage.set("colors",t)}}const pEe=e=>{e.constant("localStorage",window.localStorage),e.service("Storage",fEe,"localStorage"),e.service("TagColorsStorage",hEe,"Storage"),e.constant("csvToJson",lEe),e.constant("jsonToCsv",uEe),e.constant("setTimeout",window.setTimeout),e.constant("clearTimeout",window.clearTimeout),e.serviceFactory("useTimeoutToggle",Yxe,"setTimeout","clearTimeout")},Gl=new pH,{container:MO}=Gl,mEe=(e,t)=>(...n)=>e[t](...n),gEe=(e,t)=>({...e,[t]:mEe(MO,t)}),V0=(e,t=[])=>HD(e?UW(e):null,t.reduce(gEe,{}));Aie(Gl,V0);Uxe(Gl,V0);Fre(Gl);j2e(Gl,V0);pEe(Gl);rSe(Gl,V0);var AO={},B2={exports:{}};(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=[],d=0;dI.length)&&(D=I.length);for(var H=0,ie=Array(D);HnT({appUpdated:Mie,servers:h2e,selectedServer:e.selectedServerReducer,settings:W2e}),_Ee=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},bEe=!0,oU={states:["settings","servers"],namespace:"shlink",namespaceSeparator:".",debounce:300},wEe=_Ee(AO.load(oU)),xEe=e=>D6({devTools:!bEe,reducer:yEe(e),preloadedState:wEe,middleware:t=>t({immutableCheck:!1,serializableCheck:!1}).concat(AO.save(oU))}),SEe=!!(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 EEe(e){if("serviceWorker"in navigator){if(new URL(iv.homepage,window.location.href).origin!==window.location.origin)return;window.addEventListener("load",()=>{const n=`${iv.homepage}/service-worker.js`;SEe?(TEe(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")})):aU(n,e)})}}function aU(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 TEe(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()})}):aU(e,t)}).catch(()=>{console.log("No internet connection found. App is running in offline mode.")})}const sU=xEe(MO),{App:OEe,ScrollToTop:CEe,ErrorHandler:kEe,appUpdateAvailable:PEe}=MO;LD(document.getElementById("root")).render(g.jsx(WD,{store:sU,children:g.jsx(e4,{basename:iv.homepage,children:g.jsx(kEe,{children:g.jsx(CEe,{children:g.jsx(OEe,{})})})})}));EEe({onUpdate(){sU.dispatch(PEe())}}); diff --git a/feature/external-web-component/index.html b/feature/external-web-component/index.html index 667301db..210a1bd2 100644 --- a/feature/external-web-component/index.html +++ b/feature/external-web-component/index.html @@ -79,7 +79,7 @@ Shlink — The URL shortener - + diff --git a/feature/external-web-component/service-worker.js b/feature/external-web-component/service-worker.js index f0457db6..c240f0af 100644 --- a/feature/external-web-component/service-worker.js +++ b/feature/external-web-component/service-worker.js @@ -1731,15 +1731,13 @@ const Se = "shlink-web-client", We = "A React-based progressive web application "@json2csv/plainjs": "^7.0.1", "@reduxjs/toolkit": "^1.9.5", "@shlinkio/shlink-frontend-kit": "^0.2.0", - "@shlinkio/shlink-web-component": "^0.1.0", + "@shlinkio/shlink-web-component": "^0.1.1", bootstrap: "5.2.3", bottlejs: "^2.0.1", - "chart.js": "^4.3.3", classnames: "^2.3.2", "compare-versions": "^6.1.0", csvtojson: "^2.0.10", "date-fns": "^2.30.0", - leaflet: "^1.9.4", ramda: "^0.27.2", react: "^18.2.0", "react-dom": "^18.2.0", @@ -1797,7 +1795,7 @@ const Se = "shlink-web-client", We = "A React-based progressive web application browserslist: Ge }; re(); -Ae([{"revision":null,"url":"assets/index-0e8ab544.css"},{"revision":null,"url":"assets/index-30cba7be.js"},{"revision":"d1983990cd49d4ac620f16ee2cde9618","url":"index.html"},{"revision":"3e8169a112865ef0d76bba4e2dfd3a89","url":"./icons/icon-16x16.png"},{"revision":"20f0b51945ae3c973420e31d6b4d43c1","url":"./icons/icon-24x24.png"},{"revision":"4c9695cfb4cea403c1b66bbb7b4f7420","url":"./icons/icon-32x32.png"},{"revision":"f74edb9cc54ac938c1589876f8da9f21","url":"./icons/icon-40x40.png"},{"revision":"52933970fac8498311687de13549b014","url":"./icons/icon-48x48.png"},{"revision":"40209a194f29b21882571c77bd2bd906","url":"./icons/icon-60x60.png"},{"revision":"c8ba5a8c1da76d74c7bb21827fcf975c","url":"./icons/icon-64x64.png"},{"revision":"ae3435baceb494f9c966e2c2c736ea35","url":"./icons/icon-72x72.png"},{"revision":"850aa5b026fd1452af6c1ddd9d71850f","url":"./icons/icon-76x76.png"},{"revision":"8c62535e6b7a498ece1f6c6ae62ede59","url":"./icons/icon-96x96.png"},{"revision":"2dff586aaefa4c8d17f4c0bcbdef8b53","url":"./icons/icon-114x114.png"},{"revision":"8e28257a68ef1c55bc68bfff80e1a310","url":"./icons/icon-120x120.png"},{"revision":"0059b6f0c97fa871a5c29643b2857585","url":"./icons/icon-128x128.png"},{"revision":"41478c2456281f61e54d714718743ecc","url":"./icons/icon-144x144.png"},{"revision":"625251910295f33a578ae6d8117711c9","url":"./icons/icon-150x150.png"},{"revision":"19b71508b1d05defe32cf16a7d453001","url":"./icons/icon-152x152.png"},{"revision":"9d029a32a54ba3084c67acd5d74f8ac4","url":"./icons/icon-160x160.png"},{"revision":"6ec104aeaf745f003ecdaef2edddce97","url":"./icons/icon-167x167.png"},{"revision":"871d67907434ed0ddf5d2a6c220e09af","url":"./icons/icon-180x180.png"},{"revision":"cee2529402074d73b2135e2ddee25f6b","url":"./icons/icon-192x192.png"},{"revision":"85055b452284c0193142936dee7d2cd1","url":"./icons/icon-196x196.png"},{"revision":"f471155dd70b99924422dd9dd87ea94d","url":"./icons/icon-228x228.png"},{"revision":"4d896c5c7025582605de31fb74f0316b","url":"./icons/icon-256x256.png"},{"revision":"d99b49e5bcad41968313c3e132e7c661","url":"./icons/icon-310x310.png"},{"revision":"f9597636bef677327c3abc0fd1a743c4","url":"./icons/icon-384x384.png"},{"revision":"de22c0eb9e08d3576df5cedb568ca56b","url":"./icons/icon-512x512.png"},{"revision":"583b223ad8e20f05aaa64923d7db2e46","url":"./icons/icon-1024x1024.png"},{"revision":"68e57b1af24caec37efff6078f197c77","url":"manifest.json"}]); +Ae([{"revision":null,"url":"assets/index-0e8ab544.css"},{"revision":null,"url":"assets/index-e0a5be8d.js"},{"revision":"51f6fd2c67187df6c10881a4593bc601","url":"index.html"},{"revision":"3e8169a112865ef0d76bba4e2dfd3a89","url":"./icons/icon-16x16.png"},{"revision":"20f0b51945ae3c973420e31d6b4d43c1","url":"./icons/icon-24x24.png"},{"revision":"4c9695cfb4cea403c1b66bbb7b4f7420","url":"./icons/icon-32x32.png"},{"revision":"f74edb9cc54ac938c1589876f8da9f21","url":"./icons/icon-40x40.png"},{"revision":"52933970fac8498311687de13549b014","url":"./icons/icon-48x48.png"},{"revision":"40209a194f29b21882571c77bd2bd906","url":"./icons/icon-60x60.png"},{"revision":"c8ba5a8c1da76d74c7bb21827fcf975c","url":"./icons/icon-64x64.png"},{"revision":"ae3435baceb494f9c966e2c2c736ea35","url":"./icons/icon-72x72.png"},{"revision":"850aa5b026fd1452af6c1ddd9d71850f","url":"./icons/icon-76x76.png"},{"revision":"8c62535e6b7a498ece1f6c6ae62ede59","url":"./icons/icon-96x96.png"},{"revision":"2dff586aaefa4c8d17f4c0bcbdef8b53","url":"./icons/icon-114x114.png"},{"revision":"8e28257a68ef1c55bc68bfff80e1a310","url":"./icons/icon-120x120.png"},{"revision":"0059b6f0c97fa871a5c29643b2857585","url":"./icons/icon-128x128.png"},{"revision":"41478c2456281f61e54d714718743ecc","url":"./icons/icon-144x144.png"},{"revision":"625251910295f33a578ae6d8117711c9","url":"./icons/icon-150x150.png"},{"revision":"19b71508b1d05defe32cf16a7d453001","url":"./icons/icon-152x152.png"},{"revision":"9d029a32a54ba3084c67acd5d74f8ac4","url":"./icons/icon-160x160.png"},{"revision":"6ec104aeaf745f003ecdaef2edddce97","url":"./icons/icon-167x167.png"},{"revision":"871d67907434ed0ddf5d2a6c220e09af","url":"./icons/icon-180x180.png"},{"revision":"cee2529402074d73b2135e2ddee25f6b","url":"./icons/icon-192x192.png"},{"revision":"85055b452284c0193142936dee7d2cd1","url":"./icons/icon-196x196.png"},{"revision":"f471155dd70b99924422dd9dd87ea94d","url":"./icons/icon-228x228.png"},{"revision":"4d896c5c7025582605de31fb74f0316b","url":"./icons/icon-256x256.png"},{"revision":"d99b49e5bcad41968313c3e132e7c661","url":"./icons/icon-310x310.png"},{"revision":"f9597636bef677327c3abc0fd1a743c4","url":"./icons/icon-384x384.png"},{"revision":"de22c0eb9e08d3576df5cedb568ca56b","url":"./icons/icon-512x512.png"},{"revision":"583b223ad8e20f05aaa64923d7db2e46","url":"./icons/icon-1024x1024.png"},{"revision":"68e57b1af24caec37efff6078f197c77","url":"manifest.json"}]); const ze = new RegExp("/[^/?]+\\.[^/]+$"); M( // Return false to exempt requests from being fulfilled by index.html.