From 0b7192cdeebc2183036818fd3562c7165f16cc8d Mon Sep 17 00:00:00 2001 From: acelaya Date: Sat, 18 Mar 2023 19:36:20 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20preview-env=20from=20@=20shlin?= =?UTF-8?q?kio/shlink-web-client@8fa61a6301497ffca824249b148a101ad9201afa?= =?UTF-8?q?=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{index-8f19cb49.js => index-b2b2ee9c.js} | 88 +++++++++---------- feature/remeda/index.html | 2 +- feature/remeda/service-worker.js | 2 +- 3 files changed, 46 insertions(+), 46 deletions(-) rename feature/remeda/assets/{index-8f19cb49.js => index-b2b2ee9c.js} (63%) diff --git a/feature/remeda/assets/index-8f19cb49.js b/feature/remeda/assets/index-b2b2ee9c.js similarity index 63% rename from feature/remeda/assets/index-8f19cb49.js rename to feature/remeda/assets/index-b2b2ee9c.js index 0769ba87..1fa6ce1b 100644 --- a/feature/remeda/assets/index-8f19cb49.js +++ b/feature/remeda/assets/index-b2b2ee9c.js @@ -1,4 +1,4 @@ -var g7=Object.defineProperty;var v7=(e,t,n)=>t in e?g7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Se=(e,t,n)=>(v7(e,typeof t!="symbol"?t+"":t,n),n);function y7(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var Hl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function FL(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function _7(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){if(this instanceof r){var i=[null];i.push.apply(i,arguments);var o=Function.bind.apply(t,i);return new o}return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var Ff={},b7={get exports(){return Ff},set exports(e){Ff=e}},ay={},H={},w7={get exports(){return H},set exports(e){H=e}},st={};/** +var S7=Object.defineProperty;var C7=(e,t,n)=>t in e?S7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Se=(e,t,n)=>(C7(e,typeof t!="symbol"?t+"":t,n),n);function E7(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var Wl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function BL(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function T7(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){if(this instanceof r){var i=[null];i.push.apply(i,arguments);var o=Function.bind.apply(t,i);return new o}return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var $f={},O7={get exports(){return $f},set exports(e){$f=e}},cy={},H={},P7={get exports(){return H},set exports(e){H=e}},st={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ var g7=Object.defineProperty;var v7=(e,t,n)=>t in e?g7(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Dd=Symbol.for("react.element"),x7=Symbol.for("react.portal"),S7=Symbol.for("react.fragment"),C7=Symbol.for("react.strict_mode"),E7=Symbol.for("react.profiler"),T7=Symbol.for("react.provider"),O7=Symbol.for("react.context"),P7=Symbol.for("react.forward_ref"),k7=Symbol.for("react.suspense"),M7=Symbol.for("react.memo"),R7=Symbol.for("react.lazy"),hO=Symbol.iterator;function N7(e){return e===null||typeof e!="object"?null:(e=hO&&e[hO]||e["@@iterator"],typeof e=="function"?e:null)}var $L={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},jL=Object.assign,BL={};function Zc(e,t,n){this.props=e,this.context=t,this.refs=BL,this.updater=n||$L}Zc.prototype.isReactComponent={};Zc.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")};Zc.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function zL(){}zL.prototype=Zc.prototype;function Mx(e,t,n){this.props=e,this.context=t,this.refs=BL,this.updater=n||$L}var Rx=Mx.prototype=new zL;Rx.constructor=Mx;jL(Rx,Zc.prototype);Rx.isPureReactComponent=!0;var pO=Array.isArray,UL=Object.prototype.hasOwnProperty,Nx={current:null},VL={key:!0,ref:!0,__self:!0,__source:!0};function HL(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)UL.call(t,r)&&!VL.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1t in e?g7(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var F7=H,$7=Symbol.for("react.element"),j7=Symbol.for("react.fragment"),B7=Object.prototype.hasOwnProperty,z7=F7.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,U7={key:!0,ref:!0,__self:!0,__source:!0};function WL(e,t,n){var r,i={},o=null,s=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)B7.call(t,r)&&!U7.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:$7,type:e,key:o,ref:s,props:i,_owner:z7.current}}ay.Fragment=j7;ay.jsx=WL;ay.jsxs=WL;(function(e){e.exports=ay})(b7);const We=Ff.Fragment,C=Ff.jsx,U=Ff.jsxs;/*! + */var H7=H,W7=Symbol.for("react.element"),Y7=Symbol.for("react.fragment"),q7=Object.prototype.hasOwnProperty,G7=H7.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Z7={key:!0,ref:!0,__self:!0,__source:!0};function GL(e,t,n){var r,i={},o=null,s=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)q7.call(t,r)&&!Z7.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:W7,type:e,key:o,ref:s,props:i,_owner:G7.current}}cy.Fragment=Y7;cy.jsx=GL;cy.jsxs=GL;(function(e){e.exports=cy})(O7);const We=$f.Fragment,C=$f.jsx,U=$f.jsxs;/*! * @kurkle/color v0.3.1 * https://github.com/kurkle/color#readme * (c) 2022 Jukka Kurkela * Released under the MIT License - */function Ad(e){return e+.5|0}const ls=(e,t,n)=>Math.max(Math.min(e,n),t);function Vu(e){return ls(Ad(e*2.55),0,255)}function bs(e){return ls(Ad(e*255),0,255)}function mo(e){return ls(Ad(e/2.55)/100,0,1)}function gO(e){return ls(Ad(e*100),0,100)}const Wr={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},Jb=[..."0123456789ABCDEF"],V7=e=>Jb[e&15],H7=e=>Jb[(e&240)>>4]+Jb[e&15],Bh=e=>(e&240)>>4===(e&15),W7=e=>Bh(e.r)&&Bh(e.g)&&Bh(e.b)&&Bh(e.a);function Y7(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&Wr[e[1]]*17,g:255&Wr[e[2]]*17,b:255&Wr[e[3]]*17,a:t===5?Wr[e[4]]*17:255}:(t===7||t===9)&&(n={r:Wr[e[1]]<<4|Wr[e[2]],g:Wr[e[3]]<<4|Wr[e[4]],b:Wr[e[5]]<<4|Wr[e[6]],a:t===9?Wr[e[7]]<<4|Wr[e[8]]:255})),n}const q7=(e,t)=>e<255?t(e):"";function G7(e){var t=W7(e)?V7:H7;return e?"#"+t(e.r)+t(e.g)+t(e.b)+q7(e.a,t):void 0}const Z7=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function YL(e,t,n){const r=t*Math.min(n,1-n),i=(o,s=(o+e/30)%12)=>n-r*Math.max(Math.min(s-3,9-s,1),-1);return[i(0),i(8),i(4)]}function K7(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 X7(e,t,n){const r=YL(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 Q7(e,t,n,r,i){return e===i?(t-n)/r+(t.5?f/(2-o-s):f/(o+s),l=Q7(n,r,i,f,o),l=l*60+.5),[l|0,c||0,a]}function Ax(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(bs)}function Ix(e,t,n){return Ax(YL,e,t,n)}function J7(e,t,n){return Ax(X7,e,t,n)}function ej(e,t,n){return Ax(K7,e,t,n)}function qL(e){return(e%360+360)%360}function tj(e){const t=Z7.exec(e);let n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?Vu(+t[5]):bs(+t[5]));const i=qL(+t[2]),o=+t[3]/100,s=+t[4]/100;return t[1]==="hwb"?r=J7(i,o,s):t[1]==="hsv"?r=ej(i,o,s):r=Ix(i,o,s),{r:r[0],g:r[1],b:r[2],a:n}}function nj(e,t){var n=Dx(e);n[0]=qL(n[0]+t),n=Ix(n),e.r=n[0],e.g=n[1],e.b=n[2]}function rj(e){if(!e)return;const t=Dx(e),n=t[0],r=gO(t[1]),i=gO(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${i}%, ${mo(e.a)})`:`hsl(${n}, ${r}%, ${i}%)`}const vO={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"},yO={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 ij(){const e={},t=Object.keys(yO),n=Object.keys(vO);let r,i,o,s,a;for(r=0;r>16&255,o>>8&255,o&255]}return e}let zh;function oj(e){zh||(zh=ij(),zh.transparent=[0,0,0,0]);const t=zh[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const sj=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function aj(e){const t=sj.exec(e);let n=255,r,i,o;if(t){if(t[7]!==r){const s=+t[7];n=t[8]?Vu(s):ls(s*255,0,255)}return r=+t[1],i=+t[3],o=+t[5],r=255&(t[2]?Vu(r):ls(r,0,255)),i=255&(t[4]?Vu(i):ls(i,0,255)),o=255&(t[6]?Vu(o):ls(o,0,255)),{r,g:i,b:o,a:n}}}function lj(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${mo(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const c0=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,Pl=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function cj(e,t,n){const r=Pl(mo(e.r)),i=Pl(mo(e.g)),o=Pl(mo(e.b));return{r:bs(c0(r+n*(Pl(mo(t.r))-r))),g:bs(c0(i+n*(Pl(mo(t.g))-i))),b:bs(c0(o+n*(Pl(mo(t.b))-o))),a:e.a+n*(t.a-e.a)}}function Uh(e,t,n){if(e){let r=Dx(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=Ix(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function GL(e,t){return e&&Object.assign(t||{},e)}function _O(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=bs(e[3]))):(t=GL(e,{r:0,g:0,b:0,a:1}),t.a=bs(t.a)),t}function uj(e){return e.charAt(0)==="r"?aj(e):tj(e)}class $f{constructor(t){if(t instanceof $f)return t;const n=typeof t;let r;n==="object"?r=_O(t):n==="string"&&(r=Y7(t)||oj(t)||uj(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var t=GL(this._rgb);return t&&(t.a=mo(t.a)),t}set rgb(t){this._rgb=_O(t)}rgbString(){return this._valid?lj(this._rgb):void 0}hexString(){return this._valid?G7(this._rgb):void 0}hslString(){return this._valid?rj(this._rgb):void 0}mix(t,n){if(t){const r=this.rgb,i=t.rgb;let o;const s=n===o?.5:n,a=2*s-1,l=r.a-i.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,r.r=255&c*r.r+o*i.r+.5,r.g=255&c*r.g+o*i.g+.5,r.b=255&c*r.b+o*i.b+.5,r.a=s*r.a+(1-s)*i.a,this.rgb=r}return this}interpolate(t,n){return t&&(this._rgb=cj(this._rgb,t._rgb,n)),this}clone(){return new $f(this.rgb)}alpha(t){return this._rgb.a=bs(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=Ad(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 Uh(this._rgb,2,t),this}darken(t){return Uh(this._rgb,2,-t),this}saturate(t){return Uh(this._rgb,1,t),this}desaturate(t){return Uh(this._rgb,1,-t),this}rotate(t){return nj(this._rgb,t),this}}/*! + */function Ad(e){return e+.5|0}const cs=(e,t,n)=>Math.max(Math.min(e,n),t);function Wu(e){return cs(Ad(e*2.55),0,255)}function ws(e){return cs(Ad(e*255),0,255)}function mo(e){return cs(Ad(e/2.55)/100,0,1)}function yO(e){return cs(Ad(e*100),0,100)}const Wr={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},t1=[..."0123456789ABCDEF"],K7=e=>t1[e&15],X7=e=>t1[(e&240)>>4]+t1[e&15],Bh=e=>(e&240)>>4===(e&15),Q7=e=>Bh(e.r)&&Bh(e.g)&&Bh(e.b)&&Bh(e.a);function J7(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&Wr[e[1]]*17,g:255&Wr[e[2]]*17,b:255&Wr[e[3]]*17,a:t===5?Wr[e[4]]*17:255}:(t===7||t===9)&&(n={r:Wr[e[1]]<<4|Wr[e[2]],g:Wr[e[3]]<<4|Wr[e[4]],b:Wr[e[5]]<<4|Wr[e[6]],a:t===9?Wr[e[7]]<<4|Wr[e[8]]:255})),n}const ej=(e,t)=>e<255?t(e):"";function tj(e){var t=Q7(e)?K7:X7;return e?"#"+t(e.r)+t(e.g)+t(e.b)+ej(e.a,t):void 0}const nj=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function ZL(e,t,n){const r=t*Math.min(n,1-n),i=(o,s=(o+e/30)%12)=>n-r*Math.max(Math.min(s-3,9-s,1),-1);return[i(0),i(8),i(4)]}function rj(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 ij(e,t,n){const r=ZL(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 oj(e,t,n,r,i){return e===i?(t-n)/r+(t.5?f/(2-o-s):f/(o+s),l=oj(n,r,i,f,o),l=l*60+.5),[l|0,c||0,a]}function jx(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(ws)}function Bx(e,t,n){return jx(ZL,e,t,n)}function sj(e,t,n){return jx(ij,e,t,n)}function aj(e,t,n){return jx(rj,e,t,n)}function KL(e){return(e%360+360)%360}function lj(e){const t=nj.exec(e);let n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?Wu(+t[5]):ws(+t[5]));const i=KL(+t[2]),o=+t[3]/100,s=+t[4]/100;return t[1]==="hwb"?r=sj(i,o,s):t[1]==="hsv"?r=aj(i,o,s):r=Bx(i,o,s),{r:r[0],g:r[1],b:r[2],a:n}}function cj(e,t){var n=$x(e);n[0]=KL(n[0]+t),n=Bx(n),e.r=n[0],e.g=n[1],e.b=n[2]}function uj(e){if(!e)return;const t=$x(e),n=t[0],r=yO(t[1]),i=yO(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${i}%, ${mo(e.a)})`:`hsl(${n}, ${r}%, ${i}%)`}const _O={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"},bO={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 fj(){const e={},t=Object.keys(bO),n=Object.keys(_O);let r,i,o,s,a;for(r=0;r>16&255,o>>8&255,o&255]}return e}let zh;function dj(e){zh||(zh=fj(),zh.transparent=[0,0,0,0]);const t=zh[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const hj=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function pj(e){const t=hj.exec(e);let n=255,r,i,o;if(t){if(t[7]!==r){const s=+t[7];n=t[8]?Wu(s):cs(s*255,0,255)}return r=+t[1],i=+t[3],o=+t[5],r=255&(t[2]?Wu(r):cs(r,0,255)),i=255&(t[4]?Wu(i):cs(i,0,255)),o=255&(t[6]?Wu(o):cs(o,0,255)),{r,g:i,b:o,a:n}}}function mj(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${mo(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const f0=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,kl=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function gj(e,t,n){const r=kl(mo(e.r)),i=kl(mo(e.g)),o=kl(mo(e.b));return{r:ws(f0(r+n*(kl(mo(t.r))-r))),g:ws(f0(i+n*(kl(mo(t.g))-i))),b:ws(f0(o+n*(kl(mo(t.b))-o))),a:e.a+n*(t.a-e.a)}}function Uh(e,t,n){if(e){let r=$x(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=Bx(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function XL(e,t){return e&&Object.assign(t||{},e)}function wO(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=ws(e[3]))):(t=XL(e,{r:0,g:0,b:0,a:1}),t.a=ws(t.a)),t}function vj(e){return e.charAt(0)==="r"?pj(e):lj(e)}class jf{constructor(t){if(t instanceof jf)return t;const n=typeof t;let r;n==="object"?r=wO(t):n==="string"&&(r=J7(t)||dj(t)||vj(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var t=XL(this._rgb);return t&&(t.a=mo(t.a)),t}set rgb(t){this._rgb=wO(t)}rgbString(){return this._valid?mj(this._rgb):void 0}hexString(){return this._valid?tj(this._rgb):void 0}hslString(){return this._valid?uj(this._rgb):void 0}mix(t,n){if(t){const r=this.rgb,i=t.rgb;let o;const s=n===o?.5:n,a=2*s-1,l=r.a-i.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,r.r=255&c*r.r+o*i.r+.5,r.g=255&c*r.g+o*i.g+.5,r.b=255&c*r.b+o*i.b+.5,r.a=s*r.a+(1-s)*i.a,this.rgb=r}return this}interpolate(t,n){return t&&(this._rgb=gj(this._rgb,t._rgb,n)),this}clone(){return new jf(this.rgb)}alpha(t){return this._rgb.a=ws(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=Ad(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 Uh(this._rgb,2,t),this}darken(t){return Uh(this._rgb,2,-t),this}saturate(t){return Uh(this._rgb,1,t),this}desaturate(t){return Uh(this._rgb,1,-t),this}rotate(t){return cj(this._rgb,t),this}}/*! * Chart.js v4.1.1 * https://www.chartjs.org * (c) 2022 Chart.js Contributors * Released under the MIT License - */function uo(){}const fj=(()=>{let e=0;return()=>e++})();function ct(e){return e===null||typeof e>"u"}function Rt(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 ot(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function Zt(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Pr(e,t){return Zt(e)?e:t}function Qe(e,t){return typeof e>"u"?t:e}const dj=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,ZL=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function Tt(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function yt(e,t,n,r){let i,o,s;if(Rt(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 mj(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 gj(e){const t=mj(e);return n=>{for(const r of t){if(r==="")break;n=n&&n[r]}return n}}function Is(e,t){return(bO[t]||(bO[t]=gj(t)))(e)}function Fx(e){return e.charAt(0).toUpperCase()+e.slice(1)}const ei=e=>typeof e<"u",Fs=e=>typeof e=="function",wO=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function vj(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const jt=Math.PI,Nt=2*jt,yj=Nt+jt,lg=Number.POSITIVE_INFINITY,_j=jt/180,Kt=jt/2,ma=jt/4,xO=jt*2/3,cs=Math.log10,Zi=Math.sign;function af(e,t,n){return Math.abs(e-t)i-o).pop(),t}function Cc(e){return!isNaN(parseFloat(e))&&isFinite(e)}function wj(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function XL(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 jx(e,t,n){n=n||(s=>e[s]1;)o=i+r>>1,n(o)?i=o:r=o;return{lo:i,hi:r}}const wo=(e,t,n,r)=>jx(e,n,r?i=>{const o=e[i][t];return oe[i][t]jx(e,n,r=>e[r][t]>=n);function Ej(e,t,n){let r=0,i=e.length;for(;rr&&e[i-1]>n;)i--;return r>0||i{const r="_onData"+Fx(n),i=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...o){const s=i.apply(this,o);return e._chartjs.listeners.forEach(a=>{typeof a[r]=="function"&&a[r](...o)}),s}})})}function EO(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)&&(JL.forEach(o=>{delete e[o]}),delete e._chartjs)}function eD(e){const t=new Set;let n,r;for(n=0,r=e.length;n"u"?function(e){return e()}:window.requestAnimationFrame}();function nD(e,t){let n=[],r=!1;return function(...i){n=i,r||(r=!0,tD.call(window,()=>{r=!1,e.apply(t,n)}))}}function Oj(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}const Bx=e=>e==="start"?"left":e==="end"?"right":"center",Xn=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,Pj=(e,t,n,r)=>e===(r?"left":"right")?n:e==="center"?(t+n)/2:t;function rD(e,t,n){const r=t.length;let i=0,o=r;if(e._sorted){const{iScale:s,_parsed:a}=e,l=s.axis,{min:c,max:f,minDefined:h,maxDefined:p}=s.getUserBounds();h&&(i=Tn(Math.min(wo(a,s.axis,c).lo,n?r:wo(t,l,s.getPixelForValue(c)).lo),0,r-1)),p?o=Tn(Math.max(wo(a,s.axis,f,!0).hi+1,n?0:wo(t,l,s.getPixelForValue(f),!0).hi+1),i,r)-i:o=r-i}return{start:i,count:o}}function iD(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 Vh=e=>e===0||e===1,TO=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*Nt/n)),OO=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*Nt/n)+1,lf={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*Kt)+1,easeOutSine:e=>Math.sin(e*Kt),easeInOutSine:e=>-.5*(Math.cos(jt*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=>Vh(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=>Vh(e)?e:TO(e,.075,.3),easeOutElastic:e=>Vh(e)?e:OO(e,.075,.3),easeInOutElastic(e){return Vh(e)?e:e<.5?.5*TO(e*2,.1125,.45):.5+.5*OO(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-lf.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?lf.easeInBounce(e*2)*.5:lf.easeOutBounce(e*2-1)*.5+.5};function oD(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function PO(e){return oD(e)?e:new $f(e)}function u0(e){return oD(e)?e:new $f(e).saturate(.5).darken(.1).hexString()}const kj=["x","y","borderWidth","radius","tension"],Mj=["color","borderColor","backgroundColor"];function Rj(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:Mj},numbers:{type:"number",properties:kj}}),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 Nj(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const kO=new Map;function Lj(e,t){t=t||{};const n=e+JSON.stringify(t);let r=kO.get(n);return r||(r=new Intl.NumberFormat(e,t),kO.set(n,r)),r}function Id(e,t,n){return Lj(t,n).format(e)}const sD={values(e){return Rt(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=Dj(e,n)}const s=cs(Math.abs(o)),a=Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:i,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),Id(e,r,l)},logarithmic(e,t,n){if(e===0)return"0";const r=n[t].significand||e/Math.pow(10,Math.floor(cs(e)));return[1,2,3,5,10,15].includes(r)||t>.8*n.length?sD.numeric.call(this,e,t,n):""}};function Dj(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 ly={formatters:sD};function Aj(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:ly.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 qa=Object.create(null),t1=Object.create(null);function cf(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)=>u0(i.backgroundColor),this.hoverBorderColor=(r,i)=>u0(i.borderColor),this.hoverColor=(r,i)=>u0(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 f0(this,t,n)}get(t){return cf(this,t)}describe(t,n){return f0(t1,t,n)}override(t,n){return f0(qa,t,n)}route(t,n,r,i){const o=cf(this,t),s=cf(this,r),a="_"+n;Object.defineProperties(o,{[a]:{value:o[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[a],c=s[i];return ot(l)?Object.assign({},c,l):Qe(l,c)},set(l){this[a]=l}}})}apply(t){t.forEach(n=>n(this))}}var rn=new Ij({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Rj,Nj,Aj]);function Fj(e){return!e||ct(e.size)||ct(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function cg(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 $j(e,t,n,r){r=r||{};let i=r.data=r.data||{},o=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(i=r.data={},o=r.garbageCollect=[],r.font=t),e.save(),e.font=t;let s=0;const a=n.length;let l,c,f,h,p;for(l=0;ln.length){for(l=0;l0&&e.stroke()}}function zf(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,zj(e,o),l=0;l+e||0;function zx(e,t){const n={},r=ot(t),i=r?Object.keys(t):t,o=ot(e)?r?s=>Qe(e[s],e[t[s]]):s=>e[s]:()=>e;for(const s of i)n[s]=qj(o(s));return n}function lD(e){return zx(e,{top:"y",right:"x",bottom:"y",left:"x"})}function $a(e){return zx(e,["topLeft","topRight","bottomLeft","bottomRight"])}function tr(e){const t=lD(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function vn(e,t){e=e||{},t=t||rn.font;let n=Qe(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let r=Qe(e.style,t.style);r&&!(""+r).match(Wj)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:Qe(e.family,t.family),lineHeight:Yj(Qe(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:Qe(e.weight,t.weight),string:""};return i.string=Fj(i),i}function Hu(e,t,n,r){let i=!0,o,s,a;for(o=0,s=e.length;on&&a===0?0:a+l;return{min:s(r,-Math.abs(o)),max:s(i,o)}}function Zs(e,t){return Object.assign(Object.create(e),t)}function Ux(e,t=[""],n=e,r,i=()=>e[0]){ei(r)||(r=dD("_fallback",e));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:n,_fallback:r,_getTarget:i,override:s=>Ux([s,...e],t,n,r)};return new Proxy(o,{deleteProperty(s,a){return delete s[a],delete s._keys,delete e[0][a],!0},get(s,a){return uD(s,a,()=>nB(a,t,e,s))},getOwnPropertyDescriptor(s,a){return Reflect.getOwnPropertyDescriptor(s._scopes[0],a)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(s,a){return NO(s).includes(a)},ownKeys(s){return NO(s)},set(s,a,l){const c=s._storage||(s._storage=i());return s[a]=c[a]=l,delete s._keys,!0}})}function Ec(e,t,n,r){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:cD(e,r),setContext:o=>Ec(e,o,n,r),override:o=>Ec(e.override(o),t,n,r)};return new Proxy(i,{deleteProperty(o,s){return delete o[s],delete e[s],!0},get(o,s,a){return uD(o,s,()=>Kj(o,s,a))},getOwnPropertyDescriptor(o,s){return o._descriptors.allKeys?Reflect.has(e,s)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,s)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(o,s){return Reflect.has(e,s)},ownKeys(){return Reflect.ownKeys(e)},set(o,s,a){return e[s]=a,delete o[s],!0}})}function cD(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 Zj=(e,t)=>e?e+Fx(t):t,Vx=(e,t)=>ot(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function uD(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t))return e[t];const r=n();return e[t]=r,r}function Kj(e,t,n){const{_proxy:r,_context:i,_subProxy:o,_descriptors:s}=e;let a=r[t];return Fs(a)&&s.isScriptable(t)&&(a=Xj(t,a,e,n)),Rt(a)&&a.length&&(a=Qj(t,a,e,s.isIndexable)),Vx(t,a)&&(a=Ec(a,i,o&&o[t],s)),a}function Xj(e,t,n,r){const{_proxy:i,_context:o,_subProxy:s,_stack:a}=n;if(a.has(e))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+e);return a.add(e),t=t(o,s||r),a.delete(e),Vx(e,t)&&(t=Hx(i._scopes,i,e,t)),t}function Qj(e,t,n,r){const{_proxy:i,_context:o,_subProxy:s,_descriptors:a}=n;if(ei(o.index)&&r(e))t=t[o.index%t.length];else if(ot(t[0])){const l=t,c=i._scopes.filter(f=>f!==l);t=[];for(const f of l){const h=Hx(c,i,e,f);t.push(Ec(h,o,s&&s[e],a))}}return t}function fD(e,t,n){return Fs(e)?e(t,n):e}const Jj=(e,t)=>e===!0?t:typeof e=="string"?Is(t,e):void 0;function eB(e,t,n,r,i){for(const o of t){const s=Jj(n,o);if(s){e.add(s);const a=fD(s._fallback,n,i);if(ei(a)&&a!==n&&a!==r)return a}else if(s===!1&&ei(r)&&n!==r)return null}return!1}function Hx(e,t,n,r){const i=t._rootScopes,o=fD(t._fallback,n,r),s=[...e,...i],a=new Set;a.add(r);let l=RO(a,s,n,o||n,r);return l===null||ei(o)&&o!==n&&(l=RO(a,s,o,l,r),l===null)?!1:Ux(Array.from(a),[""],i,o,()=>tB(t,n,r))}function RO(e,t,n,r,i){for(;n;)n=eB(e,t,n,r,i);return n}function tB(e,t,n){const r=e._getTarget();t in r||(r[t]={});const i=r[t];return Rt(i)&&ot(n)?n:i||{}}function nB(e,t,n,r){let i;for(const o of t)if(i=dD(Zj(o,e),n),ei(i))return Vx(e,i)?Hx(n,r,e,i):i}function dD(e,t){for(const n of t){if(!n)continue;const r=n[e];if(ei(r))return r}}function NO(e){let t=e._keys;return t||(t=e._keys=rB(e._scopes)),t}function rB(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 hD(e,t,n,r){const{iScale:i}=e,{key:o="r"}=this._parsing,s=new Array(r);let a,l,c,f;for(a=0,l=r;ate==="x"?"y":"x";function oB(e,t,n,r){const i=e.skip?t:e,o=t,s=n.skip?t:n,a=e1(o,i),l=e1(s,o);let c=a/(a+l),f=l/(a+l);c=isNaN(c)?0:c,f=isNaN(f)?0:f;const h=r*c,p=r*f;return{previous:{x:o.x-h*(s.x-i.x),y:o.y-h*(s.y-i.y)},next:{x:o.x+p*(s.x-i.x),y:o.y+p*(s.y-i.y)}}}function sB(e,t,n){const r=e.length;let i,o,s,a,l,c=Tc(e,0);for(let f=0;f!c.skip)),t.cubicInterpolationMode==="monotone")lB(e,i);else{let c=r?e[e.length-1]:e[0];for(o=0,s=e.length;oe.ownerDocument.defaultView.getComputedStyle(e,null);function fB(e,t){return fy(e).getPropertyValue(t)}const dB=["top","right","bottom","left"];function ja(e,t,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const o=dB[i];r[o]=parseFloat(e[t+"-"+o+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const hB=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function pB(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:o}=r;let s=!1,a,l;if(hB(i,o,e.target))a=i,l=o;else{const c=t.getBoundingClientRect();a=r.clientX-c.left,l=r.clientY-c.top,s=!0}return{x:a,y:l,box:s}}function Sa(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,i=fy(n),o=i.boxSizing==="border-box",s=ja(i,"padding"),a=ja(i,"border","width"),{x:l,y:c,box:f}=pB(e,n),h=s.left+(f&&a.left),p=s.top+(f&&a.top);let{width:m,height:g}=t;return o&&(m-=s.width+a.width,g-=s.height+a.height),{x:Math.round((l-h)/m*n.width/r),y:Math.round((c-p)/g*n.height/r)}}function mB(e,t,n){let r,i;if(t===void 0||n===void 0){const o=Wx(e);if(!o)t=e.clientWidth,n=e.clientHeight;else{const s=o.getBoundingClientRect(),a=fy(o),l=ja(a,"border","width"),c=ja(a,"padding");t=s.width-c.width-l.width,n=s.height-c.height-l.height,r=ug(a.maxWidth,o,"clientWidth"),i=ug(a.maxHeight,o,"clientHeight")}}return{width:t,height:n,maxWidth:r||lg,maxHeight:i||lg}}const Wh=e=>Math.round(e*10)/10;function gB(e,t,n,r){const i=fy(e),o=ja(i,"margin"),s=ug(i.maxWidth,e,"clientWidth")||lg,a=ug(i.maxHeight,e,"clientHeight")||lg,l=mB(e,t,n);let{width:c,height:f}=l;if(i.boxSizing==="content-box"){const p=ja(i,"border","width"),m=ja(i,"padding");c-=m.width+p.width,f-=m.height+p.height}return c=Math.max(0,c-o.width),f=Math.max(0,r?c/r:f-o.height),c=Wh(Math.min(c,s,l.maxWidth)),f=Wh(Math.min(f,a,l.maxHeight)),c&&!f&&(f=Wh(c/2)),(t!==void 0||n!==void 0)&&r&&l.height&&f>l.height&&(f=l.height,c=Wh(Math.floor(f*r))),{width:c,height:f}}function LO(e,t,n){const r=t||1,i=Math.floor(e.height*r),o=Math.floor(e.width*r);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const s=e.canvas;return s.style&&(n||!s.style.height&&!s.style.width)&&(s.style.height=`${e.height}px`,s.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||s.height!==i||s.width!==o?(e.currentDevicePixelRatio=r,s.height=i,s.width=o,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}const vB=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 DO(e,t){const n=fB(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function Ca(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function yB(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 _B(e,t,n,r){const i={x:e.cp2x,y:e.cp2y},o={x:t.cp1x,y:t.cp1y},s=Ca(e,i,n),a=Ca(i,o,n),l=Ca(o,t,n),c=Ca(s,a,n),f=Ca(a,l,n);return Ca(c,f,n)}const bB=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}}},wB=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function lc(e,t,n){return e?bB(t,n):wB()}function gD(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 vD(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function yD(e){return e==="angle"?{between:Bf,compare:xj,normalize:Mr}:{between:bo,compare:(t,n)=>t-n,normalize:t=>t}}function AO({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 xB(e,t,n){const{property:r,start:i,end:o}=n,{between:s,normalize:a}=yD(r),l=t.length;let{start:c,end:f,loop:h}=e,p,m;if(h){for(c+=l,f+=l,p=0,m=l;pl(i,x,y)&&a(i,x)!==0,P=()=>a(o,y)===0||l(o,x,y),k=()=>v||T(),N=()=>!v||P();for(let D=f,z=f;D<=h;++D)b=t[D%s],!b.skip&&(y=c(b[r]),y!==x&&(v=l(y,i,o),w===null&&k()&&(w=a(y,i)===0?D:z),w!==null&&N()&&(g.push(AO({start:w,end:D,loop:p,count:s,style:m})),w=null),z=D,x=y));return w!==null&&g.push(AO({start:w,end:h,loop:p,count:s,style:m})),g}function bD(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 CB(e,t,n,r){const i=e.length,o=[];let s=t,a=e[t],l;for(l=t+1;l<=n;++l){const c=e[l%i];c.skip||c.stop?a.skip||(r=!1,o.push({start:t%i,end:(l-1)%i,loop:r}),t=s=c.stop?l:null):(s=l,a.skip&&(t=l)),a=c}return s!==null&&o.push({start:t%i,end:s%i,loop:r}),o}function EB(e,t){const n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];const o=!!e._loop,{start:s,end:a}=SB(n,i,o,r);if(r===!0)return IO(e,[{start:s,end:a,loop:o}],n,t);const l=a{let e=0;return()=>e++})();function ct(e){return e===null||typeof e>"u"}function Rt(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 ot(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function Zt(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Pr(e,t){return Zt(e)?e:t}function Qe(e,t){return typeof e>"u"?t:e}const _j=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,QL=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function Tt(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function vt(e,t,n,r){let i,o,s;if(Rt(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 xj(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 Sj(e){const t=xj(e);return n=>{for(const r of t){if(r==="")break;n=n&&n[r]}return n}}function Is(e,t){return(xO[t]||(xO[t]=Sj(t)))(e)}function zx(e){return e.charAt(0).toUpperCase()+e.slice(1)}const ei=e=>typeof e<"u",Fs=e=>typeof e=="function",SO=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function Cj(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const jt=Math.PI,Nt=2*jt,Ej=Nt+jt,cg=Number.POSITIVE_INFINITY,Tj=jt/180,Kt=jt/2,ma=jt/4,CO=jt*2/3,us=Math.log10,Zi=Math.sign;function lf(e,t,n){return Math.abs(e-t)i-o).pop(),t}function Ec(e){return!isNaN(parseFloat(e))&&isFinite(e)}function Pj(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function eD(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 Vx(e,t,n){n=n||(s=>e[s]1;)o=i+r>>1,n(o)?i=o:r=o;return{lo:i,hi:r}}const wo=(e,t,n,r)=>Vx(e,n,r?i=>{const o=e[i][t];return oe[i][t]Vx(e,n,r=>e[r][t]>=n);function Nj(e,t,n){let r=0,i=e.length;for(;rr&&e[i-1]>n;)i--;return r>0||i{const r="_onData"+zx(n),i=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...o){const s=i.apply(this,o);return e._chartjs.listeners.forEach(a=>{typeof a[r]=="function"&&a[r](...o)}),s}})})}function OO(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)&&(nD.forEach(o=>{delete e[o]}),delete e._chartjs)}function rD(e){const t=new Set;let n,r;for(n=0,r=e.length;n"u"?function(e){return e()}:window.requestAnimationFrame}();function oD(e,t){let n=[],r=!1;return function(...i){n=i,r||(r=!0,iD.call(window,()=>{r=!1,e.apply(t,n)}))}}function Dj(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}const Hx=e=>e==="start"?"left":e==="end"?"right":"center",Kn=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,Aj=(e,t,n,r)=>e===(r?"left":"right")?n:e==="center"?(t+n)/2:t;function sD(e,t,n){const r=t.length;let i=0,o=r;if(e._sorted){const{iScale:s,_parsed:a}=e,l=s.axis,{min:c,max:f,minDefined:h,maxDefined:p}=s.getUserBounds();h&&(i=Tn(Math.min(wo(a,s.axis,c).lo,n?r:wo(t,l,s.getPixelForValue(c)).lo),0,r-1)),p?o=Tn(Math.max(wo(a,s.axis,f,!0).hi+1,n?0:wo(t,l,s.getPixelForValue(f),!0).hi+1),i,r)-i:o=r-i}return{start:i,count:o}}function aD(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 Vh=e=>e===0||e===1,PO=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*Nt/n)),kO=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*Nt/n)+1,cf={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*Kt)+1,easeOutSine:e=>Math.sin(e*Kt),easeInOutSine:e=>-.5*(Math.cos(jt*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=>Vh(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=>Vh(e)?e:PO(e,.075,.3),easeOutElastic:e=>Vh(e)?e:kO(e,.075,.3),easeInOutElastic(e){return Vh(e)?e:e<.5?.5*PO(e*2,.1125,.45):.5+.5*kO(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-cf.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?cf.easeInBounce(e*2)*.5:cf.easeOutBounce(e*2-1)*.5+.5};function lD(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function MO(e){return lD(e)?e:new jf(e)}function d0(e){return lD(e)?e:new jf(e).saturate(.5).darken(.1).hexString()}const Ij=["x","y","borderWidth","radius","tension"],Fj=["color","borderColor","backgroundColor"];function $j(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:Fj},numbers:{type:"number",properties:Ij}}),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 jj(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const RO=new Map;function Bj(e,t){t=t||{};const n=e+JSON.stringify(t);let r=RO.get(n);return r||(r=new Intl.NumberFormat(e,t),RO.set(n,r)),r}function Id(e,t,n){return Bj(t,n).format(e)}const cD={values(e){return Rt(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=zj(e,n)}const s=us(Math.abs(o)),a=Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:i,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),Id(e,r,l)},logarithmic(e,t,n){if(e===0)return"0";const r=n[t].significand||e/Math.pow(10,Math.floor(us(e)));return[1,2,3,5,10,15].includes(r)||t>.8*n.length?cD.numeric.call(this,e,t,n):""}};function zj(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 uy={formatters:cD};function Uj(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:uy.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 qa=Object.create(null),r1=Object.create(null);function uf(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)=>d0(i.backgroundColor),this.hoverBorderColor=(r,i)=>d0(i.borderColor),this.hoverColor=(r,i)=>d0(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 h0(this,t,n)}get(t){return uf(this,t)}describe(t,n){return h0(r1,t,n)}override(t,n){return h0(qa,t,n)}route(t,n,r,i){const o=uf(this,t),s=uf(this,r),a="_"+n;Object.defineProperties(o,{[a]:{value:o[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[a],c=s[i];return ot(l)?Object.assign({},c,l):Qe(l,c)},set(l){this[a]=l}}})}apply(t){t.forEach(n=>n(this))}}var rn=new Vj({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[$j,jj,Uj]);function Hj(e){return!e||ct(e.size)||ct(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function ug(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 Wj(e,t,n,r){r=r||{};let i=r.data=r.data||{},o=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(i=r.data={},o=r.garbageCollect=[],r.font=t),e.save(),e.font=t;let s=0;const a=n.length;let l,c,f,h,p;for(l=0;ln.length){for(l=0;l0&&e.stroke()}}function Uf(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,Gj(e,o),l=0;l+e||0;function Wx(e,t){const n={},r=ot(t),i=r?Object.keys(t):t,o=ot(e)?r?s=>Qe(e[s],e[t[s]]):s=>e[s]:()=>e;for(const s of i)n[s]=eB(o(s));return n}function fD(e){return Wx(e,{top:"y",right:"x",bottom:"y",left:"x"})}function $a(e){return Wx(e,["topLeft","topRight","bottomLeft","bottomRight"])}function tr(e){const t=fD(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function vn(e,t){e=e||{},t=t||rn.font;let n=Qe(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let r=Qe(e.style,t.style);r&&!(""+r).match(Qj)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:Qe(e.family,t.family),lineHeight:Jj(Qe(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:Qe(e.weight,t.weight),string:""};return i.string=Hj(i),i}function Yu(e,t,n,r){let i=!0,o,s,a;for(o=0,s=e.length;on&&a===0?0:a+l;return{min:s(r,-Math.abs(o)),max:s(i,o)}}function Zs(e,t){return Object.assign(Object.create(e),t)}function Yx(e,t=[""],n=e,r,i=()=>e[0]){ei(r)||(r=mD("_fallback",e));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:n,_fallback:r,_getTarget:i,override:s=>Yx([s,...e],t,n,r)};return new Proxy(o,{deleteProperty(s,a){return delete s[a],delete s._keys,delete e[0][a],!0},get(s,a){return hD(s,a,()=>cB(a,t,e,s))},getOwnPropertyDescriptor(s,a){return Reflect.getOwnPropertyDescriptor(s._scopes[0],a)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(s,a){return DO(s).includes(a)},ownKeys(s){return DO(s)},set(s,a,l){const c=s._storage||(s._storage=i());return s[a]=c[a]=l,delete s._keys,!0}})}function Tc(e,t,n,r){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:dD(e,r),setContext:o=>Tc(e,o,n,r),override:o=>Tc(e.override(o),t,n,r)};return new Proxy(i,{deleteProperty(o,s){return delete o[s],delete e[s],!0},get(o,s,a){return hD(o,s,()=>rB(o,s,a))},getOwnPropertyDescriptor(o,s){return o._descriptors.allKeys?Reflect.has(e,s)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,s)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(o,s){return Reflect.has(e,s)},ownKeys(){return Reflect.ownKeys(e)},set(o,s,a){return e[s]=a,delete o[s],!0}})}function dD(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 nB=(e,t)=>e?e+zx(t):t,qx=(e,t)=>ot(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function hD(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t))return e[t];const r=n();return e[t]=r,r}function rB(e,t,n){const{_proxy:r,_context:i,_subProxy:o,_descriptors:s}=e;let a=r[t];return Fs(a)&&s.isScriptable(t)&&(a=iB(t,a,e,n)),Rt(a)&&a.length&&(a=oB(t,a,e,s.isIndexable)),qx(t,a)&&(a=Tc(a,i,o&&o[t],s)),a}function iB(e,t,n,r){const{_proxy:i,_context:o,_subProxy:s,_stack:a}=n;if(a.has(e))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+e);return a.add(e),t=t(o,s||r),a.delete(e),qx(e,t)&&(t=Gx(i._scopes,i,e,t)),t}function oB(e,t,n,r){const{_proxy:i,_context:o,_subProxy:s,_descriptors:a}=n;if(ei(o.index)&&r(e))t=t[o.index%t.length];else if(ot(t[0])){const l=t,c=i._scopes.filter(f=>f!==l);t=[];for(const f of l){const h=Gx(c,i,e,f);t.push(Tc(h,o,s&&s[e],a))}}return t}function pD(e,t,n){return Fs(e)?e(t,n):e}const sB=(e,t)=>e===!0?t:typeof e=="string"?Is(t,e):void 0;function aB(e,t,n,r,i){for(const o of t){const s=sB(n,o);if(s){e.add(s);const a=pD(s._fallback,n,i);if(ei(a)&&a!==n&&a!==r)return a}else if(s===!1&&ei(r)&&n!==r)return null}return!1}function Gx(e,t,n,r){const i=t._rootScopes,o=pD(t._fallback,n,r),s=[...e,...i],a=new Set;a.add(r);let l=LO(a,s,n,o||n,r);return l===null||ei(o)&&o!==n&&(l=LO(a,s,o,l,r),l===null)?!1:Yx(Array.from(a),[""],i,o,()=>lB(t,n,r))}function LO(e,t,n,r,i){for(;n;)n=aB(e,t,n,r,i);return n}function lB(e,t,n){const r=e._getTarget();t in r||(r[t]={});const i=r[t];return Rt(i)&&ot(n)?n:i||{}}function cB(e,t,n,r){let i;for(const o of t)if(i=mD(nB(o,e),n),ei(i))return qx(e,i)?Gx(n,r,e,i):i}function mD(e,t){for(const n of t){if(!n)continue;const r=n[e];if(ei(r))return r}}function DO(e){let t=e._keys;return t||(t=e._keys=uB(e._scopes)),t}function uB(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 gD(e,t,n,r){const{iScale:i}=e,{key:o="r"}=this._parsing,s=new Array(r);let a,l,c,f;for(a=0,l=r;ate==="x"?"y":"x";function dB(e,t,n,r){const i=e.skip?t:e,o=t,s=n.skip?t:n,a=n1(o,i),l=n1(s,o);let c=a/(a+l),f=l/(a+l);c=isNaN(c)?0:c,f=isNaN(f)?0:f;const h=r*c,p=r*f;return{previous:{x:o.x-h*(s.x-i.x),y:o.y-h*(s.y-i.y)},next:{x:o.x+p*(s.x-i.x),y:o.y+p*(s.y-i.y)}}}function hB(e,t,n){const r=e.length;let i,o,s,a,l,c=Oc(e,0);for(let f=0;f!c.skip)),t.cubicInterpolationMode==="monotone")mB(e,i);else{let c=r?e[e.length-1]:e[0];for(o=0,s=e.length;oe.ownerDocument.defaultView.getComputedStyle(e,null);function yB(e,t){return hy(e).getPropertyValue(t)}const _B=["top","right","bottom","left"];function ja(e,t,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const o=_B[i];r[o]=parseFloat(e[t+"-"+o+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const bB=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function wB(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:o}=r;let s=!1,a,l;if(bB(i,o,e.target))a=i,l=o;else{const c=t.getBoundingClientRect();a=r.clientX-c.left,l=r.clientY-c.top,s=!0}return{x:a,y:l,box:s}}function Sa(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,i=hy(n),o=i.boxSizing==="border-box",s=ja(i,"padding"),a=ja(i,"border","width"),{x:l,y:c,box:f}=wB(e,n),h=s.left+(f&&a.left),p=s.top+(f&&a.top);let{width:m,height:g}=t;return o&&(m-=s.width+a.width,g-=s.height+a.height),{x:Math.round((l-h)/m*n.width/r),y:Math.round((c-p)/g*n.height/r)}}function xB(e,t,n){let r,i;if(t===void 0||n===void 0){const o=Zx(e);if(!o)t=e.clientWidth,n=e.clientHeight;else{const s=o.getBoundingClientRect(),a=hy(o),l=ja(a,"border","width"),c=ja(a,"padding");t=s.width-c.width-l.width,n=s.height-c.height-l.height,r=fg(a.maxWidth,o,"clientWidth"),i=fg(a.maxHeight,o,"clientHeight")}}return{width:t,height:n,maxWidth:r||cg,maxHeight:i||cg}}const Wh=e=>Math.round(e*10)/10;function SB(e,t,n,r){const i=hy(e),o=ja(i,"margin"),s=fg(i.maxWidth,e,"clientWidth")||cg,a=fg(i.maxHeight,e,"clientHeight")||cg,l=xB(e,t,n);let{width:c,height:f}=l;if(i.boxSizing==="content-box"){const p=ja(i,"border","width"),m=ja(i,"padding");c-=m.width+p.width,f-=m.height+p.height}return c=Math.max(0,c-o.width),f=Math.max(0,r?c/r:f-o.height),c=Wh(Math.min(c,s,l.maxWidth)),f=Wh(Math.min(f,a,l.maxHeight)),c&&!f&&(f=Wh(c/2)),(t!==void 0||n!==void 0)&&r&&l.height&&f>l.height&&(f=l.height,c=Wh(Math.floor(f*r))),{width:c,height:f}}function AO(e,t,n){const r=t||1,i=Math.floor(e.height*r),o=Math.floor(e.width*r);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const s=e.canvas;return s.style&&(n||!s.style.height&&!s.style.width)&&(s.style.height=`${e.height}px`,s.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||s.height!==i||s.width!==o?(e.currentDevicePixelRatio=r,s.height=i,s.width=o,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}const CB=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 IO(e,t){const n=yB(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function Ca(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function EB(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 TB(e,t,n,r){const i={x:e.cp2x,y:e.cp2y},o={x:t.cp1x,y:t.cp1y},s=Ca(e,i,n),a=Ca(i,o,n),l=Ca(o,t,n),c=Ca(s,a,n),f=Ca(a,l,n);return Ca(c,f,n)}const OB=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,r){return n-r},leftForLtr(n,r){return n-r}}},PB=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function cc(e,t,n){return e?OB(t,n):PB()}function _D(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 bD(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function wD(e){return e==="angle"?{between:zf,compare:kj,normalize:Mr}:{between:bo,compare:(t,n)=>t-n,normalize:t=>t}}function FO({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 kB(e,t,n){const{property:r,start:i,end:o}=n,{between:s,normalize:a}=wD(r),l=t.length;let{start:c,end:f,loop:h}=e,p,m;if(h){for(c+=l,f+=l,p=0,m=l;pl(i,x,y)&&a(i,x)!==0,P=()=>a(o,y)===0||l(o,x,y),k=()=>v||T(),N=()=>!v||P();for(let D=f,z=f;D<=h;++D)b=t[D%s],!b.skip&&(y=c(b[r]),y!==x&&(v=l(y,i,o),w===null&&k()&&(w=a(y,i)===0?D:z),w!==null&&N()&&(g.push(FO({start:w,end:D,loop:p,count:s,style:m})),w=null),z=D,x=y));return w!==null&&g.push(FO({start:w,end:h,loop:p,count:s,style:m})),g}function SD(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 RB(e,t,n,r){const i=e.length,o=[];let s=t,a=e[t],l;for(l=t+1;l<=n;++l){const c=e[l%i];c.skip||c.stop?a.skip||(r=!1,o.push({start:t%i,end:(l-1)%i,loop:r}),t=s=c.stop?l:null):(s=l,a.skip&&(t=l)),a=c}return s!==null&&o.push({start:t%i,end:s%i,loop:r}),o}function NB(e,t){const n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];const o=!!e._loop,{start:s,end:a}=MB(n,i,o,r);if(r===!0)return $O(e,[{start:s,end:a,loop:o}],n,t);const l=aa({chart:t,initial:n.initial,numSteps:s,currentStep:Math.min(r-n.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=tD.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;const o=r.items;let s=o.length-1,a=!1,l;for(;s>=0;--s)l=o[s],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(t),a=!0):(o[s]=o[o.length-1],o.pop());a&&(i.draw(),this._notify(i,r,t,"progress")),o.length||(r.running=!1,this._notify(i,r,t,"complete"),r.initial=!1),n+=o.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let r=n.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,r)),r}listen(t,n,r){this._getAnims(t).listeners[n].push(r)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,i)=>Math.max(r,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const r=n.items;let i=r.length-1;for(;i>=0;--i)r[i].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var fo=new PB;const $O="transparent",kB={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=PO(e||$O),i=r.valid&&PO(t||$O);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class MB{constructor(t,n,r,i){const o=n[r];i=Hu([t.to,i,o,t.from]);const s=Hu([t.from,o,i]);this._active=!0,this._fn=t.fn||kB[t.type||typeof s],this._easing=lf[t.easing]||lf.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=r,this._from=s,this._to=i,this._promises=void 0}active(){return this._active}update(t,n,r){if(this._active){this._notify(!1);const i=this._target[this._prop],o=r-this._start,s=this._duration-o;this._start=r,this._duration=Math.floor(Math.max(s,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=Hu([t.to,n,i,t.from]),this._from=Hu([t.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,r=this._duration,i=this._prop,o=this._from,s=this._loop,a=this._to;let l;if(this._active=o!==a&&(s||n1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(o,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,r)=>{t.push({res:n,rej:r})})}_notify(t){const n=t?"res":"rej",r=this._promises||[];for(let i=0;i{const o=t[i];if(!ot(o))return;const s={};for(const a of n)s[a]=o[a];(Rt(o.properties)&&o.properties||[i]).forEach(a=>{(a===i||!r.has(a))&&r.set(a,s)})})}_animateOptions(t,n){const r=n.options,i=NB(t,r);if(!i)return[];const o=this._createAnimations(i,r);return r.$shared&&RB(t.options.$animations,r).then(()=>{t.options=r},()=>{}),o}_createAnimations(t,n){const r=this._properties,i=[],o=t.$animations||(t.$animations={}),s=Object.keys(n),a=Date.now();let l;for(l=s.length-1;l>=0;--l){const c=s[l];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(t,n));continue}const f=n[c];let h=o[c];const p=r.get(c);if(h)if(p&&h.active()){h.update(p,f,a);continue}else h.cancel();if(!p||!p.duration){t[c]=f;continue}o[c]=h=new MB(p,t,c,f),i.push(h)}return i}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const r=this._createAnimations(t,n);if(r.length)return fo.add(this._chart,r),!0}}function RB(e,t){const n=[],r=Object.keys(t);for(let i=0;i0||!n&&o<0)return i.index}return null}function VO(e,t){const{chart:n,_cachedMeta:r}=e,i=n._stacks||(n._stacks={}),{iScale:o,vScale:s,index:a}=r,l=o.axis,c=s.axis,f=IB(o,s,r),h=t.length;let p;for(let m=0;mn[r].axis===t).shift()}function jB(e,t){return Zs(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function BB(e,t,n){return Zs(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function Su(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 h0=e=>e==="reset"||e==="none",HO=(e,t)=>t?e:Object.assign({},e),zB=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:xD(n,!0),values:null};class xi{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=zO(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&&Su(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(h,p,m,g)=>h==="x"?p:h==="r"?g:m,o=n.xAxisID=Qe(r.xAxisID,d0(t,"x")),s=n.yAxisID=Qe(r.yAxisID,d0(t,"y")),a=n.rAxisID=Qe(r.rAxisID,d0(t,"r")),l=n.indexAxis,c=n.iAxisID=i(l,o,s,a),f=n.vAxisID=i(l,s,o,a);n.xScale=this.getScaleForId(o),n.yScale=this.getScaleForId(s),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(f)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&EO(this._data,this),t._stacked&&Su(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(ot(n))this._data=AB(n);else if(r!==n){if(r){EO(r,this);const i=this._cachedMeta;Su(i),i._parsed=[]}n&&Object.isExtensible(n)&&Tj(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=zO(n.vScale,n),n.stack!==r.stack&&(i=!0,Su(n),n.stack=r.stack),this._resyncElements(t),(i||o!==n._stacked)&&VO(this,n._parsed)}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:r,_data:i}=this,{iScale:o,_stacked:s}=r,a=o.axis;let l=t===0&&n===i.length?!0:r._sorted,c=t>0&&r._parsed[t-1],f,h,p;if(this._parsing===!1)r._parsed=i,r._sorted=!0,p=i;else{Rt(i[t])?p=this.parseArrayData(r,i,t,n):ot(i[t])?p=this.parseObjectData(r,i,t,n):p=this.parsePrimitiveData(r,i,t,n);const m=()=>h[a]===null||c&&h[a]v||h=0;--p)if(!g()){this.updateRangeFromParsed(c,t,m,l);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed,r=[];let i,o,s;for(i=0,o=n.length;i=0&&tthis.getContext(r,i,n),v=c.resolveNamedOptions(p,m,g,h);return v.$shared&&(v.$shared=l,o[s]=Object.freeze(HO(v,l))),v}_resolveAnimations(t,n,r){const i=this.chart,o=this._cachedDataOpts,s=`animation-${n}`,a=o[s];if(a)return a;let l;if(i.options.animation!==!1){const f=this.chart.config,h=f.datasetAnimationScopeKeys(this._type,n),p=f.getOptionScopes(this.getDataset(),h);l=f.createResolver(p,this.getContext(t,r,n))}const c=new wD(i,l&&l.animations);return l&&l._cacheable&&(o[s]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||h0(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),i=this._sharedOptions,o=this.getSharedOptions(r),s=this.includeOptions(n,o)||o!==i;return this.updateSharedOptions(o,n,r),{sharedOptions:o,includeOptions:s}}updateElement(t,n,r,i){h0(i)?Object.assign(t,r):this._resolveAnimations(n,i).update(t,r)}updateSharedOptions(t,n,r){t&&!h0(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,i){t.active=i;const o=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(t,{options:!i&&this.getSharedOptions(o)||o})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,r=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const i=r.length,o=n.length,s=Math.min(o,i);s&&this.parse(0,s),o>i?this._insertElements(i,o-i,t):o{for(c.length+=n,a=c.length-1;a>=s;a--)c[a]=c[a-n]};for(l(o),a=t;ai-o))}return e._cache.$bar}function VB(e){const t=e.iScale,n=UB(t,e.type);let r=t._length,i,o,s,a;const l=()=>{s===32767||s===-32768||(ei(a)&&(r=Math.min(r,Math.abs(s-a)||r)),a=s)};for(i=0,o=n.length;i0?i[e-1]:null,a=eMath.abs(a)&&(l=a,c=s),t[n.axis]=c,t._custom={barStart:l,barEnd:c,start:i,end:o,min:s,max:a}}function SD(e,t,n,r){return Rt(e)?YB(e,t,n,r):t[n.axis]=n.parse(e,r),t}function WO(e,t,n,r){const i=e.iScale,o=e.vScale,s=i.getLabels(),a=i===o,l=[];let c,f,h,p;for(c=n,f=n+r;c=n?1:-1)}function GB(e){let t,n,r,i,o;return e.horizontal?(t=e.base>e.x,n="left",r="right"):(t=e.basel.controller.options.grouped),o=r.options.stacked,s=[],a=l=>{const c=l.controller.getParsed(n),f=c&&c[l.vScale.axis];if(ct(f)||isNaN(f))return!0};for(const l of i)if(!(n!==void 0&&a(l))&&((o===!1||s.indexOf(l.stack)===-1||o===void 0&&l.stack===void 0)&&s.push(l.stack),l.index===t))break;return s.length||s.push(void 0),s}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,n,r){const i=this._getStacks(t,r),o=n!==void 0?i.indexOf(n):-1;return o===-1?i.length-1:o}_getRuler(){const t=this.options,n=this._cachedMeta,r=n.iScale,i=[];let o,s;for(o=0,s=n.data.length;o=0;--r)n=Math.max(n,t[r].size(this.resolveDataElementOptions(r))/2);return n>0&&n}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart.data.labels||[],{xScale:i,yScale:o}=n,s=this.getParsed(t),a=i.getLabelForValue(s.x),l=o.getLabelForValue(s.y),c=s._custom;return{label:r[t]||"",value:"("+a+", "+l+(c?", "+c:"")+")"}}update(t){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,t)}updateElements(t,n,r,i){const o=i==="reset",{iScale:s,vScale:a}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(n,i),f=s.axis,h=a.axis;for(let p=n;pBf(x,a,l,!0)?1:Math.max(T,T*n,P,P*n),g=(x,T,P)=>Bf(x,a,l,!0)?-1:Math.min(T,T*n,P,P*n),v=m(0,c,h),w=m(Kt,f,p),y=g(jt,c,h),b=g(jt+Kt,f,p);r=(v-y)/2,i=(w-b)/2,o=-(v+y)/2,s=-(w+b)/2}return{ratioX:r,ratioY:i,offsetX:o,offsetY:s}}class us extends xi{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(ot(r[t])){const{key:l="value"}=this._parsing;o=c=>+Is(r[c],l)}let s,a;for(s=t,a=t+n;s0&&!isNaN(t)?Nt*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],o=Id(n._parsed[t],r.options.locale);return{label:i[t]||"",value:o}}getMaxBorderWidth(t){let n=0;const r=this.chart;let i,o,s,a,l;if(!t){for(i=0,o=r.data.datasets.length;it!=="spacing",_indexable:t=>t!=="spacing"}),Se(us,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:i}}=t.legend.options;return n.labels.map((o,s)=>{const l=t.getDatasetMeta(0).controller.getStyle(s);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}}});class ff extends xi{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:r,data:i=[],_dataset:o}=n,s=this.chart._animationsDisabled;let{start:a,count:l}=rD(n,i,s);this._drawStart=a,this._drawCount=l,iD(n)&&(a=0,l=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!o._decimated,r.points=i;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(r,void 0,{animated:!s,options:c},t),this.updateElements(i,a,l,t)}updateElements(t,n,r,i){const o=i==="reset",{iScale:s,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:f,includeOptions:h}=this._getSharedOptions(n,i),p=s.axis,m=a.axis,{spanGaps:g,segment:v}=this.options,w=Cc(g)?g:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||o||i==="none",b=n+r,x=t.length;let T=n>0&&this.getParsed(n-1);for(let P=0;P=b){N.skip=!0;continue}const D=this.getParsed(P),z=ct(D[m]),A=N[p]=s.getPixelForValue(D[p],P),Y=N[m]=o||z?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,D,l):D[m],P);N.skip=isNaN(A)||isNaN(Y)||z,N.stop=P>0&&Math.abs(D[p]-T[p])>w,v&&(N.parsed=D,N.raw=c.data[P]),h&&(N.options=f||this.resolveDataElementOptions(P,k.active?"active":i)),y||this.updateElement(k,P,N,i),T=D}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,r=n.options&&n.options.borderWidth||0,i=t.data||[];if(!i.length)return r;const o=i[0].size(this.resolveDataElementOptions(0)),s=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,o,s)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}Se(ff,"id","line"),Se(ff,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),Se(ff,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class df extends xi{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=Id(n._parsed[t].r,r.options.locale);return{label:i[t]||"",value:o}}parseObjectData(t,n,r,i){return hD.bind(this)(t,n,r,i)}update(t){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,t)}getMinMax(){const t=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((r,i)=>{const o=this.getParsed(i).r;!isNaN(o)&&this.chart.getDataVisibility(i)&&(on.max&&(n.max=o))}),n}_updateRadius(){const t=this.chart,n=t.chartArea,r=t.options,i=Math.min(n.right-n.left,n.bottom-n.top),o=Math.max(i/2,0),s=Math.max(r.cutoutPercentage?o/100*r.cutoutPercentage:1,0),a=(o-s)/t.getVisibleDatasetCount();this.outerRadius=o-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(t,n,r,i){const o=i==="reset",s=this.chart,l=s.options.animation,c=this._cachedMeta.rScale,f=c.xCenter,h=c.yCenter,p=c.getIndexAngle(0)-.5*jt;let m=p,g;const v=360/this.countVisibleElements();for(g=0;g{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&n++}),n}_computeAngle(t,n,r){return this.chart.getDataVisibility(t)?_i(this.resolveDataElementOptions(t,n).angle||r):0}}Se(df,"id","polarArea"),Se(df,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),Se(df,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:i}}=t.legend.options;return n.labels.map((o,s)=>{const l=t.getDatasetMeta(0).controller.getStyle(s);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class r1 extends us{}Se(r1,"id","pie"),Se(r1,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class Yp extends xi{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 hD.bind(this)(t,n,r,i)}update(t){const n=this._cachedMeta,r=n.dataset,i=n.data||[],o=n.iScale.getLabels();if(r.points=i,t!=="resize"){const s=this.resolveDatasetElementOptions(t);this.options.showLine||(s.borderWidth=0);const a={_loop:!0,_fullLoop:o.length===i.length,options:s};this.updateElement(r,void 0,a,t)}this.updateElements(i,0,i.length,t)}updateElements(t,n,r,i){const o=this._cachedMeta.rScale,s=i==="reset";for(let a=n;a0&&this.getParsed(n-1);for(let T=n;T0&&Math.abs(k[m]-x[m])>y,w&&(N.parsed=k,N.raw=c.data[T]),p&&(N.options=h||this.resolveDataElementOptions(T,P.active?"active":i)),b||this.updateElement(P,T,N,i),x=k}this.updateSharedOptions(h,i,f)}getMaxOverflow(){const t=this._cachedMeta,n=t.data||[];if(!this.options.showLine){let a=0;for(let l=n.length-1;l>=0;--l)a=Math.max(a,n[l].size(this.resolveDataElementOptions(l))/2);return a>0&&a}const r=t.dataset,i=r.options&&r.options.borderWidth||0;if(!n.length)return i;const o=n[0].size(this.resolveDataElementOptions(0)),s=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,o,s)/2}}Se(qp,"id","scatter"),Se(qp,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),Se(qp,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var JB=Object.freeze({__proto__:null,BarController:uf,BubbleController:Wp,DoughnutController:us,LineController:ff,PolarAreaController:df,PieController:r1,RadarController:Yp,ScatterController:qp});function va(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Yx{static override(t){Object.assign(Yx.prototype,t)}constructor(t){this.options=t||{}}init(){}formats(){return va()}parse(){return va()}format(){return va()}add(){return va()}diff(){return va()}startOf(){return va()}endOf(){return va()}}var e9={_date:Yx};function t9(e,t,n,r){const{controller:i,data:o,_sorted:s}=e,a=i._cachedMeta.iScale;if(a&&t===a.axis&&t!=="r"&&s&&o.length){const l=a._reversePixels?Cj:wo;if(r){if(i._sharedOptions){const c=o[0],f=typeof c.getRange=="function"&&c.getRange(t);if(f){const h=l(o,t,n-f),p=l(o,t,n+f);return{lo:h.lo,hi:p.hi}}}}else return l(o,t,n)}return{lo:0,hi:o.length-1}}function Fd(e,t,n,r,i){const o=e.getSortedVisibleDatasetMetas(),s=n[t];for(let a=0,l=o.length;a{l[s](t[n],i)&&(o.push({element:l,datasetIndex:c,index:f}),a=a||l.inRange(t.x,t.y,i))}),r&&!a?[]:o}var o9={evaluateInteractionItems:Fd,modes:{index(e,t,n,r){const i=Sa(t,e),o=n.axis||"x",s=n.includeInvisible||!1,a=n.intersect?m0(e,i,o,r,s):g0(e,i,o,!1,r,s),l=[];return a.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const f=a[0].index,h=c.data[f];h&&!h.skip&&l.push({element:h,datasetIndex:c.index,index:f})}),l):[]},dataset(e,t,n,r){const i=Sa(t,e),o=n.axis||"xy",s=n.includeInvisible||!1;let a=n.intersect?m0(e,i,o,r,s):g0(e,i,o,!1,r,s);if(a.length>0){const l=a[0].datasetIndex,c=e.getDatasetMeta(l).data;a=[];for(let f=0;fn.pos===t)}function ZO(e,t){return e.filter(n=>CD.indexOf(n.pos)===-1&&n.box.axis===t)}function Eu(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 s9(e){const t=[];let n,r,i,o,s,a;for(n=0,r=(e||[]).length;nc.box.fullSize),!0),r=Eu(Cu(t,"left"),!0),i=Eu(Cu(t,"right")),o=Eu(Cu(t,"top"),!0),s=Eu(Cu(t,"bottom")),a=ZO(t,"x"),l=ZO(t,"y");return{fullSize:n,leftAndTop:r.concat(o),rightAndBottom:i.concat(l).concat(s).concat(a),chartArea:Cu(t,"chartArea"),vertical:r.concat(i).concat(l),horizontal:o.concat(s).concat(a)}}function KO(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function ED(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 u9(e,t,n,r){const{pos:i,box:o}=n,s=e.maxPadding;if(!ot(i)){n.size&&(e[i]-=n.size);const h=r[n.stack]||{size:0,count:1};h.size=Math.max(h.size,n.horizontal?o.height:o.width),n.size=h.size/h.count,e[i]+=n.size}o.getPadding&&ED(s,o.getPadding());const a=Math.max(0,t.outerWidth-KO(s,e,"left","right")),l=Math.max(0,t.outerHeight-KO(s,e,"top","bottom")),c=a!==e.w,f=l!==e.h;return e.w=a,e.h=l,n.horizontal?{same:c,other:f}:{same:f,other:c}}function f9(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 d9(e,t){const n=t.maxPadding;function r(i){const o={left:0,top:0,right:0,bottom:0};return i.forEach(s=>{o[s]=Math.max(t[s],n[s])}),o}return r(e?["left","right"]:["top","bottom"])}function Wu(e,t,n,r){const i=[];let o,s,a,l,c,f;for(o=0,s=e.length,c=0;o{typeof v.beforeLayout=="function"&&v.beforeLayout()});const f=l.reduce((v,w)=>w.box.options&&w.box.options.display===!1?v:v+1,0)||1,h=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:o,availableHeight:s,vBoxMaxWidth:o/2/f,hBoxMaxHeight:s/2}),p=Object.assign({},i);ED(p,tr(r));const m=Object.assign({maxPadding:p,w:o,h:s,x:i.left,y:i.top},i),g=l9(l.concat(c),h);Wu(a.fullSize,m,h,g),Wu(l,m,h,g),Wu(c,m,h,g)&&Wu(l,m,h,g),f9(m),XO(a.leftAndTop,m,h,g),m.x+=m.w,m.y+=m.h,XO(a.rightAndBottom,m,h,g),e.chartArea={left:m.left,top:m.top,right:m.left+m.w,bottom:m.top+m.h,height:m.h,width:m.w},yt(a.chartArea,v=>{const w=v.box;Object.assign(w,e.chartArea),w.update(m.w,m.h,{left:0,top:0,right:0,bottom:0})})}};class TD{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 h9 extends TD{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Gp="$chartjs",p9={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},QO=e=>e===null||e==="";function m9(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[Gp]={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",QO(i)){const o=DO(e,"width");o!==void 0&&(e.width=o)}if(QO(r))if(e.style.height==="")e.height=e.width/(t||2);else{const o=DO(e,"height");o!==void 0&&(e.height=o)}return e}const OD=vB?{passive:!0}:!1;function g9(e,t,n){e.addEventListener(t,n,OD)}function v9(e,t,n){e.canvas.removeEventListener(t,n,OD)}function y9(e,t){const n=p9[e.type]||e.type,{x:r,y:i}=Sa(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:i!==void 0?i:null}}function fg(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function _9(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let s=!1;for(const a of o)s=s||fg(a.addedNodes,r),s=s&&!fg(a.removedNodes,r);s&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function b9(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let s=!1;for(const a of o)s=s||fg(a.removedNodes,r),s=s&&!fg(a.addedNodes,r);s&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const Vf=new Map;let JO=0;function PD(){const e=window.devicePixelRatio;e!==JO&&(JO=e,Vf.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function w9(e,t){Vf.size||window.addEventListener("resize",PD),Vf.set(e,t)}function x9(e){Vf.delete(e),Vf.size||window.removeEventListener("resize",PD)}function S9(e,t,n){const r=e.canvas,i=r&&Wx(r);if(!i)return;const o=nD((a,l)=>{const c=i.clientWidth;n(a,l),c{const l=a[0],c=l.contentRect.width,f=l.contentRect.height;c===0&&f===0||o(c,f)});return s.observe(i),w9(e,o),s}function v0(e,t,n){n&&n.disconnect(),t==="resize"&&x9(e)}function C9(e,t,n){const r=e.canvas,i=nD(o=>{e.ctx!==null&&n(y9(o,e))},e);return g9(r,t,i),i}class E9 extends TD{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(m9(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[Gp])return!1;const r=n[Gp].initial;["height","width"].forEach(o=>{const s=r[o];ct(s)?n.removeAttribute(o):n.setAttribute(o,s)});const i=r.style||{};return Object.keys(i).forEach(o=>{n.style[o]=i[o]}),n.width=n.width,delete n[Gp],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),s={attach:_9,detach:b9,resize:S9}[n]||C9;i[n]=s(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),i=r[n];if(!i)return;({attach:v0,detach:v0,resize:v0}[n]||v9)(t,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,i){return gB(t,n,r,i)}isAttached(t){const n=Wx(t);return!!(n&&n.isConnected)}}function T9(e){return!mD()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?h9:E9}var Up;let Fo=(Up=class{constructor(){Se(this,"active",!1)}tooltipPosition(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}hasValue(){return Cc(this.x)&&Cc(this.y)}getProps(t,n){const r=this.$animations;if(!n||!r)return this;const i={};return t.forEach(o=>{i[o]=r[o]&&r[o].active()?r[o]._to:this[o]}),i}},Se(Up,"defaults",{}),Se(Up,"defaultRoutes"),Up);function O9(e,t){const n=e.options.ticks,r=P9(e),i=Math.min(n.maxTicksLimit||r,r),o=n.major.enabled?M9(t):[],s=o.length,a=o[0],l=o[s-1],c=[];if(s>i)return R9(t,c,o,s/i),c;const f=k9(o,t,i);if(s>0){let h,p;const m=s>1?Math.round((l-a)/(s-1)):null;for(qh(t,c,f,ct(m)?0:a-m,a),h=0,p=s-1;hi)return l}return Math.max(i,1)}function M9(e){const t=[];let n,r;for(n=0,r=e.length;ne==="left"?"right":e==="right"?"left":e,eP=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n;function tP(e,t){const n=[],r=e.length/t,i=e.length;let o=0;for(;os+a)))return l}function A9(e,t){yt(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:Pr(n,Pr(r,n)),max:Pr(r,Pr(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(){Tt(this.options.beforeUpdate,[this])}update(t,n,r){const{beginAtZero:i,grace:o,ticks:s}=this.options,a=s.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Gj(this,o,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a=o||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const f=this._getLabelSizes(),h=f.widest.width,p=f.highest.height,m=Tn(this.chart.width-h,0,this.maxWidth);a=t.offset?this.maxWidth/r:m/(r-1),h+6>a&&(a=m/(r-(t.offset?.5:1)),l=this.maxHeight-Tu(t.grid)-n.padding-nP(t.title,this.chart.options.font),c=Math.sqrt(h*h+p*p),s=$x(Math.min(Math.asin(Tn((f.highest.height+6)/a,-1,1)),Math.asin(Tn(l/c,-1,1))-Math.asin(Tn(p/c,-1,1)))),s=Math.max(i,Math.min(o,s))),this.labelRotation=s}afterCalculateLabelRotation(){Tt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Tt(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:o}}=this,s=this._isVisible(),a=this.isHorizontal();if(s){const l=nP(i,n.options.font);if(a?(t.width=this.maxWidth,t.height=Tu(o)+l):(t.height=this.maxHeight,t.width=Tu(o)+l),r.display&&this.ticks.length){const{first:c,last:f,widest:h,highest:p}=this._getLabelSizes(),m=r.padding*2,g=_i(this.labelRotation),v=Math.cos(g),w=Math.sin(g);if(a){const y=r.mirror?0:w*h.width+v*p.height;t.height=Math.min(this.maxHeight,t.height+y+m)}else{const y=r.mirror?0:v*h.width+w*p.height;t.width=Math.min(this.maxWidth,t.width+y+m)}this._calculatePadding(c,f,w,v)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,r,i){const{ticks:{align:o,padding:s},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const f=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1);let p=0,m=0;l?c?(p=i*t.width,m=r*n.height):(p=r*t.height,m=i*n.width):o==="start"?m=n.width:o==="end"?p=t.width:o!=="inner"&&(p=t.width/2,m=n.width/2),this.paddingLeft=Math.max((p-f+s)*this.width/(this.width-f),0),this.paddingRight=Math.max((m-h+s)*this.width/(this.width-h),0)}else{let f=n.height/2,h=t.height/2;o==="start"?(f=0,h=t.height):o==="end"&&(f=n.height,h=0),this.paddingTop=f+s,this.paddingBottom=h+s}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Tt(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,r;for(n=0,r=t.length;n({width:o[N]||0,height:s[N]||0});return{first:k(0),last:k(n-1),widest:k(T),highest:k(P),widths:o,heights:s}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return Sj(this._alignToPixels?ga(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&ta*i?a/r:l/i:l*i0}_computeGridLineItems(t){const n=this.axis,r=this.chart,i=this.options,{grid:o,position:s,border:a}=i,l=o.offset,c=this.isHorizontal(),h=this.ticks.length+(l?1:0),p=Tu(o),m=[],g=a.setContext(this.getContext()),v=g.display?g.width:0,w=v/2,y=function(oe){return ga(r,oe,v)};let b,x,T,P,k,N,D,z,A,Y,q,ee;if(s==="top")b=y(this.bottom),N=this.bottom-p,z=b-w,Y=y(t.top)+w,ee=t.bottom;else if(s==="bottom")b=y(this.top),Y=t.top,ee=y(t.bottom)-w,N=b+w,z=this.top+p;else if(s==="left")b=y(this.right),k=this.right-p,D=b-w,A=y(t.left)+w,q=t.right;else if(s==="right")b=y(this.left),A=t.left,q=y(t.right)-w,k=b+w,D=this.left+p;else if(n==="x"){if(s==="center")b=y((t.top+t.bottom)/2+.5);else if(ot(s)){const oe=Object.keys(s)[0],se=s[oe];b=y(this.chart.scales[oe].getPixelForValue(se))}Y=t.top,ee=t.bottom,N=b+w,z=N+p}else if(n==="y"){if(s==="center")b=y((t.left+t.right)/2);else if(ot(s)){const oe=Object.keys(s)[0],se=s[oe];b=y(this.chart.scales[oe].getPixelForValue(se))}k=b-w,D=k-p,A=t.left,q=t.right}const K=Qe(i.ticks.maxTicksLimit,h),te=Math.max(1,Math.ceil(h/K));for(x=0;xo.value===t);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const n=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,s;const a=(l,c,f)=>{!f.width||!f.color||(r.save(),r.lineWidth=f.width,r.strokeStyle=f.color,r.setLineDash(f.borderDash||[]),r.lineDashOffset=f.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(c.x,c.y),r.stroke(),r.restore())};if(n.display)for(o=0,s=i.length;o{this.draw(o)}}]:[{z:r,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let o,s;for(o=0,s=n.length;o{const r=n.split("."),i=r.pop(),o=[e].concat(r).join("."),s=t[n].split("."),a=s.pop(),l=s.join(".");rn.route(o,i,l,a)})}function U9(e){return"id"in e&&"defaults"in e}class V9{constructor(){this.controllers=new Gh(xi,"datasets",!0),this.elements=new Gh(Fo,"elements"),this.plugins=new Gh(Object,"plugins"),this.scales=new Gh(fl,"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):yt(i,s=>{const a=r||this._getRegistryForType(s);this._exec(t,a,s)})})}_exec(t,n,r){const i=Fx(t);Tt(r["before"+i],[],r),n[t](r),Tt(r["after"+i],[],r)}_getRegistryForType(t){for(let n=0;no.filter(a=>!s.some(l=>a.plugin.id===l.plugin.id));this._notify(i(n,r),t,"stop"),this._notify(i(r,n),t,"start")}}function W9(e){const t={},n=[],r=Object.keys(zi.plugins.items);for(let o=0;o1&&dg(e[0].toLowerCase(),t),e))return e;throw new Error(`Cannot determine type of '${name}' axis. Please provide 'axis' or 'position' option.`)}function Q9(e,t){const n=qa[e.type]||{scales:{}},r=t.scales||{},i=i1(e.type,t),o=Object.create(null);return Object.keys(r).forEach(s=>{const a=r[s];if(!ot(a))return console.error(`Invalid scale configuration for scale: ${s}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${s}`);const l=dg(s,a),c=K9(l,i),f=n.scales||{};o[s]=sf(Object.create(null),[{axis:l},a,f[l],f[c]])}),e.data.datasets.forEach(s=>{const a=s.type||e.type,l=s.indexAxis||i1(a,t),f=(qa[a]||{}).scales||{};Object.keys(f).forEach(h=>{const p=Z9(h,l),m=s[p+"AxisID"]||p;o[m]=o[m]||Object.create(null),sf(o[m],[{axis:p},r[m],f[h]])})}),Object.keys(o).forEach(s=>{const a=o[s];sf(a,[rn.scales[a.type],rn.scale])}),o}function kD(e){const t=e.options||(e.options={});t.plugins=Qe(t.plugins,{}),t.scales=Q9(e,t)}function MD(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function J9(e){return e=e||{},e.data=MD(e.data),kD(e),e}const rP=new Map,RD=new Set;function Zh(e,t){let n=rP.get(e);return n||(n=t(),rP.set(e,n),RD.add(n)),n}const Ou=(e,t,n)=>{const r=Is(t,n);r!==void 0&&e.add(r)};class ez{constructor(t){this._config=J9(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=MD(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(),kD(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Zh(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return Zh(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return Zh(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return Zh(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const r=this._scopeCache;let i=r.get(t);return(!i||n)&&(i=new Map,r.set(t,i)),i}getOptionScopes(t,n,r){const{options:i,type:o}=this,s=this._cachedScopes(t,r),a=s.get(n);if(a)return a;const l=new Set;n.forEach(f=>{t&&(l.add(t),f.forEach(h=>Ou(l,t,h))),f.forEach(h=>Ou(l,i,h)),f.forEach(h=>Ou(l,qa[o]||{},h)),f.forEach(h=>Ou(l,rn,h)),f.forEach(h=>Ou(l,t1,h))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),RD.has(n)&&s.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,qa[n]||{},rn.datasets[n]||{},{type:n},rn,t1]}resolveNamedOptions(t,n,r,i=[""]){const o={$shared:!0},{resolver:s,subPrefixes:a}=iP(this._resolverCache,t,i);let l=s;if(nz(s,n)){o.$shared=!1,r=Fs(r)?r():r;const c=this.createResolver(t,r,a);l=Ec(s,r,c)}for(const c of n)o[c]=l[c];return o}createResolver(t,n,r=[""],i){const{resolver:o}=iP(this._resolverCache,t,r);return ot(n)?Ec(o,n,void 0,i):o}}function iP(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:Ux(t,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},r.set(i,o)),o}const tz=e=>ot(e)&&Object.getOwnPropertyNames(e).reduce((t,n)=>t||Fs(e[n]),!1);function nz(e,t){const{isScriptable:n,isIndexable:r}=cD(e);for(const i of t){const o=n(i),s=r(i),a=(s||o)&&e[i];if(o&&(Fs(a)||tz(a))||s&&Rt(a))return!0}return!1}var rz="4.1.1";const iz=["top","bottom","left","right","chartArea"];function oP(e,t){return e==="top"||e==="bottom"||iz.indexOf(e)===-1&&t==="x"}function sP(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function aP(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),Tt(n&&n.onComplete,[e],t)}function oz(e){const t=e.chart,n=t.options.animation;Tt(n&&n.onProgress,[e],t)}function ND(e){return mD()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const Zp={},lP=e=>{const t=ND(e);return Object.values(Zp).filter(n=>n.canvas===t).pop()};function sz(e,t,n){const r=Object.keys(e);for(const i of r){const o=+i;if(o>=t){const s=e[i];delete e[i],(n>0||o>t)&&(e[o+n]=s)}}}function az(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}function lz(e){const{xScale:t,yScale:n}=e;if(t&&n)return{left:t.left,right:t.right,top:n.top,bottom:n.bottom}}var Qo;let dy=(Qo=class{static register(...t){zi.add(...t),cP()}static unregister(...t){zi.remove(...t),cP()}constructor(t,n){const r=this.config=new ez(n),i=ND(t),o=lP(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||T9(i)),this.platform.updateConfig(r);const a=this.platform.acquireContext(i,s.aspectRatio),l=a&&a.canvas,c=l&&l.height,f=l&&l.width;if(this.id=fj(),this.ctx=a,this.canvas=l,this.width=f,this.height=c,this._options=s,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new H9,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Oj(h=>this.update(h),s.resizeDelay||0),this._dataChanges=[],Zp[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}fo.listen(this,"complete",aP),fo.listen(this,"progress",oz),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:i,_aspectRatio:o}=this;return ct(t)?n&&o?o:i?r/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return zi}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():LO(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return MO(this.canvas,this.ctx),this}stop(){return fo.stop(this),this}resize(t,n){fo.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const r=this.options,i=this.canvas,o=r.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(i,t,n,o),a=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,LO(this,a,!0)&&(this.notifyPlugins("resize",{size:s}),Tt(r.onResize,[this,s],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};yt(n,(r,i)=>{r.id=i})}buildOrUpdateScales(){const t=this.options,n=t.scales,r=this.scales,i=Object.keys(r).reduce((s,a)=>(s[a]=!1,s),{});let o=[];n&&(o=o.concat(Object.keys(n).map(s=>{const a=n[s],l=dg(s,a),c=l==="r",f=l==="x";return{options:a,dposition:c?"chartArea":f?"bottom":"left",dtype:c?"radialLinear":f?"category":"linear"}}))),yt(o,s=>{const a=s.options,l=a.id,c=dg(l,a),f=Qe(a.type,s.dtype);(a.position===void 0||oP(a.position,c)!==oP(s.dposition))&&(a.position=s.dposition),i[l]=!0;let h=null;if(l in r&&r[l].type===f)h=r[l];else{const p=zi.getScale(f);h=new p({id:l,type:f,ctx:this.ctx,chart:this}),r[h.id]=h}h.init(a,t)}),yt(i,(s,a)=>{s||delete r[a]}),yt(r,s=>{er.configure(this,s,s.options),er.addBox(this,s)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,r=t.length;if(t.sort((i,o)=>i.index-o.index),r>n){for(let i=n;in.length&&delete this._stacks,t.forEach((r,i)=>{n.filter(o=>o===r._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let r,i;for(this._removeUnreferencedMetasets(),r=0,i=n.length;r{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let c=0,f=this.data.datasets.length;c{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(sP("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){yt(this.scales,t=>{er.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!wO(n,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:i,count:o}of n){const s=r==="_removeElements"?-o:o;sz(t,i,s)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=o=>new Set(t.filter(s=>s[0]===o).map((s,a)=>a+","+s.splice(1).join(","))),i=r(0);for(let o=1;oo.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;er.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],yt(this.boxes,i=>{r&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,o)=>{i._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,r=t._clip,i=!r.disabled,o=lz(t)||this.chartArea,s={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(i&&cy(n,{left:r.left===!1?0:o.left-r.left,right:r.right===!1?this.width:o.right+r.right,top:r.top===!1?0:o.top-r.top,bottom:r.bottom===!1?this.height:o.bottom+r.bottom}),t.controller.draw(),i&&uy(n),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return zf(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,i){const o=o9.modes[n];return typeof o=="function"?o(this,t,r,i):[]}getDatasetMeta(t){const n=this.data.datasets[t],r=this._metasets;let i=r.filter(o=>o&&o._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},r.push(i)),i}getContext(){return this.$context||(this.$context=Zs(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(t,n){const r=this.getDatasetMeta(t);r.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,r){const i=r?"show":"hide",o=this.getDatasetMeta(t),s=o.controller._resolveAnimations(void 0,i);ei(n)?(o.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),s.update(o,{visible:r}),this.update(a=>a.datasetIndex===t?i:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),fo.remove(this),t=0,n=this.data.datasets.length;t{n.addEventListener(this,o,s),t[o]=s},i=(o,s,a)=>{o.offsetX=s,o.offsetY=a,this._eventHandler(o)};yt(this.options.events,o=>r(o,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,r=(l,c)=>{n.addEventListener(this,l,c),t[l]=c},i=(l,c)=>{t[l]&&(n.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let s;const a=()=>{i("attach",a),this.attached=!0,this.resize(),r("resize",o),r("detach",s)};s=()=>{this.attached=!1,i("resize",o),this._stop(),this._resize(0,0),r("attach",a)},n.isAttached(this.canvas)?a():s()}unbindEvents(){yt(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},yt(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,r){const i=r?"set":"remove";let o,s,a,l;for(n==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+i+"DatasetHoverStyle"]()),a=0,l=t.length;a{const a=this.getDatasetMeta(o);if(!a)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:a.data[s],index:s}});!sg(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(t,n,r){return this._plugins.notify(this,t,n,r)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,r){const i=this.options.hover,o=(l,c)=>l.filter(f=>!c.some(h=>f.datasetIndex===h.datasetIndex&&f.index===h.index)),s=o(n,t),a=r?t:o(t,n);s.length&&this.updateHoverStyle(s,i.mode,!1),a.length&&i.mode&&this.updateHoverStyle(a,i.mode,!0)}_eventHandler(t,n){const r={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},i=s=>(s.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,i)===!1)return;const o=this._handleEvent(t,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,i),(o||r.changed)&&this.render(),this}_handleEvent(t,n,r){const{_active:i=[],options:o}=this,s=n,a=this._getActiveElements(t,i,r,s),l=vj(t),c=az(t,this._lastEvent,r,l);r&&(this._lastEvent=null,Tt(o.onHover,[t,a,this],this),l&&Tt(o.onClick,[t,a,this],this));const f=!sg(a,i);return(f||n)&&(this._active=a,this._updateHoverStyles(a,i,n)),this._lastEvent=c,f}_getActiveElements(t,n,r,i){if(t.type==="mouseout")return[];if(!r)return n;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,i)}},Se(Qo,"defaults",rn),Se(Qo,"instances",Zp),Se(Qo,"overrides",qa),Se(Qo,"registry",zi),Se(Qo,"version",rz),Se(Qo,"getChart",lP),Qo);function cP(){return yt(dy.instances,e=>e._plugins.invalidate())}function cz(e,t,n){const{startAngle:r,pixelMargin:i,x:o,y:s,outerRadius:a,innerRadius:l}=t;let c=i/a;e.beginPath(),e.arc(o,s,a,r-c,n+c),l>i?(c=i/l,e.arc(o,s,l,n+c,r-c,!0)):e.arc(o,s,i,n+Kt,r-Kt),e.closePath(),e.clip()}function uz(e){return zx(e,["outerStart","outerEnd","innerStart","innerEnd"])}function fz(e,t,n,r){const i=uz(e.options.borderRadius),o=(n-t)/2,s=Math.min(o,r*t/2),a=l=>{const c=(n-Math.min(o,l))*r/2;return Tn(l,0,Math.min(o,c))};return{outerStart:a(i.outerStart),outerEnd:a(i.outerEnd),innerStart:Tn(i.innerStart,0,s),innerEnd:Tn(i.innerEnd,0,s)}}function kl(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function hg(e,t,n,r,i,o){const{x:s,y:a,startAngle:l,pixelMargin:c,innerRadius:f}=t,h=Math.max(t.outerRadius+r+n-c,0),p=f>0?f+r+n+c:0;let m=0;const g=i-l;if(r){const te=f>0?f-r:0,oe=h>0?h-r:0,se=(te+oe)/2,Z=se!==0?g*se/(se+r):g;m=(g-Z)/2}const v=Math.max(.001,g*h-n/jt)/h,w=(g-v)/2,y=l+w+m,b=i-w-m,{outerStart:x,outerEnd:T,innerStart:P,innerEnd:k}=fz(t,p,h,b-y),N=h-x,D=h-T,z=y+x/N,A=b-T/D,Y=p+P,q=p+k,ee=y+P/Y,K=b-k/q;if(e.beginPath(),o){const te=(z+A)/2;if(e.arc(s,a,h,z,te),e.arc(s,a,h,te,A),T>0){const $=kl(D,A,s,a);e.arc($.x,$.y,T,A,b+Kt)}const oe=kl(q,b,s,a);if(e.lineTo(oe.x,oe.y),k>0){const $=kl(q,K,s,a);e.arc($.x,$.y,k,b+Kt,K+Math.PI)}const se=(b-k/p+(y+P/p))/2;if(e.arc(s,a,p,b-k/p,se,!0),e.arc(s,a,p,se,y+P/p,!0),P>0){const $=kl(Y,ee,s,a);e.arc($.x,$.y,P,ee+Math.PI,y-Kt)}const Z=kl(N,y,s,a);if(e.lineTo(Z.x,Z.y),x>0){const $=kl(N,z,s,a);e.arc($.x,$.y,x,y-Kt,z)}}else{e.moveTo(s,a);const te=Math.cos(z)*h+s,oe=Math.sin(z)*h+a;e.lineTo(te,oe);const se=Math.cos(A)*h+s,Z=Math.sin(A)*h+a;e.lineTo(se,Z)}e.closePath()}function dz(e,t,n,r,i){const{fullCircles:o,startAngle:s,circumference:a}=t;let l=t.endAngle;if(o){hg(e,t,n,r,l,i);for(let c=0;c=Nt||Bf(o,a,l),v=bo(s,c+p,f+p);return g&&v}getCenterPoint(t){const{x:n,y:r,startAngle:i,endAngle:o,innerRadius:s,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:l,spacing:c}=this.options,f=(i+o)/2,h=(s+a+c+l)/2;return{x:n+Math.cos(f)*h,y:r+Math.sin(f)*h}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:n,circumference:r}=this,i=(n.offset||0)/4,o=(n.spacing||0)/2,s=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=r>Nt?Math.floor(r/Nt):0,r===0||this.innerRadius<0||this.outerRadius<0)return;t.save();const a=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(a)*i,Math.sin(a)*i);const l=1-Math.sin(Math.min(jt,r||0)),c=i*l;t.fillStyle=n.backgroundColor,t.strokeStyle=n.borderColor,dz(t,this,c,o,s),hz(t,this,c,o,s),t.restore()}}Se(Kp,"id","arc"),Se(Kp,"defaults",{borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),Se(Kp,"defaultRoutes",{backgroundColor:"backgroundColor"});function LD(e,t,n=t){e.lineCap=Qe(n.borderCapStyle,t.borderCapStyle),e.setLineDash(Qe(n.borderDash,t.borderDash)),e.lineDashOffset=Qe(n.borderDashOffset,t.borderDashOffset),e.lineJoin=Qe(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=Qe(n.borderWidth,t.borderWidth),e.strokeStyle=Qe(n.borderColor,t.borderColor)}function pz(e,t,n){e.lineTo(n.x,n.y)}function mz(e){return e.stepped?jj:e.tension||e.cubicInterpolationMode==="monotone"?Bj:pz}function DD(e,t,n={}){const r=e.length,{start:i=0,end:o=r-1}=n,{start:s,end:a}=t,l=Math.max(i,s),c=Math.min(o,a),f=ia&&o>a;return{count:r,start:l,loop:t.loop,ilen:c(s+(c?a-T:T))%o,x=()=>{v!==w&&(e.lineTo(f,w),e.lineTo(f,v),e.lineTo(f,y))};for(l&&(m=i[b(0)],e.moveTo(m.x,m.y)),p=0;p<=a;++p){if(m=i[b(p)],m.skip)continue;const T=m.x,P=m.y,k=T|0;k===g?(Pw&&(w=P),f=(h*f+T)/++h):(x(),e.lineTo(T,P),g=k,h=0,v=w=P),y=P}x()}function o1(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?vz:gz}function yz(e){return e.stepped?yB:e.tension||e.cubicInterpolationMode==="monotone"?_B:Ca}function _z(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),LD(e,t.options),e.stroke(i)}function bz(e,t,n,r){const{segments:i,options:o}=t,s=o1(t);for(const a of i)LD(e,o,a.style),e.beginPath(),s(e,t,a,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const wz=typeof Path2D=="function";function xz(e,t,n,r){wz&&!t.options.segment?_z(e,t,n,r):bz(e,t,n,r)}class fs extends Fo{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;uB(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=EB(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,r=t.length;return r&&n[t[r-1].end]}interpolate(t,n){const r=this.options,i=t[n],o=this.points,s=bD(this,{property:n,start:i,end:i});if(!s.length)return;const a=[],l=yz(r);let c,f;for(c=0,f=s.length;ct!=="borderDash"&&t!=="fill"});function uP(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 ID(e){return s1[e%s1.length]}function FD(e){return fP[e%fP.length]}function kz(e,t){return e.borderColor=ID(t),e.backgroundColor=FD(t),++t}function Mz(e,t){return e.backgroundColor=e.data.map(()=>ID(t++)),t}function Rz(e,t){return e.backgroundColor=e.data.map(()=>FD(t++)),t}function Nz(e){let t=0;return(n,r)=>{const i=e.getDatasetMeta(r).controller;i instanceof us?t=Mz(n,t):i instanceof df?t=Rz(n,t):i&&(t=kz(n,t))}}function dP(e){let t;for(t in e)if(e[t].borderColor||e[t].backgroundColor)return!0;return!1}var Lz={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,t,n){if(!n.enabled)return;const{options:{elements:r},data:{datasets:i}}=e.config;if(!n.forceOverride&&(dP(i)||r&&dP(r)))return;const o=Nz(e);i.forEach(o)}};function Dz(e,t,n,r,i){const o=i.samples||r;if(o>=n)return e.slice(t,t+n);const s=[],a=(n-2)/(o-2);let l=0;const c=t+n-1;let f=t,h,p,m,g,v;for(s[l++]=e[f],h=0;hm&&(m=g,p=e[b],v=b);s[l++]=p,f=v}return s[l++]=e[c],s}function Az(e,t,n,r){let i=0,o=0,s,a,l,c,f,h,p,m,g,v;const w=[],y=t+n-1,b=e[t].x,T=e[y].x-b;for(s=t;sv&&(v=c,p=s),i=(o*i+a.x)/++o;else{const k=s-1;if(!ct(h)&&!ct(p)){const N=Math.min(h,p),D=Math.max(h,p);N!==m&&N!==k&&w.push({...e[N],x:i}),D!==m&&D!==k&&w.push({...e[D],x:i})}s>0&&k!==m&&w.push(e[k]),w.push(a),f=P,o=0,g=v=c,h=p=m=s}}return w}function $D(e){if(e._decimated){const t=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{value:t})}}function hP(e){e.data.datasets.forEach(t=>{$D(t)})}function Iz(e,t){const n=t.length;let r=0,i;const{iScale:o}=e,{min:s,max:a,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(r=Tn(wo(t,o.axis,s).lo,0,n-1)),c?i=Tn(wo(t,o.axis,a).hi+1,r,n)-r:i=n-r,{start:r,count:i}}var Fz={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,t,n)=>{if(!n.enabled){hP(e);return}const r=e.width;e.data.datasets.forEach((i,o)=>{const{_data:s,indexAxis:a}=i,l=e.getDatasetMeta(o),c=s||i.data;if(Hu([a,e.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const f=e.scales[l.xAxisID];if(f.type!=="linear"&&f.type!=="time"||e.options.parsing)return;let{start:h,count:p}=Iz(l,c);const m=n.threshold||4*r;if(p<=m){$D(i);return}ct(s)&&(i._data=c,delete i.data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(v){this._data=v}}));let g;switch(n.algorithm){case"lttb":g=Dz(c,h,p,r,n);break;case"min-max":g=Az(c,h,p,r);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}i._decimated=g})},destroy(e){hP(e)}};function $z(e,t,n){const r=e.segments,i=e.points,o=t.points,s=[];for(const a of r){let{start:l,end:c}=a;c=qx(l,c,i);const f=a1(n,i[l],i[c],a.loop);if(!t.segments){s.push({source:a,target:f,start:i[l],end:i[c]});continue}const h=bD(t,f);for(const p of h){const m=a1(n,o[p.start],o[p.end],p.loop),g=_D(a,i,m);for(const v of g)s.push({source:v,target:p,start:{[n]:pP(f,m,"start",Math.max)},end:{[n]:pP(f,m,"end",Math.min)}})}}return s}function a1(e,t,n,r){if(r)return;let i=t[e],o=n[e];return e==="angle"&&(i=Mr(i),o=Mr(o)),{property:e,start:i,end:o}}function jz(e,t){const{x:n=null,y:r=null}=e||{},i=t.points,o=[];return t.segments.forEach(({start:s,end:a})=>{a=qx(s,a,i);const l=i[s],c=i[a];r!==null?(o.push({x:l.x,y:r}),o.push({x:c.x,y:r})):n!==null&&(o.push({x:n,y:l.y}),o.push({x:n,y:c.y}))}),o}function qx(e,t,n){for(;t>e;t--){const r=n[t];if(!isNaN(r.x)&&!isNaN(r.y))break}return t}function pP(e,t,n,r){return e&&t?r(e[n],t[n]):e?e[n]:t?t[n]:0}function jD(e,t){let n=[],r=!1;return Rt(e)?(r=!0,n=e):n=jz(e,t),n.length?new fs({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function mP(e){return e&&e.fill!==!1}function Bz(e,t,n){let i=e[t].fill;const o=[t];let s;if(!n)return i;for(;i!==!1&&o.indexOf(i)===-1;){if(!Zt(i))return i;if(s=e[i],!s)return!1;if(s.visible)return i;o.push(i),i=s.fill}return!1}function zz(e,t,n){const r=Wz(e);if(ot(r))return isNaN(r.value)?!1:r;let i=parseFloat(r);return Zt(i)&&Math.floor(i)===i?Uz(r[0],t,i,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function Uz(e,t,n,r){return(e==="-"||e==="+")&&(n=t+n),n===t||n<0||n>=r?!1:n}function Vz(e,t){let n=null;return e==="start"?n=t.bottom:e==="end"?n=t.top:ot(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function Hz(e,t,n){let r;return e==="start"?r=n:e==="end"?r=t.options.reverse?t.min:t.max:ot(e)?r=e.value:r=t.getBaseValue(),r}function Wz(e){const t=e.options,n=t.fill;let r=Qe(n&&n.target,n);return r===void 0&&(r=!!t.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function Yz(e){const{scale:t,index:n,line:r}=e,i=[],o=r.segments,s=r.points,a=qz(t,n);a.push(jD({x:null,y:t.bottom},r));for(let l=0;l=0;--s){const a=i[s].$filler;a&&(a.line.updateControlPoints(o,a.axis),r&&a.fill&&b0(e.ctx,a,o))}},beforeDatasetsDraw(e,t,n){if(n.drawTime!=="beforeDatasetsDraw")return;const r=e.getSortedVisibleDatasetMetas();for(let i=r.length-1;i>=0;--i){const o=r[i].$filler;mP(o)&&b0(e.ctx,o,e.chartArea)}},beforeDatasetDraw(e,t,n){const r=t.meta.$filler;!mP(r)||n.drawTime!=="beforeDatasetDraw"||b0(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const _P=(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)}},iU=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class bP extends Fo{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=Tt(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=vn(r.font),o=i.size,s=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=_P(r,o);let c,f;n.font=i.string,this.isHorizontal()?(c=this.maxWidth,f=this._fitRows(s,o,a,l)+10):(f=this.maxHeight,c=this._fitCols(s,i,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(f,t.maxHeight||this.maxHeight)}_fitRows(t,n,r,i){const{ctx:o,maxWidth:s,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],f=i+a;let h=t;o.textAlign="left",o.textBaseline="middle";let p=-1,m=-f;return this.legendItems.forEach((g,v)=>{const w=r+n/2+o.measureText(g.text).width;(v===0||c[c.length-1]+w+2*a>s)&&(h+=f,c[c.length-(v>0?0:1)]=0,m+=f,p++),l[v]={left:0,top:m,row:p,width:w,height:i},c[c.length-1]+=w+a}),h}_fitCols(t,n,r,i){const{ctx:o,maxHeight:s,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],f=s-t;let h=a,p=0,m=0,g=0,v=0;return this.legendItems.forEach((w,y)=>{const{itemWidth:b,itemHeight:x}=oU(r,n,o,w,i);y>0&&m+x+2*a>f&&(h+=p+a,c.push({width:p,height:m}),g+=p+a,v++,p=m=0),l[y]={left:g,top:m,col:v,width:b,height:x},p=Math.max(p,b),m+=x+a}),h+=p,c.push({width:p,height:m}),h}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:i},rtl:o}}=this,s=lc(o,this.left,this.width);if(this.isHorizontal()){let a=0,l=Xn(r,this.left+i,this.right-this.lineWidths[a]);for(const c of n)a!==c.row&&(a=c.row,l=Xn(r,this.left+i,this.right-this.lineWidths[a])),c.top+=this.top+t+i,c.left=s.leftForLtr(s.x(l),c.width),l+=c.width+i}else{let a=0,l=Xn(r,this.top+t+i,this.bottom-this.columnSizes[a].height);for(const c of n)c.col!==a&&(a=c.col,l=Xn(r,this.top+t+i,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+i,c.left=s.leftForLtr(s.x(c.left),c.width),l+=c.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;cy(t,this),this._draw(),uy(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:i}=this,{align:o,labels:s}=t,a=rn.color,l=lc(t.rtl,this.left,this.width),c=vn(s.font),{padding:f}=s,h=c.size,p=h/2;let m;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=c.string;const{boxWidth:g,boxHeight:v,itemHeight:w}=_P(s,h),y=function(k,N,D){if(isNaN(g)||g<=0||isNaN(v)||v<0)return;i.save();const z=Qe(D.lineWidth,1);if(i.fillStyle=Qe(D.fillStyle,a),i.lineCap=Qe(D.lineCap,"butt"),i.lineDashOffset=Qe(D.lineDashOffset,0),i.lineJoin=Qe(D.lineJoin,"miter"),i.lineWidth=z,i.strokeStyle=Qe(D.strokeStyle,a),i.setLineDash(Qe(D.lineDash,[])),s.usePointStyle){const A={radius:v*Math.SQRT2/2,pointStyle:D.pointStyle,rotation:D.rotation,borderWidth:z},Y=l.xPlus(k,g/2),q=N+p;aD(i,A,Y,q,s.pointStyleWidth&&g)}else{const A=N+Math.max((h-v)/2,0),Y=l.leftForLtr(k,g),q=$a(D.borderRadius);i.beginPath(),Object.values(q).some(ee=>ee!==0)?Uf(i,{x:Y,y:A,w:g,h:v,radius:q}):i.rect(Y,A,g,v),i.fill(),z!==0&&i.stroke()}i.restore()},b=function(k,N,D){Ga(i,D.text,k,N+w/2,c,{strikethrough:D.hidden,textAlign:l.textAlign(D.textAlign)})},x=this.isHorizontal(),T=this._computeTitleHeight();x?m={x:Xn(o,this.left+f,this.right-r[0]),y:this.top+f+T,line:0}:m={x:this.left+f,y:Xn(o,this.top+T+f,this.bottom-n[0].height),line:0},gD(this.ctx,t.textDirection);const P=w+f;this.legendItems.forEach((k,N)=>{i.strokeStyle=k.fontColor,i.fillStyle=k.fontColor;const D=i.measureText(k.text).width,z=l.textAlign(k.textAlign||(k.textAlign=s.textAlign)),A=g+p+D;let Y=m.x,q=m.y;l.setWidth(this.width),x?N>0&&Y+A+f>this.right&&(q=m.y+=P,m.line++,Y=m.x=Xn(o,this.left+f,this.right-r[m.line])):N>0&&q+P>this.bottom&&(Y=m.x=Y+n[m.line].width+f,m.line++,q=m.y=Xn(o,this.top+T+f,this.bottom-n[m.line].height));const ee=l.x(Y);if(y(ee,q,k),Y=Pj(z,Y+g+p,x?Y+A:this.right,t.rtl),b(l.x(Y),q,k),x)m.x+=A+f;else if(typeof k.text!="string"){const K=c.lineHeight;m.y+=zD(k,K)}else m.y+=P}),vD(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=vn(n.font),i=tr(n.padding);if(!n.display)return;const o=lc(t.rtl,this.left,this.width),s=this.ctx,a=n.position,l=r.size/2,c=i.top+l;let f,h=this.left,p=this.width;if(this.isHorizontal())p=Math.max(...this.lineWidths),f=this.top+c,h=Xn(t.align,h,this.right-p);else{const g=this.columnSizes.reduce((v,w)=>Math.max(v,w.height),0);f=c+Xn(t.align,this.top,this.bottom-g-t.labels.padding-this._computeTitleHeight())}const m=Xn(a,h,h+p);s.textAlign=o.textAlign(Bx(a)),s.textBaseline="middle",s.strokeStyle=n.color,s.fillStyle=n.color,s.font=r.string,Ga(s,n.text,m,f,r)}_computeTitleHeight(){const t=this.options.title,n=vn(t.font),r=tr(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,i,o;if(bo(t,this.left,this.right)&&bo(n,this.top,this.bottom)){for(o=this.legendHitBoxes,r=0;ro.length>s.length?o:s)),t+n.size/2+r.measureText(i).width}function aU(e,t,n){let r=e;return typeof t.text!="string"&&(r=zD(t,n)),r}function zD(e,t){const n=e.text?e.text.length+.5:0;return t*n}function lU(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var cU={id:"legend",_element:bP,start(e,t,n){const r=e.legend=new bP({ctx:e.ctx,options:n,chart:e});er.configure(e,r,n),er.addBox(e,r)},stop(e){er.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;er.configure(e,r,n),r.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const r=t.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),t.hidden=!0):(i.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:i,color:o,useBorderRadius:s,borderRadius:a}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(n?0:void 0),f=tr(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(f.width+f.height)/4,strokeStyle:c.borderColor,pointStyle:r||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:s&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class Gx extends Fo{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=Rt(r.text)?r.text.length:1;this._padding=tr(r.padding);const o=i*vn(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:r,bottom:i,right:o,options:s}=this,a=s.align;let l=0,c,f,h;return this.isHorizontal()?(f=Xn(a,r,o),h=n+t,c=o-r):(s.position==="left"?(f=r+t,h=Xn(a,i,n),l=jt*-.5):(f=o-t,h=Xn(a,n,i),l=jt*.5),c=i-n),{titleX:f,titleY:h,maxWidth:c,rotation:l}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const r=vn(n.font),o=r.lineHeight/2+this._padding.top,{titleX:s,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(o);Ga(t,n.text,0,0,r,{color:n.color,maxWidth:l,rotation:c,textAlign:Bx(n.align),textBaseline:"middle",translation:[s,a]})}}function uU(e,t){const n=new Gx({ctx:e.ctx,options:t,chart:e});er.configure(e,n,t),er.addBox(e,n),e.titleBlock=n}var fU={id:"title",_element:Gx,start(e,t,n){uU(e,n)},stop(e){const t=e.titleBlock;er.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const r=e.titleBlock;er.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 Kh=new WeakMap;var dU={id:"subtitle",start(e,t,n){const r=new Gx({ctx:e.ctx,options:n,chart:e});er.configure(e,r,n),er.addBox(e,r),Kh.set(e,r)},stop(e){er.removeBox(e,Kh.get(e)),Kh.delete(e)},beforeUpdate(e,t,n){const r=Kh.get(e);er.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 Yu={average(e){if(!e.length)return!1;let t,n,r=0,i=0,o=0;for(t=0,n=e.length;ta({chart:t,initial:n.initial,numSteps:s,currentStep:Math.min(r-n.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=iD.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;const o=r.items;let s=o.length-1,a=!1,l;for(;s>=0;--s)l=o[s],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(t),a=!0):(o[s]=o[o.length-1],o.pop());a&&(i.draw(),this._notify(i,r,t,"progress")),o.length||(r.running=!1,this._notify(i,r,t,"complete"),r.initial=!1),n+=o.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let r=n.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,r)),r}listen(t,n,r){this._getAnims(t).listeners[n].push(r)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,i)=>Math.max(r,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const r=n.items;let i=r.length-1;for(;i>=0;--i)r[i].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var fo=new AB;const BO="transparent",IB={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=MO(e||BO),i=r.valid&&MO(t||BO);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class FB{constructor(t,n,r,i){const o=n[r];i=Yu([t.to,i,o,t.from]);const s=Yu([t.from,o,i]);this._active=!0,this._fn=t.fn||IB[t.type||typeof s],this._easing=cf[t.easing]||cf.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=r,this._from=s,this._to=i,this._promises=void 0}active(){return this._active}update(t,n,r){if(this._active){this._notify(!1);const i=this._target[this._prop],o=r-this._start,s=this._duration-o;this._start=r,this._duration=Math.floor(Math.max(s,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=Yu([t.to,n,i,t.from]),this._from=Yu([t.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,r=this._duration,i=this._prop,o=this._from,s=this._loop,a=this._to;let l;if(this._active=o!==a&&(s||n1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(o,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,r)=>{t.push({res:n,rej:r})})}_notify(t){const n=t?"res":"rej",r=this._promises||[];for(let i=0;i{const o=t[i];if(!ot(o))return;const s={};for(const a of n)s[a]=o[a];(Rt(o.properties)&&o.properties||[i]).forEach(a=>{(a===i||!r.has(a))&&r.set(a,s)})})}_animateOptions(t,n){const r=n.options,i=jB(t,r);if(!i)return[];const o=this._createAnimations(i,r);return r.$shared&&$B(t.options.$animations,r).then(()=>{t.options=r},()=>{}),o}_createAnimations(t,n){const r=this._properties,i=[],o=t.$animations||(t.$animations={}),s=Object.keys(n),a=Date.now();let l;for(l=s.length-1;l>=0;--l){const c=s[l];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(t,n));continue}const f=n[c];let h=o[c];const p=r.get(c);if(h)if(p&&h.active()){h.update(p,f,a);continue}else h.cancel();if(!p||!p.duration){t[c]=f;continue}o[c]=h=new FB(p,t,c,f),i.push(h)}return i}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const r=this._createAnimations(t,n);if(r.length)return fo.add(this._chart,r),!0}}function $B(e,t){const n=[],r=Object.keys(t);for(let i=0;i0||!n&&o<0)return i.index}return null}function WO(e,t){const{chart:n,_cachedMeta:r}=e,i=n._stacks||(n._stacks={}),{iScale:o,vScale:s,index:a}=r,l=o.axis,c=s.axis,f=VB(o,s,r),h=t.length;let p;for(let m=0;mn[r].axis===t).shift()}function YB(e,t){return Zs(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function qB(e,t,n){return Zs(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function Eu(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 m0=e=>e==="reset"||e==="none",YO=(e,t)=>t?e:Object.assign({},e),GB=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:ED(n,!0),values:null};class xi{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=VO(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&&Eu(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(h,p,m,g)=>h==="x"?p:h==="r"?g:m,o=n.xAxisID=Qe(r.xAxisID,p0(t,"x")),s=n.yAxisID=Qe(r.yAxisID,p0(t,"y")),a=n.rAxisID=Qe(r.rAxisID,p0(t,"r")),l=n.indexAxis,c=n.iAxisID=i(l,o,s,a),f=n.vAxisID=i(l,s,o,a);n.xScale=this.getScaleForId(o),n.yScale=this.getScaleForId(s),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(f)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&OO(this._data,this),t._stacked&&Eu(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(ot(n))this._data=UB(n);else if(r!==n){if(r){OO(r,this);const i=this._cachedMeta;Eu(i),i._parsed=[]}n&&Object.isExtensible(n)&&Lj(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=VO(n.vScale,n),n.stack!==r.stack&&(i=!0,Eu(n),n.stack=r.stack),this._resyncElements(t),(i||o!==n._stacked)&&WO(this,n._parsed)}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:r,_data:i}=this,{iScale:o,_stacked:s}=r,a=o.axis;let l=t===0&&n===i.length?!0:r._sorted,c=t>0&&r._parsed[t-1],f,h,p;if(this._parsing===!1)r._parsed=i,r._sorted=!0,p=i;else{Rt(i[t])?p=this.parseArrayData(r,i,t,n):ot(i[t])?p=this.parseObjectData(r,i,t,n):p=this.parsePrimitiveData(r,i,t,n);const m=()=>h[a]===null||c&&h[a]v||h=0;--p)if(!g()){this.updateRangeFromParsed(c,t,m,l);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed,r=[];let i,o,s;for(i=0,o=n.length;i=0&&tthis.getContext(r,i,n),v=c.resolveNamedOptions(p,m,g,h);return v.$shared&&(v.$shared=l,o[s]=Object.freeze(YO(v,l))),v}_resolveAnimations(t,n,r){const i=this.chart,o=this._cachedDataOpts,s=`animation-${n}`,a=o[s];if(a)return a;let l;if(i.options.animation!==!1){const f=this.chart.config,h=f.datasetAnimationScopeKeys(this._type,n),p=f.getOptionScopes(this.getDataset(),h);l=f.createResolver(p,this.getContext(t,r,n))}const c=new CD(i,l&&l.animations);return l&&l._cacheable&&(o[s]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||m0(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),i=this._sharedOptions,o=this.getSharedOptions(r),s=this.includeOptions(n,o)||o!==i;return this.updateSharedOptions(o,n,r),{sharedOptions:o,includeOptions:s}}updateElement(t,n,r,i){m0(i)?Object.assign(t,r):this._resolveAnimations(n,i).update(t,r)}updateSharedOptions(t,n,r){t&&!m0(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,i){t.active=i;const o=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(t,{options:!i&&this.getSharedOptions(o)||o})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,r=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const i=r.length,o=n.length,s=Math.min(o,i);s&&this.parse(0,s),o>i?this._insertElements(i,o-i,t):o{for(c.length+=n,a=c.length-1;a>=s;a--)c[a]=c[a-n]};for(l(o),a=t;ai-o))}return e._cache.$bar}function KB(e){const t=e.iScale,n=ZB(t,e.type);let r=t._length,i,o,s,a;const l=()=>{s===32767||s===-32768||(ei(a)&&(r=Math.min(r,Math.abs(s-a)||r)),a=s)};for(i=0,o=n.length;i0?i[e-1]:null,a=eMath.abs(a)&&(l=a,c=s),t[n.axis]=c,t._custom={barStart:l,barEnd:c,start:i,end:o,min:s,max:a}}function TD(e,t,n,r){return Rt(e)?JB(e,t,n,r):t[n.axis]=n.parse(e,r),t}function qO(e,t,n,r){const i=e.iScale,o=e.vScale,s=i.getLabels(),a=i===o,l=[];let c,f,h,p;for(c=n,f=n+r;c=n?1:-1)}function t9(e){let t,n,r,i,o;return e.horizontal?(t=e.base>e.x,n="left",r="right"):(t=e.basel.controller.options.grouped),o=r.options.stacked,s=[],a=l=>{const c=l.controller.getParsed(n),f=c&&c[l.vScale.axis];if(ct(f)||isNaN(f))return!0};for(const l of i)if(!(n!==void 0&&a(l))&&((o===!1||s.indexOf(l.stack)===-1||o===void 0&&l.stack===void 0)&&s.push(l.stack),l.index===t))break;return s.length||s.push(void 0),s}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,n,r){const i=this._getStacks(t,r),o=n!==void 0?i.indexOf(n):-1;return o===-1?i.length-1:o}_getRuler(){const t=this.options,n=this._cachedMeta,r=n.iScale,i=[];let o,s;for(o=0,s=n.data.length;o=0;--r)n=Math.max(n,t[r].size(this.resolveDataElementOptions(r))/2);return n>0&&n}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart.data.labels||[],{xScale:i,yScale:o}=n,s=this.getParsed(t),a=i.getLabelForValue(s.x),l=o.getLabelForValue(s.y),c=s._custom;return{label:r[t]||"",value:"("+a+", "+l+(c?", "+c:"")+")"}}update(t){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,t)}updateElements(t,n,r,i){const o=i==="reset",{iScale:s,vScale:a}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(n,i),f=s.axis,h=a.axis;for(let p=n;pzf(x,a,l,!0)?1:Math.max(T,T*n,P,P*n),g=(x,T,P)=>zf(x,a,l,!0)?-1:Math.min(T,T*n,P,P*n),v=m(0,c,h),w=m(Kt,f,p),y=g(jt,c,h),b=g(jt+Kt,f,p);r=(v-y)/2,i=(w-b)/2,o=-(v+y)/2,s=-(w+b)/2}return{ratioX:r,ratioY:i,offsetX:o,offsetY:s}}class fs extends xi{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(ot(r[t])){const{key:l="value"}=this._parsing;o=c=>+Is(r[c],l)}let s,a;for(s=t,a=t+n;s0&&!isNaN(t)?Nt*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],o=Id(n._parsed[t],r.options.locale);return{label:i[t]||"",value:o}}getMaxBorderWidth(t){let n=0;const r=this.chart;let i,o,s,a,l;if(!t){for(i=0,o=r.data.datasets.length;it!=="spacing",_indexable:t=>t!=="spacing"}),Se(fs,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:i}}=t.legend.options;return n.labels.map((o,s)=>{const l=t.getDatasetMeta(0).controller.getStyle(s);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}}});class df extends xi{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:r,data:i=[],_dataset:o}=n,s=this.chart._animationsDisabled;let{start:a,count:l}=sD(n,i,s);this._drawStart=a,this._drawCount=l,aD(n)&&(a=0,l=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!o._decimated,r.points=i;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(r,void 0,{animated:!s,options:c},t),this.updateElements(i,a,l,t)}updateElements(t,n,r,i){const o=i==="reset",{iScale:s,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:f,includeOptions:h}=this._getSharedOptions(n,i),p=s.axis,m=a.axis,{spanGaps:g,segment:v}=this.options,w=Ec(g)?g:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||o||i==="none",b=n+r,x=t.length;let T=n>0&&this.getParsed(n-1);for(let P=0;P=b){N.skip=!0;continue}const D=this.getParsed(P),z=ct(D[m]),A=N[p]=s.getPixelForValue(D[p],P),Y=N[m]=o||z?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,D,l):D[m],P);N.skip=isNaN(A)||isNaN(Y)||z,N.stop=P>0&&Math.abs(D[p]-T[p])>w,v&&(N.parsed=D,N.raw=c.data[P]),h&&(N.options=f||this.resolveDataElementOptions(P,k.active?"active":i)),y||this.updateElement(k,P,N,i),T=D}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,r=n.options&&n.options.borderWidth||0,i=t.data||[];if(!i.length)return r;const o=i[0].size(this.resolveDataElementOptions(0)),s=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,o,s)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}Se(df,"id","line"),Se(df,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),Se(df,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class hf extends xi{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=Id(n._parsed[t].r,r.options.locale);return{label:i[t]||"",value:o}}parseObjectData(t,n,r,i){return gD.bind(this)(t,n,r,i)}update(t){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,t)}getMinMax(){const t=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((r,i)=>{const o=this.getParsed(i).r;!isNaN(o)&&this.chart.getDataVisibility(i)&&(on.max&&(n.max=o))}),n}_updateRadius(){const t=this.chart,n=t.chartArea,r=t.options,i=Math.min(n.right-n.left,n.bottom-n.top),o=Math.max(i/2,0),s=Math.max(r.cutoutPercentage?o/100*r.cutoutPercentage:1,0),a=(o-s)/t.getVisibleDatasetCount();this.outerRadius=o-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(t,n,r,i){const o=i==="reset",s=this.chart,l=s.options.animation,c=this._cachedMeta.rScale,f=c.xCenter,h=c.yCenter,p=c.getIndexAngle(0)-.5*jt;let m=p,g;const v=360/this.countVisibleElements();for(g=0;g{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&n++}),n}_computeAngle(t,n,r){return this.chart.getDataVisibility(t)?_i(this.resolveDataElementOptions(t,n).angle||r):0}}Se(hf,"id","polarArea"),Se(hf,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),Se(hf,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:i}}=t.legend.options;return n.labels.map((o,s)=>{const l=t.getDatasetMeta(0).controller.getStyle(s);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class o1 extends fs{}Se(o1,"id","pie"),Se(o1,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class qp extends xi{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 gD.bind(this)(t,n,r,i)}update(t){const n=this._cachedMeta,r=n.dataset,i=n.data||[],o=n.iScale.getLabels();if(r.points=i,t!=="resize"){const s=this.resolveDatasetElementOptions(t);this.options.showLine||(s.borderWidth=0);const a={_loop:!0,_fullLoop:o.length===i.length,options:s};this.updateElement(r,void 0,a,t)}this.updateElements(i,0,i.length,t)}updateElements(t,n,r,i){const o=this._cachedMeta.rScale,s=i==="reset";for(let a=n;a0&&this.getParsed(n-1);for(let T=n;T0&&Math.abs(k[m]-x[m])>y,w&&(N.parsed=k,N.raw=c.data[T]),p&&(N.options=h||this.resolveDataElementOptions(T,P.active?"active":i)),b||this.updateElement(P,T,N,i),x=k}this.updateSharedOptions(h,i,f)}getMaxOverflow(){const t=this._cachedMeta,n=t.data||[];if(!this.options.showLine){let a=0;for(let l=n.length-1;l>=0;--l)a=Math.max(a,n[l].size(this.resolveDataElementOptions(l))/2);return a>0&&a}const r=t.dataset,i=r.options&&r.options.borderWidth||0;if(!n.length)return i;const o=n[0].size(this.resolveDataElementOptions(0)),s=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,o,s)/2}}Se(Gp,"id","scatter"),Se(Gp,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),Se(Gp,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var s9=Object.freeze({__proto__:null,BarController:ff,BubbleController:Yp,DoughnutController:fs,LineController:df,PolarAreaController:hf,PieController:o1,RadarController:qp,ScatterController:Gp});function va(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Kx{static override(t){Object.assign(Kx.prototype,t)}constructor(t){this.options=t||{}}init(){}formats(){return va()}parse(){return va()}format(){return va()}add(){return va()}diff(){return va()}startOf(){return va()}endOf(){return va()}}var a9={_date:Kx};function l9(e,t,n,r){const{controller:i,data:o,_sorted:s}=e,a=i._cachedMeta.iScale;if(a&&t===a.axis&&t!=="r"&&s&&o.length){const l=a._reversePixels?Rj:wo;if(r){if(i._sharedOptions){const c=o[0],f=typeof c.getRange=="function"&&c.getRange(t);if(f){const h=l(o,t,n-f),p=l(o,t,n+f);return{lo:h.lo,hi:p.hi}}}}else return l(o,t,n)}return{lo:0,hi:o.length-1}}function Fd(e,t,n,r,i){const o=e.getSortedVisibleDatasetMetas(),s=n[t];for(let a=0,l=o.length;a{l[s](t[n],i)&&(o.push({element:l,datasetIndex:c,index:f}),a=a||l.inRange(t.x,t.y,i))}),r&&!a?[]:o}var d9={evaluateInteractionItems:Fd,modes:{index(e,t,n,r){const i=Sa(t,e),o=n.axis||"x",s=n.includeInvisible||!1,a=n.intersect?v0(e,i,o,r,s):y0(e,i,o,!1,r,s),l=[];return a.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const f=a[0].index,h=c.data[f];h&&!h.skip&&l.push({element:h,datasetIndex:c.index,index:f})}),l):[]},dataset(e,t,n,r){const i=Sa(t,e),o=n.axis||"xy",s=n.includeInvisible||!1;let a=n.intersect?v0(e,i,o,r,s):y0(e,i,o,!1,r,s);if(a.length>0){const l=a[0].datasetIndex,c=e.getDatasetMeta(l).data;a=[];for(let f=0;fn.pos===t)}function XO(e,t){return e.filter(n=>OD.indexOf(n.pos)===-1&&n.box.axis===t)}function Ou(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 h9(e){const t=[];let n,r,i,o,s,a;for(n=0,r=(e||[]).length;nc.box.fullSize),!0),r=Ou(Tu(t,"left"),!0),i=Ou(Tu(t,"right")),o=Ou(Tu(t,"top"),!0),s=Ou(Tu(t,"bottom")),a=XO(t,"x"),l=XO(t,"y");return{fullSize:n,leftAndTop:r.concat(o),rightAndBottom:i.concat(l).concat(s).concat(a),chartArea:Tu(t,"chartArea"),vertical:r.concat(i).concat(l),horizontal:o.concat(s).concat(a)}}function QO(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function PD(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 v9(e,t,n,r){const{pos:i,box:o}=n,s=e.maxPadding;if(!ot(i)){n.size&&(e[i]-=n.size);const h=r[n.stack]||{size:0,count:1};h.size=Math.max(h.size,n.horizontal?o.height:o.width),n.size=h.size/h.count,e[i]+=n.size}o.getPadding&&PD(s,o.getPadding());const a=Math.max(0,t.outerWidth-QO(s,e,"left","right")),l=Math.max(0,t.outerHeight-QO(s,e,"top","bottom")),c=a!==e.w,f=l!==e.h;return e.w=a,e.h=l,n.horizontal?{same:c,other:f}:{same:f,other:c}}function y9(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 _9(e,t){const n=t.maxPadding;function r(i){const o={left:0,top:0,right:0,bottom:0};return i.forEach(s=>{o[s]=Math.max(t[s],n[s])}),o}return r(e?["left","right"]:["top","bottom"])}function qu(e,t,n,r){const i=[];let o,s,a,l,c,f;for(o=0,s=e.length,c=0;o{typeof v.beforeLayout=="function"&&v.beforeLayout()});const f=l.reduce((v,w)=>w.box.options&&w.box.options.display===!1?v:v+1,0)||1,h=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:o,availableHeight:s,vBoxMaxWidth:o/2/f,hBoxMaxHeight:s/2}),p=Object.assign({},i);PD(p,tr(r));const m=Object.assign({maxPadding:p,w:o,h:s,x:i.left,y:i.top},i),g=m9(l.concat(c),h);qu(a.fullSize,m,h,g),qu(l,m,h,g),qu(c,m,h,g)&&qu(l,m,h,g),y9(m),JO(a.leftAndTop,m,h,g),m.x+=m.w,m.y+=m.h,JO(a.rightAndBottom,m,h,g),e.chartArea={left:m.left,top:m.top,right:m.left+m.w,bottom:m.top+m.h,height:m.h,width:m.w},vt(a.chartArea,v=>{const w=v.box;Object.assign(w,e.chartArea),w.update(m.w,m.h,{left:0,top:0,right:0,bottom:0})})}};class kD{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 b9 extends kD{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Zp="$chartjs",w9={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},eP=e=>e===null||e==="";function x9(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[Zp]={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",eP(i)){const o=IO(e,"width");o!==void 0&&(e.width=o)}if(eP(r))if(e.style.height==="")e.height=e.width/(t||2);else{const o=IO(e,"height");o!==void 0&&(e.height=o)}return e}const MD=CB?{passive:!0}:!1;function S9(e,t,n){e.addEventListener(t,n,MD)}function C9(e,t,n){e.canvas.removeEventListener(t,n,MD)}function E9(e,t){const n=w9[e.type]||e.type,{x:r,y:i}=Sa(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:i!==void 0?i:null}}function dg(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function T9(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let s=!1;for(const a of o)s=s||dg(a.addedNodes,r),s=s&&!dg(a.removedNodes,r);s&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function O9(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let s=!1;for(const a of o)s=s||dg(a.removedNodes,r),s=s&&!dg(a.addedNodes,r);s&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const Hf=new Map;let tP=0;function RD(){const e=window.devicePixelRatio;e!==tP&&(tP=e,Hf.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function P9(e,t){Hf.size||window.addEventListener("resize",RD),Hf.set(e,t)}function k9(e){Hf.delete(e),Hf.size||window.removeEventListener("resize",RD)}function M9(e,t,n){const r=e.canvas,i=r&&Zx(r);if(!i)return;const o=oD((a,l)=>{const c=i.clientWidth;n(a,l),c{const l=a[0],c=l.contentRect.width,f=l.contentRect.height;c===0&&f===0||o(c,f)});return s.observe(i),P9(e,o),s}function _0(e,t,n){n&&n.disconnect(),t==="resize"&&k9(e)}function R9(e,t,n){const r=e.canvas,i=oD(o=>{e.ctx!==null&&n(E9(o,e))},e);return S9(r,t,i),i}class N9 extends kD{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(x9(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[Zp])return!1;const r=n[Zp].initial;["height","width"].forEach(o=>{const s=r[o];ct(s)?n.removeAttribute(o):n.setAttribute(o,s)});const i=r.style||{};return Object.keys(i).forEach(o=>{n.style[o]=i[o]}),n.width=n.width,delete n[Zp],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),s={attach:T9,detach:O9,resize:M9}[n]||R9;i[n]=s(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),i=r[n];if(!i)return;({attach:_0,detach:_0,resize:_0}[n]||C9)(t,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,i){return SB(t,n,r,i)}isAttached(t){const n=Zx(t);return!!(n&&n.isConnected)}}function L9(e){return!yD()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?b9:N9}var Vp;let $o=(Vp=class{constructor(){Se(this,"active",!1)}tooltipPosition(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}hasValue(){return Ec(this.x)&&Ec(this.y)}getProps(t,n){const r=this.$animations;if(!n||!r)return this;const i={};return t.forEach(o=>{i[o]=r[o]&&r[o].active()?r[o]._to:this[o]}),i}},Se(Vp,"defaults",{}),Se(Vp,"defaultRoutes"),Vp);function D9(e,t){const n=e.options.ticks,r=A9(e),i=Math.min(n.maxTicksLimit||r,r),o=n.major.enabled?F9(t):[],s=o.length,a=o[0],l=o[s-1],c=[];if(s>i)return $9(t,c,o,s/i),c;const f=I9(o,t,i);if(s>0){let h,p;const m=s>1?Math.round((l-a)/(s-1)):null;for(qh(t,c,f,ct(m)?0:a-m,a),h=0,p=s-1;hi)return l}return Math.max(i,1)}function F9(e){const t=[];let n,r;for(n=0,r=e.length;ne==="left"?"right":e==="right"?"left":e,nP=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n;function rP(e,t){const n=[],r=e.length/t,i=e.length;let o=0;for(;os+a)))return l}function U9(e,t){vt(e,n=>{const r=n.gc,i=r.length/2;let o;if(i>t){for(o=0;or?r:n,r=i&&n>r?n:r,{min:Pr(n,Pr(r,n)),max:Pr(r,Pr(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(){Tt(this.options.beforeUpdate,[this])}update(t,n,r){const{beginAtZero:i,grace:o,ticks:s}=this.options,a=s.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=tB(this,o,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a=o||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const f=this._getLabelSizes(),h=f.widest.width,p=f.highest.height,m=Tn(this.chart.width-h,0,this.maxWidth);a=t.offset?this.maxWidth/r:m/(r-1),h+6>a&&(a=m/(r-(t.offset?.5:1)),l=this.maxHeight-Pu(t.grid)-n.padding-iP(t.title,this.chart.options.font),c=Math.sqrt(h*h+p*p),s=Ux(Math.min(Math.asin(Tn((f.highest.height+6)/a,-1,1)),Math.asin(Tn(l/c,-1,1))-Math.asin(Tn(p/c,-1,1)))),s=Math.max(i,Math.min(o,s))),this.labelRotation=s}afterCalculateLabelRotation(){Tt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Tt(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:o}}=this,s=this._isVisible(),a=this.isHorizontal();if(s){const l=iP(i,n.options.font);if(a?(t.width=this.maxWidth,t.height=Pu(o)+l):(t.height=this.maxHeight,t.width=Pu(o)+l),r.display&&this.ticks.length){const{first:c,last:f,widest:h,highest:p}=this._getLabelSizes(),m=r.padding*2,g=_i(this.labelRotation),v=Math.cos(g),w=Math.sin(g);if(a){const y=r.mirror?0:w*h.width+v*p.height;t.height=Math.min(this.maxHeight,t.height+y+m)}else{const y=r.mirror?0:v*h.width+w*p.height;t.width=Math.min(this.maxWidth,t.width+y+m)}this._calculatePadding(c,f,w,v)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,r,i){const{ticks:{align:o,padding:s},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const f=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1);let p=0,m=0;l?c?(p=i*t.width,m=r*n.height):(p=r*t.height,m=i*n.width):o==="start"?m=n.width:o==="end"?p=t.width:o!=="inner"&&(p=t.width/2,m=n.width/2),this.paddingLeft=Math.max((p-f+s)*this.width/(this.width-f),0),this.paddingRight=Math.max((m-h+s)*this.width/(this.width-h),0)}else{let f=n.height/2,h=t.height/2;o==="start"?(f=0,h=t.height):o==="end"&&(f=n.height,h=0),this.paddingTop=f+s,this.paddingBottom=h+s}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Tt(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,r;for(n=0,r=t.length;n({width:o[N]||0,height:s[N]||0});return{first:k(0),last:k(n-1),widest:k(T),highest:k(P),widths:o,heights:s}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return Mj(this._alignToPixels?ga(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&ta*i?a/r:l/i:l*i0}_computeGridLineItems(t){const n=this.axis,r=this.chart,i=this.options,{grid:o,position:s,border:a}=i,l=o.offset,c=this.isHorizontal(),h=this.ticks.length+(l?1:0),p=Pu(o),m=[],g=a.setContext(this.getContext()),v=g.display?g.width:0,w=v/2,y=function(oe){return ga(r,oe,v)};let b,x,T,P,k,N,D,z,A,Y,q,ee;if(s==="top")b=y(this.bottom),N=this.bottom-p,z=b-w,Y=y(t.top)+w,ee=t.bottom;else if(s==="bottom")b=y(this.top),Y=t.top,ee=y(t.bottom)-w,N=b+w,z=this.top+p;else if(s==="left")b=y(this.right),k=this.right-p,D=b-w,A=y(t.left)+w,q=t.right;else if(s==="right")b=y(this.left),A=t.left,q=y(t.right)-w,k=b+w,D=this.left+p;else if(n==="x"){if(s==="center")b=y((t.top+t.bottom)/2+.5);else if(ot(s)){const oe=Object.keys(s)[0],se=s[oe];b=y(this.chart.scales[oe].getPixelForValue(se))}Y=t.top,ee=t.bottom,N=b+w,z=N+p}else if(n==="y"){if(s==="center")b=y((t.left+t.right)/2);else if(ot(s)){const oe=Object.keys(s)[0],se=s[oe];b=y(this.chart.scales[oe].getPixelForValue(se))}k=b-w,D=k-p,A=t.left,q=t.right}const K=Qe(i.ticks.maxTicksLimit,h),te=Math.max(1,Math.ceil(h/K));for(x=0;xo.value===t);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const n=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,s;const a=(l,c,f)=>{!f.width||!f.color||(r.save(),r.lineWidth=f.width,r.strokeStyle=f.color,r.setLineDash(f.borderDash||[]),r.lineDashOffset=f.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(c.x,c.y),r.stroke(),r.restore())};if(n.display)for(o=0,s=i.length;o{this.draw(o)}}]:[{z:r,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let o,s;for(o=0,s=n.length;o{const r=n.split("."),i=r.pop(),o=[e].concat(r).join("."),s=t[n].split("."),a=s.pop(),l=s.join(".");rn.route(o,i,l,a)})}function Z9(e){return"id"in e&&"defaults"in e}class K9{constructor(){this.controllers=new Gh(xi,"datasets",!0),this.elements=new Gh($o,"elements"),this.plugins=new Gh(Object,"plugins"),this.scales=new Gh(fl,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,r){[...n].forEach(i=>{const o=r||this._getRegistryForType(i);r||o.isForType(i)||o===this.plugins&&i.id?this._exec(t,o,i):vt(i,s=>{const a=r||this._getRegistryForType(s);this._exec(t,a,s)})})}_exec(t,n,r){const i=zx(t);Tt(r["before"+i],[],r),n[t](r),Tt(r["after"+i],[],r)}_getRegistryForType(t){for(let n=0;no.filter(a=>!s.some(l=>a.plugin.id===l.plugin.id));this._notify(i(n,r),t,"stop"),this._notify(i(r,n),t,"start")}}function Q9(e){const t={},n=[],r=Object.keys(zi.plugins.items);for(let o=0;o1&&hg(e[0].toLowerCase(),t),e))return e;throw new Error(`Cannot determine type of '${name}' axis. Please provide 'axis' or 'position' option.`)}function oz(e,t){const n=qa[e.type]||{scales:{}},r=t.scales||{},i=s1(e.type,t),o=Object.create(null);return Object.keys(r).forEach(s=>{const a=r[s];if(!ot(a))return console.error(`Invalid scale configuration for scale: ${s}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${s}`);const l=hg(s,a),c=rz(l,i),f=n.scales||{};o[s]=af(Object.create(null),[{axis:l},a,f[l],f[c]])}),e.data.datasets.forEach(s=>{const a=s.type||e.type,l=s.indexAxis||s1(a,t),f=(qa[a]||{}).scales||{};Object.keys(f).forEach(h=>{const p=nz(h,l),m=s[p+"AxisID"]||p;o[m]=o[m]||Object.create(null),af(o[m],[{axis:p},r[m],f[h]])})}),Object.keys(o).forEach(s=>{const a=o[s];af(a,[rn.scales[a.type],rn.scale])}),o}function ND(e){const t=e.options||(e.options={});t.plugins=Qe(t.plugins,{}),t.scales=oz(e,t)}function LD(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function sz(e){return e=e||{},e.data=LD(e.data),ND(e),e}const oP=new Map,DD=new Set;function Zh(e,t){let n=oP.get(e);return n||(n=t(),oP.set(e,n),DD.add(n)),n}const ku=(e,t,n)=>{const r=Is(t,n);r!==void 0&&e.add(r)};class az{constructor(t){this._config=sz(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=LD(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(),ND(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Zh(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return Zh(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return Zh(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return Zh(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const r=this._scopeCache;let i=r.get(t);return(!i||n)&&(i=new Map,r.set(t,i)),i}getOptionScopes(t,n,r){const{options:i,type:o}=this,s=this._cachedScopes(t,r),a=s.get(n);if(a)return a;const l=new Set;n.forEach(f=>{t&&(l.add(t),f.forEach(h=>ku(l,t,h))),f.forEach(h=>ku(l,i,h)),f.forEach(h=>ku(l,qa[o]||{},h)),f.forEach(h=>ku(l,rn,h)),f.forEach(h=>ku(l,r1,h))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),DD.has(n)&&s.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,qa[n]||{},rn.datasets[n]||{},{type:n},rn,r1]}resolveNamedOptions(t,n,r,i=[""]){const o={$shared:!0},{resolver:s,subPrefixes:a}=sP(this._resolverCache,t,i);let l=s;if(cz(s,n)){o.$shared=!1,r=Fs(r)?r():r;const c=this.createResolver(t,r,a);l=Tc(s,r,c)}for(const c of n)o[c]=l[c];return o}createResolver(t,n,r=[""],i){const{resolver:o}=sP(this._resolverCache,t,r);return ot(n)?Tc(o,n,void 0,i):o}}function sP(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:Yx(t,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},r.set(i,o)),o}const lz=e=>ot(e)&&Object.getOwnPropertyNames(e).reduce((t,n)=>t||Fs(e[n]),!1);function cz(e,t){const{isScriptable:n,isIndexable:r}=dD(e);for(const i of t){const o=n(i),s=r(i),a=(s||o)&&e[i];if(o&&(Fs(a)||lz(a))||s&&Rt(a))return!0}return!1}var uz="4.1.1";const fz=["top","bottom","left","right","chartArea"];function aP(e,t){return e==="top"||e==="bottom"||fz.indexOf(e)===-1&&t==="x"}function lP(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function cP(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),Tt(n&&n.onComplete,[e],t)}function dz(e){const t=e.chart,n=t.options.animation;Tt(n&&n.onProgress,[e],t)}function AD(e){return yD()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const Kp={},uP=e=>{const t=AD(e);return Object.values(Kp).filter(n=>n.canvas===t).pop()};function hz(e,t,n){const r=Object.keys(e);for(const i of r){const o=+i;if(o>=t){const s=e[i];delete e[i],(n>0||o>t)&&(e[o+n]=s)}}}function pz(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}function mz(e){const{xScale:t,yScale:n}=e;if(t&&n)return{left:t.left,right:t.right,top:n.top,bottom:n.bottom}}var Jo;let py=(Jo=class{static register(...t){zi.add(...t),fP()}static unregister(...t){zi.remove(...t),fP()}constructor(t,n){const r=this.config=new az(n),i=AD(t),o=uP(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||L9(i)),this.platform.updateConfig(r);const a=this.platform.acquireContext(i,s.aspectRatio),l=a&&a.canvas,c=l&&l.height,f=l&&l.width;if(this.id=yj(),this.ctx=a,this.canvas=l,this.width=f,this.height=c,this._options=s,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new X9,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Dj(h=>this.update(h),s.resizeDelay||0),this._dataChanges=[],Kp[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}fo.listen(this,"complete",cP),fo.listen(this,"progress",dz),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:i,_aspectRatio:o}=this;return ct(t)?n&&o?o:i?r/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return zi}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():AO(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return NO(this.canvas,this.ctx),this}stop(){return fo.stop(this),this}resize(t,n){fo.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const r=this.options,i=this.canvas,o=r.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(i,t,n,o),a=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,AO(this,a,!0)&&(this.notifyPlugins("resize",{size:s}),Tt(r.onResize,[this,s],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};vt(n,(r,i)=>{r.id=i})}buildOrUpdateScales(){const t=this.options,n=t.scales,r=this.scales,i=Object.keys(r).reduce((s,a)=>(s[a]=!1,s),{});let o=[];n&&(o=o.concat(Object.keys(n).map(s=>{const a=n[s],l=hg(s,a),c=l==="r",f=l==="x";return{options:a,dposition:c?"chartArea":f?"bottom":"left",dtype:c?"radialLinear":f?"category":"linear"}}))),vt(o,s=>{const a=s.options,l=a.id,c=hg(l,a),f=Qe(a.type,s.dtype);(a.position===void 0||aP(a.position,c)!==aP(s.dposition))&&(a.position=s.dposition),i[l]=!0;let h=null;if(l in r&&r[l].type===f)h=r[l];else{const p=zi.getScale(f);h=new p({id:l,type:f,ctx:this.ctx,chart:this}),r[h.id]=h}h.init(a,t)}),vt(i,(s,a)=>{s||delete r[a]}),vt(r,s=>{Jn.configure(this,s,s.options),Jn.addBox(this,s)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,r=t.length;if(t.sort((i,o)=>i.index-o.index),r>n){for(let i=n;in.length&&delete this._stacks,t.forEach((r,i)=>{n.filter(o=>o===r._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let r,i;for(this._removeUnreferencedMetasets(),r=0,i=n.length;r{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let c=0,f=this.data.datasets.length;c{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(lP("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){vt(this.scales,t=>{Jn.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!SO(n,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:i,count:o}of n){const s=r==="_removeElements"?-o:o;hz(t,i,s)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=o=>new Set(t.filter(s=>s[0]===o).map((s,a)=>a+","+s.splice(1).join(","))),i=r(0);for(let o=1;oo.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Jn.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],vt(this.boxes,i=>{r&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,o)=>{i._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,r=t._clip,i=!r.disabled,o=mz(t)||this.chartArea,s={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(i&&fy(n,{left:r.left===!1?0:o.left-r.left,right:r.right===!1?this.width:o.right+r.right,top:r.top===!1?0:o.top-r.top,bottom:r.bottom===!1?this.height:o.bottom+r.bottom}),t.controller.draw(),i&&dy(n),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return Uf(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,i){const o=d9.modes[n];return typeof o=="function"?o(this,t,r,i):[]}getDatasetMeta(t){const n=this.data.datasets[t],r=this._metasets;let i=r.filter(o=>o&&o._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},r.push(i)),i}getContext(){return this.$context||(this.$context=Zs(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(t,n){const r=this.getDatasetMeta(t);r.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,r){const i=r?"show":"hide",o=this.getDatasetMeta(t),s=o.controller._resolveAnimations(void 0,i);ei(n)?(o.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),s.update(o,{visible:r}),this.update(a=>a.datasetIndex===t?i:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),fo.remove(this),t=0,n=this.data.datasets.length;t{n.addEventListener(this,o,s),t[o]=s},i=(o,s,a)=>{o.offsetX=s,o.offsetY=a,this._eventHandler(o)};vt(this.options.events,o=>r(o,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,r=(l,c)=>{n.addEventListener(this,l,c),t[l]=c},i=(l,c)=>{t[l]&&(n.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let s;const a=()=>{i("attach",a),this.attached=!0,this.resize(),r("resize",o),r("detach",s)};s=()=>{this.attached=!1,i("resize",o),this._stop(),this._resize(0,0),r("attach",a)},n.isAttached(this.canvas)?a():s()}unbindEvents(){vt(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},vt(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,r){const i=r?"set":"remove";let o,s,a,l;for(n==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+i+"DatasetHoverStyle"]()),a=0,l=t.length;a{const a=this.getDatasetMeta(o);if(!a)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:a.data[s],index:s}});!ag(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(t,n,r){return this._plugins.notify(this,t,n,r)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,r){const i=this.options.hover,o=(l,c)=>l.filter(f=>!c.some(h=>f.datasetIndex===h.datasetIndex&&f.index===h.index)),s=o(n,t),a=r?t:o(t,n);s.length&&this.updateHoverStyle(s,i.mode,!1),a.length&&i.mode&&this.updateHoverStyle(a,i.mode,!0)}_eventHandler(t,n){const r={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},i=s=>(s.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,i)===!1)return;const o=this._handleEvent(t,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,i),(o||r.changed)&&this.render(),this}_handleEvent(t,n,r){const{_active:i=[],options:o}=this,s=n,a=this._getActiveElements(t,i,r,s),l=Cj(t),c=pz(t,this._lastEvent,r,l);r&&(this._lastEvent=null,Tt(o.onHover,[t,a,this],this),l&&Tt(o.onClick,[t,a,this],this));const f=!ag(a,i);return(f||n)&&(this._active=a,this._updateHoverStyles(a,i,n)),this._lastEvent=c,f}_getActiveElements(t,n,r,i){if(t.type==="mouseout")return[];if(!r)return n;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,i)}},Se(Jo,"defaults",rn),Se(Jo,"instances",Kp),Se(Jo,"overrides",qa),Se(Jo,"registry",zi),Se(Jo,"version",uz),Se(Jo,"getChart",uP),Jo);function fP(){return vt(py.instances,e=>e._plugins.invalidate())}function gz(e,t,n){const{startAngle:r,pixelMargin:i,x:o,y:s,outerRadius:a,innerRadius:l}=t;let c=i/a;e.beginPath(),e.arc(o,s,a,r-c,n+c),l>i?(c=i/l,e.arc(o,s,l,n+c,r-c,!0)):e.arc(o,s,i,n+Kt,r-Kt),e.closePath(),e.clip()}function vz(e){return Wx(e,["outerStart","outerEnd","innerStart","innerEnd"])}function yz(e,t,n,r){const i=vz(e.options.borderRadius),o=(n-t)/2,s=Math.min(o,r*t/2),a=l=>{const c=(n-Math.min(o,l))*r/2;return Tn(l,0,Math.min(o,c))};return{outerStart:a(i.outerStart),outerEnd:a(i.outerEnd),innerStart:Tn(i.innerStart,0,s),innerEnd:Tn(i.innerEnd,0,s)}}function Ml(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function pg(e,t,n,r,i,o){const{x:s,y:a,startAngle:l,pixelMargin:c,innerRadius:f}=t,h=Math.max(t.outerRadius+r+n-c,0),p=f>0?f+r+n+c:0;let m=0;const g=i-l;if(r){const te=f>0?f-r:0,oe=h>0?h-r:0,se=(te+oe)/2,Z=se!==0?g*se/(se+r):g;m=(g-Z)/2}const v=Math.max(.001,g*h-n/jt)/h,w=(g-v)/2,y=l+w+m,b=i-w-m,{outerStart:x,outerEnd:T,innerStart:P,innerEnd:k}=yz(t,p,h,b-y),N=h-x,D=h-T,z=y+x/N,A=b-T/D,Y=p+P,q=p+k,ee=y+P/Y,K=b-k/q;if(e.beginPath(),o){const te=(z+A)/2;if(e.arc(s,a,h,z,te),e.arc(s,a,h,te,A),T>0){const $=Ml(D,A,s,a);e.arc($.x,$.y,T,A,b+Kt)}const oe=Ml(q,b,s,a);if(e.lineTo(oe.x,oe.y),k>0){const $=Ml(q,K,s,a);e.arc($.x,$.y,k,b+Kt,K+Math.PI)}const se=(b-k/p+(y+P/p))/2;if(e.arc(s,a,p,b-k/p,se,!0),e.arc(s,a,p,se,y+P/p,!0),P>0){const $=Ml(Y,ee,s,a);e.arc($.x,$.y,P,ee+Math.PI,y-Kt)}const Z=Ml(N,y,s,a);if(e.lineTo(Z.x,Z.y),x>0){const $=Ml(N,z,s,a);e.arc($.x,$.y,x,y-Kt,z)}}else{e.moveTo(s,a);const te=Math.cos(z)*h+s,oe=Math.sin(z)*h+a;e.lineTo(te,oe);const se=Math.cos(A)*h+s,Z=Math.sin(A)*h+a;e.lineTo(se,Z)}e.closePath()}function _z(e,t,n,r,i){const{fullCircles:o,startAngle:s,circumference:a}=t;let l=t.endAngle;if(o){pg(e,t,n,r,l,i);for(let c=0;c=Nt||zf(o,a,l),v=bo(s,c+p,f+p);return g&&v}getCenterPoint(t){const{x:n,y:r,startAngle:i,endAngle:o,innerRadius:s,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:l,spacing:c}=this.options,f=(i+o)/2,h=(s+a+c+l)/2;return{x:n+Math.cos(f)*h,y:r+Math.sin(f)*h}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:n,circumference:r}=this,i=(n.offset||0)/4,o=(n.spacing||0)/2,s=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=r>Nt?Math.floor(r/Nt):0,r===0||this.innerRadius<0||this.outerRadius<0)return;t.save();const a=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(a)*i,Math.sin(a)*i);const l=1-Math.sin(Math.min(jt,r||0)),c=i*l;t.fillStyle=n.backgroundColor,t.strokeStyle=n.borderColor,_z(t,this,c,o,s),bz(t,this,c,o,s),t.restore()}}Se(Xp,"id","arc"),Se(Xp,"defaults",{borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),Se(Xp,"defaultRoutes",{backgroundColor:"backgroundColor"});function ID(e,t,n=t){e.lineCap=Qe(n.borderCapStyle,t.borderCapStyle),e.setLineDash(Qe(n.borderDash,t.borderDash)),e.lineDashOffset=Qe(n.borderDashOffset,t.borderDashOffset),e.lineJoin=Qe(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=Qe(n.borderWidth,t.borderWidth),e.strokeStyle=Qe(n.borderColor,t.borderColor)}function wz(e,t,n){e.lineTo(n.x,n.y)}function xz(e){return e.stepped?Yj:e.tension||e.cubicInterpolationMode==="monotone"?qj:wz}function FD(e,t,n={}){const r=e.length,{start:i=0,end:o=r-1}=n,{start:s,end:a}=t,l=Math.max(i,s),c=Math.min(o,a),f=ia&&o>a;return{count:r,start:l,loop:t.loop,ilen:c(s+(c?a-T:T))%o,x=()=>{v!==w&&(e.lineTo(f,w),e.lineTo(f,v),e.lineTo(f,y))};for(l&&(m=i[b(0)],e.moveTo(m.x,m.y)),p=0;p<=a;++p){if(m=i[b(p)],m.skip)continue;const T=m.x,P=m.y,k=T|0;k===g?(Pw&&(w=P),f=(h*f+T)/++h):(x(),e.lineTo(T,P),g=k,h=0,v=w=P),y=P}x()}function a1(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?Cz:Sz}function Ez(e){return e.stepped?EB:e.tension||e.cubicInterpolationMode==="monotone"?TB:Ca}function Tz(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),ID(e,t.options),e.stroke(i)}function Oz(e,t,n,r){const{segments:i,options:o}=t,s=a1(t);for(const a of i)ID(e,o,a.style),e.beginPath(),s(e,t,a,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const Pz=typeof Path2D=="function";function kz(e,t,n,r){Pz&&!t.options.segment?Tz(e,t,n,r):Oz(e,t,n,r)}class ds extends $o{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;vB(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=NB(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,r=t.length;return r&&n[t[r-1].end]}interpolate(t,n){const r=this.options,i=t[n],o=this.points,s=SD(this,{property:n,start:i,end:i});if(!s.length)return;const a=[],l=Ez(r);let c,f;for(c=0,f=s.length;ct!=="borderDash"&&t!=="fill"});function dP(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 jD(e){return l1[e%l1.length]}function BD(e){return hP[e%hP.length]}function Iz(e,t){return e.borderColor=jD(t),e.backgroundColor=BD(t),++t}function Fz(e,t){return e.backgroundColor=e.data.map(()=>jD(t++)),t}function $z(e,t){return e.backgroundColor=e.data.map(()=>BD(t++)),t}function jz(e){let t=0;return(n,r)=>{const i=e.getDatasetMeta(r).controller;i instanceof fs?t=Fz(n,t):i instanceof hf?t=$z(n,t):i&&(t=Iz(n,t))}}function pP(e){let t;for(t in e)if(e[t].borderColor||e[t].backgroundColor)return!0;return!1}var Bz={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,t,n){if(!n.enabled)return;const{options:{elements:r},data:{datasets:i}}=e.config;if(!n.forceOverride&&(pP(i)||r&&pP(r)))return;const o=jz(e);i.forEach(o)}};function zz(e,t,n,r,i){const o=i.samples||r;if(o>=n)return e.slice(t,t+n);const s=[],a=(n-2)/(o-2);let l=0;const c=t+n-1;let f=t,h,p,m,g,v;for(s[l++]=e[f],h=0;hm&&(m=g,p=e[b],v=b);s[l++]=p,f=v}return s[l++]=e[c],s}function Uz(e,t,n,r){let i=0,o=0,s,a,l,c,f,h,p,m,g,v;const w=[],y=t+n-1,b=e[t].x,T=e[y].x-b;for(s=t;sv&&(v=c,p=s),i=(o*i+a.x)/++o;else{const k=s-1;if(!ct(h)&&!ct(p)){const N=Math.min(h,p),D=Math.max(h,p);N!==m&&N!==k&&w.push({...e[N],x:i}),D!==m&&D!==k&&w.push({...e[D],x:i})}s>0&&k!==m&&w.push(e[k]),w.push(a),f=P,o=0,g=v=c,h=p=m=s}}return w}function zD(e){if(e._decimated){const t=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{value:t})}}function mP(e){e.data.datasets.forEach(t=>{zD(t)})}function Vz(e,t){const n=t.length;let r=0,i;const{iScale:o}=e,{min:s,max:a,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(r=Tn(wo(t,o.axis,s).lo,0,n-1)),c?i=Tn(wo(t,o.axis,a).hi+1,r,n)-r:i=n-r,{start:r,count:i}}var Hz={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,t,n)=>{if(!n.enabled){mP(e);return}const r=e.width;e.data.datasets.forEach((i,o)=>{const{_data:s,indexAxis:a}=i,l=e.getDatasetMeta(o),c=s||i.data;if(Yu([a,e.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const f=e.scales[l.xAxisID];if(f.type!=="linear"&&f.type!=="time"||e.options.parsing)return;let{start:h,count:p}=Vz(l,c);const m=n.threshold||4*r;if(p<=m){zD(i);return}ct(s)&&(i._data=c,delete i.data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(v){this._data=v}}));let g;switch(n.algorithm){case"lttb":g=zz(c,h,p,r,n);break;case"min-max":g=Uz(c,h,p,r);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}i._decimated=g})},destroy(e){mP(e)}};function Wz(e,t,n){const r=e.segments,i=e.points,o=t.points,s=[];for(const a of r){let{start:l,end:c}=a;c=Xx(l,c,i);const f=c1(n,i[l],i[c],a.loop);if(!t.segments){s.push({source:a,target:f,start:i[l],end:i[c]});continue}const h=SD(t,f);for(const p of h){const m=c1(n,o[p.start],o[p.end],p.loop),g=xD(a,i,m);for(const v of g)s.push({source:v,target:p,start:{[n]:gP(f,m,"start",Math.max)},end:{[n]:gP(f,m,"end",Math.min)}})}}return s}function c1(e,t,n,r){if(r)return;let i=t[e],o=n[e];return e==="angle"&&(i=Mr(i),o=Mr(o)),{property:e,start:i,end:o}}function Yz(e,t){const{x:n=null,y:r=null}=e||{},i=t.points,o=[];return t.segments.forEach(({start:s,end:a})=>{a=Xx(s,a,i);const l=i[s],c=i[a];r!==null?(o.push({x:l.x,y:r}),o.push({x:c.x,y:r})):n!==null&&(o.push({x:n,y:l.y}),o.push({x:n,y:c.y}))}),o}function Xx(e,t,n){for(;t>e;t--){const r=n[t];if(!isNaN(r.x)&&!isNaN(r.y))break}return t}function gP(e,t,n,r){return e&&t?r(e[n],t[n]):e?e[n]:t?t[n]:0}function UD(e,t){let n=[],r=!1;return Rt(e)?(r=!0,n=e):n=Yz(e,t),n.length?new ds({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function vP(e){return e&&e.fill!==!1}function qz(e,t,n){let i=e[t].fill;const o=[t];let s;if(!n)return i;for(;i!==!1&&o.indexOf(i)===-1;){if(!Zt(i))return i;if(s=e[i],!s)return!1;if(s.visible)return i;o.push(i),i=s.fill}return!1}function Gz(e,t,n){const r=Qz(e);if(ot(r))return isNaN(r.value)?!1:r;let i=parseFloat(r);return Zt(i)&&Math.floor(i)===i?Zz(r[0],t,i,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function Zz(e,t,n,r){return(e==="-"||e==="+")&&(n=t+n),n===t||n<0||n>=r?!1:n}function Kz(e,t){let n=null;return e==="start"?n=t.bottom:e==="end"?n=t.top:ot(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function Xz(e,t,n){let r;return e==="start"?r=n:e==="end"?r=t.options.reverse?t.min:t.max:ot(e)?r=e.value:r=t.getBaseValue(),r}function Qz(e){const t=e.options,n=t.fill;let r=Qe(n&&n.target,n);return r===void 0&&(r=!!t.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function Jz(e){const{scale:t,index:n,line:r}=e,i=[],o=r.segments,s=r.points,a=eU(t,n);a.push(UD({x:null,y:t.bottom},r));for(let l=0;l=0;--s){const a=i[s].$filler;a&&(a.line.updateControlPoints(o,a.axis),r&&a.fill&&x0(e.ctx,a,o))}},beforeDatasetsDraw(e,t,n){if(n.drawTime!=="beforeDatasetsDraw")return;const r=e.getSortedVisibleDatasetMetas();for(let i=r.length-1;i>=0;--i){const o=r[i].$filler;vP(o)&&x0(e.ctx,o,e.chartArea)}},beforeDatasetDraw(e,t,n){const r=t.meta.$filler;!vP(r)||n.drawTime!=="beforeDatasetDraw"||x0(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const wP=(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)}},fU=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class xP extends $o{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=Tt(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=vn(r.font),o=i.size,s=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=wP(r,o);let c,f;n.font=i.string,this.isHorizontal()?(c=this.maxWidth,f=this._fitRows(s,o,a,l)+10):(f=this.maxHeight,c=this._fitCols(s,i,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(f,t.maxHeight||this.maxHeight)}_fitRows(t,n,r,i){const{ctx:o,maxWidth:s,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],f=i+a;let h=t;o.textAlign="left",o.textBaseline="middle";let p=-1,m=-f;return this.legendItems.forEach((g,v)=>{const w=r+n/2+o.measureText(g.text).width;(v===0||c[c.length-1]+w+2*a>s)&&(h+=f,c[c.length-(v>0?0:1)]=0,m+=f,p++),l[v]={left:0,top:m,row:p,width:w,height:i},c[c.length-1]+=w+a}),h}_fitCols(t,n,r,i){const{ctx:o,maxHeight:s,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],f=s-t;let h=a,p=0,m=0,g=0,v=0;return this.legendItems.forEach((w,y)=>{const{itemWidth:b,itemHeight:x}=dU(r,n,o,w,i);y>0&&m+x+2*a>f&&(h+=p+a,c.push({width:p,height:m}),g+=p+a,v++,p=m=0),l[y]={left:g,top:m,col:v,width:b,height:x},p=Math.max(p,b),m+=x+a}),h+=p,c.push({width:p,height:m}),h}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:i},rtl:o}}=this,s=cc(o,this.left,this.width);if(this.isHorizontal()){let a=0,l=Kn(r,this.left+i,this.right-this.lineWidths[a]);for(const c of n)a!==c.row&&(a=c.row,l=Kn(r,this.left+i,this.right-this.lineWidths[a])),c.top+=this.top+t+i,c.left=s.leftForLtr(s.x(l),c.width),l+=c.width+i}else{let a=0,l=Kn(r,this.top+t+i,this.bottom-this.columnSizes[a].height);for(const c of n)c.col!==a&&(a=c.col,l=Kn(r,this.top+t+i,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+i,c.left=s.leftForLtr(s.x(c.left),c.width),l+=c.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;fy(t,this),this._draw(),dy(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:i}=this,{align:o,labels:s}=t,a=rn.color,l=cc(t.rtl,this.left,this.width),c=vn(s.font),{padding:f}=s,h=c.size,p=h/2;let m;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=c.string;const{boxWidth:g,boxHeight:v,itemHeight:w}=wP(s,h),y=function(k,N,D){if(isNaN(g)||g<=0||isNaN(v)||v<0)return;i.save();const z=Qe(D.lineWidth,1);if(i.fillStyle=Qe(D.fillStyle,a),i.lineCap=Qe(D.lineCap,"butt"),i.lineDashOffset=Qe(D.lineDashOffset,0),i.lineJoin=Qe(D.lineJoin,"miter"),i.lineWidth=z,i.strokeStyle=Qe(D.strokeStyle,a),i.setLineDash(Qe(D.lineDash,[])),s.usePointStyle){const A={radius:v*Math.SQRT2/2,pointStyle:D.pointStyle,rotation:D.rotation,borderWidth:z},Y=l.xPlus(k,g/2),q=N+p;uD(i,A,Y,q,s.pointStyleWidth&&g)}else{const A=N+Math.max((h-v)/2,0),Y=l.leftForLtr(k,g),q=$a(D.borderRadius);i.beginPath(),Object.values(q).some(ee=>ee!==0)?Vf(i,{x:Y,y:A,w:g,h:v,radius:q}):i.rect(Y,A,g,v),i.fill(),z!==0&&i.stroke()}i.restore()},b=function(k,N,D){Ga(i,D.text,k,N+w/2,c,{strikethrough:D.hidden,textAlign:l.textAlign(D.textAlign)})},x=this.isHorizontal(),T=this._computeTitleHeight();x?m={x:Kn(o,this.left+f,this.right-r[0]),y:this.top+f+T,line:0}:m={x:this.left+f,y:Kn(o,this.top+T+f,this.bottom-n[0].height),line:0},_D(this.ctx,t.textDirection);const P=w+f;this.legendItems.forEach((k,N)=>{i.strokeStyle=k.fontColor,i.fillStyle=k.fontColor;const D=i.measureText(k.text).width,z=l.textAlign(k.textAlign||(k.textAlign=s.textAlign)),A=g+p+D;let Y=m.x,q=m.y;l.setWidth(this.width),x?N>0&&Y+A+f>this.right&&(q=m.y+=P,m.line++,Y=m.x=Kn(o,this.left+f,this.right-r[m.line])):N>0&&q+P>this.bottom&&(Y=m.x=Y+n[m.line].width+f,m.line++,q=m.y=Kn(o,this.top+T+f,this.bottom-n[m.line].height));const ee=l.x(Y);if(y(ee,q,k),Y=Aj(z,Y+g+p,x?Y+A:this.right,t.rtl),b(l.x(Y),q,k),x)m.x+=A+f;else if(typeof k.text!="string"){const K=c.lineHeight;m.y+=HD(k,K)}else m.y+=P}),bD(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=vn(n.font),i=tr(n.padding);if(!n.display)return;const o=cc(t.rtl,this.left,this.width),s=this.ctx,a=n.position,l=r.size/2,c=i.top+l;let f,h=this.left,p=this.width;if(this.isHorizontal())p=Math.max(...this.lineWidths),f=this.top+c,h=Kn(t.align,h,this.right-p);else{const g=this.columnSizes.reduce((v,w)=>Math.max(v,w.height),0);f=c+Kn(t.align,this.top,this.bottom-g-t.labels.padding-this._computeTitleHeight())}const m=Kn(a,h,h+p);s.textAlign=o.textAlign(Hx(a)),s.textBaseline="middle",s.strokeStyle=n.color,s.fillStyle=n.color,s.font=r.string,Ga(s,n.text,m,f,r)}_computeTitleHeight(){const t=this.options.title,n=vn(t.font),r=tr(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,i,o;if(bo(t,this.left,this.right)&&bo(n,this.top,this.bottom)){for(o=this.legendHitBoxes,r=0;ro.length>s.length?o:s)),t+n.size/2+r.measureText(i).width}function pU(e,t,n){let r=e;return typeof t.text!="string"&&(r=HD(t,n)),r}function HD(e,t){const n=e.text?e.text.length+.5:0;return t*n}function mU(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var gU={id:"legend",_element:xP,start(e,t,n){const r=e.legend=new xP({ctx:e.ctx,options:n,chart:e});Jn.configure(e,r,n),Jn.addBox(e,r)},stop(e){Jn.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;Jn.configure(e,r,n),r.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const r=t.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),t.hidden=!0):(i.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:i,color:o,useBorderRadius:s,borderRadius:a}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(n?0:void 0),f=tr(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(f.width+f.height)/4,strokeStyle:c.borderColor,pointStyle:r||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:s&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class Qx extends $o{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=Rt(r.text)?r.text.length:1;this._padding=tr(r.padding);const o=i*vn(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:r,bottom:i,right:o,options:s}=this,a=s.align;let l=0,c,f,h;return this.isHorizontal()?(f=Kn(a,r,o),h=n+t,c=o-r):(s.position==="left"?(f=r+t,h=Kn(a,i,n),l=jt*-.5):(f=o-t,h=Kn(a,n,i),l=jt*.5),c=i-n),{titleX:f,titleY:h,maxWidth:c,rotation:l}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const r=vn(n.font),o=r.lineHeight/2+this._padding.top,{titleX:s,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(o);Ga(t,n.text,0,0,r,{color:n.color,maxWidth:l,rotation:c,textAlign:Hx(n.align),textBaseline:"middle",translation:[s,a]})}}function vU(e,t){const n=new Qx({ctx:e.ctx,options:t,chart:e});Jn.configure(e,n,t),Jn.addBox(e,n),e.titleBlock=n}var yU={id:"title",_element:Qx,start(e,t,n){vU(e,n)},stop(e){const t=e.titleBlock;Jn.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const r=e.titleBlock;Jn.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Kh=new WeakMap;var _U={id:"subtitle",start(e,t,n){const r=new Qx({ctx:e.ctx,options:n,chart:e});Jn.configure(e,r,n),Jn.addBox(e,r),Kh.set(e,r)},stop(e){Jn.removeBox(e,Kh.get(e)),Kh.delete(e)},beforeUpdate(e,t,n){const r=Kh.get(e);Jn.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Gu={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 hU(e,t){const{element:n,datasetIndex:r,index:i}=t,o=e.getDatasetMeta(r).controller,{label:s,value:a}=o.getLabelAndValue(i);return{chart:e,label:s,parsed:o.getParsed(i),raw:e.data.datasets[r].data[i],formattedValue:a,dataset:o.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function wP(e,t){const n=e.chart.ctx,{body:r,footer:i,title:o}=e,{boxWidth:s,boxHeight:a}=t,l=vn(t.bodyFont),c=vn(t.titleFont),f=vn(t.footerFont),h=o.length,p=i.length,m=r.length,g=tr(t.padding);let v=g.height,w=0,y=r.reduce((T,P)=>T+P.before.length+P.lines.length+P.after.length,0);if(y+=e.beforeBody.length+e.afterBody.length,h&&(v+=h*c.lineHeight+(h-1)*t.titleSpacing+t.titleMarginBottom),y){const T=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;v+=m*T+(y-m)*l.lineHeight+(y-1)*t.bodySpacing}p&&(v+=t.footerMarginTop+p*f.lineHeight+(p-1)*t.footerSpacing);let b=0;const x=function(T){w=Math.max(w,n.measureText(T).width+b)};return n.save(),n.font=c.string,yt(e.title,x),n.font=l.string,yt(e.beforeBody.concat(e.afterBody),x),b=t.displayColors?s+2+t.boxPadding:0,yt(r,T=>{yt(T.before,x),yt(T.lines,x),yt(T.after,x)}),b=0,n.font=f.string,yt(e.footer,x),n.restore(),w+=g.width,{width:w,height:v}}function pU(e,t){const{y:n,height:r}=t;return ne.height-r/2?"bottom":"center"}function mU(e,t,n,r){const{x:i,width:o}=r,s=n.caretSize+n.caretPadding;if(e==="left"&&i+o+s>t.width||e==="right"&&i-o-s<0)return!0}function gU(e,t,n,r){const{x:i,width:o}=n,{width:s,chartArea:{left:a,right:l}}=e;let c="center";return r==="center"?c=i<=(a+l)/2?"left":"right":i<=o/2?c="left":i>=s-o/2&&(c="right"),mU(c,e,t,n)&&(c="center"),c}function xP(e,t,n){const r=n.yAlign||t.yAlign||pU(e,n);return{xAlign:n.xAlign||t.xAlign||gU(e,t,n,r),yAlign:r}}function vU(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function yU(e,t,n){let{y:r,height:i}=e;return t==="top"?r+=n:t==="bottom"?r-=i+n:r-=i/2,r}function SP(e,t,n,r){const{caretSize:i,caretPadding:o,cornerRadius:s}=e,{xAlign:a,yAlign:l}=n,c=i+o,{topLeft:f,topRight:h,bottomLeft:p,bottomRight:m}=$a(s);let g=vU(t,a);const v=yU(t,l,c);return l==="center"?a==="left"?g+=c:a==="right"&&(g-=c):a==="left"?g-=Math.max(f,p)+i:a==="right"&&(g+=Math.max(h,m)+i),{x:Tn(g,0,r.width-t.width),y:Tn(v,0,r.height-t.height)}}function Xh(e,t,n){const r=tr(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function CP(e){return Bi([],ho(e))}function _U(e,t,n){return Zs(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function EP(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const UD={beforeTitle:uo,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"?UD[t].call(n,r):i}var Xb;let TP=(Xb=class extends Fo{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 wD(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=_U(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,i=hr(r,"beforeTitle",this,t),o=hr(r,"title",this,t),s=hr(r,"afterTitle",this,t);let a=[];return a=Bi(a,ho(i)),a=Bi(a,ho(o)),a=Bi(a,ho(s)),a}getBeforeBody(t,n){return CP(hr(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,i=[];return yt(t,o=>{const s={before:[],lines:[],after:[]},a=EP(r,o);Bi(s.before,ho(hr(a,"beforeLabel",this,o))),Bi(s.lines,hr(a,"label",this,o)),Bi(s.after,ho(hr(a,"afterLabel",this,o))),i.push(s)}),i}getAfterBody(t,n){return CP(hr(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,i=hr(r,"beforeFooter",this,t),o=hr(r,"footer",this,t),s=hr(r,"afterFooter",this,t);let a=[];return a=Bi(a,ho(i)),a=Bi(a,ho(o)),a=Bi(a,ho(s)),a}_createItems(t){const n=this._active,r=this.chart.data,i=[],o=[],s=[];let a=[],l,c;for(l=0,c=n.length;lt.filter(f,h,p,r))),t.itemSort&&(a=a.sort((f,h)=>t.itemSort(f,h,r))),yt(a,f=>{const h=EP(t.callbacks,f);i.push(hr(h,"labelColor",this,f)),o.push(hr(h,"labelPointStyle",this,f)),s.push(hr(h,"labelTextColor",this,f))}),this.labelColors=i,this.labelPointStyles=o,this.labelTextColors=s,this.dataPoints=a,a}update(t,n){const r=this.options.setContext(this.getContext()),i=this._active;let o,s=[];if(!i.length)this.opacity!==0&&(o={opacity:0});else{const a=Yu[r.position].call(this,i,this._eventPosition);s=this._createItems(r),this.title=this.getTitle(s,r),this.beforeBody=this.getBeforeBody(s,r),this.body=this.getBody(s,r),this.afterBody=this.getAfterBody(s,r),this.footer=this.getFooter(s,r);const l=this._size=wP(this,r),c=Object.assign({},a,l),f=xP(this.chart,r,c),h=SP(r,c,f,this.chart);this.xAlign=f.xAlign,this.yAlign=f.yAlign,o={opacity:1,x:h.x,y:h.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=s,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,i){const o=this.getCaretPosition(t,r,i);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)}getCaretPosition(t,n,r){const{xAlign:i,yAlign:o}=this,{caretSize:s,cornerRadius:a}=r,{topLeft:l,topRight:c,bottomLeft:f,bottomRight:h}=$a(a),{x:p,y:m}=t,{width:g,height:v}=n;let w,y,b,x,T,P;return o==="center"?(T=m+v/2,i==="left"?(w=p,y=w-s,x=T+s,P=T-s):(w=p+g,y=w+s,x=T-s,P=T+s),b=w):(i==="left"?y=p+Math.max(l,f)+s:i==="right"?y=p+g-Math.max(c,h)-s:y=this.caretX,o==="top"?(x=m,T=x-s,w=y-s,b=y+s):(x=m+v,T=x+s,w=y+s,b=y-s),P=x),{x1:w,x2:y,x3:b,y1:x,y2:T,y3:P}}drawTitle(t,n,r){const i=this.title,o=i.length;let s,a,l;if(o){const c=lc(r.rtl,this.x,this.width);for(t.x=Xh(this,r.titleAlign,r),n.textAlign=c.textAlign(r.titleAlign),n.textBaseline="middle",s=vn(r.titleFont),a=r.titleSpacing,n.fillStyle=r.titleColor,n.font=s.string,l=0;lx!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,Uf(t,{x:w,y:v,w:c,h:l,radius:b}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),Uf(t,{x:y,y:v+1,w:c-2,h:l-2,radius:b}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(w,v,c,l),t.strokeRect(w,v,c,l),t.fillStyle=s.backgroundColor,t.fillRect(y,v+1,c-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:i}=this,{bodySpacing:o,bodyAlign:s,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:f}=r,h=vn(r.bodyFont);let p=h.lineHeight,m=0;const g=lc(r.rtl,this.x,this.width),v=function(D){n.fillText(D,g.x(t.x+m),t.y+p/2),t.y+=p+o},w=g.textAlign(s);let y,b,x,T,P,k,N;for(n.textAlign=s,n.textBaseline="middle",n.font=h.string,t.x=Xh(this,w,r),n.fillStyle=r.bodyColor,yt(this.beforeBody,v),m=a&&w!=="right"?s==="center"?c/2+f:c+2+f:0,T=0,k=i.length;T0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,i=r&&r.x,o=r&&r.y;if(i||o){const s=Yu[t.position].call(this,this._active,this._eventPosition);if(!s)return;const a=this._size=wP(this,t),l=Object.assign({},s,this._size),c=xP(n,t,l),f=SP(t,l,c,n);(i._to!==f.x||o._to!==f.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=s.x,this.caretY=s.y,this._resolveAnimations().update(this,f))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},o={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const s=tr(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(t.save(),t.globalAlpha=r,this.drawBackground(o,t,i,n),gD(t,n.textDirection),o.y+=s.top,this.drawTitle(o,t,n),this.drawBody(o,t,n),this.drawFooter(o,t,n),vD(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,i=t.map(({datasetIndex:a,index:l})=>{const c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[l],index:l}}),o=!sg(r,i),s=this._positionChanged(i,n);(o||s)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,o=this._active||[],s=this._getActiveElements(t,o,n,r),a=this._positionChanged(s,t),l=n||!sg(s,o)||a;return l&&(this._active=s,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,r,i){const o=this.options;if(t.type==="mouseout")return[];if(!i)return n;const s=this.chart.getElementsAtEventForMode(t,o.mode,o,r);return o.reverse&&s.reverse(),s}_positionChanged(t,n){const{caretX:r,caretY:i,options:o}=this,s=Yu[o.position].call(this,t,n);return s!==!1&&(r!==s.x||i!==s.y)}},Se(Xb,"positioners",Yu),Xb);var bU={id:"tooltip",_element:TP,positioners:Yu,afterInit(e,t,n){n&&(e.tooltip=new TP({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:UD},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"]},wU=Object.freeze({__proto__:null,Colors:Lz,Decimation:Fz,Filler:rU,Legend:cU,SubTitle:dU,Title:fU,Tooltip:bU});const xU=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function SU(e,t,n,r){const i=e.indexOf(t);if(i===-1)return xU(e,t,n,r);const o=e.lastIndexOf(t);return i!==o?n:i}const CU=(e,t)=>e===null?null:Tn(Math.round(e),0,t);function OP(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}}Se(l1,"id","category"),Se(l1,"defaults",{ticks:{callback:OP}});function EU(e,t){const n=[],{bounds:i,step:o,min:s,max:a,precision:l,count:c,maxTicks:f,maxDigits:h,includeBounds:p}=e,m=o||1,g=f-1,{min:v,max:w}=t,y=!ct(s),b=!ct(a),x=!ct(c),T=(w-v)/(h+1);let P=SO((w-v)/g/m)*m,k,N,D,z;if(P<1e-14&&!y&&!b)return[{value:v},{value:w}];z=Math.ceil(w/P)-Math.floor(v/P),z>g&&(P=SO(z*P/g/m)*m),ct(l)||(k=Math.pow(10,l),P=Math.ceil(P*k)/k),i==="ticks"?(N=Math.floor(v/P)*P,D=Math.ceil(w/P)*P):(N=v,D=w),y&&b&&o&&wj((a-s)/o,P/1e3)?(z=Math.round(Math.min((a-s)/P,f)),P=(a-s)/z,N=s,D=a):x?(N=y?s:N,D=b?a:D,z=c-1,P=(D-N)/z):(z=(D-N)/P,af(z,Math.round(z),P/1e3)?z=Math.round(z):z=Math.ceil(z));const A=Math.max(CO(P),CO(N));k=Math.pow(10,ct(l)?A:l),N=Math.round(N*k)/k,D=Math.round(D*k)/k;let Y=0;for(y&&(p&&N!==s?(n.push({value:s}),Ni=n?i:l,a=l=>o=r?o:l;if(t){const l=Zi(i),c=Zi(o);l<0&&c<0?a(0):l>0&&c>0&&s(0)}if(i===o){let l=o===0?1:Math.abs(o*.05);a(o+l),t||s(i-l)}this.min=i,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=t,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},o=this._range||this,s=EU(i,o);return t.bounds==="ticks"&&XL(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const t=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const i=(r-n)/Math.max(t.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return Id(t,this.chart.options.locale,this.options.ticks.format)}}class c1 extends pg{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=Zt(t)?t:0,this.max=Zt(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=_i(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}}Se(c1,"id","linear"),Se(c1,"defaults",{ticks:{callback:ly.formatters.numeric}});const Hf=e=>Math.floor(cs(e)),ya=(e,t)=>Math.pow(10,Hf(e)+t);function kP(e){return e/Math.pow(10,Hf(e))===1}function MP(e,t,n){const r=Math.pow(10,n),i=Math.floor(e/r);return Math.ceil(t/r)-i}function TU(e,t){const n=t-e;let r=Hf(n);for(;MP(e,t,r)>10;)r++;for(;MP(e,t,r)<10;)r--;return Math.min(r,Hf(e))}function OU(e,{min:t,max:n}){t=Pr(e.min,t);const r=[],i=Hf(t);let o=TU(t,n),s=o<0?Math.pow(10,Math.abs(o)):1;const a=Math.pow(10,o),l=i>o?Math.pow(10,i):0,c=Math.round((t-l)*s)/s,f=Math.floor((t-l)/a/10)*a*10;let h=Math.floor((c-f)/Math.pow(10,o)),p=Pr(e.min,Math.round((l+f+h*Math.pow(10,o))*s)/s);for(;p=10?h=h<15?15:20:h++,h>=20&&(o++,h=2,s=o>=0?1:s),p=Math.round((l+f+h*Math.pow(10,o))*s)/s;const m=Pr(e.max,p);return r.push({value:m,major:kP(m),significand:h}),r}class u1 extends fl{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){const r=pg.prototype.parse.apply(this,[t,n]);if(r===0){this._zero=!0;return}return Zt(r)&&r>0?r:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=Zt(t)?Math.max(0,t):null,this.max=Zt(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!Zt(this._userMin)&&(this.min=t===ya(this.min,0)?ya(this.min,-1):ya(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let r=this.min,i=this.max;const o=a=>r=t?r:a,s=a=>i=n?i:a;r===i&&(r<=0?(o(1),s(10)):(o(ya(r,-1)),s(ya(i,1)))),r<=0&&o(ya(i,-1)),i<=0&&s(ya(r,1)),this.min=r,this.max=i}buildTicks(){const t=this.options,n={min:this._userMin,max:this._userMax},r=OU(n,this);return t.bounds==="ticks"&&XL(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":Id(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=cs(t),this._valueRange=cs(this.max)-cs(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(cs(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}Se(u1,"id","logarithmic"),Se(u1,"defaults",{ticks:{callback:ly.formatters.logarithmic,major:{enabled:!0}}});function f1(e){const t=e.ticks;if(t.display&&e.display){const n=tr(t.backdropPadding);return Qe(t.font&&t.font.size,rn.font.size)+n.height}return 0}function PU(e,t,n){return n=Rt(n)?n:[n],{w:$j(e,t.string,n),h:n.length*t.lineHeight}}function RP(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 kU(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),r=[],i=[],o=e._pointLabels.length,s=e.options.pointLabels,a=s.centerPointLabels?jt/o:0;for(let l=0;lt.r&&(a=(r.end-t.r)/o,e.r=Math.max(e.r,t.r+a)),i.startt.b&&(l=(i.end-t.b)/s,e.b=Math.max(e.b,t.b+l))}function RU(e,t,n){const r=[],i=e._pointLabels.length,o=e.options,s=f1(o)/2,a=e.drawingArea,l=o.pointLabels.centerPointLabels?jt/i:0;for(let c=0;c270||n<90)&&(e-=t),e}function AU(e,t){const{ctx:n,options:{pointLabels:r}}=e;for(let i=t-1;i>=0;i--){const o=r.setContext(e.getPointLabelContext(i)),s=vn(o.font),{x:a,y:l,textAlign:c,left:f,top:h,right:p,bottom:m}=e._pointLabelItems[i],{backdropColor:g}=o;if(!ct(g)){const v=$a(o.borderRadius),w=tr(o.backdropPadding);n.fillStyle=g;const y=f-w.left,b=h-w.top,x=p-f+w.width,T=m-h+w.height;Object.values(v).some(P=>P!==0)?(n.beginPath(),Uf(n,{x:y,y:b,w:x,h:T,radius:v}),n.fill()):n.fillRect(y,b,x,T)}Ga(n,e._pointLabels[i],a,l+s.lineHeight/2,s,{color:o.color,textAlign:c,textBaseline:"middle"})}}function VD(e,t,n,r){const{ctx:i}=e;if(n)i.arc(e.xCenter,e.yCenter,t,0,Nt);else{let o=e.getPointPosition(0,t);i.moveTo(o.x,o.y);for(let s=1;s{const i=Tt(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?kU(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=Nt/(this._pointLabels.length||1),r=this.options.startAngle||0;return Mr(t*n+_i(r))}getDistanceFromCenterForValue(t){if(ct(t))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*n:(t-this.min)*n}getValueForDistanceFromCenter(t){if(ct(t))return NaN;const n=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(t){const n=this._pointLabels||[];if(t>=0&&t{if(h!==0){l=this.getDistanceFromCenterForValue(f.value);const p=this.getContext(h),m=i.setContext(p),g=o.setContext(p);IU(this,m,l,s,g)}}),r.display){for(t.save(),a=s-1;a>=0;a--){const f=r.setContext(this.getPointLabelContext(a)),{color:h,lineWidth:p}=f;!p||!h||(t.lineWidth=p,t.strokeStyle=h,t.setLineDash(f.borderDash),t.lineDashOffset=f.borderDashOffset,l=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),c=this.getPointPosition(a,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,n=this.options,r=n.ticks;if(!r.display)return;const i=this.getIndexAngle(0);let o,s;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(i),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&!n.reverse)return;const c=r.setContext(this.getContext(l)),f=vn(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=f.string,s=t.measureText(a.label).width,t.fillStyle=c.backdropColor;const h=tr(c.backdropPadding);t.fillRect(-s/2-h.left,-o-f.size/2-h.top,s+h.width,f.size+h.height)}Ga(t,a.label,0,-o,f,{color:c.color})}),t.restore()}drawTitle(){}}Se(qu,"id","radialLinear"),Se(qu,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:ly.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),Se(qu,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),Se(qu,"descriptors",{angleLines:{_fallback:"grid"}});const hy={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}},gr=Object.keys(hy);function $U(e,t){return e-t}function NP(e,t){if(ct(t))return null;const n=e._adapter,{parser:r,round:i,isoWeekday:o}=e._parseOpts;let s=t;return typeof r=="function"&&(s=r(s)),Zt(s)||(s=typeof r=="string"?n.parse(s,r):n.parse(s)),s===null?null:(i&&(s=i==="week"&&(Cc(o)||o===!0)?n.startOf(s,"isoWeek",o):n.startOf(s,i)),+s)}function LP(e,t,n,r){const i=gr.length;for(let o=gr.indexOf(e);o=gr.indexOf(n);o--){const s=gr[o];if(hy[s].common&&e._adapter.diff(i,r,s)>=t-1)return s}return gr[n?gr.indexOf(n):0]}function BU(e){for(let t=gr.indexOf(e)+1,n=gr.length;t=t?n[r]:n[i];e[o]=!0}}function zU(e,t,n,r){const i=e._adapter,o=+i.startOf(t[0].value,r),s=t[t.length-1].value;let a,l;for(a=o;a<=s;a=+i.add(a,1,r))l=n[a],l>=0&&(t[l].major=!0);return t}function AP(e,t,n){const r=[],i={},o=t.length;let s,a;for(s=0;s+t.value))}initOffsets(t=[]){let n=0,r=0,i,o;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?r=o:r=(o-this.getDecimalForValue(t[t.length-2]))/2);const s=t.length<3?.5:.25;n=Tn(n,0,s),r=Tn(r,0,s),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,i=this.options,o=i.time,s=o.unit||LP(o.minUnit,n,r,this._getLabelCapacity(n)),a=Qe(i.ticks.stepSize,1),l=s==="week"?o.isoWeekday:!1,c=Cc(l)||l===!0,f={};let h=n,p,m;if(c&&(h=+t.startOf(h,"isoWeek",l)),h=+t.startOf(h,c?"day":s),t.diff(r,n,s)>1e5*a)throw new Error(n+" and "+r+" are too far apart with stepSize of "+a+" "+s);const g=i.ticks.source==="data"&&this.getDataTimestamps();for(p=h,m=0;pv-w).map(v=>+v)}getLabelForValue(t){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}_tickFormatFunction(t,n,r,i){const o=this.options,s=o.ticks.callback;if(s)return Tt(s,[t,n,r],this);const a=o.time.displayFormats,l=this._unit,c=this._majorUnit,f=l&&a[l],h=c&&a[c],p=r[n],m=c&&h&&p&&p.major;return this._adapter.format(t,i||(m?h:f))}generateTickLabels(t){let n,r,i;for(n=0,r=t.length;n0?a:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n=e[r].pos&&t<=e[i].pos&&({lo:r,hi:i}=wo(e,"pos",t)),{pos:o,time:a}=e[r],{pos:s,time:l}=e[i]):(t>=e[r].time&&t<=e[i].time&&({lo:r,hi:i}=wo(e,"time",t)),{time:o,pos:a}=e[r],{time:s,pos:l}=e[i]);const c=s-o;return c?a+(l-a)*(t-o)/c:a}class d1 extends Wf{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=Qh(n,this.min),this._tableRange=Qh(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,i=[],o=[];let s,a,l,c,f;for(s=0,a=t.length;s=n&&c<=r&&i.push(c);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(s=0,a=i.length;sT+P.before.length+P.lines.length+P.after.length,0);if(y+=e.beforeBody.length+e.afterBody.length,h&&(v+=h*c.lineHeight+(h-1)*t.titleSpacing+t.titleMarginBottom),y){const T=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;v+=m*T+(y-m)*l.lineHeight+(y-1)*t.bodySpacing}p&&(v+=t.footerMarginTop+p*f.lineHeight+(p-1)*t.footerSpacing);let b=0;const x=function(T){w=Math.max(w,n.measureText(T).width+b)};return n.save(),n.font=c.string,vt(e.title,x),n.font=l.string,vt(e.beforeBody.concat(e.afterBody),x),b=t.displayColors?s+2+t.boxPadding:0,vt(r,T=>{vt(T.before,x),vt(T.lines,x),vt(T.after,x)}),b=0,n.font=f.string,vt(e.footer,x),n.restore(),w+=g.width,{width:w,height:v}}function wU(e,t){const{y:n,height:r}=t;return ne.height-r/2?"bottom":"center"}function xU(e,t,n,r){const{x:i,width:o}=r,s=n.caretSize+n.caretPadding;if(e==="left"&&i+o+s>t.width||e==="right"&&i-o-s<0)return!0}function SU(e,t,n,r){const{x:i,width:o}=n,{width:s,chartArea:{left:a,right:l}}=e;let c="center";return r==="center"?c=i<=(a+l)/2?"left":"right":i<=o/2?c="left":i>=s-o/2&&(c="right"),xU(c,e,t,n)&&(c="center"),c}function CP(e,t,n){const r=n.yAlign||t.yAlign||wU(e,n);return{xAlign:n.xAlign||t.xAlign||SU(e,t,n,r),yAlign:r}}function CU(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function EU(e,t,n){let{y:r,height:i}=e;return t==="top"?r+=n:t==="bottom"?r-=i+n:r-=i/2,r}function EP(e,t,n,r){const{caretSize:i,caretPadding:o,cornerRadius:s}=e,{xAlign:a,yAlign:l}=n,c=i+o,{topLeft:f,topRight:h,bottomLeft:p,bottomRight:m}=$a(s);let g=CU(t,a);const v=EU(t,l,c);return l==="center"?a==="left"?g+=c:a==="right"&&(g-=c):a==="left"?g-=Math.max(f,p)+i:a==="right"&&(g+=Math.max(h,m)+i),{x:Tn(g,0,r.width-t.width),y:Tn(v,0,r.height-t.height)}}function Xh(e,t,n){const r=tr(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function TP(e){return Bi([],ho(e))}function TU(e,t,n){return Zs(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function OP(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const WD={beforeTitle:uo,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"?WD[t].call(n,r):i}var Jb;let PP=(Jb=class extends $o{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 CD(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=TU(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,i=hr(r,"beforeTitle",this,t),o=hr(r,"title",this,t),s=hr(r,"afterTitle",this,t);let a=[];return a=Bi(a,ho(i)),a=Bi(a,ho(o)),a=Bi(a,ho(s)),a}getBeforeBody(t,n){return TP(hr(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,i=[];return vt(t,o=>{const s={before:[],lines:[],after:[]},a=OP(r,o);Bi(s.before,ho(hr(a,"beforeLabel",this,o))),Bi(s.lines,hr(a,"label",this,o)),Bi(s.after,ho(hr(a,"afterLabel",this,o))),i.push(s)}),i}getAfterBody(t,n){return TP(hr(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,i=hr(r,"beforeFooter",this,t),o=hr(r,"footer",this,t),s=hr(r,"afterFooter",this,t);let a=[];return a=Bi(a,ho(i)),a=Bi(a,ho(o)),a=Bi(a,ho(s)),a}_createItems(t){const n=this._active,r=this.chart.data,i=[],o=[],s=[];let a=[],l,c;for(l=0,c=n.length;lt.filter(f,h,p,r))),t.itemSort&&(a=a.sort((f,h)=>t.itemSort(f,h,r))),vt(a,f=>{const h=OP(t.callbacks,f);i.push(hr(h,"labelColor",this,f)),o.push(hr(h,"labelPointStyle",this,f)),s.push(hr(h,"labelTextColor",this,f))}),this.labelColors=i,this.labelPointStyles=o,this.labelTextColors=s,this.dataPoints=a,a}update(t,n){const r=this.options.setContext(this.getContext()),i=this._active;let o,s=[];if(!i.length)this.opacity!==0&&(o={opacity:0});else{const a=Gu[r.position].call(this,i,this._eventPosition);s=this._createItems(r),this.title=this.getTitle(s,r),this.beforeBody=this.getBeforeBody(s,r),this.body=this.getBody(s,r),this.afterBody=this.getAfterBody(s,r),this.footer=this.getFooter(s,r);const l=this._size=SP(this,r),c=Object.assign({},a,l),f=CP(this.chart,r,c),h=EP(r,c,f,this.chart);this.xAlign=f.xAlign,this.yAlign=f.yAlign,o={opacity:1,x:h.x,y:h.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=s,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,i){const o=this.getCaretPosition(t,r,i);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)}getCaretPosition(t,n,r){const{xAlign:i,yAlign:o}=this,{caretSize:s,cornerRadius:a}=r,{topLeft:l,topRight:c,bottomLeft:f,bottomRight:h}=$a(a),{x:p,y:m}=t,{width:g,height:v}=n;let w,y,b,x,T,P;return o==="center"?(T=m+v/2,i==="left"?(w=p,y=w-s,x=T+s,P=T-s):(w=p+g,y=w+s,x=T-s,P=T+s),b=w):(i==="left"?y=p+Math.max(l,f)+s:i==="right"?y=p+g-Math.max(c,h)-s:y=this.caretX,o==="top"?(x=m,T=x-s,w=y-s,b=y+s):(x=m+v,T=x+s,w=y+s,b=y-s),P=x),{x1:w,x2:y,x3:b,y1:x,y2:T,y3:P}}drawTitle(t,n,r){const i=this.title,o=i.length;let s,a,l;if(o){const c=cc(r.rtl,this.x,this.width);for(t.x=Xh(this,r.titleAlign,r),n.textAlign=c.textAlign(r.titleAlign),n.textBaseline="middle",s=vn(r.titleFont),a=r.titleSpacing,n.fillStyle=r.titleColor,n.font=s.string,l=0;lx!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,Vf(t,{x:w,y:v,w:c,h:l,radius:b}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),Vf(t,{x:y,y:v+1,w:c-2,h:l-2,radius:b}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(w,v,c,l),t.strokeRect(w,v,c,l),t.fillStyle=s.backgroundColor,t.fillRect(y,v+1,c-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:i}=this,{bodySpacing:o,bodyAlign:s,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:f}=r,h=vn(r.bodyFont);let p=h.lineHeight,m=0;const g=cc(r.rtl,this.x,this.width),v=function(D){n.fillText(D,g.x(t.x+m),t.y+p/2),t.y+=p+o},w=g.textAlign(s);let y,b,x,T,P,k,N;for(n.textAlign=s,n.textBaseline="middle",n.font=h.string,t.x=Xh(this,w,r),n.fillStyle=r.bodyColor,vt(this.beforeBody,v),m=a&&w!=="right"?s==="center"?c/2+f:c+2+f:0,T=0,k=i.length;T0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,i=r&&r.x,o=r&&r.y;if(i||o){const s=Gu[t.position].call(this,this._active,this._eventPosition);if(!s)return;const a=this._size=SP(this,t),l=Object.assign({},s,this._size),c=CP(n,t,l),f=EP(t,l,c,n);(i._to!==f.x||o._to!==f.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=s.x,this.caretY=s.y,this._resolveAnimations().update(this,f))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},o={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const s=tr(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(t.save(),t.globalAlpha=r,this.drawBackground(o,t,i,n),_D(t,n.textDirection),o.y+=s.top,this.drawTitle(o,t,n),this.drawBody(o,t,n),this.drawFooter(o,t,n),bD(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,i=t.map(({datasetIndex:a,index:l})=>{const c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[l],index:l}}),o=!ag(r,i),s=this._positionChanged(i,n);(o||s)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,o=this._active||[],s=this._getActiveElements(t,o,n,r),a=this._positionChanged(s,t),l=n||!ag(s,o)||a;return l&&(this._active=s,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,r,i){const o=this.options;if(t.type==="mouseout")return[];if(!i)return n;const s=this.chart.getElementsAtEventForMode(t,o.mode,o,r);return o.reverse&&s.reverse(),s}_positionChanged(t,n){const{caretX:r,caretY:i,options:o}=this,s=Gu[o.position].call(this,t,n);return s!==!1&&(r!==s.x||i!==s.y)}},Se(Jb,"positioners",Gu),Jb);var OU={id:"tooltip",_element:PP,positioners:Gu,afterInit(e,t,n){n&&(e.tooltip=new PP({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:WD},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},PU=Object.freeze({__proto__:null,Colors:Bz,Decimation:Hz,Filler:uU,Legend:gU,SubTitle:_U,Title:yU,Tooltip:OU});const kU=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function MU(e,t,n,r){const i=e.indexOf(t);if(i===-1)return kU(e,t,n,r);const o=e.lastIndexOf(t);return i!==o?n:i}const RU=(e,t)=>e===null?null:Tn(Math.round(e),0,t);function kP(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}}Se(u1,"id","category"),Se(u1,"defaults",{ticks:{callback:kP}});function NU(e,t){const n=[],{bounds:i,step:o,min:s,max:a,precision:l,count:c,maxTicks:f,maxDigits:h,includeBounds:p}=e,m=o||1,g=f-1,{min:v,max:w}=t,y=!ct(s),b=!ct(a),x=!ct(c),T=(w-v)/(h+1);let P=EO((w-v)/g/m)*m,k,N,D,z;if(P<1e-14&&!y&&!b)return[{value:v},{value:w}];z=Math.ceil(w/P)-Math.floor(v/P),z>g&&(P=EO(z*P/g/m)*m),ct(l)||(k=Math.pow(10,l),P=Math.ceil(P*k)/k),i==="ticks"?(N=Math.floor(v/P)*P,D=Math.ceil(w/P)*P):(N=v,D=w),y&&b&&o&&Pj((a-s)/o,P/1e3)?(z=Math.round(Math.min((a-s)/P,f)),P=(a-s)/z,N=s,D=a):x?(N=y?s:N,D=b?a:D,z=c-1,P=(D-N)/z):(z=(D-N)/P,lf(z,Math.round(z),P/1e3)?z=Math.round(z):z=Math.ceil(z));const A=Math.max(TO(P),TO(N));k=Math.pow(10,ct(l)?A:l),N=Math.round(N*k)/k,D=Math.round(D*k)/k;let Y=0;for(y&&(p&&N!==s?(n.push({value:s}),Ni=n?i:l,a=l=>o=r?o:l;if(t){const l=Zi(i),c=Zi(o);l<0&&c<0?a(0):l>0&&c>0&&s(0)}if(i===o){let l=o===0?1:Math.abs(o*.05);a(o+l),t||s(i-l)}this.min=i,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=t,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},o=this._range||this,s=NU(i,o);return t.bounds==="ticks"&&eD(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const t=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const i=(r-n)/Math.max(t.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return Id(t,this.chart.options.locale,this.options.ticks.format)}}class f1 extends mg{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=Zt(t)?t:0,this.max=Zt(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=_i(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}}Se(f1,"id","linear"),Se(f1,"defaults",{ticks:{callback:uy.formatters.numeric}});const Wf=e=>Math.floor(us(e)),ya=(e,t)=>Math.pow(10,Wf(e)+t);function RP(e){return e/Math.pow(10,Wf(e))===1}function NP(e,t,n){const r=Math.pow(10,n),i=Math.floor(e/r);return Math.ceil(t/r)-i}function LU(e,t){const n=t-e;let r=Wf(n);for(;NP(e,t,r)>10;)r++;for(;NP(e,t,r)<10;)r--;return Math.min(r,Wf(e))}function DU(e,{min:t,max:n}){t=Pr(e.min,t);const r=[],i=Wf(t);let o=LU(t,n),s=o<0?Math.pow(10,Math.abs(o)):1;const a=Math.pow(10,o),l=i>o?Math.pow(10,i):0,c=Math.round((t-l)*s)/s,f=Math.floor((t-l)/a/10)*a*10;let h=Math.floor((c-f)/Math.pow(10,o)),p=Pr(e.min,Math.round((l+f+h*Math.pow(10,o))*s)/s);for(;p=10?h=h<15?15:20:h++,h>=20&&(o++,h=2,s=o>=0?1:s),p=Math.round((l+f+h*Math.pow(10,o))*s)/s;const m=Pr(e.max,p);return r.push({value:m,major:RP(m),significand:h}),r}class d1 extends fl{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){const r=mg.prototype.parse.apply(this,[t,n]);if(r===0){this._zero=!0;return}return Zt(r)&&r>0?r:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=Zt(t)?Math.max(0,t):null,this.max=Zt(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!Zt(this._userMin)&&(this.min=t===ya(this.min,0)?ya(this.min,-1):ya(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let r=this.min,i=this.max;const o=a=>r=t?r:a,s=a=>i=n?i:a;r===i&&(r<=0?(o(1),s(10)):(o(ya(r,-1)),s(ya(i,1)))),r<=0&&o(ya(i,-1)),i<=0&&s(ya(r,1)),this.min=r,this.max=i}buildTicks(){const t=this.options,n={min:this._userMin,max:this._userMax},r=DU(n,this);return t.bounds==="ticks"&&eD(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":Id(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=us(t),this._valueRange=us(this.max)-us(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(us(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}Se(d1,"id","logarithmic"),Se(d1,"defaults",{ticks:{callback:uy.formatters.logarithmic,major:{enabled:!0}}});function h1(e){const t=e.ticks;if(t.display&&e.display){const n=tr(t.backdropPadding);return Qe(t.font&&t.font.size,rn.font.size)+n.height}return 0}function AU(e,t,n){return n=Rt(n)?n:[n],{w:Wj(e,t.string,n),h:n.length*t.lineHeight}}function LP(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 IU(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),r=[],i=[],o=e._pointLabels.length,s=e.options.pointLabels,a=s.centerPointLabels?jt/o:0;for(let l=0;lt.r&&(a=(r.end-t.r)/o,e.r=Math.max(e.r,t.r+a)),i.startt.b&&(l=(i.end-t.b)/s,e.b=Math.max(e.b,t.b+l))}function $U(e,t,n){const r=[],i=e._pointLabels.length,o=e.options,s=h1(o)/2,a=e.drawingArea,l=o.pointLabels.centerPointLabels?jt/i:0;for(let c=0;c270||n<90)&&(e-=t),e}function UU(e,t){const{ctx:n,options:{pointLabels:r}}=e;for(let i=t-1;i>=0;i--){const o=r.setContext(e.getPointLabelContext(i)),s=vn(o.font),{x:a,y:l,textAlign:c,left:f,top:h,right:p,bottom:m}=e._pointLabelItems[i],{backdropColor:g}=o;if(!ct(g)){const v=$a(o.borderRadius),w=tr(o.backdropPadding);n.fillStyle=g;const y=f-w.left,b=h-w.top,x=p-f+w.width,T=m-h+w.height;Object.values(v).some(P=>P!==0)?(n.beginPath(),Vf(n,{x:y,y:b,w:x,h:T,radius:v}),n.fill()):n.fillRect(y,b,x,T)}Ga(n,e._pointLabels[i],a,l+s.lineHeight/2,s,{color:o.color,textAlign:c,textBaseline:"middle"})}}function YD(e,t,n,r){const{ctx:i}=e;if(n)i.arc(e.xCenter,e.yCenter,t,0,Nt);else{let o=e.getPointPosition(0,t);i.moveTo(o.x,o.y);for(let s=1;s{const i=Tt(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?IU(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=Nt/(this._pointLabels.length||1),r=this.options.startAngle||0;return Mr(t*n+_i(r))}getDistanceFromCenterForValue(t){if(ct(t))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*n:(t-this.min)*n}getValueForDistanceFromCenter(t){if(ct(t))return NaN;const n=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(t){const n=this._pointLabels||[];if(t>=0&&t{if(h!==0){l=this.getDistanceFromCenterForValue(f.value);const p=this.getContext(h),m=i.setContext(p),g=o.setContext(p);VU(this,m,l,s,g)}}),r.display){for(t.save(),a=s-1;a>=0;a--){const f=r.setContext(this.getPointLabelContext(a)),{color:h,lineWidth:p}=f;!p||!h||(t.lineWidth=p,t.strokeStyle=h,t.setLineDash(f.borderDash),t.lineDashOffset=f.borderDashOffset,l=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),c=this.getPointPosition(a,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,n=this.options,r=n.ticks;if(!r.display)return;const i=this.getIndexAngle(0);let o,s;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(i),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&!n.reverse)return;const c=r.setContext(this.getContext(l)),f=vn(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=f.string,s=t.measureText(a.label).width,t.fillStyle=c.backdropColor;const h=tr(c.backdropPadding);t.fillRect(-s/2-h.left,-o-f.size/2-h.top,s+h.width,f.size+h.height)}Ga(t,a.label,0,-o,f,{color:c.color})}),t.restore()}drawTitle(){}}Se(Zu,"id","radialLinear"),Se(Zu,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:uy.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),Se(Zu,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),Se(Zu,"descriptors",{angleLines:{_fallback:"grid"}});const my={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}},gr=Object.keys(my);function WU(e,t){return e-t}function DP(e,t){if(ct(t))return null;const n=e._adapter,{parser:r,round:i,isoWeekday:o}=e._parseOpts;let s=t;return typeof r=="function"&&(s=r(s)),Zt(s)||(s=typeof r=="string"?n.parse(s,r):n.parse(s)),s===null?null:(i&&(s=i==="week"&&(Ec(o)||o===!0)?n.startOf(s,"isoWeek",o):n.startOf(s,i)),+s)}function AP(e,t,n,r){const i=gr.length;for(let o=gr.indexOf(e);o=gr.indexOf(n);o--){const s=gr[o];if(my[s].common&&e._adapter.diff(i,r,s)>=t-1)return s}return gr[n?gr.indexOf(n):0]}function qU(e){for(let t=gr.indexOf(e)+1,n=gr.length;t=t?n[r]:n[i];e[o]=!0}}function GU(e,t,n,r){const i=e._adapter,o=+i.startOf(t[0].value,r),s=t[t.length-1].value;let a,l;for(a=o;a<=s;a=+i.add(a,1,r))l=n[a],l>=0&&(t[l].major=!0);return t}function FP(e,t,n){const r=[],i={},o=t.length;let s,a;for(s=0;s+t.value))}initOffsets(t=[]){let n=0,r=0,i,o;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?r=o:r=(o-this.getDecimalForValue(t[t.length-2]))/2);const s=t.length<3?.5:.25;n=Tn(n,0,s),r=Tn(r,0,s),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,i=this.options,o=i.time,s=o.unit||AP(o.minUnit,n,r,this._getLabelCapacity(n)),a=Qe(i.ticks.stepSize,1),l=s==="week"?o.isoWeekday:!1,c=Ec(l)||l===!0,f={};let h=n,p,m;if(c&&(h=+t.startOf(h,"isoWeek",l)),h=+t.startOf(h,c?"day":s),t.diff(r,n,s)>1e5*a)throw new Error(n+" and "+r+" are too far apart with stepSize of "+a+" "+s);const g=i.ticks.source==="data"&&this.getDataTimestamps();for(p=h,m=0;pv-w).map(v=>+v)}getLabelForValue(t){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}_tickFormatFunction(t,n,r,i){const o=this.options,s=o.ticks.callback;if(s)return Tt(s,[t,n,r],this);const a=o.time.displayFormats,l=this._unit,c=this._majorUnit,f=l&&a[l],h=c&&a[c],p=r[n],m=c&&h&&p&&p.major;return this._adapter.format(t,i||(m?h:f))}generateTickLabels(t){let n,r,i;for(n=0,r=t.length;n0?a:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n=e[r].pos&&t<=e[i].pos&&({lo:r,hi:i}=wo(e,"pos",t)),{pos:o,time:a}=e[r],{pos:s,time:l}=e[i]):(t>=e[r].time&&t<=e[i].time&&({lo:r,hi:i}=wo(e,"time",t)),{time:o,pos:a}=e[r],{time:s,pos:l}=e[i]);const c=s-o;return c?a+(l-a)*(t-o)/c:a}class p1 extends Yf{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=Qh(n,this.min),this._tableRange=Qh(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,i=[],o=[];let s,a,l,c,f;for(s=0,a=t.length;s=n&&c<=r&&i.push(c);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(s=0,a=i.length;st in e?g7(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */(function(e){function t(Z,$){var I=Z.length;Z.push($);e:for(;0>>1,re=Z[B];if(0>>1;Bi(ne,I))aei(me,ne)?(Z[B]=me,Z[ae]=I,B=ae):(Z[B]=ne,Z[G]=I,B=G);else if(aei(me,I))Z[B]=me,Z[ae]=I,B=ae;else break e}}return $}function i(Z,$){var I=Z.sortIndex-$.sortIndex;return I!==0?I:Z.id-$.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],c=[],f=1,h=null,p=3,m=!1,g=!1,v=!1,w=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(Z){for(var $=n(c);$!==null;){if($.callback===null)r(c);else if($.startTime<=Z)r(c),$.sortIndex=$.expirationTime,t(l,$);else break;$=n(c)}}function T(Z){if(v=!1,x(Z),!g)if(n(l)!==null)g=!0,oe(P);else{var $=n(c);$!==null&&se(T,$.startTime-Z)}}function P(Z,$){g=!1,v&&(v=!1,y(D),D=-1),m=!0;var I=p;try{for(x($),h=n(l);h!==null&&(!(h.expirationTime>$)||Z&&!Y());){var B=h.callback;if(typeof B=="function"){h.callback=null,p=h.priorityLevel;var re=B(h.expirationTime<=$);$=e.unstable_now(),typeof re=="function"?h.callback=re:h===n(l)&&r(l),x($)}else r(l);h=n(l)}if(h!==null)var W=!0;else{var G=n(c);G!==null&&se(T,G.startTime-$),W=!1}return W}finally{h=null,p=I,m=!1}}var k=!1,N=null,D=-1,z=5,A=-1;function Y(){return!(e.unstable_now()-AZ||125B?(Z.sortIndex=I,t(c,Z),n(l)===null&&Z===n(c)&&(v?(y(D),D=-1):v=!0,se(T,I-B))):(Z.sortIndex=re,t(l,Z),g||m||(g=!0,oe(P))),Z},e.unstable_shouldYield=Y,e.unstable_wrapCallback=function(Z){var $=p;return function(){var I=p;p=$;try{return Z.apply(this,arguments)}finally{p=I}}}})(HD);(function(e){e.exports=HD})(WU);/** + */(function(e){function t(Z,$){var I=Z.length;Z.push($);e:for(;0>>1,re=Z[B];if(0>>1;Bi(ne,I))aei(me,ne)?(Z[B]=me,Z[ae]=I,B=ae):(Z[B]=ne,Z[G]=I,B=G);else if(aei(me,I))Z[B]=me,Z[ae]=I,B=ae;else break e}}return $}function i(Z,$){var I=Z.sortIndex-$.sortIndex;return I!==0?I:Z.id-$.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],c=[],f=1,h=null,p=3,m=!1,g=!1,v=!1,w=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(Z){for(var $=n(c);$!==null;){if($.callback===null)r(c);else if($.startTime<=Z)r(c),$.sortIndex=$.expirationTime,t(l,$);else break;$=n(c)}}function T(Z){if(v=!1,x(Z),!g)if(n(l)!==null)g=!0,oe(P);else{var $=n(c);$!==null&&se(T,$.startTime-Z)}}function P(Z,$){g=!1,v&&(v=!1,y(D),D=-1),m=!0;var I=p;try{for(x($),h=n(l);h!==null&&(!(h.expirationTime>$)||Z&&!Y());){var B=h.callback;if(typeof B=="function"){h.callback=null,p=h.priorityLevel;var re=B(h.expirationTime<=$);$=e.unstable_now(),typeof re=="function"?h.callback=re:h===n(l)&&r(l),x($)}else r(l);h=n(l)}if(h!==null)var W=!0;else{var G=n(c);G!==null&&se(T,G.startTime-$),W=!1}return W}finally{h=null,p=I,m=!1}}var k=!1,N=null,D=-1,z=5,A=-1;function Y(){return!(e.unstable_now()-AZ||125B?(Z.sortIndex=I,t(c,Z),n(l)===null&&Z===n(c)&&(v?(y(D),D=-1):v=!0,se(T,I-B))):(Z.sortIndex=re,t(l,Z),g||m||(g=!0,oe(P))),Z},e.unstable_shouldYield=Y,e.unstable_wrapCallback=function(Z){var $=p;return function(){var I=p;p=$;try{return Z.apply(this,arguments)}finally{p=I}}}})(qD);(function(e){e.exports=qD})(QU);/** * @license React * react-dom.production.min.js * @@ -47,14 +47,14 @@ var g7=Object.defineProperty;var v7=(e,t,n)=>t in e?g7(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var WD=H,Ir=h1;function Te(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"),p1=Object.prototype.hasOwnProperty,YU=/^[: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]*$/,IP={},FP={};function qU(e){return p1.call(FP,e)?!0:p1.call(IP,e)?!1:YU.test(e)?FP[e]=!0:(IP[e]=!0,!1)}function GU(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 ZU(e,t,n,r){if(t===null||typeof t>"u"||GU(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 dr(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var Yn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Yn[e]=new dr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Yn[t]=new dr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Yn[e]=new dr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Yn[e]=new dr(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){Yn[e]=new dr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Yn[e]=new dr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Yn[e]=new dr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Yn[e]=new dr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Yn[e]=new dr(e,5,!1,e.toLowerCase(),null,!1,!1)});var Zx=/[\-:]([a-z])/g;function Kx(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(Zx,Kx);Yn[t]=new dr(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(Zx,Kx);Yn[t]=new dr(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(Zx,Kx);Yn[t]=new dr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Yn[e]=new dr(e,1,!1,e.toLowerCase(),null,!1,!1)});Yn.xlinkHref=new dr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Yn[e]=new dr(e,1,!1,e.toLowerCase(),null,!0,!0)});function Xx(e,t,n,r){var i=Yn.hasOwnProperty(t)?Yn[t]:null;(i!==null?i.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),g1=Object.prototype.hasOwnProperty,JU=/^[: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]*$/,$P={},jP={};function eV(e){return g1.call(jP,e)?!0:g1.call($P,e)?!1:JU.test(e)?jP[e]=!0:($P[e]=!0,!1)}function tV(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 nV(e,t,n,r){if(t===null||typeof t>"u"||tV(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 dr(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var Wn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Wn[e]=new dr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Wn[t]=new dr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Wn[e]=new dr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Wn[e]=new dr(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){Wn[e]=new dr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Wn[e]=new dr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Wn[e]=new dr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Wn[e]=new dr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Wn[e]=new dr(e,5,!1,e.toLowerCase(),null,!1,!1)});var Jx=/[\-:]([a-z])/g;function eS(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(Jx,eS);Wn[t]=new dr(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(Jx,eS);Wn[t]=new dr(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(Jx,eS);Wn[t]=new dr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Wn[e]=new dr(e,1,!1,e.toLowerCase(),null,!1,!1)});Wn.xlinkHref=new dr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Wn[e]=new dr(e,1,!1,e.toLowerCase(),null,!0,!0)});function tS(e,t,n,r){var i=Wn.hasOwnProperty(t)?Wn[t]:null;(i!==null?i.type!==0:r||!(2a||i[s]!==o[a]){var l=` -`+i[s].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{x0=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Gu(e):""}function KU(e){switch(e.tag){case 5:return Gu(e.type);case 16:return Gu("Lazy");case 13:return Gu("Suspense");case 19:return Gu("SuspenseList");case 0:case 2:case 15:return e=S0(e.type,!1),e;case 11:return e=S0(e.type.render,!1),e;case 1:return e=S0(e.type,!0),e;default:return""}}function y1(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 Yl:return"Fragment";case Wl:return"Portal";case m1:return"Profiler";case Qx:return"StrictMode";case g1:return"Suspense";case v1:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case GD:return(e.displayName||"Context")+".Consumer";case qD:return(e._context.displayName||"Context")+".Provider";case Jx:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case eS:return t=e.displayName||null,t!==null?t:y1(e.type)||"Memo";case es:t=e._payload,e=e._init;try{return y1(e(t))}catch{}}return null}function XU(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 y1(t);case 8:return t===Qx?"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 $s(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function KD(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function QU(e){var t=KD(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ep(e){e._valueTracker||(e._valueTracker=QU(e))}function XD(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=KD(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function mg(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 _1(e,t){var n=t.checked;return Wt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function jP(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=$s(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 QD(e,t){t=t.checked,t!=null&&Xx(e,"checked",t,!1)}function b1(e,t){QD(e,t);var n=$s(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")?w1(e,t.type,n):t.hasOwnProperty("defaultValue")&&w1(e,t.type,$s(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function BP(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 w1(e,t,n){(t!=="number"||mg(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Zu=Array.isArray;function cc(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=tp.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function qf(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var hf={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},JU=["Webkit","ms","Moz","O"];Object.keys(hf).forEach(function(e){JU.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),hf[t]=hf[e]})});function nA(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||hf.hasOwnProperty(e)&&hf[e]?(""+t).trim():t+"px"}function rA(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=nA(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var eV=Wt({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 C1(e,t){if(t){if(eV[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Te(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Te(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Te(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Te(62))}}function E1(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 T1=null;function tS(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var O1=null,uc=null,fc=null;function VP(e){if(e=Bd(e)){if(typeof O1!="function")throw Error(Te(280));var t=e.stateNode;t&&(t=yy(t),O1(e.stateNode,e.type,t))}}function iA(e){uc?fc?fc.push(e):fc=[e]:uc=e}function oA(){if(uc){var e=uc,t=fc;if(fc=uc=null,VP(e),t)for(e=0;e>>=0,e===0?32:31-(fV(e)/dV|0)|0}var np=64,rp=4194304;function Ku(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 _g(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=Ku(a):(o&=s,o!==0&&(r=Ku(o)))}else s=n&~i,s!==0?r=Ku(s):o!==0&&(r=Ku(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 $d(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Si(t),e[t]=n}function gV(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=mf),QP=String.fromCharCode(32),JP=!1;function EA(e,t){switch(e){case"keyup":return HV.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function TA(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ql=!1;function YV(e,t){switch(e){case"compositionend":return TA(t);case"keypress":return t.which!==32?null:(JP=!0,QP);case"textInput":return e=t.data,e===QP&&JP?null:e;default:return null}}function qV(e,t){if(ql)return e==="compositionend"||!cS&&EA(e,t)?(e=SA(),em=sS=hs=null,ql=!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=rk(n)}}function MA(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?MA(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function RA(){for(var e=window,t=mg();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=mg(e.document)}return t}function uS(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 nH(e){var t=RA(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&MA(n.ownerDocument.documentElement,n)){if(r!==null&&uS(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=ik(n,o);var s=ik(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Gl=null,L1=null,vf=null,D1=!1;function ok(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;D1||Gl==null||Gl!==mg(r)||(r=Gl,"selectionStart"in r&&uS(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}),vf&&Jf(vf,r)||(vf=r,r=xg(L1,"onSelect"),0Xl||(e.current=B1[Xl],B1[Xl]=null,Xl--)}function Ot(e,t){Xl++,B1[Xl]=e.current,e.current=t}var js={},nr=Xs(js),_r=Xs(!1),Ka=js;function Pc(e,t){var n=e.type.contextTypes;if(!n)return js;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function br(e){return e=e.childContextTypes,e!=null}function Cg(){Lt(_r),Lt(nr)}function dk(e,t,n){if(nr.current!==js)throw Error(Te(168));Ot(nr,t),Ot(_r,n)}function BA(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(Te(108,XU(e)||"Unknown",i));return Wt({},n,r)}function Eg(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||js,Ka=nr.current,Ot(nr,e),Ot(_r,_r.current),!0}function hk(e,t,n){var r=e.stateNode;if(!r)throw Error(Te(169));n?(e=BA(e,t,Ka),r.__reactInternalMemoizedMergedChildContext=e,Lt(_r),Lt(nr),Ot(nr,e)):Lt(_r),Ot(_r,n)}var go=null,_y=!1,F0=!1;function zA(e){go===null?go=[e]:go.push(e)}function pH(e){_y=!0,zA(e)}function Qs(){if(!F0&&go!==null){F0=!0;var e=0,t=_t;try{var n=go;for(_t=1;e>=s,i-=s,xo=1<<32-Si(t)+i|n<D?(z=N,N=null):z=N.sibling;var A=p(y,N,x[D],T);if(A===null){N===null&&(N=z);break}e&&N&&A.alternate===null&&t(y,N),b=o(A,b,D),k===null?P=A:k.sibling=A,k=A,N=z}if(D===x.length)return n(y,N),Ft&&Ea(y,D),P;if(N===null){for(;DD?(z=N,N=null):z=N.sibling;var Y=p(y,N,A.value,T);if(Y===null){N===null&&(N=z);break}e&&N&&Y.alternate===null&&t(y,N),b=o(Y,b,D),k===null?P=Y:k.sibling=Y,k=Y,N=z}if(A.done)return n(y,N),Ft&&Ea(y,D),P;if(N===null){for(;!A.done;D++,A=x.next())A=h(y,A.value,T),A!==null&&(b=o(A,b,D),k===null?P=A:k.sibling=A,k=A);return Ft&&Ea(y,D),P}for(N=r(y,N);!A.done;D++,A=x.next())A=m(N,y,D,A.value,T),A!==null&&(e&&A.alternate!==null&&N.delete(A.key===null?D:A.key),b=o(A,b,D),k===null?P=A:k.sibling=A,k=A);return e&&N.forEach(function(q){return t(y,q)}),Ft&&Ea(y,D),P}function w(y,b,x,T){if(typeof x=="object"&&x!==null&&x.type===Yl&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Jh:e:{for(var P=x.key,k=b;k!==null;){if(k.key===P){if(P=x.type,P===Yl){if(k.tag===7){n(y,k.sibling),b=i(k,x.props.children),b.return=y,y=b;break e}}else if(k.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===es&&bk(P)===k.type){n(y,k.sibling),b=i(k,x.props),b.ref=Lu(y,k,x),b.return=y,y=b;break e}n(y,k);break}else t(y,k);k=k.sibling}x.type===Yl?(b=za(x.props.children,y.mode,T,x.key),b.return=y,y=b):(T=lm(x.type,x.key,x.props,null,y.mode,T),T.ref=Lu(y,b,x),T.return=y,y=T)}return s(y);case Wl:e:{for(k=x.key;b!==null;){if(b.key===k)if(b.tag===4&&b.stateNode.containerInfo===x.containerInfo&&b.stateNode.implementation===x.implementation){n(y,b.sibling),b=i(b,x.children||[]),b.return=y,y=b;break e}else{n(y,b);break}else t(y,b);b=b.sibling}b=W0(x,y.mode,T),b.return=y,y=b}return s(y);case es:return k=x._init,w(y,b,k(x._payload),T)}if(Zu(x))return g(y,b,x,T);if(Pu(x))return v(y,b,x,T);up(y,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,b!==null&&b.tag===6?(n(y,b.sibling),b=i(b,x),b.return=y,y=b):(n(y,b),b=H0(x,y.mode,T),b.return=y,y=b),s(y)):n(y,b)}return w}var Mc=ZA(!0),KA=ZA(!1),zd={},Xi=Xs(zd),rd=Xs(zd),id=Xs(zd);function Aa(e){if(e===zd)throw Error(Te(174));return e}function _S(e,t){switch(Ot(id,t),Ot(rd,e),Ot(Xi,zd),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:S1(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=S1(t,e)}Lt(Xi),Ot(Xi,t)}function Rc(){Lt(Xi),Lt(rd),Lt(id)}function XA(e){Aa(id.current);var t=Aa(Xi.current),n=S1(t,e.type);t!==n&&(Ot(rd,e),Ot(Xi,n))}function bS(e){rd.current===e&&(Lt(Xi),Lt(rd))}var Ut=Xs(0);function Rg(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 $0=[];function wS(){for(var e=0;e<$0.length;e++)$0[e]._workInProgressVersionPrimary=null;$0.length=0}var rm=$o.ReactCurrentDispatcher,j0=$o.ReactCurrentBatchConfig,Qa=0,Ht=null,gn=null,En=null,Ng=!1,yf=!1,od=0,gH=0;function Gn(){throw Error(Te(321))}function xS(e,t){if(t===null)return!1;for(var n=0;nn?n:4,e(!0);var r=j0.transition;j0.transition={};try{e(!1),t()}finally{_t=n,j0.transition=r}}function h4(){return ni().memoizedState}function yH(e,t,n){var r=Os(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},p4(e))m4(t,n);else if(n=WA(e,t,n,r),n!==null){var i=ur();Ci(n,e,r,i),g4(n,t,r)}}function _H(e,t,n){var r=Os(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(p4(e))m4(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,Pi(a,s)){var l=t.interleaved;l===null?(i.next=i,vS(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=WA(e,t,i,r),n!==null&&(i=ur(),Ci(n,e,r,i),g4(n,t,r))}}function p4(e){var t=e.alternate;return e===Ht||t!==null&&t===Ht}function m4(e,t){yf=Ng=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function g4(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,rS(e,n)}}var Lg={readContext:ti,useCallback:Gn,useContext:Gn,useEffect:Gn,useImperativeHandle:Gn,useInsertionEffect:Gn,useLayoutEffect:Gn,useMemo:Gn,useReducer:Gn,useRef:Gn,useState:Gn,useDebugValue:Gn,useDeferredValue:Gn,useTransition:Gn,useMutableSource:Gn,useSyncExternalStore:Gn,useId:Gn,unstable_isNewReconciler:!1},bH={readContext:ti,useCallback:function(e,t){return Ui().memoizedState=[e,t===void 0?null:t],e},useContext:ti,useEffect:xk,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,im(4194308,4,l4.bind(null,t,e),n)},useLayoutEffect:function(e,t){return im(4194308,4,e,t)},useInsertionEffect:function(e,t){return im(4,2,e,t)},useMemo:function(e,t){var n=Ui();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ui();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=yH.bind(null,Ht,e),[r.memoizedState,e]},useRef:function(e){var t=Ui();return e={current:e},t.memoizedState=e},useState:wk,useDebugValue:TS,useDeferredValue:function(e){return Ui().memoizedState=e},useTransition:function(){var e=wk(!1),t=e[0];return e=vH.bind(null,e[1]),Ui().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ht,i=Ui();if(Ft){if(n===void 0)throw Error(Te(407));n=n()}else{if(n=t(),On===null)throw Error(Te(349));Qa&30||e4(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,xk(n4.bind(null,r,o,e),[e]),r.flags|=2048,ad(9,t4.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Ui(),t=On.identifierPrefix;if(Ft){var n=So,r=xo;n=(r&~(1<<32-Si(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=od++,0")&&(l=l.replace("",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{C0=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ku(e):""}function rV(e){switch(e.tag){case 5:return Ku(e.type);case 16:return Ku("Lazy");case 13:return Ku("Suspense");case 19:return Ku("SuspenseList");case 0:case 2:case 15:return e=E0(e.type,!1),e;case 11:return e=E0(e.type.render,!1),e;case 1:return e=E0(e.type,!0),e;default:return""}}function b1(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 ql:return"Fragment";case Yl:return"Portal";case v1:return"Profiler";case nS:return"StrictMode";case y1:return"Suspense";case _1:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case XD:return(e.displayName||"Context")+".Consumer";case KD:return(e._context.displayName||"Context")+".Provider";case rS:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case iS:return t=e.displayName||null,t!==null?t:b1(e.type)||"Memo";case ts:t=e._payload,e=e._init;try{return b1(e(t))}catch{}}return null}function iV(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 b1(t);case 8:return t===nS?"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 $s(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function JD(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function oV(e){var t=JD(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ep(e){e._valueTracker||(e._valueTracker=oV(e))}function eA(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=JD(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function gg(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 w1(e,t){var n=t.checked;return Wt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function zP(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=$s(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 tA(e,t){t=t.checked,t!=null&&tS(e,"checked",t,!1)}function x1(e,t){tA(e,t);var n=$s(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")?S1(e,t.type,n):t.hasOwnProperty("defaultValue")&&S1(e,t.type,$s(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function UP(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 S1(e,t,n){(t!=="number"||gg(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Xu=Array.isArray;function uc(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=tp.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Gf(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var pf={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},sV=["Webkit","ms","Moz","O"];Object.keys(pf).forEach(function(e){sV.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),pf[t]=pf[e]})});function oA(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||pf.hasOwnProperty(e)&&pf[e]?(""+t).trim():t+"px"}function sA(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=oA(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var aV=Wt({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 T1(e,t){if(t){if(aV[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Te(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Te(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Te(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Te(62))}}function O1(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 P1=null;function oS(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var k1=null,fc=null,dc=null;function WP(e){if(e=Bd(e)){if(typeof k1!="function")throw Error(Te(280));var t=e.stateNode;t&&(t=by(t),k1(e.stateNode,e.type,t))}}function aA(e){fc?dc?dc.push(e):dc=[e]:fc=e}function lA(){if(fc){var e=fc,t=dc;if(dc=fc=null,WP(e),t)for(e=0;e>>=0,e===0?32:31-(yV(e)/_V|0)|0}var np=64,rp=4194304;function Qu(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 bg(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=Qu(a):(o&=s,o!==0&&(r=Qu(o)))}else s=n&~i,s!==0?r=Qu(s):o!==0&&(r=Qu(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 $d(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Si(t),e[t]=n}function SV(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=gf),ek=String.fromCharCode(32),tk=!1;function PA(e,t){switch(e){case"keyup":return XV.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function kA(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Gl=!1;function JV(e,t){switch(e){case"compositionend":return kA(t);case"keypress":return t.which!==32?null:(tk=!0,ek);case"textInput":return e=t.data,e===ek&&tk?null:e;default:return null}}function eH(e,t){if(Gl)return e==="compositionend"||!hS&&PA(e,t)?(e=TA(),tm=uS=ps=null,Gl=!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=ok(n)}}function LA(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?LA(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function DA(){for(var e=window,t=gg();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=gg(e.document)}return t}function pS(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 cH(e){var t=DA(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&LA(n.ownerDocument.documentElement,n)){if(r!==null&&pS(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=sk(n,o);var s=sk(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Zl=null,A1=null,yf=null,I1=!1;function ak(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;I1||Zl==null||Zl!==gg(r)||(r=Zl,"selectionStart"in r&&pS(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}),yf&&ed(yf,r)||(yf=r,r=Sg(A1,"onSelect"),0Ql||(e.current=U1[Ql],U1[Ql]=null,Ql--)}function Ot(e,t){Ql++,U1[Ql]=e.current,e.current=t}var js={},nr=Xs(js),_r=Xs(!1),Ka=js;function kc(e,t){var n=e.type.contextTypes;if(!n)return js;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function br(e){return e=e.childContextTypes,e!=null}function Eg(){Lt(_r),Lt(nr)}function pk(e,t,n){if(nr.current!==js)throw Error(Te(168));Ot(nr,t),Ot(_r,n)}function VA(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(Te(108,iV(e)||"Unknown",i));return Wt({},n,r)}function Tg(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||js,Ka=nr.current,Ot(nr,e),Ot(_r,_r.current),!0}function mk(e,t,n){var r=e.stateNode;if(!r)throw Error(Te(169));n?(e=VA(e,t,Ka),r.__reactInternalMemoizedMergedChildContext=e,Lt(_r),Lt(nr),Ot(nr,e)):Lt(_r),Ot(_r,n)}var go=null,wy=!1,j0=!1;function HA(e){go===null?go=[e]:go.push(e)}function wH(e){wy=!0,HA(e)}function Qs(){if(!j0&&go!==null){j0=!0;var e=0,t=_t;try{var n=go;for(_t=1;e>=s,i-=s,xo=1<<32-Si(t)+i|n<D?(z=N,N=null):z=N.sibling;var A=p(y,N,x[D],T);if(A===null){N===null&&(N=z);break}e&&N&&A.alternate===null&&t(y,N),b=o(A,b,D),k===null?P=A:k.sibling=A,k=A,N=z}if(D===x.length)return n(y,N),Ft&&Ea(y,D),P;if(N===null){for(;DD?(z=N,N=null):z=N.sibling;var Y=p(y,N,A.value,T);if(Y===null){N===null&&(N=z);break}e&&N&&Y.alternate===null&&t(y,N),b=o(Y,b,D),k===null?P=Y:k.sibling=Y,k=Y,N=z}if(A.done)return n(y,N),Ft&&Ea(y,D),P;if(N===null){for(;!A.done;D++,A=x.next())A=h(y,A.value,T),A!==null&&(b=o(A,b,D),k===null?P=A:k.sibling=A,k=A);return Ft&&Ea(y,D),P}for(N=r(y,N);!A.done;D++,A=x.next())A=m(N,y,D,A.value,T),A!==null&&(e&&A.alternate!==null&&N.delete(A.key===null?D:A.key),b=o(A,b,D),k===null?P=A:k.sibling=A,k=A);return e&&N.forEach(function(q){return t(y,q)}),Ft&&Ea(y,D),P}function w(y,b,x,T){if(typeof x=="object"&&x!==null&&x.type===ql&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Jh:e:{for(var P=x.key,k=b;k!==null;){if(k.key===P){if(P=x.type,P===ql){if(k.tag===7){n(y,k.sibling),b=i(k,x.props.children),b.return=y,y=b;break e}}else if(k.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===ts&&xk(P)===k.type){n(y,k.sibling),b=i(k,x.props),b.ref=Au(y,k,x),b.return=y,y=b;break e}n(y,k);break}else t(y,k);k=k.sibling}x.type===ql?(b=za(x.props.children,y.mode,T,x.key),b.return=y,y=b):(T=cm(x.type,x.key,x.props,null,y.mode,T),T.ref=Au(y,b,x),T.return=y,y=T)}return s(y);case Yl:e:{for(k=x.key;b!==null;){if(b.key===k)if(b.tag===4&&b.stateNode.containerInfo===x.containerInfo&&b.stateNode.implementation===x.implementation){n(y,b.sibling),b=i(b,x.children||[]),b.return=y,y=b;break e}else{n(y,b);break}else t(y,b);b=b.sibling}b=q0(x,y.mode,T),b.return=y,y=b}return s(y);case ts:return k=x._init,w(y,b,k(x._payload),T)}if(Xu(x))return g(y,b,x,T);if(Mu(x))return v(y,b,x,T);up(y,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,b!==null&&b.tag===6?(n(y,b.sibling),b=i(b,x),b.return=y,y=b):(n(y,b),b=Y0(x,y.mode,T),b.return=y,y=b),s(y)):n(y,b)}return w}var Rc=QA(!0),JA=QA(!1),zd={},Xi=Xs(zd),id=Xs(zd),od=Xs(zd);function Aa(e){if(e===zd)throw Error(Te(174));return e}function SS(e,t){switch(Ot(od,t),Ot(id,e),Ot(Xi,zd),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:E1(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=E1(t,e)}Lt(Xi),Ot(Xi,t)}function Nc(){Lt(Xi),Lt(id),Lt(od)}function e4(e){Aa(od.current);var t=Aa(Xi.current),n=E1(t,e.type);t!==n&&(Ot(id,e),Ot(Xi,n))}function CS(e){id.current===e&&(Lt(Xi),Lt(id))}var Ut=Xs(0);function Ng(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 B0=[];function ES(){for(var e=0;en?n:4,e(!0);var r=z0.transition;z0.transition={};try{e(!1),t()}finally{_t=n,z0.transition=r}}function g4(){return ni().memoizedState}function EH(e,t,n){var r=Ps(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},v4(e))y4(t,n);else if(n=GA(e,t,n,r),n!==null){var i=ur();Ci(n,e,r,i),_4(n,t,r)}}function TH(e,t,n){var r=Ps(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(v4(e))y4(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,Pi(a,s)){var l=t.interleaved;l===null?(i.next=i,wS(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=GA(e,t,i,r),n!==null&&(i=ur(),Ci(n,e,r,i),_4(n,t,r))}}function v4(e){var t=e.alternate;return e===Ht||t!==null&&t===Ht}function y4(e,t){_f=Lg=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function _4(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,aS(e,n)}}var Dg={readContext:ti,useCallback:qn,useContext:qn,useEffect:qn,useImperativeHandle:qn,useInsertionEffect:qn,useLayoutEffect:qn,useMemo:qn,useReducer:qn,useRef:qn,useState:qn,useDebugValue:qn,useDeferredValue:qn,useTransition:qn,useMutableSource:qn,useSyncExternalStore:qn,useId:qn,unstable_isNewReconciler:!1},OH={readContext:ti,useCallback:function(e,t){return Ui().memoizedState=[e,t===void 0?null:t],e},useContext:ti,useEffect:Ck,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,om(4194308,4,f4.bind(null,t,e),n)},useLayoutEffect:function(e,t){return om(4194308,4,e,t)},useInsertionEffect:function(e,t){return om(4,2,e,t)},useMemo:function(e,t){var n=Ui();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ui();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=EH.bind(null,Ht,e),[r.memoizedState,e]},useRef:function(e){var t=Ui();return e={current:e},t.memoizedState=e},useState:Sk,useDebugValue:MS,useDeferredValue:function(e){return Ui().memoizedState=e},useTransition:function(){var e=Sk(!1),t=e[0];return e=CH.bind(null,e[1]),Ui().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ht,i=Ui();if(Ft){if(n===void 0)throw Error(Te(407));n=n()}else{if(n=t(),On===null)throw Error(Te(349));Qa&30||r4(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Ck(o4.bind(null,r,o,e),[e]),r.flags|=2048,ld(9,i4.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Ui(),t=On.identifierPrefix;if(Ft){var n=So,r=xo;n=(r&~(1<<32-Si(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=sd++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Hi]=t,e[nd]=r,E4(e,t,!1,!1),t.stateNode=e;e:{switch(s=E1(n,r),n){case"dialog":Pt("cancel",e),Pt("close",e),i=r;break;case"iframe":case"object":case"embed":Pt("load",e),i=r;break;case"video":case"audio":for(i=0;iLc&&(t.flags|=128,r=!0,Du(o,!1),t.lanes=4194304)}else{if(!r)if(e=Rg(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Du(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!Ft)return Zn(t),null}else 2*nn()-o.renderingStartTime>Lc&&n!==1073741824&&(t.flags|=128,r=!0,Du(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=nn(),t.sibling=null,n=Ut.current,Ot(Ut,r?n&1|2:n&1),t):(Zn(t),null);case 22:case 23:return NS(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?kr&1073741824&&(Zn(t),t.subtreeFlags&6&&(t.flags|=8192)):Zn(t),null;case 24:return null;case 25:return null}throw Error(Te(156,t.tag))}function PH(e,t){switch(dS(t),t.tag){case 1:return br(t.type)&&Cg(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Rc(),Lt(_r),Lt(nr),wS(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return bS(t),null;case 13:if(Lt(Ut),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Te(340));kc()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Lt(Ut),null;case 4:return Rc(),null;case 10:return gS(t.type._context),null;case 22:case 23:return NS(),null;case 24:return null;default:return null}}var dp=!1,Qn=!1,kH=typeof WeakSet=="function"?WeakSet:Set,Ue=null;function tc(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){qt(e,t,r)}else n.current=null}function Q1(e,t,n){try{n()}catch(r){qt(e,t,r)}}var Rk=!1;function MH(e,t){if(A1=bg,e=RA(),uS(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,c=0,f=0,h=e,p=null;t:for(;;){for(var m;h!==n||i!==0&&h.nodeType!==3||(a=s+i),h!==o||r!==0&&h.nodeType!==3||(l=s+r),h.nodeType===3&&(s+=h.nodeValue.length),(m=h.firstChild)!==null;)p=h,h=m;for(;;){if(h===e)break t;if(p===n&&++c===i&&(a=s),p===o&&++f===r&&(l=s),(m=h.nextSibling)!==null)break;h=p,p=h.parentNode}h=m}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(I1={focusedElem:e,selectionRange:n},bg=!1,Ue=t;Ue!==null;)if(t=Ue,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ue=e;else for(;Ue!==null;){t=Ue;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var v=g.memoizedProps,w=g.memoizedState,y=t.stateNode,b=y.getSnapshotBeforeUpdate(t.elementType===t.type?v:hi(t.type,v),w);y.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Te(163))}}catch(T){qt(t,t.return,T)}if(e=t.sibling,e!==null){e.return=t.return,Ue=e;break}Ue=t.return}return g=Rk,Rk=!1,g}function _f(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&&Q1(t,n,o)}i=i.next}while(i!==r)}}function xy(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 J1(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 P4(e){var t=e.alternate;t!==null&&(e.alternate=null,P4(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Hi],delete t[nd],delete t[j1],delete t[dH],delete t[hH])),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 k4(e){return e.tag===5||e.tag===3||e.tag===4}function Nk(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||k4(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 ew(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=Sg));else if(r!==4&&(e=e.child,e!==null))for(ew(e,t,n),e=e.sibling;e!==null;)ew(e,t,n),e=e.sibling}function tw(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(tw(e,t,n),e=e.sibling;e!==null;)tw(e,t,n),e=e.sibling}var zn=null,pi=!1;function Zo(e,t,n){for(n=n.child;n!==null;)M4(e,t,n),n=n.sibling}function M4(e,t,n){if(Ki&&typeof Ki.onCommitFiberUnmount=="function")try{Ki.onCommitFiberUnmount(py,n)}catch{}switch(n.tag){case 5:Qn||tc(n,t);case 6:var r=zn,i=pi;zn=null,Zo(e,t,n),zn=r,pi=i,zn!==null&&(pi?(e=zn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):zn.removeChild(n.stateNode));break;case 18:zn!==null&&(pi?(e=zn,n=n.stateNode,e.nodeType===8?I0(e.parentNode,n):e.nodeType===1&&I0(e,n),Xf(e)):I0(zn,n.stateNode));break;case 4:r=zn,i=pi,zn=n.stateNode.containerInfo,pi=!0,Zo(e,t,n),zn=r,pi=i;break;case 0:case 11:case 14:case 15:if(!Qn&&(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)&&Q1(n,t,s),i=i.next}while(i!==r)}Zo(e,t,n);break;case 1:if(!Qn&&(tc(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){qt(n,t,a)}Zo(e,t,n);break;case 21:Zo(e,t,n);break;case 22:n.mode&1?(Qn=(r=Qn)||n.memoizedState!==null,Zo(e,t,n),Qn=r):Zo(e,t,n);break;default:Zo(e,t,n)}}function Lk(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new kH),t.forEach(function(r){var i=jH.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function di(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=nn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*NH(r/1960))-r,10e?16:e,ps===null)var r=!1;else{if(e=ps,ps=null,Ig=0,ut&6)throw Error(Te(331));var i=ut;for(ut|=4,Ue=e.current;Ue!==null;){var o=Ue,s=o.child;if(Ue.flags&16){var a=o.deletions;if(a!==null){for(var l=0;lnn()-MS?Ba(e,0):kS|=n),wr(e,t)}function $4(e,t){t===0&&(e.mode&1?(t=rp,rp<<=1,!(rp&130023424)&&(rp=4194304)):t=1);var n=ur();e=Po(e,t),e!==null&&($d(e,t,n),wr(e,n))}function $H(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),$4(e,n)}function jH(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(Te(314))}r!==null&&r.delete(t),$4(e,n)}var j4;j4=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||_r.current)vr=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return vr=!1,TH(e,t,n);vr=!!(e.flags&131072)}else vr=!1,Ft&&t.flags&1048576&&UA(t,Og,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;om(e,t),e=t.pendingProps;var i=Pc(t,nr.current);hc(t,n),i=SS(null,t,r,e,i,n);var o=CS();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,br(r)?(o=!0,Eg(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,yS(t),i.updater=by,t.stateNode=i,i._reactInternals=t,W1(t,r,e,n),t=G1(null,t,r,!0,o,n)):(t.tag=0,Ft&&o&&fS(t),lr(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(om(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=zH(r),e=hi(r,e),i){case 0:t=q1(null,t,r,e,n);break e;case 1:t=Pk(null,t,r,e,n);break e;case 11:t=Tk(null,t,r,e,n);break e;case 14:t=Ok(null,t,r,hi(r.type,e),n);break e}throw Error(Te(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:hi(r,i),q1(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:hi(r,i),Pk(e,t,r,i,n);case 3:e:{if(x4(t),e===null)throw Error(Te(387));r=t.pendingProps,o=t.memoizedState,i=o.element,YA(e,t),Mg(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Nc(Error(Te(423)),t),t=kk(e,t,r,n,i);break e}else if(r!==i){i=Nc(Error(Te(424)),t),t=kk(e,t,r,n,i);break e}else for(Rr=Cs(t.stateNode.containerInfo.firstChild),Lr=t,Ft=!0,gi=null,n=KA(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(kc(),r===i){t=ko(e,t,n);break e}lr(e,t,r,n)}t=t.child}return t;case 5:return XA(t),e===null&&U1(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,F1(r,i)?s=null:o!==null&&F1(r,o)&&(t.flags|=32),w4(e,t),lr(e,t,s,n),t.child;case 6:return e===null&&U1(t),null;case 13:return S4(e,t,n);case 4:return _S(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Mc(t,null,r,n):lr(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:hi(r,i),Tk(e,t,r,i,n);case 7:return lr(e,t,t.pendingProps,n),t.child;case 8:return lr(e,t,t.pendingProps.children,n),t.child;case 12:return lr(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,Ot(Pg,r._currentValue),r._currentValue=s,o!==null)if(Pi(o.value,s)){if(o.children===i.children&&!_r.current){t=ko(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=Co(-1,n&-n),l.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?l.next=l:(l.next=f.next,f.next=l),c.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),V1(o.return,n,t),a.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(Te(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),V1(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}lr(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,hc(t,n),i=ti(i),r=r(i),t.flags|=1,lr(e,t,r,n),t.child;case 14:return r=t.type,i=hi(r,t.pendingProps),i=hi(r.type,i),Ok(e,t,r,i,n);case 15:return _4(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:hi(r,i),om(e,t),t.tag=1,br(r)?(e=!0,Eg(t)):e=!1,hc(t,n),GA(t,r,i),W1(t,r,i,n),G1(null,t,r,!0,e,n);case 19:return C4(e,t,n);case 22:return b4(e,t,n)}throw Error(Te(156,t.tag))};function B4(e,t){return dA(e,t)}function BH(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 Zr(e,t,n,r){return new BH(e,t,n,r)}function DS(e){return e=e.prototype,!(!e||!e.isReactComponent)}function zH(e){if(typeof e=="function")return DS(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Jx)return 11;if(e===eS)return 14}return 2}function Ps(e,t){var n=e.alternate;return n===null?(n=Zr(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 lm(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")DS(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Yl:return za(n.children,i,o,t);case Qx:s=8,i|=8;break;case m1:return e=Zr(12,n,t,i|2),e.elementType=m1,e.lanes=o,e;case g1:return e=Zr(13,n,t,i),e.elementType=g1,e.lanes=o,e;case v1:return e=Zr(19,n,t,i),e.elementType=v1,e.lanes=o,e;case ZD:return Cy(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case qD:s=10;break e;case GD:s=9;break e;case Jx:s=11;break e;case eS:s=14;break e;case es:s=16,r=null;break e}throw Error(Te(130,e==null?e:typeof e,""))}return t=Zr(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function za(e,t,n,r){return e=Zr(7,e,r,t),e.lanes=n,e}function Cy(e,t,n,r){return e=Zr(22,e,r,t),e.elementType=ZD,e.lanes=n,e.stateNode={isHidden:!1},e}function H0(e,t,n){return e=Zr(6,e,null,t),e.lanes=n,e}function W0(e,t,n){return t=Zr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function UH(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=E0(0),this.expirationTimes=E0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=E0(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function AS(e,t,n,r,i,o,s,a,l){return e=new UH(e,t,n,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Zr(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},yS(o),e}function VH(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=$r})(HU);const Ua=FL(Za);var H4,zk=Za;H4=zk.createRoot,zk.hydrateRoot;var jg={},GH={get exports(){return jg},set exports(e){jg=e}},W4={};/** +`+o.stack}return{value:e,source:t,stack:i,digest:null}}function H0(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function G1(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var MH=typeof WeakMap=="function"?WeakMap:Map;function b4(e,t,n){n=Co(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ig||(Ig=!0,iw=r),G1(e,t)},n}function w4(e,t,n){n=Co(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){G1(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){G1(e,t),typeof r!="function"&&(Os===null?Os=new Set([this]):Os.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function Ek(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new MH;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=HH.bind(null,e,t,n),t.then(e,e))}function Tk(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Ok(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Co(-1,1),t.tag=2,Ts(n,t,1))),n.lanes|=1),e)}var RH=jo.ReactCurrentOwner,vr=!1;function lr(e,t,n,r){t.child=e===null?JA(t,null,n,r):Rc(t,e.child,n,r)}function Pk(e,t,n,r,i){n=n.render;var o=t.ref;return pc(t,i),r=OS(e,t,n,r,o,i),n=PS(),e!==null&&!vr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Mo(e,t,i)):(Ft&&n&&mS(t),t.flags|=1,lr(e,t,r,i),t.child)}function kk(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!$S(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,x4(e,t,o,r,i)):(e=cm(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:ed,n(s,r)&&e.ref===t.ref)return Mo(e,t,i)}return t.flags|=1,e=ks(o,r),e.ref=t.ref,e.return=t,t.child=e}function x4(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(ed(o,r)&&e.ref===t.ref)if(vr=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(vr=!0);else return t.lanes=e.lanes,Mo(e,t,i)}return Z1(e,t,n,r,i)}function S4(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ot(rc,kr),kr|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ot(rc,kr),kr|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Ot(rc,kr),kr|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,Ot(rc,kr),kr|=r;return lr(e,t,i,n),t.child}function C4(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Z1(e,t,n,r,i){var o=br(n)?Ka:nr.current;return o=kc(t,o),pc(t,i),n=OS(e,t,n,r,o,i),r=PS(),e!==null&&!vr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Mo(e,t,i)):(Ft&&r&&mS(t),t.flags|=1,lr(e,t,n,i),t.child)}function Mk(e,t,n,r,i){if(br(n)){var o=!0;Tg(t)}else o=!1;if(pc(t,i),t.stateNode===null)sm(e,t),XA(t,n,r),q1(t,n,r,i),r=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,c=n.contextType;typeof c=="object"&&c!==null?c=ti(c):(c=br(n)?Ka:nr.current,c=kc(t,c));var f=n.getDerivedStateFromProps,h=typeof f=="function"||typeof s.getSnapshotBeforeUpdate=="function";h||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||l!==c)&&wk(t,s,r,c),ns=!1;var p=t.memoizedState;s.state=p,Rg(t,r,s,i),l=t.memoizedState,a!==r||p!==l||_r.current||ns?(typeof f=="function"&&(Y1(t,n,f,r),l=t.memoizedState),(a=ns||bk(t,n,a,r,p,l,c))?(h||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),s.props=r,s.state=l,s.context=c,r=a):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,ZA(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:hi(t.type,a),s.props=c,h=t.pendingProps,p=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=ti(l):(l=br(n)?Ka:nr.current,l=kc(t,l));var m=n.getDerivedStateFromProps;(f=typeof m=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==h||p!==l)&&wk(t,s,r,l),ns=!1,p=t.memoizedState,s.state=p,Rg(t,r,s,i);var g=t.memoizedState;a!==h||p!==g||_r.current||ns?(typeof m=="function"&&(Y1(t,n,m,r),g=t.memoizedState),(c=ns||bk(t,n,c,r,p,g,l)||!1)?(f||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,g,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,g,l)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=g),s.props=r,s.state=g,s.context=l,r=c):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return K1(e,t,n,r,o,i)}function K1(e,t,n,r,i,o){C4(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return i&&mk(t,n,!1),Mo(e,t,o);r=t.stateNode,RH.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Rc(t,e.child,null,o),t.child=Rc(t,null,a,o)):lr(e,t,a,o),t.memoizedState=r.state,i&&mk(t,n,!0),t.child}function E4(e){var t=e.stateNode;t.pendingContext?pk(e,t.pendingContext,t.pendingContext!==t.context):t.context&&pk(e,t.context,!1),SS(e,t.containerInfo)}function Rk(e,t,n,r,i){return Mc(),vS(i),t.flags|=256,lr(e,t,n,r),t.child}var X1={dehydrated:null,treeContext:null,retryLane:0};function Q1(e){return{baseLanes:e,cachePool:null,transitions:null}}function T4(e,t,n){var r=t.pendingProps,i=Ut.current,o=!1,s=(t.flags&128)!==0,a;if((a=s)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Ot(Ut,i&1),e===null)return H1(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,o?(r=t.mode,o=t.child,s={mode:"hidden",children:s},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=s):o=Ty(s,r,0,null),e=za(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Q1(n),t.memoizedState=X1,e):RS(t,s));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return NH(e,t,s,r,a,i,n);if(o){o=r.fallback,s=t.mode,i=e.child,a=i.sibling;var l={mode:"hidden",children:r.children};return!(s&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=ks(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?o=ks(a,o):(o=za(o,s,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,s=e.child.memoizedState,s=s===null?Q1(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=e.childLanes&~n,t.memoizedState=X1,r}return o=e.child,e=o.sibling,r=ks(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function RS(e,t){return t=Ty({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function fp(e,t,n,r){return r!==null&&vS(r),Rc(t,e.child,null,n),e=RS(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function NH(e,t,n,r,i,o,s){if(n)return t.flags&256?(t.flags&=-257,r=H0(Error(Te(422))),fp(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Ty({mode:"visible",children:r.children},i,0,null),o=za(o,i,s,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&Rc(t,e.child,null,s),t.child.memoizedState=Q1(s),t.memoizedState=X1,o);if(!(t.mode&1))return fp(e,t,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,o=Error(Te(419)),r=H0(o,r,void 0),fp(e,t,s,r)}if(a=(s&e.childLanes)!==0,vr||a){if(r=On,r!==null){switch(s&-s){case 4:i=2;break;case 16:i=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|s)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,ko(e,i),Ci(r,e,i,-1))}return FS(),r=H0(Error(Te(421))),fp(e,t,s,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=WH.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,Rr=Es(i.nextSibling),Lr=t,Ft=!0,gi=null,e!==null&&(Yr[qr++]=xo,Yr[qr++]=So,Yr[qr++]=Xa,xo=e.id,So=e.overflow,Xa=t),t=RS(t,r.children),t.flags|=4096,t)}function Nk(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),W1(e.return,t,n)}function W0(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function O4(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(lr(e,t,r.children,n),r=Ut.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Nk(e,n,t);else if(e.tag===19)Nk(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ot(Ut,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Ng(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),W0(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Ng(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}W0(t,!0,n,null,o);break;case"together":W0(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function sm(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Mo(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ja|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Te(153));if(t.child!==null){for(e=t.child,n=ks(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ks(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function LH(e,t,n){switch(t.tag){case 3:E4(t),Mc();break;case 5:e4(t);break;case 1:br(t.type)&&Tg(t);break;case 4:SS(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Ot(kg,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Ot(Ut,Ut.current&1),t.flags|=128,null):n&t.child.childLanes?T4(e,t,n):(Ot(Ut,Ut.current&1),e=Mo(e,t,n),e!==null?e.sibling:null);Ot(Ut,Ut.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return O4(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ot(Ut,Ut.current),r)break;return null;case 22:case 23:return t.lanes=0,S4(e,t,n)}return Mo(e,t,n)}var P4,J1,k4,M4;P4=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};J1=function(){};k4=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Aa(Xi.current);var o=null;switch(n){case"input":i=w1(e,i),r=w1(e,r),o=[];break;case"select":i=Wt({},i,{value:void 0}),r=Wt({},r,{value:void 0}),o=[];break;case"textarea":i=C1(e,i),r=C1(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Cg)}T1(n,r);var s;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var a=i[c];for(s in a)a.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(qf.hasOwnProperty(c)?o||(o=[]):(o=o||[]).push(c,null));for(c in r){var l=r[c];if(a=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(s in a)!a.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in l)l.hasOwnProperty(s)&&a[s]!==l[s]&&(n||(n={}),n[s]=l[s])}else n||(o||(o=[]),o.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(o=o||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(qf.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Pt("scroll",e),o||a===l||(o=[])):(o=o||[]).push(c,l))}n&&(o=o||[]).push("style",n);var c=o;(t.updateQueue=c)&&(t.flags|=4)}};M4=function(e,t,n,r){n!==r&&(t.flags|=4)};function Iu(e,t){if(!Ft)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Gn(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function DH(e,t,n){var r=t.pendingProps;switch(gS(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Gn(t),null;case 1:return br(t.type)&&Eg(),Gn(t),null;case 3:return r=t.stateNode,Nc(),Lt(_r),Lt(nr),ES(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(cp(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,gi!==null&&(aw(gi),gi=null))),J1(e,t),Gn(t),null;case 5:CS(t);var i=Aa(od.current);if(n=t.type,e!==null&&t.stateNode!=null)k4(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Te(166));return Gn(t),null}if(e=Aa(Xi.current),cp(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Hi]=t,r[rd]=o,e=(t.mode&1)!==0,n){case"dialog":Pt("cancel",r),Pt("close",r);break;case"iframe":case"object":case"embed":Pt("load",r);break;case"video":case"audio":for(i=0;i<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Hi]=t,e[rd]=r,P4(e,t,!1,!1),t.stateNode=e;e:{switch(s=O1(n,r),n){case"dialog":Pt("cancel",e),Pt("close",e),i=r;break;case"iframe":case"object":case"embed":Pt("load",e),i=r;break;case"video":case"audio":for(i=0;iDc&&(t.flags|=128,r=!0,Iu(o,!1),t.lanes=4194304)}else{if(!r)if(e=Ng(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Iu(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!Ft)return Gn(t),null}else 2*nn()-o.renderingStartTime>Dc&&n!==1073741824&&(t.flags|=128,r=!0,Iu(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=nn(),t.sibling=null,n=Ut.current,Ot(Ut,r?n&1|2:n&1),t):(Gn(t),null);case 22:case 23:return IS(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?kr&1073741824&&(Gn(t),t.subtreeFlags&6&&(t.flags|=8192)):Gn(t),null;case 24:return null;case 25:return null}throw Error(Te(156,t.tag))}function AH(e,t){switch(gS(t),t.tag){case 1:return br(t.type)&&Eg(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Nc(),Lt(_r),Lt(nr),ES(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return CS(t),null;case 13:if(Lt(Ut),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Te(340));Mc()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Lt(Ut),null;case 4:return Nc(),null;case 10:return bS(t.type._context),null;case 22:case 23:return IS(),null;case 24:return null;default:return null}}var dp=!1,Xn=!1,IH=typeof WeakSet=="function"?WeakSet:Set,Ue=null;function nc(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){qt(e,t,r)}else n.current=null}function ew(e,t,n){try{n()}catch(r){qt(e,t,r)}}var Lk=!1;function FH(e,t){if(F1=wg,e=DA(),pS(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,c=0,f=0,h=e,p=null;t:for(;;){for(var m;h!==n||i!==0&&h.nodeType!==3||(a=s+i),h!==o||r!==0&&h.nodeType!==3||(l=s+r),h.nodeType===3&&(s+=h.nodeValue.length),(m=h.firstChild)!==null;)p=h,h=m;for(;;){if(h===e)break t;if(p===n&&++c===i&&(a=s),p===o&&++f===r&&(l=s),(m=h.nextSibling)!==null)break;h=p,p=h.parentNode}h=m}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for($1={focusedElem:e,selectionRange:n},wg=!1,Ue=t;Ue!==null;)if(t=Ue,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ue=e;else for(;Ue!==null;){t=Ue;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var v=g.memoizedProps,w=g.memoizedState,y=t.stateNode,b=y.getSnapshotBeforeUpdate(t.elementType===t.type?v:hi(t.type,v),w);y.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Te(163))}}catch(T){qt(t,t.return,T)}if(e=t.sibling,e!==null){e.return=t.return,Ue=e;break}Ue=t.return}return g=Lk,Lk=!1,g}function bf(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&&ew(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 tw(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 R4(e){var t=e.alternate;t!==null&&(e.alternate=null,R4(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Hi],delete t[rd],delete t[z1],delete t[_H],delete t[bH])),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 N4(e){return e.tag===5||e.tag===3||e.tag===4}function Dk(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||N4(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 nw(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=Cg));else if(r!==4&&(e=e.child,e!==null))for(nw(e,t,n),e=e.sibling;e!==null;)nw(e,t,n),e=e.sibling}function rw(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(rw(e,t,n),e=e.sibling;e!==null;)rw(e,t,n),e=e.sibling}var zn=null,pi=!1;function Ko(e,t,n){for(n=n.child;n!==null;)L4(e,t,n),n=n.sibling}function L4(e,t,n){if(Ki&&typeof Ki.onCommitFiberUnmount=="function")try{Ki.onCommitFiberUnmount(gy,n)}catch{}switch(n.tag){case 5:Xn||nc(n,t);case 6:var r=zn,i=pi;zn=null,Ko(e,t,n),zn=r,pi=i,zn!==null&&(pi?(e=zn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):zn.removeChild(n.stateNode));break;case 18:zn!==null&&(pi?(e=zn,n=n.stateNode,e.nodeType===8?$0(e.parentNode,n):e.nodeType===1&&$0(e,n),Qf(e)):$0(zn,n.stateNode));break;case 4:r=zn,i=pi,zn=n.stateNode.containerInfo,pi=!0,Ko(e,t,n),zn=r,pi=i;break;case 0:case 11:case 14:case 15:if(!Xn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&ew(n,t,s),i=i.next}while(i!==r)}Ko(e,t,n);break;case 1:if(!Xn&&(nc(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){qt(n,t,a)}Ko(e,t,n);break;case 21:Ko(e,t,n);break;case 22:n.mode&1?(Xn=(r=Xn)||n.memoizedState!==null,Ko(e,t,n),Xn=r):Ko(e,t,n);break;default:Ko(e,t,n)}}function Ak(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new IH),t.forEach(function(r){var i=YH.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function di(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=nn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*jH(r/1960))-r,10e?16:e,ms===null)var r=!1;else{if(e=ms,ms=null,Fg=0,ut&6)throw Error(Te(331));var i=ut;for(ut|=4,Ue=e.current;Ue!==null;){var o=Ue,s=o.child;if(Ue.flags&16){var a=o.deletions;if(a!==null){for(var l=0;lnn()-DS?Ba(e,0):LS|=n),wr(e,t)}function z4(e,t){t===0&&(e.mode&1?(t=rp,rp<<=1,!(rp&130023424)&&(rp=4194304)):t=1);var n=ur();e=ko(e,t),e!==null&&($d(e,t,n),wr(e,n))}function WH(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),z4(e,n)}function YH(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(Te(314))}r!==null&&r.delete(t),z4(e,n)}var U4;U4=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||_r.current)vr=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return vr=!1,LH(e,t,n);vr=!!(e.flags&131072)}else vr=!1,Ft&&t.flags&1048576&&WA(t,Pg,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;sm(e,t),e=t.pendingProps;var i=kc(t,nr.current);pc(t,n),i=OS(null,t,r,e,i,n);var o=PS();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,br(r)?(o=!0,Tg(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,xS(t),i.updater=xy,t.stateNode=i,i._reactInternals=t,q1(t,r,e,n),t=K1(null,t,r,!0,o,n)):(t.tag=0,Ft&&o&&mS(t),lr(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(sm(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=GH(r),e=hi(r,e),i){case 0:t=Z1(null,t,r,e,n);break e;case 1:t=Mk(null,t,r,e,n);break e;case 11:t=Pk(null,t,r,e,n);break e;case 14:t=kk(null,t,r,hi(r.type,e),n);break e}throw Error(Te(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:hi(r,i),Z1(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:hi(r,i),Mk(e,t,r,i,n);case 3:e:{if(E4(t),e===null)throw Error(Te(387));r=t.pendingProps,o=t.memoizedState,i=o.element,ZA(e,t),Rg(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Lc(Error(Te(423)),t),t=Rk(e,t,r,n,i);break e}else if(r!==i){i=Lc(Error(Te(424)),t),t=Rk(e,t,r,n,i);break e}else for(Rr=Es(t.stateNode.containerInfo.firstChild),Lr=t,Ft=!0,gi=null,n=JA(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Mc(),r===i){t=Mo(e,t,n);break e}lr(e,t,r,n)}t=t.child}return t;case 5:return e4(t),e===null&&H1(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,j1(r,i)?s=null:o!==null&&j1(r,o)&&(t.flags|=32),C4(e,t),lr(e,t,s,n),t.child;case 6:return e===null&&H1(t),null;case 13:return T4(e,t,n);case 4:return SS(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Rc(t,null,r,n):lr(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:hi(r,i),Pk(e,t,r,i,n);case 7:return lr(e,t,t.pendingProps,n),t.child;case 8:return lr(e,t,t.pendingProps.children,n),t.child;case 12:return lr(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,Ot(kg,r._currentValue),r._currentValue=s,o!==null)if(Pi(o.value,s)){if(o.children===i.children&&!_r.current){t=Mo(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=Co(-1,n&-n),l.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?l.next=l:(l.next=f.next,f.next=l),c.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),W1(o.return,n,t),a.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(Te(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),W1(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}lr(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,pc(t,n),i=ti(i),r=r(i),t.flags|=1,lr(e,t,r,n),t.child;case 14:return r=t.type,i=hi(r,t.pendingProps),i=hi(r.type,i),kk(e,t,r,i,n);case 15:return x4(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:hi(r,i),sm(e,t),t.tag=1,br(r)?(e=!0,Tg(t)):e=!1,pc(t,n),XA(t,r,i),q1(t,r,i,n),K1(null,t,r,!0,e,n);case 19:return O4(e,t,n);case 22:return S4(e,t,n)}throw Error(Te(156,t.tag))};function V4(e,t){return mA(e,t)}function qH(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 Zr(e,t,n,r){return new qH(e,t,n,r)}function $S(e){return e=e.prototype,!(!e||!e.isReactComponent)}function GH(e){if(typeof e=="function")return $S(e)?1:0;if(e!=null){if(e=e.$$typeof,e===rS)return 11;if(e===iS)return 14}return 2}function ks(e,t){var n=e.alternate;return n===null?(n=Zr(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 cm(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")$S(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case ql:return za(n.children,i,o,t);case nS:s=8,i|=8;break;case v1:return e=Zr(12,n,t,i|2),e.elementType=v1,e.lanes=o,e;case y1:return e=Zr(13,n,t,i),e.elementType=y1,e.lanes=o,e;case _1:return e=Zr(19,n,t,i),e.elementType=_1,e.lanes=o,e;case QD:return Ty(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case KD:s=10;break e;case XD:s=9;break e;case rS:s=11;break e;case iS:s=14;break e;case ts:s=16,r=null;break e}throw Error(Te(130,e==null?e:typeof e,""))}return t=Zr(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function za(e,t,n,r){return e=Zr(7,e,r,t),e.lanes=n,e}function Ty(e,t,n,r){return e=Zr(22,e,r,t),e.elementType=QD,e.lanes=n,e.stateNode={isHidden:!1},e}function Y0(e,t,n){return e=Zr(6,e,null,t),e.lanes=n,e}function q0(e,t,n){return t=Zr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ZH(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=O0(0),this.expirationTimes=O0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=O0(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function jS(e,t,n,r,i,o,s,a,l){return e=new ZH(e,t,n,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Zr(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},xS(o),e}function KH(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=$r})(XU);const Ua=BL(Za);var q4,Vk=Za;q4=Vk.createRoot,Vk.hydrateRoot;var Bg={},tW={get exports(){return Bg},set exports(e){Bg=e}},G4={};/** * @license React * use-sync-external-store-shim.production.min.js * @@ -62,7 +62,7 @@ Error generating stack: `+o.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Dc=H;function ZH(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var KH=typeof Object.is=="function"?Object.is:ZH,XH=Dc.useState,QH=Dc.useEffect,JH=Dc.useLayoutEffect,eW=Dc.useDebugValue;function tW(e,t){var n=t(),r=XH({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return JH(function(){i.value=n,i.getSnapshot=t,Y0(i)&&o({inst:i})},[e,n,t]),QH(function(){return Y0(i)&&o({inst:i}),e(function(){Y0(i)&&o({inst:i})})},[e]),eW(n),n}function Y0(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!KH(e,n)}catch{return!0}}function nW(e,t){return t()}var rW=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?nW:tW;W4.useSyncExternalStore=Dc.useSyncExternalStore!==void 0?Dc.useSyncExternalStore:rW;(function(e){e.exports=W4})(GH);var Uk={},iW={get exports(){return Uk},set exports(e){Uk=e}},Y4={};/** + */var Ac=H;function nW(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var rW=typeof Object.is=="function"?Object.is:nW,iW=Ac.useState,oW=Ac.useEffect,sW=Ac.useLayoutEffect,aW=Ac.useDebugValue;function lW(e,t){var n=t(),r=iW({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return sW(function(){i.value=n,i.getSnapshot=t,G0(i)&&o({inst:i})},[e,n,t]),oW(function(){return G0(i)&&o({inst:i}),e(function(){G0(i)&&o({inst:i})})},[e]),aW(n),n}function G0(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!rW(e,n)}catch{return!0}}function cW(e,t){return t()}var uW=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?cW:lW;G4.useSyncExternalStore=Ac.useSyncExternalStore!==void 0?Ac.useSyncExternalStore:uW;(function(e){e.exports=G4})(tW);var Hk={},fW={get exports(){return Hk},set exports(e){Hk=e}},Z4={};/** * @license React * use-sync-external-store-shim/with-selector.production.min.js * @@ -70,14 +70,14 @@ Error generating stack: `+o.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var ky=H,oW=jg;function sW(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var aW=typeof Object.is=="function"?Object.is:sW,lW=oW.useSyncExternalStore,cW=ky.useRef,uW=ky.useEffect,fW=ky.useMemo,dW=ky.useDebugValue;Y4.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=cW(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=fW(function(){function l(m){if(!c){if(c=!0,f=m,m=r(m),i!==void 0&&s.hasValue){var g=s.value;if(i(g,m))return h=g}return h=m}if(g=h,aW(f,m))return g;var v=r(m);return i!==void 0&&i(g,v)?g:(f=m,h=v)}var c=!1,f,h,p=n===void 0?null:n;return[function(){return l(t())},p===null?void 0:function(){return l(p())}]},[t,n,r,i]);var a=lW(e,o[0],o[1]);return uW(function(){s.hasValue=!0,s.value=a},[a]),dW(a),a};(function(e){e.exports=Y4})(iW);function hW(e){e()}let q4=hW;const pW=e=>q4=e,mW=()=>q4,G4=H.createContext(null),gW=()=>{throw new Error("uSES not initialized!")};function mc(){return mc=Object.assign||function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}var sw={},vW={get exports(){return sw},set exports(e){sw=e}},bt={};/** @license React v16.13.1 + */var Ry=H,dW=Bg;function hW(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var pW=typeof Object.is=="function"?Object.is:hW,mW=dW.useSyncExternalStore,gW=Ry.useRef,vW=Ry.useEffect,yW=Ry.useMemo,_W=Ry.useDebugValue;Z4.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=gW(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=yW(function(){function l(m){if(!c){if(c=!0,f=m,m=r(m),i!==void 0&&s.hasValue){var g=s.value;if(i(g,m))return h=g}return h=m}if(g=h,pW(f,m))return g;var v=r(m);return i!==void 0&&i(g,v)?g:(f=m,h=v)}var c=!1,f,h,p=n===void 0?null:n;return[function(){return l(t())},p===null?void 0:function(){return l(p())}]},[t,n,r,i]);var a=mW(e,o[0],o[1]);return vW(function(){s.hasValue=!0,s.value=a},[a]),_W(a),a};(function(e){e.exports=Z4})(fW);function bW(e){e()}let K4=bW;const wW=e=>K4=e,xW=()=>K4,X4=H.createContext(null),SW=()=>{throw new Error("uSES not initialized!")};function gc(){return gc=Object.assign||function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}var lw={},CW={get exports(){return lw},set exports(e){lw=e}},bt={};/** @license React v16.13.1 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Pn=typeof Symbol=="function"&&Symbol.for,BS=Pn?Symbol.for("react.element"):60103,zS=Pn?Symbol.for("react.portal"):60106,My=Pn?Symbol.for("react.fragment"):60107,Ry=Pn?Symbol.for("react.strict_mode"):60108,Ny=Pn?Symbol.for("react.profiler"):60114,Ly=Pn?Symbol.for("react.provider"):60109,Dy=Pn?Symbol.for("react.context"):60110,US=Pn?Symbol.for("react.async_mode"):60111,Ay=Pn?Symbol.for("react.concurrent_mode"):60111,Iy=Pn?Symbol.for("react.forward_ref"):60112,Fy=Pn?Symbol.for("react.suspense"):60113,yW=Pn?Symbol.for("react.suspense_list"):60120,$y=Pn?Symbol.for("react.memo"):60115,jy=Pn?Symbol.for("react.lazy"):60116,_W=Pn?Symbol.for("react.block"):60121,bW=Pn?Symbol.for("react.fundamental"):60117,wW=Pn?Symbol.for("react.responder"):60118,xW=Pn?Symbol.for("react.scope"):60119;function Br(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case BS:switch(e=e.type,e){case US:case Ay:case My:case Ny:case Ry:case Fy:return e;default:switch(e=e&&e.$$typeof,e){case Dy:case Iy:case jy:case $y:case Ly:return e;default:return t}}case zS:return t}}}function Z4(e){return Br(e)===Ay}bt.AsyncMode=US;bt.ConcurrentMode=Ay;bt.ContextConsumer=Dy;bt.ContextProvider=Ly;bt.Element=BS;bt.ForwardRef=Iy;bt.Fragment=My;bt.Lazy=jy;bt.Memo=$y;bt.Portal=zS;bt.Profiler=Ny;bt.StrictMode=Ry;bt.Suspense=Fy;bt.isAsyncMode=function(e){return Z4(e)||Br(e)===US};bt.isConcurrentMode=Z4;bt.isContextConsumer=function(e){return Br(e)===Dy};bt.isContextProvider=function(e){return Br(e)===Ly};bt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===BS};bt.isForwardRef=function(e){return Br(e)===Iy};bt.isFragment=function(e){return Br(e)===My};bt.isLazy=function(e){return Br(e)===jy};bt.isMemo=function(e){return Br(e)===$y};bt.isPortal=function(e){return Br(e)===zS};bt.isProfiler=function(e){return Br(e)===Ny};bt.isStrictMode=function(e){return Br(e)===Ry};bt.isSuspense=function(e){return Br(e)===Fy};bt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===My||e===Ay||e===Ny||e===Ry||e===Fy||e===yW||typeof e=="object"&&e!==null&&(e.$$typeof===jy||e.$$typeof===$y||e.$$typeof===Ly||e.$$typeof===Dy||e.$$typeof===Iy||e.$$typeof===bW||e.$$typeof===wW||e.$$typeof===xW||e.$$typeof===_W)};bt.typeOf=Br;(function(e){e.exports=bt})(vW);var VS=sw,SW={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},CW={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},EW={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},K4={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},HS={};HS[VS.ForwardRef]=EW;HS[VS.Memo]=K4;function Vk(e){return VS.isMemo(e)?K4:HS[e.$$typeof]||SW}var TW=Object.defineProperty,OW=Object.getOwnPropertyNames,Hk=Object.getOwnPropertySymbols,PW=Object.getOwnPropertyDescriptor,kW=Object.getPrototypeOf,Wk=Object.prototype;function X4(e,t,n){if(typeof t!="string"){if(Wk){var r=kW(t);r&&r!==Wk&&X4(e,r,n)}var i=OW(t);Hk&&(i=i.concat(Hk(t)));for(var o=Vk(e),s=Vk(t),a=0;at(i(...o)))}return n}function lw(e){return function(n){const r=e(n);function i(){return r}return i.dependsOnOwnProps=!1,i}}function qk(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function Q4(e,t){return function(r,{displayName:i}){const o=function(a,l){return o.dependsOnOwnProps?o.mapToProps(a,l):o.mapToProps(a,void 0)};return o.dependsOnOwnProps=!0,o.mapToProps=function(a,l){o.mapToProps=e,o.dependsOnOwnProps=qk(e);let c=o(a,l);return typeof c=="function"&&(o.mapToProps=c,o.dependsOnOwnProps=qk(c),c=o(a,l)),c},o}}function qS(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function $W(e){return e&&typeof e=="object"?lw(t=>FW(e,t)):e?typeof e=="function"?Q4(e):qS(e,"mapDispatchToProps"):lw(t=>({dispatch:t}))}function jW(e){return e?typeof e=="function"?Q4(e):qS(e,"mapStateToProps"):lw(()=>({}))}function BW(e,t,n){return mc({},n,e,t)}function zW(e){return function(n,{displayName:r,areMergedPropsEqual:i}){let o=!1,s;return function(l,c,f){const h=e(l,c,f);return o?i(h,s)||(s=h):(o=!0,s=h),s}}}function UW(e){return e?typeof e=="function"?zW(e):qS(e,"mergeProps"):()=>BW}function VW(){const e=mW();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 Gk={notify(){},get:()=>[]};function J4(e,t){let n,r=Gk;function i(h){return l(),r.subscribe(h)}function o(){r.notify()}function s(){f.onStateChange&&f.onStateChange()}function a(){return!!n}function l(){n||(n=t?t.addNestedSub(s):e.subscribe(s),r=VW())}function c(){n&&(n(),n=void 0,r.clear(),r=Gk)}const f={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:s,isSubscribed:a,trySubscribe:l,tryUnsubscribe:c,getListeners:()=>r};return f}const HW=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Bg=HW?H.useLayoutEffect:H.useEffect;function Zk(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function q0(e,t){if(Zk(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{eI=e},qW=[null,null];function GW(e,t,n){Bg(()=>e(...t),n)}function ZW(e,t,n,r,i,o){e.current=r,n.current=!1,i.current&&(i.current=null,o())}function KW(e,t,n,r,i,o,s,a,l,c,f){if(!e)return()=>{};let h=!1,p=null;const m=()=>{if(h||!a.current)return;const v=t.getState();let w,y;try{w=r(v,i.current)}catch(b){y=b,p=b}y||(p=null),w===o.current?s.current||c():(o.current=w,l.current=w,s.current=!0,f())};return n.onStateChange=m,n.trySubscribe(),m(),()=>{if(h=!0,n.tryUnsubscribe(),n.onStateChange=null,p)throw p}}function XW(e,t){return e===t}function QW(e,t,n,{pure:r,areStatesEqual:i=XW,areOwnPropsEqual:o=q0,areStatePropsEqual:s=q0,areMergedPropsEqual:a=q0,forwardRef:l=!1,context:c=G4}={}){const f=c,h=jW(e),p=$W(t),m=UW(n),g=!!e;return w=>{const y=w.displayName||w.name||"Component",b=`Connect(${y})`,x={shouldHandleStateChanges:g,displayName:b,wrappedComponentName:y,WrappedComponent:w,initMapStateToProps:h,initMapDispatchToProps:p,initMergeProps:m,areStatesEqual:i,areStatePropsEqual:s,areOwnPropsEqual:o,areMergedPropsEqual:a};function T(N){const[D,z,A]=H.useMemo(()=>{const{reactReduxForwardedRef:X}=N,le=jS(N,WW);return[N.context,X,le]},[N]),Y=H.useMemo(()=>D&&D.Consumer&&aw.isContextConsumer(V.createElement(D.Consumer,null))?D:f,[D,f]),q=H.useContext(Y),ee=!!N.store&&!!N.store.getState&&!!N.store.dispatch,K=!!q&&!!q.store,te=ee?N.store:q.store,oe=K?q.getServerState:te.getState,se=H.useMemo(()=>IW(te.dispatch,x),[te]),[Z,$]=H.useMemo(()=>{if(!g)return qW;const X=J4(te,ee?void 0:q.subscription),le=X.notifyNestedSubs.bind(X);return[X,le]},[te,ee,q]),I=H.useMemo(()=>ee?q:mc({},q,{subscription:Z}),[ee,q,Z]),B=H.useRef(),re=H.useRef(A),W=H.useRef(),G=H.useRef(!1);H.useRef(!1);const ne=H.useRef(!1),ae=H.useRef();Bg(()=>(ne.current=!0,()=>{ne.current=!1}),[]);const me=H.useMemo(()=>()=>W.current&&A===re.current?W.current:se(te.getState(),A),[te,A]),O=H.useMemo(()=>le=>Z?KW(g,te,Z,se,re,B,G,ne,W,$,le):()=>{},[Z]);GW(ZW,[re,B,G,A,W,$]);let R;try{R=eI(O,me,oe?()=>se(oe(),A):me)}catch(X){throw ae.current&&(X.message+=` + */var ZS=Symbol.for("react.element"),KS=Symbol.for("react.portal"),Uy=Symbol.for("react.fragment"),Vy=Symbol.for("react.strict_mode"),Hy=Symbol.for("react.profiler"),Wy=Symbol.for("react.provider"),Yy=Symbol.for("react.context"),$W=Symbol.for("react.server_context"),qy=Symbol.for("react.forward_ref"),Gy=Symbol.for("react.suspense"),Zy=Symbol.for("react.suspense_list"),Ky=Symbol.for("react.memo"),Xy=Symbol.for("react.lazy"),jW=Symbol.for("react.offscreen"),BW=Symbol.for("react.module.reference");function oi(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case ZS:switch(e=e.type,e){case Uy:case Hy:case Vy:case Gy:case Zy:return e;default:switch(e=e&&e.$$typeof,e){case $W:case Yy:case qy:case Xy:case Ky:case Wy:return e;default:return t}}case KS:return t}}}wt.ContextConsumer=Yy;wt.ContextProvider=Wy;wt.Element=ZS;wt.ForwardRef=qy;wt.Fragment=Uy;wt.Lazy=Xy;wt.Memo=Ky;wt.Portal=KS;wt.Profiler=Hy;wt.StrictMode=Vy;wt.Suspense=Gy;wt.SuspenseList=Zy;wt.isAsyncMode=function(){return!1};wt.isConcurrentMode=function(){return!1};wt.isContextConsumer=function(e){return oi(e)===Yy};wt.isContextProvider=function(e){return oi(e)===Wy};wt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===ZS};wt.isForwardRef=function(e){return oi(e)===qy};wt.isFragment=function(e){return oi(e)===Uy};wt.isLazy=function(e){return oi(e)===Xy};wt.isMemo=function(e){return oi(e)===Ky};wt.isPortal=function(e){return oi(e)===KS};wt.isProfiler=function(e){return oi(e)===Hy};wt.isStrictMode=function(e){return oi(e)===Vy};wt.isSuspense=function(e){return oi(e)===Gy};wt.isSuspenseList=function(e){return oi(e)===Zy};wt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Uy||e===Hy||e===Vy||e===Gy||e===Zy||e===jW||typeof e=="object"&&e!==null&&(e.$$typeof===Xy||e.$$typeof===Ky||e.$$typeof===Wy||e.$$typeof===Yy||e.$$typeof===qy||e.$$typeof===BW||e.getModuleId!==void 0)};wt.typeOf=oi;(function(e){e.exports=wt})(FW);const zW=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function UW(e,t,n,r,{areStatesEqual:i,areOwnPropsEqual:o,areStatePropsEqual:s}){let a=!1,l,c,f,h,p;function m(b,x){return l=b,c=x,f=e(l,c),h=t(r,c),p=n(f,h,c),a=!0,p}function g(){return f=e(l,c),t.dependsOnOwnProps&&(h=t(r,c)),p=n(f,h,c),p}function v(){return e.dependsOnOwnProps&&(f=e(l,c)),t.dependsOnOwnProps&&(h=t(r,c)),p=n(f,h,c),p}function w(){const b=e(l,c),x=!s(b,f);return f=b,x&&(p=n(f,h,c)),p}function y(b,x){const T=!o(x,c),P=!i(b,l,x,c);return l=b,c=x,T&&P?g():T?v():P?w():p}return function(x,T){return a?y(x,T):m(x,T)}}function VW(e,t){let{initMapStateToProps:n,initMapDispatchToProps:r,initMergeProps:i}=t,o=VS(t,zW);const s=n(e,o),a=r(e,o),l=i(e,o);return UW(s,a,l,e,o)}function HW(e,t){const n={};for(const r in e){const i=e[r];typeof i=="function"&&(n[r]=(...o)=>t(i(...o)))}return n}function uw(e){return function(n){const r=e(n);function i(){return r}return i.dependsOnOwnProps=!1,i}}function Zk(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function tI(e,t){return function(r,{displayName:i}){const o=function(a,l){return o.dependsOnOwnProps?o.mapToProps(a,l):o.mapToProps(a,void 0)};return o.dependsOnOwnProps=!0,o.mapToProps=function(a,l){o.mapToProps=e,o.dependsOnOwnProps=Zk(e);let c=o(a,l);return typeof c=="function"&&(o.mapToProps=c,o.dependsOnOwnProps=Zk(c),c=o(a,l)),c},o}}function XS(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function WW(e){return e&&typeof e=="object"?uw(t=>HW(e,t)):e?typeof e=="function"?tI(e):XS(e,"mapDispatchToProps"):uw(t=>({dispatch:t}))}function YW(e){return e?typeof e=="function"?tI(e):XS(e,"mapStateToProps"):uw(()=>({}))}function qW(e,t,n){return gc({},n,e,t)}function GW(e){return function(n,{displayName:r,areMergedPropsEqual:i}){let o=!1,s;return function(l,c,f){const h=e(l,c,f);return o?i(h,s)||(s=h):(o=!0,s=h),s}}}function ZW(e){return e?typeof e=="function"?GW(e):XS(e,"mergeProps"):()=>qW}function KW(){const e=xW();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 Kk={notify(){},get:()=>[]};function nI(e,t){let n,r=Kk;function i(h){return l(),r.subscribe(h)}function o(){r.notify()}function s(){f.onStateChange&&f.onStateChange()}function a(){return!!n}function l(){n||(n=t?t.addNestedSub(s):e.subscribe(s),r=KW())}function c(){n&&(n(),n=void 0,r.clear(),r=Kk)}const f={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:s,isSubscribed:a,trySubscribe:l,tryUnsubscribe:c,getListeners:()=>r};return f}const XW=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",zg=XW?H.useLayoutEffect:H.useEffect;function Xk(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function Z0(e,t){if(Xk(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{rI=e},eY=[null,null];function tY(e,t,n){zg(()=>e(...t),n)}function nY(e,t,n,r,i,o){e.current=r,n.current=!1,i.current&&(i.current=null,o())}function rY(e,t,n,r,i,o,s,a,l,c,f){if(!e)return()=>{};let h=!1,p=null;const m=()=>{if(h||!a.current)return;const v=t.getState();let w,y;try{w=r(v,i.current)}catch(b){y=b,p=b}y||(p=null),w===o.current?s.current||c():(o.current=w,l.current=w,s.current=!0,f())};return n.onStateChange=m,n.trySubscribe(),m(),()=>{if(h=!0,n.tryUnsubscribe(),n.onStateChange=null,p)throw p}}function iY(e,t){return e===t}function oY(e,t,n,{pure:r,areStatesEqual:i=iY,areOwnPropsEqual:o=Z0,areStatePropsEqual:s=Z0,areMergedPropsEqual:a=Z0,forwardRef:l=!1,context:c=X4}={}){const f=c,h=YW(e),p=WW(t),m=ZW(n),g=!!e;return w=>{const y=w.displayName||w.name||"Component",b=`Connect(${y})`,x={shouldHandleStateChanges:g,displayName:b,wrappedComponentName:y,WrappedComponent:w,initMapStateToProps:h,initMapDispatchToProps:p,initMergeProps:m,areStatesEqual:i,areStatePropsEqual:s,areOwnPropsEqual:o,areMergedPropsEqual:a};function T(N){const[D,z,A]=H.useMemo(()=>{const{reactReduxForwardedRef:X}=N,le=VS(N,QW);return[N.context,X,le]},[N]),Y=H.useMemo(()=>D&&D.Consumer&&cw.isContextConsumer(V.createElement(D.Consumer,null))?D:f,[D,f]),q=H.useContext(Y),ee=!!N.store&&!!N.store.getState&&!!N.store.dispatch,K=!!q&&!!q.store,te=ee?N.store:q.store,oe=K?q.getServerState:te.getState,se=H.useMemo(()=>VW(te.dispatch,x),[te]),[Z,$]=H.useMemo(()=>{if(!g)return eY;const X=nI(te,ee?void 0:q.subscription),le=X.notifyNestedSubs.bind(X);return[X,le]},[te,ee,q]),I=H.useMemo(()=>ee?q:gc({},q,{subscription:Z}),[ee,q,Z]),B=H.useRef(),re=H.useRef(A),W=H.useRef(),G=H.useRef(!1);H.useRef(!1);const ne=H.useRef(!1),ae=H.useRef();zg(()=>(ne.current=!0,()=>{ne.current=!1}),[]);const me=H.useMemo(()=>()=>W.current&&A===re.current?W.current:se(te.getState(),A),[te,A]),O=H.useMemo(()=>le=>Z?rY(g,te,Z,se,re,B,G,ne,W,$,le):()=>{},[Z]);tY(nY,[re,B,G,A,W,$]);let R;try{R=rI(O,me,oe?()=>se(oe(),A):me)}catch(X){throw ae.current&&(X.message+=` The error may be correlated with this previous error: ${ae.current.stack} -`),X}Bg(()=>{ae.current=void 0,W.current=void 0,B.current=R});const F=H.useMemo(()=>V.createElement(w,mc({},R,{ref:z})),[z,w,R]);return H.useMemo(()=>g?V.createElement(Y.Provider,{value:I},F):F,[Y,F,I])}const k=V.memo(T);if(k.WrappedComponent=w,k.displayName=T.displayName=b,l){const D=V.forwardRef(function(A,Y){return V.createElement(k,mc({},A,{reactReduxForwardedRef:Y}))});return D.displayName=b,D.WrappedComponent=w,Yk(D,w)}return Yk(k,w)}}function JW({store:e,context:t,children:n,serverState:r}){const i=H.useMemo(()=>{const a=J4(e);return{store:e,subscription:a,getServerState:r?()=>r:void 0}},[e,r]),o=H.useMemo(()=>e.getState(),[e]);Bg(()=>{const{subscription:a}=i;return a.onStateChange=a.notifyNestedSubs,a.trySubscribe(),o!==e.getState()&&a.notifyNestedSubs(),()=>{a.tryUnsubscribe(),a.onStateChange=void 0}},[i,o]);const s=t||G4;return V.createElement(s.Provider,{value:i},n)}YW(jg.useSyncExternalStore);pW(Za.unstable_batchedUpdates);/** +`),X}zg(()=>{ae.current=void 0,W.current=void 0,B.current=R});const F=H.useMemo(()=>V.createElement(w,gc({},R,{ref:z})),[z,w,R]);return H.useMemo(()=>g?V.createElement(Y.Provider,{value:I},F):F,[Y,F,I])}const k=V.memo(T);if(k.WrappedComponent=w,k.displayName=T.displayName=b,l){const D=V.forwardRef(function(A,Y){return V.createElement(k,gc({},A,{reactReduxForwardedRef:Y}))});return D.displayName=b,D.WrappedComponent=w,Gk(D,w)}return Gk(k,w)}}function sY({store:e,context:t,children:n,serverState:r}){const i=H.useMemo(()=>{const a=nI(e);return{store:e,subscription:a,getServerState:r?()=>r:void 0}},[e,r]),o=H.useMemo(()=>e.getState(),[e]);zg(()=>{const{subscription:a}=i;return a.onStateChange=a.notifyNestedSubs,a.trySubscribe(),o!==e.getState()&&a.notifyNestedSubs(),()=>{a.tryUnsubscribe(),a.onStateChange=void 0}},[i,o]);const s=t||X4;return V.createElement(s.Provider,{value:i},n)}JW(Bg.useSyncExternalStore);wW(Za.unstable_batchedUpdates);/** * @remix-run/router v1.2.1 * * Copyright (c) Remix Software Inc. @@ -98,7 +98,7 @@ ${ae.current.stack} * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function zg(){return zg=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function tY(){return Math.random().toString(36).substr(2,8)}function Xk(e){return{usr:e.state,key:e.key}}function cw(e,t,n,r){return n===void 0&&(n=null),zg({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Qc(t):t,{state:n,key:t&&t.key||r||tY()})}function cd(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 Qc(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 nY(e){let t=typeof window<"u"&&typeof window.location<"u"&&window.location.origin!=="null"?window.location.origin:window.location.href,n=typeof e=="string"?e:cd(e);return hn(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}function rY(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a=ms.Pop,l=null;function c(){a=ms.Pop,l&&l({action:a,location:p.location})}function f(m,g){a=ms.Push;let v=cw(p.location,m,g);n&&n(v,m);let w=Xk(v),y=p.createHref(v);try{s.pushState(w,"",y)}catch{i.location.assign(y)}o&&l&&l({action:a,location:p.location})}function h(m,g){a=ms.Replace;let v=cw(p.location,m,g);n&&n(v,m);let w=Xk(v),y=p.createHref(v);s.replaceState(w,"",y),o&&l&&l({action:a,location:p.location})}let p={get action(){return a},get location(){return e(i,s)},listen(m){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(Kk,c),l=m,()=>{i.removeEventListener(Kk,c),l=null}},createHref(m){return t(i,m)},encodeLocation(m){let g=nY(typeof m=="string"?m:cd(m));return{pathname:g.pathname,search:g.search,hash:g.hash}},push:f,replace:h,go(m){return s.go(m)}};return p}var Qk;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Qk||(Qk={}));function iY(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?Qc(t):t,i=rI(r.pathname||"/",n);if(i==null)return null;let o=tI(e);oY(o);let s=null;for(let a=0;s==null&&a{let l={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};l.relativePath.startsWith("/")&&(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=ks([r,l.relativePath]),f=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+'".')),tI(o.children,t,f,c)),!(o.path==null&&!o.index)&&t.push({path:c,score:dY(c,o.index),routesMeta:f})};return e.forEach((o,s)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))i(o,s);else for(let l of nI(o.path))i(o,s,l)}),t}function nI(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let s=nI(r.join("/")),a=[];return a.push(...s.map(l=>l===""?o:[o,l].join("/"))),i&&a.push(...s),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function oY(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:hY(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const sY=/^:\w+$/,aY=3,lY=2,cY=1,uY=10,fY=-2,Jk=e=>e==="*";function dY(e,t){let n=e.split("/"),r=n.length;return n.some(Jk)&&(r+=fY),t&&(r+=lY),n.filter(i=>!Jk(i)).reduce((i,o)=>i+(sY.test(o)?aY:o===""?cY:uY),r)}function hY(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 pY(e,t){let{routesMeta:n}=e,r={},i="/",o=[];for(let s=0;s{if(f==="*"){let p=a[h]||"";s=o.slice(0,o.length-p.length).replace(/(.)\/+$/,"$1")}return c[f]=yY(a[h]||"",f),c},{}),pathname:o,pathnameBase:s,pattern:e}}function gY(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),GS(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(s,a)=>(r.push(a),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function vY(e){try{return decodeURI(e)}catch(t){return GS(!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 yY(e,t){try{return decodeURIComponent(e)}catch(n){return GS(!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 rI(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 GS(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function _Y(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Qc(e):e;return{pathname:n?n.startsWith("/")?n:bY(n,t):t,search:xY(r),hash:SY(i)}}function bY(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 G0(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 iI(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function oI(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Qc(e):(i=zg({},e),hn(!i.pathname||!i.pathname.includes("?"),G0("?","pathname","search",i)),hn(!i.pathname||!i.pathname.includes("#"),G0("#","pathname","hash",i)),hn(!i.search||!i.search.includes("#"),G0("#","search","hash",i)));let o=e===""||i.pathname==="",s=o?"/":i.pathname,a;if(r||s==null)a=n;else{let h=t.length-1;if(s.startsWith("..")){let p=s.split("/");for(;p[0]==="..";)p.shift(),h-=1;i.pathname=p.join("/")}a=h>=0?t[h]:"/"}let l=_Y(i,a),c=s&&s!=="/"&&s.endsWith("/"),f=(o||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||f)&&(l.pathname+="/"),l}const ks=e=>e.join("/").replace(/\/\/+/g,"/"),wY=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),xY=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,SY=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class CY{constructor(t,n,r,i){i===void 0&&(i=!1),this.status=t,this.statusText=n||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function EY(e){return e instanceof CY}const TY=["post","put","patch","delete"];[...TY];/** + */function Ug(){return Ug=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function lY(){return Math.random().toString(36).substr(2,8)}function Jk(e){return{usr:e.state,key:e.key}}function fw(e,t,n,r){return n===void 0&&(n=null),Ug({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?eu(t):t,{state:n,key:t&&t.key||r||lY()})}function ud(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 eu(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 cY(e){let t=typeof window<"u"&&typeof window.location<"u"&&window.location.origin!=="null"?window.location.origin:window.location.href,n=typeof e=="string"?e:ud(e);return hn(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}function uY(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a=gs.Pop,l=null;function c(){a=gs.Pop,l&&l({action:a,location:p.location})}function f(m,g){a=gs.Push;let v=fw(p.location,m,g);n&&n(v,m);let w=Jk(v),y=p.createHref(v);try{s.pushState(w,"",y)}catch{i.location.assign(y)}o&&l&&l({action:a,location:p.location})}function h(m,g){a=gs.Replace;let v=fw(p.location,m,g);n&&n(v,m);let w=Jk(v),y=p.createHref(v);s.replaceState(w,"",y),o&&l&&l({action:a,location:p.location})}let p={get action(){return a},get location(){return e(i,s)},listen(m){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(Qk,c),l=m,()=>{i.removeEventListener(Qk,c),l=null}},createHref(m){return t(i,m)},encodeLocation(m){let g=cY(typeof m=="string"?m:ud(m));return{pathname:g.pathname,search:g.search,hash:g.hash}},push:f,replace:h,go(m){return s.go(m)}};return p}var eM;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(eM||(eM={}));function fY(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?eu(t):t,i=sI(r.pathname||"/",n);if(i==null)return null;let o=iI(e);dY(o);let s=null;for(let a=0;s==null&&a{let l={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};l.relativePath.startsWith("/")&&(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=Ms([r,l.relativePath]),f=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+'".')),iI(o.children,t,f,c)),!(o.path==null&&!o.index)&&t.push({path:c,score:_Y(c,o.index),routesMeta:f})};return e.forEach((o,s)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))i(o,s);else for(let l of oI(o.path))i(o,s,l)}),t}function oI(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let s=oI(r.join("/")),a=[];return a.push(...s.map(l=>l===""?o:[o,l].join("/"))),i&&a.push(...s),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function dY(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:bY(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const hY=/^:\w+$/,pY=3,mY=2,gY=1,vY=10,yY=-2,tM=e=>e==="*";function _Y(e,t){let n=e.split("/"),r=n.length;return n.some(tM)&&(r+=yY),t&&(r+=mY),n.filter(i=>!tM(i)).reduce((i,o)=>i+(hY.test(o)?pY:o===""?gY:vY),r)}function bY(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 wY(e,t){let{routesMeta:n}=e,r={},i="/",o=[];for(let s=0;s{if(f==="*"){let p=a[h]||"";s=o.slice(0,o.length-p.length).replace(/(.)\/+$/,"$1")}return c[f]=EY(a[h]||"",f),c},{}),pathname:o,pathnameBase:s,pattern:e}}function SY(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),QS(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(s,a)=>(r.push(a),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function CY(e){try{return decodeURI(e)}catch(t){return QS(!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 EY(e,t){try{return decodeURIComponent(e)}catch(n){return QS(!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 sI(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 QS(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function TY(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?eu(e):e;return{pathname:n?n.startsWith("/")?n:OY(n,t):t,search:kY(r),hash:MY(i)}}function OY(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 K0(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 aI(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function lI(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=eu(e):(i=Ug({},e),hn(!i.pathname||!i.pathname.includes("?"),K0("?","pathname","search",i)),hn(!i.pathname||!i.pathname.includes("#"),K0("#","pathname","hash",i)),hn(!i.search||!i.search.includes("#"),K0("#","search","hash",i)));let o=e===""||i.pathname==="",s=o?"/":i.pathname,a;if(r||s==null)a=n;else{let h=t.length-1;if(s.startsWith("..")){let p=s.split("/");for(;p[0]==="..";)p.shift(),h-=1;i.pathname=p.join("/")}a=h>=0?t[h]:"/"}let l=TY(i,a),c=s&&s!=="/"&&s.endsWith("/"),f=(o||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||f)&&(l.pathname+="/"),l}const Ms=e=>e.join("/").replace(/\/\/+/g,"/"),PY=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),kY=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,MY=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class RY{constructor(t,n,r,i){i===void 0&&(i=!1),this.status=t,this.statusText=n||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function NY(e){return e instanceof RY}const LY=["post","put","patch","delete"];[...LY];/** * React Router v6.6.1 * * Copyright (c) Remix Software Inc. @@ -107,7 +107,7 @@ ${ae.current.stack} * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function uw(){return uw=Object.assign?Object.assign.bind():function(e){for(var t=1;t{i.value=r,i.getSnapshot=t,Z0(i)&&o({inst:i})},[e,r,t]),MY(()=>(Z0(i)&&o({inst:i}),e(()=>{Z0(i)&&o({inst:i})})),[e]),NY(r),r}function Z0(e){const t=e.getSnapshot,n=e.value;try{const r=t();return!PY(n,r)}catch{return!0}}function DY(e,t,n){return t()}const AY=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",IY=!AY,FY=IY?DY:LY;"useSyncExternalStore"in Qb&&(e=>e.useSyncExternalStore)(Qb);const $Y=H.createContext(null),jY=H.createContext(null),Ky=H.createContext(null),Ud=H.createContext(null),Xy=H.createContext(null),pl=H.createContext({outlet:null,matches:[]}),sI=H.createContext(null);function BY(e,t){let{relative:n}=t===void 0?{}:t;Jc()||hn(!1);let{basename:r,navigator:i}=H.useContext(Ud),{hash:o,pathname:s,search:a}=ZS(e,{relative:n}),l=s;return r!=="/"&&(l=s==="/"?r:ks([r,s])),i.createHref({pathname:l,search:a,hash:o})}function Jc(){return H.useContext(Xy)!=null}function kn(){return Jc()||hn(!1),H.useContext(Xy).location}function jo(){Jc()||hn(!1);let{basename:e,navigator:t}=H.useContext(Ud),{matches:n}=H.useContext(pl),{pathname:r}=kn(),i=JSON.stringify(iI(n).map(a=>a.pathnameBase)),o=H.useRef(!1);return H.useEffect(()=>{o.current=!0}),H.useCallback(function(a,l){if(l===void 0&&(l={}),!o.current)return;if(typeof a=="number"){t.go(a);return}let c=oI(a,JSON.parse(i),r,l.relative==="path");e!=="/"&&(c.pathname=c.pathname==="/"?e:ks([e,c.pathname])),(l.replace?t.replace:t.push)(c,l.state,l)},[e,t,i,r])}function Js(){let{matches:e}=H.useContext(pl),t=e[e.length-1];return t?t.params:{}}function ZS(e,t){let{relative:n}=t===void 0?{}:t,{matches:r}=H.useContext(pl),{pathname:i}=kn(),o=JSON.stringify(iI(r).map(s=>s.pathnameBase));return H.useMemo(()=>oI(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function zY(e,t){Jc()||hn(!1);let{navigator:n}=H.useContext(Ud),r=H.useContext(Ky),{matches:i}=H.useContext(pl),o=i[i.length-1],s=o?o.params:{};o&&o.pathname;let a=o?o.pathnameBase:"/";o&&o.route;let l=kn(),c;if(t){var f;let v=typeof t=="string"?Qc(t):t;a==="/"||(f=v.pathname)!=null&&f.startsWith(a)||hn(!1),c=v}else c=l;let h=c.pathname||"/",p=a==="/"?h:h.slice(a.length)||"/",m=iY(e,{pathname:p}),g=WY(m&&m.map(v=>Object.assign({},v,{params:Object.assign({},s,v.params),pathname:ks([a,n.encodeLocation?n.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?a:ks([a,n.encodeLocation?n.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),i,r||void 0);return t&&g?H.createElement(Xy.Provider,{value:{location:uw({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:ms.Pop}},g):g}function UY(){let e=ZY(),t=EY(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},o={padding:"2px 4px",backgroundColor:r};return H.createElement(H.Fragment,null,H.createElement("h2",null,"Unhandled Thrown Error!"),H.createElement("h3",{style:{fontStyle:"italic"}},t),n?H.createElement("pre",{style:i},n):null,H.createElement("p",null,"💿 Hey developer 👋"),H.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",H.createElement("code",{style:o},"errorElement")," props on ",H.createElement("code",{style:o},"")))}class VY extends H.Component{constructor(t){super(t),this.state={location:t.location,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location?{error:t.error,location:t.location}:{error:t.error||n.error,location:n.location}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?H.createElement(pl.Provider,{value:this.props.routeContext},H.createElement(sI.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function HY(e){let{routeContext:t,match:n,children:r}=e,i=H.useContext($Y);return i&&n.route.errorElement&&(i._deepestRenderedBoundaryId=n.route.id),H.createElement(pl.Provider,{value:t},r)}function WY(e,t,n){if(t===void 0&&(t=[]),e==null)if(n!=null&&n.errors)e=n.matches;else return null;let r=e,i=n==null?void 0:n.errors;if(i!=null){let o=r.findIndex(s=>s.route.id&&(i==null?void 0:i[s.route.id]));o>=0||hn(!1),r=r.slice(0,Math.min(r.length,o+1))}return r.reduceRight((o,s,a)=>{let l=s.route.id?i==null?void 0:i[s.route.id]:null,c=n?s.route.errorElement||H.createElement(UY,null):null,f=t.concat(r.slice(0,a+1)),h=()=>H.createElement(HY,{match:s,routeContext:{outlet:o,matches:f}},l?c:s.route.element!==void 0?s.route.element:o);return n&&(s.route.errorElement||a===0)?H.createElement(VY,{location:n.location,component:c,error:l,children:h(),routeContext:{outlet:null,matches:f}}):h()},null)}var eM;(function(e){e.UseRevalidator="useRevalidator"})(eM||(eM={}));var Ug;(function(e){e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"})(Ug||(Ug={}));function YY(e){let t=H.useContext(Ky);return t||hn(!1),t}function qY(e){let t=H.useContext(pl);return t||hn(!1),t}function GY(e){let t=qY(),n=t.matches[t.matches.length-1];return n.route.id||hn(!1),n.route.id}function ZY(){var e;let t=H.useContext(sI),n=YY(Ug.UseRouteError),r=GY(Ug.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function KS(e){let{to:t,replace:n,state:r,relative:i}=e;Jc()||hn(!1);let o=H.useContext(Ky),s=jo();return H.useEffect(()=>{o&&o.navigation.state!=="idle"||s(t,{replace:n,state:r,relative:i})}),null}function gt(e){hn(!1)}function KY(e){let{basename:t="/",children:n=null,location:r,navigationType:i=ms.Pop,navigator:o,static:s=!1}=e;Jc()&&hn(!1);let a=t.replace(/^\/*/,"/"),l=H.useMemo(()=>({basename:a,navigator:o,static:s}),[a,o,s]);typeof r=="string"&&(r=Qc(r));let{pathname:c="/",search:f="",hash:h="",state:p=null,key:m="default"}=r,g=H.useMemo(()=>{let v=rI(c,a);return v==null?null:{pathname:v,search:f,hash:h,state:p,key:m}},[a,c,f,h,p,m]);return g==null?null:H.createElement(Ud.Provider,{value:l},H.createElement(Xy.Provider,{children:n,value:{location:g,navigationType:i}}))}function Qy(e){let{children:t,location:n}=e,r=H.useContext(jY),i=r&&!t?r.router.routes:fw(t);return zY(i,n)}var tM;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(tM||(tM={}));new Promise(()=>{});function fw(e,t){t===void 0&&(t=[]);let n=[];return H.Children.forEach(e,(r,i)=>{if(!H.isValidElement(r))return;if(r.type===H.Fragment){n.push.apply(n,fw(r.props.children,t));return}r.type!==gt&&hn(!1),!r.props.index||!r.props.children||hn(!1);let o=[...t,i],s={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,hasErrorBoundary:r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle};r.props.children&&(s.children=fw(r.props.children,o)),n.push(s)}),n}/** + */function dw(){return dw=Object.assign?Object.assign.bind():function(e){for(var t=1;t{i.value=r,i.getSnapshot=t,X0(i)&&o({inst:i})},[e,r,t]),FY(()=>(X0(i)&&o({inst:i}),e(()=>{X0(i)&&o({inst:i})})),[e]),jY(r),r}function X0(e){const t=e.getSnapshot,n=e.value;try{const r=t();return!AY(n,r)}catch{return!0}}function zY(e,t,n){return t()}const UY=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",VY=!UY,HY=VY?zY:BY;"useSyncExternalStore"in e1&&(e=>e.useSyncExternalStore)(e1);const WY=H.createContext(null),YY=H.createContext(null),Qy=H.createContext(null),Ud=H.createContext(null),Jy=H.createContext(null),pl=H.createContext({outlet:null,matches:[]}),cI=H.createContext(null);function qY(e,t){let{relative:n}=t===void 0?{}:t;tu()||hn(!1);let{basename:r,navigator:i}=H.useContext(Ud),{hash:o,pathname:s,search:a}=JS(e,{relative:n}),l=s;return r!=="/"&&(l=s==="/"?r:Ms([r,s])),i.createHref({pathname:l,search:a,hash:o})}function tu(){return H.useContext(Jy)!=null}function kn(){return tu()||hn(!1),H.useContext(Jy).location}function Bo(){tu()||hn(!1);let{basename:e,navigator:t}=H.useContext(Ud),{matches:n}=H.useContext(pl),{pathname:r}=kn(),i=JSON.stringify(aI(n).map(a=>a.pathnameBase)),o=H.useRef(!1);return H.useEffect(()=>{o.current=!0}),H.useCallback(function(a,l){if(l===void 0&&(l={}),!o.current)return;if(typeof a=="number"){t.go(a);return}let c=lI(a,JSON.parse(i),r,l.relative==="path");e!=="/"&&(c.pathname=c.pathname==="/"?e:Ms([e,c.pathname])),(l.replace?t.replace:t.push)(c,l.state,l)},[e,t,i,r])}function Js(){let{matches:e}=H.useContext(pl),t=e[e.length-1];return t?t.params:{}}function JS(e,t){let{relative:n}=t===void 0?{}:t,{matches:r}=H.useContext(pl),{pathname:i}=kn(),o=JSON.stringify(aI(r).map(s=>s.pathnameBase));return H.useMemo(()=>lI(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function GY(e,t){tu()||hn(!1);let{navigator:n}=H.useContext(Ud),r=H.useContext(Qy),{matches:i}=H.useContext(pl),o=i[i.length-1],s=o?o.params:{};o&&o.pathname;let a=o?o.pathnameBase:"/";o&&o.route;let l=kn(),c;if(t){var f;let v=typeof t=="string"?eu(t):t;a==="/"||(f=v.pathname)!=null&&f.startsWith(a)||hn(!1),c=v}else c=l;let h=c.pathname||"/",p=a==="/"?h:h.slice(a.length)||"/",m=fY(e,{pathname:p}),g=QY(m&&m.map(v=>Object.assign({},v,{params:Object.assign({},s,v.params),pathname:Ms([a,n.encodeLocation?n.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?a:Ms([a,n.encodeLocation?n.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),i,r||void 0);return t&&g?H.createElement(Jy.Provider,{value:{location:dw({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:gs.Pop}},g):g}function ZY(){let e=nq(),t=NY(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},o={padding:"2px 4px",backgroundColor:r};return H.createElement(H.Fragment,null,H.createElement("h2",null,"Unhandled Thrown Error!"),H.createElement("h3",{style:{fontStyle:"italic"}},t),n?H.createElement("pre",{style:i},n):null,H.createElement("p",null,"💿 Hey developer 👋"),H.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",H.createElement("code",{style:o},"errorElement")," props on ",H.createElement("code",{style:o},"")))}class KY extends H.Component{constructor(t){super(t),this.state={location:t.location,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location?{error:t.error,location:t.location}:{error:t.error||n.error,location:n.location}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?H.createElement(pl.Provider,{value:this.props.routeContext},H.createElement(cI.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function XY(e){let{routeContext:t,match:n,children:r}=e,i=H.useContext(WY);return i&&n.route.errorElement&&(i._deepestRenderedBoundaryId=n.route.id),H.createElement(pl.Provider,{value:t},r)}function QY(e,t,n){if(t===void 0&&(t=[]),e==null)if(n!=null&&n.errors)e=n.matches;else return null;let r=e,i=n==null?void 0:n.errors;if(i!=null){let o=r.findIndex(s=>s.route.id&&(i==null?void 0:i[s.route.id]));o>=0||hn(!1),r=r.slice(0,Math.min(r.length,o+1))}return r.reduceRight((o,s,a)=>{let l=s.route.id?i==null?void 0:i[s.route.id]:null,c=n?s.route.errorElement||H.createElement(ZY,null):null,f=t.concat(r.slice(0,a+1)),h=()=>H.createElement(XY,{match:s,routeContext:{outlet:o,matches:f}},l?c:s.route.element!==void 0?s.route.element:o);return n&&(s.route.errorElement||a===0)?H.createElement(KY,{location:n.location,component:c,error:l,children:h(),routeContext:{outlet:null,matches:f}}):h()},null)}var nM;(function(e){e.UseRevalidator="useRevalidator"})(nM||(nM={}));var Vg;(function(e){e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"})(Vg||(Vg={}));function JY(e){let t=H.useContext(Qy);return t||hn(!1),t}function eq(e){let t=H.useContext(pl);return t||hn(!1),t}function tq(e){let t=eq(),n=t.matches[t.matches.length-1];return n.route.id||hn(!1),n.route.id}function nq(){var e;let t=H.useContext(cI),n=JY(Vg.UseRouteError),r=tq(Vg.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function eC(e){let{to:t,replace:n,state:r,relative:i}=e;tu()||hn(!1);let o=H.useContext(Qy),s=Bo();return H.useEffect(()=>{o&&o.navigation.state!=="idle"||s(t,{replace:n,state:r,relative:i})}),null}function gt(e){hn(!1)}function rq(e){let{basename:t="/",children:n=null,location:r,navigationType:i=gs.Pop,navigator:o,static:s=!1}=e;tu()&&hn(!1);let a=t.replace(/^\/*/,"/"),l=H.useMemo(()=>({basename:a,navigator:o,static:s}),[a,o,s]);typeof r=="string"&&(r=eu(r));let{pathname:c="/",search:f="",hash:h="",state:p=null,key:m="default"}=r,g=H.useMemo(()=>{let v=sI(c,a);return v==null?null:{pathname:v,search:f,hash:h,state:p,key:m}},[a,c,f,h,p,m]);return g==null?null:H.createElement(Ud.Provider,{value:l},H.createElement(Jy.Provider,{children:n,value:{location:g,navigationType:i}}))}function e_(e){let{children:t,location:n}=e,r=H.useContext(YY),i=r&&!t?r.router.routes:hw(t);return GY(i,n)}var rM;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(rM||(rM={}));new Promise(()=>{});function hw(e,t){t===void 0&&(t=[]);let n=[];return H.Children.forEach(e,(r,i)=>{if(!H.isValidElement(r))return;if(r.type===H.Fragment){n.push.apply(n,hw(r.props.children,t));return}r.type!==gt&&hn(!1),!r.props.index||!r.props.children||hn(!1);let o=[...t,i],s={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,hasErrorBoundary:r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle};r.props.children&&(s.children=hw(r.props.children,o)),n.push(s)}),n}/** * React Router DOM v6.6.1 * * Copyright (c) Remix Software Inc. @@ -116,17 +116,17 @@ ${ae.current.stack} * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Vg(){return Vg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function XY(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function QY(e,t){return e.button===0&&(!t||t==="_self")&&!XY(e)}const JY=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],eq=["aria-current","caseSensitive","className","end","style","to","children"];function tq(e){let{basename:t,children:n,window:r}=e,i=H.useRef();i.current==null&&(i.current=eY({window:r,v5Compat:!0}));let o=i.current,[s,a]=H.useState({action:o.action,location:o.location});return H.useLayoutEffect(()=>o.listen(a),[o]),H.createElement(KY,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:o})}const At=H.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:s,state:a,target:l,to:c,preventScrollReset:f}=t,h=aI(t,JY),p=BY(c,{relative:i}),m=nq(c,{replace:s,state:a,target:l,preventScrollReset:f,relative:i});function g(v){r&&r(v),v.defaultPrevented||m(v)}return H.createElement("a",Vg({},h,{href:p,onClick:o?r:g,ref:n,target:l}))}),lI=H.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:o="",end:s=!1,style:a,to:l,children:c}=t,f=aI(t,eq),h=ZS(l,{relative:f.relative}),p=kn(),m=H.useContext(Ky),{navigator:g}=H.useContext(Ud),v=g.encodeLocation?g.encodeLocation(h).pathname:h.pathname,w=p.pathname,y=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;i||(w=w.toLowerCase(),y=y?y.toLowerCase():null,v=v.toLowerCase());let b=w===v||!s&&w.startsWith(v)&&w.charAt(v.length)==="/",x=y!=null&&(y===v||!s&&y.startsWith(v)&&y.charAt(v.length)==="/"),T=b?r:void 0,P;typeof o=="function"?P=o({isActive:b,isPending:x}):P=[o,b?"active":null,x?"pending":null].filter(Boolean).join(" ");let k=typeof a=="function"?a({isActive:b,isPending:x}):a;return H.createElement(At,Vg({},f,{"aria-current":T,className:P,ref:n,style:k,to:l}),typeof c=="function"?c({isActive:b,isPending:x}):c)});var nM;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(nM||(nM={}));var rM;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(rM||(rM={}));function nq(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:s}=t===void 0?{}:t,a=jo(),l=kn(),c=ZS(e,{relative:s});return H.useCallback(f=>{if(QY(f,n)){f.preventDefault();let h=r!==void 0?r:cd(l)===cd(c);a(e,{replace:h,state:i,preventScrollReset:o,relative:s})}},[l,a,c,r,i,n,e,o,s])}const rq="shlink-web-client",iq="A React-based progressive web application for shlink",oq="/shlink-web-client/feature/remeda",sq="https://github.com/shlinkio/shlink-web-client",aq="MIT",lq={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",start:"vite serve --host=0.0.0.0",preview:"vite preview --host=0.0.0.0",build:"tsc --noEmit && vite build && node scripts/replace-version.mjs","build:dist":"npm run build && node scripts/create-dist-file.mjs",test:"jest --env=jsdom --colors","test:coverage":"npm run test -- --coverage --coverageReporters=text --coverageReporters=text-summary","test:ci":"npm run test:coverage -- --coverageReporters=clover --ci","test:pretty":"npm run test:coverage -- --coverageReporters=html","test:verbose":"npm run test -- --verbose"},cq={"@babel/preset-env":"^7.20.2","@babel/preset-react":"^7.18.6","@babel/preset-typescript":"^7.21.0","@fortawesome/fontawesome-free":"^6.3.0","@fortawesome/fontawesome-svg-core":"^6.3.0","@fortawesome/free-brands-svg-icons":"^6.3.0","@fortawesome/free-regular-svg-icons":"^6.3.0","@fortawesome/free-solid-svg-icons":"^6.3.0","@fortawesome/react-fontawesome":"^0.2.0","@json2csv/plainjs":"^6.1.2","@reduxjs/toolkit":"^1.9.1",bootstrap:"^5.2.3",bottlejs:"^2.0.1",bowser:"^2.11.0","chart.js":"^4.1.1",classnames:"^2.3.2","compare-versions":"^5.0.3",csvtojson:"^2.0.10","date-fns":"^2.29.3","event-source-polyfill":"^1.0.31",history:"^5.3.0",leaflet:"^1.9.3",qs:"^6.11.0",ramda:"^0.27.2",react:"^18.2.0","react-chartjs-2":"^5.1.0","react-colorful":"^5.6.1","react-copy-to-clipboard":"^5.1.0","react-datepicker":"^4.8.0","react-dom":"^18.2.0","react-external-link":"^2.0.0","react-leaflet":"^4.2.0","react-redux":"^8.0.5","react-router-dom":"^6.6.1","react-swipeable":"^7.0.0","react-tag-autocomplete":"^6.3.0",reactstrap:"^9.1.5",redux:"^4.2.0","redux-localstorage-simple":"^2.5.1","redux-thunk":"^2.4.2",remeda:"^1.9.0",uuid:"^8.3.2","workbox-core":"^6.5.4","workbox-expiration":"^6.5.4","workbox-precaching":"^6.5.4","workbox-routing":"^6.5.4","workbox-strategies":"^6.5.4"},uq={"@shlinkio/eslint-config-js-coding-standard":"~2.1.0","@shlinkio/stylelint-config-css-coding-standard":"~1.0.1","@testing-library/jest-dom":"^5.16.5","@testing-library/react":"^13.4.0","@testing-library/user-event":"^14.4.3","@types/jest":"^29.2.4","@types/json2csv":"^5.0.3","@types/leaflet":"^1.9.0","@types/qs":"^6.9.7","@types/ramda":"^0.28.15","@types/react":"^18.0.26","@types/react-color":"^3.0.6","@types/react-copy-to-clipboard":"^5.0.4","@types/react-datepicker":"^4.8.0","@types/react-dom":"^18.0.10","@types/react-tag-autocomplete":"^6.3.0","@types/uuid":"^8.3.4","@vitejs/plugin-react":"^3.1.0","adm-zip":"^0.5.10","babel-jest":"^29.5.0",chalk:"^5.2.0",eslint:"^8.30.0","identity-obj-proxy":"^3.0.0",jest:"^29.3.1","jest-canvas-mock":"^2.4.0","jest-environment-jsdom":"^29.3.1","resize-observer-polyfill":"^1.5.1",sass:"^1.57.1",stylelint:"^14.16.0","ts-mockery":"^1.2.0",typescript:"^5.0.2",vite:"^4.2.0","vite-plugin-pwa":"^0.14.4"},fq=[">0.2%","not dead","not ie <= 11","not op_mini all"],Hg={name:rq,description:iq,private:!1,homepage:oq,repository:sq,license:aq,scripts:lq,dependencies:cq,devDependencies:uq,browserslist:fq};var ki,eo=".",cI="function",uI="string",fI="__global__",XS="Provider",dq=0,QS=Array.prototype.slice,hq=function(t,n){var r=t[n];if(r===void 0&&ki.config.strict)throw new Error("Bottle was unable to resolve a service. `"+n+"` is undefined.");return r},Jy=function(t){var n;return this.nested[t]||(n=ki.pop(),this.nested[t]=n,this.factory(t,function(){return n.container})),this.nested[t]},dI=function(t){return t.split(eo).reduce(hq,this)},pq=function(t,n,r,i){var o={configurable:!0,enumerable:!0};return t.length?o.get=function(){var a=0,l=function(f){if(f)throw f;t[a]&&t[a++](r,l)};return l(),r}:(o.value=r,o.writable=!0),Object.defineProperty(i,n,o),i[n]},mq=function(t,n){var r,i;return typeof t===cI&&(n=t,t=fI),r=t.split(eo),i=r.shift(),r.length?Jy.call(this,i).middleware(r.join(eo),n):(this.middlewares[i]||(this.middlewares[i]=[]),this.middlewares[i].push(n)),this},gq=function(t,n){return n(t)},iM=function(t,n){return(t[n]||[]).concat(t.__global__||[])},vq=function(t,n){var r,i,o,s,a;return this.id,o=this.container,s=this.decorators,a=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],f;return c&&(f=iM(s,t).reduce(gq,c.$get(o)),delete o[r],delete o[t]),f===void 0?f:pq(iM(a,t),t,f,o)}},Object.defineProperties(o,i),this},hI=function(t,n){var r,i;return r=t.split(eo),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?(Jy.call(this,i).provider(r.join(eo),n),this):vq.call(this,i,n))},JS=function(t,n){return hI.call(this,t,function(){this.$get=n})},pI=function(t,n,r){var i=arguments.length>3?QS.call(arguments,3):[],o=this;return JS.call(this,t,function(){var a=n,l=i.map(dI,o.container);return r?new(n.bind.apply(n,[null].concat(l))):a.apply(null,l)})},yq=function(t,n){return pI.apply(this,[t,n,!0].concat(QS.call(arguments,2)))},_q=function(t,n){return pI.apply(this,[t,n,!1].concat(QS.call(arguments,2)))},mI=function(t,n){Object.defineProperty(this,t,{configurable:!0,enumerable:!0,value:n,writable:!0})},gI=function(t,n){var r=t[n];return r||(r={},mI.call(t,n,r)),r},bq=function(t,n){var r;return r=t.split(eo),t=r.pop(),mI.call(r.reduce(gI,this.container),t,n),this},wq=function(t,n){Object.defineProperty(this,t,{configurable:!1,enumerable:!0,value:n,writable:!1})},xq=function(t,n){var r=t.split(eo);return t=r.pop(),wq.call(r.reduce(gI,this.container),t,n),this},vI=function(t,n){var r,i;return typeof t===cI&&(n=t,t=fI),r=t.split(eo),i=r.shift(),r.length?Jy.call(this,i).decorator(r.join(eo),n):(this.decorators[i]||(this.decorators[i]=[]),this.decorators[i].push(n)),this},Sq=function(t){return this.deferred.push(t),this},Cq=function(t){return(t||[]).map(dI,this.container)},Eq=function(t,n){return JS.call(this,t,function(i){return{instance:n.bind(n,i)}})},Tq=function(t){return!/^\$(?:decorator|register|list)$|Provider$/.test(t)},eC=function(t){return Object.keys(t||this.container||{}).filter(Tq)},Wg={},Oq=function(t){var n;return typeof t===uI?(n=Wg[t],n||(Wg[t]=n=new ki,n.constant("BOTTLE_NAME",t)),n):new ki},Pq=function(t){typeof t===uI?delete Wg[t]:Wg={}},yI=function(t){var n=t.$value===void 0?t:t.$value;return this[t.$type||"service"].apply(this,[t.$name,n].concat(t.$inject||[]))},oM=function(t){delete this.providerMap[t],delete this.container[t],delete this.container[t+XS]},kq=function(t){var n=this.originalProviders,r=Array.isArray(t);Object.keys(this.originalProviders).forEach(function(o){if(!(r&&t.indexOf(o)===-1)){var s=o.split(eo);s.length>1&&s.forEach(oM,Jy.call(this,s[0])),oM.call(this,o),this.provider(o,n[o])}},this)},Mq=function(t){return this.deferred.forEach(function(r){r(t)}),this};ki=function e(t){if(!(this instanceof e))return e.pop(t);this.id=dq++,this.decorators={},this.middlewares={},this.nested={},this.providerMap={},this.originalProviders={},this.deferred=[],this.container={$decorator:vI.bind(this),$register:yI.bind(this),$list:eC.bind(this)}};ki.prototype={constant:xq,decorator:vI,defer:Sq,digest:Cq,factory:JS,instanceFactory:Eq,list:eC,middleware:mq,provider:hI,resetProviders:kq,register:yI,resolve:Mq,service:yq,serviceFactory:_q,value:bq};ki.pop=Oq;ki.clear=Pq;ki.list=eC;ki.config={strict:!1};const Rq=ki;var Nq=globalThis&&globalThis.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r!!(e!=null&&e.url)&&!!(e!=null&&e.apiKey),Rs=e=>!!(e!=null&&e.id),e_=e=>!!(e!=null&&e.version),jq=e=>!!(e!=null&&e.serverNotFound),Vd=e=>Rs(e)?e.id:"",Bq=Aq(["id","autoConnect"]);var zq=function(){return!0};const wI=zq;function kt(e){return e!=null&&typeof e=="object"&&e["@@functional/placeholder"]===!0}function Ct(e){return function t(n){return arguments.length===0||kt(n)?t:e.apply(this,arguments)}}function vt(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return kt(n)?t:Ct(function(i){return e(n,i)});default:return kt(n)&&kt(r)?t:kt(n)?Ct(function(i){return e(i,r)}):kt(r)?Ct(function(i){return e(n,i)}):e(n,r)}}}function eu(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,s){return t.apply(this,arguments)};case 6:return function(n,r,i,o,s,a){return t.apply(this,arguments)};case 7:return function(n,r,i,o,s,a,l){return t.apply(this,arguments)};case 8:return function(n,r,i,o,s,a,l,c){return t.apply(this,arguments)};case 9:return function(n,r,i,o,s,a,l,c,f){return t.apply(this,arguments)};case 10:return function(n,r,i,o,s,a,l,c,f,h){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function t_(e,t,n){return function(){for(var r=[],i=0,o=e,s=0;s=arguments.length)?a=t[s]:(a=arguments[i],i+=1),r[s]=a,kt(a)||(o-=1),s+=1}return o<=0?n.apply(this,r):eu(o,t_(e,r,n))}}var Uq=vt(function(t,n){return t===1?Ct(n):eu(t,t_(t,[],n))});const xI=Uq;function ea(e){return function t(n,r,i){switch(arguments.length){case 0:return t;case 1:return kt(n)?t:vt(function(o,s){return e(n,o,s)});case 2:return kt(n)&&kt(r)?t:kt(n)?vt(function(o,s){return e(o,r,s)}):kt(r)?vt(function(o,s){return e(n,o,s)}):Ct(function(o){return e(n,r,o)});default:return kt(n)&&kt(r)&&kt(i)?t:kt(n)&&kt(r)?vt(function(o,s){return e(o,s,i)}):kt(n)&&kt(i)?vt(function(o,s){return e(o,r,s)}):kt(r)&&kt(i)?vt(function(o,s){return e(n,o,s)}):kt(n)?Ct(function(o){return e(o,r,i)}):kt(r)?Ct(function(o){return e(n,o,i)}):kt(i)?Ct(function(o){return e(n,r,o)}):e(n,r,i)}}}const Hd=Array.isArray||function(t){return t!=null&&t.length>=0&&Object.prototype.toString.call(t)==="[object Array]"};function Vq(e){return e!=null&&typeof e["@@transducer/step"]=="function"}function nC(e,t,n){return function(){if(arguments.length===0)return n();var r=Array.prototype.slice.call(arguments,0),i=r.pop();if(!Hd(i)){for(var o=0;ot?n:t});const SI=Hq;function cm(e,t){for(var n=0,r=t.length,i=Array(r);n0?t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1):!1});const CI=Wq;var Yq=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 qq(e){return new Yq(e)}var Gq=vt(function(t,n){return eu(t.length,function(){return t.apply(n,arguments)})});const Zq=Gq;function Kq(e,t,n){for(var r=0,i=n.length;r=0;)n=uM[r],Nr(n,t)&&!nG(i,n)&&(i[i.length]=n),r-=1;return i});const to=rG;var iG=vt(nC(["fantasy-land/map","map"],Jq,function(t,n){switch(Object.prototype.toString.call(n)){case"[object Function]":return xI(n.length,function(){return t.call(this,n.apply(this,arguments))});case"[object Object]":return r_(function(r,i){return r[i]=t(n[i]),r},{},to(n));default:return cm(t,n)}}));const rC=iG,dw=Number.isInteger||function(t){return t<<0===t};var oG=vt(function(t,n){var r=t<0?n.length+t:t;return n_(n)?n.charAt(r):n[r]});const TI=oG;var sG=vt(function(t,n){return t.map(function(r){for(var i=n,o=0,s;o1){var o=!Bo(r)&&Nr(i,r)?r[i]:dw(t[1])?[]:{};n=e(Array.prototype.slice.call(t,1),n,o)}if(dw(i)&&Hd(r)){var s=[].concat(r);return s[i]=n,s}else return fd(i,n,r)});const Rl=gG;function vG(e){var t=Object.prototype.toString.call(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object AsyncGeneratorFunction]"}function yG(e){return function t(n){for(var r,i,o,s=[],a=0,l=n.length;a=0;){if(n[o]===e)return r[o]===t;o-=1}switch(i){case"Map":return e.size!==t.size?!1:pM(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size!==t.size?!1:pM(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var s=to(e);if(s.length!==to(t).length)return!1;var a=n.concat([e]),l=r.concat([t]);for(o=s.length-1;o>=0;){var c=s[o];if(!(Nr(c,t)&&aC(t[c],e[c],a,l)))return!1;o-=1}return!0}var MG=vt(function(t,n){return aC(t,n,[],[])});const lC=MG;function RG(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 Q0(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 Iu=function(t){return(t<10?"0":"")+t},LG=typeof Date.prototype.toISOString=="function"?function(t){return t.toISOString()}:function(t){return t.getUTCFullYear()+"-"+Iu(t.getUTCMonth()+1)+"-"+Iu(t.getUTCDate())+"T"+Iu(t.getUTCHours())+":"+Iu(t.getUTCMinutes())+":"+Iu(t.getUTCSeconds())+"."+(t.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};const DG=LG;function AG(e){return function(){return!e.apply(this,arguments)}}function IG(e,t){for(var n=0,r=t.length,i=[];n":MI(s,a)},r=function(o,s){return cm(function(a){return Q0(a)+": "+n(o[a])},s.slice().sort())};switch(Object.prototype.toString.call(e)){case"[object Arguments]":return"(function() { return arguments; }("+cm(n,e).join(", ")+"))";case"[object Array]":return"["+cm(n,e).concat(r(e,Wd(function(o){return/^\d+$/.test(o)},to(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):Q0(DG(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())+")":Q0(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,to(e)).join(", ")+"}"}}var UG=Ct(function(t){return MI(t,[])});const VG=UG;var HG=Ct(function(t){var n=iC(SI,0,rC(function(r){return r[0].length},t));return eu(n,function(){for(var r=0;rs?1:0})});const TZ=EZ;var OZ=vt(function(t,n){if(t<=0)throw new Error("First argument to splitEvery must be a positive integer");for(var r=[],i=0;ie!==t?"ASC":n?{ASC:"DESC",DESC:void 0}[n]:"ASC",II=(e,{field:t,dir:n})=>!t||!n?e:e.sort((r,i)=>{const o=n==="ASC"?1:-1,s=n==="ASC"?-1:1;return r[t]>i[t]?o:s}),FI=e=>e.dir?`${e.field}-${e.dir}`:void 0,IZ=e=>{const[t,n]=e.split("-");return{field:t,dir:n}};var FZ=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var i=42;t[n]=i;for(n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,n);if(s.value!==i||s.enumerable!==!0)return!1}return!0},gM=typeof Symbol<"u"&&Symbol,$Z=FZ,jZ=function(){return typeof gM!="function"||typeof Symbol!="function"||typeof gM("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:$Z()},BZ="Function.prototype.bind called on incompatible ",J0=Array.prototype.slice,zZ=Object.prototype.toString,UZ="[object Function]",VZ=function(t){var n=this;if(typeof n!="function"||zZ.call(n)!==UZ)throw new TypeError(BZ+n);for(var r=J0.call(arguments,1),i,o=function(){if(this instanceof i){var f=n.apply(this,r.concat(J0.call(arguments)));return Object(f)===f?f:this}else return n.apply(t,r.concat(J0.call(arguments)))},s=Math.max(0,n.length-r.length),a=[],l=0;l"u"?lt:ns(Uint8Array),vc={"%AggregateError%":typeof AggregateError>"u"?lt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?lt:ArrayBuffer,"%ArrayIteratorPrototype%":Nl?ns([][Symbol.iterator]()):lt,"%AsyncFromSyncIteratorPrototype%":lt,"%AsyncFunction%":Ul,"%AsyncGenerator%":Ul,"%AsyncGeneratorFunction%":Ul,"%AsyncIteratorPrototype%":Ul,"%Atomics%":typeof Atomics>"u"?lt:Atomics,"%BigInt%":typeof BigInt>"u"?lt:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?lt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?lt:Float32Array,"%Float64Array%":typeof Float64Array>"u"?lt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?lt:FinalizationRegistry,"%Function%":$I,"%GeneratorFunction%":Ul,"%Int8Array%":typeof Int8Array>"u"?lt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?lt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?lt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Nl?ns(ns([][Symbol.iterator]())):lt,"%JSON%":typeof JSON=="object"?JSON:lt,"%Map%":typeof Map>"u"?lt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Nl?lt:ns(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?lt:Promise,"%Proxy%":typeof Proxy>"u"?lt:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?lt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?lt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Nl?lt:ns(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?lt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Nl?ns(""[Symbol.iterator]()):lt,"%Symbol%":Nl?Symbol:lt,"%SyntaxError%":hd,"%ThrowTypeError%":qZ,"%TypedArray%":GZ,"%TypeError%":gc,"%Uint8Array%":typeof Uint8Array>"u"?lt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?lt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?lt:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?lt:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?lt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?lt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?lt:WeakSet},ZZ=function e(t){var n;if(t==="%AsyncFunction%")n=eb("async function () {}");else if(t==="%GeneratorFunction%")n=eb("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=eb("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&(n=ns(i.prototype))}return vc[t]=n,n},vM={"%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"]},s_=fC,Zg=YZ,KZ=s_.call(Function.call,Array.prototype.concat),XZ=s_.call(Function.apply,Array.prototype.splice),yM=s_.call(Function.call,String.prototype.replace),Kg=s_.call(Function.call,String.prototype.slice),QZ=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,JZ=/\\(\\)?/g,eK=function(t){var n=Kg(t,0,1),r=Kg(t,-1);if(n==="%"&&r!=="%")throw new hd("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new hd("invalid intrinsic syntax, expected opening `%`");var i=[];return yM(t,QZ,function(o,s,a,l){i[i.length]=a?yM(l,JZ,"$1"):s||o}),i},tK=function(t,n){var r=t,i;if(Zg(vM,r)&&(i=vM[r],r="%"+i[0]+"%"),Zg(vc,r)){var o=vc[r];if(o===Ul&&(o=ZZ(r)),typeof o>"u"&&!n)throw new gc("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:o}}throw new hd("intrinsic "+t+" does not exist!")},dC=function(t,n){if(typeof t!="string"||t.length===0)throw new gc("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new gc('"allowMissing" argument must be a boolean');var r=eK(t),i=r.length>0?r[0]:"",o=tK("%"+i+"%",n),s=o.name,a=o.value,l=!1,c=o.alias;c&&(i=c[0],XZ(r,KZ([0,1],c)));for(var f=1,h=!0;f=r.length){var v=Va(a,p);h=!!v,h&&"get"in v&&!("originalValue"in v.get)?a=v.get:a=a[p]}else h=Zg(a,p),a=a[p];h&&!l&&(vc[s]=a)}}return a},pw={},nK={get exports(){return pw},set exports(e){pw=e}};(function(e){var t=fC,n=dC,r=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),o=n("%Reflect.apply%",!0)||t.call(i,r),s=n("%Object.getOwnPropertyDescriptor%",!0),a=n("%Object.defineProperty%",!0),l=n("%Math.max%");if(a)try{a({},"a",{value:1})}catch{a=null}e.exports=function(h){var p=o(t,i,arguments);if(s&&a){var m=s(p,"length");m.configurable&&a(p,"length",{value:1+l(0,h.length-(arguments.length-1))})}return p};var c=function(){return o(t,r,arguments)};a?a(e.exports,"apply",{value:c}):e.exports.apply=c})(nK);var jI=dC,BI=pw,rK=BI(jI("String.prototype.indexOf")),iK=function(t,n){var r=jI(t,!!n);return typeof r=="function"&&rK(t,".prototype.")>-1?BI(r):r};const oK={},sK=Object.freeze(Object.defineProperty({__proto__:null,default:oK},Symbol.toStringTag,{value:"Module"})),aK=_7(sK);var hC=typeof Map=="function"&&Map.prototype,nb=Object.getOwnPropertyDescriptor&&hC?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Xg=hC&&nb&&typeof nb.get=="function"?nb.get:null,lK=hC&&Map.prototype.forEach,pC=typeof Set=="function"&&Set.prototype,rb=Object.getOwnPropertyDescriptor&&pC?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Qg=pC&&rb&&typeof rb.get=="function"?rb.get:null,cK=pC&&Set.prototype.forEach,uK=typeof WeakMap=="function"&&WeakMap.prototype,xf=uK?WeakMap.prototype.has:null,fK=typeof WeakSet=="function"&&WeakSet.prototype,Sf=fK?WeakSet.prototype.has:null,dK=typeof WeakRef=="function"&&WeakRef.prototype,_M=dK?WeakRef.prototype.deref:null,hK=Boolean.prototype.valueOf,pK=Object.prototype.toString,mK=Function.prototype.toString,gK=String.prototype.match,mC=String.prototype.slice,gs=String.prototype.replace,vK=String.prototype.toUpperCase,bM=String.prototype.toLowerCase,zI=RegExp.prototype.test,wM=Array.prototype.concat,Vi=Array.prototype.join,yK=Array.prototype.slice,xM=Math.floor,mw=typeof BigInt=="function"?BigInt.prototype.valueOf:null,ib=Object.getOwnPropertySymbols,gw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Ac=typeof Symbol=="function"&&typeof Symbol.iterator=="object",rr=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Ac||"symbol")?Symbol.toStringTag:null,UI=Object.prototype.propertyIsEnumerable,SM=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function CM(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||zI.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-xM(-e):xM(e);if(r!==e){var i=String(r),o=mC.call(t,i.length+1);return gs.call(i,n,"$&_")+"."+gs.call(gs.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return gs.call(t,n,"$&_")}var ob=aK.custom,sb=ob&&HI(ob)?ob:null,_K=function e(t,n,r,i){var o=n||{};if(rs(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(rs(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=rs(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(rs(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(rs(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=o.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return YI(t,o);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?CM(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return a?CM(t,c):c}var f=typeof o.depth>"u"?5:o.depth;if(typeof r>"u"&&(r=0),r>=f&&f>0&&typeof t=="object")return vw(t)?"[Array]":"[Object]";var h=$K(o,r);if(typeof i>"u")i=[];else if(WI(i,t)>=0)return"[Circular]";function p(ee,K,te){if(K&&(i=yK.call(i),i.push(K)),te){var oe={depth:o.depth};return rs(o,"quoteStyle")&&(oe.quoteStyle=o.quoteStyle),e(ee,oe,r+1,i)}return e(ee,o,r+1,i)}if(typeof t=="function"){var m=kK(t),g=mp(t,p);return"[Function"+(m?": "+m:" (anonymous)")+"]"+(g.length>0?" { "+Vi.call(g,", ")+" }":"")}if(HI(t)){var v=Ac?gs.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):gw.call(t);return typeof t=="object"&&!Ac?$u(v):v}if(AK(t)){for(var w="<"+bM.call(String(t.nodeName)),y=t.attributes||[],b=0;b",w}if(vw(t)){if(t.length===0)return"[]";var x=mp(t,p);return h&&!FK(x)?"["+yw(x,h)+"]":"[ "+Vi.call(x,", ")+" ]"}if(SK(t)){var T=mp(t,p);return"cause"in t&&!UI.call(t,"cause")?"{ ["+String(t)+"] "+Vi.call(wM.call("[cause]: "+p(t.cause),T),", ")+" }":T.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Vi.call(T,", ")+" }"}if(typeof t=="object"&&s){if(sb&&typeof t[sb]=="function")return t[sb]();if(s!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(MK(t)){var P=[];return lK.call(t,function(ee,K){P.push(p(K,t,!0)+" => "+p(ee,t))}),EM("Map",Xg.call(t),P,h)}if(LK(t)){var k=[];return cK.call(t,function(ee){k.push(p(ee,t))}),EM("Set",Qg.call(t),k,h)}if(RK(t))return ab("WeakMap");if(DK(t))return ab("WeakSet");if(NK(t))return ab("WeakRef");if(EK(t))return $u(p(Number(t)));if(OK(t))return $u(p(mw.call(t)));if(TK(t))return $u(hK.call(t));if(CK(t))return $u(p(String(t)));if(!wK(t)&&!xK(t)){var N=mp(t,p),D=SM?SM(t)===Object.prototype:t instanceof Object||t.constructor===Object,z=t instanceof Object?"":"null prototype",A=!D&&rr&&Object(t)===t&&rr in t?mC.call(ta(t),8,-1):z?"Object":"",Y=D||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",q=Y+(A||z?"["+Vi.call(wM.call([],A||[],z||[]),": ")+"] ":"");return N.length===0?q+"{}":h?q+"{"+yw(N,h)+"}":q+"{ "+Vi.call(N,", ")+" }"}return String(t)};function VI(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function bK(e){return gs.call(String(e),/"/g,""")}function vw(e){return ta(e)==="[object Array]"&&(!rr||!(typeof e=="object"&&rr in e))}function wK(e){return ta(e)==="[object Date]"&&(!rr||!(typeof e=="object"&&rr in e))}function xK(e){return ta(e)==="[object RegExp]"&&(!rr||!(typeof e=="object"&&rr in e))}function SK(e){return ta(e)==="[object Error]"&&(!rr||!(typeof e=="object"&&rr in e))}function CK(e){return ta(e)==="[object String]"&&(!rr||!(typeof e=="object"&&rr in e))}function EK(e){return ta(e)==="[object Number]"&&(!rr||!(typeof e=="object"&&rr in e))}function TK(e){return ta(e)==="[object Boolean]"&&(!rr||!(typeof e=="object"&&rr in e))}function HI(e){if(Ac)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!gw)return!1;try{return gw.call(e),!0}catch{}return!1}function OK(e){if(!e||typeof e!="object"||!mw)return!1;try{return mw.call(e),!0}catch{}return!1}var PK=Object.prototype.hasOwnProperty||function(e){return e in this};function rs(e,t){return PK.call(e,t)}function ta(e){return pK.call(e)}function kK(e){if(e.name)return e.name;var t=gK.call(mK.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function WI(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 YI(mC.call(e,0,t.maxStringLength),t)+r}var i=gs.call(gs.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,IK);return VI(i,"single",t)}function IK(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":"")+vK.call(t.toString(16))}function $u(e){return"Object("+e+")"}function ab(e){return e+" { ? }"}function EM(e,t,n,r){var i=r?yw(n,r):Vi.call(n,", ");return e+" ("+t+") {"+i+"}"}function FK(e){for(var t=0;t=0)return!1;return!0}function $K(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=Vi.call(Array(e.indent+1)," ");else return null;return{base:n,prev:Vi.call(Array(t+1),n)}}function yw(e,t){if(e.length===0)return"";var n=` + */function Hg(){return Hg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function iq(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function oq(e,t){return e.button===0&&(!t||t==="_self")&&!iq(e)}const sq=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],aq=["aria-current","caseSensitive","className","end","style","to","children"];function lq(e){let{basename:t,children:n,window:r}=e,i=H.useRef();i.current==null&&(i.current=aY({window:r,v5Compat:!0}));let o=i.current,[s,a]=H.useState({action:o.action,location:o.location});return H.useLayoutEffect(()=>o.listen(a),[o]),H.createElement(rq,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:o})}const At=H.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:s,state:a,target:l,to:c,preventScrollReset:f}=t,h=uI(t,sq),p=qY(c,{relative:i}),m=cq(c,{replace:s,state:a,target:l,preventScrollReset:f,relative:i});function g(v){r&&r(v),v.defaultPrevented||m(v)}return H.createElement("a",Hg({},h,{href:p,onClick:o?r:g,ref:n,target:l}))}),fI=H.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:o="",end:s=!1,style:a,to:l,children:c}=t,f=uI(t,aq),h=JS(l,{relative:f.relative}),p=kn(),m=H.useContext(Qy),{navigator:g}=H.useContext(Ud),v=g.encodeLocation?g.encodeLocation(h).pathname:h.pathname,w=p.pathname,y=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;i||(w=w.toLowerCase(),y=y?y.toLowerCase():null,v=v.toLowerCase());let b=w===v||!s&&w.startsWith(v)&&w.charAt(v.length)==="/",x=y!=null&&(y===v||!s&&y.startsWith(v)&&y.charAt(v.length)==="/"),T=b?r:void 0,P;typeof o=="function"?P=o({isActive:b,isPending:x}):P=[o,b?"active":null,x?"pending":null].filter(Boolean).join(" ");let k=typeof a=="function"?a({isActive:b,isPending:x}):a;return H.createElement(At,Hg({},f,{"aria-current":T,className:P,ref:n,style:k,to:l}),typeof c=="function"?c({isActive:b,isPending:x}):c)});var iM;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(iM||(iM={}));var oM;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(oM||(oM={}));function cq(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:s}=t===void 0?{}:t,a=Bo(),l=kn(),c=JS(e,{relative:s});return H.useCallback(f=>{if(oq(f,n)){f.preventDefault();let h=r!==void 0?r:ud(l)===ud(c);a(e,{replace:h,state:i,preventScrollReset:o,relative:s})}},[l,a,c,r,i,n,e,o,s])}const uq="shlink-web-client",fq="A React-based progressive web application for shlink",dq="/shlink-web-client/feature/remeda",hq="https://github.com/shlinkio/shlink-web-client",pq="MIT",mq={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",start:"vite serve --host=0.0.0.0",preview:"vite preview --host=0.0.0.0",build:"tsc --noEmit && vite build && node scripts/replace-version.mjs","build:dist":"npm run build && node scripts/create-dist-file.mjs",test:"jest --env=jsdom --colors","test:coverage":"npm run test -- --coverage --coverageReporters=text --coverageReporters=text-summary","test:ci":"npm run test:coverage -- --coverageReporters=clover --ci","test:pretty":"npm run test:coverage -- --coverageReporters=html","test:verbose":"npm run test -- --verbose"},gq={"@babel/preset-env":"^7.20.2","@babel/preset-react":"^7.18.6","@babel/preset-typescript":"^7.21.0","@fortawesome/fontawesome-free":"^6.3.0","@fortawesome/fontawesome-svg-core":"^6.3.0","@fortawesome/free-brands-svg-icons":"^6.3.0","@fortawesome/free-regular-svg-icons":"^6.3.0","@fortawesome/free-solid-svg-icons":"^6.3.0","@fortawesome/react-fontawesome":"^0.2.0","@json2csv/plainjs":"^6.1.2","@reduxjs/toolkit":"^1.9.1",bootstrap:"^5.2.3",bottlejs:"^2.0.1",bowser:"^2.11.0","chart.js":"^4.1.1",classnames:"^2.3.2","compare-versions":"^5.0.3",csvtojson:"^2.0.10","date-fns":"^2.29.3","event-source-polyfill":"^1.0.31",history:"^5.3.0",leaflet:"^1.9.3",qs:"^6.11.0",ramda:"^0.27.2",react:"^18.2.0","react-chartjs-2":"^5.1.0","react-colorful":"^5.6.1","react-copy-to-clipboard":"^5.1.0","react-datepicker":"^4.8.0","react-dom":"^18.2.0","react-external-link":"^2.0.0","react-leaflet":"^4.2.0","react-redux":"^8.0.5","react-router-dom":"^6.6.1","react-swipeable":"^7.0.0","react-tag-autocomplete":"^6.3.0",reactstrap:"^9.1.5",redux:"^4.2.0","redux-localstorage-simple":"^2.5.1","redux-thunk":"^2.4.2",remeda:"^1.9.0",uuid:"^8.3.2","workbox-core":"^6.5.4","workbox-expiration":"^6.5.4","workbox-precaching":"^6.5.4","workbox-routing":"^6.5.4","workbox-strategies":"^6.5.4"},vq={"@shlinkio/eslint-config-js-coding-standard":"~2.1.0","@shlinkio/stylelint-config-css-coding-standard":"~1.0.1","@testing-library/jest-dom":"^5.16.5","@testing-library/react":"^13.4.0","@testing-library/user-event":"^14.4.3","@types/jest":"^29.2.4","@types/json2csv":"^5.0.3","@types/leaflet":"^1.9.0","@types/qs":"^6.9.7","@types/ramda":"^0.28.15","@types/react":"^18.0.26","@types/react-color":"^3.0.6","@types/react-copy-to-clipboard":"^5.0.4","@types/react-datepicker":"^4.8.0","@types/react-dom":"^18.0.10","@types/react-tag-autocomplete":"^6.3.0","@types/uuid":"^8.3.4","@vitejs/plugin-react":"^3.1.0","adm-zip":"^0.5.10","babel-jest":"^29.5.0",chalk:"^5.2.0",eslint:"^8.30.0","identity-obj-proxy":"^3.0.0",jest:"^29.3.1","jest-canvas-mock":"^2.4.0","jest-environment-jsdom":"^29.3.1","resize-observer-polyfill":"^1.5.1",sass:"^1.57.1",stylelint:"^14.16.0","ts-mockery":"^1.2.0",typescript:"^5.0.2",vite:"^4.2.0","vite-plugin-pwa":"^0.14.4"},yq=[">0.2%","not dead","not ie <= 11","not op_mini all"],Wg={name:uq,description:fq,private:!1,homepage:dq,repository:hq,license:pq,scripts:mq,dependencies:gq,devDependencies:vq,browserslist:yq};var ki,eo=".",dI="function",hI="string",pI="__global__",tC="Provider",_q=0,nC=Array.prototype.slice,bq=function(t,n){var r=t[n];if(r===void 0&&ki.config.strict)throw new Error("Bottle was unable to resolve a service. `"+n+"` is undefined.");return r},t_=function(t){var n;return this.nested[t]||(n=ki.pop(),this.nested[t]=n,this.factory(t,function(){return n.container})),this.nested[t]},mI=function(t){return t.split(eo).reduce(bq,this)},wq=function(t,n,r,i){var o={configurable:!0,enumerable:!0};return t.length?o.get=function(){var a=0,l=function(f){if(f)throw f;t[a]&&t[a++](r,l)};return l(),r}:(o.value=r,o.writable=!0),Object.defineProperty(i,n,o),i[n]},xq=function(t,n){var r,i;return typeof t===dI&&(n=t,t=pI),r=t.split(eo),i=r.shift(),r.length?t_.call(this,i).middleware(r.join(eo),n):(this.middlewares[i]||(this.middlewares[i]=[]),this.middlewares[i].push(n)),this},Sq=function(t,n){return n(t)},sM=function(t,n){return(t[n]||[]).concat(t.__global__||[])},Cq=function(t,n){var r,i,o,s,a;return this.id,o=this.container,s=this.decorators,a=this.middlewares,r=t+tC,i=Object.create(null),i[r]={configurable:!0,enumerable:!0,get:function(){var c=new n;return delete o[r],o[r]=c,c}},i[t]={configurable:!0,enumerable:!0,get:function(){var c=o[r],f;return c&&(f=sM(s,t).reduce(Sq,c.$get(o)),delete o[r],delete o[t]),f===void 0?f:wq(sM(a,t),t,f,o)}},Object.defineProperties(o,i),this},gI=function(t,n){var r,i;return r=t.split(eo),this.providerMap[t]&&r.length===1&&!this.container[t+tC]?console.error(t+" provider already instantiated."):(this.originalProviders[t]=n,this.providerMap[t]=!0,i=r.shift(),r.length?(t_.call(this,i).provider(r.join(eo),n),this):Cq.call(this,i,n))},rC=function(t,n){return gI.call(this,t,function(){this.$get=n})},vI=function(t,n,r){var i=arguments.length>3?nC.call(arguments,3):[],o=this;return rC.call(this,t,function(){var a=n,l=i.map(mI,o.container);return r?new(n.bind.apply(n,[null].concat(l))):a.apply(null,l)})},Eq=function(t,n){return vI.apply(this,[t,n,!0].concat(nC.call(arguments,2)))},Tq=function(t,n){return vI.apply(this,[t,n,!1].concat(nC.call(arguments,2)))},yI=function(t,n){Object.defineProperty(this,t,{configurable:!0,enumerable:!0,value:n,writable:!0})},_I=function(t,n){var r=t[n];return r||(r={},yI.call(t,n,r)),r},Oq=function(t,n){var r;return r=t.split(eo),t=r.pop(),yI.call(r.reduce(_I,this.container),t,n),this},Pq=function(t,n){Object.defineProperty(this,t,{configurable:!1,enumerable:!0,value:n,writable:!1})},kq=function(t,n){var r=t.split(eo);return t=r.pop(),Pq.call(r.reduce(_I,this.container),t,n),this},bI=function(t,n){var r,i;return typeof t===dI&&(n=t,t=pI),r=t.split(eo),i=r.shift(),r.length?t_.call(this,i).decorator(r.join(eo),n):(this.decorators[i]||(this.decorators[i]=[]),this.decorators[i].push(n)),this},Mq=function(t){return this.deferred.push(t),this},Rq=function(t){return(t||[]).map(mI,this.container)},Nq=function(t,n){return rC.call(this,t,function(i){return{instance:n.bind(n,i)}})},Lq=function(t){return!/^\$(?:decorator|register|list)$|Provider$/.test(t)},iC=function(t){return Object.keys(t||this.container||{}).filter(Lq)},Yg={},Dq=function(t){var n;return typeof t===hI?(n=Yg[t],n||(Yg[t]=n=new ki,n.constant("BOTTLE_NAME",t)),n):new ki},Aq=function(t){typeof t===hI?delete Yg[t]:Yg={}},wI=function(t){var n=t.$value===void 0?t:t.$value;return this[t.$type||"service"].apply(this,[t.$name,n].concat(t.$inject||[]))},aM=function(t){delete this.providerMap[t],delete this.container[t],delete this.container[t+tC]},Iq=function(t){var n=this.originalProviders,r=Array.isArray(t);Object.keys(this.originalProviders).forEach(function(o){if(!(r&&t.indexOf(o)===-1)){var s=o.split(eo);s.length>1&&s.forEach(aM,t_.call(this,s[0])),aM.call(this,o),this.provider(o,n[o])}},this)},Fq=function(t){return this.deferred.forEach(function(r){r(t)}),this};ki=function e(t){if(!(this instanceof e))return e.pop(t);this.id=_q++,this.decorators={},this.middlewares={},this.nested={},this.providerMap={},this.originalProviders={},this.deferred=[],this.container={$decorator:bI.bind(this),$register:wI.bind(this),$list:iC.bind(this)}};ki.prototype={constant:kq,decorator:bI,defer:Mq,digest:Rq,factory:rC,instanceFactory:Nq,list:iC,middleware:xq,provider:gI,resetProviders:Iq,register:wI,resolve:Fq,service:Eq,serviceFactory:Tq,value:Oq};ki.pop=Dq;ki.clear=Aq;ki.list=iC;ki.config={strict:!1};const $q=ki;var jq=globalThis&&globalThis.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r!!(e!=null&&e.url)&&!!(e!=null&&e.apiKey),Rs=e=>!!(e!=null&&e.id),n_=e=>!!(e!=null&&e.version),Zq=e=>!!(e!=null&&e.serverNotFound),Vd=e=>Rs(e)?e.id:"",Kq=CI(["id","autoConnect"]);var Xq=function(){return!0};const TI=Xq;function kt(e){return e!=null&&typeof e=="object"&&e["@@functional/placeholder"]===!0}function Ct(e){return function t(n){return arguments.length===0||kt(n)?t:e.apply(this,arguments)}}function yt(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return kt(n)?t:Ct(function(i){return e(n,i)});default:return kt(n)&&kt(r)?t:kt(n)?Ct(function(i){return e(i,r)}):kt(r)?Ct(function(i){return e(n,i)}):e(n,r)}}}function nu(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,s){return t.apply(this,arguments)};case 6:return function(n,r,i,o,s,a){return t.apply(this,arguments)};case 7:return function(n,r,i,o,s,a,l){return t.apply(this,arguments)};case 8:return function(n,r,i,o,s,a,l,c){return t.apply(this,arguments)};case 9:return function(n,r,i,o,s,a,l,c,f){return t.apply(this,arguments)};case 10:return function(n,r,i,o,s,a,l,c,f,h){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function r_(e,t,n){return function(){for(var r=[],i=0,o=e,s=0;s=arguments.length)?a=t[s]:(a=arguments[i],i+=1),r[s]=a,kt(a)||(o-=1),s+=1}return o<=0?n.apply(this,r):nu(o,r_(e,r,n))}}var Qq=yt(function(t,n){return t===1?Ct(n):nu(t,r_(t,[],n))});const OI=Qq;function ea(e){return function t(n,r,i){switch(arguments.length){case 0:return t;case 1:return kt(n)?t:yt(function(o,s){return e(n,o,s)});case 2:return kt(n)&&kt(r)?t:kt(n)?yt(function(o,s){return e(o,r,s)}):kt(r)?yt(function(o,s){return e(n,o,s)}):Ct(function(o){return e(n,r,o)});default:return kt(n)&&kt(r)&&kt(i)?t:kt(n)&&kt(r)?yt(function(o,s){return e(o,s,i)}):kt(n)&&kt(i)?yt(function(o,s){return e(o,r,s)}):kt(r)&&kt(i)?yt(function(o,s){return e(n,o,s)}):kt(n)?Ct(function(o){return e(o,r,i)}):kt(r)?Ct(function(o){return e(n,o,i)}):kt(i)?Ct(function(o){return e(n,r,o)}):e(n,r,i)}}}const Hd=Array.isArray||function(t){return t!=null&&t.length>=0&&Object.prototype.toString.call(t)==="[object Array]"};function Jq(e){return e!=null&&typeof e["@@transducer/step"]=="function"}function sC(e,t,n){return function(){if(arguments.length===0)return n();var r=Array.prototype.slice.call(arguments,0),i=r.pop();if(!Hd(i)){for(var o=0;ot?n:t});const PI=eG;function um(e,t){for(var n=0,r=t.length,i=Array(r);n0?t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1):!1});const kI=tG;var nG=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 rG(e){return new nG(e)}var iG=yt(function(t,n){return nu(t.length,function(){return t.apply(n,arguments)})});const oG=iG;function sG(e,t,n){for(var r=0,i=n.length;r=0;)n=hM[r],Nr(n,t)&&!dG(i,n)&&(i[i.length]=n),r-=1;return i});const to=hG;var pG=yt(sC(["fantasy-land/map","map"],cG,function(t,n){switch(Object.prototype.toString.call(n)){case"[object Function]":return OI(n.length,function(){return t.call(this,n.apply(this,arguments))});case"[object Object]":return o_(function(r,i){return r[i]=t(n[i]),r},{},to(n));default:return um(t,n)}}));const RI=pG,mw=Number.isInteger||function(t){return t<<0===t};var mG=yt(function(t,n){var r=t<0?n.length+t:t;return i_(n)?n.charAt(r):n[r]});const NI=mG;var gG=yt(function(t,n){return t.map(function(r){for(var i=n,o=0,s;o1){var o=!zo(r)&&Nr(i,r)?r[i]:mw(t[1])?[]:{};n=e(Array.prototype.slice.call(t,1),n,o)}if(mw(i)&&Hd(r)){var s=[].concat(r);return s[i]=n,s}else return EG(i,n,r)});const Nl=OG;function PG(e){var t=Object.prototype.toString.call(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object AsyncGeneratorFunction]"}function kG(e){return function t(n){for(var r,i,o,s=[],a=0,l=n.length;a=0;){if(n[o]===e)return r[o]===t;o-=1}switch(i){case"Map":return e.size!==t.size?!1:vM(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size!==t.size?!1:vM(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var s=to(e);if(s.length!==to(t).length)return!1;var a=n.concat([e]),l=r.concat([t]);for(o=s.length-1;o>=0;){var c=s[o];if(!(Nr(c,t)&&cC(t[c],e[c],a,l)))return!1;o-=1}return!0}var zG=yt(function(t,n){return cC(t,n,[],[])});const uC=zG;function UG(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 eb(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 $u=function(t){return(t<10?"0":"")+t},HG=typeof Date.prototype.toISOString=="function"?function(t){return t.toISOString()}:function(t){return t.getUTCFullYear()+"-"+$u(t.getUTCMonth()+1)+"-"+$u(t.getUTCDate())+"T"+$u(t.getUTCHours())+":"+$u(t.getUTCMinutes())+":"+$u(t.getUTCSeconds())+"."+(t.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};const WG=HG;function YG(e){return function(){return!e.apply(this,arguments)}}function qG(e,t){for(var n=0,r=t.length,i=[];n":FI(s,a)},r=function(o,s){return um(function(a){return eb(a)+": "+n(o[a])},s.slice().sort())};switch(Object.prototype.toString.call(e)){case"[object Arguments]":return"(function() { return arguments; }("+um(n,e).join(", ")+"))";case"[object Array]":return"["+um(n,e).concat(r(e,Wd(function(o){return/^\d+$/.test(o)},to(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):eb(WG(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())+")":eb(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,to(e)).join(", ")+"}"}}var JG=Ct(function(t){return FI(t,[])});const eZ=JG;var tZ=Ct(function(t){var n=LI(PI,0,RI(function(r){return r[0].length},t));return nu(n,function(){for(var r=0;rs?1:0})});const AZ=DZ;var IZ=yt(function(t,n){if(t<=0)throw new Error("First argument to splitEvery must be a positive integer");for(var r=[],i=0;ie!==t?"ASC":n?{ASC:"DESC",DESC:void 0}[n]:"ASC",VI=(e,{field:t,dir:n})=>!t||!n?e:e.sort((r,i)=>{const o=n==="ASC"?1:-1,s=n==="ASC"?-1:1;return r[t]>i[t]?o:s}),HI=e=>e.dir?`${e.field}-${e.dir}`:void 0,WZ=e=>{const[t,n]=e.split("-");return{field:t,dir:n}};var YZ=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var i=42;t[n]=i;for(n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,n);if(s.value!==i||s.enumerable!==!0)return!1}return!0},_M=typeof Symbol<"u"&&Symbol,qZ=YZ,GZ=function(){return typeof _M!="function"||typeof Symbol!="function"||typeof _M("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:qZ()},ZZ="Function.prototype.bind called on incompatible ",tb=Array.prototype.slice,KZ=Object.prototype.toString,XZ="[object Function]",QZ=function(t){var n=this;if(typeof n!="function"||KZ.call(n)!==XZ)throw new TypeError(ZZ+n);for(var r=tb.call(arguments,1),i,o=function(){if(this instanceof i){var f=n.apply(this,r.concat(tb.call(arguments)));return Object(f)===f?f:this}else return n.apply(t,r.concat(tb.call(arguments)))},s=Math.max(0,n.length-r.length),a=[],l=0;l"u"?lt:rs(Uint8Array),yc={"%AggregateError%":typeof AggregateError>"u"?lt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?lt:ArrayBuffer,"%ArrayIteratorPrototype%":Ll?rs([][Symbol.iterator]()):lt,"%AsyncFromSyncIteratorPrototype%":lt,"%AsyncFunction%":Vl,"%AsyncGenerator%":Vl,"%AsyncGeneratorFunction%":Vl,"%AsyncIteratorPrototype%":Vl,"%Atomics%":typeof Atomics>"u"?lt:Atomics,"%BigInt%":typeof BigInt>"u"?lt:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?lt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?lt:Float32Array,"%Float64Array%":typeof Float64Array>"u"?lt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?lt:FinalizationRegistry,"%Function%":WI,"%GeneratorFunction%":Vl,"%Int8Array%":typeof Int8Array>"u"?lt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?lt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?lt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ll?rs(rs([][Symbol.iterator]())):lt,"%JSON%":typeof JSON=="object"?JSON:lt,"%Map%":typeof Map>"u"?lt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ll?lt:rs(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?lt:Promise,"%Proxy%":typeof Proxy>"u"?lt:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?lt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?lt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ll?lt:rs(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?lt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ll?rs(""[Symbol.iterator]()):lt,"%Symbol%":Ll?Symbol:lt,"%SyntaxError%":hd,"%ThrowTypeError%":nK,"%TypedArray%":rK,"%TypeError%":vc,"%Uint8Array%":typeof Uint8Array>"u"?lt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?lt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?lt:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?lt:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?lt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?lt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?lt:WeakSet},iK=function e(t){var n;if(t==="%AsyncFunction%")n=nb("async function () {}");else if(t==="%GeneratorFunction%")n=nb("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=nb("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&(n=rs(i.prototype))}return yc[t]=n,n},bM={"%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"]},l_=hC,Kg=tK,oK=l_.call(Function.call,Array.prototype.concat),sK=l_.call(Function.apply,Array.prototype.splice),wM=l_.call(Function.call,String.prototype.replace),Xg=l_.call(Function.call,String.prototype.slice),aK=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,lK=/\\(\\)?/g,cK=function(t){var n=Xg(t,0,1),r=Xg(t,-1);if(n==="%"&&r!=="%")throw new hd("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new hd("invalid intrinsic syntax, expected opening `%`");var i=[];return wM(t,aK,function(o,s,a,l){i[i.length]=a?wM(l,lK,"$1"):s||o}),i},uK=function(t,n){var r=t,i;if(Kg(bM,r)&&(i=bM[r],r="%"+i[0]+"%"),Kg(yc,r)){var o=yc[r];if(o===Vl&&(o=iK(r)),typeof o>"u"&&!n)throw new vc("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:o}}throw new hd("intrinsic "+t+" does not exist!")},pC=function(t,n){if(typeof t!="string"||t.length===0)throw new vc("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new vc('"allowMissing" argument must be a boolean');var r=cK(t),i=r.length>0?r[0]:"",o=uK("%"+i+"%",n),s=o.name,a=o.value,l=!1,c=o.alias;c&&(i=c[0],sK(r,oK([0,1],c)));for(var f=1,h=!0;f=r.length){var v=Va(a,p);h=!!v,h&&"get"in v&&!("originalValue"in v.get)?a=v.get:a=a[p]}else h=Kg(a,p),a=a[p];h&&!l&&(yc[s]=a)}}return a},yw={},fK={get exports(){return yw},set exports(e){yw=e}};(function(e){var t=hC,n=pC,r=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),o=n("%Reflect.apply%",!0)||t.call(i,r),s=n("%Object.getOwnPropertyDescriptor%",!0),a=n("%Object.defineProperty%",!0),l=n("%Math.max%");if(a)try{a({},"a",{value:1})}catch{a=null}e.exports=function(h){var p=o(t,i,arguments);if(s&&a){var m=s(p,"length");m.configurable&&a(p,"length",{value:1+l(0,h.length-(arguments.length-1))})}return p};var c=function(){return o(t,r,arguments)};a?a(e.exports,"apply",{value:c}):e.exports.apply=c})(fK);var YI=pC,qI=yw,dK=qI(YI("String.prototype.indexOf")),hK=function(t,n){var r=YI(t,!!n);return typeof r=="function"&&dK(t,".prototype.")>-1?qI(r):r};const pK={},mK=Object.freeze(Object.defineProperty({__proto__:null,default:pK},Symbol.toStringTag,{value:"Module"})),gK=T7(mK);var mC=typeof Map=="function"&&Map.prototype,ib=Object.getOwnPropertyDescriptor&&mC?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Qg=mC&&ib&&typeof ib.get=="function"?ib.get:null,vK=mC&&Map.prototype.forEach,gC=typeof Set=="function"&&Set.prototype,ob=Object.getOwnPropertyDescriptor&&gC?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Jg=gC&&ob&&typeof ob.get=="function"?ob.get:null,yK=gC&&Set.prototype.forEach,_K=typeof WeakMap=="function"&&WeakMap.prototype,Sf=_K?WeakMap.prototype.has:null,bK=typeof WeakSet=="function"&&WeakSet.prototype,Cf=bK?WeakSet.prototype.has:null,wK=typeof WeakRef=="function"&&WeakRef.prototype,xM=wK?WeakRef.prototype.deref:null,xK=Boolean.prototype.valueOf,SK=Object.prototype.toString,CK=Function.prototype.toString,EK=String.prototype.match,vC=String.prototype.slice,vs=String.prototype.replace,TK=String.prototype.toUpperCase,SM=String.prototype.toLowerCase,GI=RegExp.prototype.test,CM=Array.prototype.concat,Vi=Array.prototype.join,OK=Array.prototype.slice,EM=Math.floor,_w=typeof BigInt=="function"?BigInt.prototype.valueOf:null,sb=Object.getOwnPropertySymbols,bw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Fc=typeof Symbol=="function"&&typeof Symbol.iterator=="object",rr=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Fc||"symbol")?Symbol.toStringTag:null,ZI=Object.prototype.propertyIsEnumerable,TM=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function OM(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||GI.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-EM(-e):EM(e);if(r!==e){var i=String(r),o=vC.call(t,i.length+1);return vs.call(i,n,"$&_")+"."+vs.call(vs.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return vs.call(t,n,"$&_")}var ab=gK.custom,lb=ab&&XI(ab)?ab:null,PK=function e(t,n,r,i){var o=n||{};if(is(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(is(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=is(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(is(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(is(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=o.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return JI(t,o);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?OM(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return a?OM(t,c):c}var f=typeof o.depth>"u"?5:o.depth;if(typeof r>"u"&&(r=0),r>=f&&f>0&&typeof t=="object")return ww(t)?"[Array]":"[Object]";var h=qK(o,r);if(typeof i>"u")i=[];else if(QI(i,t)>=0)return"[Circular]";function p(ee,K,te){if(K&&(i=OK.call(i),i.push(K)),te){var oe={depth:o.depth};return is(o,"quoteStyle")&&(oe.quoteStyle=o.quoteStyle),e(ee,oe,r+1,i)}return e(ee,o,r+1,i)}if(typeof t=="function"){var m=$K(t),g=gp(t,p);return"[Function"+(m?": "+m:" (anonymous)")+"]"+(g.length>0?" { "+Vi.call(g,", ")+" }":"")}if(XI(t)){var v=Fc?vs.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):bw.call(t);return typeof t=="object"&&!Fc?Bu(v):v}if(HK(t)){for(var w="<"+SM.call(String(t.nodeName)),y=t.attributes||[],b=0;b",w}if(ww(t)){if(t.length===0)return"[]";var x=gp(t,p);return h&&!YK(x)?"["+xw(x,h)+"]":"[ "+Vi.call(x,", ")+" ]"}if(NK(t)){var T=gp(t,p);return"cause"in t&&!ZI.call(t,"cause")?"{ ["+String(t)+"] "+Vi.call(CM.call("[cause]: "+p(t.cause),T),", ")+" }":T.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Vi.call(T,", ")+" }"}if(typeof t=="object"&&s){if(lb&&typeof t[lb]=="function")return t[lb]();if(s!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(jK(t)){var P=[];return vK.call(t,function(ee,K){P.push(p(K,t,!0)+" => "+p(ee,t))}),PM("Map",Qg.call(t),P,h)}if(UK(t)){var k=[];return yK.call(t,function(ee){k.push(p(ee,t))}),PM("Set",Jg.call(t),k,h)}if(BK(t))return cb("WeakMap");if(VK(t))return cb("WeakSet");if(zK(t))return cb("WeakRef");if(DK(t))return Bu(p(Number(t)));if(IK(t))return Bu(p(_w.call(t)));if(AK(t))return Bu(xK.call(t));if(LK(t))return Bu(p(String(t)));if(!MK(t)&&!RK(t)){var N=gp(t,p),D=TM?TM(t)===Object.prototype:t instanceof Object||t.constructor===Object,z=t instanceof Object?"":"null prototype",A=!D&&rr&&Object(t)===t&&rr in t?vC.call(ta(t),8,-1):z?"Object":"",Y=D||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",q=Y+(A||z?"["+Vi.call(CM.call([],A||[],z||[]),": ")+"] ":"");return N.length===0?q+"{}":h?q+"{"+xw(N,h)+"}":q+"{ "+Vi.call(N,", ")+" }"}return String(t)};function KI(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function kK(e){return vs.call(String(e),/"/g,""")}function ww(e){return ta(e)==="[object Array]"&&(!rr||!(typeof e=="object"&&rr in e))}function MK(e){return ta(e)==="[object Date]"&&(!rr||!(typeof e=="object"&&rr in e))}function RK(e){return ta(e)==="[object RegExp]"&&(!rr||!(typeof e=="object"&&rr in e))}function NK(e){return ta(e)==="[object Error]"&&(!rr||!(typeof e=="object"&&rr in e))}function LK(e){return ta(e)==="[object String]"&&(!rr||!(typeof e=="object"&&rr in e))}function DK(e){return ta(e)==="[object Number]"&&(!rr||!(typeof e=="object"&&rr in e))}function AK(e){return ta(e)==="[object Boolean]"&&(!rr||!(typeof e=="object"&&rr in e))}function XI(e){if(Fc)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!bw)return!1;try{return bw.call(e),!0}catch{}return!1}function IK(e){if(!e||typeof e!="object"||!_w)return!1;try{return _w.call(e),!0}catch{}return!1}var FK=Object.prototype.hasOwnProperty||function(e){return e in this};function is(e,t){return FK.call(e,t)}function ta(e){return SK.call(e)}function $K(e){if(e.name)return e.name;var t=EK.call(CK.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function QI(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 JI(vC.call(e,0,t.maxStringLength),t)+r}var i=vs.call(vs.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,WK);return KI(i,"single",t)}function WK(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":"")+TK.call(t.toString(16))}function Bu(e){return"Object("+e+")"}function cb(e){return e+" { ? }"}function PM(e,t,n,r){var i=r?xw(n,r):Vi.call(n,", ");return e+" ("+t+") {"+i+"}"}function YK(e){for(var t=0;t=0)return!1;return!0}function qK(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=Vi.call(Array(e.indent+1)," ");else return null;return{base:n,prev:Vi.call(Array(t+1),n)}}function xw(e,t){if(e.length===0)return"";var n=` `+t.prev+t.base;return n+Vi.call(e,","+n)+` -`+t.prev}function mp(e,t){var n=vw(e),r=[];if(n){r.length=e.length;for(var i=0;i1;){var n=t.pop(),r=n.obj[n.prop];if(Ra(r)){for(var i=[],o=0;o=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||o===JK.RFC1738&&(c===40||c===41)){a+=s.charAt(l);continue}if(c<128){a=a+$i[c];continue}if(c<2048){a=a+($i[192|c>>6]+$i[128|c&63]);continue}if(c<55296||c>=57344){a=a+($i[224|c>>12]+$i[128|c>>6&63]+$i[128|c&63]);continue}l+=1,c=65536+((c&1023)<<10|s.charCodeAt(l)&1023),a+=$i[240|c>>18]+$i[128|c>>12&63]+$i[128|c>>6&63]+$i[128|c&63]}return a},oX=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],i=0;i"u"&&(x=0)}if(typeof l=="function"?y=l(n,y):y instanceof Date?y=h(y):r==="comma"&&vo(y)&&(y=_w.maybeMap(y,function($){return $ instanceof Date?h($):$})),y===null){if(o)return a&&!g?a(n,Bn.encoder,v,"key",p):n;y=""}if(pX(y)||_w.isBuffer(y)){if(a){var k=g?n:a(n,Bn.encoder,v,"key",p);if(r==="comma"&&g){for(var N=fX.call(String(y),","),D="",z=0;z"u")return A;var Y;if(r==="comma"&&vo(y))Y=[{value:y.length>0?y.join(",")||null:void 0}];else if(vo(l))Y=l;else{var q=Object.keys(y);Y=c?q.sort(c):q}for(var ee=i&&vo(y)&&y.length===1?n+"[]":n,K=0;K"u"?Bn.allowDots:!!t.allowDots,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Bn.charsetSentinel,delimiter:typeof t.delimiter>"u"?Bn.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Bn.encode,encoder:typeof t.encoder=="function"?t.encoder:Bn.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Bn.encodeValuesOnly,filter:o,format:r,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Bn.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Bn.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Bn.strictNullHandling}},vX=function(e,t){var n=e,r=gX(t),i,o;typeof r.filter=="function"?(o=r.filter,n=o("",n)):vo(r.filter)&&(o=r.filter,i=o);var s=[];if(typeof n!="object"||n===null)return"";var a;t&&t.arrayFormat in TM?a=t.arrayFormat:t&&"indices"in t?a=t.indices?"indices":"repeat":a="indices";var l=TM[a];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var c=l==="comma"&&t&&t.commaRoundTrip;i||(i=Object.keys(n)),r.sort&&i.sort(r.sort);for(var f=ZI(),h=0;h0?g+m:""},Ic=GI,bw=Object.prototype.hasOwnProperty,yX=Array.isArray,Cn={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:Ic.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},_X=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},XI=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},bX="utf8=%26%2310003%3B",wX="utf8=%E2%9C%93",xX=function(t,n){var r={},i=n.ignoreQueryPrefix?t.replace(/^\?/,""):t,o=n.parameterLimit===1/0?void 0:n.parameterLimit,s=i.split(n.delimiter,o),a=-1,l,c=n.charset;if(n.charsetSentinel)for(l=0;l-1&&(g=yX(g)?[g]:g),bw.call(r,m)?r[m]=Ic.combine(r[m],g):r[m]=g}return r},SX=function(e,t,n,r){for(var i=r?t:XI(t,n),o=e.length-1;o>=0;--o){var s,a=e[o];if(a==="[]"&&n.parseArrays)s=[].concat(i);else{s=n.plainObjects?Object.create(null):{};var l=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,c=parseInt(l,10);!n.parseArrays&&l===""?s={0:i}:!isNaN(c)&&a!==l&&String(c)===l&&c>=0&&n.parseArrays&&c<=n.arrayLimit?(s=[],s[c]=i):l!=="__proto__"&&(s[l]=i)}i=s}return i},CX=function(t,n,r,i){if(t){var o=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,s=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=r.depth>0&&s.exec(o),c=l?o.slice(0,l.index):o,f=[];if(c){if(!r.plainObjects&&bw.call(Object.prototype,c)&&!r.allowPrototypes)return;f.push(c)}for(var h=0;r.depth>0&&(l=a.exec(o))!==null&&h"u"?Cn.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?Cn.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Cn.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Cn.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Cn.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Cn.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Cn.comma,decoder:typeof t.decoder=="function"?t.decoder:Cn.decoder,delimiter:typeof t.delimiter=="string"||Ic.isRegExp(t.delimiter)?t.delimiter:Cn.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Cn.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Cn.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Cn.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Cn.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Cn.strictNullHandling}},TX=function(e,t){var n=EX(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?xX(e,n):e,i=n.plainObjects?Object.create(null):{},o=Object.keys(r),s=0;sQI.parse(e,{ignoreQueryPrefix:!0}),Yd=e=>QI.stringify(e,{arrayFormat:"brackets"});var a_=(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))(a_||{}),l_=(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))(l_||{});const MX=e=>!!e&&typeof e=="object"&&["type","detail","title","status"].every(t=>t in e),io=e=>MX(e)?e:void 0,RX=e=>(e==null?void 0:e.type)===a_.INVALID_ARGUMENT||(e==null?void 0:e.type)===l_.INVALID_ARGUMENT,NX=e=>(e==null?void 0:e.type)==="INVALID_SHORTCODE_DELETION"||(e==null?void 0:e.type)===a_.INVALID_SHORT_URL_DELETION||(e==null?void 0:e.type)===l_.INVALID_SHORT_URL_DELETION,LX=e=>((e==null?void 0:e.type)===a_.NOT_FOUND||(e==null?void 0:e.type)===l_.NOT_FOUND)&&(e==null?void 0:e.status)===404,DX=(e,t)=>`${e}/rest/v${t}`,AX=Wd(Bo),IX=({orderBy:e={},excludeMaxVisitsReached:t,excludePastValidUntil:n,...r})=>({...r,excludeMaxVisitsReached:t===!0?"true":void 0,excludePastValidUntil:n===!0?"true":void 0,orderBy:FI(e)});class FX{constructor(t,n,r){Se(this,"apiVersion");Se(this,"listShortUrls",async(t={})=>this.performRequest("/short-urls","GET",IX(t)).then(({shortUrls:n})=>n));Se(this,"createShortUrl",async t=>{const n=Wd(r=>Cr(r)||Bo(r),t);return this.performRequest("/short-urls","POST",{},n)});Se(this,"getShortUrlVisits",async(t,n)=>this.performRequest(`/short-urls/${t}/visits`,"GET",n).then(({visits:r})=>r));Se(this,"getTagVisits",async(t,n)=>this.performRequest(`/tags/${t}/visits`,"GET",n).then(({visits:r})=>r));Se(this,"getDomainVisits",async(t,n)=>this.performRequest(`/domains/${t}/visits`,"GET",n).then(({visits:r})=>r));Se(this,"getOrphanVisits",async t=>this.performRequest("/visits/orphan","GET",t).then(({visits:n})=>n));Se(this,"getNonOrphanVisits",async t=>this.performRequest("/visits/non-orphan","GET",t).then(({visits:n})=>n));Se(this,"getVisitsOverview",async()=>this.performRequest("/visits").then(({visits:t})=>t));Se(this,"getShortUrl",async(t,n)=>this.performRequest(`/short-urls/${t}`,"GET",{domain:n}));Se(this,"deleteShortUrl",async(t,n)=>this.performEmptyRequest(`/short-urls/${t}`,"DELETE",{domain:n}));Se(this,"updateShortUrl",async(t,n,r)=>this.performRequest(`/short-urls/${t}`,"PATCH",{domain:n},r));Se(this,"listTags",async()=>this.performRequest("/tags","GET",{withStats:"true"}).then(({tags:t})=>t).then(({data:t,stats:n})=>({tags:t,stats:n})));Se(this,"tagsStats",async()=>this.performRequest("/tags/stats","GET").then(({tags:t})=>t).then(({data:t})=>({tags:t.map(({tag:n})=>n),stats:t})));Se(this,"deleteTags",async t=>this.performEmptyRequest("/tags","DELETE",{tags:t}).then(()=>({tags:t})));Se(this,"editTag",async(t,n)=>this.performEmptyRequest("/tags","PUT",{},{oldName:t,newName:n}).then(()=>({oldName:t,newName:n})));Se(this,"health",async()=>this.performRequest("/health","GET"));Se(this,"mercureInfo",async()=>this.performRequest("/mercure-info","GET"));Se(this,"listDomains",async()=>this.performRequest("/domains").then(({domains:t})=>t));Se(this,"editDomainRedirects",async t=>this.performRequest("/domains/redirects","PATCH",{},t));Se(this,"performRequest",async(t,n="GET",r={},i)=>this.httpClient.fetchJson(...this.toFetchParams(t,n,r,i)).catch(this.handleFetchError(()=>this.httpClient.fetchJson(...this.toFetchParams(t,n,r,i)))));Se(this,"performEmptyRequest",async(t,n="GET",r={},i)=>this.httpClient.fetchEmpty(...this.toFetchParams(t,n,r,i)).catch(this.handleFetchError(()=>this.httpClient.fetchEmpty(...this.toFetchParams(t,n,r,i)))));Se(this,"toFetchParams",(t,n,r={},i)=>{const o=Yd(AX(r)),s=Cr(o)?"":`?${o}`;return[`${DX(this.baseUrl,this.apiVersion)}${t}${s}`,{method:n,body:i&&JSON.stringify(i),headers:{"X-Api-Key":this.apiKey}}]});Se(this,"handleFetchError",t=>n=>{if(!LX(io(n)))throw n;return this.apiVersion=2,t()});this.httpClient=t,this.baseUrl=n,this.apiKey=r,this.apiVersion=3}}const fb={},$X=e=>typeof e=="function",jX=e=>{const{selectedServer:t}=e();if(!tC(t))throw new Error("There's no selected server or it is not found");return t},BX=e=>t=>{const{url:n,apiKey:r}=$X(t)?jX(t):t,i=`${n}_${r}`;return fb[i]||(fb[i]=new FX(e,n,r)),fb[i]},zX=e=>{e.serviceFactory("buildShlinkApiClient",BX,"HttpClient")};var ww={},UX={get exports(){return ww},set exports(e){ww=e}};/*! +`+t.prev}function gp(e,t){var n=ww(e),r=[];if(n){r.length=e.length;for(var i=0;i1;){var n=t.pop(),r=n.obj[n.prop];if(Ra(r)){for(var i=[],o=0;o=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||o===lX.RFC1738&&(c===40||c===41)){a+=s.charAt(l);continue}if(c<128){a=a+$i[c];continue}if(c<2048){a=a+($i[192|c>>6]+$i[128|c&63]);continue}if(c<55296||c>=57344){a=a+($i[224|c>>12]+$i[128|c>>6&63]+$i[128|c&63]);continue}l+=1,c=65536+((c&1023)<<10|s.charCodeAt(l)&1023),a+=$i[240|c>>18]+$i[128|c>>12&63]+$i[128|c>>6&63]+$i[128|c&63]}return a},pX=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],i=0;i"u"&&(x=0)}if(typeof l=="function"?y=l(n,y):y instanceof Date?y=h(y):r==="comma"&&vo(y)&&(y=Sw.maybeMap(y,function($){return $ instanceof Date?h($):$})),y===null){if(o)return a&&!g?a(n,Bn.encoder,v,"key",p):n;y=""}if(SX(y)||Sw.isBuffer(y)){if(a){var k=g?n:a(n,Bn.encoder,v,"key",p);if(r==="comma"&&g){for(var N=bX.call(String(y),","),D="",z=0;z"u")return A;var Y;if(r==="comma"&&vo(y))Y=[{value:y.length>0?y.join(",")||null:void 0}];else if(vo(l))Y=l;else{var q=Object.keys(y);Y=c?q.sort(c):q}for(var ee=i&&vo(y)&&y.length===1?n+"[]":n,K=0;K"u"?Bn.allowDots:!!t.allowDots,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Bn.charsetSentinel,delimiter:typeof t.delimiter>"u"?Bn.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Bn.encode,encoder:typeof t.encoder=="function"?t.encoder:Bn.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Bn.encodeValuesOnly,filter:o,format:r,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Bn.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Bn.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Bn.strictNullHandling}},TX=function(e,t){var n=e,r=EX(t),i,o;typeof r.filter=="function"?(o=r.filter,n=o("",n)):vo(r.filter)&&(o=r.filter,i=o);var s=[];if(typeof n!="object"||n===null)return"";var a;t&&t.arrayFormat in kM?a=t.arrayFormat:t&&"indices"in t?a=t.indices?"indices":"repeat":a="indices";var l=kM[a];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var c=l==="comma"&&t&&t.commaRoundTrip;i||(i=Object.keys(n)),r.sort&&i.sort(r.sort);for(var f=n6(),h=0;h0?g+m:""},$c=t6,Cw=Object.prototype.hasOwnProperty,OX=Array.isArray,Cn={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:$c.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},PX=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},i6=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},kX="utf8=%26%2310003%3B",MX="utf8=%E2%9C%93",RX=function(t,n){var r={},i=n.ignoreQueryPrefix?t.replace(/^\?/,""):t,o=n.parameterLimit===1/0?void 0:n.parameterLimit,s=i.split(n.delimiter,o),a=-1,l,c=n.charset;if(n.charsetSentinel)for(l=0;l-1&&(g=OX(g)?[g]:g),Cw.call(r,m)?r[m]=$c.combine(r[m],g):r[m]=g}return r},NX=function(e,t,n,r){for(var i=r?t:i6(t,n),o=e.length-1;o>=0;--o){var s,a=e[o];if(a==="[]"&&n.parseArrays)s=[].concat(i);else{s=n.plainObjects?Object.create(null):{};var l=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,c=parseInt(l,10);!n.parseArrays&&l===""?s={0:i}:!isNaN(c)&&a!==l&&String(c)===l&&c>=0&&n.parseArrays&&c<=n.arrayLimit?(s=[],s[c]=i):l!=="__proto__"&&(s[l]=i)}i=s}return i},LX=function(t,n,r,i){if(t){var o=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,s=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=r.depth>0&&s.exec(o),c=l?o.slice(0,l.index):o,f=[];if(c){if(!r.plainObjects&&Cw.call(Object.prototype,c)&&!r.allowPrototypes)return;f.push(c)}for(var h=0;r.depth>0&&(l=a.exec(o))!==null&&h"u"?Cn.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?Cn.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Cn.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Cn.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Cn.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Cn.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Cn.comma,decoder:typeof t.decoder=="function"?t.decoder:Cn.decoder,delimiter:typeof t.delimiter=="string"||$c.isRegExp(t.delimiter)?t.delimiter:Cn.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Cn.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Cn.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Cn.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Cn.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Cn.strictNullHandling}},AX=function(e,t){var n=DX(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?RX(e,n):e,i=n.plainObjects?Object.create(null):{},o=Object.keys(r),s=0;so6.parse(e,{ignoreQueryPrefix:!0}),Yd=e=>o6.stringify(e,{arrayFormat:"brackets"});var c_=(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))(c_||{}),u_=(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))(u_||{});const jX=e=>!!e&&typeof e=="object"&&["type","detail","title","status"].every(t=>t in e),io=e=>jX(e)?e:void 0,BX=e=>(e==null?void 0:e.type)===c_.INVALID_ARGUMENT||(e==null?void 0:e.type)===u_.INVALID_ARGUMENT,zX=e=>(e==null?void 0:e.type)==="INVALID_SHORTCODE_DELETION"||(e==null?void 0:e.type)===c_.INVALID_SHORT_URL_DELETION||(e==null?void 0:e.type)===u_.INVALID_SHORT_URL_DELETION,UX=e=>((e==null?void 0:e.type)===c_.NOT_FOUND||(e==null?void 0:e.type)===u_.NOT_FOUND)&&(e==null?void 0:e.status)===404,VX=(e,t)=>`${e}/rest/v${t}`,HX=Wd(zo),WX=({orderBy:e={},excludeMaxVisitsReached:t,excludePastValidUntil:n,...r})=>({...r,excludeMaxVisitsReached:t===!0?"true":void 0,excludePastValidUntil:n===!0?"true":void 0,orderBy:HI(e)});class YX{constructor(t,n,r){Se(this,"apiVersion");Se(this,"listShortUrls",async(t={})=>this.performRequest("/short-urls","GET",WX(t)).then(({shortUrls:n})=>n));Se(this,"createShortUrl",async t=>{const n=Wd(r=>Cr(r)||zo(r),t);return this.performRequest("/short-urls","POST",{},n)});Se(this,"getShortUrlVisits",async(t,n)=>this.performRequest(`/short-urls/${t}/visits`,"GET",n).then(({visits:r})=>r));Se(this,"getTagVisits",async(t,n)=>this.performRequest(`/tags/${t}/visits`,"GET",n).then(({visits:r})=>r));Se(this,"getDomainVisits",async(t,n)=>this.performRequest(`/domains/${t}/visits`,"GET",n).then(({visits:r})=>r));Se(this,"getOrphanVisits",async t=>this.performRequest("/visits/orphan","GET",t).then(({visits:n})=>n));Se(this,"getNonOrphanVisits",async t=>this.performRequest("/visits/non-orphan","GET",t).then(({visits:n})=>n));Se(this,"getVisitsOverview",async()=>this.performRequest("/visits").then(({visits:t})=>t));Se(this,"getShortUrl",async(t,n)=>this.performRequest(`/short-urls/${t}`,"GET",{domain:n}));Se(this,"deleteShortUrl",async(t,n)=>this.performEmptyRequest(`/short-urls/${t}`,"DELETE",{domain:n}));Se(this,"updateShortUrl",async(t,n,r)=>this.performRequest(`/short-urls/${t}`,"PATCH",{domain:n},r));Se(this,"listTags",async()=>this.performRequest("/tags","GET",{withStats:"true"}).then(({tags:t})=>t).then(({data:t,stats:n})=>({tags:t,stats:n})));Se(this,"tagsStats",async()=>this.performRequest("/tags/stats","GET").then(({tags:t})=>t).then(({data:t})=>({tags:t.map(({tag:n})=>n),stats:t})));Se(this,"deleteTags",async t=>this.performEmptyRequest("/tags","DELETE",{tags:t}).then(()=>({tags:t})));Se(this,"editTag",async(t,n)=>this.performEmptyRequest("/tags","PUT",{},{oldName:t,newName:n}).then(()=>({oldName:t,newName:n})));Se(this,"health",async()=>this.performRequest("/health","GET"));Se(this,"mercureInfo",async()=>this.performRequest("/mercure-info","GET"));Se(this,"listDomains",async()=>this.performRequest("/domains").then(({domains:t})=>t));Se(this,"editDomainRedirects",async t=>this.performRequest("/domains/redirects","PATCH",{},t));Se(this,"performRequest",async(t,n="GET",r={},i)=>this.httpClient.fetchJson(...this.toFetchParams(t,n,r,i)).catch(this.handleFetchError(()=>this.httpClient.fetchJson(...this.toFetchParams(t,n,r,i)))));Se(this,"performEmptyRequest",async(t,n="GET",r={},i)=>this.httpClient.fetchEmpty(...this.toFetchParams(t,n,r,i)).catch(this.handleFetchError(()=>this.httpClient.fetchEmpty(...this.toFetchParams(t,n,r,i)))));Se(this,"toFetchParams",(t,n,r={},i)=>{const o=Yd(HX(r)),s=Cr(o)?"":`?${o}`;return[`${VX(this.baseUrl,this.apiVersion)}${t}${s}`,{method:n,body:i&&JSON.stringify(i),headers:{"X-Api-Key":this.apiKey}}]});Se(this,"handleFetchError",t=>n=>{if(!UX(io(n)))throw n;return this.apiVersion=2,t()});this.httpClient=t,this.baseUrl=n,this.apiKey=r,this.apiVersion=3}}const hb={},qX=e=>typeof e=="function",GX=e=>{const{selectedServer:t}=e();if(!oC(t))throw new Error("There's no selected server or it is not found");return t},ZX=e=>t=>{const{url:n,apiKey:r}=qX(t)?GX(t):t,i=`${n}_${r}`;return hb[i]||(hb[i]=new YX(e,n,r)),hb[i]},KX=e=>{e.serviceFactory("buildShlinkApiClient",ZX,"HttpClient")};var Ew={},XX={get exports(){return Ew},set exports(e){Ew=e}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames -*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;ie.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1;i--){var o=n[i],s=(o.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(s)>-1&&(r=o)}return Dt.head.insertBefore(t,r),e}}var uJ="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function _d(){for(var e=12,t="";e-- >0;)t+=uJ[Math.random()*62|0];return t}function nu(e){for(var t=[],n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function kC(e){return e.classList?nu(e.classList):(e.getAttribute("class")||"").split(" ").filter(function(t){return t})}function g6(e){return"".concat(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function fJ(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,'="').concat(g6(e[n]),'" ')},"").trim()}function c_(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,": ").concat(e[n].trim(),";")},"")}function MC(e){return e.size!==Gi.size||e.x!==Gi.x||e.y!==Gi.y||e.rotate!==Gi.rotate||e.flipX||e.flipY}function dJ(e){var t=e.transform,n=e.containerWidth,r=e.iconWidth,i={transform:"translate(".concat(n/2," 256)")},o="translate(".concat(t.x*32,", ").concat(t.y*32,") "),s="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),a="rotate(".concat(t.rotate," 0 0)"),l={transform:"".concat(o," ").concat(s," ").concat(a)},c={transform:"translate(".concat(r/2*-1," -256)")};return{outer:i,inner:l,path:c}}function hJ(e){var t=e.transform,n=e.width,r=n===void 0?Cw:n,i=e.height,o=i===void 0?Cw:i,s=e.startCentered,a=s===void 0?!1:s,l="";return a&&c6?l+="translate(".concat(t.x/Ko-r/2,"em, ").concat(t.y/Ko-o/2,"em) "):a?l+="translate(calc(-50% + ".concat(t.x/Ko,"em), calc(-50% + ").concat(t.y/Ko,"em)) "):l+="translate(".concat(t.x/Ko,"em, ").concat(t.y/Ko,"em) "),l+="scale(".concat(t.size/Ko*(t.flipX?-1:1),", ").concat(t.size/Ko*(t.flipY?-1:1),") "),l+="rotate(".concat(t.rotate,"deg) "),l}var pJ=`:root, :host { +*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;ie.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1;i--){var o=n[i],s=(o.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(s)>-1&&(r=o)}return Dt.head.insertBefore(t,r),e}}var _J="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function _d(){for(var e=12,t="";e-- >0;)t+=_J[Math.random()*62|0];return t}function iu(e){for(var t=[],n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function RC(e){return e.classList?iu(e.classList):(e.getAttribute("class")||"").split(" ").filter(function(t){return t})}function S6(e){return"".concat(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function bJ(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,'="').concat(S6(e[n]),'" ')},"").trim()}function f_(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,": ").concat(e[n].trim(),";")},"")}function NC(e){return e.size!==Gi.size||e.x!==Gi.x||e.y!==Gi.y||e.rotate!==Gi.rotate||e.flipX||e.flipY}function wJ(e){var t=e.transform,n=e.containerWidth,r=e.iconWidth,i={transform:"translate(".concat(n/2," 256)")},o="translate(".concat(t.x*32,", ").concat(t.y*32,") "),s="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),a="rotate(".concat(t.rotate," 0 0)"),l={transform:"".concat(o," ").concat(s," ").concat(a)},c={transform:"translate(".concat(r/2*-1," -256)")};return{outer:i,inner:l,path:c}}function xJ(e){var t=e.transform,n=e.width,r=n===void 0?Pw:n,i=e.height,o=i===void 0?Pw:i,s=e.startCentered,a=s===void 0?!1:s,l="";return a&&g6?l+="translate(".concat(t.x/Xo-r/2,"em, ").concat(t.y/Xo-o/2,"em) "):a?l+="translate(calc(-50% + ".concat(t.x/Xo,"em), calc(-50% + ").concat(t.y/Xo,"em)) "):l+="translate(".concat(t.x/Xo,"em, ").concat(t.y/Xo,"em) "),l+="scale(".concat(t.size/Xo*(t.flipX?-1:1),", ").concat(t.size/Xo*(t.flipY?-1:1),") "),l+="rotate(".concat(t.rotate,"deg) "),l}var SJ=`: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"; @@ -881,15 +881,15 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa { .fad.fa-inverse, .fa-duotone.fa-inverse { color: var(--fa-inverse, #fff); -}`;function v6(){var e=u6,t=f6,n=He.cssPrefix,r=He.replacementClass,i=pJ;if(n!==e||r!==t){var o=new RegExp("\\.".concat(e,"\\-"),"g"),s=new RegExp("\\--".concat(e,"\\-"),"g"),a=new RegExp("\\.".concat(t),"g");i=i.replace(o,".".concat(n,"-")).replace(s,"--".concat(n,"-")).replace(a,".".concat(r))}return i}var $M=!1;function db(){He.autoAddCss&&!$M&&(cJ(v6()),$M=!0)}var mJ={mixout:function(){return{dom:{css:v6,insertCss:db}}},hooks:function(){return{beforeDOMElementCreation:function(){db()},beforeI2svg:function(){db()}}}},Ro=Bs||{};Ro[Mo]||(Ro[Mo]={});Ro[Mo].styles||(Ro[Mo].styles={});Ro[Mo].hooks||(Ro[Mo].hooks={});Ro[Mo].shims||(Ro[Mo].shims=[]);var bi=Ro[Mo],y6=[],gJ=function e(){Dt.removeEventListener("DOMContentLoaded",e),ev=1,y6.map(function(t){return t()})},ev=!1;zo&&(ev=(Dt.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(Dt.readyState),ev||Dt.addEventListener("DOMContentLoaded",gJ));function vJ(e){zo&&(ev?setTimeout(e,0):y6.push(e))}function Zd(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"?g6(e):"<".concat(t," ").concat(fJ(r),">").concat(o.map(Zd).join(""),"")}function jM(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}var yJ=function(t,n){return function(r,i,o,s){return t.call(n,r,i,o,s)}},hb=function(t,n,r,i){var o=Object.keys(t),s=o.length,a=i!==void 0?yJ(n,i):n,l,c,f;for(r===void 0?(l=1,f=t[o[0]]):(l=0,f=r);l=55296&&i<=56319&&n=55296&&r<=56319&&n>t+1&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}function BM(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 Ow(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.skipHooks,i=r===void 0?!1:r,o=BM(t);typeof bi.hooks.addPack=="function"&&!i?bi.hooks.addPack(e,BM(t)):bi.styles[e]=ze(ze({},bi.styles[e]||{}),o),e==="fas"&&Ow("fa",t)}var Cp,Ep,Tp,ic=bi.styles,wJ=bi.shims,xJ=(Cp={},wn(Cp,Mt,Object.values(vd[Mt])),wn(Cp,Gt,Object.values(vd[Gt])),Cp),RC=null,_6={},b6={},w6={},x6={},S6={},SJ=(Ep={},wn(Ep,Mt,Object.keys(md[Mt])),wn(Ep,Gt,Object.keys(md[Gt])),Ep);function CJ(e){return~iJ.indexOf(e)}function EJ(e,t){var n=t.split("-"),r=n[0],i=n.slice(1).join("-");return r===e&&i!==""&&!CJ(i)?i:null}var C6=function(){var t=function(o){return hb(ic,function(s,a,l){return s[l]=hb(a,o,{}),s},{})};_6=t(function(i,o,s){if(o[3]&&(i[o[3]]=s),o[2]){var a=o[2].filter(function(l){return typeof l=="number"});a.forEach(function(l){i[l.toString(16)]=s})}return i}),b6=t(function(i,o,s){if(i[s]=s,o[2]){var a=o[2].filter(function(l){return typeof l=="string"});a.forEach(function(l){i[l]=s})}return i}),S6=t(function(i,o,s){var a=o[2];return i[s]=s,a.forEach(function(l){i[l]=s}),i});var n="far"in ic||He.autoFetchSvg,r=hb(wJ,function(i,o){var s=o[0],a=o[1],l=o[2];return a==="far"&&!n&&(a="fas"),typeof s=="string"&&(i.names[s]={prefix:a,iconName:l}),typeof s=="number"&&(i.unicodes[s.toString(16)]={prefix:a,iconName:l}),i},{names:{},unicodes:{}});w6=r.names,x6=r.unicodes,RC=u_(He.styleDefault,{family:He.familyDefault})};lJ(function(e){RC=u_(e.styleDefault,{family:He.familyDefault})});C6();function NC(e,t){return(_6[e]||{})[t]}function TJ(e,t){return(b6[e]||{})[t]}function Fa(e,t){return(S6[e]||{})[t]}function E6(e){return w6[e]||{prefix:null,iconName:null}}function OJ(e){var t=x6[e],n=NC("fas",e);return t||(n?{prefix:"fas",iconName:n}:null)||{prefix:null,iconName:null}}function zs(){return RC}var LC=function(){return{prefix:null,iconName:null,rest:[]}};function u_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.family,r=n===void 0?Mt:n,i=md[r][e],o=gd[r][e]||gd[r][i],s=e in bi.styles?e:null;return o||s||null}var zM=(Tp={},wn(Tp,Mt,Object.keys(vd[Mt])),wn(Tp,Gt,Object.keys(vd[Gt])),Tp);function f_(e){var t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.skipLookups,i=r===void 0?!1:r,o=(t={},wn(t,Mt,"".concat(He.cssPrefix,"-").concat(Mt)),wn(t,Gt,"".concat(He.cssPrefix,"-").concat(Gt)),t),s=null,a=Mt;(e.includes(o[Mt])||e.some(function(c){return zM[Mt].includes(c)}))&&(a=Mt),(e.includes(o[Gt])||e.some(function(c){return zM[Gt].includes(c)}))&&(a=Gt);var l=e.reduce(function(c,f){var h=EJ(He.cssPrefix,f);if(ic[f]?(f=xJ[a].includes(f)?QQ[a][f]:f,s=f,c.prefix=f):SJ[a].indexOf(f)>-1?(s=f,c.prefix=u_(f,{family:a})):h?c.iconName=h:f!==He.replacementClass&&f!==o[Mt]&&f!==o[Gt]&&c.rest.push(f),!i&&c.prefix&&c.iconName){var p=s==="fa"?E6(c.iconName):{},m=Fa(c.prefix,c.iconName);p.prefix&&(s=null),c.iconName=p.iconName||m||c.iconName,c.prefix=p.prefix||c.prefix,c.prefix==="far"&&!ic.far&&ic.fas&&!He.autoFetchSvg&&(c.prefix="fas")}return c},LC());return(e.includes("fa-brands")||e.includes("fab"))&&(l.prefix="fab"),(e.includes("fa-duotone")||e.includes("fad"))&&(l.prefix="fad"),!l.prefix&&a===Gt&&(ic.fass||He.autoFetchSvg)&&(l.prefix="fass",l.iconName=Fa(l.prefix,l.iconName)||l.iconName),(l.prefix==="fa"||s==="fa")&&(l.prefix=zs()||"fas"),l}var PJ=function(){function e(){BQ(this,e),this.definitions={}}return zQ(e,[{key:"add",value:function(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o0&&f.forEach(function(h){typeof h=="string"&&(n[a][h]=c)}),n[a][l]=c}),n}}]),e}(),UM=[],oc={},yc={},kJ=Object.keys(yc);function MJ(e,t){var n=t.mixoutsTo;return UM=e,oc={},Object.keys(yc).forEach(function(r){kJ.indexOf(r)===-1&&delete yc[r]}),UM.forEach(function(r){var i=r.mixout?r.mixout():{};if(Object.keys(i).forEach(function(s){typeof i[s]=="function"&&(n[s]=i[s]),Jg(i[s])==="object"&&Object.keys(i[s]).forEach(function(a){n[s]||(n[s]={}),n[s][a]=i[s][a]})}),r.hooks){var o=r.hooks();Object.keys(o).forEach(function(s){oc[s]||(oc[s]=[]),oc[s].push(o[s])})}r.provides&&r.provides(yc)}),n}function Pw(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 zo?(nl("beforeI2svg",t),No("pseudoElements2svg",t),No("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;He.autoReplaceSvg===!1&&(He.autoReplaceSvg=!0),He.observeMutations=!0,vJ(function(){DJ({autoReplaceSvgRoot:n}),nl("watch",t)})}},LJ={icon:function(t){if(t===null)return null;if(Jg(t)==="object"&&t.prefix&&t.iconName)return{prefix:t.prefix,iconName:Fa(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=u_(t[0]);return{prefix:r,iconName:Fa(r,n)||n}}if(typeof t=="string"&&(t.indexOf("".concat(He.cssPrefix,"-"))>-1||t.match(JQ))){var i=f_(t.split(" "),{skipLookups:!0});return{prefix:i.prefix||zs(),iconName:Fa(i.prefix,i.iconName)||i.iconName}}if(typeof t=="string"){var o=zs();return{prefix:o,iconName:Fa(o,t)||t}}}},zr={noAuto:RJ,config:He,dom:NJ,parse:LJ,library:T6,findIconDefinition:kw,toHtml:Zd},DJ=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot,r=n===void 0?Dt:n;(Object.keys(bi.styles).length>0||He.autoFetchSvg)&&zo&&He.autoReplaceSvg&&zr.dom.i2svg({node:r})};function d_(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(function(r){return Zd(r)})}}),Object.defineProperty(e,"node",{get:function(){if(zo){var r=Dt.createElement("div");return r.innerHTML=e.html,r.children}}}),e}function AJ(e){var t=e.children,n=e.main,r=e.mask,i=e.attributes,o=e.styles,s=e.transform;if(MC(s)&&n.found&&!r.found){var a=n.width,l=n.height,c={x:a/l/2,y:.5};i.style=c_(ze(ze({},o),{},{"transform-origin":"".concat(c.x+s.x/16,"em ").concat(c.y+s.y/16,"em")}))}return[{tag:"svg",attributes:i,children:t}]}function IJ(e){var t=e.prefix,n=e.iconName,r=e.children,i=e.attributes,o=e.symbol,s=o===!0?"".concat(t,"-").concat(He.cssPrefix,"-").concat(n):o;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:ze(ze({},i),{},{id:s}),children:r}]}]}function DC(e){var t=e.icons,n=t.main,r=t.mask,i=e.prefix,o=e.iconName,s=e.transform,a=e.symbol,l=e.title,c=e.maskId,f=e.titleId,h=e.extra,p=e.watchable,m=p===void 0?!1:p,g=r.found?r:n,v=g.width,w=g.height,y=i==="fak",b=[He.replacementClass,o?"".concat(He.cssPrefix,"-").concat(o):""].filter(function(z){return h.classes.indexOf(z)===-1}).filter(function(z){return z!==""||!!z}).concat(h.classes).join(" "),x={children:[],attributes:ze(ze({},h.attributes),{},{"data-prefix":i,"data-icon":o,class:b,role:h.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(v," ").concat(w)})},T=y&&!~h.classes.indexOf("fa-fw")?{width:"".concat(v/w*16*.0625,"em")}:{};m&&(x.attributes[tl]=""),l&&(x.children.push({tag:"title",attributes:{id:x.attributes["aria-labelledby"]||"title-".concat(f||_d())},children:[l]}),delete x.attributes.title);var P=ze(ze({},x),{},{prefix:i,iconName:o,main:n,mask:r,maskId:c,transform:s,symbol:a,styles:ze(ze({},T),h.styles)}),k=r.found&&n.found?No("generateAbstractMask",P)||{children:[],attributes:{}}:No("generateAbstractIcon",P)||{children:[],attributes:{}},N=k.children,D=k.attributes;return P.children=N,P.attributes=D,a?IJ(P):AJ(P)}function VM(e){var t=e.content,n=e.width,r=e.height,i=e.transform,o=e.title,s=e.extra,a=e.watchable,l=a===void 0?!1:a,c=ze(ze(ze({},s.attributes),o?{title:o}:{}),{},{class:s.classes.join(" ")});l&&(c[tl]="");var f=ze({},s.styles);MC(i)&&(f.transform=hJ({transform:i,startCentered:!0,width:n,height:r}),f["-webkit-transform"]=f.transform);var h=c_(f);h.length>0&&(c.style=h);var p=[];return p.push({tag:"span",attributes:c,children:[t]}),o&&p.push({tag:"span",attributes:{class:"sr-only"},children:[o]}),p}function FJ(e){var t=e.content,n=e.title,r=e.extra,i=ze(ze(ze({},r.attributes),n?{title:n}:{}),{},{class:r.classes.join(" ")}),o=c_(r.styles);o.length>0&&(i.style=o);var s=[];return s.push({tag:"span",attributes:i,children:[t]}),n&&s.push({tag:"span",attributes:{class:"sr-only"},children:[n]}),s}var pb=bi.styles;function Mw(e){var t=e[0],n=e[1],r=e.slice(4),i=CC(r,1),o=i[0],s=null;return Array.isArray(o)?s={tag:"g",attributes:{class:"".concat(He.cssPrefix,"-").concat(Ia.GROUP)},children:[{tag:"path",attributes:{class:"".concat(He.cssPrefix,"-").concat(Ia.SECONDARY),fill:"currentColor",d:o[0]}},{tag:"path",attributes:{class:"".concat(He.cssPrefix,"-").concat(Ia.PRIMARY),fill:"currentColor",d:o[1]}}]}:s={tag:"path",attributes:{fill:"currentColor",d:o}},{found:!0,width:t,height:n,icon:s}}var $J={found:!1,width:512,height:512};function jJ(e,t){!d6&&!He.showMissingIcons&&e&&console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}function Rw(e,t){var n=t;return t==="fa"&&He.styleDefault!==null&&(t=zs()),new Promise(function(r,i){if(No("missingIconAbstract"),n==="fa"){var o=E6(e)||{};e=o.iconName||e,t=o.prefix||t}if(e&&t&&pb[t]&&pb[t][e]){var s=pb[t][e];return r(Mw(s))}jJ(e,t),r(ze(ze({},$J),{},{icon:He.showMissingIcons&&e?No("missingIconAbstract")||{}:{}}))})}var HM=function(){},Nw=He.measurePerformance&&yp&&yp.mark&&yp.measure?yp:{mark:HM,measure:HM},Ju='FA "6.3.0"',BJ=function(t){return Nw.mark("".concat(Ju," ").concat(t," begins")),function(){return O6(t)}},O6=function(t){Nw.mark("".concat(Ju," ").concat(t," ends")),Nw.measure("".concat(Ju," ").concat(t),"".concat(Ju," ").concat(t," begins"),"".concat(Ju," ").concat(t," ends"))},AC={begin:BJ,end:O6},um=function(){};function WM(e){var t=e.getAttribute?e.getAttribute(tl):null;return typeof t=="string"}function zJ(e){var t=e.getAttribute?e.getAttribute(TC):null,n=e.getAttribute?e.getAttribute(OC):null;return t&&n}function UJ(e){return e&&e.classList&&e.classList.contains&&e.classList.contains(He.replacementClass)}function VJ(){if(He.autoReplaceSvg===!0)return fm.replace;var e=fm[He.autoReplaceSvg];return e||fm.replace}function HJ(e){return Dt.createElementNS("http://www.w3.org/2000/svg",e)}function WJ(e){return Dt.createElement(e)}function P6(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.ceFn,r=n===void 0?e.tag==="svg"?HJ:WJ:n;if(typeof e=="string")return Dt.createTextNode(e);var i=r(e.tag);Object.keys(e.attributes||[]).forEach(function(s){i.setAttribute(s,e.attributes[s])});var o=e.children||[];return o.forEach(function(s){i.appendChild(P6(s,{ceFn:r}))}),i}function YJ(e){var t=" ".concat(e.outerHTML," ");return t="".concat(t,"Font Awesome fontawesome.com "),t}var fm={replace:function(t){var n=t[0];if(n.parentNode)if(t[1].forEach(function(i){n.parentNode.insertBefore(P6(i),n)}),n.getAttribute(tl)===null&&He.keepOriginalSource){var r=Dt.createComment(YJ(n));n.parentNode.replaceChild(r,n)}else n.remove()},nest:function(t){var n=t[0],r=t[1];if(~kC(n).indexOf(He.replacementClass))return fm.replace(t);var i=new RegExp("".concat(He.cssPrefix,"-.*"));if(delete r[0].attributes.id,r[0].attributes.class){var o=r[0].attributes.class.split(" ").reduce(function(a,l){return l===He.replacementClass||l.match(i)?a.toSvg.push(l):a.toNode.push(l),a},{toNode:[],toSvg:[]});r[0].attributes.class=o.toSvg.join(" "),o.toNode.length===0?n.removeAttribute("class"):n.setAttribute("class",o.toNode.join(" "))}var s=r.map(function(a){return Zd(a)}).join(` -`);n.setAttribute(tl,""),n.innerHTML=s}};function YM(e){e()}function k6(e,t){var n=typeof t=="function"?t:um;if(e.length===0)n();else{var r=YM;He.mutateApproach===KQ&&(r=Bs.requestAnimationFrame||YM),r(function(){var i=VJ(),o=AC.begin("mutate");e.map(i),o(),n()})}}var IC=!1;function M6(){IC=!0}function Lw(){IC=!1}var tv=null;function qM(e){if(IM&&He.observeMutations){var t=e.treeCallback,n=t===void 0?um:t,r=e.nodeCallback,i=r===void 0?um:r,o=e.pseudoElementsCallback,s=o===void 0?um:o,a=e.observeMutationsRoot,l=a===void 0?Dt:a;tv=new IM(function(c){if(!IC){var f=zs();nu(c).forEach(function(h){if(h.type==="childList"&&h.addedNodes.length>0&&!WM(h.addedNodes[0])&&(He.searchPseudoElements&&s(h.target),n(h.target)),h.type==="attributes"&&h.target.parentNode&&He.searchPseudoElements&&s(h.target.parentNode),h.type==="attributes"&&WM(h.target)&&~rJ.indexOf(h.attributeName))if(h.attributeName==="class"&&zJ(h.target)){var p=f_(kC(h.target)),m=p.prefix,g=p.iconName;h.target.setAttribute(TC,m||f),g&&h.target.setAttribute(OC,g)}else UJ(h.target)&&i(h.target)})}}),zo&&tv.observe(l,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function qJ(){tv&&tv.disconnect()}function GJ(e){var t=e.getAttribute("style"),n=[];return t&&(n=t.split(";").reduce(function(r,i){var o=i.split(":"),s=o[0],a=o.slice(1);return s&&a.length>0&&(r[s]=a.join(":").trim()),r},{})),n}function ZJ(e){var t=e.getAttribute("data-prefix"),n=e.getAttribute("data-icon"),r=e.innerText!==void 0?e.innerText.trim():"",i=f_(kC(e));return i.prefix||(i.prefix=zs()),t&&n&&(i.prefix=t,i.iconName=n),i.iconName&&i.prefix||(i.prefix&&r.length>0&&(i.iconName=TJ(i.prefix,e.innerText)||NC(i.prefix,Tw(e.innerText))),!i.iconName&&He.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(i.iconName=e.firstChild.data)),i}function KJ(e){var t=nu(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 He.autoA11y&&(n?t["aria-labelledby"]="".concat(He.replacementClass,"-title-").concat(r||_d()):(t["aria-hidden"]="true",t.focusable="false")),t}function XJ(){return{iconName:null,title:null,titleId:null,prefix:null,transform:Gi,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function GM(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0},n=ZJ(e),r=n.iconName,i=n.prefix,o=n.rest,s=KJ(e),a=Pw("parseNodeAttributes",{},e),l=t.styleParser?GJ(e):[];return ze({iconName:r,title:e.getAttribute("title"),titleId:e.getAttribute("data-fa-title-id"),prefix:i,transform:Gi,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:o,styles:l,attributes:s}},a)}var QJ=bi.styles;function R6(e){var t=He.autoReplaceSvg==="nest"?GM(e,{styleParser:!1}):GM(e);return~t.extra.classes.indexOf(h6)?No("generateLayersText",e,t):No("generateSvgReplacementMutation",e,t)}var Us=new Set;PC.map(function(e){Us.add("fa-".concat(e))});Object.keys(md[Mt]).map(Us.add.bind(Us));Object.keys(md[Gt]).map(Us.add.bind(Us));Us=qd(Us);function ZM(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!zo)return Promise.resolve();var n=Dt.documentElement.classList,r=function(h){return n.add("".concat(FM,"-").concat(h))},i=function(h){return n.remove("".concat(FM,"-").concat(h))},o=He.autoFetchSvg?Us:PC.map(function(f){return"fa-".concat(f)}).concat(Object.keys(QJ));o.includes("fa")||o.push("fa");var s=[".".concat(h6,":not([").concat(tl,"])")].concat(o.map(function(f){return".".concat(f,":not([").concat(tl,"])")})).join(", ");if(s.length===0)return Promise.resolve();var a=[];try{a=nu(e.querySelectorAll(s))}catch{}if(a.length>0)r("pending"),i("complete");else return Promise.resolve();var l=AC.begin("onTree"),c=a.reduce(function(f,h){try{var p=R6(h);p&&f.push(p)}catch(m){d6||m.name==="MissingIcon"&&console.error(m)}return f},[]);return new Promise(function(f,h){Promise.all(c).then(function(p){k6(p,function(){r("active"),r("complete"),i("pending"),typeof t=="function"&&t(),l(),f()})}).catch(function(p){l(),h(p)})})}function JJ(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;R6(e).then(function(n){n&&k6([n],t)})}function eee(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=(t||{}).icon?t:kw(t||{}),i=n.mask;return i&&(i=(i||{}).icon?i:kw(i||{})),e(r,ze(ze({},n),{},{mask:i}))}}var tee=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.transform,i=r===void 0?Gi:r,o=n.symbol,s=o===void 0?!1:o,a=n.mask,l=a===void 0?null:a,c=n.maskId,f=c===void 0?null:c,h=n.title,p=h===void 0?null:h,m=n.titleId,g=m===void 0?null:m,v=n.classes,w=v===void 0?[]:v,y=n.attributes,b=y===void 0?{}:y,x=n.styles,T=x===void 0?{}:x;if(t){var P=t.prefix,k=t.iconName,N=t.icon;return d_(ze({type:"icon"},t),function(){return nl("beforeDOMElementCreation",{iconDefinition:t,params:n}),He.autoA11y&&(p?b["aria-labelledby"]="".concat(He.replacementClass,"-title-").concat(g||_d()):(b["aria-hidden"]="true",b.focusable="false")),DC({icons:{main:Mw(N),mask:l?Mw(l.icon):{found:!1,width:null,height:null,icon:{}}},prefix:P,iconName:k,transform:ze(ze({},Gi),i),symbol:s,title:p,maskId:f,titleId:g,extra:{attributes:b,styles:T,classes:w}})})}},nee={mixout:function(){return{icon:eee(tee)}},hooks:function(){return{mutationObserverCallbacks:function(n){return n.treeCallback=ZM,n.nodeCallback=JJ,n}}},provides:function(t){t.i2svg=function(n){var r=n.node,i=r===void 0?Dt:r,o=n.callback,s=o===void 0?function(){}:o;return ZM(i,s)},t.generateSvgReplacementMutation=function(n,r){var i=r.iconName,o=r.title,s=r.titleId,a=r.prefix,l=r.transform,c=r.symbol,f=r.mask,h=r.maskId,p=r.extra;return new Promise(function(m,g){Promise.all([Rw(i,a),f.iconName?Rw(f.iconName,f.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(v){var w=CC(v,2),y=w[0],b=w[1];m([n,DC({icons:{main:y,mask:b},prefix:a,iconName:i,transform:l,symbol:c,maskId:h,title:o,titleId:s,extra:p,watchable:!0})])}).catch(g)})},t.generateAbstractIcon=function(n){var r=n.children,i=n.attributes,o=n.main,s=n.transform,a=n.styles,l=c_(a);l.length>0&&(i.style=l);var c;return MC(s)&&(c=No("generateAbstractTransformGrouping",{main:o,transform:s,containerWidth:o.width,iconWidth:o.width})),r.push(c||o.icon),{children:r,attributes:i}}}},ree={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 d_({type:"layer"},function(){nl("beforeDOMElementCreation",{assembler:n,params:r});var s=[];return n(function(a){Array.isArray(a)?a.map(function(l){s=s.concat(l.abstract)}):s=s.concat(a.abstract)}),[{tag:"span",attributes:{class:["".concat(He.cssPrefix,"-layers")].concat(qd(o)).join(" ")},children:s}]})}}}},iee={mixout:function(){return{counter:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.title,o=i===void 0?null:i,s=r.classes,a=s===void 0?[]:s,l=r.attributes,c=l===void 0?{}:l,f=r.styles,h=f===void 0?{}:f;return d_({type:"counter",content:n},function(){return nl("beforeDOMElementCreation",{content:n,params:r}),FJ({content:n.toString(),title:o,extra:{attributes:c,styles:h,classes:["".concat(He.cssPrefix,"-layers-counter")].concat(qd(a))}})})}}}},oee={mixout:function(){return{text:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.transform,o=i===void 0?Gi:i,s=r.title,a=s===void 0?null:s,l=r.classes,c=l===void 0?[]:l,f=r.attributes,h=f===void 0?{}:f,p=r.styles,m=p===void 0?{}:p;return d_({type:"text",content:n},function(){return nl("beforeDOMElementCreation",{content:n,params:r}),VM({content:n,transform:ze(ze({},Gi),o),title:a,extra:{attributes:h,styles:m,classes:["".concat(He.cssPrefix,"-layers-text")].concat(qd(c))}})})}}},provides:function(t){t.generateLayersText=function(n,r){var i=r.title,o=r.transform,s=r.extra,a=null,l=null;if(c6){var c=parseInt(getComputedStyle(n).fontSize,10),f=n.getBoundingClientRect();a=f.width/c,l=f.height/c}return He.autoA11y&&!i&&(s.attributes["aria-hidden"]="true"),Promise.resolve([n,VM({content:n.innerHTML,width:a,height:l,transform:o,title:i,extra:s,watchable:!0})])}}},see=new RegExp('"',"ug"),KM=[1105920,1112319];function aee(e){var t=e.replace(see,""),n=bJ(t,0),r=n>=KM[0]&&n<=KM[1],i=t.length===2?t[0]===t[1]:!1;return{value:Tw(i?t[0]:t),isSecondary:r||i}}function XM(e,t){var n="".concat(ZQ).concat(t.replace(":","-"));return new Promise(function(r,i){if(e.getAttribute(n)!==null)return r();var o=nu(e.children),s=o.filter(function(N){return N.getAttribute(Ew)===t})[0],a=Bs.getComputedStyle(e,t),l=a.getPropertyValue("font-family").match(eJ),c=a.getPropertyValue("font-weight"),f=a.getPropertyValue("content");if(s&&!l)return e.removeChild(s),r();if(l&&f!=="none"&&f!==""){var h=a.getPropertyValue("content"),p=~["Sharp"].indexOf(l[2])?Gt:Mt,m=~["Solid","Regular","Light","Thin","Duotone","Brands","Kit"].indexOf(l[2])?gd[p][l[2].toLowerCase()]:tJ[p][c],g=aee(h),v=g.value,w=g.isSecondary,y=l[0].startsWith("FontAwesome"),b=NC(m,v),x=b;if(y){var T=OJ(v);T.iconName&&T.prefix&&(b=T.iconName,m=T.prefix)}if(b&&!w&&(!s||s.getAttribute(TC)!==m||s.getAttribute(OC)!==x)){e.setAttribute(n,x),s&&e.removeChild(s);var P=XJ(),k=P.extra;k.attributes[Ew]=t,Rw(b,m).then(function(N){var D=DC(ze(ze({},P),{},{icons:{main:N,mask:LC()},prefix:m,iconName:x,extra:k,watchable:!0})),z=Dt.createElement("svg");t==="::before"?e.insertBefore(z,e.firstChild):e.appendChild(z),z.outerHTML=D.map(function(A){return Zd(A)}).join(` -`),e.removeAttribute(n),r()}).catch(i)}else r()}else r()})}function lee(e){return Promise.all([XM(e,"::before"),XM(e,"::after")])}function cee(e){return e.parentNode!==document.head&&!~XQ.indexOf(e.tagName.toUpperCase())&&!e.getAttribute(Ew)&&(!e.parentNode||e.parentNode.tagName!=="svg")}function QM(e){if(zo)return new Promise(function(t,n){var r=nu(e.querySelectorAll("*")).filter(cee).map(lee),i=AC.begin("searchPseudoElements");M6(),Promise.all(r).then(function(){i(),Lw(),t()}).catch(function(){i(),Lw(),n()})})}var uee={hooks:function(){return{mutationObserverCallbacks:function(n){return n.pseudoElementsCallback=QM,n}}},provides:function(t){t.pseudoElements2svg=function(n){var r=n.node,i=r===void 0?Dt:r;He.searchPseudoElements&&QM(i)}}},JM=!1,fee={mixout:function(){return{dom:{unwatch:function(){M6(),JM=!0}}}},hooks:function(){return{bootstrap:function(){qM(Pw("mutationObserverCallbacks",{}))},noAuto:function(){qJ()},watch:function(n){var r=n.observeMutationsRoot;JM?Lw():qM(Pw("mutationObserverCallbacks",{observeMutationsRoot:r}))}}}},e3=function(t){var n={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return t.toLowerCase().split(" ").reduce(function(r,i){var o=i.toLowerCase().split("-"),s=o[0],a=o.slice(1).join("-");if(s&&a==="h")return r.flipX=!0,r;if(s&&a==="v")return r.flipY=!0,r;if(a=parseFloat(a),isNaN(a))return r;switch(s){case"grow":r.size=r.size+a;break;case"shrink":r.size=r.size-a;break;case"left":r.x=r.x-a;break;case"right":r.x=r.x+a;break;case"up":r.y=r.y-a;break;case"down":r.y=r.y+a;break;case"rotate":r.rotate=r.rotate+a;break}return r},n)},dee={mixout:function(){return{parse:{transform:function(n){return e3(n)}}}},hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-transform");return i&&(n.transform=e3(i)),n}}},provides:function(t){t.generateAbstractTransformGrouping=function(n){var r=n.main,i=n.transform,o=n.containerWidth,s=n.iconWidth,a={transform:"translate(".concat(o/2," 256)")},l="translate(".concat(i.x*32,", ").concat(i.y*32,") "),c="scale(".concat(i.size/16*(i.flipX?-1:1),", ").concat(i.size/16*(i.flipY?-1:1),") "),f="rotate(".concat(i.rotate," 0 0)"),h={transform:"".concat(l," ").concat(c," ").concat(f)},p={transform:"translate(".concat(s/2*-1," -256)")},m={outer:a,inner:h,path:p};return{tag:"g",attributes:ze({},m.outer),children:[{tag:"g",attributes:ze({},m.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:ze(ze({},r.icon.attributes),m.path)}]}]}}}},mb={x:0,y:0,width:"100%",height:"100%"};function t3(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 hee(e){return e.tag==="g"?e.children:[e]}var pee={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-mask"),o=i?f_(i.split(" ").map(function(s){return s.trim()})):LC();return o.prefix||(o.prefix=zs()),n.mask=o,n.maskId=r.getAttribute("data-fa-mask-id"),n}}},provides:function(t){t.generateAbstractMask=function(n){var r=n.children,i=n.attributes,o=n.main,s=n.mask,a=n.maskId,l=n.transform,c=o.width,f=o.icon,h=s.width,p=s.icon,m=dJ({transform:l,containerWidth:h,iconWidth:c}),g={tag:"rect",attributes:ze(ze({},mb),{},{fill:"white"})},v=f.children?{children:f.children.map(t3)}:{},w={tag:"g",attributes:ze({},m.inner),children:[t3(ze({tag:f.tag,attributes:ze(ze({},f.attributes),m.path)},v))]},y={tag:"g",attributes:ze({},m.outer),children:[w]},b="mask-".concat(a||_d()),x="clip-".concat(a||_d()),T={tag:"mask",attributes:ze(ze({},mb),{},{id:b,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[g,y]},P={tag:"defs",children:[{tag:"clipPath",attributes:{id:x},children:hee(p)},T]};return r.push(P,{tag:"rect",attributes:ze({fill:"currentColor","clip-path":"url(#".concat(x,")"),mask:"url(#".concat(b,")")},mb)}),{children:r,attributes:i}}}},mee={provides:function(t){var n=!1;Bs.matchMedia&&(n=Bs.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:ze(ze({},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=ze(ze({},o),{},{attributeName:"opacity"}),a={tag:"circle",attributes:ze(ze({},i),{},{cx:"256",cy:"364",r:"28"}),children:[]};return n||a.children.push({tag:"animate",attributes:ze(ze({},o),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:ze(ze({},s),{},{values:"1;0;1;1;0;1;"})}),r.push(a),r.push({tag:"path",attributes:ze(ze({},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:ze(ze({},s),{},{values:"1;0;0;0;0;1;"})}]}),n||r.push({tag:"path",attributes:ze(ze({},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:ze(ze({},s),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:r}}}},gee={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}}}},vee=[mJ,nee,ree,iee,oee,uee,fee,dee,pee,mee,gee];MJ(vee,{mixoutsTo:zr});zr.noAuto;zr.config;zr.library;zr.dom;var Dw=zr.parse;zr.findIconDefinition;zr.toHtml;var yee=zr.icon;zr.layer;zr.text;zr.counter;var S={},_ee={get exports(){return S},set exports(e){S=e}},bee="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",wee=bee,xee=wee;function N6(){}function L6(){}L6.resetWarningCache=N6;var See=function(){function e(r,i,o,s,a,l){if(l!==xee){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:L6,resetWarningCache:N6};return n.PropTypes=n,n};_ee.exports=See();function n3(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 vs(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function Eee(e,t){if(e==null)return{};var n=Cee(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 Aw(e){return Tee(e)||Oee(e)||Pee(e)||kee()}function Tee(e){if(Array.isArray(e))return Iw(e)}function Oee(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Pee(e,t){if(e){if(typeof e=="string")return Iw(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 Iw(e,t)}}function Iw(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 A6(e,l)}),i=Object.keys(t.attributes||{}).reduce(function(l,c){var f=t.attributes[c];switch(c){case"class":l.attrs.className=f,delete t.attributes.class;break;case"style":l.attrs.style=Dee(f);break;default:c.indexOf("aria-")===0||c.indexOf("data-")===0?l.attrs[c.toLowerCase()]=f:l.attrs[D6(c)]=f}return l},{attrs:{}}),o=n.style,s=o===void 0?{}:o,a=Eee(n,Nee);return i.attrs.style=vs(vs({},i.attrs.style),s),e.apply(void 0,[t.tag,vs(vs({},i.attrs),a)].concat(Aw(r)))}var I6=!1;try{I6=!0}catch{}function Aee(){if(!I6&&console&&typeof console.error=="function"){var e;(e=console).error.apply(e,arguments)}}function r3(e){if(e&&nv(e)==="object"&&e.prefix&&e.iconName&&e.icon)return e;if(Dw.icon)return Dw.icon(e);if(e===null)return null;if(e&&nv(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 gb(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?sc({},e,t):{}}var Fe=V.forwardRef(function(e,t){var n=e.icon,r=e.mask,i=e.symbol,o=e.className,s=e.title,a=e.titleId,l=e.maskId,c=r3(n),f=gb("classes",[].concat(Aw(Mee(e)),Aw(o.split(" ")))),h=gb("transform",typeof e.transform=="string"?Dw.transform(e.transform):e.transform),p=gb("mask",r3(r)),m=yee(c,vs(vs(vs(vs({},f),h),p),{},{symbol:i,title:s,titleId:a,maskId:l}));if(!m)return Aee("Could not find icon",c),null;var g=m.abstract,v={ref:t};return Object.keys(e).forEach(function(w){Fe.defaultProps.hasOwnProperty(w)||(v[w]=e[w])}),Iee(g[0],v)});Fe.displayName="FontAwesomeIcon";Fe.propTypes={beat:S.bool,border:S.bool,beatFade:S.bool,bounce:S.bool,className:S.string,fade:S.bool,flash:S.bool,mask:S.oneOfType([S.object,S.array,S.string]),maskId:S.string,fixedWidth:S.bool,inverse:S.bool,flip:S.oneOf([!0,!1,"horizontal","vertical","both"]),icon:S.oneOfType([S.object,S.array,S.string]),listItem:S.bool,pull:S.oneOf(["right","left"]),pulse:S.bool,rotation:S.oneOf([0,90,180,270]),shake:S.bool,size:S.oneOf(["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:S.bool,spinPulse:S.bool,spinReverse:S.bool,symbol:S.oneOfType([S.bool,S.string]),title:S.string,titleId:S.string,transform:S.oneOfType([S.string,S.object]),swapOpacity:S.bool};Fe.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 Iee=A6.bind(null,V.createElement),F6=H.createContext(),$6=H.createContext();function i3(e){var t=e.children,n=H.useState(null),r=n[0],i=n[1],o=H.useRef(!1);H.useEffect(function(){return function(){o.current=!0}},[]);var s=H.useCallback(function(a){o.current||i(a)},[]);return H.createElement(F6.Provider,{value:r},H.createElement($6.Provider,{value:s},t))}var j6=function(t){return Array.isArray(t)?t[0]:t},B6=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=si(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Zee(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];!Qr(o)||!no(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var a=i[s];a===!1?o.removeAttribute(s):o.setAttribute(s,a===!0?"":a)}))})}function Kee(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},s=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),a=s.reduce(function(l,c){return l[c]="",l},{});!Qr(i)||!no(i)||(Object.assign(i.style,a),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const Xee={name:"applyStyles",enabled:!0,phase:"write",fn:Zee,effect:Kee,requires:["computeStyles"]};function Qi(e){return e.split("-")[0]}var Ha=Math.max,rv=Math.min,jc=Math.round;function $w(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function V6(){return!/^((?!chrome|android).)*safari/i.test($w())}function Bc(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Qr(e)&&(i=e.offsetWidth>0&&jc(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&jc(r.height)/e.offsetHeight||1);var s=rl(e)?si(e):window,a=s.visualViewport,l=!V6()&&n,c=(r.left+(l&&a?a.offsetLeft:0))/i,f=(r.top+(l&&a?a.offsetTop:0))/o,h=r.width/i,p=r.height/o;return{width:h,height:p,top:f,right:c+h,bottom:f+p,left:c,x:c,y:f}}function jC(e){var t=Bc(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 H6(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&$C(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Lo(e){return si(e).getComputedStyle(e)}function Qee(e){return["table","td","th"].indexOf(no(e))>=0}function na(e){return((rl(e)?e.ownerDocument:e.document)||window.document).documentElement}function h_(e){return no(e)==="html"?e:e.assignedSlot||e.parentNode||($C(e)?e.host:null)||na(e)}function l3(e){return!Qr(e)||Lo(e).position==="fixed"?null:e.offsetParent}function Jee(e){var t=/firefox/i.test($w()),n=/Trident/i.test($w());if(n&&Qr(e)){var r=Lo(e);if(r.position==="fixed")return null}var i=h_(e);for($C(i)&&(i=i.host);Qr(i)&&["html","body"].indexOf(no(i))<0;){var o=Lo(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 Xd(e){for(var t=si(e),n=l3(e);n&&Qee(n)&&Lo(n).position==="static";)n=l3(n);return n&&(no(n)==="html"||no(n)==="body"&&Lo(n).position==="static")?t:n||Jee(e)||t}function BC(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Of(e,t,n){return Ha(e,rv(t,n))}function ete(e,t,n){var r=Of(e,t,n);return r>n?n:r}function W6(){return{top:0,right:0,bottom:0,left:0}}function Y6(e){return Object.assign({},W6(),e)}function q6(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var tte=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Y6(typeof t!="number"?t:q6(t,Kd))};function nte(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=Qi(n.placement),l=BC(a),c=[Sr,ii].indexOf(a)>=0,f=c?"height":"width";if(!(!o||!s)){var h=tte(i.padding,n),p=jC(o),m=l==="y"?xr:Sr,g=l==="y"?ri:ii,v=n.rects.reference[f]+n.rects.reference[l]-s[l]-n.rects.popper[f],w=s[l]-n.rects.reference[l],y=Xd(o),b=y?l==="y"?y.clientHeight||0:y.clientWidth||0:0,x=v/2-w/2,T=h[m],P=b-p[f]-h[g],k=b/2-p[f]/2+x,N=Of(T,k,P),D=l;n.modifiersData[r]=(t={},t[D]=N,t.centerOffset=N-k,t)}}function rte(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)||H6(t.elements.popper,i)&&(t.elements.arrow=i))}const ite={name:"arrow",enabled:!0,phase:"main",fn:nte,effect:rte,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function zc(e){return e.split("-")[1]}var ote={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ste(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:jc(t*i)/i||0,y:jc(n*i)/i||0}}function c3(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,s=e.offsets,a=e.position,l=e.gpuAcceleration,c=e.adaptive,f=e.roundOffsets,h=e.isFixed,p=s.x,m=p===void 0?0:p,g=s.y,v=g===void 0?0:g,w=typeof f=="function"?f({x:m,y:v}):{x:m,y:v};m=w.x,v=w.y;var y=s.hasOwnProperty("x"),b=s.hasOwnProperty("y"),x=Sr,T=xr,P=window;if(c){var k=Xd(n),N="clientHeight",D="clientWidth";if(k===si(n)&&(k=na(n),Lo(k).position!=="static"&&a==="absolute"&&(N="scrollHeight",D="scrollWidth")),k=k,i===xr||(i===Sr||i===ii)&&o===bd){T=ri;var z=h&&k===P&&P.visualViewport?P.visualViewport.height:k[N];v-=z-r.height,v*=l?1:-1}if(i===Sr||(i===xr||i===ri)&&o===bd){x=ii;var A=h&&k===P&&P.visualViewport?P.visualViewport.width:k[D];m-=A-r.width,m*=l?1:-1}}var Y=Object.assign({position:a},c&&ote),q=f===!0?ste({x:m,y:v}):{x:m,y:v};if(m=q.x,v=q.y,l){var ee;return Object.assign({},Y,(ee={},ee[T]=b?"0":"",ee[x]=y?"0":"",ee.transform=(P.devicePixelRatio||1)<=1?"translate("+m+"px, "+v+"px)":"translate3d("+m+"px, "+v+"px, 0)",ee))}return Object.assign({},Y,(t={},t[T]=b?v+"px":"",t[x]=y?m+"px":"",t.transform="",t))}function ate(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,s=o===void 0?!0:o,a=n.roundOffsets,l=a===void 0?!0:a,c={placement:Qi(t.placement),variation:zc(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,c3(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,c3(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 lte={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:ate,data:{}};var Op={passive:!0};function cte(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,s=r.resize,a=s===void 0?!0:s,l=si(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(f){f.addEventListener("scroll",n.update,Op)}),a&&l.addEventListener("resize",n.update,Op),function(){o&&c.forEach(function(f){f.removeEventListener("scroll",n.update,Op)}),a&&l.removeEventListener("resize",n.update,Op)}}const ute={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:cte,data:{}};var fte={left:"right",right:"left",bottom:"top",top:"bottom"};function dm(e){return e.replace(/left|right|bottom|top/g,function(t){return fte[t]})}var dte={start:"end",end:"start"};function u3(e){return e.replace(/start|end/g,function(t){return dte[t]})}function zC(e){var t=si(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function UC(e){return Bc(na(e)).left+zC(e).scrollLeft}function hte(e,t){var n=si(e),r=na(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;var c=V6();(c||!c&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a+UC(e),y:l}}function pte(e){var t,n=na(e),r=zC(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Ha(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=Ha(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+UC(e),l=-r.scrollTop;return Lo(i||n).direction==="rtl"&&(a+=Ha(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}function VC(e){var t=Lo(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function G6(e){return["html","body","#document"].indexOf(no(e))>=0?e.ownerDocument.body:Qr(e)&&VC(e)?e:G6(h_(e))}function Pf(e,t){var n;t===void 0&&(t=[]);var r=G6(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=si(r),s=i?[o].concat(o.visualViewport||[],VC(r)?r:[]):r,a=t.concat(s);return i?a:a.concat(Pf(h_(s)))}function jw(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function mte(e,t){var n=Bc(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 f3(e,t,n){return t===z6?jw(hte(e,n)):rl(t)?mte(t,n):jw(pte(na(e)))}function gte(e){var t=Pf(h_(e)),n=["absolute","fixed"].indexOf(Lo(e).position)>=0,r=n&&Qr(e)?Xd(e):e;return rl(r)?t.filter(function(i){return rl(i)&&H6(i,r)&&no(i)!=="body"}):[]}function vte(e,t,n,r){var i=t==="clippingParents"?gte(e):[].concat(t),o=[].concat(i,[n]),s=o[0],a=o.reduce(function(l,c){var f=f3(e,c,r);return l.top=Ha(f.top,l.top),l.right=rv(f.right,l.right),l.bottom=rv(f.bottom,l.bottom),l.left=Ha(f.left,l.left),l},f3(e,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function Z6(e){var t=e.reference,n=e.element,r=e.placement,i=r?Qi(r):null,o=r?zc(r):null,s=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2,l;switch(i){case xr:l={x:s,y:t.y-n.height};break;case ri:l={x:s,y:t.y+t.height};break;case ii:l={x:t.x+t.width,y:a};break;case Sr:l={x:t.x-n.width,y:a};break;default:l={x:t.x,y:t.y}}var c=i?BC(i):null;if(c!=null){var f=c==="y"?"height":"width";switch(o){case $c:l[c]=l[c]-(t[f]/2-n[f]/2);break;case bd:l[c]=l[c]+(t[f]/2-n[f]/2);break}}return l}function wd(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,s=o===void 0?e.strategy:o,a=n.boundary,l=a===void 0?Fee:a,c=n.rootBoundary,f=c===void 0?z6:c,h=n.elementContext,p=h===void 0?ju:h,m=n.altBoundary,g=m===void 0?!1:m,v=n.padding,w=v===void 0?0:v,y=Y6(typeof w!="number"?w:q6(w,Kd)),b=p===ju?$ee:ju,x=e.rects.popper,T=e.elements[g?b:p],P=vte(rl(T)?T:T.contextElement||na(e.elements.popper),l,f,s),k=Bc(e.elements.reference),N=Z6({reference:k,element:x,strategy:"absolute",placement:i}),D=jw(Object.assign({},x,N)),z=p===ju?D:k,A={top:P.top-z.top+y.top,bottom:z.bottom-P.bottom+y.bottom,left:P.left-z.left+y.left,right:z.right-P.right+y.right},Y=e.modifiersData.offset;if(p===ju&&Y){var q=Y[i];Object.keys(A).forEach(function(ee){var K=[ii,ri].indexOf(ee)>=0?1:-1,te=[xr,ri].indexOf(ee)>=0?"y":"x";A[ee]+=q[te]*K})}return A}function yte(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?U6:l,f=zc(r),h=f?a?a3:a3.filter(function(g){return zc(g)===f}):Kd,p=h.filter(function(g){return c.indexOf(g)>=0});p.length===0&&(p=h);var m=p.reduce(function(g,v){return g[v]=wd(e,{placement:v,boundary:i,rootBoundary:o,padding:s})[Qi(v)],g},{});return Object.keys(m).sort(function(g,v){return m[g]-m[v]})}function _te(e){if(Qi(e)===FC)return[];var t=dm(e);return[u3(e),t,u3(t)]}function bte(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!0:s,l=n.fallbackPlacements,c=n.padding,f=n.boundary,h=n.rootBoundary,p=n.altBoundary,m=n.flipVariations,g=m===void 0?!0:m,v=n.allowedAutoPlacements,w=t.options.placement,y=Qi(w),b=y===w,x=l||(b||!g?[dm(w)]:_te(w)),T=[w].concat(x).reduce(function(G,ne){return G.concat(Qi(ne)===FC?yte(t,{placement:ne,boundary:f,rootBoundary:h,padding:c,flipVariations:g,allowedAutoPlacements:v}):ne)},[]),P=t.rects.reference,k=t.rects.popper,N=new Map,D=!0,z=T[0],A=0;A=0,te=K?"width":"height",oe=wd(t,{placement:Y,boundary:f,rootBoundary:h,altBoundary:p,padding:c}),se=K?ee?ii:Sr:ee?ri:xr;P[te]>k[te]&&(se=dm(se));var Z=dm(se),$=[];if(o&&$.push(oe[q]<=0),a&&$.push(oe[se]<=0,oe[Z]<=0),$.every(function(G){return G})){z=Y,D=!1;break}N.set(Y,$)}if(D)for(var I=g?3:1,B=function(ne){var ae=T.find(function(me){var O=N.get(me);if(O)return O.slice(0,ne).every(function(R){return R})});if(ae)return z=ae,"break"},re=I;re>0;re--){var W=B(re);if(W==="break")break}t.placement!==z&&(t.modifiersData[r]._skip=!0,t.placement=z,t.reset=!0)}}const wte={name:"flip",enabled:!0,phase:"main",fn:bte,requiresIfExists:["offset"],data:{_skip:!1}};function d3(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 h3(e){return[xr,ii,ri,Sr].some(function(t){return e[t]>=0})}function xte(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=wd(t,{elementContext:"reference"}),a=wd(t,{altBoundary:!0}),l=d3(s,r),c=d3(a,i,o),f=h3(l),h=h3(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:f,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":h})}const Ste={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:xte};function Cte(e,t,n){var r=Qi(e),i=[Sr,xr].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*i,[Sr,ii].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}function Ete(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,s=U6.reduce(function(f,h){return f[h]=Cte(h,t.rects,o),f},{}),a=s[t.placement],l=a.x,c=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=s}const Tte={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Ete};function Ote(e){var t=e.state,n=e.name;t.modifiersData[n]=Z6({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Pte={name:"popperOffsets",enabled:!0,phase:"read",fn:Ote,data:{}};function kte(e){return e==="x"?"y":"x"}function Mte(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!1:s,l=n.boundary,c=n.rootBoundary,f=n.altBoundary,h=n.padding,p=n.tether,m=p===void 0?!0:p,g=n.tetherOffset,v=g===void 0?0:g,w=wd(t,{boundary:l,rootBoundary:c,padding:h,altBoundary:f}),y=Qi(t.placement),b=zc(t.placement),x=!b,T=BC(y),P=kte(T),k=t.modifiersData.popperOffsets,N=t.rects.reference,D=t.rects.popper,z=typeof v=="function"?v(Object.assign({},t.rects,{placement:t.placement})):v,A=typeof z=="number"?{mainAxis:z,altAxis:z}:Object.assign({mainAxis:0,altAxis:0},z),Y=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,q={x:0,y:0};if(k){if(o){var ee,K=T==="y"?xr:Sr,te=T==="y"?ri:ii,oe=T==="y"?"height":"width",se=k[T],Z=se+w[K],$=se-w[te],I=m?-D[oe]/2:0,B=b===$c?N[oe]:D[oe],re=b===$c?-D[oe]:-N[oe],W=t.elements.arrow,G=m&&W?jC(W):{width:0,height:0},ne=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:W6(),ae=ne[K],me=ne[te],O=Of(0,N[oe],G[oe]),R=x?N[oe]/2-I-O-ae-A.mainAxis:B-O-ae-A.mainAxis,F=x?-N[oe]/2+I+O+me+A.mainAxis:re+O+me+A.mainAxis,Q=t.elements.arrow&&Xd(t.elements.arrow),X=Q?T==="y"?Q.clientTop||0:Q.clientLeft||0:0,le=(ee=Y==null?void 0:Y[T])!=null?ee:0,ve=se+R-le-X,De=se+F-le,fe=Of(m?rv(Z,ve):Z,se,m?Ha($,De):$);k[T]=fe,q[T]=fe-se}if(a){var ye,be=T==="x"?xr:Sr,Oe=T==="x"?ri:ii,Ae=k[P],Ne=P==="y"?"height":"width",Le=Ae+w[be],ue=Ae-w[Oe],he=[xr,Sr].indexOf(y)!==-1,we=(ye=Y==null?void 0:Y[P])!=null?ye:0,_e=he?Le:Ae-N[Ne]-D[Ne]-we+A.altAxis,Ee=he?Ae+N[Ne]+D[Ne]-we-A.altAxis:ue,Me=m&&he?ete(_e,Ae,Ee):Of(m?_e:Le,Ae,m?Ee:ue);k[P]=Me,q[P]=Me-Ae}t.modifiersData[r]=q}}const Rte={name:"preventOverflow",enabled:!0,phase:"main",fn:Mte,requiresIfExists:["offset"]};function Nte(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Lte(e){return e===si(e)||!Qr(e)?zC(e):Nte(e)}function Dte(e){var t=e.getBoundingClientRect(),n=jc(t.width)/e.offsetWidth||1,r=jc(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Ate(e,t,n){n===void 0&&(n=!1);var r=Qr(t),i=Qr(t)&&Dte(t),o=na(t),s=Bc(e,i,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((no(t)!=="body"||VC(o))&&(a=Lte(t)),Qr(t)?(l=Bc(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=UC(o))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function Ite(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(a){if(!n.has(a)){var l=t.get(a);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function Fte(e){var t=Ite(e);return Gee.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function $te(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function jte(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 p3={placement:"bottom",modifiers:[],strategy:"absolute"};function m3(){for(var e=arguments.length,t=new Array(e),n=0;n=0)&&(n[i]=e[i]);return n}function Ze(e,t){if(e==null)return{};var n=ene(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 tne(){let e=document.createElement("div");e.style.position="absolute",e.style.top="-9999px",e.style.width="50px",e.style.height="50px",e.style.overflow="scroll",document.body.appendChild(e);const t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}function HC(e){document.body.style.paddingRight=e>0?`${e}px`:null}function nne(){return document.body.clientWidtht[n]||n).join(" "):e}function Tr(e,t){const n={};return Object.keys(e).forEach(r=>{t.indexOf(r)===-1&&(n[r]=e[r])}),n}function n5(e,t){const n=Array.isArray(t)?t:[t];let{length:r}=n,i;const o={};for(;r>0;)r-=1,i=n[r],o[i]=e[i];return o}let y3={};function Uw(e){y3[e]||(typeof console<"u"&&console.error(e),y3[e]=!0)}function r5(e,t){return function(r,i,o,...s){return r[i]!==null&&typeof r[i]<"u"&&Uw(`"${i}" property of "${o}" has been deprecated. -${t}`),e(r,i,o,...s)}}const ine=typeof window=="object"&&window.Element||function(){};function WC(e,t,n){if(!(e[t]instanceof ine))return new Error("Invalid prop `"+t+"` supplied to `"+n+"`. Expected prop to be an instance of Element. Validation failed.")}const Vs=S.oneOfType([S.string,S.func,WC,S.shape({current:S.any})]),ke=S.oneOfType([S.func,S.string,S.shape({$$typeof:S.symbol,render:S.func}),S.arrayOf(S.oneOfType([S.func,S.string,S.shape({$$typeof:S.symbol,render:S.func})]))]),il={Fade:150,Collapse:350,Modal:300,Carousel:600,Offcanvas:300},iv=["in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","onEnter","onEntering","onEntered","onExit","onExiting","onExited"],yo={ENTERING:"entering",ENTERED:"entered",EXITING:"exiting",EXITED:"exited"},mt={esc:27,space:32,enter:13,tab:9,up:38,down:40,home:36,end:35,n:78,p:80},one=["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"],YC=!!(typeof window<"u"&&window.document&&window.document.createElement);function sne(e){return e&&typeof e=="object"?"current"in e:!1}function i5(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}function ov(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")}function _3(e){const t=typeof e,n=0/0;if(t==="number")return e;if(t==="symbol"||t==="object"&&i5(e)==="[object Symbol]")return n;if(ov(e)){const i=typeof e.valueOf=="function"?e.valueOf():e;e=ov(i)?`${i}`:i}if(t!=="string")return e===0?e:+e;e=e.replace(/^\s+|\s+$/g,"");const r=/^0b[01]+$/i.test(e);return r||/^0o[0-7]+$/i.test(e)?parseInt(e.slice(2),r?2:8):/^[-+]0x[0-9a-f]+$/i.test(e)?n:+e}function ane(e){if(!ov(e))return!1;const t=i5(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object Proxy]"}function o5(e){if(sne(e))return e.current;if(ane(e))return e();if(typeof e=="string"&&YC){let t=document.querySelectorAll(e);if(t.length||(t=document.querySelectorAll(`#${e}`)),!t.length)throw new Error(`The target '${e}' could not be identified in the dom, tip: check spelling`);return t}return e}function sv(e){return e===null?!1:Array.isArray(e)||YC&&typeof e.length=="number"}function Uc(e,t){const n=o5(e);return t?sv(n)?n:n===null?[]:[n]:sv(n)?n[0]:n}const lne=["touchstart","click"];function cne(e,t,n,r){let i=e;sv(i)||(i=[i]);let o=n;if(typeof o=="string"&&(o=o.split(/\s+/)),!sv(i)||typeof t!="function"||!Array.isArray(o))throw new Error(` +}`;function C6(){var e=v6,t=y6,n=He.cssPrefix,r=He.replacementClass,i=SJ;if(n!==e||r!==t){var o=new RegExp("\\.".concat(e,"\\-"),"g"),s=new RegExp("\\--".concat(e,"\\-"),"g"),a=new RegExp("\\.".concat(t),"g");i=i.replace(o,".".concat(n,"-")).replace(s,"--".concat(n,"-")).replace(a,".".concat(r))}return i}var zM=!1;function pb(){He.autoAddCss&&!zM&&(yJ(C6()),zM=!0)}var CJ={mixout:function(){return{dom:{css:C6,insertCss:pb}}},hooks:function(){return{beforeDOMElementCreation:function(){pb()},beforeI2svg:function(){pb()}}}},No=Bs||{};No[Ro]||(No[Ro]={});No[Ro].styles||(No[Ro].styles={});No[Ro].hooks||(No[Ro].hooks={});No[Ro].shims||(No[Ro].shims=[]);var bi=No[Ro],E6=[],EJ=function e(){Dt.removeEventListener("DOMContentLoaded",e),tv=1,E6.map(function(t){return t()})},tv=!1;Uo&&(tv=(Dt.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(Dt.readyState),tv||Dt.addEventListener("DOMContentLoaded",EJ));function TJ(e){Uo&&(tv?setTimeout(e,0):E6.push(e))}function Zd(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"?S6(e):"<".concat(t," ").concat(bJ(r),">").concat(o.map(Zd).join(""),"")}function UM(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}var OJ=function(t,n){return function(r,i,o,s){return t.call(n,r,i,o,s)}},mb=function(t,n,r,i){var o=Object.keys(t),s=o.length,a=i!==void 0?OJ(n,i):n,l,c,f;for(r===void 0?(l=1,f=t[o[0]]):(l=0,f=r);l=55296&&i<=56319&&n=55296&&r<=56319&&n>t+1&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}function VM(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 Rw(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.skipHooks,i=r===void 0?!1:r,o=VM(t);typeof bi.hooks.addPack=="function"&&!i?bi.hooks.addPack(e,VM(t)):bi.styles[e]=ze(ze({},bi.styles[e]||{}),o),e==="fas"&&Rw("fa",t)}var Ep,Tp,Op,oc=bi.styles,MJ=bi.shims,RJ=(Ep={},wn(Ep,Mt,Object.values(vd[Mt])),wn(Ep,Gt,Object.values(vd[Gt])),Ep),LC=null,T6={},O6={},P6={},k6={},M6={},NJ=(Tp={},wn(Tp,Mt,Object.keys(md[Mt])),wn(Tp,Gt,Object.keys(md[Gt])),Tp);function LJ(e){return~hJ.indexOf(e)}function DJ(e,t){var n=t.split("-"),r=n[0],i=n.slice(1).join("-");return r===e&&i!==""&&!LJ(i)?i:null}var R6=function(){var t=function(o){return mb(oc,function(s,a,l){return s[l]=mb(a,o,{}),s},{})};T6=t(function(i,o,s){if(o[3]&&(i[o[3]]=s),o[2]){var a=o[2].filter(function(l){return typeof l=="number"});a.forEach(function(l){i[l.toString(16)]=s})}return i}),O6=t(function(i,o,s){if(i[s]=s,o[2]){var a=o[2].filter(function(l){return typeof l=="string"});a.forEach(function(l){i[l]=s})}return i}),M6=t(function(i,o,s){var a=o[2];return i[s]=s,a.forEach(function(l){i[l]=s}),i});var n="far"in oc||He.autoFetchSvg,r=mb(MJ,function(i,o){var s=o[0],a=o[1],l=o[2];return a==="far"&&!n&&(a="fas"),typeof s=="string"&&(i.names[s]={prefix:a,iconName:l}),typeof s=="number"&&(i.unicodes[s.toString(16)]={prefix:a,iconName:l}),i},{names:{},unicodes:{}});P6=r.names,k6=r.unicodes,LC=d_(He.styleDefault,{family:He.familyDefault})};vJ(function(e){LC=d_(e.styleDefault,{family:He.familyDefault})});R6();function DC(e,t){return(T6[e]||{})[t]}function AJ(e,t){return(O6[e]||{})[t]}function Fa(e,t){return(M6[e]||{})[t]}function N6(e){return P6[e]||{prefix:null,iconName:null}}function IJ(e){var t=k6[e],n=DC("fas",e);return t||(n?{prefix:"fas",iconName:n}:null)||{prefix:null,iconName:null}}function zs(){return LC}var AC=function(){return{prefix:null,iconName:null,rest:[]}};function d_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.family,r=n===void 0?Mt:n,i=md[r][e],o=gd[r][e]||gd[r][i],s=e in bi.styles?e:null;return o||s||null}var HM=(Op={},wn(Op,Mt,Object.keys(vd[Mt])),wn(Op,Gt,Object.keys(vd[Gt])),Op);function h_(e){var t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.skipLookups,i=r===void 0?!1:r,o=(t={},wn(t,Mt,"".concat(He.cssPrefix,"-").concat(Mt)),wn(t,Gt,"".concat(He.cssPrefix,"-").concat(Gt)),t),s=null,a=Mt;(e.includes(o[Mt])||e.some(function(c){return HM[Mt].includes(c)}))&&(a=Mt),(e.includes(o[Gt])||e.some(function(c){return HM[Gt].includes(c)}))&&(a=Gt);var l=e.reduce(function(c,f){var h=DJ(He.cssPrefix,f);if(oc[f]?(f=RJ[a].includes(f)?aJ[a][f]:f,s=f,c.prefix=f):NJ[a].indexOf(f)>-1?(s=f,c.prefix=d_(f,{family:a})):h?c.iconName=h:f!==He.replacementClass&&f!==o[Mt]&&f!==o[Gt]&&c.rest.push(f),!i&&c.prefix&&c.iconName){var p=s==="fa"?N6(c.iconName):{},m=Fa(c.prefix,c.iconName);p.prefix&&(s=null),c.iconName=p.iconName||m||c.iconName,c.prefix=p.prefix||c.prefix,c.prefix==="far"&&!oc.far&&oc.fas&&!He.autoFetchSvg&&(c.prefix="fas")}return c},AC());return(e.includes("fa-brands")||e.includes("fab"))&&(l.prefix="fab"),(e.includes("fa-duotone")||e.includes("fad"))&&(l.prefix="fad"),!l.prefix&&a===Gt&&(oc.fass||He.autoFetchSvg)&&(l.prefix="fass",l.iconName=Fa(l.prefix,l.iconName)||l.iconName),(l.prefix==="fa"||s==="fa")&&(l.prefix=zs()||"fas"),l}var FJ=function(){function e(){ZQ(this,e),this.definitions={}}return KQ(e,[{key:"add",value:function(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o0&&f.forEach(function(h){typeof h=="string"&&(n[a][h]=c)}),n[a][l]=c}),n}}]),e}(),WM=[],sc={},_c={},$J=Object.keys(_c);function jJ(e,t){var n=t.mixoutsTo;return WM=e,sc={},Object.keys(_c).forEach(function(r){$J.indexOf(r)===-1&&delete _c[r]}),WM.forEach(function(r){var i=r.mixout?r.mixout():{};if(Object.keys(i).forEach(function(s){typeof i[s]=="function"&&(n[s]=i[s]),ev(i[s])==="object"&&Object.keys(i[s]).forEach(function(a){n[s]||(n[s]={}),n[s][a]=i[s][a]})}),r.hooks){var o=r.hooks();Object.keys(o).forEach(function(s){sc[s]||(sc[s]=[]),sc[s].push(o[s])})}r.provides&&r.provides(_c)}),n}function Nw(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 Uo?(nl("beforeI2svg",t),Lo("pseudoElements2svg",t),Lo("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;He.autoReplaceSvg===!1&&(He.autoReplaceSvg=!0),He.observeMutations=!0,TJ(function(){VJ({autoReplaceSvgRoot:n}),nl("watch",t)})}},UJ={icon:function(t){if(t===null)return null;if(ev(t)==="object"&&t.prefix&&t.iconName)return{prefix:t.prefix,iconName:Fa(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=d_(t[0]);return{prefix:r,iconName:Fa(r,n)||n}}if(typeof t=="string"&&(t.indexOf("".concat(He.cssPrefix,"-"))>-1||t.match(lJ))){var i=h_(t.split(" "),{skipLookups:!0});return{prefix:i.prefix||zs(),iconName:Fa(i.prefix,i.iconName)||i.iconName}}if(typeof t=="string"){var o=zs();return{prefix:o,iconName:Fa(o,t)||t}}}},zr={noAuto:BJ,config:He,dom:zJ,parse:UJ,library:L6,findIconDefinition:Lw,toHtml:Zd},VJ=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot,r=n===void 0?Dt:n;(Object.keys(bi.styles).length>0||He.autoFetchSvg)&&Uo&&He.autoReplaceSvg&&zr.dom.i2svg({node:r})};function p_(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(function(r){return Zd(r)})}}),Object.defineProperty(e,"node",{get:function(){if(Uo){var r=Dt.createElement("div");return r.innerHTML=e.html,r.children}}}),e}function HJ(e){var t=e.children,n=e.main,r=e.mask,i=e.attributes,o=e.styles,s=e.transform;if(NC(s)&&n.found&&!r.found){var a=n.width,l=n.height,c={x:a/l/2,y:.5};i.style=f_(ze(ze({},o),{},{"transform-origin":"".concat(c.x+s.x/16,"em ").concat(c.y+s.y/16,"em")}))}return[{tag:"svg",attributes:i,children:t}]}function WJ(e){var t=e.prefix,n=e.iconName,r=e.children,i=e.attributes,o=e.symbol,s=o===!0?"".concat(t,"-").concat(He.cssPrefix,"-").concat(n):o;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:ze(ze({},i),{},{id:s}),children:r}]}]}function IC(e){var t=e.icons,n=t.main,r=t.mask,i=e.prefix,o=e.iconName,s=e.transform,a=e.symbol,l=e.title,c=e.maskId,f=e.titleId,h=e.extra,p=e.watchable,m=p===void 0?!1:p,g=r.found?r:n,v=g.width,w=g.height,y=i==="fak",b=[He.replacementClass,o?"".concat(He.cssPrefix,"-").concat(o):""].filter(function(z){return h.classes.indexOf(z)===-1}).filter(function(z){return z!==""||!!z}).concat(h.classes).join(" "),x={children:[],attributes:ze(ze({},h.attributes),{},{"data-prefix":i,"data-icon":o,class:b,role:h.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(v," ").concat(w)})},T=y&&!~h.classes.indexOf("fa-fw")?{width:"".concat(v/w*16*.0625,"em")}:{};m&&(x.attributes[tl]=""),l&&(x.children.push({tag:"title",attributes:{id:x.attributes["aria-labelledby"]||"title-".concat(f||_d())},children:[l]}),delete x.attributes.title);var P=ze(ze({},x),{},{prefix:i,iconName:o,main:n,mask:r,maskId:c,transform:s,symbol:a,styles:ze(ze({},T),h.styles)}),k=r.found&&n.found?Lo("generateAbstractMask",P)||{children:[],attributes:{}}:Lo("generateAbstractIcon",P)||{children:[],attributes:{}},N=k.children,D=k.attributes;return P.children=N,P.attributes=D,a?WJ(P):HJ(P)}function YM(e){var t=e.content,n=e.width,r=e.height,i=e.transform,o=e.title,s=e.extra,a=e.watchable,l=a===void 0?!1:a,c=ze(ze(ze({},s.attributes),o?{title:o}:{}),{},{class:s.classes.join(" ")});l&&(c[tl]="");var f=ze({},s.styles);NC(i)&&(f.transform=xJ({transform:i,startCentered:!0,width:n,height:r}),f["-webkit-transform"]=f.transform);var h=f_(f);h.length>0&&(c.style=h);var p=[];return p.push({tag:"span",attributes:c,children:[t]}),o&&p.push({tag:"span",attributes:{class:"sr-only"},children:[o]}),p}function YJ(e){var t=e.content,n=e.title,r=e.extra,i=ze(ze(ze({},r.attributes),n?{title:n}:{}),{},{class:r.classes.join(" ")}),o=f_(r.styles);o.length>0&&(i.style=o);var s=[];return s.push({tag:"span",attributes:i,children:[t]}),n&&s.push({tag:"span",attributes:{class:"sr-only"},children:[n]}),s}var gb=bi.styles;function Dw(e){var t=e[0],n=e[1],r=e.slice(4),i=TC(r,1),o=i[0],s=null;return Array.isArray(o)?s={tag:"g",attributes:{class:"".concat(He.cssPrefix,"-").concat(Ia.GROUP)},children:[{tag:"path",attributes:{class:"".concat(He.cssPrefix,"-").concat(Ia.SECONDARY),fill:"currentColor",d:o[0]}},{tag:"path",attributes:{class:"".concat(He.cssPrefix,"-").concat(Ia.PRIMARY),fill:"currentColor",d:o[1]}}]}:s={tag:"path",attributes:{fill:"currentColor",d:o}},{found:!0,width:t,height:n,icon:s}}var qJ={found:!1,width:512,height:512};function GJ(e,t){!_6&&!He.showMissingIcons&&e&&console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}function Aw(e,t){var n=t;return t==="fa"&&He.styleDefault!==null&&(t=zs()),new Promise(function(r,i){if(Lo("missingIconAbstract"),n==="fa"){var o=N6(e)||{};e=o.iconName||e,t=o.prefix||t}if(e&&t&&gb[t]&&gb[t][e]){var s=gb[t][e];return r(Dw(s))}GJ(e,t),r(ze(ze({},qJ),{},{icon:He.showMissingIcons&&e?Lo("missingIconAbstract")||{}:{}}))})}var qM=function(){},Iw=He.measurePerformance&&_p&&_p.mark&&_p.measure?_p:{mark:qM,measure:qM},ef='FA "6.3.0"',ZJ=function(t){return Iw.mark("".concat(ef," ").concat(t," begins")),function(){return D6(t)}},D6=function(t){Iw.mark("".concat(ef," ").concat(t," ends")),Iw.measure("".concat(ef," ").concat(t),"".concat(ef," ").concat(t," begins"),"".concat(ef," ").concat(t," ends"))},FC={begin:ZJ,end:D6},fm=function(){};function GM(e){var t=e.getAttribute?e.getAttribute(tl):null;return typeof t=="string"}function KJ(e){var t=e.getAttribute?e.getAttribute(PC):null,n=e.getAttribute?e.getAttribute(kC):null;return t&&n}function XJ(e){return e&&e.classList&&e.classList.contains&&e.classList.contains(He.replacementClass)}function QJ(){if(He.autoReplaceSvg===!0)return dm.replace;var e=dm[He.autoReplaceSvg];return e||dm.replace}function JJ(e){return Dt.createElementNS("http://www.w3.org/2000/svg",e)}function eee(e){return Dt.createElement(e)}function A6(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.ceFn,r=n===void 0?e.tag==="svg"?JJ:eee:n;if(typeof e=="string")return Dt.createTextNode(e);var i=r(e.tag);Object.keys(e.attributes||[]).forEach(function(s){i.setAttribute(s,e.attributes[s])});var o=e.children||[];return o.forEach(function(s){i.appendChild(A6(s,{ceFn:r}))}),i}function tee(e){var t=" ".concat(e.outerHTML," ");return t="".concat(t,"Font Awesome fontawesome.com "),t}var dm={replace:function(t){var n=t[0];if(n.parentNode)if(t[1].forEach(function(i){n.parentNode.insertBefore(A6(i),n)}),n.getAttribute(tl)===null&&He.keepOriginalSource){var r=Dt.createComment(tee(n));n.parentNode.replaceChild(r,n)}else n.remove()},nest:function(t){var n=t[0],r=t[1];if(~RC(n).indexOf(He.replacementClass))return dm.replace(t);var i=new RegExp("".concat(He.cssPrefix,"-.*"));if(delete r[0].attributes.id,r[0].attributes.class){var o=r[0].attributes.class.split(" ").reduce(function(a,l){return l===He.replacementClass||l.match(i)?a.toSvg.push(l):a.toNode.push(l),a},{toNode:[],toSvg:[]});r[0].attributes.class=o.toSvg.join(" "),o.toNode.length===0?n.removeAttribute("class"):n.setAttribute("class",o.toNode.join(" "))}var s=r.map(function(a){return Zd(a)}).join(` +`);n.setAttribute(tl,""),n.innerHTML=s}};function ZM(e){e()}function I6(e,t){var n=typeof t=="function"?t:fm;if(e.length===0)n();else{var r=ZM;He.mutateApproach===oJ&&(r=Bs.requestAnimationFrame||ZM),r(function(){var i=QJ(),o=FC.begin("mutate");e.map(i),o(),n()})}}var $C=!1;function F6(){$C=!0}function Fw(){$C=!1}var nv=null;function KM(e){if(jM&&He.observeMutations){var t=e.treeCallback,n=t===void 0?fm:t,r=e.nodeCallback,i=r===void 0?fm:r,o=e.pseudoElementsCallback,s=o===void 0?fm:o,a=e.observeMutationsRoot,l=a===void 0?Dt:a;nv=new jM(function(c){if(!$C){var f=zs();iu(c).forEach(function(h){if(h.type==="childList"&&h.addedNodes.length>0&&!GM(h.addedNodes[0])&&(He.searchPseudoElements&&s(h.target),n(h.target)),h.type==="attributes"&&h.target.parentNode&&He.searchPseudoElements&&s(h.target.parentNode),h.type==="attributes"&&GM(h.target)&&~dJ.indexOf(h.attributeName))if(h.attributeName==="class"&&KJ(h.target)){var p=h_(RC(h.target)),m=p.prefix,g=p.iconName;h.target.setAttribute(PC,m||f),g&&h.target.setAttribute(kC,g)}else XJ(h.target)&&i(h.target)})}}),Uo&&nv.observe(l,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function nee(){nv&&nv.disconnect()}function ree(e){var t=e.getAttribute("style"),n=[];return t&&(n=t.split(";").reduce(function(r,i){var o=i.split(":"),s=o[0],a=o.slice(1);return s&&a.length>0&&(r[s]=a.join(":").trim()),r},{})),n}function iee(e){var t=e.getAttribute("data-prefix"),n=e.getAttribute("data-icon"),r=e.innerText!==void 0?e.innerText.trim():"",i=h_(RC(e));return i.prefix||(i.prefix=zs()),t&&n&&(i.prefix=t,i.iconName=n),i.iconName&&i.prefix||(i.prefix&&r.length>0&&(i.iconName=AJ(i.prefix,e.innerText)||DC(i.prefix,Mw(e.innerText))),!i.iconName&&He.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(i.iconName=e.firstChild.data)),i}function oee(e){var t=iu(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 He.autoA11y&&(n?t["aria-labelledby"]="".concat(He.replacementClass,"-title-").concat(r||_d()):(t["aria-hidden"]="true",t.focusable="false")),t}function see(){return{iconName:null,title:null,titleId:null,prefix:null,transform:Gi,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function XM(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0},n=iee(e),r=n.iconName,i=n.prefix,o=n.rest,s=oee(e),a=Nw("parseNodeAttributes",{},e),l=t.styleParser?ree(e):[];return ze({iconName:r,title:e.getAttribute("title"),titleId:e.getAttribute("data-fa-title-id"),prefix:i,transform:Gi,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:o,styles:l,attributes:s}},a)}var aee=bi.styles;function $6(e){var t=He.autoReplaceSvg==="nest"?XM(e,{styleParser:!1}):XM(e);return~t.extra.classes.indexOf(b6)?Lo("generateLayersText",e,t):Lo("generateSvgReplacementMutation",e,t)}var Us=new Set;MC.map(function(e){Us.add("fa-".concat(e))});Object.keys(md[Mt]).map(Us.add.bind(Us));Object.keys(md[Gt]).map(Us.add.bind(Us));Us=qd(Us);function QM(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!Uo)return Promise.resolve();var n=Dt.documentElement.classList,r=function(h){return n.add("".concat(BM,"-").concat(h))},i=function(h){return n.remove("".concat(BM,"-").concat(h))},o=He.autoFetchSvg?Us:MC.map(function(f){return"fa-".concat(f)}).concat(Object.keys(aee));o.includes("fa")||o.push("fa");var s=[".".concat(b6,":not([").concat(tl,"])")].concat(o.map(function(f){return".".concat(f,":not([").concat(tl,"])")})).join(", ");if(s.length===0)return Promise.resolve();var a=[];try{a=iu(e.querySelectorAll(s))}catch{}if(a.length>0)r("pending"),i("complete");else return Promise.resolve();var l=FC.begin("onTree"),c=a.reduce(function(f,h){try{var p=$6(h);p&&f.push(p)}catch(m){_6||m.name==="MissingIcon"&&console.error(m)}return f},[]);return new Promise(function(f,h){Promise.all(c).then(function(p){I6(p,function(){r("active"),r("complete"),i("pending"),typeof t=="function"&&t(),l(),f()})}).catch(function(p){l(),h(p)})})}function lee(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;$6(e).then(function(n){n&&I6([n],t)})}function cee(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=(t||{}).icon?t:Lw(t||{}),i=n.mask;return i&&(i=(i||{}).icon?i:Lw(i||{})),e(r,ze(ze({},n),{},{mask:i}))}}var uee=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.transform,i=r===void 0?Gi:r,o=n.symbol,s=o===void 0?!1:o,a=n.mask,l=a===void 0?null:a,c=n.maskId,f=c===void 0?null:c,h=n.title,p=h===void 0?null:h,m=n.titleId,g=m===void 0?null:m,v=n.classes,w=v===void 0?[]:v,y=n.attributes,b=y===void 0?{}:y,x=n.styles,T=x===void 0?{}:x;if(t){var P=t.prefix,k=t.iconName,N=t.icon;return p_(ze({type:"icon"},t),function(){return nl("beforeDOMElementCreation",{iconDefinition:t,params:n}),He.autoA11y&&(p?b["aria-labelledby"]="".concat(He.replacementClass,"-title-").concat(g||_d()):(b["aria-hidden"]="true",b.focusable="false")),IC({icons:{main:Dw(N),mask:l?Dw(l.icon):{found:!1,width:null,height:null,icon:{}}},prefix:P,iconName:k,transform:ze(ze({},Gi),i),symbol:s,title:p,maskId:f,titleId:g,extra:{attributes:b,styles:T,classes:w}})})}},fee={mixout:function(){return{icon:cee(uee)}},hooks:function(){return{mutationObserverCallbacks:function(n){return n.treeCallback=QM,n.nodeCallback=lee,n}}},provides:function(t){t.i2svg=function(n){var r=n.node,i=r===void 0?Dt:r,o=n.callback,s=o===void 0?function(){}:o;return QM(i,s)},t.generateSvgReplacementMutation=function(n,r){var i=r.iconName,o=r.title,s=r.titleId,a=r.prefix,l=r.transform,c=r.symbol,f=r.mask,h=r.maskId,p=r.extra;return new Promise(function(m,g){Promise.all([Aw(i,a),f.iconName?Aw(f.iconName,f.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(v){var w=TC(v,2),y=w[0],b=w[1];m([n,IC({icons:{main:y,mask:b},prefix:a,iconName:i,transform:l,symbol:c,maskId:h,title:o,titleId:s,extra:p,watchable:!0})])}).catch(g)})},t.generateAbstractIcon=function(n){var r=n.children,i=n.attributes,o=n.main,s=n.transform,a=n.styles,l=f_(a);l.length>0&&(i.style=l);var c;return NC(s)&&(c=Lo("generateAbstractTransformGrouping",{main:o,transform:s,containerWidth:o.width,iconWidth:o.width})),r.push(c||o.icon),{children:r,attributes:i}}}},dee={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 p_({type:"layer"},function(){nl("beforeDOMElementCreation",{assembler:n,params:r});var s=[];return n(function(a){Array.isArray(a)?a.map(function(l){s=s.concat(l.abstract)}):s=s.concat(a.abstract)}),[{tag:"span",attributes:{class:["".concat(He.cssPrefix,"-layers")].concat(qd(o)).join(" ")},children:s}]})}}}},hee={mixout:function(){return{counter:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.title,o=i===void 0?null:i,s=r.classes,a=s===void 0?[]:s,l=r.attributes,c=l===void 0?{}:l,f=r.styles,h=f===void 0?{}:f;return p_({type:"counter",content:n},function(){return nl("beforeDOMElementCreation",{content:n,params:r}),YJ({content:n.toString(),title:o,extra:{attributes:c,styles:h,classes:["".concat(He.cssPrefix,"-layers-counter")].concat(qd(a))}})})}}}},pee={mixout:function(){return{text:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.transform,o=i===void 0?Gi:i,s=r.title,a=s===void 0?null:s,l=r.classes,c=l===void 0?[]:l,f=r.attributes,h=f===void 0?{}:f,p=r.styles,m=p===void 0?{}:p;return p_({type:"text",content:n},function(){return nl("beforeDOMElementCreation",{content:n,params:r}),YM({content:n,transform:ze(ze({},Gi),o),title:a,extra:{attributes:h,styles:m,classes:["".concat(He.cssPrefix,"-layers-text")].concat(qd(c))}})})}}},provides:function(t){t.generateLayersText=function(n,r){var i=r.title,o=r.transform,s=r.extra,a=null,l=null;if(g6){var c=parseInt(getComputedStyle(n).fontSize,10),f=n.getBoundingClientRect();a=f.width/c,l=f.height/c}return He.autoA11y&&!i&&(s.attributes["aria-hidden"]="true"),Promise.resolve([n,YM({content:n.innerHTML,width:a,height:l,transform:o,title:i,extra:s,watchable:!0})])}}},mee=new RegExp('"',"ug"),JM=[1105920,1112319];function gee(e){var t=e.replace(mee,""),n=kJ(t,0),r=n>=JM[0]&&n<=JM[1],i=t.length===2?t[0]===t[1]:!1;return{value:Mw(i?t[0]:t),isSecondary:r||i}}function e3(e,t){var n="".concat(iJ).concat(t.replace(":","-"));return new Promise(function(r,i){if(e.getAttribute(n)!==null)return r();var o=iu(e.children),s=o.filter(function(N){return N.getAttribute(kw)===t})[0],a=Bs.getComputedStyle(e,t),l=a.getPropertyValue("font-family").match(cJ),c=a.getPropertyValue("font-weight"),f=a.getPropertyValue("content");if(s&&!l)return e.removeChild(s),r();if(l&&f!=="none"&&f!==""){var h=a.getPropertyValue("content"),p=~["Sharp"].indexOf(l[2])?Gt:Mt,m=~["Solid","Regular","Light","Thin","Duotone","Brands","Kit"].indexOf(l[2])?gd[p][l[2].toLowerCase()]:uJ[p][c],g=gee(h),v=g.value,w=g.isSecondary,y=l[0].startsWith("FontAwesome"),b=DC(m,v),x=b;if(y){var T=IJ(v);T.iconName&&T.prefix&&(b=T.iconName,m=T.prefix)}if(b&&!w&&(!s||s.getAttribute(PC)!==m||s.getAttribute(kC)!==x)){e.setAttribute(n,x),s&&e.removeChild(s);var P=see(),k=P.extra;k.attributes[kw]=t,Aw(b,m).then(function(N){var D=IC(ze(ze({},P),{},{icons:{main:N,mask:AC()},prefix:m,iconName:x,extra:k,watchable:!0})),z=Dt.createElement("svg");t==="::before"?e.insertBefore(z,e.firstChild):e.appendChild(z),z.outerHTML=D.map(function(A){return Zd(A)}).join(` +`),e.removeAttribute(n),r()}).catch(i)}else r()}else r()})}function vee(e){return Promise.all([e3(e,"::before"),e3(e,"::after")])}function yee(e){return e.parentNode!==document.head&&!~sJ.indexOf(e.tagName.toUpperCase())&&!e.getAttribute(kw)&&(!e.parentNode||e.parentNode.tagName!=="svg")}function t3(e){if(Uo)return new Promise(function(t,n){var r=iu(e.querySelectorAll("*")).filter(yee).map(vee),i=FC.begin("searchPseudoElements");F6(),Promise.all(r).then(function(){i(),Fw(),t()}).catch(function(){i(),Fw(),n()})})}var _ee={hooks:function(){return{mutationObserverCallbacks:function(n){return n.pseudoElementsCallback=t3,n}}},provides:function(t){t.pseudoElements2svg=function(n){var r=n.node,i=r===void 0?Dt:r;He.searchPseudoElements&&t3(i)}}},n3=!1,bee={mixout:function(){return{dom:{unwatch:function(){F6(),n3=!0}}}},hooks:function(){return{bootstrap:function(){KM(Nw("mutationObserverCallbacks",{}))},noAuto:function(){nee()},watch:function(n){var r=n.observeMutationsRoot;n3?Fw():KM(Nw("mutationObserverCallbacks",{observeMutationsRoot:r}))}}}},r3=function(t){var n={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return t.toLowerCase().split(" ").reduce(function(r,i){var o=i.toLowerCase().split("-"),s=o[0],a=o.slice(1).join("-");if(s&&a==="h")return r.flipX=!0,r;if(s&&a==="v")return r.flipY=!0,r;if(a=parseFloat(a),isNaN(a))return r;switch(s){case"grow":r.size=r.size+a;break;case"shrink":r.size=r.size-a;break;case"left":r.x=r.x-a;break;case"right":r.x=r.x+a;break;case"up":r.y=r.y-a;break;case"down":r.y=r.y+a;break;case"rotate":r.rotate=r.rotate+a;break}return r},n)},wee={mixout:function(){return{parse:{transform:function(n){return r3(n)}}}},hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-transform");return i&&(n.transform=r3(i)),n}}},provides:function(t){t.generateAbstractTransformGrouping=function(n){var r=n.main,i=n.transform,o=n.containerWidth,s=n.iconWidth,a={transform:"translate(".concat(o/2," 256)")},l="translate(".concat(i.x*32,", ").concat(i.y*32,") "),c="scale(".concat(i.size/16*(i.flipX?-1:1),", ").concat(i.size/16*(i.flipY?-1:1),") "),f="rotate(".concat(i.rotate," 0 0)"),h={transform:"".concat(l," ").concat(c," ").concat(f)},p={transform:"translate(".concat(s/2*-1," -256)")},m={outer:a,inner:h,path:p};return{tag:"g",attributes:ze({},m.outer),children:[{tag:"g",attributes:ze({},m.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:ze(ze({},r.icon.attributes),m.path)}]}]}}}},vb={x:0,y:0,width:"100%",height:"100%"};function i3(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 xee(e){return e.tag==="g"?e.children:[e]}var See={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-mask"),o=i?h_(i.split(" ").map(function(s){return s.trim()})):AC();return o.prefix||(o.prefix=zs()),n.mask=o,n.maskId=r.getAttribute("data-fa-mask-id"),n}}},provides:function(t){t.generateAbstractMask=function(n){var r=n.children,i=n.attributes,o=n.main,s=n.mask,a=n.maskId,l=n.transform,c=o.width,f=o.icon,h=s.width,p=s.icon,m=wJ({transform:l,containerWidth:h,iconWidth:c}),g={tag:"rect",attributes:ze(ze({},vb),{},{fill:"white"})},v=f.children?{children:f.children.map(i3)}:{},w={tag:"g",attributes:ze({},m.inner),children:[i3(ze({tag:f.tag,attributes:ze(ze({},f.attributes),m.path)},v))]},y={tag:"g",attributes:ze({},m.outer),children:[w]},b="mask-".concat(a||_d()),x="clip-".concat(a||_d()),T={tag:"mask",attributes:ze(ze({},vb),{},{id:b,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[g,y]},P={tag:"defs",children:[{tag:"clipPath",attributes:{id:x},children:xee(p)},T]};return r.push(P,{tag:"rect",attributes:ze({fill:"currentColor","clip-path":"url(#".concat(x,")"),mask:"url(#".concat(b,")")},vb)}),{children:r,attributes:i}}}},Cee={provides:function(t){var n=!1;Bs.matchMedia&&(n=Bs.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:ze(ze({},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=ze(ze({},o),{},{attributeName:"opacity"}),a={tag:"circle",attributes:ze(ze({},i),{},{cx:"256",cy:"364",r:"28"}),children:[]};return n||a.children.push({tag:"animate",attributes:ze(ze({},o),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:ze(ze({},s),{},{values:"1;0;1;1;0;1;"})}),r.push(a),r.push({tag:"path",attributes:ze(ze({},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:ze(ze({},s),{},{values:"1;0;0;0;0;1;"})}]}),n||r.push({tag:"path",attributes:ze(ze({},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:ze(ze({},s),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:r}}}},Eee={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}}}},Tee=[CJ,fee,dee,hee,pee,_ee,bee,wee,See,Cee,Eee];jJ(Tee,{mixoutsTo:zr});zr.noAuto;zr.config;zr.library;zr.dom;var $w=zr.parse;zr.findIconDefinition;zr.toHtml;var Oee=zr.icon;zr.layer;zr.text;zr.counter;var S={},Pee={get exports(){return S},set exports(e){S=e}},kee="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Mee=kee,Ree=Mee;function j6(){}function B6(){}B6.resetWarningCache=j6;var Nee=function(){function e(r,i,o,s,a,l){if(l!==Ree){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:B6,resetWarningCache:j6};return n.PropTypes=n,n};Pee.exports=Nee();function o3(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 ys(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function Dee(e,t){if(e==null)return{};var n=Lee(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 jw(e){return Aee(e)||Iee(e)||Fee(e)||$ee()}function Aee(e){if(Array.isArray(e))return Bw(e)}function Iee(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Fee(e,t){if(e){if(typeof e=="string")return Bw(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 Bw(e,t)}}function Bw(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 U6(e,l)}),i=Object.keys(t.attributes||{}).reduce(function(l,c){var f=t.attributes[c];switch(c){case"class":l.attrs.className=f,delete t.attributes.class;break;case"style":l.attrs.style=Vee(f);break;default:c.indexOf("aria-")===0||c.indexOf("data-")===0?l.attrs[c.toLowerCase()]=f:l.attrs[z6(c)]=f}return l},{attrs:{}}),o=n.style,s=o===void 0?{}:o,a=Dee(n,zee);return i.attrs.style=ys(ys({},i.attrs.style),s),e.apply(void 0,[t.tag,ys(ys({},i.attrs),a)].concat(jw(r)))}var V6=!1;try{V6=!0}catch{}function Hee(){if(!V6&&console&&typeof console.error=="function"){var e;(e=console).error.apply(e,arguments)}}function s3(e){if(e&&rv(e)==="object"&&e.prefix&&e.iconName&&e.icon)return e;if($w.icon)return $w.icon(e);if(e===null)return null;if(e&&rv(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 yb(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?ac({},e,t):{}}var Fe=V.forwardRef(function(e,t){var n=e.icon,r=e.mask,i=e.symbol,o=e.className,s=e.title,a=e.titleId,l=e.maskId,c=s3(n),f=yb("classes",[].concat(jw(jee(e)),jw(o.split(" ")))),h=yb("transform",typeof e.transform=="string"?$w.transform(e.transform):e.transform),p=yb("mask",s3(r)),m=Oee(c,ys(ys(ys(ys({},f),h),p),{},{symbol:i,title:s,titleId:a,maskId:l}));if(!m)return Hee("Could not find icon",c),null;var g=m.abstract,v={ref:t};return Object.keys(e).forEach(function(w){Fe.defaultProps.hasOwnProperty(w)||(v[w]=e[w])}),Wee(g[0],v)});Fe.displayName="FontAwesomeIcon";Fe.propTypes={beat:S.bool,border:S.bool,beatFade:S.bool,bounce:S.bool,className:S.string,fade:S.bool,flash:S.bool,mask:S.oneOfType([S.object,S.array,S.string]),maskId:S.string,fixedWidth:S.bool,inverse:S.bool,flip:S.oneOf([!0,!1,"horizontal","vertical","both"]),icon:S.oneOfType([S.object,S.array,S.string]),listItem:S.bool,pull:S.oneOf(["right","left"]),pulse:S.bool,rotation:S.oneOf([0,90,180,270]),shake:S.bool,size:S.oneOf(["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:S.bool,spinPulse:S.bool,spinReverse:S.bool,symbol:S.oneOfType([S.bool,S.string]),title:S.string,titleId:S.string,transform:S.oneOfType([S.string,S.object]),swapOpacity:S.bool};Fe.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 Wee=U6.bind(null,V.createElement),H6=H.createContext(),W6=H.createContext();function a3(e){var t=e.children,n=H.useState(null),r=n[0],i=n[1],o=H.useRef(!1);H.useEffect(function(){return function(){o.current=!0}},[]);var s=H.useCallback(function(a){o.current||i(a)},[]);return H.createElement(H6.Provider,{value:r},H.createElement(W6.Provider,{value:s},t))}var Y6=function(t){return Array.isArray(t)?t[0]:t},q6=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=si(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function ite(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];!Qr(o)||!no(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var a=i[s];a===!1?o.removeAttribute(s):o.setAttribute(s,a===!0?"":a)}))})}function ote(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},s=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),a=s.reduce(function(l,c){return l[c]="",l},{});!Qr(i)||!no(i)||(Object.assign(i.style,a),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const ste={name:"applyStyles",enabled:!0,phase:"write",fn:ite,effect:ote,requires:["computeStyles"]};function Qi(e){return e.split("-")[0]}var Ha=Math.max,iv=Math.min,zc=Math.round;function Uw(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function K6(){return!/^((?!chrome|android).)*safari/i.test(Uw())}function Uc(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Qr(e)&&(i=e.offsetWidth>0&&zc(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&zc(r.height)/e.offsetHeight||1);var s=rl(e)?si(e):window,a=s.visualViewport,l=!K6()&&n,c=(r.left+(l&&a?a.offsetLeft:0))/i,f=(r.top+(l&&a?a.offsetTop:0))/o,h=r.width/i,p=r.height/o;return{width:h,height:p,top:f,right:c+h,bottom:f+p,left:c,x:c,y:f}}function zC(e){var t=Uc(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 X6(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&BC(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Do(e){return si(e).getComputedStyle(e)}function ate(e){return["table","td","th"].indexOf(no(e))>=0}function na(e){return((rl(e)?e.ownerDocument:e.document)||window.document).documentElement}function m_(e){return no(e)==="html"?e:e.assignedSlot||e.parentNode||(BC(e)?e.host:null)||na(e)}function f3(e){return!Qr(e)||Do(e).position==="fixed"?null:e.offsetParent}function lte(e){var t=/firefox/i.test(Uw()),n=/Trident/i.test(Uw());if(n&&Qr(e)){var r=Do(e);if(r.position==="fixed")return null}var i=m_(e);for(BC(i)&&(i=i.host);Qr(i)&&["html","body"].indexOf(no(i))<0;){var o=Do(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 Xd(e){for(var t=si(e),n=f3(e);n&&ate(n)&&Do(n).position==="static";)n=f3(n);return n&&(no(n)==="html"||no(n)==="body"&&Do(n).position==="static")?t:n||lte(e)||t}function UC(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Pf(e,t,n){return Ha(e,iv(t,n))}function cte(e,t,n){var r=Pf(e,t,n);return r>n?n:r}function Q6(){return{top:0,right:0,bottom:0,left:0}}function J6(e){return Object.assign({},Q6(),e)}function e5(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var ute=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,J6(typeof t!="number"?t:e5(t,Kd))};function fte(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=Qi(n.placement),l=UC(a),c=[Sr,ii].indexOf(a)>=0,f=c?"height":"width";if(!(!o||!s)){var h=ute(i.padding,n),p=zC(o),m=l==="y"?xr:Sr,g=l==="y"?ri:ii,v=n.rects.reference[f]+n.rects.reference[l]-s[l]-n.rects.popper[f],w=s[l]-n.rects.reference[l],y=Xd(o),b=y?l==="y"?y.clientHeight||0:y.clientWidth||0:0,x=v/2-w/2,T=h[m],P=b-p[f]-h[g],k=b/2-p[f]/2+x,N=Pf(T,k,P),D=l;n.modifiersData[r]=(t={},t[D]=N,t.centerOffset=N-k,t)}}function dte(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)||X6(t.elements.popper,i)&&(t.elements.arrow=i))}const hte={name:"arrow",enabled:!0,phase:"main",fn:fte,effect:dte,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Vc(e){return e.split("-")[1]}var pte={top:"auto",right:"auto",bottom:"auto",left:"auto"};function mte(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:zc(t*i)/i||0,y:zc(n*i)/i||0}}function d3(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,s=e.offsets,a=e.position,l=e.gpuAcceleration,c=e.adaptive,f=e.roundOffsets,h=e.isFixed,p=s.x,m=p===void 0?0:p,g=s.y,v=g===void 0?0:g,w=typeof f=="function"?f({x:m,y:v}):{x:m,y:v};m=w.x,v=w.y;var y=s.hasOwnProperty("x"),b=s.hasOwnProperty("y"),x=Sr,T=xr,P=window;if(c){var k=Xd(n),N="clientHeight",D="clientWidth";if(k===si(n)&&(k=na(n),Do(k).position!=="static"&&a==="absolute"&&(N="scrollHeight",D="scrollWidth")),k=k,i===xr||(i===Sr||i===ii)&&o===bd){T=ri;var z=h&&k===P&&P.visualViewport?P.visualViewport.height:k[N];v-=z-r.height,v*=l?1:-1}if(i===Sr||(i===xr||i===ri)&&o===bd){x=ii;var A=h&&k===P&&P.visualViewport?P.visualViewport.width:k[D];m-=A-r.width,m*=l?1:-1}}var Y=Object.assign({position:a},c&&pte),q=f===!0?mte({x:m,y:v}):{x:m,y:v};if(m=q.x,v=q.y,l){var ee;return Object.assign({},Y,(ee={},ee[T]=b?"0":"",ee[x]=y?"0":"",ee.transform=(P.devicePixelRatio||1)<=1?"translate("+m+"px, "+v+"px)":"translate3d("+m+"px, "+v+"px, 0)",ee))}return Object.assign({},Y,(t={},t[T]=b?v+"px":"",t[x]=y?m+"px":"",t.transform="",t))}function gte(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,s=o===void 0?!0:o,a=n.roundOffsets,l=a===void 0?!0:a,c={placement:Qi(t.placement),variation:Vc(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,d3(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,d3(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 vte={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:gte,data:{}};var Pp={passive:!0};function yte(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,s=r.resize,a=s===void 0?!0:s,l=si(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(f){f.addEventListener("scroll",n.update,Pp)}),a&&l.addEventListener("resize",n.update,Pp),function(){o&&c.forEach(function(f){f.removeEventListener("scroll",n.update,Pp)}),a&&l.removeEventListener("resize",n.update,Pp)}}const _te={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:yte,data:{}};var bte={left:"right",right:"left",bottom:"top",top:"bottom"};function hm(e){return e.replace(/left|right|bottom|top/g,function(t){return bte[t]})}var wte={start:"end",end:"start"};function h3(e){return e.replace(/start|end/g,function(t){return wte[t]})}function VC(e){var t=si(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function HC(e){return Uc(na(e)).left+VC(e).scrollLeft}function xte(e,t){var n=si(e),r=na(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;var c=K6();(c||!c&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a+HC(e),y:l}}function Ste(e){var t,n=na(e),r=VC(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Ha(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=Ha(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+HC(e),l=-r.scrollTop;return Do(i||n).direction==="rtl"&&(a+=Ha(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}function WC(e){var t=Do(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function t5(e){return["html","body","#document"].indexOf(no(e))>=0?e.ownerDocument.body:Qr(e)&&WC(e)?e:t5(m_(e))}function kf(e,t){var n;t===void 0&&(t=[]);var r=t5(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=si(r),s=i?[o].concat(o.visualViewport||[],WC(r)?r:[]):r,a=t.concat(s);return i?a:a.concat(kf(m_(s)))}function Vw(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Cte(e,t){var n=Uc(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 p3(e,t,n){return t===G6?Vw(xte(e,n)):rl(t)?Cte(t,n):Vw(Ste(na(e)))}function Ete(e){var t=kf(m_(e)),n=["absolute","fixed"].indexOf(Do(e).position)>=0,r=n&&Qr(e)?Xd(e):e;return rl(r)?t.filter(function(i){return rl(i)&&X6(i,r)&&no(i)!=="body"}):[]}function Tte(e,t,n,r){var i=t==="clippingParents"?Ete(e):[].concat(t),o=[].concat(i,[n]),s=o[0],a=o.reduce(function(l,c){var f=p3(e,c,r);return l.top=Ha(f.top,l.top),l.right=iv(f.right,l.right),l.bottom=iv(f.bottom,l.bottom),l.left=Ha(f.left,l.left),l},p3(e,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function n5(e){var t=e.reference,n=e.element,r=e.placement,i=r?Qi(r):null,o=r?Vc(r):null,s=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2,l;switch(i){case xr:l={x:s,y:t.y-n.height};break;case ri:l={x:s,y:t.y+t.height};break;case ii:l={x:t.x+t.width,y:a};break;case Sr:l={x:t.x-n.width,y:a};break;default:l={x:t.x,y:t.y}}var c=i?UC(i):null;if(c!=null){var f=c==="y"?"height":"width";switch(o){case Bc:l[c]=l[c]-(t[f]/2-n[f]/2);break;case bd:l[c]=l[c]+(t[f]/2-n[f]/2);break}}return l}function wd(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,s=o===void 0?e.strategy:o,a=n.boundary,l=a===void 0?Yee:a,c=n.rootBoundary,f=c===void 0?G6:c,h=n.elementContext,p=h===void 0?zu:h,m=n.altBoundary,g=m===void 0?!1:m,v=n.padding,w=v===void 0?0:v,y=J6(typeof w!="number"?w:e5(w,Kd)),b=p===zu?qee:zu,x=e.rects.popper,T=e.elements[g?b:p],P=Tte(rl(T)?T:T.contextElement||na(e.elements.popper),l,f,s),k=Uc(e.elements.reference),N=n5({reference:k,element:x,strategy:"absolute",placement:i}),D=Vw(Object.assign({},x,N)),z=p===zu?D:k,A={top:P.top-z.top+y.top,bottom:z.bottom-P.bottom+y.bottom,left:P.left-z.left+y.left,right:z.right-P.right+y.right},Y=e.modifiersData.offset;if(p===zu&&Y){var q=Y[i];Object.keys(A).forEach(function(ee){var K=[ii,ri].indexOf(ee)>=0?1:-1,te=[xr,ri].indexOf(ee)>=0?"y":"x";A[ee]+=q[te]*K})}return A}function Ote(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?Z6:l,f=Vc(r),h=f?a?u3:u3.filter(function(g){return Vc(g)===f}):Kd,p=h.filter(function(g){return c.indexOf(g)>=0});p.length===0&&(p=h);var m=p.reduce(function(g,v){return g[v]=wd(e,{placement:v,boundary:i,rootBoundary:o,padding:s})[Qi(v)],g},{});return Object.keys(m).sort(function(g,v){return m[g]-m[v]})}function Pte(e){if(Qi(e)===jC)return[];var t=hm(e);return[h3(e),t,h3(t)]}function kte(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!0:s,l=n.fallbackPlacements,c=n.padding,f=n.boundary,h=n.rootBoundary,p=n.altBoundary,m=n.flipVariations,g=m===void 0?!0:m,v=n.allowedAutoPlacements,w=t.options.placement,y=Qi(w),b=y===w,x=l||(b||!g?[hm(w)]:Pte(w)),T=[w].concat(x).reduce(function(G,ne){return G.concat(Qi(ne)===jC?Ote(t,{placement:ne,boundary:f,rootBoundary:h,padding:c,flipVariations:g,allowedAutoPlacements:v}):ne)},[]),P=t.rects.reference,k=t.rects.popper,N=new Map,D=!0,z=T[0],A=0;A=0,te=K?"width":"height",oe=wd(t,{placement:Y,boundary:f,rootBoundary:h,altBoundary:p,padding:c}),se=K?ee?ii:Sr:ee?ri:xr;P[te]>k[te]&&(se=hm(se));var Z=hm(se),$=[];if(o&&$.push(oe[q]<=0),a&&$.push(oe[se]<=0,oe[Z]<=0),$.every(function(G){return G})){z=Y,D=!1;break}N.set(Y,$)}if(D)for(var I=g?3:1,B=function(ne){var ae=T.find(function(me){var O=N.get(me);if(O)return O.slice(0,ne).every(function(R){return R})});if(ae)return z=ae,"break"},re=I;re>0;re--){var W=B(re);if(W==="break")break}t.placement!==z&&(t.modifiersData[r]._skip=!0,t.placement=z,t.reset=!0)}}const Mte={name:"flip",enabled:!0,phase:"main",fn:kte,requiresIfExists:["offset"],data:{_skip:!1}};function m3(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 g3(e){return[xr,ii,ri,Sr].some(function(t){return e[t]>=0})}function Rte(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=wd(t,{elementContext:"reference"}),a=wd(t,{altBoundary:!0}),l=m3(s,r),c=m3(a,i,o),f=g3(l),h=g3(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:f,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":h})}const Nte={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Rte};function Lte(e,t,n){var r=Qi(e),i=[Sr,xr].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*i,[Sr,ii].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}function Dte(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,s=Z6.reduce(function(f,h){return f[h]=Lte(h,t.rects,o),f},{}),a=s[t.placement],l=a.x,c=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=s}const Ate={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Dte};function Ite(e){var t=e.state,n=e.name;t.modifiersData[n]=n5({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Fte={name:"popperOffsets",enabled:!0,phase:"read",fn:Ite,data:{}};function $te(e){return e==="x"?"y":"x"}function jte(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!1:s,l=n.boundary,c=n.rootBoundary,f=n.altBoundary,h=n.padding,p=n.tether,m=p===void 0?!0:p,g=n.tetherOffset,v=g===void 0?0:g,w=wd(t,{boundary:l,rootBoundary:c,padding:h,altBoundary:f}),y=Qi(t.placement),b=Vc(t.placement),x=!b,T=UC(y),P=$te(T),k=t.modifiersData.popperOffsets,N=t.rects.reference,D=t.rects.popper,z=typeof v=="function"?v(Object.assign({},t.rects,{placement:t.placement})):v,A=typeof z=="number"?{mainAxis:z,altAxis:z}:Object.assign({mainAxis:0,altAxis:0},z),Y=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,q={x:0,y:0};if(k){if(o){var ee,K=T==="y"?xr:Sr,te=T==="y"?ri:ii,oe=T==="y"?"height":"width",se=k[T],Z=se+w[K],$=se-w[te],I=m?-D[oe]/2:0,B=b===Bc?N[oe]:D[oe],re=b===Bc?-D[oe]:-N[oe],W=t.elements.arrow,G=m&&W?zC(W):{width:0,height:0},ne=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Q6(),ae=ne[K],me=ne[te],O=Pf(0,N[oe],G[oe]),R=x?N[oe]/2-I-O-ae-A.mainAxis:B-O-ae-A.mainAxis,F=x?-N[oe]/2+I+O+me+A.mainAxis:re+O+me+A.mainAxis,Q=t.elements.arrow&&Xd(t.elements.arrow),X=Q?T==="y"?Q.clientTop||0:Q.clientLeft||0:0,le=(ee=Y==null?void 0:Y[T])!=null?ee:0,ve=se+R-le-X,De=se+F-le,fe=Pf(m?iv(Z,ve):Z,se,m?Ha($,De):$);k[T]=fe,q[T]=fe-se}if(a){var ye,be=T==="x"?xr:Sr,Oe=T==="x"?ri:ii,Ae=k[P],Ne=P==="y"?"height":"width",Le=Ae+w[be],ue=Ae-w[Oe],he=[xr,Sr].indexOf(y)!==-1,we=(ye=Y==null?void 0:Y[P])!=null?ye:0,_e=he?Le:Ae-N[Ne]-D[Ne]-we+A.altAxis,Ee=he?Ae+N[Ne]+D[Ne]-we-A.altAxis:ue,Me=m&&he?cte(_e,Ae,Ee):Pf(m?_e:Le,Ae,m?Ee:ue);k[P]=Me,q[P]=Me-Ae}t.modifiersData[r]=q}}const Bte={name:"preventOverflow",enabled:!0,phase:"main",fn:jte,requiresIfExists:["offset"]};function zte(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Ute(e){return e===si(e)||!Qr(e)?VC(e):zte(e)}function Vte(e){var t=e.getBoundingClientRect(),n=zc(t.width)/e.offsetWidth||1,r=zc(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Hte(e,t,n){n===void 0&&(n=!1);var r=Qr(t),i=Qr(t)&&Vte(t),o=na(t),s=Uc(e,i,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((no(t)!=="body"||WC(o))&&(a=Ute(t)),Qr(t)?(l=Uc(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=HC(o))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function Wte(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(a){if(!n.has(a)){var l=t.get(a);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function Yte(e){var t=Wte(e);return rte.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function qte(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Gte(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 v3={placement:"bottom",modifiers:[],strategy:"absolute"};function y3(){for(var e=arguments.length,t=new Array(e),n=0;n=0)&&(n[i]=e[i]);return n}function Ze(e,t){if(e==null)return{};var n=cne(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 une(){let e=document.createElement("div");e.style.position="absolute",e.style.top="-9999px",e.style.width="50px",e.style.height="50px",e.style.overflow="scroll",document.body.appendChild(e);const t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}function YC(e){document.body.style.paddingRight=e>0?`${e}px`:null}function fne(){return document.body.clientWidtht[n]||n).join(" "):e}function Tr(e,t){const n={};return Object.keys(e).forEach(r=>{t.indexOf(r)===-1&&(n[r]=e[r])}),n}function c5(e,t){const n=Array.isArray(t)?t:[t];let{length:r}=n,i;const o={};for(;r>0;)r-=1,i=n[r],o[i]=e[i];return o}let w3={};function Yw(e){w3[e]||(typeof console<"u"&&console.error(e),w3[e]=!0)}function u5(e,t){return function(r,i,o,...s){return r[i]!==null&&typeof r[i]<"u"&&Yw(`"${i}" property of "${o}" has been deprecated. +${t}`),e(r,i,o,...s)}}const hne=typeof window=="object"&&window.Element||function(){};function qC(e,t,n){if(!(e[t]instanceof hne))return new Error("Invalid prop `"+t+"` supplied to `"+n+"`. Expected prop to be an instance of Element. Validation failed.")}const Vs=S.oneOfType([S.string,S.func,qC,S.shape({current:S.any})]),ke=S.oneOfType([S.func,S.string,S.shape({$$typeof:S.symbol,render:S.func}),S.arrayOf(S.oneOfType([S.func,S.string,S.shape({$$typeof:S.symbol,render:S.func})]))]),il={Fade:150,Collapse:350,Modal:300,Carousel:600,Offcanvas:300},ov=["in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","onEnter","onEntering","onEntered","onExit","onExiting","onExited"],yo={ENTERING:"entering",ENTERED:"entered",EXITING:"exiting",EXITED:"exited"},mt={esc:27,space:32,enter:13,tab:9,up:38,down:40,home:36,end:35,n:78,p:80},pne=["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"],GC=!!(typeof window<"u"&&window.document&&window.document.createElement);function mne(e){return e&&typeof e=="object"?"current"in e:!1}function f5(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}function sv(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")}function x3(e){const t=typeof e,n=0/0;if(t==="number")return e;if(t==="symbol"||t==="object"&&f5(e)==="[object Symbol]")return n;if(sv(e)){const i=typeof e.valueOf=="function"?e.valueOf():e;e=sv(i)?`${i}`:i}if(t!=="string")return e===0?e:+e;e=e.replace(/^\s+|\s+$/g,"");const r=/^0b[01]+$/i.test(e);return r||/^0o[0-7]+$/i.test(e)?parseInt(e.slice(2),r?2:8):/^[-+]0x[0-9a-f]+$/i.test(e)?n:+e}function gne(e){if(!sv(e))return!1;const t=f5(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object Proxy]"}function d5(e){if(mne(e))return e.current;if(gne(e))return e();if(typeof e=="string"&&GC){let t=document.querySelectorAll(e);if(t.length||(t=document.querySelectorAll(`#${e}`)),!t.length)throw new Error(`The target '${e}' could not be identified in the dom, tip: check spelling`);return t}return e}function av(e){return e===null?!1:Array.isArray(e)||GC&&typeof e.length=="number"}function Hc(e,t){const n=d5(e);return t?av(n)?n:n===null?[]:[n]:av(n)?n[0]:n}const vne=["touchstart","click"];function yne(e,t,n,r){let i=e;av(i)||(i=[i]);let o=n;if(typeof o=="string"&&(o=o.split(/\s+/)),!av(i)||typeof t!="function"||!Array.isArray(o))throw new Error(` The first argument of this function must be DOM node or an array on DOM nodes or NodeList. The second must be a function. The third is a string or an array of strings that represents DOM events - `);return Array.prototype.forEach.call(o,s=>{Array.prototype.forEach.call(i,a=>{a.addEventListener(s,t,r)})}),function(){Array.prototype.forEach.call(o,a=>{Array.prototype.forEach.call(i,l=>{l.removeEventListener(a,t,r)})})}}const s5=["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"])'];S.oneOfType([S.bool,S.string]),S.string,S.object;const une=["className","cssModule","noGutters","tag","widths"],fne=["xs","sm","md","lg","xl","xxl"],Dl=S.oneOfType([S.number,S.string]),dne={tag:ke,noGutters:r5(S.bool,"Please use Bootstrap 5 gutter utility classes. https://getbootstrap.com/docs/5.0/layout/gutters/"),className:S.string,cssModule:S.object,xs:Dl,sm:Dl,md:Dl,lg:Dl,xl:Dl,xxl:Dl,widths:S.array},hne={tag:"div",widths:fne};function Jn(e){const{className:t,cssModule:n,noGutters:r,tag:i,widths:o}=e,s=Ze(e,une),a=[];o.forEach((c,f)=>{let h=e[c];if(delete s[c],!h)return;const p=!f;a.push(p?`row-cols-${h}`:`row-cols-${c}-${h}`)});const l=je(ge(t,r?"gx-0":null,"row",a),n);return V.createElement(i,Be({},s,{className:l}))}Jn.propTypes=dne;Jn.defaultProps=hne;const pne=["className","cssModule","widths","tag"],a5=["xs","sm","md","lg","xl","xxl"],b3=S.oneOfType([S.number,S.string]),Al=S.oneOfType([S.bool,S.number,S.string,S.shape({size:S.oneOfType([S.bool,S.number,S.string]),order:b3,offset:b3})]),mne={tag:ke,xs:Al,sm:Al,md:Al,lg:Al,xl:Al,xxl:Al,className:S.string,cssModule:S.object,widths:S.array},gne={tag:"div",widths:a5},w3=(e,t,n)=>n===!0||n===""?e?"col":`col-${t}`:n==="auto"?e?"col-auto":`col-${t}-auto`:e?`col-${n}`:`col-${t}-${n}`,vne=(e,t,n=a5)=>{const r=e,i=[];return n.forEach((o,s)=>{let a=r[o];if(delete r[o],!a&&a!=="")return;const l=!s;if(ov(a)){const c=l?"-":`-${o}-`,f=w3(l,o,a.size);i.push(je(ge({[f]:a.size||a.size==="",[`order${c}${a.order}`]:a.order||a.order===0,[`offset${c}${a.offset}`]:a.offset||a.offset===0}),t))}else{const c=w3(l,o,a);i.push(c)}}),{colClasses:i,modifiedAttributes:r}};function qC(e){const{className:t,cssModule:n,widths:r,tag:i}=e,o=Ze(e,pne);let{modifiedAttributes:s,colClasses:a}=vne(o,n,r);a.length||a.push("col");const l=je(ge(t,a),n);return V.createElement(i,Be({},s,{className:l}))}qC.propTypes=mne;qC.defaultProps=gne;const yne=["expand","className","cssModule","light","dark","fixed","sticky","color","container","tag","children"],_ne={children:S.node,className:S.string,color:S.string,container:S.oneOfType([S.bool,S.string]),cssModule:S.object,dark:S.bool,expand:S.oneOfType([S.bool,S.string]),fixed:S.string,full:S.bool,light:S.bool,role:S.string,sticky:S.string,tag:ke},bne={tag:"nav",expand:!1,container:"fluid"},wne=e=>e===!1?!1:e===!0||e==="xs"?"navbar-expand":`navbar-expand-${e}`;function GC(e){const{expand:t,className:n,cssModule:r,light:i,dark:o,fixed:s,sticky:a,color:l,container:c,tag:f,children:h}=e,p=Ze(e,yne),m=je(ge(n,"navbar",wne(t),{"navbar-light":i,"navbar-dark":o,[`bg-${l}`]:l,[`fixed-${s}`]:s,[`sticky-${a}`]:a}),r),g=c&&c===!0?"container":`container-${c}`;return V.createElement(f,Be({},p,{className:m}),c?V.createElement("div",{className:g},h):h)}GC.propTypes=_ne;GC.defaultProps=bne;const xne=["className","cssModule","tag"],Sne={className:S.string,cssModule:S.object,tag:ke},Cne={tag:"a"};function ZC(e){const{className:t,cssModule:n,tag:r}=e,i=Ze(e,xne),o=je(ge(t,"navbar-brand"),n);return V.createElement(r,Be({},i,{className:o}))}ZC.propTypes=Sne;ZC.defaultProps=Cne;S.string,S.object,S.bool;const Ene=["className","cssModule","children","tag"],Tne={className:S.string,cssModule:S.object,tag:ke,type:S.string,children:S.node},One={tag:"button",type:"button"};function KC(e){const{className:t,cssModule:n,children:r,tag:i}=e,o=Ze(e,Ene),s=je(ge(t,"navbar-toggler"),n);return V.createElement(i,Be({"aria-label":"Toggle navigation"},o,{className:s}),r||V.createElement("span",{className:je("navbar-toggler-icon",n)}))}KC.propTypes=Tne;KC.defaultProps=One;const Pne=["className","cssModule","tabs","pills","vertical","horizontal","justified","fill","navbar","card","tag"],kne={card:S.bool,className:S.string,cssModule:S.object,fill:S.bool,horizontal:S.oneOf(["center","end"]),justified:S.bool,navbar:S.bool,pills:S.bool,tabs:S.bool,tag:ke,vertical:S.oneOfType([S.bool,S.string])},Mne={tag:"ul",vertical:!1},Rne=e=>e===!1?!1:e===!0||e==="xs"?"flex-column":`flex-${e}-column`;function p_(e){const{className:t,cssModule:n,tabs:r,pills:i,vertical:o,horizontal:s,justified:a,fill:l,navbar:c,card:f,tag:h}=e,p=Ze(e,Pne),m=je(ge(t,c?"navbar-nav":"nav",s?`justify-content-${s}`:!1,Rne(o),{"nav-tabs":r,"card-header-tabs":f&&r,"nav-pills":i,"card-header-pills":f&&i,"nav-justified":a,"nav-fill":l}),n);return V.createElement(h,Be({},p,{className:m}))}p_.propTypes=kne;p_.defaultProps=Mne;const Nne=["className","cssModule","active","tag"],Lne={active:S.bool,className:S.string,cssModule:S.object,tag:ke},Dne={tag:"li"};function XC(e){const{className:t,cssModule:n,active:r,tag:i}=e,o=Ze(e,Nne),s=je(ge(t,"nav-item",r?"active":!1),n);return V.createElement(i,Be({},o,{className:s}))}XC.propTypes=Lne;XC.defaultProps=Dne;const Ane=["className","cssModule","active","tag","innerRef"],Ine={active:S.bool,className:S.string,cssModule:S.object,disabled:S.bool,href:S.any,innerRef:S.oneOfType([S.object,S.func,S.string]),onClick:S.func,tag:ke},Fne={tag:"a"};class QC extends V.Component{constructor(t){super(t),this.onClick=this.onClick.bind(this)}onClick(t){if(this.props.disabled){t.preventDefault();return}this.props.href==="#"&&t.preventDefault(),this.props.onClick&&this.props.onClick(t)}render(){let t=this.props,{className:n,cssModule:r,active:i,tag:o,innerRef:s}=t,a=Ze(t,Ane);const l=je(ge(n,"nav-link",{disabled:a.disabled,active:i}),r);return V.createElement(o,Be({},a,{ref:s,onClick:this.onClick,className:l}))}}QC.propTypes=Ine;QC.defaultProps=Fne;var l5=QC;S.string,S.node,S.string,S.object,S.string;S.bool,S.string,S.object;const $ne=["className","cssModule","variant","innerRef"],jne={active:S.bool,"aria-label":S.string,onClick:S.func,variant:S.oneOf(["white"]),className:S.string,cssModule:S.object,innerRef:S.oneOfType([S.object,S.string,S.func])},Bne={"aria-label":"close"};function JC(e){const{className:t,cssModule:n,variant:r,innerRef:i}=e,o=Ze(e,$ne),s=je(ge(t,"btn-close",r&&`btn-close-${r}`));return V.createElement("button",Be({ref:i,type:"button",className:s},o))}JC.propTypes=jne;JC.defaultProps=Bne;const zne=["active","aria-label","block","className","close","cssModule","color","outline","size","tag","innerRef"],Une={active:S.bool,"aria-label":S.string,block:S.bool,children:S.node,className:S.string,cssModule:S.object,close:S.bool,color:S.string,disabled:S.bool,innerRef:S.oneOfType([S.object,S.func,S.string]),onClick:S.func,outline:S.bool,size:S.string,tag:ke},Vne={color:"secondary",tag:"button"};function ht(e){const t=H.useCallback(w=>{if(e.disabled){w.preventDefault();return}if(e.onClick)return e.onClick(w)},[e.onClick,e.disabled]);let{active:n,"aria-label":r,block:i,className:o,close:s,cssModule:a,color:l,outline:c,size:f,tag:h,innerRef:p}=e,m=Ze(e,zne);if(s)return V.createElement(JC,m);const g=`btn${c?"-outline":""}-${l}`,v=je(ge(o,"btn",g,f?`btn-${f}`:!1,i?"d-block w-100":!1,{active:n,disabled:e.disabled}),a);return m.href&&h==="button"&&(h="a"),V.createElement(h,Be({type:h==="button"&&m.onClick?"button":void 0},m,{className:v,ref:p,onClick:t,"aria-label":r}))}ht.propTypes=Une;ht.defaultProps=Vne;S.func,S.func,S.func,S.bool,S.string,S.object;const xd=V.createContext({}),c5=V.createContext({}),Hne=["className","cssModule","direction","isOpen","group","size","nav","setActiveFromChild","active","tag","menuRole"],Wne={a11y:S.bool,disabled:S.bool,direction:S.oneOf(["up","down","start","end","left","right"]),group:S.bool,isOpen:S.bool,nav:S.bool,active:S.bool,size:S.string,tag:ke,toggle:S.func,children:S.node,className:S.string,cssModule:S.object,dropup:S.bool,inNavbar:S.bool,setActiveFromChild:S.bool,menuRole:S.oneOf(["listbox","menu"])},Yne={a11y:!0,isOpen:!1,direction:"down",nav:!1,active:!1,inNavbar:!1,setActiveFromChild:!1},qne=[mt.space,mt.enter,mt.up,mt.down,mt.end,mt.home];class m_ extends V.Component{constructor(t){super(t),this.addEvents=this.addEvents.bind(this),this.handleDocumentClick=this.handleDocumentClick.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.removeEvents=this.removeEvents.bind(this),this.toggle=this.toggle.bind(this),this.handleMenuRef=this.handleMenuRef.bind(this),this.handleToggleRef=this.handleToggleRef.bind(this),this.containerRef=V.createRef(),this.menuRef=V.createRef(),this.toggleRef=V.createRef()}componentDidMount(){this.handleProps()}componentDidUpdate(t){this.props.isOpen!==t.isOpen&&this.handleProps()}componentWillUnmount(){this.removeEvents()}handleMenuRef(t){this.menuRef.current=t}handleToggleRef(t){this.toggleRef.current=t}handleDocumentClick(t){if(t&&(t.which===3||t.type==="keyup"&&t.which!==mt.tab))return;const n=this.getContainer(),r=this.getMenu(),i=this.getToggle(),o=t.target===i,s=r&&r.contains(t.target)&&r!==t.target;let a=!1;n&&(a=n.classList.contains("input-group")&&n.classList.contains("dropdown")&&t.target.tagName==="INPUT"),!((o&&!a||s)&&(t.type!=="keyup"||t.which===mt.tab))&&this.toggle(t)}handleKeyDown(t){const n=t.target.getAttribute("role")==="menuitem"||t.target.getAttribute("role")==="option",r=this.getMenuCtrl()===t.target,i=mt.tab===t.which;if(!(/input|textarea/i.test(t.target.tagName)||i&&!this.props.a11y||i&&!(n||r))&&((qne.indexOf(t.which)!==-1||t.which>=48&&t.which<=90)&&t.preventDefault(),!this.props.disabled&&(r&&([mt.space,mt.enter,mt.up,mt.down].indexOf(t.which)>-1?(this.props.isOpen||this.toggle(t),setTimeout(()=>this.getMenuItems()[0].focus())):this.props.isOpen&&i?(t.preventDefault(),this.getMenuItems()[0].focus()):this.props.isOpen&&t.which===mt.esc&&this.toggle(t)),this.props.isOpen&&n))){if([mt.tab,mt.esc].indexOf(t.which)>-1)this.toggle(t),this.getMenuCtrl().focus();else if([mt.space,mt.enter].indexOf(t.which)>-1)t.target.click(),this.getMenuCtrl().focus();else if([mt.down,mt.up].indexOf(t.which)>-1||[mt.n,mt.p].indexOf(t.which)>-1&&t.ctrlKey){const o=this.getMenuItems();let s=o.indexOf(t.target);mt.up===t.which||mt.p===t.which&&t.ctrlKey?s=s!==0?s-1:o.length-1:(mt.down===t.which||mt.n===t.which&&t.ctrlKey)&&(s=s===o.length-1?0:s+1),o[s].focus()}else if(mt.end===t.which){const o=this.getMenuItems();o[o.length-1].focus()}else if(mt.home===t.which)this.getMenuItems()[0].focus();else if(t.which>=48&&t.which<=90){const o=this.getMenuItems(),s=String.fromCharCode(t.which).toLowerCase();for(let a=0;adocument.addEventListener(t,this.handleDocumentClick,!0))}removeEvents(){["click","touchstart","keyup"].forEach(t=>document.removeEventListener(t,this.handleDocumentClick,!0))}toggle(t){return this.props.disabled?t&&t.preventDefault():this.props.toggle(t)}render(){const t=Tr(this.props,["toggle","disabled","inNavbar","a11y"]),{className:n,cssModule:r,direction:i,isOpen:o,group:s,size:a,nav:l,setActiveFromChild:c,active:f,tag:h,menuRole:p}=t,m=Ze(t,Hne),g=h||(l?"li":"div");let v=!1;c&&V.Children.map(this.props.children[1].props.children,y=>{y&&y.props.active&&(v=!0)});const w=je(ge(n,l&&f?"active":!1,c&&v?"active":!1,{"btn-group":s,[`btn-group-${a}`]:!!a,dropdown:!s,dropup:i==="up",dropstart:i==="start"||i==="left",dropend:i==="end"||i==="right",show:o,"nav-item":l}),r);return this.context.insideInputGroup?V.createElement(xd.Provider,{value:this.getContextValue()},V.createElement(i3,null,V.Children.map(this.props.children,y=>V.cloneElement(y,{onKeyDown:this.handleKeyDown})))):V.createElement(xd.Provider,{value:this.getContextValue()},V.createElement(i3,null,V.createElement(g,Be({},m,{[typeof g=="string"?"ref":"innerRef"]:this.containerRef,onKeyDown:this.handleKeyDown,className:w}))))}}m_.propTypes=Wne;m_.defaultProps=Yne;m_.contextType=c5;var ru=m_;const Gne={children:S.node};function g_(e){return V.createElement(ru,Be({group:!0},e))}g_.propTypes=Gne;S.string,S.string,S.object,S.string,S.string,S.bool;S.string,S.string,S.object,S.string;const Zne=["className","cssModule","divider","tag","header","active","text"],Kne={children:S.node,active:S.bool,disabled:S.bool,divider:S.bool,tag:ke,header:S.bool,onClick:S.func,className:S.string,cssModule:S.object,toggle:S.bool,text:S.bool},Xne={tag:"button",toggle:!0};class v_ extends V.Component{constructor(t){super(t),this.onClick=this.onClick.bind(this),this.getTabIndex=this.getTabIndex.bind(this)}onClick(t){const{disabled:n,header:r,divider:i,text:o}=this.props;if(n||r||i||o){t.preventDefault();return}this.props.onClick&&this.props.onClick(t),this.props.toggle&&this.context.toggle(t)}getRole(){return this.context.menuRole==="listbox"?"option":"menuitem"}getTabIndex(){const{disabled:t,header:n,divider:r,text:i}=this.props;return t||n||r||i?"-1":"0"}render(){const t=this.getTabIndex(),n=t>-1?this.getRole():void 0;let r=Tr(this.props,["toggle"]),{className:i,cssModule:o,divider:s,tag:a,header:l,active:c,text:f}=r,h=Ze(r,Zne);const p=je(ge(i,{disabled:h.disabled,"dropdown-item":!s&&!l&&!f,active:c,"dropdown-header":l,"dropdown-divider":s,"dropdown-item-text":f}),o);return a==="button"&&(l?a="h6":s?a="div":h.href?a="a":f&&(a="span")),V.createElement(a,Be({type:a==="button"&&(h.onClick||this.props.toggle)?"button":void 0},h,{tabIndex:t,role:n,className:p,onClick:this.onClick}))}}v_.propTypes=Kne;v_.defaultProps=Xne;v_.contextType=xd;var Ve=v_;const Qne=["className","cssModule","dark","end","right","tag","flip","modifiers","persist","strategy","container","updateOnSelect"],Jne={tag:ke,children:S.node.isRequired,dark:S.bool,end:S.bool,flip:S.bool,modifiers:S.array,className:S.string,cssModule:S.object,style:S.object,persist:S.bool,strategy:S.string,container:Vs,updateOnSelect:S.bool,right:r5(S.bool,'Please use "end" instead.')},ere={tag:"div",flip:!0,modifiers:[]},tre={up:"top",left:"left",right:"right",start:"left",end:"right",down:"bottom"};class y_ extends V.Component{getRole(){return this.context.menuRole==="listbox"?"listbox":"menu"}render(){const t=this.props,{className:n,cssModule:r,dark:i,end:o,right:s,tag:a,flip:l,modifiers:c,persist:f,strategy:h,container:p,updateOnSelect:m}=t,g=Ze(t,Qne),v=je(ge(n,"dropdown-menu",{"dropdown-menu-dark":i,"dropdown-menu-end":o||s,show:this.context.isOpen}),r),w=a;if(f||this.context.isOpen&&!this.context.inNavbar){const T=`${tre[this.context.direction]||"bottom"}-${o||s?"end":"start"}`,P=[...c,{name:"flip",enabled:!!l}],k=V.createElement(Q6,{placement:T,modifiers:P,strategy:h},({ref:N,style:D,placement:z,update:A})=>{let Y=qe(qe({},this.props.style),D);const q=ee=>{N(ee);const{onMenuRef:K}=this.context;K&&K(ee)};return V.createElement(w,Be({tabIndex:"-1",role:this.getRole(),ref:q},g,{style:Y,"aria-hidden":!this.context.isOpen,className:v,"data-popper-placement":z,onClick:()=>m&&A()}))});return p?Ua.createPortal(k,Uc(p)):k}const{onMenuRef:y}=this.context;return V.createElement(w,Be({tabIndex:"-1",role:this.getRole()},g,{ref:y,"aria-hidden":!this.context.isOpen,className:v,"data-popper-placement":g.placement}))}}y_.propTypes=Jne;y_.defaultProps=ere;y_.contextType=xd;var gl=y_;const nre=["className","color","cssModule","caret","split","nav","tag","innerRef"],rre={caret:S.bool,color:S.string,children:S.node,className:S.string,cssModule:S.object,disabled:S.bool,onClick:S.func,"aria-haspopup":S.bool,split:S.bool,tag:ke,nav:S.bool,innerRef:S.oneOfType([S.object,S.string,S.func])},ire={color:"secondary","aria-haspopup":!0};class __ extends V.Component{constructor(t){super(t),this.onClick=this.onClick.bind(this)}onClick(t){if(this.props.disabled||this.context.disabled){t.preventDefault();return}this.props.nav&&!this.props.tag&&t.preventDefault(),this.props.onClick&&this.props.onClick(t),this.context.toggle(t)}getRole(){return this.context.menuRole||this.props["aria-haspopup"]}render(){const t=this.props,{className:n,color:r,cssModule:i,caret:o,split:s,nav:a,tag:l,innerRef:c}=t,f=Ze(t,nre),h=f["aria-label"]||"Toggle Dropdown",p=je(ge(n,{"dropdown-toggle":o||s,"dropdown-toggle-split":s,"nav-link":a}),i),m=typeof f.children<"u"?f.children:V.createElement("span",{className:"visually-hidden"},h);let g;return a&&!l?(g="a",f.href="#"):l?g=l:(g=ht,f.color=r,f.cssModule=i),this.context.inNavbar?V.createElement(g,Be({},f,{className:p,onClick:this.onClick,ref:this.context.onToggleRef,"aria-expanded":this.context.isOpen,"aria-haspopup":this.getRole(),children:m})):V.createElement(Xte,{innerRef:c},({ref:v})=>{const w=y=>{v(y);const{onToggleRef:b}=this.context;b&&b(y)};return V.createElement(g,Be({},f,{[typeof g=="string"?"ref":"innerRef"]:w,className:p,onClick:this.onClick,"aria-expanded":this.context.isOpen,"aria-haspopup":this.getRole(),children:m}))})}}__.propTypes=rre;__.defaultProps=ire;__.contextType=xd;var iu=__;const ore=["tag","baseClass","baseClassActive","className","cssModule","children","innerRef"],sre=qe(qe({},Vo.propTypes),{},{children:S.oneOfType([S.arrayOf(S.node),S.node]),tag:ke,baseClass:S.string,baseClassActive:S.string,className:S.string,cssModule:S.object,innerRef:S.oneOfType([S.object,S.string,S.func])}),are=qe(qe({},Vo.defaultProps),{},{tag:"div",baseClass:"fade",baseClassActive:"show",timeout:il.Fade,appear:!0,enter:!0,exit:!0,in:!0});function Xt(e){const{tag:t,baseClass:n,baseClassActive:r,className:i,cssModule:o,children:s,innerRef:a}=e,l=Ze(e,ore),c=n5(l,iv),f=Tr(l,iv);return V.createElement(Vo,c,h=>{const m=je(ge(i,n,h==="entered"&&r),o);return V.createElement(t,Be({className:m},f,{ref:a}),s)})}Xt.propTypes=sre;Xt.defaultProps=are;V.createContext({});S.node,S.string,S.object,S.bool,S.oneOfType([S.object,S.string,S.func]),S.oneOfType([S.array,S.string]).isRequired,S.func.isRequired;S.string,S.object,S.oneOfType([S.object,S.string,S.func]),S.node,S.oneOfType([S.array,S.string]),S.bool;S.node,S.string,S.object,S.oneOfType([S.object,S.string,S.func]),S.string.isRequired;S.node,S.string,S.object,S.oneOfType([S.object,S.string,S.func]);const lre=["tag","horizontal","isOpen","className","navbar","cssModule","children","innerRef"],cre=qe(qe({},Vo.propTypes),{},{horizontal:S.bool,isOpen:S.bool,children:S.oneOfType([S.arrayOf(S.node),S.node]),tag:ke,className:S.node,navbar:S.bool,cssModule:S.object,innerRef:S.shape({current:S.object})}),ure=qe(qe({},Vo.defaultProps),{},{horizontal:!1,isOpen:!1,appear:!1,enter:!0,exit:!0,tag:"div",timeout:il.Collapse}),fre={[yo.ENTERING]:"collapsing",[yo.ENTERED]:"collapse show",[yo.EXITING]:"collapsing",[yo.EXITED]:"collapse"};function dre(e){return fre[e]||"collapse"}class eE extends H.Component{constructor(t){super(t),this.state={dimension:null},this.nodeRef=t.innerRef||V.createRef(),["onEntering","onEntered","onExit","onExiting","onExited"].forEach(n=>{this[n]=this[n].bind(this)})}onEntering(t,n){const r=this.getNode();this.setState({dimension:this.getDimension(r)}),this.props.onEntering(r,n)}onEntered(t,n){const r=this.getNode();this.setState({dimension:null}),this.props.onEntered(r,n)}onExit(){const t=this.getNode();this.setState({dimension:this.getDimension(t)}),this.props.onExit(t)}onExiting(){const t=this.getNode();this.getDimension(t),this.setState({dimension:0}),this.props.onExiting(t)}onExited(){const t=this.getNode();this.setState({dimension:null}),this.props.onExited(t)}getNode(){return this.nodeRef.current}getDimension(t){return this.props.horizontal?t.scrollWidth:t.scrollHeight}render(){const t=this.props,{tag:n,horizontal:r,isOpen:i,className:o,navbar:s,cssModule:a,children:l,innerRef:c}=t,f=Ze(t,lre),{dimension:h}=this.state,p=n5(f,iv),m=Tr(f,iv);return V.createElement(Vo,Be({},p,{in:i,nodeRef:this.nodeRef,onEntering:this.onEntering,onEntered:this.onEntered,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}),g=>{let v=dre(g);const w=je(ge(o,r&&"collapse-horizontal",v,s&&"navbar-collapse"),a),y=h===null?null:{[r?"width":"height"]:h};return V.createElement(n,Be({},m,{style:qe(qe({},m.style),y),className:w,ref:this.nodeRef}),l)})}}eE.propTypes=cre;eE.defaultProps=ure;var u5=eE;S.string.isRequired,S.string,S.node,S.object,S.oneOfType([S.object,S.string,S.func]);S.node,S.string,S.string,S.object,S.oneOfType([S.object,S.func,S.string]),S.bool;const hre=["className","cssModule","color","body","inverse","outline","tag","innerRef"],pre={body:S.bool,className:S.string,color:S.string,cssModule:S.object,innerRef:S.oneOfType([S.object,S.string,S.func]),inverse:S.bool,outline:S.bool,tag:ke},mre={tag:"div"};function Er(e){const{className:t,cssModule:n,color:r,body:i,inverse:o,outline:s,tag:a,innerRef:l}=e,c=Ze(e,hre),f=je(ge(t,"card",o?"text-white":!1,i?"card-body":!1,r?`${s?"border":"bg"}-${r}`:!1),n);return V.createElement(a,Be({},c,{className:f,ref:l}))}Er.propTypes=pre;Er.defaultProps=mre;S.string,S.object;S.string,S.object;S.string,S.object;const gre=["className","cssModule","innerRef","tag"],vre={className:S.string,cssModule:S.object,innerRef:S.oneOfType([S.object,S.string,S.func]),tag:ke},yre={tag:"div"};function ol(e){const{className:t,cssModule:n,innerRef:r,tag:i}=e,o=Ze(e,gre),s=je(ge(t,"card-body"),n);return V.createElement(i,Be({},o,{className:s,ref:r}))}ol.propTypes=vre;ol.defaultProps=yre;S.oneOfType([S.object,S.func,S.string]),S.string,S.object;const _re=["className","cssModule","tag"],bre={className:S.string,cssModule:S.object,tag:ke},wre={tag:"div"};function tE(e){const{className:t,cssModule:n,tag:r}=e,i=Ze(e,_re),o=je(ge(t,"card-footer"),n);return V.createElement(r,Be({},i,{className:o}))}tE.propTypes=bre;tE.defaultProps=wre;const xre=["className","cssModule","tag"],Sre={className:S.string,cssModule:S.object,tag:ke},Cre={tag:"div"};function sl(e){const{className:t,cssModule:n,tag:r}=e,i=Ze(e,xre),o=je(ge(t,"card-header"),n);return V.createElement(r,Be({},i,{className:o}))}sl.propTypes=Sre;sl.defaultProps=Cre;S.bool,S.string,S.object,S.bool;S.string,S.object;const pm=V.createContext({}),Ere=["in","children","cssModule","slide","tag","className"];class b_ extends V.Component{constructor(t){super(t),this.state={startAnimation:!1},this.onEnter=this.onEnter.bind(this),this.onEntering=this.onEntering.bind(this),this.onExit=this.onExit.bind(this),this.onExiting=this.onExiting.bind(this),this.onExited=this.onExited.bind(this)}onEnter(t,n){this.setState({startAnimation:!1}),this.props.onEnter(t,n)}onEntering(t,n){const{offsetHeight:r}=t;return this.setState({startAnimation:!0}),this.props.onEntering(t,n),r}onExit(t){this.setState({startAnimation:!1}),this.props.onExit(t)}onExiting(t){this.setState({startAnimation:!0}),t.dispatchEvent(new CustomEvent("slide.bs.carousel")),this.props.onExiting(t)}onExited(t){t.dispatchEvent(new CustomEvent("slid.bs.carousel")),this.props.onExited(t)}render(){const t=this.props,{in:n,children:r,cssModule:i,slide:o,tag:s,className:a}=t,l=Ze(t,Ere);return V.createElement(Vo,Be({},l,{enter:o,exit:o,in:n,onEnter:this.onEnter,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}),c=>{const{direction:f}=this.context,h=c===yo.ENTERED||c===yo.EXITING,p=(c===yo.ENTERING||c===yo.EXITING)&&this.state.startAnimation&&(f==="end"?"carousel-item-start":"carousel-item-end"),m=c===yo.ENTERING&&(f==="end"?"carousel-item-next":"carousel-item-prev"),g=je(ge(a,"carousel-item",h&&"active",p,m),i);return V.createElement(s,{className:g},r)})}}b_.propTypes=qe(qe({},Vo.propTypes),{},{tag:ke,in:S.bool,cssModule:S.object,children:S.node,slide:S.bool,className:S.string});b_.defaultProps=qe(qe({},Vo.defaultProps),{},{tag:"div",timeout:il.Carousel,slide:!0});b_.contextType=pm;var f5=b_;const Tre=40,d5={activeIndex:S.number,next:S.func.isRequired,previous:S.func.isRequired,keyboard:S.bool,pause:S.oneOf(["hover",!1]),ride:S.oneOf(["carousel"]),interval:S.oneOfType([S.number,S.string,S.bool]),children:S.array,mouseEnter:S.func,mouseLeave:S.func,slide:S.bool,dark:S.bool,fade:S.bool,cssModule:S.object,className:S.string,enableTouch:S.bool},Ore=Object.keys(d5),Pre={interval:5e3,pause:"hover",keyboard:!0,slide:!0,enableTouch:!0,fade:!1};class nE extends V.Component{constructor(t){super(t),this.handleKeyPress=this.handleKeyPress.bind(this),this.renderItems=this.renderItems.bind(this),this.hoverStart=this.hoverStart.bind(this),this.hoverEnd=this.hoverEnd.bind(this),this.handleTouchStart=this.handleTouchStart.bind(this),this.handleTouchEnd=this.handleTouchEnd.bind(this),this.touchStartX=0,this.touchStartY=0,this.state={activeIndex:this.props.activeIndex,direction:"end",indicatorClicked:!1}}componentDidMount(){this.props.ride==="carousel"&&this.setInterval(),document.addEventListener("keyup",this.handleKeyPress)}static getDerivedStateFromProps(t,n){let r=null,{activeIndex:i,direction:o,indicatorClicked:s}=n;return t.activeIndex!==i&&(t.activeIndex===i+1?o="end":t.activeIndex===i-1?o="start":t.activeIndex{this.props.next()},parseInt(this.props.interval,10)))}clearInterval(){clearInterval(this.cycleInterval)}hoverStart(...t){this.props.pause==="hover"&&this.clearInterval(),this.props.mouseEnter&&this.props.mouseEnter(...t)}hoverEnd(...t){this.props.pause==="hover"&&this.setInterval(),this.props.mouseLeave&&this.props.mouseLeave(...t)}renderItems(t,n){const{slide:r}=this.props;return V.createElement("div",{className:n},t.map((i,o)=>{const s=o===this.state.activeIndex;return V.cloneElement(i,{in:s,slide:r})}))}render(){const{cssModule:t,slide:n,className:r,dark:i,fade:o}=this.props,s=Tr(this.props,Ore),a=je(ge(r,"carousel",o&&"carousel-fade",n&&"slide",i&&"carousel-dark"),t),l=je(ge("carousel-inner"),t),c=this.props.children.filter(y=>y!=null&&typeof y!="boolean");if(c.every(y=>y.type===f5))return V.createElement("div",Be({},s,{className:a,onMouseEnter:this.hoverStart,onMouseLeave:this.hoverEnd}),V.createElement(pm.Provider,{value:this.getContextValue()},this.renderItems(c,l)));if(c[0]instanceof Array){const y=c[0],b=c[1],x=c[2];return V.createElement("div",Be({},s,{className:a,onMouseEnter:this.hoverStart,onMouseLeave:this.hoverEnd}),V.createElement(pm.Provider,{value:this.getContextValue()},this.renderItems(y,l),b,x))}const h=c[0],p=y=>{typeof h.props.onClickHandler=="function"&&this.setState({indicatorClicked:!0},()=>h.props.onClickHandler(y))},m=V.cloneElement(h,{onClickHandler:p}),g=c[1],v=c[2],w=c[3];return V.createElement("div",Be({},s,{className:a,onMouseEnter:this.hoverStart,onMouseLeave:this.hoverEnd,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd}),V.createElement(pm.Provider,{value:this.getContextValue()},m,this.renderItems(g,l),v,w))}}nE.propTypes=d5;nE.defaultProps=Pre;var kre=nE;const Mre=["direction","onClickHandler","cssModule","directionText","className"];function Vw(e){const{direction:t,onClickHandler:n,cssModule:r,directionText:i,className:o}=e,s=Ze(e,Mre),a=je(ge(o,`carousel-control-${t}`),r),l=je(ge(`carousel-control-${t}-icon`),r),c=je(ge("visually-hidden"),r);return V.createElement("a",Be({},s,{className:a,style:{cursor:"pointer"},role:"button",tabIndex:"0",onClick:f=>{f.preventDefault(),n()}}),V.createElement("span",{className:l,"aria-hidden":"true"}),V.createElement("span",{className:c},i||t))}Vw.propTypes={direction:S.oneOf(["prev","next"]).isRequired,onClickHandler:S.func.isRequired,cssModule:S.object,directionText:S.string,className:S.string};const Rre=["items","activeIndex","cssModule","onClickHandler","className"];function h5(e){const{items:t,activeIndex:n,cssModule:r,onClickHandler:i,className:o}=e,s=Ze(e,Rre),a=je(ge(o,"carousel-indicators"),r),l=t.map((c,f)=>{const h=je(ge({active:n===f}),r);return V.createElement("button",{"aria-label":c.caption,"data-bs-target":!0,type:"button",key:`${c.key||Object.values(c).join("")}`,onClick:p=>{p.preventDefault(),i(f)},className:h})});return V.createElement("div",Be({className:a},s),l)}h5.propTypes={activeIndex:S.number.isRequired,className:S.string,cssModule:S.object,items:S.array.isRequired,onClickHandler:S.func.isRequired};function p5(e){const{captionHeader:t,captionText:n,cssModule:r,className:i}=e,o=je(ge(i,"carousel-caption","d-none","d-md-block"),r);return V.createElement("div",{className:o},V.createElement("h3",null,t),V.createElement("p",null,n))}p5.propTypes={captionHeader:S.node,captionText:S.node.isRequired,className:S.string,cssModule:S.object};const Nre=["defaultActiveIndex","autoPlay","indicators","controls","items","goToIndex"],Lre={items:S.array.isRequired,indicators:S.bool,controls:S.bool,autoPlay:S.bool,defaultActiveIndex:S.number,activeIndex:S.number,next:S.func,previous:S.func,goToIndex:S.func};class m5 extends H.Component{constructor(t){super(t),this.animating=!1,this.state={activeIndex:t.defaultActiveIndex||0},this.next=this.next.bind(this),this.previous=this.previous.bind(this),this.goToIndex=this.goToIndex.bind(this),this.onExiting=this.onExiting.bind(this),this.onExited=this.onExited.bind(this)}onExiting(){this.animating=!0}onExited(){this.animating=!1}next(){this.animating||this.setState(t=>({activeIndex:t.activeIndex===this.props.items.length-1?0:t.activeIndex+1}))}previous(){this.animating||this.setState(t=>({activeIndex:t.activeIndex===0?this.props.items.length-1:t.activeIndex-1}))}goToIndex(t){this.animating||this.setState({activeIndex:t})}render(){const t=this.props,{defaultActiveIndex:n,autoPlay:r,indicators:i,controls:o,items:s,goToIndex:a}=t,l=Ze(t,Nre),{activeIndex:c}=this.state,f=s.map(h=>{const p=h.key||h.src;return V.createElement(f5,{onExiting:this.onExiting,onExited:this.onExited,key:p},V.createElement("img",{className:"d-block w-100",src:h.src,alt:h.altText}),V.createElement(p5,{captionText:h.caption,captionHeader:h.header||h.caption}))});return V.createElement(kre,Be({activeIndex:c,next:this.next,previous:this.previous,ride:r?"carousel":void 0},l),i&&V.createElement(h5,{items:s,activeIndex:l.activeIndex||c,onClickHandler:a||this.goToIndex}),f,o&&V.createElement(Vw,{direction:"prev",directionText:"Previous",onClickHandler:l.previous||this.previous}),o&&V.createElement(Vw,{direction:"next",directionText:"Next",onClickHandler:l.next||this.next}))}}m5.propTypes=Lre;m5.defaultProps={controls:!0,indicators:!0,autoPlay:!0};S.string,S.object;const Dre=["className","cssModule","tag"],Are={className:S.string,cssModule:S.object,tag:ke},Ire={tag:"p"};function rE(e){const{className:t,cssModule:n,tag:r}=e,i=Ze(e,Dre),o=je(ge(t,"card-text"),n);return V.createElement(r,Be({},i,{className:o}))}rE.propTypes=Are;rE.defaultProps=Ire;const Fre=["className","cssModule","tag"],$re={className:S.string,cssModule:S.object,tag:ke},jre={tag:"div"};function iE(e){const{className:t,cssModule:n,tag:r}=e,i=Ze(e,Fre),o=je(ge(t,"card-title"),n);return V.createElement(r,Be({},i,{className:o}))}iE.propTypes=$re;iE.defaultProps=jre;const Bre=["cssModule","children","isOpen","flip","target","offset","fallbackPlacements","placementPrefix","arrowClassName","hideArrow","popperClassName","tag","container","modifiers","strategy","boundariesElement","onClosed","fade","transition","placement"];function zre(){}const Ure={children:S.oneOfType([S.node,S.func]).isRequired,popperClassName:S.string,placement:S.string,placementPrefix:S.string,arrowClassName:S.string,hideArrow:S.bool,tag:ke,isOpen:S.bool,cssModule:S.object,offset:S.arrayOf(S.number),fallbackPlacements:S.array,flip:S.bool,container:Vs,target:Vs.isRequired,modifiers:S.array,strategy:S.string,boundariesElement:S.oneOfType([S.string,WC]),onClosed:S.func,fade:S.bool,transition:S.shape(Xt.propTypes)},Vre={boundariesElement:"scrollParent",placement:"auto",hideArrow:!1,isOpen:!1,offset:[0,0],flip:!0,container:"body",modifiers:[],onClosed:zre,fade:!0,transition:qe({},Xt.defaultProps)};class oE extends V.Component{constructor(t){super(t),this.setTargetNode=this.setTargetNode.bind(this),this.getTargetNode=this.getTargetNode.bind(this),this.getRef=this.getRef.bind(this),this.onClosed=this.onClosed.bind(this),this.state={isOpen:t.isOpen}}static getDerivedStateFromProps(t,n){return t.isOpen&&!n.isOpen?{isOpen:t.isOpen}:null}componentDidUpdate(){this._element&&this._element.childNodes&&this._element.childNodes[0]&&this._element.childNodes[0].focus&&this._element.childNodes[0].focus()}onClosed(){this.props.onClosed(),this.setState({isOpen:!1})}getTargetNode(){return this.targetNode}getContainerNode(){return Uc(this.props.container)}getRef(t){this._element=t}setTargetNode(t){this.targetNode=typeof t=="string"?Uc(t):t}renderChildren(){const t=this.props,{cssModule:n,children:r,isOpen:i,flip:o,target:s,offset:a,fallbackPlacements:l,placementPrefix:c,arrowClassName:f,hideArrow:h,popperClassName:p,tag:m,container:g,modifiers:v,strategy:w,boundariesElement:y,onClosed:b,fade:x,transition:T,placement:P}=t,k=Ze(t,Bre),N=je(ge("arrow",f),n),D=je(ge(p,c?`${c}-auto`:""),this.props.cssModule),z=v.map(ee=>ee.name),Y=[...[{name:"offset",options:{offset:a}},{name:"flip",enabled:o,options:{fallbackPlacements:l}},{name:"preventOverflow",options:{boundary:y}}].filter(ee=>!z.includes(ee.name)),...v],q=qe(qe(qe({},Xt.defaultProps),T),{},{baseClass:x?T.baseClass:"",timeout:x?T.timeout:0});return V.createElement(Xt,Be({},q,k,{in:i,onExited:this.onClosed,tag:m}),V.createElement(Q6,{referenceElement:this.targetNode,modifiers:Y,placement:P,strategy:w},({ref:ee,style:K,placement:te,isReferenceHidden:oe,arrowProps:se,update:Z})=>V.createElement("div",{ref:ee,style:K,className:D,"data-popper-placement":te,"data-popper-reference-hidden":oe?"true":void 0},typeof r=="function"?r({update:Z}):r,!h&&V.createElement("span",{ref:se.ref,className:N,style:se.style}))))}render(){return this.setTargetNode(this.props.target),this.state.isOpen?this.props.container==="inline"?this.renderChildren():Ua.createPortal(V.createElement("div",{ref:this.getRef},this.renderChildren()),this.getContainerNode()):null}}oE.propTypes=Ure;oE.defaultProps=Vre;var Hre=oE;S.object.isRequired;Vs.isRequired;const w_={children:S.oneOfType([S.node,S.func]),placement:S.oneOf(one),target:Vs.isRequired,container:Vs,isOpen:S.bool,disabled:S.bool,hideArrow:S.bool,boundariesElement:S.oneOfType([S.string,WC]),className:S.string,innerClassName:S.string,arrowClassName:S.string,popperClassName:S.string,cssModule:S.object,toggle:S.func,autohide:S.bool,placementPrefix:S.string,delay:S.oneOfType([S.shape({show:S.number,hide:S.number}),S.number]),modifiers:S.array,strategy:S.string,offset:S.arrayOf(S.number),innerRef:S.oneOfType([S.func,S.string,S.object]),trigger:S.string,fade:S.bool,flip:S.bool},g5={show:0,hide:50},Wre={isOpen:!1,hideArrow:!1,autohide:!1,delay:g5,toggle:function(){},trigger:"click",fade:!0};function v5(e,t){return t&&(e===t||t.contains(e))}function x3(e,t=[]){return t&&t.length&&t.filter(n=>v5(e,n))[0]}class sE extends V.Component{constructor(t){super(t),this._targets=[],this.currentTargetElement=null,this.addTargetEvents=this.addTargetEvents.bind(this),this.handleDocumentClick=this.handleDocumentClick.bind(this),this.removeTargetEvents=this.removeTargetEvents.bind(this),this.toggle=this.toggle.bind(this),this.showWithDelay=this.showWithDelay.bind(this),this.hideWithDelay=this.hideWithDelay.bind(this),this.onMouseOverTooltipContent=this.onMouseOverTooltipContent.bind(this),this.onMouseLeaveTooltipContent=this.onMouseLeaveTooltipContent.bind(this),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.onEscKeyDown=this.onEscKeyDown.bind(this),this.getRef=this.getRef.bind(this),this.state={isOpen:t.isOpen},this._isMounted=!1}componentDidMount(){this._isMounted=!0,this.updateTarget()}componentWillUnmount(){this._isMounted=!1,this.removeTargetEvents(),this._targets=null,this.clearShowTimeout(),this.clearHideTimeout()}static getDerivedStateFromProps(t,n){return t.isOpen&&!n.isOpen?{isOpen:t.isOpen}:null}handleDocumentClick(t){const n=this.props.trigger.split(" ");n.indexOf("legacy")>-1&&(this.props.isOpen||x3(t.target,this._targets))?(this._hideTimeout&&this.clearHideTimeout(),this.props.isOpen&&!v5(t.target,this._popover)?this.hideWithDelay(t):this.props.isOpen||this.showWithDelay(t)):n.indexOf("click")>-1&&x3(t.target,this._targets)&&(this._hideTimeout&&this.clearHideTimeout(),this.props.isOpen?this.hideWithDelay(t):this.showWithDelay(t))}onMouseOverTooltipContent(){this.props.trigger.indexOf("hover")>-1&&!this.props.autohide&&(this._hideTimeout&&this.clearHideTimeout(),this.state.isOpen&&!this.props.isOpen&&this.toggle())}onMouseLeaveTooltipContent(t){this.props.trigger.indexOf("hover")>-1&&!this.props.autohide&&(this._showTimeout&&this.clearShowTimeout(),t.persist(),this._hideTimeout=setTimeout(this.hide.bind(this,t),this.getDelay("hide")))}onEscKeyDown(t){t.key==="Escape"&&this.hide(t)}getRef(t){const{innerRef:n}=this.props;n&&(typeof n=="function"?n(t):typeof n=="object"&&(n.current=t)),this._popover=t}getDelay(t){const{delay:n}=this.props;return typeof n=="object"?isNaN(n[t])?g5[t]:n[t]:n}getCurrentTarget(t){if(!t)return null;const n=this._targets.indexOf(t);return n>=0?this._targets[n]:this.getCurrentTarget(t.parentElement)}show(t){if(!this.props.isOpen){if(this.clearShowTimeout(),this.currentTargetElement=t?t.currentTarget||this.getCurrentTarget(t.target):null,t&&t.composedPath&&typeof t.composedPath=="function"){const n=t.composedPath();this.currentTargetElement=n&&n[0]||this.currentTargetElement}this.toggle(t)}}showWithDelay(t){this._hideTimeout&&this.clearHideTimeout(),this._showTimeout=setTimeout(this.show.bind(this,t),this.getDelay("show"))}hide(t){this.props.isOpen&&(this.clearHideTimeout(),this.currentTargetElement=null,this.toggle(t))}hideWithDelay(t){this._showTimeout&&this.clearShowTimeout(),this._hideTimeout=setTimeout(this.hide.bind(this,t),this.getDelay("hide"))}clearShowTimeout(){clearTimeout(this._showTimeout),this._showTimeout=void 0}clearHideTimeout(){clearTimeout(this._hideTimeout),this._hideTimeout=void 0}addEventOnTargets(t,n,r){this._targets.forEach(i=>{i.addEventListener(t,n,r)})}removeEventOnTargets(t,n,r){this._targets.forEach(i=>{i.removeEventListener(t,n,r)})}addTargetEvents(){if(this.props.trigger){let t=this.props.trigger.split(" ");t.indexOf("manual")===-1&&((t.indexOf("click")>-1||t.indexOf("legacy")>-1)&&document.addEventListener("click",this.handleDocumentClick,!0),this._targets&&this._targets.length&&(t.indexOf("hover")>-1&&(this.addEventOnTargets("mouseover",this.showWithDelay,!0),this.addEventOnTargets("mouseout",this.hideWithDelay,!0)),t.indexOf("focus")>-1&&(this.addEventOnTargets("focusin",this.show,!0),this.addEventOnTargets("focusout",this.hide,!0)),this.addEventOnTargets("keydown",this.onEscKeyDown,!0)))}}removeTargetEvents(){this._targets&&(this.removeEventOnTargets("mouseover",this.showWithDelay,!0),this.removeEventOnTargets("mouseout",this.hideWithDelay,!0),this.removeEventOnTargets("keydown",this.onEscKeyDown,!0),this.removeEventOnTargets("focusin",this.show,!0),this.removeEventOnTargets("focusout",this.hide,!0)),document.removeEventListener("click",this.handleDocumentClick,!0)}updateTarget(){const t=Uc(this.props.target,!0);t!==this._targets&&(this.removeTargetEvents(),this._targets=t?Array.from(t):[],this.currentTargetElement=this.currentTargetElement||this._targets[0],this.addTargetEvents())}toggle(t){return this.props.disabled||!this._isMounted?t&&t.preventDefault():this.props.toggle(t)}render(){this.props.isOpen&&this.updateTarget();const t=this.currentTargetElement||this._targets[0];if(!t)return null;const{className:n,cssModule:r,innerClassName:i,isOpen:o,hideArrow:s,boundariesElement:a,placement:l,placementPrefix:c,arrowClassName:f,popperClassName:h,container:p,modifiers:m,strategy:g,offset:v,fade:w,flip:y,children:b}=this.props,x=Tr(this.props,Object.keys(w_)),T=je(h,r),P=je(i,r);return V.createElement(Hre,{className:n,target:t,isOpen:o,hideArrow:s,boundariesElement:a,placement:l,placementPrefix:c,arrowClassName:f,popperClassName:T,container:p,modifiers:m,strategy:g,offset:v,cssModule:r,fade:w,flip:y},({update:k})=>V.createElement("div",Be({},x,{ref:this.getRef,className:P,role:"tooltip",onMouseOver:this.onMouseOverTooltipContent,onMouseLeave:this.onMouseLeaveTooltipContent,onKeyDown:this.onEscKeyDown}),typeof b=="function"?b({update:k}):b))}}sE.propTypes=w_;sE.defaultProps=Wre;var y5=sE;const Yre={placement:"right",placementPrefix:"bs-popover",trigger:"click",offset:[0,8]};function Qd(e){const t=ge("popover","show",e.popperClassName),n=ge("popover-inner",e.innerClassName);return V.createElement(y5,Be({},e,{arrowClassName:"popover-arrow",popperClassName:t,innerClassName:n}))}Qd.propTypes=w_;Qd.defaultProps=Yre;const qre=["defaultOpen"];class Gre extends H.Component{constructor(t){super(t),this.state={isOpen:t.defaultOpen||!1},this.toggle=this.toggle.bind(this)}toggle(){this.setState(t=>({isOpen:!t.isOpen}))}render(){return V.createElement(Qd,Be({isOpen:this.state.isOpen,toggle:this.toggle},Tr(this.props,qre)))}}Gre.propTypes=qe({defaultOpen:S.bool},Qd.propTypes);S.string,S.object;S.string,S.object;const Zre=["children","className","barClassName","cssModule","value","min","max","animated","striped","color","bar","multi","tag","style","barStyle","barAriaValueText","barAriaLabelledBy"],Kre={animated:S.bool,bar:S.bool,barAriaLabelledBy:S.string,barAriaValueText:S.string,barClassName:S.string,barStyle:S.object,children:S.node,className:S.string,cssModule:S.object,color:S.string,max:S.oneOfType([S.string,S.number]),min:S.oneOfType([S.string,S.number]),multi:S.bool,striped:S.bool,style:S.object,tag:ke,value:S.oneOfType([S.string,S.number])},Xre={tag:"div",value:0,min:0,max:100,style:{},barStyle:{}};function aE(e){const{children:t,className:n,barClassName:r,cssModule:i,value:o,min:s,max:a,animated:l,striped:c,color:f,bar:h,multi:p,tag:m,style:g,barStyle:v,barAriaValueText:w,barAriaLabelledBy:y}=e,b=Ze(e,Zre),x=_3(o)/_3(a)*100,T=je(ge(n,"progress"),i),k={className:je(ge("progress-bar",h&&n||r,l?"progress-bar-animated":null,f?`bg-${f}`:null,c||l?"progress-bar-striped":null),i),style:qe(qe(qe({},h?g:{}),v),{},{width:`${x}%`}),role:"progressbar","aria-valuenow":o,"aria-valuemin":s,"aria-valuemax":a,"aria-valuetext":w,"aria-labelledby":y,children:t};return h?V.createElement(m,Be({},b,k)):V.createElement(m,Be({},b,{style:g,className:T}),p?t:V.createElement("div",k))}aE.propTypes=Kre;aE.defaultProps=Xre;const Qre={children:S.node.isRequired,node:S.any};class _5 extends V.Component{componentWillUnmount(){this.defaultNode&&document.body.removeChild(this.defaultNode),this.defaultNode=null}render(){return YC?(!this.props.node&&!this.defaultNode&&(this.defaultNode=document.createElement("div"),document.body.appendChild(this.defaultNode)),Ua.createPortal(this.props.children,this.props.node||this.defaultNode)):null}}_5.propTypes=Qre;var b5=_5;function av(){}const S3=S.shape(Xt.propTypes),w5={autoFocus:S.bool,backdrop:S.oneOfType([S.bool,S.oneOf(["static"])]),backdropClassName:S.string,backdropTransition:S3,centered:S.bool,children:S.node,contentClassName:S.string,className:S.string,container:Vs,cssModule:S.object,external:S.node,fade:S.bool,fullscreen:S.oneOfType([S.bool,S.oneOf(["sm","md","lg","xl"])]),innerRef:S.oneOfType([S.object,S.string,S.func]),isOpen:S.bool,keyboard:S.bool,labelledBy:S.string,modalClassName:S.string,modalTransition:S3,onClosed:S.func,onEnter:S.func,onExit:S.func,onOpened:S.func,returnFocusAfterClose:S.bool,role:S.string,scrollable:S.bool,size:S.string,toggle:S.func,trapFocus:S.bool,unmountOnClose:S.bool,wrapClassName:S.string,zIndex:S.oneOfType([S.number,S.string])},Jre=Object.keys(w5),eie={isOpen:!1,autoFocus:!0,centered:!1,scrollable:!1,role:"dialog",backdrop:!0,keyboard:!0,zIndex:1050,fade:!0,onOpened:av,onClosed:av,modalTransition:{timeout:il.Modal},backdropTransition:{mountOnEnter:!0,timeout:il.Fade},unmountOnClose:!0,returnFocusAfterClose:!0,container:"body",trapFocus:!1};class Un extends V.Component{constructor(t){super(t),this._element=null,this._originalBodyPadding=null,this.getFocusableChildren=this.getFocusableChildren.bind(this),this.handleBackdropClick=this.handleBackdropClick.bind(this),this.handleBackdropMouseDown=this.handleBackdropMouseDown.bind(this),this.handleEscape=this.handleEscape.bind(this),this.handleStaticBackdropAnimation=this.handleStaticBackdropAnimation.bind(this),this.handleTab=this.handleTab.bind(this),this.onOpened=this.onOpened.bind(this),this.onClosed=this.onClosed.bind(this),this.manageFocusAfterClose=this.manageFocusAfterClose.bind(this),this.clearBackdropAnimationTimeout=this.clearBackdropAnimationTimeout.bind(this),this.trapFocus=this.trapFocus.bind(this),this.state={isOpen:!1,showStaticBackdropAnimation:!1}}componentDidMount(){const{isOpen:t,autoFocus:n,onEnter:r}=this.props;t&&(this.init(),this.setState({isOpen:!0}),n&&this.setFocus()),r&&r(),document.addEventListener("focus",this.trapFocus,!0),this._isMounted=!0}componentDidUpdate(t,n){if(this.props.isOpen&&!t.isOpen){this.init(),this.setState({isOpen:!0});return}this.props.autoFocus&&this.state.isOpen&&!n.isOpen&&this.setFocus(),this._element&&t.zIndex!==this.props.zIndex&&(this._element.style.zIndex=this.props.zIndex)}componentWillUnmount(){this.clearBackdropAnimationTimeout(),this.props.onExit&&this.props.onExit(),this._element&&(this.destroy(),(this.props.isOpen||this.state.isOpen)&&this.close()),document.removeEventListener("focus",this.trapFocus,!0),this._isMounted=!1}handleBackdropClick(t){if(t.target===this._mouseDownElement){t.stopPropagation();const n=this._dialog?this._dialog.parentNode:null;if(n&&t.target===n&&this.props.backdrop==="static"&&this.handleStaticBackdropAnimation(),!this.props.isOpen||this.props.backdrop!==!0)return;n&&t.target===n&&this.props.toggle&&this.props.toggle(t)}}handleTab(t){if(t.which!==9||this.modalIndex{this.setState({showStaticBackdropAnimation:!1})},100)}onOpened(t,n){this.props.onOpened(),(this.props.modalTransition.onEntered||av)(t,n)}onClosed(t){const{unmountOnClose:n}=this.props;this.props.onClosed(),(this.props.modalTransition.onExited||av)(t),n&&this.destroy(),this.close(),this._isMounted&&this.setState({isOpen:!1})}setFocus(){this._dialog&&this._dialog.parentNode&&typeof this._dialog.parentNode.focus=="function"&&this._dialog.parentNode.focus()}getFocusableChildren(){return this._element.querySelectorAll(s5.join(", "))}getFocusedChild(){let t;const n=this.getFocusableChildren();try{t=document.activeElement}catch{t=n[0]}return t}trapFocus(t){if(!this.props.trapFocus||!this._element||this._dialog&&this._dialog.parentNode===t.target||this.modalIndex0&&(t.preventDefault(),t.stopPropagation(),n[0].focus())}init(){try{this._triggeringElement=document.activeElement}catch{this._triggeringElement=null}this._element||(this._element=document.createElement("div"),this._element.setAttribute("tabindex","-1"),this._element.style.position="relative",this._element.style.zIndex=this.props.zIndex,this._mountContainer=Uc(this.props.container),this._mountContainer.appendChild(this._element)),this._originalBodyPadding=e5(),Un.openCount<1&&(Un.originalBodyOverflow=window.getComputedStyle(document.body).overflow),t5(),Un.openCount===0&&(document.body.className=ge(document.body.className,je("modal-open",this.props.cssModule)),document.body.style.overflow="hidden"),this.modalIndex=Un.openCount,Un.openCount+=1}destroy(){this._element&&(this._mountContainer.removeChild(this._element),this._element=null),this.manageFocusAfterClose()}manageFocusAfterClose(){if(this._triggeringElement){const{returnFocusAfterClose:t}=this.props;this._triggeringElement.focus&&t&&this._triggeringElement.focus(),this._triggeringElement=null}}close(){if(Un.openCount<=1){const t=je("modal-open",this.props.cssModule),n=new RegExp(`(^| )${t}( |$)`);document.body.className=document.body.className.replace(n," ").trim(),document.body.style.overflow=Un.originalBodyOverflow}this.manageFocusAfterClose(),Un.openCount=Math.max(0,Un.openCount-1),HC(this._originalBodyPadding)}clearBackdropAnimationTimeout(){this._backdropAnimationTimeout&&(clearTimeout(this._backdropAnimationTimeout),this._backdropAnimationTimeout=void 0)}renderModalDialog(){const t=Tr(this.props,Jre),n="modal-dialog";return V.createElement("div",Be({},t,{className:je(ge(n,this.props.className,{[`modal-${this.props.size}`]:this.props.size,[`${n}-centered`]:this.props.centered,[`${n}-scrollable`]:this.props.scrollable,"modal-fullscreen":this.props.fullscreen===!0,[`modal-fullscreen-${this.props.fullscreen}-down`]:typeof this.props.fullscreen=="string"}),this.props.cssModule),role:"document",ref:r=>{this._dialog=r}}),V.createElement("div",{className:je(ge("modal-content",this.props.contentClassName),this.props.cssModule)},this.props.children))}render(){const{unmountOnClose:t}=this.props;if(this._element&&(this.state.isOpen||!t)){const n=!!this._element&&!this.state.isOpen&&!t;this._element.style.display=n?"none":"block";const{wrapClassName:r,modalClassName:i,backdropClassName:o,cssModule:s,isOpen:a,backdrop:l,role:c,labelledBy:f,external:h,innerRef:p}=this.props,m={onClick:this.handleBackdropClick,onMouseDown:this.handleBackdropMouseDown,onKeyUp:this.handleEscape,onKeyDown:this.handleTab,style:{display:"block"},"aria-labelledby":f,role:c,tabIndex:"-1"},g=this.props.fade,v=qe(qe(qe({},Xt.defaultProps),this.props.modalTransition),{},{baseClass:g?this.props.modalTransition.baseClass:"",timeout:g?this.props.modalTransition.timeout:0}),w=qe(qe(qe({},Xt.defaultProps),this.props.backdropTransition),{},{baseClass:g?this.props.backdropTransition.baseClass:"",timeout:g?this.props.backdropTransition.timeout:0}),y=l&&(g?V.createElement(Xt,Be({},w,{in:a&&!!l,cssModule:s,className:je(ge("modal-backdrop",o),s)})):V.createElement("div",{className:je(ge("modal-backdrop","show",o),s)}));return V.createElement(b5,{node:this._element},V.createElement("div",{className:je(r)},V.createElement(Xt,Be({},m,v,{in:a,onEntered:this.onOpened,onExited:this.onClosed,cssModule:s,className:je(ge("modal",i,this.state.showStaticBackdropAnimation&&"modal-static"),s),innerRef:p}),h,this.renderModalDialog()),y))}return null}}Un.propTypes=w5;Un.defaultProps=eie;Un.openCount=0;Un.originalBodyOverflow=null;var Ho=Un;const tie=["className","cssModule","children","toggle","tag","wrapTag","closeAriaLabel","close"],nie={children:S.node,className:S.string,close:S.object,closeAriaLabel:S.string,cssModule:S.object,tag:ke,toggle:S.func,wrapTag:ke},rie={tag:"h5",wrapTag:"div",closeAriaLabel:"Close"};function oo(e){let t;const{className:n,cssModule:r,children:i,toggle:o,tag:s,wrapTag:a,closeAriaLabel:l,close:c}=e,f=Ze(e,tie),h=je(ge(n,"modal-header"),r);return!c&&o&&(t=V.createElement("button",{type:"button",onClick:o,className:je("btn-close",r),"aria-label":l})),V.createElement(a,Be({},f,{className:h}),V.createElement(s,{className:je("modal-title",r)},i),c||t)}oo.propTypes=nie;oo.defaultProps=rie;const iie=["className","cssModule","tag"],oie={className:S.string,cssModule:S.object,tag:ke},sie={tag:"div"};function Ri(e){const{className:t,cssModule:n,tag:r}=e,i=Ze(e,iie),o=je(ge(t,"modal-body"),n);return V.createElement(r,Be({},i,{className:o}))}Ri.propTypes=oie;Ri.defaultProps=sie;const aie=["className","cssModule","tag"],lie={className:S.string,cssModule:S.object,tag:ke},cie={tag:"div"};function ra(e){const{className:t,cssModule:n,tag:r}=e,i=Ze(e,aie),o=je(ge(t,"modal-footer"),n);return V.createElement(r,Be({},i,{className:o}))}ra.propTypes=lie;ra.defaultProps=cie;const uie={placement:"top",autohide:!0,placementPrefix:"bs-tooltip",trigger:"hover focus"};function Jd(e){const t=ge("tooltip","show",e.popperClassName),n=ge("tooltip-inner",e.innerClassName);return V.createElement(y5,Be({},e,{arrowClassName:"tooltip-arrow",popperClassName:t,innerClassName:n}))}Jd.propTypes=w_;Jd.defaultProps=uie;S.bool,S.bool,S.string,S.object,S.bool,S.bool,S.oneOfType([S.func,S.string,S.object]),S.oneOfType([S.bool,S.string]),S.string,S.bool;const fie=["className","cssModule","tag","flush","horizontal","numbered"],die={className:S.string,cssModule:S.object,flush:S.bool,horizontal:S.oneOfType([S.bool,S.string]),numbered:S.bool,tag:ke},hie={tag:"ul",horizontal:!1,numbered:!1},pie=e=>e===!1?!1:e===!0||e==="xs"?"list-group-horizontal":`list-group-horizontal-${e}`;function lE(e){const{className:t,cssModule:n,tag:r,flush:i,horizontal:o,numbered:s}=e,a=Ze(e,fie),l=je(ge(t,"list-group",i?"list-group-flush":pie(o),{"list-group-numbered":s}),n);return V.createElement(r,Be({},a,{className:l}))}lE.propTypes=die;lE.defaultProps=hie;const mie=["className","cssModule","tag","innerRef"],gie={children:S.node,tag:ke,innerRef:S.oneOfType([S.object,S.func,S.string]),className:S.string,cssModule:S.object},vie={tag:"form"};class x5 extends H.Component{constructor(t){super(t),this.getRef=this.getRef.bind(this),this.submit=this.submit.bind(this)}getRef(t){this.props.innerRef&&this.props.innerRef(t),this.ref=t}submit(){this.ref&&this.ref.submit()}render(){const t=this.props,{className:n,cssModule:r,tag:i,innerRef:o}=t,s=Ze(t,mie),a=je(n,r);return V.createElement(i,Be({},s,{ref:o,className:a}))}}x5.propTypes=gie;x5.defaultProps=vie;S.node,S.string,S.object,S.bool,S.bool;const yie=["className","cssModule","row","disabled","check","inline","floating","tag","switch"],_ie={children:S.node,row:S.bool,check:S.bool,switch:S.bool,inline:S.bool,floating:S.bool,disabled:S.bool,tag:ke,className:S.string,cssModule:S.object},bie={tag:"div"};function yr(e){const{className:t,cssModule:n,row:r,disabled:i,check:o,inline:s,floating:a,tag:l,switch:c}=e,f=Ze(e,yie),h=o||c,p=je(ge(t,r?"row":!1,h?"form-check":"mb-3",c?"form-switch":!1,h&&s?"form-check-inline":!1,h&&i?"disabled":!1,a&&"form-floating"),n);return l==="fieldset"&&(f.disabled=i),V.createElement(l,Be({},f,{className:p}))}yr.propTypes=_ie;yr.defaultProps=bie;S.node,S.bool,S.string,S.string,S.object;const wie=["className","cssModule","type","bsSize","valid","invalid","tag","addon","plaintext","innerRef"],xie={children:S.node,type:S.string,size:S.oneOfType([S.number,S.string]),bsSize:S.string,valid:S.bool,invalid:S.bool,tag:ke,innerRef:S.oneOfType([S.object,S.func,S.string]),plaintext:S.bool,addon:S.bool,className:S.string,cssModule:S.object},Sie={type:"text"};let cE=class extends V.Component{constructor(t){super(t),this.getRef=this.getRef.bind(this),this.focus=this.focus.bind(this)}getRef(t){this.props.innerRef&&this.props.innerRef(t),this.ref=t}focus(){this.ref&&this.ref.focus()}render(){let t=this.props,{className:n,cssModule:r,type:i,bsSize:o,valid:s,invalid:a,tag:l,addon:c,plaintext:f,innerRef:h}=t,p=Ze(t,wie);const m=["switch","radio","checkbox"].indexOf(i)>-1,g=/\D/g,v=i==="textarea",w=i==="select",y=i==="range";let b=l||(w||v?i:"input"),x="form-control";f?(x=`${x}-plaintext`,b=l||"input"):y?x="form-range":w?x="form-select":m&&(c?x=null:x="form-check-input"),p.size&&g.test(p.size)&&(Uw(`Please use the prop "bsSize" instead of the "size" to bootstrap's input sizing.`),o=p.size,delete p.size);const T=je(ge(n,a&&"is-invalid",s&&"is-valid",o?w?`form-select-${o}`:`form-control-${o}`:!1,x),r);return(b==="input"||l&&typeof l=="function")&&(p.type=i==="switch"?"checkbox":i),p.children&&!(f||i==="select"||typeof b!="string"||b==="select")&&(Uw(`Input with a type of "${i}" cannot have children. Please use "value"/"defaultValue" instead.`),delete p.children),V.createElement(b,Be({},p,{ref:h,className:T,"aria-invalid":a}))}};cE.propTypes=xie;cE.defaultProps=Sie;var Vc=cE;const Cie=["className","cssModule","tag","type","size"],Eie={className:S.string,cssModule:S.object,size:S.string,tag:ke,type:S.string},Tie={tag:"div"};function eh(e){const{className:t,cssModule:n,tag:r,type:i,size:o}=e,s=Ze(e,Cie),a=je(ge(t,"input-group",o?`input-group-${o}`:null),n);return e.type==="dropdown"?V.createElement(ru,Be({},s,{className:a})):V.createElement(c5.Provider,{value:{insideInputGroup:!0}},V.createElement(r,Be({},s,{className:a})))}eh.propTypes=Eie;eh.defaultProps=Tie;S.string,S.object;const vb=S.oneOfType([S.number,S.string]),Il=S.oneOfType([S.bool,S.string,S.number,S.shape({size:vb,order:vb,offset:vb})]);S.node,S.bool,S.bool,S.string,S.string,S.string,S.object,S.array;S.bool,S.bool,S.node,S.string,S.object,S.bool,S.bool,S.bool,S.bool,S.bool,S.bool,S.bool;function lv(){}const C3=S.shape(Xt.propTypes),S5={autoFocus:S.bool,backdrop:S.bool,backdropClassName:S.string,backdropTransition:C3,children:S.node,className:S.string,container:Vs,cssModule:S.object,direction:S.oneOf(["start","end","bottom","top"]),fade:S.bool,innerRef:S.oneOfType([S.object,S.string,S.func]),isOpen:S.bool,keyboard:S.bool,labelledBy:S.string,offcanvasTransition:C3,onClosed:S.func,onEnter:S.func,onExit:S.func,style:S.object,onOpened:S.func,returnFocusAfterClose:S.bool,role:S.string,scrollable:S.bool,toggle:S.func,trapFocus:S.bool,unmountOnClose:S.bool,zIndex:S.oneOfType([S.number,S.string])},Oie=Object.keys(S5),Pie={isOpen:!1,autoFocus:!0,direction:"start",scrollable:!1,role:"dialog",backdrop:!0,keyboard:!0,zIndex:1050,fade:!0,onOpened:lv,onClosed:lv,offcanvasTransition:{timeout:il.Offcanvas},backdropTransition:{mountOnEnter:!0,timeout:il.Fade},unmountOnClose:!0,returnFocusAfterClose:!0,container:"body",trapFocus:!1};class mi extends V.Component{constructor(t){super(t),this._element=null,this._originalBodyPadding=null,this.getFocusableChildren=this.getFocusableChildren.bind(this),this.handleBackdropClick=this.handleBackdropClick.bind(this),this.handleBackdropMouseDown=this.handleBackdropMouseDown.bind(this),this.handleEscape=this.handleEscape.bind(this),this.handleTab=this.handleTab.bind(this),this.onOpened=this.onOpened.bind(this),this.onClosed=this.onClosed.bind(this),this.manageFocusAfterClose=this.manageFocusAfterClose.bind(this),this.clearBackdropAnimationTimeout=this.clearBackdropAnimationTimeout.bind(this),this.trapFocus=this.trapFocus.bind(this),this.state={isOpen:!1}}componentDidMount(){const{isOpen:t,autoFocus:n,onEnter:r}=this.props;t&&(this.init(),this.setState({isOpen:!0}),n&&this.setFocus()),r&&r(),document.addEventListener("focus",this.trapFocus,!0),this._isMounted=!0}componentDidUpdate(t,n){if(this.props.isOpen&&!t.isOpen){this.init(),this.setState({isOpen:!0});return}this.props.autoFocus&&this.state.isOpen&&!n.isOpen&&this.setFocus(),this._element&&t.zIndex!==this.props.zIndex&&(this._element.style.zIndex=this.props.zIndex)}componentWillUnmount(){this.clearBackdropAnimationTimeout(),this.props.onExit&&this.props.onExit(),this._element&&(this.destroy(),(this.props.isOpen||this.state.isOpen)&&this.close()),document.removeEventListener("focus",this.trapFocus,!0),this._isMounted=!1}handleBackdropClick(t){if(t.target===this._mouseDownElement){t.stopPropagation();const n=this._backdrop;if(!this.props.isOpen||this.props.backdrop!==!0)return;n&&t.target===n&&this.props.toggle&&this.props.toggle(t)}}handleTab(t){if(t.which!==9||this.offcanvasIndex0&&(t.preventDefault(),t.stopPropagation(),n[0].focus())}init(){try{this._triggeringElement=document.activeElement}catch{this._triggeringElement=null}this._element||(this._element=document.createElement("div"),this._element.setAttribute("tabindex","-1"),this._element.style.position="relative",this._element.style.zIndex=this.props.zIndex,this._mountContainer=Uc(this.props.container),this._mountContainer.appendChild(this._element)),this._originalBodyPadding=e5(),t5(),mi.openCount===0&&this.props.backdrop&&!this.props.scrollable&&(document.body.style.overflow="hidden"),this.offcanvasIndex=mi.openCount,mi.openCount+=1}destroy(){this._element&&(this._mountContainer.removeChild(this._element),this._element=null),this.manageFocusAfterClose()}manageFocusAfterClose(){if(this._triggeringElement){const{returnFocusAfterClose:t}=this.props;this._triggeringElement.focus&&t&&this._triggeringElement.focus(),this._triggeringElement=null}}close(){this.manageFocusAfterClose(),mi.openCount=Math.max(0,mi.openCount-1),document.body.style.overflow=null,HC(this._originalBodyPadding)}clearBackdropAnimationTimeout(){this._backdropAnimationTimeout&&(clearTimeout(this._backdropAnimationTimeout),this._backdropAnimationTimeout=void 0)}render(){const{direction:t,unmountOnClose:n}=this.props;if(this._element&&(this.state.isOpen||!n)){const r=!!this._element&&!this.state.isOpen&&!n;this._element.style.display=r?"none":"block";const{className:i,backdropClassName:o,cssModule:s,isOpen:a,backdrop:l,role:c,labelledBy:f,style:h}=this.props,p={onKeyUp:this.handleEscape,onKeyDown:this.handleTab,"aria-labelledby":f,role:c,tabIndex:"-1"},m=this.props.fade,g=qe(qe(qe({},Xt.defaultProps),this.props.offcanvasTransition),{},{baseClass:m?this.props.offcanvasTransition.baseClass:"",timeout:m?this.props.offcanvasTransition.timeout:0}),v=qe(qe(qe({},Xt.defaultProps),this.props.backdropTransition),{},{baseClass:m?this.props.backdropTransition.baseClass:"",timeout:m?this.props.backdropTransition.timeout:0}),w=l&&(m?V.createElement(Xt,Be({},v,{in:a&&!!l,innerRef:b=>{this._backdrop=b},cssModule:s,className:je(ge("offcanvas-backdrop",o),s),onClick:this.handleBackdropClick,onMouseDown:this.handleBackdropMouseDown})):V.createElement("div",{className:je(ge("offcanvas-backdrop","show",o),s),onClick:this.handleBackdropClick,onMouseDown:this.handleBackdropMouseDown})),y=Tr(this.props,Oie);return V.createElement(b5,{node:this._element},V.createElement(Xt,Be({},y,p,g,{in:a,onEntered:this.onOpened,onExited:this.onClosed,cssModule:s,className:je(ge("offcanvas",i,`offcanvas-${t}`),s),innerRef:b=>{this._dialog=b},style:qe(qe({},h),{},{visibility:a?"visible":"hidden"})}),this.props.children),w)}return null}}mi.propTypes=S5;mi.defaultProps=Pie;mi.openCount=0;S.string,S.object;S.node,S.string,S.object,S.string,S.object,S.func;const kie=["className","listClassName","cssModule","size","tag","listTag","aria-label"],Mie={children:S.node,className:S.string,listClassName:S.string,cssModule:S.object,size:S.string,tag:ke,listTag:ke,"aria-label":S.string},Rie={tag:"nav",listTag:"ul","aria-label":"pagination"};function x_(e){const{className:t,listClassName:n,cssModule:r,size:i,tag:o,listTag:s,"aria-label":a}=e,l=Ze(e,kie),c=je(ge(t),r),f=je(ge(n,"pagination",{[`pagination-${i}`]:!!i}),r);return V.createElement(o,{className:c,"aria-label":a},V.createElement(s,Be({},l,{className:f})))}x_.propTypes=Mie;x_.defaultProps=Rie;const Nie=["active","className","cssModule","disabled","tag"],Lie={active:S.bool,children:S.node,className:S.string,cssModule:S.object,disabled:S.bool,tag:ke},Die={tag:"li"};function Ns(e){const{active:t,className:n,cssModule:r,disabled:i,tag:o}=e,s=Ze(e,Nie),a=je(ge(n,"page-item",{active:t,disabled:i}),r);return V.createElement(o,Be({},s,{className:a}))}Ns.propTypes=Lie;Ns.defaultProps=Die;const Aie=["className","cssModule","next","previous","first","last","tag"],Iie={"aria-label":S.string,children:S.node,className:S.string,cssModule:S.object,next:S.bool,previous:S.bool,first:S.bool,last:S.bool,tag:ke},Fie={tag:"a"};function Ls(e){let{className:t,cssModule:n,next:r,previous:i,first:o,last:s,tag:a}=e,l=Ze(e,Aie);const c=je(ge(t,"page-link"),n);let f;i?f="Previous":r?f="Next":o?f="First":s&&(f="Last");const h=e["aria-label"]||f;let p;i?p="‹":r?p="›":o?p="«":s&&(p="»");let{children:m}=e;return m&&Array.isArray(m)&&m.length===0&&(m=null),!l.href&&a==="a"&&(a="button"),(i||r||o||s)&&(m=[V.createElement("span",{"aria-hidden":"true",key:"caret"},m||p),V.createElement("span",{className:"visually-hidden",key:"ariaLabel"},h)]),V.createElement(a,Be({},l,{className:c,"aria-label":h}),m)}Ls.propTypes=Iie;Ls.defaultProps=Fie;const $ie=V.createContext({}),C5={tag:ke,activeTab:S.any,className:S.string,cssModule:S.object},jie={tag:"div"};class E5 extends H.Component{static getDerivedStateFromProps(t,n){return n.activeTab!==t.activeTab?{activeTab:t.activeTab}:null}constructor(t){super(t),this.state={activeTab:this.props.activeTab}}render(){const{className:t,cssModule:n,tag:r}=this.props,i=Tr(this.props,Object.keys(C5)),o=je(ge("tab-content",t),n);return V.createElement($ie.Provider,{value:{activeTabId:this.state.activeTab}},V.createElement(r,Be({},i,{className:o})))}}E5.propTypes=C5;E5.defaultProps=jie;S.string,S.object,S.any;const Bie=["className","closeClassName","closeAriaLabel","cssModule","tag","color","isOpen","toggle","children","transition","fade","innerRef"],zie={children:S.node,className:S.string,closeClassName:S.string,closeAriaLabel:S.string,color:S.string,cssModule:S.object,fade:S.bool,innerRef:S.oneOfType([S.object,S.string,S.func]),isOpen:S.bool,tag:ke,toggle:S.func,transition:S.shape(Xt.propTypes)},Uie={color:"success",isOpen:!0,tag:"div",closeAriaLabel:"Close",fade:!0,transition:qe(qe({},Xt.defaultProps),{},{unmountOnExit:!0})};function uE(e){const{className:t,closeClassName:n,closeAriaLabel:r,cssModule:i,tag:o,color:s,isOpen:a,toggle:l,children:c,transition:f,fade:h,innerRef:p}=e,m=Ze(e,Bie),g=je(ge(t,"alert",`alert-${s}`,{"alert-dismissible":l}),i),v=je(ge("btn-close",n),i),w=qe(qe(qe({},Xt.defaultProps),f),{},{baseClass:h?f.baseClass:"",timeout:h?f.timeout:0});return V.createElement(Xt,Be({},m,w,{tag:o,className:g,in:a,role:"alert",innerRef:p}),l?V.createElement("button",{type:"button",className:v,"aria-label":r,onClick:l}):null,c)}uE.propTypes=zie;uE.defaultProps=Uie;S.node,S.string,S.object,S.bool,S.bool,S.shape(Xt.propTypes),S.oneOfType([S.object,S.string,S.func]);qe(qe({},Xt.defaultProps),{},{unmountOnExit:!0});S.string,S.object,S.oneOfType([S.object,S.string,S.func]);S.oneOfType([S.string,S.node]),S.func,S.string,S.object,S.node,S.string,S.oneOfType([S.string,S.number]),S.object,S.string;const Vie=["className","cssModule","tag","active","disabled","action","color"],Hie={action:S.bool,active:S.bool,className:S.string,cssModule:S.object,color:S.string,disabled:S.bool,tag:ke},Wie={tag:"li"},Yie=e=>{e.preventDefault()};function fE(e){const{className:t,cssModule:n,tag:r,active:i,disabled:o,action:s,color:a}=e,l=Ze(e,Vie),c=je(ge(t,i?"active":!1,o?"disabled":!1,s?"list-group-item-action":!1,a?`list-group-item-${a}`:!1,"list-group-item"),n);return o&&(l.onClick=Yie),V.createElement(r,Be({},l,{className:c}))}fE.propTypes=Hie;fE.defaultProps=Wie;S.string,S.object;S.string,S.object;const qie=["className","cssModule","tag","type"],Gie={className:S.string,cssModule:S.object,tag:ke,type:S.string},Zie={tag:"ul"},dE=H.forwardRef((e,t)=>{const{className:n,cssModule:r,tag:i,type:o}=e,s=Ze(e,qie),a=je(ge(n,o?`list-${o}`:!1),r);return V.createElement(i,Be({},s,{className:a,ref:t}))});dE.name="List";dE.propTypes=Gie;dE.defaultProps=Zie;const Kie=["className","cssModule","tag"],Xie={className:S.string,cssModule:S.object,tag:ke},Qie={tag:"li"},hE=H.forwardRef((e,t)=>{const{className:n,cssModule:r,tag:i}=e,o=Ze(e,Kie),s=je(ge(n,"list-inline-item"),r);return V.createElement(i,Be({},o,{className:s,ref:t}))});hE.name="ListInlineItem";hE.propTypes=Xie;hE.defaultProps=Qie;const Jie=["defaultOpen"];class eoe extends H.Component{constructor(t){super(t),this.state={isOpen:t.defaultOpen||!1},this.toggle=this.toggle.bind(this)}toggle(){this.setState(t=>({isOpen:!t.isOpen}))}render(){return V.createElement(g_,Be({isOpen:this.state.isOpen,toggle:this.toggle},Tr(this.props,Jie)))}}eoe.propTypes=qe({defaultOpen:S.bool},g_.propTypes);const toe=["toggleEvents","defaultOpen"],noe={defaultOpen:S.bool,toggler:S.string.isRequired,toggleEvents:S.arrayOf(S.string)},roe={toggleEvents:lne};class T5 extends H.Component{constructor(t){super(t),this.togglers=null,this.removeEventListeners=null,this.toggle=this.toggle.bind(this),this.state={isOpen:t.defaultOpen||!1}}componentDidMount(){this.togglers=o5(this.props.toggler),this.togglers.length&&(this.removeEventListeners=cne(this.togglers,this.toggle,this.props.toggleEvents))}componentWillUnmount(){this.togglers.length&&this.removeEventListeners&&this.removeEventListeners()}toggle(t){this.setState(({isOpen:n})=>({isOpen:!n})),t.preventDefault()}render(){return V.createElement(u5,Be({isOpen:this.state.isOpen},Tr(this.props,toe)))}}T5.propTypes=noe;T5.defaultProps=roe;const ioe=["defaultOpen"];class th extends H.Component{constructor(t){super(t),this.state={isOpen:t.defaultOpen||!1},this.toggle=this.toggle.bind(this)}toggle(t){this.setState(n=>({isOpen:!n.isOpen}),()=>{this.props.onToggle&&this.props.onToggle(t,this.state.isOpen)})}render(){return V.createElement(ru,Be({isOpen:this.state.isOpen,toggle:this.toggle},Tr(this.props,ioe)))}}th.propTypes=qe({defaultOpen:S.bool,onToggle:S.func},ru.propTypes);const ooe=["defaultOpen"];class Or extends H.Component{constructor(t){super(t),this.state={isOpen:t.defaultOpen||!1},this.toggle=this.toggle.bind(this)}toggle(){this.setState(t=>({isOpen:!t.isOpen}))}render(){return V.createElement(Jd,Be({isOpen:this.state.isOpen,toggle:this.toggle},Tr(this.props,ooe)))}}Or.propTypes=qe({defaultOpen:S.bool},Jd.propTypes);S.oneOf(["border","grow"]),S.oneOf(["sm"]),S.oneOf(["primary","secondary","success","danger","warning","info","light","dark"]),S.string,S.object,S.string;qe(qe({},qC.propTypes),{},{color:S.string,tag:ke,animation:S.oneOf(["glow","wave"]),innerRef:S.oneOfType([S.object,S.func,S.string]),size:S.oneOf(["lg","sm","xs"])});S.string,S.string,S.bool,S.string,S.object;(()=>{if(typeof window!="object"||typeof window.CustomEvent=="function")return;const e=(t,n)=>{n=n||{bubbles:!1,cancelable:!1,detail:null};let r=document.createEvent("CustomEvent");return r.initCustomEvent(t,n.bubbles,n.cancelable,n.detail),r};window.CustomEvent=e})();(()=>{if(typeof Object.values=="function")return;Object.values=t=>Object.keys(t).map(n=>t[n])})();const soe="Left",aoe="Right",loe="Up",coe="Down",ac={delta:10,preventScrollOnSwipe:!1,rotationAngle:0,trackMouse:!1,trackTouch:!0,swipeDuration:1/0,touchEventOptions:{passive:!0}},Hw={first:!0,initial:[0,0],start:0,swiping:!1,xy:[0,0]},E3="mousemove",T3="mouseup",uoe="touchend",foe="touchmove",doe="touchstart";function hoe(e,t,n,r){return e>t?n>0?aoe:soe:r>0?coe:loe}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 poe(e,t){const n=f=>{const h="touches"in f;h&&f.touches.length>1||e((p,m)=>{m.trackMouse&&!h&&(document.addEventListener(E3,r),document.addEventListener(T3,s));const{clientX:g,clientY:v}=h?f.touches[0]:f,w=O3([g,v],m.rotationAngle);return m.onTouchStartOrOnMouseDown&&m.onTouchStartOrOnMouseDown({event:f}),Object.assign(Object.assign(Object.assign({},p),Hw),{initial:w.slice(),xy:w,start:f.timeStamp||0})})},r=f=>{e((h,p)=>{const m="touches"in f;if(m&&f.touches.length>1)return h;if(f.timeStamp-h.start>p.swipeDuration)return h.swiping?Object.assign(Object.assign({},h),{swiping:!1}):h;const{clientX:g,clientY:v}=m?f.touches[0]:f,[w,y]=O3([g,v],p.rotationAngle),b=w-h.xy[0],x=y-h.xy[1],T=Math.abs(b),P=Math.abs(x),k=(f.timeStamp||0)-h.start,N=Math.sqrt(T*T+P*P)/(k||1),D=[b/(k||1),x/(k||1)],z=hoe(T,P,b,x),A=typeof p.delta=="number"?p.delta:p.delta[z.toLowerCase()]||ac.delta;if(T{e((h,p)=>{let m;if(h.swiping&&h.eventData){if(f.timeStamp-h.start{document.removeEventListener(E3,r),document.removeEventListener(T3,s)},s=f=>{o(),i(f)},a=(f,h)=>{let p=()=>{};if(f&&f.addEventListener){const m=Object.assign(Object.assign({},ac.touchEventOptions),h.touchEventOptions),g=[[doe,n,m],[foe,r,Object.assign(Object.assign({},m),h.preventScrollOnSwipe?{passive:!1}:{})],[uoe,i,m]];g.forEach(([v,w,y])=>f.addEventListener(v,w,y)),p=()=>g.forEach(([v,w])=>f.removeEventListener(v,w))}return p},c={ref:f=>{f!==null&&e((h,p)=>{if(h.el===f)return h;const m={};return h.el&&h.el!==f&&h.cleanUpTouch&&(h.cleanUpTouch(),m.cleanUpTouch=void 0),p.trackTouch&&f&&(m.cleanUpTouch=a(f,p)),Object.assign(Object.assign(Object.assign({},h),{el:f}),m)})}};return t.trackMouse&&(c.onMouseDown=n),[c,a]}function moe(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 goe(e){const{trackMouse:t}=e,n=H.useRef(Object.assign({},Hw)),r=H.useRef(Object.assign({},ac)),i=H.useRef(Object.assign({},r.current));i.current=Object.assign({},r.current),r.current=Object.assign(Object.assign({},ac),e);let o;for(o in ac)r.current[o]===void 0&&(r.current[o]=ac[o]);const[s,a]=H.useMemo(()=>poe(l=>n.current=l(n.current,r.current),{trackMouse:t}),[t]);return n.current=moe(n.current,r.current,i.current,a),s}var Pp,voe=new Uint8Array(16);function yoe(){if(!Pp&&(Pp=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Pp))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Pp(voe)}const _oe=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function boe(e){return typeof e=="string"&&_oe.test(e)}var jn=[];for(var yb=0;yb<256;++yb)jn.push((yb+256).toString(16).substr(1));function woe(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(jn[e[t+0]]+jn[e[t+1]]+jn[e[t+2]]+jn[e[t+3]]+"-"+jn[e[t+4]]+jn[e[t+5]]+"-"+jn[e[t+6]]+jn[e[t+7]]+"-"+jn[e[t+8]]+jn[e[t+9]]+"-"+jn[e[t+10]]+jn[e[t+11]]+jn[e[t+12]]+jn[e[t+13]]+jn[e[t+14]]+jn[e[t+15]]).toLowerCase();if(!boe(n))throw TypeError("Stringified UUID is invalid");return n}function pE(e,t,n){e=e||{};var r=e.random||(e.rng||yoe)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return woe(r)}const xoe=2e3,Soe=(e,t)=>(n=!1,r=xoe)=>{const[i,o]=H.useState(n),s=H.useRef(void 0);return[i,()=>{o(!n),s.current&&t(s.current),s.current=e(()=>o(n),r)}]},$t=(e=!1)=>{const[t,n]=H.useState(e);return[t,()=>n(!t),()=>n(!0),()=>n(!1)]},Coe=(e,t)=>{const n=r=>i=>{i.event.composedPath().some(({classList:s})=>s==null?void 0:s.contains("visits-table"))||document.querySelector(".modal")||r()};return goe({delta:40,onSwipedLeft:n(t),onSwipedRight:n(e)})},Eoe=(e,t)=>{const[n,r]=H.useState(t);return[n,o=>{const{location:s,history:a}=window,l=ml(s.search);l[e]=o,a.pushState(null,"",`${s.pathname}?${Yd(l)}`),r(o)}]},Toe=(e,t)=>{const n=H.useRef(!0);H.useEffect(()=>{!n.current&&e(),n.current=!1},t)},ia=()=>{const e=jo();return()=>e(-1)},Ooe=()=>{const{search:e}=kn();return ml(e)},S_=()=>{const{current:e}=H.useRef(`dom-${pE()}`);return e},vl=()=>H.useRef(null),fn=({title:e,children:t,bodyClassName:n,...r})=>U(Er,{...r,children:[e&&C(sl,{role:"heading",children:e}),C(ol,{className:n,children:t})]});const Poe=({isOpen:e,toggle:t,forceUpdate:n})=>{const[r,,i]=$t();return U(uE,{className:"app-update-banner",isOpen:e,toggle:t,tag:fn,color:"secondary",children:[C("h4",{className:"mb-4",children:"This app has just been updated!"}),U("p",{className:"mb-0",children:["Restart it to enjoy the new features.",U(ht,{role:"button",disabled:r,className:"ms-2",color:"secondary",size:"sm",onClick:()=>{i(),n()},children:[!r&&U(We,{children:["Restart now ",C(Fe,{icon:LQ,className:"ms-1"})]}),r&&C(We,{children:"Restarting..."})]})]})]})},O5=({to:e="/",children:t="Home"})=>C("div",{className:"home",children:U(fn,{className:"p-4",children:[C("h2",{children:"Oops! We could not find requested route."}),C("p",{children:"Use your browser's back button to navigate to the page you have previously come from, or just press this button."}),C("br",{}),C(At,{to:e,className:"btn btn-outline-primary btn-lg",children:t})]})}),koe=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"})})},mE="#4696e5",Moe="rgba(70, 150, 229, 0.4)",P5="#f77f28",Roe="rgba(247, 127, 40, 0.4)",Noe="white",Loe="#161b22",k5=e=>{var t,n;return(n=(t=document.getElementsByTagName("html"))==null?void 0:t[0])==null?void 0:n.setAttribute("data-theme",e)},Doe=()=>{var e,t;return((t=(e=document.getElementsByTagName("html"))==null?void 0:e[0])==null?void 0:t.getAttribute("data-theme"))==="dark"};const Aoe=(e,t,n,r,i,o,s,a)=>({fetchServers:l,servers:c,settings:f,appUpdated:h,resetAppUpdate:p})=>{const g=kn().pathname==="/";return H.useEffect(()=>{var v;Object.keys(c).length===0&&l(),k5(((v=f.ui)==null?void 0:v.theme)??"light")},[]),U("div",{className:"container-fluid app-container",children:[C(e,{}),U("div",{className:"app",children:[C("div",{className:ge("shlink-wrapper",{"d-flex d-md-block align-items-center":g}),children:U(Qy,{children:[C(gt,{index:!0,element:C(t,{})}),C(gt,{path:"/settings/*",element:C(o,{})}),C(gt,{path:"/manage-servers",element:C(s,{})}),C(gt,{path:"/server/create",element:C(r,{})}),C(gt,{path:"/server/:serverId/edit",element:C(i,{})}),C(gt,{path:"/server/:serverId/*",element:C(n,{})}),C(gt,{path:"*",element:C(O5,{})})]})}),C("div",{className:"shlink-footer",children:C(a,{})})]}),C(Poe,{isOpen:h,toggle:p,forceUpdate:koe})]})};function vi(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:gE(e)?2:vE(e)?3:0}function _c(e,t){return ou(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Ioe(e,t){return ou(e)===2?e.get(t):e[t]}function M5(e,t,n){var r=ou(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function R5(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function gE(e){return Uoe&&e instanceof Map}function vE(e){return Voe&&e instanceof Set}function ka(e){return e.o||e.t}function yE(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=L5(e);delete t[It];for(var n=bc(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=Foe),Object.freeze(e),t&&al(e,function(n,r){return _E(r,!0)},!0)),e}function Foe(){vi(2)}function bE(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Ji(e){var t=Gw[e];return t||vi(18,e),t}function $oe(e,t){Gw[e]||(Gw[e]=t)}function Ww(){return Sd}function _b(e,t){t&&(Ji("Patches"),e.u=[],e.s=[],e.v=t)}function cv(e){Yw(e),e.p.forEach(joe),e.p=null}function Yw(e){e===Sd&&(Sd=e.l)}function P3(e){return Sd={p:[],l:Sd,h:e,m:!0,_:0}}function joe(e){var t=e[It];t.i===0||t.i===1?t.j():t.O=!0}function bb(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||Ji("ES5").S(t,e,r),r?(n[It].P&&(cv(t),vi(4)),Do(e)&&(e=uv(t,e),t.l||fv(t,e)),t.u&&Ji("Patches").M(n[It].t,e,t.u,t.s)):e=uv(t,n,[]),cv(t),t.u&&t.v(t.u,t.s),e!==N5?e:void 0}function uv(e,t,n){if(bE(t))return t;var r=t[It];if(!r)return al(t,function(o,s){return k3(e,r,t,o,s,n)},!0),t;if(r.A!==e)return t;if(!r.P)return fv(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=yE(r.k):r.o;al(r.i===3?new Set(i):i,function(o,s){return k3(e,r,i,o,s,n)}),fv(e,i,!1),n&&e.u&&Ji("Patches").R(r,n,e.u,e.s)}return r.o}function k3(e,t,n,r,i,o){if(Hs(i)){var s=uv(e,i,o&&t&&t.i!==3&&!_c(t.D,r)?o.concat(r):void 0);if(M5(n,r,s),!Hs(s))return;e.m=!1}if(Do(i)&&!bE(i)){if(!e.h.F&&e._<1)return;uv(e,i),t&&t.A.l||fv(e,i)}}function fv(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&_E(t,n)}function wb(e,t){var n=e[It];return(n?ka(n):e)[t]}function M3(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 as(e){e.P||(e.P=!0,e.l&&as(e.l))}function xb(e){e.o||(e.o=yE(e.t))}function qw(e,t,n){var r=gE(t)?Ji("MapSet").N(t,n):vE(t)?Ji("MapSet").T(t,n):e.g?function(i,o){var s=Array.isArray(i),a={i:s?1:0,A:o?o.A:Ww(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=a,c=Cd;s&&(l=[a],c=tf);var f=Proxy.revocable(l,c),h=f.revoke,p=f.proxy;return a.k=p,a.j=h,p}(t,n):Ji("ES5").J(t,n);return(n?n.A:Ww()).p.push(r),r}function Boe(e){return Hs(e)||vi(22,e),function t(n){if(!Do(n))return n;var r,i=n[It],o=ou(n);if(i){if(!i.P&&(i.i<4||!Ji("ES5").K(i)))return i.t;i.I=!0,r=R3(n,o),i.I=!1}else r=R3(n,o);return al(r,function(s,a){i&&Ioe(i.t,s)===a||M5(r,s,t(a))}),o===3?new Set(r):r}(e)}function R3(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return yE(e)}function zoe(){function e(o,s){var a=i[o];return a?a.enumerable=s:i[o]=a={configurable:!0,enumerable:s,get:function(){var l=this[It];return Cd.get(l,o)},set:function(l){var c=this[It];Cd.set(c,o,l)}},a}function t(o){for(var s=o.length-1;s>=0;s--){var a=o[s][It];if(!a.P)switch(a.i){case 5:r(a)&&as(a);break;case 4:n(a)&&as(a)}}}function n(o){for(var s=o.t,a=o.k,l=bc(a),c=l.length-1;c>=0;c--){var f=l[c];if(f!==It){var h=s[f];if(h===void 0&&!_c(s,f))return!0;var p=a[f],m=p&&p[It];if(m?m.t!==h:!R5(p,h))return!0}}var g=!!s[It];return l.length!==bc(s).length+(g?0:1)}function r(o){var s=o.k;if(s.length!==o.t.length)return!0;var a=Object.getOwnPropertyDescriptor(s,s.length-1);if(a&&!a.get)return!0;for(var l=0;l1?y-1:0),x=1;x1?f-1:0),p=1;p=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var s=Ji("Patches").$;return Hs(n)?s(n,r):this.produce(n,function(a){return s(a,r)})},e}(),Fr=new Woe,D5=Fr.produce;Fr.produceWithPatches.bind(Fr);Fr.setAutoFreeze.bind(Fr);Fr.setUseProxies.bind(Fr);Fr.applyPatches.bind(Fr);Fr.createDraft.bind(Fr);Fr.finishDraft.bind(Fr);function Yoe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function A3(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 I3(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Kn(1));return n(A5)(e,t)}if(typeof e!="function")throw new Error(Kn(2));var i=e,o=t,s=[],a=s,l=!1;function c(){a===s&&(a=s.slice())}function f(){if(l)throw new Error(Kn(3));return o}function h(v){if(typeof v!="function")throw new Error(Kn(4));if(l)throw new Error(Kn(5));var w=!0;return c(),a.push(v),function(){if(w){if(l)throw new Error(Kn(6));w=!1,c();var b=a.indexOf(v);a.splice(b,1),s=null}}}function p(v){if(!qoe(v))throw new Error(Kn(7));if(typeof v.type>"u")throw new Error(Kn(8));if(l)throw new Error(Kn(9));try{l=!0,o=i(o,v)}finally{l=!1}for(var w=s=a,y=0;y"u")throw new Error(Kn(12));if(typeof n(void 0,{type:dv.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Kn(13))})}function I5(e){for(var t=Object.keys(e),n={},r=0;r"u")throw c&&c.type,new Error(Kn(14));h[m]=w,f=f||w!==v}return f=f||o.length!==Object.keys(l).length,f?h:l}}function hv(){for(var e=arguments.length,t=new Array(e),n=0;n0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]0)for(var x=m.getState(),T=Array.from(n.values()),P=0,k=T;P!0,resetAppUpdate:()=>!1}}),{appUpdateAvailable:Fse,resetAppUpdate:$se}=Ase,jse=Ise,Bse=(e,t)=>{e.serviceFactory("App",Aoe,"MainHeader","Home","MenuLayout","CreateServer","EditServer","Settings","ManageServers","ShlinkVersionsContainer"),e.decorator("App",t(["servers","settings","appUpdated"],["fetchServers","resetAppUpdate"])),e.serviceFactory("appUpdateAvailable",()=>Fse),e.serviceFactory("resetAppUpdate",()=>$se)};function mv(e){return t=>{const{resetSelectedServer:n}=t;return H.useEffect(()=>{n()},[]),C(e,{...t})}}const Fl=({children:e,to:t,className:n,...r})=>C(lI,{className:({isActive:i})=>ge("aside-menu__item",n,{"aside-menu__item--selected":i}),to:t,...r,children:e}),zse=e=>({selectedServer:t,showOnMobile:n=!1})=>{const r=Rs(t),i=r?t.id:"",{pathname:o}=kn(),s=ge("aside-menu",{"aside-menu--hidden":!n}),a=l=>`/server/${i}${l}`;return C("aside",{className:s,children:U("nav",{className:"nav flex-column aside-menu__nav",children:[U(Fl,{to:a("/overview"),children:[C(Fe,{fixedWidth:!0,icon:wQ}),C("span",{className:"aside-menu__item-text",children:"Overview"})]}),U(Fl,{to:a("/list-short-urls/1"),className:ge({"aside-menu__item--selected":o.match("/list-short-urls")!==null}),children:[C(Fe,{fixedWidth:!0,icon:e6}),C("span",{className:"aside-menu__item-text",children:"List short URLs"})]}),U(Fl,{to:a("/create-short-url"),children:[C(Fe,{fixedWidth:!0,icon:TQ,flip:"horizontal"}),C("span",{className:"aside-menu__item-text",children:"Create short URL"})]}),U(Fl,{to:a("/manage-tags"),children:[C(Fe,{fixedWidth:!0,icon:n6}),C("span",{className:"aside-menu__item-text",children:"Manage tags"})]}),U(Fl,{to:a("/manage-domains"),children:[C(Fe,{fixedWidth:!0,icon:eQ}),C("span",{className:"aside-menu__item-text",children:"Manage domains"})]}),U(Fl,{to:a("/edit"),className:"aside-menu__item--push",children:[C(Fe,{fixedWidth:!0,icon:cQ}),C("span",{className:"aside-menu__item-text",children:"Edit this server"})]}),r&&C(e,{className:"aside-menu__item aside-menu__item--danger",textClassName:"aside-menu__item-text",server:t})]})})},Use=({location:e},{error:t})=>class extends H.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 C("div",{className:"home",children:U(fn,{className:"p-4",children:[C("h1",{children:"Oops! This is awkward :S"}),C("p",{children:"It seems that something went wrong. Try refreshing the page or just click this button."}),C("br",{}),C(ht,{outline:!0,color:"primary",onClick:()=>e.reload(),children:"Take me back"})]})});const{children:r}=this.props;return r}};/*! ***************************************************************************** + `);return Array.prototype.forEach.call(o,s=>{Array.prototype.forEach.call(i,a=>{a.addEventListener(s,t,r)})}),function(){Array.prototype.forEach.call(o,a=>{Array.prototype.forEach.call(i,l=>{l.removeEventListener(a,t,r)})})}}const h5=["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"])'];S.oneOfType([S.bool,S.string]),S.string,S.object;const _ne=["className","cssModule","noGutters","tag","widths"],bne=["xs","sm","md","lg","xl","xxl"],Al=S.oneOfType([S.number,S.string]),wne={tag:ke,noGutters:u5(S.bool,"Please use Bootstrap 5 gutter utility classes. https://getbootstrap.com/docs/5.0/layout/gutters/"),className:S.string,cssModule:S.object,xs:Al,sm:Al,md:Al,lg:Al,xl:Al,xxl:Al,widths:S.array},xne={tag:"div",widths:bne};function Qn(e){const{className:t,cssModule:n,noGutters:r,tag:i,widths:o}=e,s=Ze(e,_ne),a=[];o.forEach((c,f)=>{let h=e[c];if(delete s[c],!h)return;const p=!f;a.push(p?`row-cols-${h}`:`row-cols-${c}-${h}`)});const l=je(ge(t,r?"gx-0":null,"row",a),n);return V.createElement(i,Be({},s,{className:l}))}Qn.propTypes=wne;Qn.defaultProps=xne;const Sne=["className","cssModule","widths","tag"],p5=["xs","sm","md","lg","xl","xxl"],S3=S.oneOfType([S.number,S.string]),Il=S.oneOfType([S.bool,S.number,S.string,S.shape({size:S.oneOfType([S.bool,S.number,S.string]),order:S3,offset:S3})]),Cne={tag:ke,xs:Il,sm:Il,md:Il,lg:Il,xl:Il,xxl:Il,className:S.string,cssModule:S.object,widths:S.array},Ene={tag:"div",widths:p5},C3=(e,t,n)=>n===!0||n===""?e?"col":`col-${t}`:n==="auto"?e?"col-auto":`col-${t}-auto`:e?`col-${n}`:`col-${t}-${n}`,Tne=(e,t,n=p5)=>{const r=e,i=[];return n.forEach((o,s)=>{let a=r[o];if(delete r[o],!a&&a!=="")return;const l=!s;if(sv(a)){const c=l?"-":`-${o}-`,f=C3(l,o,a.size);i.push(je(ge({[f]:a.size||a.size==="",[`order${c}${a.order}`]:a.order||a.order===0,[`offset${c}${a.offset}`]:a.offset||a.offset===0}),t))}else{const c=C3(l,o,a);i.push(c)}}),{colClasses:i,modifiedAttributes:r}};function ZC(e){const{className:t,cssModule:n,widths:r,tag:i}=e,o=Ze(e,Sne);let{modifiedAttributes:s,colClasses:a}=Tne(o,n,r);a.length||a.push("col");const l=je(ge(t,a),n);return V.createElement(i,Be({},s,{className:l}))}ZC.propTypes=Cne;ZC.defaultProps=Ene;const One=["expand","className","cssModule","light","dark","fixed","sticky","color","container","tag","children"],Pne={children:S.node,className:S.string,color:S.string,container:S.oneOfType([S.bool,S.string]),cssModule:S.object,dark:S.bool,expand:S.oneOfType([S.bool,S.string]),fixed:S.string,full:S.bool,light:S.bool,role:S.string,sticky:S.string,tag:ke},kne={tag:"nav",expand:!1,container:"fluid"},Mne=e=>e===!1?!1:e===!0||e==="xs"?"navbar-expand":`navbar-expand-${e}`;function KC(e){const{expand:t,className:n,cssModule:r,light:i,dark:o,fixed:s,sticky:a,color:l,container:c,tag:f,children:h}=e,p=Ze(e,One),m=je(ge(n,"navbar",Mne(t),{"navbar-light":i,"navbar-dark":o,[`bg-${l}`]:l,[`fixed-${s}`]:s,[`sticky-${a}`]:a}),r),g=c&&c===!0?"container":`container-${c}`;return V.createElement(f,Be({},p,{className:m}),c?V.createElement("div",{className:g},h):h)}KC.propTypes=Pne;KC.defaultProps=kne;const Rne=["className","cssModule","tag"],Nne={className:S.string,cssModule:S.object,tag:ke},Lne={tag:"a"};function XC(e){const{className:t,cssModule:n,tag:r}=e,i=Ze(e,Rne),o=je(ge(t,"navbar-brand"),n);return V.createElement(r,Be({},i,{className:o}))}XC.propTypes=Nne;XC.defaultProps=Lne;S.string,S.object,S.bool;const Dne=["className","cssModule","children","tag"],Ane={className:S.string,cssModule:S.object,tag:ke,type:S.string,children:S.node},Ine={tag:"button",type:"button"};function QC(e){const{className:t,cssModule:n,children:r,tag:i}=e,o=Ze(e,Dne),s=je(ge(t,"navbar-toggler"),n);return V.createElement(i,Be({"aria-label":"Toggle navigation"},o,{className:s}),r||V.createElement("span",{className:je("navbar-toggler-icon",n)}))}QC.propTypes=Ane;QC.defaultProps=Ine;const Fne=["className","cssModule","tabs","pills","vertical","horizontal","justified","fill","navbar","card","tag"],$ne={card:S.bool,className:S.string,cssModule:S.object,fill:S.bool,horizontal:S.oneOf(["center","end"]),justified:S.bool,navbar:S.bool,pills:S.bool,tabs:S.bool,tag:ke,vertical:S.oneOfType([S.bool,S.string])},jne={tag:"ul",vertical:!1},Bne=e=>e===!1?!1:e===!0||e==="xs"?"flex-column":`flex-${e}-column`;function g_(e){const{className:t,cssModule:n,tabs:r,pills:i,vertical:o,horizontal:s,justified:a,fill:l,navbar:c,card:f,tag:h}=e,p=Ze(e,Fne),m=je(ge(t,c?"navbar-nav":"nav",s?`justify-content-${s}`:!1,Bne(o),{"nav-tabs":r,"card-header-tabs":f&&r,"nav-pills":i,"card-header-pills":f&&i,"nav-justified":a,"nav-fill":l}),n);return V.createElement(h,Be({},p,{className:m}))}g_.propTypes=$ne;g_.defaultProps=jne;const zne=["className","cssModule","active","tag"],Une={active:S.bool,className:S.string,cssModule:S.object,tag:ke},Vne={tag:"li"};function JC(e){const{className:t,cssModule:n,active:r,tag:i}=e,o=Ze(e,zne),s=je(ge(t,"nav-item",r?"active":!1),n);return V.createElement(i,Be({},o,{className:s}))}JC.propTypes=Une;JC.defaultProps=Vne;const Hne=["className","cssModule","active","tag","innerRef"],Wne={active:S.bool,className:S.string,cssModule:S.object,disabled:S.bool,href:S.any,innerRef:S.oneOfType([S.object,S.func,S.string]),onClick:S.func,tag:ke},Yne={tag:"a"};class eE extends V.Component{constructor(t){super(t),this.onClick=this.onClick.bind(this)}onClick(t){if(this.props.disabled){t.preventDefault();return}this.props.href==="#"&&t.preventDefault(),this.props.onClick&&this.props.onClick(t)}render(){let t=this.props,{className:n,cssModule:r,active:i,tag:o,innerRef:s}=t,a=Ze(t,Hne);const l=je(ge(n,"nav-link",{disabled:a.disabled,active:i}),r);return V.createElement(o,Be({},a,{ref:s,onClick:this.onClick,className:l}))}}eE.propTypes=Wne;eE.defaultProps=Yne;var m5=eE;S.string,S.node,S.string,S.object,S.string;S.bool,S.string,S.object;const qne=["className","cssModule","variant","innerRef"],Gne={active:S.bool,"aria-label":S.string,onClick:S.func,variant:S.oneOf(["white"]),className:S.string,cssModule:S.object,innerRef:S.oneOfType([S.object,S.string,S.func])},Zne={"aria-label":"close"};function tE(e){const{className:t,cssModule:n,variant:r,innerRef:i}=e,o=Ze(e,qne),s=je(ge(t,"btn-close",r&&`btn-close-${r}`));return V.createElement("button",Be({ref:i,type:"button",className:s},o))}tE.propTypes=Gne;tE.defaultProps=Zne;const Kne=["active","aria-label","block","className","close","cssModule","color","outline","size","tag","innerRef"],Xne={active:S.bool,"aria-label":S.string,block:S.bool,children:S.node,className:S.string,cssModule:S.object,close:S.bool,color:S.string,disabled:S.bool,innerRef:S.oneOfType([S.object,S.func,S.string]),onClick:S.func,outline:S.bool,size:S.string,tag:ke},Qne={color:"secondary",tag:"button"};function ht(e){const t=H.useCallback(w=>{if(e.disabled){w.preventDefault();return}if(e.onClick)return e.onClick(w)},[e.onClick,e.disabled]);let{active:n,"aria-label":r,block:i,className:o,close:s,cssModule:a,color:l,outline:c,size:f,tag:h,innerRef:p}=e,m=Ze(e,Kne);if(s)return V.createElement(tE,m);const g=`btn${c?"-outline":""}-${l}`,v=je(ge(o,"btn",g,f?`btn-${f}`:!1,i?"d-block w-100":!1,{active:n,disabled:e.disabled}),a);return m.href&&h==="button"&&(h="a"),V.createElement(h,Be({type:h==="button"&&m.onClick?"button":void 0},m,{className:v,ref:p,onClick:t,"aria-label":r}))}ht.propTypes=Xne;ht.defaultProps=Qne;S.func,S.func,S.func,S.bool,S.string,S.object;const xd=V.createContext({}),g5=V.createContext({}),Jne=["className","cssModule","direction","isOpen","group","size","nav","setActiveFromChild","active","tag","menuRole"],ere={a11y:S.bool,disabled:S.bool,direction:S.oneOf(["up","down","start","end","left","right"]),group:S.bool,isOpen:S.bool,nav:S.bool,active:S.bool,size:S.string,tag:ke,toggle:S.func,children:S.node,className:S.string,cssModule:S.object,dropup:S.bool,inNavbar:S.bool,setActiveFromChild:S.bool,menuRole:S.oneOf(["listbox","menu"])},tre={a11y:!0,isOpen:!1,direction:"down",nav:!1,active:!1,inNavbar:!1,setActiveFromChild:!1},nre=[mt.space,mt.enter,mt.up,mt.down,mt.end,mt.home];class v_ extends V.Component{constructor(t){super(t),this.addEvents=this.addEvents.bind(this),this.handleDocumentClick=this.handleDocumentClick.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.removeEvents=this.removeEvents.bind(this),this.toggle=this.toggle.bind(this),this.handleMenuRef=this.handleMenuRef.bind(this),this.handleToggleRef=this.handleToggleRef.bind(this),this.containerRef=V.createRef(),this.menuRef=V.createRef(),this.toggleRef=V.createRef()}componentDidMount(){this.handleProps()}componentDidUpdate(t){this.props.isOpen!==t.isOpen&&this.handleProps()}componentWillUnmount(){this.removeEvents()}handleMenuRef(t){this.menuRef.current=t}handleToggleRef(t){this.toggleRef.current=t}handleDocumentClick(t){if(t&&(t.which===3||t.type==="keyup"&&t.which!==mt.tab))return;const n=this.getContainer(),r=this.getMenu(),i=this.getToggle(),o=t.target===i,s=r&&r.contains(t.target)&&r!==t.target;let a=!1;n&&(a=n.classList.contains("input-group")&&n.classList.contains("dropdown")&&t.target.tagName==="INPUT"),!((o&&!a||s)&&(t.type!=="keyup"||t.which===mt.tab))&&this.toggle(t)}handleKeyDown(t){const n=t.target.getAttribute("role")==="menuitem"||t.target.getAttribute("role")==="option",r=this.getMenuCtrl()===t.target,i=mt.tab===t.which;if(!(/input|textarea/i.test(t.target.tagName)||i&&!this.props.a11y||i&&!(n||r))&&((nre.indexOf(t.which)!==-1||t.which>=48&&t.which<=90)&&t.preventDefault(),!this.props.disabled&&(r&&([mt.space,mt.enter,mt.up,mt.down].indexOf(t.which)>-1?(this.props.isOpen||this.toggle(t),setTimeout(()=>this.getMenuItems()[0].focus())):this.props.isOpen&&i?(t.preventDefault(),this.getMenuItems()[0].focus()):this.props.isOpen&&t.which===mt.esc&&this.toggle(t)),this.props.isOpen&&n))){if([mt.tab,mt.esc].indexOf(t.which)>-1)this.toggle(t),this.getMenuCtrl().focus();else if([mt.space,mt.enter].indexOf(t.which)>-1)t.target.click(),this.getMenuCtrl().focus();else if([mt.down,mt.up].indexOf(t.which)>-1||[mt.n,mt.p].indexOf(t.which)>-1&&t.ctrlKey){const o=this.getMenuItems();let s=o.indexOf(t.target);mt.up===t.which||mt.p===t.which&&t.ctrlKey?s=s!==0?s-1:o.length-1:(mt.down===t.which||mt.n===t.which&&t.ctrlKey)&&(s=s===o.length-1?0:s+1),o[s].focus()}else if(mt.end===t.which){const o=this.getMenuItems();o[o.length-1].focus()}else if(mt.home===t.which)this.getMenuItems()[0].focus();else if(t.which>=48&&t.which<=90){const o=this.getMenuItems(),s=String.fromCharCode(t.which).toLowerCase();for(let a=0;adocument.addEventListener(t,this.handleDocumentClick,!0))}removeEvents(){["click","touchstart","keyup"].forEach(t=>document.removeEventListener(t,this.handleDocumentClick,!0))}toggle(t){return this.props.disabled?t&&t.preventDefault():this.props.toggle(t)}render(){const t=Tr(this.props,["toggle","disabled","inNavbar","a11y"]),{className:n,cssModule:r,direction:i,isOpen:o,group:s,size:a,nav:l,setActiveFromChild:c,active:f,tag:h,menuRole:p}=t,m=Ze(t,Jne),g=h||(l?"li":"div");let v=!1;c&&V.Children.map(this.props.children[1].props.children,y=>{y&&y.props.active&&(v=!0)});const w=je(ge(n,l&&f?"active":!1,c&&v?"active":!1,{"btn-group":s,[`btn-group-${a}`]:!!a,dropdown:!s,dropup:i==="up",dropstart:i==="start"||i==="left",dropend:i==="end"||i==="right",show:o,"nav-item":l}),r);return this.context.insideInputGroup?V.createElement(xd.Provider,{value:this.getContextValue()},V.createElement(a3,null,V.Children.map(this.props.children,y=>V.cloneElement(y,{onKeyDown:this.handleKeyDown})))):V.createElement(xd.Provider,{value:this.getContextValue()},V.createElement(a3,null,V.createElement(g,Be({},m,{[typeof g=="string"?"ref":"innerRef"]:this.containerRef,onKeyDown:this.handleKeyDown,className:w}))))}}v_.propTypes=ere;v_.defaultProps=tre;v_.contextType=g5;var ou=v_;const rre={children:S.node};function y_(e){return V.createElement(ou,Be({group:!0},e))}y_.propTypes=rre;S.string,S.string,S.object,S.string,S.string,S.bool;S.string,S.string,S.object,S.string;const ire=["className","cssModule","divider","tag","header","active","text"],ore={children:S.node,active:S.bool,disabled:S.bool,divider:S.bool,tag:ke,header:S.bool,onClick:S.func,className:S.string,cssModule:S.object,toggle:S.bool,text:S.bool},sre={tag:"button",toggle:!0};class __ extends V.Component{constructor(t){super(t),this.onClick=this.onClick.bind(this),this.getTabIndex=this.getTabIndex.bind(this)}onClick(t){const{disabled:n,header:r,divider:i,text:o}=this.props;if(n||r||i||o){t.preventDefault();return}this.props.onClick&&this.props.onClick(t),this.props.toggle&&this.context.toggle(t)}getRole(){return this.context.menuRole==="listbox"?"option":"menuitem"}getTabIndex(){const{disabled:t,header:n,divider:r,text:i}=this.props;return t||n||r||i?"-1":"0"}render(){const t=this.getTabIndex(),n=t>-1?this.getRole():void 0;let r=Tr(this.props,["toggle"]),{className:i,cssModule:o,divider:s,tag:a,header:l,active:c,text:f}=r,h=Ze(r,ire);const p=je(ge(i,{disabled:h.disabled,"dropdown-item":!s&&!l&&!f,active:c,"dropdown-header":l,"dropdown-divider":s,"dropdown-item-text":f}),o);return a==="button"&&(l?a="h6":s?a="div":h.href?a="a":f&&(a="span")),V.createElement(a,Be({type:a==="button"&&(h.onClick||this.props.toggle)?"button":void 0},h,{tabIndex:t,role:n,className:p,onClick:this.onClick}))}}__.propTypes=ore;__.defaultProps=sre;__.contextType=xd;var Ve=__;const are=["className","cssModule","dark","end","right","tag","flip","modifiers","persist","strategy","container","updateOnSelect"],lre={tag:ke,children:S.node.isRequired,dark:S.bool,end:S.bool,flip:S.bool,modifiers:S.array,className:S.string,cssModule:S.object,style:S.object,persist:S.bool,strategy:S.string,container:Vs,updateOnSelect:S.bool,right:u5(S.bool,'Please use "end" instead.')},cre={tag:"div",flip:!0,modifiers:[]},ure={up:"top",left:"left",right:"right",start:"left",end:"right",down:"bottom"};class b_ extends V.Component{getRole(){return this.context.menuRole==="listbox"?"listbox":"menu"}render(){const t=this.props,{className:n,cssModule:r,dark:i,end:o,right:s,tag:a,flip:l,modifiers:c,persist:f,strategy:h,container:p,updateOnSelect:m}=t,g=Ze(t,are),v=je(ge(n,"dropdown-menu",{"dropdown-menu-dark":i,"dropdown-menu-end":o||s,show:this.context.isOpen}),r),w=a;if(f||this.context.isOpen&&!this.context.inNavbar){const T=`${ure[this.context.direction]||"bottom"}-${o||s?"end":"start"}`,P=[...c,{name:"flip",enabled:!!l}],k=V.createElement(o5,{placement:T,modifiers:P,strategy:h},({ref:N,style:D,placement:z,update:A})=>{let Y=qe(qe({},this.props.style),D);const q=ee=>{N(ee);const{onMenuRef:K}=this.context;K&&K(ee)};return V.createElement(w,Be({tabIndex:"-1",role:this.getRole(),ref:q},g,{style:Y,"aria-hidden":!this.context.isOpen,className:v,"data-popper-placement":z,onClick:()=>m&&A()}))});return p?Ua.createPortal(k,Hc(p)):k}const{onMenuRef:y}=this.context;return V.createElement(w,Be({tabIndex:"-1",role:this.getRole()},g,{ref:y,"aria-hidden":!this.context.isOpen,className:v,"data-popper-placement":g.placement}))}}b_.propTypes=lre;b_.defaultProps=cre;b_.contextType=xd;var vl=b_;const fre=["className","color","cssModule","caret","split","nav","tag","innerRef"],dre={caret:S.bool,color:S.string,children:S.node,className:S.string,cssModule:S.object,disabled:S.bool,onClick:S.func,"aria-haspopup":S.bool,split:S.bool,tag:ke,nav:S.bool,innerRef:S.oneOfType([S.object,S.string,S.func])},hre={color:"secondary","aria-haspopup":!0};class w_ extends V.Component{constructor(t){super(t),this.onClick=this.onClick.bind(this)}onClick(t){if(this.props.disabled||this.context.disabled){t.preventDefault();return}this.props.nav&&!this.props.tag&&t.preventDefault(),this.props.onClick&&this.props.onClick(t),this.context.toggle(t)}getRole(){return this.context.menuRole||this.props["aria-haspopup"]}render(){const t=this.props,{className:n,color:r,cssModule:i,caret:o,split:s,nav:a,tag:l,innerRef:c}=t,f=Ze(t,fre),h=f["aria-label"]||"Toggle Dropdown",p=je(ge(n,{"dropdown-toggle":o||s,"dropdown-toggle-split":s,"nav-link":a}),i),m=typeof f.children<"u"?f.children:V.createElement("span",{className:"visually-hidden"},h);let g;return a&&!l?(g="a",f.href="#"):l?g=l:(g=ht,f.color=r,f.cssModule=i),this.context.inNavbar?V.createElement(g,Be({},f,{className:p,onClick:this.onClick,ref:this.context.onToggleRef,"aria-expanded":this.context.isOpen,"aria-haspopup":this.getRole(),children:m})):V.createElement(sne,{innerRef:c},({ref:v})=>{const w=y=>{v(y);const{onToggleRef:b}=this.context;b&&b(y)};return V.createElement(g,Be({},f,{[typeof g=="string"?"ref":"innerRef"]:w,className:p,onClick:this.onClick,"aria-expanded":this.context.isOpen,"aria-haspopup":this.getRole(),children:m}))})}}w_.propTypes=dre;w_.defaultProps=hre;w_.contextType=xd;var su=w_;const pre=["tag","baseClass","baseClassActive","className","cssModule","children","innerRef"],mre=qe(qe({},Ho.propTypes),{},{children:S.oneOfType([S.arrayOf(S.node),S.node]),tag:ke,baseClass:S.string,baseClassActive:S.string,className:S.string,cssModule:S.object,innerRef:S.oneOfType([S.object,S.string,S.func])}),gre=qe(qe({},Ho.defaultProps),{},{tag:"div",baseClass:"fade",baseClassActive:"show",timeout:il.Fade,appear:!0,enter:!0,exit:!0,in:!0});function Xt(e){const{tag:t,baseClass:n,baseClassActive:r,className:i,cssModule:o,children:s,innerRef:a}=e,l=Ze(e,pre),c=c5(l,ov),f=Tr(l,ov);return V.createElement(Ho,c,h=>{const m=je(ge(i,n,h==="entered"&&r),o);return V.createElement(t,Be({className:m},f,{ref:a}),s)})}Xt.propTypes=mre;Xt.defaultProps=gre;V.createContext({});S.node,S.string,S.object,S.bool,S.oneOfType([S.object,S.string,S.func]),S.oneOfType([S.array,S.string]).isRequired,S.func.isRequired;S.string,S.object,S.oneOfType([S.object,S.string,S.func]),S.node,S.oneOfType([S.array,S.string]),S.bool;S.node,S.string,S.object,S.oneOfType([S.object,S.string,S.func]),S.string.isRequired;S.node,S.string,S.object,S.oneOfType([S.object,S.string,S.func]);const vre=["tag","horizontal","isOpen","className","navbar","cssModule","children","innerRef"],yre=qe(qe({},Ho.propTypes),{},{horizontal:S.bool,isOpen:S.bool,children:S.oneOfType([S.arrayOf(S.node),S.node]),tag:ke,className:S.node,navbar:S.bool,cssModule:S.object,innerRef:S.shape({current:S.object})}),_re=qe(qe({},Ho.defaultProps),{},{horizontal:!1,isOpen:!1,appear:!1,enter:!0,exit:!0,tag:"div",timeout:il.Collapse}),bre={[yo.ENTERING]:"collapsing",[yo.ENTERED]:"collapse show",[yo.EXITING]:"collapsing",[yo.EXITED]:"collapse"};function wre(e){return bre[e]||"collapse"}class nE extends H.Component{constructor(t){super(t),this.state={dimension:null},this.nodeRef=t.innerRef||V.createRef(),["onEntering","onEntered","onExit","onExiting","onExited"].forEach(n=>{this[n]=this[n].bind(this)})}onEntering(t,n){const r=this.getNode();this.setState({dimension:this.getDimension(r)}),this.props.onEntering(r,n)}onEntered(t,n){const r=this.getNode();this.setState({dimension:null}),this.props.onEntered(r,n)}onExit(){const t=this.getNode();this.setState({dimension:this.getDimension(t)}),this.props.onExit(t)}onExiting(){const t=this.getNode();this.getDimension(t),this.setState({dimension:0}),this.props.onExiting(t)}onExited(){const t=this.getNode();this.setState({dimension:null}),this.props.onExited(t)}getNode(){return this.nodeRef.current}getDimension(t){return this.props.horizontal?t.scrollWidth:t.scrollHeight}render(){const t=this.props,{tag:n,horizontal:r,isOpen:i,className:o,navbar:s,cssModule:a,children:l,innerRef:c}=t,f=Ze(t,vre),{dimension:h}=this.state,p=c5(f,ov),m=Tr(f,ov);return V.createElement(Ho,Be({},p,{in:i,nodeRef:this.nodeRef,onEntering:this.onEntering,onEntered:this.onEntered,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}),g=>{let v=wre(g);const w=je(ge(o,r&&"collapse-horizontal",v,s&&"navbar-collapse"),a),y=h===null?null:{[r?"width":"height"]:h};return V.createElement(n,Be({},m,{style:qe(qe({},m.style),y),className:w,ref:this.nodeRef}),l)})}}nE.propTypes=yre;nE.defaultProps=_re;var v5=nE;S.string.isRequired,S.string,S.node,S.object,S.oneOfType([S.object,S.string,S.func]);S.node,S.string,S.string,S.object,S.oneOfType([S.object,S.func,S.string]),S.bool;const xre=["className","cssModule","color","body","inverse","outline","tag","innerRef"],Sre={body:S.bool,className:S.string,color:S.string,cssModule:S.object,innerRef:S.oneOfType([S.object,S.string,S.func]),inverse:S.bool,outline:S.bool,tag:ke},Cre={tag:"div"};function Er(e){const{className:t,cssModule:n,color:r,body:i,inverse:o,outline:s,tag:a,innerRef:l}=e,c=Ze(e,xre),f=je(ge(t,"card",o?"text-white":!1,i?"card-body":!1,r?`${s?"border":"bg"}-${r}`:!1),n);return V.createElement(a,Be({},c,{className:f,ref:l}))}Er.propTypes=Sre;Er.defaultProps=Cre;S.string,S.object;S.string,S.object;S.string,S.object;const Ere=["className","cssModule","innerRef","tag"],Tre={className:S.string,cssModule:S.object,innerRef:S.oneOfType([S.object,S.string,S.func]),tag:ke},Ore={tag:"div"};function ol(e){const{className:t,cssModule:n,innerRef:r,tag:i}=e,o=Ze(e,Ere),s=je(ge(t,"card-body"),n);return V.createElement(i,Be({},o,{className:s,ref:r}))}ol.propTypes=Tre;ol.defaultProps=Ore;S.oneOfType([S.object,S.func,S.string]),S.string,S.object;const Pre=["className","cssModule","tag"],kre={className:S.string,cssModule:S.object,tag:ke},Mre={tag:"div"};function rE(e){const{className:t,cssModule:n,tag:r}=e,i=Ze(e,Pre),o=je(ge(t,"card-footer"),n);return V.createElement(r,Be({},i,{className:o}))}rE.propTypes=kre;rE.defaultProps=Mre;const Rre=["className","cssModule","tag"],Nre={className:S.string,cssModule:S.object,tag:ke},Lre={tag:"div"};function sl(e){const{className:t,cssModule:n,tag:r}=e,i=Ze(e,Rre),o=je(ge(t,"card-header"),n);return V.createElement(r,Be({},i,{className:o}))}sl.propTypes=Nre;sl.defaultProps=Lre;S.bool,S.string,S.object,S.bool;S.string,S.object;const mm=V.createContext({}),Dre=["in","children","cssModule","slide","tag","className"];class x_ extends V.Component{constructor(t){super(t),this.state={startAnimation:!1},this.onEnter=this.onEnter.bind(this),this.onEntering=this.onEntering.bind(this),this.onExit=this.onExit.bind(this),this.onExiting=this.onExiting.bind(this),this.onExited=this.onExited.bind(this)}onEnter(t,n){this.setState({startAnimation:!1}),this.props.onEnter(t,n)}onEntering(t,n){const{offsetHeight:r}=t;return this.setState({startAnimation:!0}),this.props.onEntering(t,n),r}onExit(t){this.setState({startAnimation:!1}),this.props.onExit(t)}onExiting(t){this.setState({startAnimation:!0}),t.dispatchEvent(new CustomEvent("slide.bs.carousel")),this.props.onExiting(t)}onExited(t){t.dispatchEvent(new CustomEvent("slid.bs.carousel")),this.props.onExited(t)}render(){const t=this.props,{in:n,children:r,cssModule:i,slide:o,tag:s,className:a}=t,l=Ze(t,Dre);return V.createElement(Ho,Be({},l,{enter:o,exit:o,in:n,onEnter:this.onEnter,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}),c=>{const{direction:f}=this.context,h=c===yo.ENTERED||c===yo.EXITING,p=(c===yo.ENTERING||c===yo.EXITING)&&this.state.startAnimation&&(f==="end"?"carousel-item-start":"carousel-item-end"),m=c===yo.ENTERING&&(f==="end"?"carousel-item-next":"carousel-item-prev"),g=je(ge(a,"carousel-item",h&&"active",p,m),i);return V.createElement(s,{className:g},r)})}}x_.propTypes=qe(qe({},Ho.propTypes),{},{tag:ke,in:S.bool,cssModule:S.object,children:S.node,slide:S.bool,className:S.string});x_.defaultProps=qe(qe({},Ho.defaultProps),{},{tag:"div",timeout:il.Carousel,slide:!0});x_.contextType=mm;var y5=x_;const Are=40,_5={activeIndex:S.number,next:S.func.isRequired,previous:S.func.isRequired,keyboard:S.bool,pause:S.oneOf(["hover",!1]),ride:S.oneOf(["carousel"]),interval:S.oneOfType([S.number,S.string,S.bool]),children:S.array,mouseEnter:S.func,mouseLeave:S.func,slide:S.bool,dark:S.bool,fade:S.bool,cssModule:S.object,className:S.string,enableTouch:S.bool},Ire=Object.keys(_5),Fre={interval:5e3,pause:"hover",keyboard:!0,slide:!0,enableTouch:!0,fade:!1};class iE extends V.Component{constructor(t){super(t),this.handleKeyPress=this.handleKeyPress.bind(this),this.renderItems=this.renderItems.bind(this),this.hoverStart=this.hoverStart.bind(this),this.hoverEnd=this.hoverEnd.bind(this),this.handleTouchStart=this.handleTouchStart.bind(this),this.handleTouchEnd=this.handleTouchEnd.bind(this),this.touchStartX=0,this.touchStartY=0,this.state={activeIndex:this.props.activeIndex,direction:"end",indicatorClicked:!1}}componentDidMount(){this.props.ride==="carousel"&&this.setInterval(),document.addEventListener("keyup",this.handleKeyPress)}static getDerivedStateFromProps(t,n){let r=null,{activeIndex:i,direction:o,indicatorClicked:s}=n;return t.activeIndex!==i&&(t.activeIndex===i+1?o="end":t.activeIndex===i-1?o="start":t.activeIndex{this.props.next()},parseInt(this.props.interval,10)))}clearInterval(){clearInterval(this.cycleInterval)}hoverStart(...t){this.props.pause==="hover"&&this.clearInterval(),this.props.mouseEnter&&this.props.mouseEnter(...t)}hoverEnd(...t){this.props.pause==="hover"&&this.setInterval(),this.props.mouseLeave&&this.props.mouseLeave(...t)}renderItems(t,n){const{slide:r}=this.props;return V.createElement("div",{className:n},t.map((i,o)=>{const s=o===this.state.activeIndex;return V.cloneElement(i,{in:s,slide:r})}))}render(){const{cssModule:t,slide:n,className:r,dark:i,fade:o}=this.props,s=Tr(this.props,Ire),a=je(ge(r,"carousel",o&&"carousel-fade",n&&"slide",i&&"carousel-dark"),t),l=je(ge("carousel-inner"),t),c=this.props.children.filter(y=>y!=null&&typeof y!="boolean");if(c.every(y=>y.type===y5))return V.createElement("div",Be({},s,{className:a,onMouseEnter:this.hoverStart,onMouseLeave:this.hoverEnd}),V.createElement(mm.Provider,{value:this.getContextValue()},this.renderItems(c,l)));if(c[0]instanceof Array){const y=c[0],b=c[1],x=c[2];return V.createElement("div",Be({},s,{className:a,onMouseEnter:this.hoverStart,onMouseLeave:this.hoverEnd}),V.createElement(mm.Provider,{value:this.getContextValue()},this.renderItems(y,l),b,x))}const h=c[0],p=y=>{typeof h.props.onClickHandler=="function"&&this.setState({indicatorClicked:!0},()=>h.props.onClickHandler(y))},m=V.cloneElement(h,{onClickHandler:p}),g=c[1],v=c[2],w=c[3];return V.createElement("div",Be({},s,{className:a,onMouseEnter:this.hoverStart,onMouseLeave:this.hoverEnd,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd}),V.createElement(mm.Provider,{value:this.getContextValue()},m,this.renderItems(g,l),v,w))}}iE.propTypes=_5;iE.defaultProps=Fre;var $re=iE;const jre=["direction","onClickHandler","cssModule","directionText","className"];function qw(e){const{direction:t,onClickHandler:n,cssModule:r,directionText:i,className:o}=e,s=Ze(e,jre),a=je(ge(o,`carousel-control-${t}`),r),l=je(ge(`carousel-control-${t}-icon`),r),c=je(ge("visually-hidden"),r);return V.createElement("a",Be({},s,{className:a,style:{cursor:"pointer"},role:"button",tabIndex:"0",onClick:f=>{f.preventDefault(),n()}}),V.createElement("span",{className:l,"aria-hidden":"true"}),V.createElement("span",{className:c},i||t))}qw.propTypes={direction:S.oneOf(["prev","next"]).isRequired,onClickHandler:S.func.isRequired,cssModule:S.object,directionText:S.string,className:S.string};const Bre=["items","activeIndex","cssModule","onClickHandler","className"];function b5(e){const{items:t,activeIndex:n,cssModule:r,onClickHandler:i,className:o}=e,s=Ze(e,Bre),a=je(ge(o,"carousel-indicators"),r),l=t.map((c,f)=>{const h=je(ge({active:n===f}),r);return V.createElement("button",{"aria-label":c.caption,"data-bs-target":!0,type:"button",key:`${c.key||Object.values(c).join("")}`,onClick:p=>{p.preventDefault(),i(f)},className:h})});return V.createElement("div",Be({className:a},s),l)}b5.propTypes={activeIndex:S.number.isRequired,className:S.string,cssModule:S.object,items:S.array.isRequired,onClickHandler:S.func.isRequired};function w5(e){const{captionHeader:t,captionText:n,cssModule:r,className:i}=e,o=je(ge(i,"carousel-caption","d-none","d-md-block"),r);return V.createElement("div",{className:o},V.createElement("h3",null,t),V.createElement("p",null,n))}w5.propTypes={captionHeader:S.node,captionText:S.node.isRequired,className:S.string,cssModule:S.object};const zre=["defaultActiveIndex","autoPlay","indicators","controls","items","goToIndex"],Ure={items:S.array.isRequired,indicators:S.bool,controls:S.bool,autoPlay:S.bool,defaultActiveIndex:S.number,activeIndex:S.number,next:S.func,previous:S.func,goToIndex:S.func};class x5 extends H.Component{constructor(t){super(t),this.animating=!1,this.state={activeIndex:t.defaultActiveIndex||0},this.next=this.next.bind(this),this.previous=this.previous.bind(this),this.goToIndex=this.goToIndex.bind(this),this.onExiting=this.onExiting.bind(this),this.onExited=this.onExited.bind(this)}onExiting(){this.animating=!0}onExited(){this.animating=!1}next(){this.animating||this.setState(t=>({activeIndex:t.activeIndex===this.props.items.length-1?0:t.activeIndex+1}))}previous(){this.animating||this.setState(t=>({activeIndex:t.activeIndex===0?this.props.items.length-1:t.activeIndex-1}))}goToIndex(t){this.animating||this.setState({activeIndex:t})}render(){const t=this.props,{defaultActiveIndex:n,autoPlay:r,indicators:i,controls:o,items:s,goToIndex:a}=t,l=Ze(t,zre),{activeIndex:c}=this.state,f=s.map(h=>{const p=h.key||h.src;return V.createElement(y5,{onExiting:this.onExiting,onExited:this.onExited,key:p},V.createElement("img",{className:"d-block w-100",src:h.src,alt:h.altText}),V.createElement(w5,{captionText:h.caption,captionHeader:h.header||h.caption}))});return V.createElement($re,Be({activeIndex:c,next:this.next,previous:this.previous,ride:r?"carousel":void 0},l),i&&V.createElement(b5,{items:s,activeIndex:l.activeIndex||c,onClickHandler:a||this.goToIndex}),f,o&&V.createElement(qw,{direction:"prev",directionText:"Previous",onClickHandler:l.previous||this.previous}),o&&V.createElement(qw,{direction:"next",directionText:"Next",onClickHandler:l.next||this.next}))}}x5.propTypes=Ure;x5.defaultProps={controls:!0,indicators:!0,autoPlay:!0};S.string,S.object;const Vre=["className","cssModule","tag"],Hre={className:S.string,cssModule:S.object,tag:ke},Wre={tag:"p"};function oE(e){const{className:t,cssModule:n,tag:r}=e,i=Ze(e,Vre),o=je(ge(t,"card-text"),n);return V.createElement(r,Be({},i,{className:o}))}oE.propTypes=Hre;oE.defaultProps=Wre;const Yre=["className","cssModule","tag"],qre={className:S.string,cssModule:S.object,tag:ke},Gre={tag:"div"};function sE(e){const{className:t,cssModule:n,tag:r}=e,i=Ze(e,Yre),o=je(ge(t,"card-title"),n);return V.createElement(r,Be({},i,{className:o}))}sE.propTypes=qre;sE.defaultProps=Gre;const Zre=["cssModule","children","isOpen","flip","target","offset","fallbackPlacements","placementPrefix","arrowClassName","hideArrow","popperClassName","tag","container","modifiers","strategy","boundariesElement","onClosed","fade","transition","placement"];function Kre(){}const Xre={children:S.oneOfType([S.node,S.func]).isRequired,popperClassName:S.string,placement:S.string,placementPrefix:S.string,arrowClassName:S.string,hideArrow:S.bool,tag:ke,isOpen:S.bool,cssModule:S.object,offset:S.arrayOf(S.number),fallbackPlacements:S.array,flip:S.bool,container:Vs,target:Vs.isRequired,modifiers:S.array,strategy:S.string,boundariesElement:S.oneOfType([S.string,qC]),onClosed:S.func,fade:S.bool,transition:S.shape(Xt.propTypes)},Qre={boundariesElement:"scrollParent",placement:"auto",hideArrow:!1,isOpen:!1,offset:[0,0],flip:!0,container:"body",modifiers:[],onClosed:Kre,fade:!0,transition:qe({},Xt.defaultProps)};class aE extends V.Component{constructor(t){super(t),this.setTargetNode=this.setTargetNode.bind(this),this.getTargetNode=this.getTargetNode.bind(this),this.getRef=this.getRef.bind(this),this.onClosed=this.onClosed.bind(this),this.state={isOpen:t.isOpen}}static getDerivedStateFromProps(t,n){return t.isOpen&&!n.isOpen?{isOpen:t.isOpen}:null}componentDidUpdate(){this._element&&this._element.childNodes&&this._element.childNodes[0]&&this._element.childNodes[0].focus&&this._element.childNodes[0].focus()}onClosed(){this.props.onClosed(),this.setState({isOpen:!1})}getTargetNode(){return this.targetNode}getContainerNode(){return Hc(this.props.container)}getRef(t){this._element=t}setTargetNode(t){this.targetNode=typeof t=="string"?Hc(t):t}renderChildren(){const t=this.props,{cssModule:n,children:r,isOpen:i,flip:o,target:s,offset:a,fallbackPlacements:l,placementPrefix:c,arrowClassName:f,hideArrow:h,popperClassName:p,tag:m,container:g,modifiers:v,strategy:w,boundariesElement:y,onClosed:b,fade:x,transition:T,placement:P}=t,k=Ze(t,Zre),N=je(ge("arrow",f),n),D=je(ge(p,c?`${c}-auto`:""),this.props.cssModule),z=v.map(ee=>ee.name),Y=[...[{name:"offset",options:{offset:a}},{name:"flip",enabled:o,options:{fallbackPlacements:l}},{name:"preventOverflow",options:{boundary:y}}].filter(ee=>!z.includes(ee.name)),...v],q=qe(qe(qe({},Xt.defaultProps),T),{},{baseClass:x?T.baseClass:"",timeout:x?T.timeout:0});return V.createElement(Xt,Be({},q,k,{in:i,onExited:this.onClosed,tag:m}),V.createElement(o5,{referenceElement:this.targetNode,modifiers:Y,placement:P,strategy:w},({ref:ee,style:K,placement:te,isReferenceHidden:oe,arrowProps:se,update:Z})=>V.createElement("div",{ref:ee,style:K,className:D,"data-popper-placement":te,"data-popper-reference-hidden":oe?"true":void 0},typeof r=="function"?r({update:Z}):r,!h&&V.createElement("span",{ref:se.ref,className:N,style:se.style}))))}render(){return this.setTargetNode(this.props.target),this.state.isOpen?this.props.container==="inline"?this.renderChildren():Ua.createPortal(V.createElement("div",{ref:this.getRef},this.renderChildren()),this.getContainerNode()):null}}aE.propTypes=Xre;aE.defaultProps=Qre;var Jre=aE;S.object.isRequired;Vs.isRequired;const S_={children:S.oneOfType([S.node,S.func]),placement:S.oneOf(pne),target:Vs.isRequired,container:Vs,isOpen:S.bool,disabled:S.bool,hideArrow:S.bool,boundariesElement:S.oneOfType([S.string,qC]),className:S.string,innerClassName:S.string,arrowClassName:S.string,popperClassName:S.string,cssModule:S.object,toggle:S.func,autohide:S.bool,placementPrefix:S.string,delay:S.oneOfType([S.shape({show:S.number,hide:S.number}),S.number]),modifiers:S.array,strategy:S.string,offset:S.arrayOf(S.number),innerRef:S.oneOfType([S.func,S.string,S.object]),trigger:S.string,fade:S.bool,flip:S.bool},S5={show:0,hide:50},eie={isOpen:!1,hideArrow:!1,autohide:!1,delay:S5,toggle:function(){},trigger:"click",fade:!0};function C5(e,t){return t&&(e===t||t.contains(e))}function E3(e,t=[]){return t&&t.length&&t.filter(n=>C5(e,n))[0]}class lE extends V.Component{constructor(t){super(t),this._targets=[],this.currentTargetElement=null,this.addTargetEvents=this.addTargetEvents.bind(this),this.handleDocumentClick=this.handleDocumentClick.bind(this),this.removeTargetEvents=this.removeTargetEvents.bind(this),this.toggle=this.toggle.bind(this),this.showWithDelay=this.showWithDelay.bind(this),this.hideWithDelay=this.hideWithDelay.bind(this),this.onMouseOverTooltipContent=this.onMouseOverTooltipContent.bind(this),this.onMouseLeaveTooltipContent=this.onMouseLeaveTooltipContent.bind(this),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.onEscKeyDown=this.onEscKeyDown.bind(this),this.getRef=this.getRef.bind(this),this.state={isOpen:t.isOpen},this._isMounted=!1}componentDidMount(){this._isMounted=!0,this.updateTarget()}componentWillUnmount(){this._isMounted=!1,this.removeTargetEvents(),this._targets=null,this.clearShowTimeout(),this.clearHideTimeout()}static getDerivedStateFromProps(t,n){return t.isOpen&&!n.isOpen?{isOpen:t.isOpen}:null}handleDocumentClick(t){const n=this.props.trigger.split(" ");n.indexOf("legacy")>-1&&(this.props.isOpen||E3(t.target,this._targets))?(this._hideTimeout&&this.clearHideTimeout(),this.props.isOpen&&!C5(t.target,this._popover)?this.hideWithDelay(t):this.props.isOpen||this.showWithDelay(t)):n.indexOf("click")>-1&&E3(t.target,this._targets)&&(this._hideTimeout&&this.clearHideTimeout(),this.props.isOpen?this.hideWithDelay(t):this.showWithDelay(t))}onMouseOverTooltipContent(){this.props.trigger.indexOf("hover")>-1&&!this.props.autohide&&(this._hideTimeout&&this.clearHideTimeout(),this.state.isOpen&&!this.props.isOpen&&this.toggle())}onMouseLeaveTooltipContent(t){this.props.trigger.indexOf("hover")>-1&&!this.props.autohide&&(this._showTimeout&&this.clearShowTimeout(),t.persist(),this._hideTimeout=setTimeout(this.hide.bind(this,t),this.getDelay("hide")))}onEscKeyDown(t){t.key==="Escape"&&this.hide(t)}getRef(t){const{innerRef:n}=this.props;n&&(typeof n=="function"?n(t):typeof n=="object"&&(n.current=t)),this._popover=t}getDelay(t){const{delay:n}=this.props;return typeof n=="object"?isNaN(n[t])?S5[t]:n[t]:n}getCurrentTarget(t){if(!t)return null;const n=this._targets.indexOf(t);return n>=0?this._targets[n]:this.getCurrentTarget(t.parentElement)}show(t){if(!this.props.isOpen){if(this.clearShowTimeout(),this.currentTargetElement=t?t.currentTarget||this.getCurrentTarget(t.target):null,t&&t.composedPath&&typeof t.composedPath=="function"){const n=t.composedPath();this.currentTargetElement=n&&n[0]||this.currentTargetElement}this.toggle(t)}}showWithDelay(t){this._hideTimeout&&this.clearHideTimeout(),this._showTimeout=setTimeout(this.show.bind(this,t),this.getDelay("show"))}hide(t){this.props.isOpen&&(this.clearHideTimeout(),this.currentTargetElement=null,this.toggle(t))}hideWithDelay(t){this._showTimeout&&this.clearShowTimeout(),this._hideTimeout=setTimeout(this.hide.bind(this,t),this.getDelay("hide"))}clearShowTimeout(){clearTimeout(this._showTimeout),this._showTimeout=void 0}clearHideTimeout(){clearTimeout(this._hideTimeout),this._hideTimeout=void 0}addEventOnTargets(t,n,r){this._targets.forEach(i=>{i.addEventListener(t,n,r)})}removeEventOnTargets(t,n,r){this._targets.forEach(i=>{i.removeEventListener(t,n,r)})}addTargetEvents(){if(this.props.trigger){let t=this.props.trigger.split(" ");t.indexOf("manual")===-1&&((t.indexOf("click")>-1||t.indexOf("legacy")>-1)&&document.addEventListener("click",this.handleDocumentClick,!0),this._targets&&this._targets.length&&(t.indexOf("hover")>-1&&(this.addEventOnTargets("mouseover",this.showWithDelay,!0),this.addEventOnTargets("mouseout",this.hideWithDelay,!0)),t.indexOf("focus")>-1&&(this.addEventOnTargets("focusin",this.show,!0),this.addEventOnTargets("focusout",this.hide,!0)),this.addEventOnTargets("keydown",this.onEscKeyDown,!0)))}}removeTargetEvents(){this._targets&&(this.removeEventOnTargets("mouseover",this.showWithDelay,!0),this.removeEventOnTargets("mouseout",this.hideWithDelay,!0),this.removeEventOnTargets("keydown",this.onEscKeyDown,!0),this.removeEventOnTargets("focusin",this.show,!0),this.removeEventOnTargets("focusout",this.hide,!0)),document.removeEventListener("click",this.handleDocumentClick,!0)}updateTarget(){const t=Hc(this.props.target,!0);t!==this._targets&&(this.removeTargetEvents(),this._targets=t?Array.from(t):[],this.currentTargetElement=this.currentTargetElement||this._targets[0],this.addTargetEvents())}toggle(t){return this.props.disabled||!this._isMounted?t&&t.preventDefault():this.props.toggle(t)}render(){this.props.isOpen&&this.updateTarget();const t=this.currentTargetElement||this._targets[0];if(!t)return null;const{className:n,cssModule:r,innerClassName:i,isOpen:o,hideArrow:s,boundariesElement:a,placement:l,placementPrefix:c,arrowClassName:f,popperClassName:h,container:p,modifiers:m,strategy:g,offset:v,fade:w,flip:y,children:b}=this.props,x=Tr(this.props,Object.keys(S_)),T=je(h,r),P=je(i,r);return V.createElement(Jre,{className:n,target:t,isOpen:o,hideArrow:s,boundariesElement:a,placement:l,placementPrefix:c,arrowClassName:f,popperClassName:T,container:p,modifiers:m,strategy:g,offset:v,cssModule:r,fade:w,flip:y},({update:k})=>V.createElement("div",Be({},x,{ref:this.getRef,className:P,role:"tooltip",onMouseOver:this.onMouseOverTooltipContent,onMouseLeave:this.onMouseLeaveTooltipContent,onKeyDown:this.onEscKeyDown}),typeof b=="function"?b({update:k}):b))}}lE.propTypes=S_;lE.defaultProps=eie;var E5=lE;const tie={placement:"right",placementPrefix:"bs-popover",trigger:"click",offset:[0,8]};function Qd(e){const t=ge("popover","show",e.popperClassName),n=ge("popover-inner",e.innerClassName);return V.createElement(E5,Be({},e,{arrowClassName:"popover-arrow",popperClassName:t,innerClassName:n}))}Qd.propTypes=S_;Qd.defaultProps=tie;const nie=["defaultOpen"];class rie extends H.Component{constructor(t){super(t),this.state={isOpen:t.defaultOpen||!1},this.toggle=this.toggle.bind(this)}toggle(){this.setState(t=>({isOpen:!t.isOpen}))}render(){return V.createElement(Qd,Be({isOpen:this.state.isOpen,toggle:this.toggle},Tr(this.props,nie)))}}rie.propTypes=qe({defaultOpen:S.bool},Qd.propTypes);S.string,S.object;S.string,S.object;const iie=["children","className","barClassName","cssModule","value","min","max","animated","striped","color","bar","multi","tag","style","barStyle","barAriaValueText","barAriaLabelledBy"],oie={animated:S.bool,bar:S.bool,barAriaLabelledBy:S.string,barAriaValueText:S.string,barClassName:S.string,barStyle:S.object,children:S.node,className:S.string,cssModule:S.object,color:S.string,max:S.oneOfType([S.string,S.number]),min:S.oneOfType([S.string,S.number]),multi:S.bool,striped:S.bool,style:S.object,tag:ke,value:S.oneOfType([S.string,S.number])},sie={tag:"div",value:0,min:0,max:100,style:{},barStyle:{}};function cE(e){const{children:t,className:n,barClassName:r,cssModule:i,value:o,min:s,max:a,animated:l,striped:c,color:f,bar:h,multi:p,tag:m,style:g,barStyle:v,barAriaValueText:w,barAriaLabelledBy:y}=e,b=Ze(e,iie),x=x3(o)/x3(a)*100,T=je(ge(n,"progress"),i),k={className:je(ge("progress-bar",h&&n||r,l?"progress-bar-animated":null,f?`bg-${f}`:null,c||l?"progress-bar-striped":null),i),style:qe(qe(qe({},h?g:{}),v),{},{width:`${x}%`}),role:"progressbar","aria-valuenow":o,"aria-valuemin":s,"aria-valuemax":a,"aria-valuetext":w,"aria-labelledby":y,children:t};return h?V.createElement(m,Be({},b,k)):V.createElement(m,Be({},b,{style:g,className:T}),p?t:V.createElement("div",k))}cE.propTypes=oie;cE.defaultProps=sie;const aie={children:S.node.isRequired,node:S.any};class T5 extends V.Component{componentWillUnmount(){this.defaultNode&&document.body.removeChild(this.defaultNode),this.defaultNode=null}render(){return GC?(!this.props.node&&!this.defaultNode&&(this.defaultNode=document.createElement("div"),document.body.appendChild(this.defaultNode)),Ua.createPortal(this.props.children,this.props.node||this.defaultNode)):null}}T5.propTypes=aie;var O5=T5;function lv(){}const T3=S.shape(Xt.propTypes),P5={autoFocus:S.bool,backdrop:S.oneOfType([S.bool,S.oneOf(["static"])]),backdropClassName:S.string,backdropTransition:T3,centered:S.bool,children:S.node,contentClassName:S.string,className:S.string,container:Vs,cssModule:S.object,external:S.node,fade:S.bool,fullscreen:S.oneOfType([S.bool,S.oneOf(["sm","md","lg","xl"])]),innerRef:S.oneOfType([S.object,S.string,S.func]),isOpen:S.bool,keyboard:S.bool,labelledBy:S.string,modalClassName:S.string,modalTransition:T3,onClosed:S.func,onEnter:S.func,onExit:S.func,onOpened:S.func,returnFocusAfterClose:S.bool,role:S.string,scrollable:S.bool,size:S.string,toggle:S.func,trapFocus:S.bool,unmountOnClose:S.bool,wrapClassName:S.string,zIndex:S.oneOfType([S.number,S.string])},lie=Object.keys(P5),cie={isOpen:!1,autoFocus:!0,centered:!1,scrollable:!1,role:"dialog",backdrop:!0,keyboard:!0,zIndex:1050,fade:!0,onOpened:lv,onClosed:lv,modalTransition:{timeout:il.Modal},backdropTransition:{mountOnEnter:!0,timeout:il.Fade},unmountOnClose:!0,returnFocusAfterClose:!0,container:"body",trapFocus:!1};class Un extends V.Component{constructor(t){super(t),this._element=null,this._originalBodyPadding=null,this.getFocusableChildren=this.getFocusableChildren.bind(this),this.handleBackdropClick=this.handleBackdropClick.bind(this),this.handleBackdropMouseDown=this.handleBackdropMouseDown.bind(this),this.handleEscape=this.handleEscape.bind(this),this.handleStaticBackdropAnimation=this.handleStaticBackdropAnimation.bind(this),this.handleTab=this.handleTab.bind(this),this.onOpened=this.onOpened.bind(this),this.onClosed=this.onClosed.bind(this),this.manageFocusAfterClose=this.manageFocusAfterClose.bind(this),this.clearBackdropAnimationTimeout=this.clearBackdropAnimationTimeout.bind(this),this.trapFocus=this.trapFocus.bind(this),this.state={isOpen:!1,showStaticBackdropAnimation:!1}}componentDidMount(){const{isOpen:t,autoFocus:n,onEnter:r}=this.props;t&&(this.init(),this.setState({isOpen:!0}),n&&this.setFocus()),r&&r(),document.addEventListener("focus",this.trapFocus,!0),this._isMounted=!0}componentDidUpdate(t,n){if(this.props.isOpen&&!t.isOpen){this.init(),this.setState({isOpen:!0});return}this.props.autoFocus&&this.state.isOpen&&!n.isOpen&&this.setFocus(),this._element&&t.zIndex!==this.props.zIndex&&(this._element.style.zIndex=this.props.zIndex)}componentWillUnmount(){this.clearBackdropAnimationTimeout(),this.props.onExit&&this.props.onExit(),this._element&&(this.destroy(),(this.props.isOpen||this.state.isOpen)&&this.close()),document.removeEventListener("focus",this.trapFocus,!0),this._isMounted=!1}handleBackdropClick(t){if(t.target===this._mouseDownElement){t.stopPropagation();const n=this._dialog?this._dialog.parentNode:null;if(n&&t.target===n&&this.props.backdrop==="static"&&this.handleStaticBackdropAnimation(),!this.props.isOpen||this.props.backdrop!==!0)return;n&&t.target===n&&this.props.toggle&&this.props.toggle(t)}}handleTab(t){if(t.which!==9||this.modalIndex{this.setState({showStaticBackdropAnimation:!1})},100)}onOpened(t,n){this.props.onOpened(),(this.props.modalTransition.onEntered||lv)(t,n)}onClosed(t){const{unmountOnClose:n}=this.props;this.props.onClosed(),(this.props.modalTransition.onExited||lv)(t),n&&this.destroy(),this.close(),this._isMounted&&this.setState({isOpen:!1})}setFocus(){this._dialog&&this._dialog.parentNode&&typeof this._dialog.parentNode.focus=="function"&&this._dialog.parentNode.focus()}getFocusableChildren(){return this._element.querySelectorAll(h5.join(", "))}getFocusedChild(){let t;const n=this.getFocusableChildren();try{t=document.activeElement}catch{t=n[0]}return t}trapFocus(t){if(!this.props.trapFocus||!this._element||this._dialog&&this._dialog.parentNode===t.target||this.modalIndex0&&(t.preventDefault(),t.stopPropagation(),n[0].focus())}init(){try{this._triggeringElement=document.activeElement}catch{this._triggeringElement=null}this._element||(this._element=document.createElement("div"),this._element.setAttribute("tabindex","-1"),this._element.style.position="relative",this._element.style.zIndex=this.props.zIndex,this._mountContainer=Hc(this.props.container),this._mountContainer.appendChild(this._element)),this._originalBodyPadding=a5(),Un.openCount<1&&(Un.originalBodyOverflow=window.getComputedStyle(document.body).overflow),l5(),Un.openCount===0&&(document.body.className=ge(document.body.className,je("modal-open",this.props.cssModule)),document.body.style.overflow="hidden"),this.modalIndex=Un.openCount,Un.openCount+=1}destroy(){this._element&&(this._mountContainer.removeChild(this._element),this._element=null),this.manageFocusAfterClose()}manageFocusAfterClose(){if(this._triggeringElement){const{returnFocusAfterClose:t}=this.props;this._triggeringElement.focus&&t&&this._triggeringElement.focus(),this._triggeringElement=null}}close(){if(Un.openCount<=1){const t=je("modal-open",this.props.cssModule),n=new RegExp(`(^| )${t}( |$)`);document.body.className=document.body.className.replace(n," ").trim(),document.body.style.overflow=Un.originalBodyOverflow}this.manageFocusAfterClose(),Un.openCount=Math.max(0,Un.openCount-1),YC(this._originalBodyPadding)}clearBackdropAnimationTimeout(){this._backdropAnimationTimeout&&(clearTimeout(this._backdropAnimationTimeout),this._backdropAnimationTimeout=void 0)}renderModalDialog(){const t=Tr(this.props,lie),n="modal-dialog";return V.createElement("div",Be({},t,{className:je(ge(n,this.props.className,{[`modal-${this.props.size}`]:this.props.size,[`${n}-centered`]:this.props.centered,[`${n}-scrollable`]:this.props.scrollable,"modal-fullscreen":this.props.fullscreen===!0,[`modal-fullscreen-${this.props.fullscreen}-down`]:typeof this.props.fullscreen=="string"}),this.props.cssModule),role:"document",ref:r=>{this._dialog=r}}),V.createElement("div",{className:je(ge("modal-content",this.props.contentClassName),this.props.cssModule)},this.props.children))}render(){const{unmountOnClose:t}=this.props;if(this._element&&(this.state.isOpen||!t)){const n=!!this._element&&!this.state.isOpen&&!t;this._element.style.display=n?"none":"block";const{wrapClassName:r,modalClassName:i,backdropClassName:o,cssModule:s,isOpen:a,backdrop:l,role:c,labelledBy:f,external:h,innerRef:p}=this.props,m={onClick:this.handleBackdropClick,onMouseDown:this.handleBackdropMouseDown,onKeyUp:this.handleEscape,onKeyDown:this.handleTab,style:{display:"block"},"aria-labelledby":f,role:c,tabIndex:"-1"},g=this.props.fade,v=qe(qe(qe({},Xt.defaultProps),this.props.modalTransition),{},{baseClass:g?this.props.modalTransition.baseClass:"",timeout:g?this.props.modalTransition.timeout:0}),w=qe(qe(qe({},Xt.defaultProps),this.props.backdropTransition),{},{baseClass:g?this.props.backdropTransition.baseClass:"",timeout:g?this.props.backdropTransition.timeout:0}),y=l&&(g?V.createElement(Xt,Be({},w,{in:a&&!!l,cssModule:s,className:je(ge("modal-backdrop",o),s)})):V.createElement("div",{className:je(ge("modal-backdrop","show",o),s)}));return V.createElement(O5,{node:this._element},V.createElement("div",{className:je(r)},V.createElement(Xt,Be({},m,v,{in:a,onEntered:this.onOpened,onExited:this.onClosed,cssModule:s,className:je(ge("modal",i,this.state.showStaticBackdropAnimation&&"modal-static"),s),innerRef:p}),h,this.renderModalDialog()),y))}return null}}Un.propTypes=P5;Un.defaultProps=cie;Un.openCount=0;Un.originalBodyOverflow=null;var Wo=Un;const uie=["className","cssModule","children","toggle","tag","wrapTag","closeAriaLabel","close"],fie={children:S.node,className:S.string,close:S.object,closeAriaLabel:S.string,cssModule:S.object,tag:ke,toggle:S.func,wrapTag:ke},die={tag:"h5",wrapTag:"div",closeAriaLabel:"Close"};function oo(e){let t;const{className:n,cssModule:r,children:i,toggle:o,tag:s,wrapTag:a,closeAriaLabel:l,close:c}=e,f=Ze(e,uie),h=je(ge(n,"modal-header"),r);return!c&&o&&(t=V.createElement("button",{type:"button",onClick:o,className:je("btn-close",r),"aria-label":l})),V.createElement(a,Be({},f,{className:h}),V.createElement(s,{className:je("modal-title",r)},i),c||t)}oo.propTypes=fie;oo.defaultProps=die;const hie=["className","cssModule","tag"],pie={className:S.string,cssModule:S.object,tag:ke},mie={tag:"div"};function Ri(e){const{className:t,cssModule:n,tag:r}=e,i=Ze(e,hie),o=je(ge(t,"modal-body"),n);return V.createElement(r,Be({},i,{className:o}))}Ri.propTypes=pie;Ri.defaultProps=mie;const gie=["className","cssModule","tag"],vie={className:S.string,cssModule:S.object,tag:ke},yie={tag:"div"};function ra(e){const{className:t,cssModule:n,tag:r}=e,i=Ze(e,gie),o=je(ge(t,"modal-footer"),n);return V.createElement(r,Be({},i,{className:o}))}ra.propTypes=vie;ra.defaultProps=yie;const _ie={placement:"top",autohide:!0,placementPrefix:"bs-tooltip",trigger:"hover focus"};function Jd(e){const t=ge("tooltip","show",e.popperClassName),n=ge("tooltip-inner",e.innerClassName);return V.createElement(E5,Be({},e,{arrowClassName:"tooltip-arrow",popperClassName:t,innerClassName:n}))}Jd.propTypes=S_;Jd.defaultProps=_ie;S.bool,S.bool,S.string,S.object,S.bool,S.bool,S.oneOfType([S.func,S.string,S.object]),S.oneOfType([S.bool,S.string]),S.string,S.bool;const bie=["className","cssModule","tag","flush","horizontal","numbered"],wie={className:S.string,cssModule:S.object,flush:S.bool,horizontal:S.oneOfType([S.bool,S.string]),numbered:S.bool,tag:ke},xie={tag:"ul",horizontal:!1,numbered:!1},Sie=e=>e===!1?!1:e===!0||e==="xs"?"list-group-horizontal":`list-group-horizontal-${e}`;function uE(e){const{className:t,cssModule:n,tag:r,flush:i,horizontal:o,numbered:s}=e,a=Ze(e,bie),l=je(ge(t,"list-group",i?"list-group-flush":Sie(o),{"list-group-numbered":s}),n);return V.createElement(r,Be({},a,{className:l}))}uE.propTypes=wie;uE.defaultProps=xie;const Cie=["className","cssModule","tag","innerRef"],Eie={children:S.node,tag:ke,innerRef:S.oneOfType([S.object,S.func,S.string]),className:S.string,cssModule:S.object},Tie={tag:"form"};class k5 extends H.Component{constructor(t){super(t),this.getRef=this.getRef.bind(this),this.submit=this.submit.bind(this)}getRef(t){this.props.innerRef&&this.props.innerRef(t),this.ref=t}submit(){this.ref&&this.ref.submit()}render(){const t=this.props,{className:n,cssModule:r,tag:i,innerRef:o}=t,s=Ze(t,Cie),a=je(n,r);return V.createElement(i,Be({},s,{ref:o,className:a}))}}k5.propTypes=Eie;k5.defaultProps=Tie;S.node,S.string,S.object,S.bool,S.bool;const Oie=["className","cssModule","row","disabled","check","inline","floating","tag","switch"],Pie={children:S.node,row:S.bool,check:S.bool,switch:S.bool,inline:S.bool,floating:S.bool,disabled:S.bool,tag:ke,className:S.string,cssModule:S.object},kie={tag:"div"};function yr(e){const{className:t,cssModule:n,row:r,disabled:i,check:o,inline:s,floating:a,tag:l,switch:c}=e,f=Ze(e,Oie),h=o||c,p=je(ge(t,r?"row":!1,h?"form-check":"mb-3",c?"form-switch":!1,h&&s?"form-check-inline":!1,h&&i?"disabled":!1,a&&"form-floating"),n);return l==="fieldset"&&(f.disabled=i),V.createElement(l,Be({},f,{className:p}))}yr.propTypes=Pie;yr.defaultProps=kie;S.node,S.bool,S.string,S.string,S.object;const Mie=["className","cssModule","type","bsSize","valid","invalid","tag","addon","plaintext","innerRef"],Rie={children:S.node,type:S.string,size:S.oneOfType([S.number,S.string]),bsSize:S.string,valid:S.bool,invalid:S.bool,tag:ke,innerRef:S.oneOfType([S.object,S.func,S.string]),plaintext:S.bool,addon:S.bool,className:S.string,cssModule:S.object},Nie={type:"text"};let fE=class extends V.Component{constructor(t){super(t),this.getRef=this.getRef.bind(this),this.focus=this.focus.bind(this)}getRef(t){this.props.innerRef&&this.props.innerRef(t),this.ref=t}focus(){this.ref&&this.ref.focus()}render(){let t=this.props,{className:n,cssModule:r,type:i,bsSize:o,valid:s,invalid:a,tag:l,addon:c,plaintext:f,innerRef:h}=t,p=Ze(t,Mie);const m=["switch","radio","checkbox"].indexOf(i)>-1,g=/\D/g,v=i==="textarea",w=i==="select",y=i==="range";let b=l||(w||v?i:"input"),x="form-control";f?(x=`${x}-plaintext`,b=l||"input"):y?x="form-range":w?x="form-select":m&&(c?x=null:x="form-check-input"),p.size&&g.test(p.size)&&(Yw(`Please use the prop "bsSize" instead of the "size" to bootstrap's input sizing.`),o=p.size,delete p.size);const T=je(ge(n,a&&"is-invalid",s&&"is-valid",o?w?`form-select-${o}`:`form-control-${o}`:!1,x),r);return(b==="input"||l&&typeof l=="function")&&(p.type=i==="switch"?"checkbox":i),p.children&&!(f||i==="select"||typeof b!="string"||b==="select")&&(Yw(`Input with a type of "${i}" cannot have children. Please use "value"/"defaultValue" instead.`),delete p.children),V.createElement(b,Be({},p,{ref:h,className:T,"aria-invalid":a}))}};fE.propTypes=Rie;fE.defaultProps=Nie;var Wc=fE;const Lie=["className","cssModule","tag","type","size"],Die={className:S.string,cssModule:S.object,size:S.string,tag:ke,type:S.string},Aie={tag:"div"};function eh(e){const{className:t,cssModule:n,tag:r,type:i,size:o}=e,s=Ze(e,Lie),a=je(ge(t,"input-group",o?`input-group-${o}`:null),n);return e.type==="dropdown"?V.createElement(ou,Be({},s,{className:a})):V.createElement(g5.Provider,{value:{insideInputGroup:!0}},V.createElement(r,Be({},s,{className:a})))}eh.propTypes=Die;eh.defaultProps=Aie;S.string,S.object;const _b=S.oneOfType([S.number,S.string]),Fl=S.oneOfType([S.bool,S.string,S.number,S.shape({size:_b,order:_b,offset:_b})]);S.node,S.bool,S.bool,S.string,S.string,S.string,S.object,S.array;S.bool,S.bool,S.node,S.string,S.object,S.bool,S.bool,S.bool,S.bool,S.bool,S.bool,S.bool;function cv(){}const O3=S.shape(Xt.propTypes),M5={autoFocus:S.bool,backdrop:S.bool,backdropClassName:S.string,backdropTransition:O3,children:S.node,className:S.string,container:Vs,cssModule:S.object,direction:S.oneOf(["start","end","bottom","top"]),fade:S.bool,innerRef:S.oneOfType([S.object,S.string,S.func]),isOpen:S.bool,keyboard:S.bool,labelledBy:S.string,offcanvasTransition:O3,onClosed:S.func,onEnter:S.func,onExit:S.func,style:S.object,onOpened:S.func,returnFocusAfterClose:S.bool,role:S.string,scrollable:S.bool,toggle:S.func,trapFocus:S.bool,unmountOnClose:S.bool,zIndex:S.oneOfType([S.number,S.string])},Iie=Object.keys(M5),Fie={isOpen:!1,autoFocus:!0,direction:"start",scrollable:!1,role:"dialog",backdrop:!0,keyboard:!0,zIndex:1050,fade:!0,onOpened:cv,onClosed:cv,offcanvasTransition:{timeout:il.Offcanvas},backdropTransition:{mountOnEnter:!0,timeout:il.Fade},unmountOnClose:!0,returnFocusAfterClose:!0,container:"body",trapFocus:!1};class mi extends V.Component{constructor(t){super(t),this._element=null,this._originalBodyPadding=null,this.getFocusableChildren=this.getFocusableChildren.bind(this),this.handleBackdropClick=this.handleBackdropClick.bind(this),this.handleBackdropMouseDown=this.handleBackdropMouseDown.bind(this),this.handleEscape=this.handleEscape.bind(this),this.handleTab=this.handleTab.bind(this),this.onOpened=this.onOpened.bind(this),this.onClosed=this.onClosed.bind(this),this.manageFocusAfterClose=this.manageFocusAfterClose.bind(this),this.clearBackdropAnimationTimeout=this.clearBackdropAnimationTimeout.bind(this),this.trapFocus=this.trapFocus.bind(this),this.state={isOpen:!1}}componentDidMount(){const{isOpen:t,autoFocus:n,onEnter:r}=this.props;t&&(this.init(),this.setState({isOpen:!0}),n&&this.setFocus()),r&&r(),document.addEventListener("focus",this.trapFocus,!0),this._isMounted=!0}componentDidUpdate(t,n){if(this.props.isOpen&&!t.isOpen){this.init(),this.setState({isOpen:!0});return}this.props.autoFocus&&this.state.isOpen&&!n.isOpen&&this.setFocus(),this._element&&t.zIndex!==this.props.zIndex&&(this._element.style.zIndex=this.props.zIndex)}componentWillUnmount(){this.clearBackdropAnimationTimeout(),this.props.onExit&&this.props.onExit(),this._element&&(this.destroy(),(this.props.isOpen||this.state.isOpen)&&this.close()),document.removeEventListener("focus",this.trapFocus,!0),this._isMounted=!1}handleBackdropClick(t){if(t.target===this._mouseDownElement){t.stopPropagation();const n=this._backdrop;if(!this.props.isOpen||this.props.backdrop!==!0)return;n&&t.target===n&&this.props.toggle&&this.props.toggle(t)}}handleTab(t){if(t.which!==9||this.offcanvasIndex0&&(t.preventDefault(),t.stopPropagation(),n[0].focus())}init(){try{this._triggeringElement=document.activeElement}catch{this._triggeringElement=null}this._element||(this._element=document.createElement("div"),this._element.setAttribute("tabindex","-1"),this._element.style.position="relative",this._element.style.zIndex=this.props.zIndex,this._mountContainer=Hc(this.props.container),this._mountContainer.appendChild(this._element)),this._originalBodyPadding=a5(),l5(),mi.openCount===0&&this.props.backdrop&&!this.props.scrollable&&(document.body.style.overflow="hidden"),this.offcanvasIndex=mi.openCount,mi.openCount+=1}destroy(){this._element&&(this._mountContainer.removeChild(this._element),this._element=null),this.manageFocusAfterClose()}manageFocusAfterClose(){if(this._triggeringElement){const{returnFocusAfterClose:t}=this.props;this._triggeringElement.focus&&t&&this._triggeringElement.focus(),this._triggeringElement=null}}close(){this.manageFocusAfterClose(),mi.openCount=Math.max(0,mi.openCount-1),document.body.style.overflow=null,YC(this._originalBodyPadding)}clearBackdropAnimationTimeout(){this._backdropAnimationTimeout&&(clearTimeout(this._backdropAnimationTimeout),this._backdropAnimationTimeout=void 0)}render(){const{direction:t,unmountOnClose:n}=this.props;if(this._element&&(this.state.isOpen||!n)){const r=!!this._element&&!this.state.isOpen&&!n;this._element.style.display=r?"none":"block";const{className:i,backdropClassName:o,cssModule:s,isOpen:a,backdrop:l,role:c,labelledBy:f,style:h}=this.props,p={onKeyUp:this.handleEscape,onKeyDown:this.handleTab,"aria-labelledby":f,role:c,tabIndex:"-1"},m=this.props.fade,g=qe(qe(qe({},Xt.defaultProps),this.props.offcanvasTransition),{},{baseClass:m?this.props.offcanvasTransition.baseClass:"",timeout:m?this.props.offcanvasTransition.timeout:0}),v=qe(qe(qe({},Xt.defaultProps),this.props.backdropTransition),{},{baseClass:m?this.props.backdropTransition.baseClass:"",timeout:m?this.props.backdropTransition.timeout:0}),w=l&&(m?V.createElement(Xt,Be({},v,{in:a&&!!l,innerRef:b=>{this._backdrop=b},cssModule:s,className:je(ge("offcanvas-backdrop",o),s),onClick:this.handleBackdropClick,onMouseDown:this.handleBackdropMouseDown})):V.createElement("div",{className:je(ge("offcanvas-backdrop","show",o),s),onClick:this.handleBackdropClick,onMouseDown:this.handleBackdropMouseDown})),y=Tr(this.props,Iie);return V.createElement(O5,{node:this._element},V.createElement(Xt,Be({},y,p,g,{in:a,onEntered:this.onOpened,onExited:this.onClosed,cssModule:s,className:je(ge("offcanvas",i,`offcanvas-${t}`),s),innerRef:b=>{this._dialog=b},style:qe(qe({},h),{},{visibility:a?"visible":"hidden"})}),this.props.children),w)}return null}}mi.propTypes=M5;mi.defaultProps=Fie;mi.openCount=0;S.string,S.object;S.node,S.string,S.object,S.string,S.object,S.func;const $ie=["className","listClassName","cssModule","size","tag","listTag","aria-label"],jie={children:S.node,className:S.string,listClassName:S.string,cssModule:S.object,size:S.string,tag:ke,listTag:ke,"aria-label":S.string},Bie={tag:"nav",listTag:"ul","aria-label":"pagination"};function C_(e){const{className:t,listClassName:n,cssModule:r,size:i,tag:o,listTag:s,"aria-label":a}=e,l=Ze(e,$ie),c=je(ge(t),r),f=je(ge(n,"pagination",{[`pagination-${i}`]:!!i}),r);return V.createElement(o,{className:c,"aria-label":a},V.createElement(s,Be({},l,{className:f})))}C_.propTypes=jie;C_.defaultProps=Bie;const zie=["active","className","cssModule","disabled","tag"],Uie={active:S.bool,children:S.node,className:S.string,cssModule:S.object,disabled:S.bool,tag:ke},Vie={tag:"li"};function Ns(e){const{active:t,className:n,cssModule:r,disabled:i,tag:o}=e,s=Ze(e,zie),a=je(ge(n,"page-item",{active:t,disabled:i}),r);return V.createElement(o,Be({},s,{className:a}))}Ns.propTypes=Uie;Ns.defaultProps=Vie;const Hie=["className","cssModule","next","previous","first","last","tag"],Wie={"aria-label":S.string,children:S.node,className:S.string,cssModule:S.object,next:S.bool,previous:S.bool,first:S.bool,last:S.bool,tag:ke},Yie={tag:"a"};function Ls(e){let{className:t,cssModule:n,next:r,previous:i,first:o,last:s,tag:a}=e,l=Ze(e,Hie);const c=je(ge(t,"page-link"),n);let f;i?f="Previous":r?f="Next":o?f="First":s&&(f="Last");const h=e["aria-label"]||f;let p;i?p="‹":r?p="›":o?p="«":s&&(p="»");let{children:m}=e;return m&&Array.isArray(m)&&m.length===0&&(m=null),!l.href&&a==="a"&&(a="button"),(i||r||o||s)&&(m=[V.createElement("span",{"aria-hidden":"true",key:"caret"},m||p),V.createElement("span",{className:"visually-hidden",key:"ariaLabel"},h)]),V.createElement(a,Be({},l,{className:c,"aria-label":h}),m)}Ls.propTypes=Wie;Ls.defaultProps=Yie;const qie=V.createContext({}),R5={tag:ke,activeTab:S.any,className:S.string,cssModule:S.object},Gie={tag:"div"};class N5 extends H.Component{static getDerivedStateFromProps(t,n){return n.activeTab!==t.activeTab?{activeTab:t.activeTab}:null}constructor(t){super(t),this.state={activeTab:this.props.activeTab}}render(){const{className:t,cssModule:n,tag:r}=this.props,i=Tr(this.props,Object.keys(R5)),o=je(ge("tab-content",t),n);return V.createElement(qie.Provider,{value:{activeTabId:this.state.activeTab}},V.createElement(r,Be({},i,{className:o})))}}N5.propTypes=R5;N5.defaultProps=Gie;S.string,S.object,S.any;const Zie=["className","closeClassName","closeAriaLabel","cssModule","tag","color","isOpen","toggle","children","transition","fade","innerRef"],Kie={children:S.node,className:S.string,closeClassName:S.string,closeAriaLabel:S.string,color:S.string,cssModule:S.object,fade:S.bool,innerRef:S.oneOfType([S.object,S.string,S.func]),isOpen:S.bool,tag:ke,toggle:S.func,transition:S.shape(Xt.propTypes)},Xie={color:"success",isOpen:!0,tag:"div",closeAriaLabel:"Close",fade:!0,transition:qe(qe({},Xt.defaultProps),{},{unmountOnExit:!0})};function dE(e){const{className:t,closeClassName:n,closeAriaLabel:r,cssModule:i,tag:o,color:s,isOpen:a,toggle:l,children:c,transition:f,fade:h,innerRef:p}=e,m=Ze(e,Zie),g=je(ge(t,"alert",`alert-${s}`,{"alert-dismissible":l}),i),v=je(ge("btn-close",n),i),w=qe(qe(qe({},Xt.defaultProps),f),{},{baseClass:h?f.baseClass:"",timeout:h?f.timeout:0});return V.createElement(Xt,Be({},m,w,{tag:o,className:g,in:a,role:"alert",innerRef:p}),l?V.createElement("button",{type:"button",className:v,"aria-label":r,onClick:l}):null,c)}dE.propTypes=Kie;dE.defaultProps=Xie;S.node,S.string,S.object,S.bool,S.bool,S.shape(Xt.propTypes),S.oneOfType([S.object,S.string,S.func]);qe(qe({},Xt.defaultProps),{},{unmountOnExit:!0});S.string,S.object,S.oneOfType([S.object,S.string,S.func]);S.oneOfType([S.string,S.node]),S.func,S.string,S.object,S.node,S.string,S.oneOfType([S.string,S.number]),S.object,S.string;const Qie=["className","cssModule","tag","active","disabled","action","color"],Jie={action:S.bool,active:S.bool,className:S.string,cssModule:S.object,color:S.string,disabled:S.bool,tag:ke},eoe={tag:"li"},toe=e=>{e.preventDefault()};function hE(e){const{className:t,cssModule:n,tag:r,active:i,disabled:o,action:s,color:a}=e,l=Ze(e,Qie),c=je(ge(t,i?"active":!1,o?"disabled":!1,s?"list-group-item-action":!1,a?`list-group-item-${a}`:!1,"list-group-item"),n);return o&&(l.onClick=toe),V.createElement(r,Be({},l,{className:c}))}hE.propTypes=Jie;hE.defaultProps=eoe;S.string,S.object;S.string,S.object;const noe=["className","cssModule","tag","type"],roe={className:S.string,cssModule:S.object,tag:ke,type:S.string},ioe={tag:"ul"},pE=H.forwardRef((e,t)=>{const{className:n,cssModule:r,tag:i,type:o}=e,s=Ze(e,noe),a=je(ge(n,o?`list-${o}`:!1),r);return V.createElement(i,Be({},s,{className:a,ref:t}))});pE.name="List";pE.propTypes=roe;pE.defaultProps=ioe;const ooe=["className","cssModule","tag"],soe={className:S.string,cssModule:S.object,tag:ke},aoe={tag:"li"},mE=H.forwardRef((e,t)=>{const{className:n,cssModule:r,tag:i}=e,o=Ze(e,ooe),s=je(ge(n,"list-inline-item"),r);return V.createElement(i,Be({},o,{className:s,ref:t}))});mE.name="ListInlineItem";mE.propTypes=soe;mE.defaultProps=aoe;const loe=["defaultOpen"];class coe extends H.Component{constructor(t){super(t),this.state={isOpen:t.defaultOpen||!1},this.toggle=this.toggle.bind(this)}toggle(){this.setState(t=>({isOpen:!t.isOpen}))}render(){return V.createElement(y_,Be({isOpen:this.state.isOpen,toggle:this.toggle},Tr(this.props,loe)))}}coe.propTypes=qe({defaultOpen:S.bool},y_.propTypes);const uoe=["toggleEvents","defaultOpen"],foe={defaultOpen:S.bool,toggler:S.string.isRequired,toggleEvents:S.arrayOf(S.string)},doe={toggleEvents:vne};class L5 extends H.Component{constructor(t){super(t),this.togglers=null,this.removeEventListeners=null,this.toggle=this.toggle.bind(this),this.state={isOpen:t.defaultOpen||!1}}componentDidMount(){this.togglers=d5(this.props.toggler),this.togglers.length&&(this.removeEventListeners=yne(this.togglers,this.toggle,this.props.toggleEvents))}componentWillUnmount(){this.togglers.length&&this.removeEventListeners&&this.removeEventListeners()}toggle(t){this.setState(({isOpen:n})=>({isOpen:!n})),t.preventDefault()}render(){return V.createElement(v5,Be({isOpen:this.state.isOpen},Tr(this.props,uoe)))}}L5.propTypes=foe;L5.defaultProps=doe;const hoe=["defaultOpen"];class th extends H.Component{constructor(t){super(t),this.state={isOpen:t.defaultOpen||!1},this.toggle=this.toggle.bind(this)}toggle(t){this.setState(n=>({isOpen:!n.isOpen}),()=>{this.props.onToggle&&this.props.onToggle(t,this.state.isOpen)})}render(){return V.createElement(ou,Be({isOpen:this.state.isOpen,toggle:this.toggle},Tr(this.props,hoe)))}}th.propTypes=qe({defaultOpen:S.bool,onToggle:S.func},ou.propTypes);const poe=["defaultOpen"];class Or extends H.Component{constructor(t){super(t),this.state={isOpen:t.defaultOpen||!1},this.toggle=this.toggle.bind(this)}toggle(){this.setState(t=>({isOpen:!t.isOpen}))}render(){return V.createElement(Jd,Be({isOpen:this.state.isOpen,toggle:this.toggle},Tr(this.props,poe)))}}Or.propTypes=qe({defaultOpen:S.bool},Jd.propTypes);S.oneOf(["border","grow"]),S.oneOf(["sm"]),S.oneOf(["primary","secondary","success","danger","warning","info","light","dark"]),S.string,S.object,S.string;qe(qe({},ZC.propTypes),{},{color:S.string,tag:ke,animation:S.oneOf(["glow","wave"]),innerRef:S.oneOfType([S.object,S.func,S.string]),size:S.oneOf(["lg","sm","xs"])});S.string,S.string,S.bool,S.string,S.object;(()=>{if(typeof window!="object"||typeof window.CustomEvent=="function")return;const e=(t,n)=>{n=n||{bubbles:!1,cancelable:!1,detail:null};let r=document.createEvent("CustomEvent");return r.initCustomEvent(t,n.bubbles,n.cancelable,n.detail),r};window.CustomEvent=e})();(()=>{if(typeof Object.values=="function")return;Object.values=t=>Object.keys(t).map(n=>t[n])})();const moe="Left",goe="Right",voe="Up",yoe="Down",lc={delta:10,preventScrollOnSwipe:!1,rotationAngle:0,trackMouse:!1,trackTouch:!0,swipeDuration:1/0,touchEventOptions:{passive:!0}},Gw={first:!0,initial:[0,0],start:0,swiping:!1,xy:[0,0]},P3="mousemove",k3="mouseup",_oe="touchend",boe="touchmove",woe="touchstart";function xoe(e,t,n,r){return e>t?n>0?goe:moe:r>0?yoe:voe}function M3(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 Soe(e,t){const n=f=>{const h="touches"in f;h&&f.touches.length>1||e((p,m)=>{m.trackMouse&&!h&&(document.addEventListener(P3,r),document.addEventListener(k3,s));const{clientX:g,clientY:v}=h?f.touches[0]:f,w=M3([g,v],m.rotationAngle);return m.onTouchStartOrOnMouseDown&&m.onTouchStartOrOnMouseDown({event:f}),Object.assign(Object.assign(Object.assign({},p),Gw),{initial:w.slice(),xy:w,start:f.timeStamp||0})})},r=f=>{e((h,p)=>{const m="touches"in f;if(m&&f.touches.length>1)return h;if(f.timeStamp-h.start>p.swipeDuration)return h.swiping?Object.assign(Object.assign({},h),{swiping:!1}):h;const{clientX:g,clientY:v}=m?f.touches[0]:f,[w,y]=M3([g,v],p.rotationAngle),b=w-h.xy[0],x=y-h.xy[1],T=Math.abs(b),P=Math.abs(x),k=(f.timeStamp||0)-h.start,N=Math.sqrt(T*T+P*P)/(k||1),D=[b/(k||1),x/(k||1)],z=xoe(T,P,b,x),A=typeof p.delta=="number"?p.delta:p.delta[z.toLowerCase()]||lc.delta;if(T{e((h,p)=>{let m;if(h.swiping&&h.eventData){if(f.timeStamp-h.start{document.removeEventListener(P3,r),document.removeEventListener(k3,s)},s=f=>{o(),i(f)},a=(f,h)=>{let p=()=>{};if(f&&f.addEventListener){const m=Object.assign(Object.assign({},lc.touchEventOptions),h.touchEventOptions),g=[[woe,n,m],[boe,r,Object.assign(Object.assign({},m),h.preventScrollOnSwipe?{passive:!1}:{})],[_oe,i,m]];g.forEach(([v,w,y])=>f.addEventListener(v,w,y)),p=()=>g.forEach(([v,w])=>f.removeEventListener(v,w))}return p},c={ref:f=>{f!==null&&e((h,p)=>{if(h.el===f)return h;const m={};return h.el&&h.el!==f&&h.cleanUpTouch&&(h.cleanUpTouch(),m.cleanUpTouch=void 0),p.trackTouch&&f&&(m.cleanUpTouch=a(f,p)),Object.assign(Object.assign(Object.assign({},h),{el:f}),m)})}};return t.trackMouse&&(c.onMouseDown=n),[c,a]}function Coe(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 Eoe(e){const{trackMouse:t}=e,n=H.useRef(Object.assign({},Gw)),r=H.useRef(Object.assign({},lc)),i=H.useRef(Object.assign({},r.current));i.current=Object.assign({},r.current),r.current=Object.assign(Object.assign({},lc),e);let o;for(o in lc)r.current[o]===void 0&&(r.current[o]=lc[o]);const[s,a]=H.useMemo(()=>Soe(l=>n.current=l(n.current,r.current),{trackMouse:t}),[t]);return n.current=Coe(n.current,r.current,i.current,a),s}var kp,Toe=new Uint8Array(16);function Ooe(){if(!kp&&(kp=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!kp))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return kp(Toe)}const Poe=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function koe(e){return typeof e=="string"&&Poe.test(e)}var jn=[];for(var bb=0;bb<256;++bb)jn.push((bb+256).toString(16).substr(1));function Moe(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(jn[e[t+0]]+jn[e[t+1]]+jn[e[t+2]]+jn[e[t+3]]+"-"+jn[e[t+4]]+jn[e[t+5]]+"-"+jn[e[t+6]]+jn[e[t+7]]+"-"+jn[e[t+8]]+jn[e[t+9]]+"-"+jn[e[t+10]]+jn[e[t+11]]+jn[e[t+12]]+jn[e[t+13]]+jn[e[t+14]]+jn[e[t+15]]).toLowerCase();if(!koe(n))throw TypeError("Stringified UUID is invalid");return n}function gE(e,t,n){e=e||{};var r=e.random||(e.rng||Ooe)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return Moe(r)}const Roe=2e3,Noe=(e,t)=>(n=!1,r=Roe)=>{const[i,o]=H.useState(n),s=H.useRef(void 0);return[i,()=>{o(!n),s.current&&t(s.current),s.current=e(()=>o(n),r)}]},$t=(e=!1)=>{const[t,n]=H.useState(e);return[t,()=>n(!t),()=>n(!0),()=>n(!1)]},Loe=(e,t)=>{const n=r=>i=>{i.event.composedPath().some(({classList:s})=>s==null?void 0:s.contains("visits-table"))||document.querySelector(".modal")||r()};return Eoe({delta:40,onSwipedLeft:n(t),onSwipedRight:n(e)})},Doe=(e,t)=>{const[n,r]=H.useState(t);return[n,o=>{const{location:s,history:a}=window,l=gl(s.search);l[e]=o,a.pushState(null,"",`${s.pathname}?${Yd(l)}`),r(o)}]},Aoe=(e,t)=>{const n=H.useRef(!0);H.useEffect(()=>{!n.current&&e(),n.current=!1},t)},ia=()=>{const e=Bo();return()=>e(-1)},Ioe=()=>{const{search:e}=kn();return gl(e)},E_=()=>{const{current:e}=H.useRef(`dom-${gE()}`);return e},yl=()=>H.useRef(null),fn=({title:e,children:t,bodyClassName:n,...r})=>U(Er,{...r,children:[e&&C(sl,{role:"heading",children:e}),C(ol,{className:n,children:t})]});const Foe=({isOpen:e,toggle:t,forceUpdate:n})=>{const[r,,i]=$t();return U(dE,{className:"app-update-banner",isOpen:e,toggle:t,tag:fn,color:"secondary",children:[C("h4",{className:"mb-4",children:"This app has just been updated!"}),U("p",{className:"mb-0",children:["Restart it to enjoy the new features.",U(ht,{role:"button",disabled:r,className:"ms-2",color:"secondary",size:"sm",onClick:()=>{i(),n()},children:[!r&&U(We,{children:["Restart now ",C(Fe,{icon:UQ,className:"ms-1"})]}),r&&C(We,{children:"Restarting..."})]})]})]})},D5=({to:e="/",children:t="Home"})=>C("div",{className:"home",children:U(fn,{className:"p-4",children:[C("h2",{children:"Oops! We could not find requested route."}),C("p",{children:"Use your browser's back button to navigate to the page you have previously come from, or just press this button."}),C("br",{}),C(At,{to:e,className:"btn btn-outline-primary btn-lg",children:t})]})}),$oe=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"})})},vE="#4696e5",joe="rgba(70, 150, 229, 0.4)",A5="#f77f28",Boe="rgba(247, 127, 40, 0.4)",zoe="white",Uoe="#161b22",I5=e=>{var t,n;return(n=(t=document.getElementsByTagName("html"))==null?void 0:t[0])==null?void 0:n.setAttribute("data-theme",e)},Voe=()=>{var e,t;return((t=(e=document.getElementsByTagName("html"))==null?void 0:e[0])==null?void 0:t.getAttribute("data-theme"))==="dark"};const Hoe=(e,t,n,r,i,o,s,a)=>({fetchServers:l,servers:c,settings:f,appUpdated:h,resetAppUpdate:p})=>{const g=kn().pathname==="/";return H.useEffect(()=>{var v;Object.keys(c).length===0&&l(),I5(((v=f.ui)==null?void 0:v.theme)??"light")},[]),U("div",{className:"container-fluid app-container",children:[C(e,{}),U("div",{className:"app",children:[C("div",{className:ge("shlink-wrapper",{"d-flex d-md-block align-items-center":g}),children:U(e_,{children:[C(gt,{index:!0,element:C(t,{})}),C(gt,{path:"/settings/*",element:C(o,{})}),C(gt,{path:"/manage-servers",element:C(s,{})}),C(gt,{path:"/server/create",element:C(r,{})}),C(gt,{path:"/server/:serverId/edit",element:C(i,{})}),C(gt,{path:"/server/:serverId/*",element:C(n,{})}),C(gt,{path:"*",element:C(D5,{})})]})}),C("div",{className:"shlink-footer",children:C(a,{})})]}),C(Foe,{isOpen:h,toggle:p,forceUpdate:$oe})]})};function vi(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:yE(e)?2:_E(e)?3:0}function bc(e,t){return au(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Woe(e,t){return au(e)===2?e.get(t):e[t]}function F5(e,t,n){var r=au(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function $5(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function yE(e){return Xoe&&e instanceof Map}function _E(e){return Qoe&&e instanceof Set}function ka(e){return e.o||e.t}function bE(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=B5(e);delete t[It];for(var n=wc(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=Yoe),Object.freeze(e),t&&al(e,function(n,r){return wE(r,!0)},!0)),e}function Yoe(){vi(2)}function xE(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Ji(e){var t=Qw[e];return t||vi(18,e),t}function qoe(e,t){Qw[e]||(Qw[e]=t)}function Zw(){return Sd}function wb(e,t){t&&(Ji("Patches"),e.u=[],e.s=[],e.v=t)}function uv(e){Kw(e),e.p.forEach(Goe),e.p=null}function Kw(e){e===Sd&&(Sd=e.l)}function R3(e){return Sd={p:[],l:Sd,h:e,m:!0,_:0}}function Goe(e){var t=e[It];t.i===0||t.i===1?t.j():t.O=!0}function xb(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||Ji("ES5").S(t,e,r),r?(n[It].P&&(uv(t),vi(4)),Ao(e)&&(e=fv(t,e),t.l||dv(t,e)),t.u&&Ji("Patches").M(n[It].t,e,t.u,t.s)):e=fv(t,n,[]),uv(t),t.u&&t.v(t.u,t.s),e!==j5?e:void 0}function fv(e,t,n){if(xE(t))return t;var r=t[It];if(!r)return al(t,function(o,s){return N3(e,r,t,o,s,n)},!0),t;if(r.A!==e)return t;if(!r.P)return dv(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=bE(r.k):r.o;al(r.i===3?new Set(i):i,function(o,s){return N3(e,r,i,o,s,n)}),dv(e,i,!1),n&&e.u&&Ji("Patches").R(r,n,e.u,e.s)}return r.o}function N3(e,t,n,r,i,o){if(Hs(i)){var s=fv(e,i,o&&t&&t.i!==3&&!bc(t.D,r)?o.concat(r):void 0);if(F5(n,r,s),!Hs(s))return;e.m=!1}if(Ao(i)&&!xE(i)){if(!e.h.F&&e._<1)return;fv(e,i),t&&t.A.l||dv(e,i)}}function dv(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&wE(t,n)}function Sb(e,t){var n=e[It];return(n?ka(n):e)[t]}function L3(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 ls(e){e.P||(e.P=!0,e.l&&ls(e.l))}function Cb(e){e.o||(e.o=bE(e.t))}function Xw(e,t,n){var r=yE(t)?Ji("MapSet").N(t,n):_E(t)?Ji("MapSet").T(t,n):e.g?function(i,o){var s=Array.isArray(i),a={i:s?1:0,A:o?o.A:Zw(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=a,c=Cd;s&&(l=[a],c=nf);var f=Proxy.revocable(l,c),h=f.revoke,p=f.proxy;return a.k=p,a.j=h,p}(t,n):Ji("ES5").J(t,n);return(n?n.A:Zw()).p.push(r),r}function Zoe(e){return Hs(e)||vi(22,e),function t(n){if(!Ao(n))return n;var r,i=n[It],o=au(n);if(i){if(!i.P&&(i.i<4||!Ji("ES5").K(i)))return i.t;i.I=!0,r=D3(n,o),i.I=!1}else r=D3(n,o);return al(r,function(s,a){i&&Woe(i.t,s)===a||F5(r,s,t(a))}),o===3?new Set(r):r}(e)}function D3(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return bE(e)}function Koe(){function e(o,s){var a=i[o];return a?a.enumerable=s:i[o]=a={configurable:!0,enumerable:s,get:function(){var l=this[It];return Cd.get(l,o)},set:function(l){var c=this[It];Cd.set(c,o,l)}},a}function t(o){for(var s=o.length-1;s>=0;s--){var a=o[s][It];if(!a.P)switch(a.i){case 5:r(a)&&ls(a);break;case 4:n(a)&&ls(a)}}}function n(o){for(var s=o.t,a=o.k,l=wc(a),c=l.length-1;c>=0;c--){var f=l[c];if(f!==It){var h=s[f];if(h===void 0&&!bc(s,f))return!0;var p=a[f],m=p&&p[It];if(m?m.t!==h:!$5(p,h))return!0}}var g=!!s[It];return l.length!==wc(s).length+(g?0:1)}function r(o){var s=o.k;if(s.length!==o.t.length)return!0;var a=Object.getOwnPropertyDescriptor(s,s.length-1);if(a&&!a.get)return!0;for(var l=0;l1?y-1:0),x=1;x1?f-1:0),p=1;p=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var s=Ji("Patches").$;return Hs(n)?s(n,r):this.produce(n,function(a){return s(a,r)})},e}(),Fr=new ese,z5=Fr.produce;Fr.produceWithPatches.bind(Fr);Fr.setAutoFreeze.bind(Fr);Fr.setUseProxies.bind(Fr);Fr.applyPatches.bind(Fr);Fr.createDraft.bind(Fr);Fr.finishDraft.bind(Fr);function tse(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $3(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 j3(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Zn(1));return n(U5)(e,t)}if(typeof e!="function")throw new Error(Zn(2));var i=e,o=t,s=[],a=s,l=!1;function c(){a===s&&(a=s.slice())}function f(){if(l)throw new Error(Zn(3));return o}function h(v){if(typeof v!="function")throw new Error(Zn(4));if(l)throw new Error(Zn(5));var w=!0;return c(),a.push(v),function(){if(w){if(l)throw new Error(Zn(6));w=!1,c();var b=a.indexOf(v);a.splice(b,1),s=null}}}function p(v){if(!nse(v))throw new Error(Zn(7));if(typeof v.type>"u")throw new Error(Zn(8));if(l)throw new Error(Zn(9));try{l=!0,o=i(o,v)}finally{l=!1}for(var w=s=a,y=0;y"u")throw new Error(Zn(12));if(typeof n(void 0,{type:hv.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Zn(13))})}function V5(e){for(var t=Object.keys(e),n={},r=0;r"u")throw c&&c.type,new Error(Zn(14));h[m]=w,f=f||w!==v}return f=f||o.length!==Object.keys(l).length,f?h:l}}function pv(){for(var e=arguments.length,t=new Array(e),n=0;n0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]0)for(var x=m.getState(),T=Array.from(n.values()),P=0,k=T;P!0,resetAppUpdate:()=>!1}}),{appUpdateAvailable:Yse,resetAppUpdate:qse}=Hse,Gse=Wse,Zse=(e,t)=>{e.serviceFactory("App",Hoe,"MainHeader","Home","MenuLayout","CreateServer","EditServer","Settings","ManageServers","ShlinkVersionsContainer"),e.decorator("App",t(["servers","settings","appUpdated"],["fetchServers","resetAppUpdate"])),e.serviceFactory("appUpdateAvailable",()=>Yse),e.serviceFactory("resetAppUpdate",()=>qse)};function gv(e){return t=>{const{resetSelectedServer:n}=t;return H.useEffect(()=>{n()},[]),C(e,{...t})}}const $l=({children:e,to:t,className:n,...r})=>C(fI,{className:({isActive:i})=>ge("aside-menu__item",n,{"aside-menu__item--selected":i}),to:t,...r,children:e}),Kse=e=>({selectedServer:t,showOnMobile:n=!1})=>{const r=Rs(t),i=r?t.id:"",{pathname:o}=kn(),s=ge("aside-menu",{"aside-menu--hidden":!n}),a=l=>`/server/${i}${l}`;return C("aside",{className:s,children:U("nav",{className:"nav flex-column aside-menu__nav",children:[U($l,{to:a("/overview"),children:[C(Fe,{fixedWidth:!0,icon:MQ}),C("span",{className:"aside-menu__item-text",children:"Overview"})]}),U($l,{to:a("/list-short-urls/1"),className:ge({"aside-menu__item--selected":o.match("/list-short-urls")!==null}),children:[C(Fe,{fixedWidth:!0,icon:a6}),C("span",{className:"aside-menu__item-text",children:"List short URLs"})]}),U($l,{to:a("/create-short-url"),children:[C(Fe,{fixedWidth:!0,icon:AQ,flip:"horizontal"}),C("span",{className:"aside-menu__item-text",children:"Create short URL"})]}),U($l,{to:a("/manage-tags"),children:[C(Fe,{fixedWidth:!0,icon:c6}),C("span",{className:"aside-menu__item-text",children:"Manage tags"})]}),U($l,{to:a("/manage-domains"),children:[C(Fe,{fixedWidth:!0,icon:cQ}),C("span",{className:"aside-menu__item-text",children:"Manage domains"})]}),U($l,{to:a("/edit"),className:"aside-menu__item--push",children:[C(Fe,{fixedWidth:!0,icon:yQ}),C("span",{className:"aside-menu__item-text",children:"Edit this server"})]}),r&&C(e,{className:"aside-menu__item aside-menu__item--danger",textClassName:"aside-menu__item-text",server:t})]})})},Xse=({location:e},{error:t})=>class extends H.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 C("div",{className:"home",children:U(fn,{className:"p-4",children:[C("h1",{children:"Oops! This is awkward :S"}),C("p",{children:"It seems that something went wrong. Try refreshing the page or just click this button."}),C("br",{}),C(ht,{outline:!0,color:"primary",onClick:()=>e.reload(),children:"Take me back"})]})});const{children:r}=this.props;return r}};/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any @@ -902,19 +902,19 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var Xw=function(){return Xw=Object.assign||function(t){for(var n,r=1,i=arguments.length;rU(fE,{tag:At,to:`/server/${e}`,className:"servers-list__server-item",children:[t,C(Fe,{icon:RQ,className:"servers-list__server-item-icon"})]}),G5=({servers:e,children:t,embedded:n=!1})=>U(We,{children:[t&&C("h5",{className:"mb-md-3",children:t}),e.length>0&&C(lE,{className:ge("servers-list__list-group",{"servers-list__list-group--embedded":n}),children:e.map(({id:r,name:i})=>C(Hse,{id:r,name:i},r))})]}),Z5=({color:e=mE,className:t})=>C("svg",{className:t,viewBox:"0 0 512 512",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:U("g",{fill:e,children:[C("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"}),C("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"}),C("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"}),C("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 Wse=({servers:e})=>{const t=jo(),n=Object.values(e),r=!!n.length;return H.useEffect(()=>{const i=n.find(({autoConnect:o})=>o);i&&t(`/server/${i.id}`)},[]),C("div",{className:"home",children:C(Er,{className:"home__main-card",children:U(Jn,{className:"g-0",children:[C("div",{className:"col-md-5 d-none d-md-block",children:C("div",{className:"home__logo-wrapper",children:C("div",{className:"home__logo",children:C(Z5,{})})})}),U("div",{className:"col-md-7 home__servers-container",children:[C("div",{className:"home__title-wrapper",children:C("h1",{className:"home__title",children:"Welcome!"})}),C(G5,{embedded:!0,servers:n,children:!r&&U("div",{className:"p-4 text-center",children:[C("p",{className:"mb-5",children:"This application will help you manage your Shlink servers."}),C("p",{children:U(At,{to:"/server/create",className:"btn btn-outline-primary btn-lg me-2",children:[C(Fe,{icon:SC})," ",C("span",{className:"ms-1",children:"Add a server"})]})}),C("p",{className:"mb-0 mt-5",children:C(Ei,{href:"https://shlink.io/documentation",children:U("small",{children:[C("span",{className:"me-1",children:"Learn more about Shlink"})," ",C(Fe,{icon:dQ})]})})})]})})]})]})})})};const Yse=e=>()=>{const[t,n,,r]=$t(),i=kn(),{pathname:o}=i;H.useEffect(r,[i]);const s="/settings",a=ge("main-header__toggle-icon",{"main-header__toggle-icon--opened":t});return U(GC,{color:"primary",dark:!0,fixed:"top",className:"main-header",expand:"md",children:[U(ZC,{tag:At,to:"/",children:[C(Z5,{className:"main-header__brand-logo",color:"white"})," Shlink"]}),C(KC,{onClick:n,children:C(Fe,{icon:kQ,className:a})}),C(u5,{navbar:!0,isOpen:t,children:U(p_,{navbar:!0,className:"ms-auto",children:[C(XC,{children:U(l5,{tag:At,to:s,active:o.startsWith(s),children:[C(Fe,{icon:AQ}),"  Settings"]})}),C(e,{})]})})]})};const su=({children:e})=>C("div",{className:"no-menu-wrapper container-xl",children:e}),qse=e=>({error:"border-danger",default:""})[e],Gse=e=>({error:"text-danger",default:"text-muted"})[e],Eo=({className:e,children:t,loading:n=!1,type:r="default",fullWidth:i=!1})=>{const o=ge({"col-md-12":i,"col-md-10 offset-md-1":!i});return C(Jn,{className:ge("g-0",e),children:C("div",{className:o,children:C(Er,{className:qse(r),body:!0,children:U("h3",{className:ge("text-center mb-0",Gse(r)),children:[n&&C(Fe,{icon:JI,spin:!0}),n&&C("span",{className:"ms-2",children:t??"Loading..."}),!n&&t]})})})})};function K5(e,t){return n=>{const r=Js(),{selectServer:i,selectedServer:o}=n;return H.useEffect(()=>{r.serverId&&i(r.serverId)},[r.serverId]),o?jq(o)?C(t,{}):C(e,{...n}):C(su,{children:C(Eo,{loading:!0})})}}const ir=(e,t)=>gse(e,t,{serializeError:sC}),Zse=(e,t)=>{const n=W3(e),r=W3(t),i=n.pop(),o=r.pop(),s=G3(n,r);return s!==0?s:i&&o?G3(i.split("."),o.split(".")):i||o?i?-1:1:0},Qw=(e,t,n)=>{Jse(n);const r=Zse(e,t);return X5[n].includes(r)},Kse=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,W3=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(Kse);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},Y3=e=>e==="*"||e==="x"||e==="X",q3=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},Xse=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],Qse=(e,t)=>{if(Y3(e)||Y3(t))return 0;const[n,r]=Xse(q3(e),q3(t));return n>r?1:n{for(let n=0;n":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1]},Z3=Object.keys(X5),Jse=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(Z3.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${Z3.join("|")}`)},EE=(e,t,n=1)=>uC(n,e+1).map(t),yi=e=>!Bo(e)&&!Cr(e),oh=e=>Wn(t=>t.preventDefault(),e),Tb=e=>Cr(e)?null:e,_a=e=>t=>e===t,Q5=e=>e?"true":"false",Ob=e=>e===void 0?void 0:Q5(e),eae=(e,{maxVersion:t,minVersion:n})=>{if(!yi(e))return!1;const r=!n||Qw(e,n,">=");return(!t||Qw(e,t,"<="))&&r},J5=fZ(sC,e=>{try{return Qw(e,e,"=")}catch{return!1}}),e8=e=>J5(e)?`v${e}`:e,t8=(e="latest")=>t=>J5(t)?t:e,TE="shlink/selectedServer",tae="1.0.0",nae="999.999.999",rae="latest",iae=Ms(e=>e===rae?nae:e,t8(tae)),Pb={},oae=async(e,t)=>{const n=`${e.id}_${e.url}_${e.apiKey}`;return Pb[n]||(Pb[n]=await t().then(({version:r})=>({version:iae(r),printableVersion:e8(r)}))),Pb[n]},K3=null,OE=_n(`${TE}/resetSelectedServer`),n8=e=>ir(`${TE}/selectServer`,async(t,{dispatch:n,getState:r})=>{n(OE());const{servers:i}=r(),o=i[t];if(!o)return{serverNotFound:!0};try{const{health:s}=e(o),{version:a,printableVersion:l}=await oae(o,s);return{...o,version:a,printableVersion:l}}catch{return{...o,serverNotReachable:!0}}}),sae=(e,t)=>{const n=Dse();return n.startListening({actionCreator:e.fulfilled,effect:({payload:r},{dispatch:i})=>{e_(r)&&i(t())}}),n},aae=e=>qn({name:TE,initialState:K3,reducers:{},extraReducers:t=>{t.addCase(OE,()=>K3),t.addCase(e.fulfilled,(n,{payload:r})=>r)}}),ji=e=>t=>e_(t)&&eae(t.version,{minVersion:e}),PE={forwardQuery:ji("2.9.0"),nonRestCors:ji("2.9.0"),defaultDomainRedirectsEdition:ji("2.10.0"),nonOrphanVisits:ji("3.0.0"),allTagsFiltering:ji("3.0.0"),tagsStats:ji("3.0.0"),domainVisits:ji("3.1.0"),excludeBotsOnShortUrls:ji("3.4.0"),filterDisabledUrls:ji("3.4.0"),deviceLongUrls:ji("3.5.0")};Object.freeze(PE);const Mi=(e,t)=>H.useMemo(()=>PE[e](t),[e,n8]);const lae=(e,t,n,r,i,o,s,a,l,c,f,h,p)=>K5(({selectedServer:m,sidebarNotPresent:g,sidebarPresent:v})=>{const w=kn(),[y,b,x,T]=$t(),P=e_(m);if(H.useEffect(()=>T(),[w]),H.useEffect(()=>(P&&v(),()=>g()),[]),!P)return C(c,{});const k=Mi("nonOrphanVisits",m),N=Mi("domainVisits",m),D=ge("menu-layout__burger-icon",{"menu-layout__burger-icon--active":y}),z=Coe(x,T);return U(We,{children:[C(Fe,{icon:ZX,className:D,onClick:b}),C("div",{...z,className:"menu-layout__swipeable",children:U("div",{className:"menu-layout__swipeable-inner",children:[C(n,{selectedServer:m,showOnMobile:y}),C("div",{className:"menu-layout__container",onClick:()=>T(),children:C("div",{className:"container-xl",children:U(Qy,{children:[C(gt,{index:!0,element:C(KS,{replace:!0,to:"overview"})}),C(gt,{path:"/overview",element:C(f,{})}),C(gt,{path:"/list-short-urls/:page",element:C(t,{})}),C(gt,{path:"/create-short-url",element:C(r,{})}),C(gt,{path:"/short-code/:shortCode/visits/*",element:C(i,{})}),C(gt,{path:"/short-code/:shortCode/edit",element:C(h,{})}),C(gt,{path:"/tag/:tag/visits/*",element:C(o,{})}),N&&C(gt,{path:"/domain/:domain/visits/*",element:C(s,{})}),C(gt,{path:"/orphan-visits/*",element:C(a,{})}),k&&C(gt,{path:"/non-orphan-visits/*",element:C(l,{})}),C(gt,{path:"/manage-tags",element:C(e,{})}),C(gt,{path:"/manage-domains",element:C(p,{})}),C(gt,{path:"*",element:C(O5,{to:`/server/${m.id}/list-short-urls/1`,children:"List short URLs"})})]})})})]})})]})},c),cae={sidebarPresent:!1},{actions:uae,reducer:fae}=qn({name:"shlink/sidebar",initialState:cae,reducers:{sidebarPresent:()=>({sidebarPresent:!0}),sidebarNotPresent:()=>({sidebarPresent:!1})}}),{sidebarPresent:dae,sidebarNotPresent:hae}=uae,pae=fae,mae=({children:e})=>{const t=kn();return H.useEffect(()=>{scrollTo(0,0)},[t]),C(We,{children:e})},gae="%_VERSION_%",vae=Ms(t8(),e8),X3=({project:e,version:t})=>C(Ei,{href:`https://github.com/shlinkio/${e}/releases/${t}`,className:"text-muted",children:C("b",{children:t})}),yae=({selectedServer:e,clientVersion:t=gae})=>{const n=vae(t);return U("small",{className:"text-muted",children:[e_(e)&&U(We,{children:["Server: ",C(X3,{project:"shlink",version:e.printableVersion})," - "]}),"Client: ",C(X3,{project:"shlink-web-client",version:n})]})};const _ae=({selectedServer:e,sidebar:t})=>{const n=ge("text-center",{"shlink-versions-container--with-sidebar":t.sidebarPresent});return C("div",{className:n,children:C(yae,{selectedServer:e})})},Q3={"Content-Type":"application/json"},J3=e=>e!=null&&e.body?e?{...e,headers:{...e.headers??{},...Q3}}:{headers:Q3}:e;class bae{constructor(t){Se(this,"fetchJson",(t,n)=>this.fetch(t,J3(n)).then(async r=>{const i=await r.json();if(!r.ok)throw i;return i}));Se(this,"fetchEmpty",(t,n)=>this.fetch(t,J3(n)).then(async r=>{if(!r.ok)throw await r.json()}));Se(this,"fetchBlob",t=>this.fetch(t).then(n=>n.blob()));this.fetch=t}}const r8=({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)},i8=(e,t,n)=>{const r=new Blob([t],{type:"text/csv;charset=utf-8;"}),i=URL.createObjectURL(r);r8(e,i,n)};class wae{constructor(t,n){this.httpClient=t,this.window=n}async saveImage(t,n){const r=await this.httpClient.fetchBlob(t),i=URL.createObjectURL(r);r8(this.window,i,n)}}class xae{constructor(t,n){Se(this,"exportVisits",(t,n)=>{n.length&&this.exportCsv(t,n)});Se(this,"exportShortUrls",t=>{t.length&&this.exportCsv("short_urls.csv",t)});Se(this,"exportCsv",(t,n)=>{const r=this.jsonToCsv(n);i8(this.window,r,t)});this.window=t,this.jsonToCsv=n}}const Sae=(e,t)=>{e.constant("window",window),e.constant("console",console),e.constant("fetch",window.fetch.bind(window)),e.service("HttpClient",bae,"fetch"),e.service("ImageDownloader",wae,"HttpClient","window"),e.service("ReportExporter",xae,"window","jsonToCsv"),e.serviceFactory("ScrollToTop",()=>mae),e.serviceFactory("MainHeader",Yse,"ServersDropdown"),e.serviceFactory("Home",()=>Wse),e.decorator("Home",mv),e.decorator("Home",t(["servers"],["resetSelectedServer"])),e.serviceFactory("MenuLayout",lae,"TagsList","ShortUrlsList","AsideMenu","CreateShortUrl","ShortUrlVisits","TagVisits","DomainVisits","OrphanVisits","NonOrphanVisits","ServerError","Overview","EditShortUrl","ManageDomains"),e.decorator("MenuLayout",t(["selectedServer"],["selectServer","sidebarPresent","sidebarNotPresent"])),e.serviceFactory("AsideMenu",zse,"DeleteServerButton"),e.serviceFactory("ShlinkVersionsContainer",()=>_ae),e.decorator("ShlinkVersionsContainer",t(["selectedServer","sidebar"])),e.serviceFactory("ErrorHandler",Use,"window","console"),e.serviceFactory("sidebarPresent",()=>dae),e.serviceFactory("sidebarNotPresent",()=>hae)};const oa=({text:e,disabled:t=!1,className:n="",children:r,dropdownClassName:i,right:o=!1,minWidth:s})=>{const[a,l]=$t(),c=`dropdown-btn__toggle btn-block ${n}`,f={minWidth:s&&`${s}px`};return U(ru,{isOpen:a,toggle:l,disabled:t,className:i,children:[C(iu,{caret:!0,className:c,color:"primary",children:e}),C(gl,{className:"w-100",end:o,style:f,children:r})]})};const Cae=({listDomains:e,value:t,domainsList:n,onChange:r})=>{const[i,,o,s]=$t(),{domains:a}=n,l=!t,c=()=>r("");return H.useEffect(()=>{e()},[]),i?U(eh,{children:[C(Vc,{value:t??"",placeholder:"Domain",onChange:f=>r(f.target.value)}),C(ht,{id:"backToDropdown",outline:!0,type:"button",className:"domains-dropdown__back-btn","aria-label":"Back to domains list",onClick:Ms(c,s),children:C(Fe,{icon:gQ})}),C(Or,{target:"backToDropdown",placement:"left",trigger:"hover",children:"Existing domains"})]}):U(oa,{text:l?"Domain":`Domain: ${t}`,className:l?"domains-dropdown__toggle-btn":"domains-dropdown__toggle-btn--active",children:[a.map(({domain:f,isDefault:h})=>U(Ve,{active:(t===f||h)&&l,onClick:()=>r(f),children:[f,h&&C("span",{className:"float-end text-muted",children:"default"})]},f)),C(Ve,{divider:!0}),C(Ve,{onClick:Ms(c,o),children:C("i",{children:"New domain"})})]})},Ao=({errorData:e,fallbackMessage:t})=>U(We,{children:[(e==null?void 0:e.detail)??t,RX(e)&&U("p",{className:"mb-0",children:["Invalid elements: [",e.invalidElements.join(", "),"]"]})]}),Dr=({children:e,type:t,className:n,small:r=!1})=>C(Jn,{className:n,children:C("div",{className:ge({"col-md-10 offset-md-1":!r,"col-12":r}),children:C(fn,{role:"document",className:ge("text-center",{"bg-main":t==="success","bg-danger":t==="error","bg-warning":t==="warning","text-white":t!=="warning"}),bodyClassName:ge({"p-2":r}),children:e})})});const Eae=500;let kp;const sh=({onChange:e,className:t,large:n=!0,noBorder:r=!1,initialValue:i=""})=>{const[o,s]=H.useState(i),a=()=>{kp&&clearTimeout(kp),kp=null},l=(c,f=Eae)=>{s(c),a(),kp=setTimeout(()=>{e(c),a()},f)};return U("div",{className:ge("search-field",t),children:[C("input",{type:"text",className:ge("form-control search-field__input",{"form-control-lg":n,"search-field__input--no-border":r}),placeholder:"Search...",value:o,onChange:c=>l(c.target.value)}),C(Fe,{icon:PQ,className:"search-field__icon"}),C("div",{className:"close search-field__close btn-close",hidden:o==="",id:"search-field__close",onClick:()=>l("",0)})]})};const E_=({isOpen:e,toggle:t,children:n,right:r=!0})=>U(g_,{toggle:t,isOpen:e,children:[U(iu,{size:"sm",caret:!0,outline:!0,className:"dropdown-btn-menu__dropdown-toggle",children:[" ",C(Fe,{icon:_Q})," "]}),C(gl,{end:r,children:n})]}),kf=(e,t,n)=>Bo(n)?e.shortCode===t&&!e.domain:e.shortCode===t&&e.domain===n,Tae=(e,t)=>!e.domain&&t===N8?!0:e.domain===t,Oae=(e,t)=>{const n=(t==null?void 0:t.validateUrls)??!1;return e?{longUrl:e.longUrl,tags:e.tags,title:e.title??void 0,domain:e.domain??void 0,validSince:e.meta.validSince??void 0,validUntil:e.meta.validUntil??void 0,maxVisits:e.meta.maxVisits??void 0,crawlable:e.crawlable,forwardQuery:e.forwardQuery,deviceLongUrls:e.deviceLongUrls,validateUrl:n}:{longUrl:"",validateUrl:n}},o8="__",Pae=e=>e.replaceAll("/",o8),mm=e=>e.replaceAll(o8,"/");function et(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 Pe(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function gm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?gm=function(n){return typeof n}:gm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},gm(e)}function Re(e){Pe(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||gm(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 yl(e,t){Pe(2,arguments);var n=Re(e),r=et(t);return isNaN(r)?new Date(NaN):(r&&n.setDate(n.getDate()+r),n)}function ro(e,t){Pe(2,arguments);var n=Re(e),r=et(t);if(isNaN(r))return new Date(NaN);if(!r)return n;var i=n.getDate(),o=new Date(n.getTime());o.setMonth(n.getMonth()+r+1,0);var s=o.getDate();return i>=s?o:(n.setFullYear(o.getFullYear(),o.getMonth(),i),n)}function vm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?vm=function(n){return typeof n}:vm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},vm(e)}function kae(e,t){if(Pe(2,arguments),!t||vm(t)!=="object")return new Date(NaN);var n=t.years?et(t.years):0,r=t.months?et(t.months):0,i=t.weeks?et(t.weeks):0,o=t.days?et(t.days):0,s=t.hours?et(t.hours):0,a=t.minutes?et(t.minutes):0,l=t.seconds?et(t.seconds):0,c=Re(e),f=r||n?ro(c,r+n*12):c,h=o||i?yl(f,o+i*7):f,p=a+s*60,m=l+p*60,g=m*1e3,v=new Date(h.getTime()+g);return v}function kE(e,t){Pe(2,arguments);var n=Re(e).getTime(),r=et(t);return new Date(n+r)}var Mae=36e5;function Rae(e,t){Pe(2,arguments);var n=et(t);return kE(e,n*Mae)}var Nae={};function Wo(){return Nae}function s8(e,t){var n,r,i,o,s,a,l,c;Pe(1,arguments);var f=Wo(),h=et((n=(r=(i=(o=t==null?void 0:t.weekStartsOn)!==null&&o!==void 0?o:t==null||(s=t.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.weekStartsOn)!==null&&i!==void 0?i:f.weekStartsOn)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Re(e),m=p.getDay(),g=(m=i.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function Dae(e){Pe(1,arguments);var t=Lae(e),n=new Date(0);n.setFullYear(t,0,4),n.setHours(0,0,0,0);var r=Td(n);return r}function Hc(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 Ar(e){Pe(1,arguments);var t=Re(e);return t.setHours(0,0,0,0),t}var Aae=864e5;function Od(e,t){Pe(2,arguments);var n=Ar(e),r=Ar(t),i=n.getTime()-Hc(n),o=r.getTime()-Hc(r);return Math.round((i-o)/Aae)}var Iae=6e4;function Jw(e,t){Pe(2,arguments);var n=et(t);return kE(e,n*Iae)}function ME(e,t){Pe(2,arguments);var n=et(t),r=n*7;return yl(e,r)}function Wc(e,t){Pe(2,arguments);var n=et(t);return ro(e,n*12)}function ym(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ym=function(n){return typeof n}:ym=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ym(e)}function eR(e){Pe(1,arguments);var t;if(e&&typeof e.forEach=="function")t=e;else if(ym(e)==="object"&&e!==null)t=Array.prototype.slice.call(e);else return new Date(NaN);var n;return t.forEach(function(r){var i=Re(r);(n===void 0||ni||isNaN(i.getDate()))&&(n=i)}),n||new Date(NaN)}function bm(e,t){Pe(2,arguments);var n=Re(e),r=Re(t),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}var RE=6e4,T_=36e5,Fae=1e3;function $ae(e,t){Pe(2,arguments);var n=Ar(e),r=Ar(t);return n.getTime()===r.getTime()}function wm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?wm=function(n){return typeof n}:wm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},wm(e)}function NE(e){return Pe(1,arguments),e instanceof Date||wm(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function a8(e){if(Pe(1,arguments),!NE(e)&&typeof e!="number")return!1;var t=Re(e);return!isNaN(Number(t))}function Pd(e,t){Pe(2,arguments);var n=Re(e),r=Re(t),i=n.getFullYear()-r.getFullYear(),o=n.getMonth()-r.getMonth();return i*12+o}function e2(e){Pe(1,arguments);var t=Re(e),n=Math.floor(t.getMonth()/3)+1;return n}function gv(e,t){Pe(2,arguments);var n=Re(e),r=Re(t);return n.getFullYear()-r.getFullYear()}function nR(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 LE(e,t){Pe(2,arguments);var n=Re(e),r=Re(t),i=nR(n,r),o=Math.abs(Od(n,r));n.setDate(n.getDate()-i*o);var s=+(nR(n,r)===-i),a=i*(o-s);return a===0?0:a}function l8(e,t){return Pe(2,arguments),Re(e).getTime()-Re(t).getTime()}var rR={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},jae="trunc";function DE(e){return e?rR[e]:rR[jae]}function Bae(e,t,n){Pe(2,arguments);var r=l8(e,t)/T_;return DE(n==null?void 0:n.roundingMethod)(r)}function ll(e){Pe(1,arguments);var t=Re(e);return t.setHours(23,59,59,999),t}function zae(e){Pe(1,arguments);var t=Re(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function Uae(e){Pe(1,arguments);var t=Re(e);return ll(t).getTime()===zae(t).getTime()}function vv(e,t){Pe(2,arguments);var n=Re(e),r=Re(t),i=bm(n,r),o=Math.abs(Pd(n,r)),s;if(o<1)s=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-i*o);var a=bm(n,r)===-i;Uae(Re(e))&&o===1&&bm(e,r)===1&&(a=!1),s=i*(o-Number(a))}return s===0?0:s}function Vae(e,t,n){Pe(2,arguments);var r=l8(e,t)/1e3;return DE(n==null?void 0:n.roundingMethod)(r)}function Hae(e,t,n){Pe(2,arguments);var r=LE(e,t)/7;return DE(n==null?void 0:n.roundingMethod)(r)}function t2(e){Pe(1,arguments);var t=Re(e),n=t.getMonth(),r=n-n%3;return t.setMonth(r,1),t.setHours(0,0,0,0),t}function Wae(e){Pe(1,arguments);var t=Re(e);return t.setDate(1),t.setHours(0,0,0,0),t}function Yae(e){Pe(1,arguments);var t=Re(e),n=new Date(0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function qae(e,t){var n,r,i,o,s,a,l,c;Pe(1,arguments);var f=Wo(),h=et((n=(r=(i=(o=t==null?void 0:t.weekStartsOn)!==null&&o!==void 0?o:t==null||(s=t.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.weekStartsOn)!==null&&i!==void 0?i:f.weekStartsOn)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Re(e),m=p.getDay(),g=(m=i.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function Xae(e){Pe(1,arguments);var t=u8(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var r=Yc(n);return r}var Qae=6048e5;function f8(e){Pe(1,arguments);var t=Re(e),n=Yc(t).getTime()-Xae(t).getTime();return Math.round(n/Qae)+1}function cl(e,t){var n,r,i,o,s,a,l,c;Pe(1,arguments);var f=Wo(),h=et((n=(r=(i=(o=t==null?void 0:t.weekStartsOn)!==null&&o!==void 0?o:t==null||(s=t.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.weekStartsOn)!==null&&i!==void 0?i:f.weekStartsOn)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Re(e),m=p.getUTCDay(),g=(m=1&&m<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var g=new Date(0);g.setUTCFullYear(h+1,0,m),g.setUTCHours(0,0,0,0);var v=cl(g,t),w=new Date(0);w.setUTCFullYear(h,0,m),w.setUTCHours(0,0,0,0);var y=cl(w,t);return f.getTime()>=v.getTime()?h+1:f.getTime()>=y.getTime()?h:h-1}function Jae(e,t){var n,r,i,o,s,a,l,c;Pe(1,arguments);var f=Wo(),h=et((n=(r=(i=(o=t==null?void 0:t.firstWeekContainsDate)!==null&&o!==void 0?o:t==null||(s=t.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.firstWeekContainsDate)!==null&&i!==void 0?i:f.firstWeekContainsDate)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&n!==void 0?n:1),p=AE(e,t),m=new Date(0);m.setUTCFullYear(p,0,h),m.setUTCHours(0,0,0,0);var g=cl(m,t);return g}var ele=6048e5;function d8(e,t){Pe(1,arguments);var n=Re(e),r=cl(n,t).getTime()-Jae(n,t).getTime();return Math.round(r/ele)+1}function rt(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length0?r:1-r;return rt(n==="yy"?i%100:i,n.length)},M:function(t,n){var r=t.getUTCMonth();return n==="M"?String(r+1):rt(r+1,2)},d:function(t,n){return rt(t.getUTCDate(),n.length)},a:function(t,n){var r=t.getUTCHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h:function(t,n){return rt(t.getUTCHours()%12||12,n.length)},H:function(t,n){return rt(t.getUTCHours(),n.length)},m:function(t,n){return rt(t.getUTCMinutes(),n.length)},s:function(t,n){return rt(t.getUTCSeconds(),n.length)},S:function(t,n){var r=n.length,i=t.getUTCMilliseconds(),o=Math.floor(i*Math.pow(10,r-3));return rt(o,n.length)}};const Xo=tle;var $l={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},nle={G:function(t,n,r){var i=t.getUTCFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return r.era(i,{width:"abbreviated"});case"GGGGG":return r.era(i,{width:"narrow"});case"GGGG":default:return r.era(i,{width:"wide"})}},y:function(t,n,r){if(n==="yo"){var i=t.getUTCFullYear(),o=i>0?i:1-i;return r.ordinalNumber(o,{unit:"year"})}return Xo.y(t,n)},Y:function(t,n,r,i){var o=AE(t,i),s=o>0?o:1-o;if(n==="YY"){var a=s%100;return rt(a,2)}return n==="Yo"?r.ordinalNumber(s,{unit:"year"}):rt(s,n.length)},R:function(t,n){var r=u8(t);return rt(r,n.length)},u:function(t,n){var r=t.getUTCFullYear();return rt(r,n.length)},Q:function(t,n,r){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"Q":return String(i);case"QQ":return rt(i,2);case"Qo":return r.ordinalNumber(i,{unit:"quarter"});case"QQQ":return r.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,n,r){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"q":return String(i);case"qq":return rt(i,2);case"qo":return r.ordinalNumber(i,{unit:"quarter"});case"qqq":return r.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,n,r){var i=t.getUTCMonth();switch(n){case"M":case"MM":return Xo.M(t,n);case"Mo":return r.ordinalNumber(i+1,{unit:"month"});case"MMM":return r.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(i,{width:"wide",context:"formatting"})}},L:function(t,n,r){var i=t.getUTCMonth();switch(n){case"L":return String(i+1);case"LL":return rt(i+1,2);case"Lo":return r.ordinalNumber(i+1,{unit:"month"});case"LLL":return r.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(i,{width:"wide",context:"standalone"})}},w:function(t,n,r,i){var o=d8(t,i);return n==="wo"?r.ordinalNumber(o,{unit:"week"}):rt(o,n.length)},I:function(t,n,r){var i=f8(t);return n==="Io"?r.ordinalNumber(i,{unit:"week"}):rt(i,n.length)},d:function(t,n,r){return n==="do"?r.ordinalNumber(t.getUTCDate(),{unit:"date"}):Xo.d(t,n)},D:function(t,n,r){var i=Kae(t);return n==="Do"?r.ordinalNumber(i,{unit:"dayOfYear"}):rt(i,n.length)},E:function(t,n,r){var i=t.getUTCDay();switch(n){case"E":case"EE":case"EEE":return r.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(i,{width:"short",context:"formatting"});case"EEEE":default:return r.day(i,{width:"wide",context:"formatting"})}},e:function(t,n,r,i){var o=t.getUTCDay(),s=(o-i.weekStartsOn+8)%7||7;switch(n){case"e":return String(s);case"ee":return rt(s,2);case"eo":return r.ordinalNumber(s,{unit:"day"});case"eee":return r.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(o,{width:"short",context:"formatting"});case"eeee":default:return r.day(o,{width:"wide",context:"formatting"})}},c:function(t,n,r,i){var o=t.getUTCDay(),s=(o-i.weekStartsOn+8)%7||7;switch(n){case"c":return String(s);case"cc":return rt(s,n.length);case"co":return r.ordinalNumber(s,{unit:"day"});case"ccc":return r.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(o,{width:"narrow",context:"standalone"});case"cccccc":return r.day(o,{width:"short",context:"standalone"});case"cccc":default:return r.day(o,{width:"wide",context:"standalone"})}},i:function(t,n,r){var i=t.getUTCDay(),o=i===0?7:i;switch(n){case"i":return String(o);case"ii":return rt(o,n.length);case"io":return r.ordinalNumber(o,{unit:"day"});case"iii":return r.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(i,{width:"short",context:"formatting"});case"iiii":default:return r.day(i,{width:"wide",context:"formatting"})}},a:function(t,n,r){var i=t.getUTCHours(),o=i/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,n,r){var i=t.getUTCHours(),o;switch(i===12?o=$l.noon:i===0?o=$l.midnight:o=i/12>=1?"pm":"am",n){case"b":case"bb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(t,n,r){var i=t.getUTCHours(),o;switch(i>=17?o=$l.evening:i>=12?o=$l.afternoon:i>=4?o=$l.morning:o=$l.night,n){case"B":case"BB":case"BBB":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(t,n,r){if(n==="ho"){var i=t.getUTCHours()%12;return i===0&&(i=12),r.ordinalNumber(i,{unit:"hour"})}return Xo.h(t,n)},H:function(t,n,r){return n==="Ho"?r.ordinalNumber(t.getUTCHours(),{unit:"hour"}):Xo.H(t,n)},K:function(t,n,r){var i=t.getUTCHours()%12;return n==="Ko"?r.ordinalNumber(i,{unit:"hour"}):rt(i,n.length)},k:function(t,n,r){var i=t.getUTCHours();return i===0&&(i=24),n==="ko"?r.ordinalNumber(i,{unit:"hour"}):rt(i,n.length)},m:function(t,n,r){return n==="mo"?r.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):Xo.m(t,n)},s:function(t,n,r){return n==="so"?r.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):Xo.s(t,n)},S:function(t,n){return Xo.S(t,n)},X:function(t,n,r,i){var o=i._originalDate||t,s=o.getTimezoneOffset();if(s===0)return"Z";switch(n){case"X":return oR(s);case"XXXX":case"XX":return Ma(s);case"XXXXX":case"XXX":default:return Ma(s,":")}},x:function(t,n,r,i){var o=i._originalDate||t,s=o.getTimezoneOffset();switch(n){case"x":return oR(s);case"xxxx":case"xx":return Ma(s);case"xxxxx":case"xxx":default:return Ma(s,":")}},O:function(t,n,r,i){var o=i._originalDate||t,s=o.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+iR(s,":");case"OOOO":default:return"GMT"+Ma(s,":")}},z:function(t,n,r,i){var o=i._originalDate||t,s=o.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+iR(s,":");case"zzzz":default:return"GMT"+Ma(s,":")}},t:function(t,n,r,i){var o=i._originalDate||t,s=Math.floor(o.getTime()/1e3);return rt(s,n.length)},T:function(t,n,r,i){var o=i._originalDate||t,s=o.getTime();return rt(s,n.length)}};function iR(e,t){var n=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),o=r%60;if(o===0)return n+String(i);var s=t||"";return n+String(i)+s+rt(o,2)}function oR(e,t){if(e%60===0){var n=e>0?"-":"+";return n+rt(Math.abs(e)/60,2)}return Ma(e,t)}function Ma(e,t){var n=t||"",r=e>0?"-":"+",i=Math.abs(e),o=rt(Math.floor(i/60),2),s=rt(i%60,2);return r+o+n+s}const rle=nle;var sR=function(t,n){switch(t){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},h8=function(t,n){switch(t){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},ile=function(t,n){var r=t.match(/(P+)(p+)?/)||[],i=r[1],o=r[2];if(!o)return sR(t,n);var s;switch(i){case"P":s=n.dateTime({width:"short"});break;case"PP":s=n.dateTime({width:"medium"});break;case"PPP":s=n.dateTime({width:"long"});break;case"PPPP":default:s=n.dateTime({width:"full"});break}return s.replace("{{date}}",sR(i,n)).replace("{{time}}",h8(o,n))},ole={p:h8,P:ile};const n2=ole;var sle=["D","DD"],ale=["YY","YYYY"];function p8(e){return sle.indexOf(e)!==-1}function m8(e){return ale.indexOf(e)!==-1}function yv(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 lle={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"}},cle=function(t,n,r){var i,o=lle[t];return typeof o=="string"?i=o:n===1?i=o.one:i=o.other.replace("{{count}}",n.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+i:i+" ago":i};const ule=cle;function kb(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 fle={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},dle={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},hle={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},ple={date:kb({formats:fle,defaultWidth:"full"}),time:kb({formats:dle,defaultWidth:"full"}),dateTime:kb({formats:hle,defaultWidth:"full"})};const mle=ple;var gle={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},vle=function(t,n,r,i){return gle[t]};const yle=vle;function Bu(e){return function(t,n){var r=n!=null&&n.context?String(n.context):"standalone",i;if(r==="formatting"&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):o;i=e.formattingValues[s]||e.formattingValues[o]}else{var a=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[l]||e.values[a]}var c=e.argumentCallback?e.argumentCallback(t):t;return i[c]}}var _le={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},ble={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},wle={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"]},xle={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"]},Sle={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"}},Cle={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"}},Ele=function(t,n){var r=Number(t),i=r%100;if(i>20||i<10)switch(i%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},Tle={ordinalNumber:Ele,era:Bu({values:_le,defaultWidth:"wide"}),quarter:Bu({values:ble,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:Bu({values:wle,defaultWidth:"wide"}),day:Bu({values:xle,defaultWidth:"wide"}),dayPeriod:Bu({values:Sle,defaultWidth:"wide",formattingValues:Cle,defaultFormattingWidth:"wide"})};const Ole=Tle;function zu(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;var s=o[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?kle(a,function(h){return h.test(s)}):Ple(a,function(h){return h.test(s)}),c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;var f=t.slice(s.length);return{value:c,rest:f}}}function Ple(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function kle(e,t){for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:{},r=t.match(e.matchPattern);if(!r)return null;var i=r[0],o=t.match(e.parsePattern);if(!o)return null;var s=e.valueCallback?e.valueCallback(o[0]):o[0];s=n.valueCallback?n.valueCallback(s):s;var a=t.slice(i.length);return{value:s,rest:a}}}var Rle=/^(\d+)(th|st|nd|rd)?/i,Nle=/\d+/i,Lle={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},Dle={any:[/^b/i,/^(a|c)/i]},Ale={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Ile={any:[/1/i,/2/i,/3/i,/4/i]},Fle={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},$le={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]},jle={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},Ble={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]},zle={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},Ule={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}},Vle={ordinalNumber:Mle({matchPattern:Rle,parsePattern:Nle,valueCallback:function(t){return parseInt(t,10)}}),era:zu({matchPatterns:Lle,defaultMatchWidth:"wide",parsePatterns:Dle,defaultParseWidth:"any"}),quarter:zu({matchPatterns:Ale,defaultMatchWidth:"wide",parsePatterns:Ile,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:zu({matchPatterns:Fle,defaultMatchWidth:"wide",parsePatterns:$le,defaultParseWidth:"any"}),day:zu({matchPatterns:jle,defaultMatchWidth:"wide",parsePatterns:Ble,defaultParseWidth:"any"}),dayPeriod:zu({matchPatterns:zle,defaultMatchWidth:"any",parsePatterns:Ule,defaultParseWidth:"any"})};const Hle=Vle;var Wle={code:"en-US",formatDistance:ule,formatLong:mle,formatRelative:yle,localize:Ole,match:Hle,options:{weekStartsOn:0,firstWeekContainsDate:1}};const IE=Wle;var Yle=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,qle=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Gle=/^'([^]*?)'?$/,Zle=/''/g,Kle=/[a-zA-Z]/;function _o(e,t,n){var r,i,o,s,a,l,c,f,h,p,m,g,v,w,y,b,x,T;Pe(2,arguments);var P=String(t),k=Wo(),N=(r=(i=n==null?void 0:n.locale)!==null&&i!==void 0?i:k.locale)!==null&&r!==void 0?r:IE,D=et((o=(s=(a=(l=n==null?void 0:n.firstWeekContainsDate)!==null&&l!==void 0?l:n==null||(c=n.locale)===null||c===void 0||(f=c.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&a!==void 0?a:k.firstWeekContainsDate)!==null&&s!==void 0?s:(h=k.locale)===null||h===void 0||(p=h.options)===null||p===void 0?void 0:p.firstWeekContainsDate)!==null&&o!==void 0?o:1);if(!(D>=1&&D<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var z=et((m=(g=(v=(w=n==null?void 0:n.weekStartsOn)!==null&&w!==void 0?w:n==null||(y=n.locale)===null||y===void 0||(b=y.options)===null||b===void 0?void 0:b.weekStartsOn)!==null&&v!==void 0?v:k.weekStartsOn)!==null&&g!==void 0?g:(x=k.locale)===null||x===void 0||(T=x.options)===null||T===void 0?void 0:T.weekStartsOn)!==null&&m!==void 0?m:0);if(!(z>=0&&z<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!N.localize)throw new RangeError("locale must contain localize property");if(!N.formatLong)throw new RangeError("locale must contain formatLong property");var A=Re(e);if(!a8(A))throw new RangeError("Invalid time value");var Y=Hc(A),q=c8(A,Y),ee={firstWeekContainsDate:D,weekStartsOn:z,locale:N,_originalDate:A},K=P.match(qle).map(function(te){var oe=te[0];if(oe==="p"||oe==="P"){var se=n2[oe];return se(te,N.formatLong)}return te}).join("").match(Yle).map(function(te){if(te==="''")return"'";var oe=te[0];if(oe==="'")return Xle(te);var se=rle[oe];if(se)return!(n!=null&&n.useAdditionalWeekYearTokens)&&m8(te)&&yv(te,t,String(e)),!(n!=null&&n.useAdditionalDayOfYearTokens)&&p8(te)&&yv(te,t,String(e)),se(q,te,N.localize,ee);if(oe.match(Kle))throw new RangeError("Format string contains an unescaped latin alphabet character `"+oe+"`");return te}).join("");return K}function Xle(e){var t=e.match(Gle);return t?t[1].replace(Zle,"'"):e}function FE(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function Qle(e){return FE({},e)}var aR=1440,Jle=2520,Mb=43200,ece=86400;function tce(e,t,n){var r,i;Pe(2,arguments);var o=Wo(),s=(r=(i=n==null?void 0:n.locale)!==null&&i!==void 0?i:o.locale)!==null&&r!==void 0?r:IE;if(!s.formatDistance)throw new RangeError("locale must contain formatDistance property");var a=bm(e,t);if(isNaN(a))throw new RangeError("Invalid time value");var l=FE(Qle(n),{addSuffix:!!(n!=null&&n.addSuffix),comparison:a}),c,f;a>0?(c=Re(t),f=Re(e)):(c=Re(e),f=Re(t));var h=Vae(f,c),p=(Hc(f)-Hc(c))/1e3,m=Math.round((h-p)/60),g;if(m<2)return n!=null&&n.includeSeconds?h<5?s.formatDistance("lessThanXSeconds",5,l):h<10?s.formatDistance("lessThanXSeconds",10,l):h<20?s.formatDistance("lessThanXSeconds",20,l):h<40?s.formatDistance("halfAMinute",0,l):h<60?s.formatDistance("lessThanXMinutes",1,l):s.formatDistance("xMinutes",1,l):m===0?s.formatDistance("lessThanXMinutes",1,l):s.formatDistance("xMinutes",m,l);if(m<45)return s.formatDistance("xMinutes",m,l);if(m<90)return s.formatDistance("aboutXHours",1,l);if(mr.getTime()}function Kr(e,t){Pe(2,arguments);var n=Re(e),r=Re(t);return n.getTime()"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function bv(e){return bv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},bv(e)}function $E(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function wv(e){return wv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},wv(e)}function dR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xce=function(e){yce(n,e);var t=_ce(n);function n(){var r;gce(this,n);for(var i=arguments.length,o=new Array(i),s=0;s0,r=n?t:1-t,i;if(r<=50)i=e||100;else{var o=r+50,s=Math.floor(o/100)*100,a=e>=o%100;i=e+s-(a?100:0)}return n?i:1-i}function x8(e){return e%400===0||e%4===0&&e%100!==0}function Cm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Cm=function(n){return typeof n}:Cm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Cm(e)}function Sce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Sv(e){return Sv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Sv(e)}function pR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var kce=function(e){Ece(n,e);var t=Tce(n);function n(){var r;Sce(this,n);for(var i=arguments.length,o=new Array(i),s=0;s0}},{key:"set",value:function(i,o,s){var a=i.getUTCFullYear();if(s.isTwoDigitYear){var l=w8(s.year,a);return i.setUTCFullYear(l,0,1),i.setUTCHours(0,0,0,0),i}var c=!("era"in o)||o.era===1?s.year:1-s.year;return i.setUTCFullYear(c,0,1),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Em(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Em=function(n){return typeof n}:Em=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Em(e)}function Mce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Cv(e){return Cv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Cv(e)}function gR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ice=function(e){Nce(n,e);var t=Lce(n);function n(){var r;Mce(this,n);for(var i=arguments.length,o=new Array(i),s=0;s0}},{key:"set",value:function(i,o,s,a){var l=AE(i,a);if(s.isTwoDigitYear){var c=w8(s.year,l);return i.setUTCFullYear(c,0,a.firstWeekContainsDate),i.setUTCHours(0,0,0,0),cl(i,a)}var f=!("era"in o)||o.era===1?s.year:1-s.year;return i.setUTCFullYear(f,0,a.firstWeekContainsDate),i.setUTCHours(0,0,0,0),cl(i,a)}}]),n}(pt);function Tm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Tm=function(n){return typeof n}:Tm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Tm(e)}function Fce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ev(e){return Ev=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Ev(e)}function yR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Vce=function(e){jce(n,e);var t=Bce(n);function n(){var r;Fce(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Tv(e){return Tv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Tv(e)}function bR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Kce=function(e){Yce(n,e);var t=qce(n);function n(){var r;Hce(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ov(e){return Ov=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Ov(e)}function xR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var rue=function(e){Jce(n,e);var t=eue(n);function n(){var r;Xce(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=4}},{key:"set",value:function(i,o,s){return i.setUTCMonth((s-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function km(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?km=function(n){return typeof n}:km=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},km(e)}function iue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function SR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Pv(e){return Pv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Pv(e)}function CR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var uue=function(e){sue(n,e);var t=aue(n);function n(){var r;iue(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=4}},{key:"set",value:function(i,o,s){return i.setUTCMonth((s-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Mm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Mm=function(n){return typeof n}:Mm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Mm(e)}function fue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ER(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function kv(e){return kv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},kv(e)}function TR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var vue=function(e){hue(n,e);var t=pue(n);function n(){var r;fue(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=11}},{key:"set",value:function(i,o,s){return i.setUTCMonth(s,1),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Rm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Rm=function(n){return typeof n}:Rm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Rm(e)}function yue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function OR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Mv(e){return Mv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Mv(e)}function PR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Cue=function(e){bue(n,e);var t=wue(n);function n(){var r;yue(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=11}},{key:"set",value:function(i,o,s){return i.setUTCMonth(s,1),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Eue(e,t,n){Pe(2,arguments);var r=Re(e),i=et(t),o=d8(r,n)-i;return r.setUTCDate(r.getUTCDate()-o*7),r}function Nm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Nm=function(n){return typeof n}:Nm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Nm(e)}function Tue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Rv(e){return Rv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Rv(e)}function MR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Nue=function(e){Pue(n,e);var t=kue(n);function n(){var r;Tue(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=53}},{key:"set",value:function(i,o,s,a){return cl(Eue(i,s,a),a)}}]),n}(pt);function Lue(e,t){Pe(2,arguments);var n=Re(e),r=et(t),i=f8(n)-r;return n.setUTCDate(n.getUTCDate()-i*7),n}function Lm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Lm=function(n){return typeof n}:Lm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Lm(e)}function Due(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function RR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Nv(e){return Nv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Nv(e)}function NR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Bue=function(e){Iue(n,e);var t=Fue(n);function n(){var r;Due(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=53}},{key:"set",value:function(i,o,s){return Yc(Lue(i,s))}}]),n}(pt);function Dm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Dm=function(n){return typeof n}:Dm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Dm(e)}function zue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function LR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Lv(e){return Lv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Lv(e)}function Rb(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var que=[31,28,31,30,31,30,31,31,30,31,30,31],Gue=[31,29,31,30,31,30,31,31,30,31,30,31],Zue=function(e){Vue(n,e);var t=Hue(n);function n(){var r;zue(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=Gue[l]:o>=1&&o<=que[l]}},{key:"set",value:function(i,o,s){return i.setUTCDate(s),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Im(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Im=function(n){return typeof n}:Im=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Im(e)}function Kue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function DR(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 Dv(e){return Dv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Dv(e)}function Nb(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var nfe=function(e){Que(n,e);var t=Jue(n);function n(){var r;Kue(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=366:o>=1&&o<=365}},{key:"set",value:function(i,o,s){return i.setUTCMonth(0,s),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function zE(e,t,n){var r,i,o,s,a,l,c,f;Pe(2,arguments);var h=Wo(),p=et((r=(i=(o=(s=n==null?void 0:n.weekStartsOn)!==null&&s!==void 0?s:n==null||(a=n.locale)===null||a===void 0||(l=a.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&o!==void 0?o:h.weekStartsOn)!==null&&i!==void 0?i:(c=h.locale)===null||c===void 0||(f=c.options)===null||f===void 0?void 0:f.weekStartsOn)!==null&&r!==void 0?r:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=Re(e),g=et(t),v=m.getUTCDay(),w=g%7,y=(w+7)%7,b=(y"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Av(e){return Av=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Av(e)}function IR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var cfe=function(e){ofe(n,e);var t=sfe(n);function n(){var r;rfe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=6}},{key:"set",value:function(i,o,s,a){return i=zE(i,s,a),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function jm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?jm=function(n){return typeof n}:jm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},jm(e)}function ufe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function FR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Iv(e){return Iv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Iv(e)}function $R(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var gfe=function(e){dfe(n,e);var t=hfe(n);function n(){var r;ufe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=6}},{key:"set",value:function(i,o,s,a){return i=zE(i,s,a),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Bm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Bm=function(n){return typeof n}:Bm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Bm(e)}function vfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Fv(e){return Fv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Fv(e)}function BR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Sfe=function(e){_fe(n,e);var t=bfe(n);function n(){var r;vfe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=6}},{key:"set",value:function(i,o,s,a){return i=zE(i,s,a),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Cfe(e,t){Pe(2,arguments);var n=et(t);n%7===0&&(n=n-7);var r=1,i=Re(e),o=i.getUTCDay(),s=n%7,a=(s+7)%7,l=(a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function $v(e){return $v=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},$v(e)}function UR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Rfe=function(e){Ofe(n,e);var t=Pfe(n);function n(){var r;Efe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=7}},{key:"set",value:function(i,o,s){return i=Cfe(i,s),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Um(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Um=function(n){return typeof n}:Um=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Um(e)}function Nfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function VR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function jv(e){return jv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},jv(e)}function HR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var $fe=function(e){Dfe(n,e);var t=Afe(n);function n(){var r;Nfe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Bv(e){return Bv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Bv(e)}function YR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Wfe=function(e){zfe(n,e);var t=Ufe(n);function n(){var r;jfe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function zv(e){return zv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},zv(e)}function GR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Qfe=function(e){Gfe(n,e);var t=Zfe(n);function n(){var r;Yfe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Uv(e){return Uv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Uv(e)}function KR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ode=function(e){tde(n,e);var t=nde(n);function n(){var r;Jfe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=12}},{key:"set",value:function(i,o,s){var a=i.getUTCHours()>=12;return a&&s<12?i.setUTCHours(s+12,0,0,0):!a&&s===12?i.setUTCHours(0,0,0,0):i.setUTCHours(s,0,0,0),i}}]),n}(pt);function Ym(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ym=function(n){return typeof n}:Ym=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ym(e)}function sde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function XR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Vv(e){return Vv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Vv(e)}function QR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var dde=function(e){lde(n,e);var t=cde(n);function n(){var r;sde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=23}},{key:"set",value:function(i,o,s){return i.setUTCHours(s,0,0,0),i}}]),n}(pt);function qm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?qm=function(n){return typeof n}:qm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},qm(e)}function hde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function JR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Hv(e){return Hv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Hv(e)}function eN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _de=function(e){mde(n,e);var t=gde(n);function n(){var r;hde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=11}},{key:"set",value:function(i,o,s){var a=i.getUTCHours()>=12;return a&&s<12?i.setUTCHours(s+12,0,0,0):i.setUTCHours(s,0,0,0),i}}]),n}(pt);function Gm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Gm=function(n){return typeof n}:Gm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Gm(e)}function bde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tN(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Wv(e){return Wv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Wv(e)}function nN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Tde=function(e){xde(n,e);var t=Sde(n);function n(){var r;bde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=24}},{key:"set",value:function(i,o,s){var a=s<=24?s%24:s;return i.setUTCHours(a,0,0,0),i}}]),n}(pt);function Zm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Zm=function(n){return typeof n}:Zm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Zm(e)}function Ode(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rN(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Yv(e){return Yv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Yv(e)}function iN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Lde=function(e){kde(n,e);var t=Mde(n);function n(){var r;Ode(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=59}},{key:"set",value:function(i,o,s){return i.setUTCMinutes(s,0,0),i}}]),n}(pt);function Km(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Km=function(n){return typeof n}:Km=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Km(e)}function Dde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oN(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function qv(e){return qv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},qv(e)}function sN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Bde=function(e){Ide(n,e);var t=Fde(n);function n(){var r;Dde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=59}},{key:"set",value:function(i,o,s){return i.setUTCSeconds(s,0),i}}]),n}(pt);function Xm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Xm=function(n){return typeof n}:Xm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Xm(e)}function zde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function aN(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:function(n){return n.__proto__||Object.getPrototypeOf(n)},Gv(e)}function lN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var qde=function(e){Vde(n,e);var t=Hde(n);function n(){var r;zde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Zv(e){return Zv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Zv(e)}function uN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ehe=function(e){Kde(n,e);var t=Xde(n);function n(){var r;Gde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Kv(e){return Kv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Kv(e)}function dN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ahe=function(e){rhe(n,e);var t=ihe(n);function n(){var r;the(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Xv(e){return Xv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Xv(e)}function pN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var phe=function(e){uhe(n,e);var t=fhe(n);function n(){var r;lhe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Qv(e){return Qv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Qv(e)}function gN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var whe=function(e){vhe(n,e);var t=yhe(n);function n(){var r;mhe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||e[Symbol.iterator]==null){if(Array.isArray(e)||(n=She(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,a;return{s:function(){n=e[Symbol.iterator]()},n:function(){var c=n.next();return o=c.done,c},e:function(c){s=!0,a=c},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}}}function She(e,t){if(e){if(typeof e=="string")return yN(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 yN(e,t)}}function yN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=1&&A<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var Y=et((g=(v=(w=(y=r==null?void 0:r.weekStartsOn)!==null&&y!==void 0?y:r==null||(b=r.locale)===null||b===void 0||(x=b.options)===null||x===void 0?void 0:x.weekStartsOn)!==null&&w!==void 0?w:D.weekStartsOn)!==null&&v!==void 0?v:(T=D.locale)===null||T===void 0||(P=T.options)===null||P===void 0?void 0:P.weekStartsOn)!==null&&g!==void 0?g:0);if(!(Y>=0&&Y<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(N==="")return k===""?Re(n):new Date(NaN);var q={firstWeekContainsDate:A,weekStartsOn:Y,locale:z},ee=[new hce],K=N.match(Ehe).map(function(O){var R=O[0];if(R in n2){var F=n2[R];return F(O,z.formatLong)}return O}).join("").match(Che),te=[],oe=vN(K),se;try{var Z=function(){var R=se.value;!(r!=null&&r.useAdditionalWeekYearTokens)&&m8(R)&&yv(R,N,e),!(r!=null&&r.useAdditionalDayOfYearTokens)&&p8(R)&&yv(R,N,e);var F=R[0],Q=xhe[F];if(Q){var X=Q.incompatibleTokens;if(Array.isArray(X)){var le=te.find(function(De){return X.includes(De.token)||De.token===F});if(le)throw new RangeError("The format string mustn't contain `".concat(le.fullToken,"` and `").concat(R,"` at the same time"))}else if(Q.incompatibleTokens==="*"&&te.length>0)throw new RangeError("The format string mustn't contain `".concat(R,"` and any other token at the same time"));te.push({token:F,fullToken:R});var ve=Q.run(k,R,z.match,q);if(!ve)return{v:new Date(NaN)};ee.push(ve.setter),k=ve.rest}else{if(F.match(khe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+F+"`");if(R==="''"?R="'":F==="'"&&(R=Mhe(R)),k.indexOf(R)===0)k=k.slice(R.length);else return{v:new Date(NaN)}}};for(oe.s();!(se=oe.n()).done;){var $=Z();if(ng($)==="object")return $.v}}catch(O){oe.e(O)}finally{oe.f()}if(k.length>0&&Phe.test(k))return new Date(NaN);var I=ee.map(function(O){return O.priority}).sort(function(O,R){return R-O}).filter(function(O,R,F){return F.indexOf(O)===R}).map(function(O){return ee.filter(function(R){return R.priority===O}).sort(function(R,F){return F.subPriority-R.subPriority})}).map(function(O){return O[0]}),B=Re(n);if(isNaN(B.getTime()))return new Date(NaN);var re=c8(B,Hc(B)),W={},G=vN(I),ne;try{for(G.s();!(ne=G.n()).done;){var ae=ne.value;if(!ae.validate(re,q))return new Date(NaN);var me=ae.set(re,W,q);Array.isArray(me)?(re=me[0],FE(W,me[1])):re=me}}catch(O){G.e(O)}finally{G.f()}return re}function Mhe(e){return e.match(The)[1].replace(Ohe,"'")}function Rhe(e,t){Pe(2,arguments);var n=Re(e),r=Re(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function Nhe(e,t){Pe(2,arguments);var n=t2(e),r=t2(t);return n.getTime()===r.getTime()}function Lhe(e,t){Pe(2,arguments);var n=Re(e),r=Re(t);return n.getFullYear()===r.getFullYear()}function qc(e,t){Pe(2,arguments);var n=Re(e).getTime(),r=Re(t.start).getTime(),i=Re(t.end).getTime();if(!(r<=i))throw new RangeError("Invalid interval");return n>=r&&n<=i}function UE(e,t){Pe(2,arguments);var n=et(t);return yl(e,-n)}function Io(e,t){var n;Pe(1,arguments);var r=et((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=Fhe(e),o;if(i.date){var s=$he(i.date,r);o=jhe(s.restDateString,s.year)}if(!o||isNaN(o.getTime()))return new Date(NaN);var a=o.getTime(),l=0,c;if(i.time&&(l=Bhe(i.time),isNaN(l)))return new Date(NaN);if(i.timezone){if(c=zhe(i.timezone),isNaN(c))return new Date(NaN)}else{var f=new Date(a+l),h=new Date(0);return h.setFullYear(f.getUTCFullYear(),f.getUTCMonth(),f.getUTCDate()),h.setHours(f.getUTCHours(),f.getUTCMinutes(),f.getUTCSeconds(),f.getUTCMilliseconds()),h}return new Date(a+l+c)}var Mp={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Dhe=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Ahe=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Ihe=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Fhe(e){var t={},n=e.split(Mp.dateTimeDelimiter),r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],Mp.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Mp.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){var i=Mp.timezone.exec(r);i?(t.time=r.replace(i[1],""),t.timezone=i[1]):t.time=r}return t}function $he(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 jhe(e,t){if(t===null)return new Date(NaN);var n=e.match(Dhe);if(!n)return new Date(NaN);var r=!!n[4],i=Uu(n[1]),o=Uu(n[2])-1,s=Uu(n[3]),a=Uu(n[4]),l=Uu(n[5])-1;if(r)return Yhe(t,a,l)?Uhe(t,a,l):new Date(NaN);var c=new Date(0);return!Hhe(t,o,s)||!Whe(t,i)?new Date(NaN):(c.setUTCFullYear(t,o,Math.max(i,s)),c)}function Uu(e){return e?parseInt(e):1}function Bhe(e){var t=e.match(Ahe);if(!t)return NaN;var n=Db(t[1]),r=Db(t[2]),i=Db(t[3]);return qhe(n,r,i)?n*T_+r*RE+i*1e3:NaN}function Db(e){return e&&parseFloat(e.replace(",","."))||0}function zhe(e){if(e==="Z")return 0;var t=e.match(Ihe);if(!t)return 0;var n=t[1]==="+"?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return Ghe(r,i)?n*(r*T_+i*RE):NaN}function Uhe(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 Vhe=[31,null,31,30,31,30,31,31,30,31,30,31];function S8(e){return e%400===0||e%4===0&&e%100!==0}function Hhe(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(Vhe[t]||(S8(e)?29:28))}function Whe(e,t){return t>=1&&t<=(S8(e)?366:365)}function Yhe(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function qhe(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function Ghe(e,t){return t>=0&&t<=59}function qi(e,t){Pe(2,arguments);var n=Re(e),r=et(t),i=n.getFullYear(),o=n.getDate(),s=new Date(0);s.setFullYear(i,r,15),s.setHours(0,0,0,0);var a=ice(s);return n.setMonth(r,Math.min(o,a)),n}function Mf(e,t){Pe(2,arguments);var n=Re(e),r=et(t);return n.setHours(r),n}function Rf(e,t){Pe(2,arguments);var n=Re(e),r=et(t);return n.setMinutes(r),n}function nf(e,t){Pe(2,arguments);var n=Re(e),r=et(t),i=Math.floor(n.getMonth()/3)+1,o=r-i;return qi(n,n.getMonth()+o*3)}function Zhe(e,t){Pe(2,arguments);var n=Re(e),r=et(t);return n.setSeconds(r),n}function Jv(e,t){Pe(2,arguments);var n=Re(e),r=et(t);return isNaN(n.getTime())?new Date(NaN):(n.setFullYear(r),n)}function kd(e,t){Pe(2,arguments);var n=et(t);return ro(e,-n)}function Khe(e,t){Pe(2,arguments);var n=et(t);return ME(e,-n)}function Md(e,t){Pe(2,arguments);var n=et(t);return Wc(e,-n)}const Nf="yyyy-MM-dd",VE="yyyy-MM-dd HH:mm",Ys=()=>new Date,HE=e=>typeof e!="string",C8=(e,t)=>!e||!HE(e)?e:t?_o(e,t):nce(e),E8=(e=Nf)=>t=>C8(t,e),qs=e=>C8(e,void 0),Rp=E8(),ey=E8(VE),wi=e=>HE(e)?e:Io(e),_N=e=>e?wi(e):null,ah=(e,t,n)=>{try{return qc(wi(e),{start:wi(t??e),end:wi(n??e)})}catch{return!1}},ba=(e,t)=>g8(e,t)||Kr(e,t),lh="all",T8={today:"Today",yesterday:"Yesterday",last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",last180Days:"Last 180 days",last365Days:"Last 365 days",[lh]:void 0},O8=Object.keys(T8),P8=e=>e===void 0||Cr(kI(Boolean,e)),ty=e=>typeof e=="string"&&O8.includes(e),Xhe=O8.filter(e=>e!==lh),k8=(e,t)=>({startDate:_N(e),endDate:_N(t)}),Qhe=e=>{if(!(!e||P8(e)))return e.startDate&&!e.endDate?`Since ${Rp(e.startDate)}`:!e.startDate&&e.endDate?`Until ${Rp(e.endDate)}`:`${Rp(e.startDate)} - ${Rp(e.endDate)}`},WE=e=>{if(!(!e||e===lh))return ty(e)?T8[e]:Qhe(e)},Gr=e=>Ar(UE(Ys(),e)),jl=e=>({startDate:e,endDate:ll(Ys())}),M8=cC([[_a("today"),()=>jl(Ar(Ys()))],[_a("yesterday"),()=>({startDate:Gr(1),endDate:ll(UE(Ys(),1))})],[_a("last7Days"),()=>jl(Gr(7))],[_a("last30Days"),()=>jl(Gr(30))],[_a("last90Days"),()=>jl(Gr(90))],[_a("last180Days"),()=>jl(Gr(180))],[_a("last365Days"),()=>jl(Gr(365))],[wI,()=>({})]]),Jhe=e=>{const t=wi(e);return cC([[()=>ba(Ar(Ys()),t),()=>"today"],[()=>ba(Gr(1),t),()=>"yesterday"],[()=>ba(Gr(7),t),()=>"last7Days"],[()=>ba(Gr(30),t),()=>"last30Days"],[()=>ba(Gr(90),t),()=>"last90Days"],[()=>ba(Gr(180),t),()=>"last180Days"],[()=>ba(Gr(365),t),()=>"last365Days"],[wI,()=>lh]])()},epe=e=>ty(e)?M8(e):e,ch=_n("shlink/visitCreation/createNewVisits",e=>({payload:{createdVisits:e}})),bN=5e3,wN=4,xN=2,tpe=({currentPage:e,pagesCount:t})=>e>=t,npe=(e,t)=>t*100/e,uh=({typePrefix:e,createLoaders:t,getExtraFulfilledPayload:n,shouldCancel:r})=>{const i=_n(`${e}/progressChanged`),o=_n(`${e}/large`),s=_n(`${e}/fallbackToInterval`),a=ir(e,async(l,{getState:c,dispatch:f})=>{var b;const[h,p]=t(l,c),m=async x=>Promise.all(x.map(async T=>h(T,bN).then(St("data")))).then(rZ),g=async(x,T=0)=>{if(r(c))return[];const P=await m(x[T]);return f(i(npe(x.length,T+xN))),T{const{pagination:T,data:P}=await h(x,bN);if(!T||tpe(T))return P;const k=uC(xN,T.pagesCount+1),N=dd(wN,k);return T.pagesCount-1>wN&&f(o()),P.concat(await g(N))},[w,y]=await Promise.all([v(),p((b=l.query)==null?void 0:b.excludeBots)]);return!w.length&&y&&f(s(Jhe(y.date))),{...n(l),visits:w}});return Object.assign(a,{progressChanged:i,large:o,fallbackToInterval:s})},fh=(e,t)=>async n=>e?t({page:1,itemsPerPage:1,excludeBots:n}).then(({data:r})=>r[0]):Promise.resolve(void 0),dh=({name:e,asyncThunkCreator:t,initialState:n,filterCreatedVisits:r})=>{const{pending:i,rejected:o,fulfilled:s,large:a,progressChanged:l,fallbackToInterval:c}=t,{reducer:f,actions:h}=qn({name:e,initialState:n,reducers:{cancelGetVisits:m=>({...m,cancelLoad:!0})},extraReducers:m=>{m.addCase(i,()=>({...n,loading:!0})),m.addCase(o,(g,{error:v})=>({...n,error:!0,errorData:io(v)})),m.addCase(s,(g,{payload:v})=>({...g,...v,loading:!1,loadingLarge:!1,error:!1})),m.addCase(a,g=>({...g,loadingLarge:!0})),m.addCase(l,(g,{payload:v})=>({...g,progress:v})),m.addCase(c,(g,{payload:v})=>({...g,fallbackInterval:v})),m.addCase(ch,(g,{payload:v})=>{const{visits:w}=g,y=r(g,v.createdVisits).map(({visit:b})=>b);return y.length?{...g,visits:[...y,...w]}:g})}}),{cancelGetVisits:p}=h;return{reducer:f,cancelGetVisits:p}},R8="shlink/domainVisits",N8="DEFAULT",rpe={visits:[],domain:"",loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},ipe=e=>uh({typePrefix:`${R8}/getDomainVisits`,createLoaders:({domain:t,query:n={},doIntervalFallback:r=!1},i)=>{const{getDomainVisits:o}=e(i),s=async(l,c)=>o(t,{...n,page:l,itemsPerPage:c}),a=fh(r,async l=>o(t,l));return[s,a]},getExtraFulfilledPayload:({domain:t,query:n={}})=>({domain:t,query:n}),shouldCancel:t=>t().domainVisits.cancelLoad}),ope=e=>dh({name:R8,initialState:rpe,asyncThunkCreator:e,filterCreatedVisits:({domain:t,query:n={}},r)=>{const{startDate:i,endDate:o}=n;return r.filter(({shortUrl:s,visit:a})=>s&&Tae(s,t)&&ah(a.date,i,o))}}),au=({children:e,label:t,className:n="",labelClassName:r="",noMargin:i=!1,id:o})=>U("div",{className:`${n} ${i?"":"mb-3"}`,children:[C("label",{className:`form-label ${r}`,htmlFor:o,children:t}),e]}),rg=({children:e,value:t,onChange:n,type:r,required:i,placeholder:o,className:s,labelClassName:a})=>{const l=S_();return C(au,{label:U(We,{children:[e,":"]}),className:s??"",labelClassName:a,id:l,children:C("input",{id:l,className:"form-control",type:r??"text",value:t,required:i??!0,placeholder:o,onChange:c=>n(c.target.value)})})},ig=({className:e="",placement:t,children:n})=>{const r=vl();return U(We,{children:[C("span",{className:e,ref:r,children:C(Fe,{icon:xC})}),C(Or,{target:r,placement:t,children:n})]})},Ab=({isLast:e,...t})=>C(rg,{...t,required:!1,type:"url",placeholder:"No redirect",className:e?"mb-0":""}),spe=({isOpen:e,toggle:t,domain:n,editDomainRedirects:r})=>{var h,p,m;const[i,o]=H.useState(((h=n.redirects)==null?void 0:h.baseUrlRedirect)??""),[s,a]=H.useState(((p=n.redirects)==null?void 0:p.regular404Redirect)??""),[l,c]=H.useState(((m=n.redirects)==null?void 0:m.invalidShortUrlRedirect)??""),f=oh(async()=>r({domain:n.domain,redirects:{baseUrlRedirect:Tb(i),regular404Redirect:Tb(s),invalidShortUrlRedirect:Tb(l)}}).then(t));return C(Ho,{isOpen:e,toggle:t,centered:!0,children:U("form",{name:"domainRedirectsModal",onSubmit:f,children:[U(oo,{toggle:t,children:["Edit redirects for ",C("b",{children:n.domain})]}),U(Ri,{children:[U(Ab,{value:i,onChange:o,children:[U(ig,{className:"me-2",placement:"bottom",children:["Visitors accessing the base url, as in ",U("b",{children:["https://",n.domain,"/"]}),", will be redirected to this URL."]}),"Base URL"]}),U(Ab,{value:s,onChange:a,children:[U(ig,{className:"me-2",placement:"bottom",children:["Visitors accessing a url not matching a short URL pattern, as in ",U("b",{children:["https://",n.domain,"/???/[...]"]}),", will be redirected to this URL."]}),"Regular 404"]}),U(Ab,{value:l,isLast:!0,onChange:c,children:[C(ig,{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"]})]}),U(ra,{children:[C(ht,{color:"link",type:"button",onClick:t,children:"Cancel"}),C(ht,{color:"primary",children:"Save"})]})]})})},ape=({domain:e,editDomainRedirects:t,selectedServer:n})=>{const[r,i]=$t(),[o,s]=$t(),{isDefault:a}=e,l=!a||Mi("defaultDomainRedirectsEdition",n),c=Mi("domainVisits",n),f=Vd(n);return U(E_,{isOpen:r,toggle:i,children:[c&&U(Ve,{tag:At,to:`/server/${f}/domain/${e.domain}${e.isDefault?`_${N8}`:""}/visits`,children:[C(Fe,{icon:wC,fixedWidth:!0})," Visit stats"]}),U(Ve,{disabled:!l,onClick:l?s:void 0,children:[C(Fe,{fixedWidth:!0,icon:bC})," Edit redirects"]}),C(spe,{domain:e,isOpen:o,toggle:s,editDomainRedirects:t})]})},lpe=({status:e,matchMedia:t=window.matchMedia})=>{const n=vl(),r=()=>t("(max-width: 991px)").matches,[i,o]=H.useState(r());return H.useEffect(()=>{const s=()=>o(r());return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]),e==="validating"?C(Fe,{fixedWidth:!0,icon:JI,spin:!0}):U(We,{children:[C("span",{ref:n,children:e==="valid"?C(Fe,{fixedWidth:!0,icon:pd,className:"text-muted"}):C(Fe,{fixedWidth:!0,icon:xw,className:"text-danger"})}),C(Or,{target:n,placement:i?"top-start":"left",autohide:e==="valid",children:e==="valid"?"Congratulations! This domain is properly configured.":U("span",{children:["Oops! There is some missing configuration, and short URLs shared with this domain will not work.",C("br",{}),"Check the ",C(Ei,{href:"https://slnk.to/multi-domain-docs",children:"documentation"})," in order to find out what is missing."]})})]})},Ib=({fallback:e})=>U("span",{className:"text-muted",children:[!e&&C("small",{children:"No redirect"}),e&&U(We,{children:[e," ",C("small",{children:"(as fallback)"})]})]}),cpe=()=>U(We,{children:[C(Fe,{fixedWidth:!0,icon:XX,className:"text-primary",id:"defaultDomainIcon"}),C(Or,{target:"defaultDomainIcon",placement:"right",children:"Default domain"})]}),upe=({domain:e,editDomainRedirects:t,checkDomainHealth:n,defaultRedirects:r,selectedServer:i})=>{const{domain:o,isDefault:s,redirects:a,status:l}=e;return H.useEffect(()=>{n(e.domain)},[]),U("tr",{className:"responsive-table__row",children:[C("td",{className:"responsive-table__cell","data-th":"Is default domain",children:s&&C(cpe,{})}),C("th",{className:"responsive-table__cell","data-th":"Domain",children:o}),C("td",{className:"responsive-table__cell","data-th":"Base path redirect",children:(a==null?void 0:a.baseUrlRedirect)??C(Ib,{fallback:r==null?void 0:r.baseUrlRedirect})}),C("td",{className:"responsive-table__cell","data-th":"Regular 404 redirect",children:(a==null?void 0:a.regular404Redirect)??C(Ib,{fallback:r==null?void 0:r.regular404Redirect})}),C("td",{className:"responsive-table__cell","data-th":"Invalid short URL redirect",children:(a==null?void 0:a.invalidShortUrlRedirect)??C(Ib,{fallback:r==null?void 0:r.invalidShortUrlRedirect})}),C("td",{className:"responsive-table__cell text-lg-center","data-th":"Status",children:C(lpe,{status:l})}),C("td",{className:"responsive-table__cell text-end",children:C(ape,{domain:e,editDomainRedirects:t,selectedServer:i})})]})},SN=["","Domain","Base path redirect","Regular 404 redirect","Invalid short URL redirect","",""],fpe=({listDomains:e,domainsList:t,filterDomains:n,editDomainRedirects:r,checkDomainHealth:i,selectedServer:o})=>{var m;const{filteredDomains:s,defaultRedirects:a,loading:l,error:c,errorData:f}=t,h=a??((m=s.find(({isDefault:g})=>g))==null?void 0:m.redirects);return H.useEffect(()=>{e()},[]),l?C(Eo,{loading:!0}):U(We,{children:[C(sh,{className:"mb-3",onChange:n}),(()=>c?C(Dr,{type:"error",children:C(Ao,{errorData:f,fallbackMessage:"Error loading domains :("})}):C(fn,{children:U("table",{className:"table table-hover responsive-table mb-0",children:[C("thead",{className:"responsive-table__header",children:C("tr",{children:SN.map((g,v)=>C("th",{children:g},v))})}),U("tbody",{children:[s.length<1&&C("tr",{children:C("td",{colSpan:SN.length,className:"text-center",children:"No results found"})}),s.map(g=>C(upe,{domain:g,editDomainRedirects:r,checkDomainHealth:i,defaultRedirects:h,selectedServer:o},g.domain))]})]})}))()]})},dpe="shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS",hpe=e=>ir(dpe,async({domain:t,redirects:n},{getState:r})=>{const{editDomainRedirects:i}=e(r),o=await i({domain:t,...n});return{domain:t,redirects:o}}),ppe=(e,t)=>{const[n,r]=e.split("://"),[,...i]=r.split("/"),o=i.length?`/${i.join("/")}`:"";return`${n}://${t}${o}`},Np="shlink/domainsList",Lp={domains:[],filteredDomains:[],loading:!1,error:!1},CN=({domain:e,redirects:t})=>n=>n.domain!==e?n:{...n,redirects:t},EN=(e,t)=>n=>n.domain!==e?n:{...n,status:t},mpe=(e,t)=>{const n=ir(`${Np}/listDomains`,async(s,{getState:a})=>{const{listDomains:l}=e(a),{data:c,defaultRedirects:f}=await l();return{domains:c.map(h=>({...h,status:"validating"})),defaultRedirects:f}}),r=ir(`${Np}/checkDomainHealth`,async(s,{getState:a})=>{const{selectedServer:l}=a();if(!tC(l))return{domain:s,status:"invalid"};try{const{url:c,...f}=l,{health:h}=e({...f,url:ppe(c,s)}),{status:p}=await h();return{domain:s,status:p==="pass"?"valid":"invalid"}}catch{return{domain:s,status:"invalid"}}}),i=_n(`${Np}/filterDomains`),{reducer:o}=qn({name:Np,initialState:Lp,reducers:{},extraReducers:s=>{s.addCase(n.pending,()=>({...Lp,loading:!0})),s.addCase(n.rejected,(a,{error:l})=>({...Lp,error:!0,errorData:io(l)})),s.addCase(n.fulfilled,(a,{payload:l})=>({...Lp,...l,filteredDomains:l.domains})),s.addCase(r.fulfilled,({domains:a,filteredDomains:l,...c},{payload:f})=>({...c,domains:a.map(EN(f.domain,f.status)),filteredDomains:l.map(EN(f.domain,f.status))})),s.addCase(i,(a,{payload:l})=>({...a,filteredDomains:a.domains.filter(({domain:c})=>c.toLowerCase().match(l.toLowerCase()))})),s.addCase(t.fulfilled,(a,{payload:l})=>({...a,domains:a.domains.map(CN(l)),filteredDomains:a.filteredDomains.map(CN(l))}))}});return{reducer:o,listDomains:n,checkDomainHealth:r,filterDomains:i}},gpe=(e,t)=>{e.serviceFactory("DomainSelector",()=>Cae),e.decorator("DomainSelector",t(["domainsList"],["listDomains"])),e.serviceFactory("ManageDomains",()=>fpe),e.decorator("ManageDomains",t(["domainsList","selectedServer"],["listDomains","filterDomains","editDomainRedirects","checkDomainHealth"])),e.serviceFactory("domainsListReducerCreator",mpe,"buildShlinkApiClient","editDomainRedirects"),e.serviceFactory("domainsListReducer",rc("reducer"),"domainsListReducerCreator"),e.serviceFactory("listDomains",rc("listDomains"),"domainsListReducerCreator"),e.serviceFactory("filterDomains",rc("filterDomains"),"domainsListReducerCreator"),e.serviceFactory("editDomainRedirects",hpe,"buildShlinkApiClient"),e.serviceFactory("checkDomainHealth",rc("checkDomainHealth"),"domainsListReducerCreator")},TN="shlink/mercure",vpe={loading:!0,error:!1},ype=e=>{const t=ir(`${TN}/loadMercureInfo`,(r,{getState:i})=>{const{settings:o}=i();if(!o.realTimeUpdates.enabled)throw new Error("Real time updates not enabled");return e(i).mercureInfo()}),{reducer:n}=qn({name:TN,initialState:vpe,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}},_pe=e=>{e.serviceFactory("mercureInfoReducerCreator",ype,"buildShlinkApiClient"),e.serviceFactory("mercureInfoReducer",rc("reducer"),"mercureInfoReducerCreator"),e.serviceFactory("loadMercureInfo",rc("loadMercureInfo"),"mercureInfoReducerCreator")},L8=({isOpen:e,duplicatedServers:t,onDiscard:n,onSave:r})=>{const i=t.length>1;return U(Ho,{centered:!0,isOpen:e,children:[U(oo,{children:["Duplicated server",i&&"s"]}),U(Ri,{children:[C("p",{children:i?"The next servers already exist:":"There is already a server with:"}),C("ul",{children:t.map(({url:o,apiKey:s},a)=>i?U("li",{children:[C("b",{children:o})," - ",C("b",{children:s})]},a):U(H.Fragment,{children:[U("li",{children:["URL: ",C("b",{children:o})]}),U("li",{children:["API key: ",C("b",{children:s})]})]},a))}),U("span",{children:[i?"Do you want to ignore duplicated servers":"Do you want to save this server anyway","?"]})]}),U(ra,{children:[C(ht,{color:"link",onClick:n,children:i?"Ignore duplicated":"Discard"}),C(ht,{color:"primary",onClick:r,children:"Save anyway"})]})]})},D8=({onSubmit:e,initialValues:t,children:n,title:r})=>{const[i,o]=H.useState(""),[s,a]=H.useState(""),[l,c]=H.useState(""),f=oh(()=>e({name:i,url:s,apiKey:l}));return H.useEffect(()=>{t&&o(t.name),t&&a(t.url),t&&c(t.apiKey)},[t]),U("form",{className:"server-form",name:"serverForm",onSubmit:f,children:[U(fn,{className:"mb-3",title:r,children:[C(rg,{value:i,onChange:o,children:"Name"}),C(rg,{type:"url",value:s,onChange:a,children:"URL"}),C(rg,{value:l,onChange:c,children:"API key"})]}),C("div",{className:"text-end",children:n})]})},ON=4e3,PN=({type:e})=>C("div",{className:"mt-3",children:U(Dr,{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."]})}),bpe=(e,t)=>({servers:n,createServers:r})=>{const i=jo(),o=ia(),s=!!Object.keys(n).length,[a,l]=t(!1,ON),[c,f]=t(!1,ON),[h,p]=$t(),[m,g]=H.useState(),v=()=>{if(!m)return;const w=pE();r([{...m,id:w}]),i(`/server/${w}`)};return H.useEffect(()=>{Object.values(n).some(({url:y,apiKey:b})=>(m==null?void 0:m.url)===y&&(m==null?void 0:m.apiKey)===b)?p():v()},[m]),U(su,{children:[U(D8,{title:C("h5",{className:"mb-0",children:"Add new server"}),onSubmit:g,children:[!s&&C(e,{tooltipPlacement:"top",onImport:l,onImportError:f}),s&&C(ht,{outline:!0,onClick:o,children:"Cancel"}),C(ht,{outline:!0,color:"primary",className:"ms-2",children:"Create server"})]}),a&&C(PN,{type:"success"}),c&&C(PN,{type:"error"}),C(L8,{isOpen:h,duplicatedServers:m?[m]:[],onDiscard:o,onSave:v})]})},wpe=e=>({server:t,className:n,children:r,textClassName:i})=>{const[o,,s,a]=$t();return U(We,{children:[U("span",{className:n,onClick:s,children:[!r&&C(Fe,{fixedWidth:!0,icon:_C}),C("span",{className:i,children:r??"Remove this server"})]}),C(e,{server:t,isOpen:o,toggle:a})]})},xpe=({server:e,toggle:t,isOpen:n,deleteServer:r,redirectHome:i=!0})=>{const o=jo(),s=H.useRef(!1),a=()=>{s.current=!0,t()};return U(Ho,{isOpen:n,toggle:t,centered:!0,onClosed:()=>{s.current&&(r(e),i&&o("/"))},children:[C(oo,{toggle:t,className:"text-danger",children:"Remove server"}),U(Ri,{children:[U("p",{children:["Are you sure you want to remove ",C("b",{children:e?e.name:""}),"?"]}),C("p",{children:C("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."})})]}),U(ra,{children:[C(ht,{color:"link",onClick:t,children:"Cancel"}),C(ht,{color:"danger",onClick:a,children:"Delete"})]})]})},Spe=e=>K5(({editServer:t,selectedServer:n,selectServer:r})=>{const i=ia(),{reconnect:o}=Ooe();if(!Rs(n))return null;const s=a=>{t(n.id,a),o==="true"&&r(n.id),i()};return C(su,{children:U(D8,{title:U("h5",{className:"mb-0",children:['Edit "',n.name,'"']}),initialValues:n,onSubmit:s,children:[C(ht,{outline:!0,className:"me-2",onClick:i,children:"Cancel"}),C(ht,{outline:!0,color:"primary",children:"Save"})]})})},e);const kN=e=>({url:t,apiKey:n})=>e.some(r=>r.url===t&&r.apiKey===n),Cpe=({importServersFromFile:e})=>({createServers:t,servers:n,children:r,onImport:i=()=>{},onImportError:o=()=>{},tooltipPlacement:s="bottom",className:a=""})=>{const l=vl(),[c,f]=H.useState(),[h,p]=H.useState([]),[m,,g,v]=$t(),w=Ms(t,i),y=Ms(()=>w(c??[]),v),b=Ms(()=>w((c??[]).filter(T=>!kN(h)(T))),v),x=async({target:T})=>{var P;return e((P=T.files)==null?void 0:P[0]).then(f).then(()=>{T.value=null}).catch(o)};return H.useEffect(()=>{if(!c)return;const T=Object.values(n),P=c.filter(kN(T)),k=!!P.length;k?p(P):w(c),k&&g()},[c]),U(We,{children:[U(ht,{outline:!0,id:"importBtn",className:a,onClick:()=>{var T;return(T=l.current)==null?void 0:T.click()},children:[C(Fe,{icon:rQ,fixedWidth:!0})," ",r??"Import from file"]}),U(Or,{placement:s,target:"importBtn",children:["You can create servers by importing a CSV file with columns ",C("b",{children:"name"}),", ",C("b",{children:"apiKey"})," and ",C("b",{children:"url"}),"."]}),C("input",{type:"file",accept:"text/csv",className:"import-servers-btn__csv-select",ref:l,onChange:x}),C(L8,{isOpen:m,duplicatedServers:h,onDiscard:b,onSave:y})]})};const Epe=e=>({servers:t,selectedServer:n})=>C(su,{children:U("div",{className:"server-error__container flex-column",children:[U(Eo,{className:"w-100 mb-3 mb-md-5",type:"error",fullWidth:!0,children:[!Rs(n)&&"Could not find this Shlink server.",Rs(n)&&U(We,{children:[C("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."]})]}),U(G5,{servers:Object.values(t),children:["These are the Shlink servers currently configured. Choose one of them or ",C(At,{to:"/server/create",children:"add a new one"}),"."]}),Rs(n)&&C("div",{className:"container mt-3 mt-md-5",children:U("h5",{children:["Alternatively, if you think you may have miss-configured this server, you can ",C(e,{server:n,className:"server-error__delete-btn",children:"remove it"})," or ",C(At,{to:`/server/${n.id}/edit?reconnect=true`,children:"edit it"}),"."]})})]})}),Tpe=4e3,Ope=(e,t,n,r)=>({servers:i})=>{const o=Object.values(i),[s,a]=H.useState(o),l=p=>a(o.filter(({name:m,url:g})=>`${m} ${g}`.toLowerCase().match(p.toLowerCase()))),c=s.some(({autoConnect:p})=>!!p),[f,h]=n(!1,Tpe);return H.useEffect(()=>{a(Object.values(i))},[i]),U(su,{children:[C(sh,{className:"mb-3",onChange:l}),U(Jn,{className:"mb-3",children:[U("div",{className:"col-md-6 d-flex d-md-block mb-2 mb-md-0",children:[C(t,{className:"flex-fill",onImportError:h,children:"Import servers"}),o.length>0&&U(ht,{outline:!0,className:"ms-2 flex-fill",onClick:async()=>e.exportServers(),children:[C(Fe,{icon:i6,fixedWidth:!0})," Export servers"]})]}),C("div",{className:"col-md-6 text-md-end d-flex d-md-block",children:U(ht,{outline:!0,color:"primary",className:"flex-fill",tag:At,to:"/server/create",children:[C(Fe,{icon:SC,fixedWidth:!0})," Add a server"]})})]}),C(fn,{children:U("table",{className:"table table-hover responsive-table mb-0",children:[C("thead",{className:"responsive-table__header",children:U("tr",{children:[c&&C("th",{"aria-label":"Auto-connect",style:{width:"50px"}}),C("th",{children:"Name"}),C("th",{children:"Base URL"}),C("th",{"aria-label":"Options"})]})}),U("tbody",{children:[!s.length&&C("tr",{className:"text-center",children:C("td",{colSpan:4,children:"No servers found."})}),s.map(p=>C(r,{server:p,hasAutoConnect:c},p.id))]})]})}),f&&C("div",{className:"mt-3",children:C(Dr,{type:"error",children:"The servers could not be imported. Make sure the format is correct."})})]})},Ppe=e=>({server:t,hasAutoConnect:n})=>U("tr",{className:"responsive-table__row",children:[n&&C("td",{className:"responsive-table__cell","data-th":"Auto-connect",children:t.autoConnect&&U(We,{children:[C(Fe,{icon:pd,className:"text-primary",id:"autoConnectIcon"}),C(Or,{target:"autoConnectIcon",placement:"right",children:"Auto-connect to this server"})]})}),C("th",{className:"responsive-table__cell","data-th":"Name",children:C(At,{to:`/server/${t.id}`,children:t.name})}),C("td",{className:"responsive-table__cell","data-th":"Base URL",children:t.url}),C("td",{className:"responsive-table__cell text-end",children:C(e,{server:t})})]});var kpe={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"]},Mpe=kpe,Rpe={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"]},Npe=Rpe,Lpe={prefix:"far",iconName:"circle",icon:[512,512,[128308,128309,128992,128993,128994,128995,128996,9679,9898,9899,11044,61708,61915],"f111","M512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256zM256 48C141.1 48 48 141.1 48 256C48 370.9 141.1 464 256 464C370.9 464 464 370.9 464 256C464 141.1 370.9 48 256 48z"]},A8={prefix:"far",iconName:"clone",icon:[512,512,[],"f24d","M64 464H288c8.8 0 16-7.2 16-16V384h48v64c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V224c0-35.3 28.7-64 64-64h64v48H64c-8.8 0-16 7.2-16 16V448c0 8.8 7.2 16 16 16zM224 304H448c8.8 0 16-7.2 16-16V64c0-8.8-7.2-16-16-16H224c-8.8 0-16 7.2-16 16V288c0 8.8 7.2 16 16 16zm-64-16V64c0-35.3 28.7-64 64-64H448c35.3 0 64 28.7 64 64V288c0 35.3-28.7 64-64 64H224c-35.3 0-64-28.7-64-64z"]};const Dpe=e=>({server:t,setAutoConnect:n})=>{const[r,i]=$t(),[o,,s,a]=$t(),l=`/server/${t.id}`,{autoConnect:c}=t,f=c?tQ:Lpe;return U(E_,{isOpen:r,toggle:i,children:[U(Ve,{tag:At,to:l,children:[C(Fe,{icon:JX,fixedWidth:!0})," Connect"]}),U(Ve,{tag:At,to:`${l}/edit`,children:[C(Fe,{icon:bC,fixedWidth:!0})," Edit server"]}),U(Ve,{onClick:()=>n(t,!c),children:[C(Fe,{icon:f,fixedWidth:!0})," ",c?"Do not a":"A","uto-connect"]}),C(Ve,{divider:!0}),U(Ve,{className:"dropdown-item--danger",onClick:s,children:[C(Fe,{icon:_C,fixedWidth:!0})," Remove server"]}),C(e,{redirectHome:!1,server:t,isOpen:o,toggle:a})]})};var ny={},Ape={get exports(){return ny},set exports(e){ny=e}};/** @license +***************************************************************************** */var t2=function(){return t2=Object.assign||function(t){for(var n,r=1,i=arguments.length;rU(hE,{tag:At,to:`/server/${e}`,className:"servers-list__server-item",children:[t,C(Fe,{icon:BQ,className:"servers-list__server-item-icon"})]}),t8=({servers:e,children:t,embedded:n=!1})=>U(We,{children:[t&&C("h5",{className:"mb-md-3",children:t}),e.length>0&&C(uE,{className:ge("servers-list__list-group",{"servers-list__list-group--embedded":n}),children:e.map(({id:r,name:i})=>C(Jse,{id:r,name:i},r))})]}),n8=({color:e=vE,className:t})=>C("svg",{className:t,viewBox:"0 0 512 512",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:U("g",{fill:e,children:[C("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"}),C("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"}),C("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"}),C("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 eae=({servers:e})=>{const t=Bo(),n=Object.values(e),r=!!n.length;return H.useEffect(()=>{const i=n.find(({autoConnect:o})=>o);i&&t(`/server/${i.id}`)},[]),C("div",{className:"home",children:C(Er,{className:"home__main-card",children:U(Qn,{className:"g-0",children:[C("div",{className:"col-md-5 d-none d-md-block",children:C("div",{className:"home__logo-wrapper",children:C("div",{className:"home__logo",children:C(n8,{})})})}),U("div",{className:"col-md-7 home__servers-container",children:[C("div",{className:"home__title-wrapper",children:C("h1",{className:"home__title",children:"Welcome!"})}),C(t8,{embedded:!0,servers:n,children:!r&&U("div",{className:"p-4 text-center",children:[C("p",{className:"mb-5",children:"This application will help you manage your Shlink servers."}),C("p",{children:U(At,{to:"/server/create",className:"btn btn-outline-primary btn-lg me-2",children:[C(Fe,{icon:EC})," ",C("span",{className:"ms-1",children:"Add a server"})]})}),C("p",{className:"mb-0 mt-5",children:C(Ei,{href:"https://shlink.io/documentation",children:U("small",{children:[C("span",{className:"me-1",children:"Learn more about Shlink"})," ",C(Fe,{icon:wQ})]})})})]})})]})]})})})};const tae=e=>()=>{const[t,n,,r]=$t(),i=kn(),{pathname:o}=i;H.useEffect(r,[i]);const s="/settings",a=ge("main-header__toggle-icon",{"main-header__toggle-icon--opened":t});return U(KC,{color:"primary",dark:!0,fixed:"top",className:"main-header",expand:"md",children:[U(XC,{tag:At,to:"/",children:[C(n8,{className:"main-header__brand-logo",color:"white"})," Shlink"]}),C(QC,{onClick:n,children:C(Fe,{icon:$Q,className:a})}),C(v5,{navbar:!0,isOpen:t,children:U(g_,{navbar:!0,className:"ms-auto",children:[C(JC,{children:U(m5,{tag:At,to:s,active:o.startsWith(s),children:[C(Fe,{icon:HQ}),"  Settings"]})}),C(e,{})]})})]})};const lu=({children:e})=>C("div",{className:"no-menu-wrapper container-xl",children:e}),nae=e=>({error:"border-danger",default:""})[e],rae=e=>({error:"text-danger",default:"text-muted"})[e],To=({className:e,children:t,loading:n=!1,type:r="default",fullWidth:i=!1})=>{const o=ge({"col-md-12":i,"col-md-10 offset-md-1":!i});return C(Qn,{className:ge("g-0",e),children:C("div",{className:o,children:C(Er,{className:nae(r),body:!0,children:U("h3",{className:ge("text-center mb-0",rae(r)),children:[n&&C(Fe,{icon:s6,spin:!0}),n&&C("span",{className:"ms-2",children:t??"Loading..."}),!n&&t]})})})})};function r8(e,t){return n=>{const r=Js(),{selectServer:i,selectedServer:o}=n;return H.useEffect(()=>{r.serverId&&i(r.serverId)},[r.serverId]),o?Zq(o)?C(t,{}):C(e,{...n}):C(lu,{children:C(To,{loading:!0})})}}const ir=(e,t)=>Ese(e,t,{serializeError:lC}),iae=(e,t)=>{const n=G3(e),r=G3(t),i=n.pop(),o=r.pop(),s=X3(n,r);return s!==0?s:i&&o?X3(i.split("."),o.split(".")):i||o?i?-1:1:0},n2=(e,t,n)=>{lae(n);const r=iae(e,t);return i8[n].includes(r)},oae=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,G3=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(oae);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},Z3=e=>e==="*"||e==="x"||e==="X",K3=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},sae=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],aae=(e,t)=>{if(Z3(e)||Z3(t))return 0;const[n,r]=sae(K3(e),K3(t));return n>r?1:n{for(let n=0;n":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1]},Q3=Object.keys(i8),lae=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(Q3.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${Q3.join("|")}`)},OE=(e,t,n=1)=>dC(n,e+1).map(t),yi=e=>!zo(e)&&!Cr(e),oh=e=>er(t=>t.preventDefault(),e),Pb=e=>Cr(e)?null:e,_a=e=>t=>e===t,o8=e=>e?"true":"false",kb=e=>e===void 0?void 0:o8(e),vv=(e,t,n)=>qq(e,t,n),cae=(e,{maxVersion:t,minVersion:n})=>{if(!yi(e))return!1;const r=!n||n2(e,n,">=");return(!t||n2(e,t,"<="))&&r},s8=bZ(lC,e=>{try{return n2(e,e,"=")}catch{return!1}}),a8=e=>s8(e)?`v${e}`:e,l8=(e="latest")=>t=>s8(t)?t:e,PE="shlink/selectedServer",uae="1.0.0",fae="999.999.999",dae="latest",hae=Eo(e=>e===dae?fae:e,l8(uae)),Mb={},pae=async(e,t)=>{const n=`${e.id}_${e.url}_${e.apiKey}`;return Mb[n]||(Mb[n]=await t().then(({version:r})=>({version:hae(r),printableVersion:a8(r)}))),Mb[n]},J3=null,kE=_n(`${PE}/resetSelectedServer`),c8=e=>ir(`${PE}/selectServer`,async(t,{dispatch:n,getState:r})=>{n(kE());const{servers:i}=r(),o=i[t];if(!o)return{serverNotFound:!0};try{const{health:s}=e(o),{version:a,printableVersion:l}=await pae(o,s);return{...o,version:a,printableVersion:l}}catch{return{...o,serverNotReachable:!0}}}),mae=(e,t)=>{const n=Vse();return n.startListening({actionCreator:e.fulfilled,effect:({payload:r},{dispatch:i})=>{n_(r)&&i(t())}}),n},gae=e=>Yn({name:PE,initialState:J3,reducers:{},extraReducers:t=>{t.addCase(kE,()=>J3),t.addCase(e.fulfilled,(n,{payload:r})=>r)}}),ji=e=>t=>n_(t)&&cae(t.version,{minVersion:e}),ME={forwardQuery:ji("2.9.0"),nonRestCors:ji("2.9.0"),defaultDomainRedirectsEdition:ji("2.10.0"),nonOrphanVisits:ji("3.0.0"),allTagsFiltering:ji("3.0.0"),tagsStats:ji("3.0.0"),domainVisits:ji("3.1.0"),excludeBotsOnShortUrls:ji("3.4.0"),filterDisabledUrls:ji("3.4.0"),deviceLongUrls:ji("3.5.0")};Object.freeze(ME);const Mi=(e,t)=>H.useMemo(()=>ME[e](t),[e,c8]);const vae=(e,t,n,r,i,o,s,a,l,c,f,h,p)=>r8(({selectedServer:m,sidebarNotPresent:g,sidebarPresent:v})=>{const w=kn(),[y,b,x,T]=$t(),P=n_(m);if(H.useEffect(()=>T(),[w]),H.useEffect(()=>(P&&v(),()=>g()),[]),!P)return C(c,{});const k=Mi("nonOrphanVisits",m),N=Mi("domainVisits",m),D=ge("menu-layout__burger-icon",{"menu-layout__burger-icon--active":y}),z=Loe(x,T);return U(We,{children:[C(Fe,{icon:iQ,className:D,onClick:b}),C("div",{...z,className:"menu-layout__swipeable",children:U("div",{className:"menu-layout__swipeable-inner",children:[C(n,{selectedServer:m,showOnMobile:y}),C("div",{className:"menu-layout__container",onClick:()=>T(),children:C("div",{className:"container-xl",children:U(e_,{children:[C(gt,{index:!0,element:C(eC,{replace:!0,to:"overview"})}),C(gt,{path:"/overview",element:C(f,{})}),C(gt,{path:"/list-short-urls/:page",element:C(t,{})}),C(gt,{path:"/create-short-url",element:C(r,{})}),C(gt,{path:"/short-code/:shortCode/visits/*",element:C(i,{})}),C(gt,{path:"/short-code/:shortCode/edit",element:C(h,{})}),C(gt,{path:"/tag/:tag/visits/*",element:C(o,{})}),N&&C(gt,{path:"/domain/:domain/visits/*",element:C(s,{})}),C(gt,{path:"/orphan-visits/*",element:C(a,{})}),k&&C(gt,{path:"/non-orphan-visits/*",element:C(l,{})}),C(gt,{path:"/manage-tags",element:C(e,{})}),C(gt,{path:"/manage-domains",element:C(p,{})}),C(gt,{path:"*",element:C(D5,{to:`/server/${m.id}/list-short-urls/1`,children:"List short URLs"})})]})})})]})})]})},c),yae={sidebarPresent:!1},{actions:_ae,reducer:bae}=Yn({name:"shlink/sidebar",initialState:yae,reducers:{sidebarPresent:()=>({sidebarPresent:!0}),sidebarNotPresent:()=>({sidebarPresent:!1})}}),{sidebarPresent:wae,sidebarNotPresent:xae}=_ae,Sae=bae,Cae=({children:e})=>{const t=kn();return H.useEffect(()=>{scrollTo(0,0)},[t]),C(We,{children:e})},Eae="%_VERSION_%",Tae=Eo(l8(),a8),eR=({project:e,version:t})=>C(Ei,{href:`https://github.com/shlinkio/${e}/releases/${t}`,className:"text-muted",children:C("b",{children:t})}),Oae=({selectedServer:e,clientVersion:t=Eae})=>{const n=Tae(t);return U("small",{className:"text-muted",children:[n_(e)&&U(We,{children:["Server: ",C(eR,{project:"shlink",version:e.printableVersion})," - "]}),"Client: ",C(eR,{project:"shlink-web-client",version:n})]})};const Pae=({selectedServer:e,sidebar:t})=>{const n=ge("text-center",{"shlink-versions-container--with-sidebar":t.sidebarPresent});return C("div",{className:n,children:C(Oae,{selectedServer:e})})},tR={"Content-Type":"application/json"},nR=e=>e!=null&&e.body?e?{...e,headers:{...e.headers??{},...tR}}:{headers:tR}:e;class kae{constructor(t){Se(this,"fetchJson",(t,n)=>this.fetch(t,nR(n)).then(async r=>{const i=await r.json();if(!r.ok)throw i;return i}));Se(this,"fetchEmpty",(t,n)=>this.fetch(t,nR(n)).then(async r=>{if(!r.ok)throw await r.json()}));Se(this,"fetchBlob",t=>this.fetch(t).then(n=>n.blob()));this.fetch=t}}const u8=({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)},f8=(e,t,n)=>{const r=new Blob([t],{type:"text/csv;charset=utf-8;"}),i=URL.createObjectURL(r);u8(e,i,n)};class Mae{constructor(t,n){this.httpClient=t,this.window=n}async saveImage(t,n){const r=await this.httpClient.fetchBlob(t),i=URL.createObjectURL(r);u8(this.window,i,n)}}class Rae{constructor(t,n){Se(this,"exportVisits",(t,n)=>{n.length&&this.exportCsv(t,n)});Se(this,"exportShortUrls",t=>{t.length&&this.exportCsv("short_urls.csv",t)});Se(this,"exportCsv",(t,n)=>{const r=this.jsonToCsv(n);f8(this.window,r,t)});this.window=t,this.jsonToCsv=n}}const Nae=(e,t)=>{e.constant("window",window),e.constant("console",console),e.constant("fetch",window.fetch.bind(window)),e.service("HttpClient",kae,"fetch"),e.service("ImageDownloader",Mae,"HttpClient","window"),e.service("ReportExporter",Rae,"window","jsonToCsv"),e.serviceFactory("ScrollToTop",()=>Cae),e.serviceFactory("MainHeader",tae,"ServersDropdown"),e.serviceFactory("Home",()=>eae),e.decorator("Home",gv),e.decorator("Home",t(["servers"],["resetSelectedServer"])),e.serviceFactory("MenuLayout",vae,"TagsList","ShortUrlsList","AsideMenu","CreateShortUrl","ShortUrlVisits","TagVisits","DomainVisits","OrphanVisits","NonOrphanVisits","ServerError","Overview","EditShortUrl","ManageDomains"),e.decorator("MenuLayout",t(["selectedServer"],["selectServer","sidebarPresent","sidebarNotPresent"])),e.serviceFactory("AsideMenu",Kse,"DeleteServerButton"),e.serviceFactory("ShlinkVersionsContainer",()=>Pae),e.decorator("ShlinkVersionsContainer",t(["selectedServer","sidebar"])),e.serviceFactory("ErrorHandler",Xse,"window","console"),e.serviceFactory("sidebarPresent",()=>wae),e.serviceFactory("sidebarNotPresent",()=>xae)};const oa=({text:e,disabled:t=!1,className:n="",children:r,dropdownClassName:i,right:o=!1,minWidth:s})=>{const[a,l]=$t(),c=`dropdown-btn__toggle btn-block ${n}`,f={minWidth:s&&`${s}px`};return U(ou,{isOpen:a,toggle:l,disabled:t,className:i,children:[C(su,{caret:!0,className:c,color:"primary",children:e}),C(vl,{className:"w-100",end:o,style:f,children:r})]})};const Lae=({listDomains:e,value:t,domainsList:n,onChange:r})=>{const[i,,o,s]=$t(),{domains:a}=n,l=!t,c=()=>r("");return H.useEffect(()=>{e()},[]),i?U(eh,{children:[C(Wc,{value:t??"",placeholder:"Domain",onChange:f=>r(f.target.value)}),C(ht,{id:"backToDropdown",outline:!0,type:"button",className:"domains-dropdown__back-btn","aria-label":"Back to domains list",onClick:Eo(c,s),children:C(Fe,{icon:EQ})}),C(Or,{target:"backToDropdown",placement:"left",trigger:"hover",children:"Existing domains"})]}):U(oa,{text:l?"Domain":`Domain: ${t}`,className:l?"domains-dropdown__toggle-btn":"domains-dropdown__toggle-btn--active",children:[a.map(({domain:f,isDefault:h})=>U(Ve,{active:(t===f||h)&&l,onClick:()=>r(f),children:[f,h&&C("span",{className:"float-end text-muted",children:"default"})]},f)),C(Ve,{divider:!0}),C(Ve,{onClick:Eo(c,o),children:C("i",{children:"New domain"})})]})},Io=({errorData:e,fallbackMessage:t})=>U(We,{children:[(e==null?void 0:e.detail)??t,BX(e)&&U("p",{className:"mb-0",children:["Invalid elements: [",e.invalidElements.join(", "),"]"]})]}),Dr=({children:e,type:t,className:n,small:r=!1})=>C(Qn,{className:n,children:C("div",{className:ge({"col-md-10 offset-md-1":!r,"col-12":r}),children:C(fn,{role:"document",className:ge("text-center",{"bg-main":t==="success","bg-danger":t==="error","bg-warning":t==="warning","text-white":t!=="warning"}),bodyClassName:ge({"p-2":r}),children:e})})});const Dae=500;let Mp;const sh=({onChange:e,className:t,large:n=!0,noBorder:r=!1,initialValue:i=""})=>{const[o,s]=H.useState(i),a=()=>{Mp&&clearTimeout(Mp),Mp=null},l=(c,f=Dae)=>{s(c),a(),Mp=setTimeout(()=>{e(c),a()},f)};return U("div",{className:ge("search-field",t),children:[C("input",{type:"text",className:ge("form-control search-field__input",{"form-control-lg":n,"search-field__input--no-border":r}),placeholder:"Search...",value:o,onChange:c=>l(c.target.value)}),C(Fe,{icon:FQ,className:"search-field__icon"}),C("div",{className:"close search-field__close btn-close",hidden:o==="",id:"search-field__close",onClick:()=>l("",0)})]})};const O_=({isOpen:e,toggle:t,children:n,right:r=!0})=>U(y_,{toggle:t,isOpen:e,children:[U(su,{size:"sm",caret:!0,outline:!0,className:"dropdown-btn-menu__dropdown-toggle",children:[" ",C(Fe,{icon:PQ})," "]}),C(vl,{end:r,children:n})]}),Mf=(e,t,n)=>zo(n)?e.shortCode===t&&!e.domain:e.shortCode===t&&e.domain===n,Aae=(e,t)=>!e.domain&&t===j8?!0:e.domain===t,Iae=(e,t)=>{const n=(t==null?void 0:t.validateUrls)??!1;return e?{longUrl:e.longUrl,tags:e.tags,title:e.title??void 0,domain:e.domain??void 0,validSince:e.meta.validSince??void 0,validUntil:e.meta.validUntil??void 0,maxVisits:e.meta.maxVisits??void 0,crawlable:e.crawlable,forwardQuery:e.forwardQuery,deviceLongUrls:e.deviceLongUrls,validateUrl:n}:{longUrl:"",validateUrl:n}},d8="__",Fae=e=>e.replaceAll("/",d8),gm=e=>e.replaceAll(d8,"/");function et(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 Pe(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function vm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?vm=function(n){return typeof n}:vm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},vm(e)}function Re(e){Pe(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||vm(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 _l(e,t){Pe(2,arguments);var n=Re(e),r=et(t);return isNaN(r)?new Date(NaN):(r&&n.setDate(n.getDate()+r),n)}function ro(e,t){Pe(2,arguments);var n=Re(e),r=et(t);if(isNaN(r))return new Date(NaN);if(!r)return n;var i=n.getDate(),o=new Date(n.getTime());o.setMonth(n.getMonth()+r+1,0);var s=o.getDate();return i>=s?o:(n.setFullYear(o.getFullYear(),o.getMonth(),i),n)}function ym(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ym=function(n){return typeof n}:ym=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ym(e)}function $ae(e,t){if(Pe(2,arguments),!t||ym(t)!=="object")return new Date(NaN);var n=t.years?et(t.years):0,r=t.months?et(t.months):0,i=t.weeks?et(t.weeks):0,o=t.days?et(t.days):0,s=t.hours?et(t.hours):0,a=t.minutes?et(t.minutes):0,l=t.seconds?et(t.seconds):0,c=Re(e),f=r||n?ro(c,r+n*12):c,h=o||i?_l(f,o+i*7):f,p=a+s*60,m=l+p*60,g=m*1e3,v=new Date(h.getTime()+g);return v}function RE(e,t){Pe(2,arguments);var n=Re(e).getTime(),r=et(t);return new Date(n+r)}var jae=36e5;function Bae(e,t){Pe(2,arguments);var n=et(t);return RE(e,n*jae)}var zae={};function Yo(){return zae}function h8(e,t){var n,r,i,o,s,a,l,c;Pe(1,arguments);var f=Yo(),h=et((n=(r=(i=(o=t==null?void 0:t.weekStartsOn)!==null&&o!==void 0?o:t==null||(s=t.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.weekStartsOn)!==null&&i!==void 0?i:f.weekStartsOn)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Re(e),m=p.getDay(),g=(m=i.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function Vae(e){Pe(1,arguments);var t=Uae(e),n=new Date(0);n.setFullYear(t,0,4),n.setHours(0,0,0,0);var r=Td(n);return r}function Yc(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 Ar(e){Pe(1,arguments);var t=Re(e);return t.setHours(0,0,0,0),t}var Hae=864e5;function Od(e,t){Pe(2,arguments);var n=Ar(e),r=Ar(t),i=n.getTime()-Yc(n),o=r.getTime()-Yc(r);return Math.round((i-o)/Hae)}var Wae=6e4;function r2(e,t){Pe(2,arguments);var n=et(t);return RE(e,n*Wae)}function NE(e,t){Pe(2,arguments);var n=et(t),r=n*7;return _l(e,r)}function qc(e,t){Pe(2,arguments);var n=et(t);return ro(e,n*12)}function _m(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_m=function(n){return typeof n}:_m=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},_m(e)}function rR(e){Pe(1,arguments);var t;if(e&&typeof e.forEach=="function")t=e;else if(_m(e)==="object"&&e!==null)t=Array.prototype.slice.call(e);else return new Date(NaN);var n;return t.forEach(function(r){var i=Re(r);(n===void 0||ni||isNaN(i.getDate()))&&(n=i)}),n||new Date(NaN)}function wm(e,t){Pe(2,arguments);var n=Re(e),r=Re(t),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}var LE=6e4,P_=36e5,Yae=1e3;function qae(e,t){Pe(2,arguments);var n=Ar(e),r=Ar(t);return n.getTime()===r.getTime()}function xm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?xm=function(n){return typeof n}:xm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},xm(e)}function DE(e){return Pe(1,arguments),e instanceof Date||xm(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function p8(e){if(Pe(1,arguments),!DE(e)&&typeof e!="number")return!1;var t=Re(e);return!isNaN(Number(t))}function Pd(e,t){Pe(2,arguments);var n=Re(e),r=Re(t),i=n.getFullYear()-r.getFullYear(),o=n.getMonth()-r.getMonth();return i*12+o}function i2(e){Pe(1,arguments);var t=Re(e),n=Math.floor(t.getMonth()/3)+1;return n}function yv(e,t){Pe(2,arguments);var n=Re(e),r=Re(t);return n.getFullYear()-r.getFullYear()}function oR(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 AE(e,t){Pe(2,arguments);var n=Re(e),r=Re(t),i=oR(n,r),o=Math.abs(Od(n,r));n.setDate(n.getDate()-i*o);var s=+(oR(n,r)===-i),a=i*(o-s);return a===0?0:a}function m8(e,t){return Pe(2,arguments),Re(e).getTime()-Re(t).getTime()}var sR={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},Gae="trunc";function IE(e){return e?sR[e]:sR[Gae]}function Zae(e,t,n){Pe(2,arguments);var r=m8(e,t)/P_;return IE(n==null?void 0:n.roundingMethod)(r)}function ll(e){Pe(1,arguments);var t=Re(e);return t.setHours(23,59,59,999),t}function Kae(e){Pe(1,arguments);var t=Re(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function Xae(e){Pe(1,arguments);var t=Re(e);return ll(t).getTime()===Kae(t).getTime()}function _v(e,t){Pe(2,arguments);var n=Re(e),r=Re(t),i=wm(n,r),o=Math.abs(Pd(n,r)),s;if(o<1)s=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-i*o);var a=wm(n,r)===-i;Xae(Re(e))&&o===1&&wm(e,r)===1&&(a=!1),s=i*(o-Number(a))}return s===0?0:s}function Qae(e,t,n){Pe(2,arguments);var r=m8(e,t)/1e3;return IE(n==null?void 0:n.roundingMethod)(r)}function Jae(e,t,n){Pe(2,arguments);var r=AE(e,t)/7;return IE(n==null?void 0:n.roundingMethod)(r)}function o2(e){Pe(1,arguments);var t=Re(e),n=t.getMonth(),r=n-n%3;return t.setMonth(r,1),t.setHours(0,0,0,0),t}function ele(e){Pe(1,arguments);var t=Re(e);return t.setDate(1),t.setHours(0,0,0,0),t}function tle(e){Pe(1,arguments);var t=Re(e),n=new Date(0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function nle(e,t){var n,r,i,o,s,a,l,c;Pe(1,arguments);var f=Yo(),h=et((n=(r=(i=(o=t==null?void 0:t.weekStartsOn)!==null&&o!==void 0?o:t==null||(s=t.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.weekStartsOn)!==null&&i!==void 0?i:f.weekStartsOn)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Re(e),m=p.getDay(),g=(m=i.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function sle(e){Pe(1,arguments);var t=v8(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var r=Gc(n);return r}var ale=6048e5;function y8(e){Pe(1,arguments);var t=Re(e),n=Gc(t).getTime()-sle(t).getTime();return Math.round(n/ale)+1}function cl(e,t){var n,r,i,o,s,a,l,c;Pe(1,arguments);var f=Yo(),h=et((n=(r=(i=(o=t==null?void 0:t.weekStartsOn)!==null&&o!==void 0?o:t==null||(s=t.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.weekStartsOn)!==null&&i!==void 0?i:f.weekStartsOn)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Re(e),m=p.getUTCDay(),g=(m=1&&m<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var g=new Date(0);g.setUTCFullYear(h+1,0,m),g.setUTCHours(0,0,0,0);var v=cl(g,t),w=new Date(0);w.setUTCFullYear(h,0,m),w.setUTCHours(0,0,0,0);var y=cl(w,t);return f.getTime()>=v.getTime()?h+1:f.getTime()>=y.getTime()?h:h-1}function lle(e,t){var n,r,i,o,s,a,l,c;Pe(1,arguments);var f=Yo(),h=et((n=(r=(i=(o=t==null?void 0:t.firstWeekContainsDate)!==null&&o!==void 0?o:t==null||(s=t.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.firstWeekContainsDate)!==null&&i!==void 0?i:f.firstWeekContainsDate)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&n!==void 0?n:1),p=FE(e,t),m=new Date(0);m.setUTCFullYear(p,0,h),m.setUTCHours(0,0,0,0);var g=cl(m,t);return g}var cle=6048e5;function _8(e,t){Pe(1,arguments);var n=Re(e),r=cl(n,t).getTime()-lle(n,t).getTime();return Math.round(r/cle)+1}function rt(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length0?r:1-r;return rt(n==="yy"?i%100:i,n.length)},M:function(t,n){var r=t.getUTCMonth();return n==="M"?String(r+1):rt(r+1,2)},d:function(t,n){return rt(t.getUTCDate(),n.length)},a:function(t,n){var r=t.getUTCHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h:function(t,n){return rt(t.getUTCHours()%12||12,n.length)},H:function(t,n){return rt(t.getUTCHours(),n.length)},m:function(t,n){return rt(t.getUTCMinutes(),n.length)},s:function(t,n){return rt(t.getUTCSeconds(),n.length)},S:function(t,n){var r=n.length,i=t.getUTCMilliseconds(),o=Math.floor(i*Math.pow(10,r-3));return rt(o,n.length)}};const Qo=ule;var jl={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},fle={G:function(t,n,r){var i=t.getUTCFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return r.era(i,{width:"abbreviated"});case"GGGGG":return r.era(i,{width:"narrow"});case"GGGG":default:return r.era(i,{width:"wide"})}},y:function(t,n,r){if(n==="yo"){var i=t.getUTCFullYear(),o=i>0?i:1-i;return r.ordinalNumber(o,{unit:"year"})}return Qo.y(t,n)},Y:function(t,n,r,i){var o=FE(t,i),s=o>0?o:1-o;if(n==="YY"){var a=s%100;return rt(a,2)}return n==="Yo"?r.ordinalNumber(s,{unit:"year"}):rt(s,n.length)},R:function(t,n){var r=v8(t);return rt(r,n.length)},u:function(t,n){var r=t.getUTCFullYear();return rt(r,n.length)},Q:function(t,n,r){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"Q":return String(i);case"QQ":return rt(i,2);case"Qo":return r.ordinalNumber(i,{unit:"quarter"});case"QQQ":return r.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,n,r){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"q":return String(i);case"qq":return rt(i,2);case"qo":return r.ordinalNumber(i,{unit:"quarter"});case"qqq":return r.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,n,r){var i=t.getUTCMonth();switch(n){case"M":case"MM":return Qo.M(t,n);case"Mo":return r.ordinalNumber(i+1,{unit:"month"});case"MMM":return r.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(i,{width:"wide",context:"formatting"})}},L:function(t,n,r){var i=t.getUTCMonth();switch(n){case"L":return String(i+1);case"LL":return rt(i+1,2);case"Lo":return r.ordinalNumber(i+1,{unit:"month"});case"LLL":return r.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(i,{width:"wide",context:"standalone"})}},w:function(t,n,r,i){var o=_8(t,i);return n==="wo"?r.ordinalNumber(o,{unit:"week"}):rt(o,n.length)},I:function(t,n,r){var i=y8(t);return n==="Io"?r.ordinalNumber(i,{unit:"week"}):rt(i,n.length)},d:function(t,n,r){return n==="do"?r.ordinalNumber(t.getUTCDate(),{unit:"date"}):Qo.d(t,n)},D:function(t,n,r){var i=ole(t);return n==="Do"?r.ordinalNumber(i,{unit:"dayOfYear"}):rt(i,n.length)},E:function(t,n,r){var i=t.getUTCDay();switch(n){case"E":case"EE":case"EEE":return r.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(i,{width:"short",context:"formatting"});case"EEEE":default:return r.day(i,{width:"wide",context:"formatting"})}},e:function(t,n,r,i){var o=t.getUTCDay(),s=(o-i.weekStartsOn+8)%7||7;switch(n){case"e":return String(s);case"ee":return rt(s,2);case"eo":return r.ordinalNumber(s,{unit:"day"});case"eee":return r.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(o,{width:"short",context:"formatting"});case"eeee":default:return r.day(o,{width:"wide",context:"formatting"})}},c:function(t,n,r,i){var o=t.getUTCDay(),s=(o-i.weekStartsOn+8)%7||7;switch(n){case"c":return String(s);case"cc":return rt(s,n.length);case"co":return r.ordinalNumber(s,{unit:"day"});case"ccc":return r.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(o,{width:"narrow",context:"standalone"});case"cccccc":return r.day(o,{width:"short",context:"standalone"});case"cccc":default:return r.day(o,{width:"wide",context:"standalone"})}},i:function(t,n,r){var i=t.getUTCDay(),o=i===0?7:i;switch(n){case"i":return String(o);case"ii":return rt(o,n.length);case"io":return r.ordinalNumber(o,{unit:"day"});case"iii":return r.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(i,{width:"short",context:"formatting"});case"iiii":default:return r.day(i,{width:"wide",context:"formatting"})}},a:function(t,n,r){var i=t.getUTCHours(),o=i/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,n,r){var i=t.getUTCHours(),o;switch(i===12?o=jl.noon:i===0?o=jl.midnight:o=i/12>=1?"pm":"am",n){case"b":case"bb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(t,n,r){var i=t.getUTCHours(),o;switch(i>=17?o=jl.evening:i>=12?o=jl.afternoon:i>=4?o=jl.morning:o=jl.night,n){case"B":case"BB":case"BBB":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(t,n,r){if(n==="ho"){var i=t.getUTCHours()%12;return i===0&&(i=12),r.ordinalNumber(i,{unit:"hour"})}return Qo.h(t,n)},H:function(t,n,r){return n==="Ho"?r.ordinalNumber(t.getUTCHours(),{unit:"hour"}):Qo.H(t,n)},K:function(t,n,r){var i=t.getUTCHours()%12;return n==="Ko"?r.ordinalNumber(i,{unit:"hour"}):rt(i,n.length)},k:function(t,n,r){var i=t.getUTCHours();return i===0&&(i=24),n==="ko"?r.ordinalNumber(i,{unit:"hour"}):rt(i,n.length)},m:function(t,n,r){return n==="mo"?r.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):Qo.m(t,n)},s:function(t,n,r){return n==="so"?r.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):Qo.s(t,n)},S:function(t,n){return Qo.S(t,n)},X:function(t,n,r,i){var o=i._originalDate||t,s=o.getTimezoneOffset();if(s===0)return"Z";switch(n){case"X":return lR(s);case"XXXX":case"XX":return Ma(s);case"XXXXX":case"XXX":default:return Ma(s,":")}},x:function(t,n,r,i){var o=i._originalDate||t,s=o.getTimezoneOffset();switch(n){case"x":return lR(s);case"xxxx":case"xx":return Ma(s);case"xxxxx":case"xxx":default:return Ma(s,":")}},O:function(t,n,r,i){var o=i._originalDate||t,s=o.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+aR(s,":");case"OOOO":default:return"GMT"+Ma(s,":")}},z:function(t,n,r,i){var o=i._originalDate||t,s=o.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+aR(s,":");case"zzzz":default:return"GMT"+Ma(s,":")}},t:function(t,n,r,i){var o=i._originalDate||t,s=Math.floor(o.getTime()/1e3);return rt(s,n.length)},T:function(t,n,r,i){var o=i._originalDate||t,s=o.getTime();return rt(s,n.length)}};function aR(e,t){var n=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),o=r%60;if(o===0)return n+String(i);var s=t||"";return n+String(i)+s+rt(o,2)}function lR(e,t){if(e%60===0){var n=e>0?"-":"+";return n+rt(Math.abs(e)/60,2)}return Ma(e,t)}function Ma(e,t){var n=t||"",r=e>0?"-":"+",i=Math.abs(e),o=rt(Math.floor(i/60),2),s=rt(i%60,2);return r+o+n+s}const dle=fle;var cR=function(t,n){switch(t){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},b8=function(t,n){switch(t){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},hle=function(t,n){var r=t.match(/(P+)(p+)?/)||[],i=r[1],o=r[2];if(!o)return cR(t,n);var s;switch(i){case"P":s=n.dateTime({width:"short"});break;case"PP":s=n.dateTime({width:"medium"});break;case"PPP":s=n.dateTime({width:"long"});break;case"PPPP":default:s=n.dateTime({width:"full"});break}return s.replace("{{date}}",cR(i,n)).replace("{{time}}",b8(o,n))},ple={p:b8,P:hle};const s2=ple;var mle=["D","DD"],gle=["YY","YYYY"];function w8(e){return mle.indexOf(e)!==-1}function x8(e){return gle.indexOf(e)!==-1}function bv(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 vle={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"}},yle=function(t,n,r){var i,o=vle[t];return typeof o=="string"?i=o:n===1?i=o.one:i=o.other.replace("{{count}}",n.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+i:i+" ago":i};const _le=yle;function Rb(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 ble={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},wle={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},xle={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Sle={date:Rb({formats:ble,defaultWidth:"full"}),time:Rb({formats:wle,defaultWidth:"full"}),dateTime:Rb({formats:xle,defaultWidth:"full"})};const Cle=Sle;var Ele={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Tle=function(t,n,r,i){return Ele[t]};const Ole=Tle;function Uu(e){return function(t,n){var r=n!=null&&n.context?String(n.context):"standalone",i;if(r==="formatting"&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):o;i=e.formattingValues[s]||e.formattingValues[o]}else{var a=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[l]||e.values[a]}var c=e.argumentCallback?e.argumentCallback(t):t;return i[c]}}var Ple={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},kle={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Mle={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"]},Rle={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"]},Nle={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"}},Lle={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"}},Dle=function(t,n){var r=Number(t),i=r%100;if(i>20||i<10)switch(i%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},Ale={ordinalNumber:Dle,era:Uu({values:Ple,defaultWidth:"wide"}),quarter:Uu({values:kle,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:Uu({values:Mle,defaultWidth:"wide"}),day:Uu({values:Rle,defaultWidth:"wide"}),dayPeriod:Uu({values:Nle,defaultWidth:"wide",formattingValues:Lle,defaultFormattingWidth:"wide"})};const Ile=Ale;function Vu(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;var s=o[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?$le(a,function(h){return h.test(s)}):Fle(a,function(h){return h.test(s)}),c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;var f=t.slice(s.length);return{value:c,rest:f}}}function Fle(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function $le(e,t){for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:{},r=t.match(e.matchPattern);if(!r)return null;var i=r[0],o=t.match(e.parsePattern);if(!o)return null;var s=e.valueCallback?e.valueCallback(o[0]):o[0];s=n.valueCallback?n.valueCallback(s):s;var a=t.slice(i.length);return{value:s,rest:a}}}var Ble=/^(\d+)(th|st|nd|rd)?/i,zle=/\d+/i,Ule={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},Vle={any:[/^b/i,/^(a|c)/i]},Hle={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Wle={any:[/1/i,/2/i,/3/i,/4/i]},Yle={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},qle={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]},Gle={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},Zle={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]},Kle={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},Xle={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}},Qle={ordinalNumber:jle({matchPattern:Ble,parsePattern:zle,valueCallback:function(t){return parseInt(t,10)}}),era:Vu({matchPatterns:Ule,defaultMatchWidth:"wide",parsePatterns:Vle,defaultParseWidth:"any"}),quarter:Vu({matchPatterns:Hle,defaultMatchWidth:"wide",parsePatterns:Wle,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Vu({matchPatterns:Yle,defaultMatchWidth:"wide",parsePatterns:qle,defaultParseWidth:"any"}),day:Vu({matchPatterns:Gle,defaultMatchWidth:"wide",parsePatterns:Zle,defaultParseWidth:"any"}),dayPeriod:Vu({matchPatterns:Kle,defaultMatchWidth:"any",parsePatterns:Xle,defaultParseWidth:"any"})};const Jle=Qle;var ece={code:"en-US",formatDistance:_le,formatLong:Cle,formatRelative:Ole,localize:Ile,match:Jle,options:{weekStartsOn:0,firstWeekContainsDate:1}};const $E=ece;var tce=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,nce=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,rce=/^'([^]*?)'?$/,ice=/''/g,oce=/[a-zA-Z]/;function _o(e,t,n){var r,i,o,s,a,l,c,f,h,p,m,g,v,w,y,b,x,T;Pe(2,arguments);var P=String(t),k=Yo(),N=(r=(i=n==null?void 0:n.locale)!==null&&i!==void 0?i:k.locale)!==null&&r!==void 0?r:$E,D=et((o=(s=(a=(l=n==null?void 0:n.firstWeekContainsDate)!==null&&l!==void 0?l:n==null||(c=n.locale)===null||c===void 0||(f=c.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&a!==void 0?a:k.firstWeekContainsDate)!==null&&s!==void 0?s:(h=k.locale)===null||h===void 0||(p=h.options)===null||p===void 0?void 0:p.firstWeekContainsDate)!==null&&o!==void 0?o:1);if(!(D>=1&&D<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var z=et((m=(g=(v=(w=n==null?void 0:n.weekStartsOn)!==null&&w!==void 0?w:n==null||(y=n.locale)===null||y===void 0||(b=y.options)===null||b===void 0?void 0:b.weekStartsOn)!==null&&v!==void 0?v:k.weekStartsOn)!==null&&g!==void 0?g:(x=k.locale)===null||x===void 0||(T=x.options)===null||T===void 0?void 0:T.weekStartsOn)!==null&&m!==void 0?m:0);if(!(z>=0&&z<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!N.localize)throw new RangeError("locale must contain localize property");if(!N.formatLong)throw new RangeError("locale must contain formatLong property");var A=Re(e);if(!p8(A))throw new RangeError("Invalid time value");var Y=Yc(A),q=g8(A,Y),ee={firstWeekContainsDate:D,weekStartsOn:z,locale:N,_originalDate:A},K=P.match(nce).map(function(te){var oe=te[0];if(oe==="p"||oe==="P"){var se=s2[oe];return se(te,N.formatLong)}return te}).join("").match(tce).map(function(te){if(te==="''")return"'";var oe=te[0];if(oe==="'")return sce(te);var se=dle[oe];if(se)return!(n!=null&&n.useAdditionalWeekYearTokens)&&x8(te)&&bv(te,t,String(e)),!(n!=null&&n.useAdditionalDayOfYearTokens)&&w8(te)&&bv(te,t,String(e)),se(q,te,N.localize,ee);if(oe.match(oce))throw new RangeError("Format string contains an unescaped latin alphabet character `"+oe+"`");return te}).join("");return K}function sce(e){var t=e.match(rce);return t?t[1].replace(ice,"'"):e}function jE(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 ace(e){return jE({},e)}var uR=1440,lce=2520,Nb=43200,cce=86400;function uce(e,t,n){var r,i;Pe(2,arguments);var o=Yo(),s=(r=(i=n==null?void 0:n.locale)!==null&&i!==void 0?i:o.locale)!==null&&r!==void 0?r:$E;if(!s.formatDistance)throw new RangeError("locale must contain formatDistance property");var a=wm(e,t);if(isNaN(a))throw new RangeError("Invalid time value");var l=jE(ace(n),{addSuffix:!!(n!=null&&n.addSuffix),comparison:a}),c,f;a>0?(c=Re(t),f=Re(e)):(c=Re(e),f=Re(t));var h=Qae(f,c),p=(Yc(f)-Yc(c))/1e3,m=Math.round((h-p)/60),g;if(m<2)return n!=null&&n.includeSeconds?h<5?s.formatDistance("lessThanXSeconds",5,l):h<10?s.formatDistance("lessThanXSeconds",10,l):h<20?s.formatDistance("lessThanXSeconds",20,l):h<40?s.formatDistance("halfAMinute",0,l):h<60?s.formatDistance("lessThanXMinutes",1,l):s.formatDistance("xMinutes",1,l):m===0?s.formatDistance("lessThanXMinutes",1,l):s.formatDistance("xMinutes",m,l);if(m<45)return s.formatDistance("xMinutes",m,l);if(m<90)return s.formatDistance("aboutXHours",1,l);if(mr.getTime()}function Kr(e,t){Pe(2,arguments);var n=Re(e),r=Re(t);return n.getTime()"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function xv(e){return xv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},xv(e)}function BE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Sv(e){return Sv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Sv(e)}function mR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Rce=function(e){Oce(n,e);var t=Pce(n);function n(){var r;Ece(this,n);for(var i=arguments.length,o=new Array(i),s=0;s0,r=n?t:1-t,i;if(r<=50)i=e||100;else{var o=r+50,s=Math.floor(o/100)*100,a=e>=o%100;i=e+s-(a?100:0)}return n?i:1-i}function k8(e){return e%400===0||e%4===0&&e%100!==0}function Em(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Em=function(n){return typeof n}:Em=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Em(e)}function Nce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gR(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 Ev(e){return Ev=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Ev(e)}function vR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var $ce=function(e){Dce(n,e);var t=Ace(n);function n(){var r;Nce(this,n);for(var i=arguments.length,o=new Array(i),s=0;s0}},{key:"set",value:function(i,o,s){var a=i.getUTCFullYear();if(s.isTwoDigitYear){var l=P8(s.year,a);return i.setUTCFullYear(l,0,1),i.setUTCHours(0,0,0,0),i}var c=!("era"in o)||o.era===1?s.year:1-s.year;return i.setUTCFullYear(c,0,1),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Tm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Tm=function(n){return typeof n}:Tm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Tm(e)}function jce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yR(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 Tv(e){return Tv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Tv(e)}function _R(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Wce=function(e){zce(n,e);var t=Uce(n);function n(){var r;jce(this,n);for(var i=arguments.length,o=new Array(i),s=0;s0}},{key:"set",value:function(i,o,s,a){var l=FE(i,a);if(s.isTwoDigitYear){var c=P8(s.year,l);return i.setUTCFullYear(c,0,a.firstWeekContainsDate),i.setUTCHours(0,0,0,0),cl(i,a)}var f=!("era"in o)||o.era===1?s.year:1-s.year;return i.setUTCFullYear(f,0,a.firstWeekContainsDate),i.setUTCHours(0,0,0,0),cl(i,a)}}]),n}(pt);function Om(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Om=function(n){return typeof n}:Om=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Om(e)}function Yce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ov(e){return Ov=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Ov(e)}function wR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Qce=function(e){Gce(n,e);var t=Zce(n);function n(){var r;Yce(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Pv(e){return Pv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Pv(e)}function SR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var oue=function(e){tue(n,e);var t=nue(n);function n(){var r;Jce(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function kv(e){return kv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},kv(e)}function ER(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var due=function(e){lue(n,e);var t=cue(n);function n(){var r;sue(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=4}},{key:"set",value:function(i,o,s){return i.setUTCMonth((s-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Mm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Mm=function(n){return typeof n}:Mm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Mm(e)}function hue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function TR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Mv(e){return Mv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Mv(e)}function OR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _ue=function(e){mue(n,e);var t=gue(n);function n(){var r;hue(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=4}},{key:"set",value:function(i,o,s){return i.setUTCMonth((s-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Rm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Rm=function(n){return typeof n}:Rm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Rm(e)}function bue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Rv(e){return Rv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Rv(e)}function kR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Tue=function(e){xue(n,e);var t=Sue(n);function n(){var r;bue(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=11}},{key:"set",value:function(i,o,s){return i.setUTCMonth(s,1),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Nm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Nm=function(n){return typeof n}:Nm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Nm(e)}function Oue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function MR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Nv(e){return Nv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Nv(e)}function RR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Lue=function(e){kue(n,e);var t=Mue(n);function n(){var r;Oue(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=11}},{key:"set",value:function(i,o,s){return i.setUTCMonth(s,1),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Due(e,t,n){Pe(2,arguments);var r=Re(e),i=et(t),o=_8(r,n)-i;return r.setUTCDate(r.getUTCDate()-o*7),r}function Lm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Lm=function(n){return typeof n}:Lm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Lm(e)}function Aue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function NR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Lv(e){return Lv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Lv(e)}function LR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var zue=function(e){Fue(n,e);var t=$ue(n);function n(){var r;Aue(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=53}},{key:"set",value:function(i,o,s,a){return cl(Due(i,s,a),a)}}]),n}(pt);function Uue(e,t){Pe(2,arguments);var n=Re(e),r=et(t),i=y8(n)-r;return n.setUTCDate(n.getUTCDate()-i*7),n}function Dm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Dm=function(n){return typeof n}:Dm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Dm(e)}function Vue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function DR(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 Dv(e){return Dv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Dv(e)}function AR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Zue=function(e){Wue(n,e);var t=Yue(n);function n(){var r;Vue(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=53}},{key:"set",value:function(i,o,s){return Gc(Uue(i,s))}}]),n}(pt);function Am(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Am=function(n){return typeof n}:Am=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Am(e)}function Kue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function IR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Av(e){return Av=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Av(e)}function Lb(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var nfe=[31,28,31,30,31,30,31,31,30,31,30,31],rfe=[31,29,31,30,31,30,31,31,30,31,30,31],ife=function(e){Que(n,e);var t=Jue(n);function n(){var r;Kue(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=rfe[l]:o>=1&&o<=nfe[l]}},{key:"set",value:function(i,o,s){return i.setUTCDate(s),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Fm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Fm=function(n){return typeof n}:Fm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Fm(e)}function ofe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function FR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Iv(e){return Iv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Iv(e)}function Db(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ffe=function(e){afe(n,e);var t=lfe(n);function n(){var r;ofe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=366:o>=1&&o<=365}},{key:"set",value:function(i,o,s){return i.setUTCMonth(0,s),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function VE(e,t,n){var r,i,o,s,a,l,c,f;Pe(2,arguments);var h=Yo(),p=et((r=(i=(o=(s=n==null?void 0:n.weekStartsOn)!==null&&s!==void 0?s:n==null||(a=n.locale)===null||a===void 0||(l=a.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&o!==void 0?o:h.weekStartsOn)!==null&&i!==void 0?i:(c=h.locale)===null||c===void 0||(f=c.options)===null||f===void 0?void 0:f.weekStartsOn)!==null&&r!==void 0?r:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=Re(e),g=et(t),v=m.getUTCDay(),w=g%7,y=(w+7)%7,b=(y"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Fv(e){return Fv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Fv(e)}function jR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var yfe=function(e){pfe(n,e);var t=mfe(n);function n(){var r;dfe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=6}},{key:"set",value:function(i,o,s,a){return i=VE(i,s,a),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Bm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Bm=function(n){return typeof n}:Bm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Bm(e)}function _fe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BR(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:function(n){return n.__proto__||Object.getPrototypeOf(n)},$v(e)}function zR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Efe=function(e){wfe(n,e);var t=xfe(n);function n(){var r;_fe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=6}},{key:"set",value:function(i,o,s,a){return i=VE(i,s,a),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function zm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?zm=function(n){return typeof n}:zm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},zm(e)}function Tfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function UR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function jv(e){return jv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},jv(e)}function VR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Nfe=function(e){Pfe(n,e);var t=kfe(n);function n(){var r;Tfe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=6}},{key:"set",value:function(i,o,s,a){return i=VE(i,s,a),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Lfe(e,t){Pe(2,arguments);var n=et(t);n%7===0&&(n=n-7);var r=1,i=Re(e),o=i.getUTCDay(),s=n%7,a=(s+7)%7,l=(a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Bv(e){return Bv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Bv(e)}function WR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Bfe=function(e){Ife(n,e);var t=Ffe(n);function n(){var r;Dfe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=7}},{key:"set",value:function(i,o,s){return i=Lfe(i,s),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Vm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Vm=function(n){return typeof n}:Vm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Vm(e)}function zfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function YR(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 zv(e){return zv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},zv(e)}function qR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var qfe=function(e){Vfe(n,e);var t=Hfe(n);function n(){var r;zfe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Uv(e){return Uv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Uv(e)}function ZR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ede=function(e){Kfe(n,e);var t=Xfe(n);function n(){var r;Gfe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Vv(e){return Vv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Vv(e)}function XR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ade=function(e){rde(n,e);var t=ide(n);function n(){var r;tde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Hv(e){return Hv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Hv(e)}function JR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pde=function(e){ude(n,e);var t=fde(n);function n(){var r;lde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=12}},{key:"set",value:function(i,o,s){var a=i.getUTCHours()>=12;return a&&s<12?i.setUTCHours(s+12,0,0,0):!a&&s===12?i.setUTCHours(0,0,0,0):i.setUTCHours(s,0,0,0),i}}]),n}(pt);function qm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?qm=function(n){return typeof n}:qm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},qm(e)}function mde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eN(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Wv(e){return Wv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Wv(e)}function tN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var wde=function(e){vde(n,e);var t=yde(n);function n(){var r;mde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=23}},{key:"set",value:function(i,o,s){return i.setUTCHours(s,0,0,0),i}}]),n}(pt);function Gm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Gm=function(n){return typeof n}:Gm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Gm(e)}function xde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nN(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Yv(e){return Yv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Yv(e)}function rN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Pde=function(e){Cde(n,e);var t=Ede(n);function n(){var r;xde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=11}},{key:"set",value:function(i,o,s){var a=i.getUTCHours()>=12;return a&&s<12?i.setUTCHours(s+12,0,0,0):i.setUTCHours(s,0,0,0),i}}]),n}(pt);function Zm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Zm=function(n){return typeof n}:Zm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Zm(e)}function kde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iN(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function qv(e){return qv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},qv(e)}function oN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ade=function(e){Rde(n,e);var t=Nde(n);function n(){var r;kde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=24}},{key:"set",value:function(i,o,s){var a=s<=24?s%24:s;return i.setUTCHours(a,0,0,0),i}}]),n}(pt);function Km(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Km=function(n){return typeof n}:Km=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Km(e)}function Ide(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sN(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:function(n){return n.__proto__||Object.getPrototypeOf(n)},Gv(e)}function aN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ude=function(e){$de(n,e);var t=jde(n);function n(){var r;Ide(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=59}},{key:"set",value:function(i,o,s){return i.setUTCMinutes(s,0,0),i}}]),n}(pt);function Xm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Xm=function(n){return typeof n}:Xm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Xm(e)}function Vde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lN(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 Zv(e){return Zv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Zv(e)}function cN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Zde=function(e){Wde(n,e);var t=Yde(n);function n(){var r;Vde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=59}},{key:"set",value:function(i,o,s){return i.setUTCSeconds(s,0),i}}]),n}(pt);function Qm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Qm=function(n){return typeof n}:Qm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Qm(e)}function Kde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uN(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Kv(e){return Kv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Kv(e)}function fN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var nhe=function(e){Qde(n,e);var t=Jde(n);function n(){var r;Kde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Xv(e){return Xv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Xv(e)}function hN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var che=function(e){ohe(n,e);var t=she(n);function n(){var r;rhe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Qv(e){return Qv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Qv(e)}function mN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ghe=function(e){dhe(n,e);var t=hhe(n);function n(){var r;uhe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Jv(e){return Jv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Jv(e)}function vN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var She=function(e){_he(n,e);var t=bhe(n);function n(){var r;vhe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ey(e){return ey=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},ey(e)}function _N(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Mhe=function(e){The(n,e);var t=Ohe(n);function n(){var r;Che(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||e[Symbol.iterator]==null){if(Array.isArray(e)||(n=Nhe(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,a;return{s:function(){n=e[Symbol.iterator]()},n:function(){var c=n.next();return o=c.done,c},e:function(c){s=!0,a=c},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}}}function Nhe(e,t){if(e){if(typeof e=="string")return wN(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 wN(e,t)}}function wN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=1&&A<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var Y=et((g=(v=(w=(y=r==null?void 0:r.weekStartsOn)!==null&&y!==void 0?y:r==null||(b=r.locale)===null||b===void 0||(x=b.options)===null||x===void 0?void 0:x.weekStartsOn)!==null&&w!==void 0?w:D.weekStartsOn)!==null&&v!==void 0?v:(T=D.locale)===null||T===void 0||(P=T.options)===null||P===void 0?void 0:P.weekStartsOn)!==null&&g!==void 0?g:0);if(!(Y>=0&&Y<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(N==="")return k===""?Re(n):new Date(NaN);var q={firstWeekContainsDate:A,weekStartsOn:Y,locale:z},ee=[new xce],K=N.match(Dhe).map(function(O){var R=O[0];if(R in s2){var F=s2[R];return F(O,z.formatLong)}return O}).join("").match(Lhe),te=[],oe=bN(K),se;try{var Z=function(){var R=se.value;!(r!=null&&r.useAdditionalWeekYearTokens)&&x8(R)&&bv(R,N,e),!(r!=null&&r.useAdditionalDayOfYearTokens)&&w8(R)&&bv(R,N,e);var F=R[0],Q=Rhe[F];if(Q){var X=Q.incompatibleTokens;if(Array.isArray(X)){var le=te.find(function(De){return X.includes(De.token)||De.token===F});if(le)throw new RangeError("The format string mustn't contain `".concat(le.fullToken,"` and `").concat(R,"` at the same time"))}else if(Q.incompatibleTokens==="*"&&te.length>0)throw new RangeError("The format string mustn't contain `".concat(R,"` and any other token at the same time"));te.push({token:F,fullToken:R});var ve=Q.run(k,R,z.match,q);if(!ve)return{v:new Date(NaN)};ee.push(ve.setter),k=ve.rest}else{if(F.match($he))throw new RangeError("Format string contains an unescaped latin alphabet character `"+F+"`");if(R==="''"?R="'":F==="'"&&(R=jhe(R)),k.indexOf(R)===0)k=k.slice(R.length);else return{v:new Date(NaN)}}};for(oe.s();!(se=oe.n()).done;){var $=Z();if(rg($)==="object")return $.v}}catch(O){oe.e(O)}finally{oe.f()}if(k.length>0&&Fhe.test(k))return new Date(NaN);var I=ee.map(function(O){return O.priority}).sort(function(O,R){return R-O}).filter(function(O,R,F){return F.indexOf(O)===R}).map(function(O){return ee.filter(function(R){return R.priority===O}).sort(function(R,F){return F.subPriority-R.subPriority})}).map(function(O){return O[0]}),B=Re(n);if(isNaN(B.getTime()))return new Date(NaN);var re=g8(B,Yc(B)),W={},G=bN(I),ne;try{for(G.s();!(ne=G.n()).done;){var ae=ne.value;if(!ae.validate(re,q))return new Date(NaN);var me=ae.set(re,W,q);Array.isArray(me)?(re=me[0],jE(W,me[1])):re=me}}catch(O){G.e(O)}finally{G.f()}return re}function jhe(e){return e.match(Ahe)[1].replace(Ihe,"'")}function Bhe(e,t){Pe(2,arguments);var n=Re(e),r=Re(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function zhe(e,t){Pe(2,arguments);var n=o2(e),r=o2(t);return n.getTime()===r.getTime()}function Uhe(e,t){Pe(2,arguments);var n=Re(e),r=Re(t);return n.getFullYear()===r.getFullYear()}function Zc(e,t){Pe(2,arguments);var n=Re(e).getTime(),r=Re(t.start).getTime(),i=Re(t.end).getTime();if(!(r<=i))throw new RangeError("Invalid interval");return n>=r&&n<=i}function HE(e,t){Pe(2,arguments);var n=et(t);return _l(e,-n)}function Fo(e,t){var n;Pe(1,arguments);var r=et((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=Yhe(e),o;if(i.date){var s=qhe(i.date,r);o=Ghe(s.restDateString,s.year)}if(!o||isNaN(o.getTime()))return new Date(NaN);var a=o.getTime(),l=0,c;if(i.time&&(l=Zhe(i.time),isNaN(l)))return new Date(NaN);if(i.timezone){if(c=Khe(i.timezone),isNaN(c))return new Date(NaN)}else{var f=new Date(a+l),h=new Date(0);return h.setFullYear(f.getUTCFullYear(),f.getUTCMonth(),f.getUTCDate()),h.setHours(f.getUTCHours(),f.getUTCMinutes(),f.getUTCSeconds(),f.getUTCMilliseconds()),h}return new Date(a+l+c)}var Rp={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Vhe=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Hhe=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Whe=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Yhe(e){var t={},n=e.split(Rp.dateTimeDelimiter),r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],Rp.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Rp.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){var i=Rp.timezone.exec(r);i?(t.time=r.replace(i[1],""),t.timezone=i[1]):t.time=r}return t}function qhe(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 Ghe(e,t){if(t===null)return new Date(NaN);var n=e.match(Vhe);if(!n)return new Date(NaN);var r=!!n[4],i=Hu(n[1]),o=Hu(n[2])-1,s=Hu(n[3]),a=Hu(n[4]),l=Hu(n[5])-1;if(r)return tpe(t,a,l)?Xhe(t,a,l):new Date(NaN);var c=new Date(0);return!Jhe(t,o,s)||!epe(t,i)?new Date(NaN):(c.setUTCFullYear(t,o,Math.max(i,s)),c)}function Hu(e){return e?parseInt(e):1}function Zhe(e){var t=e.match(Hhe);if(!t)return NaN;var n=Ib(t[1]),r=Ib(t[2]),i=Ib(t[3]);return npe(n,r,i)?n*P_+r*LE+i*1e3:NaN}function Ib(e){return e&&parseFloat(e.replace(",","."))||0}function Khe(e){if(e==="Z")return 0;var t=e.match(Whe);if(!t)return 0;var n=t[1]==="+"?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return rpe(r,i)?n*(r*P_+i*LE):NaN}function Xhe(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 Qhe=[31,null,31,30,31,30,31,31,30,31,30,31];function M8(e){return e%400===0||e%4===0&&e%100!==0}function Jhe(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(Qhe[t]||(M8(e)?29:28))}function epe(e,t){return t>=1&&t<=(M8(e)?366:365)}function tpe(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function npe(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function rpe(e,t){return t>=0&&t<=59}function qi(e,t){Pe(2,arguments);var n=Re(e),r=et(t),i=n.getFullYear(),o=n.getDate(),s=new Date(0);s.setFullYear(i,r,15),s.setHours(0,0,0,0);var a=hce(s);return n.setMonth(r,Math.min(o,a)),n}function Rf(e,t){Pe(2,arguments);var n=Re(e),r=et(t);return n.setHours(r),n}function Nf(e,t){Pe(2,arguments);var n=Re(e),r=et(t);return n.setMinutes(r),n}function rf(e,t){Pe(2,arguments);var n=Re(e),r=et(t),i=Math.floor(n.getMonth()/3)+1,o=r-i;return qi(n,n.getMonth()+o*3)}function ipe(e,t){Pe(2,arguments);var n=Re(e),r=et(t);return n.setSeconds(r),n}function ty(e,t){Pe(2,arguments);var n=Re(e),r=et(t);return isNaN(n.getTime())?new Date(NaN):(n.setFullYear(r),n)}function kd(e,t){Pe(2,arguments);var n=et(t);return ro(e,-n)}function ope(e,t){Pe(2,arguments);var n=et(t);return NE(e,-n)}function Md(e,t){Pe(2,arguments);var n=et(t);return qc(e,-n)}const Lf="yyyy-MM-dd",WE="yyyy-MM-dd HH:mm",Ys=()=>new Date,YE=e=>typeof e!="string",R8=(e,t)=>!e||!YE(e)?e:t?_o(e,t):fce(e),N8=(e=Lf)=>t=>R8(t,e),qs=e=>R8(e,void 0),Np=N8(),ny=N8(WE),wi=e=>YE(e)?e:Fo(e),xN=e=>e?wi(e):null,ah=(e,t,n)=>{try{return Zc(wi(e),{start:wi(t??e),end:wi(n??e)})}catch{return!1}},ba=(e,t)=>S8(e,t)||Kr(e,t),lh="all",L8={today:"Today",yesterday:"Yesterday",last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",last180Days:"Last 180 days",last365Days:"Last 365 days",[lh]:void 0},D8=Object.keys(L8),A8=e=>e===void 0||Cr(II(Boolean,e)),ry=e=>typeof e=="string"&&D8.includes(e),spe=D8.filter(e=>e!==lh),I8=(e,t)=>({startDate:xN(e),endDate:xN(t)}),ape=e=>{if(!(!e||A8(e)))return e.startDate&&!e.endDate?`Since ${Np(e.startDate)}`:!e.startDate&&e.endDate?`Until ${Np(e.endDate)}`:`${Np(e.startDate)} - ${Np(e.endDate)}`},qE=e=>{if(!(!e||e===lh))return ry(e)?L8[e]:ape(e)},Gr=e=>Ar(HE(Ys(),e)),Bl=e=>({startDate:e,endDate:ll(Ys())}),F8=fC([[_a("today"),()=>Bl(Ar(Ys()))],[_a("yesterday"),()=>({startDate:Gr(1),endDate:ll(HE(Ys(),1))})],[_a("last7Days"),()=>Bl(Gr(7))],[_a("last30Days"),()=>Bl(Gr(30))],[_a("last90Days"),()=>Bl(Gr(90))],[_a("last180Days"),()=>Bl(Gr(180))],[_a("last365Days"),()=>Bl(Gr(365))],[TI,()=>({})]]),lpe=e=>{const t=wi(e);return fC([[()=>ba(Ar(Ys()),t),()=>"today"],[()=>ba(Gr(1),t),()=>"yesterday"],[()=>ba(Gr(7),t),()=>"last7Days"],[()=>ba(Gr(30),t),()=>"last30Days"],[()=>ba(Gr(90),t),()=>"last90Days"],[()=>ba(Gr(180),t),()=>"last180Days"],[()=>ba(Gr(365),t),()=>"last365Days"],[TI,()=>lh]])()},cpe=e=>ry(e)?F8(e):e,ch=_n("shlink/visitCreation/createNewVisits",e=>({payload:{createdVisits:e}})),SN=5e3,CN=4,EN=2,upe=({currentPage:e,pagesCount:t})=>e>=t,fpe=(e,t)=>t*100/e,uh=({typePrefix:e,createLoaders:t,getExtraFulfilledPayload:n,shouldCancel:r})=>{const i=_n(`${e}/progressChanged`),o=_n(`${e}/large`),s=_n(`${e}/fallbackToInterval`),a=ir(e,async(l,{getState:c,dispatch:f})=>{var b;const[h,p]=t(l,c),m=async x=>Promise.all(x.map(async T=>h(T,SN).then(St("data")))).then(dZ),g=async(x,T=0)=>{if(r(c))return[];const P=await m(x[T]);return f(i(fpe(x.length,T+EN))),T{const{pagination:T,data:P}=await h(x,SN);if(!T||upe(T))return P;const k=dC(EN,T.pagesCount+1),N=dd(CN,k);return T.pagesCount-1>CN&&f(o()),P.concat(await g(N))},[w,y]=await Promise.all([v(),p((b=l.query)==null?void 0:b.excludeBots)]);return!w.length&&y&&f(s(lpe(y.date))),{...n(l),visits:w}});return Object.assign(a,{progressChanged:i,large:o,fallbackToInterval:s})},fh=(e,t)=>async n=>e?t({page:1,itemsPerPage:1,excludeBots:n}).then(({data:r})=>r[0]):Promise.resolve(void 0),dh=({name:e,asyncThunkCreator:t,initialState:n,filterCreatedVisits:r})=>{const{pending:i,rejected:o,fulfilled:s,large:a,progressChanged:l,fallbackToInterval:c}=t,{reducer:f,actions:h}=Yn({name:e,initialState:n,reducers:{cancelGetVisits:m=>({...m,cancelLoad:!0})},extraReducers:m=>{m.addCase(i,()=>({...n,loading:!0})),m.addCase(o,(g,{error:v})=>({...n,error:!0,errorData:io(v)})),m.addCase(s,(g,{payload:v})=>({...g,...v,loading:!1,loadingLarge:!1,error:!1})),m.addCase(a,g=>({...g,loadingLarge:!0})),m.addCase(l,(g,{payload:v})=>({...g,progress:v})),m.addCase(c,(g,{payload:v})=>({...g,fallbackInterval:v})),m.addCase(ch,(g,{payload:v})=>{const{visits:w}=g,y=r(g,v.createdVisits).map(({visit:b})=>b);return y.length?{...g,visits:[...y,...w]}:g})}}),{cancelGetVisits:p}=h;return{reducer:f,cancelGetVisits:p}},$8="shlink/domainVisits",j8="DEFAULT",dpe={visits:[],domain:"",loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},hpe=e=>uh({typePrefix:`${$8}/getDomainVisits`,createLoaders:({domain:t,query:n={},doIntervalFallback:r=!1},i)=>{const{getDomainVisits:o}=e(i),s=async(l,c)=>o(t,{...n,page:l,itemsPerPage:c}),a=fh(r,async l=>o(t,l));return[s,a]},getExtraFulfilledPayload:({domain:t,query:n={}})=>({domain:t,query:n}),shouldCancel:t=>t().domainVisits.cancelLoad}),ppe=e=>dh({name:$8,initialState:dpe,asyncThunkCreator:e,filterCreatedVisits:({domain:t,query:n={}},r)=>{const{startDate:i,endDate:o}=n;return r.filter(({shortUrl:s,visit:a})=>s&&Aae(s,t)&&ah(a.date,i,o))}}),cu=({children:e,label:t,className:n="",labelClassName:r="",noMargin:i=!1,id:o})=>U("div",{className:`${n} ${i?"":"mb-3"}`,children:[C("label",{className:`form-label ${r}`,htmlFor:o,children:t}),e]}),ig=({children:e,value:t,onChange:n,type:r,required:i,placeholder:o,className:s,labelClassName:a})=>{const l=E_();return C(cu,{label:U(We,{children:[e,":"]}),className:s??"",labelClassName:a,id:l,children:C("input",{id:l,className:"form-control",type:r??"text",value:t,required:i??!0,placeholder:o,onChange:c=>n(c.target.value)})})},og=({className:e="",placement:t,children:n})=>{const r=yl();return U(We,{children:[C("span",{className:e,ref:r,children:C(Fe,{icon:CC})}),C(Or,{target:r,placement:t,children:n})]})},Fb=({isLast:e,...t})=>C(ig,{...t,required:!1,type:"url",placeholder:"No redirect",className:e?"mb-0":""}),mpe=({isOpen:e,toggle:t,domain:n,editDomainRedirects:r})=>{var h,p,m;const[i,o]=H.useState(((h=n.redirects)==null?void 0:h.baseUrlRedirect)??""),[s,a]=H.useState(((p=n.redirects)==null?void 0:p.regular404Redirect)??""),[l,c]=H.useState(((m=n.redirects)==null?void 0:m.invalidShortUrlRedirect)??""),f=oh(async()=>r({domain:n.domain,redirects:{baseUrlRedirect:Pb(i),regular404Redirect:Pb(s),invalidShortUrlRedirect:Pb(l)}}).then(t));return C(Wo,{isOpen:e,toggle:t,centered:!0,children:U("form",{name:"domainRedirectsModal",onSubmit:f,children:[U(oo,{toggle:t,children:["Edit redirects for ",C("b",{children:n.domain})]}),U(Ri,{children:[U(Fb,{value:i,onChange:o,children:[U(og,{className:"me-2",placement:"bottom",children:["Visitors accessing the base url, as in ",U("b",{children:["https://",n.domain,"/"]}),", will be redirected to this URL."]}),"Base URL"]}),U(Fb,{value:s,onChange:a,children:[U(og,{className:"me-2",placement:"bottom",children:["Visitors accessing a url not matching a short URL pattern, as in ",U("b",{children:["https://",n.domain,"/???/[...]"]}),", will be redirected to this URL."]}),"Regular 404"]}),U(Fb,{value:l,isLast:!0,onChange:c,children:[C(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"]})]}),U(ra,{children:[C(ht,{color:"link",type:"button",onClick:t,children:"Cancel"}),C(ht,{color:"primary",children:"Save"})]})]})})},gpe=({domain:e,editDomainRedirects:t,selectedServer:n})=>{const[r,i]=$t(),[o,s]=$t(),{isDefault:a}=e,l=!a||Mi("defaultDomainRedirectsEdition",n),c=Mi("domainVisits",n),f=Vd(n);return U(O_,{isOpen:r,toggle:i,children:[c&&U(Ve,{tag:At,to:`/server/${f}/domain/${e.domain}${e.isDefault?`_${j8}`:""}/visits`,children:[C(Fe,{icon:SC,fixedWidth:!0})," Visit stats"]}),U(Ve,{disabled:!l,onClick:l?s:void 0,children:[C(Fe,{fixedWidth:!0,icon:xC})," Edit redirects"]}),C(mpe,{domain:e,isOpen:o,toggle:s,editDomainRedirects:t})]})},vpe=({status:e,matchMedia:t=window.matchMedia})=>{const n=yl(),r=()=>t("(max-width: 991px)").matches,[i,o]=H.useState(r());return H.useEffect(()=>{const s=()=>o(r());return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]),e==="validating"?C(Fe,{fixedWidth:!0,icon:s6,spin:!0}):U(We,{children:[C("span",{ref:n,children:e==="valid"?C(Fe,{fixedWidth:!0,icon:pd,className:"text-muted"}):C(Fe,{fixedWidth:!0,icon:Tw,className:"text-danger"})}),C(Or,{target:n,placement:i?"top-start":"left",autohide:e==="valid",children:e==="valid"?"Congratulations! This domain is properly configured.":U("span",{children:["Oops! There is some missing configuration, and short URLs shared with this domain will not work.",C("br",{}),"Check the ",C(Ei,{href:"https://slnk.to/multi-domain-docs",children:"documentation"})," in order to find out what is missing."]})})]})},$b=({fallback:e})=>U("span",{className:"text-muted",children:[!e&&C("small",{children:"No redirect"}),e&&U(We,{children:[e," ",C("small",{children:"(as fallback)"})]})]}),ype=()=>U(We,{children:[C(Fe,{fixedWidth:!0,icon:sQ,className:"text-primary",id:"defaultDomainIcon"}),C(Or,{target:"defaultDomainIcon",placement:"right",children:"Default domain"})]}),_pe=({domain:e,editDomainRedirects:t,checkDomainHealth:n,defaultRedirects:r,selectedServer:i})=>{const{domain:o,isDefault:s,redirects:a,status:l}=e;return H.useEffect(()=>{n(e.domain)},[]),U("tr",{className:"responsive-table__row",children:[C("td",{className:"responsive-table__cell","data-th":"Is default domain",children:s&&C(ype,{})}),C("th",{className:"responsive-table__cell","data-th":"Domain",children:o}),C("td",{className:"responsive-table__cell","data-th":"Base path redirect",children:(a==null?void 0:a.baseUrlRedirect)??C($b,{fallback:r==null?void 0:r.baseUrlRedirect})}),C("td",{className:"responsive-table__cell","data-th":"Regular 404 redirect",children:(a==null?void 0:a.regular404Redirect)??C($b,{fallback:r==null?void 0:r.regular404Redirect})}),C("td",{className:"responsive-table__cell","data-th":"Invalid short URL redirect",children:(a==null?void 0:a.invalidShortUrlRedirect)??C($b,{fallback:r==null?void 0:r.invalidShortUrlRedirect})}),C("td",{className:"responsive-table__cell text-lg-center","data-th":"Status",children:C(vpe,{status:l})}),C("td",{className:"responsive-table__cell text-end",children:C(gpe,{domain:e,editDomainRedirects:t,selectedServer:i})})]})},TN=["","Domain","Base path redirect","Regular 404 redirect","Invalid short URL redirect","",""],bpe=({listDomains:e,domainsList:t,filterDomains:n,editDomainRedirects:r,checkDomainHealth:i,selectedServer:o})=>{var m;const{filteredDomains:s,defaultRedirects:a,loading:l,error:c,errorData:f}=t,h=a??((m=s.find(({isDefault:g})=>g))==null?void 0:m.redirects);return H.useEffect(()=>{e()},[]),l?C(To,{loading:!0}):U(We,{children:[C(sh,{className:"mb-3",onChange:n}),(()=>c?C(Dr,{type:"error",children:C(Io,{errorData:f,fallbackMessage:"Error loading domains :("})}):C(fn,{children:U("table",{className:"table table-hover responsive-table mb-0",children:[C("thead",{className:"responsive-table__header",children:C("tr",{children:TN.map((g,v)=>C("th",{children:g},v))})}),U("tbody",{children:[s.length<1&&C("tr",{children:C("td",{colSpan:TN.length,className:"text-center",children:"No results found"})}),s.map(g=>C(_pe,{domain:g,editDomainRedirects:r,checkDomainHealth:i,defaultRedirects:h,selectedServer:o},g.domain))]})]})}))()]})},wpe="shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS",xpe=e=>ir(wpe,async({domain:t,redirects:n},{getState:r})=>{const{editDomainRedirects:i}=e(r),o=await i({domain:t,...n});return{domain:t,redirects:o}}),Spe=(e,t)=>{const[n,r]=e.split("://"),[,...i]=r.split("/"),o=i.length?`/${i.join("/")}`:"";return`${n}://${t}${o}`},Lp="shlink/domainsList",Dp={domains:[],filteredDomains:[],loading:!1,error:!1},ON=({domain:e,redirects:t})=>n=>n.domain!==e?n:{...n,redirects:t},PN=(e,t)=>n=>n.domain!==e?n:{...n,status:t},Cpe=(e,t)=>{const n=ir(`${Lp}/listDomains`,async(s,{getState:a})=>{const{listDomains:l}=e(a),{data:c,defaultRedirects:f}=await l();return{domains:c.map(h=>({...h,status:"validating"})),defaultRedirects:f}}),r=ir(`${Lp}/checkDomainHealth`,async(s,{getState:a})=>{const{selectedServer:l}=a();if(!oC(l))return{domain:s,status:"invalid"};try{const{url:c,...f}=l,{health:h}=e({...f,url:Spe(c,s)}),{status:p}=await h();return{domain:s,status:p==="pass"?"valid":"invalid"}}catch{return{domain:s,status:"invalid"}}}),i=_n(`${Lp}/filterDomains`),{reducer:o}=Yn({name:Lp,initialState:Dp,reducers:{},extraReducers:s=>{s.addCase(n.pending,()=>({...Dp,loading:!0})),s.addCase(n.rejected,(a,{error:l})=>({...Dp,error:!0,errorData:io(l)})),s.addCase(n.fulfilled,(a,{payload:l})=>({...Dp,...l,filteredDomains:l.domains})),s.addCase(r.fulfilled,({domains:a,filteredDomains:l,...c},{payload:f})=>({...c,domains:a.map(PN(f.domain,f.status)),filteredDomains:l.map(PN(f.domain,f.status))})),s.addCase(i,(a,{payload:l})=>({...a,filteredDomains:a.domains.filter(({domain:c})=>c.toLowerCase().match(l.toLowerCase()))})),s.addCase(t.fulfilled,(a,{payload:l})=>({...a,domains:a.domains.map(ON(l)),filteredDomains:a.filteredDomains.map(ON(l))}))}});return{reducer:o,listDomains:n,checkDomainHealth:r,filterDomains:i}},Epe=(e,t)=>{e.serviceFactory("DomainSelector",()=>Lae),e.decorator("DomainSelector",t(["domainsList"],["listDomains"])),e.serviceFactory("ManageDomains",()=>bpe),e.decorator("ManageDomains",t(["domainsList","selectedServer"],["listDomains","filterDomains","editDomainRedirects","checkDomainHealth"])),e.serviceFactory("domainsListReducerCreator",Cpe,"buildShlinkApiClient","editDomainRedirects"),e.serviceFactory("domainsListReducer",ic("reducer"),"domainsListReducerCreator"),e.serviceFactory("listDomains",ic("listDomains"),"domainsListReducerCreator"),e.serviceFactory("filterDomains",ic("filterDomains"),"domainsListReducerCreator"),e.serviceFactory("editDomainRedirects",xpe,"buildShlinkApiClient"),e.serviceFactory("checkDomainHealth",ic("checkDomainHealth"),"domainsListReducerCreator")},kN="shlink/mercure",Tpe={loading:!0,error:!1},Ope=e=>{const t=ir(`${kN}/loadMercureInfo`,(r,{getState:i})=>{const{settings:o}=i();if(!o.realTimeUpdates.enabled)throw new Error("Real time updates not enabled");return e(i).mercureInfo()}),{reducer:n}=Yn({name:kN,initialState:Tpe,reducers:{},extraReducers:r=>{r.addCase(t.pending,i=>({...i,loading:!0,error:!1})),r.addCase(t.rejected,i=>({...i,loading:!1,error:!0})),r.addCase(t.fulfilled,(i,{payload:o})=>({...o,loading:!1,error:!1}))}});return{loadMercureInfo:t,reducer:n}},Ppe=e=>{e.serviceFactory("mercureInfoReducerCreator",Ope,"buildShlinkApiClient"),e.serviceFactory("mercureInfoReducer",ic("reducer"),"mercureInfoReducerCreator"),e.serviceFactory("loadMercureInfo",ic("loadMercureInfo"),"mercureInfoReducerCreator")},B8=({isOpen:e,duplicatedServers:t,onDiscard:n,onSave:r})=>{const i=t.length>1;return U(Wo,{centered:!0,isOpen:e,children:[U(oo,{children:["Duplicated server",i&&"s"]}),U(Ri,{children:[C("p",{children:i?"The next servers already exist:":"There is already a server with:"}),C("ul",{children:t.map(({url:o,apiKey:s},a)=>i?U("li",{children:[C("b",{children:o})," - ",C("b",{children:s})]},a):U(H.Fragment,{children:[U("li",{children:["URL: ",C("b",{children:o})]}),U("li",{children:["API key: ",C("b",{children:s})]})]},a))}),U("span",{children:[i?"Do you want to ignore duplicated servers":"Do you want to save this server anyway","?"]})]}),U(ra,{children:[C(ht,{color:"link",onClick:n,children:i?"Ignore duplicated":"Discard"}),C(ht,{color:"primary",onClick:r,children:"Save anyway"})]})]})},z8=({onSubmit:e,initialValues:t,children:n,title:r})=>{const[i,o]=H.useState(""),[s,a]=H.useState(""),[l,c]=H.useState(""),f=oh(()=>e({name:i,url:s,apiKey:l}));return H.useEffect(()=>{t&&o(t.name),t&&a(t.url),t&&c(t.apiKey)},[t]),U("form",{className:"server-form",name:"serverForm",onSubmit:f,children:[U(fn,{className:"mb-3",title:r,children:[C(ig,{value:i,onChange:o,children:"Name"}),C(ig,{type:"url",value:s,onChange:a,children:"URL"}),C(ig,{value:l,onChange:c,children:"API key"})]}),C("div",{className:"text-end",children:n})]})},MN=4e3,RN=({type:e})=>C("div",{className:"mt-3",children:U(Dr,{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."]})}),kpe=(e,t)=>({servers:n,createServers:r})=>{const i=Bo(),o=ia(),s=!!Object.keys(n).length,[a,l]=t(!1,MN),[c,f]=t(!1,MN),[h,p]=$t(),[m,g]=H.useState(),v=()=>{if(!m)return;const w=gE();r([{...m,id:w}]),i(`/server/${w}`)};return H.useEffect(()=>{Object.values(n).some(({url:y,apiKey:b})=>(m==null?void 0:m.url)===y&&(m==null?void 0:m.apiKey)===b)?p():v()},[m]),U(lu,{children:[U(z8,{title:C("h5",{className:"mb-0",children:"Add new server"}),onSubmit:g,children:[!s&&C(e,{tooltipPlacement:"top",onImport:l,onImportError:f}),s&&C(ht,{outline:!0,onClick:o,children:"Cancel"}),C(ht,{outline:!0,color:"primary",className:"ms-2",children:"Create server"})]}),a&&C(RN,{type:"success"}),c&&C(RN,{type:"error"}),C(B8,{isOpen:h,duplicatedServers:m?[m]:[],onDiscard:o,onSave:v})]})},Mpe=e=>({server:t,className:n,children:r,textClassName:i})=>{const[o,,s,a]=$t();return U(We,{children:[U("span",{className:n,onClick:s,children:[!r&&C(Fe,{fixedWidth:!0,icon:wC}),C("span",{className:i,children:r??"Remove this server"})]}),C(e,{server:t,isOpen:o,toggle:a})]})},Rpe=({server:e,toggle:t,isOpen:n,deleteServer:r,redirectHome:i=!0})=>{const o=Bo(),s=H.useRef(!1),a=()=>{s.current=!0,t()};return U(Wo,{isOpen:n,toggle:t,centered:!0,onClosed:()=>{s.current&&(r(e),i&&o("/"))},children:[C(oo,{toggle:t,className:"text-danger",children:"Remove server"}),U(Ri,{children:[U("p",{children:["Are you sure you want to remove ",C("b",{children:e?e.name:""}),"?"]}),C("p",{children:C("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."})})]}),U(ra,{children:[C(ht,{color:"link",onClick:t,children:"Cancel"}),C(ht,{color:"danger",onClick:a,children:"Delete"})]})]})},Npe=e=>r8(({editServer:t,selectedServer:n,selectServer:r})=>{const i=ia(),{reconnect:o}=Ioe();if(!Rs(n))return null;const s=a=>{t(n.id,a),o==="true"&&r(n.id),i()};return C(lu,{children:U(z8,{title:U("h5",{className:"mb-0",children:['Edit "',n.name,'"']}),initialValues:n,onSubmit:s,children:[C(ht,{outline:!0,className:"me-2",onClick:i,children:"Cancel"}),C(ht,{outline:!0,color:"primary",children:"Save"})]})})},e);const NN=e=>({url:t,apiKey:n})=>e.some(r=>r.url===t&&r.apiKey===n),Lpe=({importServersFromFile:e})=>({createServers:t,servers:n,children:r,onImport:i=()=>{},onImportError:o=()=>{},tooltipPlacement:s="bottom",className:a=""})=>{const l=yl(),[c,f]=H.useState(),[h,p]=H.useState([]),[m,,g,v]=$t(),w=Eo(t,i),y=Eo(()=>w(c??[]),v),b=Eo(()=>w((c??[]).filter(T=>!NN(h)(T))),v),x=async({target:T})=>{var P;return e((P=T.files)==null?void 0:P[0]).then(f).then(()=>{T.value=null}).catch(o)};return H.useEffect(()=>{if(!c)return;const T=Object.values(n),P=c.filter(NN(T)),k=!!P.length;k?p(P):w(c),k&&g()},[c]),U(We,{children:[U(ht,{outline:!0,id:"importBtn",className:a,onClick:()=>{var T;return(T=l.current)==null?void 0:T.click()},children:[C(Fe,{icon:dQ,fixedWidth:!0})," ",r??"Import from file"]}),U(Or,{placement:s,target:"importBtn",children:["You can create servers by importing a CSV file with columns ",C("b",{children:"name"}),", ",C("b",{children:"apiKey"})," and ",C("b",{children:"url"}),"."]}),C("input",{type:"file",accept:"text/csv",className:"import-servers-btn__csv-select",ref:l,onChange:x}),C(B8,{isOpen:m,duplicatedServers:h,onDiscard:b,onSave:y})]})};const Dpe=e=>({servers:t,selectedServer:n})=>C(lu,{children:U("div",{className:"server-error__container flex-column",children:[U(To,{className:"w-100 mb-3 mb-md-5",type:"error",fullWidth:!0,children:[!Rs(n)&&"Could not find this Shlink server.",Rs(n)&&U(We,{children:[C("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."]})]}),U(t8,{servers:Object.values(t),children:["These are the Shlink servers currently configured. Choose one of them or ",C(At,{to:"/server/create",children:"add a new one"}),"."]}),Rs(n)&&C("div",{className:"container mt-3 mt-md-5",children:U("h5",{children:["Alternatively, if you think you may have miss-configured this server, you can ",C(e,{server:n,className:"server-error__delete-btn",children:"remove it"})," or ",C(At,{to:`/server/${n.id}/edit?reconnect=true`,children:"edit it"}),"."]})})]})}),Ape=4e3,Ipe=(e,t,n,r)=>({servers:i})=>{const o=Object.values(i),[s,a]=H.useState(o),l=p=>a(o.filter(({name:m,url:g})=>`${m} ${g}`.toLowerCase().match(p.toLowerCase()))),c=s.some(({autoConnect:p})=>!!p),[f,h]=n(!1,Ape);return H.useEffect(()=>{a(Object.values(i))},[i]),U(lu,{children:[C(sh,{className:"mb-3",onChange:l}),U(Qn,{className:"mb-3",children:[U("div",{className:"col-md-6 d-flex d-md-block mb-2 mb-md-0",children:[C(t,{className:"flex-fill",onImportError:h,children:"Import servers"}),o.length>0&&U(ht,{outline:!0,className:"ms-2 flex-fill",onClick:async()=>e.exportServers(),children:[C(Fe,{icon:f6,fixedWidth:!0})," Export servers"]})]}),C("div",{className:"col-md-6 text-md-end d-flex d-md-block",children:U(ht,{outline:!0,color:"primary",className:"flex-fill",tag:At,to:"/server/create",children:[C(Fe,{icon:EC,fixedWidth:!0})," Add a server"]})})]}),C(fn,{children:U("table",{className:"table table-hover responsive-table mb-0",children:[C("thead",{className:"responsive-table__header",children:U("tr",{children:[c&&C("th",{"aria-label":"Auto-connect",style:{width:"50px"}}),C("th",{children:"Name"}),C("th",{children:"Base URL"}),C("th",{"aria-label":"Options"})]})}),U("tbody",{children:[!s.length&&C("tr",{className:"text-center",children:C("td",{colSpan:4,children:"No servers found."})}),s.map(p=>C(r,{server:p,hasAutoConnect:c},p.id))]})]})}),f&&C("div",{className:"mt-3",children:C(Dr,{type:"error",children:"The servers could not be imported. Make sure the format is correct."})})]})},Fpe=e=>({server:t,hasAutoConnect:n})=>U("tr",{className:"responsive-table__row",children:[n&&C("td",{className:"responsive-table__cell","data-th":"Auto-connect",children:t.autoConnect&&U(We,{children:[C(Fe,{icon:pd,className:"text-primary",id:"autoConnectIcon"}),C(Or,{target:"autoConnectIcon",placement:"right",children:"Auto-connect to this server"})]})}),C("th",{className:"responsive-table__cell","data-th":"Name",children:C(At,{to:`/server/${t.id}`,children:t.name})}),C("td",{className:"responsive-table__cell","data-th":"Base URL",children:t.url}),C("td",{className:"responsive-table__cell text-end",children:C(e,{server:t})})]});var $pe={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"]},jpe=$pe,Bpe={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"]},zpe=Bpe,Upe={prefix:"far",iconName:"circle",icon:[512,512,[128308,128309,128992,128993,128994,128995,128996,9679,9898,9899,11044,61708,61915],"f111","M512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256zM256 48C141.1 48 48 141.1 48 256C48 370.9 141.1 464 256 464C370.9 464 464 370.9 464 256C464 141.1 370.9 48 256 48z"]},U8={prefix:"far",iconName:"clone",icon:[512,512,[],"f24d","M64 464H288c8.8 0 16-7.2 16-16V384h48v64c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V224c0-35.3 28.7-64 64-64h64v48H64c-8.8 0-16 7.2-16 16V448c0 8.8 7.2 16 16 16zM224 304H448c8.8 0 16-7.2 16-16V64c0-8.8-7.2-16-16-16H224c-8.8 0-16 7.2-16 16V288c0 8.8 7.2 16 16 16zm-64-16V64c0-35.3 28.7-64 64-64H448c35.3 0 64 28.7 64 64V288c0 35.3-28.7 64-64 64H224c-35.3 0-64-28.7-64-64z"]};const Vpe=e=>({server:t,setAutoConnect:n})=>{const[r,i]=$t(),[o,,s,a]=$t(),l=`/server/${t.id}`,{autoConnect:c}=t,f=c?uQ:Upe;return U(O_,{isOpen:r,toggle:i,children:[U(Ve,{tag:At,to:l,children:[C(Fe,{icon:lQ,fixedWidth:!0})," Connect"]}),U(Ve,{tag:At,to:`${l}/edit`,children:[C(Fe,{icon:xC,fixedWidth:!0})," Edit server"]}),U(Ve,{onClick:()=>n(t,!c),children:[C(Fe,{icon:f,fixedWidth:!0})," ",c?"Do not a":"A","uto-connect"]}),C(Ve,{divider:!0}),U(Ve,{className:"dropdown-item--danger",onClick:s,children:[C(Fe,{icon:wC,fixedWidth:!0})," Remove server"]}),C(e,{redirectHome:!1,server:t,isOpen:o,toggle:a})]})};var iy={},Hpe={get exports(){return iy},set exports(e){iy=e}};/** @license * eventsource.js * Available under MIT License (MIT) * https://github.com/Yaffle/EventSource/ */(function(e,t){(function(n){var r=n.setTimeout,i=n.clearTimeout,o=n.XMLHttpRequest,s=n.XDomainRequest,a=n.ActiveXObject,l=n.EventSource,c=n.document,f=n.Promise,h=n.fetch,p=n.Response,m=n.TextDecoder,g=n.TextEncoder,v=n.AbortController;if(typeof window<"u"&&typeof c<"u"&&!("readyState"in c)&&c.body==null&&(c.readyState="loading",window.addEventListener("load",function(fe){c.readyState="complete"},!1)),o==null&&a!=null&&(o=function(){return new a("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(fe){function ye(){}return ye.prototype=fe,new ye}),Date.now||(Date.now=function(){return new Date().getTime()}),v==null){var w=h;h=function(fe,ye){var be=ye.signal;return w(fe,{headers:ye.headers,credentials:ye.credentials,cache:ye.cache}).then(function(Oe){var Ae=Oe.body.getReader();return be._reader=Ae,be._aborted&&be._reader.cancel(),{status:Oe.status,statusText:Oe.statusText,headers:Oe.headers,body:{getReader:function(){return Ae}}}})},v=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function y(){this.bitsNeeded=0,this.codePoint=0}y.prototype.decode=function(fe){function ye(we,_e,Ee){if(Ee===1)return we>=128>>_e&&we<<_e<=2047;if(Ee===2)return we>=2048>>_e&&we<<_e<=55295||we>=57344>>_e&&we<<_e<=65535;if(Ee===3)return we>=65536>>_e&&we<<_e<=1114111;throw new Error}function be(we,_e){if(we===6*1)return _e>>6>15?3:_e>31?2:1;if(we===6*2)return _e>15?3:2;if(we===6*3)return 3;throw new Error}for(var Oe=65533,Ae="",Ne=this.bitsNeeded,Le=this.codePoint,ue=0;ue191||!ye(Le<<6|he&63,Ne-6,be(Ne,Le)))&&(Ne=0,Le=Oe,Ae+=String.fromCharCode(Le)),Ne===0?(he>=0&&he<=127?(Ne=0,Le=he):he>=192&&he<=223?(Ne=6*1,Le=he&31):he>=224&&he<=239?(Ne=6*2,Le=he&15):he>=240&&he<=247?(Ne=6*3,Le=he&7):(Ne=0,Le=Oe),Ne!==0&&!ye(Le,Ne,be(Ne,Le))&&(Ne=0,Le=Oe)):(Ne-=6,Le=Le<<6|he&63),Ne===0&&(Le<=65535?Ae+=String.fromCharCode(Le):(Ae+=String.fromCharCode(55296+(Le-65535-1>>10)),Ae+=String.fromCharCode(56320+(Le-65535-1&1023))))}return this.bitsNeeded=Ne,this.codePoint=Le,Ae};var b=function(){try{return new m().decode(new g().encode("test"),{stream:!0})==="test"}catch(fe){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+fe)}return!1};(m==null||g==null||!b())&&(m=y);var x=function(){};function T(fe){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=x,this.onload=x,this.onerror=x,this.onreadystatechange=x,this._contentType="",this._xhr=fe,this._sendTimeout=0,this._abort=x}T.prototype.open=function(fe,ye){this._abort(!0);var be=this,Oe=this._xhr,Ae=1,Ne=0;this._abort=function(Ee){be._sendTimeout!==0&&(i(be._sendTimeout),be._sendTimeout=0),(Ae===1||Ae===2||Ae===3)&&(Ae=4,Oe.onload=x,Oe.onerror=x,Oe.onabort=x,Oe.onprogress=x,Oe.onreadystatechange=x,Oe.abort(),Ne!==0&&(i(Ne),Ne=0),Ee||(be.readyState=4,be.onabort(null),be.onreadystatechange())),Ae=0};var Le=function(){if(Ae===1){var Ee=0,Me="",$e=void 0;if("contentType"in Oe)Ee=200,Me="OK",$e=Oe.contentType;else try{Ee=Oe.status,Me=Oe.statusText,$e=Oe.getResponseHeader("Content-Type")}catch{Ee=0,Me="",$e=void 0}Ee!==0&&(Ae=2,be.readyState=2,be.status=Ee,be.statusText=Me,be._contentType=$e,be.onreadystatechange())}},ue=function(){if(Le(),Ae===2||Ae===3){Ae=3;var Ee="";try{Ee=Oe.responseText}catch{}be.readyState=3,be.responseText=Ee,be.onprogress()}},he=function(Ee,Me){if((Me==null||Me.preventDefault==null)&&(Me={preventDefault:x}),ue(),Ae===1||Ae===2||Ae===3){if(Ae=4,Ne!==0&&(i(Ne),Ne=0),be.readyState=4,Ee==="load")be.onload(Me);else if(Ee==="error")be.onerror(Me);else if(Ee==="abort")be.onabort(Me);else throw new TypeError;be.onreadystatechange()}},we=function(Ee){Oe!=null&&(Oe.readyState===4?(!("onload"in Oe)||!("onerror"in Oe)||!("onabort"in Oe))&&he(Oe.responseText===""?"error":"load",Ee):Oe.readyState===3?"onprogress"in Oe||ue():Oe.readyState===2&&Le())},_e=function(){Ne=r(function(){_e()},500),Oe.readyState===3&&ue()};"onload"in Oe&&(Oe.onload=function(Ee){he("load",Ee)}),"onerror"in Oe&&(Oe.onerror=function(Ee){he("error",Ee)}),"onabort"in Oe&&(Oe.onabort=function(Ee){he("abort",Ee)}),"onprogress"in Oe&&(Oe.onprogress=ue),"onreadystatechange"in Oe&&(Oe.onreadystatechange=function(Ee){we(Ee)}),("contentType"in Oe||!("ontimeout"in o.prototype))&&(ye+=(ye.indexOf("?")===-1?"?":"&")+"padding=true"),Oe.open(fe,ye,!0),"readyState"in Oe&&(Ne=r(function(){_e()},0))},T.prototype.abort=function(){this._abort(!1)},T.prototype.getResponseHeader=function(fe){return this._contentType},T.prototype.setRequestHeader=function(fe,ye){var be=this._xhr;"setRequestHeader"in be&&be.setRequestHeader(fe,ye)},T.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},T.prototype.send=function(){if((!("ontimeout"in o.prototype)||!("sendAsBinary"in o.prototype)&&!("mozAnon"in o.prototype))&&c!=null&&c.readyState!=null&&c.readyState!=="complete"){var fe=this;fe._sendTimeout=r(function(){fe._sendTimeout=0,fe.send()},4);return}var ye=this._xhr;"withCredentials"in ye&&(ye.withCredentials=this.withCredentials);try{ye.send(void 0)}catch(be){throw be}};function P(fe){return fe.replace(/[A-Z]/g,function(ye){return String.fromCharCode(ye.charCodeAt(0)+32)})}function k(fe){for(var ye=Object.create(null),be=fe.split(`\r -`),Oe=0;Oe"u"?typeof window<"u"?window:typeof self<"u"?self:Hl:globalThis)})(Ape,ny);const Ipe=(e,t,n,r)=>{const{mercureHubUrl:i,token:o,loading:s,error:a}=e;if(s||a||!i)return;const l=({data:h})=>n(JSON.parse(h)),c=({status:h})=>h===401&&r(),f=t.map(h=>{const p=new URL(i);p.searchParams.append("topic",h);const m=new ny.EventSourcePolyfill(p,{headers:{Authorization:`Bearer ${o}`}});return m.onmessage=l,m.onerror=c,m});return()=>f.forEach(h=>h.close())};function sa(e,t){const n=new Set;return r=>{const{createNewVisits:i,loadMercureInfo:o,mercureInfo:s}=r,{interval:a}=s,l=Js();return H.useEffect(()=>{const c=m=>a?n.add(m):i([m]),f=t(r,l),h=Ipe(s,f,c,o);if(!a)return h;const p=setInterval(()=>{i([...n]),n.clear()},a*1e3*60);return()=>Ms(()=>clearInterval(p),()=>h==null?void 0:h())(void 0)},[s]),C(e,{...r})}}class Jr{}Se(Jr,"visits","https://shlink.io/new-visit"),Se(Jr,"orphanVisits","https://shlink.io/new-orphan-visit"),Se(Jr,"shortUrlVisits",t=>`https://shlink.io/new-visit/${t}`);const YE="shlink/shortUrlDeletion",MN={shortCode:"",loading:!1,deleted:!1,error:!1},Fpe=e=>ir(`${YE}/deleteShortUrl`,async({shortCode:t,domain:n},{getState:r})=>{const{deleteShortUrl:i}=e(r);return await i(t,n),{shortCode:t,domain:n}}),I8=_n(`${YE}/shortUrlDeleted`),$pe=e=>{const{actions:t,reducer:n}=qn({name:YE,initialState:MN,reducers:{resetDeleteShortUrl:()=>MN},extraReducers:i=>{i.addCase(e.pending,o=>({...o,loading:!0,error:!1,deleted:!1})),i.addCase(e.rejected,(o,{error:s})=>({...o,errorData:io(s),loading:!1,error:!0,deleted:!1})),i.addCase(e.fulfilled,(o,{payload:s})=>({...o,shortCode:s.shortCode,loading:!1,error:!1,deleted:!0}))}}),{resetDeleteShortUrl:r}=t;return{reducer:n,resetDeleteShortUrl:r}},F8="shlink/shortUrlsList",$8=5,jpe={loading:!0,error:!1},Bpe=e=>ir(`${F8}/listShortUrls`,(t,{getState:n})=>{const{listShortUrls:r}=e(n);return r(t??{})}),zpe=(e,t,n)=>qn({name:F8,initialState:jpe,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,Wn((i,{payload:o})=>i.shortUrls?Rl(["shortUrls","data"],[o,...i.shortUrls.data.slice(0,$8-1)],i):i,i=>i.shortUrls?Rl(["shortUrls","pagination","totalItems"],i.shortUrls.pagination.totalItems+1,i):i)),r.addCase(t.fulfilled,(i,{payload:o})=>i.shortUrls?Rl(["shortUrls","data"],i.shortUrls.data.map(s=>{const{shortCode:a,domain:l}=o;return kf(s,a,l)?o:s}),i):i),r.addCase(I8,Wn((i,{payload:o})=>i.shortUrls?Rl(["shortUrls","data"],Wd(s=>kf(s,o.shortCode,o.domain),i.shortUrls.data),i):i,i=>i.shortUrls?Rl(["shortUrls","pagination","totalItems"],i.shortUrls.pagination.totalItems-1,i):i)),r.addCase(ch,(i,{payload:o})=>{var s,a;return Rl(["shortUrls","data"],(a=(s=i.shortUrls)==null?void 0:s.data)==null?void 0:a.map(l=>{var c;return((c=JG(o.createdVisits.filter(({shortUrl:f})=>f&&kf(l,f.shortCode,f.domain))))==null?void 0:c.shortUrl)??l}),i)})}}),RN=10,{ceil:Upe}=Math,Vpe=new Intl.NumberFormat("en-US"),bn=e=>Vpe.format(Number(e)),Hpe=e=>Upe(e/RN)*RN;const Wpe=e=>e?{tag:At,to:e}:{},dx=({children:e,title:t,link:n,tooltip:r})=>{const i=vl();return U(We,{children:[U(Er,{innerRef:i,className:"highlight-card",body:!0,...Wpe(n),children:[n&&C(Fe,{size:"3x",className:"highlight-card__link-icon",icon:Npe}),C(iE,{tag:"h5",className:"highlight-card__title",children:t}),C(rE,{tag:"h2",children:e})]}),r&&C(Or,{target:i,placement:"bottom",children:r})]})},NN=({loading:e,excludeBots:t,visitsSummary:n,...r})=>C(dx,{tooltip:n.bots!==void 0?U(We,{children:[t?"Plus":"Including"," ",C("b",{children:bn(n.bots)})," potential bot visits"]}):void 0,...r,children:e?"Loading...":bn(t&&n.nonBots?n.nonBots:n.total)}),Ype=(e,t)=>sa(({shortUrlsList:n,listShortUrls:r,listTags:i,tagsList:o,selectedServer:s,loadVisitsOverview:a,visitsOverview:l,settings:{visits:c}})=>{const{loading:f,shortUrls:h}=n,{loading:p}=o,{loading:m,nonOrphanVisits:g,orphanVisits:v}=l,w=Vd(s),y=Mi("nonOrphanVisits",s),b=jo();return H.useEffect(()=>{r({itemsPerPage:$8,orderBy:{field:"dateCreated",dir:"DESC"}}),i(),a()},[]),U(We,{children:[U(Jn,{children:[C("div",{className:"col-lg-6 col-xl-3 mb-3",children:C(NN,{title:"Visits",link:y?`/server/${w}/non-orphan-visits`:void 0,excludeBots:(c==null?void 0:c.excludeBots)??!1,loading:m,visitsSummary:g})}),C("div",{className:"col-lg-6 col-xl-3 mb-3",children:C(NN,{title:"Orphan visits",link:`/server/${w}/orphan-visits`,excludeBots:(c==null?void 0:c.excludeBots)??!1,loading:m,visitsSummary:v})}),C("div",{className:"col-lg-6 col-xl-3 mb-3",children:C(dx,{title:"Short URLs",link:`/server/${w}/list-short-urls/1`,children:f?"Loading...":bn((h==null?void 0:h.pagination.totalItems)??0)})}),C("div",{className:"col-lg-6 col-xl-3 mb-3",children:C(dx,{title:"Tags",link:`/server/${w}/manage-tags`,children:p?"Loading...":bn(o.tags.length)})})]}),U(Er,{className:"mb-3",children:[U(sl,{children:[C("span",{className:"d-sm-none",children:"Create a short URL"}),C("h5",{className:"d-none d-sm-inline",children:"Create a short URL"}),C(At,{className:"float-end",to:`/server/${w}/create-short-url`,children:"Advanced options »"})]}),C(ol,{children:C(t,{basicMode:!0})})]}),U(Er,{children:[U(sl,{children:[C("span",{className:"d-sm-none",children:"Recently created URLs"}),C("h5",{className:"d-none d-sm-inline",children:"Recently created URLs"}),C(At,{className:"float-end",to:`/server/${w}/list-short-urls/1`,children:"See all »"})]}),C(ol,{children:C(e,{shortUrlsList:n,selectedServer:s,className:"mb-0",onTagClick:x=>b(`/server/${w}/list-short-urls/1?tags=${encodeURIComponent(x)}`)})})]})]})},()=>[Jr.visits,Jr.orphanVisits]),qpe={},Gpe=e=>e.id?e:fd("id",pE(),e),Zpe=iC((e,t)=>fd(t.id,t,e),{}),{actions:Kpe,reducer:Xpe}=qn({name:"shlink/servers",initialState:qpe,reducers:{editServer:{prepare:(e,t)=>({payload:{serverId:e,serverData:t}}),reducer:(e,{payload:t})=>{const{serverId:n,serverData:r}=t;return e[n]?fd(n,{...e[n],...r},e):e}},deleteServer:(e,{payload:t})=>XG(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?Qu(Gg(e).map(([i,o])=>[i,{...o,autoConnect:i===n}])):fd(n,{...e[n],autoConnect:r},e):e}},createServers:{prepare:Wn(rC(Gpe),Zpe,e=>({payload:e})),reducer:(e,{payload:t})=>({...e,...t})}}}),{editServer:Qpe,deleteServer:Jpe,setAutoConnect:eme,createServers:j8}=Kpe,tme=Xpe,nme=e=>Array.isArray(e)?e.filter(tC):[],rme=e=>ir("shlink/remoteServers/fetchServers",async(t,{dispatch:n})=>{const r=await e.fetchJson(`${Hg.homepage}/servers.json`),i=nme(r);n(j8(i))}),ime=({servers:e,selectedServer:t})=>{const n=Object.values(e);return U(th,{nav:!0,inNavbar:!0,children:[U(iu,{nav:!0,caret:!0,children:[C(Fe,{icon:PM})," ",C("span",{className:"ms-1",children:"Servers"})]}),C(gl,{end:!0,style:{right:0},children:(()=>n.length?U(We,{children:[n.map(({name:i,id:o})=>C(Ve,{tag:At,to:`/server/${o}`,active:Vd(t)===o,children:i},o)),C(Ve,{divider:!0}),U(Ve,{tag:At,to:"/manage-servers",children:[C(Fe,{icon:PM})," ",C("span",{className:"ms-1",children:"Manage servers"})]})]}):U(Ve,{tag:At,to:"/server/create",children:[C(Fe,{icon:SC})," ",C("span",{className:"ms-1",children:"Add a server"})]}))()})]})},ome="shlink-servers.csv";class sme{constructor(t,n,r){Se(this,"exportServers",async()=>{const t=i_(this.storage.get("servers")??{}).map(Bq);try{const n=this.jsonToCsv(t);i8(this.window,n,ome)}catch(n){console.error(n)}});this.storage=t,this.window=n,this.jsonToCsv=r}}const ame=e=>typeof e.url=="string"&&typeof e.apiKey=="string"&&typeof e.name=="string",lme=e=>Array.isArray(e)&&e.every(ame);class cme{constructor(t,n){Se(this,"importServersFromFile",async t=>{if(!t)throw new Error("No file provided");const n=this.fileReaderFactory();return new Promise((r,i)=>{n.addEventListener("loadend",async o=>{var s,a;try{const l=((a=(s=o.target)==null?void 0:s.result)==null?void 0:a.toString())??"",c=await this.csvToJson(l);if(!lme(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 ume=(e,t)=>{e.serviceFactory("ManageServers",Ope,"ServersExporter","ImportServersBtn","useTimeoutToggle","ManageServersRow"),e.decorator("ManageServers",mv),e.decorator("ManageServers",t(["selectedServer","servers"],["resetSelectedServer"])),e.serviceFactory("ManageServersRow",Ppe,"ManageServersRowDropdown"),e.serviceFactory("ManageServersRowDropdown",Dpe,"DeleteServerModal"),e.decorator("ManageServersRowDropdown",t(null,["setAutoConnect"])),e.serviceFactory("CreateServer",bpe,"ImportServersBtn","useTimeoutToggle"),e.decorator("CreateServer",mv),e.decorator("CreateServer",t(["selectedServer","servers"],["createServers","resetSelectedServer"])),e.serviceFactory("EditServer",Spe,"ServerError"),e.decorator("EditServer",t(["selectedServer"],["editServer","selectServer","resetSelectedServer"])),e.serviceFactory("ServersDropdown",()=>ime),e.decorator("ServersDropdown",t(["servers","selectedServer"])),e.serviceFactory("DeleteServerModal",()=>xpe),e.decorator("DeleteServerModal",t(null,["deleteServer"])),e.serviceFactory("DeleteServerButton",wpe,"DeleteServerModal"),e.serviceFactory("ImportServersBtn",Cpe,"ServersImporter"),e.decorator("ImportServersBtn",t(["servers"],["createServers"])),e.serviceFactory("ServerError",Epe,"DeleteServerButton"),e.decorator("ServerError",t(["servers","selectedServer"])),e.serviceFactory("Overview",Ype,"ShortUrlsTable","CreateShortUrl"),e.decorator("Overview",t(["shortUrlsList","tagsList","selectedServer","mercureInfo","visitsOverview","settings"],["listShortUrls","listTags","createNewVisits","loadMercureInfo","loadVisitsOverview"])),e.constant("fileReaderFactory",()=>new FileReader),e.service("ServersImporter",cme,"csvToJson","fileReaderFactory"),e.service("ServersExporter",sme,"Storage","window","jsonToCsv"),e.serviceFactory("selectServer",n8,"buildShlinkApiClient","loadMercureInfo"),e.serviceFactory("createServers",()=>j8),e.serviceFactory("deleteServer",()=>Jpe),e.serviceFactory("editServer",()=>Qpe),e.serviceFactory("setAutoConnect",()=>eme),e.serviceFactory("fetchServers",rme,"HttpClient"),e.serviceFactory("resetSelectedServer",()=>OE),e.serviceFactory("selectServerListener",sae,"selectServer","loadMercureInfo"),e.serviceFactory("selectedServerReducerCreator",aae,"selectServer"),e.serviceFactory("selectedServerReducer",St("reducer"),"selectedServerReducerCreator")},Sc=({children:e})=>C("small",{className:"form-text text-muted d-block",children:e}),B8=({checked:e=!1,onChange:t=sC,className:n,children:r,type:i,inline:o=!1})=>{const s=S_(),a=f=>t(f.target.checked,f),l={"form-switch":i==="switch","form-checkbox":i==="checkbox"},c=o?{display:"inline-block"}:{};return U("span",{className:ge("form-check",l,n),style:c,children:[C("input",{type:"checkbox",className:"form-check-input",id:s,checked:e,onChange:a}),C("label",{className:"form-check-label",htmlFor:s,children:r})]})},Gc=e=>C(B8,{type:"switch",...e}),fme=e=>e?`${e}`:"",dme=({settings:{realTimeUpdates:e},toggleRealTimeUpdates:t,setRealTimeUpdatesInterval:n})=>{const r=S_();return U(fn,{title:"Real-time updates",className:"h-100",children:[C(yr,{children:U(Gc,{checked:e.enabled,onChange:t,children:["Enable or disable real-time updates.",U(Sc,{children:["Real-time updates are currently being ",C("b",{children:e.enabled?"processed":"ignored"}),"."]})]})}),U(au,{noMargin:!0,label:"Real-time updates frequency (in minutes):",labelClassName:ge("form-label",{"text-muted":!e.enabled}),id:r,children:[C(Vc,{type:"number",min:0,placeholder:"Immediate",disabled:!e.enabled,value:fme(e.interval),id:r,onChange:({target:i})=>n(Number(i.value))}),e.enabled&&U(Sc,{children:[e.interval!==void 0&&e.interval>0&&U("span",{children:["Updates will be reflected in the UI every ",C("b",{children:e.interval})," minute",e.interval>1&&"s","."]}),!e.interval&&"Updates will be reflected in the UI as soon as they happen."]})]})]})},qE={field:"dateCreated",dir:"DESC"},hme={realTimeUpdates:{enabled:!0},shortUrlCreation:{validateUrls:!1},ui:{theme:"light"},visits:{defaultInterval:"last30Days"},shortUrlsList:{defaultOrdering:qE}},pme=(e,{payload:t})=>LI(e,t),wa=e=>({reducer:pme,prepare:e}),xa=e=>({payload:e}),{reducer:mme,actions:gme}=qn({name:"shlink/settings",initialState:hme,reducers:{toggleRealTimeUpdates:wa(e=>xa({realTimeUpdates:{enabled:e}})),setRealTimeUpdatesInterval:wa(e=>xa({realTimeUpdates:{interval:e}})),setShortUrlCreationSettings:wa(e=>xa({shortUrlCreation:e})),setShortUrlsListSettings:wa(e=>xa({shortUrlsList:e})),setUiSettings:wa(e=>xa({ui:e})),setVisitsSettings:wa(e=>xa({visits:e})),setTagsSettings:wa(e=>xa({tags:e}))}}),{toggleRealTimeUpdates:vme,setRealTimeUpdatesInterval:yme,setShortUrlCreationSettings:_me,setShortUrlsListSettings:bme,setUiSettings:wme,setVisitsSettings:xme,setTagsSettings:Sme}=gme,Cme=mme;const Lf=({children:e,...t})=>C(l5,{className:"nav-pills__nav-link",tag:lI,...t,children:e}),z8=({children:e,fill:t=!1,className:n=""})=>C(Er,{className:`nav-pills__nav p-0 overflow-hidden ${n}`,body:!0,children:C(p_,{pills:!0,fill:t,children:H.Children.map(e,r=>{if(!H.isValidElement(r)||r.type!==Lf)throw new Error("Only NavPillItem children are allowed inside NavPills.");return r})})}),Fb=({items:e})=>C(We,{children:e.map((t,n)=>C("div",{className:"mb-3",children:t},n))}),Eme=(e,t,n,r,i,o)=>()=>U(su,{children:[U(z8,{className:"mb-3",children:[C(Lf,{to:"general",children:"General"}),C(Lf,{to:"short-urls",children:"Short URLs"}),C(Lf,{to:"other-items",children:"Other items"})]}),U(Qy,{children:[C(gt,{path:"general",element:C(Fb,{items:[C(r,{}),C(e,{})]})}),C(gt,{path:"short-urls",element:C(Fb,{items:[C(t,{}),C(n,{})]})}),C(gt,{path:"other-items",element:C(Fb,{items:[C(o,{}),C(i,{})]})}),C(gt,{path:"*",element:C(KS,{replace:!0,to:"general"})})]})]}),$b=e=>e==="includes"?"Suggest tags including input":"Suggest tags starting with input",Tme=e=>e==="includes"?U(We,{children:["The list of suggested tags will contain those ",C("b",{children:"including"})," provided input."]}):U(We,{children:["The list of suggested tags will contain those ",C("b",{children:"starting with"})," provided input."]}),Ome=({settings:e,setShortUrlCreationSettings:t})=>{const n=e.shortUrlCreation??{validateUrls:!1},r=i=>()=>t({...n??{validateUrls:!1},tagFilteringMode:i});return U(fn,{title:"Short URLs form",className:"h-100",children:[C(yr,{children:U(Gc,{checked:n.validateUrls??!1,onChange:i=>t({...n,validateUrls:i}),children:["Request validation on long URLs when creating new short URLs.",U(Sc,{children:["The initial state of the ",C("b",{children:"Validate URL"})," checkbox will be ",C("b",{children:n.validateUrls?"checked":"unchecked"}),"."]})]})}),C(yr,{children:U(Gc,{checked:n.forwardQuery??!0,onChange:i=>t({...n,forwardQuery:i}),children:["Make all new short URLs forward their query params to the long URL.",U(Sc,{children:["The initial state of the ",C("b",{children:"Forward query params on redirect"})," checkbox will be ",C("b",{children:n.forwardQuery??!0?"checked":"unchecked"}),"."]})]})}),U(au,{noMargin:!0,label:"Tag suggestions search mode:",children:[U(oa,{text:$b(n.tagFilteringMode),children:[C(Ve,{active:!n.tagFilteringMode||n.tagFilteringMode==="startsWith",onClick:r("startsWith"),children:$b("startsWith")}),C(Ve,{active:n.tagFilteringMode==="includes",onClick:r("includes"),children:$b("includes")})]}),C(Sc,{children:Tme(n.tagFilteringMode)})]})]})},U8={dateCreated:"Created at",shortCode:"Short URL",longUrl:"Long URL",title:"Title",visits:"Visits"};function hh({items:e,order:t,onChange:n,isButton:r=!0,right:i=!1,prefixed:o=!0}){const s=a=>()=>{const l=o_(a,t.field,t.dir);n(l?a:void 0,l)};return U(th,{children:[U(iu,{caret:!0,color:r?"primary":"link",className:ge({"dropdown-btn__toggle btn-block pe-4 overflow-hidden":r,"btn-sm p-0":!r}),children:[!r&&C(We,{children:"Order by"}),r&&!t.field&&C("i",{children:"Order by..."}),r&&t.field&&U(We,{children:[o&&"Order by: ",e[t.field]," - ",C("small",{children:t.dir??"DESC"})]})]}),U(gl,{end:i,className:ge("w-100",{"ordering-dropdown__menu--link":!r}),children:[Gg(e).map(([a,l])=>U(Ve,{active:t.field===a,onClick:s(a),children:[l,t.field===a&&C(Fe,{icon:t.dir==="ASC"?SQ:lQ,className:"ordering-dropdown__sort-icon"})]},a)),C(Ve,{divider:!0}),C(Ve,{disabled:!t.field,onClick:()=>n(),children:C("i",{children:"Clear selection"})})]})]})}const Pme=({settings:{shortUrlsList:e},setShortUrlsListSettings:t})=>C(fn,{title:"Short URLs list",className:"h-100",children:C(au,{noMargin:!0,label:"Default ordering for short URLs list:",children:C(hh,{items:U8,order:(e==null?void 0:e.defaultOrdering)??qE,onChange:(n,r)=>t({defaultOrdering:{field:n,dir:r}})})})}),V8={tag:"Tag",shortUrls:"Short URLs",visits:"Visits"},kme=({settings:{tags:e},setTagsSettings:t})=>C(fn,{title:"Tags",className:"h-100",children:C(au,{noMargin:!0,label:"Default ordering for tags list:",children:C(hh,{items:V8,order:(e==null?void 0:e.defaultOrdering)??{},onChange:(n,r)=>t({...e,defaultOrdering:{field:n,dir:r}})})})});const Mme=({settings:{ui:e},setUiSettings:t})=>U(fn,{title:"User interface",className:"h-100",children:[C(Fe,{icon:(e==null?void 0:e.theme)==="dark"?FQ:EQ,className:"user-interface__theme-icon"}),C(Gc,{checked:(e==null?void 0:e.theme)==="dark",onChange:n=>{const r=n?"dark":"light";t({...e,theme:r}),k5(r)},children:"Use dark theme."})]}),H8=({active:e,allText:t,onChange:n})=>U(We,{children:[C(Ve,{active:e==="all",onClick:()=>n("all"),children:t}),C(Ve,{divider:!0}),Xhe.map(r=>C(Ve,{active:e===r,onClick:()=>n(r),children:WE(r)},r))]}),Rme=({onChange:e,active:t,allText:n})=>C(oa,{text:WE(t)??n,children:C(H8,{allText:n,active:t,onChange:e})}),LN=e=>{var t;return((t=e.visits)==null?void 0:t.defaultInterval)??"last30Days"},Nme=({settings:e,setVisitsSettings:t})=>{var n,r;return U(fn,{title:"Visits",className:"h-100",children:[C(yr,{children:U(Gc,{checked:!!((n=e.visits)!=null&&n.excludeBots),onChange:i=>t({defaultInterval:LN(e),excludeBots:i}),children:["Exclude bots wherever possible (this option‘s effect might depend on Shlink server‘s version).",U(Sc,{children:["The visits coming from potential bots will be ",C("b",{children:(r=e.visits)!=null&&r.excludeBots?"excluded":"included"}),"."]})]})}),C(au,{noMargin:!0,label:"Default interval to load on visits sections:",children:C(Rme,{allText:"All visits",active:LN(e),onChange:i=>t({defaultInterval:i})})})]})},Lme=(e,t)=>{e.serviceFactory("Settings",Eme,"RealTimeUpdatesSettings","ShortUrlCreationSettings","ShortUrlsListSettings","UserInterfaceSettings","VisitsSettings","TagsSettings"),e.decorator("Settings",mv),e.decorator("Settings",t(null,["resetSelectedServer"])),e.serviceFactory("RealTimeUpdatesSettings",()=>dme),e.decorator("RealTimeUpdatesSettings",t(["settings"],["toggleRealTimeUpdates","setRealTimeUpdatesInterval"])),e.serviceFactory("ShortUrlCreationSettings",()=>Ome),e.decorator("ShortUrlCreationSettings",t(["settings"],["setShortUrlCreationSettings"])),e.serviceFactory("UserInterfaceSettings",()=>Mme),e.decorator("UserInterfaceSettings",t(["settings"],["setUiSettings"])),e.serviceFactory("VisitsSettings",()=>Nme),e.decorator("VisitsSettings",t(["settings"],["setVisitsSettings"])),e.serviceFactory("TagsSettings",()=>kme),e.decorator("TagsSettings",t(["settings"],["setTagsSettings"])),e.serviceFactory("ShortUrlsListSettings",()=>Pme),e.decorator("ShortUrlsListSettings",t(["settings"],["setShortUrlsListSettings"])),e.serviceFactory("toggleRealTimeUpdates",()=>vme),e.serviceFactory("setRealTimeUpdatesInterval",()=>yme),e.serviceFactory("setShortUrlCreationSettings",()=>_me),e.serviceFactory("setShortUrlsListSettings",()=>bme),e.serviceFactory("setUiSettings",()=>wme),e.serviceFactory("setVisitsSettings",()=>xme),e.serviceFactory("setTagsSettings",()=>Sme)},Dme=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}),Ame=(e,t)=>({createShortUrl:n,shortUrlCreation:r,resetCreateShortUrl:i,selectedServer:o,basicMode:s=!1,settings:{shortUrlCreation:a}})=>{const l=H.useMemo(()=>Dme(a),[a]);return U(We,{children:[C(e,{initialState:l,saving:r.saving,selectedServer:o,mode:s?"create-basic":"create",onSave:async c=>(i(),n(c))}),C(t,{creation:r,resetCreateShortUrl:i,canBeClosed:s})]})},Ime=e=>({settings:{shortUrlCreation:t},selectedServer:n,shortUrlDetail:r,getShortUrlDetail:i,shortUrlEdition:o,editShortUrl:s})=>{const{search:a}=kn(),l=Js(),c=ia(),{loading:f,error:h,errorData:p,shortUrl:m}=r,{saving:g,saved:v,error:w,errorData:y}=o,{domain:b}=ml(a),x=H.useMemo(()=>Oae(m,t),[m,t]);return H.useEffect(()=>{l.shortCode&&i({shortCode:mm(l.shortCode),domain:b})},[]),f?C(Eo,{loading:!0}):h?C(Dr,{type:"error",children:C(Ao,{errorData:p,fallbackMessage:"An error occurred while loading short URL detail :("})}):U(We,{children:[C("header",{className:"mb-3",children:C(Er,{body:!0,children:U("h2",{className:"d-sm-flex justify-content-between align-items-center mb-0",children:[C(ht,{color:"link",size:"lg",className:"p-0 me-3",onClick:c,children:C(Fe,{icon:r6})}),C("span",{className:"text-center",children:U("small",{children:["Edit ",C(Ei,{href:(m==null?void 0:m.shortUrl)??""})]})}),C("span",{})]})})}),C(e,{initialState:x,saving:g,selectedServer:n,mode:"edit",onSave:async T=>{m&&s({...m,data:T})}}),v&&w&&C(Dr,{type:"error",className:"mt-3",children:C(Ao,{errorData:y,fallbackMessage:"An error occurred while updating short URL :("})}),v&&!w&&C(Dr,{type:"success",className:"mt-3",children:"Short URL properly edited."})]})};var O_={},Fme=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var h=DN[t.format]||DN.default;window.clipboardData.setData(h,e)}else f.clipboardData.clearData(),f.clipboardData.setData(t.format,e);t.onCopy&&(f.preventDefault(),t.onCopy(f.clipboardData))}),document.body.appendChild(a),o.selectNodeContents(a),s.addRange(o);var c=document.execCommand("copy");if(!c)throw new Error("copy command was unsuccessful");l=!0}catch(f){n&&console.error("unable to copy using execCommand: ",f),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),l=!0}catch(h){n&&console.error("unable to copy using clipboardData: ",h),n&&console.error("falling back to prompt"),r=Bme("message"in t?t.message:jme),window.prompt(r,e)}}finally{s&&(typeof s.removeRange=="function"?s.removeRange(o):s.removeAllRanges()),a&&document.body.removeChild(a),i()}return l}var Ume=zme;function hx(e){return hx=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},hx(e)}Object.defineProperty(O_,"__esModule",{value:!0});O_.CopyToClipboard=void 0;var Dp=W8(H),Vme=W8(Ume),Hme=["text","onCopy","options","children"];function W8(e){return e&&e.__esModule?e:{default:e}}function AN(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 IN(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Yme(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 qme(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function FN(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 ry(e){return ry=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},ry(e)}function GE(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var q8=function(e){Zme(n,e);var t=Kme(n);function n(){var r;qme(this,n);for(var i=arguments.length,o=new Array(i),s=0;s({creation:t,resetCreateShortUrl:n,canBeClosed:r=!1})=>{const[i,o]=e(),{error:s,saved:a}=t;if(H.useEffect(()=>{n()},[]),s)return U(Dr,{type:"error",className:"mt-3",children:[r&&C(Fe,{icon:xw,className:"float-end pointer",onClick:n}),C(Ao,{errorData:t.errorData,fallbackMessage:"An error occurred while creating the URL :("})]});if(!a)return null;const{shortUrl:l}=t.result;return U(Dr,{type:"success",className:"mt-3",children:[r&&C(Fe,{icon:xw,className:"float-end pointer",onClick:n}),U("span",{children:[C("b",{children:"Great!"})," The short URL is ",C("b",{children:l})]}),C(G8,{text:l,onCopy:o,children:U("button",{className:"btn btn-light btn-sm create-short-url-result__copy-btn",id:"copyBtn",type:"button",children:[C(Fe,{icon:A8})," Copy"]})}),C(Jd,{placement:"left",isOpen:i,target:"copyBtn",children:"Copied!"})]})},jb="delete",tge=({shortUrl:e,toggle:t,isOpen:n,shortUrlDeletion:r,resetDeleteShortUrl:i,deleteShortUrl:o,shortUrlDeleted:s})=>{const[a,l]=H.useState("");H.useEffect(()=>i,[]);const{loading:c,error:f,deleted:h,errorData:p}=r,m=Wn(i,t),g=oh(()=>o(e).then(t));return C(Ho,{isOpen:n,toggle:m,centered:!0,onClosed:()=>h&&s(e),children:U("form",{onSubmit:g,children:[C(oo,{toggle:m,children:C("span",{className:"text-danger",children:"Delete short URL"})}),U(Ri,{children:[U("p",{children:[C("b",{className:"text-danger",children:"Caution!"})," You are about to delete a short URL."]}),C("p",{children:"This action cannot be undone. Once you have deleted it, all the visits stats will be lost."}),U("p",{children:["Write ",C("b",{children:jb})," to confirm deletion."]}),C("input",{type:"text",className:"form-control",placeholder:`Insert ${jb}`,value:a,onChange:v=>l(v.target.value)}),f&&C(Dr,{type:NX(p)?"warning":"error",small:!0,className:"mt-2",children:C(Ao,{errorData:p,fallbackMessage:"Something went wrong while deleting the URL :("})})]}),U(ra,{children:[C("button",{type:"button",className:"btn btn-link",onClick:m,children:"Cancel"}),C("button",{type:"submit",className:"btn btn-danger",disabled:a!==jb||c,children:c?"Deleting...":"Delete"})]})]})})},Z8=({amount:e=0,loading:t=!1,...n})=>U(ht,{...n,outline:!0,color:"primary",disabled:t,children:[C(Fe,{icon:YX})," ",t?"Exporting...":U(We,{children:["Export (",bn(e),")"]})]}),P_=()=>{const e=jo(),{search:t}=kn(),{serverId:n=""}=Js(),r=H.useMemo(Wn(()=>ml(t),({orderBy:o,tags:s,excludeBots:a,excludeMaxVisitsReached:l,excludePastValidUntil:c,...f})=>{const h=o?IZ(o):void 0,p=(s==null?void 0:s.split(","))??[];return{...f,orderBy:h,tags:p,excludeBots:a!==void 0?a==="true":void 0,excludeMaxVisitsReached:l!==void 0?l==="true":void 0,excludePastValidUntil:c!==void 0?c==="true":void 0}}),[t]);return[r,o=>{const s={...r,...o},{orderBy:a,tags:l,excludeBots:c,excludeMaxVisitsReached:f,excludePastValidUntil:h,...p}=s,m={...p,orderBy:a&&FI(a),tags:l.length>0?l.join(","):void 0,excludeBots:Ob(c),excludeMaxVisitsReached:Ob(f),excludePastValidUntil:Ob(h)},g=Yd(m),v=Cr(g)?"":`?${g}`;e(`/server/${n}/list-short-urls/1${v}`)}]},$N=20,nge=(e,{exportShortUrls:t})=>({amount:n=0,selectedServer:r})=>{const[{tags:i,search:o,startDate:s,endDate:a,orderBy:l,tagsMode:c}]=P_(),[f,,h,p]=$t();return C(Z8,{loading:f,className:"btn-md-block",amount:n,onClick:async()=>{if(!Rs(r))return;const g=n/$N,{listShortUrls:v}=e(r),w=async(b=1)=>{const{data:x}=await v({page:`${b}`,tags:i,searchTerm:o,startDate:s,endDate:a,orderBy:l,tagsMode:c,itemsPerPage:$N});return b>=g?x:x.concat(await w(b+1))};h();const y=await w();t(y.map(b=>{var x;return{createdAt:b.dateCreated,shortUrl:b.shortUrl,longUrl:b.longUrl,title:b.title??"",tags:b.tags.join(","),visits:((x=b==null?void 0:b.visitsSummary)==null?void 0:x.total)??b.visitsCount}})),p()}})};const K8=({text:e,onCopy:t})=>C(G8,{text:e,onCopy:t,children:C(Fe,{icon:A8,className:"ms-2 copy-to-clipboard-icon"})}),rge=(e,{margin:t,...n})=>{const r=`${e}/qr-code`,i=Yd({...n,margin:t>0?t:void 0});return`${r}${Cr(i)?"":`?${i}`}`},ige=({errorCorrection:e,setErrorCorrection:t})=>U(oa,{text:`Error correction (${e})`,children:[U(Ve,{active:e==="L",onClick:()=>t("L"),children:[C("b",{children:"L"}),"ow"]}),U(Ve,{active:e==="M",onClick:()=>t("M"),children:[C("b",{children:"M"}),"edium"]}),U(Ve,{active:e==="Q",onClick:()=>t("Q"),children:[C("b",{children:"Q"}),"uartile"]}),U(Ve,{active:e==="H",onClick:()=>t("H"),children:[C("b",{children:"H"}),"igh"]})]}),oge=({format:e,setFormat:t})=>U(oa,{text:`Format (${e})`,children:[C(Ve,{active:e==="png",onClick:()=>t("png"),children:"PNG"}),C(Ve,{active:e==="svg",onClick:()=>t("svg"),children:"SVG"})]});const sge=e=>({shortUrl:{shortUrl:t,shortCode:n},toggle:r,isOpen:i,selectedServer:o})=>{const[s,a]=H.useState(300),[l,c]=H.useState(0),[f,h]=H.useState("png"),[p,m]=H.useState("L"),g=Mi("nonRestCors",o),v=H.useMemo(()=>rge(t,{size:s,format:f,margin:l,errorCorrection:p}),[t,s,f,l,p]),w=H.useMemo(()=>s+l,[s,l]),y=H.useMemo(()=>{if(!(w<500))return w<800?"lg":"xl"},[w]);return U(Ho,{isOpen:i,toggle:r,centered:!0,size:y,children:[U(oo,{toggle:r,children:["QR code for ",C(Ei,{href:t,children:t})]}),U(Ri,{children:[U(Jn,{children:[U(yr,{className:"d-grid col-md-4",children:[U("label",{children:["Size: ",s,"px"]}),C("input",{type:"range",className:"form-control-range",value:s,step:10,min:50,max:1e3,onChange:b=>a(Number(b.target.value))})]}),U(yr,{className:"d-grid col-md-4",children:[U("label",{htmlFor:"marginControl",children:["Margin: ",l,"px"]}),C("input",{id:"marginControl",type:"range",className:"form-control-range",value:l,step:1,min:0,max:100,onChange:b=>c(Number(b.target.value))})]}),C(yr,{className:"d-grid col-md-4",children:C(oge,{format:f,setFormat:h})}),C(yr,{className:"col-md-6",children:C(ige,{errorCorrection:p,setErrorCorrection:m})})]}),U("div",{className:"text-center",children:[U("div",{className:"mb-3",children:[C(Ei,{href:v}),C(K8,{text:v})]}),C("img",{src:v,className:"qr-code-modal__img",alt:"QR code"}),g&&C("div",{className:"mt-3",children:U(ht,{block:!0,color:"primary",onClick:()=>{e.saveImage(v,`${n}-qr-code.${f}`).catch(()=>{})},children:["Download ",C(Fe,{icon:i6,className:"ms-1"})]})})]})]})]})},iy=({date:e,format:t=VE,relative:n=!1})=>{const r=HE(e)?e:Io(e);return C("time",{dateTime:`${lce(r)}000`,children:n?`${tce(Ys(),r)} ago`:_o(r,t)})},age=e=>{const{meta:t,visitsCount:n,visitsSummary:r}=e,{maxVisits:i,validSince:o,validUntil:s}=t,a=(r==null?void 0:r.total)??n;return i&&a>=i?{icon:$Q,className:"text-danger",description:U(We,{children:["This short URL cannot be currently visited because it has reached the maximum amount of ",C("b",{children:i})," visit",i>1?"s":"","."]})}:s&&Kr(wi(s),Ys())?{icon:kM,className:"text-danger",description:U(We,{children:["This short URL cannot be visited since ",C("b",{className:"indivisible",children:ey(wi(s))}),"."]})}:o&&Kr(Ys(),wi(o))?{icon:kM,className:"text-warning",description:U(We,{children:["This short URL will start working on ",C("b",{className:"indivisible",children:ey(wi(o))}),"."]})}:{icon:pd,className:"text-primary",description:"This short URL can be visited normally."}},lge=({shortUrl:e})=>{const t=vl(),{icon:n,className:r,description:i}=age(e);return U(We,{children:[C("span",{style:{cursor:i?"help":void 0},ref:t,children:C(Fe,{icon:n,className:r})}),C(Or,{target:t,placement:"bottom",children:i})]})},cge=({id:e},{shortCode:t,domain:n},r)=>{const i=n?`?domain=${n}`:"";return`/server/${e}/short-code/${Pae(t)}/${r}${i}`},gx=({selectedServer:e,shortUrl:t,suffix:n,children:r,...i})=>!e||!Rs(e)||!t?C("span",{...i,children:r}):C(At,{to:cge(e,t,n),...i,children:r});const X8=({visitsCount:e,shortUrl:t,selectedServer:n,active:r=!1})=>{const{maxVisits:i,validSince:o,validUntil:s}=(t==null?void 0:t.meta)??{},a=!!i||!!o||!!s,l=C(gx,{selectedServer:n,shortUrl:t,suffix:"visits",children:C("strong",{className:ge("short-url-visits-count__amount",{"short-url-visits-count__amount--big":r}),children:bn(e)})});if(!a)return l;const c=vl();return U(We,{children:[U("span",{className:"indivisible",children:[l,U("small",{className:"short-urls-visits-count__max-visits-control",ref:c,children:[i&&U(We,{children:[" / ",bn(i)]}),C("sup",{className:"ms-1",children:C(Fe,{icon:xC})})]})]}),C(Or,{target:c,placement:"bottom",children:U("ul",{className:"list-unstyled mb-0",children:[i&&U("li",{className:"short-url-visits-count__tooltip-list-item",children:["This short URL will not accept more than ",C("b",{children:bn(i)})," visit",i===1?"":"s","."]}),o&&U("li",{className:"short-url-visits-count__tooltip-list-item",children:["This short URL will not accept visits before ",C("b",{className:"indivisible",children:ey(wi(o))}),"."]}),s&&U("li",{className:"short-url-visits-count__tooltip-list-item",children:["This short URL will not accept visits after ",C("b",{className:"indivisible",children:ey(wi(s))}),"."]})]})})]})};const ZE=({text:e,children:t,clearable:n,className:r="",colorGenerator:i,onClick:o,onClose:s})=>U("span",{className:ge("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&&C("span",{"aria-label":`Remove ${e}`,className:"close tag__close-selected-tag",onClick:s,children:"×"})]}),uge=({tags:e,onTagClick:t,colorGenerator:n})=>Cr(e)?C("i",{className:"indivisible",children:C("small",{children:"No tags"})}):C(We,{children:e.map(r=>C(ZE,{text:r,colorGenerator:n,onClick:()=>t==null?void 0:t(r)},r))});const fge=(e,t,n)=>({shortUrl:r,selectedServer:i,onTagClick:o,settings:s})=>{var v,w,y,b;const[a,l]=n(),[c,f]=n(!1,500),h=H.useRef(!0),[{excludeBots:p}]=P_(),{visits:m}=s,g=p??(m==null?void 0:m.excludeBots);return H.useEffect(()=>{!h.current&&f(),h.current=!1},[(v=r.visitsSummary)==null?void 0:v.total,(w=r.visitsSummary)==null?void 0:w.nonBots,r.visitsCount]),U("tr",{className:"responsive-table__row",children:[C("td",{className:"indivisible short-urls-row__cell responsive-table__cell","data-th":"Created at",children:C(iy,{date:r.dateCreated})}),C("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Short URL",children:U("span",{className:"position-relative short-urls-row__cell--indivisible",children:[C("span",{className:"short-urls-row__short-url-wrapper",children:C(Ei,{href:r.shortUrl})}),C(K8,{text:r.shortUrl,onCopy:l}),C("span",{className:"badge bg-warning text-black short-urls-row__copy-hint",hidden:!a,children:"Copied short URL!"})]})}),C("td",{className:"responsive-table__cell short-urls-row__cell short-urls-row__cell--break","data-th":`${r.title?"Title":"Long URL"}`,children:C(Ei,{href:r.longUrl,children:r.title??r.longUrl})}),r.title&&C("td",{className:"short-urls-row__cell responsive-table__cell short-urls-row__cell--break d-lg-none","data-th":"Long URL",children:C(Ei,{href:r.longUrl})}),C("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Tags",children:C(uge,{tags:r.tags,colorGenerator:t,onTagClick:o})}),C("td",{className:"responsive-table__cell short-urls-row__cell text-lg-end","data-th":"Visits",children:C(X8,{visitsCount:(g?(y=r.visitsSummary)==null?void 0:y.nonBots:(b=r.visitsSummary)==null?void 0:b.total)??r.visitsCount,shortUrl:r,selectedServer:i,active:c})}),C("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Status",children:C(lge,{shortUrl:r})}),C("td",{className:"responsive-table__cell short-urls-row__cell",children:C(e,{selectedServer:i,shortUrl:r})})]})},dge=(e,t)=>({shortUrl:n,selectedServer:r})=>{const[i,o]=$t(),[s,,a,l]=$t(),[c,,f,h]=$t();return U(E_,{toggle:o,isOpen:i,children:[U(Ve,{tag:gx,selectedServer:r,shortUrl:n,suffix:"visits",children:[C(Fe,{icon:wC,fixedWidth:!0})," Visit stats"]}),U(Ve,{tag:gx,selectedServer:r,shortUrl:n,suffix:"edit",children:[C(Fe,{icon:bC,fixedWidth:!0})," Edit short URL"]}),U(Ve,{onClick:a,children:[C(Fe,{icon:IQ,fixedWidth:!0})," QR code"]}),C(t,{shortUrl:n,isOpen:s,toggle:l}),C(Ve,{divider:!0}),U(Ve,{className:"dropdown-item--danger",onClick:f,children:[C(Fe,{icon:_C,fixedWidth:!0})," Delete short URL"]}),C(e,{shortUrl:n,isOpen:c,toggle:h})]})},Q8="shlink/shortUrlCreation",jN={saving:!1,saved:!1,error:!1},hge=e=>ir(`${Q8}/createShortUrl`,(t,{getState:n})=>e(n).createShortUrl(t)),pge=e=>{const{reducer:t,actions:n}=qn({name:Q8,initialState:jN,reducers:{resetCreateShortUrl:()=>jN},extraReducers:i=>{i.addCase(e.pending,()=>({saving:!0,saved:!1,error:!1})),i.addCase(e.rejected,(o,{error:s})=>({saving:!1,saved:!1,error:!0,errorData:io(s)})),i.addCase(e.fulfilled,(o,{payload:s})=>({result:s,saving:!1,saved:!0,error:!1}))}}),{resetCreateShortUrl:r}=n;return{reducer:t,resetCreateShortUrl:r}},BN="shlink/shortUrlDetail",zN={loading:!1,error:!1},mge=e=>{const t=ir(`${BN}/getShortUrlDetail`,async({shortCode:r,domain:i},{getState:o})=>{var l;const{shortUrlsList:s}=o();return((l=s==null?void 0:s.shortUrls)==null?void 0:l.data.find(c=>kf(c,r,i)))??await e(o).getShortUrl(r,i)}),{reducer:n}=qn({name:BN,initialState:zN,reducers:{},extraReducers:r=>{r.addCase(t.pending,()=>({loading:!0,error:!1})),r.addCase(t.rejected,(i,{error:o})=>({loading:!1,error:!0,errorData:io(o)})),r.addCase(t.fulfilled,(i,{payload:o})=>({...zN,shortUrl:o}))}});return{reducer:n,getShortUrlDetail:t}},J8="shlink/shortUrlEdition",gge={saving:!1,saved:!1,error:!1},vge=e=>ir(`${J8}/editShortUrl`,({shortCode:t,domain:n,data:r},{getState:i})=>{const{updateShortUrl:o}=e(i);return o(t,n,r)}),yge=e=>qn({name:J8,initialState:gge,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:io(r)})),t.addCase(e.fulfilled,(n,{payload:r})=>({shortUrl:r,saving:!1,error:!1,saved:!0}))}});var _ge={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"]},bge={prefix:"fab",iconName:"android",icon:[576,512,[],"f17b","M420.55,301.93a24,24,0,1,1,24-24,24,24,0,0,1-24,24m-265.1,0a24,24,0,1,1,24-24,24,24,0,0,1-24,24m273.7-144.48,47.94-83a10,10,0,1,0-17.27-10h0l-48.54,84.07a301.25,301.25,0,0,0-246.56,0L116.18,64.45a10,10,0,1,0-17.27,10h0l47.94,83C64.53,202.22,8.24,285.55,0,384H576c-8.24-98.45-64.54-181.78-146.85-226.55"]};const eF=e=>C(B8,{type:"checkbox",...e});function wge(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,vx(e,t)}function vx(e,t){return vx=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},vx(e,t)}function xge(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 UN(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Sge(e,t,n){return e===t?!0:e.correspondingElement?e.correspondingElement.classList.contains(n):e.classList.contains(n)}function Cge(e,t,n){if(e===t)return!0;for(;e.parentNode||e.host;){if(e.parentNode&&Sge(e,t,n))return!0;e=e.parentNode||e.host}return e}function Ege(e){return document.documentElement.clientWidth<=e.clientX||document.documentElement.clientHeight<=e.clientY}var Tge=function(){if(!(typeof window>"u"||typeof window.addEventListener!="function")){var t=!1,n=Object.defineProperty({},"passive",{get:function(){t=!0}}),r=function(){};return window.addEventListener("testPassiveEventSupport",r,n),window.removeEventListener("testPassiveEventSupport",r,n),t}};function Oge(e){return e===void 0&&(e=0),function(){return++e}}var Pge=Oge(),yx,Ap={},Bb={},kge=["touchstart","touchmove"],Mge="ignore-react-onclickoutside";function VN(e,t){var n=null,r=kge.indexOf(t)!==-1;return r&&yx&&(n={passive:!e.props.preventDefault}),n}function k_(e,t){var n,r,i=e.displayName||e.name||"Component";return r=n=function(o){wge(s,o);function s(l){var c;return c=o.call(this,l)||this,c.__outsideClickHandler=function(f){if(typeof c.__clickOutsideHandlerProp=="function"){c.__clickOutsideHandlerProp(f);return}var h=c.getInstance();if(typeof h.props.handleClickOutside=="function"){h.props.handleClickOutside(f);return}if(typeof h.handleClickOutside=="function"){h.handleClickOutside(f);return}throw new Error("WrappedComponent: "+i+" lacks a handleClickOutside(event) function for processing outside click events.")},c.__getComponentNode=function(){var f=c.getInstance();return t&&typeof t.setClickOutsideRef=="function"?t.setClickOutsideRef()(f):typeof f.setClickOutsideRef=="function"?f.setClickOutsideRef():Za.findDOMNode(f)},c.enableOnClickOutside=function(){if(!(typeof document>"u"||Bb[c._uid])){typeof yx>"u"&&(yx=Tge()),Bb[c._uid]=!0;var f=c.props.eventTypes;f.forEach||(f=[f]),Ap[c._uid]=function(h){if(c.componentNode!==null&&(c.props.preventDefault&&h.preventDefault(),c.props.stopPropagation&&h.stopPropagation(),!(c.props.excludeScrollbar&&Ege(h)))){var p=h.composed&&h.composedPath&&h.composedPath().shift()||h.target;Cge(p,c.componentNode,c.props.outsideClickIgnoreClass)===document&&c.__outsideClickHandler(h)}},f.forEach(function(h){document.addEventListener(h,Ap[c._uid],VN(UN(c),h))})}},c.disableOnClickOutside=function(){delete Bb[c._uid];var f=Ap[c._uid];if(f&&typeof document<"u"){var h=c.props.eventTypes;h.forEach||(h=[h]),h.forEach(function(p){return document.removeEventListener(p,f,VN(UN(c),p))}),delete Ap[c._uid]}},c.getRef=function(f){return c.instanceRef=f},c._uid=Pge(),c}var a=s.prototype;return a.getInstance=function(){if(e.prototype&&!e.prototype.isReactComponent)return this;var c=this.instanceRef;return c.getInstance?c.getInstance():c},a.componentDidMount=function(){if(!(typeof document>"u"||!document.createElement)){var c=this.getInstance();if(t&&typeof t.handleClickOutside=="function"&&(this.__clickOutsideHandlerProp=t.handleClickOutside(c),typeof this.__clickOutsideHandlerProp!="function"))throw new Error("WrappedComponent: "+i+" lacks a function for processing outside click events specified by the handleClickOutside config option.");this.componentNode=this.__getComponentNode(),!this.props.disableOnClickOutside&&this.enableOnClickOutside()}},a.componentDidUpdate=function(){this.componentNode=this.__getComponentNode()},a.componentWillUnmount=function(){this.disableOnClickOutside()},a.render=function(){var c=this.props;c.excludeScrollbar;var f=xge(c,["excludeScrollbar"]);return e.prototype&&e.prototype.isReactComponent?f.ref=this.getRef:f.wrappedRef=this.getRef,f.disableOnClickOutside=this.disableOnClickOutside,f.enableOnClickOutside=this.enableOnClickOutside,H.createElement(e,f)},s}(H.Component),n.displayName="OnClickOutside("+i+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:Mge,preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},r}var tF=H.createContext(),nF=H.createContext();function Rge(e){var t=e.children,n=H.useState(null),r=n[0],i=n[1],o=H.useRef(!1);H.useEffect(function(){return function(){o.current=!0}},[]);var s=H.useCallback(function(a){o.current||i(a)},[]);return H.createElement(tF.Provider,{value:r},H.createElement(nF.Provider,{value:s},t))}var rF=function(t){return Array.isArray(t)?t[0]:t},iF=function(t){if(typeof t=="function"){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=bx(e);if(t){var i=bx(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return jge(this,n)}}function aF(e){return function(t){if(Array.isArray(t))return zb(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 zb(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 zb(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 zb(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(o=Lb(e,t.slice(0,e.length),new Date)),is(o)||(o=new Date(e))),is(o)&&a?o:null)}function is(e,t){return t=t||new Date("1/1/1000"),a8(e)&&!Kr(e,t)}function an(e,t,n){if(n==="en")return _o(e,t,{awareOfUnicodeTokens:!0});var r=As(n);return n&&!r&&console.warn('A locale object was not found for the provided string ["'.concat(n,'"].')),!r&&Ya()&&As(Ya())&&(r=As(Ya())),_o(e,t,{locale:r||null,awareOfUnicodeTokens:!0})}function Ub(e,t){var n=t.dateFormat,r=t.locale;return e&&an(e,Array.isArray(n)?n[0]:n,r)||""}function XN(e,t){var n=t.hour,r=n===void 0?0:n,i=t.minute,o=i===void 0?0:i,s=t.second;return Mf(Rf(Zhe(e,s===void 0?0:s),o),r)}function Vge(e,t){var n=t&&As(t)||Ya()&&As(Ya());return sce(e,n?{locale:n}:null)}function Hge(e,t){return an(e,"ddd",t)}function Wge(e){return Ar(e)}function KE(e,t,n){var r=As(t||Ya());return s8(e,{locale:r,weekStartsOn:n})}function Wa(e){return Wae(e)}function rf(e){return Yae(e)}function Yge(e){return t2(e)}function lF(e,t){return e&&t?Lhe(e,t):!e&&!t}function ys(e,t){return e&&t?Rhe(e,t):!e&&!t}function oy(e,t){return e&&t?Nhe(e,t):!e&&!t}function mr(e,t){return e&&t?$ae(e,t):!e&&!t}function _s(e,t){return e&&t?g8(e,t):!e&&!t}function og(e,t,n){var r,i=Ar(t),o=ll(n);try{r=qc(e,{start:i,end:o})}catch{r=!1}return r}function Ya(){return(typeof window<"u"?window:globalThis).__localeId__}function As(e){if(typeof e=="string"){var t=typeof window<"u"?window:globalThis;return t.__localeData__?t.__localeData__[e]:null}return e}function cF(e,t){return an(qi(pn(),e),"LLLL",t)}function uF(e,t){return an(qi(pn(),e),"LLL",t)}function qge(e,t){return an(nf(pn(),e),"QQQ",t)}function R_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate,i=t.excludeDates,o=t.excludeDateIntervals,s=t.includeDates,a=t.includeDateIntervals,l=t.filterDate;return N_(e,{minDate:n,maxDate:r})||i&&i.some(function(c){return mr(e,c)})||o&&o.some(function(c){var f=c.start,h=c.end;return qc(e,{start:f,end:h})})||s&&!s.some(function(c){return mr(e,c)})||a&&!a.some(function(c){var f=c.start,h=c.end;return qc(e,{start:f,end:h})})||l&&!l(pn(e))||!1}function XE(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.excludeDates,r=t.excludeDateIntervals;return r&&r.length>0?r.some(function(i){var o=i.start,s=i.end;return qc(e,{start:o,end:s})}):n&&n.some(function(i){return mr(e,i)})||!1}function Gge(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate,i=t.excludeDates,o=t.includeDates,s=t.filterDate;return N_(e,{minDate:n,maxDate:r})||i&&i.some(function(a){return ys(e,a)})||o&&!o.some(function(a){return ys(e,a)})||s&&!s(pn(e))||!1}function Zge(e,t,n,r){var i=dt(e),o=cr(e),s=dt(t),a=cr(t),l=dt(r);return i===s&&i===l?o<=n&&n<=a:i=n||li:void 0}function Kge(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate,i=t.excludeDates,o=t.includeDates,s=t.filterDate;return N_(e,{minDate:n,maxDate:r})||i&&i.some(function(a){return oy(e,a)})||o&&!o.some(function(a){return oy(e,a)})||s&&!s(pn(e))||!1}function Xge(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate,i=new Date(e,0,1);return N_(i,{minDate:n,maxDate:r})||!1}function Qge(e,t,n,r){var i=dt(e),o=e2(e),s=dt(t),a=e2(t),l=dt(r);return i===s&&i===l?o<=n&&n<=a:i=n||li:void 0}function N_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate;return n&&Od(e,n)<0||r&&Od(e,r)>0}function QN(e,t){return t.some(function(n){return Ti(n)===Ti(e)&&Oi(n)===Oi(e)})}function JN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.excludeTimes,r=t.includeTimes,i=t.filterTime;return n&&QN(e,n)||r&&!QN(e,r)||i&&!i(e)||!1}function eL(e,t){var n=t.minTime,r=t.maxTime;if(!n||!r)throw new Error("Both minTime and maxTime props required");var i,o=pn(),s=Mf(Rf(o,Oi(e)),Ti(e)),a=Mf(Rf(o,Oi(n)),Ti(n)),l=Mf(Rf(o,Oi(r)),Ti(r));try{i=!qc(s,{start:a,end:l})}catch{i=!1}return i}function tL(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.includeDates,i=kd(e,1);return n&&Pd(n,i)>0||r&&r.every(function(o){return Pd(o,i)>0})||!1}function nL(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.maxDate,r=t.includeDates,i=ro(e,1);return n&&Pd(i,n)>0||r&&r.every(function(o){return Pd(i,o)>0})||!1}function rL(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.includeDates,i=Md(e,1);return n&&gv(n,i)>0||r&&r.every(function(o){return gv(o,i)>0})||!1}function iL(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.maxDate,r=t.includeDates,i=Wc(e,1);return n&&gv(i,n)>0||r&&r.every(function(o){return gv(i,o)>0})||!1}function fF(e){var t=e.minDate,n=e.includeDates;if(n&&t){var r=n.filter(function(i){return Od(i,t)>=0});return tR(r)}return n?tR(n):t}function dF(e){var t=e.maxDate,n=e.includeDates;if(n&&t){var r=n.filter(function(i){return Od(i,t)<=0});return eR(r)}return n?eR(n):t}function oL(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"react-datepicker__day--highlighted",n=new Map,r=0,i=e.length;r1&&arguments[1]!==void 0?arguments[1]:12,n=Math.ceil(dt(e)/t)*t,r=n-(t-1);return{startPeriod:r,endPeriod:n}}function eve(e,t,n,r){for(var i=[],o=0;o<2*t+1;o++){var s=e+t-o,a=!0;n&&(a=dt(n)<=s),r&&a&&(a=dt(r)>=s),a&&i.push(s)}return i}var tve=k_(function(e){Nn(n,V.Component);var t=Ln(n);function n(r){var i;Mn(this,n),ie(ce(i=t.call(this,r)),"renderOptions",function(){var l=i.props.year,c=i.state.yearsList.map(function(p){return V.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(ce(i),p),"aria-selected":l===p?"true":void 0},l===p?V.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",p)}),f=i.props.minDate?dt(i.props.minDate):null,h=i.props.maxDate?dt(i.props.maxDate):null;return h&&i.state.yearsList.find(function(p){return p===h})||c.unshift(V.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:i.incrementYears},V.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),f&&i.state.yearsList.find(function(p){return p===f})||c.push(V.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:i.decrementYears},V.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),c}),ie(ce(i),"onChange",function(l){i.props.onChange(l)}),ie(ce(i),"handleClickOutside",function(){i.props.onCancel()}),ie(ce(i),"shiftYears",function(l){var c=i.state.yearsList.map(function(f){return f+l});i.setState({yearsList:c})}),ie(ce(i),"incrementYears",function(){return i.shiftYears(1)}),ie(ce(i),"decrementYears",function(){return i.shiftYears(-1)});var o=r.yearDropdownItemNumber,s=r.scrollableYearDropdown,a=o||(s?10:5);return i.state={yearsList:eve(i.props.year,a,i.props.minDate,i.props.maxDate)},i.dropdownRef=H.createRef(),i}return Rn(n,[{key:"componentDidMount",value:function(){var r=this.dropdownRef.current;r&&(r.scrollTop=r.scrollHeight/2-r.clientHeight/2)}},{key:"render",value:function(){var r=ge({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return V.createElement("div",{className:r,ref:this.dropdownRef},this.renderOptions())}}]),n}()),nve=function(e){Nn(n,V.Component);var t=Ln(n);function n(){var r;Mn(this,n);for(var i=arguments.length,o=new Array(i),s=0;s0&&arguments[0]!==void 0?arguments[0]:{},l=!1;r.getTabIndex()===0&&!a.isInputFocused&&r.isSameDay(r.props.preSelection)&&(document.activeElement&&document.activeElement!==document.body||(l=!0),r.props.inline&&!r.props.shouldFocusDayInline&&(l=!1),r.props.containerRef&&r.props.containerRef.current&&r.props.containerRef.current.contains(document.activeElement)&&document.activeElement.classList.contains("react-datepicker__day")&&(l=!0)),l&&r.dayEl.current.focus({preventScroll:!0})}),ie(ce(r),"renderDayContents",function(){return r.props.monthShowsDuplicateDaysEnd&&r.isAfterMonth()||r.props.monthShowsDuplicateDaysStart&&r.isBeforeMonth()?null:r.props.renderDayContents?r.props.renderDayContents(lR(r.props.day),r.props.day):lR(r.props.day)}),ie(ce(r),"render",function(){return V.createElement("div",{ref:r.dayEl,className:r.getClassNames(r.props.day),onKeyDown:r.handleOnKeyDown,onClick:r.handleClick,onMouseEnter:r.handleMouseEnter,tabIndex:r.getTabIndex(),"aria-label":r.getAriaLabel(),role:"option","aria-disabled":r.isDisabled(),"aria-current":r.isCurrentDay()?"date":void 0,"aria-selected":r.isSelected()},r.renderDayContents())}),r}return Rn(n,[{key:"componentDidMount",value:function(){this.handleFocusDay()}},{key:"componentDidUpdate",value:function(r){this.handleFocusDay(r)}}]),n}(),cve=function(e){Nn(n,V.Component);var t=Ln(n);function n(){var r;Mn(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=6,m=!l&&!r.isWeekInMonth(h);if(p||m){if(!r.props.peekNextMonth)break;f=!0}}return a}),ie(ce(r),"onMonthClick",function(a,l){r.handleDayClick(Wa(qi(r.props.day,l)),a)}),ie(ce(r),"handleMonthNavigation",function(a,l){r.isDisabled(l)||r.isExcluded(l)||(r.props.setPreSelection(l),r.MONTH_REFS[a].current&&r.MONTH_REFS[a].current.focus())}),ie(ce(r),"onMonthKeyDown",function(a,l){var c=a.key;if(!r.props.disabledKeyboardNavigation)switch(c){case"Enter":r.onMonthClick(a,l),r.props.setPreSelection(r.props.selected);break;case"ArrowRight":r.handleMonthNavigation(l===11?0:l+1,ro(r.props.preSelection,1));break;case"ArrowLeft":r.handleMonthNavigation(l===0?11:l-1,kd(r.props.preSelection,1))}}),ie(ce(r),"onQuarterClick",function(a,l){r.handleDayClick(Yge(nf(r.props.day,l)),a)}),ie(ce(r),"getMonthClassNames",function(a){var l=r.props,c=l.day,f=l.startDate,h=l.endDate,p=l.selected,m=l.minDate,g=l.maxDate,v=l.preSelection,w=l.monthClassName,y=w?w(c):void 0;return ge("react-datepicker__month-text","react-datepicker__month-".concat(a),y,{"react-datepicker__month--disabled":(m||g)&&Gge(qi(c,a),r.props),"react-datepicker__month--selected":r.isSelectedMonth(c,a,p),"react-datepicker__month-text--keyboard-selected":cr(v)===a,"react-datepicker__month--in-range":Zge(f,h,a,c),"react-datepicker__month--range-start":r.isRangeStartMonth(a),"react-datepicker__month--range-end":r.isRangeEndMonth(a),"react-datepicker__month-text--today":r.isCurrentMonth(c,a)})}),ie(ce(r),"getTabIndex",function(a){var l=cr(r.props.preSelection);return r.props.disabledKeyboardNavigation||a!==l?"-1":"0"}),ie(ce(r),"getAriaLabel",function(a){var l=r.props,c=l.chooseDayAriaLabelPrefix,f=c===void 0?"Choose":c,h=l.disabledDayAriaLabelPrefix,p=h===void 0?"Not available":h,m=l.day,g=qi(m,a),v=r.isDisabled(g)||r.isExcluded(g)?p:f;return"".concat(v," ").concat(an(g,"MMMM yyyy"))}),ie(ce(r),"getQuarterClassNames",function(a){var l=r.props,c=l.day,f=l.startDate,h=l.endDate,p=l.selected,m=l.minDate,g=l.maxDate;return ge("react-datepicker__quarter-text","react-datepicker__quarter-".concat(a),{"react-datepicker__quarter--disabled":(m||g)&&Kge(nf(c,a),r.props),"react-datepicker__quarter--selected":r.isSelectedQuarter(c,a,p),"react-datepicker__quarter--in-range":Qge(f,h,a,c),"react-datepicker__quarter--range-start":r.isRangeStartQuarter(a),"react-datepicker__quarter--range-end":r.isRangeEndQuarter(a)})}),ie(ce(r),"renderMonths",function(){var a=r.props,l=a.showFullMonthYearPicker,c=a.showTwoColumnMonthYearPicker,f=a.showFourColumnMonthYearPicker,h=a.locale,p=a.day,m=a.selected;return(f?[[0,1,2,3],[4,5,6,7],[8,9,10,11]]:c?[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]]:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]]).map(function(g,v){return V.createElement("div",{className:"react-datepicker__month-wrapper",key:v},g.map(function(w,y){return V.createElement("div",{ref:r.MONTH_REFS[w],key:y,onClick:function(b){r.onMonthClick(b,w)},onKeyDown:function(b){r.onMonthKeyDown(b,w)},tabIndex:r.getTabIndex(w),className:r.getMonthClassNames(w),role:"option","aria-label":r.getAriaLabel(w),"aria-current":r.isCurrentMonth(p,w)?"date":void 0,"aria-selected":r.isSelectedMonth(p,w,m)},l?cF(w,h):uF(w,h))}))})}),ie(ce(r),"renderQuarters",function(){var a=r.props,l=a.day,c=a.selected;return V.createElement("div",{className:"react-datepicker__quarter-wrapper"},[1,2,3,4].map(function(f,h){return V.createElement("div",{key:h,role:"option",onClick:function(p){r.onQuarterClick(p,f)},className:r.getQuarterClassNames(f),"aria-selected":r.isSelectedQuarter(l,f,c)},qge(f,r.props.locale))}))}),ie(ce(r),"getClassNames",function(){var a=r.props;a.day;var l=a.selectingDate,c=a.selectsStart,f=a.selectsEnd,h=a.showMonthYearPicker,p=a.showQuarterYearPicker;return ge("react-datepicker__month",{"react-datepicker__month--selecting-range":l&&(c||f)},{"react-datepicker__monthPicker":h},{"react-datepicker__quarterPicker":p})}),r}return Rn(n,[{key:"render",value:function(){var r=this.props,i=r.showMonthYearPicker,o=r.showQuarterYearPicker,s=r.day,a=r.ariaLabelPrefix,l=a===void 0?"month ":a;return V.createElement("div",{className:this.getClassNames(),onMouseLeave:this.handleMouseLeave,"aria-label":"".concat(l," ").concat(an(s,"yyyy-MM")),role:"listbox"},i?this.renderMonths():o?this.renderQuarters():this.renderWeeks())}}]),n}(),hF=function(e){Nn(n,V.Component);var t=Ln(n);function n(){var r;Mn(this,n);for(var i=arguments.length,o=new Array(i),s=0;s0&&arguments[0]!==void 0?arguments[0]:{}).className||"").split(/\s+/);return mve.some(function(a){return s.indexOf(a)>=0})})(o.target)&&i.props.onDropdownFocus()}),ie(ce(i),"getDateInView",function(){var o=i.props,s=o.preSelection,a=o.selected,l=o.openToDate,c=fF(i.props),f=dF(i.props),h=pn(),p=l||a||s;return p||(c&&Kr(h,c)?c:f&&Ws(h,f)?f:h)}),ie(ce(i),"increaseMonth",function(){i.setState(function(o){var s=o.date;return{date:ro(s,1)}},function(){return i.handleMonthChange(i.state.date)})}),ie(ce(i),"decreaseMonth",function(){i.setState(function(o){var s=o.date;return{date:kd(s,1)}},function(){return i.handleMonthChange(i.state.date)})}),ie(ce(i),"handleDayClick",function(o,s,a){i.props.onSelect(o,s,a),i.props.setPreSelection&&i.props.setPreSelection(o)}),ie(ce(i),"handleDayMouseEnter",function(o){i.setState({selectingDate:o}),i.props.onDayMouseEnter&&i.props.onDayMouseEnter(o)}),ie(ce(i),"handleMonthMouseLeave",function(){i.setState({selectingDate:null}),i.props.onMonthMouseLeave&&i.props.onMonthMouseLeave()}),ie(ce(i),"handleYearChange",function(o){i.props.onYearChange&&i.props.onYearChange(o),i.props.adjustDateOnChange&&(i.props.onSelect&&i.props.onSelect(o),i.props.setOpen&&i.props.setOpen(!0)),i.props.setPreSelection&&i.props.setPreSelection(o)}),ie(ce(i),"handleMonthChange",function(o){i.props.onMonthChange&&i.props.onMonthChange(o),i.props.adjustDateOnChange&&(i.props.onSelect&&i.props.onSelect(o),i.props.setOpen&&i.props.setOpen(!0)),i.props.setPreSelection&&i.props.setPreSelection(o)}),ie(ce(i),"handleMonthYearChange",function(o){i.handleYearChange(o),i.handleMonthChange(o)}),ie(ce(i),"changeYear",function(o){i.setState(function(s){var a=s.date;return{date:Jv(a,o)}},function(){return i.handleYearChange(i.state.date)})}),ie(ce(i),"changeMonth",function(o){i.setState(function(s){var a=s.date;return{date:qi(a,o)}},function(){return i.handleMonthChange(i.state.date)})}),ie(ce(i),"changeMonthYear",function(o){i.setState(function(s){var a=s.date;return{date:Jv(qi(a,cr(o)),dt(o))}},function(){return i.handleMonthYearChange(i.state.date)})}),ie(ce(i),"header",function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:i.state.date,s=KE(o,i.props.locale,i.props.calendarStartDay),a=[];return i.props.showWeekNumbers&&a.push(V.createElement("div",{key:"W",className:"react-datepicker__day-name"},i.props.weekLabel||"#")),a.concat([0,1,2,3,4,5,6].map(function(l){var c=yl(s,l),f=i.formatWeekday(c,i.props.locale),h=i.props.weekDayClassName?i.props.weekDayClassName(c):void 0;return V.createElement("div",{key:l,className:ge("react-datepicker__day-name",h)},f)}))}),ie(ce(i),"formatWeekday",function(o,s){return i.props.formatWeekDay?function(a,l,c){return l(an(a,"EEEE",c))}(o,i.props.formatWeekDay,s):i.props.useWeekdaysShort?function(a,l){return an(a,"EEE",l)}(o,s):function(a,l){return an(a,"EEEEEE",l)}(o,s)}),ie(ce(i),"decreaseYear",function(){i.setState(function(o){var s=o.date;return{date:Md(s,i.props.showYearPicker?i.props.yearItemNumber:1)}},function(){return i.handleYearChange(i.state.date)})}),ie(ce(i),"renderPreviousButton",function(){if(!i.props.renderCustomHeader){var o;switch(!0){case i.props.showMonthYearPicker:o=rL(i.state.date,i.props);break;case i.props.showYearPicker:o=function(y){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},x=b.minDate,T=b.yearItemNumber,P=T===void 0?12:T,k=Df(rf(Md(y,P)),P).endPeriod,N=x&&dt(x);return N&&N>k||!1}(i.state.date,i.props);break;default:o=tL(i.state.date,i.props)}if((i.props.forceShowMonthNavigation||i.props.showDisabledMonthNavigation||!o)&&!i.props.showTimeSelectOnly){var s=["react-datepicker__navigation","react-datepicker__navigation--previous"],a=i.decreaseMonth;(i.props.showMonthYearPicker||i.props.showQuarterYearPicker||i.props.showYearPicker)&&(a=i.decreaseYear),o&&i.props.showDisabledMonthNavigation&&(s.push("react-datepicker__navigation--previous--disabled"),a=null);var l=i.props.showMonthYearPicker||i.props.showQuarterYearPicker||i.props.showYearPicker,c=i.props,f=c.previousMonthButtonLabel,h=c.previousYearButtonLabel,p=i.props,m=p.previousMonthAriaLabel,g=m===void 0?typeof f=="string"?f:"Previous Month":m,v=p.previousYearAriaLabel,w=v===void 0?typeof h=="string"?h:"Previous Year":v;return V.createElement("button",{type:"button",className:s.join(" "),onClick:a,onKeyDown:i.props.handleOnKeyDown,"aria-label":l?w:g},V.createElement("span",{className:["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"].join(" ")},l?i.props.previousYearButtonLabel:i.props.previousMonthButtonLabel))}}}),ie(ce(i),"increaseYear",function(){i.setState(function(o){var s=o.date;return{date:Wc(s,i.props.showYearPicker?i.props.yearItemNumber:1)}},function(){return i.handleYearChange(i.state.date)})}),ie(ce(i),"renderNextButton",function(){if(!i.props.renderCustomHeader){var o;switch(!0){case i.props.showMonthYearPicker:o=iL(i.state.date,i.props);break;case i.props.showYearPicker:o=function(y){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},x=b.maxDate,T=b.yearItemNumber,P=T===void 0?12:T,k=Df(Wc(y,P),P).startPeriod,N=x&&dt(x);return N&&N0&&arguments[0]!==void 0?arguments[0]:i.state.date,s=["react-datepicker__current-month"];return i.props.showYearDropdown&&s.push("react-datepicker__current-month--hasYearDropdown"),i.props.showMonthDropdown&&s.push("react-datepicker__current-month--hasMonthDropdown"),i.props.showMonthYearDropdown&&s.push("react-datepicker__current-month--hasMonthYearDropdown"),V.createElement("div",{className:s.join(" ")},an(o,i.props.dateFormat,i.props.locale))}),ie(ce(i),"renderYearDropdown",function(){var o=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(i.props.showYearDropdown&&!o)return V.createElement(nve,{adjustDateOnChange:i.props.adjustDateOnChange,date:i.state.date,onSelect:i.props.onSelect,setOpen:i.props.setOpen,dropdownMode:i.props.dropdownMode,onChange:i.changeYear,minDate:i.props.minDate,maxDate:i.props.maxDate,year:dt(i.state.date),scrollableYearDropdown:i.props.scrollableYearDropdown,yearDropdownItemNumber:i.props.yearDropdownItemNumber})}),ie(ce(i),"renderMonthDropdown",function(){var o=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(i.props.showMonthDropdown&&!o)return V.createElement(ive,{dropdownMode:i.props.dropdownMode,locale:i.props.locale,onChange:i.changeMonth,month:cr(i.state.date),useShortMonthInDropdown:i.props.useShortMonthInDropdown})}),ie(ce(i),"renderMonthYearDropdown",function(){var o=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(i.props.showMonthYearDropdown&&!o)return V.createElement(ave,{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})}),ie(ce(i),"renderTodayButton",function(){if(i.props.todayButton&&!i.props.showTimeSelectOnly)return V.createElement("div",{className:"react-datepicker__today-button",onClick:function(o){return i.props.onSelect(Ar(pn()),o)}},i.props.todayButton)}),ie(ce(i),"renderDefaultHeader",function(o){var s=o.monthDate,a=o.i;return V.createElement("div",{className:"react-datepicker__header ".concat(i.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},i.renderCurrentMonth(s),V.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(i.props.dropdownMode),onFocus:i.handleDropdownFocus},i.renderMonthDropdown(a!==0),i.renderMonthYearDropdown(a!==0),i.renderYearDropdown(a!==0)),V.createElement("div",{className:"react-datepicker__day-names"},i.header(s)))}),ie(ce(i),"renderCustomHeader",function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=o.monthDate,a=o.i;if(i.props.showTimeSelect&&!i.state.monthContainer||i.props.showTimeSelectOnly)return null;var l=tL(i.state.date,i.props),c=nL(i.state.date,i.props),f=rL(i.state.date,i.props),h=iL(i.state.date,i.props),p=!i.props.showMonthYearPicker&&!i.props.showQuarterYearPicker&&!i.props.showYearPicker;return V.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:i.props.onDropdownFocus},i.props.renderCustomHeader(qN(qN({},i.state),{},{customHeaderCount:a,monthDate:s,changeMonth:i.changeMonth,changeYear:i.changeYear,decreaseMonth:i.decreaseMonth,increaseMonth:i.increaseMonth,decreaseYear:i.decreaseYear,increaseYear:i.increaseYear,prevMonthButtonDisabled:l,nextMonthButtonDisabled:c,prevYearButtonDisabled:f,nextYearButtonDisabled:h})),p&&V.createElement("div",{className:"react-datepicker__day-names"},i.header(s)))}),ie(ce(i),"renderYearHeader",function(){var o=i.state.date,s=i.props,a=s.showYearPicker,l=Df(o,s.yearItemNumber),c=l.startPeriod,f=l.endPeriod;return V.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},a?"".concat(c," - ").concat(f):dt(o))}),ie(ce(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)}}),ie(ce(i),"renderMonths",function(){if(!i.props.showTimeSelectOnly&&!i.props.showYearPicker){for(var o=[],s=i.props.showPreviousMonths?i.props.monthsShown-1:0,a=kd(i.state.date,s),l=0;l0;o.push(V.createElement("div",{key:h,ref:function(g){i.monthContainer=g},className:"react-datepicker__month-container"},i.renderHeader({monthDate:f,i:l}),V.createElement(fve,{chooseDayAriaLabelPrefix:i.props.chooseDayAriaLabelPrefix,disabledDayAriaLabelPrefix:i.props.disabledDayAriaLabelPrefix,weekAriaLabelPrefix:i.props.weekAriaLabelPrefix,ariaLabelPrefix:i.props.monthAriaLabelPrefix,onChange:i.changeMonthYear,day:f,dayClassName:i.props.dayClassName,calendarStartDay:i.props.calendarStartDay,monthClassName:i.props.monthClassName,onDayClick:i.handleDayClick,handleOnKeyDown:i.props.handleOnDayKeyDown,onDayMouseEnter:i.handleDayMouseEnter,onMouseLeave:i.handleMonthMouseLeave,onWeekSelect:i.props.onWeekSelect,orderInDisplay:l,formatWeekNumber:i.props.formatWeekNumber,locale:i.props.locale,minDate:i.props.minDate,maxDate:i.props.maxDate,excludeDates:i.props.excludeDates,excludeDateIntervals:i.props.excludeDateIntervals,highlightDates:i.props.highlightDates,selectingDate:i.state.selectingDate,includeDates:i.props.includeDates,includeDateIntervals:i.props.includeDateIntervals,inline:i.props.inline,shouldFocusDayInline:i.props.shouldFocusDayInline,fixedHeight:i.props.fixedHeight,filterDate:i.props.filterDate,preSelection:i.props.preSelection,setPreSelection:i.props.setPreSelection,selected:i.props.selected,selectsStart:i.props.selectsStart,selectsEnd:i.props.selectsEnd,selectsRange:i.props.selectsRange,selectsDisabledDaysInRange:i.props.selectsDisabledDaysInRange,showWeekNumbers:i.props.showWeekNumbers,startDate:i.props.startDate,endDate:i.props.endDate,peekNextMonth:i.props.peekNextMonth,setOpen:i.props.setOpen,shouldCloseOnSelect:i.props.shouldCloseOnSelect,renderDayContents:i.props.renderDayContents,disabledKeyboardNavigation:i.props.disabledKeyboardNavigation,showMonthYearPicker:i.props.showMonthYearPicker,showFullMonthYearPicker:i.props.showFullMonthYearPicker,showTwoColumnMonthYearPicker:i.props.showTwoColumnMonthYearPicker,showFourColumnMonthYearPicker:i.props.showFourColumnMonthYearPicker,showYearPicker:i.props.showYearPicker,showQuarterYearPicker:i.props.showQuarterYearPicker,isInputFocused:i.props.isInputFocused,containerRef:i.containerRef,monthShowsDuplicateDaysEnd:p,monthShowsDuplicateDaysStart:m})))}return o}}),ie(ce(i),"renderYears",function(){if(!i.props.showTimeSelectOnly)return i.props.showYearPicker?V.createElement("div",{className:"react-datepicker__year--container"},i.renderHeader(),V.createElement(dve,M_({onDayClick:i.handleDayClick,date:i.state.date},i.props))):void 0}),ie(ce(i),"renderTimeSection",function(){if(i.props.showTimeSelect&&(i.state.monthContainer||i.props.showTimeSelectOnly))return V.createElement(hF,{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})}),ie(ce(i),"renderInputTimeSection",function(){var o=new Date(i.props.selected),s=is(o)&&i.props.selected?"".concat(sL(o.getHours()),":").concat(sL(o.getMinutes())):"";if(i.props.showTimeInput)return V.createElement(hve,{date:o,timeString:s,timeInputLabel:i.props.timeInputLabel,onChange:i.props.onTimeChange,customTimeInput:i.props.customTimeInput})}),i.containerRef=V.createRef(),i.state={date:i.getDateInView(),selectingDate:null,monthContainer:null},i}return Rn(n,[{key:"componentDidMount",value:function(){var r=this;this.props.showTimeSelect&&(this.assignMonthContainer=void r.setState({monthContainer:r.monthContainer}))}},{key:"componentDidUpdate",value:function(r){this.props.preSelection&&!mr(this.props.preSelection,r.preSelection)?this.setState({date:this.props.preSelection}):this.props.openToDate&&!mr(this.props.openToDate,r.openToDate)&&this.setState({date:this.props.openToDate})}},{key:"render",value:function(){var r=this.props.container||pve;return V.createElement("div",{ref:this.containerRef},V.createElement(r,{className:ge("react-datepicker",this.props.className,{"react-datepicker--time-only":this.props.showTimeSelectOnly}),showPopperArrow:this.props.showPopperArrow,arrowProps:this.props.arrowProps},this.renderPreviousButton(),this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.props.children))}}],[{key:"defaultProps",get:function(){return{onDropdownFocus:function(){},monthsShown:1,monthSelectedIn:0,forceShowMonthNavigation:!1,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",customTimeInput:null,yearItemNumber:12}}}]),n}(),pF=function(e){Nn(n,V.Component);var t=Ln(n);function n(r){var i;return Mn(this,n),(i=t.call(this,r)).el=document.createElement("div"),i}return Rn(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 Ua.createPortal(this.props.children,this.el)}}]),n}(),vve=function(e){return!e.disabled&&e.tabIndex!==-1},yve=function(e){Nn(n,V.Component);var t=Ln(n);function n(r){var i;return Mn(this,n),ie(ce(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(vve)}),ie(ce(i),"handleFocusStart",function(o){var s=i.getTabChildren();s&&s.length>1&&s[s.length-1].focus()}),ie(ce(i),"handleFocusEnd",function(o){var s=i.getTabChildren();s&&s.length>1&&s[0].focus()}),i.tabLoopRef=V.createRef(),i}return Rn(n,[{key:"render",value:function(){return this.props.enableTabLoop?V.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},V.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:"0",onFocus:this.handleFocusStart}),this.props.children,V.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:"0",onFocus:this.handleFocusEnd})):this.props.children}}],[{key:"defaultProps",get:function(){return{enableTabLoop:!0}}}]),n}(),_ve=function(e){Nn(n,V.Component);var t=Ln(n);function n(){return Mn(this,n),t.apply(this,arguments)}return Rn(n,[{key:"render",value:function(){var r,i=this.props,o=i.className,s=i.wrapperClassName,a=i.hidePopper,l=i.popperComponent,c=i.popperModifiers,f=i.popperPlacement,h=i.popperProps,p=i.targetComponent,m=i.enableTabLoop,g=i.popperOnKeyDown,v=i.portalId,w=i.portalHost;if(!a){var y=ge("react-datepicker-popper",o);r=V.createElement(Fge,M_({modifiers:c,placement:f},h),function(x){var T=x.ref,P=x.style,k=x.placement,N=x.arrowProps;return V.createElement(yve,{enableTabLoop:m},V.createElement("div",{ref:T,style:P,className:y,"data-placement":k,onKeyDown:g},V.cloneElement(l,{arrowProps:N})))})}this.props.popperContainer&&(r=V.createElement(this.props.popperContainer,{},r)),v&&!a&&(r=V.createElement(pF,{portalId:v,portalHost:w},r));var b=ge("react-datepicker-wrapper",s);return V.createElement(Rge,{className:"react-datepicker-manager"},V.createElement($ge,null,function(x){var T=x.ref;return V.createElement("div",{ref:T,className:b},p)}),r)}}],[{key:"defaultProps",get:function(){return{hidePopper:!0,popperModifiers:[],popperProps:{},popperPlacement:"bottom-start"}}}]),n}(),bve=k_(gve),wve=function(e){Nn(n,V.Component);var t=Ln(n);function n(r){var i;return Mn(this,n),ie(ce(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:pn()}),ie(ce(i),"calcInitialState",function(){var o,s=i.getPreSelection(),a=fF(i.props),l=dF(i.props),c=a&&Kr(s,Ar(a))?a:l&&Ws(s,ll(l))?l:s;return{open:i.props.startOpen||!1,preventFocus:!1,preSelection:(o=i.props.selectsRange?i.props.startDate:i.props.selected)!==null&&o!==void 0?o:c,highlightDates:oL(i.props.highlightDates),focused:!1,shouldFocusDayInline:!1}}),ie(ce(i),"clearPreventFocusTimeout",function(){i.preventFocusTimeout&&clearTimeout(i.preventFocusTimeout)}),ie(ce(i),"setFocus",function(){i.input&&i.input.focus&&i.input.focus({preventScroll:!0})}),ie(ce(i),"setBlur",function(){i.input&&i.input.blur&&i.input.blur(),i.cancelFocusInput()}),ie(ce(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:Vb},function(){o||i.setState(function(a){return{focused:!!s&&a.focused}},function(){!s&&i.setBlur(),i.setState({inputValue:null})})})}),ie(ce(i),"inputOk",function(){return NE(i.state.preSelection)}),ie(ce(i),"isCalendarOpen",function(){return i.props.open===void 0?i.state.open&&!i.props.disabled&&!i.props.readOnly:i.props.open}),ie(ce(i),"handleFocus",function(o){i.state.preventFocus||(i.props.onFocus(o),i.props.preventOpenOnFocus||i.props.readOnly||i.setOpen(!0)),i.setState({focused:!0})}),ie(ce(i),"cancelFocusInput",function(){clearTimeout(i.inputFocusTimeout),i.inputFocusTimeout=null}),ie(ce(i),"deferFocusInput",function(){i.cancelFocusInput(),i.inputFocusTimeout=setTimeout(function(){return i.setFocus()},1)}),ie(ce(i),"handleDropdownFocus",function(){i.cancelFocusInput()}),ie(ce(i),"handleBlur",function(o){(!i.state.open||i.props.withPortal||i.props.showTimeInput)&&i.props.onBlur(o),i.setState({focused:!1})}),ie(ce(i),"handleCalendarClickOutside",function(o){i.props.inline||i.setOpen(!1),i.props.onClickOutside(o),i.props.withPortal&&o.preventDefault()}),ie(ce(i),"handleChange",function(){for(var o=arguments.length,s=new Array(o),a=0;a{const{className:t,isClearable:n,selected:r,dateFormat:i}=e,o=!n||Bo(r),s=H.useRef();return U("div",{className:"icon-input-container",children:[C(wve,{...e,popperModifiers:[{name:"arrow",options:{padding:24}}],dateFormat:i??Nf,className:ge("icon-input-container__input form-control",t),ref:s}),o&&C(Fe,{icon:Mpe,className:"icon-input-container__icon",onClick:()=>{var a;return(a=s.current)==null?void 0:a.input.focus()}})]})},Sve=e=>C(wx,{...e,dateFormat:VE,showTimeSelect:!0,timeIntervals:10});const Cve=({icon:e,className:t,...n})=>{const r=vl(),i=ge("icon-input-container__input",t);return U("div",{className:"icon-input-container",children:[C(Vc,{className:i,innerRef:r,...n}),C(Fe,{icon:e,fixedWidth:!0,className:"icon-input-container__icon",onClick:()=>{var o;return(o=r.current)==null?void 0:o.focus()}})]})},Hb=({children:e,infoTooltip:t,checked:n,onChange:r})=>U("p",{children:[C(eF,{inline:!0,checked:n,className:t?"me-2":"",onChange:r,children:e}),t&&C(ig,{placement:"right",children:t})]});const Eve=({isOpen:e,toggle:t})=>U(Ho,{isOpen:e,toggle:t,centered:!0,size:"lg",children:[C(oo,{toggle:t,children:"Info"}),U(Ri,{children:[U("p",{children:["When the ",C("b",{children:C("i",{children:'"Use existing URL if found"'})})," checkbox is checked, the server will return an existing short URL if it matches provided params."]}),C("p",{children:"These are the checks performed by Shlink in order to determine if an existing short URL should be returned:"}),U("ul",{children:[C("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."}),U("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.",C("br",{}),"If the slug is being used by another long URL, an error will be returned."]}),C("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"})]})]})]}),Tve=()=>{const[e,t]=$t();return U(We,{children:[C("span",{title:"What does this mean?",children:C(Fe,{icon:xC,style:{cursor:"pointer"},onClick:t})}),C(Eve,{isOpen:e,toggle:t})]})};const Ove=Wn(DZ,CZ(/ /g,"-")),Wb=e=>typeof e=="string"?Io(e):e,Pve=(e,t)=>({mode:n,saving:r,onSave:i,initialState:o,selectedServer:s})=>{const[a,l]=H.useState(o),c=()=>l(o),f=Mi("deviceLongUrls",s),h=n==="edit",p=n==="create-basic",m=P=>l({...a,tags:P.map(Ove)}),g=(P,k)=>yi(P)?P:yi(k)?null:void 0,v=oh(async()=>i({...a,validSince:qs(a.validSince)??null,validUntil:qs(a.validUntil)??null,maxVisits:yi(a.maxVisits)?Number(a.maxVisits):null}).then(()=>!h&&c()).catch(()=>{}));H.useEffect(()=>{l(o)},[o]);const w=(P,k,N="text",D={},z={})=>C(yr,{...z,children:C(Vc,{id:P,type:N,placeholder:k,value:a[P]??"",onChange:D.onChange??(A=>l({...a,[P]:A.target.value})),...D})}),y=(P,k,N)=>{var D;return C(Cve,{icon:N,id:P,type:"url",placeholder:k,value:((D=a.deviceLongUrls)==null?void 0:D[P])??"",onChange:z=>{var A;return l({...a,deviceLongUrls:{...a.deviceLongUrls??{},[P]:g(z.target.value,(A=o.deviceLongUrls)==null?void 0:A[P])}})}})},b=(P,k,N={})=>C(Sve,{selected:a[P]?Wb(a[P]):null,placeholderText:k,isClearable:!0,onChange:D=>l({...a,[P]:D}),...N}),x=U(We,{children:[C(yr,{children:C(Vc,{bsSize:"lg",type:"url",placeholder:"URL to be shortened",required:!0,value:a.longUrl,onChange:P=>l({...a,longUrl:P.target.value})})}),U(Jn,{children:[p&&w("customSlug","Custom slug","text",{bsSize:"lg"},{className:"col-lg-6"}),C("div",{className:p?"col-lg-6 mb-3":"col-12",children:C(e,{selectedTags:a.tags??[],onChange:m})})]})]}),T=Mi("forwardQuery",s);return U("form",{name:"shortUrlForm",className:"short-url-form",onSubmit:v,children:[p&&x,!p&&U(We,{children:[U(Jn,{children:[C("div",{className:ge("mb-3",{"col-sm-6":f,"col-12":!f}),children:C(fn,{title:"Main options",className:"mb-3",children:x})}),f&&C("div",{className:"col-sm-6 mb-3",children:U(fn,{title:"Device-specific long URLs",children:[C(yr,{children:y("android","Android-specific redirection",bge)}),C(yr,{children:y("ios","iOS-specific redirection",_ge)}),y("desktop","Desktop-specific redirection",jQ)]})})]}),U(Jn,{children:[C("div",{className:"col-sm-6 mb-3",children:U(fn,{title:"Customize the short URL",children:[w("title","Title","text",{onChange:({target:P})=>l({...a,title:g(P.value,o.title)})}),!h&&U(We,{children:[U(Jn,{children:[C("div",{className:"col-lg-6",children:w("customSlug","Custom slug","text",{disabled:yi(a.shortCodeLength)})}),C("div",{className:"col-lg-6",children:w("shortCodeLength","Short code length","number",{min:4,disabled:yi(a.customSlug)})})]}),C(t,{value:a.domain,onChange:P=>l({...a,domain:P})})]})]})}),C("div",{className:"col-sm-6 mb-3",children:U(fn,{title:"Limit access to the short URL",children:[w("maxVisits","Maximum number of visits allowed","number",{min:1}),C("div",{className:"mb-3",children:b("validSince","Enabled since...",{maxDate:a.validUntil?Wb(a.validUntil):void 0})}),b("validUntil","Enabled until...",{minDate:a.validSince?Wb(a.validSince):void 0})]})})]}),U(Jn,{children:[C("div",{className:"col-sm-6 mb-3",children:U(fn,{title:"Extra checks",children:[C(Hb,{infoTooltip:"If checked, Shlink will try to reach the long URL, failing in case it's not publicly accessible.",checked:a.validateUrl,onChange:P=>l({...a,validateUrl:P}),children:"Validate URL"}),!h&&U("p",{children:[C(eF,{inline:!0,className:"me-2",checked:a.findIfExists,onChange:P=>l({...a,findIfExists:P}),children:"Use existing URL if found"}),C(Tve,{})]})]})}),C("div",{className:"col-sm-6 mb-3",children:U(fn,{title:"Configure behavior",children:[C(Hb,{infoTooltip:"This short URL will be included in the robots.txt for your Shlink instance, allowing web crawlers (like Google) to index it.",checked:a.crawlable,onChange:P=>l({...a,crawlable:P}),children:"Make it crawlable"}),T&&C(Hb,{infoTooltip:"When this short URL is visited, any query params appended to it will be forwarded to the long URL.",checked:a.forwardQuery,onChange:P=>l({...a,forwardQuery:P}),children:"Forward query params on redirect"})]})})]})]}),C("div",{className:"text-center",children:C(ht,{outline:!0,color:"primary",disabled:r||Cr(a.longUrl),className:"btn-xs-block",children:r?"Saving...":"Save"})})]})},kve=({startDate:e=null,endDate:t=null,disabled:n=!1,onStartDateChange:r,onEndDateChange:i})=>U("div",{className:"row",children:[C("div",{className:"col-md-6",children:C(wx,{selected:e,placeholderText:"Since...",isClearable:!0,maxDate:t??void 0,disabled:n,onChange:r})}),C("div",{className:"col-md-6",children:C(wx,{className:"mt-2 mt-md-0",selected:t,placeholderText:"Until...",isClearable:!0,minDate:e??void 0,disabled:n,onChange:o=>i(o&&ll(o))})})]}),mF=({onDatesChange:e,initialDateRange:t,defaultText:n,disabled:r,updatable:i=!1})=>{const o=ty(t),[s,a]=H.useState(o?t:void 0),[l,c]=H.useState(o?void 0:t),f=p=>{a(P8(p)?lh:void 0),c(p),e(p)},h=p=>{a(p),c(void 0),e(M8(p))};return i&&Toe(()=>{const p=ty(t);p&&h(t),t&&!p&&f(t)},[t]),U(oa,{disabled:r,text:WE(s??l)??n,children:[C(H8,{allText:n,active:s,onChange:h}),C(Ve,{divider:!0}),C(Ve,{header:!0,children:"Custom:"}),C(Ve,{text:!0,children:C(kve,{...l,onStartDateChange:p=>f({...l,startDate:p}),onEndDateChange:p=>f({...l,endDate:p})})})]})},Mve=({onChange:e,selected:t={},className:n,supportsDisabledFiltering:r})=>{const{excludeBots:i=!1,excludeMaxVisitsReached:o=!1,excludePastValidUntil:s=!1}=t,a=l=>()=>e({...t,[l]:!(t!=null&&t[l])});return U(oa,{text:"Filters",dropdownClassName:n,className:"me-3",right:!0,minWidth:250,children:[C(Ve,{header:!0,children:"Visits:"}),C(Ve,{active:i,onClick:a("excludeBots"),children:"Ignore visits from bots"}),r&&U(We,{children:[C(Ve,{divider:!0}),C(Ve,{header:!0,children:"Short URLs:"}),C(Ve,{active:o,onClick:a("excludeMaxVisitsReached"),children:"Exclude with visits reached"}),C(Ve,{active:s,onClick:a("excludePastValidUntil"),children:"Exclude enabled in the past"})]}),C(Ve,{divider:!0}),C(Ve,{disabled:!yi(t),onClick:()=>e({excludeBots:!1,excludeMaxVisitsReached:!1,excludePastValidUntil:!1}),children:C("i",{children:"Clear filters"})})]})};const Rve=(e,t)=>({selectedServer:n,className:r,shortUrlsAmount:i,order:o,handleOrderBy:s,settings:a})=>{var D;const[l,c]=P_(),{search:f,tags:h,startDate:p,endDate:m,excludeBots:g,excludeMaxVisitsReached:v,excludePastValidUntil:w,tagsMode:y="any"}=l,b=Mi("filterDisabledUrls",n),x=Wn(({startDate:z,endDate:A})=>({startDate:qs(z)??void 0,endDate:qs(A)??void 0}),c),T=Wn(z=>Cr(z)?void 0:z,z=>c({search:z})),P=z=>c({tags:z}),k=Mi("allTagsFiltering",n),N=Wn(()=>y==="any"?"all":"any",z=>c({tagsMode:z}));return U("div",{className:ge("short-urls-filtering-bar-container",r),children:[C(sh,{initialValue:f,onChange:T}),U(eh,{className:"mt-3",children:[C(t,{allowNew:!1,placeholder:"With tags...",selectedTags:h,onChange:P}),k&&h.length>1&&U(We,{children:[C(ht,{outline:!0,color:"secondary",onClick:N,id:"tagsModeBtn","aria-label":"Change tags mode",children:C(Fe,{className:"short-urls-filtering-bar__tags-icon",icon:y==="all"?n6:hQ})}),C(Or,{target:"tagsModeBtn",placement:"left",children:y==="all"?"With all the tags.":"With any of the tags."})]})]}),U(Jn,{className:"flex-lg-row-reverse",children:[C("div",{className:"col-lg-8 col-xl-6 mt-3",children:U("div",{className:"d-md-flex",children:[C("div",{className:"flex-fill",children:C(mF,{defaultText:"All short URLs",initialDateRange:k8(p,m),onDatesChange:x})}),C(Mve,{className:"ms-0 ms-md-2 mt-3 mt-md-0",selected:{excludeBots:g??((D=a.visits)==null?void 0:D.excludeBots),excludeMaxVisitsReached:v,excludePastValidUntil:w},onChange:c,supportsDisabledFiltering:b})]})}),C("div",{className:"col-6 col-lg-4 col-xl-6 mt-3",children:C(e,{amount:i})}),C("div",{className:"col-6 d-lg-none mt-3",children:C(hh,{prefixed:!1,items:U8,order:o,onChange:s})})]})]})};function Af({currentOrder:e,field:t,className:n="ms-1"}){return!e.dir||e.field!==t?null:C(Fe,{icon:e.dir==="ASC"?oQ:vQ,className:n})}const Bl=2,xx="...",gF=(e,t)=>{const n=uC(SI(Bl,e-Bl),DI(t-1,e+Bl)+1);return e-Bl>Bl&&n.unshift(xx),e+Ble===xx,vF=e=>Rd(e)?e:bn(e),yF=(e,t)=>Rd(e)?`${e}_${t}`:`${e}`,Nve=({paginator:e,serverId:t,currentQueryString:n=""})=>{const{currentPage:r=0,pagesCount:i=0}=e??{},o=a=>`/server/${t}/list-short-urls/${a}${n}`;if(i<=1)return C("div",{className:"pb-3"});const s=()=>gF(r,i).map((a,l)=>C(Ns,{disabled:Rd(a),active:r===a,children:C(Ls,{tag:At,to:o(a),children:vF(a)})},yF(a,l)));return U(x_,{className:"sticky-card-paginator py-3",listClassName:"flex-wrap justify-content-center mb-0",children:[C(Ns,{disabled:r===1,children:C(Ls,{previous:!0,tag:At,to:o(r-1)})}),s(),C(Ns,{disabled:r>=i,children:C(Ls,{next:!0,tag:At,to:o(r+1)})})]})},Lve=(e,t)=>sa(({listShortUrls:n,shortUrlsList:r,selectedServer:i,settings:o})=>{var K,te,oe;const s=Vd(i),{page:a}=Js(),l=kn(),[c,f]=P_(),{tags:h,search:p,startDate:m,endDate:g,orderBy:v,tagsMode:w,excludeBots:y,excludePastValidUntil:b,excludeMaxVisitsReached:x}=c,[T,P]=H.useState(v??((K=o.shortUrlsList)==null?void 0:K.defaultOrdering)??qE),{pagination:k}=(r==null?void 0:r.shortUrls)??{},N=y??((te=o.visits)==null?void 0:te.excludeBots),D=Mi("excludeBotsOnShortUrls",i),z=(se,Z)=>{f({orderBy:{field:se,dir:Z}}),P({field:se,dir:Z})},A=se=>()=>z(se,o_(se,T.field,T.dir)),Y=se=>C(Af,{currentOrder:T,field:se}),q=Wn(se=>[...new Set([...h,se])],se=>f({tags:se})),ee=({field:se,dir:Z})=>D&&N&&se==="visits"?{field:"nonBotVisits",dir:Z}:{field:se,dir:Z};return H.useEffect(()=>{n({page:a,searchTerm:p,tags:h,startDate:m,endDate:g,orderBy:ee(T),tagsMode:w,excludePastValidUntil:b,excludeMaxVisitsReached:x})},[a,p,h,m,g,T.field,T.dir,w,b,x]),U(We,{children:[C(t,{selectedServer:i,shortUrlsAmount:(oe=r.shortUrls)==null?void 0:oe.pagination.totalItems,order:T,handleOrderBy:z,settings:o,className:"mb-3"}),U(Er,{body:!0,className:"pb-0",children:[C(e,{selectedServer:i,shortUrlsList:r,orderByColumn:A,renderOrderIcon:Y,onTagClick:q}),C(Nve,{paginator:k,serverId:s,currentQueryString:l.search})]})]})},()=>[Jr.visits]);const Dve=e=>({orderByColumn:t,renderOrderIcon:n,shortUrlsList:r,onTagClick:i,selectedServer:o,className:s})=>{const{error:a,loading:l,shortUrls:c}=r,f=ge({"short-urls-table__header-cell--with-action":!!t}),h=ge("short-urls-table__header-cell",f),p=ge("table table-hover responsive-table short-urls-table",s),m=()=>a?C("tr",{children:C("td",{colSpan:6,className:"text-center table-danger text-dark",children:"Something went wrong while loading short URLs :("})}):l?C("tr",{children:C("td",{colSpan:6,className:"text-center",children:"Loading..."})}):!l&&Cr(c==null?void 0:c.data)?C("tr",{children:C("td",{colSpan:6,className:"text-center",children:"No results found"})}):c==null?void 0:c.data.map(g=>C(e,{shortUrl:g,selectedServer:o,onTagClick:i},g.shortUrl));return U("table",{className:p,children:[C("thead",{className:"responsive-table__header short-urls-table__header",children:U("tr",{children:[U("th",{className:h,onClick:t==null?void 0:t("dateCreated"),children:["Created at ",n==null?void 0:n("dateCreated")]}),U("th",{className:h,onClick:t==null?void 0:t("shortCode"),children:["Short URL ",n==null?void 0:n("shortCode")]}),U("th",{className:"short-urls-table__header-cell",children:[U("span",{className:f,onClick:t==null?void 0:t("title"),children:["Title ",n==null?void 0:n("title")]}),"  /  ",U("span",{className:f,onClick:t==null?void 0:t("longUrl"),children:[C("span",{className:"indivisible",children:"Long URL"})," ",n==null?void 0:n("longUrl")]})]}),C("th",{className:"short-urls-table__header-cell",children:"Tags"}),C("th",{className:h,onClick:t==null?void 0:t("visits"),children:U("span",{className:"indivisible",children:["Visits ",n==null?void 0:n("visits")]})}),C("th",{className:"short-urls-table__header-cell",colSpan:2})]})}),C("tbody",{children:m()})]})},Ave=(e,t)=>{e.serviceFactory("ShortUrlsList",Lve,"ShortUrlsTable","ShortUrlsFilteringBar"),e.decorator("ShortUrlsList",t(["selectedServer","mercureInfo","shortUrlsList","settings"],["listShortUrls","createNewVisits","loadMercureInfo"])),e.serviceFactory("ShortUrlsTable",Dve,"ShortUrlsRow"),e.serviceFactory("ShortUrlsRow",fge,"ShortUrlsRowMenu","ColorGenerator","useTimeoutToggle"),e.decorator("ShortUrlsRow",t(["settings"])),e.serviceFactory("ShortUrlsRowMenu",dge,"DeleteShortUrlModal","QrCodeModal"),e.serviceFactory("CreateShortUrlResult",ege,"useTimeoutToggle"),e.serviceFactory("ShortUrlForm",Pve,"TagsSelector","DomainSelector"),e.serviceFactory("CreateShortUrl",Ame,"ShortUrlForm","CreateShortUrlResult"),e.decorator("CreateShortUrl",t(["shortUrlCreation","selectedServer","settings"],["createShortUrl","resetCreateShortUrl"])),e.serviceFactory("EditShortUrl",Ime,"ShortUrlForm"),e.decorator("EditShortUrl",t(["shortUrlDetail","shortUrlEdition","selectedServer","settings"],["getShortUrlDetail","editShortUrl"])),e.serviceFactory("DeleteShortUrlModal",()=>tge),e.decorator("DeleteShortUrlModal",t(["shortUrlDeletion"],["deleteShortUrl","shortUrlDeleted","resetDeleteShortUrl"])),e.serviceFactory("QrCodeModal",sge,"ImageDownloader"),e.decorator("QrCodeModal",t(["selectedServer"])),e.serviceFactory("ShortUrlsFilteringBar",Rve,"ExportShortUrlsBtn","TagsSelector"),e.serviceFactory("ExportShortUrlsBtn",nge,"buildShlinkApiClient","ReportExporter"),e.decorator("ExportShortUrlsBtn",t(["selectedServer"])),e.serviceFactory("shortUrlsListReducerCreator",zpe,"listShortUrls","editShortUrl","createShortUrl"),e.serviceFactory("shortUrlsListReducer",St("reducer"),"shortUrlsListReducerCreator"),e.serviceFactory("shortUrlCreationReducerCreator",pge,"createShortUrl"),e.serviceFactory("shortUrlCreationReducer",St("reducer"),"shortUrlCreationReducerCreator"),e.serviceFactory("shortUrlEditionReducerCreator",yge,"editShortUrl"),e.serviceFactory("shortUrlEditionReducer",St("reducer"),"shortUrlEditionReducerCreator"),e.serviceFactory("shortUrlDeletionReducerCreator",$pe,"deleteShortUrl"),e.serviceFactory("shortUrlDeletionReducer",St("reducer"),"shortUrlDeletionReducerCreator"),e.serviceFactory("shortUrlDetailReducerCreator",mge,"buildShlinkApiClient"),e.serviceFactory("shortUrlDetailReducer",St("reducer"),"shortUrlDetailReducerCreator"),e.serviceFactory("listShortUrls",Bpe,"buildShlinkApiClient"),e.serviceFactory("createShortUrl",hge,"buildShlinkApiClient"),e.serviceFactory("resetCreateShortUrl",St("resetCreateShortUrl"),"shortUrlCreationReducerCreator"),e.serviceFactory("deleteShortUrl",Fpe,"buildShlinkApiClient"),e.serviceFactory("resetDeleteShortUrl",St("resetDeleteShortUrl"),"shortUrlDeletionReducerCreator"),e.serviceFactory("shortUrlDeleted",()=>I8),e.serviceFactory("getShortUrlDetail",St("getShortUrlDetail"),"shortUrlDetailReducerCreator"),e.serviceFactory("editShortUrl",vge,"buildShlinkApiClient")},Ive=({tag:e,toggle:t,isOpen:n,deleteTag:r,tagDelete:i,tagDeleted:o})=>{const{deleting:s,error:a,deleted:l,errorData:c}=i;return U(Ho,{toggle:t,isOpen:n,centered:!0,onClosed:()=>l&&o(e),children:[C(oo,{toggle:t,className:"text-danger",children:"Delete tag"}),U(Ri,{children:["Are you sure you want to delete tag ",C("b",{children:e}),"?",a&&C(Dr,{type:"error",small:!0,className:"mt-2",children:C(Ao,{errorData:c,fallbackMessage:"Something went wrong while deleting the tag :("})})]}),U(ra,{children:[C(ht,{color:"link",onClick:t,children:"Cancel"}),C(ht,{color:"danger",disabled:s,onClick:async()=>{await r(e),t()},children:s?"Deleting tag...":"Delete tag"})]})]})};function L_(){return(L_=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function Sx(e){var t=H.useRef(e),n=H.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var Nd=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:w.buttons>0)&&i.current?o(aL(i.current,w,a.current)):v(!1)},g=function(){return v(!1)};function v(w){var y=l.current,b=Cx(i.current),x=w?b.addEventListener:b.removeEventListener;x(y?"touchmove":"mousemove",m),x(y?"touchend":"mouseup",g)}return[function(w){var y=w.nativeEvent,b=i.current;if(b&&(lL(y),!function(T,P){return P&&!If(T)}(y,l.current)&&b)){if(If(y)){l.current=!0;var x=y.changedTouches||[];x.length&&(a.current=x[0].identifier)}b.focus(),o(aL(b,y,a.current)),v(!0)}},function(w){var y=w.which||w.keyCode;y<37||y>40||(w.preventDefault(),s({left:y===39?.05:y===37?-.05:0,top:y===40?.05:y===38?-.05:0}))},v]},[s,o]),f=c[0],h=c[1],p=c[2];return H.useEffect(function(){return p},[p]),V.createElement("div",L_({},r,{onTouchStart:f,onMouseDown:f,className:"react-colorful__interactive",ref:i,onKeyDown:h,tabIndex:0,role:"slider"}))}),QE=function(e){return e.filter(Boolean).join(" ")},wF=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=QE(["react-colorful__pointer",e.className]);return V.createElement("div",{className:o,style:{top:100*i+"%",left:100*n+"%"}},V.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},Vn=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},Fve=function(e){return Uve(Ex(e))},Ex=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?Vn(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?Vn(parseInt(e.substring(6,8),16)/255,2):1}},$ve=function(e){return zve(Bve(e))},jve=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:Vn(e.h),s:Vn(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:Vn(i/2),a:Vn(r,2)}},Tx=function(e){var t=jve(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},Bve=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),s=r*(1-n),a=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),c=o%6;return{r:Vn(255*[r,a,s,s,l,r][c]),g:Vn(255*[l,r,r,a,s,s][c]),b:Vn(255*[s,s,l,r,r,a][c]),a:Vn(i,2)}},Ip=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},zve=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=i<1?Ip(Vn(255*i)):"";return"#"+Ip(t)+Ip(n)+Ip(r)+o},Uve=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),s=o-Math.min(t,n,r),a=s?o===t?(n-r)/s:o===n?2+(r-t)/s:4+(t-n)/s:0;return{h:Vn(60*(a<0?a+6:a)),s:Vn(o?s/o*100:0),v:Vn(o/255*100),a:i}},Vve=V.memo(function(e){var t=e.hue,n=e.onChange,r=QE(["react-colorful__hue",e.className]);return V.createElement("div",{className:r},V.createElement(bF,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:Nd(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":Vn(t),"aria-valuemax":"360","aria-valuemin":"0"},V.createElement(wF,{className:"react-colorful__hue-pointer",left:t/360,color:Tx({h:t,s:100,v:100,a:1})})))}),Hve=V.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:Tx({h:t.h,s:100,v:100,a:1})};return V.createElement("div",{className:"react-colorful__saturation",style:r},V.createElement(bF,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:Nd(t.s+100*i.left,0,100),v:Nd(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+Vn(t.s)+"%, Brightness "+Vn(t.v)+"%"},V.createElement(wF,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:Tx(t)})))}),xF=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},Wve=function(e,t){return e.toLowerCase()===t.toLowerCase()||xF(Ex(e),Ex(t))};function Yve(e,t,n){var r=Sx(n),i=H.useState(function(){return e.toHsva(t)}),o=i[0],s=i[1],a=H.useRef({color:t,hsva:o});H.useEffect(function(){if(!e.equal(t,a.current.color)){var c=e.toHsva(t);a.current={hsva:c,color:t},s(c)}},[t,e]),H.useEffect(function(){var c;xF(o,a.current.hsva)||e.equal(c=e.fromHsva(o),a.current.color)||(a.current={hsva:o,color:c},r(c))},[o,e,r]);var l=H.useCallback(function(c){s(function(f){return Object.assign({},f,c)})},[]);return[o,l]}var qve=typeof window<"u"?H.useLayoutEffect:H.useEffect,Gve=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},cL=new Map,Zve=function(e){qve(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!cL.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}`,cL.set(t,n);var r=Gve();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},Kve=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,s=_F(e,["className","colorModel","color","onChange"]),a=H.useRef(null);Zve(a);var l=Yve(n,i,o),c=l[0],f=l[1],h=QE(["react-colorful",t]);return V.createElement("div",L_({},s,{ref:a,className:h}),V.createElement(Hve,{hsva:c,onChange:f}),V.createElement(Vve,{hue:c.h,onChange:f,className:"react-colorful__last-control"}))},Xve={defaultColor:"000",toHsva:Fve,fromHsva:function(e){return $ve({h:e.h,s:e.s,v:e.v,a:1})},equal:Wve},Qve=function(e){return V.createElement(Kve,L_({},e,{colorModel:Xve}))};const Jve=({getColorForKey:e})=>({tag:t,editTag:n,toggle:r,tagEdited:i,isOpen:o,tagEdit:s})=>{const[a,l]=H.useState(t),[c,f]=H.useState(e(t)),[h,p,,m]=$t(),{editing:g,error:v,edited:w,errorData:y}=s,b=oh(async()=>{await n({oldName:t,newName:a,color:c}),r()}),x=Wn(m,()=>w&&i({oldName:t,newName:a,color:c}));return C(Ho,{isOpen:o,toggle:r,centered:!0,onClosed:x,children:U("form",{name:"editTag",onSubmit:b,children:[C(oo,{toggle:r,children:"Edit tag"}),U(Ri,{children:[U(eh,{children:[C("div",{id:"colorPickerBtn",className:"input-group-text edit-tag-modal__color-picker-toggle",style:{backgroundColor:c,borderColor:c},onClick:p,children:C(Fe,{icon:sQ,className:"edit-tag-modal__color-icon"})}),C(Qd,{isOpen:h,toggle:p,target:"colorPickerBtn",placement:"right",hideArrow:!0,popperClassName:"edit-tag-modal__popover",children:C(Qve,{color:c,onChange:f})}),C(Vc,{value:a,placeholder:"Tag",required:!0,onChange:({target:T})=>l(T.value)})]}),v&&C(Dr,{type:"error",small:!0,className:"mt-2",children:C(Ao,{errorData:y,fallbackMessage:"Something went wrong while editing the tag :("})})]}),U(ra,{children:[C(ht,{type:"button",color:"link",onClick:r,children:"Cancel"}),C(ht,{color:"primary",disabled:g,children:g?"Saving...":"Save"})]})]})})};function eye(e){return V.createElement("button",{type:"button",className:e.classNames.selectedTag,title:e.removeButtonText,onClick:e.onDelete},V.createElement("span",{className:e.classNames.selectedTagName},e.tag.name))}const tye={position:"absolute",width:0,height:0,visibility:"hidden",overflow:"scroll",whiteSpace:"pre"},nye=["fontSize","fontFamily","fontWeight","fontStyle","letterSpacing","textTransform"];class rye extends V.Component{constructor(t){super(t),this.state={inputWidth:null},this.input=V.createRef(),this.sizer=V.createRef()}componentDidMount(){this.props.autoresize&&(this.copyInputStyles(),this.updateInputWidth())}componentDidUpdate({query:t,placeholderText:n}){(t!==this.props.query||n!==this.props.placeholderText)&&this.updateInputWidth()}copyInputStyles(){const t=window.getComputedStyle(this.input.current);nye.forEach(n=>{this.sizer.current.style[n]=t[n]})}updateInputWidth(){let t;this.props.autoresize&&(t=Math.ceil(this.sizer.current.scrollWidth)+2),t!==this.state.inputWidth&&this.setState({inputWidth:t})}render(){const{id:t,query:n,ariaLabelText:r,placeholderText:i,expanded:o,classNames:s,inputAttributes:a,inputEventHandlers:l,index:c}=this.props;return V.createElement("div",{className:s.searchWrapper},V.createElement("input",Object.assign({},a,l,{ref:this.input,value:n,placeholder:i,className:s.searchInput,role:"combobox","aria-autocomplete":"list","aria-label":r||i,"aria-owns":t,"aria-activedescendant":c>-1?`${t}-${c}`:null,"aria-expanded":o,style:{width:this.state.inputWidth}})),V.createElement("div",{ref:this.sizer,style:tye},n||i))}}function JE(e){return e.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")}function iye(e){return new RegExp(JE(e),"gi")}function oye(e){return new RegExp(`(?:^|\\s)${JE(e)}`,"i")}function sye(e){return new RegExp(`^${JE(e)}$`,"i")}function aye(e,t){const n=iye(t);return e.replace(n,"$&")}function lye({item:e,query:t}){return V.createElement("span",{dangerouslySetInnerHTML:{__html:aye(e.name,t)}})}function cye(e){const t=e.suggestionComponent||lye,n=e.options.map((r,i)=>{const o=`${e.id}-${i}`,s=[];return e.index===i&&s.push(e.classNames.suggestionActive),r.disabled&&s.push(e.classNames.suggestionDisabled),V.createElement("li",{id:o,key:o,role:"option",className:s.join(" "),"aria-disabled":!!r.disabled,onMouseDown:a=>a.preventDefault(),onClick:()=>e.addTag(r)},r.prefix?V.createElement("span",{className:e.classNames.suggestionPrefix},r.prefix," "):null,r.disableMarkIt?r.name:V.createElement(t,{item:r,query:e.query}))});return V.createElement("div",{className:e.classNames.suggestions},V.createElement("ul",{role:"listbox",id:e.id},n))}function uye(e,t){const n=e.querySelectorAll("a,button,input"),r=Array.prototype.findIndex.call(n,o=>o===t),i=n[r-1]||n[r+1];i&&i.focus()}const Na={ENTER:"Enter",TAB:"Tab",BACKSPACE:"Backspace",UP_ARROW:"ArrowUp",UP_ARROW_COMPAT:"Up",DOWN_ARROW:"ArrowDown",DOWN_ARROW_COMPAT:"Down"},SF={root:"react-tags",rootFocused:"is-focused",selected:"react-tags__selected",selectedTag:"react-tags__selected-tag",selectedTagName:"react-tags__selected-tag-name",search:"react-tags__search",searchWrapper:"react-tags__search-wrapper",searchInput:"react-tags__search-input",suggestions:"react-tags__suggestions",suggestionActive:"is-active",suggestionDisabled:"is-disabled",suggestionPrefix:"react-tags__suggestion-prefix"};function CF(e,t){return e.findIndex(n=>sye(t).test(n.name))}function Yb(){if(this.state.query.length>=this.props.minQueryLength){const e=CF(this.state.options,this.state.query),t=this.state.index===-1?e:this.state.index,n=t>-1?this.state.options[t]:null;n?this.addTag(n):this.props.allowNew&&this.addTag({name:this.state.query})}}function fye(e){e.preventDefault();const t=this.state.options.length-1;this.setState({index:this.state.index<=0?t:this.state.index-1})}function dye(e){e.preventDefault();const t=this.state.options.length-1;this.setState({index:this.state.index>=t?0:this.state.index+1})}function hye(){this.state.query.length||this.deleteTag(this.props.tags.length-1)}function pye(e,t){return oye(t).test(e.name)}function mye(e,t){let n;return e.suggestionsTransform?n=e.suggestionsTransform(t.query,e.suggestions):n=e.suggestions.filter(r=>e.suggestionsFilter(r,t.query)),n=n.slice(0,e.maxSuggestionsLength),e.allowNew&&e.newTagText&&CF(n,t.query)===-1?n.push({id:0,name:t.query,prefix:e.newTagText,disableMarkIt:!0}):e.noSuggestionsText&&n.length===0&&n.push({id:0,name:e.noSuggestionsText,disabled:!0,disableMarkIt:!0}),n}class eT extends V.Component{constructor(t){super(t),this.state={query:"",focused:!1,index:-1},this.inputEventHandlers={onChange:()=>{},onBlur:this.onBlur.bind(this),onFocus:this.onFocus.bind(this),onInput:this.onInput.bind(this),onKeyDown:this.onKeyDown.bind(this)},this.container=V.createRef(),this.input=V.createRef()}onInput(t){const n=t.target.value;this.props.onInput&&this.props.onInput(n),n.length===this.state.query.length+1&&this.props.delimiters.indexOf(n.slice(-1))>-1?Yb.call(this):n!==this.state.query&&this.setState({query:n})}onKeyDown(t){this.props.delimiters.indexOf(t.key)>-1&&((this.state.query||this.state.index>-1)&&t.preventDefault(),Yb.call(this)),t.key===Na.BACKSPACE&&this.props.allowBackspace&&hye.call(this,t),(t.key===Na.UP_ARROW||t.key===Na.UP_ARROW_COMPAT)&&fye.call(this,t),(t.key===Na.DOWN_ARROW||t.key===Na.DOWN_ARROW_COMPAT)&&dye.call(this,t)}onClick(t){document.activeElement!==t.target&&this.focusInput()}onBlur(){this.setState({focused:!1,index:-1}),this.props.onBlur&&this.props.onBlur(),this.props.addOnBlur&&Yb.call(this)}onFocus(){this.setState({focused:!0}),this.props.onFocus&&this.props.onFocus()}onDeleteTag(t,n){this.container.current&&uye(this.container.current,n.currentTarget),this.deleteTag(t)}addTag(t){t.disabled||typeof this.props.onValidate=="function"&&!this.props.onValidate(t)||(this.props.onAddition({id:t.id,name:t.name}),this.clearInput())}deleteTag(t){this.props.onDelete(t)}clearInput(){this.setState({query:"",index:-1})}clearSelectedIndex(){this.setState({index:-1})}focusInput(){this.input.current&&this.input.current.input.current&&this.input.current.input.current.focus()}render(){const t=this.props.tagComponent||eye,n=this.state.focused&&this.state.query.length>=this.props.minQueryLength,r=Object.assign({},SF,this.props.classNames),i=[r.root];return this.state.focused&&i.push(r.rootFocused),V.createElement("div",{ref:this.container,className:i.join(" "),onClick:this.onClick.bind(this)},V.createElement("div",{className:r.selected,"aria-relevant":"additions removals","aria-live":"polite"},this.props.tags.map((o,s)=>V.createElement(t,{key:s,tag:o,removeButtonText:this.props.removeButtonText,classNames:r,onDelete:this.onDeleteTag.bind(this,s)}))),V.createElement("div",{className:r.search},V.createElement(rye,Object.assign({},this.state,{id:this.props.id,ref:this.input,classNames:r,inputAttributes:this.props.inputAttributes,inputEventHandlers:this.inputEventHandlers,autoresize:this.props.autoresize,expanded:n,placeholderText:this.props.placeholderText,ariaLabelText:this.props.ariaLabelText})),n&&this.state.options.length?V.createElement(cye,Object.assign({},this.state,{id:this.props.id,classNames:r,expanded:n,addTag:this.addTag.bind(this),suggestionComponent:this.props.suggestionComponent})):null))}static getDerivedStateFromProps(t,n){return n.prevQuery!==n.query||n.prevSuggestions!==t.suggestions?{prevQuery:n.query,prevSuggestions:t.suggestions,options:mye(t,n)}:null}}eT.defaultProps={id:"ReactTags",tags:[],placeholderText:"Add new tag",removeButtonText:"Click to remove tag",noSuggestionsText:null,newTagText:null,suggestions:[],suggestionsFilter:pye,suggestionsTransform:null,autoresize:!0,classNames:SF,delimiters:[Na.TAB,Na.ENTER],minQueryLength:2,maxSuggestionsLength:6,allowNew:!1,allowBackspace:!0,addOnBlur:!1,tagComponent:null,suggestionComponent:null,inputAttributes:{}};eT.propTypes={id:S.string,tags:S.arrayOf(S.object),placeholderText:S.string,ariaLabelText:S.string,removeButtonText:S.string,noSuggestionsText:S.string,newTagText:S.string,suggestions:S.arrayOf(S.object),suggestionsFilter:S.func,suggestionsTransform:S.func,autoresize:S.bool,delimiters:S.arrayOf(S.string),onDelete:S.func.isRequired,onAddition:S.func.isRequired,onInput:S.func,onFocus:S.func,onBlur:S.func,onValidate:S.func,minQueryLength:S.number,maxSuggestionsLength:S.number,classNames:S.object,allowNew:S.bool,allowBackspace:S.bool,addOnBlur:S.bool,tagComponent:S.oneOfType([S.func,S.element]),suggestionComponent:S.oneOfType([S.func,S.element]),inputAttributes:S.object};const EF=({tag:e,colorGenerator:t})=>C("div",{style:{backgroundColor:t.getColorForKey(e)},className:"tag-bullet"}),uL=e=>({id:e,name:e}),gye=e=>({selectedTags:t,onChange:n,placeholder:r,listTags:i,tagsList:o,settings:s,allowNew:a=!0})=>{var h;H.useEffect(()=>{i()},[]);const l=((h=s.shortUrlCreation)==null?void 0:h.tagFilteringMode)??"startsWith",c=({tag:p,onDelete:m})=>C(ZE,{colorGenerator:e,text:p.name,clearable:!0,className:"react-tags__tag",onClose:m}),f=({item:p})=>U(We,{children:[C(EF,{tag:`${p.name}`,colorGenerator:e}),p.name]});return C(eT,{tags:t.map(uL),tagComponent:c,suggestions:o.tags.filter(p=>!t.includes(p)).map(uL),suggestionComponent:f,allowNew:a,addOnBlur:!0,placeholderText:r??"Add tags to the URL",minQueryLength:1,delimiters:["Enter","Tab",","],suggestionsTransform:l==="includes"?(p,m)=>m.filter(({name:g})=>g.includes(p)):void 0,onDelete:p=>{const m=[...t];m.splice(p,1),n(m)},onAddition:({name:p})=>n([...new Set([...t,...p.toLowerCase().split(",")])])})},Ox="shlink/tagDelete",vye={deleting:!1,deleted:!1,error:!1},TF=_n(`${Ox}/tagDeleted`),yye=e=>{const t=ir(`${Ox}/deleteTag`,async(r,{getState:i})=>{const{deleteTags:o}=e(i);await o([r])}),{reducer:n}=qn({name:Ox,initialState:vye,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:io(o)})),r.addCase(t.fulfilled,()=>({deleting:!1,deleted:!0,error:!1}))}});return{reducer:n,deleteTag:t}},tT="shlink/tagEdit",_ye={editing:!1,edited:!1,error:!1},OF=_n(`${tT}/tagEdited`),bye=(e,t)=>ir(`${tT}/editTag`,async({oldName:n,newName:r,color:i},{getState:o})=>(await e(o).editTag(n,r),t.setColorForKey(r,i),{oldName:n,newName:r,color:i})),wye=e=>qn({name:tT,initialState:_ye,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:io(r)})),t.addCase(e.fulfilled,(n,{payload:r})=>({..._Z(["oldName","newName"],r),editing:!1,edited:!0,error:!1}))}}),nT="shlink/tagsList",qb={tags:[],filteredTags:[],stats:{},loading:!1,error:!1},fL=(e,t)=>n=>n===e?t:n,dL=(e,t)=>Wd(n=>n===t,e),xye=(e,t)=>e.reduce((n,[r,i])=>{if(!n[r])return n;const o=n[r];return{...n,[r]:{...o,visitsCount:o.visitsCount+i}}},{...t}),Sye=e=>Object.entries(e.reduce((t,{shortUrl:n})=>(n==null||n.tags.forEach(r=>{t[r]=(t[r]||0)+1}),t),{})),Cye=(e,t=!0)=>ir(`${nT}/listTags`,async(n,{getState:r})=>{const{tagsList:i,selectedServer:o}=r();if(!t&&!Cr(i.tags))return i;const{listTags:s,tagsStats:a}=e(r),{tags:l,stats:c=[]}=await(PE.tagsStats(o)?a():s()),f=c.reduce((h,{tag:p,shortUrlsCount:m,visitsCount:g})=>(h[p]={shortUrlsCount:m,visitsCount:g},h),{});return{tags:l,stats:f}}),PF=_n(`${nT}/filterTags`),Eye=(e,t)=>qn({name:nT,initialState:qb,reducers:{},extraReducers:n=>{n.addCase(PF,(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})=>({...qb,error:!0,errorData:io(i)})),n.addCase(e.fulfilled,(r,{payload:i})=>({...qb,stats:i.stats,tags:i.tags,filteredTags:i.tags})),n.addCase(TF,({tags:r,filteredTags:i,...o},{payload:s})=>({...o,tags:dL(r,s),filteredTags:dL(i,s)})),n.addCase(OF,({tags:r,filteredTags:i,stats:o,...s},{payload:a})=>({...s,stats:{...o,[a.newName]:o[a.oldName]},tags:r.map(fL(a.oldName,a.newName)).sort(),filteredTags:i.map(fL(a.oldName,a.newName)).sort()})),n.addCase(ch,(r,{payload:i})=>({...r,stats:xye(Sye(i.createdVisits),r.stats)})),n.addCase(t.fulfilled,({tags:r,...i},{payload:o})=>({...i,tags:r.concat(o.tags.filter(s=>!r.includes(s)))}))}}),Tye=e=>sa(({filterTags:t,forceListTags:n,tagsList:r,selectedServer:i,settings:o})=>{var h;const[s,a]=H.useState(((h=o.tags)==null?void 0:h.defaultOrdering)??{}),l=Wn(()=>r.filteredTags.map(p=>{var m,g;return{tag:p,shortUrls:((m=r.stats[p])==null?void 0:m.shortUrlsCount)??0,visits:((g=r.stats[p])==null?void 0:g.visitsCount)??0}}),p=>II(p,s));if(H.useEffect(()=>{n()},[]),r.loading)return C(Eo,{loading:!0});if(r.error)return C(Dr,{type:"error",children:C(Ao,{errorData:r.errorData,fallbackMessage:"Error loading tags :("})});const c=p=>()=>{const m=o_(p,s.field,s.dir);a({field:m?p:void 0,dir:m})};return U(We,{children:[C(sh,{className:"mb-3",onChange:t}),C(Jn,{className:"mb-3",children:C("div",{className:"col-lg-6 offset-lg-6",children:C(hh,{items:V8,order:s,onChange:(p,m)=>a({field:p,dir:m})})})}),(()=>{if(r.filteredTags.length<1)return C(Eo,{children:"No tags found"});const p=l();return C(e,{sortedTags:p,selectedServer:i,currentOrder:s,orderByColumn:c})})()]})},()=>[Jr.visits]);const rT=({pagesCount:e,currentPage:t,setCurrentPage:n,centered:r=!0})=>{if(e<2)return null;const i=o=>()=>!Rd(o)&&n(o);return U(x_,{listClassName:ge("flex-wrap mb-0 simple-paginator",{"justify-content-center":r}),children:[C(Ns,{disabled:t<=1,children:C(Ls,{previous:!0,tag:"span",onClick:i(t-1)})}),gF(t,e).map((o,s)=>C(Ns,{disabled:Rd(o),active:t===o,children:C(Ls,{role:"link",tag:"span",onClick:i(o),children:vF(o)})},yF(o,s))),C(Ns,{disabled:t>=e,children:C(Ls,{next:!0,tag:"span",onClick:i(t+1)})})]})};const Oye=20,Pye=e=>({sortedTags:t,selectedServer:n,orderByColumn:r,currentOrder:i})=>{const o=H.useRef(!0),{search:s}=kn(),{page:a=1}=ml(s),[l,c]=Eoe("page",Number(a)),f=dd(Oye,t),h=f.length>1,p=f[l-1]??[];return H.useEffect(()=>{!o.current&&c(1),o.current=!1},[t]),H.useEffect(()=>{scrollTo(0,0)},[l]),U(fn,{bodyClassName:h?"pb-1":"",children:[U("table",{className:"table table-hover responsive-table mb-0",children:[U("thead",{className:"responsive-table__header",children:[U("tr",{children:[U("th",{className:"tags-table__header-cell",onClick:r("tag"),children:["Tag ",C(Af,{currentOrder:i,field:"tag"})]}),U("th",{className:"tags-table__header-cell text-lg-end",onClick:r("shortUrls"),children:["Short URLs ",C(Af,{currentOrder:i,field:"shortUrls"})]}),U("th",{className:"tags-table__header-cell text-lg-end",onClick:r("visits"),children:["Visits ",C(Af,{currentOrder:i,field:"visits"})]}),C("th",{"aria-label":"Options",className:"tags-table__header-cell"})]}),C("tr",{children:C("th",{"aria-label":"Separator",colSpan:4,className:"p-0 border-top-0"})})]}),U("tbody",{children:[p.length===0&&C("tr",{children:C("td",{colSpan:4,className:"text-center",children:"No results found"})}),p.map(m=>C(e,{tag:m,selectedServer:n},m.tag))]})]}),h&&C("div",{className:"sticky-card-paginator",children:C(rT,{pagesCount:f.length,currentPage:l,setCurrentPage:c})})]},l)},kye=(e,t,n)=>({tag:r,selectedServer:i})=>{const[o,s]=$t(),[a,l]=$t(),[c,f]=$t(),h=Vd(i);return U("tr",{className:"responsive-table__row",children:[U("th",{className:"responsive-table__cell","data-th":"Tag",children:[C(EF,{tag:r.tag,colorGenerator:n})," ",r.tag]}),C("td",{className:"responsive-table__cell text-lg-end","data-th":"Short URLs",children:C(At,{to:`/server/${h}/list-short-urls/1?tags=${encodeURIComponent(r.tag)}`,children:bn(r.shortUrls)})}),C("td",{className:"responsive-table__cell text-lg-end","data-th":"Visits",children:C(At,{to:`/server/${h}/tag/${r.tag}/visits`,children:bn(r.visits)})}),C("td",{className:"responsive-table__cell text-lg-end",children:U(E_,{toggle:f,isOpen:c,children:[U(Ve,{onClick:l,children:[C(Fe,{icon:GX,fixedWidth:!0,className:"me-1"})," Edit"]}),U(Ve,{onClick:s,children:[C(Fe,{icon:uQ,fixedWidth:!0,className:"me-1"})," Delete"]})]})}),C(t,{tag:r.tag,toggle:l,isOpen:a}),C(e,{tag:r.tag,toggle:s,isOpen:o})]})},Mye=(e,t)=>{e.serviceFactory("TagsSelector",gye,"ColorGenerator"),e.decorator("TagsSelector",t(["tagsList","settings"],["listTags"])),e.serviceFactory("DeleteTagConfirmModal",()=>Ive),e.decorator("DeleteTagConfirmModal",t(["tagDelete"],["deleteTag","tagDeleted"])),e.serviceFactory("EditTagModal",Jve,"ColorGenerator"),e.decorator("EditTagModal",t(["tagEdit"],["editTag","tagEdited"])),e.serviceFactory("TagsTableRow",kye,"DeleteTagConfirmModal","EditTagModal","ColorGenerator"),e.serviceFactory("TagsTable",Pye,"TagsTableRow"),e.serviceFactory("TagsList",Tye,"TagsTable"),e.decorator("TagsList",t(["tagsList","selectedServer","mercureInfo","settings"],["forceListTags","filterTags","createNewVisits","loadMercureInfo"])),e.serviceFactory("tagEditReducerCreator",wye,"editTag"),e.serviceFactory("tagEditReducer",St("reducer"),"tagEditReducerCreator"),e.serviceFactory("tagDeleteReducerCreator",yye,"buildShlinkApiClient"),e.serviceFactory("tagDeleteReducer",St("reducer"),"tagDeleteReducerCreator"),e.serviceFactory("tagsListReducerCreator",Eye,"listTags","createShortUrl"),e.serviceFactory("tagsListReducer",St("reducer"),"tagsListReducerCreator");const n=r=>({buildShlinkApiClient:i})=>Cye(i,r);e.factory("listTags",n(!1)),e.factory("forceListTags",n(!0)),e.serviceFactory("filterTags",()=>PF),e.serviceFactory("deleteTag",St("deleteTag"),"tagDeleteReducerCreator"),e.serviceFactory("tagDeleted",()=>TF),e.serviceFactory("editTag",bye,"buildShlinkApiClient","ColorGenerator"),e.serviceFactory("tagEdited",()=>OF)};var Rye="Expected a function",kF="__lodash_hash_undefined__",MF=1/0,Nye="[object Function]",Lye="[object GeneratorFunction]",Dye="[object Symbol]",Aye=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Iye=/^\w*$/,Fye=/^\./,$ye=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,jye=/[\\^$.*+?()[\]{}|]/g,Bye=/\\(\\)?/g,zye=/^\[object .+?Constructor\]$/,Uye=typeof Hl=="object"&&Hl&&Hl.Object===Object&&Hl,Vye=typeof self=="object"&&self&&self.Object===Object&&self,iT=Uye||Vye||Function("return this")();function Hye(e,t){return e==null?void 0:e[t]}function Wye(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var Yye=Array.prototype,qye=Function.prototype,RF=Object.prototype,Gb=iT["__core-js_shared__"],hL=function(){var e=/[^.]+$/.exec(Gb&&Gb.keys&&Gb.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),NF=qye.toString,oT=RF.hasOwnProperty,LF=RF.toString,Gye=RegExp("^"+NF.call(oT).replace(jye,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),pL=iT.Symbol,Zye=Yye.splice,Kye=DF(iT,"Map"),Ld=DF(Object,"create"),mL=pL?pL.prototype:void 0,gL=mL?mL.toString:void 0;function ul(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1}function s_e(e,t){var n=this.__data__,r=D_(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}lu.prototype.clear=n_e;lu.prototype.delete=r_e;lu.prototype.get=i_e;lu.prototype.has=o_e;lu.prototype.set=s_e;function _l(e){var t=-1,n=e?e.length:0;for(this.clear();++tt.toFixed(e.decimals).replace(".",e.separator):t=>`${t}`.replace(".",e.separator):e.decimals?t=>t.toFixed(e.decimals):t=>`${t}`}function lT(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 P_e(e={stringFormatter:lT()}){return t=>e.stringFormatter(t.toString().slice(7,-1))}function k_e(e={stringFormatter:lT()}){return t=>t===null||(t=JSON.stringify(t),t===void 0)?"":(t[0]==='"'&&(t=t.replace(/^"(.+)"$/,"$1")),e.stringFormatter(t))}function yL(e,t,n){const r=e[t];return r===void 0?n:r}function FF(e,t){try{return Array.isArray(t)?e.push(...t):e.push(t),e}catch{return e.concat(t)}}function Px(e,t){let n=!0;return e.reduce((r,i)=>(i==null&&(i=""),n?(n=!1,`${i}`):`${r}${t}${i}`),"")}class M_e{constructor(t){this.opts=this.preprocessOpts(t)}preprocessOpts(t){const n=Object.assign({},t);n.fields&&(n.fields=this.preprocessFieldsInfo(n.fields,n.defaultValue)),n.transforms=n.transforms||[];const r=n.formatters&&n.formatters.string||lT(),i=k_e({stringFormatter:r}),o={header:r,undefined:Zb,boolean:Zb,number:O_e(),bigint:Zb,string:r,symbol:P_e({stringFormatter:r}),function:i,object:i};return n.formatters={...o,...n.formatters},n.delimiter=n.delimiter||",",n.eol=n.eol||` -`,n.header=n.header!==!1,n.includeEmptyRows=n.includeEmptyRows||!1,n.withBOM=n.withBOM||!1,n}preprocessFieldsInfo(t,n){return t.map(r=>{if(typeof r=="string")return{label:r,value:r.includes(".")||r.includes("[")?i=>vL(i,r,n):i=>yL(i,r,n)};if(typeof r=="object"){const i="default"in r?r.default:n;if(typeof r.value=="string")return{label:r.label||r.value,value:r.value.includes(".")||r.value.includes("[")?o=>vL(o,r.value,i):o=>yL(o,r.value,i)};if(typeof r.value=="function"){const o=r.label||r.value.name||"",s={label:o,default:i};return{label:o,value(a){const l=r.value(a,s);return l??i}}}}throw new Error("Invalid field info option. "+JSON.stringify(r))})}getHeader(){return Px(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(FF,[]),[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 Px(n,this.opts.delimiter)}processCell(t,n){return this.processValue(n.value(t))}processValue(t){return this.opts.formatters[typeof t](t)}}class R_e extends M_e{constructor(t){super(t)}parse(t){const n=this.preprocessData(t);this.opts.fields=this.opts.fields||this.preprocessFieldsInfo(n.reduce((s,a)=>(Object.keys(a).forEach(l=>{s.includes(l)||s.push(l)}),s),[]));const r=this.opts.header?this.getHeader():"",i=this.processData(n);return(this.opts.withBOM?"\uFEFF":"")+r+(r&&i?this.opts.eol:"")+i}preprocessData(t){const n=Array.isArray(t)?t:[t];if(!this.opts.fields&&(n.length===0||typeof n[0]!="object"))throw new Error('Data should not be empty or the "fields" option should be included');return this.opts.transforms.length===0?n:n.map(r=>this.preprocessRow(r)).reduce(FF,[])}processData(t){return Px(t.map(n=>this.processRow(n)).filter(n=>n),this.opts.eol)}}var Sn;(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"})(Sn||(Sn={}));Sn.QUOTATION_MARK+"",Sn.QUOTATION_MARK,Sn.REVERSE_SOLIDUS+"",Sn.REVERSE_SOLIDUS,Sn.SOLIDUS+"",Sn.SOLIDUS,Sn.LATIN_SMALL_LETTER_B+"",Sn.BACKSPACE,Sn.LATIN_SMALL_LETTER_F+"",Sn.FORM_FEED,Sn.LATIN_SMALL_LETTER_N+"",Sn.NEWLINE,Sn.LATIN_SMALL_LETTER_R+"",Sn.CARRIAGE_RETURN,Sn.LATIN_SMALL_LETTER_T+"",Sn.TAB;var _L;(function(e){e[e.LEFT_BRACE=1]="LEFT_BRACE",e[e.RIGHT_BRACE=2]="RIGHT_BRACE",e[e.LEFT_BRACKET=3]="LEFT_BRACKET",e[e.RIGHT_BRACKET=4]="RIGHT_BRACKET",e[e.COLON=5]="COLON",e[e.COMMA=6]="COMMA",e[e.TRUE=7]="TRUE",e[e.FALSE=8]="FALSE",e[e.NULL=9]="NULL",e[e.STRING=10]="STRING",e[e.NUMBER=11]="NUMBER",e[e.SEPARATOR=12]="SEPARATOR"})(_L||(_L={}));var bL;(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"})(bL||(bL={}));var wL;(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"})(wL||(wL={}));var xL;(function(e){e[e.OBJECT=0]="OBJECT",e[e.ARRAY=1]="ARRAY"})(xL||(xL={}));var N_e=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(r,i,o){n.o(r,i)||Object.defineProperty(r,i,{enumerable:!0,get:o})},n.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n.t=function(r,i){if(1&i&&(r=n(r)),8&i||4&i&&typeof r=="object"&&r&&r.__esModule)return r;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:r}),2&i&&typeof r!="string")for(var s in r)n.d(o,s,function(a){return r[a]}.bind(null,s));return o},n.n=function(r){var i=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(i,"a",i),i},n.o=function(r,i){return Object.prototype.hasOwnProperty.call(r,i)},n.p="",n(n.s=32)}([function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch{typeof window=="object"&&(n=window)}e.exports=n},function(e,t,n){var r=n(6),i=Object.keys||function(g){var v=[];for(var w in g)v.push(w);return v};e.exports=h;var o=n(5);o.inherits=n(2);var s=n(23),a=n(14);o.inherits(h,s);for(var l=i(a.prototype),c=0;c"u"?typeof window<"u"?window:typeof self<"u"?self:Wl:globalThis)})(Hpe,iy);const Wpe=(e,t,n,r)=>{const{mercureHubUrl:i,token:o,loading:s,error:a}=e;if(s||a||!i)return;const l=({data:h})=>n(JSON.parse(h)),c=({status:h})=>h===401&&r(),f=t.map(h=>{const p=new URL(i);p.searchParams.append("topic",h);const m=new iy.EventSourcePolyfill(p,{headers:{Authorization:`Bearer ${o}`}});return m.onmessage=l,m.onerror=c,m});return()=>f.forEach(h=>h.close())};function sa(e,t){const n=new Set;return r=>{const{createNewVisits:i,loadMercureInfo:o,mercureInfo:s}=r,{interval:a}=s,l=Js();return H.useEffect(()=>{const c=m=>a?n.add(m):i([m]),f=t(r,l),h=Wpe(s,f,c,o);if(!a)return h;const p=setInterval(()=>{i([...n]),n.clear()},a*1e3*60);return()=>Eo(()=>clearInterval(p),()=>h==null?void 0:h())(void 0)},[s]),C(e,{...r})}}class Jr{}Se(Jr,"visits","https://shlink.io/new-visit"),Se(Jr,"orphanVisits","https://shlink.io/new-orphan-visit"),Se(Jr,"shortUrlVisits",t=>`https://shlink.io/new-visit/${t}`);const GE="shlink/shortUrlDeletion",LN={shortCode:"",loading:!1,deleted:!1,error:!1},Ype=e=>ir(`${GE}/deleteShortUrl`,async({shortCode:t,domain:n},{getState:r})=>{const{deleteShortUrl:i}=e(r);return await i(t,n),{shortCode:t,domain:n}}),V8=_n(`${GE}/shortUrlDeleted`),qpe=e=>{const{actions:t,reducer:n}=Yn({name:GE,initialState:LN,reducers:{resetDeleteShortUrl:()=>LN},extraReducers:i=>{i.addCase(e.pending,o=>({...o,loading:!0,error:!1,deleted:!1})),i.addCase(e.rejected,(o,{error:s})=>({...o,errorData:io(s),loading:!1,error:!0,deleted:!1})),i.addCase(e.fulfilled,(o,{payload:s})=>({...o,shortCode:s.shortCode,loading:!1,error:!1,deleted:!0}))}}),{resetDeleteShortUrl:r}=t;return{reducer:n,resetDeleteShortUrl:r}},H8="shlink/shortUrlsList",W8=5,Gpe={loading:!0,error:!1},Zpe=e=>ir(`${H8}/listShortUrls`,(t,{getState:n})=>{const{listShortUrls:r}=e(n);return r(t??{})}),Kpe=(e,t,n)=>Yn({name:H8,initialState:Gpe,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,er((i,{payload:o})=>i.shortUrls?Nl(["shortUrls","data"],[o,...i.shortUrls.data.slice(0,W8-1)],i):i,i=>i.shortUrls?Nl(["shortUrls","pagination","totalItems"],i.shortUrls.pagination.totalItems+1,i):i)),r.addCase(t.fulfilled,(i,{payload:o})=>i.shortUrls?Nl(["shortUrls","data"],i.shortUrls.data.map(s=>{const{shortCode:a,domain:l}=o;return Mf(s,a,l)?o:s}),i):i),r.addCase(V8,er((i,{payload:o})=>i.shortUrls?Nl(["shortUrls","data"],Wd(s=>Mf(s,o.shortCode,o.domain),i.shortUrls.data),i):i,i=>i.shortUrls?Nl(["shortUrls","pagination","totalItems"],i.shortUrls.pagination.totalItems-1,i):i)),r.addCase(ch,(i,{payload:o})=>{var s,a;return Nl(["shortUrls","data"],(a=(s=i.shortUrls)==null?void 0:s.data)==null?void 0:a.map(l=>{var c;return((c=lZ(o.createdVisits.filter(({shortUrl:f})=>f&&Mf(l,f.shortCode,f.domain))))==null?void 0:c.shortUrl)??l}),i)})}}),DN=10,{ceil:Xpe}=Math,Qpe=new Intl.NumberFormat("en-US"),bn=e=>Qpe.format(Number(e)),Jpe=e=>Xpe(e/DN)*DN;const eme=e=>e?{tag:At,to:e}:{},gx=({children:e,title:t,link:n,tooltip:r})=>{const i=yl();return U(We,{children:[U(Er,{innerRef:i,className:"highlight-card",body:!0,...eme(n),children:[n&&C(Fe,{size:"3x",className:"highlight-card__link-icon",icon:zpe}),C(sE,{tag:"h5",className:"highlight-card__title",children:t}),C(oE,{tag:"h2",children:e})]}),r&&C(Or,{target:i,placement:"bottom",children:r})]})},AN=({loading:e,excludeBots:t,visitsSummary:n,...r})=>C(gx,{tooltip:n.bots!==void 0?U(We,{children:[t?"Plus":"Including"," ",C("b",{children:bn(n.bots)})," potential bot visits"]}):void 0,...r,children:e?"Loading...":bn(t&&n.nonBots?n.nonBots:n.total)}),tme=(e,t)=>sa(({shortUrlsList:n,listShortUrls:r,listTags:i,tagsList:o,selectedServer:s,loadVisitsOverview:a,visitsOverview:l,settings:{visits:c}})=>{const{loading:f,shortUrls:h}=n,{loading:p}=o,{loading:m,nonOrphanVisits:g,orphanVisits:v}=l,w=Vd(s),y=Mi("nonOrphanVisits",s),b=Bo();return H.useEffect(()=>{r({itemsPerPage:W8,orderBy:{field:"dateCreated",dir:"DESC"}}),i(),a()},[]),U(We,{children:[U(Qn,{children:[C("div",{className:"col-lg-6 col-xl-3 mb-3",children:C(AN,{title:"Visits",link:y?`/server/${w}/non-orphan-visits`:void 0,excludeBots:(c==null?void 0:c.excludeBots)??!1,loading:m,visitsSummary:g})}),C("div",{className:"col-lg-6 col-xl-3 mb-3",children:C(AN,{title:"Orphan visits",link:`/server/${w}/orphan-visits`,excludeBots:(c==null?void 0:c.excludeBots)??!1,loading:m,visitsSummary:v})}),C("div",{className:"col-lg-6 col-xl-3 mb-3",children:C(gx,{title:"Short URLs",link:`/server/${w}/list-short-urls/1`,children:f?"Loading...":bn((h==null?void 0:h.pagination.totalItems)??0)})}),C("div",{className:"col-lg-6 col-xl-3 mb-3",children:C(gx,{title:"Tags",link:`/server/${w}/manage-tags`,children:p?"Loading...":bn(o.tags.length)})})]}),U(Er,{className:"mb-3",children:[U(sl,{children:[C("span",{className:"d-sm-none",children:"Create a short URL"}),C("h5",{className:"d-none d-sm-inline",children:"Create a short URL"}),C(At,{className:"float-end",to:`/server/${w}/create-short-url`,children:"Advanced options »"})]}),C(ol,{children:C(t,{basicMode:!0})})]}),U(Er,{children:[U(sl,{children:[C("span",{className:"d-sm-none",children:"Recently created URLs"}),C("h5",{className:"d-none d-sm-inline",children:"Recently created URLs"}),C(At,{className:"float-end",to:`/server/${w}/list-short-urls/1`,children:"See all »"})]}),C(ol,{children:C(e,{shortUrlsList:n,selectedServer:s,className:"mb-0",onTagClick:x=>b(`/server/${w}/list-short-urls/1?tags=${encodeURIComponent(x)}`)})})]})]})},()=>[Jr.visits,Jr.orphanVisits]),nme={},rme=e=>e.id?e:vv(e,"id",gE()),ime=pw((e,t)=>vv(e,t.id,t),{}),{actions:ome,reducer:sme}=Yn({name:"shlink/servers",initialState:nme,reducers:{editServer:{prepare:(e,t)=>({payload:{serverId:e,serverData:t}}),reducer:(e,{payload:t})=>{const{serverId:n,serverData:r}=t;return e[n]?vv(e,n,{...e[n],...r}):e}},deleteServer:(e,{payload:t})=>CI(e,[t.id]),setAutoConnect:{prepare:({id:e},t)=>({payload:{serverId:e,autoConnect:t}}),reducer:(e,{payload:t})=>{const{serverId:n,autoConnect:r}=t;return e[n]?r?Object.fromEntries(Object.entries(e).map(([i,o])=>[i,{...o,autoConnect:i===n}])):vv(e,n,{...e[n],autoConnect:r}):e}},createServers:{prepare:Eo(Ic(rme),ime,e=>({payload:e})),reducer:(e,{payload:t})=>({...e,...t})}}}),{editServer:ame,deleteServer:lme,setAutoConnect:cme,createServers:Y8}=ome,ume=sme,fme=e=>Array.isArray(e)?e.filter(oC):[],dme=e=>ir("shlink/remoteServers/fetchServers",async(t,{dispatch:n})=>{const r=await e.fetchJson(`${Wg.homepage}/servers.json`),i=fme(r);n(Y8(i))}),hme=({servers:e,selectedServer:t})=>{const n=Object.values(e);return U(th,{nav:!0,inNavbar:!0,children:[U(su,{nav:!0,caret:!0,children:[C(Fe,{icon:RM})," ",C("span",{className:"ms-1",children:"Servers"})]}),C(vl,{end:!0,style:{right:0},children:(()=>n.length?U(We,{children:[n.map(({name:i,id:o})=>C(Ve,{tag:At,to:`/server/${o}`,active:Vd(t)===o,children:i},o)),C(Ve,{divider:!0}),U(Ve,{tag:At,to:"/manage-servers",children:[C(Fe,{icon:RM})," ",C("span",{className:"ms-1",children:"Manage servers"})]})]}):U(Ve,{tag:At,to:"/server/create",children:[C(Fe,{icon:EC})," ",C("span",{className:"ms-1",children:"Add a server"})]}))()})]})},pme="shlink-servers.csv";class mme{constructor(t,n,r){Se(this,"exportServers",async()=>{const t=s_(this.storage.get("servers")??{}).map(Kq);try{const n=this.jsonToCsv(t);f8(this.window,n,pme)}catch(n){console.error(n)}});this.storage=t,this.window=n,this.jsonToCsv=r}}const gme=e=>typeof e.url=="string"&&typeof e.apiKey=="string"&&typeof e.name=="string",vme=e=>Array.isArray(e)&&e.every(gme);class yme{constructor(t,n){Se(this,"importServersFromFile",async t=>{if(!t)throw new Error("No file provided");const n=this.fileReaderFactory();return new Promise((r,i)=>{n.addEventListener("loadend",async o=>{var s,a;try{const l=((a=(s=o.target)==null?void 0:s.result)==null?void 0:a.toString())??"",c=await this.csvToJson(l);if(!vme(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 _me=(e,t)=>{e.serviceFactory("ManageServers",Ipe,"ServersExporter","ImportServersBtn","useTimeoutToggle","ManageServersRow"),e.decorator("ManageServers",gv),e.decorator("ManageServers",t(["selectedServer","servers"],["resetSelectedServer"])),e.serviceFactory("ManageServersRow",Fpe,"ManageServersRowDropdown"),e.serviceFactory("ManageServersRowDropdown",Vpe,"DeleteServerModal"),e.decorator("ManageServersRowDropdown",t(null,["setAutoConnect"])),e.serviceFactory("CreateServer",kpe,"ImportServersBtn","useTimeoutToggle"),e.decorator("CreateServer",gv),e.decorator("CreateServer",t(["selectedServer","servers"],["createServers","resetSelectedServer"])),e.serviceFactory("EditServer",Npe,"ServerError"),e.decorator("EditServer",t(["selectedServer"],["editServer","selectServer","resetSelectedServer"])),e.serviceFactory("ServersDropdown",()=>hme),e.decorator("ServersDropdown",t(["servers","selectedServer"])),e.serviceFactory("DeleteServerModal",()=>Rpe),e.decorator("DeleteServerModal",t(null,["deleteServer"])),e.serviceFactory("DeleteServerButton",Mpe,"DeleteServerModal"),e.serviceFactory("ImportServersBtn",Lpe,"ServersImporter"),e.decorator("ImportServersBtn",t(["servers"],["createServers"])),e.serviceFactory("ServerError",Dpe,"DeleteServerButton"),e.decorator("ServerError",t(["servers","selectedServer"])),e.serviceFactory("Overview",tme,"ShortUrlsTable","CreateShortUrl"),e.decorator("Overview",t(["shortUrlsList","tagsList","selectedServer","mercureInfo","visitsOverview","settings"],["listShortUrls","listTags","createNewVisits","loadMercureInfo","loadVisitsOverview"])),e.constant("fileReaderFactory",()=>new FileReader),e.service("ServersImporter",yme,"csvToJson","fileReaderFactory"),e.service("ServersExporter",mme,"Storage","window","jsonToCsv"),e.serviceFactory("selectServer",c8,"buildShlinkApiClient","loadMercureInfo"),e.serviceFactory("createServers",()=>Y8),e.serviceFactory("deleteServer",()=>lme),e.serviceFactory("editServer",()=>ame),e.serviceFactory("setAutoConnect",()=>cme),e.serviceFactory("fetchServers",dme,"HttpClient"),e.serviceFactory("resetSelectedServer",()=>kE),e.serviceFactory("selectServerListener",mae,"selectServer","loadMercureInfo"),e.serviceFactory("selectedServerReducerCreator",gae,"selectServer"),e.serviceFactory("selectedServerReducer",St("reducer"),"selectedServerReducerCreator")},Cc=({children:e})=>C("small",{className:"form-text text-muted d-block",children:e}),q8=({checked:e=!1,onChange:t=lC,className:n,children:r,type:i,inline:o=!1})=>{const s=E_(),a=f=>t(f.target.checked,f),l={"form-switch":i==="switch","form-checkbox":i==="checkbox"},c=o?{display:"inline-block"}:{};return U("span",{className:ge("form-check",l,n),style:c,children:[C("input",{type:"checkbox",className:"form-check-input",id:s,checked:e,onChange:a}),C("label",{className:"form-check-label",htmlFor:s,children:r})]})},Kc=e=>C(q8,{type:"switch",...e}),bme=e=>e?`${e}`:"",wme=({settings:{realTimeUpdates:e},toggleRealTimeUpdates:t,setRealTimeUpdatesInterval:n})=>{const r=E_();return U(fn,{title:"Real-time updates",className:"h-100",children:[C(yr,{children:U(Kc,{checked:e.enabled,onChange:t,children:["Enable or disable real-time updates.",U(Cc,{children:["Real-time updates are currently being ",C("b",{children:e.enabled?"processed":"ignored"}),"."]})]})}),U(cu,{noMargin:!0,label:"Real-time updates frequency (in minutes):",labelClassName:ge("form-label",{"text-muted":!e.enabled}),id:r,children:[C(Wc,{type:"number",min:0,placeholder:"Immediate",disabled:!e.enabled,value:bme(e.interval),id:r,onChange:({target:i})=>n(Number(i.value))}),e.enabled&&U(Cc,{children:[e.interval!==void 0&&e.interval>0&&U("span",{children:["Updates will be reflected in the UI every ",C("b",{children:e.interval})," minute",e.interval>1&&"s","."]}),!e.interval&&"Updates will be reflected in the UI as soon as they happen."]})]})]})},ZE={field:"dateCreated",dir:"DESC"},xme={realTimeUpdates:{enabled:!0},shortUrlCreation:{validateUrls:!1},ui:{theme:"light"},visits:{defaultInterval:"last30Days"},shortUrlsList:{defaultOrdering:ZE}},Sme=(e,{payload:t})=>BI(e,t),wa=e=>({reducer:Sme,prepare:e}),xa=e=>({payload:e}),{reducer:Cme,actions:Eme}=Yn({name:"shlink/settings",initialState:xme,reducers:{toggleRealTimeUpdates:wa(e=>xa({realTimeUpdates:{enabled:e}})),setRealTimeUpdatesInterval:wa(e=>xa({realTimeUpdates:{interval:e}})),setShortUrlCreationSettings:wa(e=>xa({shortUrlCreation:e})),setShortUrlsListSettings:wa(e=>xa({shortUrlsList:e})),setUiSettings:wa(e=>xa({ui:e})),setVisitsSettings:wa(e=>xa({visits:e})),setTagsSettings:wa(e=>xa({tags:e}))}}),{toggleRealTimeUpdates:Tme,setRealTimeUpdatesInterval:Ome,setShortUrlCreationSettings:Pme,setShortUrlsListSettings:kme,setUiSettings:Mme,setVisitsSettings:Rme,setTagsSettings:Nme}=Eme,Lme=Cme;const Df=({children:e,...t})=>C(m5,{className:"nav-pills__nav-link",tag:fI,...t,children:e}),G8=({children:e,fill:t=!1,className:n=""})=>C(Er,{className:`nav-pills__nav p-0 overflow-hidden ${n}`,body:!0,children:C(g_,{pills:!0,fill:t,children:H.Children.map(e,r=>{if(!H.isValidElement(r)||r.type!==Df)throw new Error("Only NavPillItem children are allowed inside NavPills.");return r})})}),jb=({items:e})=>C(We,{children:e.map((t,n)=>C("div",{className:"mb-3",children:t},n))}),Dme=(e,t,n,r,i,o)=>()=>U(lu,{children:[U(G8,{className:"mb-3",children:[C(Df,{to:"general",children:"General"}),C(Df,{to:"short-urls",children:"Short URLs"}),C(Df,{to:"other-items",children:"Other items"})]}),U(e_,{children:[C(gt,{path:"general",element:C(jb,{items:[C(r,{}),C(e,{})]})}),C(gt,{path:"short-urls",element:C(jb,{items:[C(t,{}),C(n,{})]})}),C(gt,{path:"other-items",element:C(jb,{items:[C(o,{}),C(i,{})]})}),C(gt,{path:"*",element:C(eC,{replace:!0,to:"general"})})]})]}),Bb=e=>e==="includes"?"Suggest tags including input":"Suggest tags starting with input",Ame=e=>e==="includes"?U(We,{children:["The list of suggested tags will contain those ",C("b",{children:"including"})," provided input."]}):U(We,{children:["The list of suggested tags will contain those ",C("b",{children:"starting with"})," provided input."]}),Ime=({settings:e,setShortUrlCreationSettings:t})=>{const n=e.shortUrlCreation??{validateUrls:!1},r=i=>()=>t({...n??{validateUrls:!1},tagFilteringMode:i});return U(fn,{title:"Short URLs form",className:"h-100",children:[C(yr,{children:U(Kc,{checked:n.validateUrls??!1,onChange:i=>t({...n,validateUrls:i}),children:["Request validation on long URLs when creating new short URLs.",U(Cc,{children:["The initial state of the ",C("b",{children:"Validate URL"})," checkbox will be ",C("b",{children:n.validateUrls?"checked":"unchecked"}),"."]})]})}),C(yr,{children:U(Kc,{checked:n.forwardQuery??!0,onChange:i=>t({...n,forwardQuery:i}),children:["Make all new short URLs forward their query params to the long URL.",U(Cc,{children:["The initial state of the ",C("b",{children:"Forward query params on redirect"})," checkbox will be ",C("b",{children:n.forwardQuery??!0?"checked":"unchecked"}),"."]})]})}),U(cu,{noMargin:!0,label:"Tag suggestions search mode:",children:[U(oa,{text:Bb(n.tagFilteringMode),children:[C(Ve,{active:!n.tagFilteringMode||n.tagFilteringMode==="startsWith",onClick:r("startsWith"),children:Bb("startsWith")}),C(Ve,{active:n.tagFilteringMode==="includes",onClick:r("includes"),children:Bb("includes")})]}),C(Cc,{children:Ame(n.tagFilteringMode)})]})]})},Z8={dateCreated:"Created at",shortCode:"Short URL",longUrl:"Long URL",title:"Title",visits:"Visits"};function hh({items:e,order:t,onChange:n,isButton:r=!0,right:i=!1,prefixed:o=!0}){const s=a=>()=>{const l=a_(a,t.field,t.dir);n(l?a:void 0,l)};return U(th,{children:[U(su,{caret:!0,color:r?"primary":"link",className:ge({"dropdown-btn__toggle btn-block pe-4 overflow-hidden":r,"btn-sm p-0":!r}),children:[!r&&C(We,{children:"Order by"}),r&&!t.field&&C("i",{children:"Order by..."}),r&&t.field&&U(We,{children:[o&&"Order by: ",e[t.field]," - ",C("small",{children:t.dir??"DESC"})]})]}),U(vl,{end:i,className:ge("w-100",{"ordering-dropdown__menu--link":!r}),children:[vw(e).map(([a,l])=>U(Ve,{active:t.field===a,onClick:s(a),children:[l,t.field===a&&C(Fe,{icon:t.dir==="ASC"?NQ:vQ,className:"ordering-dropdown__sort-icon"})]},a)),C(Ve,{divider:!0}),C(Ve,{disabled:!t.field,onClick:()=>n(),children:C("i",{children:"Clear selection"})})]})]})}const Fme=({settings:{shortUrlsList:e},setShortUrlsListSettings:t})=>C(fn,{title:"Short URLs list",className:"h-100",children:C(cu,{noMargin:!0,label:"Default ordering for short URLs list:",children:C(hh,{items:Z8,order:(e==null?void 0:e.defaultOrdering)??ZE,onChange:(n,r)=>t({defaultOrdering:{field:n,dir:r}})})})}),K8={tag:"Tag",shortUrls:"Short URLs",visits:"Visits"},$me=({settings:{tags:e},setTagsSettings:t})=>C(fn,{title:"Tags",className:"h-100",children:C(cu,{noMargin:!0,label:"Default ordering for tags list:",children:C(hh,{items:K8,order:(e==null?void 0:e.defaultOrdering)??{},onChange:(n,r)=>t({...e,defaultOrdering:{field:n,dir:r}})})})});const jme=({settings:{ui:e},setUiSettings:t})=>U(fn,{title:"User interface",className:"h-100",children:[C(Fe,{icon:(e==null?void 0:e.theme)==="dark"?YQ:DQ,className:"user-interface__theme-icon"}),C(Kc,{checked:(e==null?void 0:e.theme)==="dark",onChange:n=>{const r=n?"dark":"light";t({...e,theme:r}),I5(r)},children:"Use dark theme."})]}),X8=({active:e,allText:t,onChange:n})=>U(We,{children:[C(Ve,{active:e==="all",onClick:()=>n("all"),children:t}),C(Ve,{divider:!0}),spe.map(r=>C(Ve,{active:e===r,onClick:()=>n(r),children:qE(r)},r))]}),Bme=({onChange:e,active:t,allText:n})=>C(oa,{text:qE(t)??n,children:C(X8,{allText:n,active:t,onChange:e})}),IN=e=>{var t;return((t=e.visits)==null?void 0:t.defaultInterval)??"last30Days"},zme=({settings:e,setVisitsSettings:t})=>{var n,r;return U(fn,{title:"Visits",className:"h-100",children:[C(yr,{children:U(Kc,{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).",U(Cc,{children:["The visits coming from potential bots will be ",C("b",{children:(r=e.visits)!=null&&r.excludeBots?"excluded":"included"}),"."]})]})}),C(cu,{noMargin:!0,label:"Default interval to load on visits sections:",children:C(Bme,{allText:"All visits",active:IN(e),onChange:i=>t({defaultInterval:i})})})]})},Ume=(e,t)=>{e.serviceFactory("Settings",Dme,"RealTimeUpdatesSettings","ShortUrlCreationSettings","ShortUrlsListSettings","UserInterfaceSettings","VisitsSettings","TagsSettings"),e.decorator("Settings",gv),e.decorator("Settings",t(null,["resetSelectedServer"])),e.serviceFactory("RealTimeUpdatesSettings",()=>wme),e.decorator("RealTimeUpdatesSettings",t(["settings"],["toggleRealTimeUpdates","setRealTimeUpdatesInterval"])),e.serviceFactory("ShortUrlCreationSettings",()=>Ime),e.decorator("ShortUrlCreationSettings",t(["settings"],["setShortUrlCreationSettings"])),e.serviceFactory("UserInterfaceSettings",()=>jme),e.decorator("UserInterfaceSettings",t(["settings"],["setUiSettings"])),e.serviceFactory("VisitsSettings",()=>zme),e.decorator("VisitsSettings",t(["settings"],["setVisitsSettings"])),e.serviceFactory("TagsSettings",()=>$me),e.decorator("TagsSettings",t(["settings"],["setTagsSettings"])),e.serviceFactory("ShortUrlsListSettings",()=>Fme),e.decorator("ShortUrlsListSettings",t(["settings"],["setShortUrlsListSettings"])),e.serviceFactory("toggleRealTimeUpdates",()=>Tme),e.serviceFactory("setRealTimeUpdatesInterval",()=>Ome),e.serviceFactory("setShortUrlCreationSettings",()=>Pme),e.serviceFactory("setShortUrlsListSettings",()=>kme),e.serviceFactory("setUiSettings",()=>Mme),e.serviceFactory("setVisitsSettings",()=>Rme),e.serviceFactory("setTagsSettings",()=>Nme)},Vme=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}),Hme=(e,t)=>({createShortUrl:n,shortUrlCreation:r,resetCreateShortUrl:i,selectedServer:o,basicMode:s=!1,settings:{shortUrlCreation:a}})=>{const l=H.useMemo(()=>Vme(a),[a]);return U(We,{children:[C(e,{initialState:l,saving:r.saving,selectedServer:o,mode:s?"create-basic":"create",onSave:async c=>(i(),n(c))}),C(t,{creation:r,resetCreateShortUrl:i,canBeClosed:s})]})},Wme=e=>({settings:{shortUrlCreation:t},selectedServer:n,shortUrlDetail:r,getShortUrlDetail:i,shortUrlEdition:o,editShortUrl:s})=>{const{search:a}=kn(),l=Js(),c=ia(),{loading:f,error:h,errorData:p,shortUrl:m}=r,{saving:g,saved:v,error:w,errorData:y}=o,{domain:b}=gl(a),x=H.useMemo(()=>Iae(m,t),[m,t]);return H.useEffect(()=>{l.shortCode&&i({shortCode:gm(l.shortCode),domain:b})},[]),f?C(To,{loading:!0}):h?C(Dr,{type:"error",children:C(Io,{errorData:p,fallbackMessage:"An error occurred while loading short URL detail :("})}):U(We,{children:[C("header",{className:"mb-3",children:C(Er,{body:!0,children:U("h2",{className:"d-sm-flex justify-content-between align-items-center mb-0",children:[C(ht,{color:"link",size:"lg",className:"p-0 me-3",onClick:c,children:C(Fe,{icon:u6})}),C("span",{className:"text-center",children:U("small",{children:["Edit ",C(Ei,{href:(m==null?void 0:m.shortUrl)??""})]})}),C("span",{})]})})}),C(e,{initialState:x,saving:g,selectedServer:n,mode:"edit",onSave:async T=>{m&&s({...m,data:T})}}),v&&w&&C(Dr,{type:"error",className:"mt-3",children:C(Io,{errorData:y,fallbackMessage:"An error occurred while updating short URL :("})}),v&&!w&&C(Dr,{type:"success",className:"mt-3",children:"Short URL properly edited."})]})};var k_={},Yme=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var h=FN[t.format]||FN.default;window.clipboardData.setData(h,e)}else f.clipboardData.clearData(),f.clipboardData.setData(t.format,e);t.onCopy&&(f.preventDefault(),t.onCopy(f.clipboardData))}),document.body.appendChild(a),o.selectNodeContents(a),s.addRange(o);var c=document.execCommand("copy");if(!c)throw new Error("copy command was unsuccessful");l=!0}catch(f){n&&console.error("unable to copy using execCommand: ",f),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),l=!0}catch(h){n&&console.error("unable to copy using clipboardData: ",h),n&&console.error("falling back to prompt"),r=Zme("message"in t?t.message:Gme),window.prompt(r,e)}}finally{s&&(typeof s.removeRange=="function"?s.removeRange(o):s.removeAllRanges()),a&&document.body.removeChild(a),i()}return l}var Xme=Kme;function vx(e){return vx=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},vx(e)}Object.defineProperty(k_,"__esModule",{value:!0});k_.CopyToClipboard=void 0;var Ap=Q8(H),Qme=Q8(Xme),Jme=["text","onCopy","options","children"];function Q8(e){return e&&e.__esModule?e:{default:e}}function $N(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 jN(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function tge(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 nge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BN(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 oy(e){return oy=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},oy(e)}function KE(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var eF=function(e){ige(n,e);var t=oge(n);function n(){var r;nge(this,n);for(var i=arguments.length,o=new Array(i),s=0;s({creation:t,resetCreateShortUrl:n,canBeClosed:r=!1})=>{const[i,o]=e(),{error:s,saved:a}=t;if(H.useEffect(()=>{n()},[]),s)return U(Dr,{type:"error",className:"mt-3",children:[r&&C(Fe,{icon:Tw,className:"float-end pointer",onClick:n}),C(Io,{errorData:t.errorData,fallbackMessage:"An error occurred while creating the URL :("})]});if(!a)return null;const{shortUrl:l}=t.result;return U(Dr,{type:"success",className:"mt-3",children:[r&&C(Fe,{icon:Tw,className:"float-end pointer",onClick:n}),U("span",{children:[C("b",{children:"Great!"})," The short URL is ",C("b",{children:l})]}),C(tF,{text:l,onCopy:o,children:U("button",{className:"btn btn-light btn-sm create-short-url-result__copy-btn",id:"copyBtn",type:"button",children:[C(Fe,{icon:U8})," Copy"]})}),C(Jd,{placement:"left",isOpen:i,target:"copyBtn",children:"Copied!"})]})},zb="delete",uge=({shortUrl:e,toggle:t,isOpen:n,shortUrlDeletion:r,resetDeleteShortUrl:i,deleteShortUrl:o,shortUrlDeleted:s})=>{const[a,l]=H.useState("");H.useEffect(()=>i,[]);const{loading:c,error:f,deleted:h,errorData:p}=r,m=er(i,t),g=oh(()=>o(e).then(t));return C(Wo,{isOpen:n,toggle:m,centered:!0,onClosed:()=>h&&s(e),children:U("form",{onSubmit:g,children:[C(oo,{toggle:m,children:C("span",{className:"text-danger",children:"Delete short URL"})}),U(Ri,{children:[U("p",{children:[C("b",{className:"text-danger",children:"Caution!"})," You are about to delete a short URL."]}),C("p",{children:"This action cannot be undone. Once you have deleted it, all the visits stats will be lost."}),U("p",{children:["Write ",C("b",{children:zb})," to confirm deletion."]}),C("input",{type:"text",className:"form-control",placeholder:`Insert ${zb}`,value:a,onChange:v=>l(v.target.value)}),f&&C(Dr,{type:zX(p)?"warning":"error",small:!0,className:"mt-2",children:C(Io,{errorData:p,fallbackMessage:"Something went wrong while deleting the URL :("})})]}),U(ra,{children:[C("button",{type:"button",className:"btn btn-link",onClick:m,children:"Cancel"}),C("button",{type:"submit",className:"btn btn-danger",disabled:a!==zb||c,children:c?"Deleting...":"Delete"})]})]})})},nF=({amount:e=0,loading:t=!1,...n})=>U(ht,{...n,outline:!0,color:"primary",disabled:t,children:[C(Fe,{icon:tQ})," ",t?"Exporting...":U(We,{children:["Export (",bn(e),")"]})]}),M_=()=>{const e=Bo(),{search:t}=kn(),{serverId:n=""}=Js(),r=H.useMemo(er(()=>gl(t),({orderBy:o,tags:s,excludeBots:a,excludeMaxVisitsReached:l,excludePastValidUntil:c,...f})=>{const h=o?WZ(o):void 0,p=(s==null?void 0:s.split(","))??[];return{...f,orderBy:h,tags:p,excludeBots:a!==void 0?a==="true":void 0,excludeMaxVisitsReached:l!==void 0?l==="true":void 0,excludePastValidUntil:c!==void 0?c==="true":void 0}}),[t]);return[r,o=>{const s={...r,...o},{orderBy:a,tags:l,excludeBots:c,excludeMaxVisitsReached:f,excludePastValidUntil:h,...p}=s,m={...p,orderBy:a&&HI(a),tags:l.length>0?l.join(","):void 0,excludeBots:kb(c),excludeMaxVisitsReached:kb(f),excludePastValidUntil:kb(h)},g=Yd(m),v=Cr(g)?"":`?${g}`;e(`/server/${n}/list-short-urls/1${v}`)}]},zN=20,fge=(e,{exportShortUrls:t})=>({amount:n=0,selectedServer:r})=>{const[{tags:i,search:o,startDate:s,endDate:a,orderBy:l,tagsMode:c}]=M_(),[f,,h,p]=$t();return C(nF,{loading:f,className:"btn-md-block",amount:n,onClick:async()=>{if(!Rs(r))return;const g=n/zN,{listShortUrls:v}=e(r),w=async(b=1)=>{const{data:x}=await v({page:`${b}`,tags:i,searchTerm:o,startDate:s,endDate:a,orderBy:l,tagsMode:c,itemsPerPage:zN});return b>=g?x:x.concat(await w(b+1))};h();const y=await w();t(y.map(b=>{var x;return{createdAt:b.dateCreated,shortUrl:b.shortUrl,longUrl:b.longUrl,title:b.title??"",tags:b.tags.join(","),visits:((x=b==null?void 0:b.visitsSummary)==null?void 0:x.total)??b.visitsCount}})),p()}})};const rF=({text:e,onCopy:t})=>C(tF,{text:e,onCopy:t,children:C(Fe,{icon:U8,className:"ms-2 copy-to-clipboard-icon"})}),dge=(e,{margin:t,...n})=>{const r=`${e}/qr-code`,i=Yd({...n,margin:t>0?t:void 0});return`${r}${Cr(i)?"":`?${i}`}`},hge=({errorCorrection:e,setErrorCorrection:t})=>U(oa,{text:`Error correction (${e})`,children:[U(Ve,{active:e==="L",onClick:()=>t("L"),children:[C("b",{children:"L"}),"ow"]}),U(Ve,{active:e==="M",onClick:()=>t("M"),children:[C("b",{children:"M"}),"edium"]}),U(Ve,{active:e==="Q",onClick:()=>t("Q"),children:[C("b",{children:"Q"}),"uartile"]}),U(Ve,{active:e==="H",onClick:()=>t("H"),children:[C("b",{children:"H"}),"igh"]})]}),pge=({format:e,setFormat:t})=>U(oa,{text:`Format (${e})`,children:[C(Ve,{active:e==="png",onClick:()=>t("png"),children:"PNG"}),C(Ve,{active:e==="svg",onClick:()=>t("svg"),children:"SVG"})]});const mge=e=>({shortUrl:{shortUrl:t,shortCode:n},toggle:r,isOpen:i,selectedServer:o})=>{const[s,a]=H.useState(300),[l,c]=H.useState(0),[f,h]=H.useState("png"),[p,m]=H.useState("L"),g=Mi("nonRestCors",o),v=H.useMemo(()=>dge(t,{size:s,format:f,margin:l,errorCorrection:p}),[t,s,f,l,p]),w=H.useMemo(()=>s+l,[s,l]),y=H.useMemo(()=>{if(!(w<500))return w<800?"lg":"xl"},[w]);return U(Wo,{isOpen:i,toggle:r,centered:!0,size:y,children:[U(oo,{toggle:r,children:["QR code for ",C(Ei,{href:t,children:t})]}),U(Ri,{children:[U(Qn,{children:[U(yr,{className:"d-grid col-md-4",children:[U("label",{children:["Size: ",s,"px"]}),C("input",{type:"range",className:"form-control-range",value:s,step:10,min:50,max:1e3,onChange:b=>a(Number(b.target.value))})]}),U(yr,{className:"d-grid col-md-4",children:[U("label",{htmlFor:"marginControl",children:["Margin: ",l,"px"]}),C("input",{id:"marginControl",type:"range",className:"form-control-range",value:l,step:1,min:0,max:100,onChange:b=>c(Number(b.target.value))})]}),C(yr,{className:"d-grid col-md-4",children:C(pge,{format:f,setFormat:h})}),C(yr,{className:"col-md-6",children:C(hge,{errorCorrection:p,setErrorCorrection:m})})]}),U("div",{className:"text-center",children:[U("div",{className:"mb-3",children:[C(Ei,{href:v}),C(rF,{text:v})]}),C("img",{src:v,className:"qr-code-modal__img",alt:"QR code"}),g&&C("div",{className:"mt-3",children:U(ht,{block:!0,color:"primary",onClick:()=>{e.saveImage(v,`${n}-qr-code.${f}`).catch(()=>{})},children:["Download ",C(Fe,{icon:f6,className:"ms-1"})]})})]})]})]})},sy=({date:e,format:t=WE,relative:n=!1})=>{const r=YE(e)?e:Fo(e);return C("time",{dateTime:`${vce(r)}000`,children:n?`${uce(Ys(),r)} ago`:_o(r,t)})},gge=e=>{const{meta:t,visitsCount:n,visitsSummary:r}=e,{maxVisits:i,validSince:o,validUntil:s}=t,a=(r==null?void 0:r.total)??n;return i&&a>=i?{icon:qQ,className:"text-danger",description:U(We,{children:["This short URL cannot be currently visited because it has reached the maximum amount of ",C("b",{children:i})," visit",i>1?"s":"","."]})}:s&&Kr(wi(s),Ys())?{icon:NM,className:"text-danger",description:U(We,{children:["This short URL cannot be visited since ",C("b",{className:"indivisible",children:ny(wi(s))}),"."]})}:o&&Kr(Ys(),wi(o))?{icon:NM,className:"text-warning",description:U(We,{children:["This short URL will start working on ",C("b",{className:"indivisible",children:ny(wi(o))}),"."]})}:{icon:pd,className:"text-primary",description:"This short URL can be visited normally."}},vge=({shortUrl:e})=>{const t=yl(),{icon:n,className:r,description:i}=gge(e);return U(We,{children:[C("span",{style:{cursor:i?"help":void 0},ref:t,children:C(Fe,{icon:n,className:r})}),C(Or,{target:t,placement:"bottom",children:i})]})},yge=({id:e},{shortCode:t,domain:n},r)=>{const i=n?`?domain=${n}`:"";return`/server/${e}/short-code/${Fae(t)}/${r}${i}`},bx=({selectedServer:e,shortUrl:t,suffix:n,children:r,...i})=>!e||!Rs(e)||!t?C("span",{...i,children:r}):C(At,{to:yge(e,t,n),...i,children:r});const iF=({visitsCount:e,shortUrl:t,selectedServer:n,active:r=!1})=>{const{maxVisits:i,validSince:o,validUntil:s}=(t==null?void 0:t.meta)??{},a=!!i||!!o||!!s,l=C(bx,{selectedServer:n,shortUrl:t,suffix:"visits",children:C("strong",{className:ge("short-url-visits-count__amount",{"short-url-visits-count__amount--big":r}),children:bn(e)})});if(!a)return l;const c=yl();return U(We,{children:[U("span",{className:"indivisible",children:[l,U("small",{className:"short-urls-visits-count__max-visits-control",ref:c,children:[i&&U(We,{children:[" / ",bn(i)]}),C("sup",{className:"ms-1",children:C(Fe,{icon:CC})})]})]}),C(Or,{target:c,placement:"bottom",children:U("ul",{className:"list-unstyled mb-0",children:[i&&U("li",{className:"short-url-visits-count__tooltip-list-item",children:["This short URL will not accept more than ",C("b",{children:bn(i)})," visit",i===1?"":"s","."]}),o&&U("li",{className:"short-url-visits-count__tooltip-list-item",children:["This short URL will not accept visits before ",C("b",{className:"indivisible",children:ny(wi(o))}),"."]}),s&&U("li",{className:"short-url-visits-count__tooltip-list-item",children:["This short URL will not accept visits after ",C("b",{className:"indivisible",children:ny(wi(s))}),"."]})]})})]})};const XE=({text:e,children:t,clearable:n,className:r="",colorGenerator:i,onClick:o,onClose:s})=>U("span",{className:ge("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&&C("span",{"aria-label":`Remove ${e}`,className:"close tag__close-selected-tag",onClick:s,children:"×"})]}),_ge=({tags:e,onTagClick:t,colorGenerator:n})=>Cr(e)?C("i",{className:"indivisible",children:C("small",{children:"No tags"})}):C(We,{children:e.map(r=>C(XE,{text:r,colorGenerator:n,onClick:()=>t==null?void 0:t(r)},r))});const bge=(e,t,n)=>({shortUrl:r,selectedServer:i,onTagClick:o,settings:s})=>{var v,w,y,b;const[a,l]=n(),[c,f]=n(!1,500),h=H.useRef(!0),[{excludeBots:p}]=M_(),{visits:m}=s,g=p??(m==null?void 0:m.excludeBots);return H.useEffect(()=>{!h.current&&f(),h.current=!1},[(v=r.visitsSummary)==null?void 0:v.total,(w=r.visitsSummary)==null?void 0:w.nonBots,r.visitsCount]),U("tr",{className:"responsive-table__row",children:[C("td",{className:"indivisible short-urls-row__cell responsive-table__cell","data-th":"Created at",children:C(sy,{date:r.dateCreated})}),C("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Short URL",children:U("span",{className:"position-relative short-urls-row__cell--indivisible",children:[C("span",{className:"short-urls-row__short-url-wrapper",children:C(Ei,{href:r.shortUrl})}),C(rF,{text:r.shortUrl,onCopy:l}),C("span",{className:"badge bg-warning text-black short-urls-row__copy-hint",hidden:!a,children:"Copied short URL!"})]})}),C("td",{className:"responsive-table__cell short-urls-row__cell short-urls-row__cell--break","data-th":`${r.title?"Title":"Long URL"}`,children:C(Ei,{href:r.longUrl,children:r.title??r.longUrl})}),r.title&&C("td",{className:"short-urls-row__cell responsive-table__cell short-urls-row__cell--break d-lg-none","data-th":"Long URL",children:C(Ei,{href:r.longUrl})}),C("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Tags",children:C(_ge,{tags:r.tags,colorGenerator:t,onTagClick:o})}),C("td",{className:"responsive-table__cell short-urls-row__cell text-lg-end","data-th":"Visits",children:C(iF,{visitsCount:(g?(y=r.visitsSummary)==null?void 0:y.nonBots:(b=r.visitsSummary)==null?void 0:b.total)??r.visitsCount,shortUrl:r,selectedServer:i,active:c})}),C("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Status",children:C(vge,{shortUrl:r})}),C("td",{className:"responsive-table__cell short-urls-row__cell",children:C(e,{selectedServer:i,shortUrl:r})})]})},wge=(e,t)=>({shortUrl:n,selectedServer:r})=>{const[i,o]=$t(),[s,,a,l]=$t(),[c,,f,h]=$t();return U(O_,{toggle:o,isOpen:i,children:[U(Ve,{tag:bx,selectedServer:r,shortUrl:n,suffix:"visits",children:[C(Fe,{icon:SC,fixedWidth:!0})," Visit stats"]}),U(Ve,{tag:bx,selectedServer:r,shortUrl:n,suffix:"edit",children:[C(Fe,{icon:xC,fixedWidth:!0})," Edit short URL"]}),U(Ve,{onClick:a,children:[C(Fe,{icon:WQ,fixedWidth:!0})," QR code"]}),C(t,{shortUrl:n,isOpen:s,toggle:l}),C(Ve,{divider:!0}),U(Ve,{className:"dropdown-item--danger",onClick:f,children:[C(Fe,{icon:wC,fixedWidth:!0})," Delete short URL"]}),C(e,{shortUrl:n,isOpen:c,toggle:h})]})},oF="shlink/shortUrlCreation",UN={saving:!1,saved:!1,error:!1},xge=e=>ir(`${oF}/createShortUrl`,(t,{getState:n})=>e(n).createShortUrl(t)),Sge=e=>{const{reducer:t,actions:n}=Yn({name:oF,initialState:UN,reducers:{resetCreateShortUrl:()=>UN},extraReducers:i=>{i.addCase(e.pending,()=>({saving:!0,saved:!1,error:!1})),i.addCase(e.rejected,(o,{error:s})=>({saving:!1,saved:!1,error:!0,errorData:io(s)})),i.addCase(e.fulfilled,(o,{payload:s})=>({result:s,saving:!1,saved:!0,error:!1}))}}),{resetCreateShortUrl:r}=n;return{reducer:t,resetCreateShortUrl:r}},VN="shlink/shortUrlDetail",HN={loading:!1,error:!1},Cge=e=>{const t=ir(`${VN}/getShortUrlDetail`,async({shortCode:r,domain:i},{getState:o})=>{var l;const{shortUrlsList:s}=o();return((l=s==null?void 0:s.shortUrls)==null?void 0:l.data.find(c=>Mf(c,r,i)))??await e(o).getShortUrl(r,i)}),{reducer:n}=Yn({name:VN,initialState:HN,reducers:{},extraReducers:r=>{r.addCase(t.pending,()=>({loading:!0,error:!1})),r.addCase(t.rejected,(i,{error:o})=>({loading:!1,error:!0,errorData:io(o)})),r.addCase(t.fulfilled,(i,{payload:o})=>({...HN,shortUrl:o}))}});return{reducer:n,getShortUrlDetail:t}},sF="shlink/shortUrlEdition",Ege={saving:!1,saved:!1,error:!1},Tge=e=>ir(`${sF}/editShortUrl`,({shortCode:t,domain:n,data:r},{getState:i})=>{const{updateShortUrl:o}=e(i);return o(t,n,r)}),Oge=e=>Yn({name:sF,initialState:Ege,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:io(r)})),t.addCase(e.fulfilled,(n,{payload:r})=>({shortUrl:r,saving:!1,error:!1,saved:!0}))}});var Pge={prefix:"fab",iconName:"apple",icon:[384,512,[],"f179","M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z"]},kge={prefix:"fab",iconName:"android",icon:[576,512,[],"f17b","M420.55,301.93a24,24,0,1,1,24-24,24,24,0,0,1-24,24m-265.1,0a24,24,0,1,1,24-24,24,24,0,0,1-24,24m273.7-144.48,47.94-83a10,10,0,1,0-17.27-10h0l-48.54,84.07a301.25,301.25,0,0,0-246.56,0L116.18,64.45a10,10,0,1,0-17.27,10h0l47.94,83C64.53,202.22,8.24,285.55,0,384H576c-8.24-98.45-64.54-181.78-146.85-226.55"]};const aF=e=>C(q8,{type:"checkbox",...e});function Mge(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,wx(e,t)}function wx(e,t){return wx=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},wx(e,t)}function Rge(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 WN(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Nge(e,t,n){return e===t?!0:e.correspondingElement?e.correspondingElement.classList.contains(n):e.classList.contains(n)}function Lge(e,t,n){if(e===t)return!0;for(;e.parentNode||e.host;){if(e.parentNode&&Nge(e,t,n))return!0;e=e.parentNode||e.host}return e}function Dge(e){return document.documentElement.clientWidth<=e.clientX||document.documentElement.clientHeight<=e.clientY}var Age=function(){if(!(typeof window>"u"||typeof window.addEventListener!="function")){var t=!1,n=Object.defineProperty({},"passive",{get:function(){t=!0}}),r=function(){};return window.addEventListener("testPassiveEventSupport",r,n),window.removeEventListener("testPassiveEventSupport",r,n),t}};function Ige(e){return e===void 0&&(e=0),function(){return++e}}var Fge=Ige(),xx,Ip={},Ub={},$ge=["touchstart","touchmove"],jge="ignore-react-onclickoutside";function YN(e,t){var n=null,r=$ge.indexOf(t)!==-1;return r&&xx&&(n={passive:!e.props.preventDefault}),n}function R_(e,t){var n,r,i=e.displayName||e.name||"Component";return r=n=function(o){Mge(s,o);function s(l){var c;return c=o.call(this,l)||this,c.__outsideClickHandler=function(f){if(typeof c.__clickOutsideHandlerProp=="function"){c.__clickOutsideHandlerProp(f);return}var h=c.getInstance();if(typeof h.props.handleClickOutside=="function"){h.props.handleClickOutside(f);return}if(typeof h.handleClickOutside=="function"){h.handleClickOutside(f);return}throw new Error("WrappedComponent: "+i+" lacks a handleClickOutside(event) function for processing outside click events.")},c.__getComponentNode=function(){var f=c.getInstance();return t&&typeof t.setClickOutsideRef=="function"?t.setClickOutsideRef()(f):typeof f.setClickOutsideRef=="function"?f.setClickOutsideRef():Za.findDOMNode(f)},c.enableOnClickOutside=function(){if(!(typeof document>"u"||Ub[c._uid])){typeof xx>"u"&&(xx=Age()),Ub[c._uid]=!0;var f=c.props.eventTypes;f.forEach||(f=[f]),Ip[c._uid]=function(h){if(c.componentNode!==null&&(c.props.preventDefault&&h.preventDefault(),c.props.stopPropagation&&h.stopPropagation(),!(c.props.excludeScrollbar&&Dge(h)))){var p=h.composed&&h.composedPath&&h.composedPath().shift()||h.target;Lge(p,c.componentNode,c.props.outsideClickIgnoreClass)===document&&c.__outsideClickHandler(h)}},f.forEach(function(h){document.addEventListener(h,Ip[c._uid],YN(WN(c),h))})}},c.disableOnClickOutside=function(){delete Ub[c._uid];var f=Ip[c._uid];if(f&&typeof document<"u"){var h=c.props.eventTypes;h.forEach||(h=[h]),h.forEach(function(p){return document.removeEventListener(p,f,YN(WN(c),p))}),delete Ip[c._uid]}},c.getRef=function(f){return c.instanceRef=f},c._uid=Fge(),c}var a=s.prototype;return a.getInstance=function(){if(e.prototype&&!e.prototype.isReactComponent)return this;var c=this.instanceRef;return c.getInstance?c.getInstance():c},a.componentDidMount=function(){if(!(typeof document>"u"||!document.createElement)){var c=this.getInstance();if(t&&typeof t.handleClickOutside=="function"&&(this.__clickOutsideHandlerProp=t.handleClickOutside(c),typeof this.__clickOutsideHandlerProp!="function"))throw new Error("WrappedComponent: "+i+" lacks a function for processing outside click events specified by the handleClickOutside config option.");this.componentNode=this.__getComponentNode(),!this.props.disableOnClickOutside&&this.enableOnClickOutside()}},a.componentDidUpdate=function(){this.componentNode=this.__getComponentNode()},a.componentWillUnmount=function(){this.disableOnClickOutside()},a.render=function(){var c=this.props;c.excludeScrollbar;var f=Rge(c,["excludeScrollbar"]);return e.prototype&&e.prototype.isReactComponent?f.ref=this.getRef:f.wrappedRef=this.getRef,f.disableOnClickOutside=this.disableOnClickOutside,f.enableOnClickOutside=this.enableOnClickOutside,H.createElement(e,f)},s}(H.Component),n.displayName="OnClickOutside("+i+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:jge,preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},r}var lF=H.createContext(),cF=H.createContext();function Bge(e){var t=e.children,n=H.useState(null),r=n[0],i=n[1],o=H.useRef(!1);H.useEffect(function(){return function(){o.current=!0}},[]);var s=H.useCallback(function(a){o.current||i(a)},[]);return H.createElement(lF.Provider,{value:r},H.createElement(cF.Provider,{value:s},t))}var uF=function(t){return Array.isArray(t)?t[0]:t},fF=function(t){if(typeof t=="function"){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Cx(e);if(t){var i=Cx(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Gge(this,n)}}function pF(e){return function(t){if(Array.isArray(t))return Vb(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 Vb(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 Vb(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 Vb(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(o=Ab(e,t.slice(0,e.length),new Date)),os(o)||(o=new Date(e))),os(o)&&a?o:null)}function os(e,t){return t=t||new Date("1/1/1000"),p8(e)&&!Kr(e,t)}function an(e,t,n){if(n==="en")return _o(e,t,{awareOfUnicodeTokens:!0});var r=As(n);return n&&!r&&console.warn('A locale object was not found for the provided string ["'.concat(n,'"].')),!r&&Ya()&&As(Ya())&&(r=As(Ya())),_o(e,t,{locale:r||null,awareOfUnicodeTokens:!0})}function Hb(e,t){var n=t.dateFormat,r=t.locale;return e&&an(e,Array.isArray(n)?n[0]:n,r)||""}function eL(e,t){var n=t.hour,r=n===void 0?0:n,i=t.minute,o=i===void 0?0:i,s=t.second;return Rf(Nf(ipe(e,s===void 0?0:s),o),r)}function Qge(e,t){var n=t&&As(t)||Ya()&&As(Ya());return mce(e,n?{locale:n}:null)}function Jge(e,t){return an(e,"ddd",t)}function eve(e){return Ar(e)}function QE(e,t,n){var r=As(t||Ya());return h8(e,{locale:r,weekStartsOn:n})}function Wa(e){return ele(e)}function of(e){return tle(e)}function tve(e){return o2(e)}function mF(e,t){return e&&t?Uhe(e,t):!e&&!t}function _s(e,t){return e&&t?Bhe(e,t):!e&&!t}function ay(e,t){return e&&t?zhe(e,t):!e&&!t}function mr(e,t){return e&&t?qae(e,t):!e&&!t}function bs(e,t){return e&&t?S8(e,t):!e&&!t}function sg(e,t,n){var r,i=Ar(t),o=ll(n);try{r=Zc(e,{start:i,end:o})}catch{r=!1}return r}function Ya(){return(typeof window<"u"?window:globalThis).__localeId__}function As(e){if(typeof e=="string"){var t=typeof window<"u"?window:globalThis;return t.__localeData__?t.__localeData__[e]:null}return e}function gF(e,t){return an(qi(pn(),e),"LLLL",t)}function vF(e,t){return an(qi(pn(),e),"LLL",t)}function nve(e,t){return an(rf(pn(),e),"QQQ",t)}function L_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate,i=t.excludeDates,o=t.excludeDateIntervals,s=t.includeDates,a=t.includeDateIntervals,l=t.filterDate;return D_(e,{minDate:n,maxDate:r})||i&&i.some(function(c){return mr(e,c)})||o&&o.some(function(c){var f=c.start,h=c.end;return Zc(e,{start:f,end:h})})||s&&!s.some(function(c){return mr(e,c)})||a&&!a.some(function(c){var f=c.start,h=c.end;return Zc(e,{start:f,end:h})})||l&&!l(pn(e))||!1}function JE(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.excludeDates,r=t.excludeDateIntervals;return r&&r.length>0?r.some(function(i){var o=i.start,s=i.end;return Zc(e,{start:o,end:s})}):n&&n.some(function(i){return mr(e,i)})||!1}function rve(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate,i=t.excludeDates,o=t.includeDates,s=t.filterDate;return D_(e,{minDate:n,maxDate:r})||i&&i.some(function(a){return _s(e,a)})||o&&!o.some(function(a){return _s(e,a)})||s&&!s(pn(e))||!1}function ive(e,t,n,r){var i=dt(e),o=cr(e),s=dt(t),a=cr(t),l=dt(r);return i===s&&i===l?o<=n&&n<=a:i=n||li:void 0}function ove(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate,i=t.excludeDates,o=t.includeDates,s=t.filterDate;return D_(e,{minDate:n,maxDate:r})||i&&i.some(function(a){return ay(e,a)})||o&&!o.some(function(a){return ay(e,a)})||s&&!s(pn(e))||!1}function sve(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate,i=new Date(e,0,1);return D_(i,{minDate:n,maxDate:r})||!1}function ave(e,t,n,r){var i=dt(e),o=i2(e),s=dt(t),a=i2(t),l=dt(r);return i===s&&i===l?o<=n&&n<=a:i=n||li:void 0}function D_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate;return n&&Od(e,n)<0||r&&Od(e,r)>0}function tL(e,t){return t.some(function(n){return Ti(n)===Ti(e)&&Oi(n)===Oi(e)})}function nL(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.excludeTimes,r=t.includeTimes,i=t.filterTime;return n&&tL(e,n)||r&&!tL(e,r)||i&&!i(e)||!1}function rL(e,t){var n=t.minTime,r=t.maxTime;if(!n||!r)throw new Error("Both minTime and maxTime props required");var i,o=pn(),s=Rf(Nf(o,Oi(e)),Ti(e)),a=Rf(Nf(o,Oi(n)),Ti(n)),l=Rf(Nf(o,Oi(r)),Ti(r));try{i=!Zc(s,{start:a,end:l})}catch{i=!1}return i}function iL(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.includeDates,i=kd(e,1);return n&&Pd(n,i)>0||r&&r.every(function(o){return Pd(o,i)>0})||!1}function oL(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.maxDate,r=t.includeDates,i=ro(e,1);return n&&Pd(i,n)>0||r&&r.every(function(o){return Pd(i,o)>0})||!1}function sL(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.includeDates,i=Md(e,1);return n&&yv(n,i)>0||r&&r.every(function(o){return yv(o,i)>0})||!1}function aL(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.maxDate,r=t.includeDates,i=qc(e,1);return n&&yv(i,n)>0||r&&r.every(function(o){return yv(i,o)>0})||!1}function yF(e){var t=e.minDate,n=e.includeDates;if(n&&t){var r=n.filter(function(i){return Od(i,t)>=0});return iR(r)}return n?iR(n):t}function _F(e){var t=e.maxDate,n=e.includeDates;if(n&&t){var r=n.filter(function(i){return Od(i,t)<=0});return rR(r)}return n?rR(n):t}function lL(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"react-datepicker__day--highlighted",n=new Map,r=0,i=e.length;r1&&arguments[1]!==void 0?arguments[1]:12,n=Math.ceil(dt(e)/t)*t,r=n-(t-1);return{startPeriod:r,endPeriod:n}}function cve(e,t,n,r){for(var i=[],o=0;o<2*t+1;o++){var s=e+t-o,a=!0;n&&(a=dt(n)<=s),r&&a&&(a=dt(r)>=s),a&&i.push(s)}return i}var uve=R_(function(e){Nn(n,V.Component);var t=Ln(n);function n(r){var i;Mn(this,n),ie(ce(i=t.call(this,r)),"renderOptions",function(){var l=i.props.year,c=i.state.yearsList.map(function(p){return V.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(ce(i),p),"aria-selected":l===p?"true":void 0},l===p?V.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",p)}),f=i.props.minDate?dt(i.props.minDate):null,h=i.props.maxDate?dt(i.props.maxDate):null;return h&&i.state.yearsList.find(function(p){return p===h})||c.unshift(V.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:i.incrementYears},V.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),f&&i.state.yearsList.find(function(p){return p===f})||c.push(V.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:i.decrementYears},V.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),c}),ie(ce(i),"onChange",function(l){i.props.onChange(l)}),ie(ce(i),"handleClickOutside",function(){i.props.onCancel()}),ie(ce(i),"shiftYears",function(l){var c=i.state.yearsList.map(function(f){return f+l});i.setState({yearsList:c})}),ie(ce(i),"incrementYears",function(){return i.shiftYears(1)}),ie(ce(i),"decrementYears",function(){return i.shiftYears(-1)});var o=r.yearDropdownItemNumber,s=r.scrollableYearDropdown,a=o||(s?10:5);return i.state={yearsList:cve(i.props.year,a,i.props.minDate,i.props.maxDate)},i.dropdownRef=H.createRef(),i}return Rn(n,[{key:"componentDidMount",value:function(){var r=this.dropdownRef.current;r&&(r.scrollTop=r.scrollHeight/2-r.clientHeight/2)}},{key:"render",value:function(){var r=ge({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return V.createElement("div",{className:r,ref:this.dropdownRef},this.renderOptions())}}]),n}()),fve=function(e){Nn(n,V.Component);var t=Ln(n);function n(){var r;Mn(this,n);for(var i=arguments.length,o=new Array(i),s=0;s0&&arguments[0]!==void 0?arguments[0]:{},l=!1;r.getTabIndex()===0&&!a.isInputFocused&&r.isSameDay(r.props.preSelection)&&(document.activeElement&&document.activeElement!==document.body||(l=!0),r.props.inline&&!r.props.shouldFocusDayInline&&(l=!1),r.props.containerRef&&r.props.containerRef.current&&r.props.containerRef.current.contains(document.activeElement)&&document.activeElement.classList.contains("react-datepicker__day")&&(l=!0)),l&&r.dayEl.current.focus({preventScroll:!0})}),ie(ce(r),"renderDayContents",function(){return r.props.monthShowsDuplicateDaysEnd&&r.isAfterMonth()||r.props.monthShowsDuplicateDaysStart&&r.isBeforeMonth()?null:r.props.renderDayContents?r.props.renderDayContents(fR(r.props.day),r.props.day):fR(r.props.day)}),ie(ce(r),"render",function(){return V.createElement("div",{ref:r.dayEl,className:r.getClassNames(r.props.day),onKeyDown:r.handleOnKeyDown,onClick:r.handleClick,onMouseEnter:r.handleMouseEnter,tabIndex:r.getTabIndex(),"aria-label":r.getAriaLabel(),role:"option","aria-disabled":r.isDisabled(),"aria-current":r.isCurrentDay()?"date":void 0,"aria-selected":r.isSelected()},r.renderDayContents())}),r}return Rn(n,[{key:"componentDidMount",value:function(){this.handleFocusDay()}},{key:"componentDidUpdate",value:function(r){this.handleFocusDay(r)}}]),n}(),yve=function(e){Nn(n,V.Component);var t=Ln(n);function n(){var r;Mn(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=6,m=!l&&!r.isWeekInMonth(h);if(p||m){if(!r.props.peekNextMonth)break;f=!0}}return a}),ie(ce(r),"onMonthClick",function(a,l){r.handleDayClick(Wa(qi(r.props.day,l)),a)}),ie(ce(r),"handleMonthNavigation",function(a,l){r.isDisabled(l)||r.isExcluded(l)||(r.props.setPreSelection(l),r.MONTH_REFS[a].current&&r.MONTH_REFS[a].current.focus())}),ie(ce(r),"onMonthKeyDown",function(a,l){var c=a.key;if(!r.props.disabledKeyboardNavigation)switch(c){case"Enter":r.onMonthClick(a,l),r.props.setPreSelection(r.props.selected);break;case"ArrowRight":r.handleMonthNavigation(l===11?0:l+1,ro(r.props.preSelection,1));break;case"ArrowLeft":r.handleMonthNavigation(l===0?11:l-1,kd(r.props.preSelection,1))}}),ie(ce(r),"onQuarterClick",function(a,l){r.handleDayClick(tve(rf(r.props.day,l)),a)}),ie(ce(r),"getMonthClassNames",function(a){var l=r.props,c=l.day,f=l.startDate,h=l.endDate,p=l.selected,m=l.minDate,g=l.maxDate,v=l.preSelection,w=l.monthClassName,y=w?w(c):void 0;return ge("react-datepicker__month-text","react-datepicker__month-".concat(a),y,{"react-datepicker__month--disabled":(m||g)&&rve(qi(c,a),r.props),"react-datepicker__month--selected":r.isSelectedMonth(c,a,p),"react-datepicker__month-text--keyboard-selected":cr(v)===a,"react-datepicker__month--in-range":ive(f,h,a,c),"react-datepicker__month--range-start":r.isRangeStartMonth(a),"react-datepicker__month--range-end":r.isRangeEndMonth(a),"react-datepicker__month-text--today":r.isCurrentMonth(c,a)})}),ie(ce(r),"getTabIndex",function(a){var l=cr(r.props.preSelection);return r.props.disabledKeyboardNavigation||a!==l?"-1":"0"}),ie(ce(r),"getAriaLabel",function(a){var l=r.props,c=l.chooseDayAriaLabelPrefix,f=c===void 0?"Choose":c,h=l.disabledDayAriaLabelPrefix,p=h===void 0?"Not available":h,m=l.day,g=qi(m,a),v=r.isDisabled(g)||r.isExcluded(g)?p:f;return"".concat(v," ").concat(an(g,"MMMM yyyy"))}),ie(ce(r),"getQuarterClassNames",function(a){var l=r.props,c=l.day,f=l.startDate,h=l.endDate,p=l.selected,m=l.minDate,g=l.maxDate;return ge("react-datepicker__quarter-text","react-datepicker__quarter-".concat(a),{"react-datepicker__quarter--disabled":(m||g)&&ove(rf(c,a),r.props),"react-datepicker__quarter--selected":r.isSelectedQuarter(c,a,p),"react-datepicker__quarter--in-range":ave(f,h,a,c),"react-datepicker__quarter--range-start":r.isRangeStartQuarter(a),"react-datepicker__quarter--range-end":r.isRangeEndQuarter(a)})}),ie(ce(r),"renderMonths",function(){var a=r.props,l=a.showFullMonthYearPicker,c=a.showTwoColumnMonthYearPicker,f=a.showFourColumnMonthYearPicker,h=a.locale,p=a.day,m=a.selected;return(f?[[0,1,2,3],[4,5,6,7],[8,9,10,11]]:c?[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]]:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]]).map(function(g,v){return V.createElement("div",{className:"react-datepicker__month-wrapper",key:v},g.map(function(w,y){return V.createElement("div",{ref:r.MONTH_REFS[w],key:y,onClick:function(b){r.onMonthClick(b,w)},onKeyDown:function(b){r.onMonthKeyDown(b,w)},tabIndex:r.getTabIndex(w),className:r.getMonthClassNames(w),role:"option","aria-label":r.getAriaLabel(w),"aria-current":r.isCurrentMonth(p,w)?"date":void 0,"aria-selected":r.isSelectedMonth(p,w,m)},l?gF(w,h):vF(w,h))}))})}),ie(ce(r),"renderQuarters",function(){var a=r.props,l=a.day,c=a.selected;return V.createElement("div",{className:"react-datepicker__quarter-wrapper"},[1,2,3,4].map(function(f,h){return V.createElement("div",{key:h,role:"option",onClick:function(p){r.onQuarterClick(p,f)},className:r.getQuarterClassNames(f),"aria-selected":r.isSelectedQuarter(l,f,c)},nve(f,r.props.locale))}))}),ie(ce(r),"getClassNames",function(){var a=r.props;a.day;var l=a.selectingDate,c=a.selectsStart,f=a.selectsEnd,h=a.showMonthYearPicker,p=a.showQuarterYearPicker;return ge("react-datepicker__month",{"react-datepicker__month--selecting-range":l&&(c||f)},{"react-datepicker__monthPicker":h},{"react-datepicker__quarterPicker":p})}),r}return Rn(n,[{key:"render",value:function(){var r=this.props,i=r.showMonthYearPicker,o=r.showQuarterYearPicker,s=r.day,a=r.ariaLabelPrefix,l=a===void 0?"month ":a;return V.createElement("div",{className:this.getClassNames(),onMouseLeave:this.handleMouseLeave,"aria-label":"".concat(l," ").concat(an(s,"yyyy-MM")),role:"listbox"},i?this.renderMonths():o?this.renderQuarters():this.renderWeeks())}}]),n}(),bF=function(e){Nn(n,V.Component);var t=Ln(n);function n(){var r;Mn(this,n);for(var i=arguments.length,o=new Array(i),s=0;s0&&arguments[0]!==void 0?arguments[0]:{}).className||"").split(/\s+/);return Cve.some(function(a){return s.indexOf(a)>=0})})(o.target)&&i.props.onDropdownFocus()}),ie(ce(i),"getDateInView",function(){var o=i.props,s=o.preSelection,a=o.selected,l=o.openToDate,c=yF(i.props),f=_F(i.props),h=pn(),p=l||a||s;return p||(c&&Kr(h,c)?c:f&&Ws(h,f)?f:h)}),ie(ce(i),"increaseMonth",function(){i.setState(function(o){var s=o.date;return{date:ro(s,1)}},function(){return i.handleMonthChange(i.state.date)})}),ie(ce(i),"decreaseMonth",function(){i.setState(function(o){var s=o.date;return{date:kd(s,1)}},function(){return i.handleMonthChange(i.state.date)})}),ie(ce(i),"handleDayClick",function(o,s,a){i.props.onSelect(o,s,a),i.props.setPreSelection&&i.props.setPreSelection(o)}),ie(ce(i),"handleDayMouseEnter",function(o){i.setState({selectingDate:o}),i.props.onDayMouseEnter&&i.props.onDayMouseEnter(o)}),ie(ce(i),"handleMonthMouseLeave",function(){i.setState({selectingDate:null}),i.props.onMonthMouseLeave&&i.props.onMonthMouseLeave()}),ie(ce(i),"handleYearChange",function(o){i.props.onYearChange&&i.props.onYearChange(o),i.props.adjustDateOnChange&&(i.props.onSelect&&i.props.onSelect(o),i.props.setOpen&&i.props.setOpen(!0)),i.props.setPreSelection&&i.props.setPreSelection(o)}),ie(ce(i),"handleMonthChange",function(o){i.props.onMonthChange&&i.props.onMonthChange(o),i.props.adjustDateOnChange&&(i.props.onSelect&&i.props.onSelect(o),i.props.setOpen&&i.props.setOpen(!0)),i.props.setPreSelection&&i.props.setPreSelection(o)}),ie(ce(i),"handleMonthYearChange",function(o){i.handleYearChange(o),i.handleMonthChange(o)}),ie(ce(i),"changeYear",function(o){i.setState(function(s){var a=s.date;return{date:ty(a,o)}},function(){return i.handleYearChange(i.state.date)})}),ie(ce(i),"changeMonth",function(o){i.setState(function(s){var a=s.date;return{date:qi(a,o)}},function(){return i.handleMonthChange(i.state.date)})}),ie(ce(i),"changeMonthYear",function(o){i.setState(function(s){var a=s.date;return{date:ty(qi(a,cr(o)),dt(o))}},function(){return i.handleMonthYearChange(i.state.date)})}),ie(ce(i),"header",function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:i.state.date,s=QE(o,i.props.locale,i.props.calendarStartDay),a=[];return i.props.showWeekNumbers&&a.push(V.createElement("div",{key:"W",className:"react-datepicker__day-name"},i.props.weekLabel||"#")),a.concat([0,1,2,3,4,5,6].map(function(l){var c=_l(s,l),f=i.formatWeekday(c,i.props.locale),h=i.props.weekDayClassName?i.props.weekDayClassName(c):void 0;return V.createElement("div",{key:l,className:ge("react-datepicker__day-name",h)},f)}))}),ie(ce(i),"formatWeekday",function(o,s){return i.props.formatWeekDay?function(a,l,c){return l(an(a,"EEEE",c))}(o,i.props.formatWeekDay,s):i.props.useWeekdaysShort?function(a,l){return an(a,"EEE",l)}(o,s):function(a,l){return an(a,"EEEEEE",l)}(o,s)}),ie(ce(i),"decreaseYear",function(){i.setState(function(o){var s=o.date;return{date:Md(s,i.props.showYearPicker?i.props.yearItemNumber:1)}},function(){return i.handleYearChange(i.state.date)})}),ie(ce(i),"renderPreviousButton",function(){if(!i.props.renderCustomHeader){var o;switch(!0){case i.props.showMonthYearPicker:o=sL(i.state.date,i.props);break;case i.props.showYearPicker:o=function(y){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},x=b.minDate,T=b.yearItemNumber,P=T===void 0?12:T,k=Af(of(Md(y,P)),P).endPeriod,N=x&&dt(x);return N&&N>k||!1}(i.state.date,i.props);break;default:o=iL(i.state.date,i.props)}if((i.props.forceShowMonthNavigation||i.props.showDisabledMonthNavigation||!o)&&!i.props.showTimeSelectOnly){var s=["react-datepicker__navigation","react-datepicker__navigation--previous"],a=i.decreaseMonth;(i.props.showMonthYearPicker||i.props.showQuarterYearPicker||i.props.showYearPicker)&&(a=i.decreaseYear),o&&i.props.showDisabledMonthNavigation&&(s.push("react-datepicker__navigation--previous--disabled"),a=null);var l=i.props.showMonthYearPicker||i.props.showQuarterYearPicker||i.props.showYearPicker,c=i.props,f=c.previousMonthButtonLabel,h=c.previousYearButtonLabel,p=i.props,m=p.previousMonthAriaLabel,g=m===void 0?typeof f=="string"?f:"Previous Month":m,v=p.previousYearAriaLabel,w=v===void 0?typeof h=="string"?h:"Previous Year":v;return V.createElement("button",{type:"button",className:s.join(" "),onClick:a,onKeyDown:i.props.handleOnKeyDown,"aria-label":l?w:g},V.createElement("span",{className:["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"].join(" ")},l?i.props.previousYearButtonLabel:i.props.previousMonthButtonLabel))}}}),ie(ce(i),"increaseYear",function(){i.setState(function(o){var s=o.date;return{date:qc(s,i.props.showYearPicker?i.props.yearItemNumber:1)}},function(){return i.handleYearChange(i.state.date)})}),ie(ce(i),"renderNextButton",function(){if(!i.props.renderCustomHeader){var o;switch(!0){case i.props.showMonthYearPicker:o=aL(i.state.date,i.props);break;case i.props.showYearPicker:o=function(y){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},x=b.maxDate,T=b.yearItemNumber,P=T===void 0?12:T,k=Af(qc(y,P),P).startPeriod,N=x&&dt(x);return N&&N0&&arguments[0]!==void 0?arguments[0]:i.state.date,s=["react-datepicker__current-month"];return i.props.showYearDropdown&&s.push("react-datepicker__current-month--hasYearDropdown"),i.props.showMonthDropdown&&s.push("react-datepicker__current-month--hasMonthDropdown"),i.props.showMonthYearDropdown&&s.push("react-datepicker__current-month--hasMonthYearDropdown"),V.createElement("div",{className:s.join(" ")},an(o,i.props.dateFormat,i.props.locale))}),ie(ce(i),"renderYearDropdown",function(){var o=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(i.props.showYearDropdown&&!o)return V.createElement(fve,{adjustDateOnChange:i.props.adjustDateOnChange,date:i.state.date,onSelect:i.props.onSelect,setOpen:i.props.setOpen,dropdownMode:i.props.dropdownMode,onChange:i.changeYear,minDate:i.props.minDate,maxDate:i.props.maxDate,year:dt(i.state.date),scrollableYearDropdown:i.props.scrollableYearDropdown,yearDropdownItemNumber:i.props.yearDropdownItemNumber})}),ie(ce(i),"renderMonthDropdown",function(){var o=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(i.props.showMonthDropdown&&!o)return V.createElement(hve,{dropdownMode:i.props.dropdownMode,locale:i.props.locale,onChange:i.changeMonth,month:cr(i.state.date),useShortMonthInDropdown:i.props.useShortMonthInDropdown})}),ie(ce(i),"renderMonthYearDropdown",function(){var o=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(i.props.showMonthYearDropdown&&!o)return V.createElement(gve,{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})}),ie(ce(i),"renderTodayButton",function(){if(i.props.todayButton&&!i.props.showTimeSelectOnly)return V.createElement("div",{className:"react-datepicker__today-button",onClick:function(o){return i.props.onSelect(Ar(pn()),o)}},i.props.todayButton)}),ie(ce(i),"renderDefaultHeader",function(o){var s=o.monthDate,a=o.i;return V.createElement("div",{className:"react-datepicker__header ".concat(i.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},i.renderCurrentMonth(s),V.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(i.props.dropdownMode),onFocus:i.handleDropdownFocus},i.renderMonthDropdown(a!==0),i.renderMonthYearDropdown(a!==0),i.renderYearDropdown(a!==0)),V.createElement("div",{className:"react-datepicker__day-names"},i.header(s)))}),ie(ce(i),"renderCustomHeader",function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=o.monthDate,a=o.i;if(i.props.showTimeSelect&&!i.state.monthContainer||i.props.showTimeSelectOnly)return null;var l=iL(i.state.date,i.props),c=oL(i.state.date,i.props),f=sL(i.state.date,i.props),h=aL(i.state.date,i.props),p=!i.props.showMonthYearPicker&&!i.props.showQuarterYearPicker&&!i.props.showYearPicker;return V.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:i.props.onDropdownFocus},i.props.renderCustomHeader(KN(KN({},i.state),{},{customHeaderCount:a,monthDate:s,changeMonth:i.changeMonth,changeYear:i.changeYear,decreaseMonth:i.decreaseMonth,increaseMonth:i.increaseMonth,decreaseYear:i.decreaseYear,increaseYear:i.increaseYear,prevMonthButtonDisabled:l,nextMonthButtonDisabled:c,prevYearButtonDisabled:f,nextYearButtonDisabled:h})),p&&V.createElement("div",{className:"react-datepicker__day-names"},i.header(s)))}),ie(ce(i),"renderYearHeader",function(){var o=i.state.date,s=i.props,a=s.showYearPicker,l=Af(o,s.yearItemNumber),c=l.startPeriod,f=l.endPeriod;return V.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},a?"".concat(c," - ").concat(f):dt(o))}),ie(ce(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)}}),ie(ce(i),"renderMonths",function(){if(!i.props.showTimeSelectOnly&&!i.props.showYearPicker){for(var o=[],s=i.props.showPreviousMonths?i.props.monthsShown-1:0,a=kd(i.state.date,s),l=0;l0;o.push(V.createElement("div",{key:h,ref:function(g){i.monthContainer=g},className:"react-datepicker__month-container"},i.renderHeader({monthDate:f,i:l}),V.createElement(bve,{chooseDayAriaLabelPrefix:i.props.chooseDayAriaLabelPrefix,disabledDayAriaLabelPrefix:i.props.disabledDayAriaLabelPrefix,weekAriaLabelPrefix:i.props.weekAriaLabelPrefix,ariaLabelPrefix:i.props.monthAriaLabelPrefix,onChange:i.changeMonthYear,day:f,dayClassName:i.props.dayClassName,calendarStartDay:i.props.calendarStartDay,monthClassName:i.props.monthClassName,onDayClick:i.handleDayClick,handleOnKeyDown:i.props.handleOnDayKeyDown,onDayMouseEnter:i.handleDayMouseEnter,onMouseLeave:i.handleMonthMouseLeave,onWeekSelect:i.props.onWeekSelect,orderInDisplay:l,formatWeekNumber:i.props.formatWeekNumber,locale:i.props.locale,minDate:i.props.minDate,maxDate:i.props.maxDate,excludeDates:i.props.excludeDates,excludeDateIntervals:i.props.excludeDateIntervals,highlightDates:i.props.highlightDates,selectingDate:i.state.selectingDate,includeDates:i.props.includeDates,includeDateIntervals:i.props.includeDateIntervals,inline:i.props.inline,shouldFocusDayInline:i.props.shouldFocusDayInline,fixedHeight:i.props.fixedHeight,filterDate:i.props.filterDate,preSelection:i.props.preSelection,setPreSelection:i.props.setPreSelection,selected:i.props.selected,selectsStart:i.props.selectsStart,selectsEnd:i.props.selectsEnd,selectsRange:i.props.selectsRange,selectsDisabledDaysInRange:i.props.selectsDisabledDaysInRange,showWeekNumbers:i.props.showWeekNumbers,startDate:i.props.startDate,endDate:i.props.endDate,peekNextMonth:i.props.peekNextMonth,setOpen:i.props.setOpen,shouldCloseOnSelect:i.props.shouldCloseOnSelect,renderDayContents:i.props.renderDayContents,disabledKeyboardNavigation:i.props.disabledKeyboardNavigation,showMonthYearPicker:i.props.showMonthYearPicker,showFullMonthYearPicker:i.props.showFullMonthYearPicker,showTwoColumnMonthYearPicker:i.props.showTwoColumnMonthYearPicker,showFourColumnMonthYearPicker:i.props.showFourColumnMonthYearPicker,showYearPicker:i.props.showYearPicker,showQuarterYearPicker:i.props.showQuarterYearPicker,isInputFocused:i.props.isInputFocused,containerRef:i.containerRef,monthShowsDuplicateDaysEnd:p,monthShowsDuplicateDaysStart:m})))}return o}}),ie(ce(i),"renderYears",function(){if(!i.props.showTimeSelectOnly)return i.props.showYearPicker?V.createElement("div",{className:"react-datepicker__year--container"},i.renderHeader(),V.createElement(wve,N_({onDayClick:i.handleDayClick,date:i.state.date},i.props))):void 0}),ie(ce(i),"renderTimeSection",function(){if(i.props.showTimeSelect&&(i.state.monthContainer||i.props.showTimeSelectOnly))return V.createElement(bF,{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})}),ie(ce(i),"renderInputTimeSection",function(){var o=new Date(i.props.selected),s=os(o)&&i.props.selected?"".concat(cL(o.getHours()),":").concat(cL(o.getMinutes())):"";if(i.props.showTimeInput)return V.createElement(xve,{date:o,timeString:s,timeInputLabel:i.props.timeInputLabel,onChange:i.props.onTimeChange,customTimeInput:i.props.customTimeInput})}),i.containerRef=V.createRef(),i.state={date:i.getDateInView(),selectingDate:null,monthContainer:null},i}return Rn(n,[{key:"componentDidMount",value:function(){var r=this;this.props.showTimeSelect&&(this.assignMonthContainer=void r.setState({monthContainer:r.monthContainer}))}},{key:"componentDidUpdate",value:function(r){this.props.preSelection&&!mr(this.props.preSelection,r.preSelection)?this.setState({date:this.props.preSelection}):this.props.openToDate&&!mr(this.props.openToDate,r.openToDate)&&this.setState({date:this.props.openToDate})}},{key:"render",value:function(){var r=this.props.container||Sve;return V.createElement("div",{ref:this.containerRef},V.createElement(r,{className:ge("react-datepicker",this.props.className,{"react-datepicker--time-only":this.props.showTimeSelectOnly}),showPopperArrow:this.props.showPopperArrow,arrowProps:this.props.arrowProps},this.renderPreviousButton(),this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.props.children))}}],[{key:"defaultProps",get:function(){return{onDropdownFocus:function(){},monthsShown:1,monthSelectedIn:0,forceShowMonthNavigation:!1,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",customTimeInput:null,yearItemNumber:12}}}]),n}(),wF=function(e){Nn(n,V.Component);var t=Ln(n);function n(r){var i;return Mn(this,n),(i=t.call(this,r)).el=document.createElement("div"),i}return Rn(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 Ua.createPortal(this.props.children,this.el)}}]),n}(),Tve=function(e){return!e.disabled&&e.tabIndex!==-1},Ove=function(e){Nn(n,V.Component);var t=Ln(n);function n(r){var i;return Mn(this,n),ie(ce(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(Tve)}),ie(ce(i),"handleFocusStart",function(o){var s=i.getTabChildren();s&&s.length>1&&s[s.length-1].focus()}),ie(ce(i),"handleFocusEnd",function(o){var s=i.getTabChildren();s&&s.length>1&&s[0].focus()}),i.tabLoopRef=V.createRef(),i}return Rn(n,[{key:"render",value:function(){return this.props.enableTabLoop?V.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},V.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:"0",onFocus:this.handleFocusStart}),this.props.children,V.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:"0",onFocus:this.handleFocusEnd})):this.props.children}}],[{key:"defaultProps",get:function(){return{enableTabLoop:!0}}}]),n}(),Pve=function(e){Nn(n,V.Component);var t=Ln(n);function n(){return Mn(this,n),t.apply(this,arguments)}return Rn(n,[{key:"render",value:function(){var r,i=this.props,o=i.className,s=i.wrapperClassName,a=i.hidePopper,l=i.popperComponent,c=i.popperModifiers,f=i.popperPlacement,h=i.popperProps,p=i.targetComponent,m=i.enableTabLoop,g=i.popperOnKeyDown,v=i.portalId,w=i.portalHost;if(!a){var y=ge("react-datepicker-popper",o);r=V.createElement(Yge,N_({modifiers:c,placement:f},h),function(x){var T=x.ref,P=x.style,k=x.placement,N=x.arrowProps;return V.createElement(Ove,{enableTabLoop:m},V.createElement("div",{ref:T,style:P,className:y,"data-placement":k,onKeyDown:g},V.cloneElement(l,{arrowProps:N})))})}this.props.popperContainer&&(r=V.createElement(this.props.popperContainer,{},r)),v&&!a&&(r=V.createElement(wF,{portalId:v,portalHost:w},r));var b=ge("react-datepicker-wrapper",s);return V.createElement(Bge,{className:"react-datepicker-manager"},V.createElement(qge,null,function(x){var T=x.ref;return V.createElement("div",{ref:T,className:b},p)}),r)}}],[{key:"defaultProps",get:function(){return{hidePopper:!0,popperModifiers:[],popperProps:{},popperPlacement:"bottom-start"}}}]),n}(),kve=R_(Eve),Mve=function(e){Nn(n,V.Component);var t=Ln(n);function n(r){var i;return Mn(this,n),ie(ce(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:pn()}),ie(ce(i),"calcInitialState",function(){var o,s=i.getPreSelection(),a=yF(i.props),l=_F(i.props),c=a&&Kr(s,Ar(a))?a:l&&Ws(s,ll(l))?l:s;return{open:i.props.startOpen||!1,preventFocus:!1,preSelection:(o=i.props.selectsRange?i.props.startDate:i.props.selected)!==null&&o!==void 0?o:c,highlightDates:lL(i.props.highlightDates),focused:!1,shouldFocusDayInline:!1}}),ie(ce(i),"clearPreventFocusTimeout",function(){i.preventFocusTimeout&&clearTimeout(i.preventFocusTimeout)}),ie(ce(i),"setFocus",function(){i.input&&i.input.focus&&i.input.focus({preventScroll:!0})}),ie(ce(i),"setBlur",function(){i.input&&i.input.blur&&i.input.blur(),i.cancelFocusInput()}),ie(ce(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:Wb},function(){o||i.setState(function(a){return{focused:!!s&&a.focused}},function(){!s&&i.setBlur(),i.setState({inputValue:null})})})}),ie(ce(i),"inputOk",function(){return DE(i.state.preSelection)}),ie(ce(i),"isCalendarOpen",function(){return i.props.open===void 0?i.state.open&&!i.props.disabled&&!i.props.readOnly:i.props.open}),ie(ce(i),"handleFocus",function(o){i.state.preventFocus||(i.props.onFocus(o),i.props.preventOpenOnFocus||i.props.readOnly||i.setOpen(!0)),i.setState({focused:!0})}),ie(ce(i),"cancelFocusInput",function(){clearTimeout(i.inputFocusTimeout),i.inputFocusTimeout=null}),ie(ce(i),"deferFocusInput",function(){i.cancelFocusInput(),i.inputFocusTimeout=setTimeout(function(){return i.setFocus()},1)}),ie(ce(i),"handleDropdownFocus",function(){i.cancelFocusInput()}),ie(ce(i),"handleBlur",function(o){(!i.state.open||i.props.withPortal||i.props.showTimeInput)&&i.props.onBlur(o),i.setState({focused:!1})}),ie(ce(i),"handleCalendarClickOutside",function(o){i.props.inline||i.setOpen(!1),i.props.onClickOutside(o),i.props.withPortal&&o.preventDefault()}),ie(ce(i),"handleChange",function(){for(var o=arguments.length,s=new Array(o),a=0;a{const{className:t,isClearable:n,selected:r,dateFormat:i}=e,o=!n||zo(r),s=H.useRef();return U("div",{className:"icon-input-container",children:[C(Mve,{...e,popperModifiers:[{name:"arrow",options:{padding:24}}],dateFormat:i??Lf,className:ge("icon-input-container__input form-control",t),ref:s}),o&&C(Fe,{icon:jpe,className:"icon-input-container__icon",onClick:()=>{var a;return(a=s.current)==null?void 0:a.input.focus()}})]})},Nve=e=>C(Ex,{...e,dateFormat:WE,showTimeSelect:!0,timeIntervals:10});const Lve=({icon:e,className:t,...n})=>{const r=yl(),i=ge("icon-input-container__input",t);return U("div",{className:"icon-input-container",children:[C(Wc,{className:i,innerRef:r,...n}),C(Fe,{icon:e,fixedWidth:!0,className:"icon-input-container__icon",onClick:()=>{var o;return(o=r.current)==null?void 0:o.focus()}})]})},Yb=({children:e,infoTooltip:t,checked:n,onChange:r})=>U("p",{children:[C(aF,{inline:!0,checked:n,className:t?"me-2":"",onChange:r,children:e}),t&&C(og,{placement:"right",children:t})]});const Dve=({isOpen:e,toggle:t})=>U(Wo,{isOpen:e,toggle:t,centered:!0,size:"lg",children:[C(oo,{toggle:t,children:"Info"}),U(Ri,{children:[U("p",{children:["When the ",C("b",{children:C("i",{children:'"Use existing URL if found"'})})," checkbox is checked, the server will return an existing short URL if it matches provided params."]}),C("p",{children:"These are the checks performed by Shlink in order to determine if an existing short URL should be returned:"}),U("ul",{children:[C("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."}),U("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.",C("br",{}),"If the slug is being used by another long URL, an error will be returned."]}),C("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"})]})]})]}),Ave=()=>{const[e,t]=$t();return U(We,{children:[C("span",{title:"What does this mean?",children:C(Fe,{icon:CC,style:{cursor:"pointer"},onClick:t})}),C(Dve,{isOpen:e,toggle:t})]})};const Ive=er(VZ,LZ(/ /g,"-")),qb=e=>typeof e=="string"?Fo(e):e,Fve=(e,t)=>({mode:n,saving:r,onSave:i,initialState:o,selectedServer:s})=>{const[a,l]=H.useState(o),c=()=>l(o),f=Mi("deviceLongUrls",s),h=n==="edit",p=n==="create-basic",m=P=>l({...a,tags:P.map(Ive)}),g=(P,k)=>yi(P)?P:yi(k)?null:void 0,v=oh(async()=>i({...a,validSince:qs(a.validSince)??null,validUntil:qs(a.validUntil)??null,maxVisits:yi(a.maxVisits)?Number(a.maxVisits):null}).then(()=>!h&&c()).catch(()=>{}));H.useEffect(()=>{l(o)},[o]);const w=(P,k,N="text",D={},z={})=>C(yr,{...z,children:C(Wc,{id:P,type:N,placeholder:k,value:a[P]??"",onChange:D.onChange??(A=>l({...a,[P]:A.target.value})),...D})}),y=(P,k,N)=>{var D;return C(Lve,{icon:N,id:P,type:"url",placeholder:k,value:((D=a.deviceLongUrls)==null?void 0:D[P])??"",onChange:z=>{var A;return l({...a,deviceLongUrls:{...a.deviceLongUrls??{},[P]:g(z.target.value,(A=o.deviceLongUrls)==null?void 0:A[P])}})}})},b=(P,k,N={})=>C(Nve,{selected:a[P]?qb(a[P]):null,placeholderText:k,isClearable:!0,onChange:D=>l({...a,[P]:D}),...N}),x=U(We,{children:[C(yr,{children:C(Wc,{bsSize:"lg",type:"url",placeholder:"URL to be shortened",required:!0,value:a.longUrl,onChange:P=>l({...a,longUrl:P.target.value})})}),U(Qn,{children:[p&&w("customSlug","Custom slug","text",{bsSize:"lg"},{className:"col-lg-6"}),C("div",{className:p?"col-lg-6 mb-3":"col-12",children:C(e,{selectedTags:a.tags??[],onChange:m})})]})]}),T=Mi("forwardQuery",s);return U("form",{name:"shortUrlForm",className:"short-url-form",onSubmit:v,children:[p&&x,!p&&U(We,{children:[U(Qn,{children:[C("div",{className:ge("mb-3",{"col-sm-6":f,"col-12":!f}),children:C(fn,{title:"Main options",className:"mb-3",children:x})}),f&&C("div",{className:"col-sm-6 mb-3",children:U(fn,{title:"Device-specific long URLs",children:[C(yr,{children:y("android","Android-specific redirection",kge)}),C(yr,{children:y("ios","iOS-specific redirection",Pge)}),y("desktop","Desktop-specific redirection",GQ)]})})]}),U(Qn,{children:[C("div",{className:"col-sm-6 mb-3",children:U(fn,{title:"Customize the short URL",children:[w("title","Title","text",{onChange:({target:P})=>l({...a,title:g(P.value,o.title)})}),!h&&U(We,{children:[U(Qn,{children:[C("div",{className:"col-lg-6",children:w("customSlug","Custom slug","text",{disabled:yi(a.shortCodeLength)})}),C("div",{className:"col-lg-6",children:w("shortCodeLength","Short code length","number",{min:4,disabled:yi(a.customSlug)})})]}),C(t,{value:a.domain,onChange:P=>l({...a,domain:P})})]})]})}),C("div",{className:"col-sm-6 mb-3",children:U(fn,{title:"Limit access to the short URL",children:[w("maxVisits","Maximum number of visits allowed","number",{min:1}),C("div",{className:"mb-3",children:b("validSince","Enabled since...",{maxDate:a.validUntil?qb(a.validUntil):void 0})}),b("validUntil","Enabled until...",{minDate:a.validSince?qb(a.validSince):void 0})]})})]}),U(Qn,{children:[C("div",{className:"col-sm-6 mb-3",children:U(fn,{title:"Extra checks",children:[C(Yb,{infoTooltip:"If checked, Shlink will try to reach the long URL, failing in case it's not publicly accessible.",checked:a.validateUrl,onChange:P=>l({...a,validateUrl:P}),children:"Validate URL"}),!h&&U("p",{children:[C(aF,{inline:!0,className:"me-2",checked:a.findIfExists,onChange:P=>l({...a,findIfExists:P}),children:"Use existing URL if found"}),C(Ave,{})]})]})}),C("div",{className:"col-sm-6 mb-3",children:U(fn,{title:"Configure behavior",children:[C(Yb,{infoTooltip:"This short URL will be included in the robots.txt for your Shlink instance, allowing web crawlers (like Google) to index it.",checked:a.crawlable,onChange:P=>l({...a,crawlable:P}),children:"Make it crawlable"}),T&&C(Yb,{infoTooltip:"When this short URL is visited, any query params appended to it will be forwarded to the long URL.",checked:a.forwardQuery,onChange:P=>l({...a,forwardQuery:P}),children:"Forward query params on redirect"})]})})]})]}),C("div",{className:"text-center",children:C(ht,{outline:!0,color:"primary",disabled:r||Cr(a.longUrl),className:"btn-xs-block",children:r?"Saving...":"Save"})})]})},$ve=({startDate:e=null,endDate:t=null,disabled:n=!1,onStartDateChange:r,onEndDateChange:i})=>U("div",{className:"row",children:[C("div",{className:"col-md-6",children:C(Ex,{selected:e,placeholderText:"Since...",isClearable:!0,maxDate:t??void 0,disabled:n,onChange:r})}),C("div",{className:"col-md-6",children:C(Ex,{className:"mt-2 mt-md-0",selected:t,placeholderText:"Until...",isClearable:!0,minDate:e??void 0,disabled:n,onChange:o=>i(o&&ll(o))})})]}),xF=({onDatesChange:e,initialDateRange:t,defaultText:n,disabled:r,updatable:i=!1})=>{const o=ry(t),[s,a]=H.useState(o?t:void 0),[l,c]=H.useState(o?void 0:t),f=p=>{a(A8(p)?lh:void 0),c(p),e(p)},h=p=>{a(p),c(void 0),e(F8(p))};return i&&Aoe(()=>{const p=ry(t);p&&h(t),t&&!p&&f(t)},[t]),U(oa,{disabled:r,text:qE(s??l)??n,children:[C(X8,{allText:n,active:s,onChange:h}),C(Ve,{divider:!0}),C(Ve,{header:!0,children:"Custom:"}),C(Ve,{text:!0,children:C($ve,{...l,onStartDateChange:p=>f({...l,startDate:p}),onEndDateChange:p=>f({...l,endDate:p})})})]})},jve=({onChange:e,selected:t={},className:n,supportsDisabledFiltering:r})=>{const{excludeBots:i=!1,excludeMaxVisitsReached:o=!1,excludePastValidUntil:s=!1}=t,a=l=>()=>e({...t,[l]:!(t!=null&&t[l])});return U(oa,{text:"Filters",dropdownClassName:n,className:"me-3",right:!0,minWidth:250,children:[C(Ve,{header:!0,children:"Visits:"}),C(Ve,{active:i,onClick:a("excludeBots"),children:"Ignore visits from bots"}),r&&U(We,{children:[C(Ve,{divider:!0}),C(Ve,{header:!0,children:"Short URLs:"}),C(Ve,{active:o,onClick:a("excludeMaxVisitsReached"),children:"Exclude with visits reached"}),C(Ve,{active:s,onClick:a("excludePastValidUntil"),children:"Exclude enabled in the past"})]}),C(Ve,{divider:!0}),C(Ve,{disabled:!yi(t),onClick:()=>e({excludeBots:!1,excludeMaxVisitsReached:!1,excludePastValidUntil:!1}),children:C("i",{children:"Clear filters"})})]})};const Bve=(e,t)=>({selectedServer:n,className:r,shortUrlsAmount:i,order:o,handleOrderBy:s,settings:a})=>{var D;const[l,c]=M_(),{search:f,tags:h,startDate:p,endDate:m,excludeBots:g,excludeMaxVisitsReached:v,excludePastValidUntil:w,tagsMode:y="any"}=l,b=Mi("filterDisabledUrls",n),x=er(({startDate:z,endDate:A})=>({startDate:qs(z)??void 0,endDate:qs(A)??void 0}),c),T=er(z=>Cr(z)?void 0:z,z=>c({search:z})),P=z=>c({tags:z}),k=Mi("allTagsFiltering",n),N=er(()=>y==="any"?"all":"any",z=>c({tagsMode:z}));return U("div",{className:ge("short-urls-filtering-bar-container",r),children:[C(sh,{initialValue:f,onChange:T}),U(eh,{className:"mt-3",children:[C(t,{allowNew:!1,placeholder:"With tags...",selectedTags:h,onChange:P}),k&&h.length>1&&U(We,{children:[C(ht,{outline:!0,color:"secondary",onClick:N,id:"tagsModeBtn","aria-label":"Change tags mode",children:C(Fe,{className:"short-urls-filtering-bar__tags-icon",icon:y==="all"?c6:xQ})}),C(Or,{target:"tagsModeBtn",placement:"left",children:y==="all"?"With all the tags.":"With any of the tags."})]})]}),U(Qn,{className:"flex-lg-row-reverse",children:[C("div",{className:"col-lg-8 col-xl-6 mt-3",children:U("div",{className:"d-md-flex",children:[C("div",{className:"flex-fill",children:C(xF,{defaultText:"All short URLs",initialDateRange:I8(p,m),onDatesChange:x})}),C(jve,{className:"ms-0 ms-md-2 mt-3 mt-md-0",selected:{excludeBots:g??((D=a.visits)==null?void 0:D.excludeBots),excludeMaxVisitsReached:v,excludePastValidUntil:w},onChange:c,supportsDisabledFiltering:b})]})}),C("div",{className:"col-6 col-lg-4 col-xl-6 mt-3",children:C(e,{amount:i})}),C("div",{className:"col-6 d-lg-none mt-3",children:C(hh,{prefixed:!1,items:Z8,order:o,onChange:s})})]})]})};function If({currentOrder:e,field:t,className:n="ms-1"}){return!e.dir||e.field!==t?null:C(Fe,{icon:e.dir==="ASC"?pQ:TQ,className:n})}const zl=2,Tx="...",SF=(e,t)=>{const n=dC(PI(zl,e-zl),zI(t-1,e+zl)+1);return e-zl>zl&&n.unshift(Tx),e+zle===Tx,CF=e=>Rd(e)?e:bn(e),EF=(e,t)=>Rd(e)?`${e}_${t}`:`${e}`,zve=({paginator:e,serverId:t,currentQueryString:n=""})=>{const{currentPage:r=0,pagesCount:i=0}=e??{},o=a=>`/server/${t}/list-short-urls/${a}${n}`;if(i<=1)return C("div",{className:"pb-3"});const s=()=>SF(r,i).map((a,l)=>C(Ns,{disabled:Rd(a),active:r===a,children:C(Ls,{tag:At,to:o(a),children:CF(a)})},EF(a,l)));return U(C_,{className:"sticky-card-paginator py-3",listClassName:"flex-wrap justify-content-center mb-0",children:[C(Ns,{disabled:r===1,children:C(Ls,{previous:!0,tag:At,to:o(r-1)})}),s(),C(Ns,{disabled:r>=i,children:C(Ls,{next:!0,tag:At,to:o(r+1)})})]})},Uve=(e,t)=>sa(({listShortUrls:n,shortUrlsList:r,selectedServer:i,settings:o})=>{var K,te,oe;const s=Vd(i),{page:a}=Js(),l=kn(),[c,f]=M_(),{tags:h,search:p,startDate:m,endDate:g,orderBy:v,tagsMode:w,excludeBots:y,excludePastValidUntil:b,excludeMaxVisitsReached:x}=c,[T,P]=H.useState(v??((K=o.shortUrlsList)==null?void 0:K.defaultOrdering)??ZE),{pagination:k}=(r==null?void 0:r.shortUrls)??{},N=y??((te=o.visits)==null?void 0:te.excludeBots),D=Mi("excludeBotsOnShortUrls",i),z=(se,Z)=>{f({orderBy:{field:se,dir:Z}}),P({field:se,dir:Z})},A=se=>()=>z(se,a_(se,T.field,T.dir)),Y=se=>C(If,{currentOrder:T,field:se}),q=er(se=>[...new Set([...h,se])],se=>f({tags:se})),ee=({field:se,dir:Z})=>D&&N&&se==="visits"?{field:"nonBotVisits",dir:Z}:{field:se,dir:Z};return H.useEffect(()=>{n({page:a,searchTerm:p,tags:h,startDate:m,endDate:g,orderBy:ee(T),tagsMode:w,excludePastValidUntil:b,excludeMaxVisitsReached:x})},[a,p,h,m,g,T.field,T.dir,w,b,x]),U(We,{children:[C(t,{selectedServer:i,shortUrlsAmount:(oe=r.shortUrls)==null?void 0:oe.pagination.totalItems,order:T,handleOrderBy:z,settings:o,className:"mb-3"}),U(Er,{body:!0,className:"pb-0",children:[C(e,{selectedServer:i,shortUrlsList:r,orderByColumn:A,renderOrderIcon:Y,onTagClick:q}),C(zve,{paginator:k,serverId:s,currentQueryString:l.search})]})]})},()=>[Jr.visits]);const Vve=e=>({orderByColumn:t,renderOrderIcon:n,shortUrlsList:r,onTagClick:i,selectedServer:o,className:s})=>{const{error:a,loading:l,shortUrls:c}=r,f=ge({"short-urls-table__header-cell--with-action":!!t}),h=ge("short-urls-table__header-cell",f),p=ge("table table-hover responsive-table short-urls-table",s),m=()=>a?C("tr",{children:C("td",{colSpan:6,className:"text-center table-danger text-dark",children:"Something went wrong while loading short URLs :("})}):l?C("tr",{children:C("td",{colSpan:6,className:"text-center",children:"Loading..."})}):!l&&Cr(c==null?void 0:c.data)?C("tr",{children:C("td",{colSpan:6,className:"text-center",children:"No results found"})}):c==null?void 0:c.data.map(g=>C(e,{shortUrl:g,selectedServer:o,onTagClick:i},g.shortUrl));return U("table",{className:p,children:[C("thead",{className:"responsive-table__header short-urls-table__header",children:U("tr",{children:[U("th",{className:h,onClick:t==null?void 0:t("dateCreated"),children:["Created at ",n==null?void 0:n("dateCreated")]}),U("th",{className:h,onClick:t==null?void 0:t("shortCode"),children:["Short URL ",n==null?void 0:n("shortCode")]}),U("th",{className:"short-urls-table__header-cell",children:[U("span",{className:f,onClick:t==null?void 0:t("title"),children:["Title ",n==null?void 0:n("title")]}),"  /  ",U("span",{className:f,onClick:t==null?void 0:t("longUrl"),children:[C("span",{className:"indivisible",children:"Long URL"})," ",n==null?void 0:n("longUrl")]})]}),C("th",{className:"short-urls-table__header-cell",children:"Tags"}),C("th",{className:h,onClick:t==null?void 0:t("visits"),children:U("span",{className:"indivisible",children:["Visits ",n==null?void 0:n("visits")]})}),C("th",{className:"short-urls-table__header-cell",colSpan:2})]})}),C("tbody",{children:m()})]})},Hve=(e,t)=>{e.serviceFactory("ShortUrlsList",Uve,"ShortUrlsTable","ShortUrlsFilteringBar"),e.decorator("ShortUrlsList",t(["selectedServer","mercureInfo","shortUrlsList","settings"],["listShortUrls","createNewVisits","loadMercureInfo"])),e.serviceFactory("ShortUrlsTable",Vve,"ShortUrlsRow"),e.serviceFactory("ShortUrlsRow",bge,"ShortUrlsRowMenu","ColorGenerator","useTimeoutToggle"),e.decorator("ShortUrlsRow",t(["settings"])),e.serviceFactory("ShortUrlsRowMenu",wge,"DeleteShortUrlModal","QrCodeModal"),e.serviceFactory("CreateShortUrlResult",cge,"useTimeoutToggle"),e.serviceFactory("ShortUrlForm",Fve,"TagsSelector","DomainSelector"),e.serviceFactory("CreateShortUrl",Hme,"ShortUrlForm","CreateShortUrlResult"),e.decorator("CreateShortUrl",t(["shortUrlCreation","selectedServer","settings"],["createShortUrl","resetCreateShortUrl"])),e.serviceFactory("EditShortUrl",Wme,"ShortUrlForm"),e.decorator("EditShortUrl",t(["shortUrlDetail","shortUrlEdition","selectedServer","settings"],["getShortUrlDetail","editShortUrl"])),e.serviceFactory("DeleteShortUrlModal",()=>uge),e.decorator("DeleteShortUrlModal",t(["shortUrlDeletion"],["deleteShortUrl","shortUrlDeleted","resetDeleteShortUrl"])),e.serviceFactory("QrCodeModal",mge,"ImageDownloader"),e.decorator("QrCodeModal",t(["selectedServer"])),e.serviceFactory("ShortUrlsFilteringBar",Bve,"ExportShortUrlsBtn","TagsSelector"),e.serviceFactory("ExportShortUrlsBtn",fge,"buildShlinkApiClient","ReportExporter"),e.decorator("ExportShortUrlsBtn",t(["selectedServer"])),e.serviceFactory("shortUrlsListReducerCreator",Kpe,"listShortUrls","editShortUrl","createShortUrl"),e.serviceFactory("shortUrlsListReducer",St("reducer"),"shortUrlsListReducerCreator"),e.serviceFactory("shortUrlCreationReducerCreator",Sge,"createShortUrl"),e.serviceFactory("shortUrlCreationReducer",St("reducer"),"shortUrlCreationReducerCreator"),e.serviceFactory("shortUrlEditionReducerCreator",Oge,"editShortUrl"),e.serviceFactory("shortUrlEditionReducer",St("reducer"),"shortUrlEditionReducerCreator"),e.serviceFactory("shortUrlDeletionReducerCreator",qpe,"deleteShortUrl"),e.serviceFactory("shortUrlDeletionReducer",St("reducer"),"shortUrlDeletionReducerCreator"),e.serviceFactory("shortUrlDetailReducerCreator",Cge,"buildShlinkApiClient"),e.serviceFactory("shortUrlDetailReducer",St("reducer"),"shortUrlDetailReducerCreator"),e.serviceFactory("listShortUrls",Zpe,"buildShlinkApiClient"),e.serviceFactory("createShortUrl",xge,"buildShlinkApiClient"),e.serviceFactory("resetCreateShortUrl",St("resetCreateShortUrl"),"shortUrlCreationReducerCreator"),e.serviceFactory("deleteShortUrl",Ype,"buildShlinkApiClient"),e.serviceFactory("resetDeleteShortUrl",St("resetDeleteShortUrl"),"shortUrlDeletionReducerCreator"),e.serviceFactory("shortUrlDeleted",()=>V8),e.serviceFactory("getShortUrlDetail",St("getShortUrlDetail"),"shortUrlDetailReducerCreator"),e.serviceFactory("editShortUrl",Tge,"buildShlinkApiClient")},Wve=({tag:e,toggle:t,isOpen:n,deleteTag:r,tagDelete:i,tagDeleted:o})=>{const{deleting:s,error:a,deleted:l,errorData:c}=i;return U(Wo,{toggle:t,isOpen:n,centered:!0,onClosed:()=>l&&o(e),children:[C(oo,{toggle:t,className:"text-danger",children:"Delete tag"}),U(Ri,{children:["Are you sure you want to delete tag ",C("b",{children:e}),"?",a&&C(Dr,{type:"error",small:!0,className:"mt-2",children:C(Io,{errorData:c,fallbackMessage:"Something went wrong while deleting the tag :("})})]}),U(ra,{children:[C(ht,{color:"link",onClick:t,children:"Cancel"}),C(ht,{color:"danger",disabled:s,onClick:async()=>{await r(e),t()},children:s?"Deleting tag...":"Delete tag"})]})]})};function A_(){return(A_=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function Ox(e){var t=H.useRef(e),n=H.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var Nd=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:w.buttons>0)&&i.current?o(uL(i.current,w,a.current)):v(!1)},g=function(){return v(!1)};function v(w){var y=l.current,b=Px(i.current),x=w?b.addEventListener:b.removeEventListener;x(y?"touchmove":"mousemove",m),x(y?"touchend":"mouseup",g)}return[function(w){var y=w.nativeEvent,b=i.current;if(b&&(fL(y),!function(T,P){return P&&!Ff(T)}(y,l.current)&&b)){if(Ff(y)){l.current=!0;var x=y.changedTouches||[];x.length&&(a.current=x[0].identifier)}b.focus(),o(uL(b,y,a.current)),v(!0)}},function(w){var y=w.which||w.keyCode;y<37||y>40||(w.preventDefault(),s({left:y===39?.05:y===37?-.05:0,top:y===40?.05:y===38?-.05:0}))},v]},[s,o]),f=c[0],h=c[1],p=c[2];return H.useEffect(function(){return p},[p]),V.createElement("div",A_({},r,{onTouchStart:f,onMouseDown:f,className:"react-colorful__interactive",ref:i,onKeyDown:h,tabIndex:0,role:"slider"}))}),eT=function(e){return e.filter(Boolean).join(" ")},PF=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=eT(["react-colorful__pointer",e.className]);return V.createElement("div",{className:o,style:{top:100*i+"%",left:100*n+"%"}},V.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},Vn=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},Yve=function(e){return Xve(kx(e))},kx=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?Vn(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?Vn(parseInt(e.substring(6,8),16)/255,2):1}},qve=function(e){return Kve(Zve(e))},Gve=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:Vn(e.h),s:Vn(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:Vn(i/2),a:Vn(r,2)}},Mx=function(e){var t=Gve(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},Zve=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),s=r*(1-n),a=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),c=o%6;return{r:Vn(255*[r,a,s,s,l,r][c]),g:Vn(255*[l,r,r,a,s,s][c]),b:Vn(255*[s,s,l,r,r,a][c]),a:Vn(i,2)}},Fp=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Kve=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=i<1?Fp(Vn(255*i)):"";return"#"+Fp(t)+Fp(n)+Fp(r)+o},Xve=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),s=o-Math.min(t,n,r),a=s?o===t?(n-r)/s:o===n?2+(r-t)/s:4+(t-n)/s:0;return{h:Vn(60*(a<0?a+6:a)),s:Vn(o?s/o*100:0),v:Vn(o/255*100),a:i}},Qve=V.memo(function(e){var t=e.hue,n=e.onChange,r=eT(["react-colorful__hue",e.className]);return V.createElement("div",{className:r},V.createElement(OF,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:Nd(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":Vn(t),"aria-valuemax":"360","aria-valuemin":"0"},V.createElement(PF,{className:"react-colorful__hue-pointer",left:t/360,color:Mx({h:t,s:100,v:100,a:1})})))}),Jve=V.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:Mx({h:t.h,s:100,v:100,a:1})};return V.createElement("div",{className:"react-colorful__saturation",style:r},V.createElement(OF,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:Nd(t.s+100*i.left,0,100),v:Nd(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+Vn(t.s)+"%, Brightness "+Vn(t.v)+"%"},V.createElement(PF,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:Mx(t)})))}),kF=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},eye=function(e,t){return e.toLowerCase()===t.toLowerCase()||kF(kx(e),kx(t))};function tye(e,t,n){var r=Ox(n),i=H.useState(function(){return e.toHsva(t)}),o=i[0],s=i[1],a=H.useRef({color:t,hsva:o});H.useEffect(function(){if(!e.equal(t,a.current.color)){var c=e.toHsva(t);a.current={hsva:c,color:t},s(c)}},[t,e]),H.useEffect(function(){var c;kF(o,a.current.hsva)||e.equal(c=e.fromHsva(o),a.current.color)||(a.current={hsva:o,color:c},r(c))},[o,e,r]);var l=H.useCallback(function(c){s(function(f){return Object.assign({},f,c)})},[]);return[o,l]}var nye=typeof window<"u"?H.useLayoutEffect:H.useEffect,rye=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},dL=new Map,iye=function(e){nye(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!dL.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}`,dL.set(t,n);var r=rye();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},oye=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,s=TF(e,["className","colorModel","color","onChange"]),a=H.useRef(null);iye(a);var l=tye(n,i,o),c=l[0],f=l[1],h=eT(["react-colorful",t]);return V.createElement("div",A_({},s,{ref:a,className:h}),V.createElement(Jve,{hsva:c,onChange:f}),V.createElement(Qve,{hue:c.h,onChange:f,className:"react-colorful__last-control"}))},sye={defaultColor:"000",toHsva:Yve,fromHsva:function(e){return qve({h:e.h,s:e.s,v:e.v,a:1})},equal:eye},aye=function(e){return V.createElement(oye,A_({},e,{colorModel:sye}))};const lye=({getColorForKey:e})=>({tag:t,editTag:n,toggle:r,tagEdited:i,isOpen:o,tagEdit:s})=>{const[a,l]=H.useState(t),[c,f]=H.useState(e(t)),[h,p,,m]=$t(),{editing:g,error:v,edited:w,errorData:y}=s,b=oh(async()=>{await n({oldName:t,newName:a,color:c}),r()}),x=er(m,()=>w&&i({oldName:t,newName:a,color:c}));return C(Wo,{isOpen:o,toggle:r,centered:!0,onClosed:x,children:U("form",{name:"editTag",onSubmit:b,children:[C(oo,{toggle:r,children:"Edit tag"}),U(Ri,{children:[U(eh,{children:[C("div",{id:"colorPickerBtn",className:"input-group-text edit-tag-modal__color-picker-toggle",style:{backgroundColor:c,borderColor:c},onClick:p,children:C(Fe,{icon:mQ,className:"edit-tag-modal__color-icon"})}),C(Qd,{isOpen:h,toggle:p,target:"colorPickerBtn",placement:"right",hideArrow:!0,popperClassName:"edit-tag-modal__popover",children:C(aye,{color:c,onChange:f})}),C(Wc,{value:a,placeholder:"Tag",required:!0,onChange:({target:T})=>l(T.value)})]}),v&&C(Dr,{type:"error",small:!0,className:"mt-2",children:C(Io,{errorData:y,fallbackMessage:"Something went wrong while editing the tag :("})})]}),U(ra,{children:[C(ht,{type:"button",color:"link",onClick:r,children:"Cancel"}),C(ht,{color:"primary",disabled:g,children:g?"Saving...":"Save"})]})]})})};function cye(e){return V.createElement("button",{type:"button",className:e.classNames.selectedTag,title:e.removeButtonText,onClick:e.onDelete},V.createElement("span",{className:e.classNames.selectedTagName},e.tag.name))}const uye={position:"absolute",width:0,height:0,visibility:"hidden",overflow:"scroll",whiteSpace:"pre"},fye=["fontSize","fontFamily","fontWeight","fontStyle","letterSpacing","textTransform"];class dye extends V.Component{constructor(t){super(t),this.state={inputWidth:null},this.input=V.createRef(),this.sizer=V.createRef()}componentDidMount(){this.props.autoresize&&(this.copyInputStyles(),this.updateInputWidth())}componentDidUpdate({query:t,placeholderText:n}){(t!==this.props.query||n!==this.props.placeholderText)&&this.updateInputWidth()}copyInputStyles(){const t=window.getComputedStyle(this.input.current);fye.forEach(n=>{this.sizer.current.style[n]=t[n]})}updateInputWidth(){let t;this.props.autoresize&&(t=Math.ceil(this.sizer.current.scrollWidth)+2),t!==this.state.inputWidth&&this.setState({inputWidth:t})}render(){const{id:t,query:n,ariaLabelText:r,placeholderText:i,expanded:o,classNames:s,inputAttributes:a,inputEventHandlers:l,index:c}=this.props;return V.createElement("div",{className:s.searchWrapper},V.createElement("input",Object.assign({},a,l,{ref:this.input,value:n,placeholder:i,className:s.searchInput,role:"combobox","aria-autocomplete":"list","aria-label":r||i,"aria-owns":t,"aria-activedescendant":c>-1?`${t}-${c}`:null,"aria-expanded":o,style:{width:this.state.inputWidth}})),V.createElement("div",{ref:this.sizer,style:uye},n||i))}}function tT(e){return e.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")}function hye(e){return new RegExp(tT(e),"gi")}function pye(e){return new RegExp(`(?:^|\\s)${tT(e)}`,"i")}function mye(e){return new RegExp(`^${tT(e)}$`,"i")}function gye(e,t){const n=hye(t);return e.replace(n,"$&")}function vye({item:e,query:t}){return V.createElement("span",{dangerouslySetInnerHTML:{__html:gye(e.name,t)}})}function yye(e){const t=e.suggestionComponent||vye,n=e.options.map((r,i)=>{const o=`${e.id}-${i}`,s=[];return e.index===i&&s.push(e.classNames.suggestionActive),r.disabled&&s.push(e.classNames.suggestionDisabled),V.createElement("li",{id:o,key:o,role:"option",className:s.join(" "),"aria-disabled":!!r.disabled,onMouseDown:a=>a.preventDefault(),onClick:()=>e.addTag(r)},r.prefix?V.createElement("span",{className:e.classNames.suggestionPrefix},r.prefix," "):null,r.disableMarkIt?r.name:V.createElement(t,{item:r,query:e.query}))});return V.createElement("div",{className:e.classNames.suggestions},V.createElement("ul",{role:"listbox",id:e.id},n))}function _ye(e,t){const n=e.querySelectorAll("a,button,input"),r=Array.prototype.findIndex.call(n,o=>o===t),i=n[r-1]||n[r+1];i&&i.focus()}const Na={ENTER:"Enter",TAB:"Tab",BACKSPACE:"Backspace",UP_ARROW:"ArrowUp",UP_ARROW_COMPAT:"Up",DOWN_ARROW:"ArrowDown",DOWN_ARROW_COMPAT:"Down"},MF={root:"react-tags",rootFocused:"is-focused",selected:"react-tags__selected",selectedTag:"react-tags__selected-tag",selectedTagName:"react-tags__selected-tag-name",search:"react-tags__search",searchWrapper:"react-tags__search-wrapper",searchInput:"react-tags__search-input",suggestions:"react-tags__suggestions",suggestionActive:"is-active",suggestionDisabled:"is-disabled",suggestionPrefix:"react-tags__suggestion-prefix"};function RF(e,t){return e.findIndex(n=>mye(t).test(n.name))}function Gb(){if(this.state.query.length>=this.props.minQueryLength){const e=RF(this.state.options,this.state.query),t=this.state.index===-1?e:this.state.index,n=t>-1?this.state.options[t]:null;n?this.addTag(n):this.props.allowNew&&this.addTag({name:this.state.query})}}function bye(e){e.preventDefault();const t=this.state.options.length-1;this.setState({index:this.state.index<=0?t:this.state.index-1})}function wye(e){e.preventDefault();const t=this.state.options.length-1;this.setState({index:this.state.index>=t?0:this.state.index+1})}function xye(){this.state.query.length||this.deleteTag(this.props.tags.length-1)}function Sye(e,t){return pye(t).test(e.name)}function Cye(e,t){let n;return e.suggestionsTransform?n=e.suggestionsTransform(t.query,e.suggestions):n=e.suggestions.filter(r=>e.suggestionsFilter(r,t.query)),n=n.slice(0,e.maxSuggestionsLength),e.allowNew&&e.newTagText&&RF(n,t.query)===-1?n.push({id:0,name:t.query,prefix:e.newTagText,disableMarkIt:!0}):e.noSuggestionsText&&n.length===0&&n.push({id:0,name:e.noSuggestionsText,disabled:!0,disableMarkIt:!0}),n}class nT extends V.Component{constructor(t){super(t),this.state={query:"",focused:!1,index:-1},this.inputEventHandlers={onChange:()=>{},onBlur:this.onBlur.bind(this),onFocus:this.onFocus.bind(this),onInput:this.onInput.bind(this),onKeyDown:this.onKeyDown.bind(this)},this.container=V.createRef(),this.input=V.createRef()}onInput(t){const n=t.target.value;this.props.onInput&&this.props.onInput(n),n.length===this.state.query.length+1&&this.props.delimiters.indexOf(n.slice(-1))>-1?Gb.call(this):n!==this.state.query&&this.setState({query:n})}onKeyDown(t){this.props.delimiters.indexOf(t.key)>-1&&((this.state.query||this.state.index>-1)&&t.preventDefault(),Gb.call(this)),t.key===Na.BACKSPACE&&this.props.allowBackspace&&xye.call(this,t),(t.key===Na.UP_ARROW||t.key===Na.UP_ARROW_COMPAT)&&bye.call(this,t),(t.key===Na.DOWN_ARROW||t.key===Na.DOWN_ARROW_COMPAT)&&wye.call(this,t)}onClick(t){document.activeElement!==t.target&&this.focusInput()}onBlur(){this.setState({focused:!1,index:-1}),this.props.onBlur&&this.props.onBlur(),this.props.addOnBlur&&Gb.call(this)}onFocus(){this.setState({focused:!0}),this.props.onFocus&&this.props.onFocus()}onDeleteTag(t,n){this.container.current&&_ye(this.container.current,n.currentTarget),this.deleteTag(t)}addTag(t){t.disabled||typeof this.props.onValidate=="function"&&!this.props.onValidate(t)||(this.props.onAddition({id:t.id,name:t.name}),this.clearInput())}deleteTag(t){this.props.onDelete(t)}clearInput(){this.setState({query:"",index:-1})}clearSelectedIndex(){this.setState({index:-1})}focusInput(){this.input.current&&this.input.current.input.current&&this.input.current.input.current.focus()}render(){const t=this.props.tagComponent||cye,n=this.state.focused&&this.state.query.length>=this.props.minQueryLength,r=Object.assign({},MF,this.props.classNames),i=[r.root];return this.state.focused&&i.push(r.rootFocused),V.createElement("div",{ref:this.container,className:i.join(" "),onClick:this.onClick.bind(this)},V.createElement("div",{className:r.selected,"aria-relevant":"additions removals","aria-live":"polite"},this.props.tags.map((o,s)=>V.createElement(t,{key:s,tag:o,removeButtonText:this.props.removeButtonText,classNames:r,onDelete:this.onDeleteTag.bind(this,s)}))),V.createElement("div",{className:r.search},V.createElement(dye,Object.assign({},this.state,{id:this.props.id,ref:this.input,classNames:r,inputAttributes:this.props.inputAttributes,inputEventHandlers:this.inputEventHandlers,autoresize:this.props.autoresize,expanded:n,placeholderText:this.props.placeholderText,ariaLabelText:this.props.ariaLabelText})),n&&this.state.options.length?V.createElement(yye,Object.assign({},this.state,{id:this.props.id,classNames:r,expanded:n,addTag:this.addTag.bind(this),suggestionComponent:this.props.suggestionComponent})):null))}static getDerivedStateFromProps(t,n){return n.prevQuery!==n.query||n.prevSuggestions!==t.suggestions?{prevQuery:n.query,prevSuggestions:t.suggestions,options:Cye(t,n)}:null}}nT.defaultProps={id:"ReactTags",tags:[],placeholderText:"Add new tag",removeButtonText:"Click to remove tag",noSuggestionsText:null,newTagText:null,suggestions:[],suggestionsFilter:Sye,suggestionsTransform:null,autoresize:!0,classNames:MF,delimiters:[Na.TAB,Na.ENTER],minQueryLength:2,maxSuggestionsLength:6,allowNew:!1,allowBackspace:!0,addOnBlur:!1,tagComponent:null,suggestionComponent:null,inputAttributes:{}};nT.propTypes={id:S.string,tags:S.arrayOf(S.object),placeholderText:S.string,ariaLabelText:S.string,removeButtonText:S.string,noSuggestionsText:S.string,newTagText:S.string,suggestions:S.arrayOf(S.object),suggestionsFilter:S.func,suggestionsTransform:S.func,autoresize:S.bool,delimiters:S.arrayOf(S.string),onDelete:S.func.isRequired,onAddition:S.func.isRequired,onInput:S.func,onFocus:S.func,onBlur:S.func,onValidate:S.func,minQueryLength:S.number,maxSuggestionsLength:S.number,classNames:S.object,allowNew:S.bool,allowBackspace:S.bool,addOnBlur:S.bool,tagComponent:S.oneOfType([S.func,S.element]),suggestionComponent:S.oneOfType([S.func,S.element]),inputAttributes:S.object};const NF=({tag:e,colorGenerator:t})=>C("div",{style:{backgroundColor:t.getColorForKey(e)},className:"tag-bullet"}),hL=e=>({id:e,name:e}),Eye=e=>({selectedTags:t,onChange:n,placeholder:r,listTags:i,tagsList:o,settings:s,allowNew:a=!0})=>{var h;H.useEffect(()=>{i()},[]);const l=((h=s.shortUrlCreation)==null?void 0:h.tagFilteringMode)??"startsWith",c=({tag:p,onDelete:m})=>C(XE,{colorGenerator:e,text:p.name,clearable:!0,className:"react-tags__tag",onClose:m}),f=({item:p})=>U(We,{children:[C(NF,{tag:`${p.name}`,colorGenerator:e}),p.name]});return C(nT,{tags:t.map(hL),tagComponent:c,suggestions:o.tags.filter(p=>!t.includes(p)).map(hL),suggestionComponent:f,allowNew:a,addOnBlur:!0,placeholderText:r??"Add tags to the URL",minQueryLength:1,delimiters:["Enter","Tab",","],suggestionsTransform:l==="includes"?(p,m)=>m.filter(({name:g})=>g.includes(p)):void 0,onDelete:p=>{const m=[...t];m.splice(p,1),n(m)},onAddition:({name:p})=>n([...new Set([...t,...p.toLowerCase().split(",")])])})},Rx="shlink/tagDelete",Tye={deleting:!1,deleted:!1,error:!1},LF=_n(`${Rx}/tagDeleted`),Oye=e=>{const t=ir(`${Rx}/deleteTag`,async(r,{getState:i})=>{const{deleteTags:o}=e(i);await o([r])}),{reducer:n}=Yn({name:Rx,initialState:Tye,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:io(o)})),r.addCase(t.fulfilled,()=>({deleting:!1,deleted:!0,error:!1}))}});return{reducer:n,deleteTag:t}},rT="shlink/tagEdit",Pye={editing:!1,edited:!1,error:!1},DF=_n(`${rT}/tagEdited`),kye=(e,t)=>ir(`${rT}/editTag`,async({oldName:n,newName:r,color:i},{getState:o})=>(await e(o).editTag(n,r),t.setColorForKey(r,i),{oldName:n,newName:r,color:i})),Mye=e=>Yn({name:rT,initialState:Pye,reducers:{},extraReducers:t=>{t.addCase(e.pending,()=>({editing:!0,edited:!1,error:!1})),t.addCase(e.rejected,(n,{error:r})=>({editing:!1,edited:!1,error:!0,errorData:io(r)})),t.addCase(e.fulfilled,(n,{payload:r})=>({...PZ(["oldName","newName"],r),editing:!1,edited:!0,error:!1}))}}),iT="shlink/tagsList",Zb={tags:[],filteredTags:[],stats:{},loading:!1,error:!1},pL=(e,t)=>n=>n===e?t:n,mL=(e,t)=>Wd(n=>n===t,e),Rye=(e,t)=>e.reduce((n,[r,i])=>{if(!n[r])return n;const o=n[r];return{...n,[r]:{...o,visitsCount:o.visitsCount+i}}},{...t}),Nye=e=>Object.entries(e.reduce((t,{shortUrl:n})=>(n==null||n.tags.forEach(r=>{t[r]=(t[r]||0)+1}),t),{})),Lye=(e,t=!0)=>ir(`${iT}/listTags`,async(n,{getState:r})=>{const{tagsList:i,selectedServer:o}=r();if(!t&&!Cr(i.tags))return i;const{listTags:s,tagsStats:a}=e(r),{tags:l,stats:c=[]}=await(ME.tagsStats(o)?a():s()),f=c.reduce((h,{tag:p,shortUrlsCount:m,visitsCount:g})=>(h[p]={shortUrlsCount:m,visitsCount:g},h),{});return{tags:l,stats:f}}),AF=_n(`${iT}/filterTags`),Dye=(e,t)=>Yn({name:iT,initialState:Zb,reducers:{},extraReducers:n=>{n.addCase(AF,(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})=>({...Zb,error:!0,errorData:io(i)})),n.addCase(e.fulfilled,(r,{payload:i})=>({...Zb,stats:i.stats,tags:i.tags,filteredTags:i.tags})),n.addCase(LF,({tags:r,filteredTags:i,...o},{payload:s})=>({...o,tags:mL(r,s),filteredTags:mL(i,s)})),n.addCase(DF,({tags:r,filteredTags:i,stats:o,...s},{payload:a})=>({...s,stats:{...o,[a.newName]:o[a.oldName]},tags:r.map(pL(a.oldName,a.newName)).sort(),filteredTags:i.map(pL(a.oldName,a.newName)).sort()})),n.addCase(ch,(r,{payload:i})=>({...r,stats:Rye(Nye(i.createdVisits),r.stats)})),n.addCase(t.fulfilled,({tags:r,...i},{payload:o})=>({...i,tags:r.concat(o.tags.filter(s=>!r.includes(s)))}))}}),Aye=e=>sa(({filterTags:t,forceListTags:n,tagsList:r,selectedServer:i,settings:o})=>{var h;const[s,a]=H.useState(((h=o.tags)==null?void 0:h.defaultOrdering)??{}),l=er(()=>r.filteredTags.map(p=>{var m,g;return{tag:p,shortUrls:((m=r.stats[p])==null?void 0:m.shortUrlsCount)??0,visits:((g=r.stats[p])==null?void 0:g.visitsCount)??0}}),p=>VI(p,s));if(H.useEffect(()=>{n()},[]),r.loading)return C(To,{loading:!0});if(r.error)return C(Dr,{type:"error",children:C(Io,{errorData:r.errorData,fallbackMessage:"Error loading tags :("})});const c=p=>()=>{const m=a_(p,s.field,s.dir);a({field:m?p:void 0,dir:m})};return U(We,{children:[C(sh,{className:"mb-3",onChange:t}),C(Qn,{className:"mb-3",children:C("div",{className:"col-lg-6 offset-lg-6",children:C(hh,{items:K8,order:s,onChange:(p,m)=>a({field:p,dir:m})})})}),(()=>{if(r.filteredTags.length<1)return C(To,{children:"No tags found"});const p=l();return C(e,{sortedTags:p,selectedServer:i,currentOrder:s,orderByColumn:c})})()]})},()=>[Jr.visits]);const oT=({pagesCount:e,currentPage:t,setCurrentPage:n,centered:r=!0})=>{if(e<2)return null;const i=o=>()=>!Rd(o)&&n(o);return U(C_,{listClassName:ge("flex-wrap mb-0 simple-paginator",{"justify-content-center":r}),children:[C(Ns,{disabled:t<=1,children:C(Ls,{previous:!0,tag:"span",onClick:i(t-1)})}),SF(t,e).map((o,s)=>C(Ns,{disabled:Rd(o),active:t===o,children:C(Ls,{role:"link",tag:"span",onClick:i(o),children:CF(o)})},EF(o,s))),C(Ns,{disabled:t>=e,children:C(Ls,{next:!0,tag:"span",onClick:i(t+1)})})]})};const Iye=20,Fye=e=>({sortedTags:t,selectedServer:n,orderByColumn:r,currentOrder:i})=>{const o=H.useRef(!0),{search:s}=kn(),{page:a=1}=gl(s),[l,c]=Doe("page",Number(a)),f=dd(Iye,t),h=f.length>1,p=f[l-1]??[];return H.useEffect(()=>{!o.current&&c(1),o.current=!1},[t]),H.useEffect(()=>{scrollTo(0,0)},[l]),U(fn,{bodyClassName:h?"pb-1":"",children:[U("table",{className:"table table-hover responsive-table mb-0",children:[U("thead",{className:"responsive-table__header",children:[U("tr",{children:[U("th",{className:"tags-table__header-cell",onClick:r("tag"),children:["Tag ",C(If,{currentOrder:i,field:"tag"})]}),U("th",{className:"tags-table__header-cell text-lg-end",onClick:r("shortUrls"),children:["Short URLs ",C(If,{currentOrder:i,field:"shortUrls"})]}),U("th",{className:"tags-table__header-cell text-lg-end",onClick:r("visits"),children:["Visits ",C(If,{currentOrder:i,field:"visits"})]}),C("th",{"aria-label":"Options",className:"tags-table__header-cell"})]}),C("tr",{children:C("th",{"aria-label":"Separator",colSpan:4,className:"p-0 border-top-0"})})]}),U("tbody",{children:[p.length===0&&C("tr",{children:C("td",{colSpan:4,className:"text-center",children:"No results found"})}),p.map(m=>C(e,{tag:m,selectedServer:n},m.tag))]})]}),h&&C("div",{className:"sticky-card-paginator",children:C(oT,{pagesCount:f.length,currentPage:l,setCurrentPage:c})})]},l)},$ye=(e,t,n)=>({tag:r,selectedServer:i})=>{const[o,s]=$t(),[a,l]=$t(),[c,f]=$t(),h=Vd(i);return U("tr",{className:"responsive-table__row",children:[U("th",{className:"responsive-table__cell","data-th":"Tag",children:[C(NF,{tag:r.tag,colorGenerator:n})," ",r.tag]}),C("td",{className:"responsive-table__cell text-lg-end","data-th":"Short URLs",children:C(At,{to:`/server/${h}/list-short-urls/1?tags=${encodeURIComponent(r.tag)}`,children:bn(r.shortUrls)})}),C("td",{className:"responsive-table__cell text-lg-end","data-th":"Visits",children:C(At,{to:`/server/${h}/tag/${r.tag}/visits`,children:bn(r.visits)})}),C("td",{className:"responsive-table__cell text-lg-end",children:U(O_,{toggle:f,isOpen:c,children:[U(Ve,{onClick:l,children:[C(Fe,{icon:rQ,fixedWidth:!0,className:"me-1"})," Edit"]}),U(Ve,{onClick:s,children:[C(Fe,{icon:_Q,fixedWidth:!0,className:"me-1"})," Delete"]})]})}),C(t,{tag:r.tag,toggle:l,isOpen:a}),C(e,{tag:r.tag,toggle:s,isOpen:o})]})},jye=(e,t)=>{e.serviceFactory("TagsSelector",Eye,"ColorGenerator"),e.decorator("TagsSelector",t(["tagsList","settings"],["listTags"])),e.serviceFactory("DeleteTagConfirmModal",()=>Wve),e.decorator("DeleteTagConfirmModal",t(["tagDelete"],["deleteTag","tagDeleted"])),e.serviceFactory("EditTagModal",lye,"ColorGenerator"),e.decorator("EditTagModal",t(["tagEdit"],["editTag","tagEdited"])),e.serviceFactory("TagsTableRow",$ye,"DeleteTagConfirmModal","EditTagModal","ColorGenerator"),e.serviceFactory("TagsTable",Fye,"TagsTableRow"),e.serviceFactory("TagsList",Aye,"TagsTable"),e.decorator("TagsList",t(["tagsList","selectedServer","mercureInfo","settings"],["forceListTags","filterTags","createNewVisits","loadMercureInfo"])),e.serviceFactory("tagEditReducerCreator",Mye,"editTag"),e.serviceFactory("tagEditReducer",St("reducer"),"tagEditReducerCreator"),e.serviceFactory("tagDeleteReducerCreator",Oye,"buildShlinkApiClient"),e.serviceFactory("tagDeleteReducer",St("reducer"),"tagDeleteReducerCreator"),e.serviceFactory("tagsListReducerCreator",Dye,"listTags","createShortUrl"),e.serviceFactory("tagsListReducer",St("reducer"),"tagsListReducerCreator");const n=r=>({buildShlinkApiClient:i})=>Lye(i,r);e.factory("listTags",n(!1)),e.factory("forceListTags",n(!0)),e.serviceFactory("filterTags",()=>AF),e.serviceFactory("deleteTag",St("deleteTag"),"tagDeleteReducerCreator"),e.serviceFactory("tagDeleted",()=>LF),e.serviceFactory("editTag",kye,"buildShlinkApiClient","ColorGenerator"),e.serviceFactory("tagEdited",()=>DF)};var Bye="Expected a function",IF="__lodash_hash_undefined__",FF=1/0,zye="[object Function]",Uye="[object GeneratorFunction]",Vye="[object Symbol]",Hye=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Wye=/^\w*$/,Yye=/^\./,qye=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Gye=/[\\^$.*+?()[\]{}|]/g,Zye=/\\(\\)?/g,Kye=/^\[object .+?Constructor\]$/,Xye=typeof Wl=="object"&&Wl&&Wl.Object===Object&&Wl,Qye=typeof self=="object"&&self&&self.Object===Object&&self,sT=Xye||Qye||Function("return this")();function Jye(e,t){return e==null?void 0:e[t]}function e_e(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var t_e=Array.prototype,n_e=Function.prototype,$F=Object.prototype,Kb=sT["__core-js_shared__"],gL=function(){var e=/[^.]+$/.exec(Kb&&Kb.keys&&Kb.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),jF=n_e.toString,aT=$F.hasOwnProperty,BF=$F.toString,r_e=RegExp("^"+jF.call(aT).replace(Gye,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vL=sT.Symbol,i_e=t_e.splice,o_e=zF(sT,"Map"),Ld=zF(Object,"create"),yL=vL?vL.prototype:void 0,_L=yL?yL.toString:void 0;function ul(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1}function m_e(e,t){var n=this.__data__,r=I_(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}uu.prototype.clear=f_e;uu.prototype.delete=d_e;uu.prototype.get=h_e;uu.prototype.has=p_e;uu.prototype.set=m_e;function bl(e){var t=-1,n=e?e.length:0;for(this.clear();++tt.toFixed(e.decimals).replace(".",e.separator):t=>`${t}`.replace(".",e.separator):e.decimals?t=>t.toFixed(e.decimals):t=>`${t}`}function uT(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 F_e(e={stringFormatter:uT()}){return t=>e.stringFormatter(t.toString().slice(7,-1))}function $_e(e={stringFormatter:uT()}){return t=>t===null||(t=JSON.stringify(t),t===void 0)?"":(t[0]==='"'&&(t=t.replace(/^"(.+)"$/,"$1")),e.stringFormatter(t))}function wL(e,t,n){const r=e[t];return r===void 0?n:r}function HF(e,t){try{return Array.isArray(t)?e.push(...t):e.push(t),e}catch{return e.concat(t)}}function Nx(e,t){let n=!0;return e.reduce((r,i)=>(i==null&&(i=""),n?(n=!1,`${i}`):`${r}${t}${i}`),"")}class j_e{constructor(t){this.opts=this.preprocessOpts(t)}preprocessOpts(t){const n=Object.assign({},t);n.fields&&(n.fields=this.preprocessFieldsInfo(n.fields,n.defaultValue)),n.transforms=n.transforms||[];const r=n.formatters&&n.formatters.string||uT(),i=$_e({stringFormatter:r}),o={header:r,undefined:Xb,boolean:Xb,number:I_e(),bigint:Xb,string:r,symbol:F_e({stringFormatter:r}),function:i,object:i};return n.formatters={...o,...n.formatters},n.delimiter=n.delimiter||",",n.eol=n.eol||` +`,n.header=n.header!==!1,n.includeEmptyRows=n.includeEmptyRows||!1,n.withBOM=n.withBOM||!1,n}preprocessFieldsInfo(t,n){return t.map(r=>{if(typeof r=="string")return{label:r,value:r.includes(".")||r.includes("[")?i=>bL(i,r,n):i=>wL(i,r,n)};if(typeof r=="object"){const i="default"in r?r.default:n;if(typeof r.value=="string")return{label:r.label||r.value,value:r.value.includes(".")||r.value.includes("[")?o=>bL(o,r.value,i):o=>wL(o,r.value,i)};if(typeof r.value=="function"){const o=r.label||r.value.name||"",s={label:o,default:i};return{label:o,value(a){const l=r.value(a,s);return l??i}}}}throw new Error("Invalid field info option. "+JSON.stringify(r))})}getHeader(){return Nx(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(HF,[]),[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 Nx(n,this.opts.delimiter)}processCell(t,n){return this.processValue(n.value(t))}processValue(t){return this.opts.formatters[typeof t](t)}}class B_e extends j_e{constructor(t){super(t)}parse(t){const n=this.preprocessData(t);this.opts.fields=this.opts.fields||this.preprocessFieldsInfo(n.reduce((s,a)=>(Object.keys(a).forEach(l=>{s.includes(l)||s.push(l)}),s),[]));const r=this.opts.header?this.getHeader():"",i=this.processData(n);return(this.opts.withBOM?"\uFEFF":"")+r+(r&&i?this.opts.eol:"")+i}preprocessData(t){const n=Array.isArray(t)?t:[t];if(!this.opts.fields&&(n.length===0||typeof n[0]!="object"))throw new Error('Data should not be empty or the "fields" option should be included');return this.opts.transforms.length===0?n:n.map(r=>this.preprocessRow(r)).reduce(HF,[])}processData(t){return Nx(t.map(n=>this.processRow(n)).filter(n=>n),this.opts.eol)}}var Sn;(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"})(Sn||(Sn={}));Sn.QUOTATION_MARK+"",Sn.QUOTATION_MARK,Sn.REVERSE_SOLIDUS+"",Sn.REVERSE_SOLIDUS,Sn.SOLIDUS+"",Sn.SOLIDUS,Sn.LATIN_SMALL_LETTER_B+"",Sn.BACKSPACE,Sn.LATIN_SMALL_LETTER_F+"",Sn.FORM_FEED,Sn.LATIN_SMALL_LETTER_N+"",Sn.NEWLINE,Sn.LATIN_SMALL_LETTER_R+"",Sn.CARRIAGE_RETURN,Sn.LATIN_SMALL_LETTER_T+"",Sn.TAB;var xL;(function(e){e[e.LEFT_BRACE=1]="LEFT_BRACE",e[e.RIGHT_BRACE=2]="RIGHT_BRACE",e[e.LEFT_BRACKET=3]="LEFT_BRACKET",e[e.RIGHT_BRACKET=4]="RIGHT_BRACKET",e[e.COLON=5]="COLON",e[e.COMMA=6]="COMMA",e[e.TRUE=7]="TRUE",e[e.FALSE=8]="FALSE",e[e.NULL=9]="NULL",e[e.STRING=10]="STRING",e[e.NUMBER=11]="NUMBER",e[e.SEPARATOR=12]="SEPARATOR"})(xL||(xL={}));var SL;(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"})(SL||(SL={}));var CL;(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"})(CL||(CL={}));var EL;(function(e){e[e.OBJECT=0]="OBJECT",e[e.ARRAY=1]="ARRAY"})(EL||(EL={}));var z_e=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(r,i,o){n.o(r,i)||Object.defineProperty(r,i,{enumerable:!0,get:o})},n.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n.t=function(r,i){if(1&i&&(r=n(r)),8&i||4&i&&typeof r=="object"&&r&&r.__esModule)return r;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:r}),2&i&&typeof r!="string")for(var s in r)n.d(o,s,function(a){return r[a]}.bind(null,s));return o},n.n=function(r){var i=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(i,"a",i),i},n.o=function(r,i){return Object.prototype.hasOwnProperty.call(r,i)},n.p="",n(n.s=32)}([function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch{typeof window=="object"&&(n=window)}e.exports=n},function(e,t,n){var r=n(6),i=Object.keys||function(g){var v=[];for(var w in g)v.push(w);return v};e.exports=h;var o=n(5);o.inherits=n(2);var s=n(23),a=n(14);o.inherits(h,s);for(var l=i(a.prototype),c=0;c @@ -1000,13 +1000,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `;break}}return i.eol||` `}},function(e,t,n){var r=n(65),i=n(73);e.exports=function(o,s){var a=i(o,s);return r(a)?a:void 0}},function(e,t,n){var r=n(19).Symbol;e.exports=r},function(e,t,n){var r=n(67),i=typeof self=="object"&&self&&self.Object===Object&&self,o=r||i||Function("return this")();e.exports=o},function(e,t){e.exports=function(n){var r=typeof n;return n!=null&&(r=="object"||r=="function")}},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){var r=n(30),i=n(76);e.exports=function(o){return typeof o=="symbol"||i(o)&&r(o)=="[object Symbol]"}},function(e,t,n){(function(r,i){var o=n(6);e.exports=T;var s,a=n(37);T.ReadableState=x,n(12).EventEmitter;var l=function(I,B){return I.listeners(B).length},c=n(24),f=n(7).Buffer,h=r.Uint8Array||function(){},p=n(5);p.inherits=n(2);var m=n(41),g=void 0;g=m&&m.debuglog?m.debuglog("stream"):function(){};var v,w=n(42),y=n(25);p.inherits(T,c);var b=["error","close","destroy","pause","resume"];function x(I,B){s=s||n(1),I=I||{};var re=B instanceof s;this.objectMode=!!I.objectMode,re&&(this.objectMode=this.objectMode||!!I.readableObjectMode);var W=I.highWaterMark,G=I.readableHighWaterMark,ne=this.objectMode?16:16384;this.highWaterMark=W||W===0?W:re&&(G||G===0)?G:ne,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new w,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=I.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,I.encoding&&(v||(v=n(26).StringDecoder),this.decoder=new v(I.encoding),this.encoding=I.encoding)}function T(I){if(s=s||n(1),!(this instanceof T))return new T(I);this._readableState=new x(I,this),this.readable=!0,I&&(typeof I.read=="function"&&(this._read=I.read),typeof I.destroy=="function"&&(this._destroy=I.destroy)),c.call(this)}function P(I,B,re,W,G){var ne,ae=I._readableState;return B===null?(ae.reading=!1,function(me,O){if(!O.ended){if(O.decoder){var R=O.decoder.end();R&&R.length&&(O.buffer.push(R),O.length+=O.objectMode?1:R.length)}O.ended=!0,z(me)}}(I,ae)):(G||(ne=function(me,O){var R;return function(F){return f.isBuffer(F)||F instanceof h}(O)||typeof O=="string"||O===void 0||me.objectMode||(R=new TypeError("Invalid non-string/buffer chunk")),R}(ae,B)),ne?I.emit("error",ne):ae.objectMode||B&&B.length>0?(typeof B=="string"||ae.objectMode||Object.getPrototypeOf(B)===f.prototype||(B=function(me){return f.from(me)}(B)),W?ae.endEmitted?I.emit("error",new Error("stream.unshift() after end event")):k(I,ae,B,!0):ae.ended?I.emit("error",new Error("stream.push() after EOF")):(ae.reading=!1,ae.decoder&&!re?(B=ae.decoder.write(B),ae.objectMode||B.length!==0?k(I,ae,B,!1):Y(I,ae)):k(I,ae,B,!1))):W||(ae.reading=!1)),function(me){return!me.ended&&(me.needReadable||me.lengthB.highWaterMark&&(B.highWaterMark=function(re){return re>=N?re=N:(re--,re|=re>>>1,re|=re>>>2,re|=re>>>4,re|=re>>>8,re|=re>>>16,re++),re}(I)),I<=B.length?I:B.ended?B.length:(B.needReadable=!0,0))}function z(I){var B=I._readableState;B.needReadable=!1,B.emittedReadable||(g("emitReadable",B.flowing),B.emittedReadable=!0,B.sync?o.nextTick(A,I):A(I))}function A(I){g("emit readable"),I.emit("readable"),te(I)}function Y(I,B){B.readingMore||(B.readingMore=!0,o.nextTick(q,I,B))}function q(I,B){for(var re=B.length;!B.reading&&!B.flowing&&!B.ended&&B.length=B.length?(re=B.decoder?B.buffer.join(""):B.buffer.length===1?B.buffer.head.data:B.buffer.concat(B.length),B.buffer.clear()):re=function(W,G,ne){var ae;return WX.length?X.length:me;if(le===X.length?Q+=X:Q+=X.slice(0,me),(me-=le)==0){le===X.length?(++F,R.next?O.head=R.next:O.head=O.tail=null):(O.head=R,R.data=X.slice(le));break}++F}return O.length-=F,Q}(W,G):function(me,O){var R=f.allocUnsafe(me),F=O.head,Q=1;for(F.data.copy(R),me-=F.data.length;F=F.next;){var X=F.data,le=me>X.length?X.length:me;if(X.copy(R,R.length-me,0,le),(me-=le)==0){le===X.length?(++Q,F.next?O.head=F.next:O.head=O.tail=null):(O.head=F,F.data=X.slice(le));break}++Q}return O.length-=Q,R}(W,G),ae}(I,B.buffer,B.decoder),re);var re}function se(I){var B=I._readableState;if(B.length>0)throw new Error('"endReadable()" called on non-empty stream');B.endEmitted||(B.ended=!0,o.nextTick(Z,B,I))}function Z(I,B){I.endEmitted||I.length!==0||(I.endEmitted=!0,B.readable=!1,B.emit("end"))}function $(I,B){for(var re=0,W=I.length;re=B.highWaterMark||B.ended))return g("read: emitReadable",B.length,B.ended),B.length===0&&B.ended?se(this):z(this),null;if((I=D(I,B))===0&&B.ended)return B.length===0&&se(this),null;var W,G=B.needReadable;return g("need readable",G),(B.length===0||B.length-I0?oe(I,B):null)===null?(B.needReadable=!0,I=0):B.length-=I,B.length===0&&(B.ended||(B.needReadable=!0),re!==I&&B.ended&&se(this)),W!==null&&this.emit("data",W),W},T.prototype._read=function(I){this.emit("error",new Error("_read() is not implemented"))},T.prototype.pipe=function(I,B){var re=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,g("pipe count=%d opts=%j",W.pipesCount,B);var G=B&&B.end===!1||I===i.stdout||I===i.stderr?le:ne;function ne(){g("onend"),I.end()}W.endEmitted?o.nextTick(G):re.once("end",G),I.on("unpipe",function ve(De,fe){g("onunpipe"),De===re&&fe&&fe.hasUnpiped===!1&&(fe.hasUnpiped=!0,g("cleanup"),I.removeListener("close",Q),I.removeListener("finish",X),I.removeListener("drain",ae),I.removeListener("error",F),I.removeListener("unpipe",ve),re.removeListener("end",ne),re.removeListener("end",le),re.removeListener("data",R),me=!0,!W.awaitDrain||I._writableState&&!I._writableState.needDrain||ae())});var ae=function(ve){return function(){var De=ve._readableState;g("pipeOnDrain",De.awaitDrain),De.awaitDrain&&De.awaitDrain--,De.awaitDrain===0&&l(ve,"data")&&(De.flowing=!0,te(ve))}}(re);I.on("drain",ae);var me=!1,O=!1;function R(ve){g("ondata"),O=!1,I.write(ve)!==!1||O||((W.pipesCount===1&&W.pipes===I||W.pipesCount>1&&$(W.pipes,I)!==-1)&&!me&&(g("false write response, pause",re._readableState.awaitDrain),re._readableState.awaitDrain++,O=!0),re.pause())}function F(ve){g("onerror",ve),le(),I.removeListener("error",F),l(I,"error")===0&&I.emit("error",ve)}function Q(){I.removeListener("finish",X),le()}function X(){g("onfinish"),I.removeListener("close",Q),le()}function le(){g("unpipe"),re.unpipe(I)}return re.on("data",R),function(ve,De,fe){if(typeof ve.prependListener=="function")return ve.prependListener(De,fe);ve._events&&ve._events[De]?a(ve._events[De])?ve._events[De].unshift(fe):ve._events[De]=[fe,ve._events[De]]:ve.on(De,fe)}(I,"error",F),I.once("close",Q),I.once("finish",X),I.emit("pipe",re),W.flowing||(g("pipe resume"),re.resume()),I},T.prototype.unpipe=function(I){var B=this._readableState,re={hasUnpiped:!1};if(B.pipesCount===0)return this;if(B.pipesCount===1)return I&&I!==B.pipes?this:(I||(I=B.pipes),B.pipes=null,B.pipesCount=0,B.flowing=!1,I&&I.emit("unpipe",this,re),this);if(!I){var W=B.pipes,G=B.pipesCount;B.pipes=null,B.pipesCount=0,B.flowing=!1;for(var ne=0;ne>5==6?2:g>>4==14?3:g>>3==30?4:g>>6==2?-1:-2}function a(g){var v=this.lastTotal-this.lastNeed,w=function(y,b,x){if((192&b[0])!=128)return y.lastNeed=0,"�";if(y.lastNeed>1&&b.length>1){if((192&b[1])!=128)return y.lastNeed=1,"�";if(y.lastNeed>2&&b.length>2&&(192&b[2])!=128)return y.lastNeed=2,"�"}}(this,g);return w!==void 0?w:this.lastNeed<=g.length?(g.copy(this.lastChar,v,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(g.copy(this.lastChar,v,0,g.length),void(this.lastNeed-=g.length))}function l(g,v){if((g.length-v)%2==0){var w=g.toString("utf16le",v);if(w){var y=w.charCodeAt(w.length-1);if(y>=55296&&y<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=g[g.length-2],this.lastChar[1]=g[g.length-1],w.slice(0,-1)}return w}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=g[g.length-1],g.toString("utf16le",v,g.length-1)}function c(g){var v=g&&g.length?this.write(g):"";if(this.lastNeed){var w=this.lastTotal-this.lastNeed;return v+this.lastChar.toString("utf16le",0,w)}return v}function f(g,v){var w=(g.length-v)%3;return w===0?g.toString("base64",v):(this.lastNeed=3-w,this.lastTotal=3,w===1?this.lastChar[0]=g[g.length-1]:(this.lastChar[0]=g[g.length-2],this.lastChar[1]=g[g.length-1]),g.toString("base64",v,g.length-w))}function h(g){var v=g&&g.length?this.write(g):"";return this.lastNeed?v+this.lastChar.toString("base64",0,3-this.lastNeed):v}function p(g){return g.toString(this.encoding)}function m(g){return g&&g.length?this.write(g):""}t.StringDecoder=o,o.prototype.write=function(g){if(g.length===0)return"";var v,w;if(this.lastNeed){if((v=this.fillLast(g))===void 0)return"";w=this.lastNeed,this.lastNeed=0}else w=0;return w=0?(k>0&&(b.lastNeed=k-1),k):--P=0?(k>0&&(b.lastNeed=k-2),k):--P=0?(k>0&&(k===2?k=0:b.lastNeed=k-3),k):0}(this,g,v);if(!this.lastNeed)return g.toString("utf8",v);this.lastTotal=w;var y=g.length-(w-this.lastNeed);return g.copy(this.lastChar,0,y),g.toString("utf8",v,y)},o.prototype.fillLast=function(g){if(this.lastNeed<=g.length)return g.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);g.copy(this.lastChar,this.lastTotal-this.lastNeed,0,g.length),this.lastNeed-=g.length}},function(e,t,n){e.exports=o;var r=n(1),i=n(5);function o(l){if(!(this instanceof o))return new o(l);r.call(this,l),this._transformState={afterTransform:function(c,f){var h=this._transformState;h.transforming=!1;var p=h.writecb;if(!p)return this.emit("error",new Error("write callback called multiple times"));h.writechunk=null,h.writecb=null,f!=null&&this.push(f),p(c);var m=this._readableState;m.reading=!1,(m.needReadable||m.length-1&&s.push(i[a]);return s},t.trimLeft=String.prototype.trimLeft?function(i){return i.trimLeft()}:function(i){return i.replace(/^\s+/,"")},t.trimRight=String.prototype.trimRight?function(i){return i.trimRight()}:function(i){return i.replace(/\s+$/,"")}}).call(this,n(3).Buffer)},function(e,t,n){var r=this&&this.__extends||function(){var o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,a){s.__proto__=a}||function(s,a){for(var l in a)a.hasOwnProperty(l)&&(s[l]=a[l])};return function(s,a){function l(){this.constructor=s}o(s,a),s.prototype=a===null?Object.create(a):(l.prototype=a.prototype,new l)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(o){function s(a,l,c){var f=o.call(this,"Error: "+a+". JSON Line number: "+l+(c?" near: "+c:""))||this;return f.err=a,f.line=l,f.extra=c,f.name="CSV Parse Error",f}return r(s,o),s.column_mismatched=function(a,l){return new s("column_mismatched",a,l)},s.unclosed_quote=function(a,l){return new s("unclosed_quote",a,l)},s.fromJSON=function(a){return new s(a.err,a.line,a.extra)},s.prototype.toJSON=function(){return{err:this.err,line:this.line,extra:this.extra}},s}(Error);t.default=i},function(e,t,n){var r=n(18),i=n(68),o=n(69),s=r?r.toStringTag:void 0;e.exports=function(a){return a==null?a===void 0?"[object Undefined]":"[object Null]":s&&s in Object(a)?i(a):o(a)}},function(e,t){e.exports=function(n,r){return n===r||n!=n&&r!=r}},function(e,t,n){e.exports=n(33)},function(e,t,n){var r=n(34),i=function(o,s){return new r.Converter(o,s)};i.csv=i,i.Converter=r.Converter,e.exports=i},function(e,t,n){(function(r){var i=this&&this.__extends||function(){var m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,v){g.__proto__=v}||function(g,v){for(var w in v)v.hasOwnProperty(w)&&(g[w]=v[w])};return function(g,v){function w(){this.constructor=g}m(g,v),g.prototype=v===null?Object.create(v):(w.prototype=v.prototype,new w)}}(),o=this&&this.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(36),a=n(50),l=n(51),c=o(n(15)),f=n(52),h=n(105),p=function(m){function g(v,w){w===void 0&&(w={});var y=m.call(this,w)||this;return y.options=w,y.params=a.mergeParams(v),y.runtime=l.initParseRuntime(y),y.result=new h.Result(y),y.processor=new f.ProcessorLocal(y),y.once("error",function(b){r(function(){y.result.processError(b),y.emit("done",b)})}),y.once("done",function(){y.processor.destroy()}),y}return i(g,m),g.prototype.preRawData=function(v){return this.runtime.preRawDataHook=v,this},g.prototype.preFileLine=function(v){return this.runtime.preFileLineHook=v,this},g.prototype.subscribe=function(v,w,y){return this.parseRuntime.subscribe={onNext:v,onError:w,onCompleted:y},this},g.prototype.fromFile=function(v,w){var y=this,b=n(!function(){var x=new Error("Cannot find module 'fs'");throw x.code="MODULE_NOT_FOUND",x}());return b.exists(v,function(x){x?b.createReadStream(v,w).pipe(y):y.emit("error",new Error("File does not exist. Check to make sure the file path to your csv is correct."))}),this},g.prototype.fromStream=function(v){return v.pipe(this),this},g.prototype.fromString=function(v){v.toString();var w=new s.Readable,y=0;return w._read=function(b){if(y>=v.length)this.push(null);else{var x=v.substr(y,b);this.push(x),y+=b}},this.fromStream(w)},g.prototype.then=function(v,w){var y=this;return new c.default(function(b,x){y.parseRuntime.then={onfulfilled:function(T){b(v?v(T):T)},onrejected:function(T){w?b(w(T)):x(T)}}})},Object.defineProperty(g.prototype,"parseParam",{get:function(){return this.params},enumerable:!0,configurable:!0}),Object.defineProperty(g.prototype,"parseRuntime",{get:function(){return this.runtime},enumerable:!0,configurable:!0}),g.prototype._transform=function(v,w,y){var b=this;this.processor.process(v).then(function(x){if(x.length>0)return b.runtime.started=!0,b.result.processResult(x)}).then(function(){b.emit("drained"),y()},function(x){b.runtime.hasError=!0,b.runtime.error=x,b.emit("error",x),y()})},g.prototype._flush=function(v){var w=this;this.processor.flush().then(function(y){if(y.length>0)return w.result.processResult(y)}).then(function(){w.processEnd(v)},function(y){w.emit("error",y),v()})},g.prototype.processEnd=function(v){this.result.endProcess(),this.emit("done"),v()},Object.defineProperty(g.prototype,"parsedLineNumber",{get:function(){return this.runtime.parsedLineNumber},enumerable:!0,configurable:!0}),g}(s.Transform);t.Converter=p}).call(this,n(11).setImmediate)},function(e,t,n){(function(r,i){(function(o,s){if(!o.setImmediate){var a,l=1,c={},f=!1,h=o.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(o);p=p&&p.setTimeout?p:o,{}.toString.call(o.process)==="[object process]"?a=function(v){i.nextTick(function(){g(v)})}:function(){if(o.postMessage&&!o.importScripts){var v=!0,w=o.onmessage;return o.onmessage=function(){v=!1},o.postMessage("","*"),o.onmessage=w,v}}()?function(){var v="setImmediate$"+Math.random()+"$",w=function(y){y.source===o&&typeof y.data=="string"&&y.data.indexOf(v)===0&&g(+y.data.slice(v.length))};o.addEventListener?o.addEventListener("message",w,!1):o.attachEvent("onmessage",w),a=function(y){o.postMessage(v+y,"*")}}():o.MessageChannel?function(){var v=new MessageChannel;v.port1.onmessage=function(w){g(w.data)},a=function(w){v.port2.postMessage(w)}}():h&&"onreadystatechange"in h.createElement("script")?function(){var v=h.documentElement;a=function(w){var y=h.createElement("script");y.onreadystatechange=function(){g(w),y.onreadystatechange=null,v.removeChild(y),y=null},v.appendChild(y)}}():a=function(v){setTimeout(g,0,v)},p.setImmediate=function(v){typeof v!="function"&&(v=new Function(""+v));for(var w=new Array(arguments.length-1),y=0;y"u"?r===void 0?this:r:self)}).call(this,n(0),n(4))},function(e,t,n){e.exports=i;var r=n(12).EventEmitter;function i(){r.call(this)}n(2)(i,r),i.Readable=n(13),i.Writable=n(46),i.Duplex=n(47),i.Transform=n(48),i.PassThrough=n(49),i.Stream=i,i.prototype.pipe=function(o,s){var a=this;function l(v){o.writable&&o.write(v)===!1&&a.pause&&a.pause()}function c(){a.readable&&a.resume&&a.resume()}a.on("data",l),o.on("drain",c),o._isStdio||s&&s.end===!1||(a.on("end",h),a.on("close",p));var f=!1;function h(){f||(f=!0,o.end())}function p(){f||(f=!0,typeof o.destroy=="function"&&o.destroy())}function m(v){if(g(),r.listenerCount(this,"error")===0)throw v}function g(){a.removeListener("data",l),o.removeListener("drain",c),a.removeListener("end",h),a.removeListener("close",p),a.removeListener("error",m),o.removeListener("error",m),a.removeListener("end",g),a.removeListener("close",g),o.removeListener("close",g)}return a.on("error",m),o.on("error",m),a.on("end",g),a.on("close",g),o.on("close",g),o.emit("pipe",a),o}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(r){return n.call(r)=="[object Array]"}},function(e,t,n){t.byteLength=function(p){var m=c(p),g=m[0],v=m[1];return 3*(g+v)/4-v},t.toByteArray=function(p){for(var m,g=c(p),v=g[0],w=g[1],y=new o(3*(v+w)/4-w),b=0,x=w>0?v-4:v,T=0;T>16&255,y[b++]=m>>8&255,y[b++]=255&m;return w===2&&(m=i[p.charCodeAt(T)]<<2|i[p.charCodeAt(T+1)]>>4,y[b++]=255&m),w===1&&(m=i[p.charCodeAt(T)]<<10|i[p.charCodeAt(T+1)]<<4|i[p.charCodeAt(T+2)]>>2,y[b++]=m>>8&255,y[b++]=255&m),y},t.fromByteArray=function(p){for(var m,g=p.length,v=g%3,w=[],y=0,b=g-v;yb?b:y+16383));return v===1?(m=p[g-1],w.push(r[m>>2]+r[m<<4&63]+"==")):v===2&&(m=(p[g-2]<<8)+p[g-1],w.push(r[m>>10]+r[m>>4&63]+r[m<<2&63]+"=")),w.join("")};for(var r=[],i=[],o=typeof Uint8Array<"u"?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,l=s.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var g=p.indexOf("=");return g===-1&&(g=m),[g,g===m?0:4-g%4]}function f(p){return r[p>>18&63]+r[p>>12&63]+r[p>>6&63]+r[63&p]}function h(p,m,g){for(var v,w=[],y=m;y>1,p=-7,m=i?s-1:0,g=i?-1:1,v=n[r+m];for(m+=g,a=v&(1<<-p)-1,v>>=-p,p+=c;p>0;a=256*a+n[r+m],m+=g,p-=8);for(l=a&(1<<-p)-1,a>>=-p,p+=o;p>0;l=256*l+n[r+m],m+=g,p-=8);if(a===0)a=1-h;else{if(a===f)return l?NaN:1/0*(v?-1:1);l+=Math.pow(2,o),a-=h}return(v?-1:1)*l*Math.pow(2,a-o)},t.write=function(n,r,i,o,s,a){var l,c,f,h=8*a-s-1,p=(1<>1,g=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,v=o?0:a-1,w=o?1:-1,y=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(c=isNaN(r)?1:0,l=p):(l=Math.floor(Math.log(r)/Math.LN2),r*(f=Math.pow(2,-l))<1&&(l--,f*=2),(r+=l+m>=1?g/f:g*Math.pow(2,1-m))*f>=2&&(l++,f/=2),l+m>=p?(c=0,l=p):l+m>=1?(c=(r*f-1)*Math.pow(2,s),l+=m):(c=r*Math.pow(2,m-1)*Math.pow(2,s),l=0));s>=8;n[i+v]=255&c,v+=w,c/=256,s-=8);for(l=l<0;n[i+v]=255&l,v+=w,l/=256,h-=8);n[i+v-w]|=128*y}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(r){return n.call(r)=="[object Array]"}},function(e,t){},function(e,t,n){var r=n(7).Buffer,i=n(43);function o(s,a,l){s.copy(a,l)}e.exports=function(){function s(){(function(a,l){if(!(a instanceof l))throw new TypeError("Cannot call a class as a function")})(this,s),this.head=null,this.tail=null,this.length=0}return s.prototype.push=function(a){var l={data:a,next:null};this.length>0?this.tail.next=l:this.head=l,this.tail=l,++this.length},s.prototype.unshift=function(a){var l={data:a,next:this.head};this.length===0&&(this.tail=l),this.head=l,++this.length},s.prototype.shift=function(){if(this.length!==0){var a=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,a}},s.prototype.clear=function(){this.head=this.tail=null,this.length=0},s.prototype.join=function(a){if(this.length===0)return"";for(var l=this.head,c=""+l.data;l=l.next;)c+=a+l.data;return c},s.prototype.concat=function(a){if(this.length===0)return r.alloc(0);if(this.length===1)return this.head.data;for(var l=r.allocUnsafe(a>>>0),c=this.head,f=0;c;)o(c.data,l,f),f+=c.data.length,c=c.next;return l},s}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var s=i.inspect({length:this.length});return this.constructor.name+" "+s})},function(e,t){},function(e,t,n){(function(r){function i(o){try{if(!r.localStorage)return!1}catch{return!1}var s=r.localStorage[o];return s!=null&&String(s).toLowerCase()==="true"}e.exports=function(o,s){if(i("noDeprecation"))return o;var a=!1;return function(){if(!a){if(i("throwDeprecation"))throw new Error(s);i("traceDeprecation")?console.trace(s):console.warn(s),a=!0}return o.apply(this,arguments)}}}).call(this,n(0))},function(e,t,n){e.exports=o;var r=n(27),i=n(5);function o(s){if(!(this instanceof o))return new o(s);r.call(this,s)}i.inherits=n(2),i.inherits(o,r),o.prototype._transform=function(s,a,l){l(null,s)}},function(e,t,n){e.exports=n(14)},function(e,t,n){e.exports=n(1)},function(e,t,n){e.exports=n(13).Transform},function(e,t,n){e.exports=n(13).PassThrough},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.mergeParams=function(r){var i={delimiter:",",ignoreColumns:void 0,includeColumns:void 0,quote:'"',trim:!0,checkType:!1,ignoreEmpty:!1,noheader:!1,headers:void 0,flatKeys:!1,maxRowLength:0,checkColumn:!1,escape:'"',colParser:{},eol:void 0,alwaysSplitAtEOL:!1,output:"json",nullObject:!1,downstreamFormat:"line",needEmitAll:!0};for(var o in r||(r={}),r)r.hasOwnProperty(o)&&(Array.isArray(r[o])?i[o]=[].concat(r[o]):i[o]=r[o]);return i}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.initParseRuntime=function(r){var i=r.parseParam,o={needProcessIgnoreColumn:!1,needProcessIncludeColumn:!1,selectedColumns:void 0,ended:!1,hasError:!1,error:void 0,delimiter:r.parseParam.delimiter,eol:r.parseParam.eol,columnConv:[],headerType:[],headerTitle:[],headerFlag:[],headers:void 0,started:!1,parsedLineNumber:0,columnValueSetter:[]};return i.ignoreColumns&&(o.needProcessIgnoreColumn=!0),i.includeColumns&&(o.needProcessIncludeColumn=!0),o}},function(e,t,n){(function(r){var i=this&&this.__extends||function(){var w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,b){y.__proto__=b}||function(y,b){for(var x in b)b.hasOwnProperty(x)&&(y[x]=b[x])};return function(y,b){function x(){this.constructor=y}w(y,b),y.prototype=b===null?Object.create(b):(x.prototype=b.prototype,new x)}}(),o=this&&this.__importDefault||function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(53),a=o(n(15)),l=n(54),c=o(n(16)),f=n(57),h=n(28),p=n(58),m=o(n(59)),g=o(n(29)),v=function(w){function y(){var b=w!==null&&w.apply(this,arguments)||this;return b.rowSplit=new p.RowSplit(b.converter),b.eolEmitted=!1,b._needEmitEol=void 0,b.headEmitted=!1,b._needEmitHead=void 0,b}return i(y,w),y.prototype.flush=function(){var b=this;if(this.runtime.csvLineBuffer&&this.runtime.csvLineBuffer.length>0){var x=this.runtime.csvLineBuffer;return this.runtime.csvLineBuffer=void 0,this.process(x,!0).then(function(T){return b.runtime.csvLineBuffer&&b.runtime.csvLineBuffer.length>0?a.default.reject(g.default.unclosed_quote(b.runtime.parsedLineNumber,b.runtime.csvLineBuffer.toString())):a.default.resolve(T)})}return a.default.resolve([])},y.prototype.destroy=function(){return a.default.resolve()},Object.defineProperty(y.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(y.prototype,"needEmitHead",{get:function(){return this._needEmitHead===void 0&&(this._needEmitHead=this.converter.listeners("header").length>0),this._needEmitHead},enumerable:!0,configurable:!0}),y.prototype.process=function(b,x){var T,P=this;return x===void 0&&(x=!1),T=x?b.toString():l.prepareData(b,this.converter.parseRuntime),a.default.resolve().then(function(){return P.runtime.preRawDataHook?P.runtime.preRawDataHook(T):T}).then(function(k){return k&&k.length>0?P.processCSV(k,x):a.default.resolve([])})},y.prototype.processCSV=function(b,x){var T=this,P=this.params,k=this.runtime;k.eol||c.default(b,k),this.needEmitEol&&!this.eolEmitted&&k.eol&&(this.converter.emit("eol",k.eol),this.eolEmitted=!0),P.ignoreEmpty&&!k.started&&(b=h.trimLeft(b));var N=f.stringToLines(b,k);return x?(N.lines.push(N.partial),N.partial=""):this.prependLeftBuf(h.bufFromString(N.partial)),N.lines.length>0?(k.preFileLineHook?this.runPreLineHook(N.lines):a.default.resolve(N.lines)).then(function(D){return k.started||T.runtime.headers?T.processCSVBody(D):T.processDataWithHead(D)}):a.default.resolve([])},y.prototype.processDataWithHead=function(b){if(this.params.noheader)this.params.headers?this.runtime.headers=this.params.headers:this.runtime.headers=[];else{for(var x="",T=[];b.length;){var P=x+b.shift(),k=this.rowSplit.parse(P);if(k.closed){T=k.cells,x="";break}x=P+c.default(P,this.runtime)}if(this.prependLeftBuf(h.bufFromString(x)),T.length===0)return[];this.params.headers?this.runtime.headers=this.params.headers:this.runtime.headers=T}return(this.runtime.needProcessIgnoreColumn||this.runtime.needProcessIncludeColumn)&&this.filterHeader(),this.needEmitHead&&!this.headEmitted&&(this.converter.emit("header",this.runtime.headers),this.headEmitted=!0),this.processCSVBody(b)},y.prototype.filterHeader=function(){if(this.runtime.selectedColumns=[],this.runtime.headers){for(var b=this.runtime.headers,x=0;x=N.length)A();else if(D.preFileLineHook){var Y=N[z],q=D.preFileLineHook(Y,D.parsedLineNumber+z);if(z++,q&&q.then)q.then(function(ee){N[z-1]=ee,k(N,D,z,A)});else{for(N[z-1]=q;z0?r.concat([h.csvLineBuffer,f]):f}(s,a);a.csvLineBuffer=void 0;var c=function(f,h){var p=f.length-1;if(128&f[p]){for(;(192&f[p])==128;)p--;p--}return p!=f.length-1?(h.csvLineBuffer=f.slice(p+1),f.slice(0,p+1)):f}(l,a).toString("utf8");return a.started===!1?o.default(c):c}}).call(this,n(3).Buffer)},function(e,t,n){(function(r){var i=n(56);e.exports=function(o){return typeof o=="string"&&o.charCodeAt(0)===65279?o.slice(1):r.isBuffer(o)&&i(o)&&o[0]===239&&o[1]===187&&o[2]===191?o.slice(3):o}}).call(this,n(3).Buffer)},function(e,t){e.exports=function(n){for(var r=0;r0),this._needEmitDelimiter},enumerable:!0,configurable:!0}),l.prototype.parse=function(c){if(c.length===0||this.conv.parseParam.ignoreEmpty&&c.trim().length===0)return{cells:[],closed:!0};var f=this.quote,h=this.trim;this.escape,(this.conv.parseRuntime.delimiter instanceof Array||this.conv.parseRuntime.delimiter.toLowerCase()==="auto")&&(this.conv.parseRuntime.delimiter=this.getDelimiter(c)),this.needEmitDelimiter&&!this.delimiterEmitted&&(this.conv.emit("delimiter",this.conv.parseRuntime.delimiter),this.delimiterEmitted=!0);var p=this.conv.parseRuntime.delimiter,m=c.split(p);if(f==="off"){if(h)for(var g=0;gh&&(p=m,h=g)}),p},l.prototype.isQuoteOpen=function(c){var f=this.quote,h=this.escape;return c[0]===f&&(c[1]!==f||c[1]===h&&(c[2]===f||c.length===2))},l.prototype.isQuoteClose=function(c){var f=this.quote,h=this.escape;this.conv.parseParam.trim&&(c=o.trimRight(c));for(var p=0,m=c.length-1;c[m]===f||c[m]===h;)m--,p++;return p%2!=0},l.prototype.escapeQuote=function(c){var f="es|"+this.quote+"|"+this.escape;this.cachedRegExp[f]===void 0&&(this.cachedRegExp[f]=new RegExp("\\"+this.escape+"\\"+this.quote,"g"));var h=this.cachedRegExp[f];return c.replace(h,this.quote)},l.prototype.parseMultiLines=function(c){for(var f=[],h="";c.length;){var p=h+c.shift(),m=this.parse(p);m.cells.length===0&&this.conv.parseParam.ignoreEmpty||(m.closed||this.conv.parseParam.alwaysSplitAtEOL?(this.conv.parseRuntime.selectedColumns?f.push(o.filterArray(m.cells,this.conv.parseRuntime.selectedColumns)):f.push(m.cells),h=""):h=p+(i.default(p,this.conv.parseRuntime)||` `))}return{rowsCells:f,partial:h}},l}();t.RowSplit=a},function(e,t,n){var r=this&&this.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(29)),o=r(n(60)),s=/^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$/;function a(y,b,x){if(b.parseParam.checkColumn&&b.parseRuntime.headers&&y.length!==b.parseRuntime.headers.length)throw i.default.column_mismatched(b.parseRuntime.parsedLineNumber+x);return function(T,P,k){for(var N=!1,D={},z=0,A=T.length;z-1){for(var k=b.split("."),N=!0;k.length>0;)if(k.shift().length===0){N=!1;break}!N||T.parseParam.colParser[b]&&T.parseParam.colParser[b].flat?T.parseRuntime.columnValueSetter[P]=h:T.parseRuntime.columnValueSetter[P]=p}else T.parseRuntime.columnValueSetter[P]=h;T.parseParam.nullObject===!0&&x==="null"&&(x=null),T.parseRuntime.columnValueSetter[P](y,b,x)}function h(y,b,x){y[b]=x}function p(y,b,x){o.default(y,b,x)}function m(y,b,x,T){return T.parseRuntime.headerType[x]?T.parseRuntime.headerType[x]:b.indexOf("number#!")>-1?T.parseRuntime.headerType[x]=g:b.indexOf("string#!")>-1?T.parseRuntime.headerType[x]=v:T.parseParam.checkType?T.parseRuntime.headerType[x]=w:T.parseRuntime.headerType[x]=v}function g(y){var b=parseFloat(y);return isNaN(b)?y:b}function v(y){return y.toString()}function w(y){var b=y.trim();return b===""?v(y):s.test(b)?g(y):b.length===5&&b.toLowerCase()==="false"||b.length===4&&b.toLowerCase()==="true"?function(x){var T=x.trim();return T.length!==5||T.toLowerCase()!=="false"}(y):b[0]==="{"&&b[b.length-1]==="}"||b[0]==="["&&b[b.length-1]==="]"?function(x){try{return JSON.parse(x)}catch{return x}}(y):v(y)}},function(e,t,n){var r=n(61);e.exports=function(i,o,s){return i==null?i:r(i,o,s)}},function(e,t,n){var r=n(62),i=n(74),o=n(103),s=n(20),a=n(104);e.exports=function(l,c,f,h){if(!s(l))return l;for(var p=-1,m=(c=i(c,l)).length,g=m-1,v=l;v!=null&&++p-1}},function(e,t,n){var r=n(9);e.exports=function(i,o){var s=this.__data__,a=r(s,i);return a<0?(++this.size,s.push([i,o])):s[a][1]=o,this}},function(e,t,n){var r=n(17)(n(19),"Map");e.exports=r},function(e,t,n){var r=n(10);e.exports=function(i){var o=r(this,i).delete(i);return this.size-=o?1:0,o}},function(e,t){e.exports=function(n){var r=typeof n;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?n!=="__proto__":n===null}},function(e,t,n){var r=n(10);e.exports=function(i){return r(this,i).get(i)}},function(e,t,n){var r=n(10);e.exports=function(i){return r(this,i).has(i)}},function(e,t,n){var r=n(10);e.exports=function(i,o){var s=r(this,i),a=s.size;return s.set(i,o),this.size+=s.size==a?0:1,this}},function(e,t,n){var r=n(101);e.exports=function(i){return i==null?"":r(i)}},function(e,t,n){var r=n(18),i=n(102),o=n(21),s=n(22),a=r?r.prototype:void 0,l=a?a.toString:void 0;e.exports=function c(f){if(typeof f=="string")return f;if(o(f))return i(f,c)+"";if(s(f))return l?l.call(f):"";var h=f+"";return h=="0"&&1/f==-1/0?"-0":h}},function(e,t){e.exports=function(n,r){for(var i=-1,o=n==null?0:n.length,s=Array(o);++i-1&&r%1==0&&r0||this.converter.listeners("readable").length>0),this._needPushDownstream},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"needEmitAll",{get:function(){return!!this.converter.parseRuntime.then&&this.converter.parseParam.needEmitAll},enumerable:!0,configurable:!0}),l.prototype.processResult=function(c){var f=this,h=this.converter.parseRuntime.parsedLineNumber;return this.needPushDownstream&&this.converter.parseParam.downstreamFormat==="array"&&h===0&&a(this.converter,"["+o.EOL),new i.default(function(p,m){f.needEmitLine?function g(v,w,y,b,x){if(y>=v.length)x();else if(w.parseRuntime.subscribe&&w.parseRuntime.subscribe.onNext){var T=w.parseRuntime.subscribe.onNext,P=v[y],k=T(P,w.parseRuntime.parsedLineNumber+y);if(y++,k&&k.then)k.then(function(){(function(D,z,A,Y,q,ee,K){q&&a(A,K),g(D,A,Y,q,ee)})(v,0,w,y,b,x,P)},x);else{for(b&&a(w,P);ynew Promise(t=>{N_e().fromString(e).then(t)}),D_e=new R_e,A_e=e=>D_e.parse(e),I_e=6,SL="0123456789ABCDEF",F_e=128,{floor:$_e,random:j_e,sqrt:B_e,round:z_e}=Math,U_e=()=>`#${EE(I_e,()=>SL[$_e(j_e()*SL.length)]).join("")}`,CL=e=>e.toLowerCase().trim(),V_e=e=>(e.match(/../g)??[]).map(t=>parseInt(t,16)||0),H_e=(e=0,t=0,n=0)=>z_e(B_e(.299*e**2+.587*t**2+.114*n**2));class W_e{constructor(t){Se(this,"colors");Se(this,"lights");Se(this,"getColorForKey",t=>{const n=CL(t),r=this.colors[n];return r||this.setColorForKey(n,U_e())});Se(this,"setColorForKey",(t,n)=>{const r=CL(t);return this.colors[r]=n,this.storage.set("colors",this.colors),n});Se(this,"isColorLightForKey",t=>{const n=this.getColorForKey(t).substring(1);if(Bo(this.lights[n])){const r=V_e(n);this.lights[n]=H_e(...r)>=F_e}return this.lights[n]});this.storage=t,this.colors=this.storage.get("colors")??{},this.lights={}}}const Y_e="shlink",EL=e=>`${Y_e}.${e}`;class q_e{constructor(t){Se(this,"get",t=>{const n=this.localStorage.getItem(EL(t));return n?JSON.parse(n):void 0});Se(this,"set",(t,n)=>this.localStorage.setItem(EL(t),JSON.stringify(n)));this.localStorage=t}}const G_e=e=>{e.constant("localStorage",window.localStorage),e.service("Storage",q_e,"localStorage"),e.service("ColorGenerator",W_e,"Storage"),e.constant("csvToJson",L_e),e.constant("jsonToCsv",A_e),e.constant("setTimeout",window.setTimeout),e.constant("clearTimeout",window.clearTimeout),e.serviceFactory("useTimeoutToggle",Soe,"setTimeout","clearTimeout")},cT=e=>e.visitedUrl!==void 0,Z_e=e=>e.visitedUrl!==void 0,K_e=Wn(sZ(e=>cT(e.visit)?"orphanVisits":"nonOrphanVisits"),e=>({orphanVisits:[],nonOrphanVisits:[],...e})),Fp=(e,t)=>NI(St(t),e),ph=({page:e,itemsPerPage:t,filter:n,dateRange:r})=>{const i=((r==null?void 0:r.startDate)&&qs(r==null?void 0:r.startDate))??void 0,o=((r==null?void 0:r.endDate)&&qs(r==null?void 0:r.endDate))??void 0,s=(n==null?void 0:n.excludeBots)||void 0;return{page:e,itemsPerPage:t,startDate:i,endDate:o,excludeBots:s}},mh=({visits:e,goBack:t,shortUrl:n,children:r,title:i})=>C("header",{children:U(Er,{body:!0,children:[U("h2",{className:"d-flex justify-content-between align-items-center mb-0",children:[C(ht,{color:"link",size:"lg",className:"p-0 me-3",onClick:t,children:C(Fe,{icon:r6})}),C("span",{className:"text-center d-none d-sm-block",children:C("small",{children:i})}),U("span",{className:"badge badge-main ms-3",children:["Visits:"," ",C(X8,{visitsCount:e.length,shortUrl:n})]})]}),C("h3",{className:"text-center d-block d-sm-none mb-0 mt-3",children:C("small",{children:i})}),r&&C("div",{className:"mt-md-2",children:r})]})});const $F=({title:e,footer:t,children:n})=>U(Er,{role:"document",children:[C(sl,{className:"chart-card__header",children:typeof e=="function"?e():e}),C(ol,{children:n}),t&&C(tE,{className:"chart-card__footer--sticky",children:t})]}),jF="label";function TL(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function X_e(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function BF(e,t){e.labels=t}function zF(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:jF;const r=[];e.datasets=t.map(i=>{const o=e.datasets.find(s=>s[n]===i[n]);return!o||!i.data||r.includes(o)?{...i}:(r.push(o),Object.assign(o,i),o)})}function Q_e(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:jF;const n={labels:[],datasets:[]};return BF(n,e.labels),zF(n,e.datasets,t),n}function UF(e,t){return e.getElementsAtEventForMode(t.nativeEvent,"nearest",{intersect:!0},!1)}function J_e(e,t){const{height:n=150,width:r=300,redraw:i=!1,datasetIdKey:o,type:s,data:a,options:l,plugins:c=[],fallbackContent:f,updateMode:h,...p}=e,m=H.useRef(null),g=H.useRef(),v=()=>{m.current&&(g.current=new dy(m.current,{type:s,data:Q_e(a,o),options:l&&{...l},plugins:c}),TL(t,g.current))},w=()=>{TL(t,null),g.current&&(g.current.destroy(),g.current=null)};return H.useEffect(()=>{!i&&g.current&&l&&X_e(g.current,l)},[i,l]),H.useEffect(()=>{!i&&g.current&&BF(g.current.config.data,a.labels)},[i,a.labels]),H.useEffect(()=>{!i&&g.current&&a.datasets&&zF(g.current.config.data,a.datasets,o)},[i,a.datasets]),H.useEffect(()=>{g.current&&(i?(w(),setTimeout(v)):g.current.update(h))},[i,l,a.labels,a.datasets,h]),H.useEffect(()=>{g.current&&(w(),setTimeout(v))},[s]),H.useEffect(()=>(v(),()=>w()),[]),V.createElement("canvas",Object.assign({ref:m,role:"img",height:n,width:r},p),f)}const e0e=H.forwardRef(J_e);function uT(e,t){return dy.register(t),H.forwardRef((n,r)=>V.createElement(e0e,Object.assign({},n,{ref:r,type:e})))}const t0e=uT("line",ff),n0e=uT("bar",uf),r0e=uT("doughnut",us),VF=({native:e},[t])=>{if(!(e!=null&&e.target))return;const n=e.target;n.style.cursor=t?"pointer":"default"},HF=({dataset:e,raw:t})=>`${e.label}: ${bn(`${t}`)}`,i0e=({label:e,raw:t})=>`${e}: ${bn(`${t}`)}`;const o0e=({chart:e})=>{const{config:t}=e,{labels:n=[],datasets:r=[]}=t.data??{},[{backgroundColor:i}]=r,{defaultColor:o}=t.options??{};return C("ul",{className:"doughnut-chart-legend",children:n.map((s,a)=>U("li",{className:"doughnut-chart-legend__item d-flex",children:[C("div",{className:"doughnut-chart-legend__item-color",style:{backgroundColor:i[a]??o}}),C("small",{className:"doughnut-chart-legend__item-text flex-fill",children:s})]},s))})},s0e=e=>[{data:e,backgroundColor:["#97BBCD","#F7464A","#46BFBD","#FDB45C","#949FB1","#57A773","#414066","#08B2E3","#B6C454","#DCDCDC","#463730"],borderColor:Doe()?Loe:Noe,borderWidth:2}],a0e=(e,t)=>({labels:e,datasets:s0e(t)}),l0e=H.memo(({stats:e})=>{const[t,n]=H.useState(),r=to(e),i=i_(e),o={plugins:{legend:{display:!1},tooltip:{intersect:!0,callbacks:{label:i0e}}}},s=a0e(r,i);return U("div",{className:"row",children:[C("div",{className:"col-sm-12 col-md-7",children:C(r0e,{height:300,data:s,options:o,ref:a=>{n(a??void 0)}})}),C("div",{className:"col-sm-12 col-md-5",children:t&&C(o0e,{chart:t})})]})}),OL=({title:e,stats:t})=>C($F,{title:e,children:C(l0e,{stats:t})}),c0e={"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"},WF={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"},tn={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},ar={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"},Jo={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class xe{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=xe.getVersionPrecision(t),o=xe.getVersionPrecision(n);let s=Math.max(i,o),a=0;const l=xe.map([t,n],c=>{const f=s-xe.getVersionPrecision(c),h=c+new Array(f+1).join(".0");return xe.map(h.split("."),p=>new Array(20-p.length).join("0")+p).reverse()});for(r&&(a=s-Math.min(i,o)),s-=1;s>=a;){if(l[0][s]>l[1][s])return 1;if(l[0][s]===l[1][s]){if(s===a)return 0;s-=1}else if(l[0][s]{r[l]=s[l]})}return t}static getBrowserAlias(t){return c0e[t]}static getBrowserTypeByAlias(t){return WF[t]||""}}const xt=/version\/(\d+(\.?_?\d+)+)/i,u0e=[{test:[/googlebot/i],describe(e){const t={name:"Googlebot"},n=xe.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||xe.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){const t={name:"Opera"},n=xe.getFirstMatch(xt,e)||xe.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){const t={name:"Opera"},n=xe.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||xe.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){const t={name:"Samsung Internet for Android"},n=xe.getFirstMatch(xt,e)||xe.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=xe.getFirstMatch(xt,e)||xe.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){const t={name:"MZ Browser"},n=xe.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||xe.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){const t={name:"Focus"},n=xe.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||xe.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){const t={name:"Swing"},n=xe.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||xe.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){const t={name:"Opera Coast"},n=xe.getFirstMatch(xt,e)||xe.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=xe.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||xe.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){const t={name:"Yandex Browser"},n=xe.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||xe.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){const t={name:"UC Browser"},n=xe.getFirstMatch(xt,e)||xe.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){const t={name:"Maxthon"},n=xe.getFirstMatch(xt,e)||xe.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){const t={name:"Epiphany"},n=xe.getFirstMatch(xt,e)||xe.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){const t={name:"Puffin"},n=xe.getFirstMatch(xt,e)||xe.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){const t={name:"Sleipnir"},n=xe.getFirstMatch(xt,e)||xe.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=xe.getFirstMatch(xt,e)||xe.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){const t={name:"WeChat"},n=xe.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||xe.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe(e){const t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=xe.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||xe.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){const t={name:"Internet Explorer"},n=xe.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){const t={name:"Microsoft Edge"},n=xe.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=xe.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){const t={name:"Vivaldi"},n=xe.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){const t={name:"SeaMonkey"},n=xe.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){const t={name:"Sailfish"},n=xe.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=xe.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){const t={name:"PhantomJS"},n=xe.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){const t={name:"SlimerJS"},n=xe.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=xe.getFirstMatch(xt,e)||xe.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=xe.getFirstMatch(xt,e)||xe.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=xe.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){const t={name:"Tizen"},n=xe.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||xe.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){const t={name:"QupZilla"},n=xe.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||xe.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){const t={name:"Firefox"},n=xe.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=xe.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe(e){const t={name:"Miui"},n=xe.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe(e){const t={name:"Chromium"},n=xe.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||xe.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){const t={name:"Chrome"},n=xe.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=xe.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=xe.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){const t={name:"PlayStation 4"},n=xe.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){const t={name:"Safari"},n=xe.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){const t=/^(.*)\/(.*) /,n=/^(.*)\/(.*)[ \t]\((.*)/,i=e.search("\\(")!==-1?n:t;return{name:xe.getFirstMatch(i,e),version:xe.getSecondMatch(i,e)}}}],f0e=[{test:[/Roku\/DVP/],describe(e){const t=xe.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:ar.Roku,version:t}}},{test:[/windows phone/i],describe(e){const t=xe.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:ar.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){const t=xe.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=xe.getWindowsVersionName(t);return{name:ar.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){const t={name:ar.iOS},n=xe.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){const t=xe.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=xe.getMacOSVersionName(t),r={name:ar.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){const t=xe.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:ar.iOS,version:t}}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t=xe.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=xe.getAndroidVersionName(t),r={name:ar.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){const t=xe.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:ar.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t=xe.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||xe.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||xe.getFirstMatch(/\bbb(\d+)/i,e);return{name:ar.BlackBerry,version:t}}},{test:[/bada/i],describe(e){const t=xe.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:ar.Bada,version:t}}},{test:[/tizen/i],describe(e){const t=xe.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:ar.Tizen,version:t}}},{test:[/linux/i],describe(){return{name:ar.Linux}}},{test:[/CrOS/],describe(){return{name:ar.ChromeOS}}},{test:[/PlayStation 4/],describe(e){const t=xe.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:ar.PlayStation4,version:t}}}],d0e=[{test:[/googlebot/i],describe(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe(e){const t=xe.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:tn.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:tn.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:tn.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:tn.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:tn.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:tn.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:tn.tablet}}},{test(e){const t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){const t=xe.getFirstMatch(/(ipod|iphone)/i,e);return{type:tn.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:tn.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe(){return{type:tn.mobile}}},{test(e){return e.getBrowserName(!0)==="blackberry"},describe(){return{type:tn.mobile,vendor:"BlackBerry"}}},{test(e){return e.getBrowserName(!0)==="bada"},describe(){return{type:tn.mobile}}},{test(e){return e.getBrowserName()==="windows phone"},describe(){return{type:tn.mobile,vendor:"Microsoft"}}},{test(e){const t=Number(String(e.getOSVersion()).split(".")[0]);return e.getOSName(!0)==="android"&&t>=3},describe(){return{type:tn.tablet}}},{test(e){return e.getOSName(!0)==="android"},describe(){return{type:tn.mobile}}},{test(e){return e.getOSName(!0)==="macos"},describe(){return{type:tn.desktop,vendor:"Apple"}}},{test(e){return e.getOSName(!0)==="windows"},describe(){return{type:tn.desktop}}},{test(e){return e.getOSName(!0)==="linux"},describe(){return{type:tn.desktop}}},{test(e){return e.getOSName(!0)==="playstation 4"},describe(){return{type:tn.tv}}},{test(e){return e.getOSName(!0)==="roku"},describe(){return{type:tn.tv}}}],h0e=[{test(e){return e.getBrowserName(!0)==="microsoft edge"},describe(e){if(/\sedg\//i.test(e))return{name:Jo.Blink};const n=xe.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:Jo.EdgeHTML,version:n}}},{test:[/trident/i],describe(e){const t={name:Jo.Trident},n=xe.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){return e.test(/presto/i)},describe(e){const t={name:Jo.Presto},n=xe.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:Jo.Gecko},n=xe.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:Jo.Blink}}},{test:[/(apple)?webkit/i],describe(e){const t={name:Jo.WebKit},n=xe.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];class PL{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=xe.find(u0e,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=xe.find(f0e,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=xe.find(d0e,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=xe.find(h0e,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 xe.assign({},this.parsedResult)}satisfies(t){const n={};let r=0;const i={};let o=0;if(Object.keys(t).forEach(a=>{const l=t[a];typeof l=="string"?(i[a]=l,o+=1):typeof l=="object"&&(n[a]=l,r+=1)}),r>0){const a=Object.keys(n),l=xe.find(a,f=>this.isOS(f));if(l){const f=this.satisfies(n[l]);if(f!==void 0)return f}const c=xe.find(a,f=>this.isPlatform(f));if(c){const f=this.satisfies(n[c]);if(f!==void 0)return f}}if(o>0){const a=Object.keys(i),l=xe.find(a,c=>this.isBrowser(c,!0));if(l!==void 0)return this.compareVersion(i[l])}}isBrowser(t,n=!1){const r=this.getBrowserName().toLowerCase();let i=t.toLowerCase();const o=xe.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(xe.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))}}/*! +`,t.homedir=function(){return"/"}}]);const U_e=e=>new Promise(t=>{z_e().fromString(e).then(t)}),V_e=new B_e,H_e=e=>V_e.parse(e),W_e=6,TL="0123456789ABCDEF",Y_e=128,{floor:q_e,random:G_e,sqrt:Z_e,round:K_e}=Math,X_e=()=>`#${OE(W_e,()=>TL[q_e(G_e()*TL.length)]).join("")}`,OL=e=>e.toLowerCase().trim(),Q_e=e=>(e.match(/../g)??[]).map(t=>parseInt(t,16)||0),J_e=(e=0,t=0,n=0)=>K_e(Z_e(.299*e**2+.587*t**2+.114*n**2));class e0e{constructor(t){Se(this,"colors");Se(this,"lights");Se(this,"getColorForKey",t=>{const n=OL(t),r=this.colors[n];return r||this.setColorForKey(n,X_e())});Se(this,"setColorForKey",(t,n)=>{const r=OL(t);return this.colors[r]=n,this.storage.set("colors",this.colors),n});Se(this,"isColorLightForKey",t=>{const n=this.getColorForKey(t).substring(1);if(zo(this.lights[n])){const r=Q_e(n);this.lights[n]=J_e(...r)>=Y_e}return this.lights[n]});this.storage=t,this.colors=this.storage.get("colors")??{},this.lights={}}}const t0e="shlink",PL=e=>`${t0e}.${e}`;class n0e{constructor(t){Se(this,"get",t=>{const n=this.localStorage.getItem(PL(t));return n?JSON.parse(n):void 0});Se(this,"set",(t,n)=>this.localStorage.setItem(PL(t),JSON.stringify(n)));this.localStorage=t}}const r0e=e=>{e.constant("localStorage",window.localStorage),e.service("Storage",n0e,"localStorage"),e.service("ColorGenerator",e0e,"Storage"),e.constant("csvToJson",U_e),e.constant("jsonToCsv",H_e),e.constant("setTimeout",window.setTimeout),e.constant("clearTimeout",window.clearTimeout),e.serviceFactory("useTimeoutToggle",Noe,"setTimeout","clearTimeout")},fT=e=>e.visitedUrl!==void 0,i0e=e=>e.visitedUrl!==void 0,o0e=er(mZ(e=>fT(e.visit)?"orphanVisits":"nonOrphanVisits"),e=>({orphanVisits:[],nonOrphanVisits:[],...e})),$p=(e,t)=>jI(St(t),e),ph=({page:e,itemsPerPage:t,filter:n,dateRange:r})=>{const i=((r==null?void 0:r.startDate)&&qs(r==null?void 0:r.startDate))??void 0,o=((r==null?void 0:r.endDate)&&qs(r==null?void 0:r.endDate))??void 0,s=(n==null?void 0:n.excludeBots)||void 0;return{page:e,itemsPerPage:t,startDate:i,endDate:o,excludeBots:s}},mh=({visits:e,goBack:t,shortUrl:n,children:r,title:i})=>C("header",{children:U(Er,{body:!0,children:[U("h2",{className:"d-flex justify-content-between align-items-center mb-0",children:[C(ht,{color:"link",size:"lg",className:"p-0 me-3",onClick:t,children:C(Fe,{icon:u6})}),C("span",{className:"text-center d-none d-sm-block",children:C("small",{children:i})}),U("span",{className:"badge badge-main ms-3",children:["Visits:"," ",C(iF,{visitsCount:e.length,shortUrl:n})]})]}),C("h3",{className:"text-center d-block d-sm-none mb-0 mt-3",children:C("small",{children:i})}),r&&C("div",{className:"mt-md-2",children:r})]})});const WF=({title:e,footer:t,children:n})=>U(Er,{role:"document",children:[C(sl,{className:"chart-card__header",children:typeof e=="function"?e():e}),C(ol,{children:n}),t&&C(rE,{className:"chart-card__footer--sticky",children:t})]}),YF="label";function kL(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function s0e(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function qF(e,t){e.labels=t}function GF(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:YF;const r=[];e.datasets=t.map(i=>{const o=e.datasets.find(s=>s[n]===i[n]);return!o||!i.data||r.includes(o)?{...i}:(r.push(o),Object.assign(o,i),o)})}function a0e(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:YF;const n={labels:[],datasets:[]};return qF(n,e.labels),GF(n,e.datasets,t),n}function ZF(e,t){return e.getElementsAtEventForMode(t.nativeEvent,"nearest",{intersect:!0},!1)}function l0e(e,t){const{height:n=150,width:r=300,redraw:i=!1,datasetIdKey:o,type:s,data:a,options:l,plugins:c=[],fallbackContent:f,updateMode:h,...p}=e,m=H.useRef(null),g=H.useRef(),v=()=>{m.current&&(g.current=new py(m.current,{type:s,data:a0e(a,o),options:l&&{...l},plugins:c}),kL(t,g.current))},w=()=>{kL(t,null),g.current&&(g.current.destroy(),g.current=null)};return H.useEffect(()=>{!i&&g.current&&l&&s0e(g.current,l)},[i,l]),H.useEffect(()=>{!i&&g.current&&qF(g.current.config.data,a.labels)},[i,a.labels]),H.useEffect(()=>{!i&&g.current&&a.datasets&&GF(g.current.config.data,a.datasets,o)},[i,a.datasets]),H.useEffect(()=>{g.current&&(i?(w(),setTimeout(v)):g.current.update(h))},[i,l,a.labels,a.datasets,h]),H.useEffect(()=>{g.current&&(w(),setTimeout(v))},[s]),H.useEffect(()=>(v(),()=>w()),[]),V.createElement("canvas",Object.assign({ref:m,role:"img",height:n,width:r},p),f)}const c0e=H.forwardRef(l0e);function dT(e,t){return py.register(t),H.forwardRef((n,r)=>V.createElement(c0e,Object.assign({},n,{ref:r,type:e})))}const u0e=dT("line",df),f0e=dT("bar",ff),d0e=dT("doughnut",fs),KF=({native:e},[t])=>{if(!(e!=null&&e.target))return;const n=e.target;n.style.cursor=t?"pointer":"default"},XF=({dataset:e,raw:t})=>`${e.label}: ${bn(`${t}`)}`,h0e=({label:e,raw:t})=>`${e}: ${bn(`${t}`)}`;const p0e=({chart:e})=>{const{config:t}=e,{labels:n=[],datasets:r=[]}=t.data??{},[{backgroundColor:i}]=r,{defaultColor:o}=t.options??{};return C("ul",{className:"doughnut-chart-legend",children:n.map((s,a)=>U("li",{className:"doughnut-chart-legend__item d-flex",children:[C("div",{className:"doughnut-chart-legend__item-color",style:{backgroundColor:i[a]??o}}),C("small",{className:"doughnut-chart-legend__item-text flex-fill",children:s})]},s))})},m0e=e=>[{data:e,backgroundColor:["#97BBCD","#F7464A","#46BFBD","#FDB45C","#949FB1","#57A773","#414066","#08B2E3","#B6C454","#DCDCDC","#463730"],borderColor:Voe()?Uoe:zoe,borderWidth:2}],g0e=(e,t)=>({labels:e,datasets:m0e(t)}),v0e=H.memo(({stats:e})=>{const[t,n]=H.useState(),r=to(e),i=s_(e),o={plugins:{legend:{display:!1},tooltip:{intersect:!0,callbacks:{label:h0e}}}},s=g0e(r,i);return U("div",{className:"row",children:[C("div",{className:"col-sm-12 col-md-7",children:C(d0e,{height:300,data:s,options:o,ref:a=>{n(a??void 0)}})}),C("div",{className:"col-sm-12 col-md-5",children:t&&C(p0e,{chart:t})})]})}),ML=({title:e,stats:t})=>C(WF,{title:e,children:C(v0e,{stats:t})}),y0e={"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"},QF={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"},tn={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},ar={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"},es={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class xe{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=xe.getVersionPrecision(t),o=xe.getVersionPrecision(n);let s=Math.max(i,o),a=0;const l=xe.map([t,n],c=>{const f=s-xe.getVersionPrecision(c),h=c+new Array(f+1).join(".0");return xe.map(h.split("."),p=>new Array(20-p.length).join("0")+p).reverse()});for(r&&(a=s-Math.min(i,o)),s-=1;s>=a;){if(l[0][s]>l[1][s])return 1;if(l[0][s]===l[1][s]){if(s===a)return 0;s-=1}else if(l[0][s]{r[l]=s[l]})}return t}static getBrowserAlias(t){return y0e[t]}static getBrowserTypeByAlias(t){return QF[t]||""}}const xt=/version\/(\d+(\.?_?\d+)+)/i,_0e=[{test:[/googlebot/i],describe(e){const t={name:"Googlebot"},n=xe.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||xe.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){const t={name:"Opera"},n=xe.getFirstMatch(xt,e)||xe.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){const t={name:"Opera"},n=xe.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||xe.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){const t={name:"Samsung Internet for Android"},n=xe.getFirstMatch(xt,e)||xe.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=xe.getFirstMatch(xt,e)||xe.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){const t={name:"MZ Browser"},n=xe.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||xe.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){const t={name:"Focus"},n=xe.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||xe.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){const t={name:"Swing"},n=xe.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||xe.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){const t={name:"Opera Coast"},n=xe.getFirstMatch(xt,e)||xe.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=xe.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||xe.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){const t={name:"Yandex Browser"},n=xe.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||xe.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){const t={name:"UC Browser"},n=xe.getFirstMatch(xt,e)||xe.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){const t={name:"Maxthon"},n=xe.getFirstMatch(xt,e)||xe.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){const t={name:"Epiphany"},n=xe.getFirstMatch(xt,e)||xe.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){const t={name:"Puffin"},n=xe.getFirstMatch(xt,e)||xe.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){const t={name:"Sleipnir"},n=xe.getFirstMatch(xt,e)||xe.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=xe.getFirstMatch(xt,e)||xe.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){const t={name:"WeChat"},n=xe.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||xe.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe(e){const t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=xe.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||xe.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){const t={name:"Internet Explorer"},n=xe.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){const t={name:"Microsoft Edge"},n=xe.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=xe.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){const t={name:"Vivaldi"},n=xe.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){const t={name:"SeaMonkey"},n=xe.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){const t={name:"Sailfish"},n=xe.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=xe.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){const t={name:"PhantomJS"},n=xe.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){const t={name:"SlimerJS"},n=xe.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=xe.getFirstMatch(xt,e)||xe.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=xe.getFirstMatch(xt,e)||xe.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=xe.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){const t={name:"Tizen"},n=xe.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||xe.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){const t={name:"QupZilla"},n=xe.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||xe.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){const t={name:"Firefox"},n=xe.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=xe.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe(e){const t={name:"Miui"},n=xe.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe(e){const t={name:"Chromium"},n=xe.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||xe.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){const t={name:"Chrome"},n=xe.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=xe.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=xe.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){const t={name:"PlayStation 4"},n=xe.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){const t={name:"Safari"},n=xe.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){const t=/^(.*)\/(.*) /,n=/^(.*)\/(.*)[ \t]\((.*)/,i=e.search("\\(")!==-1?n:t;return{name:xe.getFirstMatch(i,e),version:xe.getSecondMatch(i,e)}}}],b0e=[{test:[/Roku\/DVP/],describe(e){const t=xe.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:ar.Roku,version:t}}},{test:[/windows phone/i],describe(e){const t=xe.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:ar.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){const t=xe.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=xe.getWindowsVersionName(t);return{name:ar.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){const t={name:ar.iOS},n=xe.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){const t=xe.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=xe.getMacOSVersionName(t),r={name:ar.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){const t=xe.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:ar.iOS,version:t}}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t=xe.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=xe.getAndroidVersionName(t),r={name:ar.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){const t=xe.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:ar.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t=xe.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||xe.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||xe.getFirstMatch(/\bbb(\d+)/i,e);return{name:ar.BlackBerry,version:t}}},{test:[/bada/i],describe(e){const t=xe.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:ar.Bada,version:t}}},{test:[/tizen/i],describe(e){const t=xe.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:ar.Tizen,version:t}}},{test:[/linux/i],describe(){return{name:ar.Linux}}},{test:[/CrOS/],describe(){return{name:ar.ChromeOS}}},{test:[/PlayStation 4/],describe(e){const t=xe.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:ar.PlayStation4,version:t}}}],w0e=[{test:[/googlebot/i],describe(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe(e){const t=xe.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:tn.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:tn.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:tn.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:tn.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:tn.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:tn.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:tn.tablet}}},{test(e){const t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){const t=xe.getFirstMatch(/(ipod|iphone)/i,e);return{type:tn.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:tn.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe(){return{type:tn.mobile}}},{test(e){return e.getBrowserName(!0)==="blackberry"},describe(){return{type:tn.mobile,vendor:"BlackBerry"}}},{test(e){return e.getBrowserName(!0)==="bada"},describe(){return{type:tn.mobile}}},{test(e){return e.getBrowserName()==="windows phone"},describe(){return{type:tn.mobile,vendor:"Microsoft"}}},{test(e){const t=Number(String(e.getOSVersion()).split(".")[0]);return e.getOSName(!0)==="android"&&t>=3},describe(){return{type:tn.tablet}}},{test(e){return e.getOSName(!0)==="android"},describe(){return{type:tn.mobile}}},{test(e){return e.getOSName(!0)==="macos"},describe(){return{type:tn.desktop,vendor:"Apple"}}},{test(e){return e.getOSName(!0)==="windows"},describe(){return{type:tn.desktop}}},{test(e){return e.getOSName(!0)==="linux"},describe(){return{type:tn.desktop}}},{test(e){return e.getOSName(!0)==="playstation 4"},describe(){return{type:tn.tv}}},{test(e){return e.getOSName(!0)==="roku"},describe(){return{type:tn.tv}}}],x0e=[{test(e){return e.getBrowserName(!0)==="microsoft edge"},describe(e){if(/\sedg\//i.test(e))return{name:es.Blink};const n=xe.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:es.EdgeHTML,version:n}}},{test:[/trident/i],describe(e){const t={name:es.Trident},n=xe.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){return e.test(/presto/i)},describe(e){const t={name:es.Presto},n=xe.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:es.Gecko},n=xe.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:es.Blink}}},{test:[/(apple)?webkit/i],describe(e){const t={name:es.WebKit},n=xe.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];class RL{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=xe.find(_0e,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=xe.find(b0e,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=xe.find(w0e,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=xe.find(x0e,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 xe.assign({},this.parsedResult)}satisfies(t){const n={};let r=0;const i={};let o=0;if(Object.keys(t).forEach(a=>{const l=t[a];typeof l=="string"?(i[a]=l,o+=1):typeof l=="object"&&(n[a]=l,r+=1)}),r>0){const a=Object.keys(n),l=xe.find(a,f=>this.isOS(f));if(l){const f=this.satisfies(n[l]);if(f!==void 0)return f}const c=xe.find(a,f=>this.isPlatform(f));if(c){const f=this.satisfies(n[c]);if(f!==void 0)return f}}if(o>0){const a=Object.keys(i),l=xe.find(a,c=>this.isBrowser(c,!0));if(l!==void 0)return this.compareVersion(i[l])}}isBrowser(t,n=!1){const r=this.getBrowserName().toLowerCase();let i=t.toLowerCase();const o=xe.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(xe.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 p0e{static getParser(t,n=!1){if(typeof t!="string")throw new Error("UserAgent should be a string");return new PL(t,n)}static parse(t){return new PL(t).getResult()}static get BROWSER_MAP(){return WF}static get ENGINE_MAP(){return Jo}static get OS_MAP(){return ar}static get PLATFORMS_MAP(){return tn}}const $p="Others",m0e=["Android Browser","Chrome","Chromium","Firefox","Internet Explorer","Microsoft Edge","Opera","Safari","Samsung Internet for Android","Vivaldi","WeChat"],g0e=e=>{if(!yi(e))return{browser:$p,os:$p};const{browser:{name:t},os:{name:n}}=p0e.parse(e);return{os:n??$p,browser:t&&m0e.includes(t)?t:$p}},v0e=e=>{var t;return yi(e)?((t=e.split("/")[e.includes("://")?2:0])==null?void 0:t.split(":")[0])??"":"Direct"},fT=(e,t)=>Object.values({...AI(t,t.map(()=>0)),...e});const kL={monthly:"Month",weekly:"Week",daily:"Day",hourly:"Hour"},y0e={hourly:e=>({hours:e}),daily:e=>({days:e}),weekly:e=>({weeks:e}),monthly:e=>({months:e})},_0e={hourly:Bae,daily:LE,weekly:Hae,monthly:vv},dT={hourly:e=>_o(e,"yyyy-MM-dd HH:00"),daily:e=>_o(e,Nf),weekly(e){const t=_o(Td(e),Nf),n=_o(Gae(e),Nf);return`${t} - ${n}`},monthly:e=>_o(e,"yyyy-MM")},b0e=e=>{const t=new Date,n=Io(e);return cC([[()=>LE(t,n)<=2,K0("hourly")],[()=>vv(t,n)<=1,K0("daily")],[()=>vv(t,n)<=6,K0("weekly")]])()??"monthly"},ML=(e,t)=>NI(n=>dT[e](Io(n.date)),t),w0e=(e,t)=>t.reduce((n,r)=>{const i=dT[e](Io(r.date));return n[i]=n[i]??[],n[i].push(r),n},{}),x0e=(e,t)=>{const n=_0e[e],r=dT[e],i=Io(t[0].date),o=Io(t[t.length-1].date),s=n(i,o),a=y0e[e];return[r(o),...EE(s,l=>r(kae(o,a(l))))]},S0e=(e,t,n,r)=>{if(r)return[Object.keys(t),Object.values(t)];const i=x0e(n,e);return[i,fT(t,i)]},RL=(e,t,n)=>({label:t,data:e,fill:!1,tension:.2,borderColor:n,backgroundColor:n});let Kb=null;const C0e=(e,t,[n],r)=>{if(!r||!n)return;const{index:i}=n;Kb===e[i]?(r([]),Kb=null):(r(e[i]&&t[e[i]]?t[e[i]]:[]),Kb=e[i]??null)},E0e=({title:e,visits:t,highlightedVisits:n,highlightedLabel:r="Selected",setSelectedVisits:i})=>{const[o,s]=H.useState(t.length>0?b0e(t[t.length-1].date):"monthly"),[a,l]=$t(!0),c=H.useRef(null),f=H.useRef(null),h=H.useMemo(()=>w0e(o,t),[o,t]),p=H.useMemo(()=>ML(o,hw(t)),[o,t]),[m,g]=H.useMemo(()=>S0e(t,p,o,a),[t,o,a]),v=H.useMemo(()=>fT(ML(o,hw(n)),m),[n,o,m]),w=()=>{const T=RL(g,"Visits",mE);if(n.length===0)return[T];const P=RL(v,r,P5);return[T,P]},y=()=>({labels:m,datasets:w()}),b={maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{intersect:!1,axis:"x",callbacks:{label:HF}}},scales:{y:{beginAtZero:!0,ticks:{precision:0,callback:bn}},x:{title:{display:!0,text:kL[o]}}},onHover:VF},x=T=>C(t0e,{ref:T,data:y(),options:b,onClick:P=>C0e(m,h,UF(T.current,P),i)});return U(Er,{children:[U(sl,{role:"heading",children:[e,C("div",{className:"float-end",children:U(th,{children:[C(iu,{caret:!0,color:"link",className:"btn-sm p-0",children:"Group by"}),C(gl,{end:!0,children:Object.entries(kL).map(([T,P])=>C(Ve,{active:o===T,onClick:()=>s(T),children:P},T))})]})}),C("div",{className:"float-end me-2",children:C(Gc,{checked:a,onChange:l,children:C("small",{children:"Skip dates with no visits"})})})]}),U(ol,{className:"line-chart-card__body",children:[n.length>0&&x(c),n.length===0&&x(f)]})]})},T0e=({toggleClassName:e,ranges:t,value:n,setValue:r})=>U(th,{children:[C(iu,{caret:!0,color:"link",className:e,children:"Paginate"}),U(gl,{end:!0,children:[t.map(i=>U(Ve,{active:i===n,onClick:()=>r(i),children:[C("b",{children:i})," items per page"]},i)),C(Ve,{divider:!0}),C(Ve,{disabled:n===1/0,onClick:()=>r(1/0),children:C("i",{children:"Clear pagination"})})]})]}),O0e=e=>e.startsWith("hidden")?"":e,P0e=e=>!!e&&Object.keys(e).length>0,k0e=e=>e.length>20?e.length*10:void 0,M0e=(e,t,n)=>{const r={data:e,label:n?"Non-selected":"Visits",backgroundColor:Moe,borderColor:mE,borderWidth:2};return t.every(o=>o===0)?[r]:[r,{label:n??"Selected",data:t,backgroundColor:Roe,borderColor:P5,borderWidth:2}]},R0e=(e,t,n,r)=>({labels:e,datasets:M0e(t,n,r)}),N0e=(e,[t],n)=>{!n||!t||n(e[t.index])},L0e=({stats:e,highlightedStats:t,highlightedLabel:n,onClick:r,max:i})=>{const o=to(e).map(O0e),s=i_(P0e(t)?to(t).reduce((g,v)=>(g[v]&&(g[v]-=t[v]),g),{...e}):e),a=fT(t??{},o),l=H.useRef(null),c=H.useRef(null),f={plugins:{legend:{display:!1},tooltip:{mode:"y",filter:({label:g})=>g!=="",callbacks:{label:HF}}},scales:{x:{beginAtZero:!0,stacked:!0,max:i,ticks:{precision:0,callback:bn}},y:{stacked:!0}},onHover:VF,indexAxis:"y"},h=R0e(o,s,a,n),p=k0e(o),m=(g,v)=>C(n0e,{ref:v,data:h,options:f,height:p,onClick:w=>N0e(o,UF(v.current,w),r)},`${p}_${g}`);return U(We,{children:[t!==void 0&&m("with_stats",l),t===void 0&&m("without_stats",c)]})},D0e=e=>Yg(e)==="String"?kZ(e):e,NL=([e])=>e,LL=([,e])=>e,jp=({stats:e,highlightedStats:t,title:n,sortingItems:r,extraHeaderContent:i,withPagination:o=!0,...s})=>{const[a,l]=H.useState({}),[c,f]=H.useState(1),[h,p]=H.useState(50),m=(N,D)=>{const z=Gg(N),A=a.field?TZ(Wn(a.field===Object.keys(D)[0]?NL:LL,D0e),z):z;return!a.dir||a.dir==="ASC"?A:hw(A)},g=N=>{const D=N[c-1];if(c[`hidden_${A}`,0])]},v=N=>C(rT,{currentPage:c,pagesCount:N,setCurrentPage:f}),w=(N,D,z)=>{const A=m(N,D),Y=A.map(NL),q=z&&Gg({...AI(Y,Y.map(()=>0)),...z});if(A.length<=h)return{currentPageStats:Qu(A),currentPageHighlightedStats:q&&Qu(q)};const ee=dd(h,A),K=q&&dd(h,q);return{currentPageStats:Qu(g(ee)),currentPageHighlightedStats:K&&Qu(g(K)),pagination:v(ee.length),max:Hpe(Math.max(...A.map(LL)))}},{currentPageStats:y,currentPageHighlightedStats:b,pagination:x,max:T}=w(e,r,t&&Object.keys(t).length>0?t:void 0),P=Object.keys(y);return C($F,{title:()=>U(We,{children:[n,C("div",{className:"float-end",children:C(hh,{isButton:!1,right:!0,items:r,order:a,onChange:(N,D)=>{l({field:N,dir:D}),f(1)}})}),o&&Object.keys(e).length>50&&C("div",{className:"float-end",children:C(T0e,{toggleClassName:"btn-sm p-0 me-3",ranges:[50,100,200,500],value:h,setValue:N=>{p(N),f(1)}})}),i&&C("div",{className:"float-end",children:i(x?P:void 0)})]}),footer:x,children:C(L0e,{stats:y,highlightedStats:b,max:T,...s})})},A0e=()=>{const e=jo(),{search:t}=kn(),{filtering:n,domain:r}=H.useMemo(Wn(()=>ml(t),({startDate:o,endDate:s,orphanVisitsType:a,excludeBots:l,domain:c})=>({domain:c,filtering:{dateRange:o!=null||s!=null?k8(o,s):void 0,visitsFilter:{orphanVisitsType:a,excludeBots:Bo(l)?void 0:l==="true"}}})),[t]);return[n,o=>{const{dateRange:s,visitsFilter:a}=LI(n,o),{excludeBots:l,orphanVisitsType:c}=a,f={startDate:(s==null?void 0:s.startDate)&&qs(s.startDate)||"",endDate:(s==null?void 0:s.endDate)&&qs(s.endDate)||"",excludeBots:l===void 0?void 0:Q5(l),orphanVisitsType:c,domain:r},h=Yd(f),p=Cr(h)?"":`?${h}`;e(p,{replace:!0,relative:"route"})}]};function YF(e,t){const n=H.useRef(t);H.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 I0e=1;function F0e(e){return Object.freeze({__version:I0e,map:e})}function $0e(e,t){return Object.freeze({...e,...t})}const qF=H.createContext(null),GF=qF.Provider;function ZF(){const e=H.useContext(qF);if(e==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of ");return e}function j0e(e){function t(n,r){const{instance:i,context:o}=e(n).current;return H.useImperativeHandle(r,()=>i),n.children==null?null:V.createElement(GF,{value:o},n.children)}return H.forwardRef(t)}function B0e(e){function t(n,r){const[i,o]=H.useState(!1),{instance:s}=e(n,o).current;H.useImperativeHandle(r,()=>s),H.useEffect(function(){i&&s.update()},[s,i,n.children]);const a=s._contentNode;return a?Za.createPortal(n.children,a):null}return H.forwardRef(t)}function z0e(e){function t(n,r){const{instance:i}=e(n).current;return H.useImperativeHandle(r,()=>i),null}return H.forwardRef(t)}function KF(e,t){const n=H.useRef();H.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 hT(e,t){const n=e.pane??t.pane;return n?{...e,pane:n}:e}function U0e(e,t){return function(r,i){const o=ZF(),s=e(hT(r,o),o);return YF(o.map,r.attribution),KF(s.current,r.eventHandlers),t(s.current,o,r,i),s}}var Gs={},V0e={get exports(){return Gs},set exports(e){Gs=e}};/* @preserve + */class S0e{static getParser(t,n=!1){if(typeof t!="string")throw new Error("UserAgent should be a string");return new RL(t,n)}static parse(t){return new RL(t).getResult()}static get BROWSER_MAP(){return QF}static get ENGINE_MAP(){return es}static get OS_MAP(){return ar}static get PLATFORMS_MAP(){return tn}}const jp="Others",C0e=["Android Browser","Chrome","Chromium","Firefox","Internet Explorer","Microsoft Edge","Opera","Safari","Samsung Internet for Android","Vivaldi","WeChat"],E0e=e=>{if(!yi(e))return{browser:jp,os:jp};const{browser:{name:t},os:{name:n}}=S0e.parse(e);return{os:n??jp,browser:t&&C0e.includes(t)?t:jp}},T0e=e=>{var t;return yi(e)?((t=e.split("/")[e.includes("://")?2:0])==null?void 0:t.split(":")[0])??"":"Direct"},hT=(e,t)=>Object.values({...UI(t,t.map(()=>0)),...e});const NL={monthly:"Month",weekly:"Week",daily:"Day",hourly:"Hour"},O0e={hourly:e=>({hours:e}),daily:e=>({days:e}),weekly:e=>({weeks:e}),monthly:e=>({months:e})},P0e={hourly:Zae,daily:AE,weekly:Jae,monthly:_v},pT={hourly:e=>_o(e,"yyyy-MM-dd HH:00"),daily:e=>_o(e,Lf),weekly(e){const t=_o(Td(e),Lf),n=_o(rle(e),Lf);return`${t} - ${n}`},monthly:e=>_o(e,"yyyy-MM")},k0e=e=>{const t=new Date,n=Fo(e);return fC([[()=>AE(t,n)<=2,Q0("hourly")],[()=>_v(t,n)<=1,Q0("daily")],[()=>_v(t,n)<=6,Q0("weekly")]])()??"monthly"},LL=(e,t)=>jI(n=>pT[e](Fo(n.date)),t),M0e=(e,t)=>t.reduce((n,r)=>{const i=pT[e](Fo(r.date));return n[i]=n[i]??[],n[i].push(r),n},{}),R0e=(e,t)=>{const n=P0e[e],r=pT[e],i=Fo(t[0].date),o=Fo(t[t.length-1].date),s=n(i,o),a=O0e[e];return[r(o),...OE(s,l=>r($ae(o,a(l))))]},N0e=(e,t,n,r)=>{if(r)return[Object.keys(t),Object.values(t)];const i=R0e(n,e);return[i,hT(t,i)]},DL=(e,t,n)=>({label:t,data:e,fill:!1,tension:.2,borderColor:n,backgroundColor:n});let Qb=null;const L0e=(e,t,[n],r)=>{if(!r||!n)return;const{index:i}=n;Qb===e[i]?(r([]),Qb=null):(r(e[i]&&t[e[i]]?t[e[i]]:[]),Qb=e[i]??null)},D0e=({title:e,visits:t,highlightedVisits:n,highlightedLabel:r="Selected",setSelectedVisits:i})=>{const[o,s]=H.useState(t.length>0?k0e(t[t.length-1].date):"monthly"),[a,l]=$t(!0),c=H.useRef(null),f=H.useRef(null),h=H.useMemo(()=>M0e(o,t),[o,t]),p=H.useMemo(()=>LL(o,gw(t)),[o,t]),[m,g]=H.useMemo(()=>N0e(t,p,o,a),[t,o,a]),v=H.useMemo(()=>hT(LL(o,gw(n)),m),[n,o,m]),w=()=>{const T=DL(g,"Visits",vE);if(n.length===0)return[T];const P=DL(v,r,A5);return[T,P]},y=()=>({labels:m,datasets:w()}),b={maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{intersect:!1,axis:"x",callbacks:{label:XF}}},scales:{y:{beginAtZero:!0,ticks:{precision:0,callback:bn}},x:{title:{display:!0,text:NL[o]}}},onHover:KF},x=T=>C(u0e,{ref:T,data:y(),options:b,onClick:P=>L0e(m,h,ZF(T.current,P),i)});return U(Er,{children:[U(sl,{role:"heading",children:[e,C("div",{className:"float-end",children:U(th,{children:[C(su,{caret:!0,color:"link",className:"btn-sm p-0",children:"Group by"}),C(vl,{end:!0,children:Object.entries(NL).map(([T,P])=>C(Ve,{active:o===T,onClick:()=>s(T),children:P},T))})]})}),C("div",{className:"float-end me-2",children:C(Kc,{checked:a,onChange:l,children:C("small",{children:"Skip dates with no visits"})})})]}),U(ol,{className:"line-chart-card__body",children:[n.length>0&&x(c),n.length===0&&x(f)]})]})},A0e=({toggleClassName:e,ranges:t,value:n,setValue:r})=>U(th,{children:[C(su,{caret:!0,color:"link",className:e,children:"Paginate"}),U(vl,{end:!0,children:[t.map(i=>U(Ve,{active:i===n,onClick:()=>r(i),children:[C("b",{children:i})," items per page"]},i)),C(Ve,{divider:!0}),C(Ve,{disabled:n===1/0,onClick:()=>r(1/0),children:C("i",{children:"Clear pagination"})})]})]}),I0e=e=>e.startsWith("hidden")?"":e,F0e=e=>!!e&&Object.keys(e).length>0,$0e=e=>e.length>20?e.length*10:void 0,j0e=(e,t,n)=>{const r={data:e,label:n?"Non-selected":"Visits",backgroundColor:joe,borderColor:vE,borderWidth:2};return t.every(o=>o===0)?[r]:[r,{label:n??"Selected",data:t,backgroundColor:Boe,borderColor:A5,borderWidth:2}]},B0e=(e,t,n,r)=>({labels:e,datasets:j0e(t,n,r)}),z0e=(e,[t],n)=>{!n||!t||n(e[t.index])},U0e=({stats:e,highlightedStats:t,highlightedLabel:n,onClick:r,max:i})=>{const o=to(e).map(I0e),s=s_(F0e(t)?to(t).reduce((g,v)=>(g[v]&&(g[v]-=t[v]),g),{...e}):e),a=hT(t??{},o),l=H.useRef(null),c=H.useRef(null),f={plugins:{legend:{display:!1},tooltip:{mode:"y",filter:({label:g})=>g!=="",callbacks:{label:XF}}},scales:{x:{beginAtZero:!0,stacked:!0,max:i,ticks:{precision:0,callback:bn}},y:{stacked:!0}},onHover:KF,indexAxis:"y"},h=B0e(o,s,a,n),p=$0e(o),m=(g,v)=>C(f0e,{ref:v,data:h,options:f,height:p,onClick:w=>z0e(o,ZF(v.current,w),r)},`${p}_${g}`);return U(We,{children:[t!==void 0&&m("with_stats",l),t===void 0&&m("without_stats",c)]})},V0e=e=>Gg(e)==="String"?$Z(e):e,AL=([e])=>e,IL=([,e])=>e,Bp=({stats:e,highlightedStats:t,title:n,sortingItems:r,extraHeaderContent:i,withPagination:o=!0,...s})=>{const[a,l]=H.useState({}),[c,f]=H.useState(1),[h,p]=H.useState(50),m=(N,D)=>{const z=vw(N),A=a.field?AZ(er(a.field===Object.keys(D)[0]?AL:IL,V0e),z):z;return!a.dir||a.dir==="ASC"?A:gw(A)},g=N=>{const D=N[c-1];if(c[`hidden_${A}`,0])]},v=N=>C(oT,{currentPage:c,pagesCount:N,setCurrentPage:f}),w=(N,D,z)=>{const A=m(N,D),Y=A.map(AL),q=z&&vw({...UI(Y,Y.map(()=>0)),...z});if(A.length<=h)return{currentPageStats:mp(A),currentPageHighlightedStats:q&&mp(q)};const ee=dd(h,A),K=q&&dd(h,q);return{currentPageStats:mp(g(ee)),currentPageHighlightedStats:K&&mp(g(K)),pagination:v(ee.length),max:Jpe(Math.max(...A.map(IL)))}},{currentPageStats:y,currentPageHighlightedStats:b,pagination:x,max:T}=w(e,r,t&&Object.keys(t).length>0?t:void 0),P=Object.keys(y);return C(WF,{title:()=>U(We,{children:[n,C("div",{className:"float-end",children:C(hh,{isButton:!1,right:!0,items:r,order:a,onChange:(N,D)=>{l({field:N,dir:D}),f(1)}})}),o&&Object.keys(e).length>50&&C("div",{className:"float-end",children:C(A0e,{toggleClassName:"btn-sm p-0 me-3",ranges:[50,100,200,500],value:h,setValue:N=>{p(N),f(1)}})}),i&&C("div",{className:"float-end",children:i(x?P:void 0)})]}),footer:x,children:C(U0e,{stats:y,highlightedStats:b,max:T,...s})})},H0e=()=>{const e=Bo(),{search:t}=kn(),{filtering:n,domain:r}=H.useMemo(er(()=>gl(t),({startDate:o,endDate:s,orphanVisitsType:a,excludeBots:l,domain:c})=>({domain:c,filtering:{dateRange:o!=null||s!=null?I8(o,s):void 0,visitsFilter:{orphanVisitsType:a,excludeBots:zo(l)?void 0:l==="true"}}})),[t]);return[n,o=>{const{dateRange:s,visitsFilter:a}=BI(n,o),{excludeBots:l,orphanVisitsType:c}=a,f={startDate:(s==null?void 0:s.startDate)&&qs(s.startDate)||"",endDate:(s==null?void 0:s.endDate)&&qs(s.endDate)||"",excludeBots:l===void 0?void 0:o8(l),orphanVisitsType:c,domain:r},h=Yd(f),p=Cr(h)?"":`?${h}`;e(p,{replace:!0,relative:"route"})}]};function JF(e,t){const n=H.useRef(t);H.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 W0e=1;function Y0e(e){return Object.freeze({__version:W0e,map:e})}function q0e(e,t){return Object.freeze({...e,...t})}const e$=H.createContext(null),t$=e$.Provider;function n$(){const e=H.useContext(e$);if(e==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of ");return e}function G0e(e){function t(n,r){const{instance:i,context:o}=e(n).current;return H.useImperativeHandle(r,()=>i),n.children==null?null:V.createElement(t$,{value:o},n.children)}return H.forwardRef(t)}function Z0e(e){function t(n,r){const[i,o]=H.useState(!1),{instance:s}=e(n,o).current;H.useImperativeHandle(r,()=>s),H.useEffect(function(){i&&s.update()},[s,i,n.children]);const a=s._contentNode;return a?Za.createPortal(n.children,a):null}return H.forwardRef(t)}function K0e(e){function t(n,r){const{instance:i}=e(n).current;return H.useImperativeHandle(r,()=>i),null}return H.forwardRef(t)}function r$(e,t){const n=H.useRef();H.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 mT(e,t){const n=e.pane??t.pane;return n?{...e,pane:n}:e}function X0e(e,t){return function(r,i){const o=n$(),s=e(mT(r,o),o);return JF(o.map,r.attribution),r$(s.current,r.eventHandlers),t(s.current,o,r,i),s}}var Gs={},Q0e={get exports(){return Gs},set exports(e){Gs=e}};/* @preserve * Leaflet 1.9.3, a JS library for interactive maps. https://leafletjs.com * (c) 2010-2022 Vladimir Agafonkin, (c) 2010-2011 CloudMade - */(function(e,t){(function(n,r){r(t)})(Hl,function(n){var r="1.9.3";function i(u){var d,_,E,M;for(_=1,E=arguments.length;_"u"||!L||!L.Mixin)){u=x(u)?u:[u];for(var d=0;d0?Math.floor(u):Math.ceil(u)};Z.prototype={clone:function(){return new Z(this.x,this.y)},add:function(u){return this.clone()._add(I(u))},_add:function(u){return this.x+=u.x,this.y+=u.y,this},subtract:function(u){return this.clone()._subtract(I(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 Z(this.x*u.x,this.y*u.y)},unscaleBy:function(u){return new Z(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=$(this.x),this.y=$(this.y),this},distanceTo:function(u){u=I(u);var d=u.x-this.x,_=u.y-this.y;return Math.sqrt(d*d+_*_)},equals:function(u){return u=I(u),u.x===this.x&&u.y===this.y},contains:function(u){return u=I(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 I(u,d,_){return u instanceof Z?u:x(u)?new Z(u[0],u[1]):u==null?u:typeof u=="object"&&"x"in u&&"y"in u?new Z(u.x,u.y):new Z(u,d,_)}function B(u,d){if(u)for(var _=d?[u,d]:u,E=0,M=_.length;E=this.min.x&&_.x<=this.max.x&&d.y>=this.min.y&&_.y<=this.max.y},intersects:function(u){u=re(u);var d=this.min,_=this.max,E=u.min,M=u.max,j=M.x>=d.x&&E.x<=_.x,J=M.y>=d.y&&E.y<=_.y;return j&&J},overlaps:function(u){u=re(u);var d=this.min,_=this.max,E=u.min,M=u.max,j=M.x>d.x&&E.x<_.x,J=M.y>d.y&&E.y<_.y;return j&&J},isValid:function(){return!!(this.min&&this.max)},pad:function(u){var d=this.min,_=this.max,E=Math.abs(d.x-_.x)*u,M=Math.abs(d.y-_.y)*u;return re(I(d.x-E,d.y-M),I(_.x+E,_.y+M))},equals:function(u){return u?(u=re(u),this.min.equals(u.getTopLeft())&&this.max.equals(u.getBottomRight())):!1}};function re(u,d){return!u||u instanceof B?u:new B(u,d)}function W(u,d){if(u)for(var _=d?[u,d]:u,E=0,M=_.length;E=d.lat&&M.lat<=_.lat&&E.lng>=d.lng&&M.lng<=_.lng},intersects:function(u){u=G(u);var d=this._southWest,_=this._northEast,E=u.getSouthWest(),M=u.getNorthEast(),j=M.lat>=d.lat&&E.lat<=_.lat,J=M.lng>=d.lng&&E.lng<=_.lng;return j&&J},overlaps:function(u){u=G(u);var d=this._southWest,_=this._northEast,E=u.getSouthWest(),M=u.getNorthEast(),j=M.lat>d.lat&&E.lat<_.lat,J=M.lng>d.lng&&E.lng<_.lng;return j&&J},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(u,d){return u?(u=G(u),this._southWest.equals(u.getSouthWest(),d)&&this._northEast.equals(u.getNorthEast(),d)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function G(u,d){return u instanceof W?u:new W(u,d)}function ne(u,d,_){if(isNaN(u)||isNaN(d))throw new Error("Invalid LatLng object: ("+u+", "+d+")");this.lat=+u,this.lng=+d,_!==void 0&&(this.alt=+_)}ne.prototype={equals:function(u,d){if(!u)return!1;u=ae(u);var _=Math.max(Math.abs(this.lat-u.lat),Math.abs(this.lng-u.lng));return _<=(d===void 0?1e-9:d)},toString:function(u){return"LatLng("+p(this.lat,u)+", "+p(this.lng,u)+")"},distanceTo:function(u){return O.distance(this,ae(u))},wrap:function(){return O.wrapLatLng(this)},toBounds:function(u){var d=180*u/40075017,_=d/Math.cos(Math.PI/180*this.lat);return G([this.lat-d,this.lng-_],[this.lat+d,this.lng+_])},clone:function(){return new ne(this.lat,this.lng,this.alt)}};function ae(u,d,_){return u instanceof ne?u:x(u)&&typeof u[0]!="object"?u.length===3?new ne(u[0],u[1],u[2]):u.length===2?new ne(u[0],u[1]):null:u==null?u:typeof u=="object"&&"lat"in u?new ne(u.lat,"lng"in u?u.lng:u.lon,u.alt):d===void 0?null:new ne(u,d,_)}var me={latLngToPoint:function(u,d){var _=this.projection.project(u),E=this.scale(d);return this.transformation._transform(_,E)},pointToLatLng:function(u,d){var _=this.scale(d),E=this.transformation.untransform(u,_);return this.projection.unproject(E)},project:function(u){return this.projection.project(u)},unproject:function(u){return this.projection.unproject(u)},scale:function(u){return 256*Math.pow(2,u)},zoom:function(u){return Math.log(u/256)/Math.LN2},getProjectedBounds:function(u){if(this.infinite)return null;var d=this.projection.bounds,_=this.scale(u),E=this.transformation.transform(d.min,_),M=this.transformation.transform(d.max,_);return new B(E,M)},infinite:!1,wrapLatLng:function(u){var d=this.wrapLng?f(u.lng,this.wrapLng,!0):u.lng,_=this.wrapLat?f(u.lat,this.wrapLat,!0):u.lat,E=u.alt;return new ne(_,d,E)},wrapLatLngBounds:function(u){var d=u.getCenter(),_=this.wrapLatLng(d),E=d.lat-_.lat,M=d.lng-_.lng;if(E===0&&M===0)return u;var j=u.getSouthWest(),J=u.getNorthEast(),de=new ne(j.lat-E,j.lng-M),pe=new ne(J.lat-E,J.lng-M);return new W(de,pe)}},O=i({},me,{wrapLng:[-180,180],R:6371e3,distance:function(u,d){var _=Math.PI/180,E=u.lat*_,M=d.lat*_,j=Math.sin((d.lat-u.lat)*_/2),J=Math.sin((d.lng-u.lng)*_/2),de=j*j+Math.cos(E)*Math.cos(M)*J*J,pe=2*Math.atan2(Math.sqrt(de),Math.sqrt(1-de));return this.R*pe}}),R=6378137,F={R,MAX_LATITUDE:85.0511287798,project:function(u){var d=Math.PI/180,_=this.MAX_LATITUDE,E=Math.max(Math.min(_,u.lat),-_),M=Math.sin(E*d);return new Z(this.R*u.lng*d,this.R*Math.log((1+M)/(1-M))/2)},unproject:function(u){var d=180/Math.PI;return new ne((2*Math.atan(Math.exp(u.y/this.R))-Math.PI/2)*d,u.x*d/this.R)},bounds:function(){var u=R*Math.PI;return new B([-u,-u],[u,u])}()};function Q(u,d,_,E){if(x(u)){this._a=u[0],this._b=u[1],this._c=u[2],this._d=u[3];return}this._a=u,this._b=d,this._c=_,this._d=E}Q.prototype={transform:function(u,d){return this._transform(u.clone(),d)},_transform:function(u,d){return d=d||1,u.x=d*(this._a*u.x+this._b),u.y=d*(this._c*u.y+this._d),u},untransform:function(u,d){return d=d||1,new Z((u.x/d-this._b)/this._a,(u.y/d-this._d)/this._c)}};function X(u,d,_,E){return new Q(u,d,_,E)}var le=i({},O,{code:"EPSG:3857",projection:F,transformation:function(){var u=.5/(Math.PI*F.R);return X(u,.5,-u,.5)}()}),ve=i({},le,{code:"EPSG:900913"});function De(u){return document.createElementNS("http://www.w3.org/2000/svg",u)}function fe(u,d){var _="",E,M,j,J,de,pe;for(E=0,j=u.length;E1,Jt=function(){var u=!1;try{var d=Object.defineProperty({},"passive",{get:function(){u=!0}});window.addEventListener("testPassiveEventSupport",h,d),window.removeEventListener("testPassiveEventSupport",h,d)}catch{}return u}(),sr=function(){return!!document.createElement("canvas").getContext}(),An=!!(document.createElementNS&&De("svg").createSVGRect),In=!!An&&function(){var u=document.createElement("div");return u.innerHTML="",(u.firstChild&&u.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),mn=!An&&function(){try{var u=document.createElement("div");u.innerHTML='';var d=u.firstChild;return d.style.behavior="url(#default#VML)",d&&typeof d.adj=="object"}catch{return!1}}(),li=navigator.platform.indexOf("Mac")===0,ci=navigator.platform.indexOf("Linux")===0;function Fn(u){return navigator.userAgent.toLowerCase().indexOf(u)>=0}var Ye={ie:be,ielt9:Oe,edge:Ae,webkit:Ne,android:Le,android23:ue,androidStock:we,opera:_e,chrome:Ee,gecko:Me,safari:$e,phantom:tt,opera12:nt,win:Ke,ie3d:Yt,webkit3d:Bt,gecko3d:xn,any3d:or,mobile:Ni,mobileWebkit:Dn,mobileWebkit3d:cu,msPointer:Li,pointer:vh,touch:_h,touchNative:yh,mobileOpera:uu,mobileGecko:la,retina:ln,passiveEvents:Jt,canvas:sr,svg:An,vml:mn,inlineSvg:In,mac:li,linux:ci},yT=Ye.msPointer?"MSPointerDown":"pointerdown",_T=Ye.msPointer?"MSPointerMove":"pointermove",bT=Ye.msPointer?"MSPointerUp":"pointerup",wT=Ye.msPointer?"MSPointerCancel":"pointercancel",I_={touchstart:yT,touchmove:_T,touchend:bT,touchcancel:wT},xT={touchstart:g$,touchmove:bh,touchend:bh,touchcancel:bh},bl={},ST=!1;function f$(u,d,_){return d==="touchstart"&&m$(),xT[d]?(_=xT[d].bind(this,_),u.addEventListener(I_[d],_,!1),_):(console.warn("wrong event specified:",d),h)}function d$(u,d,_){if(!I_[d]){console.warn("wrong event specified:",d);return}u.removeEventListener(I_[d],_,!1)}function h$(u){bl[u.pointerId]=u}function p$(u){bl[u.pointerId]&&(bl[u.pointerId]=u)}function CT(u){delete bl[u.pointerId]}function m$(){ST||(document.addEventListener(yT,h$,!0),document.addEventListener(_T,p$,!0),document.addEventListener(bT,CT,!0),document.addEventListener(wT,CT,!0),ST=!0)}function bh(u,d){if(d.pointerType!==(d.MSPOINTER_TYPE_MOUSE||"mouse")){d.touches=[];for(var _ in bl)d.touches.push(bl[_]);d.changedTouches=[d],u(d)}}function g$(u,d){d.MSPOINTER_TYPE_TOUCH&&d.pointerType===d.MSPOINTER_TYPE_TOUCH&&$n(d),bh(u,d)}function v$(u){var d={},_,E;for(E in u)_=u[E],d[E]=_&&_.bind?_.bind(u):_;return u=d,d.type="dblclick",d.detail=2,d.isTrusted=!1,d._simulated=!0,d}var y$=200;function _$(u,d){u.addEventListener("dblclick",d);var _=0,E;function M(j){if(j.detail!==1){E=j.detail;return}if(!(j.pointerType==="mouse"||j.sourceCapabilities&&!j.sourceCapabilities.firesTouchEvents)){var J=kT(j);if(!(J.some(function(pe){return pe instanceof HTMLLabelElement&&pe.attributes.for})&&!J.some(function(pe){return pe instanceof HTMLInputElement||pe instanceof HTMLSelectElement}))){var de=Date.now();de-_<=y$?(E++,E===2&&d(v$(j))):E=1,_=de}}}return u.addEventListener("click",M),{dblclick:d,simDblclick:M}}function b$(u,d){u.removeEventListener("dblclick",d.dblclick),u.removeEventListener("click",d.simDblclick)}var F_=Sh(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),fu=Sh(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ET=fu==="webkitTransition"||fu==="OTransition"?fu+"End":"transitionend";function TT(u){return typeof u=="string"?document.getElementById(u):u}function du(u,d){var _=u.style[d]||u.currentStyle&&u.currentStyle[d];if((!_||_==="auto")&&document.defaultView){var E=document.defaultView.getComputedStyle(u,null);_=E?E[d]:null}return _==="auto"?null:_}function ft(u,d,_){var E=document.createElement(u);return E.className=d||"",_&&_.appendChild(E),E}function zt(u){var d=u.parentNode;d&&d.removeChild(u)}function wh(u){for(;u.firstChild;)u.removeChild(u.firstChild)}function wl(u){var d=u.parentNode;d&&d.lastChild!==u&&d.appendChild(u)}function xl(u){var d=u.parentNode;d&&d.firstChild!==u&&d.insertBefore(u,d.firstChild)}function $_(u,d){if(u.classList!==void 0)return u.classList.contains(d);var _=xh(u);return _.length>0&&new RegExp("(^|\\s)"+d+"(\\s|$)").test(_)}function Je(u,d){if(u.classList!==void 0)for(var _=g(d),E=0,M=_.length;E0?2*window.devicePixelRatio:1;function RT(u){return Ye.edge?u.wheelDeltaY/2:u.deltaY&&u.deltaMode===0?-u.deltaY/S$: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 K_(u,d){var _=d.relatedTarget;if(!_)return!0;try{for(;_&&_!==u;)_=_.parentNode}catch{return!1}return _!==u}var C$={__proto__:null,on:Xe,off:Et,stopPropagation:fa,disableScrollPropagation:Z_,disableClickPropagation:gu,preventDefault:$n,stop:da,getPropagationPath:kT,getMousePosition:MT,getWheelDelta:RT,isExternalTarget:K_,addListener:Xe,removeListener:Et},NT=se.extend({run:function(u,d,_,E){this.stop(),this._el=u,this._inProgress=!0,this._duration=_||.25,this._easeOutPower=1/Math.max(E||.5,.2),this._startPos=ua(u),this._offset=d.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=Y(this._animate,this),this._step()},_step:function(u){var d=+new Date-this._startTime,_=this._duration*1e3;d<_?this._runFrame(this._easeOut(d/_),u):(this._runFrame(1),this._complete())},_runFrame:function(u,d){var _=this._startPos.add(this._offset.multiplyBy(u));d&&_._round(),cn(this._el,_),this.fire("step")},_complete:function(){q(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(u){return 1-Math.pow(1-u,this._easeOutPower)}}),at=se.extend({options:{crs:le,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(u,d){d=v(this,d),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(u),this._initLayout(),this._onResize=s(this._onResize,this),this._initEvents(),d.maxBounds&&this.setMaxBounds(d.maxBounds),d.zoom!==void 0&&(this._zoom=this._limitZoom(d.zoom)),d.center&&d.zoom!==void 0&&this.setView(ae(d.center),d.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=fu&&Ye.any3d&&!Ye.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Xe(this._proxy,ET,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(u,d,_){if(d=d===void 0?this._zoom:this._limitZoom(d),u=this._limitCenter(ae(u),d,this.options.maxBounds),_=_||{},this._stop(),this._loaded&&!_.reset&&_!==!0){_.animate!==void 0&&(_.zoom=i({animate:_.animate},_.zoom),_.pan=i({animate:_.animate,duration:_.duration},_.pan));var E=this._zoom!==d?this._tryAnimatedZoom&&this._tryAnimatedZoom(u,d,_.zoom):this._tryAnimatedPan(u,_.pan);if(E)return clearTimeout(this._sizeTimer),this}return this._resetView(u,d,_.pan&&_.pan.noMoveStart),this},setZoom:function(u,d){return this._loaded?this.setView(this.getCenter(),u,{zoom:d}):(this._zoom=u,this)},zoomIn:function(u,d){return u=u||(Ye.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+u,d)},zoomOut:function(u,d){return u=u||(Ye.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-u,d)},setZoomAround:function(u,d,_){var E=this.getZoomScale(d),M=this.getSize().divideBy(2),j=u instanceof Z?u:this.latLngToContainerPoint(u),J=j.subtract(M).multiplyBy(1-1/E),de=this.containerPointToLatLng(M.add(J));return this.setView(de,d,{zoom:_})},_getBoundsCenterZoom:function(u,d){d=d||{},u=u.getBounds?u.getBounds():G(u);var _=I(d.paddingTopLeft||d.padding||[0,0]),E=I(d.paddingBottomRight||d.padding||[0,0]),M=this.getBoundsZoom(u,!1,_.add(E));if(M=typeof d.maxZoom=="number"?Math.min(d.maxZoom,M):M,M===1/0)return{center:u.getCenter(),zoom:M};var j=E.subtract(_).divideBy(2),J=this.project(u.getSouthWest(),M),de=this.project(u.getNorthEast(),M),pe=this.unproject(J.add(de).divideBy(2).add(j),M);return{center:pe,zoom:M}},fitBounds:function(u,d){if(u=G(u),!u.isValid())throw new Error("Bounds are not valid.");var _=this._getBoundsCenterZoom(u,d);return this.setView(_.center,_.zoom,d)},fitWorld:function(u){return this.fitBounds([[-90,-180],[90,180]],u)},panTo:function(u,d){return this.setView(u,this._zoom,{pan:d})},panBy:function(u,d){if(u=I(u).round(),d=d||{},!u.x&&!u.y)return this.fire("moveend");if(d.animate!==!0&&!this.getSize().contains(u))return this._resetView(this.unproject(this.project(this.getCenter()).add(u)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new NT,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),d.noMoveStart||this.fire("movestart"),d.animate!==!1){Je(this._mapPane,"leaflet-pan-anim");var _=this._getMapPanePos().subtract(u).round();this._panAnim.run(this._mapPane,_,d.duration||.25,d.easeLinearity)}else this._rawPanBy(u),this.fire("move").fire("moveend");return this},flyTo:function(u,d,_){if(_=_||{},_.animate===!1||!Ye.any3d)return this.setView(u,d,_);this._stop();var E=this.project(this.getCenter()),M=this.project(u),j=this.getSize(),J=this._zoom;u=ae(u),d=d===void 0?J:d;var de=Math.max(j.x,j.y),pe=de*this.getZoomScale(J,d),Ce=M.distanceTo(E)||1,Ie=1.42,Ge=Ie*Ie;function it(un){var $h=un?-1:1,d7=un?pe:de,h7=pe*pe-de*de+$h*Ge*Ge*Ce*Ce,p7=2*d7*Ge*Ce,a0=h7/p7,dO=Math.sqrt(a0*a0+1)-a0,m7=dO<1e-9?-18:Math.log(dO);return m7}function Hr(un){return(Math.exp(un)-Math.exp(-un))/2}function pa(un){return(Math.exp(un)+Math.exp(-un))/2}function Fh(un){return Hr(un)/pa(un)}var Go=it(0);function s0(un){return de*(pa(Go)/pa(Go+Ie*un))}function l7(un){return de*(pa(Go)*Fh(Go+Ie*un)-Hr(Go))/Ge}function c7(un){return 1-Math.pow(1-un,1.5)}var u7=Date.now(),uO=(it(1)-Go)/Ie,f7=_.duration?1e3*_.duration:1e3*uO*.8;function fO(){var un=(Date.now()-u7)/f7,$h=c7(un)*uO;un<=1?(this._flyToFrame=Y(fO,this),this._move(this.unproject(E.add(M.subtract(E).multiplyBy(l7($h)/Ce)),J),this.getScaleZoom(de/s0($h),J),{flyTo:!0})):this._move(u,d)._moveEnd(!0)}return this._moveStart(!0,_.noMoveStart),fO.call(this),this},flyToBounds:function(u,d){var _=this._getBoundsCenterZoom(u,d);return this.flyTo(_.center,_.zoom,d)},setMaxBounds:function(u){return u=G(u),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),u.isValid()?(this.options.maxBounds=u,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(u){var d=this.options.minZoom;return this.options.minZoom=u,this._loaded&&d!==u&&(this.fire("zoomlevelschange"),this.getZoom()this.options.maxZoom)?this.setZoom(u):this},panInsideBounds:function(u,d){this._enforcingBounds=!0;var _=this.getCenter(),E=this._limitCenter(_,this._zoom,G(u));return _.equals(E)||this.panTo(E,d),this._enforcingBounds=!1,this},panInside:function(u,d){d=d||{};var _=I(d.paddingTopLeft||d.padding||[0,0]),E=I(d.paddingBottomRight||d.padding||[0,0]),M=this.project(this.getCenter()),j=this.project(u),J=this.getPixelBounds(),de=re([J.min.add(_),J.max.subtract(E)]),pe=de.getSize();if(!de.contains(j)){this._enforcingBounds=!0;var Ce=j.subtract(de.getCenter()),Ie=de.extend(j).getSize().subtract(pe);M.x+=Ce.x<0?-Ie.x:Ie.x,M.y+=Ce.y<0?-Ie.y:Ie.y,this.panTo(this.unproject(M),d),this._enforcingBounds=!1}return this},invalidateSize:function(u){if(!this._loaded)return this;u=i({animate:!1,pan:!0},u===!0?{animate:!0}:u);var d=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var _=this.getSize(),E=d.divideBy(2).round(),M=_.divideBy(2).round(),j=E.subtract(M);return!j.x&&!j.y?this:(u.animate&&u.pan?this.panBy(j):(u.pan&&this._rawPanBy(j),this.fire("move"),u.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(s(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:d,newSize:_}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(u){if(u=this._locateOptions=i({timeout:1e4,watch:!1},u),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var d=s(this._handleGeolocationResponse,this),_=s(this._handleGeolocationError,this);return u.watch?this._locationWatchId=navigator.geolocation.watchPosition(d,_,u):navigator.geolocation.getCurrentPosition(d,_,u),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(u){if(this._container._leaflet_id){var d=u.code,_=u.message||(d===1?"permission denied":d===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:d,message:"Geolocation error: "+_+"."})}},_handleGeolocationResponse:function(u){if(this._container._leaflet_id){var d=u.coords.latitude,_=u.coords.longitude,E=new ne(d,_),M=E.toBounds(u.coords.accuracy*2),j=this._locateOptions;if(j.setView){var J=this.getBoundsZoom(M);this.setView(E,j.maxZoom?Math.min(J,j.maxZoom):J)}var de={latlng:E,bounds:M,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,d){if(!d)return this;var _=this[u]=new d(this);return this._handlers.push(_),this.options[u]&&_.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(),zt(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(q(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)zt(this._panes[u]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(u,d){var _="leaflet-pane"+(u?" leaflet-"+u.replace("Pane","")+"-pane":""),E=ft("div",_,d||this._mapPane);return u&&(this._panes[u]=E),E},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var u=this.getPixelBounds(),d=this.unproject(u.getBottomLeft()),_=this.unproject(u.getTopRight());return new W(d,_)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(u,d,_){u=G(u),_=I(_||[0,0]);var E=this.getZoom()||0,M=this.getMinZoom(),j=this.getMaxZoom(),J=u.getNorthWest(),de=u.getSouthEast(),pe=this.getSize().subtract(_),Ce=re(this.project(de,E),this.project(J,E)).getSize(),Ie=Ye.any3d?this.options.zoomSnap:1,Ge=pe.x/Ce.x,it=pe.y/Ce.y,Hr=d?Math.max(Ge,it):Math.min(Ge,it);return E=this.getScaleZoom(Hr,E),Ie&&(E=Math.round(E/(Ie/100))*(Ie/100),E=d?Math.ceil(E/Ie)*Ie:Math.floor(E/Ie)*Ie),Math.max(M,Math.min(j,E))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new Z(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(u,d){var _=this._getTopLeftPoint(u,d);return new B(_,_.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(u){return this.options.crs.getProjectedBounds(u===void 0?this.getZoom():u)},getPane:function(u){return typeof u=="string"?this._panes[u]:u},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(u,d){var _=this.options.crs;return d=d===void 0?this._zoom:d,_.scale(u)/_.scale(d)},getScaleZoom:function(u,d){var _=this.options.crs;d=d===void 0?this._zoom:d;var E=_.zoom(u*_.scale(d));return isNaN(E)?1/0:E},project:function(u,d){return d=d===void 0?this._zoom:d,this.options.crs.latLngToPoint(ae(u),d)},unproject:function(u,d){return d=d===void 0?this._zoom:d,this.options.crs.pointToLatLng(I(u),d)},layerPointToLatLng:function(u){var d=I(u).add(this.getPixelOrigin());return this.unproject(d)},latLngToLayerPoint:function(u){var d=this.project(ae(u))._round();return d._subtract(this.getPixelOrigin())},wrapLatLng:function(u){return this.options.crs.wrapLatLng(ae(u))},wrapLatLngBounds:function(u){return this.options.crs.wrapLatLngBounds(G(u))},distance:function(u,d){return this.options.crs.distance(ae(u),ae(d))},containerPointToLayerPoint:function(u){return I(u).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(u){return I(u).add(this._getMapPanePos())},containerPointToLatLng:function(u){var d=this.containerPointToLayerPoint(I(u));return this.layerPointToLatLng(d)},latLngToContainerPoint:function(u){return this.layerPointToContainerPoint(this.latLngToLayerPoint(ae(u)))},mouseEventToContainerPoint:function(u){return MT(u,this._container)},mouseEventToLayerPoint:function(u){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(u))},mouseEventToLatLng:function(u){return this.layerPointToLatLng(this.mouseEventToLayerPoint(u))},_initContainer:function(u){var d=this._container=TT(u);if(d){if(d._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Xe(d,"scroll",this._onScroll,this),this._containerId=l(d)},_initLayout:function(){var u=this._container;this._fadeAnimated=this.options.fadeAnimation&&Ye.any3d,Je(u,"leaflet-container"+(Ye.touch?" leaflet-touch":"")+(Ye.retina?" leaflet-retina":"")+(Ye.ielt9?" leaflet-oldie":"")+(Ye.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var d=du(u,"position");d!=="absolute"&&d!=="relative"&&d!=="fixed"&&d!=="sticky"&&(u.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var u=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),cn(this._mapPane,new Z(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Je(u.markerPane,"leaflet-zoom-hide"),Je(u.shadowPane,"leaflet-zoom-hide"))},_resetView:function(u,d,_){cn(this._mapPane,new Z(0,0));var E=!this._loaded;this._loaded=!0,d=this._limitZoom(d),this.fire("viewprereset");var M=this._zoom!==d;this._moveStart(M,_)._move(u,d)._moveEnd(M),this.fire("viewreset"),E&&this.fire("load")},_moveStart:function(u,d){return u&&this.fire("zoomstart"),d||this.fire("movestart"),this},_move:function(u,d,_,E){d===void 0&&(d=this._zoom);var M=this._zoom!==d;return this._zoom=d,this._lastCenter=u,this._pixelOrigin=this._getNewPixelOrigin(u),E?_&&_.pinch&&this.fire("zoom",_):((M||_&&_.pinch)&&this.fire("zoom",_),this.fire("move",_)),this},_moveEnd:function(u){return u&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return q(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(u){cn(this._mapPane,this._getMapPanePos().subtract(u))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(u){this._targets={},this._targets[l(this._container)]=this;var d=u?Et:Xe;d(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&d(window,"resize",this._onResize,this),Ye.any3d&&this.options.transform3DLimit&&(u?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){q(this._resizeRequest),this._resizeRequest=Y(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var u=this._getMapPanePos();Math.max(Math.abs(u.x),Math.abs(u.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(u,d){for(var _=[],E,M=d==="mouseout"||d==="mouseover",j=u.target||u.srcElement,J=!1;j;){if(E=this._targets[l(j)],E&&(d==="click"||d==="preclick")&&this._draggableMoved(E)){J=!0;break}if(E&&E.listens(d,!0)&&(M&&!K_(j,u)||(_.push(E),M))||j===this._container)break;j=j.parentNode}return!_.length&&!J&&!M&&this.listens(d,!0)&&(_=[this]),_},_isClickDisabled:function(u){for(;u&&u!==this._container;){if(u._leaflet_disable_click)return!0;u=u.parentNode}},_handleDOMEvent:function(u){var d=u.target||u.srcElement;if(!(!this._loaded||d._leaflet_disable_events||u.type==="click"&&this._isClickDisabled(d))){var _=u.type;_==="mousedown"&&H_(d),this._fireDOMEvent(u,_)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(u,d,_){if(u.type==="click"){var E=i({},u);E.type="preclick",this._fireDOMEvent(E,E.type,_)}var M=this._findEventTargets(u,d);if(_){for(var j=[],J=0;J<_.length;J++)_[J].listens(d,!0)&&j.push(_[J]);M=j.concat(M)}if(M.length){d==="contextmenu"&&$n(u);var de=M[0],pe={originalEvent:u};if(u.type!=="keypress"&&u.type!=="keydown"&&u.type!=="keyup"){var Ce=de.getLatLng&&(!de._radius||de._radius<=10);pe.containerPoint=Ce?this.latLngToContainerPoint(de.getLatLng()):this.mouseEventToContainerPoint(u),pe.layerPoint=this.containerPointToLayerPoint(pe.containerPoint),pe.latlng=Ce?de.getLatLng():this.layerPointToLatLng(pe.layerPoint)}for(J=0;J0?Math.round(u-d)/2:Math.max(0,Math.ceil(u))-Math.max(0,Math.floor(d))},_limitZoom:function(u){var d=this.getMinZoom(),_=this.getMaxZoom(),E=Ye.any3d?this.options.zoomSnap:1;return E&&(u=Math.round(u/E)*E),Math.max(d,Math.min(_,u))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){en(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(u,d){var _=this._getCenterOffset(u)._trunc();return(d&&d.animate)!==!0&&!this.getSize().contains(_)?!1:(this.panBy(_,d),!0)},_createAnimProxy:function(){var u=this._proxy=ft("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(u),this.on("zoomanim",function(d){var _=F_,E=this._proxy.style[_];ca(this._proxy,this.project(d.center,d.zoom),this.getZoomScale(d.zoom,1)),E===this._proxy.style[_]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){zt(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var u=this.getCenter(),d=this.getZoom();ca(this._proxy,this.project(u,d),this.getZoomScale(d,1))},_catchTransitionEnd:function(u){this._animatingZoom&&u.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(u,d,_){if(this._animatingZoom)return!0;if(_=_||{},!this._zoomAnimated||_.animate===!1||this._nothingToAnimate()||Math.abs(d-this._zoom)>this.options.zoomAnimationThreshold)return!1;var E=this.getZoomScale(d),M=this._getCenterOffset(u)._divideBy(1-1/E);return _.animate!==!0&&!this.getSize().contains(M)?!1:(Y(function(){this._moveStart(!0,!1)._animateZoom(u,d,!0)},this),!0)},_animateZoom:function(u,d,_,E){this._mapPane&&(_&&(this._animatingZoom=!0,this._animateToCenter=u,this._animateToZoom=d,Je(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:u,zoom:d,noUpdate:E}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(s(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&en(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 E$(u,d){return new at(u,d)}var ui=K.extend({options:{position:"topright"},initialize:function(u){v(this,u)},getPosition:function(){return this.options.position},setPosition:function(u){var d=this._map;return d&&d.removeControl(this),this.options.position=u,d&&d.addControl(this),this},getContainer:function(){return this._container},addTo:function(u){this.remove(),this._map=u;var d=this._container=this.onAdd(u),_=this.getPosition(),E=u._controlCorners[_];return Je(d,"leaflet-control"),_.indexOf("bottom")!==-1?E.insertBefore(d,E.firstChild):E.appendChild(d),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(zt(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()}}),vu=function(u){return new ui(u)};at.include({addControl:function(u){return u.addTo(this),this},removeControl:function(u){return u.remove(),this},_initControlPos:function(){var u=this._controlCorners={},d="leaflet-",_=this._controlContainer=ft("div",d+"control-container",this._container);function E(M,j){var J=d+M+" "+d+j;u[M+j]=ft("div",J,_)}E("top","left"),E("top","right"),E("bottom","left"),E("bottom","right")},_clearControlPos:function(){for(var u in this._controlCorners)zt(this._controlCorners[u]);zt(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var LT=ui.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(u,d,_,E){return _1,this._baseLayersList.style.display=u?"":"none"),this._separator.style.display=d&&u?"":"none",this},_onLayerChange:function(u){this._handlingClick||this._update();var d=this._getLayer(l(u.target)),_=d.overlay?u.type==="add"?"overlayadd":"overlayremove":u.type==="add"?"baselayerchange":null;_&&this._map.fire(_,d)},_createRadioElement:function(u,d){var _='",E=document.createElement("div");return E.innerHTML=_,E.firstChild},_addItem:function(u){var d=document.createElement("label"),_=this._map.hasLayer(u.layer),E;u.overlay?(E=document.createElement("input"),E.type="checkbox",E.className="leaflet-control-layers-selector",E.defaultChecked=_):E=this._createRadioElement("leaflet-base-layers_"+l(this),_),this._layerControlInputs.push(E),E.layerId=l(u.layer),Xe(E,"click",this._onInputClick,this);var M=document.createElement("span");M.innerHTML=" "+u.name;var j=document.createElement("span");d.appendChild(j),j.appendChild(E),j.appendChild(M);var J=u.overlay?this._overlaysList:this._baseLayersList;return J.appendChild(d),this._checkDisabledLayers(),d},_onInputClick:function(){var u=this._layerControlInputs,d,_,E=[],M=[];this._handlingClick=!0;for(var j=u.length-1;j>=0;j--)d=u[j],_=this._getLayer(d.layerId).layer,d.checked?E.push(_):d.checked||M.push(_);for(j=0;j=0;M--)d=u[M],_=this._getLayer(d.layerId).layer,d.disabled=_.options.minZoom!==void 0&&E<_.options.minZoom||_.options.maxZoom!==void 0&&E>_.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var u=this._section;Xe(u,"click",$n),this.expand(),setTimeout(function(){Et(u,"click",$n)})}}),T$=function(u,d,_){return new LT(u,d,_)},X_=ui.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(u){var d="leaflet-control-zoom",_=ft("div",d+" leaflet-bar"),E=this.options;return this._zoomInButton=this._createButton(E.zoomInText,E.zoomInTitle,d+"-in",_,this._zoomIn),this._zoomOutButton=this._createButton(E.zoomOutText,E.zoomOutTitle,d+"-out",_,this._zoomOut),this._updateDisabled(),u.on("zoomend zoomlevelschange",this._updateDisabled,this),_},onRemove:function(u){u.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(u){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(u.shiftKey?3:1))},_createButton:function(u,d,_,E,M){var j=ft("a",_,E);return j.innerHTML=u,j.href="#",j.title=d,j.setAttribute("role","button"),j.setAttribute("aria-label",d),gu(j),Xe(j,"click",da),Xe(j,"click",M,this),Xe(j,"click",this._refocusOnMap,this),j},_updateDisabled:function(){var u=this._map,d="leaflet-disabled";en(this._zoomInButton,d),en(this._zoomOutButton,d),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||u._zoom===u.getMinZoom())&&(Je(this._zoomOutButton,d),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||u._zoom===u.getMaxZoom())&&(Je(this._zoomInButton,d),this._zoomInButton.setAttribute("aria-disabled","true"))}});at.mergeOptions({zoomControl:!0}),at.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new X_,this.addControl(this.zoomControl))});var O$=function(u){return new X_(u)},DT=ui.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(u){var d="leaflet-control-scale",_=ft("div",d),E=this.options;return this._addScales(E,d+"-line",_),u.on(E.updateWhenIdle?"moveend":"move",this._update,this),u.whenReady(this._update,this),_},onRemove:function(u){u.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(u,d,_){u.metric&&(this._mScale=ft("div",d,_)),u.imperial&&(this._iScale=ft("div",d,_))},_update:function(){var u=this._map,d=u.getSize().y/2,_=u.distance(u.containerPointToLatLng([0,d]),u.containerPointToLatLng([this.options.maxWidth,d]));this._updateScales(_)},_updateScales:function(u){this.options.metric&&u&&this._updateMetric(u),this.options.imperial&&u&&this._updateImperial(u)},_updateMetric:function(u){var d=this._getRoundNum(u),_=d<1e3?d+" m":d/1e3+" km";this._updateScale(this._mScale,_,d/u)},_updateImperial:function(u){var d=u*3.2808399,_,E,M;d>5280?(_=d/5280,E=this._getRoundNum(_),this._updateScale(this._iScale,E+" mi",E/_)):(M=this._getRoundNum(d),this._updateScale(this._iScale,M+" ft",M/d))},_updateScale:function(u,d,_){u.style.width=Math.round(this.options.maxWidth*_)+"px",u.innerHTML=d},_getRoundNum:function(u){var d=Math.pow(10,(Math.floor(u)+"").length-1),_=u/d;return _=_>=10?10:_>=5?5:_>=3?3:_>=2?2:1,d*_}}),P$=function(u){return new DT(u)},k$='',Q_=ui.extend({options:{position:"bottomright",prefix:''+(Ye.inlineSvg?k$+" ":"")+"Leaflet"},initialize:function(u){v(this,u),this._attributions={}},onAdd:function(u){u.attributionControl=this,this._container=ft("div","leaflet-control-attribution"),gu(this._container);for(var d in u._layers)u._layers[d].getAttribution&&this.addAttribution(u._layers[d].getAttribution());return this._update(),u.on("layeradd",this._addAttribution,this),this._container},onRemove:function(u){u.off("layeradd",this._addAttribution,this)},_addAttribution:function(u){u.layer.getAttribution&&(this.addAttribution(u.layer.getAttribution()),u.layer.once("remove",function(){this.removeAttribution(u.layer.getAttribution())},this))},setPrefix:function(u){return this.options.prefix=u,this._update(),this},addAttribution:function(u){return u?(this._attributions[u]||(this._attributions[u]=0),this._attributions[u]++,this._update(),this):this},removeAttribution:function(u){return u?(this._attributions[u]&&(this._attributions[u]--,this._update()),this):this},_update:function(){if(this._map){var u=[];for(var d in this._attributions)this._attributions[d]&&u.push(d);var _=[];this.options.prefix&&_.push(this.options.prefix),u.length&&_.push(u.join(", ")),this._container.innerHTML=_.join(' ')}}});at.mergeOptions({attributionControl:!0}),at.addInitHook(function(){this.options.attributionControl&&new Q_().addTo(this)});var M$=function(u){return new Q_(u)};ui.Layers=LT,ui.Zoom=X_,ui.Scale=DT,ui.Attribution=Q_,vu.layers=T$,vu.zoom=O$,vu.scale=P$,vu.attribution=M$;var Ai=K.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}});Ai.addTo=function(u,d){return u.addHandler(d,this),this};var R$={Events:oe},AT=Ye.touch?"touchstart mousedown":"mousedown",Yo=se.extend({options:{clickTolerance:3},initialize:function(u,d,_,E){v(this,E),this._element=u,this._dragStartTarget=d||u,this._preventOutline=_},enable:function(){this._enabled||(Xe(this._dragStartTarget,AT,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Yo._dragging===this&&this.finishDrag(!0),Et(this._dragStartTarget,AT,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(u){if(this._enabled&&(this._moved=!1,!$_(this._element,"leaflet-zoom-anim"))){if(u.touches&&u.touches.length!==1){Yo._dragging===this&&this.finishDrag();return}if(!(Yo._dragging||u.shiftKey||u.which!==1&&u.button!==1&&!u.touches)&&(Yo._dragging=this,this._preventOutline&&H_(this._element),z_(),hu(),!this._moving)){this.fire("down");var d=u.touches?u.touches[0]:u,_=OT(this._element);this._startPoint=new Z(d.clientX,d.clientY),this._startPos=ua(this._element),this._parentScale=W_(_);var E=u.type==="mousedown";Xe(document,E?"mousemove":"touchmove",this._onMove,this),Xe(document,E?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(u){if(this._enabled){if(u.touches&&u.touches.length>1){this._moved=!0;return}var d=u.touches&&u.touches.length===1?u.touches[0]:u,_=new Z(d.clientX,d.clientY)._subtract(this._startPoint);!_.x&&!_.y||Math.abs(_.x)+Math.abs(_.y)j&&(J=de,j=pe);j>_&&(d[J]=1,J_(u,d,_,E,J),J_(u,d,_,J,M))}function D$(u,d){for(var _=[u[0]],E=1,M=0,j=u.length;Ed&&(_.push(u[E]),M=E);return Md.max.x&&(_|=2),u.yd.max.y&&(_|=8),_}function A$(u,d){var _=d.x-u.x,E=d.y-u.y;return _*_+E*E}function yu(u,d,_,E){var M=d.x,j=d.y,J=_.x-M,de=_.y-j,pe=J*J+de*de,Ce;return pe>0&&(Ce=((u.x-M)*J+(u.y-j)*de)/pe,Ce>1?(M=_.x,j=_.y):Ce>0&&(M+=J*Ce,j+=de*Ce)),J=u.x-M,de=u.y-j,E?J*J+de*de:new Z(M,j)}function Vr(u){return!x(u[0])||typeof u[0][0]!="object"&&typeof u[0][0]<"u"}function BT(u){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Vr(u)}function zT(u,d){var _,E,M,j,J,de,pe,Ce;if(!u||u.length===0)throw new Error("latlngs not passed");Vr(u)||(console.warn("latlngs are not flat! Only the first ring will be used"),u=u[0]);var Ie=[];for(var Ge in u)Ie.push(d.project(ae(u[Ge])));var it=Ie.length;for(_=0,E=0;_E){pe=(j-E)/M,Ce=[de.x-pe*(de.x-J.x),de.y-pe*(de.y-J.y)];break}return d.unproject(I(Ce))}var I$={__proto__:null,simplify:IT,pointToSegmentDistance:FT,closestPointOnSegment:N$,clipSegment:jT,_getEdgeIntersection:Th,_getBitCode:ha,_sqClosestPointOnSegment:yu,isFlat:Vr,_flat:BT,polylineCenter:zT};function UT(u,d,_){var E,M=[1,4,2,8],j,J,de,pe,Ce,Ie,Ge,it;for(j=0,Ie=u.length;j1e-7;de++)Ce=M*Math.sin(J),Ce=Math.pow((1-Ce)/(1+Ce),M/2),pe=Math.PI/2-2*Math.atan(j*Ce)-J,J+=pe;return new ne(J*d,u.x*d/_)}},$$={__proto__:null,LonLat:e0,Mercator:t0,SphericalMercator:F},j$=i({},O,{code:"EPSG:3395",projection:t0,transformation:function(){var u=.5/(Math.PI*t0.R);return X(u,.5,-u,.5)}()}),HT=i({},O,{code:"EPSG:4326",projection:e0,transformation:X(1/180,1,-1/180,.5)}),B$=i({},me,{projection:e0,transformation:X(1,0,-1,0),scale:function(u){return Math.pow(2,u)},zoom:function(u){return Math.log(u)/Math.LN2},distance:function(u,d){var _=d.lng-u.lng,E=d.lat-u.lat;return Math.sqrt(_*_+E*E)},infinite:!0});me.Earth=O,me.EPSG3395=j$,me.EPSG3857=le,me.EPSG900913=ve,me.EPSG4326=HT,me.Simple=B$;var fi=se.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(u){return u.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(u){return u&&u.removeLayer(this),this},getPane:function(u){return this._map.getPane(u?this.options[u]||u:this.options.pane)},addInteractiveTarget:function(u){return this._map._targets[l(u)]=this,this},removeInteractiveTarget:function(u){return delete this._map._targets[l(u)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(u){var d=u.target;if(d.hasLayer(this)){if(this._map=d,this._zoomAnimated=d._zoomAnimated,this.getEvents){var _=this.getEvents();d.on(_,this),this.once("remove",function(){d.off(_,this)},this)}this.onAdd(d),this.fire("add"),d.fire("layeradd",{layer:this})}}});at.include({addLayer:function(u){if(!u._layerAdd)throw new Error("The provided object is not a Layer.");var d=l(u);return this._layers[d]?this:(this._layers[d]=u,u._mapToAdd=this,u.beforeAdd&&u.beforeAdd(this),this.whenReady(u._layerAdd,u),this)},removeLayer:function(u){var d=l(u);return this._layers[d]?(this._loaded&&u.onRemove(this),delete this._layers[d],this._loaded&&(this.fire("layerremove",{layer:u}),u.fire("remove")),u._map=u._mapToAdd=null,this):this},hasLayer:function(u){return l(u)in this._layers},eachLayer:function(u,d){for(var _ in this._layers)u.call(d,this._layers[_]);return this},_addLayers:function(u){u=u?x(u)?u:[u]:[];for(var d=0,_=u.length;d<_;d++)this.addLayer(u[d])},_addZoomLimit:function(u){(!isNaN(u.options.maxZoom)||!isNaN(u.options.minZoom))&&(this._zoomBoundLayers[l(u)]=u,this._updateZoomLevels())},_removeZoomLimit:function(u){var d=l(u);this._zoomBoundLayers[d]&&(delete this._zoomBoundLayers[d],this._updateZoomLevels())},_updateZoomLevels:function(){var u=1/0,d=-1/0,_=this._getZoomSpan();for(var E in this._zoomBoundLayers){var M=this._zoomBoundLayers[E].options;u=M.minZoom===void 0?u:Math.min(u,M.minZoom),d=M.maxZoom===void 0?d:Math.max(d,M.maxZoom)}this._layersMaxZoom=d===-1/0?void 0:d,this._layersMinZoom=u===1/0?void 0:u,_!==this._getZoomSpan()&&this.fire("zoomlevelschange"),this.options.maxZoom===void 0&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&d[0]instanceof ne&&d[0].equals(d[_-1])&&d.pop(),d},_setLatLngs:function(u){ao.prototype._setLatLngs.call(this,u),Vr(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Vr(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var u=this._renderer._bounds,d=this.options.weight,_=new Z(d,d);if(u=new B(u.min.subtract(_),u.max.add(_)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(u))){if(this.options.noClip){this._parts=this._rings;return}for(var E=0,M=this._rings.length,j;Eu.y!=M.y>u.y&&u.x<(M.x-E.x)*(u.y-E.y)/(M.y-E.y)+E.x&&(d=!d);return d||ao.prototype._containsPoint.call(this,u,!0)}});function G$(u,d){return new El(u,d)}var lo=so.extend({initialize:function(u,d){v(this,d),this._layers={},u&&this.addData(u)},addData:function(u){var d=x(u)?u:u.features,_,E,M;if(d){for(_=0,E=d.length;_0?E:[d.src];return}x(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(d.style,"objectFit")&&(d.style.objectFit="fill"),d.autoplay=!!this.options.autoplay,d.loop=!!this.options.loop,d.muted=!!this.options.muted,d.playsInline=!!this.options.playsInline;for(var j=0;jM?(d.height=M+"px",Je(u,j)):en(u,j),this._containerWidth=this._container.offsetWidth},_animateZoom:function(u){var d=this._map._latLngToNewLayerPoint(this._latlng,u.zoom,u.center),_=this._getAnchor();cn(this._container,d.add(_))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var u=this._map,d=parseInt(du(this._container,"marginBottom"),10)||0,_=this._container.offsetHeight+d,E=this._containerWidth,M=new Z(this._containerLeft,-_-this._containerBottom);M._add(ua(this._container));var j=u.layerPointToContainerPoint(M),J=I(this.options.autoPanPadding),de=I(this.options.autoPanPaddingTopLeft||J),pe=I(this.options.autoPanPaddingBottomRight||J),Ce=u.getSize(),Ie=0,Ge=0;j.x+E+pe.x>Ce.x&&(Ie=j.x+E-Ce.x+pe.x),j.x-Ie-de.x<0&&(Ie=j.x-de.x),j.y+_+pe.y>Ce.y&&(Ge=j.y+_-Ce.y+pe.y),j.y-Ge-de.y<0&&(Ge=j.y-de.y),(Ie||Ge)&&(this.options.keepInView&&(this._autopanning=!0),u.fire("autopanstart").panBy([Ie,Ge]))}},_getAnchor:function(){return I(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),J$=function(u,d){return new Dh(u,d)};at.mergeOptions({closePopupOnClick:!0}),at.include({openPopup:function(u,d,_){return this._initOverlay(Dh,u,d,_).openOn(this),this},closePopup:function(u){return u=arguments.length?u:this._popup,u&&u.close(),this}}),fi.include({bindPopup:function(u,d){return this._popup=this._initOverlay(Dh,this._popup,u,d),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(u){return this._popup&&(this instanceof so||(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)){da(u);var d=u.layer||u.target;if(this._popup._source===d&&!(d instanceof qo)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(u.latlng);return}this._popup._source=d,this.openPopup(u.latlng)}},_movePopup:function(u){this._popup.setLatLng(u.latlng)},_onKeyPress:function(u){u.originalEvent.keyCode===13&&this._openPopup(u)}});var Ah=Ii.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(u){Ii.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){Ii.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=Ii.prototype.getEvents.call(this);return this.options.permanent||(u.preclick=this.close),u},_initLayout:function(){var u="leaflet-tooltip",d=u+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=ft("div",d),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+l(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(u){var d,_,E=this._map,M=this._container,j=E.latLngToContainerPoint(E.getCenter()),J=E.layerPointToContainerPoint(u),de=this.options.direction,pe=M.offsetWidth,Ce=M.offsetHeight,Ie=I(this.options.offset),Ge=this._getAnchor();de==="top"?(d=pe/2,_=Ce):de==="bottom"?(d=pe/2,_=0):de==="center"?(d=pe/2,_=Ce/2):de==="right"?(d=0,_=Ce/2):de==="left"?(d=pe,_=Ce/2):J.xthis.options.maxZoom||_E?this._retainParent(M,j,J,E):!1)},_retainChildren:function(u,d,_,E){for(var M=2*u;M<2*u+2;M++)for(var j=2*d;j<2*d+2;j++){var J=new Z(M,j);J.z=_+1;var de=this._tileCoordsToKey(J),pe=this._tiles[de];if(pe&&pe.active){pe.retain=!0;continue}else pe&&pe.loaded&&(pe.retain=!0);_+1this.options.maxZoom||this.options.minZoom!==void 0&&M1){this._setView(u,_);return}for(var Ge=M.min.y;Ge<=M.max.y;Ge++)for(var it=M.min.x;it<=M.max.x;it++){var Hr=new Z(it,Ge);if(Hr.z=this._tileZoom,!!this._isValidTile(Hr)){var pa=this._tiles[this._tileCoordsToKey(Hr)];pa?pa.current=!0:J.push(Hr)}}if(J.sort(function(Go,s0){return Go.distanceTo(j)-s0.distanceTo(j)}),J.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Fh=document.createDocumentFragment();for(it=0;it_.max.x)||!d.wrapLat&&(u.y<_.min.y||u.y>_.max.y))return!1}if(!this.options.bounds)return!0;var E=this._tileCoordsToBounds(u);return G(this.options.bounds).overlaps(E)},_keyToBounds:function(u){return this._tileCoordsToBounds(this._keyToTileCoords(u))},_tileCoordsToNwSe:function(u){var d=this._map,_=this.getTileSize(),E=u.scaleBy(_),M=E.add(_),j=d.unproject(E,u.z),J=d.unproject(M,u.z);return[j,J]},_tileCoordsToBounds:function(u){var d=this._tileCoordsToNwSe(u),_=new W(d[0],d[1]);return this.options.noWrap||(_=this._map.wrapLatLngBounds(_)),_},_tileCoordsToKey:function(u){return u.x+":"+u.y+":"+u.z},_keyToTileCoords:function(u){var d=u.split(":"),_=new Z(+d[0],+d[1]);return _.z=+d[2],_},_removeTile:function(u){var d=this._tiles[u];d&&(zt(d.el),delete this._tiles[u],this.fire("tileunload",{tile:d.el,coords:this._keyToTileCoords(u)}))},_initTile:function(u){Je(u,"leaflet-tile");var d=this.getTileSize();u.style.width=d.x+"px",u.style.height=d.y+"px",u.onselectstart=h,u.onmousemove=h,Ye.ielt9&&this.options.opacity<1&&Ur(u,this.options.opacity)},_addTile:function(u,d){var _=this._getTilePos(u),E=this._tileCoordsToKey(u),M=this.createTile(this._wrapCoords(u),s(this._tileReady,this,u));this._initTile(M),this.createTile.length<2&&Y(s(this._tileReady,this,u,null,M)),cn(M,_),this._tiles[E]={el:M,coords:u,current:!0},d.appendChild(M),this.fire("tileloadstart",{tile:M,coords:u})},_tileReady:function(u,d,_){d&&this.fire("tileerror",{error:d,tile:_,coords:u});var E=this._tileCoordsToKey(u);_=this._tiles[E],_&&(_.loaded=+new Date,this._map._fadeAnimated?(Ur(_.el,0),q(this._fadeFrame),this._fadeFrame=Y(this._updateOpacity,this)):(_.active=!0,this._pruneTiles()),d||(Je(_.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:_.el,coords:u})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Ye.ielt9||!this._map._fadeAnimated?Y(this._pruneTiles,this):setTimeout(s(this._pruneTiles,this),250)))},_getTilePos:function(u){return u.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(u){var d=new Z(this._wrapX?f(u.x,this._wrapX):u.x,this._wrapY?f(u.y,this._wrapY):u.y);return d.z=u.z,d},_pxBoundsToTileRange:function(u){var d=this.getTileSize();return new B(u.min.unscaleBy(d).floor(),u.max.unscaleBy(d).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var u in this._tiles)if(!this._tiles[u].loaded)return!1;return!0}});function n7(u){return new bu(u)}var Ol=bu.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(u,d){this._url=u,d=v(this,d),d.detectRetina&&Ye.retina&&d.maxZoom>0?(d.tileSize=Math.floor(d.tileSize/2),d.zoomReverse?(d.zoomOffset--,d.minZoom=Math.min(d.maxZoom,d.minZoom+1)):(d.zoomOffset++,d.maxZoom=Math.max(d.minZoom,d.maxZoom-1)),d.minZoom=Math.max(0,d.minZoom)):d.zoomReverse?d.minZoom=Math.min(d.maxZoom,d.minZoom):d.maxZoom=Math.max(d.minZoom,d.maxZoom),typeof d.subdomains=="string"&&(d.subdomains=d.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(u,d){return this._url===u&&d===void 0&&(d=!0),this._url=u,d||this.redraw(),this},createTile:function(u,d){var _=document.createElement("img");return Xe(_,"load",s(this._tileOnLoad,this,d,_)),Xe(_,"error",s(this._tileOnError,this,d,_)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(_.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(_.referrerPolicy=this.options.referrerPolicy),_.alt="",_.src=this.getTileUrl(u),_},getTileUrl:function(u){var d={r:Ye.retina?"@2x":"",s:this._getSubdomain(u),x:u.x,y:u.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var _=this._globalTileRange.max.y-u.y;this.options.tms&&(d.y=_),d["-y"]=_}return b(this._url,i(d,this.options))},_tileOnLoad:function(u,d){Ye.ielt9?setTimeout(s(u,this,null,d),0):u(null,d)},_tileOnError:function(u,d,_){var E=this.options.errorTileUrl;E&&d.getAttribute("src")!==E&&(d.src=E),u(_,d)},_onTileRemove:function(u){u.tile.onload=null},_getZoomForUrl:function(){var u=this._tileZoom,d=this.options.maxZoom,_=this.options.zoomReverse,E=this.options.zoomOffset;return _&&(u=d-u),u+E},_getSubdomain:function(u){var d=Math.abs(u.x+u.y)%this.options.subdomains.length;return this.options.subdomains[d]},_abortLoading:function(){var u,d;for(u in this._tiles)if(this._tiles[u].coords.z!==this._tileZoom&&(d=this._tiles[u].el,d.onload=h,d.onerror=h,!d.complete)){d.src=P;var _=this._tiles[u].coords;zt(d),delete this._tiles[u],this.fire("tileabort",{tile:d,coords:_})}},_removeTile:function(u){var d=this._tiles[u];if(d)return d.el.setAttribute("src",P),bu.prototype._removeTile.call(this,u)},_tileReady:function(u,d,_){if(!(!this._map||_&&_.getAttribute("src")===P))return bu.prototype._tileReady.call(this,u,d,_)}});function XT(u,d){return new Ol(u,d)}var QT=Ol.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(u,d){this._url=u;var _=i({},this.defaultWmsParams);for(var E in d)E in this.options||(_[E]=d[E]);d=v(this,d);var M=d.detectRetina&&Ye.retina?2:1,j=this.getTileSize();_.width=j.x*M,_.height=j.y*M,this.wmsParams=_},onAdd:function(u){this._crs=this.options.crs||u.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var d=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[d]=this._crs.code,Ol.prototype.onAdd.call(this,u)},getTileUrl:function(u){var d=this._tileCoordsToNwSe(u),_=this._crs,E=re(_.project(d[0]),_.project(d[1])),M=E.min,j=E.max,J=(this._wmsVersion>=1.3&&this._crs===HT?[M.y,M.x,j.y,j.x]:[M.x,M.y,j.x,j.y]).join(","),de=Ol.prototype.getTileUrl.call(this,u);return de+w(this.wmsParams,de,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+J},setParams:function(u,d){return i(this.wmsParams,u),d||this.redraw(),this}});function r7(u,d){return new QT(u,d)}Ol.WMS=QT,XT.wms=r7;var co=fi.extend({options:{padding:.1},initialize:function(u){v(this,u),l(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&Je(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var u={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(u.zoomanim=this._onAnimZoom),u},_onAnimZoom:function(u){this._updateTransform(u.center,u.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(u,d){var _=this._map.getZoomScale(d,this._zoom),E=this._map.getSize().multiplyBy(.5+this.options.padding),M=this._map.project(this._center,d),j=E.multiplyBy(-_).add(M).subtract(this._map._getNewPixelOrigin(u,d));Ye.any3d?ca(this._container,j,_):cn(this._container,j)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var u in this._layers)this._layers[u]._reset()},_onZoomEnd:function(){for(var u in this._layers)this._layers[u]._project()},_updatePaths:function(){for(var u in this._layers)this._layers[u]._update()},_update:function(){var u=this.options.padding,d=this._map.getSize(),_=this._map.containerPointToLayerPoint(d.multiplyBy(-u)).round();this._bounds=new B(_,_.add(d.multiplyBy(1+u*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),JT=co.extend({options:{tolerance:0},getEvents:function(){var u=co.prototype.getEvents.call(this);return u.viewprereset=this._onViewPreReset,u},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){co.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var u=this._container=document.createElement("canvas");Xe(u,"mousemove",this._onMouseMove,this),Xe(u,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Xe(u,"mouseout",this._handleMouseOut,this),u._leaflet_disable_events=!0,this._ctx=u.getContext("2d")},_destroyContainer:function(){q(this._redrawRequest),delete this._ctx,zt(this._container),Et(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var u;this._redrawBounds=null;for(var d in this._layers)u=this._layers[d],u._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){co.prototype._update.call(this);var u=this._bounds,d=this._container,_=u.getSize(),E=Ye.retina?2:1;cn(d,u.min),d.width=E*_.x,d.height=E*_.y,d.style.width=_.x+"px",d.style.height=_.y+"px",Ye.retina&&this._ctx.scale(2,2),this._ctx.translate(-u.min.x,-u.min.y),this.fire("update")}},_reset:function(){co.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(u){this._updateDashArray(u),this._layers[l(u)]=u;var d=u._order={layer:u,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=d),this._drawLast=d,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(u){this._requestRedraw(u)},_removePath:function(u){var d=u._order,_=d.next,E=d.prev;_?_.prev=E:this._drawLast=E,E?E.next=_:this._drawFirst=_,delete u._order,delete this._layers[l(u)],this._requestRedraw(u)},_updatePath:function(u){this._extendRedrawBounds(u),u._project(),u._update(),this._requestRedraw(u)},_updateStyle:function(u){this._updateDashArray(u),this._requestRedraw(u)},_updateDashArray:function(u){if(typeof u.options.dashArray=="string"){var d=u.options.dashArray.split(/[, ]+/),_=[],E,M;for(M=0;M')}}catch{}return function(u){return document.createElement("<"+u+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),i7={_initContainer:function(){this._container=ft("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(co.prototype._update.call(this),this.fire("update"))},_initPath:function(u){var d=u._container=wu("shape");Je(d,"leaflet-vml-shape "+(this.options.className||"")),d.coordsize="1 1",u._path=wu("path"),d.appendChild(u._path),this._updateStyle(u),this._layers[l(u)]=u},_addPath:function(u){var d=u._container;this._container.appendChild(d),u.options.interactive&&u.addInteractiveTarget(d)},_removePath:function(u){var d=u._container;zt(d),u.removeInteractiveTarget(d),delete this._layers[l(u)]},_updateStyle:function(u){var d=u._stroke,_=u._fill,E=u.options,M=u._container;M.stroked=!!E.stroke,M.filled=!!E.fill,E.stroke?(d||(d=u._stroke=wu("stroke")),M.appendChild(d),d.weight=E.weight+"px",d.color=E.color,d.opacity=E.opacity,E.dashArray?d.dashStyle=x(E.dashArray)?E.dashArray.join(" "):E.dashArray.replace(/( *, *)/g," "):d.dashStyle="",d.endcap=E.lineCap.replace("butt","flat"),d.joinstyle=E.lineJoin):d&&(M.removeChild(d),u._stroke=null),E.fill?(_||(_=u._fill=wu("fill")),M.appendChild(_),_.color=E.fillColor||E.color,_.opacity=E.fillOpacity):_&&(M.removeChild(_),u._fill=null)},_updateCircle:function(u){var d=u._point.round(),_=Math.round(u._radius),E=Math.round(u._radiusY||_);this._setPath(u,u._empty()?"M0 0":"AL "+d.x+","+d.y+" "+_+","+E+" 0,"+65535*360)},_setPath:function(u,d){u._path.v=d},_bringToFront:function(u){wl(u._container)},_bringToBack:function(u){xl(u._container)}},Ih=Ye.vml?wu:De,xu=co.extend({_initContainer:function(){this._container=Ih("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Ih("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){zt(this._container),Et(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){co.prototype._update.call(this);var u=this._bounds,d=u.getSize(),_=this._container;(!this._svgSize||!this._svgSize.equals(d))&&(this._svgSize=d,_.setAttribute("width",d.x),_.setAttribute("height",d.y)),cn(_,u.min),_.setAttribute("viewBox",[u.min.x,u.min.y,d.x,d.y].join(" ")),this.fire("update")}},_initPath:function(u){var d=u._path=Ih("path");u.options.className&&Je(d,u.options.className),u.options.interactive&&Je(d,"leaflet-interactive"),this._updateStyle(u),this._layers[l(u)]=u},_addPath:function(u){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(u._path),u.addInteractiveTarget(u._path)},_removePath:function(u){zt(u._path),u.removeInteractiveTarget(u._path),delete this._layers[l(u)]},_updatePath:function(u){u._project(),u._update()},_updateStyle:function(u){var d=u._path,_=u.options;d&&(_.stroke?(d.setAttribute("stroke",_.color),d.setAttribute("stroke-opacity",_.opacity),d.setAttribute("stroke-width",_.weight),d.setAttribute("stroke-linecap",_.lineCap),d.setAttribute("stroke-linejoin",_.lineJoin),_.dashArray?d.setAttribute("stroke-dasharray",_.dashArray):d.removeAttribute("stroke-dasharray"),_.dashOffset?d.setAttribute("stroke-dashoffset",_.dashOffset):d.removeAttribute("stroke-dashoffset")):d.setAttribute("stroke","none"),_.fill?(d.setAttribute("fill",_.fillColor||_.color),d.setAttribute("fill-opacity",_.fillOpacity),d.setAttribute("fill-rule",_.fillRule||"evenodd")):d.setAttribute("fill","none"))},_updatePoly:function(u,d){this._setPath(u,fe(u._parts,d))},_updateCircle:function(u){var d=u._point,_=Math.max(Math.round(u._radius),1),E=Math.max(Math.round(u._radiusY),1)||_,M="a"+_+","+E+" 0 1,0 ",j=u._empty()?"M0 0":"M"+(d.x-_)+","+d.y+M+_*2+",0 "+M+-_*2+",0 ";this._setPath(u,j)},_setPath:function(u,d){u._path.setAttribute("d",d)},_bringToFront:function(u){wl(u._path)},_bringToBack:function(u){xl(u._path)}});Ye.vml&&xu.include(i7);function tO(u){return Ye.svg||Ye.vml?new xu(u):null}at.include({getRenderer:function(u){var d=u.options.renderer||this._getPaneRenderer(u.options.pane)||this.options.renderer||this._renderer;return d||(d=this._renderer=this._createRenderer()),this.hasLayer(d)||this.addLayer(d),d},_getPaneRenderer:function(u){if(u==="overlayPane"||u===void 0)return!1;var d=this._paneRenderers[u];return d===void 0&&(d=this._createRenderer({pane:u}),this._paneRenderers[u]=d),d},_createRenderer:function(u){return this.options.preferCanvas&&eO(u)||tO(u)}});var nO=El.extend({initialize:function(u,d){El.prototype.initialize.call(this,this._boundsToLatLngs(u),d)},setBounds:function(u){return this.setLatLngs(this._boundsToLatLngs(u))},_boundsToLatLngs:function(u){return u=G(u),[u.getSouthWest(),u.getNorthWest(),u.getNorthEast(),u.getSouthEast()]}});function o7(u,d){return new nO(u,d)}xu.create=Ih,xu.pointsToPath=fe,lo.geometryToLayer=kh,lo.coordsToLatLng=r0,lo.coordsToLatLngs=Mh,lo.latLngToCoords=i0,lo.latLngsToCoords=Rh,lo.getFeature=Tl,lo.asFeature=Nh,at.mergeOptions({boxZoom:!0});var rO=Ai.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(){Xe(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Et(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){zt(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(),hu(),z_(),this._startPoint=this._map.mouseEventToContainerPoint(u),Xe(document,{contextmenu:da,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(u){this._moved||(this._moved=!0,this._box=ft("div","leaflet-zoom-box",this._container),Je(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(u);var d=new B(this._point,this._startPoint),_=d.getSize();cn(this._box,d.min),this._box.style.width=_.x+"px",this._box.style.height=_.y+"px"},_finish:function(){this._moved&&(zt(this._box),en(this._container,"leaflet-crosshair")),pu(),U_(),Et(document,{contextmenu:da,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(u){if(!(u.which!==1&&u.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(s(this._resetState,this),0);var d=new W(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(d).fire("boxzoomend",{boxZoomBounds:d})}},_onKeyDown:function(u){u.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});at.addInitHook("addHandler","boxZoom",rO),at.mergeOptions({doubleClickZoom:!0});var iO=Ai.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(u){var d=this._map,_=d.getZoom(),E=d.options.zoomDelta,M=u.originalEvent.shiftKey?_-E:_+E;d.options.doubleClickZoom==="center"?d.setZoom(M):d.setZoomAround(u.containerPoint,M)}});at.addInitHook("addHandler","doubleClickZoom",iO),at.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var oO=Ai.extend({addHooks:function(){if(!this._draggable){var u=this._map;this._draggable=new Yo(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))}Je(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){en(this._map._container,"leaflet-grab"),en(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var u=this._map;if(u._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var d=G(this._map.options.maxBounds);this._offsetLimit=re(this._map.latLngToContainerPoint(d.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(d.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;u.fire("movestart").fire("dragstart"),u.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(u){if(this._map.options.inertia){var d=this._lastTime=+new Date,_=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(_),this._times.push(d),this._prunePositions(d)}this._map.fire("move",u).fire("drag",u)},_prunePositions:function(u){for(;this._positions.length>1&&u-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var u=this._map.getSize().divideBy(2),d=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=d.subtract(u).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(u,d){return u-(u-d)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var u=this._draggable._newPos.subtract(this._draggable._startPos),d=this._offsetLimit;u.xd.max.x&&(u.x=this._viscousLimit(u.x,d.max.x)),u.y>d.max.y&&(u.y=this._viscousLimit(u.y,d.max.y)),this._draggable._newPos=this._draggable._startPos.add(u)}},_onPreDragWrap:function(){var u=this._worldWidth,d=Math.round(u/2),_=this._initialWorldOffset,E=this._draggable._newPos.x,M=(E-d+_)%u+d-_,j=(E+d+_)%u-d-_,J=Math.abs(M+_)0?j:-j))-d;this._delta=0,this._startTime=null,J&&(u.options.scrollWheelZoom==="center"?u.setZoom(d+J):u.setZoomAround(this._lastMousePos,d+J))}});at.addInitHook("addHandler","scrollWheelZoom",aO);var s7=600;at.mergeOptions({tapHold:Ye.touchNative&&Ye.safari&&Ye.mobile,tapTolerance:15});var lO=Ai.extend({addHooks:function(){Xe(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Et(this._map._container,"touchstart",this._onDown,this)},_onDown:function(u){if(clearTimeout(this._holdTimeout),u.touches.length===1){var d=u.touches[0];this._startPos=this._newPos=new Z(d.clientX,d.clientY),this._holdTimeout=setTimeout(s(function(){this._cancel(),this._isTapValid()&&(Xe(document,"touchend",$n),Xe(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",d))},this),s7),Xe(document,"touchend touchcancel contextmenu",this._cancel,this),Xe(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function u(){Et(document,"touchend",$n),Et(document,"touchend touchcancel",u)},_cancel:function(){clearTimeout(this._holdTimeout),Et(document,"touchend touchcancel contextmenu",this._cancel,this),Et(document,"touchmove",this._onMove,this)},_onMove:function(u){var d=u.touches[0];this._newPos=new Z(d.clientX,d.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(u,d){var _=new MouseEvent(u,{bubbles:!0,cancelable:!0,view:window,screenX:d.screenX,screenY:d.screenY,clientX:d.clientX,clientY:d.clientY});_._simulated=!0,d.target.dispatchEvent(_)}});at.addInitHook("addHandler","tapHold",lO),at.mergeOptions({touchZoom:Ye.touch,bounceAtZoomLimits:!0});var cO=Ai.extend({addHooks:function(){Je(this._map._container,"leaflet-touch-zoom"),Xe(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){en(this._map._container,"leaflet-touch-zoom"),Et(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(u){var d=this._map;if(!(!u.touches||u.touches.length!==2||d._animatingZoom||this._zooming)){var _=d.mouseEventToContainerPoint(u.touches[0]),E=d.mouseEventToContainerPoint(u.touches[1]);this._centerPoint=d.getSize()._divideBy(2),this._startLatLng=d.containerPointToLatLng(this._centerPoint),d.options.touchZoom!=="center"&&(this._pinchStartLatLng=d.containerPointToLatLng(_.add(E)._divideBy(2))),this._startDist=_.distanceTo(E),this._startZoom=d.getZoom(),this._moved=!1,this._zooming=!0,d._stop(),Xe(document,"touchmove",this._onTouchMove,this),Xe(document,"touchend touchcancel",this._onTouchEnd,this),$n(u)}},_onTouchMove:function(u){if(!(!u.touches||u.touches.length!==2||!this._zooming)){var d=this._map,_=d.mouseEventToContainerPoint(u.touches[0]),E=d.mouseEventToContainerPoint(u.touches[1]),M=_.distanceTo(E)/this._startDist;if(this._zoom=d.getScaleZoom(M,this._startZoom),!d.options.bounceAtZoomLimits&&(this._zoomd.getMaxZoom()&&M>1)&&(this._zoom=d._limitZoom(this._zoom)),d.options.touchZoom==="center"){if(this._center=this._startLatLng,M===1)return}else{var j=_._add(E)._divideBy(2)._subtract(this._centerPoint);if(M===1&&j.x===0&&j.y===0)return;this._center=d.unproject(d.project(this._pinchStartLatLng,this._zoom).subtract(j),this._zoom)}this._moved||(d._moveStart(!0,!1),this._moved=!0),q(this._animRequest);var J=s(d._move,d,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=Y(J,this,!0),$n(u)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,q(this._animRequest),Et(document,"touchmove",this._onTouchMove,this),Et(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))}});at.addInitHook("addHandler","touchZoom",cO),at.BoxZoom=rO,at.DoubleClickZoom=iO,at.Drag=oO,at.Keyboard=sO,at.ScrollWheelZoom=aO,at.TapHold=lO,at.TouchZoom=cO,n.Bounds=B,n.Browser=Ye,n.CRS=me,n.Canvas=JT,n.Circle=n0,n.CircleMarker=Ph,n.Class=K,n.Control=ui,n.DivIcon=KT,n.DivOverlay=Ii,n.DomEvent=C$,n.DomUtil=x$,n.Draggable=Yo,n.Evented=se,n.FeatureGroup=so,n.GeoJSON=lo,n.GridLayer=bu,n.Handler=Ai,n.Icon=Cl,n.ImageOverlay=Lh,n.LatLng=ne,n.LatLngBounds=W,n.Layer=fi,n.LayerGroup=Sl,n.LineUtil=I$,n.Map=at,n.Marker=Oh,n.Mixin=R$,n.Path=qo,n.Point=Z,n.PolyUtil=F$,n.Polygon=El,n.Polyline=ao,n.Popup=Dh,n.PosAnimation=NT,n.Projection=$$,n.Rectangle=nO,n.Renderer=co,n.SVG=xu,n.SVGOverlay=ZT,n.TileLayer=Ol,n.Tooltip=Ah,n.Transformation=Q,n.Util=ee,n.VideoOverlay=GT,n.bind=s,n.bounds=re,n.canvas=eO,n.circle=Y$,n.circleMarker=W$,n.control=vu,n.divIcon=t7,n.extend=i,n.featureGroup=U$,n.geoJSON=qT,n.geoJson=Z$,n.gridLayer=n7,n.icon=V$,n.imageOverlay=K$,n.latLng=ae,n.latLngBounds=G,n.layerGroup=z$,n.map=E$,n.marker=H$,n.point=I,n.polygon=G$,n.polyline=q$,n.popup=J$,n.rectangle=o7,n.setOptions=v,n.stamp=l,n.svg=tO,n.svgOverlay=Q$,n.tileLayer=XT,n.tooltip=e7,n.transformation=X,n.version=r,n.videoOverlay=X$;var a7=window.L;n.noConflict=function(){return window.L=a7,this},window.L=n})})(V0e,Gs);const DL=Gs;function pT(e,t,n){return Object.freeze({instance:e,context:t,container:n})}function mT(e,t){return t==null?function(r,i){const o=H.useRef();return o.current||(o.current=e(r,i)),o}:function(r,i){const o=H.useRef();o.current||(o.current=e(r,i));const s=H.useRef(r),{instance:a}=o.current;return H.useEffect(function(){s.current!==r&&(t(a,r,s.current),s.current=r)},[a,r,i]),o}}function H0e(e,t){H.useEffect(function(){return(t.layerContainer??t.map).addLayer(e.instance),function(){var o;(o=t.layerContainer)==null||o.removeLayer(e.instance),t.map.removeLayer(e.instance)}},[t,e])}function XF(e){return function(n){const r=ZF(),i=e(hT(n,r),r);return YF(r.map,n.attribution),KF(i.current,n.eventHandlers),H0e(i.current,r),i}}function W0e(e,t){const n=mT(e,t),r=XF(n);return j0e(r)}function Y0e(e,t){const n=mT(e),r=U0e(n,t);return B0e(r)}function q0e(e,t){const n=mT(e,t),r=XF(n);return z0e(r)}function G0e(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 kx(){return kx=Object.assign||function(e){for(var t=1;t(m==null?void 0:m.map)??null,[m]);const v=H.useCallback(y=>{if(y!==null&&m===null){const b=new Gs.Map(y,f);n!=null&&c!=null?b.setView(n,c):e!=null&&b.fitBounds(e,t),l!=null&&b.whenReady(l),g(F0e(b))}},[]);H.useEffect(()=>()=>{m==null||m.map.remove()},[m]);const w=m?V.createElement(GF,{value:m},r):s??null;return V.createElement("div",kx({},p,{ref:v}),w)}const K0e=H.forwardRef(Z0e),X0e=W0e(function({position:t,...n},r){const i=new Gs.Marker(t,n);return pT(i,$0e(r,{overlayContainer:i}))},function(t,n,r){n.position!==r.position&&t.setLatLng(n.position),n.icon!=null&&n.icon!==r.icon&&t.setIcon(n.icon),n.zIndexOffset!=null&&n.zIndexOffset!==r.zIndexOffset&&t.setZIndexOffset(n.zIndexOffset),n.opacity!=null&&n.opacity!==r.opacity&&t.setOpacity(n.opacity),t.dragging!=null&&n.draggable!==r.draggable&&(n.draggable===!0?t.dragging.enable():t.dragging.disable())}),Q0e=Y0e(function(t,n){const r=new Gs.Popup(t,n.overlayContainer);return pT(r,n)},function(t,n,{position:r},i){H.useEffect(function(){const{instance:s}=t;function a(c){c.popup===s&&(s.update(),i(!0))}function l(c){c.popup===s&&i(!1)}return n.map.on({popupopen:a,popupclose:l}),n.overlayContainer==null?(r!=null&&s.setLatLng(r),s.openOn(n.map)):n.overlayContainer.bindPopup(s),function(){var f;n.map.off({popupopen:a,popupclose:l}),(f=n.overlayContainer)==null||f.unbindPopup(),n.map.removeLayer(s)}},[t,n,i,r])}),J0e=q0e(function({url:t,...n},r){const i=new Gs.TileLayer(t,hT(n,r));return pT(i,r)},function(t,n,r){G0e(t,n,r);const{url:i}=n;i!=null&&i!==r.url&&t.setUrl(i)});const ebe=()=>C(J0e,{attribution:'© OpenStreetMap contributors',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),tbe=e=>{if(e.length===0)return{};if(e.length>1)return{bounds:e.map(St("latLong"))};const[{latLong:t}]=e;return{zoom:10,center:t}},QF=({toggle:e,isOpen:t,title:n,locations:r=[]})=>C(Ho,{toggle:e,isOpen:t,className:"map-modal__modal",contentClassName:"map-modal__modal-content",children:U(Ri,{className:"map-modal__modal-body",children:[U("h3",{className:"map-modal__modal-title",children:[n,C("button",{type:"button",className:"btn-close float-end","aria-label":"Close",onClick:e})]}),U(K0e,{...tbe(r),children:[C(ebe,{}),r.map(({cityName:i,latLong:o,count:s},a)=>C(X0e,{position:o,children:U(Q0e,{children:[C("b",{children:s})," visit",s>1?"s":""," from ",C("b",{children:i})]})},a))]})]})});const nbe=({modalTitle:e,activeCities:t,locations:n=[]})=>{const[r,,i,o]=$t(),[s,a,l]=$t(),[c,f]=H.useState([]),h=S_(),p=v=>t?v.filter(({cityName:w})=>t==null?void 0:t.includes(w)):v,m=()=>{if(!t){f(n),i();return}l()},g=v=>()=>{f(v?p(n):n),i()};return U(We,{children:[C(ht,{color:"link",className:"open-map-modal-btn__btn",id:h,onClick:m,children:C(Fe,{icon:t6})}),C(Or,{placement:"left",target:h,children:"Show in map"}),C(ru,{isOpen:s,toggle:a,inNavbar:!0,children:U(gl,{end:!0,children:[C(Ve,{onClick:g(!1),children:"Show all locations"}),C(Ve,{onClick:g(!0),children:"Show locations in current page"})]})}),C(QF,{toggle:o,isOpen:r,title:e,locations:c})]})},rbe=({onChange:e,selected:t={},className:n,isOrphanVisits:r})=>{const{orphanVisitsType:i,excludeBots:o=!1}=t,s=l=>({active:i===l,onClick:()=>e({...t,orphanVisitsType:l===(t==null?void 0:t.orphanVisitsType)?void 0:l})});return U(oa,{text:"Filters",dropdownClassName:n,className:"me-3",right:!0,minWidth:250,children:[C(Ve,{header:!0,children:"Bots:"}),C(Ve,{active:o,onClick:()=>e({...t,excludeBots:!(t!=null&&t.excludeBots)}),children:"Exclude potential bots"}),r&&U(We,{children:[C(Ve,{divider:!0}),C(Ve,{header:!0,children:"Orphan visits type:"}),C(Ve,{...s("base_url"),children:"Base URL"}),C(Ve,{...s("invalid_short_url"),children:"Invalid short URL"}),C(Ve,{...s("regular_404"),children:"Regular 404"})]}),C(Ve,{divider:!0}),C(Ve,{disabled:!yi(t),onClick:()=>e({excludeBots:!1,orphanVisitsType:void 0}),children:C("i",{children:"Clear filters"})})]})},JF=(e,t)=>!Bo(e)&&yi(e[t]),AL=e=>typeof e=="number"?e:e?parseFloat(e):0,ibe=(e,{os:t})=>{e[t]=(e[t]||0)+1},obe=(e,{browser:t})=>{e[t]=(e[t]||0)+1},sbe=(e,{referer:t})=>{e[t]=(e[t]||0)+1},e$=e=>(t,n)=>{const i=JF(n,e)?n[e]:"Unknown";t[i]=(t[i]||0)+1},abe=e$("country"),lbe=e$("city"),cbe=(e,t)=>{if(!JF(t,"city")||t.city==="Unknown")return;const{city:n,latitude:r,longitude:i}=t,o=e[n]||{cityName:n,count:0,latLong:[AL(r),AL(i)]};o.count+=1,e[n]=o},ube=(e,t)=>{if(!Z_e(t))return;const{visitedUrl:n}=t;e[n]=(e[n]||0)+1},t$=e=>e.reduce((t,n)=>(ibe(t.os,n),obe(t.browsers,n),sbe(t.referrers,n),abe(t.countries,n),lbe(t.cities,n),cbe(t.citiesForMap,n),ube(t.visitedUrls,n),t),{os:{},browsers:{},referrers:{},countries:{},cities:{},citiesForMap:{},visitedUrls:{}}),n$=rC(e=>{const{userAgent:t,date:n,referer:r,visitLocation:i,potentialBot:o}=e,s={date:n,potentialBot:o,...g0e(t),referer:v0e(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 cT(e)?{...s,type:e.type,visitedUrl:e.visitedUrl}:s}),fbe=Object.freeze(Object.defineProperty({__proto__:null,normalizeVisits:n$,processStatsFromVisits:t$},Symbol.toStringTag,{value:"Module"}));const of=20,dbe=({browser:e,os:t,referer:n,country:r,city:i,...o},s)=>`${e} ${t} ${n} ${r} ${i} ${o.visitedUrl}`.toLowerCase().includes(s.toLowerCase()),hbe=(e,t)=>t.filter(n=>dbe(n,e)),pbe=(e,t)=>II(t,e),mbe=(e,t,n)=>{const r=t?hbe(t,e):[...e],i=pbe(n,r),o=i.length;return{visitsGroups:dd(of,i),total:o}},gbe=({visits:e,selectedVisits:t=[],setSelectedVisits:n,matchMedia:r=window.matchMedia,isOrphanVisits:i=!1})=>{var k,N;const o="visits-table__header-cell visits-table__sticky",s=()=>r("(max-width: 767px)").matches,[a,l]=H.useState(s()),[c,f]=H.useState(void 0),[h,p]=H.useState({}),m=H.useMemo(()=>mbe(e,c,h),[c,h]),g=H.useRef(!0),[v,w]=H.useState(1),y=v*of,b=y-of,x=8+Number(i),T=D=>()=>p({field:D,dir:o_(D,h.field,h.dir)}),P=D=>C(Af,{currentOrder:h,field:D,className:"visits-table__header-icon"});return H.useEffect(()=>{const D=()=>l(s());return window.addEventListener("resize",D),()=>window.removeEventListener("resize",D)},[]),H.useEffect(()=>{w(1),!g.current&&n([]),g.current=!1},[c]),C("div",{className:"table-responsive-md",children:U("table",{className:"table table-bordered table-hover table-sm visits-table",children:[U("thead",{className:"visits-table__header",children:[U("tr",{children:[C("th",{className:`${o} text-center`,onClick:()=>n(t.length0})})}),U("th",{className:`${o} text-center`,onClick:T("potentialBot"),children:[C(Fe,{icon:MM}),P("potentialBot")]}),U("th",{className:o,onClick:T("date"),children:["Date",P("date")]}),U("th",{className:o,onClick:T("country"),children:["Country",P("country")]}),U("th",{className:o,onClick:T("city"),children:["City",P("city")]}),U("th",{className:o,onClick:T("browser"),children:["Browser",P("browser")]}),U("th",{className:o,onClick:T("os"),children:["OS",P("os")]}),U("th",{className:o,onClick:T("referer"),children:["Referrer",P("referer")]}),i&&U("th",{className:o,onClick:T("visitedUrl"),children:["Visited URL",P("visitedUrl")]})]}),C("tr",{children:C("td",{colSpan:x,className:"p-0",children:C(sh,{noBorder:!0,large:!1,onChange:f})})})]}),U("tbody",{children:[!((k=m.visitsGroups[v-1])!=null&&k.length)&&C("tr",{children:C("td",{colSpan:x,className:"text-center",children:"No visits found with current filtering"})}),(N=m.visitsGroups[v-1])==null?void 0:N.map((D,z)=>{const A=t.includes(D);return U("tr",{style:{cursor:"pointer"},className:ge({"table-active":A}),onClick:()=>n(A?t.filter(Y=>Y!==D):[...t,D]),children:[C("td",{className:"text-center",children:A&&C(Fe,{icon:pd,className:"text-primary"})}),C("td",{className:"text-center",children:D.potentialBot&&U(We,{children:[C(Fe,{icon:MM,id:`botIcon${z}`}),C(Or,{placement:"right",target:`botIcon${z}`,children:"Potentially a visit from a bot or crawler"})]})}),C("td",{children:C(iy,{date:D.date})}),C("td",{children:D.country}),C("td",{children:D.city}),C("td",{children:D.browser}),C("td",{children:D.os}),C("td",{children:D.referer}),i&&C("td",{children:D.visitedUrl})]},z)})]}),m.total>of&&C("tfoot",{children:C("tr",{children:C("td",{colSpan:x,className:"visits-table__footer-cell visits-table__sticky",children:U("div",{className:"row",children:[C("div",{className:"col-md-6",children:C(rT,{pagesCount:Math.ceil(m.total/of),currentPage:v,setCurrentPage:w,centered:a})}),C("div",{className:ge("col-md-6",{"d-flex align-items-center flex-row-reverse":!a,"text-center mt-3":a}),children:U("div",{children:["Visits ",C("b",{children:bn(b+1)})," to"," ",C("b",{children:bn(DI(y,m.total))})," of"," ",C("b",{children:bn(m.total)})]})})]})})})})]})})},zl={byTime:{title:"By time",subPath:"by-time",icon:HX},byContext:{title:"By context",subPath:"by-context",icon:wC},byLocation:{title:"By location",subPath:"by-location",icon:t6},list:{title:"List",subPath:"list",icon:e6}};let Bp;const gh=({children:e,visitsInfo:t,getVisits:n,cancelGetVisits:r,settings:i,exportCsv:o,isOrphanVisits:s=!1})=>{var W;const{visits:a,loading:l,loadingLarge:c,error:f,errorData:h,progress:p,fallbackInterval:m}=t,[{dateRange:g,visitsFilter:v},w]=A0e(),y=Wn(({startDate:G,endDate:ne})=>({dateRange:{startDate:G??void 0,endDate:ne??void 0}}),w),b=H.useRef(g??m??((W=i.visits)==null?void 0:W.defaultInterval)??"last30Days"),[x,T]=H.useState([]),[P,k]=H.useState(),N=H.useRef(!0),{search:D}=kn(),z=G=>G?`${G}${D}`:D,A=H.useMemo(()=>n$(a),[a]),{os:Y,browsers:q,referrers:ee,countries:K,cities:te,citiesForMap:oe,visitedUrls:se}=H.useMemo(()=>t$(A),[A]),Z=H.useMemo(()=>{var G;return{...v,excludeBots:v.excludeBots??((G=i.visits)==null?void 0:G.excludeBots)}},[v]),$=i_(oe),I=G=>{Bp=void 0,T(G)},B=G=>ne=>{const ae=`${G}_${ne}`;Bp===ae?(T([]),k(void 0),Bp=void 0):(T(A.filter(wZ(G,ne))),k(ne),Bp=ae)};H.useEffect(()=>r,[]),H.useEffect(()=>{const G=N.current?g??epe(b.current):g;n({dateRange:G,filter:Z},N.current),N.current=!1},[g,v]),H.useEffect(()=>{var G;m&&b.current===(((G=i.visits)==null?void 0:G.defaultInterval)??"last30Days")&&(b.current=m)},[m]);const re=()=>c?U(Eo,{loading:!0,children:["This is going to take a while... :S",C(aE,{value:p,striped:p===100,className:"mt-3"})]}):l?C(Eo,{loading:!0}):f?C(Dr,{type:"error",children:C(Ao,{errorData:h,fallbackMessage:"An error occurred while loading visits :("})}):Cr(a)?C(Eo,{children:"There are no visits matching current filter"}):U(We,{children:[C(z8,{fill:!0,children:Object.values(zl).map(({title:G,icon:ne,subPath:ae},me)=>U(Lf,{to:z(ae),replace:!0,children:[C(Fe,{icon:ne}),C("span",{className:"ms-2 d-none d-sm-inline",children:G})]},me))}),C(Jn,{children:U(Qy,{children:[C(gt,{path:zl.byTime.subPath,element:C("div",{className:"col-12 mt-3",children:C(E0e,{title:"Visits during time",visits:A,highlightedVisits:x,highlightedLabel:P,setSelectedVisits:I})})}),C(gt,{path:zl.byContext.subPath,element:U(We,{children:[C("div",{className:ge("mt-3 col-lg-6",{"col-xl-4":!s}),children:C(OL,{title:"Operating systems",stats:Y})}),C("div",{className:ge("mt-3 col-lg-6",{"col-xl-4":!s}),children:C(OL,{title:"Browsers",stats:q})}),C("div",{className:ge("mt-3",{"col-xl-4":!s,"col-lg-6":s}),children:C(jp,{title:"Referrers",stats:ee,withPagination:!1,highlightedStats:Fp(x,"referer"),highlightedLabel:P,sortingItems:{name:"Referrer name",amount:"Visits amount"},onClick:B("referer")})}),s&&C("div",{className:"mt-3 col-lg-6",children:C(jp,{title:"Visited URLs",stats:se,highlightedLabel:P,highlightedStats:Fp(x,"visitedUrl"),sortingItems:{visitedUrl:"Visited URL",amount:"Visits amount"},onClick:B("visitedUrl")})})]})}),C(gt,{path:zl.byLocation.subPath,element:U(We,{children:[C("div",{className:"col-lg-6 mt-3",children:C(jp,{title:"Countries",stats:K,highlightedStats:Fp(x,"country"),highlightedLabel:P,sortingItems:{name:"Country name",amount:"Visits amount"},onClick:B("country")})}),C("div",{className:"col-lg-6 mt-3",children:C(jp,{title:"Cities",stats:te,highlightedStats:Fp(x,"city"),highlightedLabel:P,extraHeaderContent:G=>$.length>0&&C(nbe,{modalTitle:"Cities",locations:$,activeCities:G}),sortingItems:{name:"City name",amount:"Visits amount"},onClick:B("city")})})]})}),C(gt,{path:zl.list.subPath,element:C("div",{className:"col-12",children:C(gbe,{visits:A,selectedVisits:x,setSelectedVisits:I,isOrphanVisits:s})})}),C(gt,{path:"*",element:C(KS,{replace:!0,to:z(zl.byTime.subPath)})})]})})]});return U(We,{children:[e,C("section",{className:"mt-3",children:U("div",{className:"row flex-md-row-reverse",children:[C("div",{className:"col-lg-7 col-xl-6",children:U("div",{className:"d-md-flex",children:[C("div",{className:"flex-fill",children:C(mF,{updatable:!0,disabled:l,initialDateRange:b.current,defaultText:"All visits",onDatesChange:y})}),C(rbe,{className:"ms-0 ms-md-2 mt-3 mt-md-0",isOrphanVisits:s,selected:Z,onChange:G=>w({visitsFilter:G})})]})}),a.length>0&&C("div",{className:"col-lg-5 col-xl-6 mt-3 mt-lg-0",children:U("div",{className:"d-flex",children:[C(Z8,{className:"btn-md-block",amount:A.length,onClick:()=>o(A)}),U(ht,{outline:!0,disabled:x.length===0,className:"btn-md-block ms-2",onClick:()=>I([]),children:["Clear selection ",x.length>0&&U(We,{children:["(",bn(x.length),")"]})]})]})})]})}),C("section",{className:"mt-3",children:re()})]})},vbe=({exportVisits:e})=>sa(({getDomainVisits:t,domainVisits:n,cancelGetDomainVisits:r,settings:i})=>{const o=ia(),{domain:s=""}=Js(),[a,l=a]=s.split("_");return C(gh,{getVisits:(h,p)=>t({domain:l,query:ph(h),doIntervalFallback:p}),cancelGetVisits:r,visitsInfo:n,settings:i,exportCsv:h=>e(`domain_${a}_visits.csv`,h),children:C(mh,{goBack:o,visits:n.visits,title:`"${a}" visits`})})},()=>[Jr.visits]),ybe=({exportVisits:e})=>sa(({getNonOrphanVisits:t,nonOrphanVisits:n,cancelGetNonOrphanVisits:r,settings:i})=>{const o=ia();return C(gh,{getVisits:(l,c)=>t({query:ph(l),doIntervalFallback:c}),cancelGetVisits:r,visitsInfo:n,settings:i,exportCsv:l=>e("non_orphan_visits.csv",l),children:C(mh,{title:"Non-orphan visits",goBack:o,visits:n.visits})})},()=>[Jr.visits]),_be=({exportVisits:e})=>sa(({getOrphanVisits:t,orphanVisits:n,cancelGetOrphanVisits:r,settings:i})=>{const o=ia();return C(gh,{getVisits:(l,c)=>{var f;return t({query:ph(l),orphanVisitsType:(f=l.filter)==null?void 0:f.orphanVisitsType,doIntervalFallback:c})},cancelGetVisits:r,visitsInfo:n,settings:i,exportCsv:l=>e("orphan_visits.csv",l),isOrphanVisits:!0,children:C(mh,{title:"Orphan visits",goBack:o,visits:n.visits})})},()=>[Jr.orphanVisits]),r$="shlink/orphanVisits",bbe={visits:[],loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},wbe=e=>uh({typePrefix:`${r$}/getNonOrphanVisits`,createLoaders:({query:t={},doIntervalFallback:n=!1},r)=>{const{getNonOrphanVisits:i}=e(r),o=async(a,l)=>i({...t,page:a,itemsPerPage:l}),s=fh(n,i);return[o,s]},getExtraFulfilledPayload:({query:t={}})=>({query:t}),shouldCancel:t=>t().orphanVisits.cancelLoad}),xbe=e=>dh({name:r$,initialState:bbe,asyncThunkCreator:e,filterCreatedVisits:({query:t={}},n)=>{const{startDate:r,endDate:i}=t;return n.filter(({visit:o})=>ah(o.date,r,i))}}),i$="shlink/orphanVisits",Sbe={visits:[],loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},Cbe=(e,t)=>!t||t===e.type,Ebe=e=>uh({typePrefix:`${i$}/getOrphanVisits`,createLoaders:({orphanVisitsType:t,query:n={},doIntervalFallback:r=!1},i)=>{const{getOrphanVisits:o}=e(i),s=async(l,c)=>o({...n,page:l,itemsPerPage:c}).then(f=>{const h=f.data.filter(p=>cT(p)&&Cbe(p,t));return{...f,data:h}}),a=fh(r,o);return[s,a]},getExtraFulfilledPayload:({query:t={}})=>({query:t}),shouldCancel:t=>t().orphanVisits.cancelLoad}),Tbe=e=>dh({name:i$,initialState:Sbe,asyncThunkCreator:e,filterCreatedVisits:({query:t={}},n)=>{const{startDate:r,endDate:i}=t;return n.filter(({visit:o,shortUrl:s})=>!s&&ah(o.date,r,i))}}),o$="shlink/shortUrlVisits",Obe={visits:[],shortCode:"",domain:void 0,loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},Pbe=e=>uh({typePrefix:`${o$}/getShortUrlVisits`,createLoaders:({shortCode:t,query:n={},doIntervalFallback:r=!1},i)=>{const{getShortUrlVisits:o}=e(i),s=async(l,c)=>o(t,{...n,page:l,itemsPerPage:c}),a=fh(r,async l=>o(t,{...l,domain:n.domain}));return[s,a]},getExtraFulfilledPayload:({shortCode:t,query:n={}})=>({shortCode:t,query:n,domain:n.domain}),shouldCancel:t=>t().shortUrlVisits.cancelLoad}),kbe=e=>dh({name:o$,initialState:Obe,asyncThunkCreator:e,filterCreatedVisits:({shortCode:t,domain:n,query:r={}},i)=>{const{startDate:o,endDate:s}=r;return i.filter(({shortUrl:a,visit:l})=>a&&kf(a,t,n)&&ah(l.date,o,s))}}),s$="shlink/tagVisits",Mbe={visits:[],tag:"",loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},Rbe=e=>uh({typePrefix:`${s$}/getTagVisits`,createLoaders:({tag:t,query:n={},doIntervalFallback:r=!1},i)=>{const{getTagVisits:o}=e(i),s=async(l,c)=>o(t,{...n,page:l,itemsPerPage:c}),a=fh(r,async l=>o(t,l));return[s,a]},getExtraFulfilledPayload:({tag:t,query:n={}})=>({tag:t,query:n}),shouldCancel:t=>t().tagVisits.cancelLoad}),Nbe=e=>dh({name:s$,initialState:Mbe,asyncThunkCreator:e,filterCreatedVisits:({tag:t,query:n={}},r)=>{const{startDate:i,endDate:o}=n;return r.filter(({shortUrl:s,visit:a})=>(s==null?void 0:s.tags.includes(t))&&ah(a.date,i,o))}}),a$="shlink/visitsOverview",zp={nonOrphanVisits:{total:0},orphanVisits:{total:0},loading:!1,error:!1},IL=e=>e.filter(({visit:t})=>t.potentialBot).length,Lbe=e=>ir(`${a$}/loadVisitsOverview`,(t,{getState:n})=>e(n).getVisitsOverview().then(r=>{var i,o,s,a,l,c;return{nonOrphanVisits:{total:((i=r.nonOrphanVisits)==null?void 0:i.total)??r.visitsCount,nonBots:(o=r.nonOrphanVisits)==null?void 0:o.nonBots,bots:(s=r.nonOrphanVisits)==null?void 0:s.bots},orphanVisits:{total:((a=r.orphanVisits)==null?void 0:a.total)??r.orphanVisitsCount,nonBots:(l=r.orphanVisits)==null?void 0:l.nonBots,bots:(c=r.orphanVisits)==null?void 0:c.bots}}})),Dbe=e=>qn({name:a$,initialState:zp,reducers:{},extraReducers:t=>{t.addCase(e.pending,()=>({...zp,loading:!0})),t.addCase(e.rejected,()=>({...zp,error:!0})),t.addCase(e.fulfilled,(n,{payload:r})=>({...zp,...r})),t.addCase(ch,({nonOrphanVisits:n,orphanVisits:r,...i},{payload:o})=>{const{nonOrphanVisits:s,orphanVisits:a}=K_e(o.createdVisits),l=s.length,c=IL(s),f=l-c,h=a.length,p=IL(a),m=h-p;return{...i,nonOrphanVisits:{total:n.total+l,bots:n.bots&&n.bots+c,nonBots:n.nonBots&&n.nonBots+f},orphanVisits:{total:r.total+h,bots:r.bots&&r.bots+p,nonBots:r.nonBots&&r.nonBots+m}}})}});const Abe=({shortUrlDetail:e,shortUrlVisits:t,goBack:n})=>{const{shortUrl:r,loading:i}=e,{visits:o}=t,s=(r==null?void 0:r.shortUrl)??"",a=(r==null?void 0:r.longUrl)??"",l=r==null?void 0:r.title;return U(mh,{title:U(We,{children:["Visits for ",C(Ei,{href:s})]}),goBack:n,visits:o,shortUrl:r,children:[C("hr",{}),U("div",{children:["Created: ",(()=>r?U("span",{children:[C("b",{id:"created",className:"short-url-visits-header__created-at",children:C(iy,{date:r.dateCreated,relative:!0})}),C(Or,{placement:"bottom",target:"created",children:C(iy,{date:r.dateCreated})})]}):C("small",{children:"Loading..."}))()]}),U("div",{className:"long-url-container",children:[`${l?"Title":"Long URL"}: `,i&&C("small",{children:"Loading..."}),!i&&C(Ei,{href:a,children:l??a})]})]})},Ibe=({exportVisits:e})=>sa(({shortUrlVisits:t,shortUrlDetail:n,getShortUrlVisits:r,getShortUrlDetail:i,cancelGetShortUrlVisits:o,settings:s})=>{const{shortCode:a=""}=Js(),{search:l}=kn(),c=ia(),{domain:f}=ml(l),h=(m,g)=>r({shortCode:mm(a),query:{...ph(m),domain:f},doIntervalFallback:g}),p=m=>{var g;return e(`short-url_${(g=n.shortUrl)==null?void 0:g.shortUrl.replace(/https?:\/\//g,"")}_visits.csv`,m)};return H.useEffect(()=>{i({shortCode:mm(a),domain:f})},[]),C(gh,{getVisits:h,cancelGetVisits:o,visitsInfo:t,settings:s,exportCsv:p,children:C(Abe,{shortUrlDetail:n,shortUrlVisits:t,goBack:c})})},(t,n)=>n.shortCode?[Jr.shortUrlVisits(mm(n.shortCode))]:[]),Fbe=({tagVisits:e,goBack:t,colorGenerator:n})=>{const{visits:r,tag:i}=e;return C(mh,{title:U("span",{className:"d-flex align-items-center justify-content-center",children:[C("span",{className:"me-2",children:"Visits for"}),C(ZE,{text:i,colorGenerator:n})]}),goBack:t,visits:r})},$be=(e,{exportVisits:t})=>sa(({getTagVisits:n,tagVisits:r,cancelGetTagVisits:i,settings:o})=>{const s=ia(),{tag:a=""}=Js();return C(gh,{getVisits:(f,h)=>n({tag:a,query:ph(f),doIntervalFallback:h}),cancelGetVisits:i,visitsInfo:r,settings:o,exportCsv:f=>t(`tag_${a}_visits.csv`,f),children:C(Fbe,{tagVisits:r,goBack:s,colorGenerator:e})})},()=>[Jr.visits]),jbe=(e,t)=>{e.serviceFactory("MapModal",()=>QF),e.serviceFactory("ShortUrlVisits",Ibe,"ReportExporter"),e.decorator("ShortUrlVisits",t(["shortUrlVisits","shortUrlDetail","mercureInfo","settings"],["getShortUrlVisits","getShortUrlDetail","cancelGetShortUrlVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("TagVisits",$be,"ColorGenerator","ReportExporter"),e.decorator("TagVisits",t(["tagVisits","mercureInfo","settings"],["getTagVisits","cancelGetTagVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("DomainVisits",vbe,"ReportExporter"),e.decorator("DomainVisits",t(["domainVisits","mercureInfo","settings"],["getDomainVisits","cancelGetDomainVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("OrphanVisits",_be,"ReportExporter"),e.decorator("OrphanVisits",t(["orphanVisits","mercureInfo","settings"],["getOrphanVisits","cancelGetOrphanVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("NonOrphanVisits",ybe,"ReportExporter"),e.decorator("NonOrphanVisits",t(["nonOrphanVisits","mercureInfo","settings"],["getNonOrphanVisits","cancelGetNonOrphanVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("VisitsParser",()=>fbe),e.serviceFactory("getShortUrlVisits",Pbe,"buildShlinkApiClient"),e.serviceFactory("cancelGetShortUrlVisits",St("cancelGetVisits"),"shortUrlVisitsReducerCreator"),e.serviceFactory("getTagVisits",Rbe,"buildShlinkApiClient"),e.serviceFactory("cancelGetTagVisits",St("cancelGetVisits"),"tagVisitsReducerCreator"),e.serviceFactory("getDomainVisits",ipe,"buildShlinkApiClient"),e.serviceFactory("cancelGetDomainVisits",St("cancelGetVisits"),"domainVisitsReducerCreator"),e.serviceFactory("getOrphanVisits",Ebe,"buildShlinkApiClient"),e.serviceFactory("cancelGetOrphanVisits",St("cancelGetVisits"),"orphanVisitsReducerCreator"),e.serviceFactory("getNonOrphanVisits",wbe,"buildShlinkApiClient"),e.serviceFactory("cancelGetNonOrphanVisits",St("cancelGetVisits"),"nonOrphanVisitsReducerCreator"),e.serviceFactory("createNewVisits",()=>ch),e.serviceFactory("loadVisitsOverview",Lbe,"buildShlinkApiClient"),e.serviceFactory("visitsOverviewReducerCreator",Dbe,"loadVisitsOverview"),e.serviceFactory("visitsOverviewReducer",St("reducer"),"visitsOverviewReducerCreator"),e.serviceFactory("domainVisitsReducerCreator",ope,"getDomainVisits"),e.serviceFactory("domainVisitsReducer",St("reducer"),"domainVisitsReducerCreator"),e.serviceFactory("nonOrphanVisitsReducerCreator",xbe,"getNonOrphanVisits"),e.serviceFactory("nonOrphanVisitsReducer",St("reducer"),"nonOrphanVisitsReducerCreator"),e.serviceFactory("orphanVisitsReducerCreator",Tbe,"getOrphanVisits"),e.serviceFactory("orphanVisitsReducer",St("reducer"),"orphanVisitsReducerCreator"),e.serviceFactory("shortUrlVisitsReducerCreator",kbe,"getShortUrlVisits"),e.serviceFactory("shortUrlVisitsReducer",St("reducer"),"shortUrlVisitsReducerCreator"),e.serviceFactory("tagVisitsReducerCreator",Nbe,"getTagVisits"),e.serviceFactory("tagVisitsReducer",St("reducer"),"tagVisitsReducerCreator")},ai=new Rq,{container:gT}=ai,Bbe=(e,t)=>(...n)=>e[t](...n),zbe=(e,t)=>({...e,[t]:Bbe(gT,t)}),aa=(e,t=[])=>QW(e?Fq(e):null,t.reduce(zbe,{}));Bse(ai,aa);Sae(ai,aa);zX(ai);Ave(ai,aa);ume(ai,aa);Mye(ai,aa);jbe(ai,aa);G_e(ai);_pe(ai);Lme(ai,aa);gpe(ai,aa);var vT={},sy={},Ube={get exports(){return sy},set exports(e){sy=e}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isPlainObject=t.clone=t.recursive=t.merge=t.main=void 0,e.exports=t=n,t.default=n;function n(){for(var c=[],f=0;f$.length)&&(I=$.length);for(var B=0,re=Array(I);BI5({servers:tme,selectedServer:e.selectedServerReducer,shortUrlsList:e.shortUrlsListReducer,shortUrlCreation:e.shortUrlCreationReducer,shortUrlDeletion:e.shortUrlDeletionReducer,shortUrlEdition:e.shortUrlEditionReducer,shortUrlDetail:e.shortUrlDetailReducer,shortUrlVisits:e.shortUrlVisitsReducer,tagVisits:e.tagVisitsReducer,domainVisits:e.domainVisitsReducer,orphanVisits:e.orphanVisitsReducer,nonOrphanVisits:e.nonOrphanVisitsReducer,tagsList:e.tagsListReducer,tagDelete:e.tagDeleteReducer,tagEdit:e.tagEditReducer,mercureInfo:e.mercureInfoReducer,settings:Cme,domainsList:e.domainsListReducer,visitsOverview:e.visitsOverviewReducer,appUpdated:jse,sidebar:pae}),Hbe=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},Wbe=!0,l$={states:["settings","servers"],namespace:"shlink",namespaceSeparator:".",debounce:300},Ybe=Hbe(vT.load(l$)),qbe=e=>cse({devTools:!Wbe,reducer:Vbe(e),preloadedState:Ybe,middleware:t=>t({immutableCheck:!1,serializableCheck:!1}).prepend(e.selectServerListener.middleware).concat(vT.save(l$))}),Gbe=!!(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 Zbe(e){if("serviceWorker"in navigator){if(new URL(Hg.homepage,window.location.href).origin!==window.location.origin)return;window.addEventListener("load",()=>{const n=`${Hg.homepage}/service-worker.js`;Gbe?(Kbe(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")})):c$(n,e)})}}function c$(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 Kbe(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()})}):c$(e,t)}).catch(()=>{console.log("No internet connection found. App is running in offline mode.")})}const Xbe="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=",Qbe="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==",Jbe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC",e1e=()=>{delete DL.Icon.Default.prototype._getIconUrl,DL.Icon.Default.mergeOptions({iconRetinaUrl:Qbe,iconUrl:Xbe,shadowUrl:Jbe})};e1e();const u$=qbe(gT),{App:t1e,ScrollToTop:n1e,ErrorHandler:r1e,appUpdateAvailable:i1e}=gT;H4(document.getElementById("root")).render(C(JW,{store:u$,children:C(tq,{basename:Hg.homepage,children:C(r1e,{children:C(n1e,{children:C(t1e,{})})})})}));Zbe({onUpdate(){u$.dispatch(i1e())}}); + */(function(e,t){(function(n,r){r(t)})(Wl,function(n){var r="1.9.3";function i(u){var d,_,E,M;for(_=1,E=arguments.length;_"u"||!L||!L.Mixin)){u=x(u)?u:[u];for(var d=0;d0?Math.floor(u):Math.ceil(u)};Z.prototype={clone:function(){return new Z(this.x,this.y)},add:function(u){return this.clone()._add(I(u))},_add:function(u){return this.x+=u.x,this.y+=u.y,this},subtract:function(u){return this.clone()._subtract(I(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 Z(this.x*u.x,this.y*u.y)},unscaleBy:function(u){return new Z(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=$(this.x),this.y=$(this.y),this},distanceTo:function(u){u=I(u);var d=u.x-this.x,_=u.y-this.y;return Math.sqrt(d*d+_*_)},equals:function(u){return u=I(u),u.x===this.x&&u.y===this.y},contains:function(u){return u=I(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 I(u,d,_){return u instanceof Z?u:x(u)?new Z(u[0],u[1]):u==null?u:typeof u=="object"&&"x"in u&&"y"in u?new Z(u.x,u.y):new Z(u,d,_)}function B(u,d){if(u)for(var _=d?[u,d]:u,E=0,M=_.length;E=this.min.x&&_.x<=this.max.x&&d.y>=this.min.y&&_.y<=this.max.y},intersects:function(u){u=re(u);var d=this.min,_=this.max,E=u.min,M=u.max,j=M.x>=d.x&&E.x<=_.x,J=M.y>=d.y&&E.y<=_.y;return j&&J},overlaps:function(u){u=re(u);var d=this.min,_=this.max,E=u.min,M=u.max,j=M.x>d.x&&E.x<_.x,J=M.y>d.y&&E.y<_.y;return j&&J},isValid:function(){return!!(this.min&&this.max)},pad:function(u){var d=this.min,_=this.max,E=Math.abs(d.x-_.x)*u,M=Math.abs(d.y-_.y)*u;return re(I(d.x-E,d.y-M),I(_.x+E,_.y+M))},equals:function(u){return u?(u=re(u),this.min.equals(u.getTopLeft())&&this.max.equals(u.getBottomRight())):!1}};function re(u,d){return!u||u instanceof B?u:new B(u,d)}function W(u,d){if(u)for(var _=d?[u,d]:u,E=0,M=_.length;E=d.lat&&M.lat<=_.lat&&E.lng>=d.lng&&M.lng<=_.lng},intersects:function(u){u=G(u);var d=this._southWest,_=this._northEast,E=u.getSouthWest(),M=u.getNorthEast(),j=M.lat>=d.lat&&E.lat<=_.lat,J=M.lng>=d.lng&&E.lng<=_.lng;return j&&J},overlaps:function(u){u=G(u);var d=this._southWest,_=this._northEast,E=u.getSouthWest(),M=u.getNorthEast(),j=M.lat>d.lat&&E.lat<_.lat,J=M.lng>d.lng&&E.lng<_.lng;return j&&J},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(u,d){return u?(u=G(u),this._southWest.equals(u.getSouthWest(),d)&&this._northEast.equals(u.getNorthEast(),d)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function G(u,d){return u instanceof W?u:new W(u,d)}function ne(u,d,_){if(isNaN(u)||isNaN(d))throw new Error("Invalid LatLng object: ("+u+", "+d+")");this.lat=+u,this.lng=+d,_!==void 0&&(this.alt=+_)}ne.prototype={equals:function(u,d){if(!u)return!1;u=ae(u);var _=Math.max(Math.abs(this.lat-u.lat),Math.abs(this.lng-u.lng));return _<=(d===void 0?1e-9:d)},toString:function(u){return"LatLng("+p(this.lat,u)+", "+p(this.lng,u)+")"},distanceTo:function(u){return O.distance(this,ae(u))},wrap:function(){return O.wrapLatLng(this)},toBounds:function(u){var d=180*u/40075017,_=d/Math.cos(Math.PI/180*this.lat);return G([this.lat-d,this.lng-_],[this.lat+d,this.lng+_])},clone:function(){return new ne(this.lat,this.lng,this.alt)}};function ae(u,d,_){return u instanceof ne?u:x(u)&&typeof u[0]!="object"?u.length===3?new ne(u[0],u[1],u[2]):u.length===2?new ne(u[0],u[1]):null:u==null?u:typeof u=="object"&&"lat"in u?new ne(u.lat,"lng"in u?u.lng:u.lon,u.alt):d===void 0?null:new ne(u,d,_)}var me={latLngToPoint:function(u,d){var _=this.projection.project(u),E=this.scale(d);return this.transformation._transform(_,E)},pointToLatLng:function(u,d){var _=this.scale(d),E=this.transformation.untransform(u,_);return this.projection.unproject(E)},project:function(u){return this.projection.project(u)},unproject:function(u){return this.projection.unproject(u)},scale:function(u){return 256*Math.pow(2,u)},zoom:function(u){return Math.log(u/256)/Math.LN2},getProjectedBounds:function(u){if(this.infinite)return null;var d=this.projection.bounds,_=this.scale(u),E=this.transformation.transform(d.min,_),M=this.transformation.transform(d.max,_);return new B(E,M)},infinite:!1,wrapLatLng:function(u){var d=this.wrapLng?f(u.lng,this.wrapLng,!0):u.lng,_=this.wrapLat?f(u.lat,this.wrapLat,!0):u.lat,E=u.alt;return new ne(_,d,E)},wrapLatLngBounds:function(u){var d=u.getCenter(),_=this.wrapLatLng(d),E=d.lat-_.lat,M=d.lng-_.lng;if(E===0&&M===0)return u;var j=u.getSouthWest(),J=u.getNorthEast(),de=new ne(j.lat-E,j.lng-M),pe=new ne(J.lat-E,J.lng-M);return new W(de,pe)}},O=i({},me,{wrapLng:[-180,180],R:6371e3,distance:function(u,d){var _=Math.PI/180,E=u.lat*_,M=d.lat*_,j=Math.sin((d.lat-u.lat)*_/2),J=Math.sin((d.lng-u.lng)*_/2),de=j*j+Math.cos(E)*Math.cos(M)*J*J,pe=2*Math.atan2(Math.sqrt(de),Math.sqrt(1-de));return this.R*pe}}),R=6378137,F={R,MAX_LATITUDE:85.0511287798,project:function(u){var d=Math.PI/180,_=this.MAX_LATITUDE,E=Math.max(Math.min(_,u.lat),-_),M=Math.sin(E*d);return new Z(this.R*u.lng*d,this.R*Math.log((1+M)/(1-M))/2)},unproject:function(u){var d=180/Math.PI;return new ne((2*Math.atan(Math.exp(u.y/this.R))-Math.PI/2)*d,u.x*d/this.R)},bounds:function(){var u=R*Math.PI;return new B([-u,-u],[u,u])}()};function Q(u,d,_,E){if(x(u)){this._a=u[0],this._b=u[1],this._c=u[2],this._d=u[3];return}this._a=u,this._b=d,this._c=_,this._d=E}Q.prototype={transform:function(u,d){return this._transform(u.clone(),d)},_transform:function(u,d){return d=d||1,u.x=d*(this._a*u.x+this._b),u.y=d*(this._c*u.y+this._d),u},untransform:function(u,d){return d=d||1,new Z((u.x/d-this._b)/this._a,(u.y/d-this._d)/this._c)}};function X(u,d,_,E){return new Q(u,d,_,E)}var le=i({},O,{code:"EPSG:3857",projection:F,transformation:function(){var u=.5/(Math.PI*F.R);return X(u,.5,-u,.5)}()}),ve=i({},le,{code:"EPSG:900913"});function De(u){return document.createElementNS("http://www.w3.org/2000/svg",u)}function fe(u,d){var _="",E,M,j,J,de,pe;for(E=0,j=u.length;E1,Jt=function(){var u=!1;try{var d=Object.defineProperty({},"passive",{get:function(){u=!0}});window.addEventListener("testPassiveEventSupport",h,d),window.removeEventListener("testPassiveEventSupport",h,d)}catch{}return u}(),sr=function(){return!!document.createElement("canvas").getContext}(),An=!!(document.createElementNS&&De("svg").createSVGRect),In=!!An&&function(){var u=document.createElement("div");return u.innerHTML="",(u.firstChild&&u.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),mn=!An&&function(){try{var u=document.createElement("div");u.innerHTML='';var d=u.firstChild;return d.style.behavior="url(#default#VML)",d&&typeof d.adj=="object"}catch{return!1}}(),li=navigator.platform.indexOf("Mac")===0,ci=navigator.platform.indexOf("Linux")===0;function Fn(u){return navigator.userAgent.toLowerCase().indexOf(u)>=0}var Ye={ie:be,ielt9:Oe,edge:Ae,webkit:Ne,android:Le,android23:ue,androidStock:we,opera:_e,chrome:Ee,gecko:Me,safari:$e,phantom:tt,opera12:nt,win:Ke,ie3d:Yt,webkit3d:Bt,gecko3d:xn,any3d:or,mobile:Ni,mobileWebkit:Dn,mobileWebkit3d:fu,msPointer:Li,pointer:vh,touch:_h,touchNative:yh,mobileOpera:du,mobileGecko:la,retina:ln,passiveEvents:Jt,canvas:sr,svg:An,vml:mn,inlineSvg:In,mac:li,linux:ci},bT=Ye.msPointer?"MSPointerDown":"pointerdown",wT=Ye.msPointer?"MSPointerMove":"pointermove",xT=Ye.msPointer?"MSPointerUp":"pointerup",ST=Ye.msPointer?"MSPointerCancel":"pointercancel",$_={touchstart:bT,touchmove:wT,touchend:xT,touchcancel:ST},CT={touchstart:S$,touchmove:bh,touchend:bh,touchcancel:bh},wl={},ET=!1;function y$(u,d,_){return d==="touchstart"&&x$(),CT[d]?(_=CT[d].bind(this,_),u.addEventListener($_[d],_,!1),_):(console.warn("wrong event specified:",d),h)}function _$(u,d,_){if(!$_[d]){console.warn("wrong event specified:",d);return}u.removeEventListener($_[d],_,!1)}function b$(u){wl[u.pointerId]=u}function w$(u){wl[u.pointerId]&&(wl[u.pointerId]=u)}function TT(u){delete wl[u.pointerId]}function x$(){ET||(document.addEventListener(bT,b$,!0),document.addEventListener(wT,w$,!0),document.addEventListener(xT,TT,!0),document.addEventListener(ST,TT,!0),ET=!0)}function bh(u,d){if(d.pointerType!==(d.MSPOINTER_TYPE_MOUSE||"mouse")){d.touches=[];for(var _ in wl)d.touches.push(wl[_]);d.changedTouches=[d],u(d)}}function S$(u,d){d.MSPOINTER_TYPE_TOUCH&&d.pointerType===d.MSPOINTER_TYPE_TOUCH&&$n(d),bh(u,d)}function C$(u){var d={},_,E;for(E in u)_=u[E],d[E]=_&&_.bind?_.bind(u):_;return u=d,d.type="dblclick",d.detail=2,d.isTrusted=!1,d._simulated=!0,d}var E$=200;function T$(u,d){u.addEventListener("dblclick",d);var _=0,E;function M(j){if(j.detail!==1){E=j.detail;return}if(!(j.pointerType==="mouse"||j.sourceCapabilities&&!j.sourceCapabilities.firesTouchEvents)){var J=RT(j);if(!(J.some(function(pe){return pe instanceof HTMLLabelElement&&pe.attributes.for})&&!J.some(function(pe){return pe instanceof HTMLInputElement||pe instanceof HTMLSelectElement}))){var de=Date.now();de-_<=E$?(E++,E===2&&d(C$(j))):E=1,_=de}}}return u.addEventListener("click",M),{dblclick:d,simDblclick:M}}function O$(u,d){u.removeEventListener("dblclick",d.dblclick),u.removeEventListener("click",d.simDblclick)}var j_=Sh(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),hu=Sh(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),OT=hu==="webkitTransition"||hu==="OTransition"?hu+"End":"transitionend";function PT(u){return typeof u=="string"?document.getElementById(u):u}function pu(u,d){var _=u.style[d]||u.currentStyle&&u.currentStyle[d];if((!_||_==="auto")&&document.defaultView){var E=document.defaultView.getComputedStyle(u,null);_=E?E[d]:null}return _==="auto"?null:_}function ft(u,d,_){var E=document.createElement(u);return E.className=d||"",_&&_.appendChild(E),E}function zt(u){var d=u.parentNode;d&&d.removeChild(u)}function wh(u){for(;u.firstChild;)u.removeChild(u.firstChild)}function xl(u){var d=u.parentNode;d&&d.lastChild!==u&&d.appendChild(u)}function Sl(u){var d=u.parentNode;d&&d.firstChild!==u&&d.insertBefore(u,d.firstChild)}function B_(u,d){if(u.classList!==void 0)return u.classList.contains(d);var _=xh(u);return _.length>0&&new RegExp("(^|\\s)"+d+"(\\s|$)").test(_)}function Je(u,d){if(u.classList!==void 0)for(var _=g(d),E=0,M=_.length;E0?2*window.devicePixelRatio:1;function LT(u){return Ye.edge?u.wheelDeltaY/2:u.deltaY&&u.deltaMode===0?-u.deltaY/M$:u.deltaY&&u.deltaMode===1?-u.deltaY*20:u.deltaY&&u.deltaMode===2?-u.deltaY*60:u.deltaX||u.deltaZ?0:u.wheelDelta?(u.wheelDeltaY||u.wheelDelta)/2:u.detail&&Math.abs(u.detail)<32765?-u.detail*20:u.detail?u.detail/-32765*60:0}function Q_(u,d){var _=d.relatedTarget;if(!_)return!0;try{for(;_&&_!==u;)_=_.parentNode}catch{return!1}return _!==u}var R$={__proto__:null,on:Xe,off:Et,stopPropagation:fa,disableScrollPropagation:X_,disableClickPropagation:yu,preventDefault:$n,stop:da,getPropagationPath:RT,getMousePosition:NT,getWheelDelta:LT,isExternalTarget:Q_,addListener:Xe,removeListener:Et},DT=se.extend({run:function(u,d,_,E){this.stop(),this._el=u,this._inProgress=!0,this._duration=_||.25,this._easeOutPower=1/Math.max(E||.5,.2),this._startPos=ua(u),this._offset=d.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=Y(this._animate,this),this._step()},_step:function(u){var d=+new Date-this._startTime,_=this._duration*1e3;d<_?this._runFrame(this._easeOut(d/_),u):(this._runFrame(1),this._complete())},_runFrame:function(u,d){var _=this._startPos.add(this._offset.multiplyBy(u));d&&_._round(),cn(this._el,_),this.fire("step")},_complete:function(){q(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(u){return 1-Math.pow(1-u,this._easeOutPower)}}),at=se.extend({options:{crs:le,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(u,d){d=v(this,d),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(u),this._initLayout(),this._onResize=s(this._onResize,this),this._initEvents(),d.maxBounds&&this.setMaxBounds(d.maxBounds),d.zoom!==void 0&&(this._zoom=this._limitZoom(d.zoom)),d.center&&d.zoom!==void 0&&this.setView(ae(d.center),d.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=hu&&Ye.any3d&&!Ye.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Xe(this._proxy,OT,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(u,d,_){if(d=d===void 0?this._zoom:this._limitZoom(d),u=this._limitCenter(ae(u),d,this.options.maxBounds),_=_||{},this._stop(),this._loaded&&!_.reset&&_!==!0){_.animate!==void 0&&(_.zoom=i({animate:_.animate},_.zoom),_.pan=i({animate:_.animate,duration:_.duration},_.pan));var E=this._zoom!==d?this._tryAnimatedZoom&&this._tryAnimatedZoom(u,d,_.zoom):this._tryAnimatedPan(u,_.pan);if(E)return clearTimeout(this._sizeTimer),this}return this._resetView(u,d,_.pan&&_.pan.noMoveStart),this},setZoom:function(u,d){return this._loaded?this.setView(this.getCenter(),u,{zoom:d}):(this._zoom=u,this)},zoomIn:function(u,d){return u=u||(Ye.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+u,d)},zoomOut:function(u,d){return u=u||(Ye.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-u,d)},setZoomAround:function(u,d,_){var E=this.getZoomScale(d),M=this.getSize().divideBy(2),j=u instanceof Z?u:this.latLngToContainerPoint(u),J=j.subtract(M).multiplyBy(1-1/E),de=this.containerPointToLatLng(M.add(J));return this.setView(de,d,{zoom:_})},_getBoundsCenterZoom:function(u,d){d=d||{},u=u.getBounds?u.getBounds():G(u);var _=I(d.paddingTopLeft||d.padding||[0,0]),E=I(d.paddingBottomRight||d.padding||[0,0]),M=this.getBoundsZoom(u,!1,_.add(E));if(M=typeof d.maxZoom=="number"?Math.min(d.maxZoom,M):M,M===1/0)return{center:u.getCenter(),zoom:M};var j=E.subtract(_).divideBy(2),J=this.project(u.getSouthWest(),M),de=this.project(u.getNorthEast(),M),pe=this.unproject(J.add(de).divideBy(2).add(j),M);return{center:pe,zoom:M}},fitBounds:function(u,d){if(u=G(u),!u.isValid())throw new Error("Bounds are not valid.");var _=this._getBoundsCenterZoom(u,d);return this.setView(_.center,_.zoom,d)},fitWorld:function(u){return this.fitBounds([[-90,-180],[90,180]],u)},panTo:function(u,d){return this.setView(u,this._zoom,{pan:d})},panBy:function(u,d){if(u=I(u).round(),d=d||{},!u.x&&!u.y)return this.fire("moveend");if(d.animate!==!0&&!this.getSize().contains(u))return this._resetView(this.unproject(this.project(this.getCenter()).add(u)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new DT,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),d.noMoveStart||this.fire("movestart"),d.animate!==!1){Je(this._mapPane,"leaflet-pan-anim");var _=this._getMapPanePos().subtract(u).round();this._panAnim.run(this._mapPane,_,d.duration||.25,d.easeLinearity)}else this._rawPanBy(u),this.fire("move").fire("moveend");return this},flyTo:function(u,d,_){if(_=_||{},_.animate===!1||!Ye.any3d)return this.setView(u,d,_);this._stop();var E=this.project(this.getCenter()),M=this.project(u),j=this.getSize(),J=this._zoom;u=ae(u),d=d===void 0?J:d;var de=Math.max(j.x,j.y),pe=de*this.getZoomScale(J,d),Ce=M.distanceTo(E)||1,Ie=1.42,Ge=Ie*Ie;function it(un){var $h=un?-1:1,_7=un?pe:de,b7=pe*pe-de*de+$h*Ge*Ge*Ce*Ce,w7=2*_7*Ge*Ce,c0=b7/w7,pO=Math.sqrt(c0*c0+1)-c0,x7=pO<1e-9?-18:Math.log(pO);return x7}function Hr(un){return(Math.exp(un)-Math.exp(-un))/2}function pa(un){return(Math.exp(un)+Math.exp(-un))/2}function Fh(un){return Hr(un)/pa(un)}var Zo=it(0);function l0(un){return de*(pa(Zo)/pa(Zo+Ie*un))}function m7(un){return de*(pa(Zo)*Fh(Zo+Ie*un)-Hr(Zo))/Ge}function g7(un){return 1-Math.pow(1-un,1.5)}var v7=Date.now(),dO=(it(1)-Zo)/Ie,y7=_.duration?1e3*_.duration:1e3*dO*.8;function hO(){var un=(Date.now()-v7)/y7,$h=g7(un)*dO;un<=1?(this._flyToFrame=Y(hO,this),this._move(this.unproject(E.add(M.subtract(E).multiplyBy(m7($h)/Ce)),J),this.getScaleZoom(de/l0($h),J),{flyTo:!0})):this._move(u,d)._moveEnd(!0)}return this._moveStart(!0,_.noMoveStart),hO.call(this),this},flyToBounds:function(u,d){var _=this._getBoundsCenterZoom(u,d);return this.flyTo(_.center,_.zoom,d)},setMaxBounds:function(u){return u=G(u),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),u.isValid()?(this.options.maxBounds=u,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(u){var d=this.options.minZoom;return this.options.minZoom=u,this._loaded&&d!==u&&(this.fire("zoomlevelschange"),this.getZoom()this.options.maxZoom)?this.setZoom(u):this},panInsideBounds:function(u,d){this._enforcingBounds=!0;var _=this.getCenter(),E=this._limitCenter(_,this._zoom,G(u));return _.equals(E)||this.panTo(E,d),this._enforcingBounds=!1,this},panInside:function(u,d){d=d||{};var _=I(d.paddingTopLeft||d.padding||[0,0]),E=I(d.paddingBottomRight||d.padding||[0,0]),M=this.project(this.getCenter()),j=this.project(u),J=this.getPixelBounds(),de=re([J.min.add(_),J.max.subtract(E)]),pe=de.getSize();if(!de.contains(j)){this._enforcingBounds=!0;var Ce=j.subtract(de.getCenter()),Ie=de.extend(j).getSize().subtract(pe);M.x+=Ce.x<0?-Ie.x:Ie.x,M.y+=Ce.y<0?-Ie.y:Ie.y,this.panTo(this.unproject(M),d),this._enforcingBounds=!1}return this},invalidateSize:function(u){if(!this._loaded)return this;u=i({animate:!1,pan:!0},u===!0?{animate:!0}:u);var d=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var _=this.getSize(),E=d.divideBy(2).round(),M=_.divideBy(2).round(),j=E.subtract(M);return!j.x&&!j.y?this:(u.animate&&u.pan?this.panBy(j):(u.pan&&this._rawPanBy(j),this.fire("move"),u.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(s(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:d,newSize:_}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(u){if(u=this._locateOptions=i({timeout:1e4,watch:!1},u),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var d=s(this._handleGeolocationResponse,this),_=s(this._handleGeolocationError,this);return u.watch?this._locationWatchId=navigator.geolocation.watchPosition(d,_,u):navigator.geolocation.getCurrentPosition(d,_,u),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(u){if(this._container._leaflet_id){var d=u.code,_=u.message||(d===1?"permission denied":d===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:d,message:"Geolocation error: "+_+"."})}},_handleGeolocationResponse:function(u){if(this._container._leaflet_id){var d=u.coords.latitude,_=u.coords.longitude,E=new ne(d,_),M=E.toBounds(u.coords.accuracy*2),j=this._locateOptions;if(j.setView){var J=this.getBoundsZoom(M);this.setView(E,j.maxZoom?Math.min(J,j.maxZoom):J)}var de={latlng:E,bounds:M,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,d){if(!d)return this;var _=this[u]=new d(this);return this._handlers.push(_),this.options[u]&&_.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(),zt(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(q(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)zt(this._panes[u]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(u,d){var _="leaflet-pane"+(u?" leaflet-"+u.replace("Pane","")+"-pane":""),E=ft("div",_,d||this._mapPane);return u&&(this._panes[u]=E),E},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var u=this.getPixelBounds(),d=this.unproject(u.getBottomLeft()),_=this.unproject(u.getTopRight());return new W(d,_)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(u,d,_){u=G(u),_=I(_||[0,0]);var E=this.getZoom()||0,M=this.getMinZoom(),j=this.getMaxZoom(),J=u.getNorthWest(),de=u.getSouthEast(),pe=this.getSize().subtract(_),Ce=re(this.project(de,E),this.project(J,E)).getSize(),Ie=Ye.any3d?this.options.zoomSnap:1,Ge=pe.x/Ce.x,it=pe.y/Ce.y,Hr=d?Math.max(Ge,it):Math.min(Ge,it);return E=this.getScaleZoom(Hr,E),Ie&&(E=Math.round(E/(Ie/100))*(Ie/100),E=d?Math.ceil(E/Ie)*Ie:Math.floor(E/Ie)*Ie),Math.max(M,Math.min(j,E))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new Z(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(u,d){var _=this._getTopLeftPoint(u,d);return new B(_,_.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(u){return this.options.crs.getProjectedBounds(u===void 0?this.getZoom():u)},getPane:function(u){return typeof u=="string"?this._panes[u]:u},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(u,d){var _=this.options.crs;return d=d===void 0?this._zoom:d,_.scale(u)/_.scale(d)},getScaleZoom:function(u,d){var _=this.options.crs;d=d===void 0?this._zoom:d;var E=_.zoom(u*_.scale(d));return isNaN(E)?1/0:E},project:function(u,d){return d=d===void 0?this._zoom:d,this.options.crs.latLngToPoint(ae(u),d)},unproject:function(u,d){return d=d===void 0?this._zoom:d,this.options.crs.pointToLatLng(I(u),d)},layerPointToLatLng:function(u){var d=I(u).add(this.getPixelOrigin());return this.unproject(d)},latLngToLayerPoint:function(u){var d=this.project(ae(u))._round();return d._subtract(this.getPixelOrigin())},wrapLatLng:function(u){return this.options.crs.wrapLatLng(ae(u))},wrapLatLngBounds:function(u){return this.options.crs.wrapLatLngBounds(G(u))},distance:function(u,d){return this.options.crs.distance(ae(u),ae(d))},containerPointToLayerPoint:function(u){return I(u).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(u){return I(u).add(this._getMapPanePos())},containerPointToLatLng:function(u){var d=this.containerPointToLayerPoint(I(u));return this.layerPointToLatLng(d)},latLngToContainerPoint:function(u){return this.layerPointToContainerPoint(this.latLngToLayerPoint(ae(u)))},mouseEventToContainerPoint:function(u){return NT(u,this._container)},mouseEventToLayerPoint:function(u){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(u))},mouseEventToLatLng:function(u){return this.layerPointToLatLng(this.mouseEventToLayerPoint(u))},_initContainer:function(u){var d=this._container=PT(u);if(d){if(d._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Xe(d,"scroll",this._onScroll,this),this._containerId=l(d)},_initLayout:function(){var u=this._container;this._fadeAnimated=this.options.fadeAnimation&&Ye.any3d,Je(u,"leaflet-container"+(Ye.touch?" leaflet-touch":"")+(Ye.retina?" leaflet-retina":"")+(Ye.ielt9?" leaflet-oldie":"")+(Ye.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var d=pu(u,"position");d!=="absolute"&&d!=="relative"&&d!=="fixed"&&d!=="sticky"&&(u.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var u=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),cn(this._mapPane,new Z(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Je(u.markerPane,"leaflet-zoom-hide"),Je(u.shadowPane,"leaflet-zoom-hide"))},_resetView:function(u,d,_){cn(this._mapPane,new Z(0,0));var E=!this._loaded;this._loaded=!0,d=this._limitZoom(d),this.fire("viewprereset");var M=this._zoom!==d;this._moveStart(M,_)._move(u,d)._moveEnd(M),this.fire("viewreset"),E&&this.fire("load")},_moveStart:function(u,d){return u&&this.fire("zoomstart"),d||this.fire("movestart"),this},_move:function(u,d,_,E){d===void 0&&(d=this._zoom);var M=this._zoom!==d;return this._zoom=d,this._lastCenter=u,this._pixelOrigin=this._getNewPixelOrigin(u),E?_&&_.pinch&&this.fire("zoom",_):((M||_&&_.pinch)&&this.fire("zoom",_),this.fire("move",_)),this},_moveEnd:function(u){return u&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return q(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(u){cn(this._mapPane,this._getMapPanePos().subtract(u))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(u){this._targets={},this._targets[l(this._container)]=this;var d=u?Et:Xe;d(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&d(window,"resize",this._onResize,this),Ye.any3d&&this.options.transform3DLimit&&(u?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){q(this._resizeRequest),this._resizeRequest=Y(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var u=this._getMapPanePos();Math.max(Math.abs(u.x),Math.abs(u.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(u,d){for(var _=[],E,M=d==="mouseout"||d==="mouseover",j=u.target||u.srcElement,J=!1;j;){if(E=this._targets[l(j)],E&&(d==="click"||d==="preclick")&&this._draggableMoved(E)){J=!0;break}if(E&&E.listens(d,!0)&&(M&&!Q_(j,u)||(_.push(E),M))||j===this._container)break;j=j.parentNode}return!_.length&&!J&&!M&&this.listens(d,!0)&&(_=[this]),_},_isClickDisabled:function(u){for(;u&&u!==this._container;){if(u._leaflet_disable_click)return!0;u=u.parentNode}},_handleDOMEvent:function(u){var d=u.target||u.srcElement;if(!(!this._loaded||d._leaflet_disable_events||u.type==="click"&&this._isClickDisabled(d))){var _=u.type;_==="mousedown"&&Y_(d),this._fireDOMEvent(u,_)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(u,d,_){if(u.type==="click"){var E=i({},u);E.type="preclick",this._fireDOMEvent(E,E.type,_)}var M=this._findEventTargets(u,d);if(_){for(var j=[],J=0;J<_.length;J++)_[J].listens(d,!0)&&j.push(_[J]);M=j.concat(M)}if(M.length){d==="contextmenu"&&$n(u);var de=M[0],pe={originalEvent:u};if(u.type!=="keypress"&&u.type!=="keydown"&&u.type!=="keyup"){var Ce=de.getLatLng&&(!de._radius||de._radius<=10);pe.containerPoint=Ce?this.latLngToContainerPoint(de.getLatLng()):this.mouseEventToContainerPoint(u),pe.layerPoint=this.containerPointToLayerPoint(pe.containerPoint),pe.latlng=Ce?de.getLatLng():this.layerPointToLatLng(pe.layerPoint)}for(J=0;J0?Math.round(u-d)/2:Math.max(0,Math.ceil(u))-Math.max(0,Math.floor(d))},_limitZoom:function(u){var d=this.getMinZoom(),_=this.getMaxZoom(),E=Ye.any3d?this.options.zoomSnap:1;return E&&(u=Math.round(u/E)*E),Math.max(d,Math.min(_,u))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){en(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(u,d){var _=this._getCenterOffset(u)._trunc();return(d&&d.animate)!==!0&&!this.getSize().contains(_)?!1:(this.panBy(_,d),!0)},_createAnimProxy:function(){var u=this._proxy=ft("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(u),this.on("zoomanim",function(d){var _=j_,E=this._proxy.style[_];ca(this._proxy,this.project(d.center,d.zoom),this.getZoomScale(d.zoom,1)),E===this._proxy.style[_]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){zt(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var u=this.getCenter(),d=this.getZoom();ca(this._proxy,this.project(u,d),this.getZoomScale(d,1))},_catchTransitionEnd:function(u){this._animatingZoom&&u.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(u,d,_){if(this._animatingZoom)return!0;if(_=_||{},!this._zoomAnimated||_.animate===!1||this._nothingToAnimate()||Math.abs(d-this._zoom)>this.options.zoomAnimationThreshold)return!1;var E=this.getZoomScale(d),M=this._getCenterOffset(u)._divideBy(1-1/E);return _.animate!==!0&&!this.getSize().contains(M)?!1:(Y(function(){this._moveStart(!0,!1)._animateZoom(u,d,!0)},this),!0)},_animateZoom:function(u,d,_,E){this._mapPane&&(_&&(this._animatingZoom=!0,this._animateToCenter=u,this._animateToZoom=d,Je(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:u,zoom:d,noUpdate:E}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(s(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&en(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 N$(u,d){return new at(u,d)}var ui=K.extend({options:{position:"topright"},initialize:function(u){v(this,u)},getPosition:function(){return this.options.position},setPosition:function(u){var d=this._map;return d&&d.removeControl(this),this.options.position=u,d&&d.addControl(this),this},getContainer:function(){return this._container},addTo:function(u){this.remove(),this._map=u;var d=this._container=this.onAdd(u),_=this.getPosition(),E=u._controlCorners[_];return Je(d,"leaflet-control"),_.indexOf("bottom")!==-1?E.insertBefore(d,E.firstChild):E.appendChild(d),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(zt(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()}}),_u=function(u){return new ui(u)};at.include({addControl:function(u){return u.addTo(this),this},removeControl:function(u){return u.remove(),this},_initControlPos:function(){var u=this._controlCorners={},d="leaflet-",_=this._controlContainer=ft("div",d+"control-container",this._container);function E(M,j){var J=d+M+" "+d+j;u[M+j]=ft("div",J,_)}E("top","left"),E("top","right"),E("bottom","left"),E("bottom","right")},_clearControlPos:function(){for(var u in this._controlCorners)zt(this._controlCorners[u]);zt(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var AT=ui.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(u,d,_,E){return _1,this._baseLayersList.style.display=u?"":"none"),this._separator.style.display=d&&u?"":"none",this},_onLayerChange:function(u){this._handlingClick||this._update();var d=this._getLayer(l(u.target)),_=d.overlay?u.type==="add"?"overlayadd":"overlayremove":u.type==="add"?"baselayerchange":null;_&&this._map.fire(_,d)},_createRadioElement:function(u,d){var _='",E=document.createElement("div");return E.innerHTML=_,E.firstChild},_addItem:function(u){var d=document.createElement("label"),_=this._map.hasLayer(u.layer),E;u.overlay?(E=document.createElement("input"),E.type="checkbox",E.className="leaflet-control-layers-selector",E.defaultChecked=_):E=this._createRadioElement("leaflet-base-layers_"+l(this),_),this._layerControlInputs.push(E),E.layerId=l(u.layer),Xe(E,"click",this._onInputClick,this);var M=document.createElement("span");M.innerHTML=" "+u.name;var j=document.createElement("span");d.appendChild(j),j.appendChild(E),j.appendChild(M);var J=u.overlay?this._overlaysList:this._baseLayersList;return J.appendChild(d),this._checkDisabledLayers(),d},_onInputClick:function(){var u=this._layerControlInputs,d,_,E=[],M=[];this._handlingClick=!0;for(var j=u.length-1;j>=0;j--)d=u[j],_=this._getLayer(d.layerId).layer,d.checked?E.push(_):d.checked||M.push(_);for(j=0;j=0;M--)d=u[M],_=this._getLayer(d.layerId).layer,d.disabled=_.options.minZoom!==void 0&&E<_.options.minZoom||_.options.maxZoom!==void 0&&E>_.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var u=this._section;Xe(u,"click",$n),this.expand(),setTimeout(function(){Et(u,"click",$n)})}}),L$=function(u,d,_){return new AT(u,d,_)},J_=ui.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(u){var d="leaflet-control-zoom",_=ft("div",d+" leaflet-bar"),E=this.options;return this._zoomInButton=this._createButton(E.zoomInText,E.zoomInTitle,d+"-in",_,this._zoomIn),this._zoomOutButton=this._createButton(E.zoomOutText,E.zoomOutTitle,d+"-out",_,this._zoomOut),this._updateDisabled(),u.on("zoomend zoomlevelschange",this._updateDisabled,this),_},onRemove:function(u){u.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(u){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(u.shiftKey?3:1))},_createButton:function(u,d,_,E,M){var j=ft("a",_,E);return j.innerHTML=u,j.href="#",j.title=d,j.setAttribute("role","button"),j.setAttribute("aria-label",d),yu(j),Xe(j,"click",da),Xe(j,"click",M,this),Xe(j,"click",this._refocusOnMap,this),j},_updateDisabled:function(){var u=this._map,d="leaflet-disabled";en(this._zoomInButton,d),en(this._zoomOutButton,d),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||u._zoom===u.getMinZoom())&&(Je(this._zoomOutButton,d),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||u._zoom===u.getMaxZoom())&&(Je(this._zoomInButton,d),this._zoomInButton.setAttribute("aria-disabled","true"))}});at.mergeOptions({zoomControl:!0}),at.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new J_,this.addControl(this.zoomControl))});var D$=function(u){return new J_(u)},IT=ui.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(u){var d="leaflet-control-scale",_=ft("div",d),E=this.options;return this._addScales(E,d+"-line",_),u.on(E.updateWhenIdle?"moveend":"move",this._update,this),u.whenReady(this._update,this),_},onRemove:function(u){u.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(u,d,_){u.metric&&(this._mScale=ft("div",d,_)),u.imperial&&(this._iScale=ft("div",d,_))},_update:function(){var u=this._map,d=u.getSize().y/2,_=u.distance(u.containerPointToLatLng([0,d]),u.containerPointToLatLng([this.options.maxWidth,d]));this._updateScales(_)},_updateScales:function(u){this.options.metric&&u&&this._updateMetric(u),this.options.imperial&&u&&this._updateImperial(u)},_updateMetric:function(u){var d=this._getRoundNum(u),_=d<1e3?d+" m":d/1e3+" km";this._updateScale(this._mScale,_,d/u)},_updateImperial:function(u){var d=u*3.2808399,_,E,M;d>5280?(_=d/5280,E=this._getRoundNum(_),this._updateScale(this._iScale,E+" mi",E/_)):(M=this._getRoundNum(d),this._updateScale(this._iScale,M+" ft",M/d))},_updateScale:function(u,d,_){u.style.width=Math.round(this.options.maxWidth*_)+"px",u.innerHTML=d},_getRoundNum:function(u){var d=Math.pow(10,(Math.floor(u)+"").length-1),_=u/d;return _=_>=10?10:_>=5?5:_>=3?3:_>=2?2:1,d*_}}),A$=function(u){return new IT(u)},I$='',e0=ui.extend({options:{position:"bottomright",prefix:''+(Ye.inlineSvg?I$+" ":"")+"Leaflet"},initialize:function(u){v(this,u),this._attributions={}},onAdd:function(u){u.attributionControl=this,this._container=ft("div","leaflet-control-attribution"),yu(this._container);for(var d in u._layers)u._layers[d].getAttribution&&this.addAttribution(u._layers[d].getAttribution());return this._update(),u.on("layeradd",this._addAttribution,this),this._container},onRemove:function(u){u.off("layeradd",this._addAttribution,this)},_addAttribution:function(u){u.layer.getAttribution&&(this.addAttribution(u.layer.getAttribution()),u.layer.once("remove",function(){this.removeAttribution(u.layer.getAttribution())},this))},setPrefix:function(u){return this.options.prefix=u,this._update(),this},addAttribution:function(u){return u?(this._attributions[u]||(this._attributions[u]=0),this._attributions[u]++,this._update(),this):this},removeAttribution:function(u){return u?(this._attributions[u]&&(this._attributions[u]--,this._update()),this):this},_update:function(){if(this._map){var u=[];for(var d in this._attributions)this._attributions[d]&&u.push(d);var _=[];this.options.prefix&&_.push(this.options.prefix),u.length&&_.push(u.join(", ")),this._container.innerHTML=_.join(' ')}}});at.mergeOptions({attributionControl:!0}),at.addInitHook(function(){this.options.attributionControl&&new e0().addTo(this)});var F$=function(u){return new e0(u)};ui.Layers=AT,ui.Zoom=J_,ui.Scale=IT,ui.Attribution=e0,_u.layers=L$,_u.zoom=D$,_u.scale=A$,_u.attribution=F$;var Ai=K.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}});Ai.addTo=function(u,d){return u.addHandler(d,this),this};var $$={Events:oe},FT=Ye.touch?"touchstart mousedown":"mousedown",qo=se.extend({options:{clickTolerance:3},initialize:function(u,d,_,E){v(this,E),this._element=u,this._dragStartTarget=d||u,this._preventOutline=_},enable:function(){this._enabled||(Xe(this._dragStartTarget,FT,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(qo._dragging===this&&this.finishDrag(!0),Et(this._dragStartTarget,FT,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(u){if(this._enabled&&(this._moved=!1,!B_(this._element,"leaflet-zoom-anim"))){if(u.touches&&u.touches.length!==1){qo._dragging===this&&this.finishDrag();return}if(!(qo._dragging||u.shiftKey||u.which!==1&&u.button!==1&&!u.touches)&&(qo._dragging=this,this._preventOutline&&Y_(this._element),V_(),mu(),!this._moving)){this.fire("down");var d=u.touches?u.touches[0]:u,_=kT(this._element);this._startPoint=new Z(d.clientX,d.clientY),this._startPos=ua(this._element),this._parentScale=q_(_);var E=u.type==="mousedown";Xe(document,E?"mousemove":"touchmove",this._onMove,this),Xe(document,E?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(u){if(this._enabled){if(u.touches&&u.touches.length>1){this._moved=!0;return}var d=u.touches&&u.touches.length===1?u.touches[0]:u,_=new Z(d.clientX,d.clientY)._subtract(this._startPoint);!_.x&&!_.y||Math.abs(_.x)+Math.abs(_.y)j&&(J=de,j=pe);j>_&&(d[J]=1,t0(u,d,_,E,J),t0(u,d,_,J,M))}function z$(u,d){for(var _=[u[0]],E=1,M=0,j=u.length;Ed&&(_.push(u[E]),M=E);return Md.max.x&&(_|=2),u.yd.max.y&&(_|=8),_}function U$(u,d){var _=d.x-u.x,E=d.y-u.y;return _*_+E*E}function bu(u,d,_,E){var M=d.x,j=d.y,J=_.x-M,de=_.y-j,pe=J*J+de*de,Ce;return pe>0&&(Ce=((u.x-M)*J+(u.y-j)*de)/pe,Ce>1?(M=_.x,j=_.y):Ce>0&&(M+=J*Ce,j+=de*Ce)),J=u.x-M,de=u.y-j,E?J*J+de*de:new Z(M,j)}function Vr(u){return!x(u[0])||typeof u[0][0]!="object"&&typeof u[0][0]<"u"}function UT(u){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Vr(u)}function VT(u,d){var _,E,M,j,J,de,pe,Ce;if(!u||u.length===0)throw new Error("latlngs not passed");Vr(u)||(console.warn("latlngs are not flat! Only the first ring will be used"),u=u[0]);var Ie=[];for(var Ge in u)Ie.push(d.project(ae(u[Ge])));var it=Ie.length;for(_=0,E=0;_E){pe=(j-E)/M,Ce=[de.x-pe*(de.x-J.x),de.y-pe*(de.y-J.y)];break}return d.unproject(I(Ce))}var V$={__proto__:null,simplify:$T,pointToSegmentDistance:jT,closestPointOnSegment:j$,clipSegment:zT,_getEdgeIntersection:Th,_getBitCode:ha,_sqClosestPointOnSegment:bu,isFlat:Vr,_flat:UT,polylineCenter:VT};function HT(u,d,_){var E,M=[1,4,2,8],j,J,de,pe,Ce,Ie,Ge,it;for(j=0,Ie=u.length;j1e-7;de++)Ce=M*Math.sin(J),Ce=Math.pow((1-Ce)/(1+Ce),M/2),pe=Math.PI/2-2*Math.atan(j*Ce)-J,J+=pe;return new ne(J*d,u.x*d/_)}},W$={__proto__:null,LonLat:n0,Mercator:r0,SphericalMercator:F},Y$=i({},O,{code:"EPSG:3395",projection:r0,transformation:function(){var u=.5/(Math.PI*r0.R);return X(u,.5,-u,.5)}()}),YT=i({},O,{code:"EPSG:4326",projection:n0,transformation:X(1/180,1,-1/180,.5)}),q$=i({},me,{projection:n0,transformation:X(1,0,-1,0),scale:function(u){return Math.pow(2,u)},zoom:function(u){return Math.log(u)/Math.LN2},distance:function(u,d){var _=d.lng-u.lng,E=d.lat-u.lat;return Math.sqrt(_*_+E*E)},infinite:!0});me.Earth=O,me.EPSG3395=Y$,me.EPSG3857=le,me.EPSG900913=ve,me.EPSG4326=YT,me.Simple=q$;var fi=se.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(u){return u.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(u){return u&&u.removeLayer(this),this},getPane:function(u){return this._map.getPane(u?this.options[u]||u:this.options.pane)},addInteractiveTarget:function(u){return this._map._targets[l(u)]=this,this},removeInteractiveTarget:function(u){return delete this._map._targets[l(u)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(u){var d=u.target;if(d.hasLayer(this)){if(this._map=d,this._zoomAnimated=d._zoomAnimated,this.getEvents){var _=this.getEvents();d.on(_,this),this.once("remove",function(){d.off(_,this)},this)}this.onAdd(d),this.fire("add"),d.fire("layeradd",{layer:this})}}});at.include({addLayer:function(u){if(!u._layerAdd)throw new Error("The provided object is not a Layer.");var d=l(u);return this._layers[d]?this:(this._layers[d]=u,u._mapToAdd=this,u.beforeAdd&&u.beforeAdd(this),this.whenReady(u._layerAdd,u),this)},removeLayer:function(u){var d=l(u);return this._layers[d]?(this._loaded&&u.onRemove(this),delete this._layers[d],this._loaded&&(this.fire("layerremove",{layer:u}),u.fire("remove")),u._map=u._mapToAdd=null,this):this},hasLayer:function(u){return l(u)in this._layers},eachLayer:function(u,d){for(var _ in this._layers)u.call(d,this._layers[_]);return this},_addLayers:function(u){u=u?x(u)?u:[u]:[];for(var d=0,_=u.length;d<_;d++)this.addLayer(u[d])},_addZoomLimit:function(u){(!isNaN(u.options.maxZoom)||!isNaN(u.options.minZoom))&&(this._zoomBoundLayers[l(u)]=u,this._updateZoomLevels())},_removeZoomLimit:function(u){var d=l(u);this._zoomBoundLayers[d]&&(delete this._zoomBoundLayers[d],this._updateZoomLevels())},_updateZoomLevels:function(){var u=1/0,d=-1/0,_=this._getZoomSpan();for(var E in this._zoomBoundLayers){var M=this._zoomBoundLayers[E].options;u=M.minZoom===void 0?u:Math.min(u,M.minZoom),d=M.maxZoom===void 0?d:Math.max(d,M.maxZoom)}this._layersMaxZoom=d===-1/0?void 0:d,this._layersMinZoom=u===1/0?void 0:u,_!==this._getZoomSpan()&&this.fire("zoomlevelschange"),this.options.maxZoom===void 0&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&d[0]instanceof ne&&d[0].equals(d[_-1])&&d.pop(),d},_setLatLngs:function(u){ao.prototype._setLatLngs.call(this,u),Vr(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Vr(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var u=this._renderer._bounds,d=this.options.weight,_=new Z(d,d);if(u=new B(u.min.subtract(_),u.max.add(_)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(u))){if(this.options.noClip){this._parts=this._rings;return}for(var E=0,M=this._rings.length,j;Eu.y!=M.y>u.y&&u.x<(M.x-E.x)*(u.y-E.y)/(M.y-E.y)+E.x&&(d=!d);return d||ao.prototype._containsPoint.call(this,u,!0)}});function t7(u,d){return new Tl(u,d)}var lo=so.extend({initialize:function(u,d){v(this,d),this._layers={},u&&this.addData(u)},addData:function(u){var d=x(u)?u:u.features,_,E,M;if(d){for(_=0,E=d.length;_0?E:[d.src];return}x(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(d.style,"objectFit")&&(d.style.objectFit="fill"),d.autoplay=!!this.options.autoplay,d.loop=!!this.options.loop,d.muted=!!this.options.muted,d.playsInline=!!this.options.playsInline;for(var j=0;jM?(d.height=M+"px",Je(u,j)):en(u,j),this._containerWidth=this._container.offsetWidth},_animateZoom:function(u){var d=this._map._latLngToNewLayerPoint(this._latlng,u.zoom,u.center),_=this._getAnchor();cn(this._container,d.add(_))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var u=this._map,d=parseInt(pu(this._container,"marginBottom"),10)||0,_=this._container.offsetHeight+d,E=this._containerWidth,M=new Z(this._containerLeft,-_-this._containerBottom);M._add(ua(this._container));var j=u.layerPointToContainerPoint(M),J=I(this.options.autoPanPadding),de=I(this.options.autoPanPaddingTopLeft||J),pe=I(this.options.autoPanPaddingBottomRight||J),Ce=u.getSize(),Ie=0,Ge=0;j.x+E+pe.x>Ce.x&&(Ie=j.x+E-Ce.x+pe.x),j.x-Ie-de.x<0&&(Ie=j.x-de.x),j.y+_+pe.y>Ce.y&&(Ge=j.y+_-Ce.y+pe.y),j.y-Ge-de.y<0&&(Ge=j.y-de.y),(Ie||Ge)&&(this.options.keepInView&&(this._autopanning=!0),u.fire("autopanstart").panBy([Ie,Ge]))}},_getAnchor:function(){return I(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),s7=function(u,d){return new Dh(u,d)};at.mergeOptions({closePopupOnClick:!0}),at.include({openPopup:function(u,d,_){return this._initOverlay(Dh,u,d,_).openOn(this),this},closePopup:function(u){return u=arguments.length?u:this._popup,u&&u.close(),this}}),fi.include({bindPopup:function(u,d){return this._popup=this._initOverlay(Dh,this._popup,u,d),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(u){return this._popup&&(this instanceof so||(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)){da(u);var d=u.layer||u.target;if(this._popup._source===d&&!(d instanceof Go)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(u.latlng);return}this._popup._source=d,this.openPopup(u.latlng)}},_movePopup:function(u){this._popup.setLatLng(u.latlng)},_onKeyPress:function(u){u.originalEvent.keyCode===13&&this._openPopup(u)}});var Ah=Ii.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(u){Ii.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){Ii.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=Ii.prototype.getEvents.call(this);return this.options.permanent||(u.preclick=this.close),u},_initLayout:function(){var u="leaflet-tooltip",d=u+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=ft("div",d),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+l(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(u){var d,_,E=this._map,M=this._container,j=E.latLngToContainerPoint(E.getCenter()),J=E.layerPointToContainerPoint(u),de=this.options.direction,pe=M.offsetWidth,Ce=M.offsetHeight,Ie=I(this.options.offset),Ge=this._getAnchor();de==="top"?(d=pe/2,_=Ce):de==="bottom"?(d=pe/2,_=0):de==="center"?(d=pe/2,_=Ce/2):de==="right"?(d=0,_=Ce/2):de==="left"?(d=pe,_=Ce/2):J.xthis.options.maxZoom||_E?this._retainParent(M,j,J,E):!1)},_retainChildren:function(u,d,_,E){for(var M=2*u;M<2*u+2;M++)for(var j=2*d;j<2*d+2;j++){var J=new Z(M,j);J.z=_+1;var de=this._tileCoordsToKey(J),pe=this._tiles[de];if(pe&&pe.active){pe.retain=!0;continue}else pe&&pe.loaded&&(pe.retain=!0);_+1this.options.maxZoom||this.options.minZoom!==void 0&&M1){this._setView(u,_);return}for(var Ge=M.min.y;Ge<=M.max.y;Ge++)for(var it=M.min.x;it<=M.max.x;it++){var Hr=new Z(it,Ge);if(Hr.z=this._tileZoom,!!this._isValidTile(Hr)){var pa=this._tiles[this._tileCoordsToKey(Hr)];pa?pa.current=!0:J.push(Hr)}}if(J.sort(function(Zo,l0){return Zo.distanceTo(j)-l0.distanceTo(j)}),J.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Fh=document.createDocumentFragment();for(it=0;it_.max.x)||!d.wrapLat&&(u.y<_.min.y||u.y>_.max.y))return!1}if(!this.options.bounds)return!0;var E=this._tileCoordsToBounds(u);return G(this.options.bounds).overlaps(E)},_keyToBounds:function(u){return this._tileCoordsToBounds(this._keyToTileCoords(u))},_tileCoordsToNwSe:function(u){var d=this._map,_=this.getTileSize(),E=u.scaleBy(_),M=E.add(_),j=d.unproject(E,u.z),J=d.unproject(M,u.z);return[j,J]},_tileCoordsToBounds:function(u){var d=this._tileCoordsToNwSe(u),_=new W(d[0],d[1]);return this.options.noWrap||(_=this._map.wrapLatLngBounds(_)),_},_tileCoordsToKey:function(u){return u.x+":"+u.y+":"+u.z},_keyToTileCoords:function(u){var d=u.split(":"),_=new Z(+d[0],+d[1]);return _.z=+d[2],_},_removeTile:function(u){var d=this._tiles[u];d&&(zt(d.el),delete this._tiles[u],this.fire("tileunload",{tile:d.el,coords:this._keyToTileCoords(u)}))},_initTile:function(u){Je(u,"leaflet-tile");var d=this.getTileSize();u.style.width=d.x+"px",u.style.height=d.y+"px",u.onselectstart=h,u.onmousemove=h,Ye.ielt9&&this.options.opacity<1&&Ur(u,this.options.opacity)},_addTile:function(u,d){var _=this._getTilePos(u),E=this._tileCoordsToKey(u),M=this.createTile(this._wrapCoords(u),s(this._tileReady,this,u));this._initTile(M),this.createTile.length<2&&Y(s(this._tileReady,this,u,null,M)),cn(M,_),this._tiles[E]={el:M,coords:u,current:!0},d.appendChild(M),this.fire("tileloadstart",{tile:M,coords:u})},_tileReady:function(u,d,_){d&&this.fire("tileerror",{error:d,tile:_,coords:u});var E=this._tileCoordsToKey(u);_=this._tiles[E],_&&(_.loaded=+new Date,this._map._fadeAnimated?(Ur(_.el,0),q(this._fadeFrame),this._fadeFrame=Y(this._updateOpacity,this)):(_.active=!0,this._pruneTiles()),d||(Je(_.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:_.el,coords:u})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Ye.ielt9||!this._map._fadeAnimated?Y(this._pruneTiles,this):setTimeout(s(this._pruneTiles,this),250)))},_getTilePos:function(u){return u.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(u){var d=new Z(this._wrapX?f(u.x,this._wrapX):u.x,this._wrapY?f(u.y,this._wrapY):u.y);return d.z=u.z,d},_pxBoundsToTileRange:function(u){var d=this.getTileSize();return new B(u.min.unscaleBy(d).floor(),u.max.unscaleBy(d).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var u in this._tiles)if(!this._tiles[u].loaded)return!1;return!0}});function c7(u){return new xu(u)}var Pl=xu.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(u,d){this._url=u,d=v(this,d),d.detectRetina&&Ye.retina&&d.maxZoom>0?(d.tileSize=Math.floor(d.tileSize/2),d.zoomReverse?(d.zoomOffset--,d.minZoom=Math.min(d.maxZoom,d.minZoom+1)):(d.zoomOffset++,d.maxZoom=Math.max(d.minZoom,d.maxZoom-1)),d.minZoom=Math.max(0,d.minZoom)):d.zoomReverse?d.minZoom=Math.min(d.maxZoom,d.minZoom):d.maxZoom=Math.max(d.minZoom,d.maxZoom),typeof d.subdomains=="string"&&(d.subdomains=d.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(u,d){return this._url===u&&d===void 0&&(d=!0),this._url=u,d||this.redraw(),this},createTile:function(u,d){var _=document.createElement("img");return Xe(_,"load",s(this._tileOnLoad,this,d,_)),Xe(_,"error",s(this._tileOnError,this,d,_)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(_.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(_.referrerPolicy=this.options.referrerPolicy),_.alt="",_.src=this.getTileUrl(u),_},getTileUrl:function(u){var d={r:Ye.retina?"@2x":"",s:this._getSubdomain(u),x:u.x,y:u.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var _=this._globalTileRange.max.y-u.y;this.options.tms&&(d.y=_),d["-y"]=_}return b(this._url,i(d,this.options))},_tileOnLoad:function(u,d){Ye.ielt9?setTimeout(s(u,this,null,d),0):u(null,d)},_tileOnError:function(u,d,_){var E=this.options.errorTileUrl;E&&d.getAttribute("src")!==E&&(d.src=E),u(_,d)},_onTileRemove:function(u){u.tile.onload=null},_getZoomForUrl:function(){var u=this._tileZoom,d=this.options.maxZoom,_=this.options.zoomReverse,E=this.options.zoomOffset;return _&&(u=d-u),u+E},_getSubdomain:function(u){var d=Math.abs(u.x+u.y)%this.options.subdomains.length;return this.options.subdomains[d]},_abortLoading:function(){var u,d;for(u in this._tiles)if(this._tiles[u].coords.z!==this._tileZoom&&(d=this._tiles[u].el,d.onload=h,d.onerror=h,!d.complete)){d.src=P;var _=this._tiles[u].coords;zt(d),delete this._tiles[u],this.fire("tileabort",{tile:d,coords:_})}},_removeTile:function(u){var d=this._tiles[u];if(d)return d.el.setAttribute("src",P),xu.prototype._removeTile.call(this,u)},_tileReady:function(u,d,_){if(!(!this._map||_&&_.getAttribute("src")===P))return xu.prototype._tileReady.call(this,u,d,_)}});function JT(u,d){return new Pl(u,d)}var eO=Pl.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(u,d){this._url=u;var _=i({},this.defaultWmsParams);for(var E in d)E in this.options||(_[E]=d[E]);d=v(this,d);var M=d.detectRetina&&Ye.retina?2:1,j=this.getTileSize();_.width=j.x*M,_.height=j.y*M,this.wmsParams=_},onAdd:function(u){this._crs=this.options.crs||u.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var d=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[d]=this._crs.code,Pl.prototype.onAdd.call(this,u)},getTileUrl:function(u){var d=this._tileCoordsToNwSe(u),_=this._crs,E=re(_.project(d[0]),_.project(d[1])),M=E.min,j=E.max,J=(this._wmsVersion>=1.3&&this._crs===YT?[M.y,M.x,j.y,j.x]:[M.x,M.y,j.x,j.y]).join(","),de=Pl.prototype.getTileUrl.call(this,u);return de+w(this.wmsParams,de,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+J},setParams:function(u,d){return i(this.wmsParams,u),d||this.redraw(),this}});function u7(u,d){return new eO(u,d)}Pl.WMS=eO,JT.wms=u7;var co=fi.extend({options:{padding:.1},initialize:function(u){v(this,u),l(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&Je(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var u={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(u.zoomanim=this._onAnimZoom),u},_onAnimZoom:function(u){this._updateTransform(u.center,u.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(u,d){var _=this._map.getZoomScale(d,this._zoom),E=this._map.getSize().multiplyBy(.5+this.options.padding),M=this._map.project(this._center,d),j=E.multiplyBy(-_).add(M).subtract(this._map._getNewPixelOrigin(u,d));Ye.any3d?ca(this._container,j,_):cn(this._container,j)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var u in this._layers)this._layers[u]._reset()},_onZoomEnd:function(){for(var u in this._layers)this._layers[u]._project()},_updatePaths:function(){for(var u in this._layers)this._layers[u]._update()},_update:function(){var u=this.options.padding,d=this._map.getSize(),_=this._map.containerPointToLayerPoint(d.multiplyBy(-u)).round();this._bounds=new B(_,_.add(d.multiplyBy(1+u*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),tO=co.extend({options:{tolerance:0},getEvents:function(){var u=co.prototype.getEvents.call(this);return u.viewprereset=this._onViewPreReset,u},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){co.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var u=this._container=document.createElement("canvas");Xe(u,"mousemove",this._onMouseMove,this),Xe(u,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Xe(u,"mouseout",this._handleMouseOut,this),u._leaflet_disable_events=!0,this._ctx=u.getContext("2d")},_destroyContainer:function(){q(this._redrawRequest),delete this._ctx,zt(this._container),Et(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var u;this._redrawBounds=null;for(var d in this._layers)u=this._layers[d],u._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){co.prototype._update.call(this);var u=this._bounds,d=this._container,_=u.getSize(),E=Ye.retina?2:1;cn(d,u.min),d.width=E*_.x,d.height=E*_.y,d.style.width=_.x+"px",d.style.height=_.y+"px",Ye.retina&&this._ctx.scale(2,2),this._ctx.translate(-u.min.x,-u.min.y),this.fire("update")}},_reset:function(){co.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(u){this._updateDashArray(u),this._layers[l(u)]=u;var d=u._order={layer:u,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=d),this._drawLast=d,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(u){this._requestRedraw(u)},_removePath:function(u){var d=u._order,_=d.next,E=d.prev;_?_.prev=E:this._drawLast=E,E?E.next=_:this._drawFirst=_,delete u._order,delete this._layers[l(u)],this._requestRedraw(u)},_updatePath:function(u){this._extendRedrawBounds(u),u._project(),u._update(),this._requestRedraw(u)},_updateStyle:function(u){this._updateDashArray(u),this._requestRedraw(u)},_updateDashArray:function(u){if(typeof u.options.dashArray=="string"){var d=u.options.dashArray.split(/[, ]+/),_=[],E,M;for(M=0;M')}}catch{}return function(u){return document.createElement("<"+u+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),f7={_initContainer:function(){this._container=ft("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(co.prototype._update.call(this),this.fire("update"))},_initPath:function(u){var d=u._container=Su("shape");Je(d,"leaflet-vml-shape "+(this.options.className||"")),d.coordsize="1 1",u._path=Su("path"),d.appendChild(u._path),this._updateStyle(u),this._layers[l(u)]=u},_addPath:function(u){var d=u._container;this._container.appendChild(d),u.options.interactive&&u.addInteractiveTarget(d)},_removePath:function(u){var d=u._container;zt(d),u.removeInteractiveTarget(d),delete this._layers[l(u)]},_updateStyle:function(u){var d=u._stroke,_=u._fill,E=u.options,M=u._container;M.stroked=!!E.stroke,M.filled=!!E.fill,E.stroke?(d||(d=u._stroke=Su("stroke")),M.appendChild(d),d.weight=E.weight+"px",d.color=E.color,d.opacity=E.opacity,E.dashArray?d.dashStyle=x(E.dashArray)?E.dashArray.join(" "):E.dashArray.replace(/( *, *)/g," "):d.dashStyle="",d.endcap=E.lineCap.replace("butt","flat"),d.joinstyle=E.lineJoin):d&&(M.removeChild(d),u._stroke=null),E.fill?(_||(_=u._fill=Su("fill")),M.appendChild(_),_.color=E.fillColor||E.color,_.opacity=E.fillOpacity):_&&(M.removeChild(_),u._fill=null)},_updateCircle:function(u){var d=u._point.round(),_=Math.round(u._radius),E=Math.round(u._radiusY||_);this._setPath(u,u._empty()?"M0 0":"AL "+d.x+","+d.y+" "+_+","+E+" 0,"+65535*360)},_setPath:function(u,d){u._path.v=d},_bringToFront:function(u){xl(u._container)},_bringToBack:function(u){Sl(u._container)}},Ih=Ye.vml?Su:De,Cu=co.extend({_initContainer:function(){this._container=Ih("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Ih("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){zt(this._container),Et(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){co.prototype._update.call(this);var u=this._bounds,d=u.getSize(),_=this._container;(!this._svgSize||!this._svgSize.equals(d))&&(this._svgSize=d,_.setAttribute("width",d.x),_.setAttribute("height",d.y)),cn(_,u.min),_.setAttribute("viewBox",[u.min.x,u.min.y,d.x,d.y].join(" ")),this.fire("update")}},_initPath:function(u){var d=u._path=Ih("path");u.options.className&&Je(d,u.options.className),u.options.interactive&&Je(d,"leaflet-interactive"),this._updateStyle(u),this._layers[l(u)]=u},_addPath:function(u){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(u._path),u.addInteractiveTarget(u._path)},_removePath:function(u){zt(u._path),u.removeInteractiveTarget(u._path),delete this._layers[l(u)]},_updatePath:function(u){u._project(),u._update()},_updateStyle:function(u){var d=u._path,_=u.options;d&&(_.stroke?(d.setAttribute("stroke",_.color),d.setAttribute("stroke-opacity",_.opacity),d.setAttribute("stroke-width",_.weight),d.setAttribute("stroke-linecap",_.lineCap),d.setAttribute("stroke-linejoin",_.lineJoin),_.dashArray?d.setAttribute("stroke-dasharray",_.dashArray):d.removeAttribute("stroke-dasharray"),_.dashOffset?d.setAttribute("stroke-dashoffset",_.dashOffset):d.removeAttribute("stroke-dashoffset")):d.setAttribute("stroke","none"),_.fill?(d.setAttribute("fill",_.fillColor||_.color),d.setAttribute("fill-opacity",_.fillOpacity),d.setAttribute("fill-rule",_.fillRule||"evenodd")):d.setAttribute("fill","none"))},_updatePoly:function(u,d){this._setPath(u,fe(u._parts,d))},_updateCircle:function(u){var d=u._point,_=Math.max(Math.round(u._radius),1),E=Math.max(Math.round(u._radiusY),1)||_,M="a"+_+","+E+" 0 1,0 ",j=u._empty()?"M0 0":"M"+(d.x-_)+","+d.y+M+_*2+",0 "+M+-_*2+",0 ";this._setPath(u,j)},_setPath:function(u,d){u._path.setAttribute("d",d)},_bringToFront:function(u){xl(u._path)},_bringToBack:function(u){Sl(u._path)}});Ye.vml&&Cu.include(f7);function rO(u){return Ye.svg||Ye.vml?new Cu(u):null}at.include({getRenderer:function(u){var d=u.options.renderer||this._getPaneRenderer(u.options.pane)||this.options.renderer||this._renderer;return d||(d=this._renderer=this._createRenderer()),this.hasLayer(d)||this.addLayer(d),d},_getPaneRenderer:function(u){if(u==="overlayPane"||u===void 0)return!1;var d=this._paneRenderers[u];return d===void 0&&(d=this._createRenderer({pane:u}),this._paneRenderers[u]=d),d},_createRenderer:function(u){return this.options.preferCanvas&&nO(u)||rO(u)}});var iO=Tl.extend({initialize:function(u,d){Tl.prototype.initialize.call(this,this._boundsToLatLngs(u),d)},setBounds:function(u){return this.setLatLngs(this._boundsToLatLngs(u))},_boundsToLatLngs:function(u){return u=G(u),[u.getSouthWest(),u.getNorthWest(),u.getNorthEast(),u.getSouthEast()]}});function d7(u,d){return new iO(u,d)}Cu.create=Ih,Cu.pointsToPath=fe,lo.geometryToLayer=kh,lo.coordsToLatLng=o0,lo.coordsToLatLngs=Mh,lo.latLngToCoords=s0,lo.latLngsToCoords=Rh,lo.getFeature=Ol,lo.asFeature=Nh,at.mergeOptions({boxZoom:!0});var oO=Ai.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(){Xe(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Et(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){zt(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(),mu(),V_(),this._startPoint=this._map.mouseEventToContainerPoint(u),Xe(document,{contextmenu:da,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(u){this._moved||(this._moved=!0,this._box=ft("div","leaflet-zoom-box",this._container),Je(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(u);var d=new B(this._point,this._startPoint),_=d.getSize();cn(this._box,d.min),this._box.style.width=_.x+"px",this._box.style.height=_.y+"px"},_finish:function(){this._moved&&(zt(this._box),en(this._container,"leaflet-crosshair")),gu(),H_(),Et(document,{contextmenu:da,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(u){if(!(u.which!==1&&u.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(s(this._resetState,this),0);var d=new W(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(d).fire("boxzoomend",{boxZoomBounds:d})}},_onKeyDown:function(u){u.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});at.addInitHook("addHandler","boxZoom",oO),at.mergeOptions({doubleClickZoom:!0});var sO=Ai.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(u){var d=this._map,_=d.getZoom(),E=d.options.zoomDelta,M=u.originalEvent.shiftKey?_-E:_+E;d.options.doubleClickZoom==="center"?d.setZoom(M):d.setZoomAround(u.containerPoint,M)}});at.addInitHook("addHandler","doubleClickZoom",sO),at.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var aO=Ai.extend({addHooks:function(){if(!this._draggable){var u=this._map;this._draggable=new qo(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))}Je(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){en(this._map._container,"leaflet-grab"),en(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var u=this._map;if(u._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var d=G(this._map.options.maxBounds);this._offsetLimit=re(this._map.latLngToContainerPoint(d.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(d.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;u.fire("movestart").fire("dragstart"),u.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(u){if(this._map.options.inertia){var d=this._lastTime=+new Date,_=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(_),this._times.push(d),this._prunePositions(d)}this._map.fire("move",u).fire("drag",u)},_prunePositions:function(u){for(;this._positions.length>1&&u-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var u=this._map.getSize().divideBy(2),d=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=d.subtract(u).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(u,d){return u-(u-d)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var u=this._draggable._newPos.subtract(this._draggable._startPos),d=this._offsetLimit;u.xd.max.x&&(u.x=this._viscousLimit(u.x,d.max.x)),u.y>d.max.y&&(u.y=this._viscousLimit(u.y,d.max.y)),this._draggable._newPos=this._draggable._startPos.add(u)}},_onPreDragWrap:function(){var u=this._worldWidth,d=Math.round(u/2),_=this._initialWorldOffset,E=this._draggable._newPos.x,M=(E-d+_)%u+d-_,j=(E+d+_)%u-d-_,J=Math.abs(M+_)0?j:-j))-d;this._delta=0,this._startTime=null,J&&(u.options.scrollWheelZoom==="center"?u.setZoom(d+J):u.setZoomAround(this._lastMousePos,d+J))}});at.addInitHook("addHandler","scrollWheelZoom",cO);var h7=600;at.mergeOptions({tapHold:Ye.touchNative&&Ye.safari&&Ye.mobile,tapTolerance:15});var uO=Ai.extend({addHooks:function(){Xe(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Et(this._map._container,"touchstart",this._onDown,this)},_onDown:function(u){if(clearTimeout(this._holdTimeout),u.touches.length===1){var d=u.touches[0];this._startPos=this._newPos=new Z(d.clientX,d.clientY),this._holdTimeout=setTimeout(s(function(){this._cancel(),this._isTapValid()&&(Xe(document,"touchend",$n),Xe(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",d))},this),h7),Xe(document,"touchend touchcancel contextmenu",this._cancel,this),Xe(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function u(){Et(document,"touchend",$n),Et(document,"touchend touchcancel",u)},_cancel:function(){clearTimeout(this._holdTimeout),Et(document,"touchend touchcancel contextmenu",this._cancel,this),Et(document,"touchmove",this._onMove,this)},_onMove:function(u){var d=u.touches[0];this._newPos=new Z(d.clientX,d.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(u,d){var _=new MouseEvent(u,{bubbles:!0,cancelable:!0,view:window,screenX:d.screenX,screenY:d.screenY,clientX:d.clientX,clientY:d.clientY});_._simulated=!0,d.target.dispatchEvent(_)}});at.addInitHook("addHandler","tapHold",uO),at.mergeOptions({touchZoom:Ye.touch,bounceAtZoomLimits:!0});var fO=Ai.extend({addHooks:function(){Je(this._map._container,"leaflet-touch-zoom"),Xe(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){en(this._map._container,"leaflet-touch-zoom"),Et(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(u){var d=this._map;if(!(!u.touches||u.touches.length!==2||d._animatingZoom||this._zooming)){var _=d.mouseEventToContainerPoint(u.touches[0]),E=d.mouseEventToContainerPoint(u.touches[1]);this._centerPoint=d.getSize()._divideBy(2),this._startLatLng=d.containerPointToLatLng(this._centerPoint),d.options.touchZoom!=="center"&&(this._pinchStartLatLng=d.containerPointToLatLng(_.add(E)._divideBy(2))),this._startDist=_.distanceTo(E),this._startZoom=d.getZoom(),this._moved=!1,this._zooming=!0,d._stop(),Xe(document,"touchmove",this._onTouchMove,this),Xe(document,"touchend touchcancel",this._onTouchEnd,this),$n(u)}},_onTouchMove:function(u){if(!(!u.touches||u.touches.length!==2||!this._zooming)){var d=this._map,_=d.mouseEventToContainerPoint(u.touches[0]),E=d.mouseEventToContainerPoint(u.touches[1]),M=_.distanceTo(E)/this._startDist;if(this._zoom=d.getScaleZoom(M,this._startZoom),!d.options.bounceAtZoomLimits&&(this._zoomd.getMaxZoom()&&M>1)&&(this._zoom=d._limitZoom(this._zoom)),d.options.touchZoom==="center"){if(this._center=this._startLatLng,M===1)return}else{var j=_._add(E)._divideBy(2)._subtract(this._centerPoint);if(M===1&&j.x===0&&j.y===0)return;this._center=d.unproject(d.project(this._pinchStartLatLng,this._zoom).subtract(j),this._zoom)}this._moved||(d._moveStart(!0,!1),this._moved=!0),q(this._animRequest);var J=s(d._move,d,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=Y(J,this,!0),$n(u)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,q(this._animRequest),Et(document,"touchmove",this._onTouchMove,this),Et(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))}});at.addInitHook("addHandler","touchZoom",fO),at.BoxZoom=oO,at.DoubleClickZoom=sO,at.Drag=aO,at.Keyboard=lO,at.ScrollWheelZoom=cO,at.TapHold=uO,at.TouchZoom=fO,n.Bounds=B,n.Browser=Ye,n.CRS=me,n.Canvas=tO,n.Circle=i0,n.CircleMarker=Ph,n.Class=K,n.Control=ui,n.DivIcon=QT,n.DivOverlay=Ii,n.DomEvent=R$,n.DomUtil=k$,n.Draggable=qo,n.Evented=se,n.FeatureGroup=so,n.GeoJSON=lo,n.GridLayer=xu,n.Handler=Ai,n.Icon=El,n.ImageOverlay=Lh,n.LatLng=ne,n.LatLngBounds=W,n.Layer=fi,n.LayerGroup=Cl,n.LineUtil=V$,n.Map=at,n.Marker=Oh,n.Mixin=$$,n.Path=Go,n.Point=Z,n.PolyUtil=H$,n.Polygon=Tl,n.Polyline=ao,n.Popup=Dh,n.PosAnimation=DT,n.Projection=W$,n.Rectangle=iO,n.Renderer=co,n.SVG=Cu,n.SVGOverlay=XT,n.TileLayer=Pl,n.Tooltip=Ah,n.Transformation=Q,n.Util=ee,n.VideoOverlay=KT,n.bind=s,n.bounds=re,n.canvas=nO,n.circle=J$,n.circleMarker=Q$,n.control=_u,n.divIcon=l7,n.extend=i,n.featureGroup=Z$,n.geoJSON=ZT,n.geoJson=n7,n.gridLayer=c7,n.icon=K$,n.imageOverlay=r7,n.latLng=ae,n.latLngBounds=G,n.layerGroup=G$,n.map=N$,n.marker=X$,n.point=I,n.polygon=t7,n.polyline=e7,n.popup=s7,n.rectangle=d7,n.setOptions=v,n.stamp=l,n.svg=rO,n.svgOverlay=o7,n.tileLayer=JT,n.tooltip=a7,n.transformation=X,n.version=r,n.videoOverlay=i7;var p7=window.L;n.noConflict=function(){return window.L=p7,this},window.L=n})})(Q0e,Gs);const FL=Gs;function gT(e,t,n){return Object.freeze({instance:e,context:t,container:n})}function vT(e,t){return t==null?function(r,i){const o=H.useRef();return o.current||(o.current=e(r,i)),o}:function(r,i){const o=H.useRef();o.current||(o.current=e(r,i));const s=H.useRef(r),{instance:a}=o.current;return H.useEffect(function(){s.current!==r&&(t(a,r,s.current),s.current=r)},[a,r,i]),o}}function J0e(e,t){H.useEffect(function(){return(t.layerContainer??t.map).addLayer(e.instance),function(){var o;(o=t.layerContainer)==null||o.removeLayer(e.instance),t.map.removeLayer(e.instance)}},[t,e])}function i$(e){return function(n){const r=n$(),i=e(mT(n,r),r);return JF(r.map,n.attribution),r$(i.current,n.eventHandlers),J0e(i.current,r),i}}function ebe(e,t){const n=vT(e,t),r=i$(n);return G0e(r)}function tbe(e,t){const n=vT(e),r=X0e(n,t);return Z0e(r)}function nbe(e,t){const n=vT(e,t),r=i$(n);return K0e(r)}function rbe(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 Lx(){return Lx=Object.assign||function(e){for(var t=1;t(m==null?void 0:m.map)??null,[m]);const v=H.useCallback(y=>{if(y!==null&&m===null){const b=new Gs.Map(y,f);n!=null&&c!=null?b.setView(n,c):e!=null&&b.fitBounds(e,t),l!=null&&b.whenReady(l),g(Y0e(b))}},[]);H.useEffect(()=>()=>{m==null||m.map.remove()},[m]);const w=m?V.createElement(t$,{value:m},r):s??null;return V.createElement("div",Lx({},p,{ref:v}),w)}const obe=H.forwardRef(ibe),sbe=ebe(function({position:t,...n},r){const i=new Gs.Marker(t,n);return gT(i,q0e(r,{overlayContainer:i}))},function(t,n,r){n.position!==r.position&&t.setLatLng(n.position),n.icon!=null&&n.icon!==r.icon&&t.setIcon(n.icon),n.zIndexOffset!=null&&n.zIndexOffset!==r.zIndexOffset&&t.setZIndexOffset(n.zIndexOffset),n.opacity!=null&&n.opacity!==r.opacity&&t.setOpacity(n.opacity),t.dragging!=null&&n.draggable!==r.draggable&&(n.draggable===!0?t.dragging.enable():t.dragging.disable())}),abe=tbe(function(t,n){const r=new Gs.Popup(t,n.overlayContainer);return gT(r,n)},function(t,n,{position:r},i){H.useEffect(function(){const{instance:s}=t;function a(c){c.popup===s&&(s.update(),i(!0))}function l(c){c.popup===s&&i(!1)}return n.map.on({popupopen:a,popupclose:l}),n.overlayContainer==null?(r!=null&&s.setLatLng(r),s.openOn(n.map)):n.overlayContainer.bindPopup(s),function(){var f;n.map.off({popupopen:a,popupclose:l}),(f=n.overlayContainer)==null||f.unbindPopup(),n.map.removeLayer(s)}},[t,n,i,r])}),lbe=nbe(function({url:t,...n},r){const i=new Gs.TileLayer(t,mT(n,r));return gT(i,r)},function(t,n,r){rbe(t,n,r);const{url:i}=n;i!=null&&i!==r.url&&t.setUrl(i)});const cbe=()=>C(lbe,{attribution:'© OpenStreetMap contributors',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),ube=e=>{if(e.length===0)return{};if(e.length>1)return{bounds:e.map(St("latLong"))};const[{latLong:t}]=e;return{zoom:10,center:t}},o$=({toggle:e,isOpen:t,title:n,locations:r=[]})=>C(Wo,{toggle:e,isOpen:t,className:"map-modal__modal",contentClassName:"map-modal__modal-content",children:U(Ri,{className:"map-modal__modal-body",children:[U("h3",{className:"map-modal__modal-title",children:[n,C("button",{type:"button",className:"btn-close float-end","aria-label":"Close",onClick:e})]}),U(obe,{...ube(r),children:[C(cbe,{}),r.map(({cityName:i,latLong:o,count:s},a)=>C(sbe,{position:o,children:U(abe,{children:[C("b",{children:s})," visit",s>1?"s":""," from ",C("b",{children:i})]})},a))]})]})});const fbe=({modalTitle:e,activeCities:t,locations:n=[]})=>{const[r,,i,o]=$t(),[s,a,l]=$t(),[c,f]=H.useState([]),h=E_(),p=v=>t?v.filter(({cityName:w})=>t==null?void 0:t.includes(w)):v,m=()=>{if(!t){f(n),i();return}l()},g=v=>()=>{f(v?p(n):n),i()};return U(We,{children:[C(ht,{color:"link",className:"open-map-modal-btn__btn",id:h,onClick:m,children:C(Fe,{icon:l6})}),C(Or,{placement:"left",target:h,children:"Show in map"}),C(ou,{isOpen:s,toggle:a,inNavbar:!0,children:U(vl,{end:!0,children:[C(Ve,{onClick:g(!1),children:"Show all locations"}),C(Ve,{onClick:g(!0),children:"Show locations in current page"})]})}),C(o$,{toggle:o,isOpen:r,title:e,locations:c})]})},dbe=({onChange:e,selected:t={},className:n,isOrphanVisits:r})=>{const{orphanVisitsType:i,excludeBots:o=!1}=t,s=l=>({active:i===l,onClick:()=>e({...t,orphanVisitsType:l===(t==null?void 0:t.orphanVisitsType)?void 0:l})});return U(oa,{text:"Filters",dropdownClassName:n,className:"me-3",right:!0,minWidth:250,children:[C(Ve,{header:!0,children:"Bots:"}),C(Ve,{active:o,onClick:()=>e({...t,excludeBots:!(t!=null&&t.excludeBots)}),children:"Exclude potential bots"}),r&&U(We,{children:[C(Ve,{divider:!0}),C(Ve,{header:!0,children:"Orphan visits type:"}),C(Ve,{...s("base_url"),children:"Base URL"}),C(Ve,{...s("invalid_short_url"),children:"Invalid short URL"}),C(Ve,{...s("regular_404"),children:"Regular 404"})]}),C(Ve,{divider:!0}),C(Ve,{disabled:!yi(t),onClick:()=>e({excludeBots:!1,orphanVisitsType:void 0}),children:C("i",{children:"Clear filters"})})]})},s$=(e,t)=>!zo(e)&&yi(e[t]),$L=e=>typeof e=="number"?e:e?parseFloat(e):0,hbe=(e,{os:t})=>{e[t]=(e[t]||0)+1},pbe=(e,{browser:t})=>{e[t]=(e[t]||0)+1},mbe=(e,{referer:t})=>{e[t]=(e[t]||0)+1},a$=e=>(t,n)=>{const i=s$(n,e)?n[e]:"Unknown";t[i]=(t[i]||0)+1},gbe=a$("country"),vbe=a$("city"),ybe=(e,t)=>{if(!s$(t,"city")||t.city==="Unknown")return;const{city:n,latitude:r,longitude:i}=t,o=e[n]||{cityName:n,count:0,latLong:[$L(r),$L(i)]};o.count+=1,e[n]=o},_be=(e,t)=>{if(!i0e(t))return;const{visitedUrl:n}=t;e[n]=(e[n]||0)+1},l$=e=>e.reduce((t,n)=>(hbe(t.os,n),pbe(t.browsers,n),mbe(t.referrers,n),gbe(t.countries,n),vbe(t.cities,n),ybe(t.citiesForMap,n),_be(t.visitedUrls,n),t),{os:{},browsers:{},referrers:{},countries:{},cities:{},citiesForMap:{},visitedUrls:{}}),c$=RI(e=>{const{userAgent:t,date:n,referer:r,visitLocation:i,potentialBot:o}=e,s={date:n,potentialBot:o,...E0e(t),referer:T0e(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 fT(e)?{...s,type:e.type,visitedUrl:e.visitedUrl}:s}),bbe=Object.freeze(Object.defineProperty({__proto__:null,normalizeVisits:c$,processStatsFromVisits:l$},Symbol.toStringTag,{value:"Module"}));const sf=20,wbe=({browser:e,os:t,referer:n,country:r,city:i,...o},s)=>`${e} ${t} ${n} ${r} ${i} ${o.visitedUrl}`.toLowerCase().includes(s.toLowerCase()),xbe=(e,t)=>t.filter(n=>wbe(n,e)),Sbe=(e,t)=>VI(t,e),Cbe=(e,t,n)=>{const r=t?xbe(t,e):[...e],i=Sbe(n,r),o=i.length;return{visitsGroups:dd(sf,i),total:o}},Ebe=({visits:e,selectedVisits:t=[],setSelectedVisits:n,matchMedia:r=window.matchMedia,isOrphanVisits:i=!1})=>{var k,N;const o="visits-table__header-cell visits-table__sticky",s=()=>r("(max-width: 767px)").matches,[a,l]=H.useState(s()),[c,f]=H.useState(void 0),[h,p]=H.useState({}),m=H.useMemo(()=>Cbe(e,c,h),[c,h]),g=H.useRef(!0),[v,w]=H.useState(1),y=v*sf,b=y-sf,x=8+Number(i),T=D=>()=>p({field:D,dir:a_(D,h.field,h.dir)}),P=D=>C(If,{currentOrder:h,field:D,className:"visits-table__header-icon"});return H.useEffect(()=>{const D=()=>l(s());return window.addEventListener("resize",D),()=>window.removeEventListener("resize",D)},[]),H.useEffect(()=>{w(1),!g.current&&n([]),g.current=!1},[c]),C("div",{className:"table-responsive-md",children:U("table",{className:"table table-bordered table-hover table-sm visits-table",children:[U("thead",{className:"visits-table__header",children:[U("tr",{children:[C("th",{className:`${o} text-center`,onClick:()=>n(t.length0})})}),U("th",{className:`${o} text-center`,onClick:T("potentialBot"),children:[C(Fe,{icon:LM}),P("potentialBot")]}),U("th",{className:o,onClick:T("date"),children:["Date",P("date")]}),U("th",{className:o,onClick:T("country"),children:["Country",P("country")]}),U("th",{className:o,onClick:T("city"),children:["City",P("city")]}),U("th",{className:o,onClick:T("browser"),children:["Browser",P("browser")]}),U("th",{className:o,onClick:T("os"),children:["OS",P("os")]}),U("th",{className:o,onClick:T("referer"),children:["Referrer",P("referer")]}),i&&U("th",{className:o,onClick:T("visitedUrl"),children:["Visited URL",P("visitedUrl")]})]}),C("tr",{children:C("td",{colSpan:x,className:"p-0",children:C(sh,{noBorder:!0,large:!1,onChange:f})})})]}),U("tbody",{children:[!((k=m.visitsGroups[v-1])!=null&&k.length)&&C("tr",{children:C("td",{colSpan:x,className:"text-center",children:"No visits found with current filtering"})}),(N=m.visitsGroups[v-1])==null?void 0:N.map((D,z)=>{const A=t.includes(D);return U("tr",{style:{cursor:"pointer"},className:ge({"table-active":A}),onClick:()=>n(A?t.filter(Y=>Y!==D):[...t,D]),children:[C("td",{className:"text-center",children:A&&C(Fe,{icon:pd,className:"text-primary"})}),C("td",{className:"text-center",children:D.potentialBot&&U(We,{children:[C(Fe,{icon:LM,id:`botIcon${z}`}),C(Or,{placement:"right",target:`botIcon${z}`,children:"Potentially a visit from a bot or crawler"})]})}),C("td",{children:C(sy,{date:D.date})}),C("td",{children:D.country}),C("td",{children:D.city}),C("td",{children:D.browser}),C("td",{children:D.os}),C("td",{children:D.referer}),i&&C("td",{children:D.visitedUrl})]},z)})]}),m.total>sf&&C("tfoot",{children:C("tr",{children:C("td",{colSpan:x,className:"visits-table__footer-cell visits-table__sticky",children:U("div",{className:"row",children:[C("div",{className:"col-md-6",children:C(oT,{pagesCount:Math.ceil(m.total/sf),currentPage:v,setCurrentPage:w,centered:a})}),C("div",{className:ge("col-md-6",{"d-flex align-items-center flex-row-reverse":!a,"text-center mt-3":a}),children:U("div",{children:["Visits ",C("b",{children:bn(b+1)})," to"," ",C("b",{children:bn(zI(y,m.total))})," of"," ",C("b",{children:bn(m.total)})]})})]})})})})]})})},Ul={byTime:{title:"By time",subPath:"by-time",icon:JX},byContext:{title:"By context",subPath:"by-context",icon:SC},byLocation:{title:"By location",subPath:"by-location",icon:l6},list:{title:"List",subPath:"list",icon:a6}};let zp;const gh=({children:e,visitsInfo:t,getVisits:n,cancelGetVisits:r,settings:i,exportCsv:o,isOrphanVisits:s=!1})=>{var W;const{visits:a,loading:l,loadingLarge:c,error:f,errorData:h,progress:p,fallbackInterval:m}=t,[{dateRange:g,visitsFilter:v},w]=H0e(),y=er(({startDate:G,endDate:ne})=>({dateRange:{startDate:G??void 0,endDate:ne??void 0}}),w),b=H.useRef(g??m??((W=i.visits)==null?void 0:W.defaultInterval)??"last30Days"),[x,T]=H.useState([]),[P,k]=H.useState(),N=H.useRef(!0),{search:D}=kn(),z=G=>G?`${G}${D}`:D,A=H.useMemo(()=>c$(a),[a]),{os:Y,browsers:q,referrers:ee,countries:K,cities:te,citiesForMap:oe,visitedUrls:se}=H.useMemo(()=>l$(A),[A]),Z=H.useMemo(()=>{var G;return{...v,excludeBots:v.excludeBots??((G=i.visits)==null?void 0:G.excludeBots)}},[v]),$=s_(oe),I=G=>{zp=void 0,T(G)},B=G=>ne=>{const ae=`${G}_${ne}`;zp===ae?(T([]),k(void 0),zp=void 0):(T(A.filter(MZ(G,ne))),k(ne),zp=ae)};H.useEffect(()=>r,[]),H.useEffect(()=>{const G=N.current?g??cpe(b.current):g;n({dateRange:G,filter:Z},N.current),N.current=!1},[g,v]),H.useEffect(()=>{var G;m&&b.current===(((G=i.visits)==null?void 0:G.defaultInterval)??"last30Days")&&(b.current=m)},[m]);const re=()=>c?U(To,{loading:!0,children:["This is going to take a while... :S",C(cE,{value:p,striped:p===100,className:"mt-3"})]}):l?C(To,{loading:!0}):f?C(Dr,{type:"error",children:C(Io,{errorData:h,fallbackMessage:"An error occurred while loading visits :("})}):Cr(a)?C(To,{children:"There are no visits matching current filter"}):U(We,{children:[C(G8,{fill:!0,children:Object.values(Ul).map(({title:G,icon:ne,subPath:ae},me)=>U(Df,{to:z(ae),replace:!0,children:[C(Fe,{icon:ne}),C("span",{className:"ms-2 d-none d-sm-inline",children:G})]},me))}),C(Qn,{children:U(e_,{children:[C(gt,{path:Ul.byTime.subPath,element:C("div",{className:"col-12 mt-3",children:C(D0e,{title:"Visits during time",visits:A,highlightedVisits:x,highlightedLabel:P,setSelectedVisits:I})})}),C(gt,{path:Ul.byContext.subPath,element:U(We,{children:[C("div",{className:ge("mt-3 col-lg-6",{"col-xl-4":!s}),children:C(ML,{title:"Operating systems",stats:Y})}),C("div",{className:ge("mt-3 col-lg-6",{"col-xl-4":!s}),children:C(ML,{title:"Browsers",stats:q})}),C("div",{className:ge("mt-3",{"col-xl-4":!s,"col-lg-6":s}),children:C(Bp,{title:"Referrers",stats:ee,withPagination:!1,highlightedStats:$p(x,"referer"),highlightedLabel:P,sortingItems:{name:"Referrer name",amount:"Visits amount"},onClick:B("referer")})}),s&&C("div",{className:"mt-3 col-lg-6",children:C(Bp,{title:"Visited URLs",stats:se,highlightedLabel:P,highlightedStats:$p(x,"visitedUrl"),sortingItems:{visitedUrl:"Visited URL",amount:"Visits amount"},onClick:B("visitedUrl")})})]})}),C(gt,{path:Ul.byLocation.subPath,element:U(We,{children:[C("div",{className:"col-lg-6 mt-3",children:C(Bp,{title:"Countries",stats:K,highlightedStats:$p(x,"country"),highlightedLabel:P,sortingItems:{name:"Country name",amount:"Visits amount"},onClick:B("country")})}),C("div",{className:"col-lg-6 mt-3",children:C(Bp,{title:"Cities",stats:te,highlightedStats:$p(x,"city"),highlightedLabel:P,extraHeaderContent:G=>$.length>0&&C(fbe,{modalTitle:"Cities",locations:$,activeCities:G}),sortingItems:{name:"City name",amount:"Visits amount"},onClick:B("city")})})]})}),C(gt,{path:Ul.list.subPath,element:C("div",{className:"col-12",children:C(Ebe,{visits:A,selectedVisits:x,setSelectedVisits:I,isOrphanVisits:s})})}),C(gt,{path:"*",element:C(eC,{replace:!0,to:z(Ul.byTime.subPath)})})]})})]});return U(We,{children:[e,C("section",{className:"mt-3",children:U("div",{className:"row flex-md-row-reverse",children:[C("div",{className:"col-lg-7 col-xl-6",children:U("div",{className:"d-md-flex",children:[C("div",{className:"flex-fill",children:C(xF,{updatable:!0,disabled:l,initialDateRange:b.current,defaultText:"All visits",onDatesChange:y})}),C(dbe,{className:"ms-0 ms-md-2 mt-3 mt-md-0",isOrphanVisits:s,selected:Z,onChange:G=>w({visitsFilter:G})})]})}),a.length>0&&C("div",{className:"col-lg-5 col-xl-6 mt-3 mt-lg-0",children:U("div",{className:"d-flex",children:[C(nF,{className:"btn-md-block",amount:A.length,onClick:()=>o(A)}),U(ht,{outline:!0,disabled:x.length===0,className:"btn-md-block ms-2",onClick:()=>I([]),children:["Clear selection ",x.length>0&&U(We,{children:["(",bn(x.length),")"]})]})]})})]})}),C("section",{className:"mt-3",children:re()})]})},Tbe=({exportVisits:e})=>sa(({getDomainVisits:t,domainVisits:n,cancelGetDomainVisits:r,settings:i})=>{const o=ia(),{domain:s=""}=Js(),[a,l=a]=s.split("_");return C(gh,{getVisits:(h,p)=>t({domain:l,query:ph(h),doIntervalFallback:p}),cancelGetVisits:r,visitsInfo:n,settings:i,exportCsv:h=>e(`domain_${a}_visits.csv`,h),children:C(mh,{goBack:o,visits:n.visits,title:`"${a}" visits`})})},()=>[Jr.visits]),Obe=({exportVisits:e})=>sa(({getNonOrphanVisits:t,nonOrphanVisits:n,cancelGetNonOrphanVisits:r,settings:i})=>{const o=ia();return C(gh,{getVisits:(l,c)=>t({query:ph(l),doIntervalFallback:c}),cancelGetVisits:r,visitsInfo:n,settings:i,exportCsv:l=>e("non_orphan_visits.csv",l),children:C(mh,{title:"Non-orphan visits",goBack:o,visits:n.visits})})},()=>[Jr.visits]),Pbe=({exportVisits:e})=>sa(({getOrphanVisits:t,orphanVisits:n,cancelGetOrphanVisits:r,settings:i})=>{const o=ia();return C(gh,{getVisits:(l,c)=>{var f;return t({query:ph(l),orphanVisitsType:(f=l.filter)==null?void 0:f.orphanVisitsType,doIntervalFallback:c})},cancelGetVisits:r,visitsInfo:n,settings:i,exportCsv:l=>e("orphan_visits.csv",l),isOrphanVisits:!0,children:C(mh,{title:"Orphan visits",goBack:o,visits:n.visits})})},()=>[Jr.orphanVisits]),u$="shlink/orphanVisits",kbe={visits:[],loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},Mbe=e=>uh({typePrefix:`${u$}/getNonOrphanVisits`,createLoaders:({query:t={},doIntervalFallback:n=!1},r)=>{const{getNonOrphanVisits:i}=e(r),o=async(a,l)=>i({...t,page:a,itemsPerPage:l}),s=fh(n,i);return[o,s]},getExtraFulfilledPayload:({query:t={}})=>({query:t}),shouldCancel:t=>t().orphanVisits.cancelLoad}),Rbe=e=>dh({name:u$,initialState:kbe,asyncThunkCreator:e,filterCreatedVisits:({query:t={}},n)=>{const{startDate:r,endDate:i}=t;return n.filter(({visit:o})=>ah(o.date,r,i))}}),f$="shlink/orphanVisits",Nbe={visits:[],loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},Lbe=(e,t)=>!t||t===e.type,Dbe=e=>uh({typePrefix:`${f$}/getOrphanVisits`,createLoaders:({orphanVisitsType:t,query:n={},doIntervalFallback:r=!1},i)=>{const{getOrphanVisits:o}=e(i),s=async(l,c)=>o({...n,page:l,itemsPerPage:c}).then(f=>{const h=f.data.filter(p=>fT(p)&&Lbe(p,t));return{...f,data:h}}),a=fh(r,o);return[s,a]},getExtraFulfilledPayload:({query:t={}})=>({query:t}),shouldCancel:t=>t().orphanVisits.cancelLoad}),Abe=e=>dh({name:f$,initialState:Nbe,asyncThunkCreator:e,filterCreatedVisits:({query:t={}},n)=>{const{startDate:r,endDate:i}=t;return n.filter(({visit:o,shortUrl:s})=>!s&&ah(o.date,r,i))}}),d$="shlink/shortUrlVisits",Ibe={visits:[],shortCode:"",domain:void 0,loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},Fbe=e=>uh({typePrefix:`${d$}/getShortUrlVisits`,createLoaders:({shortCode:t,query:n={},doIntervalFallback:r=!1},i)=>{const{getShortUrlVisits:o}=e(i),s=async(l,c)=>o(t,{...n,page:l,itemsPerPage:c}),a=fh(r,async l=>o(t,{...l,domain:n.domain}));return[s,a]},getExtraFulfilledPayload:({shortCode:t,query:n={}})=>({shortCode:t,query:n,domain:n.domain}),shouldCancel:t=>t().shortUrlVisits.cancelLoad}),$be=e=>dh({name:d$,initialState:Ibe,asyncThunkCreator:e,filterCreatedVisits:({shortCode:t,domain:n,query:r={}},i)=>{const{startDate:o,endDate:s}=r;return i.filter(({shortUrl:a,visit:l})=>a&&Mf(a,t,n)&&ah(l.date,o,s))}}),h$="shlink/tagVisits",jbe={visits:[],tag:"",loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},Bbe=e=>uh({typePrefix:`${h$}/getTagVisits`,createLoaders:({tag:t,query:n={},doIntervalFallback:r=!1},i)=>{const{getTagVisits:o}=e(i),s=async(l,c)=>o(t,{...n,page:l,itemsPerPage:c}),a=fh(r,async l=>o(t,l));return[s,a]},getExtraFulfilledPayload:({tag:t,query:n={}})=>({tag:t,query:n}),shouldCancel:t=>t().tagVisits.cancelLoad}),zbe=e=>dh({name:h$,initialState:jbe,asyncThunkCreator:e,filterCreatedVisits:({tag:t,query:n={}},r)=>{const{startDate:i,endDate:o}=n;return r.filter(({shortUrl:s,visit:a})=>(s==null?void 0:s.tags.includes(t))&&ah(a.date,i,o))}}),p$="shlink/visitsOverview",Up={nonOrphanVisits:{total:0},orphanVisits:{total:0},loading:!1,error:!1},jL=e=>e.filter(({visit:t})=>t.potentialBot).length,Ube=e=>ir(`${p$}/loadVisitsOverview`,(t,{getState:n})=>e(n).getVisitsOverview().then(r=>{var i,o,s,a,l,c;return{nonOrphanVisits:{total:((i=r.nonOrphanVisits)==null?void 0:i.total)??r.visitsCount,nonBots:(o=r.nonOrphanVisits)==null?void 0:o.nonBots,bots:(s=r.nonOrphanVisits)==null?void 0:s.bots},orphanVisits:{total:((a=r.orphanVisits)==null?void 0:a.total)??r.orphanVisitsCount,nonBots:(l=r.orphanVisits)==null?void 0:l.nonBots,bots:(c=r.orphanVisits)==null?void 0:c.bots}}})),Vbe=e=>Yn({name:p$,initialState:Up,reducers:{},extraReducers:t=>{t.addCase(e.pending,()=>({...Up,loading:!0})),t.addCase(e.rejected,()=>({...Up,error:!0})),t.addCase(e.fulfilled,(n,{payload:r})=>({...Up,...r})),t.addCase(ch,({nonOrphanVisits:n,orphanVisits:r,...i},{payload:o})=>{const{nonOrphanVisits:s,orphanVisits:a}=o0e(o.createdVisits),l=s.length,c=jL(s),f=l-c,h=a.length,p=jL(a),m=h-p;return{...i,nonOrphanVisits:{total:n.total+l,bots:n.bots&&n.bots+c,nonBots:n.nonBots&&n.nonBots+f},orphanVisits:{total:r.total+h,bots:r.bots&&r.bots+p,nonBots:r.nonBots&&r.nonBots+m}}})}});const Hbe=({shortUrlDetail:e,shortUrlVisits:t,goBack:n})=>{const{shortUrl:r,loading:i}=e,{visits:o}=t,s=(r==null?void 0:r.shortUrl)??"",a=(r==null?void 0:r.longUrl)??"",l=r==null?void 0:r.title;return U(mh,{title:U(We,{children:["Visits for ",C(Ei,{href:s})]}),goBack:n,visits:o,shortUrl:r,children:[C("hr",{}),U("div",{children:["Created: ",(()=>r?U("span",{children:[C("b",{id:"created",className:"short-url-visits-header__created-at",children:C(sy,{date:r.dateCreated,relative:!0})}),C(Or,{placement:"bottom",target:"created",children:C(sy,{date:r.dateCreated})})]}):C("small",{children:"Loading..."}))()]}),U("div",{className:"long-url-container",children:[`${l?"Title":"Long URL"}: `,i&&C("small",{children:"Loading..."}),!i&&C(Ei,{href:a,children:l??a})]})]})},Wbe=({exportVisits:e})=>sa(({shortUrlVisits:t,shortUrlDetail:n,getShortUrlVisits:r,getShortUrlDetail:i,cancelGetShortUrlVisits:o,settings:s})=>{const{shortCode:a=""}=Js(),{search:l}=kn(),c=ia(),{domain:f}=gl(l),h=(m,g)=>r({shortCode:gm(a),query:{...ph(m),domain:f},doIntervalFallback:g}),p=m=>{var g;return e(`short-url_${(g=n.shortUrl)==null?void 0:g.shortUrl.replace(/https?:\/\//g,"")}_visits.csv`,m)};return H.useEffect(()=>{i({shortCode:gm(a),domain:f})},[]),C(gh,{getVisits:h,cancelGetVisits:o,visitsInfo:t,settings:s,exportCsv:p,children:C(Hbe,{shortUrlDetail:n,shortUrlVisits:t,goBack:c})})},(t,n)=>n.shortCode?[Jr.shortUrlVisits(gm(n.shortCode))]:[]),Ybe=({tagVisits:e,goBack:t,colorGenerator:n})=>{const{visits:r,tag:i}=e;return C(mh,{title:U("span",{className:"d-flex align-items-center justify-content-center",children:[C("span",{className:"me-2",children:"Visits for"}),C(XE,{text:i,colorGenerator:n})]}),goBack:t,visits:r})},qbe=(e,{exportVisits:t})=>sa(({getTagVisits:n,tagVisits:r,cancelGetTagVisits:i,settings:o})=>{const s=ia(),{tag:a=""}=Js();return C(gh,{getVisits:(f,h)=>n({tag:a,query:ph(f),doIntervalFallback:h}),cancelGetVisits:i,visitsInfo:r,settings:o,exportCsv:f=>t(`tag_${a}_visits.csv`,f),children:C(Ybe,{tagVisits:r,goBack:s,colorGenerator:e})})},()=>[Jr.visits]),Gbe=(e,t)=>{e.serviceFactory("MapModal",()=>o$),e.serviceFactory("ShortUrlVisits",Wbe,"ReportExporter"),e.decorator("ShortUrlVisits",t(["shortUrlVisits","shortUrlDetail","mercureInfo","settings"],["getShortUrlVisits","getShortUrlDetail","cancelGetShortUrlVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("TagVisits",qbe,"ColorGenerator","ReportExporter"),e.decorator("TagVisits",t(["tagVisits","mercureInfo","settings"],["getTagVisits","cancelGetTagVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("DomainVisits",Tbe,"ReportExporter"),e.decorator("DomainVisits",t(["domainVisits","mercureInfo","settings"],["getDomainVisits","cancelGetDomainVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("OrphanVisits",Pbe,"ReportExporter"),e.decorator("OrphanVisits",t(["orphanVisits","mercureInfo","settings"],["getOrphanVisits","cancelGetOrphanVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("NonOrphanVisits",Obe,"ReportExporter"),e.decorator("NonOrphanVisits",t(["nonOrphanVisits","mercureInfo","settings"],["getNonOrphanVisits","cancelGetNonOrphanVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("VisitsParser",()=>bbe),e.serviceFactory("getShortUrlVisits",Fbe,"buildShlinkApiClient"),e.serviceFactory("cancelGetShortUrlVisits",St("cancelGetVisits"),"shortUrlVisitsReducerCreator"),e.serviceFactory("getTagVisits",Bbe,"buildShlinkApiClient"),e.serviceFactory("cancelGetTagVisits",St("cancelGetVisits"),"tagVisitsReducerCreator"),e.serviceFactory("getDomainVisits",hpe,"buildShlinkApiClient"),e.serviceFactory("cancelGetDomainVisits",St("cancelGetVisits"),"domainVisitsReducerCreator"),e.serviceFactory("getOrphanVisits",Dbe,"buildShlinkApiClient"),e.serviceFactory("cancelGetOrphanVisits",St("cancelGetVisits"),"orphanVisitsReducerCreator"),e.serviceFactory("getNonOrphanVisits",Mbe,"buildShlinkApiClient"),e.serviceFactory("cancelGetNonOrphanVisits",St("cancelGetVisits"),"nonOrphanVisitsReducerCreator"),e.serviceFactory("createNewVisits",()=>ch),e.serviceFactory("loadVisitsOverview",Ube,"buildShlinkApiClient"),e.serviceFactory("visitsOverviewReducerCreator",Vbe,"loadVisitsOverview"),e.serviceFactory("visitsOverviewReducer",St("reducer"),"visitsOverviewReducerCreator"),e.serviceFactory("domainVisitsReducerCreator",ppe,"getDomainVisits"),e.serviceFactory("domainVisitsReducer",St("reducer"),"domainVisitsReducerCreator"),e.serviceFactory("nonOrphanVisitsReducerCreator",Rbe,"getNonOrphanVisits"),e.serviceFactory("nonOrphanVisitsReducer",St("reducer"),"nonOrphanVisitsReducerCreator"),e.serviceFactory("orphanVisitsReducerCreator",Abe,"getOrphanVisits"),e.serviceFactory("orphanVisitsReducer",St("reducer"),"orphanVisitsReducerCreator"),e.serviceFactory("shortUrlVisitsReducerCreator",$be,"getShortUrlVisits"),e.serviceFactory("shortUrlVisitsReducer",St("reducer"),"shortUrlVisitsReducerCreator"),e.serviceFactory("tagVisitsReducerCreator",zbe,"getTagVisits"),e.serviceFactory("tagVisitsReducer",St("reducer"),"tagVisitsReducerCreator")},ai=new $q,{container:yT}=ai,Zbe=(e,t)=>(...n)=>e[t](...n),Kbe=(e,t)=>({...e,[t]:Zbe(yT,t)}),aa=(e,t=[])=>oY(e?Wq(e):null,t.reduce(Kbe,{}));Zse(ai,aa);Nae(ai,aa);KX(ai);Hve(ai,aa);_me(ai,aa);jye(ai,aa);Gbe(ai,aa);r0e(ai);Ppe(ai);Ume(ai,aa);Epe(ai,aa);var _T={},ly={},Xbe={get exports(){return ly},set exports(e){ly=e}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isPlainObject=t.clone=t.recursive=t.merge=t.main=void 0,e.exports=t=n,t.default=n;function n(){for(var c=[],f=0;f$.length)&&(I=$.length);for(var B=0,re=Array(I);BV5({servers:ume,selectedServer:e.selectedServerReducer,shortUrlsList:e.shortUrlsListReducer,shortUrlCreation:e.shortUrlCreationReducer,shortUrlDeletion:e.shortUrlDeletionReducer,shortUrlEdition:e.shortUrlEditionReducer,shortUrlDetail:e.shortUrlDetailReducer,shortUrlVisits:e.shortUrlVisitsReducer,tagVisits:e.tagVisitsReducer,domainVisits:e.domainVisitsReducer,orphanVisits:e.orphanVisitsReducer,nonOrphanVisits:e.nonOrphanVisitsReducer,tagsList:e.tagsListReducer,tagDelete:e.tagDeleteReducer,tagEdit:e.tagEditReducer,mercureInfo:e.mercureInfoReducer,settings:Lme,domainsList:e.domainsListReducer,visitsOverview:e.visitsOverviewReducer,appUpdated:Gse,sidebar:Sae}),Jbe=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},e1e=!0,m$={states:["settings","servers"],namespace:"shlink",namespaceSeparator:".",debounce:300},t1e=Jbe(_T.load(m$)),n1e=e=>yse({devTools:!e1e,reducer:Qbe(e),preloadedState:t1e,middleware:t=>t({immutableCheck:!1,serializableCheck:!1}).prepend(e.selectServerListener.middleware).concat(_T.save(m$))}),r1e=!!(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 i1e(e){if("serviceWorker"in navigator){if(new URL(Wg.homepage,window.location.href).origin!==window.location.origin)return;window.addEventListener("load",()=>{const n=`${Wg.homepage}/service-worker.js`;r1e?(o1e(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")})):g$(n,e)})}}function g$(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 o1e(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()})}):g$(e,t)}).catch(()=>{console.log("No internet connection found. App is running in offline mode.")})}const s1e="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=",a1e="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==",l1e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC",c1e=()=>{delete FL.Icon.Default.prototype._getIconUrl,FL.Icon.Default.mergeOptions({iconRetinaUrl:a1e,iconUrl:s1e,shadowUrl:l1e})};c1e();const v$=n1e(yT),{App:u1e,ScrollToTop:f1e,ErrorHandler:d1e,appUpdateAvailable:h1e}=yT;q4(document.getElementById("root")).render(C(sY,{store:v$,children:C(lq,{basename:Wg.homepage,children:C(d1e,{children:C(f1e,{children:C(u1e,{})})})})}));i1e({onUpdate(){v$.dispatch(h1e())}}); diff --git a/feature/remeda/index.html b/feature/remeda/index.html index 8f08debb..4ce22ddf 100644 --- a/feature/remeda/index.html +++ b/feature/remeda/index.html @@ -79,7 +79,7 @@ Shlink — The URL shortener - + diff --git a/feature/remeda/service-worker.js b/feature/remeda/service-worker.js index df787494..7a372d49 100644 --- a/feature/remeda/service-worker.js +++ b/feature/remeda/service-worker.js @@ -1,2 +1,2 @@ try{self["workbox:core:6.5.3"]&&_()}catch{}const z=(s,...e)=>{let t=s;return e.length>0&&(t+=` :: ${JSON.stringify(e)}`),t},G=z;class h extends Error{constructor(e,t){const n=G(e,t);super(n),this.name=e,this.details=t}}const B=new Set;function Q(s){B.add(s)}const d={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:typeof registration<"u"?registration.scope:""},E=s=>[d.prefix,s,d.suffix].filter(e=>e&&e.length>0).join("-"),J=s=>{for(const e of Object.keys(d))s(e)},x={updateDetails:s=>{J(e=>{typeof s[e]=="string"&&(d[e]=s[e])})},getGoogleAnalyticsName:s=>s||E(d.googleAnalytics),getPrecacheName:s=>s||E(d.precache),getPrefix:()=>d.prefix,getRuntimeName:s=>s||E(d.runtime),getSuffix:()=>d.suffix};function N(s,e){const t=new URL(s);for(const n of e)t.searchParams.delete(n);return t.href}async function X(s,e,t,n){const r=N(e.url,t);if(e.url===r)return s.match(e,n);const a=Object.assign(Object.assign({},n),{ignoreSearch:!0}),i=await s.keys(e,a);for(const c of i){const o=N(c.url,t);if(r===o)return s.match(c,n)}}let m;function Y(){if(m===void 0){const s=new Response("");if("body"in s)try{new Response(s.body),m=!0}catch{m=!1}m=!1}return m}function q(s){s.then(()=>{})}class Z{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}}async function ee(){for(const s of B)await s()}const te=s=>new URL(String(s),location.href).href.replace(new RegExp(`^${location.origin}`),"");function se(s){return new Promise(e=>setTimeout(e,s))}function K(s,e){const t=e();return s.waitUntil(t),t}async function ne(s,e){let t=null;if(s.url&&(t=new URL(s.url).origin),t!==self.location.origin)throw new h("cross-origin-copy-response",{origin:t});const n=s.clone(),r={headers:new Headers(n.headers),status:n.status,statusText:n.statusText},a=e?e(r):r,i=Y()?n.body:await n.blob();return new Response(i,a)}function re(){self.addEventListener("activate",()=>self.clients.claim())}const ae=(s,e)=>e.some(t=>s instanceof t);let A,O;function ie(){return A||(A=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function ce(){return O||(O=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const F=new WeakMap,U=new WeakMap,H=new WeakMap,k=new WeakMap,P=new WeakMap;function oe(s){const e=new Promise((t,n)=>{const r=()=>{s.removeEventListener("success",a),s.removeEventListener("error",i)},a=()=>{t(f(s.result)),r()},i=()=>{n(s.error),r()};s.addEventListener("success",a),s.addEventListener("error",i)});return e.then(t=>{t instanceof IDBCursor&&F.set(t,s)}).catch(()=>{}),P.set(e,s),e}function le(s){if(U.has(s))return;const e=new Promise((t,n)=>{const r=()=>{s.removeEventListener("complete",a),s.removeEventListener("error",i),s.removeEventListener("abort",i)},a=()=>{t(),r()},i=()=>{n(s.error||new DOMException("AbortError","AbortError")),r()};s.addEventListener("complete",a),s.addEventListener("error",i),s.addEventListener("abort",i)});U.set(s,e)}let T={get(s,e,t){if(s instanceof IDBTransaction){if(e==="done")return U.get(s);if(e==="objectStoreNames")return s.objectStoreNames||H.get(s);if(e==="store")return t.objectStoreNames[1]?void 0:t.objectStore(t.objectStoreNames[0])}return f(s[e])},set(s,e,t){return s[e]=t,!0},has(s,e){return s instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in s}};function he(s){T=s(T)}function ue(s){return s===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...t){const n=s.call(v(this),e,...t);return H.set(n,e.sort?e.sort():[e]),f(n)}:ce().includes(s)?function(...e){return s.apply(v(this),e),f(F.get(this))}:function(...e){return f(s.apply(v(this),e))}}function de(s){return typeof s=="function"?ue(s):(s instanceof IDBTransaction&&le(s),ae(s,ie())?new Proxy(s,T):s)}function f(s){if(s instanceof IDBRequest)return oe(s);if(k.has(s))return k.get(s);const e=de(s);return e!==s&&(k.set(s,e),P.set(e,s)),e}const v=s=>P.get(s);function fe(s,e,{blocked:t,upgrade:n,blocking:r,terminated:a}={}){const i=indexedDB.open(s,e),c=f(i);return n&&i.addEventListener("upgradeneeded",o=>{n(f(i.result),o.oldVersion,o.newVersion,f(i.transaction),o)}),t&&i.addEventListener("blocked",o=>t(o.oldVersion,o.newVersion,o)),c.then(o=>{a&&o.addEventListener("close",()=>a()),r&&o.addEventListener("versionchange",l=>r(l.oldVersion,l.newVersion,l))}).catch(()=>{}),c}function pe(s,{blocked:e}={}){const t=indexedDB.deleteDatabase(s);return e&&t.addEventListener("blocked",n=>e(n.oldVersion,n)),f(t).then(()=>{})}const ge=["get","getKey","getAll","getAllKeys","count"],me=["put","add","delete","clear"],D=new Map;function S(s,e){if(!(s instanceof IDBDatabase&&!(e in s)&&typeof e=="string"))return;if(D.get(e))return D.get(e);const t=e.replace(/FromIndex$/,""),n=e!==t,r=me.includes(t);if(!(t in(n?IDBIndex:IDBObjectStore).prototype)||!(r||ge.includes(t)))return;const a=async function(i,...c){const o=this.transaction(i,r?"readwrite":"readonly");let l=o.store;return n&&(l=l.index(c.shift())),(await Promise.all([l[t](...c),r&&o.done]))[0]};return D.set(e,a),a}he(s=>({...s,get:(e,t,n)=>S(e,t)||s.get(e,t,n),has:(e,t)=>!!S(e,t)||s.has(e,t)}));try{self["workbox:expiration:6.5.3"]&&_()}catch{}const ye="workbox-expiration",y="cache-entries",W=s=>{const e=new URL(s,location.href);return e.hash="",e.href};class we{constructor(e){this._db=null,this._cacheName=e}_upgradeDb(e){const t=e.createObjectStore(y,{keyPath:"id"});t.createIndex("cacheName","cacheName",{unique:!1}),t.createIndex("timestamp","timestamp",{unique:!1})}_upgradeDbAndDeleteOldDbs(e){this._upgradeDb(e),this._cacheName&&pe(this._cacheName)}async setTimestamp(e,t){e=W(e);const n={url:e,timestamp:t,cacheName:this._cacheName,id:this._getId(e)},a=(await this.getDb()).transaction(y,"readwrite",{durability:"relaxed"});await a.store.put(n),await a.done}async getTimestamp(e){const n=await(await this.getDb()).get(y,this._getId(e));return n==null?void 0:n.timestamp}async expireEntries(e,t){const n=await this.getDb();let r=await n.transaction(y).store.index("timestamp").openCursor(null,"prev");const a=[];let i=0;for(;r;){const o=r.value;o.cacheName===this._cacheName&&(e&&o.timestamp=t?a.push(r.value):i++),r=await r.continue()}const c=[];for(const o of a)await n.delete(y,o.id),c.push(o.url);return c}_getId(e){return this._cacheName+"|"+W(e)}async getDb(){return this._db||(this._db=await fe(ye,1,{upgrade:this._upgradeDbAndDeleteOldDbs.bind(this)})),this._db}}class be{constructor(e,t={}){this._isRunning=!1,this._rerunRequested=!1,this._maxEntries=t.maxEntries,this._maxAgeSeconds=t.maxAgeSeconds,this._matchOptions=t.matchOptions,this._cacheName=e,this._timestampModel=new we(e)}async expireEntries(){if(this._isRunning){this._rerunRequested=!0;return}this._isRunning=!0;const e=this._maxAgeSeconds?Date.now()-this._maxAgeSeconds*1e3:0,t=await this._timestampModel.expireEntries(e,this._maxEntries),n=await self.caches.open(this._cacheName);for(const r of t)await n.delete(r,this._matchOptions);this._isRunning=!1,this._rerunRequested&&(this._rerunRequested=!1,q(this.expireEntries()))}async updateTimestamp(e){await this._timestampModel.setTimestamp(e,Date.now())}async isURLExpired(e){if(this._maxAgeSeconds){const t=await this._timestampModel.getTimestamp(e),n=Date.now()-this._maxAgeSeconds*1e3;return t!==void 0?t{if(!a)return null;const i=this._isResponseDateFresh(a),c=this._getCacheExpiration(r);q(c.expireEntries());const o=c.updateTimestamp(n.url);if(t)try{t.waitUntil(o)}catch{}return i?a:null},this.cacheDidUpdate=async({cacheName:t,request:n})=>{const r=this._getCacheExpiration(t);await r.updateTimestamp(n.url),await r.expireEntries()},this._config=e,this._maxAgeSeconds=e.maxAgeSeconds,this._cacheExpirations=new Map,e.purgeOnQuotaError&&Q(()=>this.deleteCacheAndMetadata())}_getCacheExpiration(e){if(e===x.getRuntimeName())throw new h("expire-custom-caches-only");let t=this._cacheExpirations.get(e);return t||(t=new be(e,this._config),this._cacheExpirations.set(e,t)),t}_isResponseDateFresh(e){if(!this._maxAgeSeconds)return!0;const t=this._getDateHeaderTimestamp(e);if(t===null)return!0;const n=Date.now();return t>=n-this._maxAgeSeconds*1e3}_getDateHeaderTimestamp(e){if(!e.headers.has("date"))return null;const t=e.headers.get("date"),r=new Date(t).getTime();return isNaN(r)?null:r}async deleteCacheAndMetadata(){for(const[e,t]of this._cacheExpirations)await self.caches.delete(e),await t.delete();this._cacheExpirations=new Map}}try{self["workbox:precaching:6.5.3"]&&_()}catch{}const Re="__WB_REVISION__";function Ce(s){if(!s)throw new h("add-to-cache-list-unexpected-type",{entry:s});if(typeof s=="string"){const a=new URL(s,location.href);return{cacheKey:a.href,url:a.href}}const{revision:e,url:t}=s;if(!t)throw new h("add-to-cache-list-unexpected-type",{entry:s});if(!e){const a=new URL(t,location.href);return{cacheKey:a.href,url:a.href}}const n=new URL(t,location.href),r=new URL(t,location.href);return n.searchParams.set(Re,e),{cacheKey:n.href,url:r.href}}class xe{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:e,state:t})=>{t&&(t.originalRequest=e)},this.cachedResponseWillBeUsed=async({event:e,state:t,cachedResponse:n})=>{if(e.type==="install"&&t&&t.originalRequest&&t.originalRequest instanceof Request){const r=t.originalRequest.url;n?this.notUpdatedURLs.push(r):this.updatedURLs.push(r)}return n}}}class Ee{constructor({precacheController:e}){this.cacheKeyWillBeUsed=async({request:t,params:n})=>{const r=(n==null?void 0:n.cacheKey)||this._precacheController.getCacheKeyForURL(t.url);return r?new Request(r,{headers:t.headers}):t},this._precacheController=e}}try{self["workbox:strategies:6.5.3"]&&_()}catch{}function R(s){return typeof s=="string"?new Request(s):s}class ke{constructor(e,t){this._cacheKeys={},Object.assign(this,t),this.event=t.event,this._strategy=e,this._handlerDeferred=new Z,this._extendLifetimePromises=[],this._plugins=[...e.plugins],this._pluginStateMap=new Map;for(const n of this._plugins)this._pluginStateMap.set(n,{});this.event.waitUntil(this._handlerDeferred.promise)}async fetch(e){const{event:t}=this;let n=R(e);if(n.mode==="navigate"&&t instanceof FetchEvent&&t.preloadResponse){const i=await t.preloadResponse;if(i)return i}const r=this.hasCallback("fetchDidFail")?n.clone():null;try{for(const i of this.iterateCallbacks("requestWillFetch"))n=await i({request:n.clone(),event:t})}catch(i){if(i instanceof Error)throw new h("plugin-error-request-will-fetch",{thrownErrorMessage:i.message})}const a=n.clone();try{let i;i=await fetch(n,n.mode==="navigate"?void 0:this._strategy.fetchOptions);for(const c of this.iterateCallbacks("fetchDidSucceed"))i=await c({event:t,request:a,response:i});return i}catch(i){throw r&&await this.runCallbacks("fetchDidFail",{error:i,event:t,originalRequest:r.clone(),request:a.clone()}),i}}async fetchAndCachePut(e){const t=await this.fetch(e),n=t.clone();return this.waitUntil(this.cachePut(e,n)),t}async cacheMatch(e){const t=R(e);let n;const{cacheName:r,matchOptions:a}=this._strategy,i=await this.getCacheKey(t,"read"),c=Object.assign(Object.assign({},a),{cacheName:r});n=await caches.match(i,c);for(const o of this.iterateCallbacks("cachedResponseWillBeUsed"))n=await o({cacheName:r,matchOptions:a,cachedResponse:n,request:i,event:this.event})||void 0;return n}async cachePut(e,t){const n=R(e);await se(0);const r=await this.getCacheKey(n,"write");if(!t)throw new h("cache-put-with-no-response",{url:te(r.url)});const a=await this._ensureResponseSafeToCache(t);if(!a)return!1;const{cacheName:i,matchOptions:c}=this._strategy,o=await self.caches.open(i),l=this.hasCallback("cacheDidUpdate"),g=l?await X(o,r.clone(),["__WB_REVISION__"],c):null;try{await o.put(r,l?a.clone():a)}catch(u){if(u instanceof Error)throw u.name==="QuotaExceededError"&&await ee(),u}for(const u of this.iterateCallbacks("cacheDidUpdate"))await u({cacheName:i,oldResponse:g,newResponse:a.clone(),request:r,event:this.event});return!0}async getCacheKey(e,t){const n=`${e.url} | ${t}`;if(!this._cacheKeys[n]){let r=e;for(const a of this.iterateCallbacks("cacheKeyWillBeUsed"))r=R(await a({mode:t,request:r,event:this.event,params:this.params}));this._cacheKeys[n]=r}return this._cacheKeys[n]}hasCallback(e){for(const t of this._strategy.plugins)if(e in t)return!0;return!1}async runCallbacks(e,t){for(const n of this.iterateCallbacks(e))await n(t)}*iterateCallbacks(e){for(const t of this._strategy.plugins)if(typeof t[e]=="function"){const n=this._pluginStateMap.get(t);yield a=>{const i=Object.assign(Object.assign({},a),{state:n});return t[e](i)}}}waitUntil(e){return this._extendLifetimePromises.push(e),e}async doneWaiting(){let e;for(;e=this._extendLifetimePromises.shift();)await e}destroy(){this._handlerDeferred.resolve(null)}async _ensureResponseSafeToCache(e){let t=e,n=!1;for(const r of this.iterateCallbacks("cacheWillUpdate"))if(t=await r({request:this.request,response:t,event:this.event})||void 0,n=!0,!t)break;return n||t&&t.status!==200&&(t=void 0),t}}class V{constructor(e={}){this.cacheName=x.getRuntimeName(e.cacheName),this.plugins=e.plugins||[],this.fetchOptions=e.fetchOptions,this.matchOptions=e.matchOptions}handle(e){const[t]=this.handleAll(e);return t}handleAll(e){e instanceof FetchEvent&&(e={event:e,request:e.request});const t=e.event,n=typeof e.request=="string"?new Request(e.request):e.request,r="params"in e?e.params:void 0,a=new ke(this,{event:t,request:n,params:r}),i=this._getResponse(a,n,t),c=this._awaitComplete(i,a,n,t);return[i,c]}async _getResponse(e,t,n){await e.runCallbacks("handlerWillStart",{event:n,request:t});let r;try{if(r=await this._handle(t,e),!r||r.type==="error")throw new h("no-response",{url:t.url})}catch(a){if(a instanceof Error){for(const i of e.iterateCallbacks("handlerDidError"))if(r=await i({error:a,event:n,request:t}),r)break}if(!r)throw a}for(const a of e.iterateCallbacks("handlerWillRespond"))r=await a({event:n,request:t,response:r});return r}async _awaitComplete(e,t,n,r){let a,i;try{a=await e}catch{}try{await t.runCallbacks("handlerDidRespond",{event:r,request:n,response:a}),await t.doneWaiting()}catch(c){c instanceof Error&&(i=c)}if(await t.runCallbacks("handlerDidComplete",{event:r,request:n,response:a,error:i}),t.destroy(),i)throw i}}class p extends V{constructor(e={}){e.cacheName=x.getPrecacheName(e.cacheName),super(e),this._fallbackToNetwork=e.fallbackToNetwork!==!1,this.plugins.push(p.copyRedirectedCacheableResponsesPlugin)}async _handle(e,t){const n=await t.cacheMatch(e);return n||(t.event&&t.event.type==="install"?await this._handleInstall(e,t):await this._handleFetch(e,t))}async _handleFetch(e,t){let n;const r=t.params||{};if(this._fallbackToNetwork){const a=r.integrity,i=e.integrity,c=!i||i===a;n=await t.fetch(new Request(e,{integrity:e.mode!=="no-cors"?i||a:void 0})),a&&c&&e.mode!=="no-cors"&&(this._useDefaultCacheabilityPluginIfNeeded(),await t.cachePut(e,n.clone()))}else throw new h("missing-precache-entry",{cacheName:this.cacheName,url:e.url});return n}async _handleInstall(e,t){this._useDefaultCacheabilityPluginIfNeeded();const n=await t.fetch(e);if(!await t.cachePut(e,n.clone()))throw new h("bad-precaching-response",{url:e.url,status:n.status});return n}_useDefaultCacheabilityPluginIfNeeded(){let e=null,t=0;for(const[n,r]of this.plugins.entries())r!==p.copyRedirectedCacheableResponsesPlugin&&(r===p.defaultPrecacheCacheabilityPlugin&&(e=n),r.cacheWillUpdate&&t++);t===0?this.plugins.push(p.defaultPrecacheCacheabilityPlugin):t>1&&e!==null&&this.plugins.splice(e,1)}}p.defaultPrecacheCacheabilityPlugin={async cacheWillUpdate({response:s}){return!s||s.status>=400?null:s}};p.copyRedirectedCacheableResponsesPlugin={async cacheWillUpdate({response:s}){return s.redirected?await ne(s):s}};class ve{constructor({cacheName:e,plugins:t=[],fallbackToNetwork:n=!0}={}){this._urlsToCacheKeys=new Map,this._urlsToCacheModes=new Map,this._cacheKeysToIntegrities=new Map,this._strategy=new p({cacheName:x.getPrecacheName(e),plugins:[...t,new Ee({precacheController:this})],fallbackToNetwork:n}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this._strategy}precache(e){this.addToCacheList(e),this._installAndActiveListenersAdded||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this._installAndActiveListenersAdded=!0)}addToCacheList(e){const t=[];for(const n of e){typeof n=="string"?t.push(n):n&&n.revision===void 0&&t.push(n.url);const{cacheKey:r,url:a}=Ce(n),i=typeof n!="string"&&n.revision?"reload":"default";if(this._urlsToCacheKeys.has(a)&&this._urlsToCacheKeys.get(a)!==r)throw new h("add-to-cache-list-conflicting-entries",{firstEntry:this._urlsToCacheKeys.get(a),secondEntry:r});if(typeof n!="string"&&n.integrity){if(this._cacheKeysToIntegrities.has(r)&&this._cacheKeysToIntegrities.get(r)!==n.integrity)throw new h("add-to-cache-list-conflicting-integrities",{url:a});this._cacheKeysToIntegrities.set(r,n.integrity)}if(this._urlsToCacheKeys.set(a,r),this._urlsToCacheModes.set(a,i),t.length>0){const c=`Workbox is precaching URLs without revision info: ${t.join(", ")} -This is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(c)}}}install(e){return K(e,async()=>{const t=new xe;this.strategy.plugins.push(t);for(const[a,i]of this._urlsToCacheKeys){const c=this._cacheKeysToIntegrities.get(i),o=this._urlsToCacheModes.get(a),l=new Request(a,{integrity:c,cache:o,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:i},request:l,event:e}))}const{updatedURLs:n,notUpdatedURLs:r}=t;return{updatedURLs:n,notUpdatedURLs:r}})}activate(e){return K(e,async()=>{const t=await self.caches.open(this.strategy.cacheName),n=await t.keys(),r=new Set(this._urlsToCacheKeys.values()),a=[];for(const i of n)r.has(i.url)||(await t.delete(i),a.push(i.url));return{deletedURLs:a}})}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(e){const t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForCacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){const t=e instanceof Request?e.url:e,n=this.getCacheKeyForURL(t);if(n)return(await self.caches.open(this.strategy.cacheName)).match(n)}createHandlerBoundToURL(e){const t=this.getCacheKeyForURL(e);if(!t)throw new h("non-precached-url",{url:e});return n=>(n.request=new Request(e),n.params=Object.assign({cacheKey:t},n.params),this.strategy.handle(n))}}let L;const I=()=>(L||(L=new ve),L);try{self["workbox:routing:6.5.3"]&&_()}catch{}const $="GET",C=s=>s&&typeof s=="object"?s:{handle:s};class b{constructor(e,t,n=$){this.handler=C(t),this.match=e,this.method=n}setCatchHandler(e){this.catchHandler=C(e)}}class De extends b{constructor(e,t,n){const r=({url:a})=>{const i=e.exec(a.href);if(i&&!(a.origin!==location.origin&&i.index!==0))return i.slice(1)};super(r,t,n)}}class Le{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",e=>{const{request:t}=e,n=this.handleRequest({request:t,event:e});n&&e.respondWith(n)})}addCacheListener(){self.addEventListener("message",e=>{if(e.data&&e.data.type==="CACHE_URLS"){const{payload:t}=e.data,n=Promise.all(t.urlsToCache.map(r=>{typeof r=="string"&&(r=[r]);const a=new Request(...r);return this.handleRequest({request:a,event:e})}));e.waitUntil(n),e.ports&&e.ports[0]&&n.then(()=>e.ports[0].postMessage(!0))}})}handleRequest({request:e,event:t}){const n=new URL(e.url,location.href);if(!n.protocol.startsWith("http"))return;const r=n.origin===location.origin,{params:a,route:i}=this.findMatchingRoute({event:t,request:e,sameOrigin:r,url:n});let c=i&&i.handler;const o=e.method;if(!c&&this._defaultHandlerMap.has(o)&&(c=this._defaultHandlerMap.get(o)),!c)return;let l;try{l=c.handle({url:n,request:e,event:t,params:a})}catch(u){l=Promise.reject(u)}const g=i&&i.catchHandler;return l instanceof Promise&&(this._catchHandler||g)&&(l=l.catch(async u=>{if(g)try{return await g.handle({url:n,request:e,event:t,params:a})}catch(j){j instanceof Error&&(u=j)}if(this._catchHandler)return this._catchHandler.handle({url:n,request:e,event:t});throw u})),l}findMatchingRoute({url:e,sameOrigin:t,request:n,event:r}){const a=this._routes.get(n.method)||[];for(const i of a){let c;const o=i.match({url:e,sameOrigin:t,request:n,event:r});if(o)return c=o,(Array.isArray(c)&&c.length===0||o.constructor===Object&&Object.keys(o).length===0||typeof o=="boolean")&&(c=void 0),{route:i,params:c}}return{}}setDefaultHandler(e,t=$){this._defaultHandlerMap.set(t,C(e))}setCatchHandler(e){this._catchHandler=C(e)}registerRoute(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}unregisterRoute(e){if(!this._routes.has(e.method))throw new h("unregister-route-but-not-found-with-method",{method:e.method});const t=this._routes.get(e.method).indexOf(e);if(t>-1)this._routes.get(e.method).splice(t,1);else throw new h("unregister-route-route-not-registered")}}let w;const Ue=()=>(w||(w=new Le,w.addFetchListener(),w.addCacheListener()),w);function M(s,e,t){let n;if(typeof s=="string"){const a=new URL(s,location.href),i=({url:c})=>c.href===a.href;n=new b(i,e,t)}else if(s instanceof RegExp)n=new De(s,e,t);else if(typeof s=="function")n=new b(s,e,t);else if(s instanceof b)n=s;else throw new h("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});return Ue().registerRoute(n),n}function Te(s,e=[]){for(const t of[...s.searchParams.keys()])e.some(n=>n.test(t))&&s.searchParams.delete(t);return s}function*Pe(s,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:t="index.html",cleanURLs:n=!0,urlManipulation:r}={}){const a=new URL(s,location.href);a.hash="",yield a.href;const i=Te(a,e);if(yield i.href,t&&i.pathname.endsWith("/")){const c=new URL(i.href);c.pathname+=t,yield c.href}if(n){const c=new URL(i.href);c.pathname+=".html",yield c.href}if(r){const c=r({url:a});for(const o of c)yield o.href}}class Ie extends b{constructor(e,t){const n=({request:r})=>{const a=e.getURLsToCacheKeys();for(const i of Pe(r.url,t)){const c=a.get(i);if(c){const o=e.getIntegrityForCacheKey(c);return{cacheKey:c,integrity:o}}}};super(n,e.strategy)}}function Me(s){const e=I(),t=new Ie(e,s);M(t)}function je(s){return I().createHandlerBoundToURL(s)}function Ne(s){I().precache(s)}function Ke(s,e){Ne(s),Me(e)}const Ae={cacheWillUpdate:async({response:s})=>s.status===200||s.status===0?s:null};class Oe extends V{constructor(e={}){super(e),this.plugins.some(t=>"cacheWillUpdate"in t)||this.plugins.unshift(Ae)}async _handle(e,t){const n=t.fetchAndCachePut(e).catch(()=>{});t.waitUntil(n);let r=await t.cacheMatch(e),a;if(!r)try{r=await n}catch(i){i instanceof Error&&(a=i)}if(!r)throw new h("no-response",{url:e.url,error:a});return r}}const Se="shlink-web-client",We="A React-based progressive web application for shlink",Be="/shlink-web-client/feature/remeda",qe="https://github.com/shlinkio/shlink-web-client",Fe="MIT",He={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",start:"vite serve --host=0.0.0.0",preview:"vite preview --host=0.0.0.0",build:"tsc --noEmit && vite build && node scripts/replace-version.mjs","build:dist":"npm run build && node scripts/create-dist-file.mjs",test:"jest --env=jsdom --colors","test:coverage":"npm run test -- --coverage --coverageReporters=text --coverageReporters=text-summary","test:ci":"npm run test:coverage -- --coverageReporters=clover --ci","test:pretty":"npm run test:coverage -- --coverageReporters=html","test:verbose":"npm run test -- --verbose"},Ve={"@babel/preset-env":"^7.20.2","@babel/preset-react":"^7.18.6","@babel/preset-typescript":"^7.21.0","@fortawesome/fontawesome-free":"^6.3.0","@fortawesome/fontawesome-svg-core":"^6.3.0","@fortawesome/free-brands-svg-icons":"^6.3.0","@fortawesome/free-regular-svg-icons":"^6.3.0","@fortawesome/free-solid-svg-icons":"^6.3.0","@fortawesome/react-fontawesome":"^0.2.0","@json2csv/plainjs":"^6.1.2","@reduxjs/toolkit":"^1.9.1",bootstrap:"^5.2.3",bottlejs:"^2.0.1",bowser:"^2.11.0","chart.js":"^4.1.1",classnames:"^2.3.2","compare-versions":"^5.0.3",csvtojson:"^2.0.10","date-fns":"^2.29.3","event-source-polyfill":"^1.0.31",history:"^5.3.0",leaflet:"^1.9.3",qs:"^6.11.0",ramda:"^0.27.2",react:"^18.2.0","react-chartjs-2":"^5.1.0","react-colorful":"^5.6.1","react-copy-to-clipboard":"^5.1.0","react-datepicker":"^4.8.0","react-dom":"^18.2.0","react-external-link":"^2.0.0","react-leaflet":"^4.2.0","react-redux":"^8.0.5","react-router-dom":"^6.6.1","react-swipeable":"^7.0.0","react-tag-autocomplete":"^6.3.0",reactstrap:"^9.1.5",redux:"^4.2.0","redux-localstorage-simple":"^2.5.1","redux-thunk":"^2.4.2",remeda:"^1.9.0",uuid:"^8.3.2","workbox-core":"^6.5.4","workbox-expiration":"^6.5.4","workbox-precaching":"^6.5.4","workbox-routing":"^6.5.4","workbox-strategies":"^6.5.4"},$e={"@shlinkio/eslint-config-js-coding-standard":"~2.1.0","@shlinkio/stylelint-config-css-coding-standard":"~1.0.1","@testing-library/jest-dom":"^5.16.5","@testing-library/react":"^13.4.0","@testing-library/user-event":"^14.4.3","@types/jest":"^29.2.4","@types/json2csv":"^5.0.3","@types/leaflet":"^1.9.0","@types/qs":"^6.9.7","@types/ramda":"^0.28.15","@types/react":"^18.0.26","@types/react-color":"^3.0.6","@types/react-copy-to-clipboard":"^5.0.4","@types/react-datepicker":"^4.8.0","@types/react-dom":"^18.0.10","@types/react-tag-autocomplete":"^6.3.0","@types/uuid":"^8.3.4","@vitejs/plugin-react":"^3.1.0","adm-zip":"^0.5.10","babel-jest":"^29.5.0",chalk:"^5.2.0",eslint:"^8.30.0","identity-obj-proxy":"^3.0.0",jest:"^29.3.1","jest-canvas-mock":"^2.4.0","jest-environment-jsdom":"^29.3.1","resize-observer-polyfill":"^1.5.1",sass:"^1.57.1",stylelint:"^14.16.0","ts-mockery":"^1.2.0",typescript:"^5.0.2",vite:"^4.2.0","vite-plugin-pwa":"^0.14.4"},ze=[">0.2%","not dead","not ie <= 11","not op_mini all"];var Ge={name:Se,description:We,private:!1,homepage:Be,repository:qe,license:Fe,scripts:He,dependencies:Ve,devDependencies:$e,browserslist:ze};re();Ke([{"revision":null,"url":"assets/index-1f7f66ab.css"},{"revision":null,"url":"assets/index-8f19cb49.js"},{"revision":"e831cc44cbf262825e2e0a183e959b8d","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":"8fedb561b5304082b04b6f8d32cd2e4f","url":"manifest.json"}]);const Qe=new RegExp("/[^/?]+\\.[^/]+$");M(({request:s,url:e})=>!(s.mode!=="navigate"||e.pathname.startsWith("/_")||e.pathname.match(Qe)),je(`${Ge.homepage}/index.html`));M(({url:s})=>s.origin===self.location.origin&&s.pathname.endsWith(".png"),new Oe({cacheName:"images",plugins:[new _e({maxEntries:50})]}));self.addEventListener("message",s=>{s.data&&s.data.type==="SKIP_WAITING"&&self.skipWaiting()}); +This is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(c)}}}install(e){return K(e,async()=>{const t=new xe;this.strategy.plugins.push(t);for(const[a,i]of this._urlsToCacheKeys){const c=this._cacheKeysToIntegrities.get(i),o=this._urlsToCacheModes.get(a),l=new Request(a,{integrity:c,cache:o,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:i},request:l,event:e}))}const{updatedURLs:n,notUpdatedURLs:r}=t;return{updatedURLs:n,notUpdatedURLs:r}})}activate(e){return K(e,async()=>{const t=await self.caches.open(this.strategy.cacheName),n=await t.keys(),r=new Set(this._urlsToCacheKeys.values()),a=[];for(const i of n)r.has(i.url)||(await t.delete(i),a.push(i.url));return{deletedURLs:a}})}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(e){const t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForCacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){const t=e instanceof Request?e.url:e,n=this.getCacheKeyForURL(t);if(n)return(await self.caches.open(this.strategy.cacheName)).match(n)}createHandlerBoundToURL(e){const t=this.getCacheKeyForURL(e);if(!t)throw new h("non-precached-url",{url:e});return n=>(n.request=new Request(e),n.params=Object.assign({cacheKey:t},n.params),this.strategy.handle(n))}}let L;const I=()=>(L||(L=new ve),L);try{self["workbox:routing:6.5.3"]&&_()}catch{}const $="GET",C=s=>s&&typeof s=="object"?s:{handle:s};class b{constructor(e,t,n=$){this.handler=C(t),this.match=e,this.method=n}setCatchHandler(e){this.catchHandler=C(e)}}class De extends b{constructor(e,t,n){const r=({url:a})=>{const i=e.exec(a.href);if(i&&!(a.origin!==location.origin&&i.index!==0))return i.slice(1)};super(r,t,n)}}class Le{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",e=>{const{request:t}=e,n=this.handleRequest({request:t,event:e});n&&e.respondWith(n)})}addCacheListener(){self.addEventListener("message",e=>{if(e.data&&e.data.type==="CACHE_URLS"){const{payload:t}=e.data,n=Promise.all(t.urlsToCache.map(r=>{typeof r=="string"&&(r=[r]);const a=new Request(...r);return this.handleRequest({request:a,event:e})}));e.waitUntil(n),e.ports&&e.ports[0]&&n.then(()=>e.ports[0].postMessage(!0))}})}handleRequest({request:e,event:t}){const n=new URL(e.url,location.href);if(!n.protocol.startsWith("http"))return;const r=n.origin===location.origin,{params:a,route:i}=this.findMatchingRoute({event:t,request:e,sameOrigin:r,url:n});let c=i&&i.handler;const o=e.method;if(!c&&this._defaultHandlerMap.has(o)&&(c=this._defaultHandlerMap.get(o)),!c)return;let l;try{l=c.handle({url:n,request:e,event:t,params:a})}catch(u){l=Promise.reject(u)}const g=i&&i.catchHandler;return l instanceof Promise&&(this._catchHandler||g)&&(l=l.catch(async u=>{if(g)try{return await g.handle({url:n,request:e,event:t,params:a})}catch(j){j instanceof Error&&(u=j)}if(this._catchHandler)return this._catchHandler.handle({url:n,request:e,event:t});throw u})),l}findMatchingRoute({url:e,sameOrigin:t,request:n,event:r}){const a=this._routes.get(n.method)||[];for(const i of a){let c;const o=i.match({url:e,sameOrigin:t,request:n,event:r});if(o)return c=o,(Array.isArray(c)&&c.length===0||o.constructor===Object&&Object.keys(o).length===0||typeof o=="boolean")&&(c=void 0),{route:i,params:c}}return{}}setDefaultHandler(e,t=$){this._defaultHandlerMap.set(t,C(e))}setCatchHandler(e){this._catchHandler=C(e)}registerRoute(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}unregisterRoute(e){if(!this._routes.has(e.method))throw new h("unregister-route-but-not-found-with-method",{method:e.method});const t=this._routes.get(e.method).indexOf(e);if(t>-1)this._routes.get(e.method).splice(t,1);else throw new h("unregister-route-route-not-registered")}}let w;const Ue=()=>(w||(w=new Le,w.addFetchListener(),w.addCacheListener()),w);function M(s,e,t){let n;if(typeof s=="string"){const a=new URL(s,location.href),i=({url:c})=>c.href===a.href;n=new b(i,e,t)}else if(s instanceof RegExp)n=new De(s,e,t);else if(typeof s=="function")n=new b(s,e,t);else if(s instanceof b)n=s;else throw new h("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});return Ue().registerRoute(n),n}function Te(s,e=[]){for(const t of[...s.searchParams.keys()])e.some(n=>n.test(t))&&s.searchParams.delete(t);return s}function*Pe(s,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:t="index.html",cleanURLs:n=!0,urlManipulation:r}={}){const a=new URL(s,location.href);a.hash="",yield a.href;const i=Te(a,e);if(yield i.href,t&&i.pathname.endsWith("/")){const c=new URL(i.href);c.pathname+=t,yield c.href}if(n){const c=new URL(i.href);c.pathname+=".html",yield c.href}if(r){const c=r({url:a});for(const o of c)yield o.href}}class Ie extends b{constructor(e,t){const n=({request:r})=>{const a=e.getURLsToCacheKeys();for(const i of Pe(r.url,t)){const c=a.get(i);if(c){const o=e.getIntegrityForCacheKey(c);return{cacheKey:c,integrity:o}}}};super(n,e.strategy)}}function Me(s){const e=I(),t=new Ie(e,s);M(t)}function je(s){return I().createHandlerBoundToURL(s)}function Ne(s){I().precache(s)}function Ke(s,e){Ne(s),Me(e)}const Ae={cacheWillUpdate:async({response:s})=>s.status===200||s.status===0?s:null};class Oe extends V{constructor(e={}){super(e),this.plugins.some(t=>"cacheWillUpdate"in t)||this.plugins.unshift(Ae)}async _handle(e,t){const n=t.fetchAndCachePut(e).catch(()=>{});t.waitUntil(n);let r=await t.cacheMatch(e),a;if(!r)try{r=await n}catch(i){i instanceof Error&&(a=i)}if(!r)throw new h("no-response",{url:e.url,error:a});return r}}const Se="shlink-web-client",We="A React-based progressive web application for shlink",Be="/shlink-web-client/feature/remeda",qe="https://github.com/shlinkio/shlink-web-client",Fe="MIT",He={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",start:"vite serve --host=0.0.0.0",preview:"vite preview --host=0.0.0.0",build:"tsc --noEmit && vite build && node scripts/replace-version.mjs","build:dist":"npm run build && node scripts/create-dist-file.mjs",test:"jest --env=jsdom --colors","test:coverage":"npm run test -- --coverage --coverageReporters=text --coverageReporters=text-summary","test:ci":"npm run test:coverage -- --coverageReporters=clover --ci","test:pretty":"npm run test:coverage -- --coverageReporters=html","test:verbose":"npm run test -- --verbose"},Ve={"@babel/preset-env":"^7.20.2","@babel/preset-react":"^7.18.6","@babel/preset-typescript":"^7.21.0","@fortawesome/fontawesome-free":"^6.3.0","@fortawesome/fontawesome-svg-core":"^6.3.0","@fortawesome/free-brands-svg-icons":"^6.3.0","@fortawesome/free-regular-svg-icons":"^6.3.0","@fortawesome/free-solid-svg-icons":"^6.3.0","@fortawesome/react-fontawesome":"^0.2.0","@json2csv/plainjs":"^6.1.2","@reduxjs/toolkit":"^1.9.1",bootstrap:"^5.2.3",bottlejs:"^2.0.1",bowser:"^2.11.0","chart.js":"^4.1.1",classnames:"^2.3.2","compare-versions":"^5.0.3",csvtojson:"^2.0.10","date-fns":"^2.29.3","event-source-polyfill":"^1.0.31",history:"^5.3.0",leaflet:"^1.9.3",qs:"^6.11.0",ramda:"^0.27.2",react:"^18.2.0","react-chartjs-2":"^5.1.0","react-colorful":"^5.6.1","react-copy-to-clipboard":"^5.1.0","react-datepicker":"^4.8.0","react-dom":"^18.2.0","react-external-link":"^2.0.0","react-leaflet":"^4.2.0","react-redux":"^8.0.5","react-router-dom":"^6.6.1","react-swipeable":"^7.0.0","react-tag-autocomplete":"^6.3.0",reactstrap:"^9.1.5",redux:"^4.2.0","redux-localstorage-simple":"^2.5.1","redux-thunk":"^2.4.2",remeda:"^1.9.0",uuid:"^8.3.2","workbox-core":"^6.5.4","workbox-expiration":"^6.5.4","workbox-precaching":"^6.5.4","workbox-routing":"^6.5.4","workbox-strategies":"^6.5.4"},$e={"@shlinkio/eslint-config-js-coding-standard":"~2.1.0","@shlinkio/stylelint-config-css-coding-standard":"~1.0.1","@testing-library/jest-dom":"^5.16.5","@testing-library/react":"^13.4.0","@testing-library/user-event":"^14.4.3","@types/jest":"^29.2.4","@types/json2csv":"^5.0.3","@types/leaflet":"^1.9.0","@types/qs":"^6.9.7","@types/ramda":"^0.28.15","@types/react":"^18.0.26","@types/react-color":"^3.0.6","@types/react-copy-to-clipboard":"^5.0.4","@types/react-datepicker":"^4.8.0","@types/react-dom":"^18.0.10","@types/react-tag-autocomplete":"^6.3.0","@types/uuid":"^8.3.4","@vitejs/plugin-react":"^3.1.0","adm-zip":"^0.5.10","babel-jest":"^29.5.0",chalk:"^5.2.0",eslint:"^8.30.0","identity-obj-proxy":"^3.0.0",jest:"^29.3.1","jest-canvas-mock":"^2.4.0","jest-environment-jsdom":"^29.3.1","resize-observer-polyfill":"^1.5.1",sass:"^1.57.1",stylelint:"^14.16.0","ts-mockery":"^1.2.0",typescript:"^5.0.2",vite:"^4.2.0","vite-plugin-pwa":"^0.14.4"},ze=[">0.2%","not dead","not ie <= 11","not op_mini all"];var Ge={name:Se,description:We,private:!1,homepage:Be,repository:qe,license:Fe,scripts:He,dependencies:Ve,devDependencies:$e,browserslist:ze};re();Ke([{"revision":null,"url":"assets/index-1f7f66ab.css"},{"revision":null,"url":"assets/index-b2b2ee9c.js"},{"revision":"cba8b55a90b9848d686cf48bd7ed2ecf","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":"8fedb561b5304082b04b6f8d32cd2e4f","url":"manifest.json"}]);const Qe=new RegExp("/[^/?]+\\.[^/]+$");M(({request:s,url:e})=>!(s.mode!=="navigate"||e.pathname.startsWith("/_")||e.pathname.match(Qe)),je(`${Ge.homepage}/index.html`));M(({url:s})=>s.origin===self.location.origin&&s.pathname.endsWith(".png"),new Oe({cacheName:"images",plugins:[new _e({maxEntries:50})]}));self.addEventListener("message",s=>{s.data&&s.data.type==="SKIP_WAITING"&&self.skipWaiting()});