diff --git a/dependabot/npm_and_yarn/vite-2b5f0a7cc8/assets/index-VCcTKu6M.js b/dependabot/npm_and_yarn/vite-2b5f0a7cc8/assets/index-x5d5FywD.js similarity index 86% rename from dependabot/npm_and_yarn/vite-2b5f0a7cc8/assets/index-VCcTKu6M.js rename to dependabot/npm_and_yarn/vite-2b5f0a7cc8/assets/index-x5d5FywD.js index 9ec5a4d2..9fa0225e 100644 --- a/dependabot/npm_and_yarn/vite-2b5f0a7cc8/assets/index-VCcTKu6M.js +++ b/dependabot/npm_and_yarn/vite-2b5f0a7cc8/assets/index-x5d5FywD.js @@ -73,7 +73,7 @@ The error may be correlated with this previous error: ${ae.current.stack} `),ee}Zg(()=>{ae.current=void 0,z.current=void 0,H.current=M});const $=I.useMemo(()=>I.createElement(x,Vc({},M,{ref:U})),[U,x,M]);return I.useMemo(()=>v?I.createElement(V.Provider,{value:D},$):$,[V,$,D])}const k=I.memo(E);if(k.WrappedComponent=x,k.displayName=E.displayName=w,l){const A=I.forwardRef(function(R,V){return I.createElement(k,Vc({},R,{reactReduxForwardedRef:V}))});return A.displayName=w,A.WrappedComponent=x,xk(A,x)}return xk(k,x)}}function uD({store:e,context:t,children:n,serverState:r,stabilityCheck:i="once",noopCheck:o="once"}){const a=I.useMemo(()=>{const c=sD(e);return{store:e,subscription:c,getServerState:r?()=>r:void 0,stabilityCheck:i,noopCheck:o}},[e,r,i,o]),s=I.useMemo(()=>e.getState(),[e]);Zg(()=>{const{subscription:c}=a;return c.onStateChange=c.notifyNestedSubs,c.trySubscribe(),s!==e.getState()&&c.notifyNestedSubs(),()=>{c.tryUnsubscribe(),c.onStateChange=void 0}},[a,s]);const l=t||eD;return I.createElement(l.Provider,{value:a},n)}jV(X3.useSyncExternalStore);Qz(jl.unstable_batchedUpdates);/** - * @remix-run/router v1.12.0 + * @remix-run/router v1.13.0 * * Copyright (c) Remix Software Inc. * @@ -81,8 +81,8 @@ ${ae.current.stack} * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Hf(){return Hf=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function LS(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function FV(){return Math.random().toString(36).substr(2,8)}function Ck(e,t){return{usr:e.state,key:e.key,idx:t}}function V1(e,t,n,r){return n===void 0&&(n=null),Hf({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Au(t):t,{state:n,key:t&&t.key||r||FV()})}function Kg(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 Au(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 $V(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,a=i.history,s=Ra.Pop,l=null,c=d();c==null&&(c=0,a.replaceState(Hf({},a.state,{idx:c}),""));function d(){return(a.state||{idx:null}).idx}function f(){s=Ra.Pop;let x=d(),_=x==null?null:x-c;c=x,l&&l({action:s,location:y.location,delta:_})}function p(x,_){s=Ra.Push;let w=V1(y.location,x,_);n&&n(w,x),c=d()+1;let S=Ck(w,c),E=y.createHref(w);try{a.pushState(S,"",E)}catch(O){if(O instanceof DOMException&&O.name==="DataCloneError")throw O;i.location.assign(E)}o&&l&&l({action:s,location:y.location,delta:1})}function m(x,_){s=Ra.Replace;let w=V1(y.location,x,_);n&&n(w,x),c=d();let S=Ck(w,c),E=y.createHref(w);a.replaceState(S,"",E),o&&l&&l({action:s,location:y.location,delta:0})}function v(x){let _=i.location.origin!=="null"?i.location.origin:i.location.href,w=typeof x=="string"?x:Kg(x);return qt(_,"No window.location.(origin|href) available to create URL for href: "+w),new URL(w,_)}let y={get action(){return s},get location(){return e(i,a)},listen(x){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(Ok,f),l=x,()=>{i.removeEventListener(Ok,f),l=null}},createHref(x){return t(i,x)},createURL:v,encodeLocation(x){let _=v(x);return{pathname:_.pathname,search:_.search,hash:_.hash}},push:p,replace:m,go(x){return a.go(x)}};return y}var kk;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(kk||(kk={}));function UV(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?Au(t):t,i=Wf(r.pathname||"/",n);if(i==null)return null;let o=dD(e);BV(o);let a=null;for(let s=0;a==null&&s{let l={relativePath:s===void 0?o.path||"":s,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};l.relativePath.startsWith("/")&&(qt(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=Qa([r,l.relativePath]),d=n.concat(l);o.children&&o.children.length>0&&(qt(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),dD(o.children,t,d,c)),!(o.path==null&&!o.index)&&t.push({path:c,score:qV(c,o.index),routesMeta:d})};return e.forEach((o,a)=>{var s;if(o.path===""||!((s=o.path)!=null&&s.includes("?")))i(o,a);else for(let l of fD(o.path))i(o,a,l)}),t}function fD(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let a=fD(r.join("/")),s=[];return s.push(...a.map(l=>l===""?o:[o,l].join("/"))),i&&s.push(...a),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function BV(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:ZV(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const zV=/^:\w+$/,VV=3,HV=2,WV=1,YV=10,GV=-2,Pk=e=>e==="*";function qV(e,t){let n=e.split("/"),r=n.length;return n.some(Pk)&&(r+=GV),t&&(r+=HV),n.filter(i=>!Pk(i)).reduce((i,o)=>i+(zV.test(o)?VV:o===""?WV:YV),r)}function ZV(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 KV(e,t){let{routesMeta:n}=e,r={},i="/",o=[];for(let a=0;a{let{paramName:p,isOptional:m}=d;if(p==="*"){let y=s[f]||"";a=o.slice(0,o.length-y.length).replace(/(.)\/+$/,"$1")}const v=s[f];return m&&!v?c[p]=void 0:c[p]=JV(v||"",p),c},{}),pathname:o,pathnameBase:a,pattern:e}}function QV(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),LS(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:(\w+)(\?)?/g,(a,s,l)=>(r.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function XV(e){try{return decodeURI(e)}catch(t){return LS(!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 JV(e,t){try{return decodeURIComponent(e)}catch(n){return LS(!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 Wf(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 eH(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Au(e):e;return{pathname:n?n.startsWith("/")?n:tH(n,t):t,search:rH(r),hash:iH(i)}}function tH(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 R_(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 jS(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function MS(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Au(e):(i=Hf({},e),qt(!i.pathname||!i.pathname.includes("?"),R_("?","pathname","search",i)),qt(!i.pathname||!i.pathname.includes("#"),R_("#","pathname","hash",i)),qt(!i.search||!i.search.includes("#"),R_("#","search","hash",i)));let o=e===""||i.pathname==="",a=o?"/":i.pathname,s;if(a==null)s=n;else if(r){let f=t[t.length-1].replace(/^\//,"").split("/");if(a.startsWith("..")){let p=a.split("/");for(;p[0]==="..";)p.shift(),f.pop();i.pathname=p.join("/")}s="/"+f.join("/")}else{let f=t.length-1;if(a.startsWith("..")){let p=a.split("/");for(;p[0]==="..";)p.shift(),f-=1;i.pathname=p.join("/")}s=f>=0?t[f]:"/"}let l=eH(i,s),c=a&&a!=="/"&&a.endsWith("/"),d=(o||a===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||d)&&(l.pathname+="/"),l}const Qa=e=>e.join("/").replace(/\/\/+/g,"/"),nH=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),rH=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,iH=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function oH(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const hD=["post","put","patch","delete"];new Set(hD);const aH=["get",...hD];new Set(aH);/** - * React Router v6.19.0 + */function Hf(){return Hf=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function LS(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function FV(){return Math.random().toString(36).substr(2,8)}function Ck(e,t){return{usr:e.state,key:e.key,idx:t}}function V1(e,t,n,r){return n===void 0&&(n=null),Hf({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Au(t):t,{state:n,key:t&&t.key||r||FV()})}function Kg(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 Au(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 $V(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,a=i.history,s=Ra.Pop,l=null,c=d();c==null&&(c=0,a.replaceState(Hf({},a.state,{idx:c}),""));function d(){return(a.state||{idx:null}).idx}function f(){s=Ra.Pop;let x=d(),_=x==null?null:x-c;c=x,l&&l({action:s,location:y.location,delta:_})}function p(x,_){s=Ra.Push;let w=V1(y.location,x,_);n&&n(w,x),c=d()+1;let S=Ck(w,c),E=y.createHref(w);try{a.pushState(S,"",E)}catch(O){if(O instanceof DOMException&&O.name==="DataCloneError")throw O;i.location.assign(E)}o&&l&&l({action:s,location:y.location,delta:1})}function m(x,_){s=Ra.Replace;let w=V1(y.location,x,_);n&&n(w,x),c=d();let S=Ck(w,c),E=y.createHref(w);a.replaceState(S,"",E),o&&l&&l({action:s,location:y.location,delta:0})}function v(x){let _=i.location.origin!=="null"?i.location.origin:i.location.href,w=typeof x=="string"?x:Kg(x);return qt(_,"No window.location.(origin|href) available to create URL for href: "+w),new URL(w,_)}let y={get action(){return s},get location(){return e(i,a)},listen(x){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(Ok,f),l=x,()=>{i.removeEventListener(Ok,f),l=null}},createHref(x){return t(i,x)},createURL:v,encodeLocation(x){let _=v(x);return{pathname:_.pathname,search:_.search,hash:_.hash}},push:p,replace:m,go(x){return a.go(x)}};return y}var kk;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(kk||(kk={}));function UV(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?Au(t):t,i=Wf(r.pathname||"/",n);if(i==null)return null;let o=dD(e);BV(o);let a=null;for(let s=0;a==null&&s{let l={relativePath:s===void 0?o.path||"":s,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};l.relativePath.startsWith("/")&&(qt(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=Qa([r,l.relativePath]),d=n.concat(l);o.children&&o.children.length>0&&(qt(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),dD(o.children,t,d,c)),!(o.path==null&&!o.index)&&t.push({path:c,score:qV(c,o.index),routesMeta:d})};return e.forEach((o,a)=>{var s;if(o.path===""||!((s=o.path)!=null&&s.includes("?")))i(o,a);else for(let l of fD(o.path))i(o,a,l)}),t}function fD(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let a=fD(r.join("/")),s=[];return s.push(...a.map(l=>l===""?o:[o,l].join("/"))),i&&s.push(...a),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function BV(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:ZV(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const zV=/^:\w+$/,VV=3,HV=2,WV=1,YV=10,GV=-2,Pk=e=>e==="*";function qV(e,t){let n=e.split("/"),r=n.length;return n.some(Pk)&&(r+=GV),t&&(r+=HV),n.filter(i=>!Pk(i)).reduce((i,o)=>i+(zV.test(o)?VV:o===""?WV:YV),r)}function ZV(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 KV(e,t){let{routesMeta:n}=e,r={},i="/",o=[];for(let a=0;a{let{paramName:p,isOptional:m}=d;if(p==="*"){let y=s[f]||"";a=o.slice(0,o.length-y.length).replace(/(.)\/+$/,"$1")}const v=s[f];return m&&!v?c[p]=void 0:c[p]=JV(v||"",p),c},{}),pathname:o,pathnameBase:a,pattern:e}}function QV(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),LS(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:(\w+)(\?)?/g,(a,s,l)=>(r.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function XV(e){try{return decodeURI(e)}catch(t){return LS(!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 JV(e,t){try{return decodeURIComponent(e)}catch(n){return LS(!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 Wf(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 eH(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Au(e):e;return{pathname:n?n.startsWith("/")?n:tH(n,t):t,search:iH(r),hash:oH(i)}}function tH(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 R_(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 nH(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function jS(e){return nH(e).map((t,n)=>n===e.length-1?t.pathname:t.pathnameBase)}function MS(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Au(e):(i=Hf({},e),qt(!i.pathname||!i.pathname.includes("?"),R_("?","pathname","search",i)),qt(!i.pathname||!i.pathname.includes("#"),R_("#","pathname","hash",i)),qt(!i.search||!i.search.includes("#"),R_("#","search","hash",i)));let o=e===""||i.pathname==="",a=o?"/":i.pathname,s;if(a==null)s=n;else if(r){let f=t[t.length-1].replace(/^\//,"").split("/");if(a.startsWith("..")){let p=a.split("/");for(;p[0]==="..";)p.shift(),f.pop();i.pathname=p.join("/")}s="/"+f.join("/")}else{let f=t.length-1;if(a.startsWith("..")){let p=a.split("/");for(;p[0]==="..";)p.shift(),f-=1;i.pathname=p.join("/")}s=f>=0?t[f]:"/"}let l=eH(i,s),c=a&&a!=="/"&&a.endsWith("/"),d=(o||a===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||d)&&(l.pathname+="/"),l}const Qa=e=>e.join("/").replace(/\/\/+/g,"/"),rH=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),iH=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,oH=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function aH(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const hD=["post","put","patch","delete"];new Set(hD);const sH=["get",...hD];new Set(sH);/** + * React Router v6.20.0 * * Copyright (c) Remix Software Inc. * @@ -90,8 +90,8 @@ ${ae.current.stack} * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Qg(){return Qg=Object.assign?Object.assign.bind():function(e){for(var t=1;tl.pathnameBase)),a=I.useRef(!1);return gD(()=>{a.current=!0}),I.useCallback(function(l,c){if(c===void 0&&(c={}),!a.current)return;if(typeof l=="number"){n.go(l);return}let d=MS(l,JSON.parse(o),i,c.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Qa([t,d.pathname])),(c.replace?n.replace:n.push)(d,c.state,c)},[t,n,o,i,e])}function Rl(){let{matches:e}=I.useContext(sa),t=e[e.length-1];return t?t.params:{}}function Zy(e,t){let{relative:n}=t===void 0?{}:t,{matches:r}=I.useContext(sa),{pathname:i}=En(),o=JSON.stringify(jS(r).map((a,s)=>s===r.length-1?a.pathname:a.pathnameBase));return I.useMemo(()=>MS(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function cH(e,t){return uH(e,t)}function uH(e,t,n){Nl()||qt(!1);let{navigator:r}=I.useContext(Ml),{matches:i}=I.useContext(sa),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let s=o?o.pathnameBase:"/";o&&o.route;let l=En(),c;if(t){var d;let y=typeof t=="string"?Au(t):t;s==="/"||(d=y.pathname)!=null&&d.startsWith(s)||qt(!1),c=y}else c=l;let f=c.pathname||"/",p=s==="/"?f:f.slice(s.length)||"/",m=UV(e,{pathname:p}),v=mH(m&&m.map(y=>Object.assign({},y,{params:Object.assign({},a,y.params),pathname:Qa([s,r.encodeLocation?r.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?s:Qa([s,r.encodeLocation?r.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),i,n);return t&&v?I.createElement(qy.Provider,{value:{location:Qg({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Ra.Pop}},v):v}function dH(){let e=_H(),t=oH(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},o=null;return I.createElement(I.Fragment,null,I.createElement("h2",null,"Unexpected Application Error!"),I.createElement("h3",{style:{fontStyle:"italic"}},t),n?I.createElement("pre",{style:i},n):null,o)}const fH=I.createElement(dH,null);class hH extends I.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?I.createElement(sa.Provider,{value:this.props.routeContext},I.createElement(mD.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function pH(e){let{routeContext:t,match:n,children:r}=e,i=I.useContext(Gy);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),I.createElement(sa.Provider,{value:t},r)}function mH(e,t,n){var r;if(t===void 0&&(t=[]),n===void 0&&(n=null),e==null){var i;if((i=n)!=null&&i.errors)e=n.matches;else return null}let o=e,a=(r=n)==null?void 0:r.errors;if(a!=null){let s=o.findIndex(l=>l.route.id&&(a==null?void 0:a[l.route.id]));s>=0||qt(!1),o=o.slice(0,Math.min(o.length,s+1))}return o.reduceRight((s,l,c)=>{let d=l.route.id?a==null?void 0:a[l.route.id]:null,f=null;n&&(f=l.route.errorElement||fH);let p=t.concat(o.slice(0,c+1)),m=()=>{let v;return d?v=f:l.route.Component?v=I.createElement(l.route.Component,null):l.route.element?v=l.route.element:v=s,I.createElement(pH,{match:l,routeContext:{outlet:s,matches:p,isDataRoute:n!=null},children:v})};return n&&(l.route.ErrorBoundary||l.route.errorElement||c===0)?I.createElement(hH,{location:n.location,revalidation:n.revalidation,component:f,error:d,children:m(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):m()},null)}var vD=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(vD||{}),Xg=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Xg||{});function gH(e){let t=I.useContext(Gy);return t||qt(!1),t}function vH(e){let t=I.useContext(pD);return t||qt(!1),t}function yH(e){let t=I.useContext(sa);return t||qt(!1),t}function yD(e){let t=yH(),n=t.matches[t.matches.length-1];return n.route.id||qt(!1),n.route.id}function _H(){var e;let t=I.useContext(mD),n=vH(Xg.UseRouteError),r=yD(Xg.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function bH(){let{router:e}=gH(vD.UseNavigateStable),t=yD(Xg.UseNavigateStable),n=I.useRef(!1);return gD(()=>{n.current=!0}),I.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Qg({fromRouteId:t},o)))},[e,t])}function NS(e){let{to:t,replace:n,state:r,relative:i}=e;Nl()||qt(!1);let{matches:o}=I.useContext(sa),{pathname:a}=En(),s=So(),l=MS(t,jS(o).map(d=>d.pathnameBase),a,i==="path"),c=JSON.stringify(l);return I.useEffect(()=>s(JSON.parse(c),{replace:n,state:r,relative:i}),[s,c,i,n,r]),null}function vt(e){qt(!1)}function wH(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Ra.Pop,navigator:o,static:a=!1}=e;Nl()&&qt(!1);let s=t.replace(/^\/*/,"/"),l=I.useMemo(()=>({basename:s,navigator:o,static:a}),[s,o,a]);typeof r=="string"&&(r=Au(r));let{pathname:c="/",search:d="",hash:f="",state:p=null,key:m="default"}=r,v=I.useMemo(()=>{let y=Wf(c,s);return y==null?null:{location:{pathname:y,search:d,hash:f,state:p,key:m},navigationType:i}},[s,c,d,f,p,m,i]);return v==null?null:I.createElement(Ml.Provider,{value:l},I.createElement(qy.Provider,{children:n,value:v}))}function Ky(e){let{children:t,location:n}=e;return cH(W1(t),n)}new Promise(()=>{});function W1(e,t){t===void 0&&(t=[]);let n=[];return I.Children.forEach(e,(r,i)=>{if(!I.isValidElement(r))return;let o=[...t,i];if(r.type===I.Fragment){n.push.apply(n,W1(r.props.children,o));return}r.type!==vt&&qt(!1),!r.props.index||!r.props.children||qt(!1);let a={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=W1(r.props.children,o)),n.push(a)}),n}/** - * React Router DOM v6.19.0 + */function Qg(){return Qg=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a.current=!0}),I.useCallback(function(l,c){if(c===void 0&&(c={}),!a.current)return;if(typeof l=="number"){n.go(l);return}let d=MS(l,JSON.parse(o),i,c.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Qa([t,d.pathname])),(c.replace?n.replace:n.push)(d,c.state,c)},[t,n,o,i,e])}function Rl(){let{matches:e}=I.useContext(sa),t=e[e.length-1];return t?t.params:{}}function Zy(e,t){let{relative:n}=t===void 0?{}:t,{matches:r}=I.useContext(sa),{pathname:i}=En(),o=JSON.stringify(jS(r));return I.useMemo(()=>MS(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function uH(e,t){return dH(e,t)}function dH(e,t,n){Nl()||qt(!1);let{navigator:r}=I.useContext(Ml),{matches:i}=I.useContext(sa),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let s=o?o.pathnameBase:"/";o&&o.route;let l=En(),c;if(t){var d;let y=typeof t=="string"?Au(t):t;s==="/"||(d=y.pathname)!=null&&d.startsWith(s)||qt(!1),c=y}else c=l;let f=c.pathname||"/",p=s==="/"?f:f.slice(s.length)||"/",m=UV(e,{pathname:p}),v=gH(m&&m.map(y=>Object.assign({},y,{params:Object.assign({},a,y.params),pathname:Qa([s,r.encodeLocation?r.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?s:Qa([s,r.encodeLocation?r.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),i,n);return t&&v?I.createElement(qy.Provider,{value:{location:Qg({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Ra.Pop}},v):v}function fH(){let e=bH(),t=aH(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},o=null;return I.createElement(I.Fragment,null,I.createElement("h2",null,"Unexpected Application Error!"),I.createElement("h3",{style:{fontStyle:"italic"}},t),n?I.createElement("pre",{style:i},n):null,o)}const hH=I.createElement(fH,null);class pH extends I.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?I.createElement(sa.Provider,{value:this.props.routeContext},I.createElement(mD.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function mH(e){let{routeContext:t,match:n,children:r}=e,i=I.useContext(Gy);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),I.createElement(sa.Provider,{value:t},r)}function gH(e,t,n){var r;if(t===void 0&&(t=[]),n===void 0&&(n=null),e==null){var i;if((i=n)!=null&&i.errors)e=n.matches;else return null}let o=e,a=(r=n)==null?void 0:r.errors;if(a!=null){let s=o.findIndex(l=>l.route.id&&(a==null?void 0:a[l.route.id]));s>=0||qt(!1),o=o.slice(0,Math.min(o.length,s+1))}return o.reduceRight((s,l,c)=>{let d=l.route.id?a==null?void 0:a[l.route.id]:null,f=null;n&&(f=l.route.errorElement||hH);let p=t.concat(o.slice(0,c+1)),m=()=>{let v;return d?v=f:l.route.Component?v=I.createElement(l.route.Component,null):l.route.element?v=l.route.element:v=s,I.createElement(mH,{match:l,routeContext:{outlet:s,matches:p,isDataRoute:n!=null},children:v})};return n&&(l.route.ErrorBoundary||l.route.errorElement||c===0)?I.createElement(pH,{location:n.location,revalidation:n.revalidation,component:f,error:d,children:m(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):m()},null)}var vD=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(vD||{}),Xg=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Xg||{});function vH(e){let t=I.useContext(Gy);return t||qt(!1),t}function yH(e){let t=I.useContext(pD);return t||qt(!1),t}function _H(e){let t=I.useContext(sa);return t||qt(!1),t}function yD(e){let t=_H(),n=t.matches[t.matches.length-1];return n.route.id||qt(!1),n.route.id}function bH(){var e;let t=I.useContext(mD),n=yH(Xg.UseRouteError),r=yD(Xg.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function wH(){let{router:e}=vH(vD.UseNavigateStable),t=yD(Xg.UseNavigateStable),n=I.useRef(!1);return gD(()=>{n.current=!0}),I.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Qg({fromRouteId:t},o)))},[e,t])}function NS(e){let{to:t,replace:n,state:r,relative:i}=e;Nl()||qt(!1);let{matches:o}=I.useContext(sa),{pathname:a}=En(),s=So(),l=MS(t,jS(o),a,i==="path"),c=JSON.stringify(l);return I.useEffect(()=>s(JSON.parse(c),{replace:n,state:r,relative:i}),[s,c,i,n,r]),null}function vt(e){qt(!1)}function xH(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Ra.Pop,navigator:o,static:a=!1}=e;Nl()&&qt(!1);let s=t.replace(/^\/*/,"/"),l=I.useMemo(()=>({basename:s,navigator:o,static:a}),[s,o,a]);typeof r=="string"&&(r=Au(r));let{pathname:c="/",search:d="",hash:f="",state:p=null,key:m="default"}=r,v=I.useMemo(()=>{let y=Wf(c,s);return y==null?null:{location:{pathname:y,search:d,hash:f,state:p,key:m},navigationType:i}},[s,c,d,f,p,m,i]);return v==null?null:I.createElement(Ml.Provider,{value:l},I.createElement(qy.Provider,{children:n,value:v}))}function Ky(e){let{children:t,location:n}=e;return uH(W1(t),n)}new Promise(()=>{});function W1(e,t){t===void 0&&(t=[]);let n=[];return I.Children.forEach(e,(r,i)=>{if(!I.isValidElement(r))return;let o=[...t,i];if(r.type===I.Fragment){n.push.apply(n,W1(r.props.children,o));return}r.type!==vt&&qt(!1),!r.props.index||!r.props.children||qt(!1);let a={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=W1(r.props.children,o)),n.push(a)}),n}/** + * React Router DOM v6.20.0 * * Copyright (c) Remix Software Inc. * @@ -99,9 +99,9 @@ ${ae.current.stack} * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Jg(){return Jg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function xH(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function SH(e,t){return e.button===0&&(!t||t==="_self")&&!xH(e)}const EH=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],TH=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],OH=I.createContext({isTransitioning:!1}),CH="startTransition",Lk=xB[CH];function bD(e){let{basename:t,children:n,future:r,window:i}=e,o=I.useRef();o.current==null&&(o.current=IV({window:i,v5Compat:!0}));let a=o.current,[s,l]=I.useState({action:a.action,location:a.location}),{v7_startTransition:c}=r||{},d=I.useCallback(f=>{c&&Lk?Lk(()=>l(f)):l(f)},[l,c]);return I.useLayoutEffect(()=>a.listen(d),[a,d]),I.createElement(wH,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:a})}const kH=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",PH=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,It=I.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:a,state:s,target:l,to:c,preventScrollReset:d,unstable_viewTransition:f}=t,p=_D(t,EH),{basename:m}=I.useContext(Ml),v,y=!1;if(typeof c=="string"&&PH.test(c)&&(v=c,kH))try{let S=new URL(window.location.href),E=c.startsWith("//")?new URL(S.protocol+c):new URL(c),O=Wf(E.pathname,m);E.origin===S.origin&&O!=null?c=O+E.search+E.hash:y=!0}catch{}let x=sH(c,{relative:i}),_=jH(c,{replace:a,state:s,target:l,preventScrollReset:d,relative:i,unstable_viewTransition:f});function w(S){r&&r(S),S.defaultPrevented||_(S)}return I.createElement("a",Jg({},p,{href:v||x,onClick:y||o?r:w,ref:n,target:l}))}),wD=I.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:o="",end:a=!1,style:s,to:l,unstable_viewTransition:c,children:d}=t,f=_D(t,TH),p=Zy(l,{relative:f.relative}),m=En(),v=I.useContext(pD),{navigator:y}=I.useContext(Ml),x=v!=null&&MH(p)&&c===!0,_=y.encodeLocation?y.encodeLocation(p).pathname:p.pathname,w=m.pathname,S=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;i||(w=w.toLowerCase(),S=S?S.toLowerCase():null,_=_.toLowerCase());const E=_!=="/"&&_.endsWith("/")?_.length-1:_.length;let O=w===_||!a&&w.startsWith(_)&&w.charAt(E)==="/",k=S!=null&&(S===_||!a&&S.startsWith(_)&&S.charAt(_.length)==="/"),j={isActive:O,isPending:k,isTransitioning:x},A=O?r:void 0,U;typeof o=="function"?U=o(j):U=[o,O?"active":null,k?"pending":null,x?"transitioning":null].filter(Boolean).join(" ");let R=typeof s=="function"?s(j):s;return I.createElement(It,Jg({},f,{"aria-current":A,className:U,ref:n,style:R,to:l,unstable_viewTransition:c}),typeof d=="function"?d(j):d)});var Y1;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Y1||(Y1={}));var jk;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(jk||(jk={}));function LH(e){let t=I.useContext(Gy);return t||qt(!1),t}function jH(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:a,unstable_viewTransition:s}=t===void 0?{}:t,l=So(),c=En(),d=Zy(e,{relative:a});return I.useCallback(f=>{if(SH(f,n)){f.preventDefault();let p=r!==void 0?r:Kg(c)===Kg(d);l(e,{replace:p,state:i,preventScrollReset:o,relative:a,unstable_viewTransition:s})}},[c,l,d,r,i,n,e,o,a,s])}function MH(e,t){t===void 0&&(t={});let n=I.useContext(OH);n==null&&qt(!1);let{basename:r}=LH(Y1.useViewTransitionState),i=Zy(e,{relative:t.relative});if(!n.isTransitioning)return!1;let o=Wf(n.currentLocation.pathname,r)||n.currentLocation.pathname,a=Wf(n.nextLocation.pathname,r)||n.nextLocation.pathname;return H1(i.pathname,a)!=null||H1(i.pathname,o)!=null}const NH="shlink-web-client",RH="A React-based progressive web application for shlink",AH="/shlink-web-client/dependabot/npm_and_yarn/vite-2b5f0a7cc8",DH="https://github.com/shlinkio/shlink-web-client",IH="MIT",FH={lint:"npm run lint:css && npm run lint:js","lint:css":"stylelint src/*.scss src/**/*.scss","lint:js":"eslint --ext .js,.ts,.tsx src test","lint:fix":"npm run lint:css:fix && npm run lint:js:fix","lint:css:fix":"npm run lint:css -- --fix","lint:js:fix":"npm run lint:js -- --fix",types:"tsc",start:"vite serve --host=0.0.0.0",preview:"vite preview --host=0.0.0.0",build:"npm run types && vite build && node scripts/replace-version.mjs","build:dist":"npm run build && node scripts/create-dist-file.mjs",test:"vitest run --run","test:watch":"vitest --watch","test:ci":"npm run test -- --coverage","test:verbose":"npm run test -- --verbose"},$H={"@fortawesome/fontawesome-free":"^6.4.2","@fortawesome/fontawesome-svg-core":"^6.4.2","@fortawesome/free-brands-svg-icons":"^6.4.2","@fortawesome/free-regular-svg-icons":"^6.4.2","@fortawesome/free-solid-svg-icons":"^6.4.2","@fortawesome/react-fontawesome":"^0.2.0","@json2csv/plainjs":"^7.0.3","@reduxjs/toolkit":"^1.9.7","@shlinkio/data-manipulation":"^1.0.1","@shlinkio/shlink-frontend-kit":"^0.4.0","@shlinkio/shlink-js-sdk":"^0.1.0","@shlinkio/shlink-web-component":"^0.3.5",bootstrap:"5.2.3",bottlejs:"^2.0.1",clsx:"^2.0.0","compare-versions":"^6.1.0",csvtojson:"^2.0.10","date-fns":"^2.30.0",react:"^18.2.0","react-dom":"^18.2.0","react-external-link":"^2.2.0","react-redux":"^8.1.3","react-router-dom":"^6.19.0",reactstrap:"^9.2.1","redux-localstorage-simple":"^2.5.1",uuid:"^9.0.1","workbox-core":"^7.0.0","workbox-expiration":"^7.0.0","workbox-precaching":"^7.0.0","workbox-routing":"^7.0.0","workbox-strategies":"^7.0.0"},UH={"@shlinkio/eslint-config-js-coding-standard":"~2.3.0","@shlinkio/stylelint-config-css-coding-standard":"~1.1.1","@testing-library/jest-dom":"^6.1.4","@testing-library/react":"^14.1.2","@testing-library/user-event":"^14.5.1","@total-typescript/shoehorn":"^0.1.1","@types/react":"^18.2.37","@types/react-dom":"^18.2.15","@types/uuid":"^9.0.7","@vitejs/plugin-react":"^4.2.0","@vitest/coverage-v8":"^0.34.6","adm-zip":"^0.5.10","axe-core":"^4.8.2",chalk:"^5.3.0",eslint:"^8.54.0",history:"^5.3.0",jsdom:"^22.1.0",sass:"^1.69.5",stylelint:"^15.11.0",typescript:"^5.2.2",vite:"^5.0.2","vite-plugin-pwa":"^0.16.7",vitest:"^0.34.6","vitest-canvas-mock":"^0.3.3"},BH=[">0.2%","not dead","not ie <= 11","not op_mini all"],ev={name:NH,description:RH,private:!1,homepage:AH,repository:DH,license:IH,scripts:FH,dependencies:$H,devDependencies:UH,browserslist:BH};var Yi,_o=".",xD="function",SD="string",ED="__global__",RS="Provider",zH=0,AS=Array.prototype.slice,VH=function(t,n){var r=t[n];if(r===void 0&&Yi.config.strict)throw new Error("Bottle was unable to resolve a service. `"+n+"` is undefined.");return r},Qy=function(t){var n;return this.nested[t]||(n=Yi.pop(),this.nested[t]=n,this.factory(t,function(){return n.container})),this.nested[t]},TD=function(t){return t.split(_o).reduce(VH,this)},HH=function(t,n,r,i){var o={configurable:!0,enumerable:!0};return t.length?o.get=function(){var s=0,l=function(d){if(d)throw d;t[s]&&t[s++](r,l)};return l(),r}:(o.value=r,o.writable=!0),Object.defineProperty(i,n,o),i[n]},WH=function(t,n){var r,i;return typeof t===xD&&(n=t,t=ED),r=t.split(_o),i=r.shift(),r.length?Qy.call(this,i).middleware(r.join(_o),n):(this.middlewares[i]||(this.middlewares[i]=[]),this.middlewares[i].push(n)),this},YH=function(t,n){return n(t)},Mk=function(t,n){return(t[n]||[]).concat(t.__global__||[])},GH=function(t,n){var r,i,o,a,s;return this.id,o=this.container,a=this.decorators,s=this.middlewares,r=t+RS,i=Object.create(null),i[r]={configurable:!0,enumerable:!0,get:function(){var c=new n;return delete o[r],o[r]=c,c}},i[t]={configurable:!0,enumerable:!0,get:function(){var c=o[r],d;return c&&(d=Mk(a,t).reduce(YH,c.$get(o)),delete o[r],delete o[t]),d===void 0?d:HH(Mk(s,t),t,d,o)}},Object.defineProperties(o,i),this},OD=function(t,n){var r,i;return r=t.split(_o),this.providerMap[t]&&r.length===1&&!this.container[t+RS]?console.error(t+" provider already instantiated."):(this.originalProviders[t]=n,this.providerMap[t]=!0,i=r.shift(),r.length?(Qy.call(this,i).provider(r.join(_o),n),this):GH.call(this,i,n))},DS=function(t,n){return OD.call(this,t,function(){this.$get=n})},CD=function(t,n,r){var i=arguments.length>3?AS.call(arguments,3):[],o=this;return DS.call(this,t,function(){var s=n,l=i.map(TD,o.container);return r?new(n.bind.apply(n,[null].concat(l))):s.apply(null,l)})},qH=function(t,n){return CD.apply(this,[t,n,!0].concat(AS.call(arguments,2)))},ZH=function(t,n){return CD.apply(this,[t,n,!1].concat(AS.call(arguments,2)))},kD=function(t,n){Object.defineProperty(this,t,{configurable:!0,enumerable:!0,value:n,writable:!0})},PD=function(t,n){var r=t[n];return r||(r={},kD.call(t,n,r)),r},KH=function(t,n){var r;return r=t.split(_o),t=r.pop(),kD.call(r.reduce(PD,this.container),t,n),this},QH=function(t,n){Object.defineProperty(this,t,{configurable:!1,enumerable:!0,value:n,writable:!1})},XH=function(t,n){var r=t.split(_o);return t=r.pop(),QH.call(r.reduce(PD,this.container),t,n),this},LD=function(t,n){var r,i;return typeof t===xD&&(n=t,t=ED),r=t.split(_o),i=r.shift(),r.length?Qy.call(this,i).decorator(r.join(_o),n):(this.decorators[i]||(this.decorators[i]=[]),this.decorators[i].push(n)),this},JH=function(t){return this.deferred.push(t),this},eW=function(t){return(t||[]).map(TD,this.container)},tW=function(t,n){return DS.call(this,t,function(i){return{instance:n.bind(n,i)}})},nW=function(t){return!/^\$(?:decorator|register|list)$|Provider$/.test(t)},IS=function(t){return Object.keys(t||this.container||{}).filter(nW)},tv={},rW=function(t){var n;return typeof t===SD?(n=tv[t],n||(tv[t]=n=new Yi,n.constant("BOTTLE_NAME",t)),n):new Yi},iW=function(t){typeof t===SD?delete tv[t]:tv={}},jD=function(t){var n=t.$value===void 0?t:t.$value;return this[t.$type||"service"].apply(this,[t.$name,n].concat(t.$inject||[]))},Nk=function(t){delete this.providerMap[t],delete this.container[t],delete this.container[t+RS]},oW=function(t){var n=this.originalProviders,r=Array.isArray(t);Object.keys(this.originalProviders).forEach(function(o){if(!(r&&t.indexOf(o)===-1)){var a=o.split(_o);a.length>1&&a.forEach(Nk,Qy.call(this,a[0])),Nk.call(this,o),this.provider(o,n[o])}},this)},aW=function(t){return this.deferred.forEach(function(r){r(t)}),this};Yi=function e(t){if(!(this instanceof e))return e.pop(t);this.id=zH++,this.decorators={},this.middlewares={},this.nested={},this.providerMap={},this.originalProviders={},this.deferred=[],this.container={$decorator:LD.bind(this),$register:jD.bind(this),$list:IS.bind(this)}};Yi.prototype={constant:XH,decorator:LD,defer:JH,digest:eW,factory:DS,instanceFactory:tW,list:IS,middleware:WH,provider:OD,resetProviders:oW,register:jD,resolve:aW,service:qH,serviceFactory:ZH,value:KH};Yi.pop=rW;Yi.clear=iW;Yi.list=IS;Yi.config={strict:!1};const sW=Yi;var MD=(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))(MD||{}),ND=(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))(ND||{}),lW=Object.defineProperty,cW=(e,t,n)=>t in e?lW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,uW=(e,t,n)=>(cW(e,typeof t!="symbol"?t+"":t,n),n);const dW=(e,t)=>`${e}/rest/v${t}`,fW=e=>e.dir?`${e.field}-${e.dir}`:void 0,hW=({orderBy:e={},excludeMaxVisitsReached:t,excludePastValidUntil:n,...r})=>({...r,excludeMaxVisitsReached:t===!0?"true":void 0,excludePastValidUntil:n===!0?"true":void 0,orderBy:fW(e)}),pW=e=>e===null||!(typeof e=="object"&&"type"in e&&"status"in e)?!1:(e.type===MD.NOT_FOUND||e.type===ND.NOT_FOUND)&&e.status===404,mW=(e,t)=>{const[n,r]=e.split("://");if(!r)throw new Error(`It is not possible to determine authority on "${e}" for replacement`);const[,...i]=r.split("/"),o=i.length?`/${i.join("/")}`:"";return`${n}://${t}${o}`},gW=(e={})=>{const t=Object.entries(e).flatMap(([n,r])=>r==null?[]:Array.isArray(r)?r.map(i=>[`${n}[]`,i]):[[n,r]]);return new URLSearchParams(t).toString()};let vW=class{constructor(t,n){uW(this,"apiVersion"),this.httpClient=t,this.serverInfo=n,this.apiVersion=3}async listShortUrls(t={}){return this.performRequest({url:"/short-urls",query:hW(t)}).then(({shortUrls:n})=>n)}async createShortUrl(t){const n=Object.entries(t).reduce((r,[i,o])=>(o&&(r[i]=o),r),{});return this.performRequest({url:"/short-urls",method:"POST",body:n})}async getShortUrlVisits(t,n){return this.performRequest({url:`/short-urls/${t}/visits`,query:n}).then(({visits:r})=>r)}async getTagVisits(t,n){return this.performRequest({url:`/tags/${t}/visits`,query:n}).then(({visits:r})=>r)}async getDomainVisits(t,n){return this.performRequest({url:`/domains/${t}/visits`,query:n}).then(({visits:r})=>r)}async getOrphanVisits(t){return this.performRequest({url:"/visits/orphan",query:t}).then(({visits:n})=>n)}async getNonOrphanVisits(t){return this.performRequest({url:"/visits/non-orphan",query:t}).then(({visits:n})=>n)}async getVisitsOverview(){return this.performRequest({url:"/visits"}).then(({visits:t})=>t)}async getShortUrl(t,n){return this.performRequest({url:`/short-urls/${t}`,query:{domain:n}})}async deleteShortUrl(t,n){return this.performEmptyRequest({url:`/short-urls/${t}`,method:"DELETE",query:{domain:n}})}async updateShortUrl(t,n,r){return this.performRequest({url:`/short-urls/${t}`,method:"PATCH",query:{domain:n},body:r})}async listTags(){return this.performRequest({url:"/tags",query:{withStats:"true"}}).then(({tags:t})=>t).then(({data:t,stats:n=[]})=>({tags:t,stats:n}))}async tagsStats(){return this.performRequest({url:"/tags/stats"}).then(({tags:t})=>t).then(({data:t})=>({tags:t.map(({tag:n})=>n),stats:t}))}async deleteTags(t){return this.performEmptyRequest({url:"/tags",method:"DELETE",query:{tags:t}}).then(()=>({tags:t}))}async editTag(t,n){return this.performEmptyRequest({url:"/tags",method:"PUT",body:{oldName:t,newName:n}}).then(()=>({oldName:t,newName:n}))}async health(t){return this.performRequest({url:"/health",domain:t})}async mercureInfo(){return this.performRequest({url:"/mercure-info"})}async listDomains(){return this.performRequest({url:"/domains"}).then(({domains:t})=>t)}async editDomainRedirects(t){return this.performRequest({url:"/domains/redirects",method:"PATCH",body:t})}async performRequest(t){return this.httpClient.jsonRequest(...this.toFetchParams(t)).catch(this.handleFetchError(()=>this.httpClient.jsonRequest(...this.toFetchParams(t))))}async performEmptyRequest(t){return this.httpClient.emptyRequest(...this.toFetchParams(t)).catch(this.handleFetchError(()=>this.httpClient.emptyRequest(...this.toFetchParams(t))))}toFetchParams({url:t,method:n="GET",query:r={},body:i,domain:o}){const a=gW(r),s=a?`?${a}`:"",l=o?mW(this.serverInfo.baseUrl,o):this.serverInfo.baseUrl;return[`${dW(l,this.apiVersion)}${t}${s}`,{method:n,body:i&&JSON.stringify(i),headers:{"X-Api-Key":this.serverInfo.apiKey}}]}handleFetchError(t){return n=>{if(!pW(n))throw n;return this.apiVersion=2,t()}}};const RD=e=>!!(e!=null&&e.url)&&!!(e!=null&&e.apiKey),rf=e=>!!(e!=null&&e.id),AD=e=>!!(e!=null&&e.version),yW=e=>!!(e!=null&&e.serverNotFound),_W=e=>rf(e)?e.id:"",bW=({id:e,autoConnect:t,...n})=>n,Rk={},wW=e=>typeof e=="function",xW=e=>{const{selectedServer:t}=e();if(!RD(t))throw new Error("There's no selected server or it is not found");return t},SW=e=>t=>{const{url:n,apiKey:r}=wW(t)?xW(t):t,i=`${r}_${n}`,o=Rk[i]??new vW(e,{apiKey:r,baseUrl:n});return Rk[i]=o,o},EW=e=>{e.serviceFactory("buildShlinkApiClient",SW,"HttpClient")};var TW={prefix:"fas",iconName:"calendar-days",icon:[448,512,["calendar-alt"],"f073","M128 0c17.7 0 32 14.3 32 32V64H288V32c0-17.7 14.3-32 32-32s32 14.3 32 32V64h48c26.5 0 48 21.5 48 48v48H0V112C0 85.5 21.5 64 48 64H96V32c0-17.7 14.3-32 32-32zM0 192H448V464c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V192zm64 80v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V272c0-8.8-7.2-16-16-16H80c-8.8 0-16 7.2-16 16zm128 0v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V272c0-8.8-7.2-16-16-16H208c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V272c0-8.8-7.2-16-16-16H336zM64 400v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V400c0-8.8-7.2-16-16-16H80c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V400c0-8.8-7.2-16-16-16H208zm112 16v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V400c0-8.8-7.2-16-16-16H336c-8.8 0-16 7.2-16 16z"]},OW=TW,CW={prefix:"fas",iconName:"circle-minus",icon:[512,512,["minus-circle"],"f056","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM184 232H328c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z"]},FS=CW,kW={prefix:"fas",iconName:"file-csv",icon:[512,512,[],"f6dd","M0 64C0 28.7 28.7 0 64 0H224V128c0 17.7 14.3 32 32 32H384V304H176c-35.3 0-64 28.7-64 64V512H64c-35.3 0-64-28.7-64-64V64zm384 64H256V0L384 128zM200 352h16c22.1 0 40 17.9 40 40v8c0 8.8-7.2 16-16 16s-16-7.2-16-16v-8c0-4.4-3.6-8-8-8H200c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8h16c4.4 0 8-3.6 8-8v-8c0-8.8 7.2-16 16-16s16 7.2 16 16v8c0 22.1-17.9 40-40 40H200c-22.1 0-40-17.9-40-40V392c0-22.1 17.9-40 40-40zm133.1 0H368c8.8 0 16 7.2 16 16s-7.2 16-16 16H333.1c-7.2 0-13.1 5.9-13.1 13.1c0 5.2 3 9.9 7.8 12l37.4 16.6c16.3 7.2 26.8 23.4 26.8 41.2c0 24.9-20.2 45.1-45.1 45.1H304c-8.8 0-16-7.2-16-16s7.2-16 16-16h42.9c7.2 0 13.1-5.9 13.1-13.1c0-5.2-3-9.9-7.8-12l-37.4-16.6c-16.3-7.2-26.8-23.4-26.8-41.2c0-24.9 20.2-45.1 45.1-45.1zm98.9 0c8.8 0 16 7.2 16 16v31.6c0 23 5.5 45.6 16 66c10.5-20.3 16-42.9 16-66V368c0-8.8 7.2-16 16-16s16 7.2 16 16v31.6c0 34.7-10.3 68.7-29.6 97.6l-5.1 7.7c-3 4.5-8 7.1-13.3 7.1s-10.3-2.7-13.3-7.1l-5.1-7.7c-19.3-28.9-29.6-62.9-29.6-97.6V368c0-8.8 7.2-16 16-16z"]},PW={prefix:"fas",iconName:"pencil",icon:[512,512,[9999,61504,"pencil-alt"],"f303","M410.3 231l11.3-11.3-33.9-33.9-62.1-62.1L291.7 89.8l-11.3 11.3-22.6 22.6L58.6 322.9c-10.4 10.4-18 23.3-22.2 37.4L1 480.7c-2.5 8.4-.2 17.5 6.1 23.7s15.3 8.5 23.7 6.1l120.3-35.4c14.1-4.2 27-11.8 37.4-22.2L387.7 253.7 410.3 231zM160 399.4l-9.1 22.7c-4 3.1-8.5 5.4-13.3 6.9L59.4 452l23-78.1c1.4-4.9 3.8-9.4 6.9-13.3l22.7-9.1v32c0 8.8 7.2 16 16 16h32zM362.7 18.7L348.3 33.2 325.7 55.8 314.3 67.1l33.9 33.9 62.1 62.1 33.9 33.9 11.3-11.3 22.6-22.6 14.5-14.5c25-25 25-65.5 0-90.5L453.3 18.7c-25-25-65.5-25-90.5 0zm-47.4 168l-144 144c-6.2 6.2-16.4 6.2-22.6 0s-6.2-16.4 0-22.6l144-144c6.2-6.2 16.4-6.2 22.6 0s6.2 16.4 0 22.6z"]},LW=PW,DD={prefix:"fas",iconName:"circle-notch",icon:[512,512,[],"f1ce","M222.7 32.1c5 16.9-4.6 34.8-21.5 39.8C121.8 95.6 64 169.1 64 256c0 106 86 192 192 192s192-86 192-192c0-86.9-57.8-160.4-137.1-184.1c-16.9-5-26.6-22.9-21.5-39.8s22.9-26.6 39.8-21.5C434.9 42.1 512 140 512 256c0 141.4-114.6 256-256 256S0 397.4 0 256C0 140 77.1 42.1 182.9 10.6c16.9-5 34.8 4.6 39.8 21.5z"]},jW={prefix:"fas",iconName:"bars",icon:[448,512,["navicon"],"f0c9","M0 96C0 78.3 14.3 64 32 64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z"]},ID={prefix:"fas",iconName:"list",icon:[512,512,["list-squares"],"f03a","M40 48C26.7 48 16 58.7 16 72v48c0 13.3 10.7 24 24 24H88c13.3 0 24-10.7 24-24V72c0-13.3-10.7-24-24-24H40zM192 64c-17.7 0-32 14.3-32 32s14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H192zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H192zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H192zM16 232v48c0 13.3 10.7 24 24 24H88c13.3 0 24-10.7 24-24V232c0-13.3-10.7-24-24-24H40c-13.3 0-24 10.7-24 24zM40 368c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24H88c13.3 0 24-10.7 24-24V392c0-13.3-10.7-24-24-24H40z"]},MW={prefix:"fas",iconName:"circle-dot",icon:[512,512,[128280,"dot-circle"],"f192","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-352a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"]},NW=MW,RW={prefix:"fas",iconName:"pen-to-square",icon:[512,512,["edit"],"f044","M471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7zm-299.2 220c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3 172.4 241.7zM96 64C43 64 0 107 0 160V416c0 53 43 96 96 96H352c53 0 96-43 96-96V320c0-17.7-14.3-32-32-32s-32 14.3-32 32v96c0 17.7-14.3 32-32 32H96c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H96z"]},$S=RW,AW={prefix:"fas",iconName:"plug",icon:[384,512,[128268],"f1e6","M96 0C78.3 0 64 14.3 64 32v96h64V32c0-17.7-14.3-32-32-32zM288 0c-17.7 0-32 14.3-32 32v96h64V32c0-17.7-14.3-32-32-32zM32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32v32c0 77.4 55 142 128 156.8V480c0 17.7 14.3 32 32 32s32-14.3 32-32V412.8C297 398 352 333.4 352 256V224c17.7 0 32-14.3 32-32s-14.3-32-32-32H32z"]},DW={prefix:"fas",iconName:"globe",icon:[512,512,[127760],"f0ac","M352 256c0 22.2-1.2 43.6-3.3 64H163.3c-2.2-20.4-3.3-41.8-3.3-64s1.2-43.6 3.3-64H348.7c2.2 20.4 3.3 41.8 3.3 64zm28.8-64H503.9c5.3 20.5 8.1 41.9 8.1 64s-2.8 43.5-8.1 64H380.8c2.1-20.6 3.2-42 3.2-64s-1.1-43.4-3.2-64zm112.6-32H376.7c-10-63.9-29.8-117.4-55.3-151.6c78.3 20.7 142 77.5 171.9 151.6zm-149.1 0H167.7c6.1-36.4 15.5-68.6 27-94.7c10.5-23.6 22.2-40.7 33.5-51.5C239.4 3.2 248.7 0 256 0s16.6 3.2 27.8 13.8c11.3 10.8 23 27.9 33.5 51.5c11.6 26 20.9 58.2 27 94.7zm-209 0H18.6C48.6 85.9 112.2 29.1 190.6 8.4C165.1 42.6 145.3 96.1 135.3 160zM8.1 192H131.2c-2.1 20.6-3.2 42-3.2 64s1.1 43.4 3.2 64H8.1C2.8 299.5 0 278.1 0 256s2.8-43.5 8.1-64zM194.7 446.6c-11.6-26-20.9-58.2-27-94.6H344.3c-6.1 36.4-15.5 68.6-27 94.6c-10.5 23.6-22.2 40.7-33.5 51.5C272.6 508.8 263.3 512 256 512s-16.6-3.2-27.8-13.8c-11.3-10.8-23-27.9-33.5-51.5zM135.3 352c10 63.9 29.8 117.4 55.3 151.6C112.2 482.9 48.6 426.1 18.6 352H135.3zm358.1 0c-30 74.1-93.6 130.9-171.9 151.6c25.5-34.2 45.2-87.7 55.3-151.6H493.4z"]},IW={prefix:"fas",iconName:"ban",icon:[512,512,[128683,"cancel"],"f05e","M367.2 412.5L99.5 144.8C77.1 176.1 64 214.5 64 256c0 106 86 192 192 192c41.5 0 79.9-13.1 111.2-35.5zm45.3-45.3C434.9 335.9 448 297.5 448 256c0-106-86-192-192-192c-41.5 0-79.9 13.1-111.2 35.5L412.5 367.2zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z"]},Ak={prefix:"fas",iconName:"server",icon:[512,512,[],"f233","M64 32C28.7 32 0 60.7 0 96v64c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zm280 72a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm48 24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0zM64 288c-35.3 0-64 28.7-64 64v64c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V352c0-35.3-28.7-64-64-64H64zm280 72a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm56 24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0z"]},FW={prefix:"fas",iconName:"file-arrow-up",icon:[384,512,["file-upload"],"f574","M64 0C28.7 0 0 28.7 0 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V160H256c-17.7 0-32-14.3-32-32V0H64zM256 0V128H384L256 0zM216 408c0 13.3-10.7 24-24 24s-24-10.7-24-24V305.9l-31 31c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l72-72c9.4-9.4 24.6-9.4 33.9 0l72 72c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-31-31V408z"]},$W=FW,UW={prefix:"fas",iconName:"map-location-dot",icon:[576,512,["map-marked-alt"],"f5a0","M408 120c0 54.6-73.1 151.9-105.2 192c-7.7 9.6-22 9.6-29.6 0C241.1 271.9 168 174.6 168 120C168 53.7 221.7 0 288 0s120 53.7 120 120zm8 80.4c3.5-6.9 6.7-13.8 9.6-20.6c.5-1.2 1-2.5 1.5-3.7l116-46.4C558.9 123.4 576 135 576 152V422.8c0 9.8-6 18.6-15.1 22.3L416 503V200.4zM137.6 138.3c2.4 14.1 7.2 28.3 12.8 41.5c2.9 6.8 6.1 13.7 9.6 20.6V451.8L32.9 502.7C17.1 509 0 497.4 0 480.4V209.6c0-9.8 6-18.6 15.1-22.3l122.6-49zM327.8 332c13.9-17.4 35.7-45.7 56.2-77V504.3L192 449.4V255c20.5 31.3 42.3 59.6 56.2 77c20.5 25.6 59.1 25.6 79.6 0zM288 152a40 40 0 1 0 0-80 40 40 0 1 0 0 80z"]},G1=UW,BW={prefix:"fas",iconName:"caret-up",icon:[320,512,[],"f0d8","M182.6 137.4c-12.5-12.5-32.8-12.5-45.3 0l-128 128c-9.2 9.2-11.9 22.9-6.9 34.9s16.6 19.8 29.6 19.8H288c12.9 0 24.6-7.8 29.6-19.8s2.2-25.7-6.9-34.9l-128-128z"]},zW={prefix:"fas",iconName:"palette",icon:[512,512,[127912],"f53f","M512 256c0 .9 0 1.8 0 2.7c-.4 36.5-33.6 61.3-70.1 61.3H344c-26.5 0-48 21.5-48 48c0 3.4 .4 6.7 1 9.9c2.1 10.2 6.5 20 10.8 29.9c6.1 13.8 12.1 27.5 12.1 42c0 31.8-21.6 60.7-53.4 62c-3.5 .1-7 .2-10.6 .2C114.6 512 0 397.4 0 256S114.6 0 256 0S512 114.6 512 256zM128 288a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm0-96a32 32 0 1 0 0-64 32 32 0 1 0 0 64zM288 96a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm96 96a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"]},VW={prefix:"fas",iconName:"arrow-down-wide-short",icon:[576,512,["sort-amount-asc","sort-amount-down"],"f160","M151.6 469.6C145.5 476.2 137 480 128 480s-17.5-3.8-23.6-10.4l-88-96c-11.9-13-11.1-33.3 2-45.2s33.3-11.1 45.2 2L96 365.7V64c0-17.7 14.3-32 32-32s32 14.3 32 32V365.7l32.4-35.4c11.9-13 32.2-13.9 45.2-2s13.9 32.2 2 45.2l-88 96zM320 480c-17.7 0-32-14.3-32-32s14.3-32 32-32h32c17.7 0 32 14.3 32 32s-14.3 32-32 32H320zm0-128c-17.7 0-32-14.3-32-32s14.3-32 32-32h96c17.7 0 32 14.3 32 32s-14.3 32-32 32H320zm0-128c-17.7 0-32-14.3-32-32s14.3-32 32-32H480c17.7 0 32 14.3 32 32s-14.3 32-32 32H320zm0-128c-17.7 0-32-14.3-32-32s14.3-32 32-32H544c17.7 0 32 14.3 32 32s-14.3 32-32 32H320z"]},HW=VW,US={prefix:"fas",iconName:"chart-pie",icon:[576,512,["pie-chart"],"f200","M304 240V16.6c0-9 7-16.6 16-16.6C443.7 0 544 100.3 544 224c0 9-7.6 16-16.6 16H304zM32 272C32 150.7 122.1 50.3 239 34.3c9.2-1.3 17 6.1 17 15.4V288L412.5 444.5c6.7 6.7 6.2 17.7-1.5 23.1C371.8 495.6 323.8 512 272 512C139.5 512 32 404.6 32 272zm526.4 16c9.3 0 16.6 7.8 15.4 17c-7.7 55.9-34.6 105.6-73.9 142.3c-6 5.6-15.4 5.2-21.2-.7L320 288H558.4z"]},FD={prefix:"fas",iconName:"tags",icon:[512,512,[],"f02c","M345 39.1L472.8 168.4c52.4 53 52.4 138.2 0 191.2L360.8 472.9c-9.3 9.4-24.5 9.5-33.9 .2s-9.5-24.5-.2-33.9L438.6 325.9c33.9-34.3 33.9-89.4 0-123.7L310.9 72.9c-9.3-9.4-9.2-24.6 .2-33.9s24.6-9.2 33.9 .2zM0 229.5V80C0 53.5 21.5 32 48 32H197.5c17 0 33.3 6.7 45.3 18.7l168 168c25 25 25 65.5 0 90.5L277.3 442.7c-25 25-65.5 25-90.5 0l-168-168C6.7 262.7 0 246.5 0 229.5zM144 144a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"]},Dk={prefix:"fas",iconName:"calendar-xmark",icon:[512,512,["calendar-times"],"f273","M160 0c17.7 0 32 14.3 32 32V64H320V32c0-17.7 14.3-32 32-32s32 14.3 32 32V64h48c26.5 0 48 21.5 48 48v48H32V112c0-26.5 21.5-48 48-48h48V32c0-17.7 14.3-32 32-32zM32 192H480V464c0 26.5-21.5 48-48 48H80c-26.5 0-48-21.5-48-48V192zM337 305c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-47 47-47-47c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l47 47-47 47c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l47-47 47 47c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-47-47 47-47z"]},WW={prefix:"fas",iconName:"trash",icon:[448,512,[],"f1f8","M135.2 17.7L128 32H32C14.3 32 0 46.3 0 64S14.3 96 32 96H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H320l-7.2-14.3C307.4 6.8 296.3 0 284.2 0H163.8c-12.1 0-23.2 6.8-28.6 17.7zM416 128H32L53.2 467c1.6 25.3 22.6 45 47.9 45H346.9c25.3 0 46.3-19.7 47.9-45L416 128z"]},$D={prefix:"fas",iconName:"arrow-left",icon:[448,512,[8592],"f060","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.2 288 416 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-306.7 0L214.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"]},YW={prefix:"fas",iconName:"up-right-from-square",icon:[512,512,["external-link-alt"],"f35d","M352 0c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9L370.7 96 201.4 265.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L416 141.3l41.4 41.4c9.2 9.2 22.9 11.9 34.9 6.9s19.8-16.6 19.8-29.6V32c0-17.7-14.3-32-32-32H352zM80 32C35.8 32 0 67.8 0 112V432c0 44.2 35.8 80 80 80H400c44.2 0 80-35.8 80-80V320c0-17.7-14.3-32-32-32s-32 14.3-32 32V432c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16V112c0-8.8 7.2-16 16-16H192c17.7 0 32-14.3 32-32s-14.3-32-32-32H80z"]},GW=YW,qW={prefix:"fas",iconName:"tag",icon:[448,512,[127991],"f02b","M0 80V229.5c0 17 6.7 33.3 18.7 45.3l176 176c25 25 65.5 25 90.5 0L418.7 317.3c25-25 25-65.5 0-90.5l-176-176c-12-12-28.3-18.7-45.3-18.7H48C21.5 32 0 53.5 0 80zm112 32a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]},ZW={prefix:"fas",iconName:"circle-info",icon:[512,512,["info-circle"],"f05a","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336h24V272H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]},BS=ZW,KW={prefix:"fas",iconName:"arrow-rotate-left",icon:[512,512,[8634,"arrow-left-rotate","arrow-rotate-back","arrow-rotate-backward","undo"],"f0e2","M125.7 160H176c17.7 0 32 14.3 32 32s-14.3 32-32 32H48c-17.7 0-32-14.3-32-32V64c0-17.7 14.3-32 32-32s32 14.3 32 32v51.2L97.6 97.6c87.5-87.5 229.3-87.5 316.8 0s87.5 229.3 0 316.8s-229.3 87.5-316.8 0c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0c62.5 62.5 163.8 62.5 226.3 0s62.5-163.8 0-226.3s-163.8-62.5-226.3 0L125.7 160z"]},QW=KW,XW={prefix:"fas",iconName:"caret-down",icon:[320,512,[],"f0d7","M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z"]},JW={prefix:"fas",iconName:"ellipsis-vertical",icon:[128,512,["ellipsis-v"],"f142","M64 360a56 56 0 1 0 0 112 56 56 0 1 0 0-112zm0-160a56 56 0 1 0 0 112 56 56 0 1 0 0-112zM120 96A56 56 0 1 0 8 96a56 56 0 1 0 112 0z"]},eY=JW,tY={prefix:"fas",iconName:"house",icon:[576,512,[127968,63498,63500,"home","home-alt","home-lg-alt"],"f015","M575.8 255.5c0 18-15 32.1-32 32.1h-32l.7 160.2c0 2.7-.2 5.4-.5 8.1V472c0 22.1-17.9 40-40 40H456c-1.1 0-2.2 0-3.3-.1c-1.4 .1-2.8 .1-4.2 .1H416 392c-22.1 0-40-17.9-40-40V448 384c0-17.7-14.3-32-32-32H256c-17.7 0-32 14.3-32 32v64 24c0 22.1-17.9 40-40 40H160 128.1c-1.5 0-3-.1-4.5-.2c-1.2 .1-2.4 .2-3.6 .2H104c-22.1 0-40-17.9-40-40V360c0-.9 0-1.9 .1-2.8V287.6H32c-18 0-32-14-32-32.1c0-9 3-17 10-24L266.4 8c7-7 15-8 22-8s15 2 21 7L564.8 231.5c8 7 12 15 11 24z"]},nY=tY,rY={prefix:"fas",iconName:"arrow-up-wide-short",icon:[576,512,["sort-amount-up"],"f161","M151.6 42.4C145.5 35.8 137 32 128 32s-17.5 3.8-23.6 10.4l-88 96c-11.9 13-11.1 33.3 2 45.2s33.3 11.1 45.2-2L96 146.3V448c0 17.7 14.3 32 32 32s32-14.3 32-32V146.3l32.4 35.4c11.9 13 32.2 13.9 45.2 2s13.9-32.2 2-45.2l-88-96zM320 480h32c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32s14.3 32 32 32zm0-128h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32s14.3 32 32 32zm0-128H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32s14.3 32 32 32zm0-128H544c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32s14.3 32 32 32z"]},iY=rY,oY={prefix:"fas",iconName:"file-arrow-down",icon:[384,512,["file-download"],"f56d","M64 0C28.7 0 0 28.7 0 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V160H256c-17.7 0-32-14.3-32-32V0H64zM256 0V128H384L256 0zM216 232V334.1l31-31c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-72 72c-9.4 9.4-24.6 9.4-33.9 0l-72-72c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l31 31V232c0-13.3 10.7-24 24-24s24 10.7 24 24z"]},UD=oY,aY={prefix:"fas",iconName:"sun",icon:[512,512,[9728],"f185","M361.5 1.2c5 2.1 8.6 6.6 9.6 11.9L391 121l107.9 19.8c5.3 1 9.8 4.6 11.9 9.6s1.5 10.7-1.6 15.2L446.9 256l62.3 90.3c3.1 4.5 3.7 10.2 1.6 15.2s-6.6 8.6-11.9 9.6L391 391 371.1 498.9c-1 5.3-4.6 9.8-9.6 11.9s-10.7 1.5-15.2-1.6L256 446.9l-90.3 62.3c-4.5 3.1-10.2 3.7-15.2 1.6s-8.6-6.6-9.6-11.9L121 391 13.1 371.1c-5.3-1-9.8-4.6-11.9-9.6s-1.5-10.7 1.6-15.2L65.1 256 2.8 165.7c-3.1-4.5-3.7-10.2-1.6-15.2s6.6-8.6 11.9-9.6L121 121 140.9 13.1c1-5.3 4.6-9.8 9.6-11.9s10.7-1.5 15.2 1.6L256 65.1 346.3 2.8c4.5-3.1 10.2-3.7 15.2-1.6zM160 256a96 96 0 1 1 192 0 96 96 0 1 1 -192 0zm224 0a128 128 0 1 0 -256 0 128 128 0 1 0 256 0z"]},sY={prefix:"fas",iconName:"link",icon:[640,512,[128279,"chain"],"f0c1","M579.8 267.7c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114L422.3 334.8c-31.5 31.5-82.5 31.5-114 0c-27.9-27.9-31.5-71.8-8.6-103.8l1.1-1.6c10.3-14.4 6.9-34.4-7.4-44.6s-34.4-6.9-44.6 7.4l-1.1 1.6C206.5 251.2 213 330 263 380c56.5 56.5 148 56.5 204.5 0L579.8 267.7zM60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5L217.7 177.2c31.5-31.5 82.5-31.5 114 0c27.9 27.9 31.5 71.8 8.6 103.9l-1.1 1.6c-10.3 14.4-6.9 34.4 7.4 44.6s34.4 6.9 44.6-7.4l1.1-1.6C433.5 260.8 427 182 377 132c-56.5-56.5-148-56.5-204.5 0L60.2 244.3z"]},lY={prefix:"fas",iconName:"magnifying-glass",icon:[512,512,[128269,"search"],"f002","M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"]},cY=lY,uY={prefix:"fas",iconName:"chevron-down",icon:[512,512,[],"f078","M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"]},zS={prefix:"fas",iconName:"plus",icon:[448,512,[10133,61543,"add"],"2b","M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H48c-17.7 0-32 14.3-32 32s14.3 32 32 32H192V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H400c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z"]},dY={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]},q1=dY,fY={prefix:"fas",iconName:"chevron-right",icon:[320,512,[9002],"f054","M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"]},hY={prefix:"fas",iconName:"rotate",icon:[512,512,[128260,"sync-alt"],"f2f1","M142.9 142.9c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2s12.5 14.8 22.2 14.8H463.5c0 0 0 0 0 0H472c13.3 0 24-10.7 24-24V72c0-9.7-5.8-18.5-14.8-22.2s-19.3-1.7-26.2 5.2L413.4 96.6c-87.6-86.5-228.7-86.2-315.8 1C73.2 122 55.6 150.7 44.8 181.4c-5.9 16.7 2.9 34.9 19.5 40.8s34.9-2.9 40.8-19.5c7.7-21.8 20.2-42.3 37.8-59.8zM16 312v7.6 .7V440c0 9.7 5.8 18.5 14.8 22.2s19.3 1.7 26.2-5.2l41.6-41.6c87.6 86.5 228.7 86.2 315.8-1c24.4-24.4 42.1-53.1 52.9-83.7c5.9-16.7-2.9-34.9-19.5-40.8s-34.9 2.9-40.8 19.5c-7.7 21.8-20.2 42.3-37.8 59.8c-62.2 62.2-162.7 62.5-225.3 1L185 329c6.9-6.9 8.9-17.2 5.2-26.2s-12.5-14.8-22.2-14.8H48.4h-.7H40c-13.3 0-24 10.7-24 24z"]},pY=hY,Ik={prefix:"fas",iconName:"robot",icon:[640,512,[129302],"f544","M320 0c17.7 0 32 14.3 32 32V96H472c39.8 0 72 32.2 72 72V440c0 39.8-32.2 72-72 72H168c-39.8 0-72-32.2-72-72V168c0-39.8 32.2-72 72-72H288V32c0-17.7 14.3-32 32-32zM208 384c-8.8 0-16 7.2-16 16s7.2 16 16 16h32c8.8 0 16-7.2 16-16s-7.2-16-16-16H208zm96 0c-8.8 0-16 7.2-16 16s7.2 16 16 16h32c8.8 0 16-7.2 16-16s-7.2-16-16-16H304zm96 0c-8.8 0-16 7.2-16 16s7.2 16 16 16h32c8.8 0 16-7.2 16-16s-7.2-16-16-16H400zM264 256a40 40 0 1 0 -80 0 40 40 0 1 0 80 0zm152 40a40 40 0 1 0 0-80 40 40 0 1 0 0 80zM48 224H64V416H48c-26.5 0-48-21.5-48-48V272c0-26.5 21.5-48 48-48zm544 0c26.5 0 48 21.5 48 48v96c0 26.5-21.5 48-48 48H576V224h16z"]},mY={prefix:"fas",iconName:"gears",icon:[640,512,["cogs"],"f085","M308.5 135.3c7.1-6.3 9.9-16.2 6.2-25c-2.3-5.3-4.8-10.5-7.6-15.5L304 89.4c-3-5-6.3-9.9-9.8-14.6c-5.7-7.6-15.7-10.1-24.7-7.1l-28.2 9.3c-10.7-8.8-23-16-36.2-20.9L199 27.1c-1.9-9.3-9.1-16.7-18.5-17.8C173.9 8.4 167.2 8 160.4 8h-.7c-6.8 0-13.5 .4-20.1 1.2c-9.4 1.1-16.6 8.6-18.5 17.8L115 56.1c-13.3 5-25.5 12.1-36.2 20.9L50.5 67.8c-9-3-19-.5-24.7 7.1c-3.5 4.7-6.8 9.6-9.9 14.6l-3 5.3c-2.8 5-5.3 10.2-7.6 15.6c-3.7 8.7-.9 18.6 6.2 25l22.2 19.8C32.6 161.9 32 168.9 32 176s.6 14.1 1.7 20.9L11.5 216.7c-7.1 6.3-9.9 16.2-6.2 25c2.3 5.3 4.8 10.5 7.6 15.6l3 5.2c3 5.1 6.3 9.9 9.9 14.6c5.7 7.6 15.7 10.1 24.7 7.1l28.2-9.3c10.7 8.8 23 16 36.2 20.9l6.1 29.1c1.9 9.3 9.1 16.7 18.5 17.8c6.7 .8 13.5 1.2 20.4 1.2s13.7-.4 20.4-1.2c9.4-1.1 16.6-8.6 18.5-17.8l6.1-29.1c13.3-5 25.5-12.1 36.2-20.9l28.2 9.3c9 3 19 .5 24.7-7.1c3.5-4.7 6.8-9.5 9.8-14.6l3.1-5.4c2.8-5 5.3-10.2 7.6-15.5c3.7-8.7 .9-18.6-6.2-25l-22.2-19.8c1.1-6.8 1.7-13.8 1.7-20.9s-.6-14.1-1.7-20.9l22.2-19.8zM112 176a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zM504.7 500.5c6.3 7.1 16.2 9.9 25 6.2c5.3-2.3 10.5-4.8 15.5-7.6l5.4-3.1c5-3 9.9-6.3 14.6-9.8c7.6-5.7 10.1-15.7 7.1-24.7l-9.3-28.2c8.8-10.7 16-23 20.9-36.2l29.1-6.1c9.3-1.9 16.7-9.1 17.8-18.5c.8-6.7 1.2-13.5 1.2-20.4s-.4-13.7-1.2-20.4c-1.1-9.4-8.6-16.6-17.8-18.5L583.9 307c-5-13.3-12.1-25.5-20.9-36.2l9.3-28.2c3-9 .5-19-7.1-24.7c-4.7-3.5-9.6-6.8-14.6-9.9l-5.3-3c-5-2.8-10.2-5.3-15.6-7.6c-8.7-3.7-18.6-.9-25 6.2l-19.8 22.2c-6.8-1.1-13.8-1.7-20.9-1.7s-14.1 .6-20.9 1.7l-19.8-22.2c-6.3-7.1-16.2-9.9-25-6.2c-5.3 2.3-10.5 4.8-15.6 7.6l-5.2 3c-5.1 3-9.9 6.3-14.6 9.9c-7.6 5.7-10.1 15.7-7.1 24.7l9.3 28.2c-8.8 10.7-16 23-20.9 36.2L315.1 313c-9.3 1.9-16.7 9.1-17.8 18.5c-.8 6.7-1.2 13.5-1.2 20.4s.4 13.7 1.2 20.4c1.1 9.4 8.6 16.6 17.8 18.5l29.1 6.1c5 13.3 12.1 25.5 20.9 36.2l-9.3 28.2c-3 9-.5 19 7.1 24.7c4.7 3.5 9.5 6.8 14.6 9.8l5.4 3.1c5 2.8 10.2 5.3 15.5 7.6c8.7 3.7 18.6 .9 25-6.2l19.8-22.2c6.8 1.1 13.8 1.7 20.9 1.7s14.1-.6 20.9-1.7l19.8 22.2zM464 304a48 48 0 1 1 0 96 48 48 0 1 1 0-96z"]},gY=mY,vY={prefix:"fas",iconName:"qrcode",icon:[448,512,[],"f029","M0 80C0 53.5 21.5 32 48 32h96c26.5 0 48 21.5 48 48v96c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80zM64 96v64h64V96H64zM0 336c0-26.5 21.5-48 48-48h96c26.5 0 48 21.5 48 48v96c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V336zm64 16v64h64V352H64zM304 32h96c26.5 0 48 21.5 48 48v96c0 26.5-21.5 48-48 48H304c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48zm80 64H320v64h64V96zM256 304c0-8.8 7.2-16 16-16h64c8.8 0 16 7.2 16 16s7.2 16 16 16h32c8.8 0 16-7.2 16-16s7.2-16 16-16s16 7.2 16 16v96c0 8.8-7.2 16-16 16H368c-8.8 0-16-7.2-16-16s-7.2-16-16-16s-16 7.2-16 16v64c0 8.8-7.2 16-16 16H272c-8.8 0-16-7.2-16-16V304zM368 480a16 16 0 1 1 0-32 16 16 0 1 1 0 32zm64 0a16 16 0 1 1 0-32 16 16 0 1 1 0 32z"]},yY={prefix:"fas",iconName:"moon",icon:[384,512,[127769,9214],"f186","M223.5 32C100 32 0 132.3 0 256S100 480 223.5 480c60.6 0 115.5-24.2 155.8-63.4c5-4.9 6.3-12.5 3.1-18.7s-10.1-9.7-17-8.5c-9.8 1.7-19.8 2.6-30.1 2.6c-96.9 0-175.5-78.8-175.5-176c0-65.8 36-123.1 89.3-153.3c6.1-3.5 9.2-10.5 7.7-17.3s-7.3-11.9-14.3-12.5c-6.3-.5-12.6-.8-19-.8z"]},_Y={prefix:"fas",iconName:"link-slash",icon:[640,512,["chain-broken","chain-slash","unlink"],"f127","M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L489.3 358.2l90.5-90.5c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114l-96 96-31.9-25C430.9 239.6 420.1 175.1 377 132c-52.2-52.3-134.5-56.2-191.3-11.7L38.8 5.1zM239 162c30.1-14.9 67.7-9.9 92.8 15.3c20 20 27.5 48.3 21.7 74.5L239 162zM406.6 416.4L220.9 270c-2.1 39.8 12.2 80.1 42.2 110c38.9 38.9 94.4 51 143.6 36.3zm-290-228.5L60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5l61.8-61.8-50.6-39.9z"]},bY={prefix:"fas",iconName:"desktop",icon:[576,512,[128421,61704,"desktop-alt"],"f390","M64 0C28.7 0 0 28.7 0 64V352c0 35.3 28.7 64 64 64H240l-10.7 32H160c-17.7 0-32 14.3-32 32s14.3 32 32 32H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H346.7L336 416H512c35.3 0 64-28.7 64-64V64c0-35.3-28.7-64-64-64H64zM512 64V288H64V64H512z"]},Yf={prefix:"fas",iconName:"check",icon:[448,512,[10003,10004],"f00c","M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"]};function Fk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ie(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1;i--){var o=n[i],a=(o.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(a)>-1&&(r=o)}return At.head.insertBefore(t,r),e}}var WY="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function Qf(){for(var e=12,t="";e-- >0;)t+=WY[Math.random()*62|0];return t}function Du(e){for(var t=[],n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function qS(e){return e.classList?Du(e.classList):(e.getAttribute("class")||"").split(" ").filter(function(t){return t})}function XD(e){return"".concat(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function YY(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,'="').concat(XD(e[n]),'" ')},"").trim()}function Xy(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,": ").concat(e[n].trim(),";")},"")}function ZS(e){return e.size!==fo.size||e.x!==fo.x||e.y!==fo.y||e.rotate!==fo.rotate||e.flipX||e.flipY}function GY(e){var t=e.transform,n=e.containerWidth,r=e.iconWidth,i={transform:"translate(".concat(n/2," 256)")},o="translate(".concat(t.x*32,", ").concat(t.y*32,") "),a="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),s="rotate(".concat(t.rotate," 0 0)"),l={transform:"".concat(o," ").concat(a," ").concat(s)},c={transform:"translate(".concat(r/2*-1," -256)")};return{outer:i,inner:l,path:c}}function qY(e){var t=e.transform,n=e.width,r=n===void 0?K1:n,i=e.height,o=i===void 0?K1:i,a=e.startCentered,s=a===void 0?!1:a,l="";return s&&WD?l+="translate(".concat(t.x/_a-r/2,"em, ").concat(t.y/_a-o/2,"em) "):s?l+="translate(calc(-50% + ".concat(t.x/_a,"em), calc(-50% + ").concat(t.y/_a,"em)) "):l+="translate(".concat(t.x/_a,"em, ").concat(t.y/_a,"em) "),l+="scale(".concat(t.size/_a*(t.flipX?-1:1),", ").concat(t.size/_a*(t.flipY?-1:1),") "),l+="rotate(".concat(t.rotate,"deg) "),l}var ZY=`:root, :host { + */function Jg(){return Jg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function SH(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function EH(e,t){return e.button===0&&(!t||t==="_self")&&!SH(e)}const TH=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],OH=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],CH=I.createContext({isTransitioning:!1}),kH="startTransition",Lk=xB[kH];function bD(e){let{basename:t,children:n,future:r,window:i}=e,o=I.useRef();o.current==null&&(o.current=IV({window:i,v5Compat:!0}));let a=o.current,[s,l]=I.useState({action:a.action,location:a.location}),{v7_startTransition:c}=r||{},d=I.useCallback(f=>{c&&Lk?Lk(()=>l(f)):l(f)},[l,c]);return I.useLayoutEffect(()=>a.listen(d),[a,d]),I.createElement(xH,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:a})}const PH=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",LH=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,It=I.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:a,state:s,target:l,to:c,preventScrollReset:d,unstable_viewTransition:f}=t,p=_D(t,TH),{basename:m}=I.useContext(Ml),v,y=!1;if(typeof c=="string"&&LH.test(c)&&(v=c,PH))try{let S=new URL(window.location.href),E=c.startsWith("//")?new URL(S.protocol+c):new URL(c),O=Wf(E.pathname,m);E.origin===S.origin&&O!=null?c=O+E.search+E.hash:y=!0}catch{}let x=lH(c,{relative:i}),_=MH(c,{replace:a,state:s,target:l,preventScrollReset:d,relative:i,unstable_viewTransition:f});function w(S){r&&r(S),S.defaultPrevented||_(S)}return I.createElement("a",Jg({},p,{href:v||x,onClick:y||o?r:w,ref:n,target:l}))}),wD=I.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:o="",end:a=!1,style:s,to:l,unstable_viewTransition:c,children:d}=t,f=_D(t,OH),p=Zy(l,{relative:f.relative}),m=En(),v=I.useContext(pD),{navigator:y}=I.useContext(Ml),x=v!=null&&NH(p)&&c===!0,_=y.encodeLocation?y.encodeLocation(p).pathname:p.pathname,w=m.pathname,S=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;i||(w=w.toLowerCase(),S=S?S.toLowerCase():null,_=_.toLowerCase());const E=_!=="/"&&_.endsWith("/")?_.length-1:_.length;let O=w===_||!a&&w.startsWith(_)&&w.charAt(E)==="/",k=S!=null&&(S===_||!a&&S.startsWith(_)&&S.charAt(_.length)==="/"),j={isActive:O,isPending:k,isTransitioning:x},A=O?r:void 0,U;typeof o=="function"?U=o(j):U=[o,O?"active":null,k?"pending":null,x?"transitioning":null].filter(Boolean).join(" ");let R=typeof s=="function"?s(j):s;return I.createElement(It,Jg({},f,{"aria-current":A,className:U,ref:n,style:R,to:l,unstable_viewTransition:c}),typeof d=="function"?d(j):d)});var Y1;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Y1||(Y1={}));var jk;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(jk||(jk={}));function jH(e){let t=I.useContext(Gy);return t||qt(!1),t}function MH(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:a,unstable_viewTransition:s}=t===void 0?{}:t,l=So(),c=En(),d=Zy(e,{relative:a});return I.useCallback(f=>{if(EH(f,n)){f.preventDefault();let p=r!==void 0?r:Kg(c)===Kg(d);l(e,{replace:p,state:i,preventScrollReset:o,relative:a,unstable_viewTransition:s})}},[c,l,d,r,i,n,e,o,a,s])}function NH(e,t){t===void 0&&(t={});let n=I.useContext(CH);n==null&&qt(!1);let{basename:r}=jH(Y1.useViewTransitionState),i=Zy(e,{relative:t.relative});if(!n.isTransitioning)return!1;let o=Wf(n.currentLocation.pathname,r)||n.currentLocation.pathname,a=Wf(n.nextLocation.pathname,r)||n.nextLocation.pathname;return H1(i.pathname,a)!=null||H1(i.pathname,o)!=null}const RH="shlink-web-client",AH="A React-based progressive web application for shlink",DH="/shlink-web-client/dependabot/npm_and_yarn/vite-2b5f0a7cc8",IH="https://github.com/shlinkio/shlink-web-client",FH="MIT",$H={lint:"npm run lint:css && npm run lint:js","lint:css":"stylelint src/*.scss src/**/*.scss","lint:js":"eslint --ext .js,.ts,.tsx src test","lint:fix":"npm run lint:css:fix && npm run lint:js:fix","lint:css:fix":"npm run lint:css -- --fix","lint:js:fix":"npm run lint:js -- --fix",types:"tsc",start:"vite serve --host=0.0.0.0",preview:"vite preview --host=0.0.0.0",build:"npm run types && vite build && node scripts/replace-version.mjs","build:dist":"npm run build && node scripts/create-dist-file.mjs",test:"vitest run --run","test:watch":"vitest --watch","test:ci":"npm run test -- --coverage","test:verbose":"npm run test -- --verbose"},UH={"@fortawesome/fontawesome-free":"^6.4.2","@fortawesome/fontawesome-svg-core":"^6.4.2","@fortawesome/free-brands-svg-icons":"^6.4.2","@fortawesome/free-regular-svg-icons":"^6.4.2","@fortawesome/free-solid-svg-icons":"^6.4.2","@fortawesome/react-fontawesome":"^0.2.0","@json2csv/plainjs":"^7.0.3","@reduxjs/toolkit":"^1.9.7","@shlinkio/data-manipulation":"^1.0.1","@shlinkio/shlink-frontend-kit":"^0.4.0","@shlinkio/shlink-js-sdk":"^0.1.0","@shlinkio/shlink-web-component":"^0.3.5",bootstrap:"5.2.3",bottlejs:"^2.0.1",clsx:"^2.0.0","compare-versions":"^6.1.0",csvtojson:"^2.0.10","date-fns":"^2.30.0",react:"^18.2.0","react-dom":"^18.2.0","react-external-link":"^2.2.0","react-redux":"^8.1.3","react-router-dom":"^6.20.0",reactstrap:"^9.2.1","redux-localstorage-simple":"^2.5.1",uuid:"^9.0.1","workbox-core":"^7.0.0","workbox-expiration":"^7.0.0","workbox-precaching":"^7.0.0","workbox-routing":"^7.0.0","workbox-strategies":"^7.0.0"},BH={"@shlinkio/eslint-config-js-coding-standard":"~2.3.0","@shlinkio/stylelint-config-css-coding-standard":"~1.1.1","@testing-library/jest-dom":"^6.1.4","@testing-library/react":"^14.1.2","@testing-library/user-event":"^14.5.1","@total-typescript/shoehorn":"^0.1.1","@types/react":"^18.2.37","@types/react-dom":"^18.2.15","@types/uuid":"^9.0.7","@vitejs/plugin-react":"^4.2.0","@vitest/coverage-v8":"^0.34.6","adm-zip":"^0.5.10","axe-core":"^4.8.2",chalk:"^5.3.0",eslint:"^8.54.0",history:"^5.3.0",jsdom:"^22.1.0",sass:"^1.69.5",stylelint:"^15.11.0",typescript:"^5.3.2",vite:"^5.0.2","vite-plugin-pwa":"^0.17.0",vitest:"^0.34.6","vitest-canvas-mock":"^0.3.3"},zH=[">0.2%","not dead","not ie <= 11","not op_mini all"],ev={name:RH,description:AH,private:!1,homepage:DH,repository:IH,license:FH,scripts:$H,dependencies:UH,devDependencies:BH,browserslist:zH};var Yi,_o=".",xD="function",SD="string",ED="__global__",RS="Provider",VH=0,AS=Array.prototype.slice,HH=function(t,n){var r=t[n];if(r===void 0&&Yi.config.strict)throw new Error("Bottle was unable to resolve a service. `"+n+"` is undefined.");return r},Qy=function(t){var n;return this.nested[t]||(n=Yi.pop(),this.nested[t]=n,this.factory(t,function(){return n.container})),this.nested[t]},TD=function(t){return t.split(_o).reduce(HH,this)},WH=function(t,n,r,i){var o={configurable:!0,enumerable:!0};return t.length?o.get=function(){var s=0,l=function(d){if(d)throw d;t[s]&&t[s++](r,l)};return l(),r}:(o.value=r,o.writable=!0),Object.defineProperty(i,n,o),i[n]},YH=function(t,n){var r,i;return typeof t===xD&&(n=t,t=ED),r=t.split(_o),i=r.shift(),r.length?Qy.call(this,i).middleware(r.join(_o),n):(this.middlewares[i]||(this.middlewares[i]=[]),this.middlewares[i].push(n)),this},GH=function(t,n){return n(t)},Mk=function(t,n){return(t[n]||[]).concat(t.__global__||[])},qH=function(t,n){var r,i,o,a,s;return this.id,o=this.container,a=this.decorators,s=this.middlewares,r=t+RS,i=Object.create(null),i[r]={configurable:!0,enumerable:!0,get:function(){var c=new n;return delete o[r],o[r]=c,c}},i[t]={configurable:!0,enumerable:!0,get:function(){var c=o[r],d;return c&&(d=Mk(a,t).reduce(GH,c.$get(o)),delete o[r],delete o[t]),d===void 0?d:WH(Mk(s,t),t,d,o)}},Object.defineProperties(o,i),this},OD=function(t,n){var r,i;return r=t.split(_o),this.providerMap[t]&&r.length===1&&!this.container[t+RS]?console.error(t+" provider already instantiated."):(this.originalProviders[t]=n,this.providerMap[t]=!0,i=r.shift(),r.length?(Qy.call(this,i).provider(r.join(_o),n),this):qH.call(this,i,n))},DS=function(t,n){return OD.call(this,t,function(){this.$get=n})},CD=function(t,n,r){var i=arguments.length>3?AS.call(arguments,3):[],o=this;return DS.call(this,t,function(){var s=n,l=i.map(TD,o.container);return r?new(n.bind.apply(n,[null].concat(l))):s.apply(null,l)})},ZH=function(t,n){return CD.apply(this,[t,n,!0].concat(AS.call(arguments,2)))},KH=function(t,n){return CD.apply(this,[t,n,!1].concat(AS.call(arguments,2)))},kD=function(t,n){Object.defineProperty(this,t,{configurable:!0,enumerable:!0,value:n,writable:!0})},PD=function(t,n){var r=t[n];return r||(r={},kD.call(t,n,r)),r},QH=function(t,n){var r;return r=t.split(_o),t=r.pop(),kD.call(r.reduce(PD,this.container),t,n),this},XH=function(t,n){Object.defineProperty(this,t,{configurable:!1,enumerable:!0,value:n,writable:!1})},JH=function(t,n){var r=t.split(_o);return t=r.pop(),XH.call(r.reduce(PD,this.container),t,n),this},LD=function(t,n){var r,i;return typeof t===xD&&(n=t,t=ED),r=t.split(_o),i=r.shift(),r.length?Qy.call(this,i).decorator(r.join(_o),n):(this.decorators[i]||(this.decorators[i]=[]),this.decorators[i].push(n)),this},eW=function(t){return this.deferred.push(t),this},tW=function(t){return(t||[]).map(TD,this.container)},nW=function(t,n){return DS.call(this,t,function(i){return{instance:n.bind(n,i)}})},rW=function(t){return!/^\$(?:decorator|register|list)$|Provider$/.test(t)},IS=function(t){return Object.keys(t||this.container||{}).filter(rW)},tv={},iW=function(t){var n;return typeof t===SD?(n=tv[t],n||(tv[t]=n=new Yi,n.constant("BOTTLE_NAME",t)),n):new Yi},oW=function(t){typeof t===SD?delete tv[t]:tv={}},jD=function(t){var n=t.$value===void 0?t:t.$value;return this[t.$type||"service"].apply(this,[t.$name,n].concat(t.$inject||[]))},Nk=function(t){delete this.providerMap[t],delete this.container[t],delete this.container[t+RS]},aW=function(t){var n=this.originalProviders,r=Array.isArray(t);Object.keys(this.originalProviders).forEach(function(o){if(!(r&&t.indexOf(o)===-1)){var a=o.split(_o);a.length>1&&a.forEach(Nk,Qy.call(this,a[0])),Nk.call(this,o),this.provider(o,n[o])}},this)},sW=function(t){return this.deferred.forEach(function(r){r(t)}),this};Yi=function e(t){if(!(this instanceof e))return e.pop(t);this.id=VH++,this.decorators={},this.middlewares={},this.nested={},this.providerMap={},this.originalProviders={},this.deferred=[],this.container={$decorator:LD.bind(this),$register:jD.bind(this),$list:IS.bind(this)}};Yi.prototype={constant:JH,decorator:LD,defer:eW,digest:tW,factory:DS,instanceFactory:nW,list:IS,middleware:YH,provider:OD,resetProviders:aW,register:jD,resolve:sW,service:ZH,serviceFactory:KH,value:QH};Yi.pop=iW;Yi.clear=oW;Yi.list=IS;Yi.config={strict:!1};const lW=Yi;var MD=(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))(MD||{}),ND=(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))(ND||{}),cW=Object.defineProperty,uW=(e,t,n)=>t in e?cW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,dW=(e,t,n)=>(uW(e,typeof t!="symbol"?t+"":t,n),n);const fW=(e,t)=>`${e}/rest/v${t}`,hW=e=>e.dir?`${e.field}-${e.dir}`:void 0,pW=({orderBy:e={},excludeMaxVisitsReached:t,excludePastValidUntil:n,...r})=>({...r,excludeMaxVisitsReached:t===!0?"true":void 0,excludePastValidUntil:n===!0?"true":void 0,orderBy:hW(e)}),mW=e=>e===null||!(typeof e=="object"&&"type"in e&&"status"in e)?!1:(e.type===MD.NOT_FOUND||e.type===ND.NOT_FOUND)&&e.status===404,gW=(e,t)=>{const[n,r]=e.split("://");if(!r)throw new Error(`It is not possible to determine authority on "${e}" for replacement`);const[,...i]=r.split("/"),o=i.length?`/${i.join("/")}`:"";return`${n}://${t}${o}`},vW=(e={})=>{const t=Object.entries(e).flatMap(([n,r])=>r==null?[]:Array.isArray(r)?r.map(i=>[`${n}[]`,i]):[[n,r]]);return new URLSearchParams(t).toString()};let yW=class{constructor(t,n){dW(this,"apiVersion"),this.httpClient=t,this.serverInfo=n,this.apiVersion=3}async listShortUrls(t={}){return this.performRequest({url:"/short-urls",query:pW(t)}).then(({shortUrls:n})=>n)}async createShortUrl(t){const n=Object.entries(t).reduce((r,[i,o])=>(o&&(r[i]=o),r),{});return this.performRequest({url:"/short-urls",method:"POST",body:n})}async getShortUrlVisits(t,n){return this.performRequest({url:`/short-urls/${t}/visits`,query:n}).then(({visits:r})=>r)}async getTagVisits(t,n){return this.performRequest({url:`/tags/${t}/visits`,query:n}).then(({visits:r})=>r)}async getDomainVisits(t,n){return this.performRequest({url:`/domains/${t}/visits`,query:n}).then(({visits:r})=>r)}async getOrphanVisits(t){return this.performRequest({url:"/visits/orphan",query:t}).then(({visits:n})=>n)}async getNonOrphanVisits(t){return this.performRequest({url:"/visits/non-orphan",query:t}).then(({visits:n})=>n)}async getVisitsOverview(){return this.performRequest({url:"/visits"}).then(({visits:t})=>t)}async getShortUrl(t,n){return this.performRequest({url:`/short-urls/${t}`,query:{domain:n}})}async deleteShortUrl(t,n){return this.performEmptyRequest({url:`/short-urls/${t}`,method:"DELETE",query:{domain:n}})}async updateShortUrl(t,n,r){return this.performRequest({url:`/short-urls/${t}`,method:"PATCH",query:{domain:n},body:r})}async listTags(){return this.performRequest({url:"/tags",query:{withStats:"true"}}).then(({tags:t})=>t).then(({data:t,stats:n=[]})=>({tags:t,stats:n}))}async tagsStats(){return this.performRequest({url:"/tags/stats"}).then(({tags:t})=>t).then(({data:t})=>({tags:t.map(({tag:n})=>n),stats:t}))}async deleteTags(t){return this.performEmptyRequest({url:"/tags",method:"DELETE",query:{tags:t}}).then(()=>({tags:t}))}async editTag(t,n){return this.performEmptyRequest({url:"/tags",method:"PUT",body:{oldName:t,newName:n}}).then(()=>({oldName:t,newName:n}))}async health(t){return this.performRequest({url:"/health",domain:t})}async mercureInfo(){return this.performRequest({url:"/mercure-info"})}async listDomains(){return this.performRequest({url:"/domains"}).then(({domains:t})=>t)}async editDomainRedirects(t){return this.performRequest({url:"/domains/redirects",method:"PATCH",body:t})}async performRequest(t){return this.httpClient.jsonRequest(...this.toFetchParams(t)).catch(this.handleFetchError(()=>this.httpClient.jsonRequest(...this.toFetchParams(t))))}async performEmptyRequest(t){return this.httpClient.emptyRequest(...this.toFetchParams(t)).catch(this.handleFetchError(()=>this.httpClient.emptyRequest(...this.toFetchParams(t))))}toFetchParams({url:t,method:n="GET",query:r={},body:i,domain:o}){const a=vW(r),s=a?`?${a}`:"",l=o?gW(this.serverInfo.baseUrl,o):this.serverInfo.baseUrl;return[`${fW(l,this.apiVersion)}${t}${s}`,{method:n,body:i&&JSON.stringify(i),headers:{"X-Api-Key":this.serverInfo.apiKey}}]}handleFetchError(t){return n=>{if(!mW(n))throw n;return this.apiVersion=2,t()}}};const RD=e=>!!(e!=null&&e.url)&&!!(e!=null&&e.apiKey),rf=e=>!!(e!=null&&e.id),AD=e=>!!(e!=null&&e.version),_W=e=>!!(e!=null&&e.serverNotFound),bW=e=>rf(e)?e.id:"",wW=({id:e,autoConnect:t,...n})=>n,Rk={},xW=e=>typeof e=="function",SW=e=>{const{selectedServer:t}=e();if(!RD(t))throw new Error("There's no selected server or it is not found");return t},EW=e=>t=>{const{url:n,apiKey:r}=xW(t)?SW(t):t,i=`${r}_${n}`,o=Rk[i]??new yW(e,{apiKey:r,baseUrl:n});return Rk[i]=o,o},TW=e=>{e.serviceFactory("buildShlinkApiClient",EW,"HttpClient")};var OW={prefix:"fas",iconName:"calendar-days",icon:[448,512,["calendar-alt"],"f073","M128 0c17.7 0 32 14.3 32 32V64H288V32c0-17.7 14.3-32 32-32s32 14.3 32 32V64h48c26.5 0 48 21.5 48 48v48H0V112C0 85.5 21.5 64 48 64H96V32c0-17.7 14.3-32 32-32zM0 192H448V464c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V192zm64 80v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V272c0-8.8-7.2-16-16-16H80c-8.8 0-16 7.2-16 16zm128 0v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V272c0-8.8-7.2-16-16-16H208c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V272c0-8.8-7.2-16-16-16H336zM64 400v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V400c0-8.8-7.2-16-16-16H80c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V400c0-8.8-7.2-16-16-16H208zm112 16v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V400c0-8.8-7.2-16-16-16H336c-8.8 0-16 7.2-16 16z"]},CW=OW,kW={prefix:"fas",iconName:"circle-minus",icon:[512,512,["minus-circle"],"f056","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM184 232H328c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z"]},FS=kW,PW={prefix:"fas",iconName:"file-csv",icon:[512,512,[],"f6dd","M0 64C0 28.7 28.7 0 64 0H224V128c0 17.7 14.3 32 32 32H384V304H176c-35.3 0-64 28.7-64 64V512H64c-35.3 0-64-28.7-64-64V64zm384 64H256V0L384 128zM200 352h16c22.1 0 40 17.9 40 40v8c0 8.8-7.2 16-16 16s-16-7.2-16-16v-8c0-4.4-3.6-8-8-8H200c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8h16c4.4 0 8-3.6 8-8v-8c0-8.8 7.2-16 16-16s16 7.2 16 16v8c0 22.1-17.9 40-40 40H200c-22.1 0-40-17.9-40-40V392c0-22.1 17.9-40 40-40zm133.1 0H368c8.8 0 16 7.2 16 16s-7.2 16-16 16H333.1c-7.2 0-13.1 5.9-13.1 13.1c0 5.2 3 9.9 7.8 12l37.4 16.6c16.3 7.2 26.8 23.4 26.8 41.2c0 24.9-20.2 45.1-45.1 45.1H304c-8.8 0-16-7.2-16-16s7.2-16 16-16h42.9c7.2 0 13.1-5.9 13.1-13.1c0-5.2-3-9.9-7.8-12l-37.4-16.6c-16.3-7.2-26.8-23.4-26.8-41.2c0-24.9 20.2-45.1 45.1-45.1zm98.9 0c8.8 0 16 7.2 16 16v31.6c0 23 5.5 45.6 16 66c10.5-20.3 16-42.9 16-66V368c0-8.8 7.2-16 16-16s16 7.2 16 16v31.6c0 34.7-10.3 68.7-29.6 97.6l-5.1 7.7c-3 4.5-8 7.1-13.3 7.1s-10.3-2.7-13.3-7.1l-5.1-7.7c-19.3-28.9-29.6-62.9-29.6-97.6V368c0-8.8 7.2-16 16-16z"]},LW={prefix:"fas",iconName:"pencil",icon:[512,512,[9999,61504,"pencil-alt"],"f303","M410.3 231l11.3-11.3-33.9-33.9-62.1-62.1L291.7 89.8l-11.3 11.3-22.6 22.6L58.6 322.9c-10.4 10.4-18 23.3-22.2 37.4L1 480.7c-2.5 8.4-.2 17.5 6.1 23.7s15.3 8.5 23.7 6.1l120.3-35.4c14.1-4.2 27-11.8 37.4-22.2L387.7 253.7 410.3 231zM160 399.4l-9.1 22.7c-4 3.1-8.5 5.4-13.3 6.9L59.4 452l23-78.1c1.4-4.9 3.8-9.4 6.9-13.3l22.7-9.1v32c0 8.8 7.2 16 16 16h32zM362.7 18.7L348.3 33.2 325.7 55.8 314.3 67.1l33.9 33.9 62.1 62.1 33.9 33.9 11.3-11.3 22.6-22.6 14.5-14.5c25-25 25-65.5 0-90.5L453.3 18.7c-25-25-65.5-25-90.5 0zm-47.4 168l-144 144c-6.2 6.2-16.4 6.2-22.6 0s-6.2-16.4 0-22.6l144-144c6.2-6.2 16.4-6.2 22.6 0s6.2 16.4 0 22.6z"]},jW=LW,DD={prefix:"fas",iconName:"circle-notch",icon:[512,512,[],"f1ce","M222.7 32.1c5 16.9-4.6 34.8-21.5 39.8C121.8 95.6 64 169.1 64 256c0 106 86 192 192 192s192-86 192-192c0-86.9-57.8-160.4-137.1-184.1c-16.9-5-26.6-22.9-21.5-39.8s22.9-26.6 39.8-21.5C434.9 42.1 512 140 512 256c0 141.4-114.6 256-256 256S0 397.4 0 256C0 140 77.1 42.1 182.9 10.6c16.9-5 34.8 4.6 39.8 21.5z"]},MW={prefix:"fas",iconName:"bars",icon:[448,512,["navicon"],"f0c9","M0 96C0 78.3 14.3 64 32 64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z"]},ID={prefix:"fas",iconName:"list",icon:[512,512,["list-squares"],"f03a","M40 48C26.7 48 16 58.7 16 72v48c0 13.3 10.7 24 24 24H88c13.3 0 24-10.7 24-24V72c0-13.3-10.7-24-24-24H40zM192 64c-17.7 0-32 14.3-32 32s14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H192zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H192zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H192zM16 232v48c0 13.3 10.7 24 24 24H88c13.3 0 24-10.7 24-24V232c0-13.3-10.7-24-24-24H40c-13.3 0-24 10.7-24 24zM40 368c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24H88c13.3 0 24-10.7 24-24V392c0-13.3-10.7-24-24-24H40z"]},NW={prefix:"fas",iconName:"circle-dot",icon:[512,512,[128280,"dot-circle"],"f192","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-352a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"]},RW=NW,AW={prefix:"fas",iconName:"pen-to-square",icon:[512,512,["edit"],"f044","M471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7zm-299.2 220c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3 172.4 241.7zM96 64C43 64 0 107 0 160V416c0 53 43 96 96 96H352c53 0 96-43 96-96V320c0-17.7-14.3-32-32-32s-32 14.3-32 32v96c0 17.7-14.3 32-32 32H96c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H96z"]},$S=AW,DW={prefix:"fas",iconName:"plug",icon:[384,512,[128268],"f1e6","M96 0C78.3 0 64 14.3 64 32v96h64V32c0-17.7-14.3-32-32-32zM288 0c-17.7 0-32 14.3-32 32v96h64V32c0-17.7-14.3-32-32-32zM32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32v32c0 77.4 55 142 128 156.8V480c0 17.7 14.3 32 32 32s32-14.3 32-32V412.8C297 398 352 333.4 352 256V224c17.7 0 32-14.3 32-32s-14.3-32-32-32H32z"]},IW={prefix:"fas",iconName:"globe",icon:[512,512,[127760],"f0ac","M352 256c0 22.2-1.2 43.6-3.3 64H163.3c-2.2-20.4-3.3-41.8-3.3-64s1.2-43.6 3.3-64H348.7c2.2 20.4 3.3 41.8 3.3 64zm28.8-64H503.9c5.3 20.5 8.1 41.9 8.1 64s-2.8 43.5-8.1 64H380.8c2.1-20.6 3.2-42 3.2-64s-1.1-43.4-3.2-64zm112.6-32H376.7c-10-63.9-29.8-117.4-55.3-151.6c78.3 20.7 142 77.5 171.9 151.6zm-149.1 0H167.7c6.1-36.4 15.5-68.6 27-94.7c10.5-23.6 22.2-40.7 33.5-51.5C239.4 3.2 248.7 0 256 0s16.6 3.2 27.8 13.8c11.3 10.8 23 27.9 33.5 51.5c11.6 26 20.9 58.2 27 94.7zm-209 0H18.6C48.6 85.9 112.2 29.1 190.6 8.4C165.1 42.6 145.3 96.1 135.3 160zM8.1 192H131.2c-2.1 20.6-3.2 42-3.2 64s1.1 43.4 3.2 64H8.1C2.8 299.5 0 278.1 0 256s2.8-43.5 8.1-64zM194.7 446.6c-11.6-26-20.9-58.2-27-94.6H344.3c-6.1 36.4-15.5 68.6-27 94.6c-10.5 23.6-22.2 40.7-33.5 51.5C272.6 508.8 263.3 512 256 512s-16.6-3.2-27.8-13.8c-11.3-10.8-23-27.9-33.5-51.5zM135.3 352c10 63.9 29.8 117.4 55.3 151.6C112.2 482.9 48.6 426.1 18.6 352H135.3zm358.1 0c-30 74.1-93.6 130.9-171.9 151.6c25.5-34.2 45.2-87.7 55.3-151.6H493.4z"]},FW={prefix:"fas",iconName:"ban",icon:[512,512,[128683,"cancel"],"f05e","M367.2 412.5L99.5 144.8C77.1 176.1 64 214.5 64 256c0 106 86 192 192 192c41.5 0 79.9-13.1 111.2-35.5zm45.3-45.3C434.9 335.9 448 297.5 448 256c0-106-86-192-192-192c-41.5 0-79.9 13.1-111.2 35.5L412.5 367.2zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z"]},Ak={prefix:"fas",iconName:"server",icon:[512,512,[],"f233","M64 32C28.7 32 0 60.7 0 96v64c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zm280 72a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm48 24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0zM64 288c-35.3 0-64 28.7-64 64v64c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V352c0-35.3-28.7-64-64-64H64zm280 72a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm56 24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0z"]},$W={prefix:"fas",iconName:"file-arrow-up",icon:[384,512,["file-upload"],"f574","M64 0C28.7 0 0 28.7 0 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V160H256c-17.7 0-32-14.3-32-32V0H64zM256 0V128H384L256 0zM216 408c0 13.3-10.7 24-24 24s-24-10.7-24-24V305.9l-31 31c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l72-72c9.4-9.4 24.6-9.4 33.9 0l72 72c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-31-31V408z"]},UW=$W,BW={prefix:"fas",iconName:"map-location-dot",icon:[576,512,["map-marked-alt"],"f5a0","M408 120c0 54.6-73.1 151.9-105.2 192c-7.7 9.6-22 9.6-29.6 0C241.1 271.9 168 174.6 168 120C168 53.7 221.7 0 288 0s120 53.7 120 120zm8 80.4c3.5-6.9 6.7-13.8 9.6-20.6c.5-1.2 1-2.5 1.5-3.7l116-46.4C558.9 123.4 576 135 576 152V422.8c0 9.8-6 18.6-15.1 22.3L416 503V200.4zM137.6 138.3c2.4 14.1 7.2 28.3 12.8 41.5c2.9 6.8 6.1 13.7 9.6 20.6V451.8L32.9 502.7C17.1 509 0 497.4 0 480.4V209.6c0-9.8 6-18.6 15.1-22.3l122.6-49zM327.8 332c13.9-17.4 35.7-45.7 56.2-77V504.3L192 449.4V255c20.5 31.3 42.3 59.6 56.2 77c20.5 25.6 59.1 25.6 79.6 0zM288 152a40 40 0 1 0 0-80 40 40 0 1 0 0 80z"]},G1=BW,zW={prefix:"fas",iconName:"caret-up",icon:[320,512,[],"f0d8","M182.6 137.4c-12.5-12.5-32.8-12.5-45.3 0l-128 128c-9.2 9.2-11.9 22.9-6.9 34.9s16.6 19.8 29.6 19.8H288c12.9 0 24.6-7.8 29.6-19.8s2.2-25.7-6.9-34.9l-128-128z"]},VW={prefix:"fas",iconName:"palette",icon:[512,512,[127912],"f53f","M512 256c0 .9 0 1.8 0 2.7c-.4 36.5-33.6 61.3-70.1 61.3H344c-26.5 0-48 21.5-48 48c0 3.4 .4 6.7 1 9.9c2.1 10.2 6.5 20 10.8 29.9c6.1 13.8 12.1 27.5 12.1 42c0 31.8-21.6 60.7-53.4 62c-3.5 .1-7 .2-10.6 .2C114.6 512 0 397.4 0 256S114.6 0 256 0S512 114.6 512 256zM128 288a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm0-96a32 32 0 1 0 0-64 32 32 0 1 0 0 64zM288 96a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm96 96a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"]},HW={prefix:"fas",iconName:"arrow-down-wide-short",icon:[576,512,["sort-amount-asc","sort-amount-down"],"f160","M151.6 469.6C145.5 476.2 137 480 128 480s-17.5-3.8-23.6-10.4l-88-96c-11.9-13-11.1-33.3 2-45.2s33.3-11.1 45.2 2L96 365.7V64c0-17.7 14.3-32 32-32s32 14.3 32 32V365.7l32.4-35.4c11.9-13 32.2-13.9 45.2-2s13.9 32.2 2 45.2l-88 96zM320 480c-17.7 0-32-14.3-32-32s14.3-32 32-32h32c17.7 0 32 14.3 32 32s-14.3 32-32 32H320zm0-128c-17.7 0-32-14.3-32-32s14.3-32 32-32h96c17.7 0 32 14.3 32 32s-14.3 32-32 32H320zm0-128c-17.7 0-32-14.3-32-32s14.3-32 32-32H480c17.7 0 32 14.3 32 32s-14.3 32-32 32H320zm0-128c-17.7 0-32-14.3-32-32s14.3-32 32-32H544c17.7 0 32 14.3 32 32s-14.3 32-32 32H320z"]},WW=HW,US={prefix:"fas",iconName:"chart-pie",icon:[576,512,["pie-chart"],"f200","M304 240V16.6c0-9 7-16.6 16-16.6C443.7 0 544 100.3 544 224c0 9-7.6 16-16.6 16H304zM32 272C32 150.7 122.1 50.3 239 34.3c9.2-1.3 17 6.1 17 15.4V288L412.5 444.5c6.7 6.7 6.2 17.7-1.5 23.1C371.8 495.6 323.8 512 272 512C139.5 512 32 404.6 32 272zm526.4 16c9.3 0 16.6 7.8 15.4 17c-7.7 55.9-34.6 105.6-73.9 142.3c-6 5.6-15.4 5.2-21.2-.7L320 288H558.4z"]},FD={prefix:"fas",iconName:"tags",icon:[512,512,[],"f02c","M345 39.1L472.8 168.4c52.4 53 52.4 138.2 0 191.2L360.8 472.9c-9.3 9.4-24.5 9.5-33.9 .2s-9.5-24.5-.2-33.9L438.6 325.9c33.9-34.3 33.9-89.4 0-123.7L310.9 72.9c-9.3-9.4-9.2-24.6 .2-33.9s24.6-9.2 33.9 .2zM0 229.5V80C0 53.5 21.5 32 48 32H197.5c17 0 33.3 6.7 45.3 18.7l168 168c25 25 25 65.5 0 90.5L277.3 442.7c-25 25-65.5 25-90.5 0l-168-168C6.7 262.7 0 246.5 0 229.5zM144 144a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"]},Dk={prefix:"fas",iconName:"calendar-xmark",icon:[512,512,["calendar-times"],"f273","M160 0c17.7 0 32 14.3 32 32V64H320V32c0-17.7 14.3-32 32-32s32 14.3 32 32V64h48c26.5 0 48 21.5 48 48v48H32V112c0-26.5 21.5-48 48-48h48V32c0-17.7 14.3-32 32-32zM32 192H480V464c0 26.5-21.5 48-48 48H80c-26.5 0-48-21.5-48-48V192zM337 305c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-47 47-47-47c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l47 47-47 47c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l47-47 47 47c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-47-47 47-47z"]},YW={prefix:"fas",iconName:"trash",icon:[448,512,[],"f1f8","M135.2 17.7L128 32H32C14.3 32 0 46.3 0 64S14.3 96 32 96H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H320l-7.2-14.3C307.4 6.8 296.3 0 284.2 0H163.8c-12.1 0-23.2 6.8-28.6 17.7zM416 128H32L53.2 467c1.6 25.3 22.6 45 47.9 45H346.9c25.3 0 46.3-19.7 47.9-45L416 128z"]},$D={prefix:"fas",iconName:"arrow-left",icon:[448,512,[8592],"f060","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.2 288 416 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-306.7 0L214.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"]},GW={prefix:"fas",iconName:"up-right-from-square",icon:[512,512,["external-link-alt"],"f35d","M352 0c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9L370.7 96 201.4 265.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L416 141.3l41.4 41.4c9.2 9.2 22.9 11.9 34.9 6.9s19.8-16.6 19.8-29.6V32c0-17.7-14.3-32-32-32H352zM80 32C35.8 32 0 67.8 0 112V432c0 44.2 35.8 80 80 80H400c44.2 0 80-35.8 80-80V320c0-17.7-14.3-32-32-32s-32 14.3-32 32V432c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16V112c0-8.8 7.2-16 16-16H192c17.7 0 32-14.3 32-32s-14.3-32-32-32H80z"]},qW=GW,ZW={prefix:"fas",iconName:"tag",icon:[448,512,[127991],"f02b","M0 80V229.5c0 17 6.7 33.3 18.7 45.3l176 176c25 25 65.5 25 90.5 0L418.7 317.3c25-25 25-65.5 0-90.5l-176-176c-12-12-28.3-18.7-45.3-18.7H48C21.5 32 0 53.5 0 80zm112 32a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]},KW={prefix:"fas",iconName:"circle-info",icon:[512,512,["info-circle"],"f05a","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336h24V272H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]},BS=KW,QW={prefix:"fas",iconName:"arrow-rotate-left",icon:[512,512,[8634,"arrow-left-rotate","arrow-rotate-back","arrow-rotate-backward","undo"],"f0e2","M125.7 160H176c17.7 0 32 14.3 32 32s-14.3 32-32 32H48c-17.7 0-32-14.3-32-32V64c0-17.7 14.3-32 32-32s32 14.3 32 32v51.2L97.6 97.6c87.5-87.5 229.3-87.5 316.8 0s87.5 229.3 0 316.8s-229.3 87.5-316.8 0c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0c62.5 62.5 163.8 62.5 226.3 0s62.5-163.8 0-226.3s-163.8-62.5-226.3 0L125.7 160z"]},XW=QW,JW={prefix:"fas",iconName:"caret-down",icon:[320,512,[],"f0d7","M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z"]},eY={prefix:"fas",iconName:"ellipsis-vertical",icon:[128,512,["ellipsis-v"],"f142","M64 360a56 56 0 1 0 0 112 56 56 0 1 0 0-112zm0-160a56 56 0 1 0 0 112 56 56 0 1 0 0-112zM120 96A56 56 0 1 0 8 96a56 56 0 1 0 112 0z"]},tY=eY,nY={prefix:"fas",iconName:"house",icon:[576,512,[127968,63498,63500,"home","home-alt","home-lg-alt"],"f015","M575.8 255.5c0 18-15 32.1-32 32.1h-32l.7 160.2c0 2.7-.2 5.4-.5 8.1V472c0 22.1-17.9 40-40 40H456c-1.1 0-2.2 0-3.3-.1c-1.4 .1-2.8 .1-4.2 .1H416 392c-22.1 0-40-17.9-40-40V448 384c0-17.7-14.3-32-32-32H256c-17.7 0-32 14.3-32 32v64 24c0 22.1-17.9 40-40 40H160 128.1c-1.5 0-3-.1-4.5-.2c-1.2 .1-2.4 .2-3.6 .2H104c-22.1 0-40-17.9-40-40V360c0-.9 0-1.9 .1-2.8V287.6H32c-18 0-32-14-32-32.1c0-9 3-17 10-24L266.4 8c7-7 15-8 22-8s15 2 21 7L564.8 231.5c8 7 12 15 11 24z"]},rY=nY,iY={prefix:"fas",iconName:"arrow-up-wide-short",icon:[576,512,["sort-amount-up"],"f161","M151.6 42.4C145.5 35.8 137 32 128 32s-17.5 3.8-23.6 10.4l-88 96c-11.9 13-11.1 33.3 2 45.2s33.3 11.1 45.2-2L96 146.3V448c0 17.7 14.3 32 32 32s32-14.3 32-32V146.3l32.4 35.4c11.9 13 32.2 13.9 45.2 2s13.9-32.2 2-45.2l-88-96zM320 480h32c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32s14.3 32 32 32zm0-128h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32s14.3 32 32 32zm0-128H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32s14.3 32 32 32zm0-128H544c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32s14.3 32 32 32z"]},oY=iY,aY={prefix:"fas",iconName:"file-arrow-down",icon:[384,512,["file-download"],"f56d","M64 0C28.7 0 0 28.7 0 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V160H256c-17.7 0-32-14.3-32-32V0H64zM256 0V128H384L256 0zM216 232V334.1l31-31c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-72 72c-9.4 9.4-24.6 9.4-33.9 0l-72-72c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l31 31V232c0-13.3 10.7-24 24-24s24 10.7 24 24z"]},UD=aY,sY={prefix:"fas",iconName:"sun",icon:[512,512,[9728],"f185","M361.5 1.2c5 2.1 8.6 6.6 9.6 11.9L391 121l107.9 19.8c5.3 1 9.8 4.6 11.9 9.6s1.5 10.7-1.6 15.2L446.9 256l62.3 90.3c3.1 4.5 3.7 10.2 1.6 15.2s-6.6 8.6-11.9 9.6L391 391 371.1 498.9c-1 5.3-4.6 9.8-9.6 11.9s-10.7 1.5-15.2-1.6L256 446.9l-90.3 62.3c-4.5 3.1-10.2 3.7-15.2 1.6s-8.6-6.6-9.6-11.9L121 391 13.1 371.1c-5.3-1-9.8-4.6-11.9-9.6s-1.5-10.7 1.6-15.2L65.1 256 2.8 165.7c-3.1-4.5-3.7-10.2-1.6-15.2s6.6-8.6 11.9-9.6L121 121 140.9 13.1c1-5.3 4.6-9.8 9.6-11.9s10.7-1.5 15.2 1.6L256 65.1 346.3 2.8c4.5-3.1 10.2-3.7 15.2-1.6zM160 256a96 96 0 1 1 192 0 96 96 0 1 1 -192 0zm224 0a128 128 0 1 0 -256 0 128 128 0 1 0 256 0z"]},lY={prefix:"fas",iconName:"link",icon:[640,512,[128279,"chain"],"f0c1","M579.8 267.7c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114L422.3 334.8c-31.5 31.5-82.5 31.5-114 0c-27.9-27.9-31.5-71.8-8.6-103.8l1.1-1.6c10.3-14.4 6.9-34.4-7.4-44.6s-34.4-6.9-44.6 7.4l-1.1 1.6C206.5 251.2 213 330 263 380c56.5 56.5 148 56.5 204.5 0L579.8 267.7zM60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5L217.7 177.2c31.5-31.5 82.5-31.5 114 0c27.9 27.9 31.5 71.8 8.6 103.9l-1.1 1.6c-10.3 14.4-6.9 34.4 7.4 44.6s34.4 6.9 44.6-7.4l1.1-1.6C433.5 260.8 427 182 377 132c-56.5-56.5-148-56.5-204.5 0L60.2 244.3z"]},cY={prefix:"fas",iconName:"magnifying-glass",icon:[512,512,[128269,"search"],"f002","M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"]},uY=cY,dY={prefix:"fas",iconName:"chevron-down",icon:[512,512,[],"f078","M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"]},zS={prefix:"fas",iconName:"plus",icon:[448,512,[10133,61543,"add"],"2b","M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H48c-17.7 0-32 14.3-32 32s14.3 32 32 32H192V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H400c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z"]},fY={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]},q1=fY,hY={prefix:"fas",iconName:"chevron-right",icon:[320,512,[9002],"f054","M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"]},pY={prefix:"fas",iconName:"rotate",icon:[512,512,[128260,"sync-alt"],"f2f1","M142.9 142.9c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2s12.5 14.8 22.2 14.8H463.5c0 0 0 0 0 0H472c13.3 0 24-10.7 24-24V72c0-9.7-5.8-18.5-14.8-22.2s-19.3-1.7-26.2 5.2L413.4 96.6c-87.6-86.5-228.7-86.2-315.8 1C73.2 122 55.6 150.7 44.8 181.4c-5.9 16.7 2.9 34.9 19.5 40.8s34.9-2.9 40.8-19.5c7.7-21.8 20.2-42.3 37.8-59.8zM16 312v7.6 .7V440c0 9.7 5.8 18.5 14.8 22.2s19.3 1.7 26.2-5.2l41.6-41.6c87.6 86.5 228.7 86.2 315.8-1c24.4-24.4 42.1-53.1 52.9-83.7c5.9-16.7-2.9-34.9-19.5-40.8s-34.9 2.9-40.8 19.5c-7.7 21.8-20.2 42.3-37.8 59.8c-62.2 62.2-162.7 62.5-225.3 1L185 329c6.9-6.9 8.9-17.2 5.2-26.2s-12.5-14.8-22.2-14.8H48.4h-.7H40c-13.3 0-24 10.7-24 24z"]},mY=pY,Ik={prefix:"fas",iconName:"robot",icon:[640,512,[129302],"f544","M320 0c17.7 0 32 14.3 32 32V96H472c39.8 0 72 32.2 72 72V440c0 39.8-32.2 72-72 72H168c-39.8 0-72-32.2-72-72V168c0-39.8 32.2-72 72-72H288V32c0-17.7 14.3-32 32-32zM208 384c-8.8 0-16 7.2-16 16s7.2 16 16 16h32c8.8 0 16-7.2 16-16s-7.2-16-16-16H208zm96 0c-8.8 0-16 7.2-16 16s7.2 16 16 16h32c8.8 0 16-7.2 16-16s-7.2-16-16-16H304zm96 0c-8.8 0-16 7.2-16 16s7.2 16 16 16h32c8.8 0 16-7.2 16-16s-7.2-16-16-16H400zM264 256a40 40 0 1 0 -80 0 40 40 0 1 0 80 0zm152 40a40 40 0 1 0 0-80 40 40 0 1 0 0 80zM48 224H64V416H48c-26.5 0-48-21.5-48-48V272c0-26.5 21.5-48 48-48zm544 0c26.5 0 48 21.5 48 48v96c0 26.5-21.5 48-48 48H576V224h16z"]},gY={prefix:"fas",iconName:"gears",icon:[640,512,["cogs"],"f085","M308.5 135.3c7.1-6.3 9.9-16.2 6.2-25c-2.3-5.3-4.8-10.5-7.6-15.5L304 89.4c-3-5-6.3-9.9-9.8-14.6c-5.7-7.6-15.7-10.1-24.7-7.1l-28.2 9.3c-10.7-8.8-23-16-36.2-20.9L199 27.1c-1.9-9.3-9.1-16.7-18.5-17.8C173.9 8.4 167.2 8 160.4 8h-.7c-6.8 0-13.5 .4-20.1 1.2c-9.4 1.1-16.6 8.6-18.5 17.8L115 56.1c-13.3 5-25.5 12.1-36.2 20.9L50.5 67.8c-9-3-19-.5-24.7 7.1c-3.5 4.7-6.8 9.6-9.9 14.6l-3 5.3c-2.8 5-5.3 10.2-7.6 15.6c-3.7 8.7-.9 18.6 6.2 25l22.2 19.8C32.6 161.9 32 168.9 32 176s.6 14.1 1.7 20.9L11.5 216.7c-7.1 6.3-9.9 16.2-6.2 25c2.3 5.3 4.8 10.5 7.6 15.6l3 5.2c3 5.1 6.3 9.9 9.9 14.6c5.7 7.6 15.7 10.1 24.7 7.1l28.2-9.3c10.7 8.8 23 16 36.2 20.9l6.1 29.1c1.9 9.3 9.1 16.7 18.5 17.8c6.7 .8 13.5 1.2 20.4 1.2s13.7-.4 20.4-1.2c9.4-1.1 16.6-8.6 18.5-17.8l6.1-29.1c13.3-5 25.5-12.1 36.2-20.9l28.2 9.3c9 3 19 .5 24.7-7.1c3.5-4.7 6.8-9.5 9.8-14.6l3.1-5.4c2.8-5 5.3-10.2 7.6-15.5c3.7-8.7 .9-18.6-6.2-25l-22.2-19.8c1.1-6.8 1.7-13.8 1.7-20.9s-.6-14.1-1.7-20.9l22.2-19.8zM112 176a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zM504.7 500.5c6.3 7.1 16.2 9.9 25 6.2c5.3-2.3 10.5-4.8 15.5-7.6l5.4-3.1c5-3 9.9-6.3 14.6-9.8c7.6-5.7 10.1-15.7 7.1-24.7l-9.3-28.2c8.8-10.7 16-23 20.9-36.2l29.1-6.1c9.3-1.9 16.7-9.1 17.8-18.5c.8-6.7 1.2-13.5 1.2-20.4s-.4-13.7-1.2-20.4c-1.1-9.4-8.6-16.6-17.8-18.5L583.9 307c-5-13.3-12.1-25.5-20.9-36.2l9.3-28.2c3-9 .5-19-7.1-24.7c-4.7-3.5-9.6-6.8-14.6-9.9l-5.3-3c-5-2.8-10.2-5.3-15.6-7.6c-8.7-3.7-18.6-.9-25 6.2l-19.8 22.2c-6.8-1.1-13.8-1.7-20.9-1.7s-14.1 .6-20.9 1.7l-19.8-22.2c-6.3-7.1-16.2-9.9-25-6.2c-5.3 2.3-10.5 4.8-15.6 7.6l-5.2 3c-5.1 3-9.9 6.3-14.6 9.9c-7.6 5.7-10.1 15.7-7.1 24.7l9.3 28.2c-8.8 10.7-16 23-20.9 36.2L315.1 313c-9.3 1.9-16.7 9.1-17.8 18.5c-.8 6.7-1.2 13.5-1.2 20.4s.4 13.7 1.2 20.4c1.1 9.4 8.6 16.6 17.8 18.5l29.1 6.1c5 13.3 12.1 25.5 20.9 36.2l-9.3 28.2c-3 9-.5 19 7.1 24.7c4.7 3.5 9.5 6.8 14.6 9.8l5.4 3.1c5 2.8 10.2 5.3 15.5 7.6c8.7 3.7 18.6 .9 25-6.2l19.8-22.2c6.8 1.1 13.8 1.7 20.9 1.7s14.1-.6 20.9-1.7l19.8 22.2zM464 304a48 48 0 1 1 0 96 48 48 0 1 1 0-96z"]},vY=gY,yY={prefix:"fas",iconName:"qrcode",icon:[448,512,[],"f029","M0 80C0 53.5 21.5 32 48 32h96c26.5 0 48 21.5 48 48v96c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80zM64 96v64h64V96H64zM0 336c0-26.5 21.5-48 48-48h96c26.5 0 48 21.5 48 48v96c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V336zm64 16v64h64V352H64zM304 32h96c26.5 0 48 21.5 48 48v96c0 26.5-21.5 48-48 48H304c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48zm80 64H320v64h64V96zM256 304c0-8.8 7.2-16 16-16h64c8.8 0 16 7.2 16 16s7.2 16 16 16h32c8.8 0 16-7.2 16-16s7.2-16 16-16s16 7.2 16 16v96c0 8.8-7.2 16-16 16H368c-8.8 0-16-7.2-16-16s-7.2-16-16-16s-16 7.2-16 16v64c0 8.8-7.2 16-16 16H272c-8.8 0-16-7.2-16-16V304zM368 480a16 16 0 1 1 0-32 16 16 0 1 1 0 32zm64 0a16 16 0 1 1 0-32 16 16 0 1 1 0 32z"]},_Y={prefix:"fas",iconName:"moon",icon:[384,512,[127769,9214],"f186","M223.5 32C100 32 0 132.3 0 256S100 480 223.5 480c60.6 0 115.5-24.2 155.8-63.4c5-4.9 6.3-12.5 3.1-18.7s-10.1-9.7-17-8.5c-9.8 1.7-19.8 2.6-30.1 2.6c-96.9 0-175.5-78.8-175.5-176c0-65.8 36-123.1 89.3-153.3c6.1-3.5 9.2-10.5 7.7-17.3s-7.3-11.9-14.3-12.5c-6.3-.5-12.6-.8-19-.8z"]},bY={prefix:"fas",iconName:"link-slash",icon:[640,512,["chain-broken","chain-slash","unlink"],"f127","M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L489.3 358.2l90.5-90.5c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114l-96 96-31.9-25C430.9 239.6 420.1 175.1 377 132c-52.2-52.3-134.5-56.2-191.3-11.7L38.8 5.1zM239 162c30.1-14.9 67.7-9.9 92.8 15.3c20 20 27.5 48.3 21.7 74.5L239 162zM406.6 416.4L220.9 270c-2.1 39.8 12.2 80.1 42.2 110c38.9 38.9 94.4 51 143.6 36.3zm-290-228.5L60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5l61.8-61.8-50.6-39.9z"]},wY={prefix:"fas",iconName:"desktop",icon:[576,512,[128421,61704,"desktop-alt"],"f390","M64 0C28.7 0 0 28.7 0 64V352c0 35.3 28.7 64 64 64H240l-10.7 32H160c-17.7 0-32 14.3-32 32s14.3 32 32 32H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H346.7L336 416H512c35.3 0 64-28.7 64-64V64c0-35.3-28.7-64-64-64H64zM512 64V288H64V64H512z"]},Yf={prefix:"fas",iconName:"check",icon:[448,512,[10003,10004],"f00c","M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"]};function Fk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ie(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1;i--){var o=n[i],a=(o.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(a)>-1&&(r=o)}return At.head.insertBefore(t,r),e}}var YY="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function Qf(){for(var e=12,t="";e-- >0;)t+=YY[Math.random()*62|0];return t}function Du(e){for(var t=[],n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function qS(e){return e.classList?Du(e.classList):(e.getAttribute("class")||"").split(" ").filter(function(t){return t})}function XD(e){return"".concat(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function GY(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,'="').concat(XD(e[n]),'" ')},"").trim()}function Xy(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,": ").concat(e[n].trim(),";")},"")}function ZS(e){return e.size!==fo.size||e.x!==fo.x||e.y!==fo.y||e.rotate!==fo.rotate||e.flipX||e.flipY}function qY(e){var t=e.transform,n=e.containerWidth,r=e.iconWidth,i={transform:"translate(".concat(n/2," 256)")},o="translate(".concat(t.x*32,", ").concat(t.y*32,") "),a="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),s="rotate(".concat(t.rotate," 0 0)"),l={transform:"".concat(o," ").concat(a," ").concat(s)},c={transform:"translate(".concat(r/2*-1," -256)")};return{outer:i,inner:l,path:c}}function ZY(e){var t=e.transform,n=e.width,r=n===void 0?K1:n,i=e.height,o=i===void 0?K1:i,a=e.startCentered,s=a===void 0?!1:a,l="";return s&&WD?l+="translate(".concat(t.x/_a-r/2,"em, ").concat(t.y/_a-o/2,"em) "):s?l+="translate(calc(-50% + ".concat(t.x/_a,"em), calc(-50% + ").concat(t.y/_a,"em)) "):l+="translate(".concat(t.x/_a,"em, ").concat(t.y/_a,"em) "),l+="scale(".concat(t.size/_a*(t.flipX?-1:1),", ").concat(t.size/_a*(t.flipY?-1:1),") "),l+="rotate(".concat(t.rotate,"deg) "),l}var KY=`: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"; @@ -857,42 +857,42 @@ 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 JD(){var e=YD,t=GD,n=Be.cssPrefix,r=Be.replacementClass,i=ZY;if(n!==e||r!==t){var o=new RegExp("\\.".concat(e,"\\-"),"g"),a=new RegExp("\\--".concat(e,"\\-"),"g"),s=new RegExp("\\.".concat(t),"g");i=i.replace(o,".".concat(n,"-")).replace(a,"--".concat(n,"-")).replace(s,".".concat(r))}return i}var Wk=!1;function A_(){Be.autoAddCss&&!Wk&&(HY(JD()),Wk=!0)}var KY={mixout:function(){return{dom:{css:JD,insertCss:A_}}},hooks:function(){return{beforeDOMElementCreation:function(){A_()},beforeI2svg:function(){A_()}}}},Qo=is||{};Qo[Ko]||(Qo[Ko]={});Qo[Ko].styles||(Qo[Ko].styles={});Qo[Ko].hooks||(Qo[Ko].hooks={});Qo[Ko].shims||(Qo[Ko].shims=[]);var Di=Qo[Ko],eI=[],QY=function e(){At.removeEventListener("DOMContentLoaded",e),rv=1,eI.map(function(t){return t()})},rv=!1;la&&(rv=(At.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(At.readyState),rv||At.addEventListener("DOMContentLoaded",QY));function XY(e){la&&(rv?setTimeout(e,0):eI.push(e))}function Ih(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"?XD(e):"<".concat(t," ").concat(YY(r),">").concat(o.map(Ih).join(""),"")}function Yk(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}var JY=function(t,n){return function(r,i,o,a){return t.call(n,r,i,o,a)}},D_=function(t,n,r,i){var o=Object.keys(t),a=o.length,s=i!==void 0?JY(n,i):n,l,c,d;for(r===void 0?(l=1,d=t[o[0]]):(l=0,d=r);l=55296&&i<=56319&&n=55296&&r<=56319&&n>t+1&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}function Gk(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 J1(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.skipHooks,i=r===void 0?!1:r,o=Gk(t);typeof Di.hooks.addPack=="function"&&!i?Di.hooks.addPack(e,Gk(t)):Di.styles[e]=Ie(Ie({},Di.styles[e]||{}),o),e==="fas"&&J1("fa",t)}var im,om,am,Pc=Di.styles,nG=Di.shims,rG=(im={},xn(im,Mt,Object.values(Zf[Mt])),xn(im,en,Object.values(Zf[en])),im),KS=null,tI={},nI={},rI={},iI={},oI={},iG=(om={},xn(om,Mt,Object.keys(Gf[Mt])),xn(om,en,Object.keys(Gf[en])),om);function oG(e){return~$Y.indexOf(e)}function aG(e,t){var n=t.split("-"),r=n[0],i=n.slice(1).join("-");return r===e&&i!==""&&!oG(i)?i:null}var aI=function(){var t=function(o){return D_(Pc,function(a,s,l){return a[l]=D_(s,o,{}),a},{})};tI=t(function(i,o,a){if(o[3]&&(i[o[3]]=a),o[2]){var s=o[2].filter(function(l){return typeof l=="number"});s.forEach(function(l){i[l.toString(16)]=a})}return i}),nI=t(function(i,o,a){if(i[a]=a,o[2]){var s=o[2].filter(function(l){return typeof l=="string"});s.forEach(function(l){i[l]=a})}return i}),oI=t(function(i,o,a){var s=o[2];return i[a]=a,s.forEach(function(l){i[l]=a}),i});var n="far"in Pc||Be.autoFetchSvg,r=D_(nG,function(i,o){var a=o[0],s=o[1],l=o[2];return s==="far"&&!n&&(s="fas"),typeof a=="string"&&(i.names[a]={prefix:s,iconName:l}),typeof a=="number"&&(i.unicodes[a.toString(16)]={prefix:s,iconName:l}),i},{names:{},unicodes:{}});rI=r.names,iI=r.unicodes,KS=Jy(Be.styleDefault,{family:Be.familyDefault})};VY(function(e){KS=Jy(e.styleDefault,{family:Be.familyDefault})});aI();function QS(e,t){return(tI[e]||{})[t]}function sG(e,t){return(nI[e]||{})[t]}function Qs(e,t){return(oI[e]||{})[t]}function sI(e){return rI[e]||{prefix:null,iconName:null}}function lG(e){var t=iI[e],n=QS("fas",e);return t||(n?{prefix:"fas",iconName:n}:null)||{prefix:null,iconName:null}}function os(){return KS}var XS=function(){return{prefix:null,iconName:null,rest:[]}};function Jy(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.family,r=n===void 0?Mt:n,i=Gf[r][e],o=qf[r][e]||qf[r][i],a=e in Di.styles?e:null;return o||a||null}var qk=(am={},xn(am,Mt,Object.keys(Zf[Mt])),xn(am,en,Object.keys(Zf[en])),am);function e0(e){var t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.skipLookups,i=r===void 0?!1:r,o=(t={},xn(t,Mt,"".concat(Be.cssPrefix,"-").concat(Mt)),xn(t,en,"".concat(Be.cssPrefix,"-").concat(en)),t),a=null,s=Mt;(e.includes(o[Mt])||e.some(function(c){return qk[Mt].includes(c)}))&&(s=Mt),(e.includes(o[en])||e.some(function(c){return qk[en].includes(c)}))&&(s=en);var l=e.reduce(function(c,d){var f=aG(Be.cssPrefix,d);if(Pc[d]?(d=rG[s].includes(d)?NY[s][d]:d,a=d,c.prefix=d):iG[s].indexOf(d)>-1?(a=d,c.prefix=Jy(d,{family:s})):f?c.iconName=f:d!==Be.replacementClass&&d!==o[Mt]&&d!==o[en]&&c.rest.push(d),!i&&c.prefix&&c.iconName){var p=a==="fa"?sI(c.iconName):{},m=Qs(c.prefix,c.iconName);p.prefix&&(a=null),c.iconName=p.iconName||m||c.iconName,c.prefix=p.prefix||c.prefix,c.prefix==="far"&&!Pc.far&&Pc.fas&&!Be.autoFetchSvg&&(c.prefix="fas")}return c},XS());return(e.includes("fa-brands")||e.includes("fab"))&&(l.prefix="fab"),(e.includes("fa-duotone")||e.includes("fad"))&&(l.prefix="fad"),!l.prefix&&s===en&&(Pc.fass||Be.autoFetchSvg)&&(l.prefix="fass",l.iconName=Qs(l.prefix,l.iconName)||l.iconName),(l.prefix==="fa"||a==="fa")&&(l.prefix=os()||"fas"),l}var cG=function(){function e(){wY(this,e),this.definitions={}}return xY(e,[{key:"add",value:function(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o0&&d.forEach(function(f){typeof f=="string"&&(n[s][f]=c)}),n[s][l]=c}),n}}]),e}(),Zk=[],Lc={},Hc={},uG=Object.keys(Hc);function dG(e,t){var n=t.mixoutsTo;return Zk=e,Lc={},Object.keys(Hc).forEach(function(r){uG.indexOf(r)===-1&&delete Hc[r]}),Zk.forEach(function(r){var i=r.mixout?r.mixout():{};if(Object.keys(i).forEach(function(a){typeof i[a]=="function"&&(n[a]=i[a]),nv(i[a])==="object"&&Object.keys(i[a]).forEach(function(s){n[a]||(n[a]={}),n[a][s]=i[a][s]})}),r.hooks){var o=r.hooks();Object.keys(o).forEach(function(a){Lc[a]||(Lc[a]=[]),Lc[a].push(o[a])})}r.provides&&r.provides(Hc)}),n}function ew(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 la?(yl("beforeI2svg",t),Xo("pseudoElements2svg",t),Xo("i2svg",t)):Promise.reject("Operation requires a DOM of some kind.")},watch:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot;Be.autoReplaceSvg===!1&&(Be.autoReplaceSvg=!0),Be.observeMutations=!0,XY(function(){mG({autoReplaceSvgRoot:n}),yl("watch",t)})}},pG={icon:function(t){if(t===null)return null;if(nv(t)==="object"&&t.prefix&&t.iconName)return{prefix:t.prefix,iconName:Qs(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=Jy(t[0]);return{prefix:r,iconName:Qs(r,n)||n}}if(typeof t=="string"&&(t.indexOf("".concat(Be.cssPrefix,"-"))>-1||t.match(RY))){var i=e0(t.split(" "),{skipLookups:!0});return{prefix:i.prefix||os(),iconName:Qs(i.prefix,i.iconName)||i.iconName}}if(typeof t=="string"){var o=os();return{prefix:o,iconName:Qs(o,t)||t}}}},ei={noAuto:fG,config:Be,dom:hG,parse:pG,library:lI,findIconDefinition:tw,toHtml:Ih},mG=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot,r=n===void 0?At:n;(Object.keys(Di.styles).length>0||Be.autoFetchSvg)&&la&&Be.autoReplaceSvg&&ei.dom.i2svg({node:r})};function t0(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(function(r){return Ih(r)})}}),Object.defineProperty(e,"node",{get:function(){if(la){var r=At.createElement("div");return r.innerHTML=e.html,r.children}}}),e}function gG(e){var t=e.children,n=e.main,r=e.mask,i=e.attributes,o=e.styles,a=e.transform;if(ZS(a)&&n.found&&!r.found){var s=n.width,l=n.height,c={x:s/l/2,y:.5};i.style=Xy(Ie(Ie({},o),{},{"transform-origin":"".concat(c.x+a.x/16,"em ").concat(c.y+a.y/16,"em")}))}return[{tag:"svg",attributes:i,children:t}]}function vG(e){var t=e.prefix,n=e.iconName,r=e.children,i=e.attributes,o=e.symbol,a=o===!0?"".concat(t,"-").concat(Be.cssPrefix,"-").concat(n):o;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:Ie(Ie({},i),{},{id:a}),children:r}]}]}function JS(e){var t=e.icons,n=t.main,r=t.mask,i=e.prefix,o=e.iconName,a=e.transform,s=e.symbol,l=e.title,c=e.maskId,d=e.titleId,f=e.extra,p=e.watchable,m=p===void 0?!1:p,v=r.found?r:n,y=v.width,x=v.height,_=i==="fak",w=[Be.replacementClass,o?"".concat(Be.cssPrefix,"-").concat(o):""].filter(function(U){return f.classes.indexOf(U)===-1}).filter(function(U){return U!==""||!!U}).concat(f.classes).join(" "),S={children:[],attributes:Ie(Ie({},f.attributes),{},{"data-prefix":i,"data-icon":o,class:w,role:f.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(y," ").concat(x)})},E=_&&!~f.classes.indexOf("fa-fw")?{width:"".concat(y/x*16*.0625,"em")}:{};m&&(S.attributes[vl]=""),l&&(S.children.push({tag:"title",attributes:{id:S.attributes["aria-labelledby"]||"title-".concat(d||Qf())},children:[l]}),delete S.attributes.title);var O=Ie(Ie({},S),{},{prefix:i,iconName:o,main:n,mask:r,maskId:c,transform:a,symbol:s,styles:Ie(Ie({},E),f.styles)}),k=r.found&&n.found?Xo("generateAbstractMask",O)||{children:[],attributes:{}}:Xo("generateAbstractIcon",O)||{children:[],attributes:{}},j=k.children,A=k.attributes;return O.children=j,O.attributes=A,s?vG(O):gG(O)}function Kk(e){var t=e.content,n=e.width,r=e.height,i=e.transform,o=e.title,a=e.extra,s=e.watchable,l=s===void 0?!1:s,c=Ie(Ie(Ie({},a.attributes),o?{title:o}:{}),{},{class:a.classes.join(" ")});l&&(c[vl]="");var d=Ie({},a.styles);ZS(i)&&(d.transform=qY({transform:i,startCentered:!0,width:n,height:r}),d["-webkit-transform"]=d.transform);var f=Xy(d);f.length>0&&(c.style=f);var p=[];return p.push({tag:"span",attributes:c,children:[t]}),o&&p.push({tag:"span",attributes:{class:"sr-only"},children:[o]}),p}function yG(e){var t=e.content,n=e.title,r=e.extra,i=Ie(Ie(Ie({},r.attributes),n?{title:n}:{}),{},{class:r.classes.join(" ")}),o=Xy(r.styles);o.length>0&&(i.style=o);var a=[];return a.push({tag:"span",attributes:i,children:[t]}),n&&a.push({tag:"span",attributes:{class:"sr-only"},children:[n]}),a}var I_=Di.styles;function nw(e){var t=e[0],n=e[1],r=e.slice(4),i=VS(r,1),o=i[0],a=null;return Array.isArray(o)?a={tag:"g",attributes:{class:"".concat(Be.cssPrefix,"-").concat(Ks.GROUP)},children:[{tag:"path",attributes:{class:"".concat(Be.cssPrefix,"-").concat(Ks.SECONDARY),fill:"currentColor",d:o[0]}},{tag:"path",attributes:{class:"".concat(Be.cssPrefix,"-").concat(Ks.PRIMARY),fill:"currentColor",d:o[1]}}]}:a={tag:"path",attributes:{fill:"currentColor",d:o}},{found:!0,width:t,height:n,icon:a}}var _G={found:!1,width:512,height:512};function bG(e,t){!qD&&!Be.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"&&Be.styleDefault!==null&&(t=os()),new Promise(function(r,i){if(Xo("missingIconAbstract"),n==="fa"){var o=sI(e)||{};e=o.iconName||e,t=o.prefix||t}if(e&&t&&I_[t]&&I_[t][e]){var a=I_[t][e];return r(nw(a))}bG(e,t),r(Ie(Ie({},_G),{},{icon:Be.showMissingIcons&&e?Xo("missingIconAbstract")||{}:{}}))})}var Qk=function(){},iw=Be.measurePerformance&&Xp&&Xp.mark&&Xp.measure?Xp:{mark:Qk,measure:Qk},Id='FA "6.4.2"',wG=function(t){return iw.mark("".concat(Id," ").concat(t," begins")),function(){return cI(t)}},cI=function(t){iw.mark("".concat(Id," ").concat(t," ends")),iw.measure("".concat(Id," ").concat(t),"".concat(Id," ").concat(t," begins"),"".concat(Id," ").concat(t," ends"))},eE={begin:wG,end:cI},tg=function(){};function Xk(e){var t=e.getAttribute?e.getAttribute(vl):null;return typeof t=="string"}function xG(e){var t=e.getAttribute?e.getAttribute(WS):null,n=e.getAttribute?e.getAttribute(YS):null;return t&&n}function SG(e){return e&&e.classList&&e.classList.contains&&e.classList.contains(Be.replacementClass)}function EG(){if(Be.autoReplaceSvg===!0)return ng.replace;var e=ng[Be.autoReplaceSvg];return e||ng.replace}function TG(e){return At.createElementNS("http://www.w3.org/2000/svg",e)}function OG(e){return At.createElement(e)}function uI(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.ceFn,r=n===void 0?e.tag==="svg"?TG:OG:n;if(typeof e=="string")return At.createTextNode(e);var i=r(e.tag);Object.keys(e.attributes||[]).forEach(function(a){i.setAttribute(a,e.attributes[a])});var o=e.children||[];return o.forEach(function(a){i.appendChild(uI(a,{ceFn:r}))}),i}function CG(e){var t=" ".concat(e.outerHTML," ");return t="".concat(t,"Font Awesome fontawesome.com "),t}var ng={replace:function(t){var n=t[0];if(n.parentNode)if(t[1].forEach(function(i){n.parentNode.insertBefore(uI(i),n)}),n.getAttribute(vl)===null&&Be.keepOriginalSource){var r=At.createComment(CG(n));n.parentNode.replaceChild(r,n)}else n.remove()},nest:function(t){var n=t[0],r=t[1];if(~qS(n).indexOf(Be.replacementClass))return ng.replace(t);var i=new RegExp("".concat(Be.cssPrefix,"-.*"));if(delete r[0].attributes.id,r[0].attributes.class){var o=r[0].attributes.class.split(" ").reduce(function(s,l){return l===Be.replacementClass||l.match(i)?s.toSvg.push(l):s.toNode.push(l),s},{toNode:[],toSvg:[]});r[0].attributes.class=o.toSvg.join(" "),o.toNode.length===0?n.removeAttribute("class"):n.setAttribute("class",o.toNode.join(" "))}var a=r.map(function(s){return Ih(s)}).join(` -`);n.setAttribute(vl,""),n.innerHTML=a}};function Jk(e){e()}function dI(e,t){var n=typeof t=="function"?t:tg;if(e.length===0)n();else{var r=Jk;Be.mutateApproach===jY&&(r=is.requestAnimationFrame||Jk),r(function(){var i=EG(),o=eE.begin("mutate");e.map(i),o(),n()})}}var tE=!1;function fI(){tE=!0}function ow(){tE=!1}var iv=null;function eP(e){if(Vk&&Be.observeMutations){var t=e.treeCallback,n=t===void 0?tg:t,r=e.nodeCallback,i=r===void 0?tg:r,o=e.pseudoElementsCallback,a=o===void 0?tg:o,s=e.observeMutationsRoot,l=s===void 0?At:s;iv=new Vk(function(c){if(!tE){var d=os();Du(c).forEach(function(f){if(f.type==="childList"&&f.addedNodes.length>0&&!Xk(f.addedNodes[0])&&(Be.searchPseudoElements&&a(f.target),n(f.target)),f.type==="attributes"&&f.target.parentNode&&Be.searchPseudoElements&&a(f.target.parentNode),f.type==="attributes"&&Xk(f.target)&&~FY.indexOf(f.attributeName))if(f.attributeName==="class"&&xG(f.target)){var p=e0(qS(f.target)),m=p.prefix,v=p.iconName;f.target.setAttribute(WS,m||d),v&&f.target.setAttribute(YS,v)}else SG(f.target)&&i(f.target)})}}),la&&iv.observe(l,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function kG(){iv&&iv.disconnect()}function PG(e){var t=e.getAttribute("style"),n=[];return t&&(n=t.split(";").reduce(function(r,i){var o=i.split(":"),a=o[0],s=o.slice(1);return a&&s.length>0&&(r[a]=s.join(":").trim()),r},{})),n}function LG(e){var t=e.getAttribute("data-prefix"),n=e.getAttribute("data-icon"),r=e.innerText!==void 0?e.innerText.trim():"",i=e0(qS(e));return i.prefix||(i.prefix=os()),t&&n&&(i.prefix=t,i.iconName=n),i.iconName&&i.prefix||(i.prefix&&r.length>0&&(i.iconName=sG(i.prefix,e.innerText)||QS(i.prefix,X1(e.innerText))),!i.iconName&&Be.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(i.iconName=e.firstChild.data)),i}function jG(e){var t=Du(e.attributes).reduce(function(i,o){return i.name!=="class"&&i.name!=="style"&&(i[o.name]=o.value),i},{}),n=e.getAttribute("title"),r=e.getAttribute("data-fa-title-id");return Be.autoA11y&&(n?t["aria-labelledby"]="".concat(Be.replacementClass,"-title-").concat(r||Qf()):(t["aria-hidden"]="true",t.focusable="false")),t}function MG(){return{iconName:null,title:null,titleId:null,prefix:null,transform:fo,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function tP(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0},n=LG(e),r=n.iconName,i=n.prefix,o=n.rest,a=jG(e),s=ew("parseNodeAttributes",{},e),l=t.styleParser?PG(e):[];return Ie({iconName:r,title:e.getAttribute("title"),titleId:e.getAttribute("data-fa-title-id"),prefix:i,transform:fo,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:o,styles:l,attributes:a}},s)}var NG=Di.styles;function hI(e){var t=Be.autoReplaceSvg==="nest"?tP(e,{styleParser:!1}):tP(e);return~t.extra.classes.indexOf(ZD)?Xo("generateLayersText",e,t):Xo("generateSvgReplacementMutation",e,t)}var as=new Set;GS.map(function(e){as.add("fa-".concat(e))});Object.keys(Gf[Mt]).map(as.add.bind(as));Object.keys(Gf[en]).map(as.add.bind(as));as=Ah(as);function nP(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!la)return Promise.resolve();var n=At.documentElement.classList,r=function(f){return n.add("".concat(Hk,"-").concat(f))},i=function(f){return n.remove("".concat(Hk,"-").concat(f))},o=Be.autoFetchSvg?as:GS.map(function(d){return"fa-".concat(d)}).concat(Object.keys(NG));o.includes("fa")||o.push("fa");var a=[".".concat(ZD,":not([").concat(vl,"])")].concat(o.map(function(d){return".".concat(d,":not([").concat(vl,"])")})).join(", ");if(a.length===0)return Promise.resolve();var s=[];try{s=Du(e.querySelectorAll(a))}catch{}if(s.length>0)r("pending"),i("complete");else return Promise.resolve();var l=eE.begin("onTree"),c=s.reduce(function(d,f){try{var p=hI(f);p&&d.push(p)}catch(m){qD||m.name==="MissingIcon"&&console.error(m)}return d},[]);return new Promise(function(d,f){Promise.all(c).then(function(p){dI(p,function(){r("active"),r("complete"),i("pending"),typeof t=="function"&&t(),l(),d()})}).catch(function(p){l(),f(p)})})}function RG(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;hI(e).then(function(n){n&&dI([n],t)})}function AG(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=(t||{}).icon?t:tw(t||{}),i=n.mask;return i&&(i=(i||{}).icon?i:tw(i||{})),e(r,Ie(Ie({},n),{},{mask:i}))}}var DG=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.transform,i=r===void 0?fo:r,o=n.symbol,a=o===void 0?!1:o,s=n.mask,l=s===void 0?null:s,c=n.maskId,d=c===void 0?null:c,f=n.title,p=f===void 0?null:f,m=n.titleId,v=m===void 0?null:m,y=n.classes,x=y===void 0?[]:y,_=n.attributes,w=_===void 0?{}:_,S=n.styles,E=S===void 0?{}:S;if(t){var O=t.prefix,k=t.iconName,j=t.icon;return t0(Ie({type:"icon"},t),function(){return yl("beforeDOMElementCreation",{iconDefinition:t,params:n}),Be.autoA11y&&(p?w["aria-labelledby"]="".concat(Be.replacementClass,"-title-").concat(v||Qf()):(w["aria-hidden"]="true",w.focusable="false")),JS({icons:{main:nw(j),mask:l?nw(l.icon):{found:!1,width:null,height:null,icon:{}}},prefix:O,iconName:k,transform:Ie(Ie({},fo),i),symbol:a,title:p,maskId:d,titleId:v,extra:{attributes:w,styles:E,classes:x}})})}},IG={mixout:function(){return{icon:AG(DG)}},hooks:function(){return{mutationObserverCallbacks:function(n){return n.treeCallback=nP,n.nodeCallback=RG,n}}},provides:function(t){t.i2svg=function(n){var r=n.node,i=r===void 0?At:r,o=n.callback,a=o===void 0?function(){}:o;return nP(i,a)},t.generateSvgReplacementMutation=function(n,r){var i=r.iconName,o=r.title,a=r.titleId,s=r.prefix,l=r.transform,c=r.symbol,d=r.mask,f=r.maskId,p=r.extra;return new Promise(function(m,v){Promise.all([rw(i,s),d.iconName?rw(d.iconName,d.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(y){var x=VS(y,2),_=x[0],w=x[1];m([n,JS({icons:{main:_,mask:w},prefix:s,iconName:i,transform:l,symbol:c,maskId:f,title:o,titleId:a,extra:p,watchable:!0})])}).catch(v)})},t.generateAbstractIcon=function(n){var r=n.children,i=n.attributes,o=n.main,a=n.transform,s=n.styles,l=Xy(s);l.length>0&&(i.style=l);var c;return ZS(a)&&(c=Xo("generateAbstractTransformGrouping",{main:o,transform:a,containerWidth:o.width,iconWidth:o.width})),r.push(c||o.icon),{children:r,attributes:i}}}},FG={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 t0({type:"layer"},function(){yl("beforeDOMElementCreation",{assembler:n,params:r});var a=[];return n(function(s){Array.isArray(s)?s.map(function(l){a=a.concat(l.abstract)}):a=a.concat(s.abstract)}),[{tag:"span",attributes:{class:["".concat(Be.cssPrefix,"-layers")].concat(Ah(o)).join(" ")},children:a}]})}}}},$G={mixout:function(){return{counter:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.title,o=i===void 0?null:i,a=r.classes,s=a===void 0?[]:a,l=r.attributes,c=l===void 0?{}:l,d=r.styles,f=d===void 0?{}:d;return t0({type:"counter",content:n},function(){return yl("beforeDOMElementCreation",{content:n,params:r}),yG({content:n.toString(),title:o,extra:{attributes:c,styles:f,classes:["".concat(Be.cssPrefix,"-layers-counter")].concat(Ah(s))}})})}}}},UG={mixout:function(){return{text:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.transform,o=i===void 0?fo:i,a=r.title,s=a===void 0?null:a,l=r.classes,c=l===void 0?[]:l,d=r.attributes,f=d===void 0?{}:d,p=r.styles,m=p===void 0?{}:p;return t0({type:"text",content:n},function(){return yl("beforeDOMElementCreation",{content:n,params:r}),Kk({content:n,transform:Ie(Ie({},fo),o),title:s,extra:{attributes:f,styles:m,classes:["".concat(Be.cssPrefix,"-layers-text")].concat(Ah(c))}})})}}},provides:function(t){t.generateLayersText=function(n,r){var i=r.title,o=r.transform,a=r.extra,s=null,l=null;if(WD){var c=parseInt(getComputedStyle(n).fontSize,10),d=n.getBoundingClientRect();s=d.width/c,l=d.height/c}return Be.autoA11y&&!i&&(a.attributes["aria-hidden"]="true"),Promise.resolve([n,Kk({content:n.innerHTML,width:s,height:l,transform:o,title:i,extra:a,watchable:!0})])}}},BG=new RegExp('"',"ug"),rP=[1105920,1112319];function zG(e){var t=e.replace(BG,""),n=tG(t,0),r=n>=rP[0]&&n<=rP[1],i=t.length===2?t[0]===t[1]:!1;return{value:X1(i?t[0]:t),isSecondary:r||i}}function iP(e,t){var n="".concat(LY).concat(t.replace(":","-"));return new Promise(function(r,i){if(e.getAttribute(n)!==null)return r();var o=Du(e.children),a=o.filter(function(j){return j.getAttribute(Q1)===t})[0],s=is.getComputedStyle(e,t),l=s.getPropertyValue("font-family").match(AY),c=s.getPropertyValue("font-weight"),d=s.getPropertyValue("content");if(a&&!l)return e.removeChild(a),r();if(l&&d!=="none"&&d!==""){var f=s.getPropertyValue("content"),p=~["Sharp"].indexOf(l[2])?en:Mt,m=~["Solid","Regular","Light","Thin","Duotone","Brands","Kit"].indexOf(l[2])?qf[p][l[2].toLowerCase()]:DY[p][c],v=zG(f),y=v.value,x=v.isSecondary,_=l[0].startsWith("FontAwesome"),w=QS(m,y),S=w;if(_){var E=lG(y);E.iconName&&E.prefix&&(w=E.iconName,m=E.prefix)}if(w&&!x&&(!a||a.getAttribute(WS)!==m||a.getAttribute(YS)!==S)){e.setAttribute(n,S),a&&e.removeChild(a);var O=MG(),k=O.extra;k.attributes[Q1]=t,rw(w,m).then(function(j){var A=JS(Ie(Ie({},O),{},{icons:{main:j,mask:XS()},prefix:m,iconName:S,extra:k,watchable:!0})),U=At.createElementNS("http://www.w3.org/2000/svg","svg");t==="::before"?e.insertBefore(U,e.firstChild):e.appendChild(U),U.outerHTML=A.map(function(R){return Ih(R)}).join(` -`),e.removeAttribute(n),r()}).catch(i)}else r()}else r()})}function VG(e){return Promise.all([iP(e,"::before"),iP(e,"::after")])}function HG(e){return e.parentNode!==document.head&&!~MY.indexOf(e.tagName.toUpperCase())&&!e.getAttribute(Q1)&&(!e.parentNode||e.parentNode.tagName!=="svg")}function oP(e){if(la)return new Promise(function(t,n){var r=Du(e.querySelectorAll("*")).filter(HG).map(VG),i=eE.begin("searchPseudoElements");fI(),Promise.all(r).then(function(){i(),ow(),t()}).catch(function(){i(),ow(),n()})})}var WG={hooks:function(){return{mutationObserverCallbacks:function(n){return n.pseudoElementsCallback=oP,n}}},provides:function(t){t.pseudoElements2svg=function(n){var r=n.node,i=r===void 0?At:r;Be.searchPseudoElements&&oP(i)}}},aP=!1,YG={mixout:function(){return{dom:{unwatch:function(){fI(),aP=!0}}}},hooks:function(){return{bootstrap:function(){eP(ew("mutationObserverCallbacks",{}))},noAuto:function(){kG()},watch:function(n){var r=n.observeMutationsRoot;aP?ow():eP(ew("mutationObserverCallbacks",{observeMutationsRoot:r}))}}}},sP=function(t){var n={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return t.toLowerCase().split(" ").reduce(function(r,i){var o=i.toLowerCase().split("-"),a=o[0],s=o.slice(1).join("-");if(a&&s==="h")return r.flipX=!0,r;if(a&&s==="v")return r.flipY=!0,r;if(s=parseFloat(s),isNaN(s))return r;switch(a){case"grow":r.size=r.size+s;break;case"shrink":r.size=r.size-s;break;case"left":r.x=r.x-s;break;case"right":r.x=r.x+s;break;case"up":r.y=r.y-s;break;case"down":r.y=r.y+s;break;case"rotate":r.rotate=r.rotate+s;break}return r},n)},GG={mixout:function(){return{parse:{transform:function(n){return sP(n)}}}},hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-transform");return i&&(n.transform=sP(i)),n}}},provides:function(t){t.generateAbstractTransformGrouping=function(n){var r=n.main,i=n.transform,o=n.containerWidth,a=n.iconWidth,s={transform:"translate(".concat(o/2," 256)")},l="translate(".concat(i.x*32,", ").concat(i.y*32,") "),c="scale(".concat(i.size/16*(i.flipX?-1:1),", ").concat(i.size/16*(i.flipY?-1:1),") "),d="rotate(".concat(i.rotate," 0 0)"),f={transform:"".concat(l," ").concat(c," ").concat(d)},p={transform:"translate(".concat(a/2*-1," -256)")},m={outer:s,inner:f,path:p};return{tag:"g",attributes:Ie({},m.outer),children:[{tag:"g",attributes:Ie({},m.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:Ie(Ie({},r.icon.attributes),m.path)}]}]}}}},F_={x:0,y:0,width:"100%",height:"100%"};function lP(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 qG(e){return e.tag==="g"?e.children:[e]}var ZG={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-mask"),o=i?e0(i.split(" ").map(function(a){return a.trim()})):XS();return o.prefix||(o.prefix=os()),n.mask=o,n.maskId=r.getAttribute("data-fa-mask-id"),n}}},provides:function(t){t.generateAbstractMask=function(n){var r=n.children,i=n.attributes,o=n.main,a=n.mask,s=n.maskId,l=n.transform,c=o.width,d=o.icon,f=a.width,p=a.icon,m=GY({transform:l,containerWidth:f,iconWidth:c}),v={tag:"rect",attributes:Ie(Ie({},F_),{},{fill:"white"})},y=d.children?{children:d.children.map(lP)}:{},x={tag:"g",attributes:Ie({},m.inner),children:[lP(Ie({tag:d.tag,attributes:Ie(Ie({},d.attributes),m.path)},y))]},_={tag:"g",attributes:Ie({},m.outer),children:[x]},w="mask-".concat(s||Qf()),S="clip-".concat(s||Qf()),E={tag:"mask",attributes:Ie(Ie({},F_),{},{id:w,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[v,_]},O={tag:"defs",children:[{tag:"clipPath",attributes:{id:S},children:qG(p)},E]};return r.push(O,{tag:"rect",attributes:Ie({fill:"currentColor","clip-path":"url(#".concat(S,")"),mask:"url(#".concat(w,")")},F_)}),{children:r,attributes:i}}}},KG={provides:function(t){var n=!1;is.matchMedia&&(n=is.matchMedia("(prefers-reduced-motion: reduce)").matches),t.missingIconAbstract=function(){var r=[],i={fill:"currentColor"},o={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};r.push({tag:"path",attributes:Ie(Ie({},i),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});var a=Ie(Ie({},o),{},{attributeName:"opacity"}),s={tag:"circle",attributes:Ie(Ie({},i),{},{cx:"256",cy:"364",r:"28"}),children:[]};return n||s.children.push({tag:"animate",attributes:Ie(Ie({},o),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:Ie(Ie({},a),{},{values:"1;0;1;1;0;1;"})}),r.push(s),r.push({tag:"path",attributes:Ie(Ie({},i),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:n?[]:[{tag:"animate",attributes:Ie(Ie({},a),{},{values:"1;0;0;0;0;1;"})}]}),n||r.push({tag:"path",attributes:Ie(Ie({},i),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:Ie(Ie({},a),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:r}}}},QG={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}}}},XG=[KY,IG,FG,$G,UG,WG,YG,GG,ZG,KG,QG];dG(XG,{mixoutsTo:ei});ei.noAuto;ei.config;ei.library;ei.dom;var aw=ei.parse;ei.findIconDefinition;ei.toHtml;var JG=ei.icon;ei.layer;ei.text;ei.counter;var pI={exports:{}},eq="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",tq=eq,nq=tq;function mI(){}function gI(){}gI.resetWarningCache=mI;var rq=function(){function e(r,i,o,a,s,l){if(l!==nq){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:gI,resetWarningCache:mI};return n.PropTypes=n,n};pI.exports=rq();var iq=pI.exports;const N=oa(iq);function cP(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 Aa(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function aq(e,t){if(e==null)return{};var n=oq(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function sw(e){return sq(e)||lq(e)||cq(e)||uq()}function sq(e){if(Array.isArray(e))return lw(e)}function lq(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function cq(e,t){if(e){if(typeof e=="string")return lw(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 lw(e,t)}}function lw(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 yI(e,l)}),i=Object.keys(t.attributes||{}).reduce(function(l,c){var d=t.attributes[c];switch(c){case"class":l.attrs.className=d,delete t.attributes.class;break;case"style":l.attrs.style=mq(d);break;default:c.indexOf("aria-")===0||c.indexOf("data-")===0?l.attrs[c.toLowerCase()]=d:l.attrs[vI(c)]=d}return l},{attrs:{}}),o=n.style,a=o===void 0?{}:o,s=aq(n,hq);return i.attrs.style=Aa(Aa({},i.attrs.style),a),e.apply(void 0,[t.tag,Aa(Aa({},i.attrs),s)].concat(sw(r)))}var _I=!1;try{_I=!0}catch{}function gq(){if(!_I&&console&&typeof console.error=="function"){var e;(e=console).error.apply(e,arguments)}}function uP(e){if(e&&ov(e)==="object"&&e.prefix&&e.iconName&&e.icon)return e;if(aw.icon)return aw.icon(e);if(e===null)return null;if(e&&ov(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 $_(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?jc({},e,t):{}}var Ne=Y.forwardRef(function(e,t){var n=e.icon,r=e.mask,i=e.symbol,o=e.className,a=e.title,s=e.titleId,l=e.maskId,c=uP(n),d=$_("classes",[].concat(sw(dq(e)),sw(o.split(" ")))),f=$_("transform",typeof e.transform=="string"?aw.transform(e.transform):e.transform),p=$_("mask",uP(r)),m=JG(c,Aa(Aa(Aa(Aa({},d),f),p),{},{symbol:i,title:a,titleId:s,maskId:l}));if(!m)return gq("Could not find icon",c),null;var v=m.abstract,y={ref:t};return Object.keys(e).forEach(function(x){Ne.defaultProps.hasOwnProperty(x)||(y[x]=e[x])}),vq(v[0],y)});Ne.displayName="FontAwesomeIcon";Ne.propTypes={beat:N.bool,border:N.bool,beatFade:N.bool,bounce:N.bool,className:N.string,fade:N.bool,flash:N.bool,mask:N.oneOfType([N.object,N.array,N.string]),maskId:N.string,fixedWidth:N.bool,inverse:N.bool,flip:N.oneOf([!0,!1,"horizontal","vertical","both"]),icon:N.oneOfType([N.object,N.array,N.string]),listItem:N.bool,pull:N.oneOf(["right","left"]),pulse:N.bool,rotation:N.oneOf([0,90,180,270]),shake:N.bool,size:N.oneOf(["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:N.bool,spinPulse:N.bool,spinReverse:N.bool,symbol:N.oneOfType([N.bool,N.string]),title:N.string,titleId:N.string,transform:N.oneOfType([N.string,N.object]),swapOpacity:N.bool};Ne.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 vq=yI.bind(null,Y.createElement),bI={exports:{}};/*! +}`;function JD(){var e=YD,t=GD,n=Be.cssPrefix,r=Be.replacementClass,i=KY;if(n!==e||r!==t){var o=new RegExp("\\.".concat(e,"\\-"),"g"),a=new RegExp("\\--".concat(e,"\\-"),"g"),s=new RegExp("\\.".concat(t),"g");i=i.replace(o,".".concat(n,"-")).replace(a,"--".concat(n,"-")).replace(s,".".concat(r))}return i}var Wk=!1;function A_(){Be.autoAddCss&&!Wk&&(WY(JD()),Wk=!0)}var QY={mixout:function(){return{dom:{css:JD,insertCss:A_}}},hooks:function(){return{beforeDOMElementCreation:function(){A_()},beforeI2svg:function(){A_()}}}},Qo=is||{};Qo[Ko]||(Qo[Ko]={});Qo[Ko].styles||(Qo[Ko].styles={});Qo[Ko].hooks||(Qo[Ko].hooks={});Qo[Ko].shims||(Qo[Ko].shims=[]);var Di=Qo[Ko],eI=[],XY=function e(){At.removeEventListener("DOMContentLoaded",e),rv=1,eI.map(function(t){return t()})},rv=!1;la&&(rv=(At.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(At.readyState),rv||At.addEventListener("DOMContentLoaded",XY));function JY(e){la&&(rv?setTimeout(e,0):eI.push(e))}function Ih(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"?XD(e):"<".concat(t," ").concat(GY(r),">").concat(o.map(Ih).join(""),"")}function Yk(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}var eG=function(t,n){return function(r,i,o,a){return t.call(n,r,i,o,a)}},D_=function(t,n,r,i){var o=Object.keys(t),a=o.length,s=i!==void 0?eG(n,i):n,l,c,d;for(r===void 0?(l=1,d=t[o[0]]):(l=0,d=r);l=55296&&i<=56319&&n=55296&&r<=56319&&n>t+1&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}function Gk(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 J1(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.skipHooks,i=r===void 0?!1:r,o=Gk(t);typeof Di.hooks.addPack=="function"&&!i?Di.hooks.addPack(e,Gk(t)):Di.styles[e]=Ie(Ie({},Di.styles[e]||{}),o),e==="fas"&&J1("fa",t)}var im,om,am,Pc=Di.styles,rG=Di.shims,iG=(im={},xn(im,Mt,Object.values(Zf[Mt])),xn(im,en,Object.values(Zf[en])),im),KS=null,tI={},nI={},rI={},iI={},oI={},oG=(om={},xn(om,Mt,Object.keys(Gf[Mt])),xn(om,en,Object.keys(Gf[en])),om);function aG(e){return~UY.indexOf(e)}function sG(e,t){var n=t.split("-"),r=n[0],i=n.slice(1).join("-");return r===e&&i!==""&&!aG(i)?i:null}var aI=function(){var t=function(o){return D_(Pc,function(a,s,l){return a[l]=D_(s,o,{}),a},{})};tI=t(function(i,o,a){if(o[3]&&(i[o[3]]=a),o[2]){var s=o[2].filter(function(l){return typeof l=="number"});s.forEach(function(l){i[l.toString(16)]=a})}return i}),nI=t(function(i,o,a){if(i[a]=a,o[2]){var s=o[2].filter(function(l){return typeof l=="string"});s.forEach(function(l){i[l]=a})}return i}),oI=t(function(i,o,a){var s=o[2];return i[a]=a,s.forEach(function(l){i[l]=a}),i});var n="far"in Pc||Be.autoFetchSvg,r=D_(rG,function(i,o){var a=o[0],s=o[1],l=o[2];return s==="far"&&!n&&(s="fas"),typeof a=="string"&&(i.names[a]={prefix:s,iconName:l}),typeof a=="number"&&(i.unicodes[a.toString(16)]={prefix:s,iconName:l}),i},{names:{},unicodes:{}});rI=r.names,iI=r.unicodes,KS=Jy(Be.styleDefault,{family:Be.familyDefault})};HY(function(e){KS=Jy(e.styleDefault,{family:Be.familyDefault})});aI();function QS(e,t){return(tI[e]||{})[t]}function lG(e,t){return(nI[e]||{})[t]}function Qs(e,t){return(oI[e]||{})[t]}function sI(e){return rI[e]||{prefix:null,iconName:null}}function cG(e){var t=iI[e],n=QS("fas",e);return t||(n?{prefix:"fas",iconName:n}:null)||{prefix:null,iconName:null}}function os(){return KS}var XS=function(){return{prefix:null,iconName:null,rest:[]}};function Jy(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.family,r=n===void 0?Mt:n,i=Gf[r][e],o=qf[r][e]||qf[r][i],a=e in Di.styles?e:null;return o||a||null}var qk=(am={},xn(am,Mt,Object.keys(Zf[Mt])),xn(am,en,Object.keys(Zf[en])),am);function e0(e){var t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.skipLookups,i=r===void 0?!1:r,o=(t={},xn(t,Mt,"".concat(Be.cssPrefix,"-").concat(Mt)),xn(t,en,"".concat(Be.cssPrefix,"-").concat(en)),t),a=null,s=Mt;(e.includes(o[Mt])||e.some(function(c){return qk[Mt].includes(c)}))&&(s=Mt),(e.includes(o[en])||e.some(function(c){return qk[en].includes(c)}))&&(s=en);var l=e.reduce(function(c,d){var f=sG(Be.cssPrefix,d);if(Pc[d]?(d=iG[s].includes(d)?RY[s][d]:d,a=d,c.prefix=d):oG[s].indexOf(d)>-1?(a=d,c.prefix=Jy(d,{family:s})):f?c.iconName=f:d!==Be.replacementClass&&d!==o[Mt]&&d!==o[en]&&c.rest.push(d),!i&&c.prefix&&c.iconName){var p=a==="fa"?sI(c.iconName):{},m=Qs(c.prefix,c.iconName);p.prefix&&(a=null),c.iconName=p.iconName||m||c.iconName,c.prefix=p.prefix||c.prefix,c.prefix==="far"&&!Pc.far&&Pc.fas&&!Be.autoFetchSvg&&(c.prefix="fas")}return c},XS());return(e.includes("fa-brands")||e.includes("fab"))&&(l.prefix="fab"),(e.includes("fa-duotone")||e.includes("fad"))&&(l.prefix="fad"),!l.prefix&&s===en&&(Pc.fass||Be.autoFetchSvg)&&(l.prefix="fass",l.iconName=Qs(l.prefix,l.iconName)||l.iconName),(l.prefix==="fa"||a==="fa")&&(l.prefix=os()||"fas"),l}var uG=function(){function e(){xY(this,e),this.definitions={}}return SY(e,[{key:"add",value:function(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o0&&d.forEach(function(f){typeof f=="string"&&(n[s][f]=c)}),n[s][l]=c}),n}}]),e}(),Zk=[],Lc={},Hc={},dG=Object.keys(Hc);function fG(e,t){var n=t.mixoutsTo;return Zk=e,Lc={},Object.keys(Hc).forEach(function(r){dG.indexOf(r)===-1&&delete Hc[r]}),Zk.forEach(function(r){var i=r.mixout?r.mixout():{};if(Object.keys(i).forEach(function(a){typeof i[a]=="function"&&(n[a]=i[a]),nv(i[a])==="object"&&Object.keys(i[a]).forEach(function(s){n[a]||(n[a]={}),n[a][s]=i[a][s]})}),r.hooks){var o=r.hooks();Object.keys(o).forEach(function(a){Lc[a]||(Lc[a]=[]),Lc[a].push(o[a])})}r.provides&&r.provides(Hc)}),n}function ew(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 la?(yl("beforeI2svg",t),Xo("pseudoElements2svg",t),Xo("i2svg",t)):Promise.reject("Operation requires a DOM of some kind.")},watch:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot;Be.autoReplaceSvg===!1&&(Be.autoReplaceSvg=!0),Be.observeMutations=!0,JY(function(){gG({autoReplaceSvgRoot:n}),yl("watch",t)})}},mG={icon:function(t){if(t===null)return null;if(nv(t)==="object"&&t.prefix&&t.iconName)return{prefix:t.prefix,iconName:Qs(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=Jy(t[0]);return{prefix:r,iconName:Qs(r,n)||n}}if(typeof t=="string"&&(t.indexOf("".concat(Be.cssPrefix,"-"))>-1||t.match(AY))){var i=e0(t.split(" "),{skipLookups:!0});return{prefix:i.prefix||os(),iconName:Qs(i.prefix,i.iconName)||i.iconName}}if(typeof t=="string"){var o=os();return{prefix:o,iconName:Qs(o,t)||t}}}},ei={noAuto:hG,config:Be,dom:pG,parse:mG,library:lI,findIconDefinition:tw,toHtml:Ih},gG=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot,r=n===void 0?At:n;(Object.keys(Di.styles).length>0||Be.autoFetchSvg)&&la&&Be.autoReplaceSvg&&ei.dom.i2svg({node:r})};function t0(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(function(r){return Ih(r)})}}),Object.defineProperty(e,"node",{get:function(){if(la){var r=At.createElement("div");return r.innerHTML=e.html,r.children}}}),e}function vG(e){var t=e.children,n=e.main,r=e.mask,i=e.attributes,o=e.styles,a=e.transform;if(ZS(a)&&n.found&&!r.found){var s=n.width,l=n.height,c={x:s/l/2,y:.5};i.style=Xy(Ie(Ie({},o),{},{"transform-origin":"".concat(c.x+a.x/16,"em ").concat(c.y+a.y/16,"em")}))}return[{tag:"svg",attributes:i,children:t}]}function yG(e){var t=e.prefix,n=e.iconName,r=e.children,i=e.attributes,o=e.symbol,a=o===!0?"".concat(t,"-").concat(Be.cssPrefix,"-").concat(n):o;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:Ie(Ie({},i),{},{id:a}),children:r}]}]}function JS(e){var t=e.icons,n=t.main,r=t.mask,i=e.prefix,o=e.iconName,a=e.transform,s=e.symbol,l=e.title,c=e.maskId,d=e.titleId,f=e.extra,p=e.watchable,m=p===void 0?!1:p,v=r.found?r:n,y=v.width,x=v.height,_=i==="fak",w=[Be.replacementClass,o?"".concat(Be.cssPrefix,"-").concat(o):""].filter(function(U){return f.classes.indexOf(U)===-1}).filter(function(U){return U!==""||!!U}).concat(f.classes).join(" "),S={children:[],attributes:Ie(Ie({},f.attributes),{},{"data-prefix":i,"data-icon":o,class:w,role:f.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(y," ").concat(x)})},E=_&&!~f.classes.indexOf("fa-fw")?{width:"".concat(y/x*16*.0625,"em")}:{};m&&(S.attributes[vl]=""),l&&(S.children.push({tag:"title",attributes:{id:S.attributes["aria-labelledby"]||"title-".concat(d||Qf())},children:[l]}),delete S.attributes.title);var O=Ie(Ie({},S),{},{prefix:i,iconName:o,main:n,mask:r,maskId:c,transform:a,symbol:s,styles:Ie(Ie({},E),f.styles)}),k=r.found&&n.found?Xo("generateAbstractMask",O)||{children:[],attributes:{}}:Xo("generateAbstractIcon",O)||{children:[],attributes:{}},j=k.children,A=k.attributes;return O.children=j,O.attributes=A,s?yG(O):vG(O)}function Kk(e){var t=e.content,n=e.width,r=e.height,i=e.transform,o=e.title,a=e.extra,s=e.watchable,l=s===void 0?!1:s,c=Ie(Ie(Ie({},a.attributes),o?{title:o}:{}),{},{class:a.classes.join(" ")});l&&(c[vl]="");var d=Ie({},a.styles);ZS(i)&&(d.transform=ZY({transform:i,startCentered:!0,width:n,height:r}),d["-webkit-transform"]=d.transform);var f=Xy(d);f.length>0&&(c.style=f);var p=[];return p.push({tag:"span",attributes:c,children:[t]}),o&&p.push({tag:"span",attributes:{class:"sr-only"},children:[o]}),p}function _G(e){var t=e.content,n=e.title,r=e.extra,i=Ie(Ie(Ie({},r.attributes),n?{title:n}:{}),{},{class:r.classes.join(" ")}),o=Xy(r.styles);o.length>0&&(i.style=o);var a=[];return a.push({tag:"span",attributes:i,children:[t]}),n&&a.push({tag:"span",attributes:{class:"sr-only"},children:[n]}),a}var I_=Di.styles;function nw(e){var t=e[0],n=e[1],r=e.slice(4),i=VS(r,1),o=i[0],a=null;return Array.isArray(o)?a={tag:"g",attributes:{class:"".concat(Be.cssPrefix,"-").concat(Ks.GROUP)},children:[{tag:"path",attributes:{class:"".concat(Be.cssPrefix,"-").concat(Ks.SECONDARY),fill:"currentColor",d:o[0]}},{tag:"path",attributes:{class:"".concat(Be.cssPrefix,"-").concat(Ks.PRIMARY),fill:"currentColor",d:o[1]}}]}:a={tag:"path",attributes:{fill:"currentColor",d:o}},{found:!0,width:t,height:n,icon:a}}var bG={found:!1,width:512,height:512};function wG(e,t){!qD&&!Be.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"&&Be.styleDefault!==null&&(t=os()),new Promise(function(r,i){if(Xo("missingIconAbstract"),n==="fa"){var o=sI(e)||{};e=o.iconName||e,t=o.prefix||t}if(e&&t&&I_[t]&&I_[t][e]){var a=I_[t][e];return r(nw(a))}wG(e,t),r(Ie(Ie({},bG),{},{icon:Be.showMissingIcons&&e?Xo("missingIconAbstract")||{}:{}}))})}var Qk=function(){},iw=Be.measurePerformance&&Xp&&Xp.mark&&Xp.measure?Xp:{mark:Qk,measure:Qk},Id='FA "6.4.2"',xG=function(t){return iw.mark("".concat(Id," ").concat(t," begins")),function(){return cI(t)}},cI=function(t){iw.mark("".concat(Id," ").concat(t," ends")),iw.measure("".concat(Id," ").concat(t),"".concat(Id," ").concat(t," begins"),"".concat(Id," ").concat(t," ends"))},eE={begin:xG,end:cI},tg=function(){};function Xk(e){var t=e.getAttribute?e.getAttribute(vl):null;return typeof t=="string"}function SG(e){var t=e.getAttribute?e.getAttribute(WS):null,n=e.getAttribute?e.getAttribute(YS):null;return t&&n}function EG(e){return e&&e.classList&&e.classList.contains&&e.classList.contains(Be.replacementClass)}function TG(){if(Be.autoReplaceSvg===!0)return ng.replace;var e=ng[Be.autoReplaceSvg];return e||ng.replace}function OG(e){return At.createElementNS("http://www.w3.org/2000/svg",e)}function CG(e){return At.createElement(e)}function uI(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.ceFn,r=n===void 0?e.tag==="svg"?OG:CG:n;if(typeof e=="string")return At.createTextNode(e);var i=r(e.tag);Object.keys(e.attributes||[]).forEach(function(a){i.setAttribute(a,e.attributes[a])});var o=e.children||[];return o.forEach(function(a){i.appendChild(uI(a,{ceFn:r}))}),i}function kG(e){var t=" ".concat(e.outerHTML," ");return t="".concat(t,"Font Awesome fontawesome.com "),t}var ng={replace:function(t){var n=t[0];if(n.parentNode)if(t[1].forEach(function(i){n.parentNode.insertBefore(uI(i),n)}),n.getAttribute(vl)===null&&Be.keepOriginalSource){var r=At.createComment(kG(n));n.parentNode.replaceChild(r,n)}else n.remove()},nest:function(t){var n=t[0],r=t[1];if(~qS(n).indexOf(Be.replacementClass))return ng.replace(t);var i=new RegExp("".concat(Be.cssPrefix,"-.*"));if(delete r[0].attributes.id,r[0].attributes.class){var o=r[0].attributes.class.split(" ").reduce(function(s,l){return l===Be.replacementClass||l.match(i)?s.toSvg.push(l):s.toNode.push(l),s},{toNode:[],toSvg:[]});r[0].attributes.class=o.toSvg.join(" "),o.toNode.length===0?n.removeAttribute("class"):n.setAttribute("class",o.toNode.join(" "))}var a=r.map(function(s){return Ih(s)}).join(` +`);n.setAttribute(vl,""),n.innerHTML=a}};function Jk(e){e()}function dI(e,t){var n=typeof t=="function"?t:tg;if(e.length===0)n();else{var r=Jk;Be.mutateApproach===MY&&(r=is.requestAnimationFrame||Jk),r(function(){var i=TG(),o=eE.begin("mutate");e.map(i),o(),n()})}}var tE=!1;function fI(){tE=!0}function ow(){tE=!1}var iv=null;function eP(e){if(Vk&&Be.observeMutations){var t=e.treeCallback,n=t===void 0?tg:t,r=e.nodeCallback,i=r===void 0?tg:r,o=e.pseudoElementsCallback,a=o===void 0?tg:o,s=e.observeMutationsRoot,l=s===void 0?At:s;iv=new Vk(function(c){if(!tE){var d=os();Du(c).forEach(function(f){if(f.type==="childList"&&f.addedNodes.length>0&&!Xk(f.addedNodes[0])&&(Be.searchPseudoElements&&a(f.target),n(f.target)),f.type==="attributes"&&f.target.parentNode&&Be.searchPseudoElements&&a(f.target.parentNode),f.type==="attributes"&&Xk(f.target)&&~$Y.indexOf(f.attributeName))if(f.attributeName==="class"&&SG(f.target)){var p=e0(qS(f.target)),m=p.prefix,v=p.iconName;f.target.setAttribute(WS,m||d),v&&f.target.setAttribute(YS,v)}else EG(f.target)&&i(f.target)})}}),la&&iv.observe(l,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function PG(){iv&&iv.disconnect()}function LG(e){var t=e.getAttribute("style"),n=[];return t&&(n=t.split(";").reduce(function(r,i){var o=i.split(":"),a=o[0],s=o.slice(1);return a&&s.length>0&&(r[a]=s.join(":").trim()),r},{})),n}function jG(e){var t=e.getAttribute("data-prefix"),n=e.getAttribute("data-icon"),r=e.innerText!==void 0?e.innerText.trim():"",i=e0(qS(e));return i.prefix||(i.prefix=os()),t&&n&&(i.prefix=t,i.iconName=n),i.iconName&&i.prefix||(i.prefix&&r.length>0&&(i.iconName=lG(i.prefix,e.innerText)||QS(i.prefix,X1(e.innerText))),!i.iconName&&Be.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(i.iconName=e.firstChild.data)),i}function MG(e){var t=Du(e.attributes).reduce(function(i,o){return i.name!=="class"&&i.name!=="style"&&(i[o.name]=o.value),i},{}),n=e.getAttribute("title"),r=e.getAttribute("data-fa-title-id");return Be.autoA11y&&(n?t["aria-labelledby"]="".concat(Be.replacementClass,"-title-").concat(r||Qf()):(t["aria-hidden"]="true",t.focusable="false")),t}function NG(){return{iconName:null,title:null,titleId:null,prefix:null,transform:fo,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function tP(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0},n=jG(e),r=n.iconName,i=n.prefix,o=n.rest,a=MG(e),s=ew("parseNodeAttributes",{},e),l=t.styleParser?LG(e):[];return Ie({iconName:r,title:e.getAttribute("title"),titleId:e.getAttribute("data-fa-title-id"),prefix:i,transform:fo,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:o,styles:l,attributes:a}},s)}var RG=Di.styles;function hI(e){var t=Be.autoReplaceSvg==="nest"?tP(e,{styleParser:!1}):tP(e);return~t.extra.classes.indexOf(ZD)?Xo("generateLayersText",e,t):Xo("generateSvgReplacementMutation",e,t)}var as=new Set;GS.map(function(e){as.add("fa-".concat(e))});Object.keys(Gf[Mt]).map(as.add.bind(as));Object.keys(Gf[en]).map(as.add.bind(as));as=Ah(as);function nP(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!la)return Promise.resolve();var n=At.documentElement.classList,r=function(f){return n.add("".concat(Hk,"-").concat(f))},i=function(f){return n.remove("".concat(Hk,"-").concat(f))},o=Be.autoFetchSvg?as:GS.map(function(d){return"fa-".concat(d)}).concat(Object.keys(RG));o.includes("fa")||o.push("fa");var a=[".".concat(ZD,":not([").concat(vl,"])")].concat(o.map(function(d){return".".concat(d,":not([").concat(vl,"])")})).join(", ");if(a.length===0)return Promise.resolve();var s=[];try{s=Du(e.querySelectorAll(a))}catch{}if(s.length>0)r("pending"),i("complete");else return Promise.resolve();var l=eE.begin("onTree"),c=s.reduce(function(d,f){try{var p=hI(f);p&&d.push(p)}catch(m){qD||m.name==="MissingIcon"&&console.error(m)}return d},[]);return new Promise(function(d,f){Promise.all(c).then(function(p){dI(p,function(){r("active"),r("complete"),i("pending"),typeof t=="function"&&t(),l(),d()})}).catch(function(p){l(),f(p)})})}function AG(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;hI(e).then(function(n){n&&dI([n],t)})}function DG(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=(t||{}).icon?t:tw(t||{}),i=n.mask;return i&&(i=(i||{}).icon?i:tw(i||{})),e(r,Ie(Ie({},n),{},{mask:i}))}}var IG=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.transform,i=r===void 0?fo:r,o=n.symbol,a=o===void 0?!1:o,s=n.mask,l=s===void 0?null:s,c=n.maskId,d=c===void 0?null:c,f=n.title,p=f===void 0?null:f,m=n.titleId,v=m===void 0?null:m,y=n.classes,x=y===void 0?[]:y,_=n.attributes,w=_===void 0?{}:_,S=n.styles,E=S===void 0?{}:S;if(t){var O=t.prefix,k=t.iconName,j=t.icon;return t0(Ie({type:"icon"},t),function(){return yl("beforeDOMElementCreation",{iconDefinition:t,params:n}),Be.autoA11y&&(p?w["aria-labelledby"]="".concat(Be.replacementClass,"-title-").concat(v||Qf()):(w["aria-hidden"]="true",w.focusable="false")),JS({icons:{main:nw(j),mask:l?nw(l.icon):{found:!1,width:null,height:null,icon:{}}},prefix:O,iconName:k,transform:Ie(Ie({},fo),i),symbol:a,title:p,maskId:d,titleId:v,extra:{attributes:w,styles:E,classes:x}})})}},FG={mixout:function(){return{icon:DG(IG)}},hooks:function(){return{mutationObserverCallbacks:function(n){return n.treeCallback=nP,n.nodeCallback=AG,n}}},provides:function(t){t.i2svg=function(n){var r=n.node,i=r===void 0?At:r,o=n.callback,a=o===void 0?function(){}:o;return nP(i,a)},t.generateSvgReplacementMutation=function(n,r){var i=r.iconName,o=r.title,a=r.titleId,s=r.prefix,l=r.transform,c=r.symbol,d=r.mask,f=r.maskId,p=r.extra;return new Promise(function(m,v){Promise.all([rw(i,s),d.iconName?rw(d.iconName,d.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(y){var x=VS(y,2),_=x[0],w=x[1];m([n,JS({icons:{main:_,mask:w},prefix:s,iconName:i,transform:l,symbol:c,maskId:f,title:o,titleId:a,extra:p,watchable:!0})])}).catch(v)})},t.generateAbstractIcon=function(n){var r=n.children,i=n.attributes,o=n.main,a=n.transform,s=n.styles,l=Xy(s);l.length>0&&(i.style=l);var c;return ZS(a)&&(c=Xo("generateAbstractTransformGrouping",{main:o,transform:a,containerWidth:o.width,iconWidth:o.width})),r.push(c||o.icon),{children:r,attributes:i}}}},$G={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 t0({type:"layer"},function(){yl("beforeDOMElementCreation",{assembler:n,params:r});var a=[];return n(function(s){Array.isArray(s)?s.map(function(l){a=a.concat(l.abstract)}):a=a.concat(s.abstract)}),[{tag:"span",attributes:{class:["".concat(Be.cssPrefix,"-layers")].concat(Ah(o)).join(" ")},children:a}]})}}}},UG={mixout:function(){return{counter:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.title,o=i===void 0?null:i,a=r.classes,s=a===void 0?[]:a,l=r.attributes,c=l===void 0?{}:l,d=r.styles,f=d===void 0?{}:d;return t0({type:"counter",content:n},function(){return yl("beforeDOMElementCreation",{content:n,params:r}),_G({content:n.toString(),title:o,extra:{attributes:c,styles:f,classes:["".concat(Be.cssPrefix,"-layers-counter")].concat(Ah(s))}})})}}}},BG={mixout:function(){return{text:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.transform,o=i===void 0?fo:i,a=r.title,s=a===void 0?null:a,l=r.classes,c=l===void 0?[]:l,d=r.attributes,f=d===void 0?{}:d,p=r.styles,m=p===void 0?{}:p;return t0({type:"text",content:n},function(){return yl("beforeDOMElementCreation",{content:n,params:r}),Kk({content:n,transform:Ie(Ie({},fo),o),title:s,extra:{attributes:f,styles:m,classes:["".concat(Be.cssPrefix,"-layers-text")].concat(Ah(c))}})})}}},provides:function(t){t.generateLayersText=function(n,r){var i=r.title,o=r.transform,a=r.extra,s=null,l=null;if(WD){var c=parseInt(getComputedStyle(n).fontSize,10),d=n.getBoundingClientRect();s=d.width/c,l=d.height/c}return Be.autoA11y&&!i&&(a.attributes["aria-hidden"]="true"),Promise.resolve([n,Kk({content:n.innerHTML,width:s,height:l,transform:o,title:i,extra:a,watchable:!0})])}}},zG=new RegExp('"',"ug"),rP=[1105920,1112319];function VG(e){var t=e.replace(zG,""),n=nG(t,0),r=n>=rP[0]&&n<=rP[1],i=t.length===2?t[0]===t[1]:!1;return{value:X1(i?t[0]:t),isSecondary:r||i}}function iP(e,t){var n="".concat(jY).concat(t.replace(":","-"));return new Promise(function(r,i){if(e.getAttribute(n)!==null)return r();var o=Du(e.children),a=o.filter(function(j){return j.getAttribute(Q1)===t})[0],s=is.getComputedStyle(e,t),l=s.getPropertyValue("font-family").match(DY),c=s.getPropertyValue("font-weight"),d=s.getPropertyValue("content");if(a&&!l)return e.removeChild(a),r();if(l&&d!=="none"&&d!==""){var f=s.getPropertyValue("content"),p=~["Sharp"].indexOf(l[2])?en:Mt,m=~["Solid","Regular","Light","Thin","Duotone","Brands","Kit"].indexOf(l[2])?qf[p][l[2].toLowerCase()]:IY[p][c],v=VG(f),y=v.value,x=v.isSecondary,_=l[0].startsWith("FontAwesome"),w=QS(m,y),S=w;if(_){var E=cG(y);E.iconName&&E.prefix&&(w=E.iconName,m=E.prefix)}if(w&&!x&&(!a||a.getAttribute(WS)!==m||a.getAttribute(YS)!==S)){e.setAttribute(n,S),a&&e.removeChild(a);var O=NG(),k=O.extra;k.attributes[Q1]=t,rw(w,m).then(function(j){var A=JS(Ie(Ie({},O),{},{icons:{main:j,mask:XS()},prefix:m,iconName:S,extra:k,watchable:!0})),U=At.createElementNS("http://www.w3.org/2000/svg","svg");t==="::before"?e.insertBefore(U,e.firstChild):e.appendChild(U),U.outerHTML=A.map(function(R){return Ih(R)}).join(` +`),e.removeAttribute(n),r()}).catch(i)}else r()}else r()})}function HG(e){return Promise.all([iP(e,"::before"),iP(e,"::after")])}function WG(e){return e.parentNode!==document.head&&!~NY.indexOf(e.tagName.toUpperCase())&&!e.getAttribute(Q1)&&(!e.parentNode||e.parentNode.tagName!=="svg")}function oP(e){if(la)return new Promise(function(t,n){var r=Du(e.querySelectorAll("*")).filter(WG).map(HG),i=eE.begin("searchPseudoElements");fI(),Promise.all(r).then(function(){i(),ow(),t()}).catch(function(){i(),ow(),n()})})}var YG={hooks:function(){return{mutationObserverCallbacks:function(n){return n.pseudoElementsCallback=oP,n}}},provides:function(t){t.pseudoElements2svg=function(n){var r=n.node,i=r===void 0?At:r;Be.searchPseudoElements&&oP(i)}}},aP=!1,GG={mixout:function(){return{dom:{unwatch:function(){fI(),aP=!0}}}},hooks:function(){return{bootstrap:function(){eP(ew("mutationObserverCallbacks",{}))},noAuto:function(){PG()},watch:function(n){var r=n.observeMutationsRoot;aP?ow():eP(ew("mutationObserverCallbacks",{observeMutationsRoot:r}))}}}},sP=function(t){var n={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return t.toLowerCase().split(" ").reduce(function(r,i){var o=i.toLowerCase().split("-"),a=o[0],s=o.slice(1).join("-");if(a&&s==="h")return r.flipX=!0,r;if(a&&s==="v")return r.flipY=!0,r;if(s=parseFloat(s),isNaN(s))return r;switch(a){case"grow":r.size=r.size+s;break;case"shrink":r.size=r.size-s;break;case"left":r.x=r.x-s;break;case"right":r.x=r.x+s;break;case"up":r.y=r.y-s;break;case"down":r.y=r.y+s;break;case"rotate":r.rotate=r.rotate+s;break}return r},n)},qG={mixout:function(){return{parse:{transform:function(n){return sP(n)}}}},hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-transform");return i&&(n.transform=sP(i)),n}}},provides:function(t){t.generateAbstractTransformGrouping=function(n){var r=n.main,i=n.transform,o=n.containerWidth,a=n.iconWidth,s={transform:"translate(".concat(o/2," 256)")},l="translate(".concat(i.x*32,", ").concat(i.y*32,") "),c="scale(".concat(i.size/16*(i.flipX?-1:1),", ").concat(i.size/16*(i.flipY?-1:1),") "),d="rotate(".concat(i.rotate," 0 0)"),f={transform:"".concat(l," ").concat(c," ").concat(d)},p={transform:"translate(".concat(a/2*-1," -256)")},m={outer:s,inner:f,path:p};return{tag:"g",attributes:Ie({},m.outer),children:[{tag:"g",attributes:Ie({},m.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:Ie(Ie({},r.icon.attributes),m.path)}]}]}}}},F_={x:0,y:0,width:"100%",height:"100%"};function lP(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 ZG(e){return e.tag==="g"?e.children:[e]}var KG={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-mask"),o=i?e0(i.split(" ").map(function(a){return a.trim()})):XS();return o.prefix||(o.prefix=os()),n.mask=o,n.maskId=r.getAttribute("data-fa-mask-id"),n}}},provides:function(t){t.generateAbstractMask=function(n){var r=n.children,i=n.attributes,o=n.main,a=n.mask,s=n.maskId,l=n.transform,c=o.width,d=o.icon,f=a.width,p=a.icon,m=qY({transform:l,containerWidth:f,iconWidth:c}),v={tag:"rect",attributes:Ie(Ie({},F_),{},{fill:"white"})},y=d.children?{children:d.children.map(lP)}:{},x={tag:"g",attributes:Ie({},m.inner),children:[lP(Ie({tag:d.tag,attributes:Ie(Ie({},d.attributes),m.path)},y))]},_={tag:"g",attributes:Ie({},m.outer),children:[x]},w="mask-".concat(s||Qf()),S="clip-".concat(s||Qf()),E={tag:"mask",attributes:Ie(Ie({},F_),{},{id:w,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[v,_]},O={tag:"defs",children:[{tag:"clipPath",attributes:{id:S},children:ZG(p)},E]};return r.push(O,{tag:"rect",attributes:Ie({fill:"currentColor","clip-path":"url(#".concat(S,")"),mask:"url(#".concat(w,")")},F_)}),{children:r,attributes:i}}}},QG={provides:function(t){var n=!1;is.matchMedia&&(n=is.matchMedia("(prefers-reduced-motion: reduce)").matches),t.missingIconAbstract=function(){var r=[],i={fill:"currentColor"},o={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};r.push({tag:"path",attributes:Ie(Ie({},i),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});var a=Ie(Ie({},o),{},{attributeName:"opacity"}),s={tag:"circle",attributes:Ie(Ie({},i),{},{cx:"256",cy:"364",r:"28"}),children:[]};return n||s.children.push({tag:"animate",attributes:Ie(Ie({},o),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:Ie(Ie({},a),{},{values:"1;0;1;1;0;1;"})}),r.push(s),r.push({tag:"path",attributes:Ie(Ie({},i),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:n?[]:[{tag:"animate",attributes:Ie(Ie({},a),{},{values:"1;0;0;0;0;1;"})}]}),n||r.push({tag:"path",attributes:Ie(Ie({},i),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:Ie(Ie({},a),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:r}}}},XG={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}}}},JG=[QY,FG,$G,UG,BG,YG,GG,qG,KG,QG,XG];fG(JG,{mixoutsTo:ei});ei.noAuto;ei.config;ei.library;ei.dom;var aw=ei.parse;ei.findIconDefinition;ei.toHtml;var eq=ei.icon;ei.layer;ei.text;ei.counter;var pI={exports:{}},tq="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",nq=tq,rq=nq;function mI(){}function gI(){}gI.resetWarningCache=mI;var iq=function(){function e(r,i,o,a,s,l){if(l!==rq){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:gI,resetWarningCache:mI};return n.PropTypes=n,n};pI.exports=iq();var oq=pI.exports;const N=oa(oq);function cP(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 Aa(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function sq(e,t){if(e==null)return{};var n=aq(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 sw(e){return lq(e)||cq(e)||uq(e)||dq()}function lq(e){if(Array.isArray(e))return lw(e)}function cq(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function uq(e,t){if(e){if(typeof e=="string")return lw(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 lw(e,t)}}function lw(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 yI(e,l)}),i=Object.keys(t.attributes||{}).reduce(function(l,c){var d=t.attributes[c];switch(c){case"class":l.attrs.className=d,delete t.attributes.class;break;case"style":l.attrs.style=gq(d);break;default:c.indexOf("aria-")===0||c.indexOf("data-")===0?l.attrs[c.toLowerCase()]=d:l.attrs[vI(c)]=d}return l},{attrs:{}}),o=n.style,a=o===void 0?{}:o,s=sq(n,pq);return i.attrs.style=Aa(Aa({},i.attrs.style),a),e.apply(void 0,[t.tag,Aa(Aa({},i.attrs),s)].concat(sw(r)))}var _I=!1;try{_I=!0}catch{}function vq(){if(!_I&&console&&typeof console.error=="function"){var e;(e=console).error.apply(e,arguments)}}function uP(e){if(e&&ov(e)==="object"&&e.prefix&&e.iconName&&e.icon)return e;if(aw.icon)return aw.icon(e);if(e===null)return null;if(e&&ov(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 $_(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?jc({},e,t):{}}var Ne=Y.forwardRef(function(e,t){var n=e.icon,r=e.mask,i=e.symbol,o=e.className,a=e.title,s=e.titleId,l=e.maskId,c=uP(n),d=$_("classes",[].concat(sw(fq(e)),sw(o.split(" ")))),f=$_("transform",typeof e.transform=="string"?aw.transform(e.transform):e.transform),p=$_("mask",uP(r)),m=eq(c,Aa(Aa(Aa(Aa({},d),f),p),{},{symbol:i,title:a,titleId:s,maskId:l}));if(!m)return vq("Could not find icon",c),null;var v=m.abstract,y={ref:t};return Object.keys(e).forEach(function(x){Ne.defaultProps.hasOwnProperty(x)||(y[x]=e[x])}),yq(v[0],y)});Ne.displayName="FontAwesomeIcon";Ne.propTypes={beat:N.bool,border:N.bool,beatFade:N.bool,bounce:N.bool,className:N.string,fade:N.bool,flash:N.bool,mask:N.oneOfType([N.object,N.array,N.string]),maskId:N.string,fixedWidth:N.bool,inverse:N.bool,flip:N.oneOf([!0,!1,"horizontal","vertical","both"]),icon:N.oneOfType([N.object,N.array,N.string]),listItem:N.bool,pull:N.oneOf(["right","left"]),pulse:N.bool,rotation:N.oneOf([0,90,180,270]),shake:N.bool,size:N.oneOf(["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:N.bool,spinPulse:N.bool,spinReverse:N.bool,symbol:N.oneOfType([N.bool,N.string]),title:N.string,titleId:N.string,transform:N.oneOfType([N.string,N.object]),swapOpacity:N.bool};Ne.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 yq=yI.bind(null,Y.createElement),bI={exports:{}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames -*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i0?"".concat(e,"px"):null}function bq(){return document.body.clientWidth0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Sq;return t?e.split(" ").map(function(n){return t[n]||n}).join(" "):e}function gs(e,t){var n={};return Object.keys(e).forEach(function(r){t.indexOf(r)===-1&&(n[r]=e[r])}),n}function xI(e,t){for(var n=Array.isArray(t)?t:[t],r=n.length,i,o={};r>0;)r-=1,i=n[r],o[i]=e[i];return o}var dP={};function cw(e){dP[e]||(typeof console<"u"&&console.error(e),dP[e]=!0)}function SI(e,t){return function(r,i,o){r[i]!==null&&typeof r[i]<"u"&&cw('"'.concat(i,'" property of "').concat(o,`" has been deprecated. -`).concat(t));for(var a=arguments.length,s=new Array(a>3?a-3:0),l=3;l"u"?"undefined":ou(window))==="object"&&window.Element||function(){};function nE(e,t,n){if(!(e[t]instanceof Eq))return new Error("Invalid prop `"+t+"` supplied to `"+n+"`. Expected prop to be an instance of Element. Validation failed.")}var au=N.oneOfType([N.string,N.func,nE,N.shape({current:N.any})]),it=N.oneOfType([N.func,N.string,N.shape({$$typeof:N.symbol,render:N.func}),N.arrayOf(N.oneOfType([N.func,N.string,N.shape({$$typeof:N.symbol,render:N.func})]))]),av={Fade:150,Collapse:350,Modal:300,Carousel:600,Offcanvas:300},sv=["in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","onEnter","onEntering","onEntered","onExit","onExiting","onExited"],sm={ENTERING:"entering",ENTERED:"entered",EXITING:"exiting",EXITED:"exited"},_t={esc:27,space:32,enter:13,tab:9,up:38,down:40,home:36,end:35,n:78,p:80},Tq=["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"],rE=!!(typeof window<"u"&&window.document&&window.document.createElement);function Oq(e){return e&&ou(e)==="object"?"current"in e:!1}function EI(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}function uw(e){var t=ou(e);return e!=null&&(t==="object"||t==="function")}function fP(e){var t=ou(e),n=0/0;if(t==="number")return e;if(t==="symbol"||t==="object"&&EI(e)==="[object Symbol]")return n;if(uw(e)){var r=typeof e.valueOf=="function"?e.valueOf():e;e=uw(r)?"".concat(r):r}if(t!=="string")return e===0?e:+e;e=e.replace(/^\s+|\s+$/g,"");var i=/^0b[01]+$/i.test(e);return i||/^0o[0-7]+$/i.test(e)?parseInt(e.slice(2),i?2:8):/^[-+]0x[0-9a-f]+$/i.test(e)?n:+e}function Cq(e){if(!uw(e))return!1;var t=EI(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object Proxy]"}function kq(e){if(Oq(e))return e.current;if(Cq(e))return e();if(typeof e=="string"&&rE){var t=document.querySelectorAll(e);if(t.length||(t=document.querySelectorAll("#".concat(e))),!t.length)throw new Error("The target '".concat(e,"' could not be identified in the dom, tip: check spelling"));return t}return e}function hP(e){return e===null?!1:Array.isArray(e)||rE&&typeof e.length=="number"}function Xf(e,t){var n=kq(e);return t?hP(n)?n:n===null?[]:[n]:hP(n)?n[0]:n}var Pq=["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"])'],Lq=["className","cssModule","noGutters","tag","widths"];function dw(){return dw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Mq(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Nq=["xs","sm","md","lg","xl","xxl"],ec=N.oneOfType([N.number,N.string]),Rq={tag:it,noGutters:SI(N.bool,"Please use Bootstrap 5 gutter utility classes. https://getbootstrap.com/docs/5.0/layout/gutters/"),className:N.string,cssModule:N.object,xs:ec,sm:ec,md:ec,lg:ec,xl:ec,xxl:ec,widths:N.array};function gr(e){var t=e.className,n=e.cssModule,r=e.noGutters,i=e.tag,o=i===void 0?"div":i,a=e.widths,s=a===void 0?Nq:a,l=jq(e,Lq),c=[];s.forEach(function(f,p){var m=e[f];if(delete l[f],!!m){var v=!p;c.push(v?"row-cols-".concat(m):"row-cols-".concat(f,"-").concat(m))}});var d=Ve(We(t,r?"gx-0":null,"row",c),n);return Y.createElement(o,dw({},l,{className:d}))}gr.propTypes=Rq;var Aq=["expand","className","cssModule","light","dark","fixed","sticky","color","container","tag","children"];function fw(){return fw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Iq(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Fq={children:N.node,className:N.string,color:N.string,container:N.oneOfType([N.bool,N.string]),cssModule:N.object,dark:N.bool,expand:N.oneOfType([N.bool,N.string]),fixed:N.string,light:N.bool,role:N.string,sticky:N.string,tag:it},$q=function(t){return t===!1?!1:t===!0||t==="xs"?"navbar-expand":"navbar-expand-".concat(t)};function TI(e){var t,n=e.expand,r=n===void 0?!1:n,i=e.className,o=e.cssModule,a=e.light,s=e.dark,l=e.fixed,c=e.sticky,d=e.color,f=e.container,p=f===void 0?"fluid":f,m=e.tag,v=m===void 0?"nav":m,y=e.children,x=Dq(e,Aq),_=Ve(We(i,"navbar",$q(r),(t={"navbar-light":a,"navbar-dark":s},U_(t,"bg-".concat(d),d),U_(t,"fixed-".concat(l),l),U_(t,"sticky-".concat(c),c),t)),o),w=p&&p===!0?"container":"container-".concat(p);return Y.createElement(v,fw({},x,{className:_}),p?Y.createElement("div",{className:w},y):y)}TI.propTypes=Fq;var Uq=["className","cssModule","tag"];function hw(){return hw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function zq(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Vq={className:N.string,cssModule:N.object,tag:it};function OI(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"a":r,o=Bq(e,Uq),a=Ve(We(t,"navbar-brand"),n);return Y.createElement(i,hw({},o,{className:a}))}OI.propTypes=Vq;var Hq=["className","cssModule","children","tag"];function pw(){return pw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function qq(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Zq={className:N.string,cssModule:N.object,tag:it,type:N.string,children:N.node};function CI(e){var t=e.className,n=e.cssModule,r=e.children,i=e.tag,o=i===void 0?"button":i,a=Gq(e,Hq),s=Ve(We(t,"navbar-toggler"),n);return Y.createElement(o,pw({"aria-label":"Toggle navigation"},Wq({type:"button"},a),{className:s}),r||Y.createElement("span",{className:Ve("navbar-toggler-icon",n)}))}CI.propTypes=Zq;var Kq=["className","cssModule","tabs","pills","vertical","horizontal","justified","fill","navbar","card","tag"];function mw(){return mw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Xq(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Jq={card:N.bool,className:N.string,cssModule:N.object,fill:N.bool,horizontal:N.oneOf(["center","end"]),justified:N.bool,navbar:N.bool,pills:N.bool,tabs:N.bool,tag:it,vertical:N.oneOfType([N.bool,N.string])},e4=function(t){return t===!1?!1:t===!0||t==="xs"?"flex-column":"flex-".concat(t,"-column")};function iE(e){var t=e.className,n=e.cssModule,r=e.tabs,i=e.pills,o=e.vertical,a=o===void 0?!1:o,s=e.horizontal,l=e.justified,c=e.fill,d=e.navbar,f=e.card,p=e.tag,m=p===void 0?"ul":p,v=Qq(e,Kq),y=Ve(We(t,d?"navbar-nav":"nav",s?"justify-content-".concat(s):!1,e4(a),{"nav-tabs":r,"card-header-tabs":f&&r,"nav-pills":i,"card-header-pills":f&&i,"nav-justified":l,"nav-fill":c}),n);return Y.createElement(m,mw({},v,{className:y}))}iE.propTypes=Jq;var t4=["className","cssModule","active","tag"];function gw(){return gw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function r4(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var i4={active:N.bool,className:N.string,cssModule:N.object,tag:it};function oE(e){var t=e.className,n=e.cssModule,r=e.active,i=e.tag,o=i===void 0?"li":i,a=n4(e,t4),s=Ve(We(t,"nav-item",r?"active":!1),n);return Y.createElement(o,gw({},a,{className:s}))}oE.propTypes=i4;function vw(e){"@babel/helpers - typeof";return vw=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},vw(e)}var o4=["className","cssModule","active","tag","innerRef"];function yw(){return yw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function s4(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 l4(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mP(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function lv(e){return lv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},lv(e)}var p4={active:N.bool,className:N.string,cssModule:N.object,disabled:N.bool,href:N.any,innerRef:N.oneOfType([N.object,N.func,N.string]),onClick:N.func,tag:it},PI=function(e){u4(n,e);var t=d4(n);function n(r){var i;return l4(this,n),i=t.call(this,r),i.onClick=i.onClick.bind(kI(i)),i}return c4(n,[{key:"onClick",value:function(i){if(this.props.disabled){i.preventDefault();return}this.props.href==="#"&&i.preventDefault(),this.props.onClick&&this.props.onClick(i)}},{key:"render",value:function(){var i=this.props,o=i.className,a=i.cssModule,s=i.active,l=i.tag,c=l===void 0?"a":l,d=i.innerRef,f=a4(i,o4),p=Ve(We(o,"nav-link",{disabled:f.disabled,active:s}),a);return Y.createElement(c,yw({},f,{ref:d,onClick:this.onClick,className:p}))}}]),n}(Y.Component);PI.propTypes=p4;const LI=PI;var m4=["className","cssModule","variant","innerRef"];function bw(){return bw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function _4(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var b4={active:N.bool,"aria-label":N.string,onClick:N.func,variant:N.oneOf(["white"]),className:N.string,cssModule:N.object,innerRef:N.oneOfType([N.object,N.string,N.func])};function jI(e){var t=e.className;e.cssModule;var n=e.variant,r=e.innerRef,i=y4(e,m4),o=Ve(We(t,"btn-close",n&&"btn-close-".concat(n)));return Y.createElement("button",bw({ref:r,type:"button",className:o},g4({"aria-label":"close"},i)))}jI.propTypes=b4;var w4=["active","aria-label","block","className","close","cssModule","color","outline","size","tag","innerRef"];function ww(){return ww=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function S4(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var E4={active:N.bool,"aria-label":N.string,block:N.bool,children:N.node,className:N.string,cssModule:N.object,close:N.bool,color:N.string,disabled:N.bool,innerRef:N.oneOfType([N.object,N.func,N.string]),onClick:N.func,outline:N.bool,size:N.string,tag:it};function yt(e){var t=I.useCallback(function(w){if(e.disabled){w.preventDefault();return}if(e.onClick)return e.onClick(w)},[e.onClick,e.disabled]),n=e.active,r=e["aria-label"],i=e.block,o=e.className,a=e.close,s=e.cssModule,l=e.color,c=l===void 0?"secondary":l,d=e.outline,f=e.size,p=e.tag,m=p===void 0?"button":p,v=e.innerRef,y=x4(e,w4);if(a)return Y.createElement(jI,y);var x="btn".concat(d?"-outline":"","-").concat(c),_=Ve(We(o,"btn",x,f?"btn-".concat(f):!1,i?"d-block w-100":!1,{active:n,disabled:e.disabled}),s);return y.href&&m==="button"&&(m="a"),Y.createElement(m,ww({type:m==="button"&&y.onClick?"button":void 0},y,{className:_,ref:v,onClick:t,"aria-label":r}))}yt.propTypes=E4;var MI=I.createContext(),NI=I.createContext();function vP(e){var t=e.children,n=I.useState(null),r=n[0],i=n[1],o=I.useRef(!1);I.useEffect(function(){return function(){o.current=!0}},[]);var a=I.useCallback(function(s){o.current||i(s)},[]);return I.createElement(MI.Provider,{value:r},I.createElement(NI.Provider,{value:a},t))}var RI=function(t){return Array.isArray(t)?t[0]:t},AI=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=Yr(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function I4(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];!fi(o)||!bo(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function F4(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,c){return l[c]="",l},{});!fi(i)||!bo(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const $4={name:"applyStyles",enabled:!0,phase:"write",fn:I4,effect:F4,requires:["computeStyles"]};function mo(e){return e.split("-")[0]}var rl=Math.max,cv=Math.min,lu=Math.round;function Sw(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function FI(){return!/^((?!chrome|android).)*safari/i.test(Sw())}function cu(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&fi(e)&&(i=e.offsetWidth>0&&lu(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&lu(r.height)/e.offsetHeight||1);var a=_l(e)?Yr(e):window,s=a.visualViewport,l=!FI()&&n,c=(r.left+(l&&s?s.offsetLeft:0))/i,d=(r.top+(l&&s?s.offsetTop:0))/o,f=r.width/i,p=r.height/o;return{width:f,height:p,top:d,right:c+f,bottom:d+p,left:c,x:c,y:d}}function lE(e){var t=cu(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 $I(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&sE(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Jo(e){return Yr(e).getComputedStyle(e)}function U4(e){return["table","td","th"].indexOf(bo(e))>=0}function vs(e){return((_l(e)?e.ownerDocument:e.document)||window.document).documentElement}function n0(e){return bo(e)==="html"?e:e.assignedSlot||e.parentNode||(sE(e)?e.host:null)||vs(e)}function wP(e){return!fi(e)||Jo(e).position==="fixed"?null:e.offsetParent}function B4(e){var t=/firefox/i.test(Sw()),n=/Trident/i.test(Sw());if(n&&fi(e)){var r=Jo(e);if(r.position==="fixed")return null}var i=n0(e);for(sE(i)&&(i=i.host);fi(i)&&["html","body"].indexOf(bo(i))<0;){var o=Jo(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 $h(e){for(var t=Yr(e),n=wP(e);n&&U4(n)&&Jo(n).position==="static";)n=wP(n);return n&&(bo(n)==="html"||bo(n)==="body"&&Jo(n).position==="static")?t:n||B4(e)||t}function cE(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function sf(e,t,n){return rl(e,cv(t,n))}function z4(e,t,n){var r=sf(e,t,n);return r>n?n:r}function UI(){return{top:0,right:0,bottom:0,left:0}}function BI(e){return Object.assign({},UI(),e)}function zI(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var V4=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,BI(typeof t!="number"?t:zI(t,Fh))};function H4(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=mo(n.placement),l=cE(s),c=[Lr,_i].indexOf(s)>=0,d=c?"height":"width";if(!(!o||!a)){var f=V4(i.padding,n),p=lE(o),m=l==="y"?Pr:Lr,v=l==="y"?yi:_i,y=n.rects.reference[d]+n.rects.reference[l]-a[l]-n.rects.popper[d],x=a[l]-n.rects.reference[l],_=$h(o),w=_?l==="y"?_.clientHeight||0:_.clientWidth||0:0,S=y/2-x/2,E=f[m],O=w-p[d]-f[v],k=w/2-p[d]/2+S,j=sf(E,k,O),A=l;n.modifiersData[r]=(t={},t[A]=j,t.centerOffset=j-k,t)}}function W4(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)||$I(t.elements.popper,i)&&(t.elements.arrow=i))}const Y4={name:"arrow",enabled:!0,phase:"main",fn:H4,effect:W4,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function uu(e){return e.split("-")[1]}var G4={top:"auto",right:"auto",bottom:"auto",left:"auto"};function q4(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:lu(n*i)/i||0,y:lu(r*i)/i||0}}function xP(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,f=e.isFixed,p=a.x,m=p===void 0?0:p,v=a.y,y=v===void 0?0:v,x=typeof d=="function"?d({x:m,y}):{x:m,y};m=x.x,y=x.y;var _=a.hasOwnProperty("x"),w=a.hasOwnProperty("y"),S=Lr,E=Pr,O=window;if(c){var k=$h(n),j="clientHeight",A="clientWidth";if(k===Yr(n)&&(k=vs(n),Jo(k).position!=="static"&&s==="absolute"&&(j="scrollHeight",A="scrollWidth")),k=k,i===Pr||(i===Lr||i===_i)&&o===Jf){E=yi;var U=f&&k===O&&O.visualViewport?O.visualViewport.height:k[j];y-=U-r.height,y*=l?1:-1}if(i===Lr||(i===Pr||i===yi)&&o===Jf){S=_i;var R=f&&k===O&&O.visualViewport?O.visualViewport.width:k[A];m-=R-r.width,m*=l?1:-1}}var V=Object.assign({position:s},c&&G4),W=d===!0?q4({x:m,y},Yr(n)):{x:m,y};if(m=W.x,y=W.y,l){var X;return Object.assign({},V,(X={},X[E]=w?"0":"",X[S]=_?"0":"",X.transform=(O.devicePixelRatio||1)<=1?"translate("+m+"px, "+y+"px)":"translate3d("+m+"px, "+y+"px, 0)",X))}return Object.assign({},V,(t={},t[E]=w?y+"px":"",t[S]=_?m+"px":"",t.transform="",t))}function Z4(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,c={placement:mo(t.placement),variation:uu(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,xP(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,xP(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 K4={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Z4,data:{}};var lm={passive:!0};function Q4(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=Yr(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(d){d.addEventListener("scroll",n.update,lm)}),s&&l.addEventListener("resize",n.update,lm),function(){o&&c.forEach(function(d){d.removeEventListener("scroll",n.update,lm)}),s&&l.removeEventListener("resize",n.update,lm)}}const X4={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Q4,data:{}};var J4={left:"right",right:"left",bottom:"top",top:"bottom"};function rg(e){return e.replace(/left|right|bottom|top/g,function(t){return J4[t]})}var eZ={start:"end",end:"start"};function SP(e){return e.replace(/start|end/g,function(t){return eZ[t]})}function uE(e){var t=Yr(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function dE(e){return cu(vs(e)).left+uE(e).scrollLeft}function tZ(e,t){var n=Yr(e),r=vs(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var c=FI();(c||!c&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+dE(e),y:l}}function nZ(e){var t,n=vs(e),r=uE(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=rl(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=rl(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+dE(e),l=-r.scrollTop;return Jo(i||n).direction==="rtl"&&(s+=rl(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function fE(e){var t=Jo(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function VI(e){return["html","body","#document"].indexOf(bo(e))>=0?e.ownerDocument.body:fi(e)&&fE(e)?e:VI(n0(e))}function lf(e,t){var n;t===void 0&&(t=[]);var r=VI(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Yr(r),a=i?[o].concat(o.visualViewport||[],fE(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(lf(n0(a)))}function Ew(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function rZ(e,t){var n=cu(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 EP(e,t,n){return t===DI?Ew(tZ(e,n)):_l(t)?rZ(t,n):Ew(nZ(vs(e)))}function iZ(e){var t=lf(n0(e)),n=["absolute","fixed"].indexOf(Jo(e).position)>=0,r=n&&fi(e)?$h(e):e;return _l(r)?t.filter(function(i){return _l(i)&&$I(i,r)&&bo(i)!=="body"}):[]}function oZ(e,t,n,r){var i=t==="clippingParents"?iZ(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,c){var d=EP(e,c,r);return l.top=rl(d.top,l.top),l.right=cv(d.right,l.right),l.bottom=cv(d.bottom,l.bottom),l.left=rl(d.left,l.left),l},EP(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function HI(e){var t=e.reference,n=e.element,r=e.placement,i=r?mo(r):null,o=r?uu(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Pr:l={x:a,y:t.y-n.height};break;case yi:l={x:a,y:t.y+t.height};break;case _i:l={x:t.x+t.width,y:s};break;case Lr:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var c=i?cE(i):null;if(c!=null){var d=c==="y"?"height":"width";switch(o){case su:l[c]=l[c]-(t[d]/2-n[d]/2);break;case Jf:l[c]=l[c]+(t[d]/2-n[d]/2);break}}return l}function eh(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?T4:s,c=n.rootBoundary,d=c===void 0?DI:c,f=n.elementContext,p=f===void 0?_d:f,m=n.altBoundary,v=m===void 0?!1:m,y=n.padding,x=y===void 0?0:y,_=BI(typeof x!="number"?x:zI(x,Fh)),w=p===_d?O4:_d,S=e.rects.popper,E=e.elements[v?w:p],O=oZ(_l(E)?E:E.contextElement||vs(e.elements.popper),l,d,a),k=cu(e.elements.reference),j=HI({reference:k,element:S,strategy:"absolute",placement:i}),A=Ew(Object.assign({},S,j)),U=p===_d?A:k,R={top:O.top-U.top+_.top,bottom:U.bottom-O.bottom+_.bottom,left:O.left-U.left+_.left,right:U.right-O.right+_.right},V=e.modifiersData.offset;if(p===_d&&V){var W=V[i];Object.keys(R).forEach(function(X){var G=[_i,yi].indexOf(X)>=0?1:-1,Z=[Pr,yi].indexOf(X)>=0?"y":"x";R[X]+=W[Z]*G})}return R}function aZ(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?II:l,d=uu(r),f=d?s?bP:bP.filter(function(v){return uu(v)===d}):Fh,p=f.filter(function(v){return c.indexOf(v)>=0});p.length===0&&(p=f);var m=p.reduce(function(v,y){return v[y]=eh(e,{placement:y,boundary:i,rootBoundary:o,padding:a})[mo(y)],v},{});return Object.keys(m).sort(function(v,y){return m[v]-m[y]})}function sZ(e){if(mo(e)===aE)return[];var t=rg(e);return[SP(e),t,SP(t)]}function lZ(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,c=n.padding,d=n.boundary,f=n.rootBoundary,p=n.altBoundary,m=n.flipVariations,v=m===void 0?!0:m,y=n.allowedAutoPlacements,x=t.options.placement,_=mo(x),w=_===x,S=l||(w||!v?[rg(x)]:sZ(x)),E=[x].concat(S).reduce(function(q,re){return q.concat(mo(re)===aE?aZ(t,{placement:re,boundary:d,rootBoundary:f,padding:c,flipVariations:v,allowedAutoPlacements:y}):re)},[]),O=t.rects.reference,k=t.rects.popper,j=new Map,A=!0,U=E[0],R=0;R=0,Z=G?"width":"height",ne=eh(t,{placement:V,boundary:d,rootBoundary:f,altBoundary:p,padding:c}),le=G?X?_i:Lr:X?yi:Pr;O[Z]>k[Z]&&(le=rg(le));var K=rg(le),F=[];if(o&&F.push(ne[W]<=0),s&&F.push(ne[le]<=0,ne[K]<=0),F.every(function(q){return q})){U=V,A=!1;break}j.set(V,F)}if(A)for(var D=v?3:1,H=function(re){var ae=E.find(function(he){var C=j.get(he);if(C)return C.slice(0,re).every(function(M){return M})});if(ae)return U=ae,"break"},ie=D;ie>0;ie--){var z=H(ie);if(z==="break")break}t.placement!==U&&(t.modifiersData[r]._skip=!0,t.placement=U,t.reset=!0)}}const cZ={name:"flip",enabled:!0,phase:"main",fn:lZ,requiresIfExists:["offset"],data:{_skip:!1}};function TP(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 OP(e){return[Pr,_i,yi,Lr].some(function(t){return e[t]>=0})}function uZ(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=eh(t,{elementContext:"reference"}),s=eh(t,{altBoundary:!0}),l=TP(a,r),c=TP(s,i,o),d=OP(l),f=OP(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":f})}const dZ={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:uZ};function fZ(e,t,n){var r=mo(e),i=[Lr,Pr].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Lr,_i].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function hZ(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=II.reduce(function(d,f){return d[f]=fZ(f,t.rects,o),d},{}),s=a[t.placement],l=s.x,c=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}const pZ={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:hZ};function mZ(e){var t=e.state,n=e.name;t.modifiersData[n]=HI({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const gZ={name:"popperOffsets",enabled:!0,phase:"read",fn:mZ,data:{}};function vZ(e){return e==="x"?"y":"x"}function yZ(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,c=n.rootBoundary,d=n.altBoundary,f=n.padding,p=n.tether,m=p===void 0?!0:p,v=n.tetherOffset,y=v===void 0?0:v,x=eh(t,{boundary:l,rootBoundary:c,padding:f,altBoundary:d}),_=mo(t.placement),w=uu(t.placement),S=!w,E=cE(_),O=vZ(E),k=t.modifiersData.popperOffsets,j=t.rects.reference,A=t.rects.popper,U=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,R=typeof U=="number"?{mainAxis:U,altAxis:U}:Object.assign({mainAxis:0,altAxis:0},U),V=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,W={x:0,y:0};if(k){if(o){var X,G=E==="y"?Pr:Lr,Z=E==="y"?yi:_i,ne=E==="y"?"height":"width",le=k[E],K=le+x[G],F=le-x[Z],D=m?-A[ne]/2:0,H=w===su?j[ne]:A[ne],ie=w===su?-A[ne]:-j[ne],z=t.elements.arrow,q=m&&z?lE(z):{width:0,height:0},re=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:UI(),ae=re[G],he=re[Z],C=sf(0,j[ne],q[ne]),M=S?j[ne]/2-D-C-ae-R.mainAxis:H-C-ae-R.mainAxis,$=S?-j[ne]/2+D+C+he+R.mainAxis:ie+C+he+R.mainAxis,J=t.elements.arrow&&$h(t.elements.arrow),ee=J?E==="y"?J.clientTop||0:J.clientLeft||0:0,se=(X=V==null?void 0:V[E])!=null?X:0,ge=le+M-se-ee,Me=le+$-se,ue=sf(m?cv(K,ge):K,le,m?rl(F,Me):F);k[E]=ue,W[E]=ue-le}if(s){var me,_e=E==="x"?Pr:Lr,Se=E==="x"?yi:_i,ke=k[O],Ce=O==="y"?"height":"width",je=ke+x[_e],ce=ke-x[Se],fe=[Pr,Lr].indexOf(_)!==-1,ye=(me=V==null?void 0:V[O])!=null?me:0,ve=fe?je:ke-j[Ce]-A[Ce]-ye+R.altAxis,xe=fe?ke+j[Ce]+A[Ce]-ye-R.altAxis:ce,Le=m&&fe?z4(ve,ke,xe):sf(m?ve:je,ke,m?xe:ce);k[O]=Le,W[O]=Le-ke}t.modifiersData[r]=W}}const _Z={name:"preventOverflow",enabled:!0,phase:"main",fn:yZ,requiresIfExists:["offset"]};function bZ(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function wZ(e){return e===Yr(e)||!fi(e)?uE(e):bZ(e)}function xZ(e){var t=e.getBoundingClientRect(),n=lu(t.width)/e.offsetWidth||1,r=lu(t.height)/e.offsetHeight||1;return n!==1||r!==1}function SZ(e,t,n){n===void 0&&(n=!1);var r=fi(t),i=fi(t)&&xZ(t),o=vs(t),a=cu(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((bo(t)!=="body"||fE(o))&&(s=wZ(t)),fi(t)?(l=cu(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=dE(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function EZ(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function TZ(e){var t=EZ(e);return D4.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function OZ(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function CZ(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 CP={placement:"bottom",modifiers:[],strategy:"absolute"};function kP(){for(var e=arguments.length,t=new Array(e),n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function qZ(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 ZZ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PP(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function uv(e){return uv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},uv(e)}var tK={a11y:N.bool,disabled:N.bool,direction:N.oneOf(["up","down","start","end","left","right"]),group:N.bool,isOpen:N.bool,nav:N.bool,active:N.bool,size:N.string,tag:it,toggle:N.func,children:N.node,className:N.string,cssModule:N.object,dropup:N.bool,inNavbar:N.bool,setActiveFromChild:N.bool,menuRole:N.oneOf(["listbox","menu"])},nK={a11y:!0,isOpen:!1,direction:"down",nav:!1,active:!1,inNavbar:!1,setActiveFromChild:!1},rK=[_t.space,_t.enter,_t.up,_t.down,_t.end,_t.home],r0=function(e){QZ(n,e);var t=XZ(n);function n(r){var i;return ZZ(this,n),i=t.call(this,r),i.addEvents=i.addEvents.bind(Sa(i)),i.handleDocumentClick=i.handleDocumentClick.bind(Sa(i)),i.handleKeyDown=i.handleKeyDown.bind(Sa(i)),i.removeEvents=i.removeEvents.bind(Sa(i)),i.toggle=i.toggle.bind(Sa(i)),i.handleMenuRef=i.handleMenuRef.bind(Sa(i)),i.handleToggleRef=i.handleToggleRef.bind(Sa(i)),i.containerRef=Y.createRef(),i.menuRef=Y.createRef(),i.toggleRef=Y.createRef(),i}return KZ(n,[{key:"componentDidMount",value:function(){this.handleProps()}},{key:"componentDidUpdate",value:function(i){this.props.isOpen!==i.isOpen&&this.handleProps()}},{key:"componentWillUnmount",value:function(){this.removeEvents()}},{key:"handleMenuRef",value:function(i){this.menuRef.current=i}},{key:"handleToggleRef",value:function(i){this.toggleRef.current=i}},{key:"handleDocumentClick",value:function(i){if(!(i&&(i.which===3||i.type==="keyup"&&i.which!==_t.tab))){var o=this.getContainer(),a=this.getMenu(),s=this.getToggle(),l=s.contains(i.target),c=a&&a.contains(i.target)&&a!==i.target,d=!1;o&&(d=o.classList.contains("input-group")&&o.classList.contains("dropdown")&&i.target.tagName==="INPUT"),!((l&&!d||c)&&(i.type!=="keyup"||i.which===_t.tab))&&this.toggle(i)}}},{key:"handleKeyDown",value:function(i){var o=this,a=i.target.getAttribute("role")==="menuitem"||i.target.getAttribute("role")==="option",s=this.getMenuCtrl()===i.target,l=_t.tab===i.which;if(!(/input|textarea/i.test(i.target.tagName)||l&&!this.props.a11y||l&&!(a||s))&&((rK.indexOf(i.which)!==-1||i.which>=48&&i.which<=90)&&i.preventDefault(),!this.props.disabled)){if(s)if([_t.space,_t.enter,_t.up,_t.down].indexOf(i.which)>-1)this.props.isOpen||this.toggle(i),setTimeout(function(){var w;return(w=o.getMenuItems()[0])===null||w===void 0?void 0:w.focus()});else if(this.props.isOpen&&l){var c;i.preventDefault(),(c=this.getMenuItems()[0])===null||c===void 0||c.focus()}else this.props.isOpen&&i.which===_t.esc&&this.toggle(i);if(this.props.isOpen&&a){if([_t.tab,_t.esc].indexOf(i.which)>-1)this.toggle(i),this.getMenuCtrl().focus();else if([_t.space,_t.enter].indexOf(i.which)>-1)i.target.click(),this.getMenuCtrl().focus();else if([_t.down,_t.up].indexOf(i.which)>-1||[_t.n,_t.p].indexOf(i.which)>-1&&i.ctrlKey){var d=this.getMenuItems(),f=d.indexOf(i.target);_t.up===i.which||_t.p===i.which&&i.ctrlKey?f=f!==0?f-1:d.length-1:(_t.down===i.which||_t.n===i.which&&i.ctrlKey)&&(f=f===d.length-1?0:f+1),d[f].focus()}else if(_t.end===i.which){var p=this.getMenuItems();p[p.length-1].focus()}else if(_t.home===i.which){var m=this.getMenuItems();m[0].focus()}else if(i.which>=48&&i.which<=90)for(var v=this.getMenuItems(),y=String.fromCharCode(i.which).toLowerCase(),x=0;x=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function aK(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 sK(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function LP(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.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},dv(e)}var hK={children:N.node,active:N.bool,disabled:N.bool,divider:N.bool,tag:it,header:N.bool,onClick:N.func,className:N.string,cssModule:N.object,toggle:N.bool,text:N.bool},hE=function(e){cK(n,e);var t=uK(n);function n(r){var i;return sK(this,n),i=t.call(this,r),i.onClick=i.onClick.bind(jw(i)),i.getTabIndex=i.getTabIndex.bind(jw(i)),i}return lK(n,[{key:"onClick",value:function(i){var o,a=this.props,s=a.disabled,l=a.header,c=a.divider,d=a.text;if(s||l||c||d){i.preventDefault();return}this.props.onClick&&this.props.onClick(i),(!((o=this.props.toggle)!==null&&o!==void 0)||o)&&this.context.toggle(i)}},{key:"getRole",value:function(){return this.context.menuRole==="listbox"?"option":"menuitem"}},{key:"getTabIndex",value:function(){var i=this.props,o=i.disabled,a=i.header,s=i.divider,l=i.text;return o||a||s||l?"-1":"0"}},{key:"render",value:function(){var i=this.getTabIndex(),o=i>-1?this.getRole():void 0,a=gs(this.props,["toggle"]),s=a.className,l=a.cssModule,c=a.divider,d=a.tag,f=d===void 0?"button":d,p=a.header,m=a.active,v=a.text,y=oK(a,iK),x=Ve(We(s,{disabled:y.disabled,"dropdown-item":!c&&!p&&!v,active:m,"dropdown-header":p,"dropdown-divider":c,"dropdown-item-text":v}),l);return f==="button"&&(p?f="h6":c?f="div":y.href?f="a":v&&(f="span")),Y.createElement(f,Pw({type:f==="button"&&(y.onClick||this.props.toggle)?"button":void 0},y,{tabIndex:i,role:o,className:x,onClick:this.onClick}))}}]),n}(Y.Component);hE.propTypes=hK;hE.contextType=th;const Ue=hE;function Mw(e){"@babel/helpers - typeof";return Mw=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},Mw(e)}var pK=["className","cssModule","dark","end","right","tag","flip","modifiers","persist","strategy","container","updateOnSelect"];function fv(){return fv=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function xK(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 SK(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function MP(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.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},hv(e)}var LK={tag:it,children:N.node.isRequired,dark:N.bool,end:N.bool,flip:N.bool,modifiers:N.array,className:N.string,cssModule:N.object,style:N.object,persist:N.bool,strategy:N.string,container:au,updateOnSelect:N.bool,right:SI(N.bool,'Please use "end" instead.')},jK={up:"top",left:"left",right:"right",start:"left",end:"right",down:"bottom"},pE=function(e){TK(n,e);var t=OK(n);function n(){return SK(this,n),t.apply(this,arguments)}return EK(n,[{key:"getRole",value:function(){return this.context.menuRole==="listbox"?"listbox":"menu"}},{key:"render",value:function(){var i=this,o=this.props,a=o.className,s=o.cssModule,l=o.dark,c=o.end,d=o.right,f=o.tag,p=f===void 0?"div":f,m=o.flip,v=m===void 0?!0:m,y=o.modifiers,x=y===void 0?[]:y,_=o.persist,w=o.strategy,S=o.container,E=o.updateOnSelect,O=wK(o,pK),k=Ve(We(a,"dropdown-menu",{"dropdown-menu-dark":l,"dropdown-menu-end":c||d,show:this.context.isOpen}),s),j=p;if(_||this.context.isOpen&&!this.context.inNavbar){var A=jK[this.context.direction]||"bottom",U=c||d?"end":"start",R="".concat(A,"-").concat(U),V=[].concat(gK(x),[{name:"flip",enabled:!!v}]),W={};_&&(W.display="block",W.visibility=this.context.isOpen?"visible":"hidden");var X=Y.createElement(WI,{placement:R,modifiers:V,strategy:w},function(Z){var ne=Z.ref,le=Z.style,K=Z.placement,F=Z.update,D=B_(B_(B_({},i.props.style),W),le),H=function(z){ne(z);var q=i.context.onMenuRef;q&&q(z)};return Y.createElement(j,fv({tabIndex:"-1",role:i.getRole(),ref:H},O,{style:D,"aria-hidden":!i.context.isOpen,className:k,"data-popper-placement":K,onClick:function(){return E&&F()}}))});return S?nl.createPortal(X,Xf(S)):X}var G=this.context.onMenuRef;return Y.createElement(j,fv({tabIndex:"-1",role:this.getRole()},O,{ref:G,"aria-hidden":!this.context.isOpen,className:k,"data-popper-placement":O.placement,"data-bs-popper":"static"}))}}]),n}(Y.Component);pE.propTypes=LK;pE.contextType=th;const Iu=pE;function Aw(e){"@babel/helpers - typeof";return Aw=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},Aw(e)}var MK=["className","color","cssModule","caret","split","nav","tag","innerRef"];function NK(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pv(){return pv=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function AK(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 DK(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function NP(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.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},mv(e)}var zK={caret:N.bool,color:N.string,children:N.node,className:N.string,cssModule:N.object,disabled:N.bool,onClick:N.func,"aria-haspopup":N.bool,split:N.bool,tag:it,nav:N.bool,innerRef:N.oneOfType([N.object,N.string,N.func])},VK={color:"secondary","aria-haspopup":!0},i0=function(e){FK(n,e);var t=$K(n);function n(r){var i;return DK(this,n),i=t.call(this,r),i.onClick=i.onClick.bind(GI(i)),i}return IK(n,[{key:"onClick",value:function(i){if(this.props.disabled||this.context.disabled){i.preventDefault();return}this.props.nav&&!this.props.tag&&i.preventDefault(),this.props.onClick&&this.props.onClick(i),this.context.toggle(i)}},{key:"getRole",value:function(){return this.context.menuRole||this.props["aria-haspopup"]}},{key:"render",value:function(){var i=this,o=this.props,a=o.className,s=o.color,l=o.cssModule,c=o.caret,d=o.split,f=o.nav,p=o.tag,m=o.innerRef,v=RK(o,MK),y=v["aria-label"]||"Toggle Dropdown",x=Ve(We(a,{"dropdown-toggle":c||d,"dropdown-toggle-split":d,"nav-link":f}),l),_=typeof v.children<"u"?v.children:Y.createElement("span",{className:"visually-hidden"},y),w;return f&&!p?(w="a",v.href="#"):p?w=p:(w=yt,v.color=s,v.cssModule=l),this.context.inNavbar?Y.createElement(w,pv({},v,{className:x,onClick:this.onClick,ref:this.context.onToggleRef,"aria-expanded":this.context.isOpen,"aria-haspopup":this.getRole(),children:_})):Y.createElement(WZ,{innerRef:m},function(S){var E=S.ref,O=function(j){E(j);var A=i.context.onToggleRef;A&&A(j)};return Y.createElement(w,pv({},v,NK({},typeof w=="string"?"ref":"innerRef",O),{className:x,onClick:i.onClick,"aria-expanded":i.context.isOpen,"aria-haspopup":i.getRole(),children:_}))})}}]),n}(Y.Component);i0.propTypes=zK;i0.defaultProps=VK;i0.contextType=th;const Fu=i0;function Iw(e,t){return Iw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Iw(e,t)}function HK(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Iw(e,t)}const RP={disabled:!1},qI=Y.createContext(null);var Fd="unmounted",$s="exited",Us="entering",hc="entered",Fw="exiting",ca=function(e){HK(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=$s,o.appearStatus=Us):l=hc:r.unmountOnExit||r.mountOnEnter?l=Fd:l=$s,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===Fd?{status:$s}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==Us&&a!==hc&&(o=Us):(a===Us||a===hc)&&(o=Fw)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){i===void 0&&(i=!1),o!==null?(this.cancelNextCallback(),o===Us?this.performEnter(i):this.performExit()):this.props.unmountOnExit&&this.state.status===$s&&this.setState({status:Fd})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[nl.findDOMNode(this),s],c=l[0],d=l[1],f=this.getTimeouts(),p=s?f.appear:f.enter;if(!i&&!a||RP.disabled){this.safeSetState({status:hc},function(){o.props.onEntered(c)});return}this.props.onEnter(c,d),this.safeSetState({status:Us},function(){o.props.onEntering(c,d),o.onTransitionEnd(p,function(){o.safeSetState({status:hc},function(){o.props.onEntered(c,d)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:nl.findDOMNode(this);if(!o||RP.disabled){this.safeSetState({status:$s},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:Fw},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:$s},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:nl.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],c=l[0],d=l[1];this.props.addEndListener(c,d)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Fd)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=wS(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Y.createElement(qI.Provider,{value:null},typeof a=="function"?a(i,s):Y.cloneElement(Y.Children.only(a),s))},t}(Y.Component);ca.contextType=qI;ca.propTypes={};function tc(){}ca.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:tc,onEntering:tc,onEntered:tc,onExit:tc,onExiting:tc,onExited:tc};ca.UNMOUNTED=Fd;ca.EXITED=$s;ca.ENTERING=Us;ca.ENTERED=hc;ca.EXITING=Fw;const $u=ca;var WK=["tag","baseClass","baseClassActive","className","cssModule","children","innerRef"];function gv(){return gv=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function GK(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 AP(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 nh(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function XK(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 JK(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function DP(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function yv(e){return yv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},yv(e)}function IP(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 du(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function fQ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var hQ={body:N.bool,className:N.string,color:N.string,cssModule:N.object,innerRef:N.oneOfType([N.object,N.string,N.func]),inverse:N.bool,outline:N.bool,tag:it};function Gr(e){var t=e.className,n=e.cssModule,r=e.color,i=e.body,o=e.inverse,a=e.outline,s=e.tag,l=s===void 0?"div":s,c=e.innerRef,d=dQ(e,uQ),f=Ve(We(t,"card",o?"text-white":!1,i?"card-body":!1,r?"".concat(a?"border":"bg","-").concat(r):!1),n);return Y.createElement(l,Bw({},d,{className:f,ref:c}))}Gr.propTypes=hQ;var pQ=["className","cssModule","innerRef","tag"];function zw(){return zw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function gQ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var vQ={className:N.string,cssModule:N.object,innerRef:N.oneOfType([N.object,N.string,N.func]),tag:it};function fu(e){var t=e.className,n=e.cssModule,r=e.innerRef,i=e.tag,o=i===void 0?"div":i,a=mQ(e,pQ),s=Ve(We(t,"card-body"),n);return Y.createElement(o,zw({},a,{className:s,ref:r}))}fu.propTypes=vQ;var yQ=["className","cssModule","tag"];function Vw(){return Vw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function bQ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var wQ={className:N.string,cssModule:N.object,tag:it};function QI(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=_Q(e,yQ),a=Ve(We(t,"card-footer"),n);return Y.createElement(i,Vw({},o,{className:a}))}QI.propTypes=wQ;var xQ=["className","cssModule","tag"];function Hw(){return Hw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function EQ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var TQ={className:N.string,cssModule:N.object,tag:it};function hu(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=SQ(e,xQ),a=Ve(We(t,"card-header"),n);return Y.createElement(i,Hw({},o,{className:a}))}hu.propTypes=TQ;var OQ=["className","cssModule","tag"];function Ww(){return Ww=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function kQ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var PQ={className:N.string,cssModule:N.object,tag:it};function XI(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"p":r,o=CQ(e,OQ),a=Ve(We(t,"card-text"),n);return Y.createElement(i,Ww({},o,{className:a}))}XI.propTypes=PQ;var LQ=["className","cssModule","tag"];function Yw(){return Yw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function MQ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var NQ={className:N.string,cssModule:N.object,tag:it};function JI(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=jQ(e,LQ),a=Ve(We(t,"card-title"),n);return Y.createElement(i,Yw({},o,{className:a}))}JI.propTypes=NQ;function Gw(e){"@babel/helpers - typeof";return Gw=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},Gw(e)}var RQ=["cssModule","children","isOpen","flip","target","offset","fallbackPlacements","placementPrefix","arrowClassName","hideArrow","popperClassName","tag","container","modifiers","strategy","boundariesElement","onClosed","fade","transition","placement"];function qw(){return qw=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function UQ(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 BQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $P(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _v(e){return _v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},_v(e)}function UP(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 og(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function bv(e){return bv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},bv(e)}var vE={children:N.oneOfType([N.node,N.func]),placement:N.oneOf(Tq),target:au.isRequired,container:au,isOpen:N.bool,disabled:N.bool,hideArrow:N.bool,boundariesElement:N.oneOfType([N.string,nE]),className:N.string,innerClassName:N.string,arrowClassName:N.string,popperClassName:N.string,cssModule:N.object,toggle:N.func,autohide:N.bool,placementPrefix:N.string,delay:N.oneOfType([N.shape({show:N.number,hide:N.number}),N.number]),modifiers:N.array,strategy:N.string,offset:N.arrayOf(N.number),innerRef:N.oneOfType([N.func,N.string,N.object]),trigger:N.string,fade:N.bool,flip:N.bool},e6={show:0,hide:50},iX={isOpen:!1,hideArrow:!1,autohide:!1,delay:e6,toggle:function(){},trigger:"click",fade:!0};function t6(e,t){return t&&(e===t||t.contains(e))}function zP(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return t&&t.length&&t.filter(function(n){return t6(e,n)})[0]}var yE=function(e){eX(n,e);var t=tX(n);function n(r){var i;return XQ(this,n),i=t.call(this,r),i._targets=[],i.currentTargetElement=null,i.addTargetEvents=i.addTargetEvents.bind(Ar(i)),i.handleDocumentClick=i.handleDocumentClick.bind(Ar(i)),i.removeTargetEvents=i.removeTargetEvents.bind(Ar(i)),i.toggle=i.toggle.bind(Ar(i)),i.showWithDelay=i.showWithDelay.bind(Ar(i)),i.hideWithDelay=i.hideWithDelay.bind(Ar(i)),i.onMouseOverTooltipContent=i.onMouseOverTooltipContent.bind(Ar(i)),i.onMouseLeaveTooltipContent=i.onMouseLeaveTooltipContent.bind(Ar(i)),i.show=i.show.bind(Ar(i)),i.hide=i.hide.bind(Ar(i)),i.onEscKeyDown=i.onEscKeyDown.bind(Ar(i)),i.getRef=i.getRef.bind(Ar(i)),i.state={isOpen:r.isOpen},i._isMounted=!1,i}return JQ(n,[{key:"componentDidMount",value:function(){this._isMounted=!0,this.updateTarget()}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.removeTargetEvents(),this._targets=null,this.clearShowTimeout(),this.clearHideTimeout()}},{key:"handleDocumentClick",value:function(i){var o=this.props.trigger.split(" ");o.indexOf("legacy")>-1&&(this.props.isOpen||zP(i.target,this._targets))?(this._hideTimeout&&this.clearHideTimeout(),this.props.isOpen&&!t6(i.target,this._popover)?this.hideWithDelay(i):this.props.isOpen||this.showWithDelay(i)):o.indexOf("click")>-1&&zP(i.target,this._targets)&&(this._hideTimeout&&this.clearHideTimeout(),this.props.isOpen?this.hideWithDelay(i):this.showWithDelay(i))}},{key:"onMouseOverTooltipContent",value:function(){this.props.trigger.indexOf("hover")>-1&&!this.props.autohide&&(this._hideTimeout&&this.clearHideTimeout(),this.state.isOpen&&!this.props.isOpen&&this.toggle())}},{key:"onMouseLeaveTooltipContent",value:function(i){this.props.trigger.indexOf("hover")>-1&&!this.props.autohide&&(this._showTimeout&&this.clearShowTimeout(),i.persist(),this._hideTimeout=setTimeout(this.hide.bind(this,i),this.getDelay("hide")))}},{key:"onEscKeyDown",value:function(i){i.key==="Escape"&&this.hide(i)}},{key:"getRef",value:function(i){var o=this.props.innerRef;o&&(typeof o=="function"?o(i):rh(o)==="object"&&(o.current=i)),this._popover=i}},{key:"getDelay",value:function(i){var o=this.props.delay;return rh(o)==="object"?isNaN(o[i])?e6[i]:o[i]:o}},{key:"getCurrentTarget",value:function(i){if(!i)return null;var o=this._targets.indexOf(i);return o>=0?this._targets[o]:this.getCurrentTarget(i.parentElement)}},{key:"show",value:function(i){if(!this.props.isOpen){if(this.clearShowTimeout(),this.currentTargetElement=i?i.currentTarget||this.getCurrentTarget(i.target):null,i&&i.composedPath&&typeof i.composedPath=="function"){var o=i.composedPath();this.currentTargetElement=o&&o[0]||this.currentTargetElement}this.toggle(i)}}},{key:"showWithDelay",value:function(i){this._hideTimeout&&this.clearHideTimeout(),this._showTimeout=setTimeout(this.show.bind(this,i),this.getDelay("show"))}},{key:"hide",value:function(i){this.props.isOpen&&(this.clearHideTimeout(),this.currentTargetElement=null,this.toggle(i))}},{key:"hideWithDelay",value:function(i){this._showTimeout&&this.clearShowTimeout(),this._hideTimeout=setTimeout(this.hide.bind(this,i),this.getDelay("hide"))}},{key:"clearShowTimeout",value:function(){clearTimeout(this._showTimeout),this._showTimeout=void 0}},{key:"clearHideTimeout",value:function(){clearTimeout(this._hideTimeout),this._hideTimeout=void 0}},{key:"addEventOnTargets",value:function(i,o,a){this._targets.forEach(function(s){s.addEventListener(i,o,a)})}},{key:"removeEventOnTargets",value:function(i,o,a){this._targets.forEach(function(s){s.removeEventListener(i,o,a)})}},{key:"addTargetEvents",value:function(){if(this.props.trigger){var i=this.props.trigger.split(" ");i.indexOf("manual")===-1&&((i.indexOf("click")>-1||i.indexOf("legacy")>-1)&&document.addEventListener("click",this.handleDocumentClick,!0),this._targets&&this._targets.length&&(i.indexOf("hover")>-1&&(this.addEventOnTargets("mouseover",this.showWithDelay,!0),this.addEventOnTargets("mouseout",this.hideWithDelay,!0)),i.indexOf("focus")>-1&&(this.addEventOnTargets("focusin",this.show,!0),this.addEventOnTargets("focusout",this.hide,!0)),this.addEventOnTargets("keydown",this.onEscKeyDown,!0)))}}},{key:"removeTargetEvents",value:function(){this._targets&&(this.removeEventOnTargets("mouseover",this.showWithDelay,!0),this.removeEventOnTargets("mouseout",this.hideWithDelay,!0),this.removeEventOnTargets("keydown",this.onEscKeyDown,!0),this.removeEventOnTargets("focusin",this.show,!0),this.removeEventOnTargets("focusout",this.hide,!0)),document.removeEventListener("click",this.handleDocumentClick,!0)}},{key:"updateTarget",value:function(){var i=Xf(this.props.target,!0);i!==this._targets&&(this.removeTargetEvents(),this._targets=i?Array.from(i):[],this.currentTargetElement=this.currentTargetElement||this._targets[0],this.addTargetEvents())}},{key:"toggle",value:function(i){return this.props.disabled||!this._isMounted?i&&i.preventDefault():this.props.toggle(i)}},{key:"render",value:function(){var i=this;this.props.isOpen&&this.updateTarget();var o=this.currentTargetElement||this._targets[0];if(!o)return null;var a=this.props,s=a.className,l=a.cssModule,c=a.innerClassName,d=a.isOpen,f=a.hideArrow,p=a.boundariesElement,m=a.placement,v=a.placementPrefix,y=a.arrowClassName,x=a.popperClassName,_=a.container,w=a.modifiers,S=a.strategy,E=a.offset,O=a.fade,k=a.flip,j=a.children,A=gs(this.props,Object.keys(vE)),U=Ve(x,l),R=Ve(c,l);return Y.createElement(QQ,{className:s,target:o,isOpen:d,hideArrow:f,boundariesElement:p,placement:m,placementPrefix:v,arrowClassName:y,popperClassName:U,container:_,modifiers:w,strategy:S,offset:E,cssModule:l,fade:O,flip:k},function(V){var W=V.update;return Y.createElement("div",Qw({},A,{ref:i.getRef,className:R,role:"tooltip",onMouseOver:i.onMouseOverTooltipContent,onMouseLeave:i.onMouseLeaveTooltipContent,onKeyDown:i.onEscKeyDown}),typeof j=="function"?j({update:W}):j)})}}],[{key:"getDerivedStateFromProps",value:function(i,o){return i.isOpen&&!o.isOpen?{isOpen:i.isOpen}:null}}]),n}(Y.Component);yE.propTypes=vE;yE.defaultProps=iX;const oX=yE;var aX=["children","className","barClassName","cssModule","value","min","max","animated","striped","color","bar","multi","tag","style","barStyle","barAriaValueText","barAriaLabelledBy"];function wv(){return wv=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function cX(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var uX={animated:N.bool,bar:N.bool,barAriaLabelledBy:N.string,barAriaValueText:N.string,barClassName:N.string,barStyle:N.object,children:N.node,className:N.string,cssModule:N.object,color:N.string,max:N.oneOfType([N.string,N.number]),min:N.oneOfType([N.string,N.number]),multi:N.bool,striped:N.bool,style:N.object,tag:it,value:N.oneOfType([N.string,N.number])};function n6(e){var t=e.children,n=e.className,r=e.barClassName,i=e.cssModule,o=e.value,a=o===void 0?0:o,s=e.min,l=s===void 0?0:s,c=e.max,d=c===void 0?100:c,f=e.animated,p=e.striped,m=e.color,v=e.bar,y=e.multi,x=e.tag,_=x===void 0?"div":x,w=e.style,S=w===void 0?{}:w,E=e.barStyle,O=E===void 0?{}:E,k=e.barAriaValueText,j=e.barAriaLabelledBy,A=lX(e,aX),U=fP(a)/fP(d)*100,R=Ve(We(n,"progress"),i),V=Ve(We("progress-bar",v&&n||r,f?"progress-bar-animated":null,m?"bg-".concat(m):null,p||f?"progress-bar-striped":null),i),W={className:V,style:z_(z_(z_({},v?S:{}),O),{},{width:"".concat(U,"%")}),role:"progressbar","aria-valuenow":a,"aria-valuemin":l,"aria-valuemax":d,"aria-valuetext":k,"aria-labelledby":j,children:t};return v?Y.createElement(_,wv({},A,W)):Y.createElement(_,wv({},A,{style:S,className:R}),y?t:Y.createElement("div",W))}n6.propTypes=uX;function Jw(e){"@babel/helpers - typeof";return Jw=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},Jw(e)}function dX(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function HP(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function xv(e){return xv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},xv(e)}var yX={children:N.node.isRequired,node:N.any},r6=function(e){hX(n,e);var t=pX(n);function n(){return dX(this,n),t.apply(this,arguments)}return fX(n,[{key:"componentWillUnmount",value:function(){this.defaultNode&&document.body.removeChild(this.defaultNode),this.defaultNode=null}},{key:"render",value:function(){return rE?(!this.props.node&&!this.defaultNode&&(this.defaultNode=document.createElement("div"),document.body.appendChild(this.defaultNode)),nl.createPortal(this.props.children,this.props.node||this.defaultNode)):null}}]),n}(Y.Component);r6.propTypes=yX;const _X=r6;function tx(e){"@babel/helpers - typeof";return tx=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},tx(e)}function WP(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 rc(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Sv(e){return Sv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Sv(e)}function Ev(){}var GP=N.shape(vr.propTypes),i6={autoFocus:N.bool,backdrop:N.oneOfType([N.bool,N.oneOf(["static"])]),backdropClassName:N.string,backdropTransition:GP,centered:N.bool,children:N.node,contentClassName:N.string,className:N.string,container:au,cssModule:N.object,external:N.node,fade:N.bool,fullscreen:N.oneOfType([N.bool,N.oneOf(["sm","md","lg","xl"])]),innerRef:N.oneOfType([N.object,N.string,N.func]),isOpen:N.bool,keyboard:N.bool,labelledBy:N.string,modalClassName:N.string,modalTransition:GP,onClosed:N.func,onEnter:N.func,onExit:N.func,onOpened:N.func,returnFocusAfterClose:N.bool,role:N.string,scrollable:N.bool,size:N.string,toggle:N.func,trapFocus:N.bool,unmountOnClose:N.bool,wrapClassName:N.string,zIndex:N.oneOfType([N.number,N.string])},OX=Object.keys(i6),CX={isOpen:!1,autoFocus:!0,centered:!1,scrollable:!1,role:"dialog",backdrop:!0,keyboard:!0,zIndex:1050,fade:!0,onOpened:Ev,onClosed:Ev,modalTransition:{timeout:av.Modal},backdropTransition:{mountOnEnter:!0,timeout:av.Fade},unmountOnClose:!0,returnFocusAfterClose:!0,container:"body",trapFocus:!1},Bh=function(e){xX(n,e);var t=SX(n);function n(r){var i;return bX(this,n),i=t.call(this,r),i._element=null,i._originalBodyPadding=null,i.getFocusableChildren=i.getFocusableChildren.bind(oi(i)),i.handleBackdropClick=i.handleBackdropClick.bind(oi(i)),i.handleBackdropMouseDown=i.handleBackdropMouseDown.bind(oi(i)),i.handleEscape=i.handleEscape.bind(oi(i)),i.handleStaticBackdropAnimation=i.handleStaticBackdropAnimation.bind(oi(i)),i.handleTab=i.handleTab.bind(oi(i)),i.onOpened=i.onOpened.bind(oi(i)),i.onClosed=i.onClosed.bind(oi(i)),i.manageFocusAfterClose=i.manageFocusAfterClose.bind(oi(i)),i.clearBackdropAnimationTimeout=i.clearBackdropAnimationTimeout.bind(oi(i)),i.trapFocus=i.trapFocus.bind(oi(i)),i.state={isOpen:!1,showStaticBackdropAnimation:!1},i}return wX(n,[{key:"componentDidMount",value:function(){var i=this.props,o=i.isOpen,a=i.autoFocus,s=i.onEnter;o&&(this.init(),this.setState({isOpen:!0}),a&&this.setFocus()),s&&s(),document.addEventListener("focus",this.trapFocus,!0),this._isMounted=!0}},{key:"componentDidUpdate",value:function(i,o){if(this.props.isOpen&&!i.isOpen){this.init(),this.setState({isOpen:!0});return}this.props.autoFocus&&this.state.isOpen&&!o.isOpen&&this.setFocus(),this._element&&i.zIndex!==this.props.zIndex&&(this._element.style.zIndex=this.props.zIndex)}},{key:"componentWillUnmount",value:function(){this.clearBackdropAnimationTimeout(),this.props.onExit&&this.props.onExit(),this._element&&(this.destroy(),(this.props.isOpen||this.state.isOpen)&&this.close()),document.removeEventListener("focus",this.trapFocus,!0),this._isMounted=!1}},{key:"handleBackdropClick",value:function(i){if(i.target===this._mouseDownElement){i.stopPropagation();var o=this._dialog?this._dialog.parentNode:null;if(o&&i.target===o&&this.props.backdrop==="static"&&this.handleStaticBackdropAnimation(),!this.props.isOpen||this.props.backdrop!==!0)return;o&&i.target===o&&this.props.toggle&&this.props.toggle(i)}}},{key:"handleTab",value:function(i){if(i.which===9&&!(this.modalIndex0&&(i.preventDefault(),i.stopPropagation(),o[0].focus())}}},{key:"init",value:function(){try{this._triggeringElement=document.activeElement}catch{this._triggeringElement=null}this._element||(this._element=document.createElement("div"),this._element.setAttribute("tabindex","-1"),this._element.style.position="relative",this._element.style.zIndex=this.props.zIndex,this._mountContainer=Xf(this.props.container),this._mountContainer.appendChild(this._element)),this._originalBodyPadding=wq(),n.openCount<1&&(n.originalBodyOverflow=window.getComputedStyle(document.body).overflow),xq(),n.openCount===0&&(document.body.className=We(document.body.className,Ve("modal-open",this.props.cssModule)),document.body.style.overflow="hidden"),this.modalIndex=n.openCount,n.openCount+=1}},{key:"destroy",value:function(){this._element&&(this._mountContainer.removeChild(this._element),this._element=null),this.manageFocusAfterClose()}},{key:"manageFocusAfterClose",value:function(){if(this._triggeringElement){var i=this.props.returnFocusAfterClose;this._triggeringElement.focus&&i&&this._triggeringElement.focus(),this._triggeringElement=null}}},{key:"close",value:function(){if(n.openCount<=1){var i=Ve("modal-open",this.props.cssModule),o=new RegExp("(^| )".concat(i,"( |$)"));document.body.className=document.body.className.replace(o," ").trim(),document.body.style.overflow=n.originalBodyOverflow}this.manageFocusAfterClose(),n.openCount=Math.max(0,n.openCount-1),wI(this._originalBodyPadding)}},{key:"clearBackdropAnimationTimeout",value:function(){this._backdropAnimationTimeout&&(clearTimeout(this._backdropAnimationTimeout),this._backdropAnimationTimeout=void 0)}},{key:"renderModalDialog",value:function(){var i,o=this,a=gs(this.props,OX),s="modal-dialog";return Y.createElement("div",cf({},a,{className:Ve(We(s,this.props.className,(i={},pc(i,"modal-".concat(this.props.size),this.props.size),pc(i,"".concat(s,"-centered"),this.props.centered),pc(i,"".concat(s,"-scrollable"),this.props.scrollable),pc(i,"modal-fullscreen",this.props.fullscreen===!0),pc(i,"modal-fullscreen-".concat(this.props.fullscreen,"-down"),typeof this.props.fullscreen=="string"),i)),this.props.cssModule),role:"document",ref:function(c){o._dialog=c}}),Y.createElement("div",{className:Ve(We("modal-content",this.props.contentClassName),this.props.cssModule)},this.props.children))}},{key:"render",value:function(){var i=this.props.unmountOnClose;if(this._element&&(this.state.isOpen||!i)){var o=!!this._element&&!this.state.isOpen&&!i;this._element.style.display=o?"none":"block";var a=this.props,s=a.wrapClassName,l=a.modalClassName,c=a.backdropClassName,d=a.cssModule,f=a.isOpen,p=a.backdrop,m=a.role,v=a.labelledBy,y=a.external,x=a.innerRef,_={onClick:this.handleBackdropClick,onMouseDown:this.handleBackdropMouseDown,onKeyUp:this.handleEscape,onKeyDown:this.handleTab,style:{display:"block"},"aria-labelledby":v,"aria-modal":!0,role:m,tabIndex:"-1"},w=this.props.fade,S=rc(rc(rc({},vr.defaultProps),this.props.modalTransition),{},{baseClass:w?this.props.modalTransition.baseClass:"",timeout:w?this.props.modalTransition.timeout:0}),E=rc(rc(rc({},vr.defaultProps),this.props.backdropTransition),{},{baseClass:w?this.props.backdropTransition.baseClass:"",timeout:w?this.props.backdropTransition.timeout:0}),O=p&&(w?Y.createElement(vr,cf({},E,{in:f&&!!p,cssModule:d,className:Ve(We("modal-backdrop",c),d)})):Y.createElement("div",{className:Ve(We("modal-backdrop","show",c),d)}));return Y.createElement(_X,{node:this._element},Y.createElement("div",{className:Ve(s)},Y.createElement(vr,cf({},_,S,{in:f,onEntered:this.onOpened,onExited:this.onClosed,cssModule:d,className:Ve(We("modal",l,this.state.showStaticBackdropAnimation&&"modal-static"),d),innerRef:x}),y,this.renderModalDialog()),O))}return null}}]),n}(Y.Component);Bh.propTypes=i6;Bh.defaultProps=CX;Bh.openCount=0;Bh.originalBodyOverflow=null;const ua=Bh;var kX=["className","cssModule","children","toggle","tag","wrapTag","closeAriaLabel","close"];function rx(){return rx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function LX(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var jX={children:N.node,className:N.string,close:N.object,closeAriaLabel:N.string,cssModule:N.object,tag:it,toggle:N.func,wrapTag:it};function da(e){var t,n=e.className,r=e.cssModule,i=e.children,o=e.toggle,a=e.tag,s=a===void 0?"h5":a,l=e.wrapTag,c=l===void 0?"div":l,d=e.closeAriaLabel,f=d===void 0?"Close":d,p=e.close,m=PX(e,kX),v=Ve(We(n,"modal-header"),r);return!p&&o&&(t=Y.createElement("button",{type:"button",onClick:o,className:Ve("btn-close",r),"aria-label":f})),Y.createElement(c,rx({},m,{className:v}),Y.createElement(s,{className:Ve("modal-title",r)},i),p||t)}da.propTypes=jX;var MX=["className","cssModule","tag"];function ix(){return ix=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function RX(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var AX={className:N.string,cssModule:N.object,tag:it};function Eo(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=NX(e,MX),a=Ve(We(t,"modal-body"),n);return Y.createElement(i,ix({},o,{className:a}))}Eo.propTypes=AX;var DX=["className","cssModule","tag"];function ox(){return ox=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function FX(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var $X={className:N.string,cssModule:N.object,tag:it};function Al(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=IX(e,DX),a=Ve(We(t,"modal-footer"),n);return Y.createElement(i,ox({},o,{className:a}))}Al.propTypes=$X;function ax(){return ax=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function VX(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var HX={className:N.string,cssModule:N.object,flush:N.bool,horizontal:N.oneOfType([N.bool,N.string]),numbered:N.bool,tag:it},WX=function(t){return t===!1?!1:t===!0||t==="xs"?"list-group-horizontal":"list-group-horizontal-".concat(t)};function o6(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"ul":r,o=e.flush,a=e.horizontal,s=a===void 0?!1:a,l=e.numbered,c=l===void 0?!1:l,d=zX(e,BX),f=Ve(We(t,"list-group",o?"list-group-flush":WX(s),{"list-group-numbered":c}),n);return Y.createElement(i,sx({},d,{className:f}))}o6.propTypes=HX;var YX=["className","cssModule","row","disabled","check","inline","floating","noMargin","tag","switch"];function lx(){return lx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function qX(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var ZX={children:N.node,row:N.bool,check:N.bool,switch:N.bool,inline:N.bool,floating:N.bool,noMargin:N.bool,disabled:N.bool,tag:it,className:N.string,cssModule:N.object};function Ur(e){var t=e.className,n=e.cssModule,r=e.row,i=e.disabled,o=e.check,a=e.inline,s=e.floating,l=e.noMargin,c=e.tag,d=c===void 0?"div":c,f=e.switch,p=GX(e,YX),m=o||f,v=Ve(We(t,r?"row":!1,m?"form-check":!1,f?"form-switch":!1,m||l?!1:"mb-3",m&&a?"form-check-inline":!1,m&&i?"disabled":!1,s&&"form-floating"),n);return d==="fieldset"&&(p.disabled=i),Y.createElement(d,lx({},p,{className:v}))}Ur.propTypes=ZX;function cx(e){"@babel/helpers - typeof";return cx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cx(e)}var KX=["className","cssModule","type","bsSize","valid","invalid","tag","addon","plaintext","innerRef"];function ux(){return ux=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function XX(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 JX(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qP(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.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Tv(e)}var oJ={children:N.node,type:N.string,size:N.oneOfType([N.number,N.string]),bsSize:N.string,valid:N.bool,invalid:N.bool,tag:it,innerRef:N.oneOfType([N.object,N.func,N.string]),plaintext:N.bool,addon:N.bool,className:N.string,cssModule:N.object},a6=function(e){tJ(n,e);var t=nJ(n);function n(r){var i;return JX(this,n),i=t.call(this,r),i.getRef=i.getRef.bind(fx(i)),i.focus=i.focus.bind(fx(i)),i}return eJ(n,[{key:"getRef",value:function(i){this.props.innerRef&&this.props.innerRef(i),this.ref=i}},{key:"focus",value:function(){this.ref&&this.ref.focus()}},{key:"render",value:function(){var i=this.props,o=i.className,a=i.cssModule,s=i.type,l=s===void 0?"text":s,c=i.bsSize,d=i.valid,f=i.invalid,p=i.tag,m=i.addon,v=i.plaintext,y=i.innerRef,x=QX(i,KX),_=["switch","radio","checkbox"].indexOf(l)>-1,w=/\D/g,S=l==="textarea",E=l==="select",O=l==="range",k=p||(E||S?l:"input"),j="form-control";v?(j="".concat(j,"-plaintext"),k=p||"input"):O?j="form-range":E?j="form-select":_&&(m?j=null:j="form-check-input"),x.size&&w.test(x.size)&&(cw(`Please use the prop "bsSize" instead of the "size" to bootstrap's input sizing.`),c=x.size,delete x.size);var A=Ve(We(o,f&&"is-invalid",d&&"is-valid",c?E?"form-select-".concat(c):"form-control-".concat(c):!1,j),a);return(k==="input"||p&&typeof p=="function")&&(x.type=l==="switch"?"checkbox":l),x.children&&!(v||l==="select"||typeof k!="string"||k==="select")&&(cw('Input with a type of "'.concat(l,'" cannot have children. Please use "value"/"defaultValue" instead.')),delete x.children),Y.createElement(k,ux({},x,{ref:y,className:A,"aria-invalid":f}))}}]),n}(Y.Component);a6.propTypes=oJ;const bl=a6;var aJ=["className","cssModule","tag","type","size"];function Ov(){return Ov=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function lJ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var cJ={className:N.string,cssModule:N.object,size:N.string,tag:it,type:N.string};function o0(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r;e.type;var o=e.size,a=sJ(e,aJ),s=Ve(We(t,"input-group",o?"input-group-".concat(o):null),n);return e.type==="dropdown"?Y.createElement(Uh,Ov({},a,{className:s})):Y.createElement(YI.Provider,{value:{insideInputGroup:!0}},Y.createElement(i,Ov({},a,{className:s})))}o0.propTypes=cJ;var uJ=["className","listClassName","cssModule","size","tag","listTag","aria-label"];function hx(){return hx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hJ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var pJ={children:N.node,className:N.string,listClassName:N.string,cssModule:N.object,size:N.string,tag:it,listTag:it,"aria-label":N.string};function _E(e){var t=e.className,n=e.listClassName,r=e.cssModule,i=e.size,o=e.tag,a=o===void 0?"nav":o,s=e.listTag,l=s===void 0?"ul":s,c=e["aria-label"],d=c===void 0?"pagination":c,f=fJ(e,uJ),p=Ve(We(t),r),m=Ve(We(n,"pagination",dJ({},"pagination-".concat(i),!!i)),r);return Y.createElement(a,{className:p,"aria-label":d},Y.createElement(l,hx({},f,{className:m})))}_E.propTypes=pJ;var mJ=["active","className","cssModule","disabled","tag"];function px(){return px=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function vJ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var yJ={active:N.bool,children:N.node,className:N.string,cssModule:N.object,disabled:N.bool,tag:it};function il(e){var t=e.active,n=e.className,r=e.cssModule,i=e.disabled,o=e.tag,a=o===void 0?"li":o,s=gJ(e,mJ),l=Ve(We(n,"page-item",{active:t,disabled:i}),r);return Y.createElement(a,px({},s,{className:l}))}il.propTypes=yJ;var _J=["className","cssModule","next","previous","first","last","tag"];function mx(){return mx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function wJ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var xJ={"aria-label":N.string,children:N.node,className:N.string,cssModule:N.object,next:N.bool,previous:N.bool,first:N.bool,last:N.bool,tag:it};function ol(e){var t=e.className,n=e.cssModule,r=e.next,i=e.previous,o=e.first,a=e.last,s=e.tag,l=s===void 0?"a":s,c=bJ(e,_J),d=Ve(We(t,"page-link"),n),f;i?f="Previous":r?f="Next":o?f="First":a&&(f="Last");var p=e["aria-label"]||f,m;i?m="‹":r?m="›":o?m="«":a&&(m="»");var v=e.children;return v&&Array.isArray(v)&&v.length===0&&(v=null),!c.href&&l==="a"&&(l="button"),(i||r||o||a)&&(v=[Y.createElement("span",{"aria-hidden":"true",key:"caret"},v||m),Y.createElement("span",{className:"visually-hidden",key:"ariaLabel"},p)]),Y.createElement(l,mx({},c,{className:d,"aria-label":p}),v)}ol.propTypes=xJ;var SJ=["className","closeClassName","closeAriaLabel","cssModule","tag","color","isOpen","toggle","children","transition","fade","innerRef"];function gx(){return gx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function OJ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var CJ={children:N.node,className:N.string,closeClassName:N.string,closeAriaLabel:N.string,color:N.string,cssModule:N.object,fade:N.bool,innerRef:N.oneOfType([N.object,N.string,N.func]),isOpen:N.bool,tag:it,toggle:N.func,transition:N.shape(vr.propTypes)};function s6(e){var t=e.className,n=e.closeClassName,r=e.closeAriaLabel,i=r===void 0?"Close":r,o=e.cssModule,a=e.tag,s=a===void 0?"div":a,l=e.color,c=l===void 0?"success":l,d=e.isOpen,f=d===void 0?!0:d,p=e.toggle,m=e.children,v=e.transition,y=v===void 0?bd(bd({},vr.defaultProps),{},{unmountOnExit:!0}):v,x=e.fade,_=x===void 0?!0:x,w=e.innerRef,S=TJ(e,SJ),E=Ve(We(t,"alert","alert-".concat(c),{"alert-dismissible":p}),o),O=Ve(We("btn-close",n),o),k=bd(bd(bd({},vr.defaultProps),y),{},{baseClass:_?y.baseClass:"",timeout:_?y.timeout:0});return Y.createElement(vr,gx({},S,k,{tag:s,className:E,in:f,role:"alert",innerRef:w}),p?Y.createElement("button",{type:"button",className:O,"aria-label":i,onClick:p}):null,m)}s6.propTypes=CJ;var kJ=["className","cssModule","tag","active","disabled","action","color"];function vx(){return vx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function LJ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var jJ={action:N.bool,active:N.bool,className:N.string,cssModule:N.object,color:N.string,disabled:N.bool,tag:it},MJ=function(t){t.preventDefault()};function l6(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"li":r,o=e.active,a=e.disabled,s=e.action,l=e.color,c=PJ(e,kJ),d=Ve(We(t,o?"active":!1,a?"disabled":!1,s?"list-group-item-action":!1,l?"list-group-item-".concat(l):!1,"list-group-item"),n);return a&&(c.onClick=MJ),Y.createElement(i,vx({},c,{className:d}))}l6.propTypes=jJ;function yx(e){"@babel/helpers - typeof";return yx=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},yx(e)}function KP(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 NJ(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Cv(e){return Cv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Cv(e)}var BJ=["defaultOpen"],Vh=function(e){IJ(n,e);var t=FJ(n);function n(r){var i;return AJ(this,n),i=t.call(this,r),i.state={isOpen:r.defaultOpen||!1},i.toggle=i.toggle.bind(c6(i)),i}return DJ(n,[{key:"toggle",value:function(i){var o=this;this.setState(function(a){return{isOpen:!a.isOpen}},function(){o.props.onToggle&&o.props.onToggle(i,o.state.isOpen)})}},{key:"render",value:function(){return Y.createElement(Uh,_x({isOpen:this.state.isOpen,toggle:this.toggle},gs(this.props,BJ)))}}]),n}(I.Component);Vh.propTypes=NJ({defaultOpen:N.bool,onToggle:N.func},Uh.propTypes);function wx(e){"@babel/helpers - typeof";return wx=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},wx(e)}function XP(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 zJ(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function kv(e){return kv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},kv(e)}var KJ=["defaultOpen"],Rr=function(e){YJ(n,e);var t=GJ(n);function n(r){var i;return HJ(this,n),i=t.call(this,r),i.state={isOpen:r.defaultOpen||!1},i.toggle=i.toggle.bind(u6(i)),i}return WJ(n,[{key:"toggle",value:function(){this.setState(function(i){return{isOpen:!i.isOpen}})}},{key:"render",value:function(){return Y.createElement(zh,xx({isOpen:this.state.isOpen,toggle:this.toggle},gs(this.props,KJ)))}}]),n}(I.Component);Rr.propTypes=zJ({defaultOpen:N.bool},zh.propTypes);function d6(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function QJ(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var f6={exports:{}};/*! +*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i0?"".concat(e,"px"):null}function wq(){return document.body.clientWidth0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Eq;return t?e.split(" ").map(function(n){return t[n]||n}).join(" "):e}function gs(e,t){var n={};return Object.keys(e).forEach(function(r){t.indexOf(r)===-1&&(n[r]=e[r])}),n}function xI(e,t){for(var n=Array.isArray(t)?t:[t],r=n.length,i,o={};r>0;)r-=1,i=n[r],o[i]=e[i];return o}var dP={};function cw(e){dP[e]||(typeof console<"u"&&console.error(e),dP[e]=!0)}function SI(e,t){return function(r,i,o){r[i]!==null&&typeof r[i]<"u"&&cw('"'.concat(i,'" property of "').concat(o,`" has been deprecated. +`).concat(t));for(var a=arguments.length,s=new Array(a>3?a-3:0),l=3;l"u"?"undefined":ou(window))==="object"&&window.Element||function(){};function nE(e,t,n){if(!(e[t]instanceof Tq))return new Error("Invalid prop `"+t+"` supplied to `"+n+"`. Expected prop to be an instance of Element. Validation failed.")}var au=N.oneOfType([N.string,N.func,nE,N.shape({current:N.any})]),it=N.oneOfType([N.func,N.string,N.shape({$$typeof:N.symbol,render:N.func}),N.arrayOf(N.oneOfType([N.func,N.string,N.shape({$$typeof:N.symbol,render:N.func})]))]),av={Fade:150,Collapse:350,Modal:300,Carousel:600,Offcanvas:300},sv=["in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","onEnter","onEntering","onEntered","onExit","onExiting","onExited"],sm={ENTERING:"entering",ENTERED:"entered",EXITING:"exiting",EXITED:"exited"},_t={esc:27,space:32,enter:13,tab:9,up:38,down:40,home:36,end:35,n:78,p:80},Oq=["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"],rE=!!(typeof window<"u"&&window.document&&window.document.createElement);function Cq(e){return e&&ou(e)==="object"?"current"in e:!1}function EI(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}function uw(e){var t=ou(e);return e!=null&&(t==="object"||t==="function")}function fP(e){var t=ou(e),n=0/0;if(t==="number")return e;if(t==="symbol"||t==="object"&&EI(e)==="[object Symbol]")return n;if(uw(e)){var r=typeof e.valueOf=="function"?e.valueOf():e;e=uw(r)?"".concat(r):r}if(t!=="string")return e===0?e:+e;e=e.replace(/^\s+|\s+$/g,"");var i=/^0b[01]+$/i.test(e);return i||/^0o[0-7]+$/i.test(e)?parseInt(e.slice(2),i?2:8):/^[-+]0x[0-9a-f]+$/i.test(e)?n:+e}function kq(e){if(!uw(e))return!1;var t=EI(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object Proxy]"}function Pq(e){if(Cq(e))return e.current;if(kq(e))return e();if(typeof e=="string"&&rE){var t=document.querySelectorAll(e);if(t.length||(t=document.querySelectorAll("#".concat(e))),!t.length)throw new Error("The target '".concat(e,"' could not be identified in the dom, tip: check spelling"));return t}return e}function hP(e){return e===null?!1:Array.isArray(e)||rE&&typeof e.length=="number"}function Xf(e,t){var n=Pq(e);return t?hP(n)?n:n===null?[]:[n]:hP(n)?n[0]:n}var Lq=["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"])'],jq=["className","cssModule","noGutters","tag","widths"];function dw(){return dw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Nq(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Rq=["xs","sm","md","lg","xl","xxl"],ec=N.oneOfType([N.number,N.string]),Aq={tag:it,noGutters:SI(N.bool,"Please use Bootstrap 5 gutter utility classes. https://getbootstrap.com/docs/5.0/layout/gutters/"),className:N.string,cssModule:N.object,xs:ec,sm:ec,md:ec,lg:ec,xl:ec,xxl:ec,widths:N.array};function gr(e){var t=e.className,n=e.cssModule,r=e.noGutters,i=e.tag,o=i===void 0?"div":i,a=e.widths,s=a===void 0?Rq:a,l=Mq(e,jq),c=[];s.forEach(function(f,p){var m=e[f];if(delete l[f],!!m){var v=!p;c.push(v?"row-cols-".concat(m):"row-cols-".concat(f,"-").concat(m))}});var d=Ve(We(t,r?"gx-0":null,"row",c),n);return Y.createElement(o,dw({},l,{className:d}))}gr.propTypes=Aq;var Dq=["expand","className","cssModule","light","dark","fixed","sticky","color","container","tag","children"];function fw(){return fw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Fq(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var $q={children:N.node,className:N.string,color:N.string,container:N.oneOfType([N.bool,N.string]),cssModule:N.object,dark:N.bool,expand:N.oneOfType([N.bool,N.string]),fixed:N.string,light:N.bool,role:N.string,sticky:N.string,tag:it},Uq=function(t){return t===!1?!1:t===!0||t==="xs"?"navbar-expand":"navbar-expand-".concat(t)};function TI(e){var t,n=e.expand,r=n===void 0?!1:n,i=e.className,o=e.cssModule,a=e.light,s=e.dark,l=e.fixed,c=e.sticky,d=e.color,f=e.container,p=f===void 0?"fluid":f,m=e.tag,v=m===void 0?"nav":m,y=e.children,x=Iq(e,Dq),_=Ve(We(i,"navbar",Uq(r),(t={"navbar-light":a,"navbar-dark":s},U_(t,"bg-".concat(d),d),U_(t,"fixed-".concat(l),l),U_(t,"sticky-".concat(c),c),t)),o),w=p&&p===!0?"container":"container-".concat(p);return Y.createElement(v,fw({},x,{className:_}),p?Y.createElement("div",{className:w},y):y)}TI.propTypes=$q;var Bq=["className","cssModule","tag"];function hw(){return hw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Vq(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Hq={className:N.string,cssModule:N.object,tag:it};function OI(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"a":r,o=zq(e,Bq),a=Ve(We(t,"navbar-brand"),n);return Y.createElement(i,hw({},o,{className:a}))}OI.propTypes=Hq;var Wq=["className","cssModule","children","tag"];function pw(){return pw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Zq(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Kq={className:N.string,cssModule:N.object,tag:it,type:N.string,children:N.node};function CI(e){var t=e.className,n=e.cssModule,r=e.children,i=e.tag,o=i===void 0?"button":i,a=qq(e,Wq),s=Ve(We(t,"navbar-toggler"),n);return Y.createElement(o,pw({"aria-label":"Toggle navigation"},Yq({type:"button"},a),{className:s}),r||Y.createElement("span",{className:Ve("navbar-toggler-icon",n)}))}CI.propTypes=Kq;var Qq=["className","cssModule","tabs","pills","vertical","horizontal","justified","fill","navbar","card","tag"];function mw(){return mw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Jq(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var e4={card:N.bool,className:N.string,cssModule:N.object,fill:N.bool,horizontal:N.oneOf(["center","end"]),justified:N.bool,navbar:N.bool,pills:N.bool,tabs:N.bool,tag:it,vertical:N.oneOfType([N.bool,N.string])},t4=function(t){return t===!1?!1:t===!0||t==="xs"?"flex-column":"flex-".concat(t,"-column")};function iE(e){var t=e.className,n=e.cssModule,r=e.tabs,i=e.pills,o=e.vertical,a=o===void 0?!1:o,s=e.horizontal,l=e.justified,c=e.fill,d=e.navbar,f=e.card,p=e.tag,m=p===void 0?"ul":p,v=Xq(e,Qq),y=Ve(We(t,d?"navbar-nav":"nav",s?"justify-content-".concat(s):!1,t4(a),{"nav-tabs":r,"card-header-tabs":f&&r,"nav-pills":i,"card-header-pills":f&&i,"nav-justified":l,"nav-fill":c}),n);return Y.createElement(m,mw({},v,{className:y}))}iE.propTypes=e4;var n4=["className","cssModule","active","tag"];function gw(){return gw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function i4(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var o4={active:N.bool,className:N.string,cssModule:N.object,tag:it};function oE(e){var t=e.className,n=e.cssModule,r=e.active,i=e.tag,o=i===void 0?"li":i,a=r4(e,n4),s=Ve(We(t,"nav-item",r?"active":!1),n);return Y.createElement(o,gw({},a,{className:s}))}oE.propTypes=o4;function vw(e){"@babel/helpers - typeof";return vw=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},vw(e)}var a4=["className","cssModule","active","tag","innerRef"];function yw(){return yw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function l4(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 c4(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mP(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function lv(e){return lv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},lv(e)}var m4={active:N.bool,className:N.string,cssModule:N.object,disabled:N.bool,href:N.any,innerRef:N.oneOfType([N.object,N.func,N.string]),onClick:N.func,tag:it},PI=function(e){d4(n,e);var t=f4(n);function n(r){var i;return c4(this,n),i=t.call(this,r),i.onClick=i.onClick.bind(kI(i)),i}return u4(n,[{key:"onClick",value:function(i){if(this.props.disabled){i.preventDefault();return}this.props.href==="#"&&i.preventDefault(),this.props.onClick&&this.props.onClick(i)}},{key:"render",value:function(){var i=this.props,o=i.className,a=i.cssModule,s=i.active,l=i.tag,c=l===void 0?"a":l,d=i.innerRef,f=s4(i,a4),p=Ve(We(o,"nav-link",{disabled:f.disabled,active:s}),a);return Y.createElement(c,yw({},f,{ref:d,onClick:this.onClick,className:p}))}}]),n}(Y.Component);PI.propTypes=m4;const LI=PI;var g4=["className","cssModule","variant","innerRef"];function bw(){return bw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function b4(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var w4={active:N.bool,"aria-label":N.string,onClick:N.func,variant:N.oneOf(["white"]),className:N.string,cssModule:N.object,innerRef:N.oneOfType([N.object,N.string,N.func])};function jI(e){var t=e.className;e.cssModule;var n=e.variant,r=e.innerRef,i=_4(e,g4),o=Ve(We(t,"btn-close",n&&"btn-close-".concat(n)));return Y.createElement("button",bw({ref:r,type:"button",className:o},v4({"aria-label":"close"},i)))}jI.propTypes=w4;var x4=["active","aria-label","block","className","close","cssModule","color","outline","size","tag","innerRef"];function ww(){return ww=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function E4(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var T4={active:N.bool,"aria-label":N.string,block:N.bool,children:N.node,className:N.string,cssModule:N.object,close:N.bool,color:N.string,disabled:N.bool,innerRef:N.oneOfType([N.object,N.func,N.string]),onClick:N.func,outline:N.bool,size:N.string,tag:it};function yt(e){var t=I.useCallback(function(w){if(e.disabled){w.preventDefault();return}if(e.onClick)return e.onClick(w)},[e.onClick,e.disabled]),n=e.active,r=e["aria-label"],i=e.block,o=e.className,a=e.close,s=e.cssModule,l=e.color,c=l===void 0?"secondary":l,d=e.outline,f=e.size,p=e.tag,m=p===void 0?"button":p,v=e.innerRef,y=S4(e,x4);if(a)return Y.createElement(jI,y);var x="btn".concat(d?"-outline":"","-").concat(c),_=Ve(We(o,"btn",x,f?"btn-".concat(f):!1,i?"d-block w-100":!1,{active:n,disabled:e.disabled}),s);return y.href&&m==="button"&&(m="a"),Y.createElement(m,ww({type:m==="button"&&y.onClick?"button":void 0},y,{className:_,ref:v,onClick:t,"aria-label":r}))}yt.propTypes=T4;var MI=I.createContext(),NI=I.createContext();function vP(e){var t=e.children,n=I.useState(null),r=n[0],i=n[1],o=I.useRef(!1);I.useEffect(function(){return function(){o.current=!0}},[]);var a=I.useCallback(function(s){o.current||i(s)},[]);return I.createElement(MI.Provider,{value:r},I.createElement(NI.Provider,{value:a},t))}var RI=function(t){return Array.isArray(t)?t[0]:t},AI=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=Yr(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function F4(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];!fi(o)||!bo(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function $4(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,c){return l[c]="",l},{});!fi(i)||!bo(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const U4={name:"applyStyles",enabled:!0,phase:"write",fn:F4,effect:$4,requires:["computeStyles"]};function mo(e){return e.split("-")[0]}var rl=Math.max,cv=Math.min,lu=Math.round;function Sw(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function FI(){return!/^((?!chrome|android).)*safari/i.test(Sw())}function cu(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&fi(e)&&(i=e.offsetWidth>0&&lu(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&lu(r.height)/e.offsetHeight||1);var a=_l(e)?Yr(e):window,s=a.visualViewport,l=!FI()&&n,c=(r.left+(l&&s?s.offsetLeft:0))/i,d=(r.top+(l&&s?s.offsetTop:0))/o,f=r.width/i,p=r.height/o;return{width:f,height:p,top:d,right:c+f,bottom:d+p,left:c,x:c,y:d}}function lE(e){var t=cu(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 $I(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&sE(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Jo(e){return Yr(e).getComputedStyle(e)}function B4(e){return["table","td","th"].indexOf(bo(e))>=0}function vs(e){return((_l(e)?e.ownerDocument:e.document)||window.document).documentElement}function n0(e){return bo(e)==="html"?e:e.assignedSlot||e.parentNode||(sE(e)?e.host:null)||vs(e)}function wP(e){return!fi(e)||Jo(e).position==="fixed"?null:e.offsetParent}function z4(e){var t=/firefox/i.test(Sw()),n=/Trident/i.test(Sw());if(n&&fi(e)){var r=Jo(e);if(r.position==="fixed")return null}var i=n0(e);for(sE(i)&&(i=i.host);fi(i)&&["html","body"].indexOf(bo(i))<0;){var o=Jo(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 $h(e){for(var t=Yr(e),n=wP(e);n&&B4(n)&&Jo(n).position==="static";)n=wP(n);return n&&(bo(n)==="html"||bo(n)==="body"&&Jo(n).position==="static")?t:n||z4(e)||t}function cE(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function sf(e,t,n){return rl(e,cv(t,n))}function V4(e,t,n){var r=sf(e,t,n);return r>n?n:r}function UI(){return{top:0,right:0,bottom:0,left:0}}function BI(e){return Object.assign({},UI(),e)}function zI(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var H4=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,BI(typeof t!="number"?t:zI(t,Fh))};function W4(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=mo(n.placement),l=cE(s),c=[Lr,_i].indexOf(s)>=0,d=c?"height":"width";if(!(!o||!a)){var f=H4(i.padding,n),p=lE(o),m=l==="y"?Pr:Lr,v=l==="y"?yi:_i,y=n.rects.reference[d]+n.rects.reference[l]-a[l]-n.rects.popper[d],x=a[l]-n.rects.reference[l],_=$h(o),w=_?l==="y"?_.clientHeight||0:_.clientWidth||0:0,S=y/2-x/2,E=f[m],O=w-p[d]-f[v],k=w/2-p[d]/2+S,j=sf(E,k,O),A=l;n.modifiersData[r]=(t={},t[A]=j,t.centerOffset=j-k,t)}}function Y4(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)||$I(t.elements.popper,i)&&(t.elements.arrow=i))}const G4={name:"arrow",enabled:!0,phase:"main",fn:W4,effect:Y4,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function uu(e){return e.split("-")[1]}var q4={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Z4(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:lu(n*i)/i||0,y:lu(r*i)/i||0}}function xP(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,f=e.isFixed,p=a.x,m=p===void 0?0:p,v=a.y,y=v===void 0?0:v,x=typeof d=="function"?d({x:m,y}):{x:m,y};m=x.x,y=x.y;var _=a.hasOwnProperty("x"),w=a.hasOwnProperty("y"),S=Lr,E=Pr,O=window;if(c){var k=$h(n),j="clientHeight",A="clientWidth";if(k===Yr(n)&&(k=vs(n),Jo(k).position!=="static"&&s==="absolute"&&(j="scrollHeight",A="scrollWidth")),k=k,i===Pr||(i===Lr||i===_i)&&o===Jf){E=yi;var U=f&&k===O&&O.visualViewport?O.visualViewport.height:k[j];y-=U-r.height,y*=l?1:-1}if(i===Lr||(i===Pr||i===yi)&&o===Jf){S=_i;var R=f&&k===O&&O.visualViewport?O.visualViewport.width:k[A];m-=R-r.width,m*=l?1:-1}}var V=Object.assign({position:s},c&&q4),W=d===!0?Z4({x:m,y},Yr(n)):{x:m,y};if(m=W.x,y=W.y,l){var X;return Object.assign({},V,(X={},X[E]=w?"0":"",X[S]=_?"0":"",X.transform=(O.devicePixelRatio||1)<=1?"translate("+m+"px, "+y+"px)":"translate3d("+m+"px, "+y+"px, 0)",X))}return Object.assign({},V,(t={},t[E]=w?y+"px":"",t[S]=_?m+"px":"",t.transform="",t))}function K4(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,c={placement:mo(t.placement),variation:uu(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,xP(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,xP(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 Q4={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:K4,data:{}};var lm={passive:!0};function X4(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=Yr(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(d){d.addEventListener("scroll",n.update,lm)}),s&&l.addEventListener("resize",n.update,lm),function(){o&&c.forEach(function(d){d.removeEventListener("scroll",n.update,lm)}),s&&l.removeEventListener("resize",n.update,lm)}}const J4={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:X4,data:{}};var eZ={left:"right",right:"left",bottom:"top",top:"bottom"};function rg(e){return e.replace(/left|right|bottom|top/g,function(t){return eZ[t]})}var tZ={start:"end",end:"start"};function SP(e){return e.replace(/start|end/g,function(t){return tZ[t]})}function uE(e){var t=Yr(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function dE(e){return cu(vs(e)).left+uE(e).scrollLeft}function nZ(e,t){var n=Yr(e),r=vs(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var c=FI();(c||!c&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+dE(e),y:l}}function rZ(e){var t,n=vs(e),r=uE(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=rl(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=rl(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+dE(e),l=-r.scrollTop;return Jo(i||n).direction==="rtl"&&(s+=rl(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function fE(e){var t=Jo(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function VI(e){return["html","body","#document"].indexOf(bo(e))>=0?e.ownerDocument.body:fi(e)&&fE(e)?e:VI(n0(e))}function lf(e,t){var n;t===void 0&&(t=[]);var r=VI(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Yr(r),a=i?[o].concat(o.visualViewport||[],fE(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(lf(n0(a)))}function Ew(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function iZ(e,t){var n=cu(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 EP(e,t,n){return t===DI?Ew(nZ(e,n)):_l(t)?iZ(t,n):Ew(rZ(vs(e)))}function oZ(e){var t=lf(n0(e)),n=["absolute","fixed"].indexOf(Jo(e).position)>=0,r=n&&fi(e)?$h(e):e;return _l(r)?t.filter(function(i){return _l(i)&&$I(i,r)&&bo(i)!=="body"}):[]}function aZ(e,t,n,r){var i=t==="clippingParents"?oZ(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,c){var d=EP(e,c,r);return l.top=rl(d.top,l.top),l.right=cv(d.right,l.right),l.bottom=cv(d.bottom,l.bottom),l.left=rl(d.left,l.left),l},EP(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function HI(e){var t=e.reference,n=e.element,r=e.placement,i=r?mo(r):null,o=r?uu(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Pr:l={x:a,y:t.y-n.height};break;case yi:l={x:a,y:t.y+t.height};break;case _i:l={x:t.x+t.width,y:s};break;case Lr:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var c=i?cE(i):null;if(c!=null){var d=c==="y"?"height":"width";switch(o){case su:l[c]=l[c]-(t[d]/2-n[d]/2);break;case Jf:l[c]=l[c]+(t[d]/2-n[d]/2);break}}return l}function eh(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?O4:s,c=n.rootBoundary,d=c===void 0?DI:c,f=n.elementContext,p=f===void 0?_d:f,m=n.altBoundary,v=m===void 0?!1:m,y=n.padding,x=y===void 0?0:y,_=BI(typeof x!="number"?x:zI(x,Fh)),w=p===_d?C4:_d,S=e.rects.popper,E=e.elements[v?w:p],O=aZ(_l(E)?E:E.contextElement||vs(e.elements.popper),l,d,a),k=cu(e.elements.reference),j=HI({reference:k,element:S,strategy:"absolute",placement:i}),A=Ew(Object.assign({},S,j)),U=p===_d?A:k,R={top:O.top-U.top+_.top,bottom:U.bottom-O.bottom+_.bottom,left:O.left-U.left+_.left,right:U.right-O.right+_.right},V=e.modifiersData.offset;if(p===_d&&V){var W=V[i];Object.keys(R).forEach(function(X){var G=[_i,yi].indexOf(X)>=0?1:-1,Z=[Pr,yi].indexOf(X)>=0?"y":"x";R[X]+=W[Z]*G})}return R}function sZ(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?II:l,d=uu(r),f=d?s?bP:bP.filter(function(v){return uu(v)===d}):Fh,p=f.filter(function(v){return c.indexOf(v)>=0});p.length===0&&(p=f);var m=p.reduce(function(v,y){return v[y]=eh(e,{placement:y,boundary:i,rootBoundary:o,padding:a})[mo(y)],v},{});return Object.keys(m).sort(function(v,y){return m[v]-m[y]})}function lZ(e){if(mo(e)===aE)return[];var t=rg(e);return[SP(e),t,SP(t)]}function cZ(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,c=n.padding,d=n.boundary,f=n.rootBoundary,p=n.altBoundary,m=n.flipVariations,v=m===void 0?!0:m,y=n.allowedAutoPlacements,x=t.options.placement,_=mo(x),w=_===x,S=l||(w||!v?[rg(x)]:lZ(x)),E=[x].concat(S).reduce(function(q,re){return q.concat(mo(re)===aE?sZ(t,{placement:re,boundary:d,rootBoundary:f,padding:c,flipVariations:v,allowedAutoPlacements:y}):re)},[]),O=t.rects.reference,k=t.rects.popper,j=new Map,A=!0,U=E[0],R=0;R=0,Z=G?"width":"height",ne=eh(t,{placement:V,boundary:d,rootBoundary:f,altBoundary:p,padding:c}),le=G?X?_i:Lr:X?yi:Pr;O[Z]>k[Z]&&(le=rg(le));var K=rg(le),F=[];if(o&&F.push(ne[W]<=0),s&&F.push(ne[le]<=0,ne[K]<=0),F.every(function(q){return q})){U=V,A=!1;break}j.set(V,F)}if(A)for(var D=v?3:1,H=function(re){var ae=E.find(function(he){var C=j.get(he);if(C)return C.slice(0,re).every(function(M){return M})});if(ae)return U=ae,"break"},ie=D;ie>0;ie--){var z=H(ie);if(z==="break")break}t.placement!==U&&(t.modifiersData[r]._skip=!0,t.placement=U,t.reset=!0)}}const uZ={name:"flip",enabled:!0,phase:"main",fn:cZ,requiresIfExists:["offset"],data:{_skip:!1}};function TP(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 OP(e){return[Pr,_i,yi,Lr].some(function(t){return e[t]>=0})}function dZ(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=eh(t,{elementContext:"reference"}),s=eh(t,{altBoundary:!0}),l=TP(a,r),c=TP(s,i,o),d=OP(l),f=OP(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":f})}const fZ={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:dZ};function hZ(e,t,n){var r=mo(e),i=[Lr,Pr].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Lr,_i].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function pZ(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=II.reduce(function(d,f){return d[f]=hZ(f,t.rects,o),d},{}),s=a[t.placement],l=s.x,c=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}const mZ={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:pZ};function gZ(e){var t=e.state,n=e.name;t.modifiersData[n]=HI({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const vZ={name:"popperOffsets",enabled:!0,phase:"read",fn:gZ,data:{}};function yZ(e){return e==="x"?"y":"x"}function _Z(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,c=n.rootBoundary,d=n.altBoundary,f=n.padding,p=n.tether,m=p===void 0?!0:p,v=n.tetherOffset,y=v===void 0?0:v,x=eh(t,{boundary:l,rootBoundary:c,padding:f,altBoundary:d}),_=mo(t.placement),w=uu(t.placement),S=!w,E=cE(_),O=yZ(E),k=t.modifiersData.popperOffsets,j=t.rects.reference,A=t.rects.popper,U=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,R=typeof U=="number"?{mainAxis:U,altAxis:U}:Object.assign({mainAxis:0,altAxis:0},U),V=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,W={x:0,y:0};if(k){if(o){var X,G=E==="y"?Pr:Lr,Z=E==="y"?yi:_i,ne=E==="y"?"height":"width",le=k[E],K=le+x[G],F=le-x[Z],D=m?-A[ne]/2:0,H=w===su?j[ne]:A[ne],ie=w===su?-A[ne]:-j[ne],z=t.elements.arrow,q=m&&z?lE(z):{width:0,height:0},re=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:UI(),ae=re[G],he=re[Z],C=sf(0,j[ne],q[ne]),M=S?j[ne]/2-D-C-ae-R.mainAxis:H-C-ae-R.mainAxis,$=S?-j[ne]/2+D+C+he+R.mainAxis:ie+C+he+R.mainAxis,J=t.elements.arrow&&$h(t.elements.arrow),ee=J?E==="y"?J.clientTop||0:J.clientLeft||0:0,se=(X=V==null?void 0:V[E])!=null?X:0,ge=le+M-se-ee,Me=le+$-se,ue=sf(m?cv(K,ge):K,le,m?rl(F,Me):F);k[E]=ue,W[E]=ue-le}if(s){var me,_e=E==="x"?Pr:Lr,Se=E==="x"?yi:_i,ke=k[O],Ce=O==="y"?"height":"width",je=ke+x[_e],ce=ke-x[Se],fe=[Pr,Lr].indexOf(_)!==-1,ye=(me=V==null?void 0:V[O])!=null?me:0,ve=fe?je:ke-j[Ce]-A[Ce]-ye+R.altAxis,xe=fe?ke+j[Ce]+A[Ce]-ye-R.altAxis:ce,Le=m&&fe?V4(ve,ke,xe):sf(m?ve:je,ke,m?xe:ce);k[O]=Le,W[O]=Le-ke}t.modifiersData[r]=W}}const bZ={name:"preventOverflow",enabled:!0,phase:"main",fn:_Z,requiresIfExists:["offset"]};function wZ(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function xZ(e){return e===Yr(e)||!fi(e)?uE(e):wZ(e)}function SZ(e){var t=e.getBoundingClientRect(),n=lu(t.width)/e.offsetWidth||1,r=lu(t.height)/e.offsetHeight||1;return n!==1||r!==1}function EZ(e,t,n){n===void 0&&(n=!1);var r=fi(t),i=fi(t)&&SZ(t),o=vs(t),a=cu(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((bo(t)!=="body"||fE(o))&&(s=xZ(t)),fi(t)?(l=cu(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=dE(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function TZ(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function OZ(e){var t=TZ(e);return I4.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function CZ(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function kZ(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 CP={placement:"bottom",modifiers:[],strategy:"absolute"};function kP(){for(var e=arguments.length,t=new Array(e),n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ZZ(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 KZ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PP(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function uv(e){return uv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},uv(e)}var nK={a11y:N.bool,disabled:N.bool,direction:N.oneOf(["up","down","start","end","left","right"]),group:N.bool,isOpen:N.bool,nav:N.bool,active:N.bool,size:N.string,tag:it,toggle:N.func,children:N.node,className:N.string,cssModule:N.object,dropup:N.bool,inNavbar:N.bool,setActiveFromChild:N.bool,menuRole:N.oneOf(["listbox","menu"])},rK={a11y:!0,isOpen:!1,direction:"down",nav:!1,active:!1,inNavbar:!1,setActiveFromChild:!1},iK=[_t.space,_t.enter,_t.up,_t.down,_t.end,_t.home],r0=function(e){XZ(n,e);var t=JZ(n);function n(r){var i;return KZ(this,n),i=t.call(this,r),i.addEvents=i.addEvents.bind(Sa(i)),i.handleDocumentClick=i.handleDocumentClick.bind(Sa(i)),i.handleKeyDown=i.handleKeyDown.bind(Sa(i)),i.removeEvents=i.removeEvents.bind(Sa(i)),i.toggle=i.toggle.bind(Sa(i)),i.handleMenuRef=i.handleMenuRef.bind(Sa(i)),i.handleToggleRef=i.handleToggleRef.bind(Sa(i)),i.containerRef=Y.createRef(),i.menuRef=Y.createRef(),i.toggleRef=Y.createRef(),i}return QZ(n,[{key:"componentDidMount",value:function(){this.handleProps()}},{key:"componentDidUpdate",value:function(i){this.props.isOpen!==i.isOpen&&this.handleProps()}},{key:"componentWillUnmount",value:function(){this.removeEvents()}},{key:"handleMenuRef",value:function(i){this.menuRef.current=i}},{key:"handleToggleRef",value:function(i){this.toggleRef.current=i}},{key:"handleDocumentClick",value:function(i){if(!(i&&(i.which===3||i.type==="keyup"&&i.which!==_t.tab))){var o=this.getContainer(),a=this.getMenu(),s=this.getToggle(),l=s.contains(i.target),c=a&&a.contains(i.target)&&a!==i.target,d=!1;o&&(d=o.classList.contains("input-group")&&o.classList.contains("dropdown")&&i.target.tagName==="INPUT"),!((l&&!d||c)&&(i.type!=="keyup"||i.which===_t.tab))&&this.toggle(i)}}},{key:"handleKeyDown",value:function(i){var o=this,a=i.target.getAttribute("role")==="menuitem"||i.target.getAttribute("role")==="option",s=this.getMenuCtrl()===i.target,l=_t.tab===i.which;if(!(/input|textarea/i.test(i.target.tagName)||l&&!this.props.a11y||l&&!(a||s))&&((iK.indexOf(i.which)!==-1||i.which>=48&&i.which<=90)&&i.preventDefault(),!this.props.disabled)){if(s)if([_t.space,_t.enter,_t.up,_t.down].indexOf(i.which)>-1)this.props.isOpen||this.toggle(i),setTimeout(function(){var w;return(w=o.getMenuItems()[0])===null||w===void 0?void 0:w.focus()});else if(this.props.isOpen&&l){var c;i.preventDefault(),(c=this.getMenuItems()[0])===null||c===void 0||c.focus()}else this.props.isOpen&&i.which===_t.esc&&this.toggle(i);if(this.props.isOpen&&a){if([_t.tab,_t.esc].indexOf(i.which)>-1)this.toggle(i),this.getMenuCtrl().focus();else if([_t.space,_t.enter].indexOf(i.which)>-1)i.target.click(),this.getMenuCtrl().focus();else if([_t.down,_t.up].indexOf(i.which)>-1||[_t.n,_t.p].indexOf(i.which)>-1&&i.ctrlKey){var d=this.getMenuItems(),f=d.indexOf(i.target);_t.up===i.which||_t.p===i.which&&i.ctrlKey?f=f!==0?f-1:d.length-1:(_t.down===i.which||_t.n===i.which&&i.ctrlKey)&&(f=f===d.length-1?0:f+1),d[f].focus()}else if(_t.end===i.which){var p=this.getMenuItems();p[p.length-1].focus()}else if(_t.home===i.which){var m=this.getMenuItems();m[0].focus()}else if(i.which>=48&&i.which<=90)for(var v=this.getMenuItems(),y=String.fromCharCode(i.which).toLowerCase(),x=0;x=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function sK(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 lK(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function LP(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.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},dv(e)}var pK={children:N.node,active:N.bool,disabled:N.bool,divider:N.bool,tag:it,header:N.bool,onClick:N.func,className:N.string,cssModule:N.object,toggle:N.bool,text:N.bool},hE=function(e){uK(n,e);var t=dK(n);function n(r){var i;return lK(this,n),i=t.call(this,r),i.onClick=i.onClick.bind(jw(i)),i.getTabIndex=i.getTabIndex.bind(jw(i)),i}return cK(n,[{key:"onClick",value:function(i){var o,a=this.props,s=a.disabled,l=a.header,c=a.divider,d=a.text;if(s||l||c||d){i.preventDefault();return}this.props.onClick&&this.props.onClick(i),(!((o=this.props.toggle)!==null&&o!==void 0)||o)&&this.context.toggle(i)}},{key:"getRole",value:function(){return this.context.menuRole==="listbox"?"option":"menuitem"}},{key:"getTabIndex",value:function(){var i=this.props,o=i.disabled,a=i.header,s=i.divider,l=i.text;return o||a||s||l?"-1":"0"}},{key:"render",value:function(){var i=this.getTabIndex(),o=i>-1?this.getRole():void 0,a=gs(this.props,["toggle"]),s=a.className,l=a.cssModule,c=a.divider,d=a.tag,f=d===void 0?"button":d,p=a.header,m=a.active,v=a.text,y=aK(a,oK),x=Ve(We(s,{disabled:y.disabled,"dropdown-item":!c&&!p&&!v,active:m,"dropdown-header":p,"dropdown-divider":c,"dropdown-item-text":v}),l);return f==="button"&&(p?f="h6":c?f="div":y.href?f="a":v&&(f="span")),Y.createElement(f,Pw({type:f==="button"&&(y.onClick||this.props.toggle)?"button":void 0},y,{tabIndex:i,role:o,className:x,onClick:this.onClick}))}}]),n}(Y.Component);hE.propTypes=pK;hE.contextType=th;const Ue=hE;function Mw(e){"@babel/helpers - typeof";return Mw=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},Mw(e)}var mK=["className","cssModule","dark","end","right","tag","flip","modifiers","persist","strategy","container","updateOnSelect"];function fv(){return fv=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function SK(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 EK(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function MP(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.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},hv(e)}var jK={tag:it,children:N.node.isRequired,dark:N.bool,end:N.bool,flip:N.bool,modifiers:N.array,className:N.string,cssModule:N.object,style:N.object,persist:N.bool,strategy:N.string,container:au,updateOnSelect:N.bool,right:SI(N.bool,'Please use "end" instead.')},MK={up:"top",left:"left",right:"right",start:"left",end:"right",down:"bottom"},pE=function(e){OK(n,e);var t=CK(n);function n(){return EK(this,n),t.apply(this,arguments)}return TK(n,[{key:"getRole",value:function(){return this.context.menuRole==="listbox"?"listbox":"menu"}},{key:"render",value:function(){var i=this,o=this.props,a=o.className,s=o.cssModule,l=o.dark,c=o.end,d=o.right,f=o.tag,p=f===void 0?"div":f,m=o.flip,v=m===void 0?!0:m,y=o.modifiers,x=y===void 0?[]:y,_=o.persist,w=o.strategy,S=o.container,E=o.updateOnSelect,O=xK(o,mK),k=Ve(We(a,"dropdown-menu",{"dropdown-menu-dark":l,"dropdown-menu-end":c||d,show:this.context.isOpen}),s),j=p;if(_||this.context.isOpen&&!this.context.inNavbar){var A=MK[this.context.direction]||"bottom",U=c||d?"end":"start",R="".concat(A,"-").concat(U),V=[].concat(vK(x),[{name:"flip",enabled:!!v}]),W={};_&&(W.display="block",W.visibility=this.context.isOpen?"visible":"hidden");var X=Y.createElement(WI,{placement:R,modifiers:V,strategy:w},function(Z){var ne=Z.ref,le=Z.style,K=Z.placement,F=Z.update,D=B_(B_(B_({},i.props.style),W),le),H=function(z){ne(z);var q=i.context.onMenuRef;q&&q(z)};return Y.createElement(j,fv({tabIndex:"-1",role:i.getRole(),ref:H},O,{style:D,"aria-hidden":!i.context.isOpen,className:k,"data-popper-placement":K,onClick:function(){return E&&F()}}))});return S?nl.createPortal(X,Xf(S)):X}var G=this.context.onMenuRef;return Y.createElement(j,fv({tabIndex:"-1",role:this.getRole()},O,{ref:G,"aria-hidden":!this.context.isOpen,className:k,"data-popper-placement":O.placement,"data-bs-popper":"static"}))}}]),n}(Y.Component);pE.propTypes=jK;pE.contextType=th;const Iu=pE;function Aw(e){"@babel/helpers - typeof";return Aw=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},Aw(e)}var NK=["className","color","cssModule","caret","split","nav","tag","innerRef"];function RK(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pv(){return pv=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function DK(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 IK(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function NP(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.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},mv(e)}var VK={caret:N.bool,color:N.string,children:N.node,className:N.string,cssModule:N.object,disabled:N.bool,onClick:N.func,"aria-haspopup":N.bool,split:N.bool,tag:it,nav:N.bool,innerRef:N.oneOfType([N.object,N.string,N.func])},HK={color:"secondary","aria-haspopup":!0},i0=function(e){$K(n,e);var t=UK(n);function n(r){var i;return IK(this,n),i=t.call(this,r),i.onClick=i.onClick.bind(GI(i)),i}return FK(n,[{key:"onClick",value:function(i){if(this.props.disabled||this.context.disabled){i.preventDefault();return}this.props.nav&&!this.props.tag&&i.preventDefault(),this.props.onClick&&this.props.onClick(i),this.context.toggle(i)}},{key:"getRole",value:function(){return this.context.menuRole||this.props["aria-haspopup"]}},{key:"render",value:function(){var i=this,o=this.props,a=o.className,s=o.color,l=o.cssModule,c=o.caret,d=o.split,f=o.nav,p=o.tag,m=o.innerRef,v=AK(o,NK),y=v["aria-label"]||"Toggle Dropdown",x=Ve(We(a,{"dropdown-toggle":c||d,"dropdown-toggle-split":d,"nav-link":f}),l),_=typeof v.children<"u"?v.children:Y.createElement("span",{className:"visually-hidden"},y),w;return f&&!p?(w="a",v.href="#"):p?w=p:(w=yt,v.color=s,v.cssModule=l),this.context.inNavbar?Y.createElement(w,pv({},v,{className:x,onClick:this.onClick,ref:this.context.onToggleRef,"aria-expanded":this.context.isOpen,"aria-haspopup":this.getRole(),children:_})):Y.createElement(YZ,{innerRef:m},function(S){var E=S.ref,O=function(j){E(j);var A=i.context.onToggleRef;A&&A(j)};return Y.createElement(w,pv({},v,RK({},typeof w=="string"?"ref":"innerRef",O),{className:x,onClick:i.onClick,"aria-expanded":i.context.isOpen,"aria-haspopup":i.getRole(),children:_}))})}}]),n}(Y.Component);i0.propTypes=VK;i0.defaultProps=HK;i0.contextType=th;const Fu=i0;function Iw(e,t){return Iw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Iw(e,t)}function WK(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Iw(e,t)}const RP={disabled:!1},qI=Y.createContext(null);var Fd="unmounted",$s="exited",Us="entering",hc="entered",Fw="exiting",ca=function(e){WK(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=$s,o.appearStatus=Us):l=hc:r.unmountOnExit||r.mountOnEnter?l=Fd:l=$s,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===Fd?{status:$s}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==Us&&a!==hc&&(o=Us):(a===Us||a===hc)&&(o=Fw)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){i===void 0&&(i=!1),o!==null?(this.cancelNextCallback(),o===Us?this.performEnter(i):this.performExit()):this.props.unmountOnExit&&this.state.status===$s&&this.setState({status:Fd})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[nl.findDOMNode(this),s],c=l[0],d=l[1],f=this.getTimeouts(),p=s?f.appear:f.enter;if(!i&&!a||RP.disabled){this.safeSetState({status:hc},function(){o.props.onEntered(c)});return}this.props.onEnter(c,d),this.safeSetState({status:Us},function(){o.props.onEntering(c,d),o.onTransitionEnd(p,function(){o.safeSetState({status:hc},function(){o.props.onEntered(c,d)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:nl.findDOMNode(this);if(!o||RP.disabled){this.safeSetState({status:$s},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:Fw},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:$s},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:nl.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],c=l[0],d=l[1];this.props.addEndListener(c,d)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Fd)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=wS(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Y.createElement(qI.Provider,{value:null},typeof a=="function"?a(i,s):Y.cloneElement(Y.Children.only(a),s))},t}(Y.Component);ca.contextType=qI;ca.propTypes={};function tc(){}ca.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:tc,onEntering:tc,onEntered:tc,onExit:tc,onExiting:tc,onExited:tc};ca.UNMOUNTED=Fd;ca.EXITED=$s;ca.ENTERING=Us;ca.ENTERED=hc;ca.EXITING=Fw;const $u=ca;var YK=["tag","baseClass","baseClassActive","className","cssModule","children","innerRef"];function gv(){return gv=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function qK(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 AP(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 nh(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function JK(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 eQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function DP(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function yv(e){return yv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},yv(e)}function IP(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 du(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hQ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var pQ={body:N.bool,className:N.string,color:N.string,cssModule:N.object,innerRef:N.oneOfType([N.object,N.string,N.func]),inverse:N.bool,outline:N.bool,tag:it};function Gr(e){var t=e.className,n=e.cssModule,r=e.color,i=e.body,o=e.inverse,a=e.outline,s=e.tag,l=s===void 0?"div":s,c=e.innerRef,d=fQ(e,dQ),f=Ve(We(t,"card",o?"text-white":!1,i?"card-body":!1,r?"".concat(a?"border":"bg","-").concat(r):!1),n);return Y.createElement(l,Bw({},d,{className:f,ref:c}))}Gr.propTypes=pQ;var mQ=["className","cssModule","innerRef","tag"];function zw(){return zw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function vQ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var yQ={className:N.string,cssModule:N.object,innerRef:N.oneOfType([N.object,N.string,N.func]),tag:it};function fu(e){var t=e.className,n=e.cssModule,r=e.innerRef,i=e.tag,o=i===void 0?"div":i,a=gQ(e,mQ),s=Ve(We(t,"card-body"),n);return Y.createElement(o,zw({},a,{className:s,ref:r}))}fu.propTypes=yQ;var _Q=["className","cssModule","tag"];function Vw(){return Vw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function wQ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var xQ={className:N.string,cssModule:N.object,tag:it};function QI(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=bQ(e,_Q),a=Ve(We(t,"card-footer"),n);return Y.createElement(i,Vw({},o,{className:a}))}QI.propTypes=xQ;var SQ=["className","cssModule","tag"];function Hw(){return Hw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function TQ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var OQ={className:N.string,cssModule:N.object,tag:it};function hu(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=EQ(e,SQ),a=Ve(We(t,"card-header"),n);return Y.createElement(i,Hw({},o,{className:a}))}hu.propTypes=OQ;var CQ=["className","cssModule","tag"];function Ww(){return Ww=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function PQ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var LQ={className:N.string,cssModule:N.object,tag:it};function XI(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"p":r,o=kQ(e,CQ),a=Ve(We(t,"card-text"),n);return Y.createElement(i,Ww({},o,{className:a}))}XI.propTypes=LQ;var jQ=["className","cssModule","tag"];function Yw(){return Yw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function NQ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var RQ={className:N.string,cssModule:N.object,tag:it};function JI(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=MQ(e,jQ),a=Ve(We(t,"card-title"),n);return Y.createElement(i,Yw({},o,{className:a}))}JI.propTypes=RQ;function Gw(e){"@babel/helpers - typeof";return Gw=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},Gw(e)}var AQ=["cssModule","children","isOpen","flip","target","offset","fallbackPlacements","placementPrefix","arrowClassName","hideArrow","popperClassName","tag","container","modifiers","strategy","boundariesElement","onClosed","fade","transition","placement"];function qw(){return qw=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function BQ(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 zQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $P(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _v(e){return _v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},_v(e)}function UP(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 og(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function bv(e){return bv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},bv(e)}var vE={children:N.oneOfType([N.node,N.func]),placement:N.oneOf(Oq),target:au.isRequired,container:au,isOpen:N.bool,disabled:N.bool,hideArrow:N.bool,boundariesElement:N.oneOfType([N.string,nE]),className:N.string,innerClassName:N.string,arrowClassName:N.string,popperClassName:N.string,cssModule:N.object,toggle:N.func,autohide:N.bool,placementPrefix:N.string,delay:N.oneOfType([N.shape({show:N.number,hide:N.number}),N.number]),modifiers:N.array,strategy:N.string,offset:N.arrayOf(N.number),innerRef:N.oneOfType([N.func,N.string,N.object]),trigger:N.string,fade:N.bool,flip:N.bool},e6={show:0,hide:50},oX={isOpen:!1,hideArrow:!1,autohide:!1,delay:e6,toggle:function(){},trigger:"click",fade:!0};function t6(e,t){return t&&(e===t||t.contains(e))}function zP(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return t&&t.length&&t.filter(function(n){return t6(e,n)})[0]}var yE=function(e){tX(n,e);var t=nX(n);function n(r){var i;return JQ(this,n),i=t.call(this,r),i._targets=[],i.currentTargetElement=null,i.addTargetEvents=i.addTargetEvents.bind(Ar(i)),i.handleDocumentClick=i.handleDocumentClick.bind(Ar(i)),i.removeTargetEvents=i.removeTargetEvents.bind(Ar(i)),i.toggle=i.toggle.bind(Ar(i)),i.showWithDelay=i.showWithDelay.bind(Ar(i)),i.hideWithDelay=i.hideWithDelay.bind(Ar(i)),i.onMouseOverTooltipContent=i.onMouseOverTooltipContent.bind(Ar(i)),i.onMouseLeaveTooltipContent=i.onMouseLeaveTooltipContent.bind(Ar(i)),i.show=i.show.bind(Ar(i)),i.hide=i.hide.bind(Ar(i)),i.onEscKeyDown=i.onEscKeyDown.bind(Ar(i)),i.getRef=i.getRef.bind(Ar(i)),i.state={isOpen:r.isOpen},i._isMounted=!1,i}return eX(n,[{key:"componentDidMount",value:function(){this._isMounted=!0,this.updateTarget()}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.removeTargetEvents(),this._targets=null,this.clearShowTimeout(),this.clearHideTimeout()}},{key:"handleDocumentClick",value:function(i){var o=this.props.trigger.split(" ");o.indexOf("legacy")>-1&&(this.props.isOpen||zP(i.target,this._targets))?(this._hideTimeout&&this.clearHideTimeout(),this.props.isOpen&&!t6(i.target,this._popover)?this.hideWithDelay(i):this.props.isOpen||this.showWithDelay(i)):o.indexOf("click")>-1&&zP(i.target,this._targets)&&(this._hideTimeout&&this.clearHideTimeout(),this.props.isOpen?this.hideWithDelay(i):this.showWithDelay(i))}},{key:"onMouseOverTooltipContent",value:function(){this.props.trigger.indexOf("hover")>-1&&!this.props.autohide&&(this._hideTimeout&&this.clearHideTimeout(),this.state.isOpen&&!this.props.isOpen&&this.toggle())}},{key:"onMouseLeaveTooltipContent",value:function(i){this.props.trigger.indexOf("hover")>-1&&!this.props.autohide&&(this._showTimeout&&this.clearShowTimeout(),i.persist(),this._hideTimeout=setTimeout(this.hide.bind(this,i),this.getDelay("hide")))}},{key:"onEscKeyDown",value:function(i){i.key==="Escape"&&this.hide(i)}},{key:"getRef",value:function(i){var o=this.props.innerRef;o&&(typeof o=="function"?o(i):rh(o)==="object"&&(o.current=i)),this._popover=i}},{key:"getDelay",value:function(i){var o=this.props.delay;return rh(o)==="object"?isNaN(o[i])?e6[i]:o[i]:o}},{key:"getCurrentTarget",value:function(i){if(!i)return null;var o=this._targets.indexOf(i);return o>=0?this._targets[o]:this.getCurrentTarget(i.parentElement)}},{key:"show",value:function(i){if(!this.props.isOpen){if(this.clearShowTimeout(),this.currentTargetElement=i?i.currentTarget||this.getCurrentTarget(i.target):null,i&&i.composedPath&&typeof i.composedPath=="function"){var o=i.composedPath();this.currentTargetElement=o&&o[0]||this.currentTargetElement}this.toggle(i)}}},{key:"showWithDelay",value:function(i){this._hideTimeout&&this.clearHideTimeout(),this._showTimeout=setTimeout(this.show.bind(this,i),this.getDelay("show"))}},{key:"hide",value:function(i){this.props.isOpen&&(this.clearHideTimeout(),this.currentTargetElement=null,this.toggle(i))}},{key:"hideWithDelay",value:function(i){this._showTimeout&&this.clearShowTimeout(),this._hideTimeout=setTimeout(this.hide.bind(this,i),this.getDelay("hide"))}},{key:"clearShowTimeout",value:function(){clearTimeout(this._showTimeout),this._showTimeout=void 0}},{key:"clearHideTimeout",value:function(){clearTimeout(this._hideTimeout),this._hideTimeout=void 0}},{key:"addEventOnTargets",value:function(i,o,a){this._targets.forEach(function(s){s.addEventListener(i,o,a)})}},{key:"removeEventOnTargets",value:function(i,o,a){this._targets.forEach(function(s){s.removeEventListener(i,o,a)})}},{key:"addTargetEvents",value:function(){if(this.props.trigger){var i=this.props.trigger.split(" ");i.indexOf("manual")===-1&&((i.indexOf("click")>-1||i.indexOf("legacy")>-1)&&document.addEventListener("click",this.handleDocumentClick,!0),this._targets&&this._targets.length&&(i.indexOf("hover")>-1&&(this.addEventOnTargets("mouseover",this.showWithDelay,!0),this.addEventOnTargets("mouseout",this.hideWithDelay,!0)),i.indexOf("focus")>-1&&(this.addEventOnTargets("focusin",this.show,!0),this.addEventOnTargets("focusout",this.hide,!0)),this.addEventOnTargets("keydown",this.onEscKeyDown,!0)))}}},{key:"removeTargetEvents",value:function(){this._targets&&(this.removeEventOnTargets("mouseover",this.showWithDelay,!0),this.removeEventOnTargets("mouseout",this.hideWithDelay,!0),this.removeEventOnTargets("keydown",this.onEscKeyDown,!0),this.removeEventOnTargets("focusin",this.show,!0),this.removeEventOnTargets("focusout",this.hide,!0)),document.removeEventListener("click",this.handleDocumentClick,!0)}},{key:"updateTarget",value:function(){var i=Xf(this.props.target,!0);i!==this._targets&&(this.removeTargetEvents(),this._targets=i?Array.from(i):[],this.currentTargetElement=this.currentTargetElement||this._targets[0],this.addTargetEvents())}},{key:"toggle",value:function(i){return this.props.disabled||!this._isMounted?i&&i.preventDefault():this.props.toggle(i)}},{key:"render",value:function(){var i=this;this.props.isOpen&&this.updateTarget();var o=this.currentTargetElement||this._targets[0];if(!o)return null;var a=this.props,s=a.className,l=a.cssModule,c=a.innerClassName,d=a.isOpen,f=a.hideArrow,p=a.boundariesElement,m=a.placement,v=a.placementPrefix,y=a.arrowClassName,x=a.popperClassName,_=a.container,w=a.modifiers,S=a.strategy,E=a.offset,O=a.fade,k=a.flip,j=a.children,A=gs(this.props,Object.keys(vE)),U=Ve(x,l),R=Ve(c,l);return Y.createElement(XQ,{className:s,target:o,isOpen:d,hideArrow:f,boundariesElement:p,placement:m,placementPrefix:v,arrowClassName:y,popperClassName:U,container:_,modifiers:w,strategy:S,offset:E,cssModule:l,fade:O,flip:k},function(V){var W=V.update;return Y.createElement("div",Qw({},A,{ref:i.getRef,className:R,role:"tooltip",onMouseOver:i.onMouseOverTooltipContent,onMouseLeave:i.onMouseLeaveTooltipContent,onKeyDown:i.onEscKeyDown}),typeof j=="function"?j({update:W}):j)})}}],[{key:"getDerivedStateFromProps",value:function(i,o){return i.isOpen&&!o.isOpen?{isOpen:i.isOpen}:null}}]),n}(Y.Component);yE.propTypes=vE;yE.defaultProps=oX;const aX=yE;var sX=["children","className","barClassName","cssModule","value","min","max","animated","striped","color","bar","multi","tag","style","barStyle","barAriaValueText","barAriaLabelledBy"];function wv(){return wv=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function uX(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var dX={animated:N.bool,bar:N.bool,barAriaLabelledBy:N.string,barAriaValueText:N.string,barClassName:N.string,barStyle:N.object,children:N.node,className:N.string,cssModule:N.object,color:N.string,max:N.oneOfType([N.string,N.number]),min:N.oneOfType([N.string,N.number]),multi:N.bool,striped:N.bool,style:N.object,tag:it,value:N.oneOfType([N.string,N.number])};function n6(e){var t=e.children,n=e.className,r=e.barClassName,i=e.cssModule,o=e.value,a=o===void 0?0:o,s=e.min,l=s===void 0?0:s,c=e.max,d=c===void 0?100:c,f=e.animated,p=e.striped,m=e.color,v=e.bar,y=e.multi,x=e.tag,_=x===void 0?"div":x,w=e.style,S=w===void 0?{}:w,E=e.barStyle,O=E===void 0?{}:E,k=e.barAriaValueText,j=e.barAriaLabelledBy,A=cX(e,sX),U=fP(a)/fP(d)*100,R=Ve(We(n,"progress"),i),V=Ve(We("progress-bar",v&&n||r,f?"progress-bar-animated":null,m?"bg-".concat(m):null,p||f?"progress-bar-striped":null),i),W={className:V,style:z_(z_(z_({},v?S:{}),O),{},{width:"".concat(U,"%")}),role:"progressbar","aria-valuenow":a,"aria-valuemin":l,"aria-valuemax":d,"aria-valuetext":k,"aria-labelledby":j,children:t};return v?Y.createElement(_,wv({},A,W)):Y.createElement(_,wv({},A,{style:S,className:R}),y?t:Y.createElement("div",W))}n6.propTypes=dX;function Jw(e){"@babel/helpers - typeof";return Jw=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},Jw(e)}function fX(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function HP(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function xv(e){return xv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},xv(e)}var _X={children:N.node.isRequired,node:N.any},r6=function(e){pX(n,e);var t=mX(n);function n(){return fX(this,n),t.apply(this,arguments)}return hX(n,[{key:"componentWillUnmount",value:function(){this.defaultNode&&document.body.removeChild(this.defaultNode),this.defaultNode=null}},{key:"render",value:function(){return rE?(!this.props.node&&!this.defaultNode&&(this.defaultNode=document.createElement("div"),document.body.appendChild(this.defaultNode)),nl.createPortal(this.props.children,this.props.node||this.defaultNode)):null}}]),n}(Y.Component);r6.propTypes=_X;const bX=r6;function tx(e){"@babel/helpers - typeof";return tx=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},tx(e)}function WP(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 rc(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Sv(e){return Sv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Sv(e)}function Ev(){}var GP=N.shape(vr.propTypes),i6={autoFocus:N.bool,backdrop:N.oneOfType([N.bool,N.oneOf(["static"])]),backdropClassName:N.string,backdropTransition:GP,centered:N.bool,children:N.node,contentClassName:N.string,className:N.string,container:au,cssModule:N.object,external:N.node,fade:N.bool,fullscreen:N.oneOfType([N.bool,N.oneOf(["sm","md","lg","xl"])]),innerRef:N.oneOfType([N.object,N.string,N.func]),isOpen:N.bool,keyboard:N.bool,labelledBy:N.string,modalClassName:N.string,modalTransition:GP,onClosed:N.func,onEnter:N.func,onExit:N.func,onOpened:N.func,returnFocusAfterClose:N.bool,role:N.string,scrollable:N.bool,size:N.string,toggle:N.func,trapFocus:N.bool,unmountOnClose:N.bool,wrapClassName:N.string,zIndex:N.oneOfType([N.number,N.string])},CX=Object.keys(i6),kX={isOpen:!1,autoFocus:!0,centered:!1,scrollable:!1,role:"dialog",backdrop:!0,keyboard:!0,zIndex:1050,fade:!0,onOpened:Ev,onClosed:Ev,modalTransition:{timeout:av.Modal},backdropTransition:{mountOnEnter:!0,timeout:av.Fade},unmountOnClose:!0,returnFocusAfterClose:!0,container:"body",trapFocus:!1},Bh=function(e){SX(n,e);var t=EX(n);function n(r){var i;return wX(this,n),i=t.call(this,r),i._element=null,i._originalBodyPadding=null,i.getFocusableChildren=i.getFocusableChildren.bind(oi(i)),i.handleBackdropClick=i.handleBackdropClick.bind(oi(i)),i.handleBackdropMouseDown=i.handleBackdropMouseDown.bind(oi(i)),i.handleEscape=i.handleEscape.bind(oi(i)),i.handleStaticBackdropAnimation=i.handleStaticBackdropAnimation.bind(oi(i)),i.handleTab=i.handleTab.bind(oi(i)),i.onOpened=i.onOpened.bind(oi(i)),i.onClosed=i.onClosed.bind(oi(i)),i.manageFocusAfterClose=i.manageFocusAfterClose.bind(oi(i)),i.clearBackdropAnimationTimeout=i.clearBackdropAnimationTimeout.bind(oi(i)),i.trapFocus=i.trapFocus.bind(oi(i)),i.state={isOpen:!1,showStaticBackdropAnimation:!1},i}return xX(n,[{key:"componentDidMount",value:function(){var i=this.props,o=i.isOpen,a=i.autoFocus,s=i.onEnter;o&&(this.init(),this.setState({isOpen:!0}),a&&this.setFocus()),s&&s(),document.addEventListener("focus",this.trapFocus,!0),this._isMounted=!0}},{key:"componentDidUpdate",value:function(i,o){if(this.props.isOpen&&!i.isOpen){this.init(),this.setState({isOpen:!0});return}this.props.autoFocus&&this.state.isOpen&&!o.isOpen&&this.setFocus(),this._element&&i.zIndex!==this.props.zIndex&&(this._element.style.zIndex=this.props.zIndex)}},{key:"componentWillUnmount",value:function(){this.clearBackdropAnimationTimeout(),this.props.onExit&&this.props.onExit(),this._element&&(this.destroy(),(this.props.isOpen||this.state.isOpen)&&this.close()),document.removeEventListener("focus",this.trapFocus,!0),this._isMounted=!1}},{key:"handleBackdropClick",value:function(i){if(i.target===this._mouseDownElement){i.stopPropagation();var o=this._dialog?this._dialog.parentNode:null;if(o&&i.target===o&&this.props.backdrop==="static"&&this.handleStaticBackdropAnimation(),!this.props.isOpen||this.props.backdrop!==!0)return;o&&i.target===o&&this.props.toggle&&this.props.toggle(i)}}},{key:"handleTab",value:function(i){if(i.which===9&&!(this.modalIndex0&&(i.preventDefault(),i.stopPropagation(),o[0].focus())}}},{key:"init",value:function(){try{this._triggeringElement=document.activeElement}catch{this._triggeringElement=null}this._element||(this._element=document.createElement("div"),this._element.setAttribute("tabindex","-1"),this._element.style.position="relative",this._element.style.zIndex=this.props.zIndex,this._mountContainer=Xf(this.props.container),this._mountContainer.appendChild(this._element)),this._originalBodyPadding=xq(),n.openCount<1&&(n.originalBodyOverflow=window.getComputedStyle(document.body).overflow),Sq(),n.openCount===0&&(document.body.className=We(document.body.className,Ve("modal-open",this.props.cssModule)),document.body.style.overflow="hidden"),this.modalIndex=n.openCount,n.openCount+=1}},{key:"destroy",value:function(){this._element&&(this._mountContainer.removeChild(this._element),this._element=null),this.manageFocusAfterClose()}},{key:"manageFocusAfterClose",value:function(){if(this._triggeringElement){var i=this.props.returnFocusAfterClose;this._triggeringElement.focus&&i&&this._triggeringElement.focus(),this._triggeringElement=null}}},{key:"close",value:function(){if(n.openCount<=1){var i=Ve("modal-open",this.props.cssModule),o=new RegExp("(^| )".concat(i,"( |$)"));document.body.className=document.body.className.replace(o," ").trim(),document.body.style.overflow=n.originalBodyOverflow}this.manageFocusAfterClose(),n.openCount=Math.max(0,n.openCount-1),wI(this._originalBodyPadding)}},{key:"clearBackdropAnimationTimeout",value:function(){this._backdropAnimationTimeout&&(clearTimeout(this._backdropAnimationTimeout),this._backdropAnimationTimeout=void 0)}},{key:"renderModalDialog",value:function(){var i,o=this,a=gs(this.props,CX),s="modal-dialog";return Y.createElement("div",cf({},a,{className:Ve(We(s,this.props.className,(i={},pc(i,"modal-".concat(this.props.size),this.props.size),pc(i,"".concat(s,"-centered"),this.props.centered),pc(i,"".concat(s,"-scrollable"),this.props.scrollable),pc(i,"modal-fullscreen",this.props.fullscreen===!0),pc(i,"modal-fullscreen-".concat(this.props.fullscreen,"-down"),typeof this.props.fullscreen=="string"),i)),this.props.cssModule),role:"document",ref:function(c){o._dialog=c}}),Y.createElement("div",{className:Ve(We("modal-content",this.props.contentClassName),this.props.cssModule)},this.props.children))}},{key:"render",value:function(){var i=this.props.unmountOnClose;if(this._element&&(this.state.isOpen||!i)){var o=!!this._element&&!this.state.isOpen&&!i;this._element.style.display=o?"none":"block";var a=this.props,s=a.wrapClassName,l=a.modalClassName,c=a.backdropClassName,d=a.cssModule,f=a.isOpen,p=a.backdrop,m=a.role,v=a.labelledBy,y=a.external,x=a.innerRef,_={onClick:this.handleBackdropClick,onMouseDown:this.handleBackdropMouseDown,onKeyUp:this.handleEscape,onKeyDown:this.handleTab,style:{display:"block"},"aria-labelledby":v,"aria-modal":!0,role:m,tabIndex:"-1"},w=this.props.fade,S=rc(rc(rc({},vr.defaultProps),this.props.modalTransition),{},{baseClass:w?this.props.modalTransition.baseClass:"",timeout:w?this.props.modalTransition.timeout:0}),E=rc(rc(rc({},vr.defaultProps),this.props.backdropTransition),{},{baseClass:w?this.props.backdropTransition.baseClass:"",timeout:w?this.props.backdropTransition.timeout:0}),O=p&&(w?Y.createElement(vr,cf({},E,{in:f&&!!p,cssModule:d,className:Ve(We("modal-backdrop",c),d)})):Y.createElement("div",{className:Ve(We("modal-backdrop","show",c),d)}));return Y.createElement(bX,{node:this._element},Y.createElement("div",{className:Ve(s)},Y.createElement(vr,cf({},_,S,{in:f,onEntered:this.onOpened,onExited:this.onClosed,cssModule:d,className:Ve(We("modal",l,this.state.showStaticBackdropAnimation&&"modal-static"),d),innerRef:x}),y,this.renderModalDialog()),O))}return null}}]),n}(Y.Component);Bh.propTypes=i6;Bh.defaultProps=kX;Bh.openCount=0;Bh.originalBodyOverflow=null;const ua=Bh;var PX=["className","cssModule","children","toggle","tag","wrapTag","closeAriaLabel","close"];function rx(){return rx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function jX(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var MX={children:N.node,className:N.string,close:N.object,closeAriaLabel:N.string,cssModule:N.object,tag:it,toggle:N.func,wrapTag:it};function da(e){var t,n=e.className,r=e.cssModule,i=e.children,o=e.toggle,a=e.tag,s=a===void 0?"h5":a,l=e.wrapTag,c=l===void 0?"div":l,d=e.closeAriaLabel,f=d===void 0?"Close":d,p=e.close,m=LX(e,PX),v=Ve(We(n,"modal-header"),r);return!p&&o&&(t=Y.createElement("button",{type:"button",onClick:o,className:Ve("btn-close",r),"aria-label":f})),Y.createElement(c,rx({},m,{className:v}),Y.createElement(s,{className:Ve("modal-title",r)},i),p||t)}da.propTypes=MX;var NX=["className","cssModule","tag"];function ix(){return ix=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function AX(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var DX={className:N.string,cssModule:N.object,tag:it};function Eo(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=RX(e,NX),a=Ve(We(t,"modal-body"),n);return Y.createElement(i,ix({},o,{className:a}))}Eo.propTypes=DX;var IX=["className","cssModule","tag"];function ox(){return ox=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $X(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var UX={className:N.string,cssModule:N.object,tag:it};function Al(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=FX(e,IX),a=Ve(We(t,"modal-footer"),n);return Y.createElement(i,ox({},o,{className:a}))}Al.propTypes=UX;function ax(){return ax=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function HX(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var WX={className:N.string,cssModule:N.object,flush:N.bool,horizontal:N.oneOfType([N.bool,N.string]),numbered:N.bool,tag:it},YX=function(t){return t===!1?!1:t===!0||t==="xs"?"list-group-horizontal":"list-group-horizontal-".concat(t)};function o6(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"ul":r,o=e.flush,a=e.horizontal,s=a===void 0?!1:a,l=e.numbered,c=l===void 0?!1:l,d=VX(e,zX),f=Ve(We(t,"list-group",o?"list-group-flush":YX(s),{"list-group-numbered":c}),n);return Y.createElement(i,sx({},d,{className:f}))}o6.propTypes=WX;var GX=["className","cssModule","row","disabled","check","inline","floating","noMargin","tag","switch"];function lx(){return lx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ZX(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var KX={children:N.node,row:N.bool,check:N.bool,switch:N.bool,inline:N.bool,floating:N.bool,noMargin:N.bool,disabled:N.bool,tag:it,className:N.string,cssModule:N.object};function Ur(e){var t=e.className,n=e.cssModule,r=e.row,i=e.disabled,o=e.check,a=e.inline,s=e.floating,l=e.noMargin,c=e.tag,d=c===void 0?"div":c,f=e.switch,p=qX(e,GX),m=o||f,v=Ve(We(t,r?"row":!1,m?"form-check":!1,f?"form-switch":!1,m||l?!1:"mb-3",m&&a?"form-check-inline":!1,m&&i?"disabled":!1,s&&"form-floating"),n);return d==="fieldset"&&(p.disabled=i),Y.createElement(d,lx({},p,{className:v}))}Ur.propTypes=KX;function cx(e){"@babel/helpers - typeof";return cx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cx(e)}var QX=["className","cssModule","type","bsSize","valid","invalid","tag","addon","plaintext","innerRef"];function ux(){return ux=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function JX(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function eJ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qP(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.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Tv(e)}var aJ={children:N.node,type:N.string,size:N.oneOfType([N.number,N.string]),bsSize:N.string,valid:N.bool,invalid:N.bool,tag:it,innerRef:N.oneOfType([N.object,N.func,N.string]),plaintext:N.bool,addon:N.bool,className:N.string,cssModule:N.object},a6=function(e){nJ(n,e);var t=rJ(n);function n(r){var i;return eJ(this,n),i=t.call(this,r),i.getRef=i.getRef.bind(fx(i)),i.focus=i.focus.bind(fx(i)),i}return tJ(n,[{key:"getRef",value:function(i){this.props.innerRef&&this.props.innerRef(i),this.ref=i}},{key:"focus",value:function(){this.ref&&this.ref.focus()}},{key:"render",value:function(){var i=this.props,o=i.className,a=i.cssModule,s=i.type,l=s===void 0?"text":s,c=i.bsSize,d=i.valid,f=i.invalid,p=i.tag,m=i.addon,v=i.plaintext,y=i.innerRef,x=XX(i,QX),_=["switch","radio","checkbox"].indexOf(l)>-1,w=/\D/g,S=l==="textarea",E=l==="select",O=l==="range",k=p||(E||S?l:"input"),j="form-control";v?(j="".concat(j,"-plaintext"),k=p||"input"):O?j="form-range":E?j="form-select":_&&(m?j=null:j="form-check-input"),x.size&&w.test(x.size)&&(cw(`Please use the prop "bsSize" instead of the "size" to bootstrap's input sizing.`),c=x.size,delete x.size);var A=Ve(We(o,f&&"is-invalid",d&&"is-valid",c?E?"form-select-".concat(c):"form-control-".concat(c):!1,j),a);return(k==="input"||p&&typeof p=="function")&&(x.type=l==="switch"?"checkbox":l),x.children&&!(v||l==="select"||typeof k!="string"||k==="select")&&(cw('Input with a type of "'.concat(l,'" cannot have children. Please use "value"/"defaultValue" instead.')),delete x.children),Y.createElement(k,ux({},x,{ref:y,className:A,"aria-invalid":f}))}}]),n}(Y.Component);a6.propTypes=aJ;const bl=a6;var sJ=["className","cssModule","tag","type","size"];function Ov(){return Ov=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function cJ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var uJ={className:N.string,cssModule:N.object,size:N.string,tag:it,type:N.string};function o0(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r;e.type;var o=e.size,a=lJ(e,sJ),s=Ve(We(t,"input-group",o?"input-group-".concat(o):null),n);return e.type==="dropdown"?Y.createElement(Uh,Ov({},a,{className:s})):Y.createElement(YI.Provider,{value:{insideInputGroup:!0}},Y.createElement(i,Ov({},a,{className:s})))}o0.propTypes=uJ;var dJ=["className","listClassName","cssModule","size","tag","listTag","aria-label"];function hx(){return hx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function pJ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var mJ={children:N.node,className:N.string,listClassName:N.string,cssModule:N.object,size:N.string,tag:it,listTag:it,"aria-label":N.string};function _E(e){var t=e.className,n=e.listClassName,r=e.cssModule,i=e.size,o=e.tag,a=o===void 0?"nav":o,s=e.listTag,l=s===void 0?"ul":s,c=e["aria-label"],d=c===void 0?"pagination":c,f=hJ(e,dJ),p=Ve(We(t),r),m=Ve(We(n,"pagination",fJ({},"pagination-".concat(i),!!i)),r);return Y.createElement(a,{className:p,"aria-label":d},Y.createElement(l,hx({},f,{className:m})))}_E.propTypes=mJ;var gJ=["active","className","cssModule","disabled","tag"];function px(){return px=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function yJ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var _J={active:N.bool,children:N.node,className:N.string,cssModule:N.object,disabled:N.bool,tag:it};function il(e){var t=e.active,n=e.className,r=e.cssModule,i=e.disabled,o=e.tag,a=o===void 0?"li":o,s=vJ(e,gJ),l=Ve(We(n,"page-item",{active:t,disabled:i}),r);return Y.createElement(a,px({},s,{className:l}))}il.propTypes=_J;var bJ=["className","cssModule","next","previous","first","last","tag"];function mx(){return mx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function xJ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var SJ={"aria-label":N.string,children:N.node,className:N.string,cssModule:N.object,next:N.bool,previous:N.bool,first:N.bool,last:N.bool,tag:it};function ol(e){var t=e.className,n=e.cssModule,r=e.next,i=e.previous,o=e.first,a=e.last,s=e.tag,l=s===void 0?"a":s,c=wJ(e,bJ),d=Ve(We(t,"page-link"),n),f;i?f="Previous":r?f="Next":o?f="First":a&&(f="Last");var p=e["aria-label"]||f,m;i?m="‹":r?m="›":o?m="«":a&&(m="»");var v=e.children;return v&&Array.isArray(v)&&v.length===0&&(v=null),!c.href&&l==="a"&&(l="button"),(i||r||o||a)&&(v=[Y.createElement("span",{"aria-hidden":"true",key:"caret"},v||m),Y.createElement("span",{className:"visually-hidden",key:"ariaLabel"},p)]),Y.createElement(l,mx({},c,{className:d,"aria-label":p}),v)}ol.propTypes=SJ;var EJ=["className","closeClassName","closeAriaLabel","cssModule","tag","color","isOpen","toggle","children","transition","fade","innerRef"];function gx(){return gx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function CJ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var kJ={children:N.node,className:N.string,closeClassName:N.string,closeAriaLabel:N.string,color:N.string,cssModule:N.object,fade:N.bool,innerRef:N.oneOfType([N.object,N.string,N.func]),isOpen:N.bool,tag:it,toggle:N.func,transition:N.shape(vr.propTypes)};function s6(e){var t=e.className,n=e.closeClassName,r=e.closeAriaLabel,i=r===void 0?"Close":r,o=e.cssModule,a=e.tag,s=a===void 0?"div":a,l=e.color,c=l===void 0?"success":l,d=e.isOpen,f=d===void 0?!0:d,p=e.toggle,m=e.children,v=e.transition,y=v===void 0?bd(bd({},vr.defaultProps),{},{unmountOnExit:!0}):v,x=e.fade,_=x===void 0?!0:x,w=e.innerRef,S=OJ(e,EJ),E=Ve(We(t,"alert","alert-".concat(c),{"alert-dismissible":p}),o),O=Ve(We("btn-close",n),o),k=bd(bd(bd({},vr.defaultProps),y),{},{baseClass:_?y.baseClass:"",timeout:_?y.timeout:0});return Y.createElement(vr,gx({},S,k,{tag:s,className:E,in:f,role:"alert",innerRef:w}),p?Y.createElement("button",{type:"button",className:O,"aria-label":i,onClick:p}):null,m)}s6.propTypes=kJ;var PJ=["className","cssModule","tag","active","disabled","action","color"];function vx(){return vx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function jJ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var MJ={action:N.bool,active:N.bool,className:N.string,cssModule:N.object,color:N.string,disabled:N.bool,tag:it},NJ=function(t){t.preventDefault()};function l6(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"li":r,o=e.active,a=e.disabled,s=e.action,l=e.color,c=LJ(e,PJ),d=Ve(We(t,o?"active":!1,a?"disabled":!1,s?"list-group-item-action":!1,l?"list-group-item-".concat(l):!1,"list-group-item"),n);return a&&(c.onClick=NJ),Y.createElement(i,vx({},c,{className:d}))}l6.propTypes=MJ;function yx(e){"@babel/helpers - typeof";return yx=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},yx(e)}function KP(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 RJ(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Cv(e){return Cv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Cv(e)}var zJ=["defaultOpen"],Vh=function(e){FJ(n,e);var t=$J(n);function n(r){var i;return DJ(this,n),i=t.call(this,r),i.state={isOpen:r.defaultOpen||!1},i.toggle=i.toggle.bind(c6(i)),i}return IJ(n,[{key:"toggle",value:function(i){var o=this;this.setState(function(a){return{isOpen:!a.isOpen}},function(){o.props.onToggle&&o.props.onToggle(i,o.state.isOpen)})}},{key:"render",value:function(){return Y.createElement(Uh,_x({isOpen:this.state.isOpen,toggle:this.toggle},gs(this.props,zJ)))}}]),n}(I.Component);Vh.propTypes=RJ({defaultOpen:N.bool,onToggle:N.func},Uh.propTypes);function wx(e){"@babel/helpers - typeof";return wx=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},wx(e)}function XP(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 VJ(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function kv(e){return kv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},kv(e)}var QJ=["defaultOpen"],Rr=function(e){GJ(n,e);var t=qJ(n);function n(r){var i;return WJ(this,n),i=t.call(this,r),i.state={isOpen:r.defaultOpen||!1},i.toggle=i.toggle.bind(u6(i)),i}return YJ(n,[{key:"toggle",value:function(){this.setState(function(i){return{isOpen:!i.isOpen}})}},{key:"render",value:function(){return Y.createElement(zh,xx({isOpen:this.state.isOpen,toggle:this.toggle},gs(this.props,QJ)))}}]),n}(I.Component);Rr.propTypes=VJ({defaultOpen:N.bool},zh.propTypes);function d6(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function XJ(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var f6={exports:{}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames -*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i({error:"border-danger",default:""})[e],eee=e=>({error:"text-danger",default:"text-muted"})[e],Ho=({className:e,children:t,loading:n=!1,type:r="default",fullWidth:i=!1})=>{const o=hi({"col-md-12":i,"col-md-10 offset-md-1":!i});return g.jsx(gr,{className:hi("g-0",e),children:g.jsx("div",{className:o,children:g.jsx(Gr,{className:JJ(r),body:!0,children:g.jsxs("h3",{className:hi("text-center mb-0",eee(r)),children:[n&&g.jsx(Ne,{icon:DD,spin:!0}),n&&g.jsx("span",{className:"ms-2",children:t??"Loading..."}),!n&&t]})})})})},mn=({title:e,children:t,bodyClassName:n,...r})=>g.jsxs(Gr,{...r,children:[e&&g.jsx(hu,{role:"heading","aria-level":4,children:e}),g.jsx(fu,{className:n,children:t})]}),zr=({children:e,type:t,className:n,small:r=!1})=>g.jsx(gr,{className:n,children:g.jsx("div",{className:hi({"col-md-10 offset-md-1":!r,"col-12":r}),children:g.jsx(mn,{role:"document",className:hi("text-center",{"bg-main":t==="success","bg-danger":t==="error","bg-warning":t==="warning","text-white":t!=="warning"}),bodyClassName:hi({"p-2":r}),children:e})})});let cm;const tee=new Uint8Array(16);function nee(){if(!cm&&(cm=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!cm))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return cm(tee)}const Yn=[];for(let e=0;e<256;++e)Yn.push((e+256).toString(16).slice(1));function ree(e,t=0){return Yn[e[t+0]]+Yn[e[t+1]]+Yn[e[t+2]]+Yn[e[t+3]]+"-"+Yn[e[t+4]]+Yn[e[t+5]]+"-"+Yn[e[t+6]]+Yn[e[t+7]]+"-"+Yn[e[t+8]]+Yn[e[t+9]]+"-"+Yn[e[t+10]]+Yn[e[t+11]]+Yn[e[t+12]]+Yn[e[t+13]]+Yn[e[t+14]]+Yn[e[t+15]]}const iee=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),eL={randomUUID:iee};function oee(e,t,n){if(eL.randomUUID&&!t&&!e)return eL.randomUUID();e=e||{};const r=e.random||(e.rng||nee)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return ree(r)}const Sn=(e=!1)=>{const[t,n]=I.useState(e),r=I.useCallback(()=>n(a=>!a),[]),i=I.useCallback(()=>n(!0),[]),o=I.useCallback(()=>n(!1),[]);return[t,r,i,o]},h6=(e=!1,t=2e3,n=window.setTimeout,r=window.clearTimeout)=>{const[i,o]=I.useState(e),a=I.useRef(e),s=I.useRef(),l=I.useCallback(()=>{o(!a.current),s.current&&r(s.current),s.current=n(()=>o(a.current),t)},[r,t,n]);return[i,l]},a0=()=>{const{current:e}=I.useRef(`dom-${oee()}`);return e},ys=()=>I.useRef(null),p6=({checked:e=!1,onChange:t,className:n,children:r,type:i,inline:o=!1})=>{const a=a0(),s=d=>t==null?void 0:t(d.target.checked,d),l={"form-switch":i==="switch","form-checkbox":i==="checkbox"},c=o?{display:"inline-block"}:{};return g.jsxs("span",{className:hi("form-check",l,n),style:c,children:[g.jsx("input",{type:"checkbox",className:"form-check-input",id:a,checked:e,onChange:s}),g.jsx("label",{className:"form-check-label",htmlFor:a,children:r})]})},m6=e=>g.jsx(p6,{type:"checkbox",...e}),pu=e=>g.jsx(p6,{type:"switch",...e}),Uu=({children:e,label:t,className:n="",labelClassName:r="",noMargin:i=!1,id:o})=>g.jsxs("div",{className:`${n} ${i?"":"mb-3"}`,children:[g.jsx("label",{className:`form-label ${r}`,htmlFor:o,children:t}),e]}),ag=({children:e,value:t,onChange:n,type:r,required:i,placeholder:o,className:a,labelClassName:s})=>{const l=a0();return g.jsx(Uu,{label:g.jsxs(g.Fragment,{children:[e,":"]}),className:a,labelClassName:s,id:l,children:g.jsx("input",{id:l,className:"form-control",type:r??"text",value:t,required:i??!0,placeholder:o,onChange:c=>n(c.target.value)})})},aee=500;let sg;const tL=()=>{sg&&clearTimeout(sg),sg=null},Hh=({onChange:e,className:t,large:n=!0,noBorder:r=!1,initialValue:i="",setTimeout_:o=setTimeout})=>{const[a,s]=I.useState(i),l=(c,d=aee)=>{s(c),tL(),sg=o(()=>{e(c),tL()},d)};return g.jsxs("div",{className:hi("search-field",t),children:[g.jsx("input",{type:"text",className:hi("form-control search-field__input",{"form-control-lg":n,"search-field__input--no-border":r}),placeholder:"Search...",value:a,onChange:c=>l(c.target.value)}),g.jsx(Ne,{icon:cY,className:"search-field__icon"}),g.jsx("button",{"aria-label":"Clear search",type:"button",className:"close search-field__close btn-close",hidden:a==="",id:"search-field__close",onClick:()=>l("",0)})]})},fa=({text:e,disabled:t=!1,className:n,children:r,dropdownClassName:i,noCaret:o,end:a=!1,minWidth:s,inline:l,size:c,...d})=>{const[f,p]=Sn(),m=hi("dropdown-btn__toggle",n,{"btn-block":!l,"dropdown-btn__toggle--with-caret":!o}),v={minWidth:s&&`${s}px`};return g.jsxs(Uh,{isOpen:f,toggle:p,disabled:t,className:i,children:[g.jsx(Fu,{size:c,caret:!o,className:m,color:"primary",...d,children:e}),g.jsx(Iu,{className:"w-100",end:a,style:v,children:r})]})},s0=({children:e,minWidth:t,label:n="Options"})=>g.jsx(fa,{text:g.jsx(Ne,{className:"px-1",icon:eY}),"aria-label":n,size:"sm",minWidth:t,end:!0,noCaret:!0,inline:!0,children:e}),uf=({children:e,...t})=>g.jsx(oE,{children:g.jsx(LI,{className:"nav-pills__nav-link",tag:wD,...t,children:e})}),g6=({children:e,fill:t=!1,className:n=""})=>g.jsx(Gr,{className:`nav-pills__nav p-0 overflow-hidden ${n}`,body:!0,children:g.jsx(iE,{pills:!0,fill:t,children:I.Children.map(e,r=>{if(!I.isValidElement(r)||r.type!==uf)throw new Error("Only NavPillItem children are allowed inside NavPills.");return r})})}),l0=(e,t,n)=>e!==t?"ASC":n?{ASC:"DESC",DESC:void 0}[n]:"ASC",v6=(e,{field:t,dir:n})=>!t||!n?e:e.sort((r,i)=>{const o=n==="ASC"?1:-1,a=n==="ASC"?-1:1;return r[t]>i[t]?o:a}),see=e=>e.dir?`${e.field}-${e.dir}`:void 0,lee=e=>{const[t,n]=e.split("-");return{field:t,dir:n}};function Wh({items:e,order:t,onChange:n,isButton:r=!0,right:i=!1,prefixed:o=!0}){const a=s=>()=>{const l=l0(s,t.field,t.dir);n(l?s:void 0,l)};return g.jsxs(Vh,{children:[g.jsxs(Fu,{caret:!0,color:r?"primary":"link",className:hi({"dropdown-btn__toggle btn-block pe-4 overflow-hidden":r,"btn-sm p-0":!r}),children:[!r&&g.jsx(g.Fragment,{children:"Order by"}),r&&!t.field&&g.jsx("i",{children:"Order by..."}),r&&t.field&&g.jsxs(g.Fragment,{children:[o&&"Order by: ",e[t.field]," - ",g.jsx("small",{children:t.dir??"DESC"})]})]}),g.jsxs(Iu,{end:i,className:hi("w-100",{"ordering-dropdown__menu--link":!r}),children:[Object.entries(e).map(([s,l])=>g.jsxs(Ue,{active:t.field===s,onClick:a(s),children:[l,t.field===s&&g.jsx(Ne,{icon:t.dir==="ASC"?iY:HW,className:"ordering-dropdown__sort-icon"})]},s)),g.jsx(Ue,{divider:!0}),g.jsx(Ue,{disabled:!t.field,onClick:()=>n(),children:g.jsx("i",{children:"Clear selection"})})]})]})}const bE="#4696e5",cee="rgba(70, 150, 229, 0.4)",y6="#f77f28",uee="rgba(247, 127, 40, 0.4)",dee="white",fee="#161b22",hee=e=>{var t;return(t=document.querySelector("html"))==null?void 0:t.setAttribute("data-theme",e)},pee=()=>{var e;return((e=document.querySelector("html"))==null?void 0:e.getAttribute("data-theme"))==="dark"};var mee=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var r=42;e[t]=r;for(t in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var i=Object.getOwnPropertySymbols(e);if(i.length!==1||i[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==r||o.enumerable!==!0)return!1}return!0},nL=typeof Symbol<"u"&&Symbol,gee=mee,vee=function(){return typeof nL!="function"||typeof Symbol!="function"||typeof nL("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:gee()},rL={foo:{}},yee=Object,_ee=function(){return{__proto__:rL}.foo===rL.foo&&!({__proto__:null}instanceof yee)},bee="Function.prototype.bind called on incompatible ",V_=Array.prototype.slice,wee=Object.prototype.toString,xee="[object Function]",See=function(e){var t=this;if(typeof t!="function"||wee.call(t)!==xee)throw new TypeError(bee+t);for(var n=V_.call(arguments,1),r,i=function(){if(this instanceof r){var c=t.apply(this,n.concat(V_.call(arguments)));return Object(c)===c?c:this}else return t.apply(e,n.concat(V_.call(arguments)))},o=Math.max(0,t.length-n.length),a=[],s=0;s"u"||!Ln?at:Ln(Uint8Array),sl={"%AggregateError%":typeof AggregateError>"u"?at:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?at:ArrayBuffer,"%ArrayIteratorPrototype%":ic&&Ln?Ln([][Symbol.iterator]()):at,"%AsyncFromSyncIteratorPrototype%":at,"%AsyncFunction%":mc,"%AsyncGenerator%":mc,"%AsyncGeneratorFunction%":mc,"%AsyncIteratorPrototype%":mc,"%Atomics%":typeof Atomics>"u"?at:Atomics,"%BigInt%":typeof BigInt>"u"?at:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?at:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?at:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?at:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?at:Float32Array,"%Float64Array%":typeof Float64Array>"u"?at:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?at:FinalizationRegistry,"%Function%":_6,"%GeneratorFunction%":mc,"%Int8Array%":typeof Int8Array>"u"?at:Int8Array,"%Int16Array%":typeof Int16Array>"u"?at:Int16Array,"%Int32Array%":typeof Int32Array>"u"?at:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ic&&Ln?Ln(Ln([][Symbol.iterator]())):at,"%JSON%":typeof JSON=="object"?JSON:at,"%Map%":typeof Map>"u"?at:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ic||!Ln?at:Ln(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?at:Promise,"%Proxy%":typeof Proxy>"u"?at:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?at:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?at:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ic||!Ln?at:Ln(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?at:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ic&&Ln?Ln(""[Symbol.iterator]()):at,"%Symbol%":ic?Symbol:at,"%SyntaxError%":mu,"%ThrowTypeError%":Cee,"%TypedArray%":Pee,"%TypeError%":Wc,"%Uint8Array%":typeof Uint8Array>"u"?at:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?at:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?at:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?at:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?at:WeakMap,"%WeakRef%":typeof WeakRef>"u"?at:WeakRef,"%WeakSet%":typeof WeakSet>"u"?at:WeakSet};if(Ln)try{null.error}catch(e){var Lee=Ln(Ln(e));sl["%Error.prototype%"]=Lee}var jee=function e(t){var n;if(t==="%AsyncFunction%")n=H_("async function () {}");else if(t==="%GeneratorFunction%")n=H_("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=H_("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&Ln&&(n=Ln(i.prototype))}return sl[t]=n,n},iL={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Yh=wE,Pv=Oee,Mee=Yh.call(Function.call,Array.prototype.concat),Nee=Yh.call(Function.apply,Array.prototype.splice),oL=Yh.call(Function.call,String.prototype.replace),Lv=Yh.call(Function.call,String.prototype.slice),Ree=Yh.call(Function.call,RegExp.prototype.exec),Aee=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Dee=/\\(\\)?/g,Iee=function(e){var t=Lv(e,0,1),n=Lv(e,-1);if(t==="%"&&n!=="%")throw new mu("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new mu("invalid intrinsic syntax, expected opening `%`");var r=[];return oL(e,Aee,function(i,o,a,s){r[r.length]=a?oL(s,Dee,"$1"):o||i}),r},Fee=function(e,t){var n=e,r;if(Pv(iL,n)&&(r=iL[n],n="%"+r[0]+"%"),Pv(sl,n)){var i=sl[n];if(i===mc&&(i=jee(n)),typeof i>"u"&&!t)throw new Wc("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new mu("intrinsic "+e+" does not exist!")},xE=function(e,t){if(typeof e!="string"||e.length===0)throw new Wc("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new Wc('"allowMissing" argument must be a boolean');if(Ree(/^%?[^%]*%?$/,e)===null)throw new mu("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Iee(e),r=n.length>0?n[0]:"",i=Fee("%"+r+"%",t),o=i.name,a=i.value,s=!1,l=i.alias;l&&(r=l[0],Nee(n,Mee([0,1],l)));for(var c=1,d=!0;c=n.length){var v=al(a,f);d=!!v,d&&"get"in v&&!("originalValue"in v.get)?a=v.get:a=a[f]}else d=Pv(a,f),a=a[f];d&&!s&&(sl[o]=a)}}return a},b6={exports:{}};(function(e){var t=wE,n=xE,r=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),o=n("%Reflect.apply%",!0)||t.call(i,r),a=n("%Object.getOwnPropertyDescriptor%",!0),s=n("%Object.defineProperty%",!0),l=n("%Math.max%");if(s)try{s({},"a",{value:1})}catch{s=null}e.exports=function(d){var f=o(t,i,arguments);if(a&&s){var p=a(f,"length");p.configurable&&s(f,"length",{value:1+l(0,d.length-(arguments.length-1))})}return f};var c=function(){return o(t,r,arguments)};s?s(e.exports,"apply",{value:c}):e.exports.apply=c})(b6);var $ee=b6.exports,w6=xE,x6=$ee,Uee=x6(w6("String.prototype.indexOf")),Bee=function(e,t){var n=w6(e,!!t);return typeof n=="function"&&Uee(e,".prototype.")>-1?x6(n):n};const zee={},Vee=Object.freeze(Object.defineProperty({__proto__:null,default:zee},Symbol.toStringTag,{value:"Module"})),Hee=QJ(Vee);var SE=typeof Map=="function"&&Map.prototype,Y_=Object.getOwnPropertyDescriptor&&SE?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,jv=SE&&Y_&&typeof Y_.get=="function"?Y_.get:null,aL=SE&&Map.prototype.forEach,EE=typeof Set=="function"&&Set.prototype,G_=Object.getOwnPropertyDescriptor&&EE?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Mv=EE&&G_&&typeof G_.get=="function"?G_.get:null,sL=EE&&Set.prototype.forEach,Wee=typeof WeakMap=="function"&&WeakMap.prototype,df=Wee?WeakMap.prototype.has:null,Yee=typeof WeakSet=="function"&&WeakSet.prototype,ff=Yee?WeakSet.prototype.has:null,Gee=typeof WeakRef=="function"&&WeakRef.prototype,lL=Gee?WeakRef.prototype.deref:null,qee=Boolean.prototype.valueOf,Zee=Object.prototype.toString,Kee=Function.prototype.toString,Qee=String.prototype.match,TE=String.prototype.slice,Da=String.prototype.replace,Xee=String.prototype.toUpperCase,cL=String.prototype.toLowerCase,S6=RegExp.prototype.test,uL=Array.prototype.concat,ao=Array.prototype.join,Jee=Array.prototype.slice,dL=Math.floor,Ex=typeof BigInt=="function"?BigInt.prototype.valueOf:null,q_=Object.getOwnPropertySymbols,Tx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,gu=typeof Symbol=="function"&&typeof Symbol.iterator=="object",ar=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===gu||"symbol")?Symbol.toStringTag:null,E6=Object.prototype.propertyIsEnumerable,fL=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function hL(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||S6.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-dL(-e):dL(e);if(r!==e){var i=String(r),o=TE.call(t,i.length+1);return Da.call(i,n,"$&_")+"."+Da.call(Da.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Da.call(t,n,"$&_")}var Ox=Hee,pL=Ox.custom,mL=O6(pL)?pL:null,ete=function e(t,n,r,i){var o=n||{};if(Ca(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Ca(o,"maxStringLength")&&(typeof o.maxStringLength=="number"?o.maxStringLength<0&&o.maxStringLength!==1/0:o.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=Ca(o,"customInspect")?o.customInspect:!0;if(typeof a!="boolean"&&a!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Ca(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(Ca(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=o.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return k6(t,o);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return s?hL(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return s?hL(t,c):c}var d=typeof o.depth>"u"?5:o.depth;if(typeof r>"u"&&(r=0),r>=d&&d>0&&typeof t=="object")return Cx(t)?"[Array]":"[Object]";var f=yte(o,r);if(typeof i>"u")i=[];else if(C6(i,t)>=0)return"[Circular]";function p(X,G,Z){if(G&&(i=Jee.call(i),i.push(G)),Z){var ne={depth:o.depth};return Ca(o,"quoteStyle")&&(ne.quoteStyle=o.quoteStyle),e(X,ne,r+1,i)}return e(X,o,r+1,i)}if(typeof t=="function"&&!gL(t)){var m=cte(t),v=um(t,p);return"[Function"+(m?": "+m:" (anonymous)")+"]"+(v.length>0?" { "+ao.call(v,", ")+" }":"")}if(O6(t)){var y=gu?Da.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Tx.call(t);return typeof t=="object"&&!gu?wd(y):y}if(mte(t)){for(var x="<"+cL.call(String(t.nodeName)),_=t.attributes||[],w=0;w<_.length;w++)x+=" "+_[w].name+"="+T6(tte(_[w].value),"double",o);return x+=">",t.childNodes&&t.childNodes.length&&(x+="..."),x+="",x}if(Cx(t)){if(t.length===0)return"[]";var S=um(t,p);return f&&!vte(S)?"["+kx(S,f)+"]":"[ "+ao.call(S,", ")+" ]"}if(rte(t)){var E=um(t,p);return!("cause"in Error.prototype)&&"cause"in t&&!E6.call(t,"cause")?"{ ["+String(t)+"] "+ao.call(uL.call("[cause]: "+p(t.cause),E),", ")+" }":E.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+ao.call(E,", ")+" }"}if(typeof t=="object"&&a){if(mL&&typeof t[mL]=="function"&&Ox)return Ox(t,{depth:d-r});if(a!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(ute(t)){var O=[];return aL&&aL.call(t,function(X,G){O.push(p(G,t,!0)+" => "+p(X,t))}),vL("Map",jv.call(t),O,f)}if(hte(t)){var k=[];return sL&&sL.call(t,function(X){k.push(p(X,t))}),vL("Set",Mv.call(t),k,f)}if(dte(t))return Z_("WeakMap");if(pte(t))return Z_("WeakSet");if(fte(t))return Z_("WeakRef");if(ote(t))return wd(p(Number(t)));if(ste(t))return wd(p(Ex.call(t)));if(ate(t))return wd(qee.call(t));if(ite(t))return wd(p(String(t)));if(!nte(t)&&!gL(t)){var j=um(t,p),A=fL?fL(t)===Object.prototype:t instanceof Object||t.constructor===Object,U=t instanceof Object?"":"null prototype",R=!A&&ar&&Object(t)===t&&ar in t?TE.call(_s(t),8,-1):U?"Object":"",V=A||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",W=V+(R||U?"["+ao.call(uL.call([],R||[],U||[]),": ")+"] ":"");return j.length===0?W+"{}":f?W+"{"+kx(j,f)+"}":W+"{ "+ao.call(j,", ")+" }"}return String(t)};function T6(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function tte(e){return Da.call(String(e),/"/g,""")}function Cx(e){return _s(e)==="[object Array]"&&(!ar||!(typeof e=="object"&&ar in e))}function nte(e){return _s(e)==="[object Date]"&&(!ar||!(typeof e=="object"&&ar in e))}function gL(e){return _s(e)==="[object RegExp]"&&(!ar||!(typeof e=="object"&&ar in e))}function rte(e){return _s(e)==="[object Error]"&&(!ar||!(typeof e=="object"&&ar in e))}function ite(e){return _s(e)==="[object String]"&&(!ar||!(typeof e=="object"&&ar in e))}function ote(e){return _s(e)==="[object Number]"&&(!ar||!(typeof e=="object"&&ar in e))}function ate(e){return _s(e)==="[object Boolean]"&&(!ar||!(typeof e=="object"&&ar in e))}function O6(e){if(gu)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Tx)return!1;try{return Tx.call(e),!0}catch{}return!1}function ste(e){if(!e||typeof e!="object"||!Ex)return!1;try{return Ex.call(e),!0}catch{}return!1}var lte=Object.prototype.hasOwnProperty||function(e){return e in this};function Ca(e,t){return lte.call(e,t)}function _s(e){return Zee.call(e)}function cte(e){if(e.name)return e.name;var t=Qee.call(Kee.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function C6(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 k6(TE.call(e,0,t.maxStringLength),t)+r}var i=Da.call(Da.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,gte);return T6(i,"single",t)}function gte(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":"")+Xee.call(t.toString(16))}function wd(e){return"Object("+e+")"}function Z_(e){return e+" { ? }"}function vL(e,t,n,r){var i=r?kx(n,r):ao.call(n,", ");return e+" ("+t+") {"+i+"}"}function vte(e){for(var t=0;t=0)return!1;return!0}function yte(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=ao.call(Array(e.indent+1)," ");else return null;return{base:n,prev:ao.call(Array(t+1),n)}}function kx(e,t){if(e.length===0)return"";var n=` +*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i({error:"border-danger",default:""})[e],tee=e=>({error:"text-danger",default:"text-muted"})[e],Ho=({className:e,children:t,loading:n=!1,type:r="default",fullWidth:i=!1})=>{const o=hi({"col-md-12":i,"col-md-10 offset-md-1":!i});return g.jsx(gr,{className:hi("g-0",e),children:g.jsx("div",{className:o,children:g.jsx(Gr,{className:eee(r),body:!0,children:g.jsxs("h3",{className:hi("text-center mb-0",tee(r)),children:[n&&g.jsx(Ne,{icon:DD,spin:!0}),n&&g.jsx("span",{className:"ms-2",children:t??"Loading..."}),!n&&t]})})})})},mn=({title:e,children:t,bodyClassName:n,...r})=>g.jsxs(Gr,{...r,children:[e&&g.jsx(hu,{role:"heading","aria-level":4,children:e}),g.jsx(fu,{className:n,children:t})]}),zr=({children:e,type:t,className:n,small:r=!1})=>g.jsx(gr,{className:n,children:g.jsx("div",{className:hi({"col-md-10 offset-md-1":!r,"col-12":r}),children:g.jsx(mn,{role:"document",className:hi("text-center",{"bg-main":t==="success","bg-danger":t==="error","bg-warning":t==="warning","text-white":t!=="warning"}),bodyClassName:hi({"p-2":r}),children:e})})});let cm;const nee=new Uint8Array(16);function ree(){if(!cm&&(cm=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!cm))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return cm(nee)}const Yn=[];for(let e=0;e<256;++e)Yn.push((e+256).toString(16).slice(1));function iee(e,t=0){return Yn[e[t+0]]+Yn[e[t+1]]+Yn[e[t+2]]+Yn[e[t+3]]+"-"+Yn[e[t+4]]+Yn[e[t+5]]+"-"+Yn[e[t+6]]+Yn[e[t+7]]+"-"+Yn[e[t+8]]+Yn[e[t+9]]+"-"+Yn[e[t+10]]+Yn[e[t+11]]+Yn[e[t+12]]+Yn[e[t+13]]+Yn[e[t+14]]+Yn[e[t+15]]}const oee=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),eL={randomUUID:oee};function aee(e,t,n){if(eL.randomUUID&&!t&&!e)return eL.randomUUID();e=e||{};const r=e.random||(e.rng||ree)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return iee(r)}const Sn=(e=!1)=>{const[t,n]=I.useState(e),r=I.useCallback(()=>n(a=>!a),[]),i=I.useCallback(()=>n(!0),[]),o=I.useCallback(()=>n(!1),[]);return[t,r,i,o]},h6=(e=!1,t=2e3,n=window.setTimeout,r=window.clearTimeout)=>{const[i,o]=I.useState(e),a=I.useRef(e),s=I.useRef(),l=I.useCallback(()=>{o(!a.current),s.current&&r(s.current),s.current=n(()=>o(a.current),t)},[r,t,n]);return[i,l]},a0=()=>{const{current:e}=I.useRef(`dom-${aee()}`);return e},ys=()=>I.useRef(null),p6=({checked:e=!1,onChange:t,className:n,children:r,type:i,inline:o=!1})=>{const a=a0(),s=d=>t==null?void 0:t(d.target.checked,d),l={"form-switch":i==="switch","form-checkbox":i==="checkbox"},c=o?{display:"inline-block"}:{};return g.jsxs("span",{className:hi("form-check",l,n),style:c,children:[g.jsx("input",{type:"checkbox",className:"form-check-input",id:a,checked:e,onChange:s}),g.jsx("label",{className:"form-check-label",htmlFor:a,children:r})]})},m6=e=>g.jsx(p6,{type:"checkbox",...e}),pu=e=>g.jsx(p6,{type:"switch",...e}),Uu=({children:e,label:t,className:n="",labelClassName:r="",noMargin:i=!1,id:o})=>g.jsxs("div",{className:`${n} ${i?"":"mb-3"}`,children:[g.jsx("label",{className:`form-label ${r}`,htmlFor:o,children:t}),e]}),ag=({children:e,value:t,onChange:n,type:r,required:i,placeholder:o,className:a,labelClassName:s})=>{const l=a0();return g.jsx(Uu,{label:g.jsxs(g.Fragment,{children:[e,":"]}),className:a,labelClassName:s,id:l,children:g.jsx("input",{id:l,className:"form-control",type:r??"text",value:t,required:i??!0,placeholder:o,onChange:c=>n(c.target.value)})})},see=500;let sg;const tL=()=>{sg&&clearTimeout(sg),sg=null},Hh=({onChange:e,className:t,large:n=!0,noBorder:r=!1,initialValue:i="",setTimeout_:o=setTimeout})=>{const[a,s]=I.useState(i),l=(c,d=see)=>{s(c),tL(),sg=o(()=>{e(c),tL()},d)};return g.jsxs("div",{className:hi("search-field",t),children:[g.jsx("input",{type:"text",className:hi("form-control search-field__input",{"form-control-lg":n,"search-field__input--no-border":r}),placeholder:"Search...",value:a,onChange:c=>l(c.target.value)}),g.jsx(Ne,{icon:uY,className:"search-field__icon"}),g.jsx("button",{"aria-label":"Clear search",type:"button",className:"close search-field__close btn-close",hidden:a==="",id:"search-field__close",onClick:()=>l("",0)})]})},fa=({text:e,disabled:t=!1,className:n,children:r,dropdownClassName:i,noCaret:o,end:a=!1,minWidth:s,inline:l,size:c,...d})=>{const[f,p]=Sn(),m=hi("dropdown-btn__toggle",n,{"btn-block":!l,"dropdown-btn__toggle--with-caret":!o}),v={minWidth:s&&`${s}px`};return g.jsxs(Uh,{isOpen:f,toggle:p,disabled:t,className:i,children:[g.jsx(Fu,{size:c,caret:!o,className:m,color:"primary",...d,children:e}),g.jsx(Iu,{className:"w-100",end:a,style:v,children:r})]})},s0=({children:e,minWidth:t,label:n="Options"})=>g.jsx(fa,{text:g.jsx(Ne,{className:"px-1",icon:tY}),"aria-label":n,size:"sm",minWidth:t,end:!0,noCaret:!0,inline:!0,children:e}),uf=({children:e,...t})=>g.jsx(oE,{children:g.jsx(LI,{className:"nav-pills__nav-link",tag:wD,...t,children:e})}),g6=({children:e,fill:t=!1,className:n=""})=>g.jsx(Gr,{className:`nav-pills__nav p-0 overflow-hidden ${n}`,body:!0,children:g.jsx(iE,{pills:!0,fill:t,children:I.Children.map(e,r=>{if(!I.isValidElement(r)||r.type!==uf)throw new Error("Only NavPillItem children are allowed inside NavPills.");return r})})}),l0=(e,t,n)=>e!==t?"ASC":n?{ASC:"DESC",DESC:void 0}[n]:"ASC",v6=(e,{field:t,dir:n})=>!t||!n?e:e.sort((r,i)=>{const o=n==="ASC"?1:-1,a=n==="ASC"?-1:1;return r[t]>i[t]?o:a}),lee=e=>e.dir?`${e.field}-${e.dir}`:void 0,cee=e=>{const[t,n]=e.split("-");return{field:t,dir:n}};function Wh({items:e,order:t,onChange:n,isButton:r=!0,right:i=!1,prefixed:o=!0}){const a=s=>()=>{const l=l0(s,t.field,t.dir);n(l?s:void 0,l)};return g.jsxs(Vh,{children:[g.jsxs(Fu,{caret:!0,color:r?"primary":"link",className:hi({"dropdown-btn__toggle btn-block pe-4 overflow-hidden":r,"btn-sm p-0":!r}),children:[!r&&g.jsx(g.Fragment,{children:"Order by"}),r&&!t.field&&g.jsx("i",{children:"Order by..."}),r&&t.field&&g.jsxs(g.Fragment,{children:[o&&"Order by: ",e[t.field]," - ",g.jsx("small",{children:t.dir??"DESC"})]})]}),g.jsxs(Iu,{end:i,className:hi("w-100",{"ordering-dropdown__menu--link":!r}),children:[Object.entries(e).map(([s,l])=>g.jsxs(Ue,{active:t.field===s,onClick:a(s),children:[l,t.field===s&&g.jsx(Ne,{icon:t.dir==="ASC"?oY:WW,className:"ordering-dropdown__sort-icon"})]},s)),g.jsx(Ue,{divider:!0}),g.jsx(Ue,{disabled:!t.field,onClick:()=>n(),children:g.jsx("i",{children:"Clear selection"})})]})]})}const bE="#4696e5",uee="rgba(70, 150, 229, 0.4)",y6="#f77f28",dee="rgba(247, 127, 40, 0.4)",fee="white",hee="#161b22",pee=e=>{var t;return(t=document.querySelector("html"))==null?void 0:t.setAttribute("data-theme",e)},mee=()=>{var e;return((e=document.querySelector("html"))==null?void 0:e.getAttribute("data-theme"))==="dark"};var gee=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var r=42;e[t]=r;for(t in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var i=Object.getOwnPropertySymbols(e);if(i.length!==1||i[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==r||o.enumerable!==!0)return!1}return!0},nL=typeof Symbol<"u"&&Symbol,vee=gee,yee=function(){return typeof nL!="function"||typeof Symbol!="function"||typeof nL("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:vee()},rL={foo:{}},_ee=Object,bee=function(){return{__proto__:rL}.foo===rL.foo&&!({__proto__:null}instanceof _ee)},wee="Function.prototype.bind called on incompatible ",V_=Array.prototype.slice,xee=Object.prototype.toString,See="[object Function]",Eee=function(e){var t=this;if(typeof t!="function"||xee.call(t)!==See)throw new TypeError(wee+t);for(var n=V_.call(arguments,1),r,i=function(){if(this instanceof r){var c=t.apply(this,n.concat(V_.call(arguments)));return Object(c)===c?c:this}else return t.apply(e,n.concat(V_.call(arguments)))},o=Math.max(0,t.length-n.length),a=[],s=0;s"u"||!Ln?at:Ln(Uint8Array),sl={"%AggregateError%":typeof AggregateError>"u"?at:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?at:ArrayBuffer,"%ArrayIteratorPrototype%":ic&&Ln?Ln([][Symbol.iterator]()):at,"%AsyncFromSyncIteratorPrototype%":at,"%AsyncFunction%":mc,"%AsyncGenerator%":mc,"%AsyncGeneratorFunction%":mc,"%AsyncIteratorPrototype%":mc,"%Atomics%":typeof Atomics>"u"?at:Atomics,"%BigInt%":typeof BigInt>"u"?at:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?at:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?at:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?at:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?at:Float32Array,"%Float64Array%":typeof Float64Array>"u"?at:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?at:FinalizationRegistry,"%Function%":_6,"%GeneratorFunction%":mc,"%Int8Array%":typeof Int8Array>"u"?at:Int8Array,"%Int16Array%":typeof Int16Array>"u"?at:Int16Array,"%Int32Array%":typeof Int32Array>"u"?at:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ic&&Ln?Ln(Ln([][Symbol.iterator]())):at,"%JSON%":typeof JSON=="object"?JSON:at,"%Map%":typeof Map>"u"?at:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ic||!Ln?at:Ln(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?at:Promise,"%Proxy%":typeof Proxy>"u"?at:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?at:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?at:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ic||!Ln?at:Ln(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?at:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ic&&Ln?Ln(""[Symbol.iterator]()):at,"%Symbol%":ic?Symbol:at,"%SyntaxError%":mu,"%ThrowTypeError%":kee,"%TypedArray%":Lee,"%TypeError%":Wc,"%Uint8Array%":typeof Uint8Array>"u"?at:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?at:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?at:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?at:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?at:WeakMap,"%WeakRef%":typeof WeakRef>"u"?at:WeakRef,"%WeakSet%":typeof WeakSet>"u"?at:WeakSet};if(Ln)try{null.error}catch(e){var jee=Ln(Ln(e));sl["%Error.prototype%"]=jee}var Mee=function e(t){var n;if(t==="%AsyncFunction%")n=H_("async function () {}");else if(t==="%GeneratorFunction%")n=H_("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=H_("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&Ln&&(n=Ln(i.prototype))}return sl[t]=n,n},iL={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Yh=wE,Pv=Cee,Nee=Yh.call(Function.call,Array.prototype.concat),Ree=Yh.call(Function.apply,Array.prototype.splice),oL=Yh.call(Function.call,String.prototype.replace),Lv=Yh.call(Function.call,String.prototype.slice),Aee=Yh.call(Function.call,RegExp.prototype.exec),Dee=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Iee=/\\(\\)?/g,Fee=function(e){var t=Lv(e,0,1),n=Lv(e,-1);if(t==="%"&&n!=="%")throw new mu("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new mu("invalid intrinsic syntax, expected opening `%`");var r=[];return oL(e,Dee,function(i,o,a,s){r[r.length]=a?oL(s,Iee,"$1"):o||i}),r},$ee=function(e,t){var n=e,r;if(Pv(iL,n)&&(r=iL[n],n="%"+r[0]+"%"),Pv(sl,n)){var i=sl[n];if(i===mc&&(i=Mee(n)),typeof i>"u"&&!t)throw new Wc("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new mu("intrinsic "+e+" does not exist!")},xE=function(e,t){if(typeof e!="string"||e.length===0)throw new Wc("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new Wc('"allowMissing" argument must be a boolean');if(Aee(/^%?[^%]*%?$/,e)===null)throw new mu("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Fee(e),r=n.length>0?n[0]:"",i=$ee("%"+r+"%",t),o=i.name,a=i.value,s=!1,l=i.alias;l&&(r=l[0],Ree(n,Nee([0,1],l)));for(var c=1,d=!0;c=n.length){var v=al(a,f);d=!!v,d&&"get"in v&&!("originalValue"in v.get)?a=v.get:a=a[f]}else d=Pv(a,f),a=a[f];d&&!s&&(sl[o]=a)}}return a},b6={exports:{}};(function(e){var t=wE,n=xE,r=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),o=n("%Reflect.apply%",!0)||t.call(i,r),a=n("%Object.getOwnPropertyDescriptor%",!0),s=n("%Object.defineProperty%",!0),l=n("%Math.max%");if(s)try{s({},"a",{value:1})}catch{s=null}e.exports=function(d){var f=o(t,i,arguments);if(a&&s){var p=a(f,"length");p.configurable&&s(f,"length",{value:1+l(0,d.length-(arguments.length-1))})}return f};var c=function(){return o(t,r,arguments)};s?s(e.exports,"apply",{value:c}):e.exports.apply=c})(b6);var Uee=b6.exports,w6=xE,x6=Uee,Bee=x6(w6("String.prototype.indexOf")),zee=function(e,t){var n=w6(e,!!t);return typeof n=="function"&&Bee(e,".prototype.")>-1?x6(n):n};const Vee={},Hee=Object.freeze(Object.defineProperty({__proto__:null,default:Vee},Symbol.toStringTag,{value:"Module"})),Wee=XJ(Hee);var SE=typeof Map=="function"&&Map.prototype,Y_=Object.getOwnPropertyDescriptor&&SE?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,jv=SE&&Y_&&typeof Y_.get=="function"?Y_.get:null,aL=SE&&Map.prototype.forEach,EE=typeof Set=="function"&&Set.prototype,G_=Object.getOwnPropertyDescriptor&&EE?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Mv=EE&&G_&&typeof G_.get=="function"?G_.get:null,sL=EE&&Set.prototype.forEach,Yee=typeof WeakMap=="function"&&WeakMap.prototype,df=Yee?WeakMap.prototype.has:null,Gee=typeof WeakSet=="function"&&WeakSet.prototype,ff=Gee?WeakSet.prototype.has:null,qee=typeof WeakRef=="function"&&WeakRef.prototype,lL=qee?WeakRef.prototype.deref:null,Zee=Boolean.prototype.valueOf,Kee=Object.prototype.toString,Qee=Function.prototype.toString,Xee=String.prototype.match,TE=String.prototype.slice,Da=String.prototype.replace,Jee=String.prototype.toUpperCase,cL=String.prototype.toLowerCase,S6=RegExp.prototype.test,uL=Array.prototype.concat,ao=Array.prototype.join,ete=Array.prototype.slice,dL=Math.floor,Ex=typeof BigInt=="function"?BigInt.prototype.valueOf:null,q_=Object.getOwnPropertySymbols,Tx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,gu=typeof Symbol=="function"&&typeof Symbol.iterator=="object",ar=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===gu||"symbol")?Symbol.toStringTag:null,E6=Object.prototype.propertyIsEnumerable,fL=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function hL(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||S6.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-dL(-e):dL(e);if(r!==e){var i=String(r),o=TE.call(t,i.length+1);return Da.call(i,n,"$&_")+"."+Da.call(Da.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Da.call(t,n,"$&_")}var Ox=Wee,pL=Ox.custom,mL=O6(pL)?pL:null,tte=function e(t,n,r,i){var o=n||{};if(Ca(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Ca(o,"maxStringLength")&&(typeof o.maxStringLength=="number"?o.maxStringLength<0&&o.maxStringLength!==1/0:o.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=Ca(o,"customInspect")?o.customInspect:!0;if(typeof a!="boolean"&&a!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Ca(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(Ca(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=o.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return k6(t,o);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return s?hL(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return s?hL(t,c):c}var d=typeof o.depth>"u"?5:o.depth;if(typeof r>"u"&&(r=0),r>=d&&d>0&&typeof t=="object")return Cx(t)?"[Array]":"[Object]";var f=_te(o,r);if(typeof i>"u")i=[];else if(C6(i,t)>=0)return"[Circular]";function p(X,G,Z){if(G&&(i=ete.call(i),i.push(G)),Z){var ne={depth:o.depth};return Ca(o,"quoteStyle")&&(ne.quoteStyle=o.quoteStyle),e(X,ne,r+1,i)}return e(X,o,r+1,i)}if(typeof t=="function"&&!gL(t)){var m=ute(t),v=um(t,p);return"[Function"+(m?": "+m:" (anonymous)")+"]"+(v.length>0?" { "+ao.call(v,", ")+" }":"")}if(O6(t)){var y=gu?Da.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Tx.call(t);return typeof t=="object"&&!gu?wd(y):y}if(gte(t)){for(var x="<"+cL.call(String(t.nodeName)),_=t.attributes||[],w=0;w<_.length;w++)x+=" "+_[w].name+"="+T6(nte(_[w].value),"double",o);return x+=">",t.childNodes&&t.childNodes.length&&(x+="..."),x+="",x}if(Cx(t)){if(t.length===0)return"[]";var S=um(t,p);return f&&!yte(S)?"["+kx(S,f)+"]":"[ "+ao.call(S,", ")+" ]"}if(ite(t)){var E=um(t,p);return!("cause"in Error.prototype)&&"cause"in t&&!E6.call(t,"cause")?"{ ["+String(t)+"] "+ao.call(uL.call("[cause]: "+p(t.cause),E),", ")+" }":E.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+ao.call(E,", ")+" }"}if(typeof t=="object"&&a){if(mL&&typeof t[mL]=="function"&&Ox)return Ox(t,{depth:d-r});if(a!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(dte(t)){var O=[];return aL&&aL.call(t,function(X,G){O.push(p(G,t,!0)+" => "+p(X,t))}),vL("Map",jv.call(t),O,f)}if(pte(t)){var k=[];return sL&&sL.call(t,function(X){k.push(p(X,t))}),vL("Set",Mv.call(t),k,f)}if(fte(t))return Z_("WeakMap");if(mte(t))return Z_("WeakSet");if(hte(t))return Z_("WeakRef");if(ate(t))return wd(p(Number(t)));if(lte(t))return wd(p(Ex.call(t)));if(ste(t))return wd(Zee.call(t));if(ote(t))return wd(p(String(t)));if(!rte(t)&&!gL(t)){var j=um(t,p),A=fL?fL(t)===Object.prototype:t instanceof Object||t.constructor===Object,U=t instanceof Object?"":"null prototype",R=!A&&ar&&Object(t)===t&&ar in t?TE.call(_s(t),8,-1):U?"Object":"",V=A||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",W=V+(R||U?"["+ao.call(uL.call([],R||[],U||[]),": ")+"] ":"");return j.length===0?W+"{}":f?W+"{"+kx(j,f)+"}":W+"{ "+ao.call(j,", ")+" }"}return String(t)};function T6(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function nte(e){return Da.call(String(e),/"/g,""")}function Cx(e){return _s(e)==="[object Array]"&&(!ar||!(typeof e=="object"&&ar in e))}function rte(e){return _s(e)==="[object Date]"&&(!ar||!(typeof e=="object"&&ar in e))}function gL(e){return _s(e)==="[object RegExp]"&&(!ar||!(typeof e=="object"&&ar in e))}function ite(e){return _s(e)==="[object Error]"&&(!ar||!(typeof e=="object"&&ar in e))}function ote(e){return _s(e)==="[object String]"&&(!ar||!(typeof e=="object"&&ar in e))}function ate(e){return _s(e)==="[object Number]"&&(!ar||!(typeof e=="object"&&ar in e))}function ste(e){return _s(e)==="[object Boolean]"&&(!ar||!(typeof e=="object"&&ar in e))}function O6(e){if(gu)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Tx)return!1;try{return Tx.call(e),!0}catch{}return!1}function lte(e){if(!e||typeof e!="object"||!Ex)return!1;try{return Ex.call(e),!0}catch{}return!1}var cte=Object.prototype.hasOwnProperty||function(e){return e in this};function Ca(e,t){return cte.call(e,t)}function _s(e){return Kee.call(e)}function ute(e){if(e.name)return e.name;var t=Xee.call(Qee.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function C6(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 k6(TE.call(e,0,t.maxStringLength),t)+r}var i=Da.call(Da.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,vte);return T6(i,"single",t)}function vte(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":"")+Jee.call(t.toString(16))}function wd(e){return"Object("+e+")"}function Z_(e){return e+" { ? }"}function vL(e,t,n,r){var i=r?kx(n,r):ao.call(n,", ");return e+" ("+t+") {"+i+"}"}function yte(e){for(var t=0;t=0)return!1;return!0}function _te(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=ao.call(Array(e.indent+1)," ");else return null;return{base:n,prev:ao.call(Array(t+1),n)}}function kx(e,t){if(e.length===0)return"";var n=` `+t.prev+t.base;return n+ao.call(e,","+n)+` -`+t.prev}function um(e,t){var n=Cx(e),r=[];if(n){r.length=e.length;for(var i=0;i1;){var t=e.pop(),n=t.obj[t.prop];if(Ys(n)){for(var r=[],i=0;i=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||i===Nte.RFC1738&&(l===40||l===41)){a+=o.charAt(s);continue}if(l<128){a=a+to[l];continue}if(l<2048){a=a+(to[192|l>>6]+to[128|l&63]);continue}if(l<55296||l>=57344){a=a+(to[224|l>>12]+to[128|l>>6&63]+to[128|l&63]);continue}s+=1,l=65536+((l&1023)<<10|o.charCodeAt(s)&1023),a+=to[240|l>>18]+to[128|l>>12&63]+to[128|l>>6&63]+to[128|l&63]}return a},$te=function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r"u"&&(S=0)}if(typeof l=="function"?_=l(n,_):_ instanceof Date?_=f(_):r==="comma"&&Ao(_)&&(_=lg.maybeMap(_,function(ne){return ne instanceof Date?f(ne):ne})),_===null){if(o)return s&&!v?s(n,Jn.encoder,y,"key",p):n;_=""}if(Gte(_)||lg.isBuffer(_)){if(s){var k=v?n:s(n,Jn.encoder,y,"key",p);return[m(k)+"="+m(s(_,Jn.encoder,y,"value",p))]}return[m(n)+"="+m(String(_))]}var j=[];if(typeof _>"u")return j;var A;if(r==="comma"&&Ao(_))v&&s&&(_=lg.maybeMap(_,s)),A=[{value:_.length>0?_.join(",")||null:void 0}];else if(Ao(l))A=l;else{var U=Object.keys(_);A=c?U.sort(c):U}for(var R=i&&Ao(_)&&_.length===1?n+"[]":n,V=0;V"u"?Jn.allowDots:!!e.allowDots,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:Jn.charsetSentinel,delimiter:typeof e.delimiter>"u"?Jn.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:Jn.encode,encoder:typeof e.encoder=="function"?e.encoder:Jn.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:Jn.encodeValuesOnly,filter:i,format:n,formatter:r,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:Jn.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:Jn.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:Jn.strictNullHandling}},Kte=function(e,t){var n=e,r=Zte(t),i,o;typeof r.filter=="function"?(o=r.filter,n=o("",n)):Ao(r.filter)&&(o=r.filter,i=o);var a=[];if(typeof n!="object"||n===null)return"";var s;t&&t.arrayFormat in yL?s=t.arrayFormat:t&&"indices"in t?s=t.indices?"indices":"repeat":s="indices";var l=yL[s];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var c=l==="comma"&&t&&t.commaRoundTrip;i||(i=Object.keys(n)),r.sort&&i.sort(r.sort);for(var d=j6(),f=0;f0?v+m:""},vu=L6,Px=Object.prototype.hasOwnProperty,Qte=Array.isArray,Pn={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:vu.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},Xte=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},N6=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},Jte="utf8=%26%2310003%3B",ene="utf8=%E2%9C%93",tne=function(e,t){var n={__proto__:null},r=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,i=t.parameterLimit===1/0?void 0:t.parameterLimit,o=r.split(t.delimiter,i),a=-1,s,l=t.charset;if(t.charsetSentinel)for(s=0;s-1&&(m=Qte(m)?[m]:m),Px.call(n,p)?n[p]=vu.combine(n[p],m):n[p]=m}return n},nne=function(e,t,n,r){for(var i=r?t:N6(t,n),o=e.length-1;o>=0;--o){var a,s=e[o];if(s==="[]"&&n.parseArrays)a=[].concat(i);else{a=n.plainObjects?Object.create(null):{};var l=s.charAt(0)==="["&&s.charAt(s.length-1)==="]"?s.slice(1,-1):s,c=parseInt(l,10);!n.parseArrays&&l===""?a={0:i}:!isNaN(c)&&s!==l&&String(c)===l&&c>=0&&n.parseArrays&&c<=n.arrayLimit?(a=[],a[c]=i):l!=="__proto__"&&(a[l]=i)}i=a}return i},rne=function(e,t,n,r){if(e){var i=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,s=n.depth>0&&o.exec(i),l=s?i.slice(0,s.index):i,c=[];if(l){if(!n.plainObjects&&Px.call(Object.prototype,l)&&!n.allowPrototypes)return;c.push(l)}for(var d=0;n.depth>0&&(s=a.exec(i))!==null&&d"u"?Pn.charset:e.charset;return{allowDots:typeof e.allowDots>"u"?Pn.allowDots:!!e.allowDots,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:Pn.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:Pn.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:Pn.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:Pn.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:Pn.comma,decoder:typeof e.decoder=="function"?e.decoder:Pn.decoder,delimiter:typeof e.delimiter=="string"||vu.isRegExp(e.delimiter)?e.delimiter:Pn.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:Pn.depth,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:Pn.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:Pn.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:Pn.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:Pn.strictNullHandling}},one=function(e,t){var n=ine(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?tne(e,n):e,i=n.plainObjects?Object.create(null):{},o=Object.keys(r),a=0;aR6.parse(e,{ignoreQueryPrefix:!0}),c0=e=>R6.stringify(e,{arrayFormat:"brackets"});function A6(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t{const[r,,i]=Sn(),o=()=>{i(),n()};return g.jsxs(s6,{className:"app-update-banner",isOpen:e,toggle:t,tag:mn,color:"secondary",children:[g.jsx("h4",{className:"mb-4",children:"This app has just been updated!"}),g.jsxs("p",{className:"mb-0",children:["Restart it to enjoy the new features.",g.jsxs(yt,{role:"button",disabled:r,className:"ms-2",color:"secondary",size:"sm",onClick:o,children:[!r&&g.jsxs(g.Fragment,{children:["Restart now ",g.jsx(Ne,{icon:pY,className:"ms-1"})]}),r&&g.jsx(g.Fragment,{children:"Restarting..."})]})]})]})},D6=({to:e="/",children:t="Home"})=>g.jsx("div",{className:"home",children:g.jsxs(mn,{className:"p-4",children:[g.jsx("h2",{children:"Oops! We could not find requested route."}),g.jsx("p",{children:"Use your browser's back button to navigate to the page you have previously come from, or just press this button."}),g.jsx("br",{}),g.jsx(It,{to:e,className:"btn btn-outline-primary btn-lg",children:t})]})});function Ei(e){return I.useRef(e).current}function Ti(e,t){return(n,r=globalThis.console)=>(t.forEach(i=>{const o=n[i];e[i]=o}),e)}const dne=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"})})},I6=({fetchServers:e,servers:t,settings:n,appUpdated:r,resetAppUpdate:i})=>{var x;const{MainHeader:o,Home:a,ShlinkWebComponentContainer:s,CreateServer:l,EditServer:c,Settings:d,ManageServers:f,ShlinkVersionsContainer:p}=Ei(I6),m=En(),v=I.useRef(t),y=m.pathname==="/";return I.useEffect(()=>{Object.keys(v.current).length===0&&e()},[e]),I.useEffect(()=>{var _;hee(((_=n.ui)==null?void 0:_.theme)??"light")},[(x=n.ui)==null?void 0:x.theme]),g.jsxs("div",{className:"container-fluid app-container",children:[g.jsx(o,{}),g.jsxs("div",{className:"app",children:[g.jsx("div",{className:Vu("shlink-wrapper",{"d-flex d-md-block align-items-center":y}),children:g.jsxs(Ky,{children:[g.jsx(vt,{index:!0,element:g.jsx(a,{})}),g.jsx(vt,{path:"/settings/*",element:g.jsx(d,{})}),g.jsx(vt,{path:"/manage-servers",element:g.jsx(f,{})}),g.jsx(vt,{path:"/server/create",element:g.jsx(l,{})}),g.jsx(vt,{path:"/server/:serverId/edit",element:g.jsx(c,{})}),g.jsx(vt,{path:"/server/:serverId/*",element:g.jsx(s,{})}),g.jsx(vt,{path:"*",element:g.jsx(D6,{})})]})}),g.jsx("div",{className:"shlink-footer",children:g.jsx(p,{})})]}),g.jsx(une,{isOpen:r,toggle:i,forceUpdate:dne})]})},fne=Ti(I6,["MainHeader","Home","ShlinkWebComponentContainer","CreateServer","EditServer","Settings","ManageServers","ShlinkVersionsContainer"]);function Ai(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:PE(e)?2:LE(e)?3:0}function Yc(e,t){return Hu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function hne(e,t){return Hu(e)===2?e.get(t):e[t]}function F6(e,t,n){var r=Hu(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function $6(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function PE(e){return _ne&&e instanceof Map}function LE(e){return bne&&e instanceof Set}function Bs(e){return e.o||e.t}function jE(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=B6(e);delete t[$t];for(var n=Gc(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=pne),Object.freeze(e),t&&wl(e,function(n,r){return ME(r,!0)},!0)),e}function pne(){Ai(2)}function NE(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function go(e){var t=Nx[e];return t||Ai(18,e),t}function mne(e,t){Nx[e]||(Nx[e]=t)}function Lx(){return ih}function J_(e,t){t&&(go("Patches"),e.u=[],e.s=[],e.v=t)}function Nv(e){jx(e),e.p.forEach(gne),e.p=null}function jx(e){e===ih&&(ih=e.l)}function bL(e){return ih={p:[],l:ih,h:e,m:!0,_:0}}function gne(e){var t=e[$t];t.i===0||t.i===1?t.j():t.g=!0}function eb(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.O||go("ES5").S(t,e,r),r?(n[$t].P&&(Nv(t),Ai(4)),ea(e)&&(e=Rv(t,e),t.l||Av(t,e)),t.u&&go("Patches").M(n[$t].t,e,t.u,t.s)):e=Rv(t,n,[]),Nv(t),t.u&&t.v(t.u,t.s),e!==U6?e:void 0}function Rv(e,t,n){if(NE(t))return t;var r=t[$t];if(!r)return wl(t,function(s,l){return wL(e,r,t,s,l,n)},!0),t;if(r.A!==e)return t;if(!r.P)return Av(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=jE(r.k):r.o,o=i,a=!1;r.i===3&&(o=new Set(i),i.clear(),a=!0),wl(o,function(s,l){return wL(e,r,i,s,l,n,a)}),Av(e,i,!1),n&&e.u&&go("Patches").N(r,n,e.u,e.s)}return r.o}function wL(e,t,n,r,i,o,a){if(ss(i)){var s=Rv(e,i,o&&t&&t.i!==3&&!Yc(t.R,r)?o.concat(r):void 0);if(F6(n,r,s),!ss(s))return;e.m=!1}else a&&n.add(i);if(ea(i)&&!NE(i)){if(!e.h.D&&e._<1)return;Rv(e,i),t&&t.A.l||Av(e,i)}}function Av(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&ME(t,n)}function tb(e,t){var n=e[$t];return(n?Bs(n):e)[t]}function xL(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 ja(e){e.P||(e.P=!0,e.l&&ja(e.l))}function nb(e){e.o||(e.o=jE(e.t))}function Mx(e,t,n){var r=PE(t)?go("MapSet").F(t,n):LE(t)?go("MapSet").T(t,n):e.O?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:Lx(),P:!1,I:!1,R:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,c=oh;a&&(l=[s],c=Ud);var d=Proxy.revocable(l,c),f=d.revoke,p=d.proxy;return s.k=p,s.j=f,p}(t,n):go("ES5").J(t,n);return(n?n.A:Lx()).p.push(r),r}function vne(e){return ss(e)||Ai(22,e),function t(n){if(!ea(n))return n;var r,i=n[$t],o=Hu(n);if(i){if(!i.P&&(i.i<4||!go("ES5").K(i)))return i.t;i.I=!0,r=SL(n,o),i.I=!1}else r=SL(n,o);return wl(r,function(a,s){i&&hne(i.t,a)===s||F6(r,a,t(s))}),o===3?new Set(r):r}(e)}function SL(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return jE(e)}function yne(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var l=this[$t];return oh.get(l,o)},set:function(l){var c=this[$t];oh.set(c,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][$t];if(!s.P)switch(s.i){case 5:r(s)&&ja(s);break;case 4:n(s)&&ja(s)}}}function n(o){for(var a=o.t,s=o.k,l=Gc(s),c=l.length-1;c>=0;c--){var d=l[c];if(d!==$t){var f=a[d];if(f===void 0&&!Yc(a,d))return!0;var p=s[d],m=p&&p[$t];if(m?m.t!==f:!$6(p,f))return!0}}var v=!!a[$t];return l.length!==Gc(a).length+(v?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var l=0;l1?_-1:0),S=1;S<_;S++)w[S-1]=arguments[S];return l.produce(y,function(E){var O;return(O=o).call.apply(O,[x,E].concat(w))})}}var c;if(typeof o!="function"&&Ai(6),a!==void 0&&typeof a!="function"&&Ai(7),ea(i)){var d=bL(r),f=Mx(r,i,void 0),p=!0;try{c=o(f),p=!1}finally{p?Nv(d):jx(d)}return typeof Promise<"u"&&c instanceof Promise?c.then(function(y){return J_(d,a),eb(y,d)},function(y){throw Nv(d),y}):(J_(d,a),eb(c,d))}if(!i||typeof i!="object"){if((c=o(i))===void 0&&(c=i),c===U6&&(c=void 0),r.D&&ME(c,!0),a){var m=[],v=[];go("Patches").M(i,c,m,v),a(m,v)}return c}Ai(21,i)},this.produceWithPatches=function(i,o){if(typeof i=="function")return function(c){for(var d=arguments.length,f=Array(d>1?d-1:0),p=1;p=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=go("Patches").$;return ss(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),qr=new xne,z6=qr.produce;qr.produceWithPatches.bind(qr);qr.setAutoFreeze.bind(qr);qr.setUseProxies.bind(qr);qr.applyPatches.bind(qr);qr.createDraft.bind(qr);qr.finishDraft.bind(qr);function ah(e){"@babel/helpers - typeof";return ah=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},ah(e)}function Sne(e,t){if(ah(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ah(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ene(e){var t=Sne(e,"string");return ah(t)==="symbol"?t:String(t)}function Tne(e,t,n){return t=Ene(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function CL(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 kL(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(er(1));return n(V6)(e,t)}if(typeof e!="function")throw new Error(er(2));var i=e,o=t,a=[],s=a,l=!1;function c(){s===a&&(s=a.slice())}function d(){if(l)throw new Error(er(3));return o}function f(y){if(typeof y!="function")throw new Error(er(4));if(l)throw new Error(er(5));var x=!0;return c(),s.push(y),function(){if(x){if(l)throw new Error(er(6));x=!1,c();var w=s.indexOf(y);s.splice(w,1),a=null}}}function p(y){if(!One(y))throw new Error(er(7));if(typeof y.type>"u")throw new Error(er(8));if(l)throw new Error(er(9));try{l=!0,o=i(o,y)}finally{l=!1}for(var x=a=s,_=0;_"u")throw new Error(er(12));if(typeof n(void 0,{type:Dv.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(er(13))})}function AE(e){for(var t=Object.keys(e),n={},r=0;r"u")throw c&&c.type,new Error(er(14));f[m]=x,d=d||x!==y}return d=d||o.length!==Object.keys(l).length,d?f:l}}function Iv(){for(var e=arguments.length,t=new Array(e),n=0;n0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]!0,resetAppUpdate:()=>!1}}),{appUpdateAvailable:tre,resetAppUpdate:nre}=Jne,rre=ere,ire=(e,t)=>{e.factory("App",fne),e.decorator("App",t(["servers","settings","appUpdated"],["fetchServers","resetAppUpdate"])),e.serviceFactory("appUpdateAvailable",()=>tre),e.serviceFactory("resetAppUpdate",()=>nre)},AL={"Content-Type":"application/json"},DL=e=>e!=null&&e.body?e?{...e,headers:{...e.headers??{},...AL}}:{headers:AL}:e;class ore{constructor(t=window.fetch.bind(window)){this.fetch=t}async jsonRequest(t,n){return this.fetch(t,DL(n)).then(async r=>{const i=await r.json();if(!r.ok)throw i;return i})}async emptyRequest(t,n){return this.fetch(t,DL(n)).then(async r=>{if(!r.ok)throw await r.json()})}}var IE=(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))(IE||{}),FE=(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))(FE||{}),are={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"]},sre=are,lre={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"]},cre=lre,ure={prefix:"far",iconName:"circle",icon:[512,512,[128308,128309,128992,128993,128994,128995,128996,9679,9898,9899,11044,61708,61915],"f111","M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z"]},K6={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"]},dre={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"]},fre={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"]},hre=Object.defineProperty,pre=(e,t,n)=>t in e?hre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Te=(e,t,n)=>(pre(e,typeof t!="symbol"?t+"":t,n),n);/*! +`+t.prev}function um(e,t){var n=Cx(e),r=[];if(n){r.length=e.length;for(var i=0;i1;){var t=e.pop(),n=t.obj[t.prop];if(Ys(n)){for(var r=[],i=0;i=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||i===Rte.RFC1738&&(l===40||l===41)){a+=o.charAt(s);continue}if(l<128){a=a+to[l];continue}if(l<2048){a=a+(to[192|l>>6]+to[128|l&63]);continue}if(l<55296||l>=57344){a=a+(to[224|l>>12]+to[128|l>>6&63]+to[128|l&63]);continue}s+=1,l=65536+((l&1023)<<10|o.charCodeAt(s)&1023),a+=to[240|l>>18]+to[128|l>>12&63]+to[128|l>>6&63]+to[128|l&63]}return a},Ute=function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r"u"&&(S=0)}if(typeof l=="function"?_=l(n,_):_ instanceof Date?_=f(_):r==="comma"&&Ao(_)&&(_=lg.maybeMap(_,function(ne){return ne instanceof Date?f(ne):ne})),_===null){if(o)return s&&!v?s(n,Jn.encoder,y,"key",p):n;_=""}if(qte(_)||lg.isBuffer(_)){if(s){var k=v?n:s(n,Jn.encoder,y,"key",p);return[m(k)+"="+m(s(_,Jn.encoder,y,"value",p))]}return[m(n)+"="+m(String(_))]}var j=[];if(typeof _>"u")return j;var A;if(r==="comma"&&Ao(_))v&&s&&(_=lg.maybeMap(_,s)),A=[{value:_.length>0?_.join(",")||null:void 0}];else if(Ao(l))A=l;else{var U=Object.keys(_);A=c?U.sort(c):U}for(var R=i&&Ao(_)&&_.length===1?n+"[]":n,V=0;V"u"?Jn.allowDots:!!e.allowDots,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:Jn.charsetSentinel,delimiter:typeof e.delimiter>"u"?Jn.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:Jn.encode,encoder:typeof e.encoder=="function"?e.encoder:Jn.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:Jn.encodeValuesOnly,filter:i,format:n,formatter:r,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:Jn.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:Jn.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:Jn.strictNullHandling}},Qte=function(e,t){var n=e,r=Kte(t),i,o;typeof r.filter=="function"?(o=r.filter,n=o("",n)):Ao(r.filter)&&(o=r.filter,i=o);var a=[];if(typeof n!="object"||n===null)return"";var s;t&&t.arrayFormat in yL?s=t.arrayFormat:t&&"indices"in t?s=t.indices?"indices":"repeat":s="indices";var l=yL[s];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var c=l==="comma"&&t&&t.commaRoundTrip;i||(i=Object.keys(n)),r.sort&&i.sort(r.sort);for(var d=j6(),f=0;f0?v+m:""},vu=L6,Px=Object.prototype.hasOwnProperty,Xte=Array.isArray,Pn={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:vu.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},Jte=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},N6=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},ene="utf8=%26%2310003%3B",tne="utf8=%E2%9C%93",nne=function(e,t){var n={__proto__:null},r=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,i=t.parameterLimit===1/0?void 0:t.parameterLimit,o=r.split(t.delimiter,i),a=-1,s,l=t.charset;if(t.charsetSentinel)for(s=0;s-1&&(m=Xte(m)?[m]:m),Px.call(n,p)?n[p]=vu.combine(n[p],m):n[p]=m}return n},rne=function(e,t,n,r){for(var i=r?t:N6(t,n),o=e.length-1;o>=0;--o){var a,s=e[o];if(s==="[]"&&n.parseArrays)a=[].concat(i);else{a=n.plainObjects?Object.create(null):{};var l=s.charAt(0)==="["&&s.charAt(s.length-1)==="]"?s.slice(1,-1):s,c=parseInt(l,10);!n.parseArrays&&l===""?a={0:i}:!isNaN(c)&&s!==l&&String(c)===l&&c>=0&&n.parseArrays&&c<=n.arrayLimit?(a=[],a[c]=i):l!=="__proto__"&&(a[l]=i)}i=a}return i},ine=function(e,t,n,r){if(e){var i=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,s=n.depth>0&&o.exec(i),l=s?i.slice(0,s.index):i,c=[];if(l){if(!n.plainObjects&&Px.call(Object.prototype,l)&&!n.allowPrototypes)return;c.push(l)}for(var d=0;n.depth>0&&(s=a.exec(i))!==null&&d"u"?Pn.charset:e.charset;return{allowDots:typeof e.allowDots>"u"?Pn.allowDots:!!e.allowDots,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:Pn.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:Pn.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:Pn.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:Pn.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:Pn.comma,decoder:typeof e.decoder=="function"?e.decoder:Pn.decoder,delimiter:typeof e.delimiter=="string"||vu.isRegExp(e.delimiter)?e.delimiter:Pn.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:Pn.depth,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:Pn.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:Pn.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:Pn.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:Pn.strictNullHandling}},ane=function(e,t){var n=one(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?nne(e,n):e,i=n.plainObjects?Object.create(null):{},o=Object.keys(r),a=0;aR6.parse(e,{ignoreQueryPrefix:!0}),c0=e=>R6.stringify(e,{arrayFormat:"brackets"});function A6(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t{const[r,,i]=Sn(),o=()=>{i(),n()};return g.jsxs(s6,{className:"app-update-banner",isOpen:e,toggle:t,tag:mn,color:"secondary",children:[g.jsx("h4",{className:"mb-4",children:"This app has just been updated!"}),g.jsxs("p",{className:"mb-0",children:["Restart it to enjoy the new features.",g.jsxs(yt,{role:"button",disabled:r,className:"ms-2",color:"secondary",size:"sm",onClick:o,children:[!r&&g.jsxs(g.Fragment,{children:["Restart now ",g.jsx(Ne,{icon:mY,className:"ms-1"})]}),r&&g.jsx(g.Fragment,{children:"Restarting..."})]})]})]})},D6=({to:e="/",children:t="Home"})=>g.jsx("div",{className:"home",children:g.jsxs(mn,{className:"p-4",children:[g.jsx("h2",{children:"Oops! We could not find requested route."}),g.jsx("p",{children:"Use your browser's back button to navigate to the page you have previously come from, or just press this button."}),g.jsx("br",{}),g.jsx(It,{to:e,className:"btn btn-outline-primary btn-lg",children:t})]})});function Ei(e){return I.useRef(e).current}function Ti(e,t){return(n,r=globalThis.console)=>(t.forEach(i=>{const o=n[i];e[i]=o}),e)}const fne=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"})})},I6=({fetchServers:e,servers:t,settings:n,appUpdated:r,resetAppUpdate:i})=>{var x;const{MainHeader:o,Home:a,ShlinkWebComponentContainer:s,CreateServer:l,EditServer:c,Settings:d,ManageServers:f,ShlinkVersionsContainer:p}=Ei(I6),m=En(),v=I.useRef(t),y=m.pathname==="/";return I.useEffect(()=>{Object.keys(v.current).length===0&&e()},[e]),I.useEffect(()=>{var _;pee(((_=n.ui)==null?void 0:_.theme)??"light")},[(x=n.ui)==null?void 0:x.theme]),g.jsxs("div",{className:"container-fluid app-container",children:[g.jsx(o,{}),g.jsxs("div",{className:"app",children:[g.jsx("div",{className:Vu("shlink-wrapper",{"d-flex d-md-block align-items-center":y}),children:g.jsxs(Ky,{children:[g.jsx(vt,{index:!0,element:g.jsx(a,{})}),g.jsx(vt,{path:"/settings/*",element:g.jsx(d,{})}),g.jsx(vt,{path:"/manage-servers",element:g.jsx(f,{})}),g.jsx(vt,{path:"/server/create",element:g.jsx(l,{})}),g.jsx(vt,{path:"/server/:serverId/edit",element:g.jsx(c,{})}),g.jsx(vt,{path:"/server/:serverId/*",element:g.jsx(s,{})}),g.jsx(vt,{path:"*",element:g.jsx(D6,{})})]})}),g.jsx("div",{className:"shlink-footer",children:g.jsx(p,{})})]}),g.jsx(dne,{isOpen:r,toggle:i,forceUpdate:fne})]})},hne=Ti(I6,["MainHeader","Home","ShlinkWebComponentContainer","CreateServer","EditServer","Settings","ManageServers","ShlinkVersionsContainer"]);function Ai(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:PE(e)?2:LE(e)?3:0}function Yc(e,t){return Hu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function pne(e,t){return Hu(e)===2?e.get(t):e[t]}function F6(e,t,n){var r=Hu(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function $6(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function PE(e){return bne&&e instanceof Map}function LE(e){return wne&&e instanceof Set}function Bs(e){return e.o||e.t}function jE(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=B6(e);delete t[$t];for(var n=Gc(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=mne),Object.freeze(e),t&&wl(e,function(n,r){return ME(r,!0)},!0)),e}function mne(){Ai(2)}function NE(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function go(e){var t=Nx[e];return t||Ai(18,e),t}function gne(e,t){Nx[e]||(Nx[e]=t)}function Lx(){return ih}function J_(e,t){t&&(go("Patches"),e.u=[],e.s=[],e.v=t)}function Nv(e){jx(e),e.p.forEach(vne),e.p=null}function jx(e){e===ih&&(ih=e.l)}function bL(e){return ih={p:[],l:ih,h:e,m:!0,_:0}}function vne(e){var t=e[$t];t.i===0||t.i===1?t.j():t.g=!0}function eb(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.O||go("ES5").S(t,e,r),r?(n[$t].P&&(Nv(t),Ai(4)),ea(e)&&(e=Rv(t,e),t.l||Av(t,e)),t.u&&go("Patches").M(n[$t].t,e,t.u,t.s)):e=Rv(t,n,[]),Nv(t),t.u&&t.v(t.u,t.s),e!==U6?e:void 0}function Rv(e,t,n){if(NE(t))return t;var r=t[$t];if(!r)return wl(t,function(s,l){return wL(e,r,t,s,l,n)},!0),t;if(r.A!==e)return t;if(!r.P)return Av(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=jE(r.k):r.o,o=i,a=!1;r.i===3&&(o=new Set(i),i.clear(),a=!0),wl(o,function(s,l){return wL(e,r,i,s,l,n,a)}),Av(e,i,!1),n&&e.u&&go("Patches").N(r,n,e.u,e.s)}return r.o}function wL(e,t,n,r,i,o,a){if(ss(i)){var s=Rv(e,i,o&&t&&t.i!==3&&!Yc(t.R,r)?o.concat(r):void 0);if(F6(n,r,s),!ss(s))return;e.m=!1}else a&&n.add(i);if(ea(i)&&!NE(i)){if(!e.h.D&&e._<1)return;Rv(e,i),t&&t.A.l||Av(e,i)}}function Av(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&ME(t,n)}function tb(e,t){var n=e[$t];return(n?Bs(n):e)[t]}function xL(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 ja(e){e.P||(e.P=!0,e.l&&ja(e.l))}function nb(e){e.o||(e.o=jE(e.t))}function Mx(e,t,n){var r=PE(t)?go("MapSet").F(t,n):LE(t)?go("MapSet").T(t,n):e.O?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:Lx(),P:!1,I:!1,R:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,c=oh;a&&(l=[s],c=Ud);var d=Proxy.revocable(l,c),f=d.revoke,p=d.proxy;return s.k=p,s.j=f,p}(t,n):go("ES5").J(t,n);return(n?n.A:Lx()).p.push(r),r}function yne(e){return ss(e)||Ai(22,e),function t(n){if(!ea(n))return n;var r,i=n[$t],o=Hu(n);if(i){if(!i.P&&(i.i<4||!go("ES5").K(i)))return i.t;i.I=!0,r=SL(n,o),i.I=!1}else r=SL(n,o);return wl(r,function(a,s){i&&pne(i.t,a)===s||F6(r,a,t(s))}),o===3?new Set(r):r}(e)}function SL(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return jE(e)}function _ne(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var l=this[$t];return oh.get(l,o)},set:function(l){var c=this[$t];oh.set(c,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][$t];if(!s.P)switch(s.i){case 5:r(s)&&ja(s);break;case 4:n(s)&&ja(s)}}}function n(o){for(var a=o.t,s=o.k,l=Gc(s),c=l.length-1;c>=0;c--){var d=l[c];if(d!==$t){var f=a[d];if(f===void 0&&!Yc(a,d))return!0;var p=s[d],m=p&&p[$t];if(m?m.t!==f:!$6(p,f))return!0}}var v=!!a[$t];return l.length!==Gc(a).length+(v?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var l=0;l1?_-1:0),S=1;S<_;S++)w[S-1]=arguments[S];return l.produce(y,function(E){var O;return(O=o).call.apply(O,[x,E].concat(w))})}}var c;if(typeof o!="function"&&Ai(6),a!==void 0&&typeof a!="function"&&Ai(7),ea(i)){var d=bL(r),f=Mx(r,i,void 0),p=!0;try{c=o(f),p=!1}finally{p?Nv(d):jx(d)}return typeof Promise<"u"&&c instanceof Promise?c.then(function(y){return J_(d,a),eb(y,d)},function(y){throw Nv(d),y}):(J_(d,a),eb(c,d))}if(!i||typeof i!="object"){if((c=o(i))===void 0&&(c=i),c===U6&&(c=void 0),r.D&&ME(c,!0),a){var m=[],v=[];go("Patches").M(i,c,m,v),a(m,v)}return c}Ai(21,i)},this.produceWithPatches=function(i,o){if(typeof i=="function")return function(c){for(var d=arguments.length,f=Array(d>1?d-1:0),p=1;p=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=go("Patches").$;return ss(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),qr=new Sne,z6=qr.produce;qr.produceWithPatches.bind(qr);qr.setAutoFreeze.bind(qr);qr.setUseProxies.bind(qr);qr.applyPatches.bind(qr);qr.createDraft.bind(qr);qr.finishDraft.bind(qr);function ah(e){"@babel/helpers - typeof";return ah=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},ah(e)}function Ene(e,t){if(ah(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ah(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Tne(e){var t=Ene(e,"string");return ah(t)==="symbol"?t:String(t)}function One(e,t,n){return t=Tne(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function CL(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 kL(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(er(1));return n(V6)(e,t)}if(typeof e!="function")throw new Error(er(2));var i=e,o=t,a=[],s=a,l=!1;function c(){s===a&&(s=a.slice())}function d(){if(l)throw new Error(er(3));return o}function f(y){if(typeof y!="function")throw new Error(er(4));if(l)throw new Error(er(5));var x=!0;return c(),s.push(y),function(){if(x){if(l)throw new Error(er(6));x=!1,c();var w=s.indexOf(y);s.splice(w,1),a=null}}}function p(y){if(!Cne(y))throw new Error(er(7));if(typeof y.type>"u")throw new Error(er(8));if(l)throw new Error(er(9));try{l=!0,o=i(o,y)}finally{l=!1}for(var x=a=s,_=0;_"u")throw new Error(er(12));if(typeof n(void 0,{type:Dv.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(er(13))})}function AE(e){for(var t=Object.keys(e),n={},r=0;r"u")throw c&&c.type,new Error(er(14));f[m]=x,d=d||x!==y}return d=d||o.length!==Object.keys(l).length,d?f:l}}function Iv(){for(var e=arguments.length,t=new Array(e),n=0;n0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]!0,resetAppUpdate:()=>!1}}),{appUpdateAvailable:nre,resetAppUpdate:rre}=ere,ire=tre,ore=(e,t)=>{e.factory("App",hne),e.decorator("App",t(["servers","settings","appUpdated"],["fetchServers","resetAppUpdate"])),e.serviceFactory("appUpdateAvailable",()=>nre),e.serviceFactory("resetAppUpdate",()=>rre)},AL={"Content-Type":"application/json"},DL=e=>e!=null&&e.body?e?{...e,headers:{...e.headers??{},...AL}}:{headers:AL}:e;class are{constructor(t=window.fetch.bind(window)){this.fetch=t}async jsonRequest(t,n){return this.fetch(t,DL(n)).then(async r=>{const i=await r.json();if(!r.ok)throw i;return i})}async emptyRequest(t,n){return this.fetch(t,DL(n)).then(async r=>{if(!r.ok)throw await r.json()})}}var IE=(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))(IE||{}),FE=(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))(FE||{}),sre={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"]},lre=sre,cre={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"]},ure=cre,dre={prefix:"far",iconName:"circle",icon:[512,512,[128308,128309,128992,128993,128994,128995,128996,9679,9898,9899,11044,61708,61915],"f111","M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z"]},K6={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"]},fre={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"]},hre={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"]},pre=Object.defineProperty,mre=(e,t,n)=>t in e?pre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Te=(e,t,n)=>(mre(e,typeof t!="symbol"?t+"":t,n),n);/*! * @kurkle/color v0.3.2 * https://github.com/kurkle/color#readme * (c) 2023 Jukka Kurkela * Released under the MIT License - */function Gh(e){return e+.5|0}const Ia=(e,t,n)=>Math.max(Math.min(e,n),t);function Bd(e){return Ia(Gh(e*2.55),0,255)}function Ja(e){return Ia(Gh(e*255),0,255)}function Do(e){return Ia(Gh(e/2.55)/100,0,1)}function IL(e){return Ia(Gh(e*100),0,100)}const ii={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},Ax=[..."0123456789ABCDEF"],mre=e=>Ax[e&15],gre=e=>Ax[(e&240)>>4]+Ax[e&15],hm=e=>(e&240)>>4===(e&15),vre=e=>hm(e.r)&&hm(e.g)&&hm(e.b)&&hm(e.a);function yre(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&ii[e[1]]*17,g:255&ii[e[2]]*17,b:255&ii[e[3]]*17,a:t===5?ii[e[4]]*17:255}:(t===7||t===9)&&(n={r:ii[e[1]]<<4|ii[e[2]],g:ii[e[3]]<<4|ii[e[4]],b:ii[e[5]]<<4|ii[e[6]],a:t===9?ii[e[7]]<<4|ii[e[8]]:255})),n}const _re=(e,t)=>e<255?t(e):"";function bre(e){var t=vre(e)?mre:gre;return e?"#"+t(e.r)+t(e.g)+t(e.b)+_re(e.a,t):void 0}const wre=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Q6(e,t,n){const r=t*Math.min(n,1-n),i=(o,a=(o+e/30)%12)=>n-r*Math.max(Math.min(a-3,9-a,1),-1);return[i(0),i(8),i(4)]}function xre(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 Sre(e,t,n){const r=Q6(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 Ere(e,t,n,r,i){return e===i?(t-n)/r+(t.5?c/(2-i-o):c/(i+o),s=Ere(t,n,r,c,i),s=s*60+.5),[s|0,l||0,a]}function UE(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(Ja)}function BE(e,t,n){return UE(Q6,e,t,n)}function Tre(e,t,n){return UE(Sre,e,t,n)}function Ore(e,t,n){return UE(xre,e,t,n)}function X6(e){return(e%360+360)%360}function Cre(e){const t=wre.exec(e);let n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?Bd(+t[5]):Ja(+t[5]));const i=X6(+t[2]),o=+t[3]/100,a=+t[4]/100;return t[1]==="hwb"?r=Tre(i,o,a):t[1]==="hsv"?r=Ore(i,o,a):r=BE(i,o,a),{r:r[0],g:r[1],b:r[2],a:n}}function kre(e,t){var n=$E(e);n[0]=X6(n[0]+t),n=BE(n),e.r=n[0],e.g=n[1],e.b=n[2]}function Pre(e){if(!e)return;const t=$E(e),n=t[0],r=IL(t[1]),i=IL(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${i}%, ${Do(e.a)})`:`hsl(${n}, ${r}%, ${i}%)`}const FL={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"},$L={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 Lre(){const e={},t=Object.keys($L),n=Object.keys(FL);let r,i,o,a,s;for(r=0;r>16&255,o>>8&255,o&255]}return e}let pm;function jre(e){pm||(pm=Lre(),pm.transparent=[0,0,0,0]);const t=pm[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const Mre=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Nre(e){const t=Mre.exec(e);let n=255,r,i,o;if(t){if(t[7]!==r){const a=+t[7];n=t[8]?Bd(a):Ia(a*255,0,255)}return r=+t[1],i=+t[3],o=+t[5],r=255&(t[2]?Bd(r):Ia(r,0,255)),i=255&(t[4]?Bd(i):Ia(i,0,255)),o=255&(t[6]?Bd(o):Ia(o,0,255)),{r,g:i,b:o,a:n}}}function Rre(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${Do(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const ab=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,oc=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function Are(e,t,n){const r=oc(Do(e.r)),i=oc(Do(e.g)),o=oc(Do(e.b));return{r:Ja(ab(r+n*(oc(Do(t.r))-r))),g:Ja(ab(i+n*(oc(Do(t.g))-i))),b:Ja(ab(o+n*(oc(Do(t.b))-o))),a:e.a+n*(t.a-e.a)}}function mm(e,t,n){if(e){let r=$E(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=BE(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function J6(e,t){return e&&Object.assign(t||{},e)}function UL(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=Ja(e[3]))):(t=J6(e,{r:0,g:0,b:0,a:1}),t.a=Ja(t.a)),t}function Dre(e){return e.charAt(0)==="r"?Nre(e):Cre(e)}class sh{constructor(t){if(t instanceof sh)return t;const n=typeof t;let r;n==="object"?r=UL(t):n==="string"&&(r=yre(t)||jre(t)||Dre(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var t=J6(this._rgb);return t&&(t.a=Do(t.a)),t}set rgb(t){this._rgb=UL(t)}rgbString(){return this._valid?Rre(this._rgb):void 0}hexString(){return this._valid?bre(this._rgb):void 0}hslString(){return this._valid?Pre(this._rgb):void 0}mix(t,n){if(t){const r=this.rgb,i=t.rgb;let o;const a=n===o?.5:n,s=2*a-1,l=r.a-i.a,c=((s*l===-1?s:(s+l)/(1+s*l))+1)/2;o=1-c,r.r=255&c*r.r+o*i.r+.5,r.g=255&c*r.g+o*i.g+.5,r.b=255&c*r.b+o*i.b+.5,r.a=a*r.a+(1-a)*i.a,this.rgb=r}return this}interpolate(t,n){return t&&(this._rgb=Are(this._rgb,t._rgb,n)),this}clone(){return new sh(this.rgb)}alpha(t){return this._rgb.a=Ja(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=Gh(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 mm(this._rgb,2,t),this}darken(t){return mm(this._rgb,2,-t),this}saturate(t){return mm(this._rgb,1,t),this}desaturate(t){return mm(this._rgb,1,-t),this}rotate(t){return kre(this._rgb,t),this}}/*! + */function Gh(e){return e+.5|0}const Ia=(e,t,n)=>Math.max(Math.min(e,n),t);function Bd(e){return Ia(Gh(e*2.55),0,255)}function Ja(e){return Ia(Gh(e*255),0,255)}function Do(e){return Ia(Gh(e/2.55)/100,0,1)}function IL(e){return Ia(Gh(e*100),0,100)}const ii={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},Ax=[..."0123456789ABCDEF"],gre=e=>Ax[e&15],vre=e=>Ax[(e&240)>>4]+Ax[e&15],hm=e=>(e&240)>>4===(e&15),yre=e=>hm(e.r)&&hm(e.g)&&hm(e.b)&&hm(e.a);function _re(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&ii[e[1]]*17,g:255&ii[e[2]]*17,b:255&ii[e[3]]*17,a:t===5?ii[e[4]]*17:255}:(t===7||t===9)&&(n={r:ii[e[1]]<<4|ii[e[2]],g:ii[e[3]]<<4|ii[e[4]],b:ii[e[5]]<<4|ii[e[6]],a:t===9?ii[e[7]]<<4|ii[e[8]]:255})),n}const bre=(e,t)=>e<255?t(e):"";function wre(e){var t=yre(e)?gre:vre;return e?"#"+t(e.r)+t(e.g)+t(e.b)+bre(e.a,t):void 0}const xre=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Q6(e,t,n){const r=t*Math.min(n,1-n),i=(o,a=(o+e/30)%12)=>n-r*Math.max(Math.min(a-3,9-a,1),-1);return[i(0),i(8),i(4)]}function Sre(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 Ere(e,t,n){const r=Q6(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 Tre(e,t,n,r,i){return e===i?(t-n)/r+(t.5?c/(2-i-o):c/(i+o),s=Tre(t,n,r,c,i),s=s*60+.5),[s|0,l||0,a]}function UE(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(Ja)}function BE(e,t,n){return UE(Q6,e,t,n)}function Ore(e,t,n){return UE(Ere,e,t,n)}function Cre(e,t,n){return UE(Sre,e,t,n)}function X6(e){return(e%360+360)%360}function kre(e){const t=xre.exec(e);let n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?Bd(+t[5]):Ja(+t[5]));const i=X6(+t[2]),o=+t[3]/100,a=+t[4]/100;return t[1]==="hwb"?r=Ore(i,o,a):t[1]==="hsv"?r=Cre(i,o,a):r=BE(i,o,a),{r:r[0],g:r[1],b:r[2],a:n}}function Pre(e,t){var n=$E(e);n[0]=X6(n[0]+t),n=BE(n),e.r=n[0],e.g=n[1],e.b=n[2]}function Lre(e){if(!e)return;const t=$E(e),n=t[0],r=IL(t[1]),i=IL(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${i}%, ${Do(e.a)})`:`hsl(${n}, ${r}%, ${i}%)`}const FL={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"},$L={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 jre(){const e={},t=Object.keys($L),n=Object.keys(FL);let r,i,o,a,s;for(r=0;r>16&255,o>>8&255,o&255]}return e}let pm;function Mre(e){pm||(pm=jre(),pm.transparent=[0,0,0,0]);const t=pm[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const Nre=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Rre(e){const t=Nre.exec(e);let n=255,r,i,o;if(t){if(t[7]!==r){const a=+t[7];n=t[8]?Bd(a):Ia(a*255,0,255)}return r=+t[1],i=+t[3],o=+t[5],r=255&(t[2]?Bd(r):Ia(r,0,255)),i=255&(t[4]?Bd(i):Ia(i,0,255)),o=255&(t[6]?Bd(o):Ia(o,0,255)),{r,g:i,b:o,a:n}}}function Are(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${Do(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const ab=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,oc=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function Dre(e,t,n){const r=oc(Do(e.r)),i=oc(Do(e.g)),o=oc(Do(e.b));return{r:Ja(ab(r+n*(oc(Do(t.r))-r))),g:Ja(ab(i+n*(oc(Do(t.g))-i))),b:Ja(ab(o+n*(oc(Do(t.b))-o))),a:e.a+n*(t.a-e.a)}}function mm(e,t,n){if(e){let r=$E(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=BE(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function J6(e,t){return e&&Object.assign(t||{},e)}function UL(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=Ja(e[3]))):(t=J6(e,{r:0,g:0,b:0,a:1}),t.a=Ja(t.a)),t}function Ire(e){return e.charAt(0)==="r"?Rre(e):kre(e)}class sh{constructor(t){if(t instanceof sh)return t;const n=typeof t;let r;n==="object"?r=UL(t):n==="string"&&(r=_re(t)||Mre(t)||Ire(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var t=J6(this._rgb);return t&&(t.a=Do(t.a)),t}set rgb(t){this._rgb=UL(t)}rgbString(){return this._valid?Are(this._rgb):void 0}hexString(){return this._valid?wre(this._rgb):void 0}hslString(){return this._valid?Lre(this._rgb):void 0}mix(t,n){if(t){const r=this.rgb,i=t.rgb;let o;const a=n===o?.5:n,s=2*a-1,l=r.a-i.a,c=((s*l===-1?s:(s+l)/(1+s*l))+1)/2;o=1-c,r.r=255&c*r.r+o*i.r+.5,r.g=255&c*r.g+o*i.g+.5,r.b=255&c*r.b+o*i.b+.5,r.a=a*r.a+(1-a)*i.a,this.rgb=r}return this}interpolate(t,n){return t&&(this._rgb=Dre(this._rgb,t._rgb,n)),this}clone(){return new sh(this.rgb)}alpha(t){return this._rgb.a=Ja(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=Gh(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 mm(this._rgb,2,t),this}darken(t){return mm(this._rgb,2,-t),this}saturate(t){return mm(this._rgb,1,t),this}desaturate(t){return mm(this._rgb,1,-t),this}rotate(t){return Pre(this._rgb,t),this}}/*! * Chart.js v4.4.0 * https://www.chartjs.org * (c) 2023 Chart.js Contributors * Released under the MIT License - */function Lo(){}const Ire=(()=>{let e=0;return()=>e++})();function dt(e){return e===null||typeof e>"u"}function Nt(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function rt(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function tn(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Dr(e,t){return tn(e)?e:t}function Ze(e,t){return typeof e>"u"?t:e}const Fre=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,e5=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function kt(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function bt(e,t,n,r){let i,o,a;if(Nt(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 Bre(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 zre(e){const t=Bre(e);return n=>{for(const r of t){if(r==="")break;n=n&&n[r]}return n}}function ls(e,t){return(BL[t]||(BL[t]=zre(t)))(e)}function zE(e){return e.charAt(0).toUpperCase()+e.slice(1)}const ch=e=>typeof e<"u",cs=e=>typeof e=="function",zL=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function Vre(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const Ft=Math.PI,Dt=2*Ft,Hre=Dt+Ft,Uv=Number.POSITIVE_INFINITY,Wre=Ft/180,cn=Ft/2,Ps=Ft/4,VL=Ft*2/3,Fa=Math.log10,vo=Math.sign;function mf(e,t,n){return Math.abs(e-t)i-o).pop(),t}function _u(e){return!isNaN(parseFloat(e))&&isFinite(e)}function Gre(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function n5(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 HE(e,t,n){n=n||(a=>e[a]1;)o=i+r>>1,n(o)?i=o:r=o;return{lo:i,hi:r}}const Bo=(e,t,n,r)=>HE(e,n,r?i=>{const o=e[i][t];return oe[i][t]HE(e,n,r=>e[r][t]>=n);function Qre(e,t,n){let r=0,i=e.length;for(;rr&&e[i-1]>n;)i--;return r>0||i{const r="_onData"+zE(n),i=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...o){const a=i.apply(this,o);return e._chartjs.listeners.forEach(s=>{typeof s[r]=="function"&&s[r](...o)}),a}})})}function YL(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)&&(i5.forEach(o=>{delete e[o]}),delete e._chartjs)}function o5(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const a5=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function s5(e,t){let n=[],r=!1;return function(...i){n=i,r||(r=!0,a5.call(window,()=>{r=!1,e.apply(t,n)}))}}function Jre(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}const WE=e=>e==="start"?"left":e==="end"?"right":"center",tr=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,eie=(e,t,n,r)=>e===(r?"left":"right")?n:e==="center"?(t+n)/2:t;function l5(e,t,n){const r=t.length;let i=0,o=r;if(e._sorted){const{iScale:a,_parsed:s}=e,l=a.axis,{min:c,max:d,minDefined:f,maxDefined:p}=a.getUserBounds();f&&(i=Mn(Math.min(Bo(s,l,c).lo,n?r:Bo(t,l,a.getPixelForValue(c)).lo),0,r-1)),p?o=Mn(Math.max(Bo(s,a.axis,d,!0).hi+1,n?0:Bo(t,l,a.getPixelForValue(d),!0).hi+1),i,r)-i:o=r-i}return{start:i,count:o}}function c5(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 gm=e=>e===0||e===1,GL=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*Dt/n)),qL=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*Dt/n)+1,gf={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*cn)+1,easeOutSine:e=>Math.sin(e*cn),easeInOutSine:e=>-.5*(Math.cos(Ft*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>gm(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=>gm(e)?e:GL(e,.075,.3),easeOutElastic:e=>gm(e)?e:qL(e,.075,.3),easeInOutElastic(e){return gm(e)?e:e<.5?.5*GL(e*2,.1125,.45):.5+.5*qL(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-gf.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?gf.easeInBounce(e*2)*.5:gf.easeOutBounce(e*2-1)*.5+.5};function YE(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function ZL(e){return YE(e)?e:new sh(e)}function sb(e){return YE(e)?e:new sh(e).saturate(.5).darken(.1).hexString()}const tie=["x","y","borderWidth","radius","tension"],nie=["color","borderColor","backgroundColor"];function rie(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:nie},numbers:{type:"number",properties:tie}}),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 iie(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const KL=new Map;function oie(e,t){t=t||{};const n=e+JSON.stringify(t);let r=KL.get(n);return r||(r=new Intl.NumberFormat(e,t),KL.set(n,r)),r}function qh(e,t,n){return oie(t,n).format(e)}const u5={values(e){return Nt(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=aie(e,n)}const a=Fa(Math.abs(o)),s=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:i,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(l,this.options.ticks.format),qh(e,r,l)},logarithmic(e,t,n){if(e===0)return"0";const r=n[t].significand||e/Math.pow(10,Math.floor(Fa(e)));return[1,2,3,5,10,15].includes(r)||t>.8*n.length?u5.numeric.call(this,e,t,n):""}};function aie(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 u0={formatters:u5};function sie(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,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:u0.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 xl=Object.create(null),Ix=Object.create(null);function vf(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)=>sb(i.backgroundColor),this.hoverBorderColor=(r,i)=>sb(i.borderColor),this.hoverColor=(r,i)=>sb(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 lb(this,t,n)}get(t){return vf(this,t)}describe(t,n){return lb(Ix,t,n)}override(t,n){return lb(xl,t,n)}route(t,n,r,i){const o=vf(this,t),a=vf(this,r),s="_"+n;Object.defineProperties(o,{[s]:{value:o[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[s],c=a[i];return rt(l)?Object.assign({},c,l):Ze(l,c)},set(l){this[s]=l}}})}apply(t){t.forEach(n=>n(this))}}var nn=new lie({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[rie,iie,sie]);function cie(e){return!e||dt(e.size)||dt(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function Bv(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 uie(e,t,n,r){r=r||{};let i=r.data=r.data||{},o=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(i=r.data={},o=r.garbageCollect=[],r.font=t),e.save(),e.font=t;let a=0;const s=n.length;let l,c,d,f,p;for(l=0;ln.length){for(l=0;l0&&e.stroke()}}function zo(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,hie(e,o),l=0;l+e||0;function GE(e,t){const n={},r=rt(t),i=r?Object.keys(t):t,o=rt(e)?r?a=>Ze(e[a],e[t[a]]):a=>e[a]:()=>e;for(const a of i)n[a]=_ie(o(a));return n}function f5(e){return GE(e,{top:"y",right:"x",bottom:"y",left:"x"})}function ll(e){return GE(e,["topLeft","topRight","bottomLeft","bottomRight"])}function sr(e){const t=f5(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function bn(e,t){e=e||{},t=t||nn.font;let n=Ze(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let r=Ze(e.style,t.style);r&&!(""+r).match(vie)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:Ze(e.family,t.family),lineHeight:yie(Ze(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:Ze(e.weight,t.weight),string:""};return i.string=cie(i),i}function zd(e,t,n,r){let i=!0,o,a,s;for(o=0,a=e.length;on&&s===0?0:s+l;return{min:a(r,-Math.abs(o)),max:a(i,o)}}function bs(e,t){return Object.assign(Object.create(e),t)}function qE(e,t=[""],n,r,i=()=>e[0]){const o=n||e;typeof r>"u"&&(r=g5("_fallback",e));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:o,_fallback:r,_getTarget:i,override:s=>qE([s,...e],t,o,r)};return new Proxy(a,{deleteProperty(s,l){return delete s[l],delete s._keys,delete e[0][l],!0},get(s,l){return p5(s,l,()=>kie(l,t,e,s))},getOwnPropertyDescriptor(s,l){return Reflect.getOwnPropertyDescriptor(s._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(s,l){return JL(s).includes(l)},ownKeys(s){return JL(s)},set(s,l,c){const d=s._storage||(s._storage=i());return s[l]=d[l]=c,delete s._keys,!0}})}function bu(e,t,n,r){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:h5(e,r),setContext:o=>bu(e,o,n,r),override:o=>bu(e.override(o),t,n,r)};return new Proxy(i,{deleteProperty(o,a){return delete o[a],delete e[a],!0},get(o,a,s){return p5(o,a,()=>xie(o,a,s))},getOwnPropertyDescriptor(o,a){return o._descriptors.allKeys?Reflect.has(e,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,a)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(o,a){return Reflect.has(e,a)},ownKeys(){return Reflect.ownKeys(e)},set(o,a,s){return e[a]=s,delete o[a],!0}})}function h5(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:cs(n)?n:()=>n,isIndexable:cs(r)?r:()=>r}}const wie=(e,t)=>e?e+zE(t):t,ZE=(e,t)=>rt(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function p5(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t))return e[t];const r=n();return e[t]=r,r}function xie(e,t,n){const{_proxy:r,_context:i,_subProxy:o,_descriptors:a}=e;let s=r[t];return cs(s)&&a.isScriptable(t)&&(s=Sie(t,s,e,n)),Nt(s)&&s.length&&(s=Eie(t,s,e,a.isIndexable)),ZE(t,s)&&(s=bu(s,i,o&&o[t],a)),s}function Sie(e,t,n,r){const{_proxy:i,_context:o,_subProxy:a,_stack:s}=n;if(s.has(e))throw new Error("Recursion detected: "+Array.from(s).join("->")+"->"+e);s.add(e);let l=t(o,a||r);return s.delete(e),ZE(e,l)&&(l=KE(i._scopes,i,e,l)),l}function Eie(e,t,n,r){const{_proxy:i,_context:o,_subProxy:a,_descriptors:s}=n;if(typeof o.index<"u"&&r(e))return t[o.index%t.length];if(rt(t[0])){const l=t,c=i._scopes.filter(d=>d!==l);t=[];for(const d of l){const f=KE(c,i,e,d);t.push(bu(f,o,a&&a[e],s))}}return t}function m5(e,t,n){return cs(e)?e(t,n):e}const Tie=(e,t)=>e===!0?t:typeof e=="string"?ls(t,e):void 0;function Oie(e,t,n,r,i){for(const o of t){const a=Tie(n,o);if(a){e.add(a);const s=m5(a._fallback,n,i);if(typeof s<"u"&&s!==n&&s!==r)return s}else if(a===!1&&typeof r<"u"&&n!==r)return null}return!1}function KE(e,t,n,r){const i=t._rootScopes,o=m5(t._fallback,n,r),a=[...e,...i],s=new Set;s.add(r);let l=XL(s,a,n,o||n,r);return l===null||typeof o<"u"&&o!==n&&(l=XL(s,a,o,l,r),l===null)?!1:qE(Array.from(s),[""],i,o,()=>Cie(t,n,r))}function XL(e,t,n,r,i){for(;n;)n=Oie(e,t,n,r,i);return n}function Cie(e,t,n){const r=e._getTarget();t in r||(r[t]={});const i=r[t];return Nt(i)&&rt(n)?n:i||{}}function kie(e,t,n,r){let i;for(const o of t)if(i=g5(wie(o,e),n),typeof i<"u")return ZE(e,i)?KE(n,r,e,i):i}function g5(e,t){for(const n of t){if(!n)continue;const r=n[e];if(typeof r<"u")return r}}function JL(e){let t=e._keys;return t||(t=e._keys=Pie(e._scopes)),t}function Pie(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 v5(e,t,n,r){const{iScale:i}=e,{key:o="r"}=this._parsing,a=new Array(r);let s,l,c,d;for(s=0,l=r;ste==="x"?"y":"x";function jie(e,t,n,r){const i=e.skip?t:e,o=t,a=n.skip?t:n,s=Dx(o,i),l=Dx(a,o);let c=s/(s+l),d=l/(s+l);c=isNaN(c)?0:c,d=isNaN(d)?0:d;const f=r*c,p=r*d;return{previous:{x:o.x-f*(a.x-i.x),y:o.y-f*(a.y-i.y)},next:{x:o.x+p*(a.x-i.x),y:o.y+p*(a.y-i.y)}}}function Mie(e,t,n){const r=e.length;let i,o,a,s,l,c=wu(e,0);for(let d=0;d!c.skip)),t.cubicInterpolationMode==="monotone")Rie(e,i);else{let c=r?e[e.length-1]:e[0];for(o=0,a=e.length;oe.ownerDocument.defaultView.getComputedStyle(e,null);function Iie(e,t){return h0(e).getPropertyValue(t)}const Fie=["top","right","bottom","left"];function cl(e,t,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const o=Fie[i];r[o]=parseFloat(e[t+"-"+o+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const $ie=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function Uie(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:o}=r;let a=!1,s,l;if($ie(i,o,e.target))s=i,l=o;else{const c=t.getBoundingClientRect();s=r.clientX-c.left,l=r.clientY-c.top,a=!0}return{x:s,y:l,box:a}}function zs(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,i=h0(n),o=i.boxSizing==="border-box",a=cl(i,"padding"),s=cl(i,"border","width"),{x:l,y:c,box:d}=Uie(e,n),f=a.left+(d&&s.left),p=a.top+(d&&s.top);let{width:m,height:v}=t;return o&&(m-=a.width+s.width,v-=a.height+s.height),{x:Math.round((l-f)/m*n.width/r),y:Math.round((c-p)/v*n.height/r)}}function Bie(e,t,n){let r,i;if(t===void 0||n===void 0){const o=QE(e);if(!o)t=e.clientWidth,n=e.clientHeight;else{const a=o.getBoundingClientRect(),s=h0(o),l=cl(s,"border","width"),c=cl(s,"padding");t=a.width-c.width-l.width,n=a.height-c.height-l.height,r=zv(s.maxWidth,o,"clientWidth"),i=zv(s.maxHeight,o,"clientHeight")}}return{width:t,height:n,maxWidth:r||Uv,maxHeight:i||Uv}}const ym=e=>Math.round(e*10)/10;function zie(e,t,n,r){const i=h0(e),o=cl(i,"margin"),a=zv(i.maxWidth,e,"clientWidth")||Uv,s=zv(i.maxHeight,e,"clientHeight")||Uv,l=Bie(e,t,n);let{width:c,height:d}=l;if(i.boxSizing==="content-box"){const f=cl(i,"border","width"),p=cl(i,"padding");c-=p.width+f.width,d-=p.height+f.height}return c=Math.max(0,c-o.width),d=Math.max(0,r?c/r:d-o.height),c=ym(Math.min(c,a,l.maxWidth)),d=ym(Math.min(d,s,l.maxHeight)),c&&!d&&(d=ym(c/2)),(t!==void 0||n!==void 0)&&r&&l.height&&d>l.height&&(d=l.height,c=ym(Math.floor(d*r))),{width:c,height:d}}function ej(e,t,n){const r=t||1,i=Math.floor(e.height*r),o=Math.floor(e.width*r);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const a=e.canvas;return a.style&&(n||!a.style.height&&!a.style.width)&&(a.style.height=`${e.height}px`,a.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||a.height!==i||a.width!==o?(e.currentDevicePixelRatio=r,a.height=i,a.width=o,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}const Vie=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 tj(e,t){const n=Iie(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function Vs(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function Hie(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 Wie(e,t,n,r){const i={x:e.cp2x,y:e.cp2y},o={x:t.cp1x,y:t.cp1y},a=Vs(e,i,n),s=Vs(i,o,n),l=Vs(o,t,n),c=Vs(a,s,n),d=Vs(s,l,n);return Vs(c,d,n)}const Yie=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}}},Gie=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function qc(e,t,n){return e?Yie(t,n):Gie()}function b5(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 w5(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function x5(e){return e==="angle"?{between:uh,compare:qre,normalize:Fr}:{between:Uo,compare:(t,n)=>t-n,normalize:t=>t}}function nj({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 qie(e,t,n){const{property:r,start:i,end:o}=n,{between:a,normalize:s}=x5(r),l=t.length;let{start:c,end:d,loop:f}=e,p,m;if(f){for(c+=l,d+=l,p=0,m=l;pl(i,S,_)&&s(i,S)!==0,O=()=>s(o,_)===0||l(o,S,_),k=()=>y||E(),j=()=>!y||O();for(let A=d,U=d;A<=f;++A)w=t[A%a],!w.skip&&(_=c(w[r]),_!==S&&(y=l(_,i,o),x===null&&k()&&(x=s(_,i)===0?A:U),x!==null&&j()&&(v.push(nj({start:x,end:A,loop:p,count:a,style:m})),x=null),U=A,S=_));return x!==null&&v.push(nj({start:x,end:f,loop:p,count:a,style:m})),v}function E5(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 Kie(e,t,n,r){const i=e.length,o=[];let a=t,s=e[t],l;for(l=t+1;l<=n;++l){const c=e[l%i];c.skip||c.stop?s.skip||(r=!1,o.push({start:t%i,end:(l-1)%i,loop:r}),t=a=c.stop?l:null):(a=l,s.skip&&(t=l)),s=c}return a!==null&&o.push({start:t%i,end:a%i,loop:r}),o}function Qie(e,t){const n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];const o=!!e._loop,{start:a,end:s}=Zie(n,i,o,r);if(r===!0)return rj(e,[{start:a,end:s,loop:o}],n,t);const l=s{let e=0;return()=>e++})();function dt(e){return e===null||typeof e>"u"}function Nt(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function rt(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function tn(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Dr(e,t){return tn(e)?e:t}function Ze(e,t){return typeof e>"u"?t:e}const $re=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,e5=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function kt(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function bt(e,t,n,r){let i,o,a;if(Nt(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 zre(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 Vre(e){const t=zre(e);return n=>{for(const r of t){if(r==="")break;n=n&&n[r]}return n}}function ls(e,t){return(BL[t]||(BL[t]=Vre(t)))(e)}function zE(e){return e.charAt(0).toUpperCase()+e.slice(1)}const ch=e=>typeof e<"u",cs=e=>typeof e=="function",zL=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function Hre(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const Ft=Math.PI,Dt=2*Ft,Wre=Dt+Ft,Uv=Number.POSITIVE_INFINITY,Yre=Ft/180,cn=Ft/2,Ps=Ft/4,VL=Ft*2/3,Fa=Math.log10,vo=Math.sign;function mf(e,t,n){return Math.abs(e-t)i-o).pop(),t}function _u(e){return!isNaN(parseFloat(e))&&isFinite(e)}function qre(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function n5(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 HE(e,t,n){n=n||(a=>e[a]1;)o=i+r>>1,n(o)?i=o:r=o;return{lo:i,hi:r}}const Bo=(e,t,n,r)=>HE(e,n,r?i=>{const o=e[i][t];return oe[i][t]HE(e,n,r=>e[r][t]>=n);function Xre(e,t,n){let r=0,i=e.length;for(;rr&&e[i-1]>n;)i--;return r>0||i{const r="_onData"+zE(n),i=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...o){const a=i.apply(this,o);return e._chartjs.listeners.forEach(s=>{typeof s[r]=="function"&&s[r](...o)}),a}})})}function YL(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)&&(i5.forEach(o=>{delete e[o]}),delete e._chartjs)}function o5(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const a5=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function s5(e,t){let n=[],r=!1;return function(...i){n=i,r||(r=!0,a5.call(window,()=>{r=!1,e.apply(t,n)}))}}function eie(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}const WE=e=>e==="start"?"left":e==="end"?"right":"center",tr=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,tie=(e,t,n,r)=>e===(r?"left":"right")?n:e==="center"?(t+n)/2:t;function l5(e,t,n){const r=t.length;let i=0,o=r;if(e._sorted){const{iScale:a,_parsed:s}=e,l=a.axis,{min:c,max:d,minDefined:f,maxDefined:p}=a.getUserBounds();f&&(i=Mn(Math.min(Bo(s,l,c).lo,n?r:Bo(t,l,a.getPixelForValue(c)).lo),0,r-1)),p?o=Mn(Math.max(Bo(s,a.axis,d,!0).hi+1,n?0:Bo(t,l,a.getPixelForValue(d),!0).hi+1),i,r)-i:o=r-i}return{start:i,count:o}}function c5(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 gm=e=>e===0||e===1,GL=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*Dt/n)),qL=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*Dt/n)+1,gf={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*cn)+1,easeOutSine:e=>Math.sin(e*cn),easeInOutSine:e=>-.5*(Math.cos(Ft*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>gm(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=>gm(e)?e:GL(e,.075,.3),easeOutElastic:e=>gm(e)?e:qL(e,.075,.3),easeInOutElastic(e){return gm(e)?e:e<.5?.5*GL(e*2,.1125,.45):.5+.5*qL(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-gf.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?gf.easeInBounce(e*2)*.5:gf.easeOutBounce(e*2-1)*.5+.5};function YE(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function ZL(e){return YE(e)?e:new sh(e)}function sb(e){return YE(e)?e:new sh(e).saturate(.5).darken(.1).hexString()}const nie=["x","y","borderWidth","radius","tension"],rie=["color","borderColor","backgroundColor"];function iie(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:rie},numbers:{type:"number",properties:nie}}),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 oie(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const KL=new Map;function aie(e,t){t=t||{};const n=e+JSON.stringify(t);let r=KL.get(n);return r||(r=new Intl.NumberFormat(e,t),KL.set(n,r)),r}function qh(e,t,n){return aie(t,n).format(e)}const u5={values(e){return Nt(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=sie(e,n)}const a=Fa(Math.abs(o)),s=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:i,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(l,this.options.ticks.format),qh(e,r,l)},logarithmic(e,t,n){if(e===0)return"0";const r=n[t].significand||e/Math.pow(10,Math.floor(Fa(e)));return[1,2,3,5,10,15].includes(r)||t>.8*n.length?u5.numeric.call(this,e,t,n):""}};function sie(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 u0={formatters:u5};function lie(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,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:u0.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 xl=Object.create(null),Ix=Object.create(null);function vf(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)=>sb(i.backgroundColor),this.hoverBorderColor=(r,i)=>sb(i.borderColor),this.hoverColor=(r,i)=>sb(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 lb(this,t,n)}get(t){return vf(this,t)}describe(t,n){return lb(Ix,t,n)}override(t,n){return lb(xl,t,n)}route(t,n,r,i){const o=vf(this,t),a=vf(this,r),s="_"+n;Object.defineProperties(o,{[s]:{value:o[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[s],c=a[i];return rt(l)?Object.assign({},c,l):Ze(l,c)},set(l){this[s]=l}}})}apply(t){t.forEach(n=>n(this))}}var nn=new cie({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[iie,oie,lie]);function uie(e){return!e||dt(e.size)||dt(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function Bv(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 die(e,t,n,r){r=r||{};let i=r.data=r.data||{},o=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(i=r.data={},o=r.garbageCollect=[],r.font=t),e.save(),e.font=t;let a=0;const s=n.length;let l,c,d,f,p;for(l=0;ln.length){for(l=0;l0&&e.stroke()}}function zo(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,pie(e,o),l=0;l+e||0;function GE(e,t){const n={},r=rt(t),i=r?Object.keys(t):t,o=rt(e)?r?a=>Ze(e[a],e[t[a]]):a=>e[a]:()=>e;for(const a of i)n[a]=bie(o(a));return n}function f5(e){return GE(e,{top:"y",right:"x",bottom:"y",left:"x"})}function ll(e){return GE(e,["topLeft","topRight","bottomLeft","bottomRight"])}function sr(e){const t=f5(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function bn(e,t){e=e||{},t=t||nn.font;let n=Ze(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let r=Ze(e.style,t.style);r&&!(""+r).match(yie)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:Ze(e.family,t.family),lineHeight:_ie(Ze(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:Ze(e.weight,t.weight),string:""};return i.string=uie(i),i}function zd(e,t,n,r){let i=!0,o,a,s;for(o=0,a=e.length;on&&s===0?0:s+l;return{min:a(r,-Math.abs(o)),max:a(i,o)}}function bs(e,t){return Object.assign(Object.create(e),t)}function qE(e,t=[""],n,r,i=()=>e[0]){const o=n||e;typeof r>"u"&&(r=g5("_fallback",e));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:o,_fallback:r,_getTarget:i,override:s=>qE([s,...e],t,o,r)};return new Proxy(a,{deleteProperty(s,l){return delete s[l],delete s._keys,delete e[0][l],!0},get(s,l){return p5(s,l,()=>Pie(l,t,e,s))},getOwnPropertyDescriptor(s,l){return Reflect.getOwnPropertyDescriptor(s._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(s,l){return JL(s).includes(l)},ownKeys(s){return JL(s)},set(s,l,c){const d=s._storage||(s._storage=i());return s[l]=d[l]=c,delete s._keys,!0}})}function bu(e,t,n,r){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:h5(e,r),setContext:o=>bu(e,o,n,r),override:o=>bu(e.override(o),t,n,r)};return new Proxy(i,{deleteProperty(o,a){return delete o[a],delete e[a],!0},get(o,a,s){return p5(o,a,()=>Sie(o,a,s))},getOwnPropertyDescriptor(o,a){return o._descriptors.allKeys?Reflect.has(e,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,a)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(o,a){return Reflect.has(e,a)},ownKeys(){return Reflect.ownKeys(e)},set(o,a,s){return e[a]=s,delete o[a],!0}})}function h5(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:cs(n)?n:()=>n,isIndexable:cs(r)?r:()=>r}}const xie=(e,t)=>e?e+zE(t):t,ZE=(e,t)=>rt(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function p5(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t))return e[t];const r=n();return e[t]=r,r}function Sie(e,t,n){const{_proxy:r,_context:i,_subProxy:o,_descriptors:a}=e;let s=r[t];return cs(s)&&a.isScriptable(t)&&(s=Eie(t,s,e,n)),Nt(s)&&s.length&&(s=Tie(t,s,e,a.isIndexable)),ZE(t,s)&&(s=bu(s,i,o&&o[t],a)),s}function Eie(e,t,n,r){const{_proxy:i,_context:o,_subProxy:a,_stack:s}=n;if(s.has(e))throw new Error("Recursion detected: "+Array.from(s).join("->")+"->"+e);s.add(e);let l=t(o,a||r);return s.delete(e),ZE(e,l)&&(l=KE(i._scopes,i,e,l)),l}function Tie(e,t,n,r){const{_proxy:i,_context:o,_subProxy:a,_descriptors:s}=n;if(typeof o.index<"u"&&r(e))return t[o.index%t.length];if(rt(t[0])){const l=t,c=i._scopes.filter(d=>d!==l);t=[];for(const d of l){const f=KE(c,i,e,d);t.push(bu(f,o,a&&a[e],s))}}return t}function m5(e,t,n){return cs(e)?e(t,n):e}const Oie=(e,t)=>e===!0?t:typeof e=="string"?ls(t,e):void 0;function Cie(e,t,n,r,i){for(const o of t){const a=Oie(n,o);if(a){e.add(a);const s=m5(a._fallback,n,i);if(typeof s<"u"&&s!==n&&s!==r)return s}else if(a===!1&&typeof r<"u"&&n!==r)return null}return!1}function KE(e,t,n,r){const i=t._rootScopes,o=m5(t._fallback,n,r),a=[...e,...i],s=new Set;s.add(r);let l=XL(s,a,n,o||n,r);return l===null||typeof o<"u"&&o!==n&&(l=XL(s,a,o,l,r),l===null)?!1:qE(Array.from(s),[""],i,o,()=>kie(t,n,r))}function XL(e,t,n,r,i){for(;n;)n=Cie(e,t,n,r,i);return n}function kie(e,t,n){const r=e._getTarget();t in r||(r[t]={});const i=r[t];return Nt(i)&&rt(n)?n:i||{}}function Pie(e,t,n,r){let i;for(const o of t)if(i=g5(xie(o,e),n),typeof i<"u")return ZE(e,i)?KE(n,r,e,i):i}function g5(e,t){for(const n of t){if(!n)continue;const r=n[e];if(typeof r<"u")return r}}function JL(e){let t=e._keys;return t||(t=e._keys=Lie(e._scopes)),t}function Lie(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 v5(e,t,n,r){const{iScale:i}=e,{key:o="r"}=this._parsing,a=new Array(r);let s,l,c,d;for(s=0,l=r;ste==="x"?"y":"x";function Mie(e,t,n,r){const i=e.skip?t:e,o=t,a=n.skip?t:n,s=Dx(o,i),l=Dx(a,o);let c=s/(s+l),d=l/(s+l);c=isNaN(c)?0:c,d=isNaN(d)?0:d;const f=r*c,p=r*d;return{previous:{x:o.x-f*(a.x-i.x),y:o.y-f*(a.y-i.y)},next:{x:o.x+p*(a.x-i.x),y:o.y+p*(a.y-i.y)}}}function Nie(e,t,n){const r=e.length;let i,o,a,s,l,c=wu(e,0);for(let d=0;d!c.skip)),t.cubicInterpolationMode==="monotone")Aie(e,i);else{let c=r?e[e.length-1]:e[0];for(o=0,a=e.length;oe.ownerDocument.defaultView.getComputedStyle(e,null);function Fie(e,t){return h0(e).getPropertyValue(t)}const $ie=["top","right","bottom","left"];function cl(e,t,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const o=$ie[i];r[o]=parseFloat(e[t+"-"+o+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const Uie=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function Bie(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:o}=r;let a=!1,s,l;if(Uie(i,o,e.target))s=i,l=o;else{const c=t.getBoundingClientRect();s=r.clientX-c.left,l=r.clientY-c.top,a=!0}return{x:s,y:l,box:a}}function zs(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,i=h0(n),o=i.boxSizing==="border-box",a=cl(i,"padding"),s=cl(i,"border","width"),{x:l,y:c,box:d}=Bie(e,n),f=a.left+(d&&s.left),p=a.top+(d&&s.top);let{width:m,height:v}=t;return o&&(m-=a.width+s.width,v-=a.height+s.height),{x:Math.round((l-f)/m*n.width/r),y:Math.round((c-p)/v*n.height/r)}}function zie(e,t,n){let r,i;if(t===void 0||n===void 0){const o=QE(e);if(!o)t=e.clientWidth,n=e.clientHeight;else{const a=o.getBoundingClientRect(),s=h0(o),l=cl(s,"border","width"),c=cl(s,"padding");t=a.width-c.width-l.width,n=a.height-c.height-l.height,r=zv(s.maxWidth,o,"clientWidth"),i=zv(s.maxHeight,o,"clientHeight")}}return{width:t,height:n,maxWidth:r||Uv,maxHeight:i||Uv}}const ym=e=>Math.round(e*10)/10;function Vie(e,t,n,r){const i=h0(e),o=cl(i,"margin"),a=zv(i.maxWidth,e,"clientWidth")||Uv,s=zv(i.maxHeight,e,"clientHeight")||Uv,l=zie(e,t,n);let{width:c,height:d}=l;if(i.boxSizing==="content-box"){const f=cl(i,"border","width"),p=cl(i,"padding");c-=p.width+f.width,d-=p.height+f.height}return c=Math.max(0,c-o.width),d=Math.max(0,r?c/r:d-o.height),c=ym(Math.min(c,a,l.maxWidth)),d=ym(Math.min(d,s,l.maxHeight)),c&&!d&&(d=ym(c/2)),(t!==void 0||n!==void 0)&&r&&l.height&&d>l.height&&(d=l.height,c=ym(Math.floor(d*r))),{width:c,height:d}}function ej(e,t,n){const r=t||1,i=Math.floor(e.height*r),o=Math.floor(e.width*r);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const a=e.canvas;return a.style&&(n||!a.style.height&&!a.style.width)&&(a.style.height=`${e.height}px`,a.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||a.height!==i||a.width!==o?(e.currentDevicePixelRatio=r,a.height=i,a.width=o,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}const Hie=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 tj(e,t){const n=Fie(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function Vs(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function Wie(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 Yie(e,t,n,r){const i={x:e.cp2x,y:e.cp2y},o={x:t.cp1x,y:t.cp1y},a=Vs(e,i,n),s=Vs(i,o,n),l=Vs(o,t,n),c=Vs(a,s,n),d=Vs(s,l,n);return Vs(c,d,n)}const Gie=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}}},qie=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function qc(e,t,n){return e?Gie(t,n):qie()}function b5(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 w5(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function x5(e){return e==="angle"?{between:uh,compare:Zre,normalize:Fr}:{between:Uo,compare:(t,n)=>t-n,normalize:t=>t}}function nj({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 Zie(e,t,n){const{property:r,start:i,end:o}=n,{between:a,normalize:s}=x5(r),l=t.length;let{start:c,end:d,loop:f}=e,p,m;if(f){for(c+=l,d+=l,p=0,m=l;pl(i,S,_)&&s(i,S)!==0,O=()=>s(o,_)===0||l(o,S,_),k=()=>y||E(),j=()=>!y||O();for(let A=d,U=d;A<=f;++A)w=t[A%a],!w.skip&&(_=c(w[r]),_!==S&&(y=l(_,i,o),x===null&&k()&&(x=s(_,i)===0?A:U),x!==null&&j()&&(v.push(nj({start:x,end:A,loop:p,count:a,style:m})),x=null),U=A,S=_));return x!==null&&v.push(nj({start:x,end:f,loop:p,count:a,style:m})),v}function E5(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 Qie(e,t,n,r){const i=e.length,o=[];let a=t,s=e[t],l;for(l=t+1;l<=n;++l){const c=e[l%i];c.skip||c.stop?s.skip||(r=!1,o.push({start:t%i,end:(l-1)%i,loop:r}),t=a=c.stop?l:null):(a=l,s.skip&&(t=l)),s=c}return a!==null&&o.push({start:t%i,end:a%i,loop:r}),o}function Xie(e,t){const n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];const o=!!e._loop,{start:a,end:s}=Kie(n,i,o,r);if(r===!0)return rj(e,[{start:a,end:s,loop:o}],n,t);const l=ss({chart:t,initial:n.initial,numSteps:a,currentStep:Math.min(r-n.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=a5.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;const o=r.items;let a=o.length-1,s=!1,l;for(;a>=0;--a)l=o[a],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(t),s=!0):(o[a]=o[o.length-1],o.pop());s&&(i.draw(),this._notify(i,r,t,"progress")),o.length||(r.running=!1,this._notify(i,r,t,"complete"),r.initial=!1),n+=o.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let r=n.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,r)),r}listen(t,n,r){this._getAnims(t).listeners[n].push(r)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,i)=>Math.max(r,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const r=n.items;let i=r.length-1;for(;i>=0;--i)r[i].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var jo=new eoe;const oj="transparent",toe={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=ZL(e||oj),i=r.valid&&ZL(t||oj);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class noe{constructor(t,n,r,i){const o=n[r];i=zd([t.to,i,o,t.from]);const a=zd([t.from,o,i]);this._active=!0,this._fn=t.fn||toe[t.type||typeof a],this._easing=gf[t.easing]||gf.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=r,this._from=a,this._to=i,this._promises=void 0}active(){return this._active}update(t,n,r){if(this._active){this._notify(!1);const i=this._target[this._prop],o=r-this._start,a=this._duration-o;this._start=r,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=zd([t.to,n,i,t.from]),this._from=zd([t.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,r=this._duration,i=this._prop,o=this._from,a=this._loop,s=this._to;let l;if(this._active=o!==s&&(a||n1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(o,s,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,r)=>{t.push({res:n,rej:r})})}_notify(t){const n=t?"res":"rej",r=this._promises||[];for(let i=0;i{const o=t[i];if(!rt(o))return;const a={};for(const s of n)a[s]=o[s];(Nt(o.properties)&&o.properties||[i]).forEach(s=>{(s===i||!r.has(s))&&r.set(s,a)})})}_animateOptions(t,n){const r=n.options,i=ioe(t,r);if(!i)return[];const o=this._createAnimations(i,r);return r.$shared&&roe(t.options.$animations,r).then(()=>{t.options=r},()=>{}),o}_createAnimations(t,n){const r=this._properties,i=[],o=t.$animations||(t.$animations={}),a=Object.keys(n),s=Date.now();let l;for(l=a.length-1;l>=0;--l){const c=a[l];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(t,n));continue}const d=n[c];let f=o[c];const p=r.get(c);if(f)if(p&&f.active()){f.update(p,d,s);continue}else f.cancel();if(!p||!p.duration){t[c]=d;continue}o[c]=f=new noe(p,t,c,d),i.push(f)}return i}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const r=this._createAnimations(t,n);if(r.length)return jo.add(this._chart,r),!0}}function roe(e,t){const n=[],r=Object.keys(t);for(let i=0;i0||!n&&o<0)return i.index}return null}function uj(e,t){const{chart:n,_cachedMeta:r}=e,i=n._stacks||(n._stacks={}),{iScale:o,vScale:a,index:s}=r,l=o.axis,c=a.axis,d=loe(o,a,r),f=t.length;let p;for(let m=0;mn[r].axis===t).shift()}function doe(e,t){return bs(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function foe(e,t,n){return bs(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function xd(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 ub=e=>e==="reset"||e==="none",dj=(e,t)=>t?e:Object.assign({},e),hoe=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:O5(n,!0),values:null};class Hi{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=lj(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&&xd(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(f,p,m,v)=>f==="x"?p:f==="r"?v:m,o=n.xAxisID=Ze(r.xAxisID,cb(t,"x")),a=n.yAxisID=Ze(r.yAxisID,cb(t,"y")),s=n.rAxisID=Ze(r.rAxisID,cb(t,"r")),l=n.indexAxis,c=n.iAxisID=i(l,o,a,s),d=n.vAxisID=i(l,a,o,s);n.xScale=this.getScaleForId(o),n.yScale=this.getScaleForId(a),n.rScale=this.getScaleForId(s),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(d)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&YL(this._data,this),t._stacked&&xd(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(rt(n))this._data=soe(n);else if(r!==n){if(r){YL(r,this);const i=this._cachedMeta;xd(i),i._parsed=[]}n&&Object.isExtensible(n)&&Xre(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=lj(n.vScale,n),n.stack!==r.stack&&(i=!0,xd(n),n.stack=r.stack),this._resyncElements(t),(i||o!==n._stacked)&&uj(this,n._parsed)}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:r,_data:i}=this,{iScale:o,_stacked:a}=r,s=o.axis;let l=t===0&&n===i.length?!0:r._sorted,c=t>0&&r._parsed[t-1],d,f,p;if(this._parsing===!1)r._parsed=i,r._sorted=!0,p=i;else{Nt(i[t])?p=this.parseArrayData(r,i,t,n):rt(i[t])?p=this.parseObjectData(r,i,t,n):p=this.parsePrimitiveData(r,i,t,n);const m=()=>f[s]===null||c&&f[s]y||f=0;--p)if(!v()){this.updateRangeFromParsed(c,t,m,l);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed,r=[];let i,o,a;for(i=0,o=n.length;i=0&&tthis.getContext(r,i,n),y=c.resolveNamedOptions(p,m,v,f);return y.$shared&&(y.$shared=l,o[a]=Object.freeze(dj(y,l))),y}_resolveAnimations(t,n,r){const i=this.chart,o=this._cachedDataOpts,a=`animation-${n}`,s=o[a];if(s)return s;let l;if(i.options.animation!==!1){const d=this.chart.config,f=d.datasetAnimationScopeKeys(this._type,n),p=d.getOptionScopes(this.getDataset(),f);l=d.createResolver(p,this.getContext(t,r,n))}const c=new T5(i,l&&l.animations);return l&&l._cacheable&&(o[a]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||ub(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),i=this._sharedOptions,o=this.getSharedOptions(r),a=this.includeOptions(n,o)||o!==i;return this.updateSharedOptions(o,n,r),{sharedOptions:o,includeOptions:a}}updateElement(t,n,r,i){ub(i)?Object.assign(t,r):this._resolveAnimations(n,i).update(t,r)}updateSharedOptions(t,n,r){t&&!ub(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,i){t.active=i;const o=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(t,{options:!i&&this.getSharedOptions(o)||o})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,r=this._cachedMeta.data;for(const[s,l,c]of this._syncList)this[s](l,c);this._syncList=[];const i=r.length,o=n.length,a=Math.min(o,i);a&&this.parse(0,a),o>i?this._insertElements(i,o-i,t):o{for(c.length+=n,s=c.length-1;s>=a;s--)c[s]=c[s-n]};for(l(o),s=t;si-o))}return e._cache.$bar}function moe(e){const t=e.iScale,n=poe(t,e.type);let r=t._length,i,o,a,s;const l=()=>{a===32767||a===-32768||(ch(s)&&(r=Math.min(r,Math.abs(a-s)||r)),s=a)};for(i=0,o=n.length;i0?i[e-1]:null,s=eMath.abs(s)&&(l=s,c=a),t[n.axis]=c,t._custom={barStart:l,barEnd:c,start:i,end:o,min:a,max:s}}function C5(e,t,n,r){return Nt(e)?yoe(e,t,n,r):t[n.axis]=n.parse(e,r),t}function fj(e,t,n,r){const i=e.iScale,o=e.vScale,a=i.getLabels(),s=i===o,l=[];let c,d,f,p;for(c=n,d=n+r;c=n?1:-1)}function boe(e){let t,n,r,i,o;return e.horizontal?(t=e.base>e.x,n="left",r="right"):(t=e.basel.controller.options.grouped),o=r.options.stacked,a=[],s=l=>{const c=l.controller.getParsed(n),d=c&&c[l.vScale.axis];if(dt(d)||isNaN(d))return!0};for(const l of i)if(!(n!==void 0&&s(l))&&((o===!1||a.indexOf(l.stack)===-1||o===void 0&&l.stack===void 0)&&a.push(l.stack),l.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,n,r){const i=this._getStacks(t,r),o=n!==void 0?i.indexOf(n):-1;return o===-1?i.length-1:o}_getRuler(){const t=this.options,n=this._cachedMeta,r=n.iScale,i=[];let o,a;for(o=0,a=n.data.length;o=0;--r)n=Math.max(n,t[r].size(this.resolveDataElementOptions(r))/2);return n>0&&n}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart.data.labels||[],{xScale:i,yScale:o}=n,a=this.getParsed(t),s=i.getLabelForValue(a.x),l=o.getLabelForValue(a.y),c=a._custom;return{label:r[t]||"",value:"("+s+", "+l+(c?", "+c:"")+")"}}update(t){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,t)}updateElements(t,n,r,i){const o=i==="reset",{iScale:a,vScale:s}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(n,i),d=a.axis,f=s.axis;for(let p=n;puh(S,s,l,!0)?1:Math.max(E,E*n,O,O*n),v=(S,E,O)=>uh(S,s,l,!0)?-1:Math.min(E,E*n,O,O*n),y=m(0,c,f),x=m(cn,d,p),_=v(Ft,c,f),w=v(Ft+cn,d,p);r=(y-_)/2,i=(x-w)/2,o=-(y+_)/2,a=-(x+w)/2}return{ratioX:r,ratioY:i,offsetX:o,offsetY:a}}class $a extends Hi{constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){const r=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=r;else{let o=l=>+r[l];if(rt(r[t])){const{key:l="value"}=this._parsing;o=c=>+ls(r[c],l)}let a,s;for(a=t,s=t+n;a0&&!isNaN(t)?Dt*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],o=qh(n._parsed[t],r.options.locale);return{label:i[t]||"",value:o}}getMaxBorderWidth(t){let n=0;const r=this.chart;let i,o,a,s,l;if(!t){for(i=0,o=r.data.datasets.length;ie!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")}),Te($a,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const t=e.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:n,color:r}}=e.legend.options;return t.labels.map((i,o)=>{const a=e.getDatasetMeta(0).controller.getStyle(o);return{text:i,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,fontColor:r,lineWidth:a.borderWidth,pointStyle:n,hidden:!e.getDataVisibility(o),index:o}})}return[]}},onClick(e,t,n){n.chart.toggleDataVisibility(t.index),n.chart.update()}}}});class _f extends Hi{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:r,data:i=[],_dataset:o}=n,a=this.chart._animationsDisabled;let{start:s,count:l}=l5(n,i,a);this._drawStart=s,this._drawCount=l,c5(n)&&(s=0,l=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!o._decimated,r.points=i;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(r,void 0,{animated:!a,options:c},t),this.updateElements(i,s,l,t)}updateElements(t,n,r,i){const o=i==="reset",{iScale:a,vScale:s,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:d,includeOptions:f}=this._getSharedOptions(n,i),p=a.axis,m=s.axis,{spanGaps:v,segment:y}=this.options,x=_u(v)?v:Number.POSITIVE_INFINITY,_=this.chart._animationsDisabled||o||i==="none",w=n+r,S=t.length;let E=n>0&&this.getParsed(n-1);for(let O=0;O=w){j.skip=!0;continue}const A=this.getParsed(O),U=dt(A[m]),R=j[p]=a.getPixelForValue(A[p],O),V=j[m]=o||U?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,A,l):A[m],O);j.skip=isNaN(R)||isNaN(V)||U,j.stop=O>0&&Math.abs(A[p]-E[p])>x,y&&(j.parsed=A,j.raw=c.data[O]),f&&(j.options=d||this.resolveDataElementOptions(O,k.active?"active":i)),_||this.updateElement(k,O,j,i),E=A}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,r=n.options&&n.options.borderWidth||0,i=t.data||[];if(!i.length)return r;const o=i[0].size(this.resolveDataElementOptions(0)),a=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,o,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}Te(_f,"id","line"),Te(_f,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),Te(_f,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class bf extends Hi{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=qh(n._parsed[t].r,r.options.locale);return{label:i[t]||"",value:o}}parseObjectData(t,n,r,i){return v5.bind(this)(t,n,r,i)}update(t){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,t)}getMinMax(){const t=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((r,i)=>{const o=this.getParsed(i).r;!isNaN(o)&&this.chart.getDataVisibility(i)&&(on.max&&(n.max=o))}),n}_updateRadius(){const t=this.chart,n=t.chartArea,r=t.options,i=Math.min(n.right-n.left,n.bottom-n.top),o=Math.max(i/2,0),a=Math.max(r.cutoutPercentage?o/100*r.cutoutPercentage:1,0),s=(o-a)/t.getVisibleDatasetCount();this.outerRadius=o-s*this.index,this.innerRadius=this.outerRadius-s}updateElements(t,n,r,i){const o=i==="reset",a=this.chart,s=a.options.animation,l=this._cachedMeta.rScale,c=l.xCenter,d=l.yCenter,f=l.getIndexAngle(0)-.5*Ft;let p=f,m;const v=360/this.countVisibleElements();for(m=0;m{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&n++}),n}_computeAngle(t,n,r){return this.chart.getDataVisibility(t)?Ii(this.resolveDataElementOptions(t,n).angle||r):0}}Te(bf,"id","polarArea"),Te(bf,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),Te(bf,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const t=e.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:n,color:r}}=e.legend.options;return t.labels.map((i,o)=>{const a=e.getDatasetMeta(0).controller.getStyle(o);return{text:i,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,fontColor:r,lineWidth:a.borderWidth,pointStyle:n,hidden:!e.getDataVisibility(o),index:o}})}return[]}},onClick(e,t,n){n.chart.toggleDataVisibility(t.index),n.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class $x extends $a{}Te($x,"id","pie"),Te($x,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class ug extends Hi{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 v5.bind(this)(t,n,r,i)}update(t){const n=this._cachedMeta,r=n.dataset,i=n.data||[],o=n.iScale.getLabels();if(r.points=i,t!=="resize"){const a=this.resolveDatasetElementOptions(t);this.options.showLine||(a.borderWidth=0);const s={_loop:!0,_fullLoop:o.length===i.length,options:a};this.updateElement(r,void 0,s,t)}this.updateElements(i,0,i.length,t)}updateElements(t,n,r,i){const o=this._cachedMeta.rScale,a=i==="reset";for(let s=n;s0&&this.getParsed(n-1);for(let E=n;E0&&Math.abs(k[m]-S[m])>_,x&&(j.parsed=k,j.raw=c.data[E]),p&&(j.options=f||this.resolveDataElementOptions(E,O.active?"active":i)),w||this.updateElement(O,E,j,i),S=k}this.updateSharedOptions(f,i,d)}getMaxOverflow(){const t=this._cachedMeta,n=t.data||[];if(!this.options.showLine){let s=0;for(let l=n.length-1;l>=0;--l)s=Math.max(s,n[l].size(this.resolveDataElementOptions(l))/2);return s>0&&s}const r=t.dataset,i=r.options&&r.options.borderWidth||0;if(!n.length)return i;const o=n[0].size(this.resolveDataElementOptions(0)),a=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,o,a)/2}}Te(dg,"id","scatter"),Te(dg,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),Te(dg,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var Toe=Object.freeze({__proto__:null,BarController:yf,BubbleController:cg,DoughnutController:$a,LineController:_f,PieController:$x,PolarAreaController:bf,RadarController:ug,ScatterController:dg});function js(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class XE{constructor(t){Te(this,"options"),this.options=t||{}}static override(t){Object.assign(XE.prototype,t)}init(){}formats(){return js()}parse(){return js()}format(){return js()}add(){return js()}diff(){return js()}startOf(){return js()}endOf(){return js()}}var Ooe={_date:XE};function Coe(e,t,n,r){const{controller:i,data:o,_sorted:a}=e,s=i._cachedMeta.iScale;if(s&&t===s.axis&&t!=="r"&&a&&o.length){const l=s._reversePixels?Kre:Bo;if(r){if(i._sharedOptions){const c=o[0],d=typeof c.getRange=="function"&&c.getRange(t);if(d){const f=l(o,t,n-d),p=l(o,t,n+d);return{lo:f.lo,hi:p.hi}}}}else return l(o,t,n)}return{lo:0,hi:o.length-1}}function Zh(e,t,n,r,i){const o=e.getSortedVisibleDatasetMetas(),a=n[t];for(let s=0,l=o.length;s{l[a](t[n],i)&&(o.push({element:l,datasetIndex:c,index:d}),s=s||l.inRange(t.x,t.y,i))}),r&&!s?[]:o}var joe={evaluateInteractionItems:Zh,modes:{index(e,t,n,r){const i=zs(t,e),o=n.axis||"x",a=n.includeInvisible||!1,s=n.intersect?fb(e,i,o,r,a):hb(e,i,o,!1,r,a),l=[];return s.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const d=s[0].index,f=c.data[d];f&&!f.skip&&l.push({element:f,datasetIndex:c.index,index:d})}),l):[]},dataset(e,t,n,r){const i=zs(t,e),o=n.axis||"xy",a=n.includeInvisible||!1;let s=n.intersect?fb(e,i,o,r,a):hb(e,i,o,!1,r,a);if(s.length>0){const l=s[0].datasetIndex,c=e.getDatasetMeta(l).data;s=[];for(let d=0;dn.pos===t)}function gj(e,t){return e.filter(n=>k5.indexOf(n.pos)===-1&&n.box.axis===t)}function Ed(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 Moe(e){const t=[];let n,r,i,o,a,s;for(n=0,r=(e||[]).length;nc.box.fullSize),!0),r=Ed(Sd(t,"left"),!0),i=Ed(Sd(t,"right")),o=Ed(Sd(t,"top"),!0),a=Ed(Sd(t,"bottom")),s=gj(t,"x"),l=gj(t,"y");return{fullSize:n,leftAndTop:r.concat(o),rightAndBottom:i.concat(l).concat(a).concat(s),chartArea:Sd(t,"chartArea"),vertical:r.concat(i).concat(l),horizontal:o.concat(a).concat(s)}}function vj(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function P5(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 Doe(e,t,n,r){const{pos:i,box:o}=n,a=e.maxPadding;if(!rt(i)){n.size&&(e[i]-=n.size);const f=r[n.stack]||{size:0,count:1};f.size=Math.max(f.size,n.horizontal?o.height:o.width),n.size=f.size/f.count,e[i]+=n.size}o.getPadding&&P5(a,o.getPadding());const s=Math.max(0,t.outerWidth-vj(a,e,"left","right")),l=Math.max(0,t.outerHeight-vj(a,e,"top","bottom")),c=s!==e.w,d=l!==e.h;return e.w=s,e.h=l,n.horizontal?{same:c,other:d}:{same:d,other:c}}function Ioe(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 Foe(e,t){const n=t.maxPadding;function r(i){const o={left:0,top:0,right:0,bottom:0};return i.forEach(a=>{o[a]=Math.max(t[a],n[a])}),o}return r(e?["left","right"]:["top","bottom"])}function Vd(e,t,n,r){const i=[];let o,a,s,l,c,d;for(o=0,a=e.length,c=0;o{typeof y.beforeLayout=="function"&&y.beforeLayout()});const d=l.reduce((y,x)=>x.box.options&&x.box.options.display===!1?y:y+1,0)||1,f=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/d,hBoxMaxHeight:a/2}),p=Object.assign({},i);P5(p,sr(r));const m=Object.assign({maxPadding:p,w:o,h:a,x:i.left,y:i.top},i),v=Roe(l.concat(c),f);Vd(s.fullSize,m,f,v),Vd(l,m,f,v),Vd(c,m,f,v)&&Vd(l,m,f,v),Ioe(m),yj(s.leftAndTop,m,f,v),m.x+=m.w,m.y+=m.h,yj(s.rightAndBottom,m,f,v),e.chartArea={left:m.left,top:m.top,right:m.left+m.w,bottom:m.top+m.h,height:m.h,width:m.w},bt(s.chartArea,y=>{const x=y.box;Object.assign(x,e.chartArea),x.update(m.w,m.h,{left:0,top:0,right:0,bottom:0})})}};class L5{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 $oe extends L5{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const fg="$chartjs",Uoe={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},_j=e=>e===null||e==="";function Boe(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[fg]={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",_j(i)){const o=tj(e,"width");o!==void 0&&(e.width=o)}if(_j(r))if(e.style.height==="")e.height=e.width/(t||2);else{const o=tj(e,"height");o!==void 0&&(e.height=o)}return e}const j5=Vie?{passive:!0}:!1;function zoe(e,t,n){e.addEventListener(t,n,j5)}function Voe(e,t,n){e.canvas.removeEventListener(t,n,j5)}function Hoe(e,t){const n=Uoe[e.type]||e.type,{x:r,y:i}=zs(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:i!==void 0?i:null}}function Vv(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function Woe(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let a=!1;for(const s of o)a=a||Vv(s.addedNodes,r),a=a&&!Vv(s.removedNodes,r);a&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function Yoe(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let a=!1;for(const s of o)a=a||Vv(s.removedNodes,r),a=a&&!Vv(s.addedNodes,r);a&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const fh=new Map;let bj=0;function M5(){const e=window.devicePixelRatio;e!==bj&&(bj=e,fh.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function Goe(e,t){fh.size||window.addEventListener("resize",M5),fh.set(e,t)}function qoe(e){fh.delete(e),fh.size||window.removeEventListener("resize",M5)}function Zoe(e,t,n){const r=e.canvas,i=r&&QE(r);if(!i)return;const o=s5((s,l)=>{const c=i.clientWidth;n(s,l),c{const l=s[0],c=l.contentRect.width,d=l.contentRect.height;c===0&&d===0||o(c,d)});return a.observe(i),Goe(e,o),a}function pb(e,t,n){n&&n.disconnect(),t==="resize"&&qoe(e)}function Koe(e,t,n){const r=e.canvas,i=s5(o=>{e.ctx!==null&&n(Hoe(o,e))},e);return zoe(r,t,i),i}class Qoe extends L5{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(Boe(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[fg])return!1;const r=n[fg].initial;["height","width"].forEach(o=>{const a=r[o];dt(a)?n.removeAttribute(o):n.setAttribute(o,a)});const i=r.style||{};return Object.keys(i).forEach(o=>{n.style[o]=i[o]}),n.width=n.width,delete n[fg],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),o={attach:Woe,detach:Yoe,resize:Zoe}[n]||Koe;i[n]=o(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),i=r[n];i&&(({attach:pb,detach:pb,resize:pb}[n]||Voe)(t,n,i),r[n]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,i){return zie(t,n,r,i)}isAttached(t){const n=QE(t);return!!(n&&n.isConnected)}}function Xoe(e){return!_5()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?$oe:Qoe}var bm;let ha=(bm=class{constructor(){Te(this,"x"),Te(this,"y"),Te(this,"active",!1),Te(this,"options"),Te(this,"$animations")}tooltipPosition(e){const{x:t,y:n}=this.getProps(["x","y"],e);return{x:t,y:n}}hasValue(){return _u(this.x)&&_u(this.y)}getProps(e,t){const n=this.$animations;if(!t||!n)return this;const r={};return e.forEach(i=>{r[i]=n[i]&&n[i].active()?n[i]._to:this[i]}),r}},Te(bm,"defaults",{}),Te(bm,"defaultRoutes"),bm);function Joe(e,t){const n=e.options.ticks,r=eae(e),i=Math.min(n.maxTicksLimit||r,r),o=n.major.enabled?nae(t):[],a=o.length,s=o[0],l=o[a-1],c=[];if(a>i)return rae(t,c,o,a/i),c;const d=tae(o,t,i);if(a>0){let f,p;const m=a>1?Math.round((l-s)/(a-1)):null;for(wm(t,c,d,dt(m)?0:s-m,s),f=0,p=a-1;fi)return l}return Math.max(i,1)}function nae(e){const t=[];let n,r;for(n=0,r=e.length;ne==="left"?"right":e==="right"?"left":e,wj=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,xj=(e,t)=>Math.min(t||e,e);function Sj(e,t){const n=[],r=e.length/t,i=e.length;let o=0;for(;oa+s)))return l}function sae(e,t){bt(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:Dr(n,Dr(r,n)),max:Dr(r,Dr(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(){kt(this.options.beforeUpdate,[this])}update(t,n,r){const{beginAtZero:i,grace:o,ticks:a}=this.options,s=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=bie(this,o,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=s=o||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const d=this._getLabelSizes(),f=d.widest.width,p=d.highest.height,m=Mn(this.chart.width-f,0,this.maxWidth);s=t.offset?this.maxWidth/r:m/(r-1),f+6>s&&(s=m/(r-(t.offset?.5:1)),l=this.maxHeight-Td(t.grid)-n.padding-Ej(t.title,this.chart.options.font),c=Math.sqrt(f*f+p*p),a=VE(Math.min(Math.asin(Mn((d.highest.height+6)/s,-1,1)),Math.asin(Mn(l/c,-1,1))-Math.asin(Mn(p/c,-1,1)))),a=Math.max(i,Math.min(o,a))),this.labelRotation=a}afterCalculateLabelRotation(){kt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){kt(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:o}}=this,a=this._isVisible(),s=this.isHorizontal();if(a){const l=Ej(i,n.options.font);if(s?(t.width=this.maxWidth,t.height=Td(o)+l):(t.height=this.maxHeight,t.width=Td(o)+l),r.display&&this.ticks.length){const{first:c,last:d,widest:f,highest:p}=this._getLabelSizes(),m=r.padding*2,v=Ii(this.labelRotation),y=Math.cos(v),x=Math.sin(v);if(s){const _=r.mirror?0:x*f.width+y*p.height;t.height=Math.min(this.maxHeight,t.height+_+m)}else{const _=r.mirror?0:y*f.width+x*p.height;t.width=Math.min(this.maxWidth,t.width+_+m)}this._calculatePadding(c,d,x,y)}}this._handleMargins(),s?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,r,i){const{ticks:{align:o,padding:a},position:s}=this.options,l=this.labelRotation!==0,c=s!=="top"&&this.axis==="x";if(this.isHorizontal()){const d=this.getPixelForTick(0)-this.left,f=this.right-this.getPixelForTick(this.ticks.length-1);let p=0,m=0;l?c?(p=i*t.width,m=r*n.height):(p=r*t.height,m=i*n.width):o==="start"?m=n.width:o==="end"?p=t.width:o!=="inner"&&(p=t.width/2,m=n.width/2),this.paddingLeft=Math.max((p-d+a)*this.width/(this.width-d),0),this.paddingRight=Math.max((m-f+a)*this.width/(this.width-f),0)}else{let d=n.height/2,f=t.height/2;o==="start"?(d=0,f=t.height):o==="end"&&(d=n.height,f=0),this.paddingTop=d+a,this.paddingBottom=f+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){kt(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,r;for(n=0,r=t.length;n({width:a[U]||0,height:s[U]||0});return{first:A(0),last:A(n-1),widest:A(k),highest:A(j),widths:a,heights:s}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return Zre(this._alignToPixels?Ls(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&ts*i?s/r:l/i:l*i0}_computeGridLineItems(t){const n=this.axis,r=this.chart,i=this.options,{grid:o,position:a,border:s}=i,l=o.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),f=Td(o),p=[],m=s.setContext(this.getContext()),v=m.display?m.width:0,y=v/2,x=function(Z){return Ls(r,Z,v)};let _,w,S,E,O,k,j,A,U,R,V,W;if(a==="top")_=x(this.bottom),k=this.bottom-f,A=_-y,R=x(t.top)+y,W=t.bottom;else if(a==="bottom")_=x(this.top),R=t.top,W=x(t.bottom)-y,k=_+y,A=this.top+f;else if(a==="left")_=x(this.right),O=this.right-f,j=_-y,U=x(t.left)+y,V=t.right;else if(a==="right")_=x(this.left),U=t.left,V=x(t.right)-y,O=_+y,j=this.left+f;else if(n==="x"){if(a==="center")_=x((t.top+t.bottom)/2+.5);else if(rt(a)){const Z=Object.keys(a)[0],ne=a[Z];_=x(this.chart.scales[Z].getPixelForValue(ne))}R=t.top,W=t.bottom,k=_+y,A=k+f}else if(n==="y"){if(a==="center")_=x((t.left+t.right)/2);else if(rt(a)){const Z=Object.keys(a)[0],ne=a[Z];_=x(this.chart.scales[Z].getPixelForValue(ne))}O=_-y,j=O-f,U=t.left,V=t.right}const X=Ze(i.ticks.maxTicksLimit,d),G=Math.max(1,Math.ceil(d/X));for(w=0;wi.value===t);return r>=0?n.setContext(this.getContext(r)).lineWidth:0}drawGrid(t){const n=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,a;const s=(l,c,d)=>{!d.width||!d.color||(r.save(),r.lineWidth=d.width,r.strokeStyle=d.color,r.setLineDash(d.borderDash||[]),r.lineDashOffset=d.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(c.x,c.y),r.stroke(),r.restore())};if(n.display)for(o=0,a=i.length;o{this.draw(o)}}]:[{z:r,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let o,a;for(o=0,a=n.length;o{const r=n.split("."),i=r.pop(),o=[e].concat(r).join("."),a=t[n].split("."),s=a.pop(),l=a.join(".");nn.route(o,i,l,s)})}function pae(e){return"id"in e&&"defaults"in e}class mae{constructor(){this.controllers=new xm(Hi,"datasets",!0),this.elements=new xm(ha,"elements"),this.plugins=new xm(Object,"plugins"),this.scales=new xm(Dl,"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):bt(i,a=>{const s=r||this._getRegistryForType(a);this._exec(t,s,a)})})}_exec(t,n,r){const i=zE(t);kt(r["before"+i],[],r),n[t](r),kt(r["after"+i],[],r)}_getRegistryForType(t){for(let n=0;no.filter(s=>!a.some(l=>s.plugin.id===l.plugin.id));this._notify(i(n,r),t,"stop"),this._notify(i(r,n),t,"start")}}function vae(e){const t={},n=[],r=Object.keys(oo.plugins.items);for(let o=0;o1&&Tj(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Oj(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function Eae(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(r=>r.xAxisID===e||r.yAxisID===e);if(n.length)return Oj(e,"x",n[0])||Oj(e,"y",n[0])}return{}}function Tae(e,t){const n=xl[e.type]||{scales:{}},r=t.scales||{},i=Ux(e.type,t),o=Object.create(null);return Object.keys(r).forEach(a=>{const s=r[a];if(!rt(s))return console.error(`Invalid scale configuration for scale: ${a}`);if(s._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);const l=Bx(a,s,Eae(a,e),nn.scales[s.type]),c=xae(l,i),d=n.scales||{};o[a]=pf(Object.create(null),[{axis:l},s,d[l],d[c]])}),e.data.datasets.forEach(a=>{const s=a.type||e.type,l=a.indexAxis||Ux(s,t),c=(xl[s]||{}).scales||{};Object.keys(c).forEach(d=>{const f=wae(d,l),p=a[f+"AxisID"]||f;o[p]=o[p]||Object.create(null),pf(o[p],[{axis:f},r[p],c[d]])})}),Object.keys(o).forEach(a=>{const s=o[a];pf(s,[nn.scales[s.type],nn.scale])}),o}function N5(e){const t=e.options||(e.options={});t.plugins=Ze(t.plugins,{}),t.scales=Tae(e,t)}function R5(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function Oae(e){return e=e||{},e.data=R5(e.data),N5(e),e}const Cj=new Map,A5=new Set;function Sm(e,t){let n=Cj.get(e);return n||(n=t(),Cj.set(e,n),A5.add(n)),n}const Od=(e,t,n)=>{const r=ls(t,n);r!==void 0&&e.add(r)};class Cae{constructor(t){this._config=Oae(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=R5(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(),N5(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Sm(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return Sm(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return Sm(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return Sm(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const r=this._scopeCache;let i=r.get(t);return(!i||n)&&(i=new Map,r.set(t,i)),i}getOptionScopes(t,n,r){const{options:i,type:o}=this,a=this._cachedScopes(t,r),s=a.get(n);if(s)return s;const l=new Set;n.forEach(d=>{t&&(l.add(t),d.forEach(f=>Od(l,t,f))),d.forEach(f=>Od(l,i,f)),d.forEach(f=>Od(l,xl[o]||{},f)),d.forEach(f=>Od(l,nn,f)),d.forEach(f=>Od(l,Ix,f))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),A5.has(n)&&a.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,xl[n]||{},nn.datasets[n]||{},{type:n},nn,Ix]}resolveNamedOptions(t,n,r,i=[""]){const o={$shared:!0},{resolver:a,subPrefixes:s}=kj(this._resolverCache,t,i);let l=a;if(Pae(a,n)){o.$shared=!1,r=cs(r)?r():r;const c=this.createResolver(t,r,s);l=bu(a,r,c)}for(const c of n)o[c]=l[c];return o}createResolver(t,n,r=[""],i){const{resolver:o}=kj(this._resolverCache,t,r);return rt(n)?bu(o,n,void 0,i):o}}function kj(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:qE(t,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},r.set(i,o)),o}const kae=e=>rt(e)&&Object.getOwnPropertyNames(e).reduce((t,n)=>t||cs(e[n]),!1);function Pae(e,t){const{isScriptable:n,isIndexable:r}=h5(e);for(const i of t){const o=n(i),a=r(i),s=(a||o)&&e[i];if(o&&(cs(s)||kae(s))||a&&Nt(s))return!0}return!1}var Lae="4.4.0";const jae=["top","bottom","left","right","chartArea"];function Pj(e,t){return e==="top"||e==="bottom"||jae.indexOf(e)===-1&&t==="x"}function Lj(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function jj(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),kt(n&&n.onComplete,[e],t)}function Mae(e){const t=e.chart,n=t.options.animation;kt(n&&n.onProgress,[e],t)}function D5(e){return _5()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const hg={},Mj=e=>{const t=D5(e);return Object.values(hg).filter(n=>n.canvas===t).pop()};function Nae(e,t,n){const r=Object.keys(e);for(const i of r){const o=+i;if(o>=t){const a=e[i];delete e[i],(n>0||o>t)&&(e[o+n]=a)}}}function Rae(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}function Em(e,t,n){return e.options.clip?e[n]:t[n]}function Aae(e,t){const{xScale:n,yScale:r}=e;return n&&r?{left:Em(n,t,"left"),right:Em(n,t,"right"),top:Em(r,t,"top"),bottom:Em(r,t,"bottom")}:t}var wa;let p0=(wa=class{static register(...e){oo.add(...e),Nj()}static unregister(...e){oo.remove(...e),Nj()}constructor(e,t){const n=this.config=new Cae(t),r=D5(e),i=Mj(r);if(i)throw new Error("Canvas is already in use. Chart with ID '"+i.id+"' must be destroyed before the canvas with ID '"+i.canvas.id+"' can be reused.");const o=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||Xoe(r)),this.platform.updateConfig(n);const a=this.platform.acquireContext(r,o.aspectRatio),s=a&&a.canvas,l=s&&s.height,c=s&&s.width;if(this.id=Ire(),this.ctx=a,this.canvas=s,this.width=c,this.height=l,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new gae,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Jre(d=>this.update(d),o.resizeDelay||0),this._dataChanges=[],hg[this.id]=this,!a||!s){console.error("Failed to create chart: can't acquire context from the given item");return}jo.listen(this,"complete",jj),jo.listen(this,"progress",Mae),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:t},width:n,height:r,_aspectRatio:i}=this;return dt(e)?t&&i?i:r?n/r:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return oo}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():ej(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return QL(this.canvas,this.ctx),this}stop(){return jo.stop(this),this}resize(e,t){jo.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}_resize(e,t){const n=this.options,r=this.canvas,i=n.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(r,e,t,i),a=n.devicePixelRatio||this.platform.getDevicePixelRatio(),s=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,ej(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),kt(n.onResize,[this,o],this),this.attached&&this._doResize(s)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};bt(e,(t,n)=>{t.id=n})}buildOrUpdateScales(){const e=this.options,t=e.scales,n=this.scales,r=Object.keys(n).reduce((o,a)=>(o[a]=!1,o),{});let i=[];t&&(i=i.concat(Object.keys(t).map(o=>{const a=t[o],s=Bx(o,a),l=s==="r",c=s==="x";return{options:a,dposition:l?"chartArea":c?"bottom":"left",dtype:l?"radialLinear":c?"category":"linear"}}))),bt(i,o=>{const a=o.options,s=a.id,l=Bx(s,a),c=Ze(a.type,o.dtype);(a.position===void 0||Pj(a.position,l)!==Pj(o.dposition))&&(a.position=o.dposition),r[s]=!0;let d=null;if(s in n&&n[s].type===c)d=n[s];else{const f=oo.getScale(c);d=new f({id:s,type:c,ctx:this.ctx,chart:this}),n[d.id]=d}d.init(a,e)}),bt(r,(o,a)=>{o||delete n[a]}),bt(n,o=>{ir.configure(this,o,o.options),ir.addBox(this,o)})}_updateMetasets(){const e=this._metasets,t=this.data.datasets.length,n=e.length;if(e.sort((r,i)=>r.index-i.index),n>t){for(let r=t;rt.length&&delete this._stacks,e.forEach((n,r)=>{t.filter(i=>i===n._dataset).length===0&&this._destroyDatasetMeta(r)})}buildOrUpdateControllers(){const e=[],t=this.data.datasets;let n,r;for(this._removeUnreferencedMetasets(),n=0,r=t.length;n{this.getDatasetMeta(t).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const t=this.config;t.update();const n=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const i=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let l=0,c=this.data.datasets.length;l{l.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(Lj("z","_idx"));const{_active:a,_lastEvent:s}=this;s?this._eventHandler(s,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){bt(this.scales,e=>{ir.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,t=new Set(Object.keys(this._listeners)),n=new Set(e.events);(!zL(t,n)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,t=this._getUniformDataChanges()||[];for(const{method:n,start:r,count:i}of t){const o=n==="_removeElements"?-i:i;Nae(e,r,o)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const t=this.data.datasets.length,n=i=>new Set(e.filter(o=>o[0]===i).map((o,a)=>a+","+o.splice(1).join(","))),r=n(0);for(let i=1;ii.split(",")).map(i=>({method:i[1],start:+i[2],count:+i[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;ir.update(this,this.width,this.height,e);const t=this.chartArea,n=t.width<=0||t.height<=0;this._layers=[],bt(this.boxes,r=>{n&&r.position==="chartArea"||(r.configure&&r.configure(),this._layers.push(...r._layers()))},this),this._layers.forEach((r,i)=>{r._idx=i}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let t=0,n=this.data.datasets.length;t=0;--t)this._drawDataset(e[t]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const t=this.ctx,n=e._clip,r=!n.disabled,i=Aae(e,this.chartArea),o={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(r&&d0(t,{left:n.left===!1?0:i.left-n.left,right:n.right===!1?this.width:i.right+n.right,top:n.top===!1?0:i.top-n.top,bottom:n.bottom===!1?this.height:i.bottom+n.bottom}),e.controller.draw(),r&&f0(t),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(e){return zo(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,n,r){const i=joe.modes[t];return typeof i=="function"?i(this,e,n,r):[]}getDatasetMeta(e){const t=this.data.datasets[e],n=this._metasets;let r=n.filter(i=>i&&i._dataset===t).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:e,_dataset:t,_parsed:[],_sorted:!1},n.push(r)),r}getContext(){return this.$context||(this.$context=bs(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const t=this.data.datasets[e];if(!t)return!1;const n=this.getDatasetMeta(e);return typeof n.hidden=="boolean"?!n.hidden:!t.hidden}setDatasetVisibility(e,t){const n=this.getDatasetMeta(e);n.hidden=!t}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,t,n){const r=n?"show":"hide",i=this.getDatasetMeta(e),o=i.controller._resolveAnimations(void 0,r);ch(t)?(i.data[t].hidden=!n,this.update()):(this.setDatasetVisibility(e,n),o.update(i,{visible:n}),this.update(a=>a.datasetIndex===e?r:void 0))}hide(e,t){this._updateVisibility(e,t,!1)}show(e,t){this._updateVisibility(e,t,!0)}_destroyDatasetMeta(e){const t=this._metasets[e];t&&t.controller&&t.controller._destroy(),delete this._metasets[e]}_stop(){let e,t;for(this.stop(),jo.remove(this),e=0,t=this.data.datasets.length;e{t.addEventListener(this,i,o),e[i]=o},r=(i,o,a)=>{i.offsetX=o,i.offsetY=a,this._eventHandler(i)};bt(this.options.events,i=>n(i,r))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,t=this.platform,n=(s,l)=>{t.addEventListener(this,s,l),e[s]=l},r=(s,l)=>{e[s]&&(t.removeEventListener(this,s,l),delete e[s])},i=(s,l)=>{this.canvas&&this.resize(s,l)};let o;const a=()=>{r("attach",a),this.attached=!0,this.resize(),n("resize",i),n("detach",o)};o=()=>{this.attached=!1,r("resize",i),this._stop(),this._resize(0,0),n("attach",a)},t.isAttached(this.canvas)?a():o()}unbindEvents(){bt(this._listeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._listeners={},bt(this._responsiveListeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,t,n){const r=n?"set":"remove";let i,o,a,s;for(t==="dataset"&&(i=this.getDatasetMeta(e[0].datasetIndex),i.controller["_"+r+"DatasetHoverStyle"]()),a=0,s=e.length;a{const o=this.getDatasetMeta(r);if(!o)throw new Error("No dataset found at index "+r);return{datasetIndex:r,element:o.data[i],index:i}});!Fv(n,t)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,t))}notifyPlugins(e,t,n){return this._plugins.notify(this,e,t,n)}isPluginEnabled(e){return this._plugins._cache.filter(t=>t.plugin.id===e).length===1}_updateHoverStyles(e,t,n){const r=this.options.hover,i=(s,l)=>s.filter(c=>!l.some(d=>c.datasetIndex===d.datasetIndex&&c.index===d.index)),o=i(t,e),a=n?e:i(e,t);o.length&&this.updateHoverStyle(o,r.mode,!1),a.length&&r.mode&&this.updateHoverStyle(a,r.mode,!0)}_eventHandler(e,t){const n={event:e,replay:t,cancelable:!0,inChartArea:this.isPointInArea(e)},r=o=>(o.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",n,r)===!1)return;const i=this._handleEvent(e,t,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,r),(i||n.changed)&&this.render(),this}_handleEvent(e,t,n){const{_active:r=[],options:i}=this,o=t,a=this._getActiveElements(e,r,n,o),s=Vre(e),l=Rae(e,this._lastEvent,n,s);n&&(this._lastEvent=null,kt(i.onHover,[e,a,this],this),s&&kt(i.onClick,[e,a,this],this));const c=!Fv(a,r);return(c||t)&&(this._active=a,this._updateHoverStyles(a,r,t)),this._lastEvent=l,c}_getActiveElements(e,t,n,r){if(e.type==="mouseout")return[];if(!n)return t;const i=this.options.hover;return this.getElementsAtEventForMode(e,i.mode,i,r)}},Te(wa,"defaults",nn),Te(wa,"instances",hg),Te(wa,"overrides",xl),Te(wa,"registry",oo),Te(wa,"version",Lae),Te(wa,"getChart",Mj),wa);function Nj(){return bt(p0.instances,e=>e._plugins.invalidate())}function Dae(e,t,n){const{startAngle:r,pixelMargin:i,x:o,y:a,outerRadius:s,innerRadius:l}=t;let c=i/s;e.beginPath(),e.arc(o,a,s,r-c,n+c),l>i?(c=i/l,e.arc(o,a,l,n+c,r-c,!0)):e.arc(o,a,i,n+cn,r-cn),e.closePath(),e.clip()}function Iae(e){return GE(e,["outerStart","outerEnd","innerStart","innerEnd"])}function Fae(e,t,n,r){const i=Iae(e.options.borderRadius),o=(n-t)/2,a=Math.min(o,r*t/2),s=l=>{const c=(n-Math.min(o,l))*r/2;return Mn(l,0,Math.min(o,c))};return{outerStart:s(i.outerStart),outerEnd:s(i.outerEnd),innerStart:Mn(i.innerStart,0,a),innerEnd:Mn(i.innerEnd,0,a)}}function ac(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function Hv(e,t,n,r,i,o){const{x:a,y:s,startAngle:l,pixelMargin:c,innerRadius:d}=t,f=Math.max(t.outerRadius+r+n-c,0),p=d>0?d+r+n+c:0;let m=0;const v=i-l;if(r){const Z=d>0?d-r:0,ne=f>0?f-r:0,le=(Z+ne)/2,K=le!==0?v*le/(le+r):v;m=(v-K)/2}const y=Math.max(.001,v*f-n/Ft)/f,x=(v-y)/2,_=l+x+m,w=i-x-m,{outerStart:S,outerEnd:E,innerStart:O,innerEnd:k}=Fae(t,p,f,w-_),j=f-S,A=f-E,U=_+S/j,R=w-E/A,V=p+O,W=p+k,X=_+O/V,G=w-k/W;if(e.beginPath(),o){const Z=(U+R)/2;if(e.arc(a,s,f,U,Z),e.arc(a,s,f,Z,R),E>0){const F=ac(A,R,a,s);e.arc(F.x,F.y,E,R,w+cn)}const ne=ac(W,w,a,s);if(e.lineTo(ne.x,ne.y),k>0){const F=ac(W,G,a,s);e.arc(F.x,F.y,k,w+cn,G+Math.PI)}const le=(w-k/p+(_+O/p))/2;if(e.arc(a,s,p,w-k/p,le,!0),e.arc(a,s,p,le,_+O/p,!0),O>0){const F=ac(V,X,a,s);e.arc(F.x,F.y,O,X+Math.PI,_-cn)}const K=ac(j,_,a,s);if(e.lineTo(K.x,K.y),S>0){const F=ac(j,U,a,s);e.arc(F.x,F.y,S,_-cn,U)}}else{e.moveTo(a,s);const Z=Math.cos(U)*f+a,ne=Math.sin(U)*f+s;e.lineTo(Z,ne);const le=Math.cos(R)*f+a,K=Math.sin(R)*f+s;e.lineTo(le,K)}e.closePath()}function $ae(e,t,n,r,i){const{fullCircles:o,startAngle:a,circumference:s}=t;let l=t.endAngle;if(o){Hv(e,t,n,r,l,i);for(let c=0;c=Dt||uh(o,s,l),v=Uo(a,c+p,d+p);return m&&v}getCenterPoint(t){const{x:n,y:r,startAngle:i,endAngle:o,innerRadius:a,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:l,spacing:c}=this.options,d=(i+o)/2,f=(a+s+c+l)/2;return{x:n+Math.cos(d)*f,y:r+Math.sin(d)*f}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:n,circumference:r}=this,i=(n.offset||0)/4,o=(n.spacing||0)/2,a=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=r>Dt?Math.floor(r/Dt):0,r===0||this.innerRadius<0||this.outerRadius<0)return;t.save();const s=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(s)*i,Math.sin(s)*i);const l=1-Math.sin(Math.min(Ft,r||0)),c=i*l;t.fillStyle=n.backgroundColor,t.strokeStyle=n.borderColor,$ae(t,this,c,o,a),Uae(t,this,c,o,a),t.restore()}}Te(Hd,"id","arc"),Te(Hd,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),Te(Hd,"defaultRoutes",{backgroundColor:"backgroundColor"}),Te(Hd,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"});function I5(e,t,n=t){e.lineCap=Ze(n.borderCapStyle,t.borderCapStyle),e.setLineDash(Ze(n.borderDash,t.borderDash)),e.lineDashOffset=Ze(n.borderDashOffset,t.borderDashOffset),e.lineJoin=Ze(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=Ze(n.borderWidth,t.borderWidth),e.strokeStyle=Ze(n.borderColor,t.borderColor)}function Bae(e,t,n){e.lineTo(n.x,n.y)}function zae(e){return e.stepped?die:e.tension||e.cubicInterpolationMode==="monotone"?fie:Bae}function F5(e,t,n={}){const r=e.length,{start:i=0,end:o=r-1}=n,{start:a,end:s}=t,l=Math.max(i,a),c=Math.min(o,s),d=is&&o>s;return{count:r,start:l,loop:t.loop,ilen:c(a+(c?s-E:E))%o,S=()=>{y!==x&&(e.lineTo(d,x),e.lineTo(d,y),e.lineTo(d,_))};for(l&&(m=i[w(0)],e.moveTo(m.x,m.y)),p=0;p<=s;++p){if(m=i[w(p)],m.skip)continue;const E=m.x,O=m.y,k=E|0;k===v?(Ox&&(x=O),d=(f*d+E)/++f):(S(),e.lineTo(E,O),v=k,f=0,y=x=O),_=O}S()}function zx(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?Hae:Vae}function Wae(e){return e.stepped?Hie:e.tension||e.cubicInterpolationMode==="monotone"?Wie:Vs}function Yae(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),I5(e,t.options),e.stroke(i)}function Gae(e,t,n,r){const{segments:i,options:o}=t,a=zx(t);for(const s of i)I5(e,o,s.style),e.beginPath(),a(e,t,s,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const qae=typeof Path2D=="function";function Zae(e,t,n,r){qae&&!t.options.segment?Yae(e,t,n,r):Gae(e,t,n,r)}class Ua extends ha{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;Die(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=Qie(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,r=t.length;return r&&n[t[r-1].end]}interpolate(t,n){const r=this.options,i=t[n],o=this.points,a=E5(this,{property:n,start:i,end:i});if(!a.length)return;const s=[],l=Wae(r);let c,d;for(c=0,d=a.length;ce!=="borderDash"&&e!=="fill"});function Rj(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 U5(e){return Vx[e%Vx.length]}function B5(e){return Aj[e%Aj.length]}function nse(e,t){return e.borderColor=U5(t),e.backgroundColor=B5(t),++t}function rse(e,t){return e.backgroundColor=e.data.map(()=>U5(t++)),t}function ise(e,t){return e.backgroundColor=e.data.map(()=>B5(t++)),t}function ose(e){let t=0;return(n,r)=>{const i=e.getDatasetMeta(r).controller;i instanceof $a?t=rse(n,t):i instanceof bf?t=ise(n,t):i&&(t=nse(n,t))}}function Dj(e){let t;for(t in e)if(e[t].borderColor||e[t].backgroundColor)return!0;return!1}function ase(e){return e&&(e.borderColor||e.backgroundColor)}var sse={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,t,n){if(!n.enabled)return;const{data:{datasets:r},options:i}=e.config,{elements:o}=i;if(!n.forceOverride&&(Dj(r)||ase(i)||o&&Dj(o)))return;const a=ose(e);r.forEach(a)}};function lse(e,t,n,r,i){const o=i.samples||r;if(o>=n)return e.slice(t,t+n);const a=[],s=(n-2)/(o-2);let l=0;const c=t+n-1;let d=t,f,p,m,v,y;for(a[l++]=e[d],f=0;fm&&(m=v,p=e[w],y=w);a[l++]=p,d=y}return a[l++]=e[c],a}function cse(e,t,n,r){let i=0,o=0,a,s,l,c,d,f,p,m,v,y;const x=[],_=t+n-1,w=e[t].x,S=e[_].x-w;for(a=t;ay&&(y=c,p=a),i=(o*i+s.x)/++o;else{const O=a-1;if(!dt(f)&&!dt(p)){const k=Math.min(f,p),j=Math.max(f,p);k!==m&&k!==O&&x.push({...e[k],x:i}),j!==m&&j!==O&&x.push({...e[j],x:i})}a>0&&O!==m&&x.push(e[O]),x.push(s),d=E,o=0,v=y=c,f=p=m=a}}return x}function z5(e){if(e._decimated){const t=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function Ij(e){e.data.datasets.forEach(t=>{z5(t)})}function use(e,t){const n=t.length;let r=0,i;const{iScale:o}=e,{min:a,max:s,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(r=Mn(Bo(t,o.axis,a).lo,0,n-1)),c?i=Mn(Bo(t,o.axis,s).hi+1,r,n)-r:i=n-r,{start:r,count:i}}var dse={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,t,n)=>{if(!n.enabled){Ij(e);return}const r=e.width;e.data.datasets.forEach((i,o)=>{const{_data:a,indexAxis:s}=i,l=e.getDatasetMeta(o),c=a||i.data;if(zd([s,e.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const d=e.scales[l.xAxisID];if(d.type!=="linear"&&d.type!=="time"||e.options.parsing)return;let{start:f,count:p}=use(l,c);const m=n.threshold||4*r;if(p<=m){z5(i);return}dt(a)&&(i._data=c,delete i.data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(y){this._data=y}}));let v;switch(n.algorithm){case"lttb":v=lse(c,f,p,r,n);break;case"min-max":v=cse(c,f,p,r);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}i._decimated=v})},destroy(e){Ij(e)}};function fse(e,t,n){const r=e.segments,i=e.points,o=t.points,a=[];for(const s of r){let{start:l,end:c}=s;c=JE(l,c,i);const d=Hx(n,i[l],i[c],s.loop);if(!t.segments){a.push({source:s,target:d,start:i[l],end:i[c]});continue}const f=E5(t,d);for(const p of f){const m=Hx(n,o[p.start],o[p.end],p.loop),v=S5(s,i,m);for(const y of v)a.push({source:y,target:p,start:{[n]:Fj(d,m,"start",Math.max)},end:{[n]:Fj(d,m,"end",Math.min)}})}}return a}function Hx(e,t,n,r){if(r)return;let i=t[e],o=n[e];return e==="angle"&&(i=Fr(i),o=Fr(o)),{property:e,start:i,end:o}}function hse(e,t){const{x:n=null,y:r=null}=e||{},i=t.points,o=[];return t.segments.forEach(({start:a,end:s})=>{s=JE(a,s,i);const l=i[a],c=i[s];r!==null?(o.push({x:l.x,y:r}),o.push({x:c.x,y:r})):n!==null&&(o.push({x:n,y:l.y}),o.push({x:n,y:c.y}))}),o}function JE(e,t,n){for(;t>e;t--){const r=n[t];if(!isNaN(r.x)&&!isNaN(r.y))break}return t}function Fj(e,t,n,r){return e&&t?r(e[n],t[n]):e?e[n]:t?t[n]:0}function V5(e,t){let n=[],r=!1;return Nt(e)?(r=!0,n=e):n=hse(e,t),n.length?new Ua({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function $j(e){return e&&e.fill!==!1}function pse(e,t,n){let r=e[t].fill;const i=[t];let o;if(!n)return r;for(;r!==!1&&i.indexOf(r)===-1;){if(!tn(r))return r;if(o=e[r],!o)return!1;if(o.visible)return r;i.push(r),r=o.fill}return!1}function mse(e,t,n){const r=_se(e);if(rt(r))return isNaN(r.value)?!1:r;let i=parseFloat(r);return tn(i)&&Math.floor(i)===i?gse(r[0],t,i,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function gse(e,t,n,r){return(e==="-"||e==="+")&&(n=t+n),n===t||n<0||n>=r?!1:n}function vse(e,t){let n=null;return e==="start"?n=t.bottom:e==="end"?n=t.top:rt(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function yse(e,t,n){let r;return e==="start"?r=n:e==="end"?r=t.options.reverse?t.min:t.max:rt(e)?r=e.value:r=t.getBaseValue(),r}function _se(e){const t=e.options,n=t.fill;let r=Ze(n&&n.target,n);return r===void 0&&(r=!!t.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function bse(e){const{scale:t,index:n,line:r}=e,i=[],o=r.segments,a=r.points,s=wse(t,n);s.push(V5({x:null,y:t.bottom},r));for(let l=0;l=0;--a){const s=i[a].$filler;s&&(s.line.updateControlPoints(o,s.axis),r&&s.fill&&vb(e.ctx,s,o))}},beforeDatasetsDraw(e,t,n){if(n.drawTime!=="beforeDatasetsDraw")return;const r=e.getSortedVisibleDatasetMetas();for(let i=r.length-1;i>=0;--i){const o=r[i].$filler;$j(o)&&vb(e.ctx,o,e.chartArea)}},beforeDatasetDraw(e,t,n){const r=t.meta.$filler;!$j(r)||n.drawTime!=="beforeDatasetDraw"||vb(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Vj=(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)}},Mse=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class Hj extends ha{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=kt(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=bn(r.font),o=i.size,a=this._computeTitleHeight(),{boxWidth:s,itemHeight:l}=Vj(r,o);let c,d;n.font=i.string,this.isHorizontal()?(c=this.maxWidth,d=this._fitRows(a,o,s,l)+10):(d=this.maxHeight,c=this._fitCols(a,i,s,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(d,t.maxHeight||this.maxHeight)}_fitRows(t,n,r,i){const{ctx:o,maxWidth:a,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],d=i+s;let f=t;o.textAlign="left",o.textBaseline="middle";let p=-1,m=-d;return this.legendItems.forEach((v,y)=>{const x=r+n/2+o.measureText(v.text).width;(y===0||c[c.length-1]+x+2*s>a)&&(f+=d,c[c.length-(y>0?0:1)]=0,m+=d,p++),l[y]={left:0,top:m,row:p,width:x,height:i},c[c.length-1]+=x+s}),f}_fitCols(t,n,r,i){const{ctx:o,maxHeight:a,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],d=a-t;let f=s,p=0,m=0,v=0,y=0;return this.legendItems.forEach((x,_)=>{const{itemWidth:w,itemHeight:S}=Nse(r,n,o,x,i);_>0&&m+S+2*s>d&&(f+=p+s,c.push({width:p,height:m}),v+=p+s,y++,p=m=0),l[_]={left:v,top:m,col:y,width:w,height:S},p=Math.max(p,w),m+=S+s}),f+=p,c.push({width:p,height:m}),f}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:i},rtl:o}}=this,a=qc(o,this.left,this.width);if(this.isHorizontal()){let s=0,l=tr(r,this.left+i,this.right-this.lineWidths[s]);for(const c of n)s!==c.row&&(s=c.row,l=tr(r,this.left+i,this.right-this.lineWidths[s])),c.top+=this.top+t+i,c.left=a.leftForLtr(a.x(l),c.width),l+=c.width+i}else{let s=0,l=tr(r,this.top+t+i,this.bottom-this.columnSizes[s].height);for(const c of n)c.col!==s&&(s=c.col,l=tr(r,this.top+t+i,this.bottom-this.columnSizes[s].height)),c.top=l,c.left+=this.left+i,c.left=a.leftForLtr(a.x(c.left),c.width),l+=c.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;d0(t,this),this._draw(),f0(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:i}=this,{align:o,labels:a}=t,s=nn.color,l=qc(t.rtl,this.left,this.width),c=bn(a.font),{padding:d}=a,f=c.size,p=f/2;let m;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=c.string;const{boxWidth:v,boxHeight:y,itemHeight:x}=Vj(a,f),_=function(k,j,A){if(isNaN(v)||v<=0||isNaN(y)||y<0)return;i.save();const U=Ze(A.lineWidth,1);if(i.fillStyle=Ze(A.fillStyle,s),i.lineCap=Ze(A.lineCap,"butt"),i.lineDashOffset=Ze(A.lineDashOffset,0),i.lineJoin=Ze(A.lineJoin,"miter"),i.lineWidth=U,i.strokeStyle=Ze(A.strokeStyle,s),i.setLineDash(Ze(A.lineDash,[])),a.usePointStyle){const R={radius:y*Math.SQRT2/2,pointStyle:A.pointStyle,rotation:A.rotation,borderWidth:U},V=l.xPlus(k,v/2),W=j+p;d5(i,R,V,W,a.pointStyleWidth&&v)}else{const R=j+Math.max((f-y)/2,0),V=l.leftForLtr(k,v),W=ll(A.borderRadius);i.beginPath(),Object.values(W).some(X=>X!==0)?dh(i,{x:V,y:R,w:v,h:y,radius:W}):i.rect(V,R,v,y),i.fill(),U!==0&&i.stroke()}i.restore()},w=function(k,j,A){Sl(i,A.text,k,j+x/2,c,{strikethrough:A.hidden,textAlign:l.textAlign(A.textAlign)})},S=this.isHorizontal(),E=this._computeTitleHeight();S?m={x:tr(o,this.left+d,this.right-r[0]),y:this.top+d+E,line:0}:m={x:this.left+d,y:tr(o,this.top+E+d,this.bottom-n[0].height),line:0},b5(this.ctx,t.textDirection);const O=x+d;this.legendItems.forEach((k,j)=>{i.strokeStyle=k.fontColor,i.fillStyle=k.fontColor;const A=i.measureText(k.text).width,U=l.textAlign(k.textAlign||(k.textAlign=a.textAlign)),R=v+p+A;let V=m.x,W=m.y;l.setWidth(this.width),S?j>0&&V+R+d>this.right&&(W=m.y+=O,m.line++,V=m.x=tr(o,this.left+d,this.right-r[m.line])):j>0&&W+O>this.bottom&&(V=m.x=V+n[m.line].width+d,m.line++,W=m.y=tr(o,this.top+E+d,this.bottom-n[m.line].height));const X=l.x(V);if(_(X,W,k),V=eie(U,V+v+p,S?V+R:this.right,t.rtl),w(l.x(V),W,k),S)m.x+=R+d;else if(typeof k.text!="string"){const G=c.lineHeight;m.y+=W5(k,G)+d}else m.y+=O}),w5(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=bn(n.font),i=sr(n.padding);if(!n.display)return;const o=qc(t.rtl,this.left,this.width),a=this.ctx,s=n.position,l=r.size/2,c=i.top+l;let d,f=this.left,p=this.width;if(this.isHorizontal())p=Math.max(...this.lineWidths),d=this.top+c,f=tr(t.align,f,this.right-p);else{const v=this.columnSizes.reduce((y,x)=>Math.max(y,x.height),0);d=c+tr(t.align,this.top,this.bottom-v-t.labels.padding-this._computeTitleHeight())}const m=tr(s,f,f+p);a.textAlign=o.textAlign(WE(s)),a.textBaseline="middle",a.strokeStyle=n.color,a.fillStyle=n.color,a.font=r.string,Sl(a,n.text,m,d,r)}_computeTitleHeight(){const t=this.options.title,n=bn(t.font),r=sr(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,i,o;if(Uo(t,this.left,this.right)&&Uo(n,this.top,this.bottom)){for(o=this.legendHitBoxes,r=0;ro.length>a.length?o:a)),t+n.size/2+r.measureText(i).width}function Ase(e,t,n){let r=e;return typeof t.text!="string"&&(r=W5(t,n)),r}function W5(e,t){const n=e.text?e.text.length:0;return t*n}function Dse(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var Ise={id:"legend",_element:Hj,start(e,t,n){const r=e.legend=new Hj({ctx:e.ctx,options:n,chart:e});ir.configure(e,r,n),ir.addBox(e,r)},stop(e){ir.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;ir.configure(e,r,n),r.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const r=t.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),t.hidden=!0):(i.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:i,color:o,useBorderRadius:a,borderRadius:s}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(n?0:void 0),d=sr(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(d.width+d.height)/4,strokeStyle:c.borderColor,pointStyle:r||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:a&&(s||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class eT extends ha{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=Nt(r.text)?r.text.length:1;this._padding=sr(r.padding);const o=i*bn(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:r,bottom:i,right:o,options:a}=this,s=a.align;let l=0,c,d,f;return this.isHorizontal()?(d=tr(s,r,o),f=n+t,c=o-r):(a.position==="left"?(d=r+t,f=tr(s,i,n),l=Ft*-.5):(d=o-t,f=tr(s,n,i),l=Ft*.5),c=i-n),{titleX:d,titleY:f,maxWidth:c,rotation:l}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const r=bn(n.font),i=r.lineHeight/2+this._padding.top,{titleX:o,titleY:a,maxWidth:s,rotation:l}=this._drawArgs(i);Sl(t,n.text,0,0,r,{color:n.color,maxWidth:s,rotation:l,textAlign:WE(n.align),textBaseline:"middle",translation:[o,a]})}}function Fse(e,t){const n=new eT({ctx:e.ctx,options:t,chart:e});ir.configure(e,n,t),ir.addBox(e,n),e.titleBlock=n}var $se={id:"title",_element:eT,start(e,t,n){Fse(e,n)},stop(e){const t=e.titleBlock;ir.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const r=e.titleBlock;ir.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 Tm=new WeakMap;var Use={id:"subtitle",start(e,t,n){const r=new eT({ctx:e.ctx,options:n,chart:e});ir.configure(e,r,n),ir.addBox(e,r),Tm.set(e,r)},stop(e){ir.removeBox(e,Tm.get(e)),Tm.delete(e)},beforeUpdate(e,t,n){const r=Tm.get(e);ir.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 wf={average(e){if(!e.length)return!1;let t,n,r=0,i=0,o=0;for(t=0,n=e.length;ts({chart:t,initial:n.initial,numSteps:a,currentStep:Math.min(r-n.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=a5.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;const o=r.items;let a=o.length-1,s=!1,l;for(;a>=0;--a)l=o[a],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(t),s=!0):(o[a]=o[o.length-1],o.pop());s&&(i.draw(),this._notify(i,r,t,"progress")),o.length||(r.running=!1,this._notify(i,r,t,"complete"),r.initial=!1),n+=o.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let r=n.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,r)),r}listen(t,n,r){this._getAnims(t).listeners[n].push(r)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,i)=>Math.max(r,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const r=n.items;let i=r.length-1;for(;i>=0;--i)r[i].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var jo=new toe;const oj="transparent",noe={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=ZL(e||oj),i=r.valid&&ZL(t||oj);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class roe{constructor(t,n,r,i){const o=n[r];i=zd([t.to,i,o,t.from]);const a=zd([t.from,o,i]);this._active=!0,this._fn=t.fn||noe[t.type||typeof a],this._easing=gf[t.easing]||gf.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=r,this._from=a,this._to=i,this._promises=void 0}active(){return this._active}update(t,n,r){if(this._active){this._notify(!1);const i=this._target[this._prop],o=r-this._start,a=this._duration-o;this._start=r,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=zd([t.to,n,i,t.from]),this._from=zd([t.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,r=this._duration,i=this._prop,o=this._from,a=this._loop,s=this._to;let l;if(this._active=o!==s&&(a||n1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(o,s,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,r)=>{t.push({res:n,rej:r})})}_notify(t){const n=t?"res":"rej",r=this._promises||[];for(let i=0;i{const o=t[i];if(!rt(o))return;const a={};for(const s of n)a[s]=o[s];(Nt(o.properties)&&o.properties||[i]).forEach(s=>{(s===i||!r.has(s))&&r.set(s,a)})})}_animateOptions(t,n){const r=n.options,i=ooe(t,r);if(!i)return[];const o=this._createAnimations(i,r);return r.$shared&&ioe(t.options.$animations,r).then(()=>{t.options=r},()=>{}),o}_createAnimations(t,n){const r=this._properties,i=[],o=t.$animations||(t.$animations={}),a=Object.keys(n),s=Date.now();let l;for(l=a.length-1;l>=0;--l){const c=a[l];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(t,n));continue}const d=n[c];let f=o[c];const p=r.get(c);if(f)if(p&&f.active()){f.update(p,d,s);continue}else f.cancel();if(!p||!p.duration){t[c]=d;continue}o[c]=f=new roe(p,t,c,d),i.push(f)}return i}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const r=this._createAnimations(t,n);if(r.length)return jo.add(this._chart,r),!0}}function ioe(e,t){const n=[],r=Object.keys(t);for(let i=0;i0||!n&&o<0)return i.index}return null}function uj(e,t){const{chart:n,_cachedMeta:r}=e,i=n._stacks||(n._stacks={}),{iScale:o,vScale:a,index:s}=r,l=o.axis,c=a.axis,d=coe(o,a,r),f=t.length;let p;for(let m=0;mn[r].axis===t).shift()}function foe(e,t){return bs(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function hoe(e,t,n){return bs(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function xd(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 ub=e=>e==="reset"||e==="none",dj=(e,t)=>t?e:Object.assign({},e),poe=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:O5(n,!0),values:null};class Hi{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=lj(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&&xd(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(f,p,m,v)=>f==="x"?p:f==="r"?v:m,o=n.xAxisID=Ze(r.xAxisID,cb(t,"x")),a=n.yAxisID=Ze(r.yAxisID,cb(t,"y")),s=n.rAxisID=Ze(r.rAxisID,cb(t,"r")),l=n.indexAxis,c=n.iAxisID=i(l,o,a,s),d=n.vAxisID=i(l,a,o,s);n.xScale=this.getScaleForId(o),n.yScale=this.getScaleForId(a),n.rScale=this.getScaleForId(s),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(d)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&YL(this._data,this),t._stacked&&xd(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(rt(n))this._data=loe(n);else if(r!==n){if(r){YL(r,this);const i=this._cachedMeta;xd(i),i._parsed=[]}n&&Object.isExtensible(n)&&Jre(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=lj(n.vScale,n),n.stack!==r.stack&&(i=!0,xd(n),n.stack=r.stack),this._resyncElements(t),(i||o!==n._stacked)&&uj(this,n._parsed)}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:r,_data:i}=this,{iScale:o,_stacked:a}=r,s=o.axis;let l=t===0&&n===i.length?!0:r._sorted,c=t>0&&r._parsed[t-1],d,f,p;if(this._parsing===!1)r._parsed=i,r._sorted=!0,p=i;else{Nt(i[t])?p=this.parseArrayData(r,i,t,n):rt(i[t])?p=this.parseObjectData(r,i,t,n):p=this.parsePrimitiveData(r,i,t,n);const m=()=>f[s]===null||c&&f[s]y||f=0;--p)if(!v()){this.updateRangeFromParsed(c,t,m,l);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed,r=[];let i,o,a;for(i=0,o=n.length;i=0&&tthis.getContext(r,i,n),y=c.resolveNamedOptions(p,m,v,f);return y.$shared&&(y.$shared=l,o[a]=Object.freeze(dj(y,l))),y}_resolveAnimations(t,n,r){const i=this.chart,o=this._cachedDataOpts,a=`animation-${n}`,s=o[a];if(s)return s;let l;if(i.options.animation!==!1){const d=this.chart.config,f=d.datasetAnimationScopeKeys(this._type,n),p=d.getOptionScopes(this.getDataset(),f);l=d.createResolver(p,this.getContext(t,r,n))}const c=new T5(i,l&&l.animations);return l&&l._cacheable&&(o[a]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||ub(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),i=this._sharedOptions,o=this.getSharedOptions(r),a=this.includeOptions(n,o)||o!==i;return this.updateSharedOptions(o,n,r),{sharedOptions:o,includeOptions:a}}updateElement(t,n,r,i){ub(i)?Object.assign(t,r):this._resolveAnimations(n,i).update(t,r)}updateSharedOptions(t,n,r){t&&!ub(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,i){t.active=i;const o=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(t,{options:!i&&this.getSharedOptions(o)||o})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,r=this._cachedMeta.data;for(const[s,l,c]of this._syncList)this[s](l,c);this._syncList=[];const i=r.length,o=n.length,a=Math.min(o,i);a&&this.parse(0,a),o>i?this._insertElements(i,o-i,t):o{for(c.length+=n,s=c.length-1;s>=a;s--)c[s]=c[s-n]};for(l(o),s=t;si-o))}return e._cache.$bar}function goe(e){const t=e.iScale,n=moe(t,e.type);let r=t._length,i,o,a,s;const l=()=>{a===32767||a===-32768||(ch(s)&&(r=Math.min(r,Math.abs(a-s)||r)),s=a)};for(i=0,o=n.length;i0?i[e-1]:null,s=eMath.abs(s)&&(l=s,c=a),t[n.axis]=c,t._custom={barStart:l,barEnd:c,start:i,end:o,min:a,max:s}}function C5(e,t,n,r){return Nt(e)?_oe(e,t,n,r):t[n.axis]=n.parse(e,r),t}function fj(e,t,n,r){const i=e.iScale,o=e.vScale,a=i.getLabels(),s=i===o,l=[];let c,d,f,p;for(c=n,d=n+r;c=n?1:-1)}function woe(e){let t,n,r,i,o;return e.horizontal?(t=e.base>e.x,n="left",r="right"):(t=e.basel.controller.options.grouped),o=r.options.stacked,a=[],s=l=>{const c=l.controller.getParsed(n),d=c&&c[l.vScale.axis];if(dt(d)||isNaN(d))return!0};for(const l of i)if(!(n!==void 0&&s(l))&&((o===!1||a.indexOf(l.stack)===-1||o===void 0&&l.stack===void 0)&&a.push(l.stack),l.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,n,r){const i=this._getStacks(t,r),o=n!==void 0?i.indexOf(n):-1;return o===-1?i.length-1:o}_getRuler(){const t=this.options,n=this._cachedMeta,r=n.iScale,i=[];let o,a;for(o=0,a=n.data.length;o=0;--r)n=Math.max(n,t[r].size(this.resolveDataElementOptions(r))/2);return n>0&&n}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart.data.labels||[],{xScale:i,yScale:o}=n,a=this.getParsed(t),s=i.getLabelForValue(a.x),l=o.getLabelForValue(a.y),c=a._custom;return{label:r[t]||"",value:"("+s+", "+l+(c?", "+c:"")+")"}}update(t){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,t)}updateElements(t,n,r,i){const o=i==="reset",{iScale:a,vScale:s}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(n,i),d=a.axis,f=s.axis;for(let p=n;puh(S,s,l,!0)?1:Math.max(E,E*n,O,O*n),v=(S,E,O)=>uh(S,s,l,!0)?-1:Math.min(E,E*n,O,O*n),y=m(0,c,f),x=m(cn,d,p),_=v(Ft,c,f),w=v(Ft+cn,d,p);r=(y-_)/2,i=(x-w)/2,o=-(y+_)/2,a=-(x+w)/2}return{ratioX:r,ratioY:i,offsetX:o,offsetY:a}}class $a extends Hi{constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){const r=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=r;else{let o=l=>+r[l];if(rt(r[t])){const{key:l="value"}=this._parsing;o=c=>+ls(r[c],l)}let a,s;for(a=t,s=t+n;a0&&!isNaN(t)?Dt*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],o=qh(n._parsed[t],r.options.locale);return{label:i[t]||"",value:o}}getMaxBorderWidth(t){let n=0;const r=this.chart;let i,o,a,s,l;if(!t){for(i=0,o=r.data.datasets.length;ie!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")}),Te($a,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const t=e.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:n,color:r}}=e.legend.options;return t.labels.map((i,o)=>{const a=e.getDatasetMeta(0).controller.getStyle(o);return{text:i,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,fontColor:r,lineWidth:a.borderWidth,pointStyle:n,hidden:!e.getDataVisibility(o),index:o}})}return[]}},onClick(e,t,n){n.chart.toggleDataVisibility(t.index),n.chart.update()}}}});class _f extends Hi{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:r,data:i=[],_dataset:o}=n,a=this.chart._animationsDisabled;let{start:s,count:l}=l5(n,i,a);this._drawStart=s,this._drawCount=l,c5(n)&&(s=0,l=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!o._decimated,r.points=i;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(r,void 0,{animated:!a,options:c},t),this.updateElements(i,s,l,t)}updateElements(t,n,r,i){const o=i==="reset",{iScale:a,vScale:s,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:d,includeOptions:f}=this._getSharedOptions(n,i),p=a.axis,m=s.axis,{spanGaps:v,segment:y}=this.options,x=_u(v)?v:Number.POSITIVE_INFINITY,_=this.chart._animationsDisabled||o||i==="none",w=n+r,S=t.length;let E=n>0&&this.getParsed(n-1);for(let O=0;O=w){j.skip=!0;continue}const A=this.getParsed(O),U=dt(A[m]),R=j[p]=a.getPixelForValue(A[p],O),V=j[m]=o||U?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,A,l):A[m],O);j.skip=isNaN(R)||isNaN(V)||U,j.stop=O>0&&Math.abs(A[p]-E[p])>x,y&&(j.parsed=A,j.raw=c.data[O]),f&&(j.options=d||this.resolveDataElementOptions(O,k.active?"active":i)),_||this.updateElement(k,O,j,i),E=A}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,r=n.options&&n.options.borderWidth||0,i=t.data||[];if(!i.length)return r;const o=i[0].size(this.resolveDataElementOptions(0)),a=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,o,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}Te(_f,"id","line"),Te(_f,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),Te(_f,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class bf extends Hi{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=qh(n._parsed[t].r,r.options.locale);return{label:i[t]||"",value:o}}parseObjectData(t,n,r,i){return v5.bind(this)(t,n,r,i)}update(t){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,t)}getMinMax(){const t=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((r,i)=>{const o=this.getParsed(i).r;!isNaN(o)&&this.chart.getDataVisibility(i)&&(on.max&&(n.max=o))}),n}_updateRadius(){const t=this.chart,n=t.chartArea,r=t.options,i=Math.min(n.right-n.left,n.bottom-n.top),o=Math.max(i/2,0),a=Math.max(r.cutoutPercentage?o/100*r.cutoutPercentage:1,0),s=(o-a)/t.getVisibleDatasetCount();this.outerRadius=o-s*this.index,this.innerRadius=this.outerRadius-s}updateElements(t,n,r,i){const o=i==="reset",a=this.chart,s=a.options.animation,l=this._cachedMeta.rScale,c=l.xCenter,d=l.yCenter,f=l.getIndexAngle(0)-.5*Ft;let p=f,m;const v=360/this.countVisibleElements();for(m=0;m{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&n++}),n}_computeAngle(t,n,r){return this.chart.getDataVisibility(t)?Ii(this.resolveDataElementOptions(t,n).angle||r):0}}Te(bf,"id","polarArea"),Te(bf,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),Te(bf,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const t=e.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:n,color:r}}=e.legend.options;return t.labels.map((i,o)=>{const a=e.getDatasetMeta(0).controller.getStyle(o);return{text:i,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,fontColor:r,lineWidth:a.borderWidth,pointStyle:n,hidden:!e.getDataVisibility(o),index:o}})}return[]}},onClick(e,t,n){n.chart.toggleDataVisibility(t.index),n.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class $x extends $a{}Te($x,"id","pie"),Te($x,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class ug extends Hi{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 v5.bind(this)(t,n,r,i)}update(t){const n=this._cachedMeta,r=n.dataset,i=n.data||[],o=n.iScale.getLabels();if(r.points=i,t!=="resize"){const a=this.resolveDatasetElementOptions(t);this.options.showLine||(a.borderWidth=0);const s={_loop:!0,_fullLoop:o.length===i.length,options:a};this.updateElement(r,void 0,s,t)}this.updateElements(i,0,i.length,t)}updateElements(t,n,r,i){const o=this._cachedMeta.rScale,a=i==="reset";for(let s=n;s0&&this.getParsed(n-1);for(let E=n;E0&&Math.abs(k[m]-S[m])>_,x&&(j.parsed=k,j.raw=c.data[E]),p&&(j.options=f||this.resolveDataElementOptions(E,O.active?"active":i)),w||this.updateElement(O,E,j,i),S=k}this.updateSharedOptions(f,i,d)}getMaxOverflow(){const t=this._cachedMeta,n=t.data||[];if(!this.options.showLine){let s=0;for(let l=n.length-1;l>=0;--l)s=Math.max(s,n[l].size(this.resolveDataElementOptions(l))/2);return s>0&&s}const r=t.dataset,i=r.options&&r.options.borderWidth||0;if(!n.length)return i;const o=n[0].size(this.resolveDataElementOptions(0)),a=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,o,a)/2}}Te(dg,"id","scatter"),Te(dg,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),Te(dg,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var Ooe=Object.freeze({__proto__:null,BarController:yf,BubbleController:cg,DoughnutController:$a,LineController:_f,PieController:$x,PolarAreaController:bf,RadarController:ug,ScatterController:dg});function js(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class XE{constructor(t){Te(this,"options"),this.options=t||{}}static override(t){Object.assign(XE.prototype,t)}init(){}formats(){return js()}parse(){return js()}format(){return js()}add(){return js()}diff(){return js()}startOf(){return js()}endOf(){return js()}}var Coe={_date:XE};function koe(e,t,n,r){const{controller:i,data:o,_sorted:a}=e,s=i._cachedMeta.iScale;if(s&&t===s.axis&&t!=="r"&&a&&o.length){const l=s._reversePixels?Qre:Bo;if(r){if(i._sharedOptions){const c=o[0],d=typeof c.getRange=="function"&&c.getRange(t);if(d){const f=l(o,t,n-d),p=l(o,t,n+d);return{lo:f.lo,hi:p.hi}}}}else return l(o,t,n)}return{lo:0,hi:o.length-1}}function Zh(e,t,n,r,i){const o=e.getSortedVisibleDatasetMetas(),a=n[t];for(let s=0,l=o.length;s{l[a](t[n],i)&&(o.push({element:l,datasetIndex:c,index:d}),s=s||l.inRange(t.x,t.y,i))}),r&&!s?[]:o}var Moe={evaluateInteractionItems:Zh,modes:{index(e,t,n,r){const i=zs(t,e),o=n.axis||"x",a=n.includeInvisible||!1,s=n.intersect?fb(e,i,o,r,a):hb(e,i,o,!1,r,a),l=[];return s.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const d=s[0].index,f=c.data[d];f&&!f.skip&&l.push({element:f,datasetIndex:c.index,index:d})}),l):[]},dataset(e,t,n,r){const i=zs(t,e),o=n.axis||"xy",a=n.includeInvisible||!1;let s=n.intersect?fb(e,i,o,r,a):hb(e,i,o,!1,r,a);if(s.length>0){const l=s[0].datasetIndex,c=e.getDatasetMeta(l).data;s=[];for(let d=0;dn.pos===t)}function gj(e,t){return e.filter(n=>k5.indexOf(n.pos)===-1&&n.box.axis===t)}function Ed(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 Noe(e){const t=[];let n,r,i,o,a,s;for(n=0,r=(e||[]).length;nc.box.fullSize),!0),r=Ed(Sd(t,"left"),!0),i=Ed(Sd(t,"right")),o=Ed(Sd(t,"top"),!0),a=Ed(Sd(t,"bottom")),s=gj(t,"x"),l=gj(t,"y");return{fullSize:n,leftAndTop:r.concat(o),rightAndBottom:i.concat(l).concat(a).concat(s),chartArea:Sd(t,"chartArea"),vertical:r.concat(i).concat(l),horizontal:o.concat(a).concat(s)}}function vj(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function P5(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 Ioe(e,t,n,r){const{pos:i,box:o}=n,a=e.maxPadding;if(!rt(i)){n.size&&(e[i]-=n.size);const f=r[n.stack]||{size:0,count:1};f.size=Math.max(f.size,n.horizontal?o.height:o.width),n.size=f.size/f.count,e[i]+=n.size}o.getPadding&&P5(a,o.getPadding());const s=Math.max(0,t.outerWidth-vj(a,e,"left","right")),l=Math.max(0,t.outerHeight-vj(a,e,"top","bottom")),c=s!==e.w,d=l!==e.h;return e.w=s,e.h=l,n.horizontal?{same:c,other:d}:{same:d,other:c}}function Foe(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 $oe(e,t){const n=t.maxPadding;function r(i){const o={left:0,top:0,right:0,bottom:0};return i.forEach(a=>{o[a]=Math.max(t[a],n[a])}),o}return r(e?["left","right"]:["top","bottom"])}function Vd(e,t,n,r){const i=[];let o,a,s,l,c,d;for(o=0,a=e.length,c=0;o{typeof y.beforeLayout=="function"&&y.beforeLayout()});const d=l.reduce((y,x)=>x.box.options&&x.box.options.display===!1?y:y+1,0)||1,f=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/d,hBoxMaxHeight:a/2}),p=Object.assign({},i);P5(p,sr(r));const m=Object.assign({maxPadding:p,w:o,h:a,x:i.left,y:i.top},i),v=Aoe(l.concat(c),f);Vd(s.fullSize,m,f,v),Vd(l,m,f,v),Vd(c,m,f,v)&&Vd(l,m,f,v),Foe(m),yj(s.leftAndTop,m,f,v),m.x+=m.w,m.y+=m.h,yj(s.rightAndBottom,m,f,v),e.chartArea={left:m.left,top:m.top,right:m.left+m.w,bottom:m.top+m.h,height:m.h,width:m.w},bt(s.chartArea,y=>{const x=y.box;Object.assign(x,e.chartArea),x.update(m.w,m.h,{left:0,top:0,right:0,bottom:0})})}};class L5{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 Uoe extends L5{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const fg="$chartjs",Boe={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},_j=e=>e===null||e==="";function zoe(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[fg]={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",_j(i)){const o=tj(e,"width");o!==void 0&&(e.width=o)}if(_j(r))if(e.style.height==="")e.height=e.width/(t||2);else{const o=tj(e,"height");o!==void 0&&(e.height=o)}return e}const j5=Hie?{passive:!0}:!1;function Voe(e,t,n){e.addEventListener(t,n,j5)}function Hoe(e,t,n){e.canvas.removeEventListener(t,n,j5)}function Woe(e,t){const n=Boe[e.type]||e.type,{x:r,y:i}=zs(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:i!==void 0?i:null}}function Vv(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function Yoe(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let a=!1;for(const s of o)a=a||Vv(s.addedNodes,r),a=a&&!Vv(s.removedNodes,r);a&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function Goe(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let a=!1;for(const s of o)a=a||Vv(s.removedNodes,r),a=a&&!Vv(s.addedNodes,r);a&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const fh=new Map;let bj=0;function M5(){const e=window.devicePixelRatio;e!==bj&&(bj=e,fh.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function qoe(e,t){fh.size||window.addEventListener("resize",M5),fh.set(e,t)}function Zoe(e){fh.delete(e),fh.size||window.removeEventListener("resize",M5)}function Koe(e,t,n){const r=e.canvas,i=r&&QE(r);if(!i)return;const o=s5((s,l)=>{const c=i.clientWidth;n(s,l),c{const l=s[0],c=l.contentRect.width,d=l.contentRect.height;c===0&&d===0||o(c,d)});return a.observe(i),qoe(e,o),a}function pb(e,t,n){n&&n.disconnect(),t==="resize"&&Zoe(e)}function Qoe(e,t,n){const r=e.canvas,i=s5(o=>{e.ctx!==null&&n(Woe(o,e))},e);return Voe(r,t,i),i}class Xoe extends L5{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(zoe(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[fg])return!1;const r=n[fg].initial;["height","width"].forEach(o=>{const a=r[o];dt(a)?n.removeAttribute(o):n.setAttribute(o,a)});const i=r.style||{};return Object.keys(i).forEach(o=>{n.style[o]=i[o]}),n.width=n.width,delete n[fg],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),o={attach:Yoe,detach:Goe,resize:Koe}[n]||Qoe;i[n]=o(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),i=r[n];i&&(({attach:pb,detach:pb,resize:pb}[n]||Hoe)(t,n,i),r[n]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,i){return Vie(t,n,r,i)}isAttached(t){const n=QE(t);return!!(n&&n.isConnected)}}function Joe(e){return!_5()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?Uoe:Xoe}var bm;let ha=(bm=class{constructor(){Te(this,"x"),Te(this,"y"),Te(this,"active",!1),Te(this,"options"),Te(this,"$animations")}tooltipPosition(e){const{x:t,y:n}=this.getProps(["x","y"],e);return{x:t,y:n}}hasValue(){return _u(this.x)&&_u(this.y)}getProps(e,t){const n=this.$animations;if(!t||!n)return this;const r={};return e.forEach(i=>{r[i]=n[i]&&n[i].active()?n[i]._to:this[i]}),r}},Te(bm,"defaults",{}),Te(bm,"defaultRoutes"),bm);function eae(e,t){const n=e.options.ticks,r=tae(e),i=Math.min(n.maxTicksLimit||r,r),o=n.major.enabled?rae(t):[],a=o.length,s=o[0],l=o[a-1],c=[];if(a>i)return iae(t,c,o,a/i),c;const d=nae(o,t,i);if(a>0){let f,p;const m=a>1?Math.round((l-s)/(a-1)):null;for(wm(t,c,d,dt(m)?0:s-m,s),f=0,p=a-1;fi)return l}return Math.max(i,1)}function rae(e){const t=[];let n,r;for(n=0,r=e.length;ne==="left"?"right":e==="right"?"left":e,wj=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,xj=(e,t)=>Math.min(t||e,e);function Sj(e,t){const n=[],r=e.length/t,i=e.length;let o=0;for(;oa+s)))return l}function lae(e,t){bt(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:Dr(n,Dr(r,n)),max:Dr(r,Dr(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(){kt(this.options.beforeUpdate,[this])}update(t,n,r){const{beginAtZero:i,grace:o,ticks:a}=this.options,s=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=wie(this,o,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=s=o||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const d=this._getLabelSizes(),f=d.widest.width,p=d.highest.height,m=Mn(this.chart.width-f,0,this.maxWidth);s=t.offset?this.maxWidth/r:m/(r-1),f+6>s&&(s=m/(r-(t.offset?.5:1)),l=this.maxHeight-Td(t.grid)-n.padding-Ej(t.title,this.chart.options.font),c=Math.sqrt(f*f+p*p),a=VE(Math.min(Math.asin(Mn((d.highest.height+6)/s,-1,1)),Math.asin(Mn(l/c,-1,1))-Math.asin(Mn(p/c,-1,1)))),a=Math.max(i,Math.min(o,a))),this.labelRotation=a}afterCalculateLabelRotation(){kt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){kt(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:o}}=this,a=this._isVisible(),s=this.isHorizontal();if(a){const l=Ej(i,n.options.font);if(s?(t.width=this.maxWidth,t.height=Td(o)+l):(t.height=this.maxHeight,t.width=Td(o)+l),r.display&&this.ticks.length){const{first:c,last:d,widest:f,highest:p}=this._getLabelSizes(),m=r.padding*2,v=Ii(this.labelRotation),y=Math.cos(v),x=Math.sin(v);if(s){const _=r.mirror?0:x*f.width+y*p.height;t.height=Math.min(this.maxHeight,t.height+_+m)}else{const _=r.mirror?0:y*f.width+x*p.height;t.width=Math.min(this.maxWidth,t.width+_+m)}this._calculatePadding(c,d,x,y)}}this._handleMargins(),s?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,r,i){const{ticks:{align:o,padding:a},position:s}=this.options,l=this.labelRotation!==0,c=s!=="top"&&this.axis==="x";if(this.isHorizontal()){const d=this.getPixelForTick(0)-this.left,f=this.right-this.getPixelForTick(this.ticks.length-1);let p=0,m=0;l?c?(p=i*t.width,m=r*n.height):(p=r*t.height,m=i*n.width):o==="start"?m=n.width:o==="end"?p=t.width:o!=="inner"&&(p=t.width/2,m=n.width/2),this.paddingLeft=Math.max((p-d+a)*this.width/(this.width-d),0),this.paddingRight=Math.max((m-f+a)*this.width/(this.width-f),0)}else{let d=n.height/2,f=t.height/2;o==="start"?(d=0,f=t.height):o==="end"&&(d=n.height,f=0),this.paddingTop=d+a,this.paddingBottom=f+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){kt(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,r;for(n=0,r=t.length;n({width:a[U]||0,height:s[U]||0});return{first:A(0),last:A(n-1),widest:A(k),highest:A(j),widths:a,heights:s}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return Kre(this._alignToPixels?Ls(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&ts*i?s/r:l/i:l*i0}_computeGridLineItems(t){const n=this.axis,r=this.chart,i=this.options,{grid:o,position:a,border:s}=i,l=o.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),f=Td(o),p=[],m=s.setContext(this.getContext()),v=m.display?m.width:0,y=v/2,x=function(Z){return Ls(r,Z,v)};let _,w,S,E,O,k,j,A,U,R,V,W;if(a==="top")_=x(this.bottom),k=this.bottom-f,A=_-y,R=x(t.top)+y,W=t.bottom;else if(a==="bottom")_=x(this.top),R=t.top,W=x(t.bottom)-y,k=_+y,A=this.top+f;else if(a==="left")_=x(this.right),O=this.right-f,j=_-y,U=x(t.left)+y,V=t.right;else if(a==="right")_=x(this.left),U=t.left,V=x(t.right)-y,O=_+y,j=this.left+f;else if(n==="x"){if(a==="center")_=x((t.top+t.bottom)/2+.5);else if(rt(a)){const Z=Object.keys(a)[0],ne=a[Z];_=x(this.chart.scales[Z].getPixelForValue(ne))}R=t.top,W=t.bottom,k=_+y,A=k+f}else if(n==="y"){if(a==="center")_=x((t.left+t.right)/2);else if(rt(a)){const Z=Object.keys(a)[0],ne=a[Z];_=x(this.chart.scales[Z].getPixelForValue(ne))}O=_-y,j=O-f,U=t.left,V=t.right}const X=Ze(i.ticks.maxTicksLimit,d),G=Math.max(1,Math.ceil(d/X));for(w=0;wi.value===t);return r>=0?n.setContext(this.getContext(r)).lineWidth:0}drawGrid(t){const n=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,a;const s=(l,c,d)=>{!d.width||!d.color||(r.save(),r.lineWidth=d.width,r.strokeStyle=d.color,r.setLineDash(d.borderDash||[]),r.lineDashOffset=d.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(c.x,c.y),r.stroke(),r.restore())};if(n.display)for(o=0,a=i.length;o{this.draw(o)}}]:[{z:r,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let o,a;for(o=0,a=n.length;o{const r=n.split("."),i=r.pop(),o=[e].concat(r).join("."),a=t[n].split("."),s=a.pop(),l=a.join(".");nn.route(o,i,l,s)})}function mae(e){return"id"in e&&"defaults"in e}class gae{constructor(){this.controllers=new xm(Hi,"datasets",!0),this.elements=new xm(ha,"elements"),this.plugins=new xm(Object,"plugins"),this.scales=new xm(Dl,"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):bt(i,a=>{const s=r||this._getRegistryForType(a);this._exec(t,s,a)})})}_exec(t,n,r){const i=zE(t);kt(r["before"+i],[],r),n[t](r),kt(r["after"+i],[],r)}_getRegistryForType(t){for(let n=0;no.filter(s=>!a.some(l=>s.plugin.id===l.plugin.id));this._notify(i(n,r),t,"stop"),this._notify(i(r,n),t,"start")}}function yae(e){const t={},n=[],r=Object.keys(oo.plugins.items);for(let o=0;o1&&Tj(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Oj(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function Tae(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(r=>r.xAxisID===e||r.yAxisID===e);if(n.length)return Oj(e,"x",n[0])||Oj(e,"y",n[0])}return{}}function Oae(e,t){const n=xl[e.type]||{scales:{}},r=t.scales||{},i=Ux(e.type,t),o=Object.create(null);return Object.keys(r).forEach(a=>{const s=r[a];if(!rt(s))return console.error(`Invalid scale configuration for scale: ${a}`);if(s._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);const l=Bx(a,s,Tae(a,e),nn.scales[s.type]),c=Sae(l,i),d=n.scales||{};o[a]=pf(Object.create(null),[{axis:l},s,d[l],d[c]])}),e.data.datasets.forEach(a=>{const s=a.type||e.type,l=a.indexAxis||Ux(s,t),c=(xl[s]||{}).scales||{};Object.keys(c).forEach(d=>{const f=xae(d,l),p=a[f+"AxisID"]||f;o[p]=o[p]||Object.create(null),pf(o[p],[{axis:f},r[p],c[d]])})}),Object.keys(o).forEach(a=>{const s=o[a];pf(s,[nn.scales[s.type],nn.scale])}),o}function N5(e){const t=e.options||(e.options={});t.plugins=Ze(t.plugins,{}),t.scales=Oae(e,t)}function R5(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function Cae(e){return e=e||{},e.data=R5(e.data),N5(e),e}const Cj=new Map,A5=new Set;function Sm(e,t){let n=Cj.get(e);return n||(n=t(),Cj.set(e,n),A5.add(n)),n}const Od=(e,t,n)=>{const r=ls(t,n);r!==void 0&&e.add(r)};class kae{constructor(t){this._config=Cae(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=R5(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(),N5(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Sm(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return Sm(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return Sm(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return Sm(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const r=this._scopeCache;let i=r.get(t);return(!i||n)&&(i=new Map,r.set(t,i)),i}getOptionScopes(t,n,r){const{options:i,type:o}=this,a=this._cachedScopes(t,r),s=a.get(n);if(s)return s;const l=new Set;n.forEach(d=>{t&&(l.add(t),d.forEach(f=>Od(l,t,f))),d.forEach(f=>Od(l,i,f)),d.forEach(f=>Od(l,xl[o]||{},f)),d.forEach(f=>Od(l,nn,f)),d.forEach(f=>Od(l,Ix,f))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),A5.has(n)&&a.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,xl[n]||{},nn.datasets[n]||{},{type:n},nn,Ix]}resolveNamedOptions(t,n,r,i=[""]){const o={$shared:!0},{resolver:a,subPrefixes:s}=kj(this._resolverCache,t,i);let l=a;if(Lae(a,n)){o.$shared=!1,r=cs(r)?r():r;const c=this.createResolver(t,r,s);l=bu(a,r,c)}for(const c of n)o[c]=l[c];return o}createResolver(t,n,r=[""],i){const{resolver:o}=kj(this._resolverCache,t,r);return rt(n)?bu(o,n,void 0,i):o}}function kj(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:qE(t,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},r.set(i,o)),o}const Pae=e=>rt(e)&&Object.getOwnPropertyNames(e).reduce((t,n)=>t||cs(e[n]),!1);function Lae(e,t){const{isScriptable:n,isIndexable:r}=h5(e);for(const i of t){const o=n(i),a=r(i),s=(a||o)&&e[i];if(o&&(cs(s)||Pae(s))||a&&Nt(s))return!0}return!1}var jae="4.4.0";const Mae=["top","bottom","left","right","chartArea"];function Pj(e,t){return e==="top"||e==="bottom"||Mae.indexOf(e)===-1&&t==="x"}function Lj(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function jj(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),kt(n&&n.onComplete,[e],t)}function Nae(e){const t=e.chart,n=t.options.animation;kt(n&&n.onProgress,[e],t)}function D5(e){return _5()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const hg={},Mj=e=>{const t=D5(e);return Object.values(hg).filter(n=>n.canvas===t).pop()};function Rae(e,t,n){const r=Object.keys(e);for(const i of r){const o=+i;if(o>=t){const a=e[i];delete e[i],(n>0||o>t)&&(e[o+n]=a)}}}function Aae(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}function Em(e,t,n){return e.options.clip?e[n]:t[n]}function Dae(e,t){const{xScale:n,yScale:r}=e;return n&&r?{left:Em(n,t,"left"),right:Em(n,t,"right"),top:Em(r,t,"top"),bottom:Em(r,t,"bottom")}:t}var wa;let p0=(wa=class{static register(...e){oo.add(...e),Nj()}static unregister(...e){oo.remove(...e),Nj()}constructor(e,t){const n=this.config=new kae(t),r=D5(e),i=Mj(r);if(i)throw new Error("Canvas is already in use. Chart with ID '"+i.id+"' must be destroyed before the canvas with ID '"+i.canvas.id+"' can be reused.");const o=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||Joe(r)),this.platform.updateConfig(n);const a=this.platform.acquireContext(r,o.aspectRatio),s=a&&a.canvas,l=s&&s.height,c=s&&s.width;if(this.id=Fre(),this.ctx=a,this.canvas=s,this.width=c,this.height=l,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new vae,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=eie(d=>this.update(d),o.resizeDelay||0),this._dataChanges=[],hg[this.id]=this,!a||!s){console.error("Failed to create chart: can't acquire context from the given item");return}jo.listen(this,"complete",jj),jo.listen(this,"progress",Nae),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:t},width:n,height:r,_aspectRatio:i}=this;return dt(e)?t&&i?i:r?n/r:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return oo}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():ej(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return QL(this.canvas,this.ctx),this}stop(){return jo.stop(this),this}resize(e,t){jo.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}_resize(e,t){const n=this.options,r=this.canvas,i=n.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(r,e,t,i),a=n.devicePixelRatio||this.platform.getDevicePixelRatio(),s=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,ej(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),kt(n.onResize,[this,o],this),this.attached&&this._doResize(s)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};bt(e,(t,n)=>{t.id=n})}buildOrUpdateScales(){const e=this.options,t=e.scales,n=this.scales,r=Object.keys(n).reduce((o,a)=>(o[a]=!1,o),{});let i=[];t&&(i=i.concat(Object.keys(t).map(o=>{const a=t[o],s=Bx(o,a),l=s==="r",c=s==="x";return{options:a,dposition:l?"chartArea":c?"bottom":"left",dtype:l?"radialLinear":c?"category":"linear"}}))),bt(i,o=>{const a=o.options,s=a.id,l=Bx(s,a),c=Ze(a.type,o.dtype);(a.position===void 0||Pj(a.position,l)!==Pj(o.dposition))&&(a.position=o.dposition),r[s]=!0;let d=null;if(s in n&&n[s].type===c)d=n[s];else{const f=oo.getScale(c);d=new f({id:s,type:c,ctx:this.ctx,chart:this}),n[d.id]=d}d.init(a,e)}),bt(r,(o,a)=>{o||delete n[a]}),bt(n,o=>{ir.configure(this,o,o.options),ir.addBox(this,o)})}_updateMetasets(){const e=this._metasets,t=this.data.datasets.length,n=e.length;if(e.sort((r,i)=>r.index-i.index),n>t){for(let r=t;rt.length&&delete this._stacks,e.forEach((n,r)=>{t.filter(i=>i===n._dataset).length===0&&this._destroyDatasetMeta(r)})}buildOrUpdateControllers(){const e=[],t=this.data.datasets;let n,r;for(this._removeUnreferencedMetasets(),n=0,r=t.length;n{this.getDatasetMeta(t).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const t=this.config;t.update();const n=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const i=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let l=0,c=this.data.datasets.length;l{l.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(Lj("z","_idx"));const{_active:a,_lastEvent:s}=this;s?this._eventHandler(s,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){bt(this.scales,e=>{ir.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,t=new Set(Object.keys(this._listeners)),n=new Set(e.events);(!zL(t,n)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,t=this._getUniformDataChanges()||[];for(const{method:n,start:r,count:i}of t){const o=n==="_removeElements"?-i:i;Rae(e,r,o)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const t=this.data.datasets.length,n=i=>new Set(e.filter(o=>o[0]===i).map((o,a)=>a+","+o.splice(1).join(","))),r=n(0);for(let i=1;ii.split(",")).map(i=>({method:i[1],start:+i[2],count:+i[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;ir.update(this,this.width,this.height,e);const t=this.chartArea,n=t.width<=0||t.height<=0;this._layers=[],bt(this.boxes,r=>{n&&r.position==="chartArea"||(r.configure&&r.configure(),this._layers.push(...r._layers()))},this),this._layers.forEach((r,i)=>{r._idx=i}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let t=0,n=this.data.datasets.length;t=0;--t)this._drawDataset(e[t]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const t=this.ctx,n=e._clip,r=!n.disabled,i=Dae(e,this.chartArea),o={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(r&&d0(t,{left:n.left===!1?0:i.left-n.left,right:n.right===!1?this.width:i.right+n.right,top:n.top===!1?0:i.top-n.top,bottom:n.bottom===!1?this.height:i.bottom+n.bottom}),e.controller.draw(),r&&f0(t),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(e){return zo(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,n,r){const i=Moe.modes[t];return typeof i=="function"?i(this,e,n,r):[]}getDatasetMeta(e){const t=this.data.datasets[e],n=this._metasets;let r=n.filter(i=>i&&i._dataset===t).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:e,_dataset:t,_parsed:[],_sorted:!1},n.push(r)),r}getContext(){return this.$context||(this.$context=bs(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const t=this.data.datasets[e];if(!t)return!1;const n=this.getDatasetMeta(e);return typeof n.hidden=="boolean"?!n.hidden:!t.hidden}setDatasetVisibility(e,t){const n=this.getDatasetMeta(e);n.hidden=!t}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,t,n){const r=n?"show":"hide",i=this.getDatasetMeta(e),o=i.controller._resolveAnimations(void 0,r);ch(t)?(i.data[t].hidden=!n,this.update()):(this.setDatasetVisibility(e,n),o.update(i,{visible:n}),this.update(a=>a.datasetIndex===e?r:void 0))}hide(e,t){this._updateVisibility(e,t,!1)}show(e,t){this._updateVisibility(e,t,!0)}_destroyDatasetMeta(e){const t=this._metasets[e];t&&t.controller&&t.controller._destroy(),delete this._metasets[e]}_stop(){let e,t;for(this.stop(),jo.remove(this),e=0,t=this.data.datasets.length;e{t.addEventListener(this,i,o),e[i]=o},r=(i,o,a)=>{i.offsetX=o,i.offsetY=a,this._eventHandler(i)};bt(this.options.events,i=>n(i,r))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,t=this.platform,n=(s,l)=>{t.addEventListener(this,s,l),e[s]=l},r=(s,l)=>{e[s]&&(t.removeEventListener(this,s,l),delete e[s])},i=(s,l)=>{this.canvas&&this.resize(s,l)};let o;const a=()=>{r("attach",a),this.attached=!0,this.resize(),n("resize",i),n("detach",o)};o=()=>{this.attached=!1,r("resize",i),this._stop(),this._resize(0,0),n("attach",a)},t.isAttached(this.canvas)?a():o()}unbindEvents(){bt(this._listeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._listeners={},bt(this._responsiveListeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,t,n){const r=n?"set":"remove";let i,o,a,s;for(t==="dataset"&&(i=this.getDatasetMeta(e[0].datasetIndex),i.controller["_"+r+"DatasetHoverStyle"]()),a=0,s=e.length;a{const o=this.getDatasetMeta(r);if(!o)throw new Error("No dataset found at index "+r);return{datasetIndex:r,element:o.data[i],index:i}});!Fv(n,t)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,t))}notifyPlugins(e,t,n){return this._plugins.notify(this,e,t,n)}isPluginEnabled(e){return this._plugins._cache.filter(t=>t.plugin.id===e).length===1}_updateHoverStyles(e,t,n){const r=this.options.hover,i=(s,l)=>s.filter(c=>!l.some(d=>c.datasetIndex===d.datasetIndex&&c.index===d.index)),o=i(t,e),a=n?e:i(e,t);o.length&&this.updateHoverStyle(o,r.mode,!1),a.length&&r.mode&&this.updateHoverStyle(a,r.mode,!0)}_eventHandler(e,t){const n={event:e,replay:t,cancelable:!0,inChartArea:this.isPointInArea(e)},r=o=>(o.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",n,r)===!1)return;const i=this._handleEvent(e,t,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,r),(i||n.changed)&&this.render(),this}_handleEvent(e,t,n){const{_active:r=[],options:i}=this,o=t,a=this._getActiveElements(e,r,n,o),s=Hre(e),l=Aae(e,this._lastEvent,n,s);n&&(this._lastEvent=null,kt(i.onHover,[e,a,this],this),s&&kt(i.onClick,[e,a,this],this));const c=!Fv(a,r);return(c||t)&&(this._active=a,this._updateHoverStyles(a,r,t)),this._lastEvent=l,c}_getActiveElements(e,t,n,r){if(e.type==="mouseout")return[];if(!n)return t;const i=this.options.hover;return this.getElementsAtEventForMode(e,i.mode,i,r)}},Te(wa,"defaults",nn),Te(wa,"instances",hg),Te(wa,"overrides",xl),Te(wa,"registry",oo),Te(wa,"version",jae),Te(wa,"getChart",Mj),wa);function Nj(){return bt(p0.instances,e=>e._plugins.invalidate())}function Iae(e,t,n){const{startAngle:r,pixelMargin:i,x:o,y:a,outerRadius:s,innerRadius:l}=t;let c=i/s;e.beginPath(),e.arc(o,a,s,r-c,n+c),l>i?(c=i/l,e.arc(o,a,l,n+c,r-c,!0)):e.arc(o,a,i,n+cn,r-cn),e.closePath(),e.clip()}function Fae(e){return GE(e,["outerStart","outerEnd","innerStart","innerEnd"])}function $ae(e,t,n,r){const i=Fae(e.options.borderRadius),o=(n-t)/2,a=Math.min(o,r*t/2),s=l=>{const c=(n-Math.min(o,l))*r/2;return Mn(l,0,Math.min(o,c))};return{outerStart:s(i.outerStart),outerEnd:s(i.outerEnd),innerStart:Mn(i.innerStart,0,a),innerEnd:Mn(i.innerEnd,0,a)}}function ac(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function Hv(e,t,n,r,i,o){const{x:a,y:s,startAngle:l,pixelMargin:c,innerRadius:d}=t,f=Math.max(t.outerRadius+r+n-c,0),p=d>0?d+r+n+c:0;let m=0;const v=i-l;if(r){const Z=d>0?d-r:0,ne=f>0?f-r:0,le=(Z+ne)/2,K=le!==0?v*le/(le+r):v;m=(v-K)/2}const y=Math.max(.001,v*f-n/Ft)/f,x=(v-y)/2,_=l+x+m,w=i-x-m,{outerStart:S,outerEnd:E,innerStart:O,innerEnd:k}=$ae(t,p,f,w-_),j=f-S,A=f-E,U=_+S/j,R=w-E/A,V=p+O,W=p+k,X=_+O/V,G=w-k/W;if(e.beginPath(),o){const Z=(U+R)/2;if(e.arc(a,s,f,U,Z),e.arc(a,s,f,Z,R),E>0){const F=ac(A,R,a,s);e.arc(F.x,F.y,E,R,w+cn)}const ne=ac(W,w,a,s);if(e.lineTo(ne.x,ne.y),k>0){const F=ac(W,G,a,s);e.arc(F.x,F.y,k,w+cn,G+Math.PI)}const le=(w-k/p+(_+O/p))/2;if(e.arc(a,s,p,w-k/p,le,!0),e.arc(a,s,p,le,_+O/p,!0),O>0){const F=ac(V,X,a,s);e.arc(F.x,F.y,O,X+Math.PI,_-cn)}const K=ac(j,_,a,s);if(e.lineTo(K.x,K.y),S>0){const F=ac(j,U,a,s);e.arc(F.x,F.y,S,_-cn,U)}}else{e.moveTo(a,s);const Z=Math.cos(U)*f+a,ne=Math.sin(U)*f+s;e.lineTo(Z,ne);const le=Math.cos(R)*f+a,K=Math.sin(R)*f+s;e.lineTo(le,K)}e.closePath()}function Uae(e,t,n,r,i){const{fullCircles:o,startAngle:a,circumference:s}=t;let l=t.endAngle;if(o){Hv(e,t,n,r,l,i);for(let c=0;c=Dt||uh(o,s,l),v=Uo(a,c+p,d+p);return m&&v}getCenterPoint(t){const{x:n,y:r,startAngle:i,endAngle:o,innerRadius:a,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:l,spacing:c}=this.options,d=(i+o)/2,f=(a+s+c+l)/2;return{x:n+Math.cos(d)*f,y:r+Math.sin(d)*f}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:n,circumference:r}=this,i=(n.offset||0)/4,o=(n.spacing||0)/2,a=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=r>Dt?Math.floor(r/Dt):0,r===0||this.innerRadius<0||this.outerRadius<0)return;t.save();const s=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(s)*i,Math.sin(s)*i);const l=1-Math.sin(Math.min(Ft,r||0)),c=i*l;t.fillStyle=n.backgroundColor,t.strokeStyle=n.borderColor,Uae(t,this,c,o,a),Bae(t,this,c,o,a),t.restore()}}Te(Hd,"id","arc"),Te(Hd,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),Te(Hd,"defaultRoutes",{backgroundColor:"backgroundColor"}),Te(Hd,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"});function I5(e,t,n=t){e.lineCap=Ze(n.borderCapStyle,t.borderCapStyle),e.setLineDash(Ze(n.borderDash,t.borderDash)),e.lineDashOffset=Ze(n.borderDashOffset,t.borderDashOffset),e.lineJoin=Ze(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=Ze(n.borderWidth,t.borderWidth),e.strokeStyle=Ze(n.borderColor,t.borderColor)}function zae(e,t,n){e.lineTo(n.x,n.y)}function Vae(e){return e.stepped?fie:e.tension||e.cubicInterpolationMode==="monotone"?hie:zae}function F5(e,t,n={}){const r=e.length,{start:i=0,end:o=r-1}=n,{start:a,end:s}=t,l=Math.max(i,a),c=Math.min(o,s),d=is&&o>s;return{count:r,start:l,loop:t.loop,ilen:c(a+(c?s-E:E))%o,S=()=>{y!==x&&(e.lineTo(d,x),e.lineTo(d,y),e.lineTo(d,_))};for(l&&(m=i[w(0)],e.moveTo(m.x,m.y)),p=0;p<=s;++p){if(m=i[w(p)],m.skip)continue;const E=m.x,O=m.y,k=E|0;k===v?(Ox&&(x=O),d=(f*d+E)/++f):(S(),e.lineTo(E,O),v=k,f=0,y=x=O),_=O}S()}function zx(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?Wae:Hae}function Yae(e){return e.stepped?Wie:e.tension||e.cubicInterpolationMode==="monotone"?Yie:Vs}function Gae(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),I5(e,t.options),e.stroke(i)}function qae(e,t,n,r){const{segments:i,options:o}=t,a=zx(t);for(const s of i)I5(e,o,s.style),e.beginPath(),a(e,t,s,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const Zae=typeof Path2D=="function";function Kae(e,t,n,r){Zae&&!t.options.segment?Gae(e,t,n,r):qae(e,t,n,r)}class Ua extends ha{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;Iie(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=Xie(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,r=t.length;return r&&n[t[r-1].end]}interpolate(t,n){const r=this.options,i=t[n],o=this.points,a=E5(this,{property:n,start:i,end:i});if(!a.length)return;const s=[],l=Yae(r);let c,d;for(c=0,d=a.length;ce!=="borderDash"&&e!=="fill"});function Rj(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 U5(e){return Vx[e%Vx.length]}function B5(e){return Aj[e%Aj.length]}function rse(e,t){return e.borderColor=U5(t),e.backgroundColor=B5(t),++t}function ise(e,t){return e.backgroundColor=e.data.map(()=>U5(t++)),t}function ose(e,t){return e.backgroundColor=e.data.map(()=>B5(t++)),t}function ase(e){let t=0;return(n,r)=>{const i=e.getDatasetMeta(r).controller;i instanceof $a?t=ise(n,t):i instanceof bf?t=ose(n,t):i&&(t=rse(n,t))}}function Dj(e){let t;for(t in e)if(e[t].borderColor||e[t].backgroundColor)return!0;return!1}function sse(e){return e&&(e.borderColor||e.backgroundColor)}var lse={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,t,n){if(!n.enabled)return;const{data:{datasets:r},options:i}=e.config,{elements:o}=i;if(!n.forceOverride&&(Dj(r)||sse(i)||o&&Dj(o)))return;const a=ase(e);r.forEach(a)}};function cse(e,t,n,r,i){const o=i.samples||r;if(o>=n)return e.slice(t,t+n);const a=[],s=(n-2)/(o-2);let l=0;const c=t+n-1;let d=t,f,p,m,v,y;for(a[l++]=e[d],f=0;fm&&(m=v,p=e[w],y=w);a[l++]=p,d=y}return a[l++]=e[c],a}function use(e,t,n,r){let i=0,o=0,a,s,l,c,d,f,p,m,v,y;const x=[],_=t+n-1,w=e[t].x,S=e[_].x-w;for(a=t;ay&&(y=c,p=a),i=(o*i+s.x)/++o;else{const O=a-1;if(!dt(f)&&!dt(p)){const k=Math.min(f,p),j=Math.max(f,p);k!==m&&k!==O&&x.push({...e[k],x:i}),j!==m&&j!==O&&x.push({...e[j],x:i})}a>0&&O!==m&&x.push(e[O]),x.push(s),d=E,o=0,v=y=c,f=p=m=a}}return x}function z5(e){if(e._decimated){const t=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function Ij(e){e.data.datasets.forEach(t=>{z5(t)})}function dse(e,t){const n=t.length;let r=0,i;const{iScale:o}=e,{min:a,max:s,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(r=Mn(Bo(t,o.axis,a).lo,0,n-1)),c?i=Mn(Bo(t,o.axis,s).hi+1,r,n)-r:i=n-r,{start:r,count:i}}var fse={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,t,n)=>{if(!n.enabled){Ij(e);return}const r=e.width;e.data.datasets.forEach((i,o)=>{const{_data:a,indexAxis:s}=i,l=e.getDatasetMeta(o),c=a||i.data;if(zd([s,e.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const d=e.scales[l.xAxisID];if(d.type!=="linear"&&d.type!=="time"||e.options.parsing)return;let{start:f,count:p}=dse(l,c);const m=n.threshold||4*r;if(p<=m){z5(i);return}dt(a)&&(i._data=c,delete i.data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(y){this._data=y}}));let v;switch(n.algorithm){case"lttb":v=cse(c,f,p,r,n);break;case"min-max":v=use(c,f,p,r);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}i._decimated=v})},destroy(e){Ij(e)}};function hse(e,t,n){const r=e.segments,i=e.points,o=t.points,a=[];for(const s of r){let{start:l,end:c}=s;c=JE(l,c,i);const d=Hx(n,i[l],i[c],s.loop);if(!t.segments){a.push({source:s,target:d,start:i[l],end:i[c]});continue}const f=E5(t,d);for(const p of f){const m=Hx(n,o[p.start],o[p.end],p.loop),v=S5(s,i,m);for(const y of v)a.push({source:y,target:p,start:{[n]:Fj(d,m,"start",Math.max)},end:{[n]:Fj(d,m,"end",Math.min)}})}}return a}function Hx(e,t,n,r){if(r)return;let i=t[e],o=n[e];return e==="angle"&&(i=Fr(i),o=Fr(o)),{property:e,start:i,end:o}}function pse(e,t){const{x:n=null,y:r=null}=e||{},i=t.points,o=[];return t.segments.forEach(({start:a,end:s})=>{s=JE(a,s,i);const l=i[a],c=i[s];r!==null?(o.push({x:l.x,y:r}),o.push({x:c.x,y:r})):n!==null&&(o.push({x:n,y:l.y}),o.push({x:n,y:c.y}))}),o}function JE(e,t,n){for(;t>e;t--){const r=n[t];if(!isNaN(r.x)&&!isNaN(r.y))break}return t}function Fj(e,t,n,r){return e&&t?r(e[n],t[n]):e?e[n]:t?t[n]:0}function V5(e,t){let n=[],r=!1;return Nt(e)?(r=!0,n=e):n=pse(e,t),n.length?new Ua({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function $j(e){return e&&e.fill!==!1}function mse(e,t,n){let r=e[t].fill;const i=[t];let o;if(!n)return r;for(;r!==!1&&i.indexOf(r)===-1;){if(!tn(r))return r;if(o=e[r],!o)return!1;if(o.visible)return r;i.push(r),r=o.fill}return!1}function gse(e,t,n){const r=bse(e);if(rt(r))return isNaN(r.value)?!1:r;let i=parseFloat(r);return tn(i)&&Math.floor(i)===i?vse(r[0],t,i,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function vse(e,t,n,r){return(e==="-"||e==="+")&&(n=t+n),n===t||n<0||n>=r?!1:n}function yse(e,t){let n=null;return e==="start"?n=t.bottom:e==="end"?n=t.top:rt(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function _se(e,t,n){let r;return e==="start"?r=n:e==="end"?r=t.options.reverse?t.min:t.max:rt(e)?r=e.value:r=t.getBaseValue(),r}function bse(e){const t=e.options,n=t.fill;let r=Ze(n&&n.target,n);return r===void 0&&(r=!!t.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function wse(e){const{scale:t,index:n,line:r}=e,i=[],o=r.segments,a=r.points,s=xse(t,n);s.push(V5({x:null,y:t.bottom},r));for(let l=0;l=0;--a){const s=i[a].$filler;s&&(s.line.updateControlPoints(o,s.axis),r&&s.fill&&vb(e.ctx,s,o))}},beforeDatasetsDraw(e,t,n){if(n.drawTime!=="beforeDatasetsDraw")return;const r=e.getSortedVisibleDatasetMetas();for(let i=r.length-1;i>=0;--i){const o=r[i].$filler;$j(o)&&vb(e.ctx,o,e.chartArea)}},beforeDatasetDraw(e,t,n){const r=t.meta.$filler;!$j(r)||n.drawTime!=="beforeDatasetDraw"||vb(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Vj=(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)}},Nse=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class Hj extends ha{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=kt(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=bn(r.font),o=i.size,a=this._computeTitleHeight(),{boxWidth:s,itemHeight:l}=Vj(r,o);let c,d;n.font=i.string,this.isHorizontal()?(c=this.maxWidth,d=this._fitRows(a,o,s,l)+10):(d=this.maxHeight,c=this._fitCols(a,i,s,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(d,t.maxHeight||this.maxHeight)}_fitRows(t,n,r,i){const{ctx:o,maxWidth:a,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],d=i+s;let f=t;o.textAlign="left",o.textBaseline="middle";let p=-1,m=-d;return this.legendItems.forEach((v,y)=>{const x=r+n/2+o.measureText(v.text).width;(y===0||c[c.length-1]+x+2*s>a)&&(f+=d,c[c.length-(y>0?0:1)]=0,m+=d,p++),l[y]={left:0,top:m,row:p,width:x,height:i},c[c.length-1]+=x+s}),f}_fitCols(t,n,r,i){const{ctx:o,maxHeight:a,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],d=a-t;let f=s,p=0,m=0,v=0,y=0;return this.legendItems.forEach((x,_)=>{const{itemWidth:w,itemHeight:S}=Rse(r,n,o,x,i);_>0&&m+S+2*s>d&&(f+=p+s,c.push({width:p,height:m}),v+=p+s,y++,p=m=0),l[_]={left:v,top:m,col:y,width:w,height:S},p=Math.max(p,w),m+=S+s}),f+=p,c.push({width:p,height:m}),f}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:i},rtl:o}}=this,a=qc(o,this.left,this.width);if(this.isHorizontal()){let s=0,l=tr(r,this.left+i,this.right-this.lineWidths[s]);for(const c of n)s!==c.row&&(s=c.row,l=tr(r,this.left+i,this.right-this.lineWidths[s])),c.top+=this.top+t+i,c.left=a.leftForLtr(a.x(l),c.width),l+=c.width+i}else{let s=0,l=tr(r,this.top+t+i,this.bottom-this.columnSizes[s].height);for(const c of n)c.col!==s&&(s=c.col,l=tr(r,this.top+t+i,this.bottom-this.columnSizes[s].height)),c.top=l,c.left+=this.left+i,c.left=a.leftForLtr(a.x(c.left),c.width),l+=c.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;d0(t,this),this._draw(),f0(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:i}=this,{align:o,labels:a}=t,s=nn.color,l=qc(t.rtl,this.left,this.width),c=bn(a.font),{padding:d}=a,f=c.size,p=f/2;let m;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=c.string;const{boxWidth:v,boxHeight:y,itemHeight:x}=Vj(a,f),_=function(k,j,A){if(isNaN(v)||v<=0||isNaN(y)||y<0)return;i.save();const U=Ze(A.lineWidth,1);if(i.fillStyle=Ze(A.fillStyle,s),i.lineCap=Ze(A.lineCap,"butt"),i.lineDashOffset=Ze(A.lineDashOffset,0),i.lineJoin=Ze(A.lineJoin,"miter"),i.lineWidth=U,i.strokeStyle=Ze(A.strokeStyle,s),i.setLineDash(Ze(A.lineDash,[])),a.usePointStyle){const R={radius:y*Math.SQRT2/2,pointStyle:A.pointStyle,rotation:A.rotation,borderWidth:U},V=l.xPlus(k,v/2),W=j+p;d5(i,R,V,W,a.pointStyleWidth&&v)}else{const R=j+Math.max((f-y)/2,0),V=l.leftForLtr(k,v),W=ll(A.borderRadius);i.beginPath(),Object.values(W).some(X=>X!==0)?dh(i,{x:V,y:R,w:v,h:y,radius:W}):i.rect(V,R,v,y),i.fill(),U!==0&&i.stroke()}i.restore()},w=function(k,j,A){Sl(i,A.text,k,j+x/2,c,{strikethrough:A.hidden,textAlign:l.textAlign(A.textAlign)})},S=this.isHorizontal(),E=this._computeTitleHeight();S?m={x:tr(o,this.left+d,this.right-r[0]),y:this.top+d+E,line:0}:m={x:this.left+d,y:tr(o,this.top+E+d,this.bottom-n[0].height),line:0},b5(this.ctx,t.textDirection);const O=x+d;this.legendItems.forEach((k,j)=>{i.strokeStyle=k.fontColor,i.fillStyle=k.fontColor;const A=i.measureText(k.text).width,U=l.textAlign(k.textAlign||(k.textAlign=a.textAlign)),R=v+p+A;let V=m.x,W=m.y;l.setWidth(this.width),S?j>0&&V+R+d>this.right&&(W=m.y+=O,m.line++,V=m.x=tr(o,this.left+d,this.right-r[m.line])):j>0&&W+O>this.bottom&&(V=m.x=V+n[m.line].width+d,m.line++,W=m.y=tr(o,this.top+E+d,this.bottom-n[m.line].height));const X=l.x(V);if(_(X,W,k),V=tie(U,V+v+p,S?V+R:this.right,t.rtl),w(l.x(V),W,k),S)m.x+=R+d;else if(typeof k.text!="string"){const G=c.lineHeight;m.y+=W5(k,G)+d}else m.y+=O}),w5(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=bn(n.font),i=sr(n.padding);if(!n.display)return;const o=qc(t.rtl,this.left,this.width),a=this.ctx,s=n.position,l=r.size/2,c=i.top+l;let d,f=this.left,p=this.width;if(this.isHorizontal())p=Math.max(...this.lineWidths),d=this.top+c,f=tr(t.align,f,this.right-p);else{const v=this.columnSizes.reduce((y,x)=>Math.max(y,x.height),0);d=c+tr(t.align,this.top,this.bottom-v-t.labels.padding-this._computeTitleHeight())}const m=tr(s,f,f+p);a.textAlign=o.textAlign(WE(s)),a.textBaseline="middle",a.strokeStyle=n.color,a.fillStyle=n.color,a.font=r.string,Sl(a,n.text,m,d,r)}_computeTitleHeight(){const t=this.options.title,n=bn(t.font),r=sr(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,i,o;if(Uo(t,this.left,this.right)&&Uo(n,this.top,this.bottom)){for(o=this.legendHitBoxes,r=0;ro.length>a.length?o:a)),t+n.size/2+r.measureText(i).width}function Dse(e,t,n){let r=e;return typeof t.text!="string"&&(r=W5(t,n)),r}function W5(e,t){const n=e.text?e.text.length:0;return t*n}function Ise(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var Fse={id:"legend",_element:Hj,start(e,t,n){const r=e.legend=new Hj({ctx:e.ctx,options:n,chart:e});ir.configure(e,r,n),ir.addBox(e,r)},stop(e){ir.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;ir.configure(e,r,n),r.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const r=t.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),t.hidden=!0):(i.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:i,color:o,useBorderRadius:a,borderRadius:s}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(n?0:void 0),d=sr(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(d.width+d.height)/4,strokeStyle:c.borderColor,pointStyle:r||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:a&&(s||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class eT extends ha{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=Nt(r.text)?r.text.length:1;this._padding=sr(r.padding);const o=i*bn(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:r,bottom:i,right:o,options:a}=this,s=a.align;let l=0,c,d,f;return this.isHorizontal()?(d=tr(s,r,o),f=n+t,c=o-r):(a.position==="left"?(d=r+t,f=tr(s,i,n),l=Ft*-.5):(d=o-t,f=tr(s,n,i),l=Ft*.5),c=i-n),{titleX:d,titleY:f,maxWidth:c,rotation:l}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const r=bn(n.font),i=r.lineHeight/2+this._padding.top,{titleX:o,titleY:a,maxWidth:s,rotation:l}=this._drawArgs(i);Sl(t,n.text,0,0,r,{color:n.color,maxWidth:s,rotation:l,textAlign:WE(n.align),textBaseline:"middle",translation:[o,a]})}}function $se(e,t){const n=new eT({ctx:e.ctx,options:t,chart:e});ir.configure(e,n,t),ir.addBox(e,n),e.titleBlock=n}var Use={id:"title",_element:eT,start(e,t,n){$se(e,n)},stop(e){const t=e.titleBlock;ir.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const r=e.titleBlock;ir.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 Tm=new WeakMap;var Bse={id:"subtitle",start(e,t,n){const r=new eT({ctx:e.ctx,options:n,chart:e});ir.configure(e,r,n),ir.addBox(e,r),Tm.set(e,r)},stop(e){ir.removeBox(e,Tm.get(e)),Tm.delete(e)},beforeUpdate(e,t,n){const r=Tm.get(e);ir.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 wf={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 Bse(e,t){const{element:n,datasetIndex:r,index:i}=t,o=e.getDatasetMeta(r).controller,{label:a,value:s}=o.getLabelAndValue(i);return{chart:e,label:a,parsed:o.getParsed(i),raw:e.data.datasets[r].data[i],formattedValue:s,dataset:o.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function Wj(e,t){const n=e.chart.ctx,{body:r,footer:i,title:o}=e,{boxWidth:a,boxHeight:s}=t,l=bn(t.bodyFont),c=bn(t.titleFont),d=bn(t.footerFont),f=o.length,p=i.length,m=r.length,v=sr(t.padding);let y=v.height,x=0,_=r.reduce((E,O)=>E+O.before.length+O.lines.length+O.after.length,0);if(_+=e.beforeBody.length+e.afterBody.length,f&&(y+=f*c.lineHeight+(f-1)*t.titleSpacing+t.titleMarginBottom),_){const E=t.displayColors?Math.max(s,l.lineHeight):l.lineHeight;y+=m*E+(_-m)*l.lineHeight+(_-1)*t.bodySpacing}p&&(y+=t.footerMarginTop+p*d.lineHeight+(p-1)*t.footerSpacing);let w=0;const S=function(E){x=Math.max(x,n.measureText(E).width+w)};return n.save(),n.font=c.string,bt(e.title,S),n.font=l.string,bt(e.beforeBody.concat(e.afterBody),S),w=t.displayColors?a+2+t.boxPadding:0,bt(r,E=>{bt(E.before,S),bt(E.lines,S),bt(E.after,S)}),w=0,n.font=d.string,bt(e.footer,S),n.restore(),x+=v.width,{width:x,height:y}}function zse(e,t){const{y:n,height:r}=t;return ne.height-r/2?"bottom":"center"}function Vse(e,t,n,r){const{x:i,width:o}=r,a=n.caretSize+n.caretPadding;if(e==="left"&&i+o+a>t.width||e==="right"&&i-o-a<0)return!0}function Hse(e,t,n,r){const{x:i,width:o}=n,{width:a,chartArea:{left:s,right:l}}=e;let c="center";return r==="center"?c=i<=(s+l)/2?"left":"right":i<=o/2?c="left":i>=a-o/2&&(c="right"),Vse(c,e,t,n)&&(c="center"),c}function Yj(e,t,n){const r=n.yAlign||t.yAlign||zse(e,n);return{xAlign:n.xAlign||t.xAlign||Hse(e,t,n,r),yAlign:r}}function Wse(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function Yse(e,t,n){let{y:r,height:i}=e;return t==="top"?r+=n:t==="bottom"?r-=i+n:r-=i/2,r}function Gj(e,t,n,r){const{caretSize:i,caretPadding:o,cornerRadius:a}=e,{xAlign:s,yAlign:l}=n,c=i+o,{topLeft:d,topRight:f,bottomLeft:p,bottomRight:m}=ll(a);let v=Wse(t,s);const y=Yse(t,l,c);return l==="center"?s==="left"?v+=c:s==="right"&&(v-=c):s==="left"?v-=Math.max(d,p)+i:s==="right"&&(v+=Math.max(f,m)+i),{x:Mn(v,0,r.width-t.width),y:Mn(y,0,r.height-t.height)}}function Om(e,t,n){const r=sr(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function qj(e){return ro([],Mo(e))}function Gse(e,t,n){return bs(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function Zj(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const Y5={beforeTitle:Lo,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex"u"?Y5[t].call(n,r):i}class Wx extends ha{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 T5(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=Gse(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,i=xr(r,"beforeTitle",this,t),o=xr(r,"title",this,t),a=xr(r,"afterTitle",this,t);let s=[];return s=ro(s,Mo(i)),s=ro(s,Mo(o)),s=ro(s,Mo(a)),s}getBeforeBody(t,n){return qj(xr(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,i=[];return bt(t,o=>{const a={before:[],lines:[],after:[]},s=Zj(r,o);ro(a.before,Mo(xr(s,"beforeLabel",this,o))),ro(a.lines,xr(s,"label",this,o)),ro(a.after,Mo(xr(s,"afterLabel",this,o))),i.push(a)}),i}getAfterBody(t,n){return qj(xr(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,i=xr(r,"beforeFooter",this,t),o=xr(r,"footer",this,t),a=xr(r,"afterFooter",this,t);let s=[];return s=ro(s,Mo(i)),s=ro(s,Mo(o)),s=ro(s,Mo(a)),s}_createItems(t){const n=this._active,r=this.chart.data,i=[],o=[],a=[];let s=[],l,c;for(l=0,c=n.length;lt.filter(d,f,p,r))),t.itemSort&&(s=s.sort((d,f)=>t.itemSort(d,f,r))),bt(s,d=>{const f=Zj(t.callbacks,d);i.push(xr(f,"labelColor",this,d)),o.push(xr(f,"labelPointStyle",this,d)),a.push(xr(f,"labelTextColor",this,d))}),this.labelColors=i,this.labelPointStyles=o,this.labelTextColors=a,this.dataPoints=s,s}update(t,n){const r=this.options.setContext(this.getContext()),i=this._active;let o,a=[];if(!i.length)this.opacity!==0&&(o={opacity:0});else{const s=wf[r.position].call(this,i,this._eventPosition);a=this._createItems(r),this.title=this.getTitle(a,r),this.beforeBody=this.getBeforeBody(a,r),this.body=this.getBody(a,r),this.afterBody=this.getAfterBody(a,r),this.footer=this.getFooter(a,r);const l=this._size=Wj(this,r),c=Object.assign({},s,l),d=Yj(this.chart,r,c),f=Gj(r,c,d,this.chart);this.xAlign=d.xAlign,this.yAlign=d.yAlign,o={opacity:1,x:f.x,y:f.y,width:l.width,height:l.height,caretX:s.x,caretY:s.y}}this._tooltipItems=a,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,i){const o=this.getCaretPosition(t,r,i);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)}getCaretPosition(t,n,r){const{xAlign:i,yAlign:o}=this,{caretSize:a,cornerRadius:s}=r,{topLeft:l,topRight:c,bottomLeft:d,bottomRight:f}=ll(s),{x:p,y:m}=t,{width:v,height:y}=n;let x,_,w,S,E,O;return o==="center"?(E=m+y/2,i==="left"?(x=p,_=x-a,S=E+a,O=E-a):(x=p+v,_=x+a,S=E-a,O=E+a),w=x):(i==="left"?_=p+Math.max(l,d)+a:i==="right"?_=p+v-Math.max(c,f)-a:_=this.caretX,o==="top"?(S=m,E=S-a,x=_-a,w=_+a):(S=m+y,E=S+a,x=_+a,w=_-a),O=S),{x1:x,x2:_,x3:w,y1:S,y2:E,y3:O}}drawTitle(t,n,r){const i=this.title,o=i.length;let a,s,l;if(o){const c=qc(r.rtl,this.x,this.width);for(t.x=Om(this,r.titleAlign,r),n.textAlign=c.textAlign(r.titleAlign),n.textBaseline="middle",a=bn(r.titleFont),s=r.titleSpacing,n.fillStyle=r.titleColor,n.font=a.string,l=0;lw!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,dh(t,{x:y,y:v,w:c,h:l,radius:_}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),dh(t,{x,y:v+1,w:c-2,h:l-2,radius:_}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(y,v,c,l),t.strokeRect(y,v,c,l),t.fillStyle=a.backgroundColor,t.fillRect(x,v+1,c-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:i}=this,{bodySpacing:o,bodyAlign:a,displayColors:s,boxHeight:l,boxWidth:c,boxPadding:d}=r,f=bn(r.bodyFont);let p=f.lineHeight,m=0;const v=qc(r.rtl,this.x,this.width),y=function(A){n.fillText(A,v.x(t.x+m),t.y+p/2),t.y+=p+o},x=v.textAlign(a);let _,w,S,E,O,k,j;for(n.textAlign=a,n.textBaseline="middle",n.font=f.string,t.x=Om(this,x,r),n.fillStyle=r.bodyColor,bt(this.beforeBody,y),m=s&&x!=="right"?a==="center"?c/2+d:c+2+d:0,E=0,k=i.length;E0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,i=r&&r.x,o=r&&r.y;if(i||o){const a=wf[t.position].call(this,this._active,this._eventPosition);if(!a)return;const s=this._size=Wj(this,t),l=Object.assign({},a,this._size),c=Yj(n,t,l),d=Gj(t,l,c,n);(i._to!==d.x||o._to!==d.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=s.width,this.height=s.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,d))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},o={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const a=sr(n.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&s&&(t.save(),t.globalAlpha=r,this.drawBackground(o,t,i,n),b5(t,n.textDirection),o.y+=a.top,this.drawTitle(o,t,n),this.drawBody(o,t,n),this.drawFooter(o,t,n),w5(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,i=t.map(({datasetIndex:s,index:l})=>{const c=this.chart.getDatasetMeta(s);if(!c)throw new Error("Cannot find a dataset at index "+s);return{datasetIndex:s,element:c.data[l],index:l}}),o=!Fv(r,i),a=this._positionChanged(i,n);(o||a)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,o=this._active||[],a=this._getActiveElements(t,o,n,r),s=this._positionChanged(a,t),l=n||!Fv(a,o)||s;return l&&(this._active=a,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,r,i){const o=this.options;if(t.type==="mouseout")return[];if(!i)return n;const a=this.chart.getElementsAtEventForMode(t,o.mode,o,r);return o.reverse&&a.reverse(),a}_positionChanged(t,n){const{caretX:r,caretY:i,options:o}=this,a=wf[o.position].call(this,t,n);return a!==!1&&(r!==a.x||i!==a.y)}}Te(Wx,"positioners",wf);var qse={id:"tooltip",_element:Wx,positioners:wf,afterInit(e,t,n){n&&(e.tooltip=new Wx({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:Y5},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"]},Zse=Object.freeze({__proto__:null,Colors:sse,Decimation:dse,Filler:jse,Legend:Ise,SubTitle:Use,Title:$se,Tooltip:qse});const Kse=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function Qse(e,t,n,r){const i=e.indexOf(t);if(i===-1)return Kse(e,t,n,r);const o=e.lastIndexOf(t);return i!==o?n:i}const Xse=(e,t)=>e===null?null:Mn(Math.round(e),0,t);function G5(e){const t=this.getLabels();return e>=0&&en.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}Te(Yx,"id","category"),Te(Yx,"defaults",{ticks:{callback:G5}});function Jse(e,t){const n=[],{bounds:r,step:i,min:o,max:a,precision:s,count:l,maxTicks:c,maxDigits:d,includeBounds:f}=e,p=i||1,m=c-1,{min:v,max:y}=t,x=!dt(o),_=!dt(a),w=!dt(l),S=(y-v)/(d+1);let E=HL((y-v)/m/p)*p,O,k,j,A;if(E<1e-14&&!x&&!_)return[{value:v},{value:y}];A=Math.ceil(y/E)-Math.floor(v/E),A>m&&(E=HL(A*E/m/p)*p),dt(s)||(O=Math.pow(10,s),E=Math.ceil(E*O)/O),r==="ticks"?(k=Math.floor(v/E)*E,j=Math.ceil(y/E)*E):(k=v,j=y),x&&_&&i&&Gre((a-o)/i,E/1e3)?(A=Math.round(Math.min((a-o)/E,c)),E=(a-o)/A,k=o,j=a):w?(k=x?o:k,j=_?a:j,A=l-1,E=(j-k)/A):(A=(j-k)/E,mf(A,Math.round(A),E/1e3)?A=Math.round(A):A=Math.ceil(A));const U=Math.max(WL(E),WL(k));O=Math.pow(10,dt(s)?U:s),k=Math.round(k*O)/O,j=Math.round(j*O)/O;let R=0;for(x&&(f&&k!==o?(n.push({value:o}),ka)break;n.push({value:V})}return _&&f&&j!==a?n.length&&mf(n[n.length-1].value,a,Kj(a,S,e))?n[n.length-1].value=a:n.push({value:a}):(!_||j===a)&&n.push({value:j}),n}function Kj(e,t,{horizontal:n,minRotation:r}){const i=Ii(r),o=(n?Math.sin(i):Math.cos(i))||.001,a=.75*t*(""+e).length;return Math.min(t/o,a)}class Wv extends Dl{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return dt(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:i,max:o}=this;const a=l=>i=n?i:l,s=l=>o=r?o:l;if(t){const l=vo(i),c=vo(o);l<0&&c<0?s(0):l>0&&c>0&&a(0)}if(i===o){let l=o===0?1:Math.abs(o*.05);s(o+l),t||a(i-l)}this.min=i,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=t,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},o=this._range||this,a=Jse(i,o);return t.bounds==="ticks"&&n5(a,this,"value"),t.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const t=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const i=(r-n)/Math.max(t.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return qh(t,this.chart.options.locale,this.options.ticks.format)}}class Gx extends Wv{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=tn(t)?t:0,this.max=tn(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=Ii(this.options.ticks.minRotation),i=(t?Math.sin(r):Math.cos(r))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,o.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}Te(Gx,"id","linear"),Te(Gx,"defaults",{ticks:{callback:u0.formatters.numeric}});const hh=e=>Math.floor(Fa(e)),Ms=(e,t)=>Math.pow(10,hh(e)+t);function Qj(e){return e/Math.pow(10,hh(e))===1}function Xj(e,t,n){const r=Math.pow(10,n),i=Math.floor(e/r);return Math.ceil(t/r)-i}function ele(e,t){const n=t-e;let r=hh(n);for(;Xj(e,t,r)>10;)r++;for(;Xj(e,t,r)<10;)r--;return Math.min(r,hh(e))}function tle(e,{min:t,max:n}){t=Dr(e.min,t);const r=[],i=hh(t);let o=ele(t,n),a=o<0?Math.pow(10,Math.abs(o)):1;const s=Math.pow(10,o),l=i>o?Math.pow(10,i):0,c=Math.round((t-l)*a)/a,d=Math.floor((t-l)/s/10)*s*10;let f=Math.floor((c-d)/Math.pow(10,o)),p=Dr(e.min,Math.round((l+d+f*Math.pow(10,o))*a)/a);for(;p=10?f=f<15?15:20:f++,f>=20&&(o++,f=2,a=o>=0?1:a),p=Math.round((l+d+f*Math.pow(10,o))*a)/a;const m=Dr(e.max,p);return r.push({value:m,major:Qj(m),significand:f}),r}class qx extends Dl{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){const r=Wv.prototype.parse.apply(this,[t,n]);if(r===0){this._zero=!0;return}return tn(r)&&r>0?r:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=tn(t)?Math.max(0,t):null,this.max=tn(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!tn(this._userMin)&&(this.min=t===Ms(this.min,0)?Ms(this.min,-1):Ms(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let r=this.min,i=this.max;const o=s=>r=t?r:s,a=s=>i=n?i:s;r===i&&(r<=0?(o(1),a(10)):(o(Ms(r,-1)),a(Ms(i,1)))),r<=0&&o(Ms(i,-1)),i<=0&&a(Ms(r,1)),this.min=r,this.max=i}buildTicks(){const t=this.options,n={min:this._userMin,max:this._userMax},r=tle(n,this);return t.bounds==="ticks"&&n5(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":qh(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=Fa(t),this._valueRange=Fa(this.max)-Fa(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Fa(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}Te(qx,"id","logarithmic"),Te(qx,"defaults",{ticks:{callback:u0.formatters.logarithmic,major:{enabled:!0}}});function Zx(e){const t=e.ticks;if(t.display&&e.display){const n=sr(t.backdropPadding);return Ze(t.font&&t.font.size,nn.font.size)+n.height}return 0}function nle(e,t,n){return n=Nt(n)?n:[n],{w:uie(e,t.string,n),h:n.length*t.lineHeight}}function Jj(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 rle(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),r=[],i=[],o=e._pointLabels.length,a=e.options.pointLabels,s=a.centerPointLabels?Ft/o:0;for(let l=0;lt.r&&(s=(r.end-t.r)/o,e.r=Math.max(e.r,t.r+s)),i.startt.b&&(l=(i.end-t.b)/a,e.b=Math.max(e.b,t.b+l))}function ole(e,t,n){const r=e.drawingArea,{extra:i,additionalAngle:o,padding:a,size:s}=n,l=e.getPointPosition(t,r+i+a,o),c=Math.round(VE(Fr(l.angle+cn))),d=ule(l.y,s.h,c),f=lle(c),p=cle(l.x,s.w,f);return{visible:!0,x:l.x,y:d,textAlign:f,left:p,top:d,right:p+s.w,bottom:d+s.h}}function ale(e,t){if(!t)return!0;const{left:n,top:r,right:i,bottom:o}=e;return!(zo({x:n,y:r},t)||zo({x:n,y:o},t)||zo({x:i,y:r},t)||zo({x:i,y:o},t))}function sle(e,t,n){const r=[],i=e._pointLabels.length,o=e.options,{centerPointLabels:a,display:s}=o.pointLabels,l={extra:Zx(o)/2,additionalAngle:a?Ft/i:0};let c;for(let d=0;d270||n<90)&&(e-=t),e}function dle(e,t,n){const{left:r,top:i,right:o,bottom:a}=n,{backdropColor:s}=t;if(!dt(s)){const l=ll(t.borderRadius),c=sr(t.backdropPadding);e.fillStyle=s;const d=r-c.left,f=i-c.top,p=o-r+c.width,m=a-i+c.height;Object.values(l).some(v=>v!==0)?(e.beginPath(),dh(e,{x:d,y:f,w:p,h:m,radius:l}),e.fill()):e.fillRect(d,f,p,m)}}function fle(e,t){const{ctx:n,options:{pointLabels:r}}=e;for(let i=t-1;i>=0;i--){const o=e._pointLabelItems[i];if(!o.visible)continue;const a=r.setContext(e.getPointLabelContext(i));dle(n,a,o);const s=bn(a.font),{x:l,y:c,textAlign:d}=o;Sl(n,e._pointLabels[i],l,c+s.lineHeight/2,s,{color:a.color,textAlign:d,textBaseline:"middle"})}}function q5(e,t,n,r){const{ctx:i}=e;if(n)i.arc(e.xCenter,e.yCenter,t,0,Dt);else{let o=e.getPointPosition(0,t);i.moveTo(o.x,o.y);for(let a=1;a{const i=kt(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?rle(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=Dt/(this._pointLabels.length||1),r=this.options.startAngle||0;return Fr(t*n+Ii(r))}getDistanceFromCenterForValue(t){if(dt(t))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*n:(t-this.min)*n}getValueForDistanceFromCenter(t){if(dt(t))return NaN;const n=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(t){const n=this._pointLabels||[];if(t>=0&&t{if(f!==0){l=this.getDistanceFromCenterForValue(d.value);const p=this.getContext(f),m=i.setContext(p),v=o.setContext(p);hle(this,m,l,a,v)}}),r.display){for(t.save(),s=a-1;s>=0;s--){const d=r.setContext(this.getPointLabelContext(s)),{color:f,lineWidth:p}=d;!p||!f||(t.lineWidth=p,t.strokeStyle=f,t.setLineDash(d.borderDash),t.lineDashOffset=d.borderDashOffset,l=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),c=this.getPointPosition(s,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,n=this.options,r=n.ticks;if(!r.display)return;const i=this.getIndexAngle(0);let o,a;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(i),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((s,l)=>{if(l===0&&!n.reverse)return;const c=r.setContext(this.getContext(l)),d=bn(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=d.string,a=t.measureText(s.label).width,t.fillStyle=c.backdropColor;const f=sr(c.backdropPadding);t.fillRect(-a/2-f.left,-o-d.size/2-f.top,a+f.width,d.size+f.height)}Sl(t,s.label,0,-o,d,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),t.restore()}drawTitle(){}}Te(Wd,"id","radialLinear"),Te(Wd,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:u0.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}}),Te(Wd,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),Te(Wd,"descriptors",{angleLines:{_fallback:"grid"}});const m0={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}},Er=Object.keys(m0);function eM(e,t){return e-t}function tM(e,t){if(dt(t))return null;const n=e._adapter,{parser:r,round:i,isoWeekday:o}=e._parseOpts;let a=t;return typeof r=="function"&&(a=r(a)),tn(a)||(a=typeof r=="string"?n.parse(a,r):n.parse(a)),a===null?null:(i&&(a=i==="week"&&(_u(o)||o===!0)?n.startOf(a,"isoWeek",o):n.startOf(a,i)),+a)}function nM(e,t,n,r){const i=Er.length;for(let o=Er.indexOf(e);o=Er.indexOf(n);o--){const a=Er[o];if(m0[a].common&&e._adapter.diff(i,r,a)>=t-1)return a}return Er[n?Er.indexOf(n):0]}function gle(e){for(let t=Er.indexOf(e)+1,n=Er.length;t=t?n[r]:n[i];e[o]=!0}}function vle(e,t,n,r){const i=e._adapter,o=+i.startOf(t[0].value,r),a=t[t.length-1].value;let s,l;for(s=o;s<=a;s=+i.add(s,1,r))l=n[s],l>=0&&(t[l].major=!0);return t}function iM(e,t,n){const r=[],i={},o=t.length;let a,s;for(a=0;a+t.value))}initOffsets(t=[]){let n=0,r=0,i,o;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?r=o:r=(o-this.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;n=Mn(n,0,a),r=Mn(r,0,a),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,i=this.options,o=i.time,a=o.unit||nM(o.minUnit,n,r,this._getLabelCapacity(n)),s=Ze(i.ticks.stepSize,1),l=a==="week"?o.isoWeekday:!1,c=_u(l)||l===!0,d={};let f=n,p,m;if(c&&(f=+t.startOf(f,"isoWeek",l)),f=+t.startOf(f,c?"day":a),t.diff(r,n,a)>1e5*s)throw new Error(n+" and "+r+" are too far apart with stepSize of "+s+" "+a);const v=i.ticks.source==="data"&&this.getDataTimestamps();for(p=f,m=0;p+y)}getLabelForValue(t){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}format(t,n){const r=this.options.time.displayFormats,i=this._unit,o=n||r[i];return this._adapter.format(t,o)}_tickFormatFunction(t,n,r,i){const o=this.options,a=o.ticks.callback;if(a)return kt(a,[t,n,r],this);const s=o.time.displayFormats,l=this._unit,c=this._majorUnit,d=l&&s[l],f=c&&s[c],p=r[n],m=c&&f&&p&&p.major;return this._adapter.format(t,i||(m?f:d))}generateTickLabels(t){let n,r,i;for(n=0,r=t.length;n0?s:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n=e[r].pos&&t<=e[i].pos&&({lo:r,hi:i}=Bo(e,"pos",t)),{pos:o,time:s}=e[r],{pos:a,time:l}=e[i]):(t>=e[r].time&&t<=e[i].time&&({lo:r,hi:i}=Bo(e,"time",t)),{time:o,pos:s}=e[r],{time:a,pos:l}=e[i]);const c=a-o;return c?s+(l-s)*(t-o)/c:s}class Kx extends ph{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=Cm(n,this.min),this._tableRange=Cm(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,i=[],o=[];let a,s,l,c,d;for(a=0,s=t.length;a=n&&c<=r&&i.push(c);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(a=0,s=i.length;ai-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?t=this.normalize(n.concat(r)):t=n.length?n:r,t=this._cache.all=t,t}getDecimalForValue(t){return(Cm(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return Cm(this._table,r*this._tableRange+this._minPos,!0)}}Te(Kx,"id","timeseries"),Te(Kx,"defaults",ph.defaults);var yle=Object.freeze({__proto__:null,CategoryScale:Yx,LinearScale:Gx,LogarithmicScale:qx,RadialLinearScale:Wd,TimeScale:ph,TimeSeriesScale:Kx});const _le=[Toe,tse,Zse,yle];p0.register(..._le);var Gi,wo=".",Z5="function",K5="string",Q5="__global__",tT="Provider",ble=0,nT=Array.prototype.slice,wle=function(e,t){var n=e[t];if(n===void 0&&Gi.config.strict)throw new Error("Bottle was unable to resolve a service. `"+t+"` is undefined.");return n},g0=function(e){var t;return this.nested[e]||(t=Gi.pop(),this.nested[e]=t,this.factory(e,function(){return t.container})),this.nested[e]},X5=function(e){return e.split(wo).reduce(wle,this)},xle=function(e,t,n,r){var i={configurable:!0,enumerable:!0};return e.length?i.get=function(){var o=0,a=function(s){if(s)throw s;e[o]&&e[o++](n,a)};return a(),n}:(i.value=n,i.writable=!0),Object.defineProperty(r,t,i),r[t]},Sle=function(e,t){var n,r;return typeof e===Z5&&(t=e,e=Q5),n=e.split(wo),r=n.shift(),n.length?g0.call(this,r).middleware(n.join(wo),t):(this.middlewares[r]||(this.middlewares[r]=[]),this.middlewares[r].push(t)),this},Ele=function(e,t){return t(e)},oM=function(e,t){return(e[t]||[]).concat(e.__global__||[])},Tle=function(e,t){var n,r,i,o,a;return this.id,i=this.container,o=this.decorators,a=this.middlewares,n=e+tT,r=Object.create(null),r[n]={configurable:!0,enumerable:!0,get:function(){var s=new t;return delete i[n],i[n]=s,s}},r[e]={configurable:!0,enumerable:!0,get:function(){var s=i[n],l;return s&&(l=oM(o,e).reduce(Ele,s.$get(i)),delete i[n],delete i[e]),l===void 0?l:xle(oM(a,e),e,l,i)}},Object.defineProperties(i,r),this},J5=function(e,t){var n,r;return n=e.split(wo),this.providerMap[e]&&n.length===1&&!this.container[e+tT]?console.error(e+" provider already instantiated."):(this.originalProviders[e]=t,this.providerMap[e]=!0,r=n.shift(),n.length?(g0.call(this,r).provider(n.join(wo),t),this):Tle.call(this,r,t))},rT=function(e,t){return J5.call(this,e,function(){this.$get=t})},e8=function(e,t,n){var r=arguments.length>3?nT.call(arguments,3):[],i=this;return rT.call(this,e,function(){var o=t,a=r.map(X5,i.container);return n?new(t.bind.apply(t,[null].concat(a))):o.apply(null,a)})},Ole=function(e,t){return e8.apply(this,[e,t,!0].concat(nT.call(arguments,2)))},Cle=function(e,t){return e8.apply(this,[e,t,!1].concat(nT.call(arguments,2)))},t8=function(e,t){Object.defineProperty(this,e,{configurable:!0,enumerable:!0,value:t,writable:!0})},n8=function(e,t){var n=e[t];return n||(n={},t8.call(e,t,n)),n},kle=function(e,t){var n;return n=e.split(wo),e=n.pop(),t8.call(n.reduce(n8,this.container),e,t),this},Ple=function(e,t){Object.defineProperty(this,e,{configurable:!1,enumerable:!0,value:t,writable:!1})},Lle=function(e,t){var n=e.split(wo);return e=n.pop(),Ple.call(n.reduce(n8,this.container),e,t),this},r8=function(e,t){var n,r;return typeof e===Z5&&(t=e,e=Q5),n=e.split(wo),r=n.shift(),n.length?g0.call(this,r).decorator(n.join(wo),t):(this.decorators[r]||(this.decorators[r]=[]),this.decorators[r].push(t)),this},jle=function(e){return this.deferred.push(e),this},Mle=function(e){return(e||[]).map(X5,this.container)},Nle=function(e,t){return rT.call(this,e,function(n){return{instance:t.bind(t,n)}})},Rle=function(e){return!/^\$(?:decorator|register|list)$|Provider$/.test(e)},iT=function(e){return Object.keys(e||this.container||{}).filter(Rle)},Yv={},Ale=function(e){var t;return typeof e===K5?(t=Yv[e],t||(Yv[e]=t=new Gi,t.constant("BOTTLE_NAME",e)),t):new Gi},Dle=function(e){typeof e===K5?delete Yv[e]:Yv={}},i8=function(e){var t=e.$value===void 0?e:e.$value;return this[e.$type||"service"].apply(this,[e.$name,t].concat(e.$inject||[]))},aM=function(e){delete this.providerMap[e],delete this.container[e],delete this.container[e+tT]},Ile=function(e){var t=this.originalProviders,n=Array.isArray(e);Object.keys(this.originalProviders).forEach(function(r){if(!(n&&e.indexOf(r)===-1)){var i=r.split(wo);i.length>1&&i.forEach(aM,g0.call(this,i[0])),aM.call(this,r),this.provider(r,t[r])}},this)},Fle=function(e){return this.deferred.forEach(function(t){t(e)}),this};Gi=function e(t){if(!(this instanceof e))return e.pop(t);this.id=ble++,this.decorators={},this.middlewares={},this.nested={},this.providerMap={},this.originalProviders={},this.deferred=[],this.container={$decorator:r8.bind(this),$register:i8.bind(this),$list:iT.bind(this)}};Gi.prototype={constant:Lle,decorator:r8,defer:jle,digest:Mle,factory:rT,instanceFactory:Nle,list:iT,middleware:Sle,provider:J5,resetProviders:Ile,register:i8,resolve:Fle,service:Ole,serviceFactory:Cle,value:kle};Gi.pop=Ale;Gi.clear=Dle;Gi.list=iT;Gi.config={strict:!1};const $le=Gi;var Ule=function(){return!0};const o8=Ule;function jt(e){return e!=null&&typeof e=="object"&&e["@@functional/placeholder"]===!0}function zt(e){return function t(n){return arguments.length===0||jt(n)?t:e.apply(this,arguments)}}function Et(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return jt(n)?t:zt(function(i){return e(n,i)});default:return jt(n)&&jt(r)?t:jt(n)?zt(function(i){return e(i,r)}):jt(r)?zt(function(i){return e(n,i)}):e(n,r)}}}function Kh(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(n){return t.apply(this,arguments)};case 2:return function(n,r){return t.apply(this,arguments)};case 3:return function(n,r,i){return t.apply(this,arguments)};case 4:return function(n,r,i,o){return t.apply(this,arguments)};case 5:return function(n,r,i,o,a){return t.apply(this,arguments)};case 6:return function(n,r,i,o,a,s){return t.apply(this,arguments)};case 7:return function(n,r,i,o,a,s,l){return t.apply(this,arguments)};case 8:return function(n,r,i,o,a,s,l,c){return t.apply(this,arguments)};case 9:return function(n,r,i,o,a,s,l,c,d){return t.apply(this,arguments)};case 10:return function(n,r,i,o,a,s,l,c,d,f){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function v0(e,t,n){return function(){for(var r=[],i=0,o=e,a=0;a=arguments.length)?s=t[a]:(s=arguments[i],i+=1),r[a]=s,jt(s)||(o-=1),a+=1}return o<=0?n.apply(this,r):Kh(o,v0(e,r,n))}}var Ble=Et(function(e,t){return e===1?zt(t):Kh(e,v0(e,[],t))});const a8=Ble;function Il(e){return function t(n,r,i){switch(arguments.length){case 0:return t;case 1:return jt(n)?t:Et(function(o,a){return e(n,o,a)});case 2:return jt(n)&&jt(r)?t:jt(n)?Et(function(o,a){return e(o,r,a)}):jt(r)?Et(function(o,a){return e(n,o,a)}):zt(function(o){return e(n,r,o)});default:return jt(n)&&jt(r)&&jt(i)?t:jt(n)&&jt(r)?Et(function(o,a){return e(o,a,i)}):jt(n)&&jt(i)?Et(function(o,a){return e(o,r,a)}):jt(r)&&jt(i)?Et(function(o,a){return e(n,o,a)}):jt(n)?zt(function(o){return e(o,r,i)}):jt(r)?zt(function(o){return e(n,o,i)}):jt(i)?zt(function(o){return e(n,r,o)}):e(n,r,i)}}}const Qh=Array.isArray||function(e){return e!=null&&e.length>=0&&Object.prototype.toString.call(e)==="[object Array]"};function zle(e){return e!=null&&typeof e["@@transducer/step"]=="function"}function oT(e,t,n){return function(){if(arguments.length===0)return n();var r=Array.prototype.slice.call(arguments,0),i=r.pop();if(!Qh(i)){for(var o=0;oe?t:e});const s8=Vle;function gg(e,t){for(var n=0,r=t.length,i=Array(r);n0?e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1):!1});const l8=Hle;var Wle=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 Yle(e){return new Wle(e)}var Gle=Et(function(e,t){return Kh(e.length,function(){return e.apply(t,arguments)})});const qle=Gle;function Zle(e,t,n){for(var r=0,i=n.length;r=0;)t=dM[n],ui(t,e)&&!tce(r,t)&&(r[r.length]=t),n-=1;return r});const ta=nce;var rce=Et(oT(["fantasy-land/map","map"],Xle,function(e,t){switch(Object.prototype.toString.call(t)){case"[object Function]":return a8(t.length,function(){return e.call(this,t.apply(this,arguments))});case"[object Object]":return _0(function(n,r){return n[r]=e(t[r]),n},{},ta(t));default:return gg(e,t)}}));const u8=rce,Qx=Number.isInteger||function(e){return e<<0===e};var ice=Et(function(e,t){var n=e<0?t.length+e:e;return y0(t)?t.charAt(n):t[n]});const d8=ice;var oce=Et(function(e,t){return e.map(function(n){for(var r=t,i=0,o;i1){var o=!Wu(r)&&ui(i,r)?r[i]:Qx(t[1])?[]:{};n=e(Array.prototype.slice.call(t,1),n,o)}if(Qx(i)&&Qh(r)){var a=[].concat(r);return a[i]=n,a}else return pce(i,n,r)});const sc=gce;function vce(e){var t=Object.prototype.toString.call(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object AsyncGeneratorFunction]"}function yce(e){return function t(n){for(var r,i,o,a=[],s=0,l=n.length;s=0;){if(n[o]===e)return r[o]===t;o-=1}switch(i){case"Map":return e.size!==t.size?!1:mM(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size!==t.size?!1:mM(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var a=ta(e);if(a.length!==ta(t).length)return!1;var s=n.concat([e]),l=r.concat([t]);for(o=a.length-1;o>=0;){var c=a[o];if(!(ui(c,t)&&sT(t[c],e[c],s,l)))return!1;o-=1}return!0}var jce=Et(function(e,t){return sT(e,t,[],[])});const lT=jce;function Mce(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 bb(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 Cd=function(e){return(e<10?"0":"")+e},Rce=typeof Date.prototype.toISOString=="function"?function(e){return e.toISOString()}:function(e){return e.getUTCFullYear()+"-"+Cd(e.getUTCMonth()+1)+"-"+Cd(e.getUTCDate())+"T"+Cd(e.getUTCHours())+":"+Cd(e.getUTCMinutes())+":"+Cd(e.getUTCSeconds())+"."+(e.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};const Ace=Rce;function Dce(e){return function(){return!e.apply(this,arguments)}}function Ice(e,t){for(var n=0,r=t.length,i=[];n":v8(o,a)},r=function(o,a){return gg(function(s){return bb(s)+": "+n(o[s])},a.slice().sort())};switch(Object.prototype.toString.call(e)){case"[object Arguments]":return"(function() { return arguments; }("+gg(n,e).join(", ")+"))";case"[object Array]":return"["+gg(n,e).concat(r(e,cT(function(o){return/^\d+$/.test(o)},ta(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):bb(Ace(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())+")":bb(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,ta(e)).join(", ")+"}"}}var Vce=zt(function(e){return v8(e,[])});const Hce=Vce;var Wce=zt(function(e){var t=f8(s8,0,u8(function(n){return n[0].length},e));return Kh(t,function(){for(var n=0;no?1:0})});const wue=bue;var xue=Et(function(e,t){if(e<=0)throw new Error("First argument to splitEvery must be a positive integer");for(var n=[],r=0;r{const[i,,o,a]=Sn(),{domains:s}=n,l=!t,c=I.useCallback(()=>{r(""),a()},[r,a]),d=I.useCallback(()=>{r(""),o()},[r,o]);return I.useEffect(()=>{e()},[e]),i?g.jsxs(o0,{children:[g.jsx(bl,{value:t??"",placeholder:"Domain",onChange:f=>r(f.target.value)}),g.jsx(yt,{id:"backToDropdown",outline:!0,type:"button",className:"domains-dropdown__back-btn","aria-label":"Back to domains list",onClick:c,children:g.jsx(Ne,{icon:QW})}),g.jsx(Rr,{target:"backToDropdown",placement:"left",trigger:"hover",children:"Existing domains"})]}):g.jsxs(fa,{text:l?"Domain":`Domain: ${t}`,className:l?"domains-dropdown__toggle-btn":"domains-dropdown__toggle-btn--active",children:[s.map(({domain:f,isDefault:p})=>g.jsxs(Ue,{active:(t===f||p)&&l,onClick:()=>r(f),children:[f,p&&g.jsx("span",{className:"float-end text-muted",children:"default"})]},f)),g.jsx(Ue,{divider:!0}),g.jsx(Ue,{onClick:d,children:g.jsx("i",{children:"New domain"})})]})},kue=e=>(e==null?void 0:e.type)===IE.INVALID_ARGUMENT||(e==null?void 0:e.type)===FE.INVALID_ARGUMENT,Pue=e=>(e==null?void 0:e.type)==="INVALID_SHORTCODE_DELETION"||(e==null?void 0:e.type)===IE.INVALID_SHORT_URL_DELETION||(e==null?void 0:e.type)===FE.INVALID_SHORT_URL_DELETION,Lue=e=>!!e&&typeof e=="object"&&["type","detail","title","status"].every(t=>t in e),pa=e=>Lue(e)?e:void 0,na=({errorData:e,fallbackMessage:t})=>g.jsxs(g.Fragment,{children:[(e==null?void 0:e.detail)??t,kue(e)&&g.jsxs("p",{className:"mb-0",children:["Invalid elements: [",e.invalidElements.join(", "),"]"]})]}),jue=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,yM=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(jue);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},_M=e=>e==="*"||e==="x"||e==="X",bM=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},Mue=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],Nue=(e,t)=>{if(_M(e)||_M(t))return 0;const[n,r]=Mue(bM(e),bM(t));return n>r?1:n{for(let n=0;n{const n=yM(e),r=yM(t),i=n.pop(),o=r.pop(),a=wM(n,r);return a!==0?a:i&&o?wM(i.split("."),o.split(".")):i||o?i?-1:1:0},xM=(e,t,n)=>{Aue(n);const r=Rue(e,t);return S8[n].includes(r)},S8={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},SM=Object.keys(S8),Aue=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(SM.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${SM.join("|")}`)},Due=(e,{maxVersion:t,minVersion:n})=>{const r=!n||xM(e,n,">=");return(!t||xM(e,t,"<="))&&r},E8={domainVisits:"3.1.0",excludeBotsOnShortUrls:"3.4.0",filterDisabledUrls:"3.4.0",deviceLongUrls:"3.5.0"};Object.freeze(E8);const Pm=(e,t)=>t==="latest"||Due(t,{minVersion:E8[e]}),T8=e=>({domainVisits:Pm("domainVisits",e),excludeBotsOnShortUrls:Pm("excludeBotsOnShortUrls",e),filterDisabledUrls:Pm("filterDisabledUrls",e),deviceLongUrls:Pm("deviceLongUrls",e)}),Iue=e=>I.useMemo(()=>T8(e),[e]),O8=I.createContext(T8("0.0.0")),Fue=O8.Provider,Xh=e=>I.useContext(O8)[e],C8=I.createContext(""),$ue=C8.Provider,Fl=()=>I.useContext(C8),xf=(e,t,n)=>Wu(n)?e.shortCode===t&&!e.domain:e.shortCode===t&&e.domain===n,Uue=(e,t)=>!e.domain&&t===iF?!0:e.domain===t,Bue=(e,t)=>{const n=(t==null?void 0:t.validateUrls)??!1;return e?{longUrl:e.longUrl,tags:e.tags,title:e.title??void 0,domain:e.domain??void 0,validSince:e.meta.validSince??void 0,validUntil:e.meta.validUntil??void 0,maxVisits:e.meta.maxVisits??void 0,crawlable:e.crawlable,forwardQuery:e.forwardQuery,deviceLongUrls:e.deviceLongUrls&&{android:e.deviceLongUrls.android??void 0,ios:e.deviceLongUrls.ios??void 0,desktop:e.deviceLongUrls.desktop??void 0},validateUrl:n}:{longUrl:"",validateUrl:n}},k8="__",zue=e=>e.replaceAll("/",k8),vg=e=>e.replaceAll(k8,"/");function Zr(e){"@babel/helpers - typeof";return Zr=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},Zr(e)}function Ye(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function Oe(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function Pe(e){Oe(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||Zr(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){Oe(2,arguments);var n=Pe(e),r=Ye(t);return isNaN(r)?new Date(NaN):(r&&n.setDate(n.getDate()+r),n)}function bi(e,t){Oe(2,arguments);var n=Pe(e),r=Ye(t);if(isNaN(r))return new Date(NaN);if(!r)return n;var i=n.getDate(),o=new Date(n.getTime());o.setMonth(n.getMonth()+r+1,0);var a=o.getDate();return i>=a?o:(n.setFullYear(o.getFullYear(),o.getMonth(),i),n)}function Vue(e,t){if(Oe(2,arguments),!t||Zr(t)!=="object")return new Date(NaN);var n=t.years?Ye(t.years):0,r=t.months?Ye(t.months):0,i=t.weeks?Ye(t.weeks):0,o=t.days?Ye(t.days):0,a=t.hours?Ye(t.hours):0,s=t.minutes?Ye(t.minutes):0,l=t.seconds?Ye(t.seconds):0,c=Pe(e),d=r||n?bi(c,r+n*12):c,f=o||i?$l(d,o+i*7):d,p=s+a*60,m=l+p*60,v=m*1e3,y=new Date(f.getTime()+v);return y}function fT(e,t){Oe(2,arguments);var n=Pe(e).getTime(),r=Ye(t);return new Date(n+r)}var Hue=36e5;function Wue(e,t){Oe(2,arguments);var n=Ye(t);return fT(e,n*Hue)}var Yue={};function ma(){return Yue}function P8(e,t){var n,r,i,o,a,s,l,c;Oe(1,arguments);var d=ma(),f=Ye((n=(r=(i=(o=t==null?void 0:t.weekStartsOn)!==null&&o!==void 0?o:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:d.weekStartsOn)!==null&&r!==void 0?r:(l=d.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Pe(e),m=p.getDay(),v=(m=i.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function que(e){Oe(1,arguments);var t=Gue(e),n=new Date(0);n.setFullYear(t,0,4),n.setHours(0,0,0,0);var r=vh(n);return r}function xu(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 Hr(e){Oe(1,arguments);var t=Pe(e);return t.setHours(0,0,0,0),t}var Zue=864e5;function yh(e,t){Oe(2,arguments);var n=Hr(e),r=Hr(t),i=n.getTime()-xu(n),o=r.getTime()-xu(r);return Math.round((i-o)/Zue)}var Kue=6e4;function Jx(e,t){Oe(2,arguments);var n=Ye(t);return fT(e,n*Kue)}function L8(e,t){Oe(2,arguments);var n=Ye(t),r=n*3;return bi(e,r)}function hT(e,t){Oe(2,arguments);var n=Ye(t),r=n*7;return $l(e,r)}function Su(e,t){Oe(2,arguments);var n=Ye(t);return bi(e,n*12)}function EM(e){Oe(1,arguments);var t;if(e&&typeof e.forEach=="function")t=e;else if(Zr(e)==="object"&&e!==null)t=Array.prototype.slice.call(e);else return new Date(NaN);var n;return t.forEach(function(r){var i=Pe(r);(n===void 0||ni||isNaN(i.getDate()))&&(n=i)}),n||new Date(NaN)}function yg(e,t){Oe(2,arguments);var n=Pe(e),r=Pe(t),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}var pT=6e4,b0=36e5,Que=1e3;function Xue(e,t){Oe(2,arguments);var n=Hr(e),r=Hr(t);return n.getTime()===r.getTime()}function w0(e){return Oe(1,arguments),e instanceof Date||Zr(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function _h(e){if(Oe(1,arguments),!w0(e)&&typeof e!="number")return!1;var t=Pe(e);return!isNaN(Number(t))}function bh(e,t){Oe(2,arguments);var n=Pe(e),r=Pe(t),i=n.getFullYear()-r.getFullYear(),o=n.getMonth()-r.getMonth();return i*12+o}function Nc(e){Oe(1,arguments);var t=Pe(e),n=Math.floor(t.getMonth()/3)+1;return n}function Zv(e,t){Oe(2,arguments);var n=Pe(e),r=Pe(t);return n.getFullYear()-r.getFullYear()}function OM(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 mT(e,t){Oe(2,arguments);var n=Pe(e),r=Pe(t),i=OM(n,r),o=Math.abs(yh(n,r));n.setDate(n.getDate()-i*o);var a=+(OM(n,r)===-i),s=i*(o-a);return s===0?0:s}function j8(e,t){return Oe(2,arguments),Pe(e).getTime()-Pe(t).getTime()}var CM={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}},Jue="trunc";function gT(e){return e?CM[e]:CM[Jue]}function ede(e,t,n){Oe(2,arguments);var r=j8(e,t)/b0;return gT(n==null?void 0:n.roundingMethod)(r)}function El(e){Oe(1,arguments);var t=Pe(e);return t.setHours(23,59,59,999),t}function M8(e){Oe(1,arguments);var t=Pe(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function tde(e){Oe(1,arguments);var t=Pe(e);return El(t).getTime()===M8(t).getTime()}function Kv(e,t){Oe(2,arguments);var n=Pe(e),r=Pe(t),i=yg(n,r),o=Math.abs(bh(n,r)),a;if(o<1)a=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-i*o);var s=yg(n,r)===-i;tde(Pe(e))&&o===1&&yg(e,r)===1&&(s=!1),a=i*(o-Number(s))}return a===0?0:a}function nde(e,t,n){Oe(2,arguments);var r=j8(e,t)/1e3;return gT(n==null?void 0:n.roundingMethod)(r)}function rde(e,t,n){Oe(2,arguments);var r=mT(e,t)/7;return gT(n==null?void 0:n.roundingMethod)(r)}function e2(e){Oe(1,arguments);var t=Pe(e),n=t.getMonth(),r=n-n%3;return t.setMonth(r,1),t.setHours(0,0,0,0),t}function N8(e){Oe(1,arguments);var t=Pe(e);return t.setDate(1),t.setHours(0,0,0,0),t}function ide(e){Oe(1,arguments);var t=Pe(e),n=t.getFullYear();return t.setFullYear(n+1,0,0),t.setHours(23,59,59,999),t}function R8(e){Oe(1,arguments);var t=Pe(e),n=new Date(0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function ode(e,t){var n,r,i,o,a,s,l,c;Oe(1,arguments);var d=ma(),f=Ye((n=(r=(i=(o=t==null?void 0:t.weekStartsOn)!==null&&o!==void 0?o:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:d.weekStartsOn)!==null&&r!==void 0?r:(l=d.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Pe(e),m=p.getDay(),v=(m=i.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function cde(e){Oe(1,arguments);var t=D8(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var r=Eu(n);return r}var ude=6048e5;function I8(e){Oe(1,arguments);var t=Pe(e),n=Eu(t).getTime()-cde(t).getTime();return Math.round(n/ude)+1}function Tl(e,t){var n,r,i,o,a,s,l,c;Oe(1,arguments);var d=ma(),f=Ye((n=(r=(i=(o=t==null?void 0:t.weekStartsOn)!==null&&o!==void 0?o:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:d.weekStartsOn)!==null&&r!==void 0?r:(l=d.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Pe(e),m=p.getUTCDay(),v=(m=1&&m<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var v=new Date(0);v.setUTCFullYear(f+1,0,m),v.setUTCHours(0,0,0,0);var y=Tl(v,t),x=new Date(0);x.setUTCFullYear(f,0,m),x.setUTCHours(0,0,0,0);var _=Tl(x,t);return d.getTime()>=y.getTime()?f+1:d.getTime()>=_.getTime()?f:f-1}function dde(e,t){var n,r,i,o,a,s,l,c;Oe(1,arguments);var d=ma(),f=Ye((n=(r=(i=(o=t==null?void 0:t.firstWeekContainsDate)!==null&&o!==void 0?o:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&i!==void 0?i:d.firstWeekContainsDate)!==null&&r!==void 0?r:(l=d.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&n!==void 0?n:1),p=vT(e,t),m=new Date(0);m.setUTCFullYear(p,0,f),m.setUTCHours(0,0,0,0);var v=Tl(m,t);return v}var fde=6048e5;function F8(e,t){Oe(1,arguments);var n=Pe(e),r=Tl(n,t).getTime()-dde(n,t).getTime();return Math.round(r/fde)+1}function nt(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length0?n:1-n;return nt(t==="yy"?r%100:r,t.length)},M:function(e,t){var n=e.getUTCMonth();return t==="M"?String(n+1):nt(n+1,2)},d:function(e,t){return nt(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(e,t){return nt(e.getUTCHours()%12||12,t.length)},H:function(e,t){return nt(e.getUTCHours(),t.length)},m:function(e,t){return nt(e.getUTCMinutes(),t.length)},s:function(e,t){return nt(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,r=e.getUTCMilliseconds(),i=Math.floor(r*Math.pow(10,n-3));return nt(i,t.length)}};const xa=hde;var lc={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},pde={G:function(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){var r=e.getUTCFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return xa.y(e,t)},Y:function(e,t,n,r){var i=vT(e,r),o=i>0?i:1-i;if(t==="YY"){var a=o%100;return nt(a,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):nt(o,t.length)},R:function(e,t){var n=D8(e);return nt(n,t.length)},u:function(e,t){var n=e.getUTCFullYear();return nt(n,t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return nt(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return nt(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return xa.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return nt(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){var i=F8(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):nt(i,t.length)},I:function(e,t,n){var r=I8(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):nt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):xa.d(e,t)},D:function(e,t,n){var r=lde(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):nt(r,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var i=e.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return nt(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var i=e.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return nt(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return nt(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=e.getUTCHours(),i=r/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){var r=e.getUTCHours(),i;switch(r===12?i=lc.noon:r===0?i=lc.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r=e.getUTCHours(),i;switch(r>=17?i=lc.evening:r>=12?i=lc.afternoon:r>=4?i=lc.morning:i=lc.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){var r=e.getUTCHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return xa.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):xa.H(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):nt(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):nt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):xa.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):xa.s(e,t)},S:function(e,t){return xa.S(e,t)},X:function(e,t,n,r){var i=r._originalDate||e,o=i.getTimezoneOffset();if(o===0)return"Z";switch(t){case"X":return PM(o);case"XXXX":case"XX":return Hs(o);case"XXXXX":case"XXX":default:return Hs(o,":")}},x:function(e,t,n,r){var i=r._originalDate||e,o=i.getTimezoneOffset();switch(t){case"x":return PM(o);case"xxxx":case"xx":return Hs(o);case"xxxxx":case"xxx":default:return Hs(o,":")}},O:function(e,t,n,r){var i=r._originalDate||e,o=i.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+kM(o,":");case"OOOO":default:return"GMT"+Hs(o,":")}},z:function(e,t,n,r){var i=r._originalDate||e,o=i.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+kM(o,":");case"zzzz":default:return"GMT"+Hs(o,":")}},t:function(e,t,n,r){var i=r._originalDate||e,o=Math.floor(i.getTime()/1e3);return nt(o,t.length)},T:function(e,t,n,r){var i=r._originalDate||e,o=i.getTime();return nt(o,t.length)}};function kM(e,t){var n=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),o=r%60;if(o===0)return n+String(i);var a=t||"";return n+String(i)+a+nt(o,2)}function PM(e,t){if(e%60===0){var n=e>0?"-":"+";return n+nt(Math.abs(e)/60,2)}return Hs(e,t)}function Hs(e,t){var n=t||"",r=e>0?"-":"+",i=Math.abs(e),o=nt(Math.floor(i/60),2),a=nt(i%60,2);return r+o+n+a}const mde=pde;var LM=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},$8=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},gde=function(e,t){var n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return LM(e,t);var o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",LM(r,t)).replace("{{time}}",$8(i,t))},vde={p:$8,P:gde};const t2=vde;var yde=["D","DD"],_de=["YY","YYYY"];function U8(e){return yde.indexOf(e)!==-1}function B8(e){return _de.indexOf(e)!==-1}function Qv(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 bde={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"}},wde=function(e,t,n){var r,i=bde[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};const xde=wde;function wb(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 Sde={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Ede={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Tde={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Ode={date:wb({formats:Sde,defaultWidth:"full"}),time:wb({formats:Ede,defaultWidth:"full"}),dateTime:wb({formats:Tde,defaultWidth:"full"})};const Cde=Ode;var kde={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Pde=function(e,t,n,r){return kde[e]};const Lde=Pde;function kd(e){return function(t,n){var r=n!=null&&n.context?String(n.context):"standalone",i;if(r==="formatting"&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):o;i=e.formattingValues[a]||e.formattingValues[o]}else{var s=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[l]||e.values[s]}var c=e.argumentCallback?e.argumentCallback(t):t;return i[c]}}var jde={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Mde={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Nde={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"]},Rde={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"]},Ade={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"}},Dde={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"}},Ide=function(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Fde={ordinalNumber:Ide,era:kd({values:jde,defaultWidth:"wide"}),quarter:kd({values:Mde,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:kd({values:Nde,defaultWidth:"wide"}),day:kd({values:Rde,defaultWidth:"wide"}),dayPeriod:kd({values:Ade,defaultWidth:"wide",formattingValues:Dde,defaultFormattingWidth:"wide"})};const $de=Fde;function Pd(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;var a=o[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?Bde(s,function(f){return f.test(a)}):Ude(s,function(f){return f.test(a)}),c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;var d=t.slice(a.length);return{value:c,rest:d}}}function Ude(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function Bde(e,t){for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:{},r=t.match(e.matchPattern);if(!r)return null;var i=r[0],o=t.match(e.parsePattern);if(!o)return null;var a=e.valueCallback?e.valueCallback(o[0]):o[0];a=n.valueCallback?n.valueCallback(a):a;var s=t.slice(i.length);return{value:a,rest:s}}}var Vde=/^(\d+)(th|st|nd|rd)?/i,Hde=/\d+/i,Wde={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},Yde={any:[/^b/i,/^(a|c)/i]},Gde={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},qde={any:[/1/i,/2/i,/3/i,/4/i]},Zde={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},Kde={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]},Qde={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},Xde={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]},Jde={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},efe={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}},tfe={ordinalNumber:zde({matchPattern:Vde,parsePattern:Hde,valueCallback:function(e){return parseInt(e,10)}}),era:Pd({matchPatterns:Wde,defaultMatchWidth:"wide",parsePatterns:Yde,defaultParseWidth:"any"}),quarter:Pd({matchPatterns:Gde,defaultMatchWidth:"wide",parsePatterns:qde,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Pd({matchPatterns:Zde,defaultMatchWidth:"wide",parsePatterns:Kde,defaultParseWidth:"any"}),day:Pd({matchPatterns:Qde,defaultMatchWidth:"wide",parsePatterns:Xde,defaultParseWidth:"any"}),dayPeriod:Pd({matchPatterns:Jde,defaultMatchWidth:"any",parsePatterns:efe,defaultParseWidth:"any"})};const nfe=tfe;var rfe={code:"en-US",formatDistance:xde,formatLong:Cde,formatRelative:Lde,localize:$de,match:nfe,options:{weekStartsOn:0,firstWeekContainsDate:1}};const yT=rfe;var ife=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ofe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,afe=/^'([^]*?)'?$/,sfe=/''/g,lfe=/[a-zA-Z]/;function Tu(e,t,n){var r,i,o,a,s,l,c,d,f,p,m,v,y,x,_,w,S,E;Oe(2,arguments);var O=String(t),k=ma(),j=(r=(i=n==null?void 0:n.locale)!==null&&i!==void 0?i:k.locale)!==null&&r!==void 0?r:yT,A=Ye((o=(a=(s=(l=n==null?void 0:n.firstWeekContainsDate)!==null&&l!==void 0?l:n==null||(c=n.locale)===null||c===void 0||(d=c.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&s!==void 0?s:k.firstWeekContainsDate)!==null&&a!==void 0?a:(f=k.locale)===null||f===void 0||(p=f.options)===null||p===void 0?void 0:p.firstWeekContainsDate)!==null&&o!==void 0?o:1);if(!(A>=1&&A<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var U=Ye((m=(v=(y=(x=n==null?void 0:n.weekStartsOn)!==null&&x!==void 0?x:n==null||(_=n.locale)===null||_===void 0||(w=_.options)===null||w===void 0?void 0:w.weekStartsOn)!==null&&y!==void 0?y:k.weekStartsOn)!==null&&v!==void 0?v:(S=k.locale)===null||S===void 0||(E=S.options)===null||E===void 0?void 0:E.weekStartsOn)!==null&&m!==void 0?m:0);if(!(U>=0&&U<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!j.localize)throw new RangeError("locale must contain localize property");if(!j.formatLong)throw new RangeError("locale must contain formatLong property");var R=Pe(e);if(!_h(R))throw new RangeError("Invalid time value");var V=xu(R),W=A8(R,V),X={firstWeekContainsDate:A,weekStartsOn:U,locale:j,_originalDate:R},G=O.match(ofe).map(function(Z){var ne=Z[0];if(ne==="p"||ne==="P"){var le=t2[ne];return le(Z,j.formatLong)}return Z}).join("").match(ife).map(function(Z){if(Z==="''")return"'";var ne=Z[0];if(ne==="'")return cfe(Z);var le=mde[ne];if(le)return!(n!=null&&n.useAdditionalWeekYearTokens)&&B8(Z)&&Qv(Z,t,String(e)),!(n!=null&&n.useAdditionalDayOfYearTokens)&&U8(Z)&&Qv(Z,t,String(e)),le(W,Z,j.localize,X);if(ne.match(lfe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+ne+"`");return Z}).join("");return G}function cfe(e){var t=e.match(afe);return t?t[1].replace(sfe,"'"):e}function _T(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 ufe(e){return _T({},e)}var jM=1440,dfe=2520,xb=43200,ffe=86400;function hfe(e,t,n){var r,i;Oe(2,arguments);var o=ma(),a=(r=(i=n==null?void 0:n.locale)!==null&&i!==void 0?i:o.locale)!==null&&r!==void 0?r:yT;if(!a.formatDistance)throw new RangeError("locale must contain formatDistance property");var s=yg(e,t);if(isNaN(s))throw new RangeError("Invalid time value");var l=_T(ufe(n),{addSuffix:!!(n!=null&&n.addSuffix),comparison:s}),c,d;s>0?(c=Pe(t),d=Pe(e)):(c=Pe(e),d=Pe(t));var f=nde(d,c),p=(xu(d)-xu(c))/1e3,m=Math.round((f-p)/60),v;if(m<2)return n!=null&&n.includeSeconds?f<5?a.formatDistance("lessThanXSeconds",5,l):f<10?a.formatDistance("lessThanXSeconds",10,l):f<20?a.formatDistance("lessThanXSeconds",20,l):f<40?a.formatDistance("halfAMinute",0,l):f<60?a.formatDistance("lessThanXMinutes",1,l):a.formatDistance("xMinutes",1,l):m===0?a.formatDistance("lessThanXMinutes",1,l):a.formatDistance("xMinutes",m,l);if(m<45)return a.formatDistance("xMinutes",m,l);if(m<90)return a.formatDistance("aboutXHours",1,l);if(mr.getTime()}function Ui(e,t){Oe(2,arguments);var n=Pe(e),r=Pe(t);return n.getTime()e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,s;return{s:function(){n=n.call(e)},n:function(){var l=n.next();return o=l.done,l},e:function(l){a=!0,s=l},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(a)throw s}}}}function Fe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function n2(e,t){return n2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},n2(e,t)}function ft(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&n2(e,t)}function Jv(e){return Jv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Jv(e)}function wfe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function xfe(e,t){if(t&&(Zr(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Fe(e)}function ht(e){var t=wfe();return function(){var n=Jv(e),r;if(t){var i=Jv(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return xfe(this,r)}}function st(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Sfe(e,t){if(Zr(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Zr(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function V8(e){var t=Sfe(e,"string");return Zr(t)==="symbol"?t:String(t)}function AM(e,t){for(var n=0;n0,r=n?t:1-t,i;if(r<=50)i=e||100;else{var o=r+50,a=Math.floor(o/100)*100,s=e>=o%100;i=e+a-(s?100:0)}return n?i:1-i}function q8(e){return e%400===0||e%4===0&&e%100!==0}var kfe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a0}},{key:"set",value:function(r,i,o){var a=r.getUTCFullYear();if(o.isTwoDigitYear){var s=G8(o.year,a);return r.setUTCFullYear(s,0,1),r.setUTCHours(0,0,0,0),r}var l=!("era"in i)||i.era===1?o.year:1-o.year;return r.setUTCFullYear(l,0,1),r.setUTCHours(0,0,0,0),r}}]),n}(gt),Pfe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a0}},{key:"set",value:function(r,i,o,a){var s=vT(r,a);if(o.isTwoDigitYear){var l=G8(o.year,s);return r.setUTCFullYear(l,0,a.firstWeekContainsDate),r.setUTCHours(0,0,0,0),Tl(r,a)}var c=!("era"in i)||i.era===1?o.year:1-o.year;return r.setUTCFullYear(c,0,a.firstWeekContainsDate),r.setUTCHours(0,0,0,0),Tl(r,a)}}]),n}(gt),Lfe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=1&&i<=4}},{key:"set",value:function(r,i,o){return r.setUTCMonth((o-1)*3,1),r.setUTCHours(0,0,0,0),r}}]),n}(gt),Nfe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=1&&i<=4}},{key:"set",value:function(r,i,o){return r.setUTCMonth((o-1)*3,1),r.setUTCHours(0,0,0,0),r}}]),n}(gt),Rfe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=0&&i<=11}},{key:"set",value:function(r,i,o){return r.setUTCMonth(o,1),r.setUTCHours(0,0,0,0),r}}]),n}(gt),Afe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=0&&i<=11}},{key:"set",value:function(r,i,o){return r.setUTCMonth(o,1),r.setUTCHours(0,0,0,0),r}}]),n}(gt);function Dfe(e,t,n){Oe(2,arguments);var r=Pe(e),i=Ye(t),o=F8(r,n)-i;return r.setUTCDate(r.getUTCDate()-o*7),r}var Ife=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=1&&i<=53}},{key:"set",value:function(r,i,o,a){return Tl(Dfe(r,o,a),a)}}]),n}(gt);function Ffe(e,t){Oe(2,arguments);var n=Pe(e),r=Ye(t),i=I8(n)-r;return n.setUTCDate(n.getUTCDate()-i*7),n}var $fe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=1&&i<=53}},{key:"set",value:function(r,i,o){return Eu(Ffe(r,o))}}]),n}(gt),Ufe=[31,28,31,30,31,30,31,31,30,31,30,31],Bfe=[31,29,31,30,31,30,31,31,30,31,30,31],zfe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=1&&i<=Bfe[s]:i>=1&&i<=Ufe[s]}},{key:"set",value:function(r,i,o){return r.setUTCDate(o),r.setUTCHours(0,0,0,0),r}}]),n}(gt),Vfe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=1&&i<=366:i>=1&&i<=365}},{key:"set",value:function(r,i,o){return r.setUTCMonth(0,o),r.setUTCHours(0,0,0,0),r}}]),n}(gt);function wT(e,t,n){var r,i,o,a,s,l,c,d;Oe(2,arguments);var f=ma(),p=Ye((r=(i=(o=(a=n==null?void 0:n.weekStartsOn)!==null&&a!==void 0?a:n==null||(s=n.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&o!==void 0?o:f.weekStartsOn)!==null&&i!==void 0?i:(c=f.locale)===null||c===void 0||(d=c.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&r!==void 0?r:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=Pe(e),v=Ye(t),y=m.getUTCDay(),x=v%7,_=(x+7)%7,w=(_=0&&i<=6}},{key:"set",value:function(r,i,o,a){return r=wT(r,o,a),r.setUTCHours(0,0,0,0),r}}]),n}(gt),Wfe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=0&&i<=6}},{key:"set",value:function(r,i,o,a){return r=wT(r,o,a),r.setUTCHours(0,0,0,0),r}}]),n}(gt),Yfe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=0&&i<=6}},{key:"set",value:function(r,i,o,a){return r=wT(r,o,a),r.setUTCHours(0,0,0,0),r}}]),n}(gt);function Gfe(e,t){Oe(2,arguments);var n=Ye(t);n%7===0&&(n=n-7);var r=1,i=Pe(e),o=i.getUTCDay(),a=n%7,s=(a+7)%7,l=(s=1&&i<=7}},{key:"set",value:function(r,i,o){return r=Gfe(r,o),r.setUTCHours(0,0,0,0),r}}]),n}(gt),Zfe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=1&&i<=12}},{key:"set",value:function(r,i,o){var a=r.getUTCHours()>=12;return a&&o<12?r.setUTCHours(o+12,0,0,0):!a&&o===12?r.setUTCHours(0,0,0,0):r.setUTCHours(o,0,0,0),r}}]),n}(gt),Jfe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=0&&i<=23}},{key:"set",value:function(r,i,o){return r.setUTCHours(o,0,0,0),r}}]),n}(gt),ehe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=0&&i<=11}},{key:"set",value:function(r,i,o){var a=r.getUTCHours()>=12;return a&&o<12?r.setUTCHours(o+12,0,0,0):r.setUTCHours(o,0,0,0),r}}]),n}(gt),the=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=1&&i<=24}},{key:"set",value:function(r,i,o){var a=o<=24?o%24:o;return r.setUTCHours(a,0,0,0),r}}]),n}(gt),nhe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=0&&i<=59}},{key:"set",value:function(r,i,o){return r.setUTCMinutes(o,0,0),r}}]),n}(gt),rhe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=0&&i<=59}},{key:"set",value:function(r,i,o){return r.setUTCSeconds(o,0),r}}]),n}(gt),ihe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=1&&R<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var V=Ye((v=(y=(x=(_=r==null?void 0:r.weekStartsOn)!==null&&_!==void 0?_:r==null||(w=r.locale)===null||w===void 0||(S=w.options)===null||S===void 0?void 0:S.weekStartsOn)!==null&&x!==void 0?x:A.weekStartsOn)!==null&&y!==void 0?y:(E=A.locale)===null||E===void 0||(O=E.options)===null||O===void 0?void 0:O.weekStartsOn)!==null&&v!==void 0?v:0);if(!(V>=0&&V<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(j==="")return k===""?Pe(n):new Date(NaN);var W={firstWeekContainsDate:R,weekStartsOn:V,locale:U},X=[new Ofe],G=j.match(dhe).map(function(C){var M=C[0];if(M in t2){var $=t2[M];return $(C,U.formatLong)}return C}).join("").match(uhe),Z=[],ne=RM(G),le;try{var K=function(){var C=le.value;!(r!=null&&r.useAdditionalWeekYearTokens)&&B8(C)&&Qv(C,j,e),!(r!=null&&r.useAdditionalDayOfYearTokens)&&U8(C)&&Qv(C,j,e);var M=C[0],$=che[M];if($){var J=$.incompatibleTokens;if(Array.isArray(J)){var ee=Z.find(function(ge){return J.includes(ge.token)||ge.token===M});if(ee)throw new RangeError("The format string mustn't contain `".concat(ee.fullToken,"` and `").concat(C,"` at the same time"))}else if($.incompatibleTokens==="*"&&Z.length>0)throw new RangeError("The format string mustn't contain `".concat(C,"` and any other token at the same time"));Z.push({token:M,fullToken:C});var se=$.run(k,C,U.match,W);if(!se)return{v:new Date(NaN)};X.push(se.setter),k=se.rest}else{if(M.match(mhe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+M+"`");if(C==="''"?C="'":M==="'"&&(C=ghe(C)),k.indexOf(C)===0)k=k.slice(C.length);else return{v:new Date(NaN)}}};for(ne.s();!(le=ne.n()).done;){var F=K();if(Zr(F)==="object")return F.v}}catch(C){ne.e(C)}finally{ne.f()}if(k.length>0&&phe.test(k))return new Date(NaN);var D=X.map(function(C){return C.priority}).sort(function(C,M){return M-C}).filter(function(C,M,$){return $.indexOf(C)===M}).map(function(C){return X.filter(function(M){return M.priority===C}).sort(function(M,$){return $.subPriority-M.subPriority})}).map(function(C){return C[0]}),H=Pe(n);if(isNaN(H.getTime()))return new Date(NaN);var ie=A8(H,xu(H)),z={},q=RM(D),re;try{for(q.s();!(re=q.n()).done;){var ae=re.value;if(!ae.validate(ie,W))return new Date(NaN);var he=ae.set(ie,z,W);Array.isArray(he)?(ie=he[0],_T(z,he[1])):ie=he}}catch(C){q.e(C)}finally{q.f()}return ie}function ghe(e){return e.match(fhe)[1].replace(hhe,"'")}function vhe(e,t){Oe(2,arguments);var n=Pe(e),r=Pe(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function yhe(e,t){Oe(2,arguments);var n=e2(e),r=e2(t);return n.getTime()===r.getTime()}function _he(e,t){Oe(2,arguments);var n=Pe(e),r=Pe(t);return n.getFullYear()===r.getFullYear()}function Ou(e,t){Oe(2,arguments);var n=Pe(e).getTime(),r=Pe(t.start).getTime(),i=Pe(t.end).getTime();if(!(r<=i))throw new RangeError("Invalid interval");return n>=r&&n<=i}function xT(e,t){Oe(2,arguments);var n=Ye(t);return $l(e,-n)}function ra(e,t){var n;Oe(1,arguments);var r=Ye((n=t==null?void 0:t.additionalDigits)!==null&&n!==void 0?n:2);if(r!==2&&r!==1&&r!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof e=="string"||Object.prototype.toString.call(e)==="[object String]"))return new Date(NaN);var i=She(e),o;if(i.date){var a=Ehe(i.date,r);o=The(a.restDateString,a.year)}if(!o||isNaN(o.getTime()))return new Date(NaN);var s=o.getTime(),l=0,c;if(i.time&&(l=Ohe(i.time),isNaN(l)))return new Date(NaN);if(i.timezone){if(c=Che(i.timezone),isNaN(c))return new Date(NaN)}else{var d=new Date(s+l),f=new Date(0);return f.setFullYear(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()),f.setHours(d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds()),f}return new Date(s+l+c)}var Lm={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},bhe=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,whe=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,xhe=/^([+-])(\d{2})(?::?(\d{2}))?$/;function She(e){var t={},n=e.split(Lm.dateTimeDelimiter),r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],Lm.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Lm.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){var i=Lm.timezone.exec(r);i?(t.time=r.replace(i[1],""),t.timezone=i[1]):t.time=r}return t}function Ehe(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 The(e,t){if(t===null)return new Date(NaN);var n=e.match(bhe);if(!n)return new Date(NaN);var r=!!n[4],i=Ld(n[1]),o=Ld(n[2])-1,a=Ld(n[3]),s=Ld(n[4]),l=Ld(n[5])-1;if(r)return Mhe(t,s,l)?khe(t,s,l):new Date(NaN);var c=new Date(0);return!Lhe(t,o,a)||!jhe(t,i)?new Date(NaN):(c.setUTCFullYear(t,o,Math.max(i,a)),c)}function Ld(e){return e?parseInt(e):1}function Ohe(e){var t=e.match(whe);if(!t)return NaN;var n=Tb(t[1]),r=Tb(t[2]),i=Tb(t[3]);return Nhe(n,r,i)?n*b0+r*pT+i*1e3:NaN}function Tb(e){return e&&parseFloat(e.replace(",","."))||0}function Che(e){if(e==="Z")return 0;var t=e.match(xhe);if(!t)return 0;var n=t[1]==="+"?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return Rhe(r,i)?n*(r*b0+i*pT):NaN}function khe(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 Phe=[31,null,31,30,31,30,31,31,30,31,30,31];function Z8(e){return e%400===0||e%4===0&&e%100!==0}function Lhe(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(Phe[t]||(Z8(e)?29:28))}function jhe(e,t){return t>=1&&t<=(Z8(e)?366:365)}function Mhe(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function Nhe(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function Rhe(e,t){return t>=0&&t<=59}function pr(e,t){Oe(2,arguments);var n=Pe(e),r=Ye(t),i=n.getFullYear(),o=n.getDate(),a=new Date(0);a.setFullYear(i,r,15),a.setHours(0,0,0,0);var s=gfe(a);return n.setMonth(r,Math.min(o,s)),n}function Ahe(e,t){if(Oe(2,arguments),Zr(t)!=="object"||t===null)throw new RangeError("values parameter must be an object");var n=Pe(e);return isNaN(n.getTime())?new Date(NaN):(t.year!=null&&n.setFullYear(t.year),t.month!=null&&(n=pr(n,t.month)),t.date!=null&&n.setDate(Ye(t.date)),t.hours!=null&&n.setHours(Ye(t.hours)),t.minutes!=null&&n.setMinutes(Ye(t.minutes)),t.seconds!=null&&n.setSeconds(Ye(t.seconds)),t.milliseconds!=null&&n.setMilliseconds(Ye(t.milliseconds)),n)}function _g(e,t){Oe(2,arguments);var n=Pe(e),r=Ye(t);return n.setHours(r),n}function bg(e,t){Oe(2,arguments);var n=Pe(e),r=Ye(t);return n.setMinutes(r),n}function cc(e,t){Oe(2,arguments);var n=Pe(e),r=Ye(t),i=Math.floor(n.getMonth()/3)+1,o=r-i;return pr(n,n.getMonth()+o*3)}function Dhe(e,t){Oe(2,arguments);var n=Pe(e),r=Ye(t);return n.setSeconds(r),n}function Io(e,t){Oe(2,arguments);var n=Pe(e),r=Ye(t);return isNaN(n.getTime())?new Date(NaN):(n.setFullYear(r),n)}function Cu(e,t){Oe(2,arguments);var n=Ye(t);return bi(e,-n)}function Ihe(e,t){Oe(2,arguments);var n=Ye(t);return L8(e,-n)}function Fhe(e,t){Oe(2,arguments);var n=Ye(t);return hT(e,-n)}function wh(e,t){Oe(2,arguments);var n=Ye(t);return Su(e,-n)}const K8="yyyy-MM-dd",ST="yyyy-MM-dd HH:mm",ds=()=>new Date,ET=e=>typeof e!="string",TT=(e,t)=>!e||!ET(e)?e:t?Tu(e,t):pfe(e),fs=e=>TT(e,void 0),Xs=e=>TT(e,K8),ey=e=>TT(e,ST),Bi=e=>ET(e)?e:ra(e),Jh=(e,t,n)=>{try{return Ou(Bi(e),{start:Bi(t??e),end:Bi(n??e)})}catch{return!1}},Ns=(e,t)=>z8(e,t)||Ui(e,t),ep="all",Q8={today:"Today",yesterday:"Yesterday",last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",last180Days:"Last 180 days",last365Days:"Last 365 days",[ep]:void 0},X8=Object.keys(Q8),J8=e=>e===void 0||qi(g8(Boolean,e)),ty=e=>typeof e=="string"&&X8.includes(e),$he=X8.filter(e=>e!==ep),DM=e=>e?Bi(e):null,eF=(e,t)=>({startDate:DM(e),endDate:DM(t)}),Uhe=e=>{if(!(!e||J8(e)))return e.startDate&&!e.endDate?`Since ${Xs(e.startDate)}`:!e.startDate&&e.endDate?`Until ${Xs(e.endDate)}`:`${Xs(e.startDate)} - ${Xs(e.endDate)}`},tF=e=>{if(!(!e||e===ep))return ty(e)?Q8[e]:Uhe(e)},li=e=>Hr(xT(ds(),e)),uc=e=>({startDate:e,endDate:El(ds())}),Rs=e=>t=>e===t,nF=uT([[Rs("today"),()=>uc(Hr(ds()))],[Rs("yesterday"),()=>({startDate:li(1),endDate:El(xT(ds(),1))})],[Rs("last7Days"),()=>uc(li(7))],[Rs("last30Days"),()=>uc(li(30))],[Rs("last90Days"),()=>uc(li(90))],[Rs("last180Days"),()=>uc(li(180))],[Rs("last365Days"),()=>uc(li(365))],[o8,()=>({})]]),Bhe=e=>{const t=Bi(e);return uT([[()=>Ns(Hr(ds()),t),()=>"today"],[()=>Ns(li(1),t),()=>"yesterday"],[()=>Ns(li(7),t),()=>"last7Days"],[()=>Ns(li(30),t),()=>"last30Days"],[()=>Ns(li(90),t),()=>"last90Days"],[()=>Ns(li(180),t),()=>"last180Days"],[()=>Ns(li(365),t),()=>"last365Days"],[o8,()=>ep]])()},zhe=e=>ty(e)?nF(e):e,Nr=(e,t)=>Z6(e,t,{serializeError:kce}),tp=Rn("shlink/visitCreation/createNewVisits",e=>({payload:{createdVisits:e}})),IM=5e3,FM=4,$M=2,Vhe=({currentPage:e,pagesCount:t})=>e>=t,Hhe=(e,t)=>t*100/e,np=({typePrefix:e,createLoaders:t,getExtraFulfilledPayload:n,shouldCancel:r})=>{const i=Rn(`${e}/progressChanged`),o=Rn(`${e}/large`),a=Rn(`${e}/fallbackToInterval`),s=Nr(e,async(l,{getState:c,dispatch:d})=>{var f;const[p,m]=t(l),v=async S=>Promise.all(S.map(async E=>p(E,IM).then(mt("data")))).then(nue),y=async(S,E=0)=>{if(r(c))return[];const O=await v(S[E]);return d(i(Hhe(S.length,E+$M))),E{const{pagination:E,data:O}=await p(S,IM);if(!E||Vhe(E))return O;const k=dT($M,E.pagesCount+1),j=gh(FM,k);return E.pagesCount-1>FM&&d(o()),O.concat(await y(j))},[_,w]=await Promise.all([x(),m((f=l.query)==null?void 0:f.excludeBots)]);return!_.length&&w&&d(a(Bhe(w.date))),{...n(l),visits:_}});return Object.assign(s,{progressChanged:i,large:o,fallbackToInterval:a})},rp=(e,t)=>async n=>e?t({page:1,itemsPerPage:1,excludeBots:n}).then(({data:r})=>r[0]):Promise.resolve(void 0),ip=({name:e,asyncThunkCreator:t,initialState:n,filterCreatedVisits:r})=>{const{pending:i,rejected:o,fulfilled:a,large:s,progressChanged:l,fallbackToInterval:c}=t,{reducer:d,actions:f}=lr({name:e,initialState:n,reducers:{cancelGetVisits:m=>({...m,cancelLoad:!0})},extraReducers:m=>{m.addCase(i,()=>({...n,loading:!0})),m.addCase(o,(v,{error:y})=>({...n,error:!0,errorData:pa(y)})),m.addCase(a,(v,{payload:y})=>({...v,...y,loading:!1,loadingLarge:!1,error:!1})),m.addCase(s,v=>({...v,loadingLarge:!0})),m.addCase(l,(v,{payload:y})=>({...v,progress:y})),m.addCase(c,(v,{payload:y})=>({...v,fallbackInterval:y})),m.addCase(tp,(v,{payload:y})=>{const{visits:x}=v,_=r(v,y.createdVisits).map(({visit:w})=>w);return _.length?{...v,visits:[..._,...x]}:v})}}),{cancelGetVisits:p}=f;return{reducer:d,cancelGetVisits:p}},rF="shlink/domainVisits",iF="DEFAULT",Whe={visits:[],domain:"",loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},Yhe=e=>np({typePrefix:`${rF}/getDomainVisits`,createLoaders:({domain:t,query:n={},doIntervalFallback:r=!1})=>{const i=e(),o=async(s,l)=>i.getDomainVisits(t,{...n,page:s,itemsPerPage:l}),a=rp(r,async s=>i.getDomainVisits(t,s));return[o,a]},getExtraFulfilledPayload:({domain:t,query:n={}})=>({domain:t,query:n}),shouldCancel:t=>t().domainVisits.cancelLoad}),Ghe=e=>ip({name:rF,initialState:Whe,asyncThunkCreator:e,filterCreatedVisits:({domain:t,query:n={}},r)=>{const{startDate:i,endDate:o}=n;return r.filter(({shortUrl:a,visit:s})=>a&&Uue(a,t)&&Jh(s.date,i,o))}}),wg=({className:e="",placement:t,children:n})=>{const r=ys();return g.jsxs(g.Fragment,{children:[g.jsx("span",{className:e,ref:r,children:g.jsx(Ne,{icon:BS})}),g.jsx(Rr,{target:r,placement:t,children:n})]})},OT=e=>Vr(t=>t.preventDefault(),e),CT=(e,t,n=1)=>dT(n,e+1).map(t),uo=e=>!Wu(e)&&!qi(e),Ob=e=>qi(e)?null:e,oF=e=>e?"true":"false",Cb=e=>e===void 0?void 0:oF(e),kb=({isLast:e,...t})=>g.jsx(ag,{...t,required:!1,type:"url",placeholder:"No redirect",className:e?"mb-0":""}),qhe=({isOpen:e,toggle:t,domain:n,editDomainRedirects:r})=>{var i,o,a;const[s,l]=I.useState(((i=n.redirects)==null?void 0:i.baseUrlRedirect)??""),[c,d]=I.useState(((o=n.redirects)==null?void 0:o.regular404Redirect)??""),[f,p]=I.useState(((a=n.redirects)==null?void 0:a.invalidShortUrlRedirect)??""),m=OT(async()=>r({domain:n.domain,redirects:{baseUrlRedirect:Ob(s),regular404Redirect:Ob(c),invalidShortUrlRedirect:Ob(f)}}).then(t));return g.jsx(ua,{isOpen:e,toggle:t,centered:!0,children:g.jsxs("form",{name:"domainRedirectsModal",onSubmit:m,children:[g.jsxs(da,{toggle:t,children:["Edit redirects for ",g.jsx("b",{children:n.domain})]}),g.jsxs(Eo,{children:[g.jsxs(kb,{value:s,onChange:l,children:[g.jsxs(wg,{className:"me-2",placement:"bottom",children:["Visitors accessing the base url, as in ",g.jsxs("b",{children:["https://",n.domain,"/"]}),", will be redirected to this URL."]}),"Base URL"]}),g.jsxs(kb,{value:c,onChange:d,children:[g.jsxs(wg,{className:"me-2",placement:"bottom",children:["Visitors accessing a url not matching a short URL pattern, as in ",g.jsxs("b",{children:["https://",n.domain,"/???/[...]"]}),", will be redirected to this URL."]}),"Regular 404"]}),g.jsxs(kb,{value:f,isLast:!0,onChange:p,children:[g.jsx(wg,{className:"me-2",placement:"bottom",children:"Visitors accessing a url matching a short URL pattern, but not matching an existing short code, will be redirected to this URL."}),"Invalid short URL"]})]}),g.jsxs(Al,{children:[g.jsx(yt,{color:"link",type:"button",onClick:t,children:"Cancel"}),g.jsx(yt,{color:"primary",children:"Save"})]})]})})},Zhe=({domain:e,editDomainRedirects:t})=>{const[n,r]=Sn(),i=Xh("domainVisits"),o=Fl();return g.jsxs(s0,{children:[i&&g.jsxs(Ue,{tag:It,to:`${o}/domain/${e.domain}${e.isDefault?`_${iF}`:""}/visits`,children:[g.jsx(Ne,{icon:US,fixedWidth:!0})," Visit stats"]}),g.jsxs(Ue,{onClick:r,children:[g.jsx(Ne,{fixedWidth:!0,icon:$S})," Edit redirects"]}),g.jsx(qhe,{domain:e,isOpen:n,toggle:r,editDomainRedirects:t})]})},Wo=({href:e,children:t,rel:n,...r})=>g.jsx("a",{target:"_blank",rel:`noopener noreferrer${n?` ${n}`:""}`,href:e,...r,children:t??e}),Khe="Left",Qhe="Right",Xhe="Up",Jhe="Down",Rc={delta:10,preventScrollOnSwipe:!1,rotationAngle:0,trackMouse:!1,trackTouch:!0,swipeDuration:1/0,touchEventOptions:{passive:!0}},r2={first:!0,initial:[0,0],start:0,swiping:!1,xy:[0,0]},UM="mousemove",BM="mouseup",epe="touchend",tpe="touchmove",npe="touchstart";function rpe(e,t,n,r){return e>t?n>0?Qhe:Khe:r>0?Jhe:Xhe}function zM(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 ipe(e,t){const n=c=>{const d="touches"in c;d&&c.touches.length>1||e((f,p)=>{p.trackMouse&&!d&&(document.addEventListener(UM,r),document.addEventListener(BM,a));const{clientX:m,clientY:v}=d?c.touches[0]:c,y=zM([m,v],p.rotationAngle);return p.onTouchStartOrOnMouseDown&&p.onTouchStartOrOnMouseDown({event:c}),Object.assign(Object.assign(Object.assign({},f),r2),{initial:y.slice(),xy:y,start:c.timeStamp||0})})},r=c=>{e((d,f)=>{const p="touches"in c;if(p&&c.touches.length>1)return d;if(c.timeStamp-d.start>f.swipeDuration)return d.swiping?Object.assign(Object.assign({},d),{swiping:!1}):d;const{clientX:m,clientY:v}=p?c.touches[0]:c,[y,x]=zM([m,v],f.rotationAngle),_=y-d.xy[0],w=x-d.xy[1],S=Math.abs(_),E=Math.abs(w),O=(c.timeStamp||0)-d.start,k=Math.sqrt(S*S+E*E)/(O||1),j=[_/(O||1),w/(O||1)],A=rpe(S,E,_,w),U=typeof f.delta=="number"?f.delta:f.delta[A.toLowerCase()]||Rc.delta;if(S{e((d,f)=>{let p;if(d.swiping&&d.eventData){if(c.timeStamp-d.start{document.removeEventListener(UM,r),document.removeEventListener(BM,a)},a=c=>{o(),i(c)},s=(c,d)=>{let f=()=>{};if(c&&c.addEventListener){const p=Object.assign(Object.assign({},Rc.touchEventOptions),d.touchEventOptions),m=[[npe,n,p],[tpe,r,Object.assign(Object.assign({},p),d.preventScrollOnSwipe?{passive:!1}:{})],[epe,i,p]];m.forEach(([v,y,x])=>c.addEventListener(v,y,x)),f=()=>m.forEach(([v,y])=>c.removeEventListener(v,y))}return f},l={ref:c=>{c!==null&&e((d,f)=>{if(d.el===c)return d;const p={};return d.el&&d.el!==c&&d.cleanUpTouch&&(d.cleanUpTouch(),p.cleanUpTouch=void 0),f.trackTouch&&c&&(p.cleanUpTouch=s(c,f)),Object.assign(Object.assign(Object.assign({},d),{el:c}),p)})}};return t.trackMouse&&(l.onMouseDown=n),[l,s]}function ope(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 ape(e){const{trackMouse:t}=e,n=I.useRef(Object.assign({},r2)),r=I.useRef(Object.assign({},Rc)),i=I.useRef(Object.assign({},r.current));i.current=Object.assign({},r.current),r.current=Object.assign(Object.assign({},Rc),e);let o;for(o in Rc)r.current[o]===void 0&&(r.current[o]=Rc[o]);const[a,s]=I.useMemo(()=>ipe(l=>n.current=l(n.current,r.current),{trackMouse:t}),[t]);return n.current=ope(n.current,r.current,i.current,s),a}const spe=(e,t)=>{const n=r=>i=>{i.event.composedPath().some(({classList:o})=>o==null?void 0:o.contains("visits-table"))||document.querySelector(".modal")||r()};return ape({delta:40,onSwipedLeft:n(t),onSwipedRight:n(e)})},lpe=(e,t)=>{const[n,r]=I.useState(t),i=I.useCallback(o=>{const{location:a,history:s}=window,l=zu(a.search);l[e]=o,s.pushState(null,"",`${a.pathname}?${c0(l)}`),r(o)},[e]);return[n,i]},cpe=(e,t)=>{const n=I.useRef(!0);I.useEffect(()=>{!n.current&&e(),n.current=!1},t)},Yu=()=>{const e=So();return I.useCallback(()=>e(-1),[e])},aF=()=>{const{search:e}=En();return I.useMemo(()=>zu(e),[e])},sF=(e,t)=>{const n=I.useCallback(()=>t(`(max-width: ${e}px)`).matches,[t,e]),[r,i]=I.useState(n());return I.useEffect(()=>{const o=()=>i(n());return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[n]),r},upe=({status:e,matchMedia:t=window.matchMedia})=>{const n=ys(),r=sF(991,t);return e==="validating"?g.jsx(Ne,{fixedWidth:!0,icon:DD,spin:!0}):g.jsxs(g.Fragment,{children:[g.jsx("span",{ref:n,children:e==="valid"?g.jsx(Ne,{fixedWidth:!0,icon:Yf,className:"text-muted"}):g.jsx(Ne,{fixedWidth:!0,icon:q1,className:"text-danger"})}),g.jsx(Rr,{target:n,placement:r?"right":"left",autohide:e==="valid",children:e==="valid"?"Congratulations! This domain is properly configured.":g.jsxs("span",{children:["Oops! There is some missing configuration, and short URLs shared with this domain will not work.",g.jsx("br",{}),"Check the ",g.jsx(Wo,{href:"https://slnk.to/multi-domain-docs",children:"documentation"})," in order to find out what is missing."]})})]})},Pb=({fallback:e})=>g.jsxs("span",{className:"text-muted",children:[!e&&g.jsx("small",{children:"No redirect"}),e&&g.jsxs(g.Fragment,{children:[e," ",g.jsx("small",{children:"(as fallback)"})]})]}),dpe=()=>g.jsxs(g.Fragment,{children:[g.jsx(Ne,{fixedWidth:!0,icon:NW,className:"text-primary",id:"defaultDomainIcon"}),g.jsx(Rr,{target:"defaultDomainIcon",placement:"right",children:"Default domain"})]}),fpe=({domain:e,editDomainRedirects:t,checkDomainHealth:n,defaultRedirects:r})=>{const{domain:i,isDefault:o,redirects:a,status:s}=e;return I.useEffect(()=>{n(e.domain)},[n,e.domain]),g.jsxs("tr",{className:"responsive-table__row",children:[g.jsx("td",{className:"responsive-table__cell","data-th":"Is default domain",children:o&&g.jsx(dpe,{})}),g.jsx("th",{className:"responsive-table__cell","data-th":"Domain",children:i}),g.jsx("td",{className:"responsive-table__cell","data-th":"Base path redirect",children:(a==null?void 0:a.baseUrlRedirect)??g.jsx(Pb,{fallback:r==null?void 0:r.baseUrlRedirect})}),g.jsx("td",{className:"responsive-table__cell","data-th":"Regular 404 redirect",children:(a==null?void 0:a.regular404Redirect)??g.jsx(Pb,{fallback:r==null?void 0:r.regular404Redirect})}),g.jsx("td",{className:"responsive-table__cell","data-th":"Invalid short URL redirect",children:(a==null?void 0:a.invalidShortUrlRedirect)??g.jsx(Pb,{fallback:r==null?void 0:r.invalidShortUrlRedirect})}),g.jsx("td",{className:"responsive-table__cell text-lg-center","data-th":"Status",children:g.jsx(upe,{status:s})}),g.jsx("td",{className:"responsive-table__cell text-end",children:g.jsx(Zhe,{domain:e,editDomainRedirects:t})})]})},VM=[{value:"Is default domain",isHidden:!0},{value:"Domain",isHidden:!1},{value:"Base path redirect",isHidden:!1},{value:"Regular 404 redirect",isHidden:!1},{value:"Invalid short URL redirect",isHidden:!1},{value:"Domain status",isHidden:!0},{value:"Options",isHidden:!0}],hpe=({listDomains:e,domainsList:t,filterDomains:n,editDomainRedirects:r,checkDomainHealth:i})=>{var o;const{filteredDomains:a,defaultRedirects:s,loading:l,error:c,errorData:d}=t,f=s??((o=a.find(({isDefault:p})=>p))==null?void 0:o.redirects);return I.useEffect(()=>{e()},[e]),l?g.jsx(Ho,{loading:!0}):g.jsxs(g.Fragment,{children:[g.jsx(Hh,{className:"mb-3",onChange:n}),(()=>c?g.jsx(zr,{type:"error",children:g.jsx(na,{errorData:d,fallbackMessage:"Error loading domains :("})}):g.jsx(mn,{children:g.jsxs("table",{className:"table table-hover responsive-table mb-0",children:[g.jsx("thead",{className:"responsive-table__header",children:g.jsx("tr",{children:VM.map((p,m)=>g.jsx("th",{children:g.jsx("span",{className:p.isHidden?"sr-only":void 0,children:p.value})},m))})}),g.jsxs("tbody",{children:[a.length<1&&g.jsx("tr",{children:g.jsx("td",{colSpan:VM.length,className:"text-center",children:"No results found"})}),a.map(p=>g.jsx(fpe,{domain:p,editDomainRedirects:r,checkDomainHealth:i,defaultRedirects:f},p.domain))]})]})}))()]})},ppe="shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS",mpe=e=>Nr(ppe,async({domain:t,redirects:n})=>{const r=await e().editDomainRedirects({domain:t,...n});return{domain:t,redirects:r}}),jm="shlink/domainsList",Mm={domains:[],filteredDomains:[],loading:!1,error:!1},HM=({domain:e,redirects:t})=>n=>n.domain!==e?n:{...n,redirects:t},WM=(e,t)=>n=>n.domain!==e?n:{...n,status:t},gpe=(e,t)=>{const n=Nr(`${jm}/listDomains`,async()=>{const{data:a,defaultRedirects:s}=await e().listDomains();return{domains:a.map(l=>({...l,status:"validating"})),defaultRedirects:s}}),r=Nr(`${jm}/checkDomainHealth`,async a=>{try{const{status:s}=await e().health(a);return{domain:a,status:s==="pass"?"valid":"invalid"}}catch{return{domain:a,status:"invalid"}}}),i=Rn(`${jm}/filterDomains`),{reducer:o}=lr({name:jm,initialState:Mm,reducers:{},extraReducers:a=>{a.addCase(n.pending,()=>({...Mm,loading:!0})),a.addCase(n.rejected,(s,{error:l})=>({...Mm,error:!0,errorData:pa(l)})),a.addCase(n.fulfilled,(s,{payload:l})=>({...Mm,...l,filteredDomains:l.domains})),a.addCase(r.fulfilled,({domains:s,filteredDomains:l,...c},{payload:d})=>({...c,domains:s.map(WM(d.domain,d.status)),filteredDomains:l.map(WM(d.domain,d.status))})),a.addCase(i,(s,{payload:l})=>({...s,filteredDomains:s.domains.filter(({domain:c})=>c.toLowerCase().match(l.toLowerCase()))})),a.addCase(t.fulfilled,(s,{payload:l})=>({...s,domains:s.domains.map(HM(l)),filteredDomains:s.filteredDomains.map(HM(l))}))}});return{reducer:o,listDomains:n,checkDomainHealth:r,filterDomains:i}},vpe=(e,t)=>{e.serviceFactory("DomainSelector",()=>Cue),e.decorator("DomainSelector",t(["domainsList"],["listDomains"])),e.serviceFactory("ManageDomains",()=>hpe),e.decorator("ManageDomains",t(["domainsList"],["listDomains","filterDomains","editDomainRedirects","checkDomainHealth"])),e.serviceFactory("domainsListReducerCreator",gpe,"apiClientFactory","editDomainRedirects"),e.serviceFactory("domainsListReducer",mt("reducer"),"domainsListReducerCreator"),e.serviceFactory("listDomains",mt("listDomains"),"domainsListReducerCreator"),e.serviceFactory("filterDomains",mt("filterDomains"),"domainsListReducerCreator"),e.serviceFactory("editDomainRedirects",mpe,"apiClientFactory"),e.serviceFactory("checkDomainHealth",mt("checkDomainHealth"),"domainsListReducerCreator")},YM="shlink/mercure",ype={loading:!0,error:!1},_pe=e=>{const t=Nr(`${YM}/loadMercureInfo`,r=>{if(r&&r.realTimeUpdates&&!r.realTimeUpdates.enabled)throw new Error("Real time updates not enabled");return e().mercureInfo()}),{reducer:n}=lr({name:YM,initialState:ype,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}},bpe=e=>{e.serviceFactory("mercureInfoReducerCreator",_pe,"apiClientFactory"),e.serviceFactory("mercureInfoReducer",mt("reducer"),"mercureInfoReducerCreator"),e.serviceFactory("loadMercureInfo",mt("loadMercureInfo"),"mercureInfoReducerCreator")};function Kt(e){return I.useRef(e).current}function Qt(e,t){return(n,r=globalThis.console)=>(t.forEach(i=>{const o=n[i];e[i]=o}),e)}var Ac=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Gu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var i2={exports:{}};/** @license +`):e}function zse(e,t){const{element:n,datasetIndex:r,index:i}=t,o=e.getDatasetMeta(r).controller,{label:a,value:s}=o.getLabelAndValue(i);return{chart:e,label:a,parsed:o.getParsed(i),raw:e.data.datasets[r].data[i],formattedValue:s,dataset:o.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function Wj(e,t){const n=e.chart.ctx,{body:r,footer:i,title:o}=e,{boxWidth:a,boxHeight:s}=t,l=bn(t.bodyFont),c=bn(t.titleFont),d=bn(t.footerFont),f=o.length,p=i.length,m=r.length,v=sr(t.padding);let y=v.height,x=0,_=r.reduce((E,O)=>E+O.before.length+O.lines.length+O.after.length,0);if(_+=e.beforeBody.length+e.afterBody.length,f&&(y+=f*c.lineHeight+(f-1)*t.titleSpacing+t.titleMarginBottom),_){const E=t.displayColors?Math.max(s,l.lineHeight):l.lineHeight;y+=m*E+(_-m)*l.lineHeight+(_-1)*t.bodySpacing}p&&(y+=t.footerMarginTop+p*d.lineHeight+(p-1)*t.footerSpacing);let w=0;const S=function(E){x=Math.max(x,n.measureText(E).width+w)};return n.save(),n.font=c.string,bt(e.title,S),n.font=l.string,bt(e.beforeBody.concat(e.afterBody),S),w=t.displayColors?a+2+t.boxPadding:0,bt(r,E=>{bt(E.before,S),bt(E.lines,S),bt(E.after,S)}),w=0,n.font=d.string,bt(e.footer,S),n.restore(),x+=v.width,{width:x,height:y}}function Vse(e,t){const{y:n,height:r}=t;return ne.height-r/2?"bottom":"center"}function Hse(e,t,n,r){const{x:i,width:o}=r,a=n.caretSize+n.caretPadding;if(e==="left"&&i+o+a>t.width||e==="right"&&i-o-a<0)return!0}function Wse(e,t,n,r){const{x:i,width:o}=n,{width:a,chartArea:{left:s,right:l}}=e;let c="center";return r==="center"?c=i<=(s+l)/2?"left":"right":i<=o/2?c="left":i>=a-o/2&&(c="right"),Hse(c,e,t,n)&&(c="center"),c}function Yj(e,t,n){const r=n.yAlign||t.yAlign||Vse(e,n);return{xAlign:n.xAlign||t.xAlign||Wse(e,t,n,r),yAlign:r}}function Yse(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function Gse(e,t,n){let{y:r,height:i}=e;return t==="top"?r+=n:t==="bottom"?r-=i+n:r-=i/2,r}function Gj(e,t,n,r){const{caretSize:i,caretPadding:o,cornerRadius:a}=e,{xAlign:s,yAlign:l}=n,c=i+o,{topLeft:d,topRight:f,bottomLeft:p,bottomRight:m}=ll(a);let v=Yse(t,s);const y=Gse(t,l,c);return l==="center"?s==="left"?v+=c:s==="right"&&(v-=c):s==="left"?v-=Math.max(d,p)+i:s==="right"&&(v+=Math.max(f,m)+i),{x:Mn(v,0,r.width-t.width),y:Mn(y,0,r.height-t.height)}}function Om(e,t,n){const r=sr(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function qj(e){return ro([],Mo(e))}function qse(e,t,n){return bs(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function Zj(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const Y5={beforeTitle:Lo,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex"u"?Y5[t].call(n,r):i}class Wx extends ha{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 T5(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=qse(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,i=xr(r,"beforeTitle",this,t),o=xr(r,"title",this,t),a=xr(r,"afterTitle",this,t);let s=[];return s=ro(s,Mo(i)),s=ro(s,Mo(o)),s=ro(s,Mo(a)),s}getBeforeBody(t,n){return qj(xr(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,i=[];return bt(t,o=>{const a={before:[],lines:[],after:[]},s=Zj(r,o);ro(a.before,Mo(xr(s,"beforeLabel",this,o))),ro(a.lines,xr(s,"label",this,o)),ro(a.after,Mo(xr(s,"afterLabel",this,o))),i.push(a)}),i}getAfterBody(t,n){return qj(xr(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,i=xr(r,"beforeFooter",this,t),o=xr(r,"footer",this,t),a=xr(r,"afterFooter",this,t);let s=[];return s=ro(s,Mo(i)),s=ro(s,Mo(o)),s=ro(s,Mo(a)),s}_createItems(t){const n=this._active,r=this.chart.data,i=[],o=[],a=[];let s=[],l,c;for(l=0,c=n.length;lt.filter(d,f,p,r))),t.itemSort&&(s=s.sort((d,f)=>t.itemSort(d,f,r))),bt(s,d=>{const f=Zj(t.callbacks,d);i.push(xr(f,"labelColor",this,d)),o.push(xr(f,"labelPointStyle",this,d)),a.push(xr(f,"labelTextColor",this,d))}),this.labelColors=i,this.labelPointStyles=o,this.labelTextColors=a,this.dataPoints=s,s}update(t,n){const r=this.options.setContext(this.getContext()),i=this._active;let o,a=[];if(!i.length)this.opacity!==0&&(o={opacity:0});else{const s=wf[r.position].call(this,i,this._eventPosition);a=this._createItems(r),this.title=this.getTitle(a,r),this.beforeBody=this.getBeforeBody(a,r),this.body=this.getBody(a,r),this.afterBody=this.getAfterBody(a,r),this.footer=this.getFooter(a,r);const l=this._size=Wj(this,r),c=Object.assign({},s,l),d=Yj(this.chart,r,c),f=Gj(r,c,d,this.chart);this.xAlign=d.xAlign,this.yAlign=d.yAlign,o={opacity:1,x:f.x,y:f.y,width:l.width,height:l.height,caretX:s.x,caretY:s.y}}this._tooltipItems=a,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,i){const o=this.getCaretPosition(t,r,i);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)}getCaretPosition(t,n,r){const{xAlign:i,yAlign:o}=this,{caretSize:a,cornerRadius:s}=r,{topLeft:l,topRight:c,bottomLeft:d,bottomRight:f}=ll(s),{x:p,y:m}=t,{width:v,height:y}=n;let x,_,w,S,E,O;return o==="center"?(E=m+y/2,i==="left"?(x=p,_=x-a,S=E+a,O=E-a):(x=p+v,_=x+a,S=E-a,O=E+a),w=x):(i==="left"?_=p+Math.max(l,d)+a:i==="right"?_=p+v-Math.max(c,f)-a:_=this.caretX,o==="top"?(S=m,E=S-a,x=_-a,w=_+a):(S=m+y,E=S+a,x=_+a,w=_-a),O=S),{x1:x,x2:_,x3:w,y1:S,y2:E,y3:O}}drawTitle(t,n,r){const i=this.title,o=i.length;let a,s,l;if(o){const c=qc(r.rtl,this.x,this.width);for(t.x=Om(this,r.titleAlign,r),n.textAlign=c.textAlign(r.titleAlign),n.textBaseline="middle",a=bn(r.titleFont),s=r.titleSpacing,n.fillStyle=r.titleColor,n.font=a.string,l=0;lw!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,dh(t,{x:y,y:v,w:c,h:l,radius:_}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),dh(t,{x,y:v+1,w:c-2,h:l-2,radius:_}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(y,v,c,l),t.strokeRect(y,v,c,l),t.fillStyle=a.backgroundColor,t.fillRect(x,v+1,c-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:i}=this,{bodySpacing:o,bodyAlign:a,displayColors:s,boxHeight:l,boxWidth:c,boxPadding:d}=r,f=bn(r.bodyFont);let p=f.lineHeight,m=0;const v=qc(r.rtl,this.x,this.width),y=function(A){n.fillText(A,v.x(t.x+m),t.y+p/2),t.y+=p+o},x=v.textAlign(a);let _,w,S,E,O,k,j;for(n.textAlign=a,n.textBaseline="middle",n.font=f.string,t.x=Om(this,x,r),n.fillStyle=r.bodyColor,bt(this.beforeBody,y),m=s&&x!=="right"?a==="center"?c/2+d:c+2+d:0,E=0,k=i.length;E0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,i=r&&r.x,o=r&&r.y;if(i||o){const a=wf[t.position].call(this,this._active,this._eventPosition);if(!a)return;const s=this._size=Wj(this,t),l=Object.assign({},a,this._size),c=Yj(n,t,l),d=Gj(t,l,c,n);(i._to!==d.x||o._to!==d.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=s.width,this.height=s.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,d))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},o={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const a=sr(n.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&s&&(t.save(),t.globalAlpha=r,this.drawBackground(o,t,i,n),b5(t,n.textDirection),o.y+=a.top,this.drawTitle(o,t,n),this.drawBody(o,t,n),this.drawFooter(o,t,n),w5(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,i=t.map(({datasetIndex:s,index:l})=>{const c=this.chart.getDatasetMeta(s);if(!c)throw new Error("Cannot find a dataset at index "+s);return{datasetIndex:s,element:c.data[l],index:l}}),o=!Fv(r,i),a=this._positionChanged(i,n);(o||a)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,o=this._active||[],a=this._getActiveElements(t,o,n,r),s=this._positionChanged(a,t),l=n||!Fv(a,o)||s;return l&&(this._active=a,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,r,i){const o=this.options;if(t.type==="mouseout")return[];if(!i)return n;const a=this.chart.getElementsAtEventForMode(t,o.mode,o,r);return o.reverse&&a.reverse(),a}_positionChanged(t,n){const{caretX:r,caretY:i,options:o}=this,a=wf[o.position].call(this,t,n);return a!==!1&&(r!==a.x||i!==a.y)}}Te(Wx,"positioners",wf);var Zse={id:"tooltip",_element:Wx,positioners:wf,afterInit(e,t,n){n&&(e.tooltip=new Wx({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:Y5},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"]},Kse=Object.freeze({__proto__:null,Colors:lse,Decimation:fse,Filler:Mse,Legend:Fse,SubTitle:Bse,Title:Use,Tooltip:Zse});const Qse=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function Xse(e,t,n,r){const i=e.indexOf(t);if(i===-1)return Qse(e,t,n,r);const o=e.lastIndexOf(t);return i!==o?n:i}const Jse=(e,t)=>e===null?null:Mn(Math.round(e),0,t);function G5(e){const t=this.getLabels();return e>=0&&en.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}Te(Yx,"id","category"),Te(Yx,"defaults",{ticks:{callback:G5}});function ele(e,t){const n=[],{bounds:r,step:i,min:o,max:a,precision:s,count:l,maxTicks:c,maxDigits:d,includeBounds:f}=e,p=i||1,m=c-1,{min:v,max:y}=t,x=!dt(o),_=!dt(a),w=!dt(l),S=(y-v)/(d+1);let E=HL((y-v)/m/p)*p,O,k,j,A;if(E<1e-14&&!x&&!_)return[{value:v},{value:y}];A=Math.ceil(y/E)-Math.floor(v/E),A>m&&(E=HL(A*E/m/p)*p),dt(s)||(O=Math.pow(10,s),E=Math.ceil(E*O)/O),r==="ticks"?(k=Math.floor(v/E)*E,j=Math.ceil(y/E)*E):(k=v,j=y),x&&_&&i&&qre((a-o)/i,E/1e3)?(A=Math.round(Math.min((a-o)/E,c)),E=(a-o)/A,k=o,j=a):w?(k=x?o:k,j=_?a:j,A=l-1,E=(j-k)/A):(A=(j-k)/E,mf(A,Math.round(A),E/1e3)?A=Math.round(A):A=Math.ceil(A));const U=Math.max(WL(E),WL(k));O=Math.pow(10,dt(s)?U:s),k=Math.round(k*O)/O,j=Math.round(j*O)/O;let R=0;for(x&&(f&&k!==o?(n.push({value:o}),ka)break;n.push({value:V})}return _&&f&&j!==a?n.length&&mf(n[n.length-1].value,a,Kj(a,S,e))?n[n.length-1].value=a:n.push({value:a}):(!_||j===a)&&n.push({value:j}),n}function Kj(e,t,{horizontal:n,minRotation:r}){const i=Ii(r),o=(n?Math.sin(i):Math.cos(i))||.001,a=.75*t*(""+e).length;return Math.min(t/o,a)}class Wv extends Dl{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return dt(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:i,max:o}=this;const a=l=>i=n?i:l,s=l=>o=r?o:l;if(t){const l=vo(i),c=vo(o);l<0&&c<0?s(0):l>0&&c>0&&a(0)}if(i===o){let l=o===0?1:Math.abs(o*.05);s(o+l),t||a(i-l)}this.min=i,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=t,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},o=this._range||this,a=ele(i,o);return t.bounds==="ticks"&&n5(a,this,"value"),t.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const t=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const i=(r-n)/Math.max(t.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return qh(t,this.chart.options.locale,this.options.ticks.format)}}class Gx extends Wv{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=tn(t)?t:0,this.max=tn(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=Ii(this.options.ticks.minRotation),i=(t?Math.sin(r):Math.cos(r))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,o.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}Te(Gx,"id","linear"),Te(Gx,"defaults",{ticks:{callback:u0.formatters.numeric}});const hh=e=>Math.floor(Fa(e)),Ms=(e,t)=>Math.pow(10,hh(e)+t);function Qj(e){return e/Math.pow(10,hh(e))===1}function Xj(e,t,n){const r=Math.pow(10,n),i=Math.floor(e/r);return Math.ceil(t/r)-i}function tle(e,t){const n=t-e;let r=hh(n);for(;Xj(e,t,r)>10;)r++;for(;Xj(e,t,r)<10;)r--;return Math.min(r,hh(e))}function nle(e,{min:t,max:n}){t=Dr(e.min,t);const r=[],i=hh(t);let o=tle(t,n),a=o<0?Math.pow(10,Math.abs(o)):1;const s=Math.pow(10,o),l=i>o?Math.pow(10,i):0,c=Math.round((t-l)*a)/a,d=Math.floor((t-l)/s/10)*s*10;let f=Math.floor((c-d)/Math.pow(10,o)),p=Dr(e.min,Math.round((l+d+f*Math.pow(10,o))*a)/a);for(;p=10?f=f<15?15:20:f++,f>=20&&(o++,f=2,a=o>=0?1:a),p=Math.round((l+d+f*Math.pow(10,o))*a)/a;const m=Dr(e.max,p);return r.push({value:m,major:Qj(m),significand:f}),r}class qx extends Dl{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){const r=Wv.prototype.parse.apply(this,[t,n]);if(r===0){this._zero=!0;return}return tn(r)&&r>0?r:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=tn(t)?Math.max(0,t):null,this.max=tn(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!tn(this._userMin)&&(this.min=t===Ms(this.min,0)?Ms(this.min,-1):Ms(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let r=this.min,i=this.max;const o=s=>r=t?r:s,a=s=>i=n?i:s;r===i&&(r<=0?(o(1),a(10)):(o(Ms(r,-1)),a(Ms(i,1)))),r<=0&&o(Ms(i,-1)),i<=0&&a(Ms(r,1)),this.min=r,this.max=i}buildTicks(){const t=this.options,n={min:this._userMin,max:this._userMax},r=nle(n,this);return t.bounds==="ticks"&&n5(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":qh(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=Fa(t),this._valueRange=Fa(this.max)-Fa(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Fa(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}Te(qx,"id","logarithmic"),Te(qx,"defaults",{ticks:{callback:u0.formatters.logarithmic,major:{enabled:!0}}});function Zx(e){const t=e.ticks;if(t.display&&e.display){const n=sr(t.backdropPadding);return Ze(t.font&&t.font.size,nn.font.size)+n.height}return 0}function rle(e,t,n){return n=Nt(n)?n:[n],{w:die(e,t.string,n),h:n.length*t.lineHeight}}function Jj(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 ile(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),r=[],i=[],o=e._pointLabels.length,a=e.options.pointLabels,s=a.centerPointLabels?Ft/o:0;for(let l=0;lt.r&&(s=(r.end-t.r)/o,e.r=Math.max(e.r,t.r+s)),i.startt.b&&(l=(i.end-t.b)/a,e.b=Math.max(e.b,t.b+l))}function ale(e,t,n){const r=e.drawingArea,{extra:i,additionalAngle:o,padding:a,size:s}=n,l=e.getPointPosition(t,r+i+a,o),c=Math.round(VE(Fr(l.angle+cn))),d=dle(l.y,s.h,c),f=cle(c),p=ule(l.x,s.w,f);return{visible:!0,x:l.x,y:d,textAlign:f,left:p,top:d,right:p+s.w,bottom:d+s.h}}function sle(e,t){if(!t)return!0;const{left:n,top:r,right:i,bottom:o}=e;return!(zo({x:n,y:r},t)||zo({x:n,y:o},t)||zo({x:i,y:r},t)||zo({x:i,y:o},t))}function lle(e,t,n){const r=[],i=e._pointLabels.length,o=e.options,{centerPointLabels:a,display:s}=o.pointLabels,l={extra:Zx(o)/2,additionalAngle:a?Ft/i:0};let c;for(let d=0;d270||n<90)&&(e-=t),e}function fle(e,t,n){const{left:r,top:i,right:o,bottom:a}=n,{backdropColor:s}=t;if(!dt(s)){const l=ll(t.borderRadius),c=sr(t.backdropPadding);e.fillStyle=s;const d=r-c.left,f=i-c.top,p=o-r+c.width,m=a-i+c.height;Object.values(l).some(v=>v!==0)?(e.beginPath(),dh(e,{x:d,y:f,w:p,h:m,radius:l}),e.fill()):e.fillRect(d,f,p,m)}}function hle(e,t){const{ctx:n,options:{pointLabels:r}}=e;for(let i=t-1;i>=0;i--){const o=e._pointLabelItems[i];if(!o.visible)continue;const a=r.setContext(e.getPointLabelContext(i));fle(n,a,o);const s=bn(a.font),{x:l,y:c,textAlign:d}=o;Sl(n,e._pointLabels[i],l,c+s.lineHeight/2,s,{color:a.color,textAlign:d,textBaseline:"middle"})}}function q5(e,t,n,r){const{ctx:i}=e;if(n)i.arc(e.xCenter,e.yCenter,t,0,Dt);else{let o=e.getPointPosition(0,t);i.moveTo(o.x,o.y);for(let a=1;a{const i=kt(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?ile(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=Dt/(this._pointLabels.length||1),r=this.options.startAngle||0;return Fr(t*n+Ii(r))}getDistanceFromCenterForValue(t){if(dt(t))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*n:(t-this.min)*n}getValueForDistanceFromCenter(t){if(dt(t))return NaN;const n=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(t){const n=this._pointLabels||[];if(t>=0&&t{if(f!==0){l=this.getDistanceFromCenterForValue(d.value);const p=this.getContext(f),m=i.setContext(p),v=o.setContext(p);ple(this,m,l,a,v)}}),r.display){for(t.save(),s=a-1;s>=0;s--){const d=r.setContext(this.getPointLabelContext(s)),{color:f,lineWidth:p}=d;!p||!f||(t.lineWidth=p,t.strokeStyle=f,t.setLineDash(d.borderDash),t.lineDashOffset=d.borderDashOffset,l=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),c=this.getPointPosition(s,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,n=this.options,r=n.ticks;if(!r.display)return;const i=this.getIndexAngle(0);let o,a;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(i),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((s,l)=>{if(l===0&&!n.reverse)return;const c=r.setContext(this.getContext(l)),d=bn(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=d.string,a=t.measureText(s.label).width,t.fillStyle=c.backdropColor;const f=sr(c.backdropPadding);t.fillRect(-a/2-f.left,-o-d.size/2-f.top,a+f.width,d.size+f.height)}Sl(t,s.label,0,-o,d,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),t.restore()}drawTitle(){}}Te(Wd,"id","radialLinear"),Te(Wd,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:u0.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}}),Te(Wd,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),Te(Wd,"descriptors",{angleLines:{_fallback:"grid"}});const m0={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}},Er=Object.keys(m0);function eM(e,t){return e-t}function tM(e,t){if(dt(t))return null;const n=e._adapter,{parser:r,round:i,isoWeekday:o}=e._parseOpts;let a=t;return typeof r=="function"&&(a=r(a)),tn(a)||(a=typeof r=="string"?n.parse(a,r):n.parse(a)),a===null?null:(i&&(a=i==="week"&&(_u(o)||o===!0)?n.startOf(a,"isoWeek",o):n.startOf(a,i)),+a)}function nM(e,t,n,r){const i=Er.length;for(let o=Er.indexOf(e);o=Er.indexOf(n);o--){const a=Er[o];if(m0[a].common&&e._adapter.diff(i,r,a)>=t-1)return a}return Er[n?Er.indexOf(n):0]}function vle(e){for(let t=Er.indexOf(e)+1,n=Er.length;t=t?n[r]:n[i];e[o]=!0}}function yle(e,t,n,r){const i=e._adapter,o=+i.startOf(t[0].value,r),a=t[t.length-1].value;let s,l;for(s=o;s<=a;s=+i.add(s,1,r))l=n[s],l>=0&&(t[l].major=!0);return t}function iM(e,t,n){const r=[],i={},o=t.length;let a,s;for(a=0;a+t.value))}initOffsets(t=[]){let n=0,r=0,i,o;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?r=o:r=(o-this.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;n=Mn(n,0,a),r=Mn(r,0,a),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,i=this.options,o=i.time,a=o.unit||nM(o.minUnit,n,r,this._getLabelCapacity(n)),s=Ze(i.ticks.stepSize,1),l=a==="week"?o.isoWeekday:!1,c=_u(l)||l===!0,d={};let f=n,p,m;if(c&&(f=+t.startOf(f,"isoWeek",l)),f=+t.startOf(f,c?"day":a),t.diff(r,n,a)>1e5*s)throw new Error(n+" and "+r+" are too far apart with stepSize of "+s+" "+a);const v=i.ticks.source==="data"&&this.getDataTimestamps();for(p=f,m=0;p+y)}getLabelForValue(t){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}format(t,n){const r=this.options.time.displayFormats,i=this._unit,o=n||r[i];return this._adapter.format(t,o)}_tickFormatFunction(t,n,r,i){const o=this.options,a=o.ticks.callback;if(a)return kt(a,[t,n,r],this);const s=o.time.displayFormats,l=this._unit,c=this._majorUnit,d=l&&s[l],f=c&&s[c],p=r[n],m=c&&f&&p&&p.major;return this._adapter.format(t,i||(m?f:d))}generateTickLabels(t){let n,r,i;for(n=0,r=t.length;n0?s:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n=e[r].pos&&t<=e[i].pos&&({lo:r,hi:i}=Bo(e,"pos",t)),{pos:o,time:s}=e[r],{pos:a,time:l}=e[i]):(t>=e[r].time&&t<=e[i].time&&({lo:r,hi:i}=Bo(e,"time",t)),{time:o,pos:s}=e[r],{time:a,pos:l}=e[i]);const c=a-o;return c?s+(l-s)*(t-o)/c:s}class Kx extends ph{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=Cm(n,this.min),this._tableRange=Cm(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,i=[],o=[];let a,s,l,c,d;for(a=0,s=t.length;a=n&&c<=r&&i.push(c);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(a=0,s=i.length;ai-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?t=this.normalize(n.concat(r)):t=n.length?n:r,t=this._cache.all=t,t}getDecimalForValue(t){return(Cm(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return Cm(this._table,r*this._tableRange+this._minPos,!0)}}Te(Kx,"id","timeseries"),Te(Kx,"defaults",ph.defaults);var _le=Object.freeze({__proto__:null,CategoryScale:Yx,LinearScale:Gx,LogarithmicScale:qx,RadialLinearScale:Wd,TimeScale:ph,TimeSeriesScale:Kx});const ble=[Ooe,nse,Kse,_le];p0.register(...ble);var Gi,wo=".",Z5="function",K5="string",Q5="__global__",tT="Provider",wle=0,nT=Array.prototype.slice,xle=function(e,t){var n=e[t];if(n===void 0&&Gi.config.strict)throw new Error("Bottle was unable to resolve a service. `"+t+"` is undefined.");return n},g0=function(e){var t;return this.nested[e]||(t=Gi.pop(),this.nested[e]=t,this.factory(e,function(){return t.container})),this.nested[e]},X5=function(e){return e.split(wo).reduce(xle,this)},Sle=function(e,t,n,r){var i={configurable:!0,enumerable:!0};return e.length?i.get=function(){var o=0,a=function(s){if(s)throw s;e[o]&&e[o++](n,a)};return a(),n}:(i.value=n,i.writable=!0),Object.defineProperty(r,t,i),r[t]},Ele=function(e,t){var n,r;return typeof e===Z5&&(t=e,e=Q5),n=e.split(wo),r=n.shift(),n.length?g0.call(this,r).middleware(n.join(wo),t):(this.middlewares[r]||(this.middlewares[r]=[]),this.middlewares[r].push(t)),this},Tle=function(e,t){return t(e)},oM=function(e,t){return(e[t]||[]).concat(e.__global__||[])},Ole=function(e,t){var n,r,i,o,a;return this.id,i=this.container,o=this.decorators,a=this.middlewares,n=e+tT,r=Object.create(null),r[n]={configurable:!0,enumerable:!0,get:function(){var s=new t;return delete i[n],i[n]=s,s}},r[e]={configurable:!0,enumerable:!0,get:function(){var s=i[n],l;return s&&(l=oM(o,e).reduce(Tle,s.$get(i)),delete i[n],delete i[e]),l===void 0?l:Sle(oM(a,e),e,l,i)}},Object.defineProperties(i,r),this},J5=function(e,t){var n,r;return n=e.split(wo),this.providerMap[e]&&n.length===1&&!this.container[e+tT]?console.error(e+" provider already instantiated."):(this.originalProviders[e]=t,this.providerMap[e]=!0,r=n.shift(),n.length?(g0.call(this,r).provider(n.join(wo),t),this):Ole.call(this,r,t))},rT=function(e,t){return J5.call(this,e,function(){this.$get=t})},e8=function(e,t,n){var r=arguments.length>3?nT.call(arguments,3):[],i=this;return rT.call(this,e,function(){var o=t,a=r.map(X5,i.container);return n?new(t.bind.apply(t,[null].concat(a))):o.apply(null,a)})},Cle=function(e,t){return e8.apply(this,[e,t,!0].concat(nT.call(arguments,2)))},kle=function(e,t){return e8.apply(this,[e,t,!1].concat(nT.call(arguments,2)))},t8=function(e,t){Object.defineProperty(this,e,{configurable:!0,enumerable:!0,value:t,writable:!0})},n8=function(e,t){var n=e[t];return n||(n={},t8.call(e,t,n)),n},Ple=function(e,t){var n;return n=e.split(wo),e=n.pop(),t8.call(n.reduce(n8,this.container),e,t),this},Lle=function(e,t){Object.defineProperty(this,e,{configurable:!1,enumerable:!0,value:t,writable:!1})},jle=function(e,t){var n=e.split(wo);return e=n.pop(),Lle.call(n.reduce(n8,this.container),e,t),this},r8=function(e,t){var n,r;return typeof e===Z5&&(t=e,e=Q5),n=e.split(wo),r=n.shift(),n.length?g0.call(this,r).decorator(n.join(wo),t):(this.decorators[r]||(this.decorators[r]=[]),this.decorators[r].push(t)),this},Mle=function(e){return this.deferred.push(e),this},Nle=function(e){return(e||[]).map(X5,this.container)},Rle=function(e,t){return rT.call(this,e,function(n){return{instance:t.bind(t,n)}})},Ale=function(e){return!/^\$(?:decorator|register|list)$|Provider$/.test(e)},iT=function(e){return Object.keys(e||this.container||{}).filter(Ale)},Yv={},Dle=function(e){var t;return typeof e===K5?(t=Yv[e],t||(Yv[e]=t=new Gi,t.constant("BOTTLE_NAME",e)),t):new Gi},Ile=function(e){typeof e===K5?delete Yv[e]:Yv={}},i8=function(e){var t=e.$value===void 0?e:e.$value;return this[e.$type||"service"].apply(this,[e.$name,t].concat(e.$inject||[]))},aM=function(e){delete this.providerMap[e],delete this.container[e],delete this.container[e+tT]},Fle=function(e){var t=this.originalProviders,n=Array.isArray(e);Object.keys(this.originalProviders).forEach(function(r){if(!(n&&e.indexOf(r)===-1)){var i=r.split(wo);i.length>1&&i.forEach(aM,g0.call(this,i[0])),aM.call(this,r),this.provider(r,t[r])}},this)},$le=function(e){return this.deferred.forEach(function(t){t(e)}),this};Gi=function e(t){if(!(this instanceof e))return e.pop(t);this.id=wle++,this.decorators={},this.middlewares={},this.nested={},this.providerMap={},this.originalProviders={},this.deferred=[],this.container={$decorator:r8.bind(this),$register:i8.bind(this),$list:iT.bind(this)}};Gi.prototype={constant:jle,decorator:r8,defer:Mle,digest:Nle,factory:rT,instanceFactory:Rle,list:iT,middleware:Ele,provider:J5,resetProviders:Fle,register:i8,resolve:$le,service:Cle,serviceFactory:kle,value:Ple};Gi.pop=Dle;Gi.clear=Ile;Gi.list=iT;Gi.config={strict:!1};const Ule=Gi;var Ble=function(){return!0};const o8=Ble;function jt(e){return e!=null&&typeof e=="object"&&e["@@functional/placeholder"]===!0}function zt(e){return function t(n){return arguments.length===0||jt(n)?t:e.apply(this,arguments)}}function Et(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return jt(n)?t:zt(function(i){return e(n,i)});default:return jt(n)&&jt(r)?t:jt(n)?zt(function(i){return e(i,r)}):jt(r)?zt(function(i){return e(n,i)}):e(n,r)}}}function Kh(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(n){return t.apply(this,arguments)};case 2:return function(n,r){return t.apply(this,arguments)};case 3:return function(n,r,i){return t.apply(this,arguments)};case 4:return function(n,r,i,o){return t.apply(this,arguments)};case 5:return function(n,r,i,o,a){return t.apply(this,arguments)};case 6:return function(n,r,i,o,a,s){return t.apply(this,arguments)};case 7:return function(n,r,i,o,a,s,l){return t.apply(this,arguments)};case 8:return function(n,r,i,o,a,s,l,c){return t.apply(this,arguments)};case 9:return function(n,r,i,o,a,s,l,c,d){return t.apply(this,arguments)};case 10:return function(n,r,i,o,a,s,l,c,d,f){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function v0(e,t,n){return function(){for(var r=[],i=0,o=e,a=0;a=arguments.length)?s=t[a]:(s=arguments[i],i+=1),r[a]=s,jt(s)||(o-=1),a+=1}return o<=0?n.apply(this,r):Kh(o,v0(e,r,n))}}var zle=Et(function(e,t){return e===1?zt(t):Kh(e,v0(e,[],t))});const a8=zle;function Il(e){return function t(n,r,i){switch(arguments.length){case 0:return t;case 1:return jt(n)?t:Et(function(o,a){return e(n,o,a)});case 2:return jt(n)&&jt(r)?t:jt(n)?Et(function(o,a){return e(o,r,a)}):jt(r)?Et(function(o,a){return e(n,o,a)}):zt(function(o){return e(n,r,o)});default:return jt(n)&&jt(r)&&jt(i)?t:jt(n)&&jt(r)?Et(function(o,a){return e(o,a,i)}):jt(n)&&jt(i)?Et(function(o,a){return e(o,r,a)}):jt(r)&&jt(i)?Et(function(o,a){return e(n,o,a)}):jt(n)?zt(function(o){return e(o,r,i)}):jt(r)?zt(function(o){return e(n,o,i)}):jt(i)?zt(function(o){return e(n,r,o)}):e(n,r,i)}}}const Qh=Array.isArray||function(e){return e!=null&&e.length>=0&&Object.prototype.toString.call(e)==="[object Array]"};function Vle(e){return e!=null&&typeof e["@@transducer/step"]=="function"}function oT(e,t,n){return function(){if(arguments.length===0)return n();var r=Array.prototype.slice.call(arguments,0),i=r.pop();if(!Qh(i)){for(var o=0;oe?t:e});const s8=Hle;function gg(e,t){for(var n=0,r=t.length,i=Array(r);n0?e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1):!1});const l8=Wle;var Yle=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 Gle(e){return new Yle(e)}var qle=Et(function(e,t){return Kh(e.length,function(){return e.apply(t,arguments)})});const Zle=qle;function Kle(e,t,n){for(var r=0,i=n.length;r=0;)t=dM[n],ui(t,e)&&!nce(r,t)&&(r[r.length]=t),n-=1;return r});const ta=rce;var ice=Et(oT(["fantasy-land/map","map"],Jle,function(e,t){switch(Object.prototype.toString.call(t)){case"[object Function]":return a8(t.length,function(){return e.call(this,t.apply(this,arguments))});case"[object Object]":return _0(function(n,r){return n[r]=e(t[r]),n},{},ta(t));default:return gg(e,t)}}));const u8=ice,Qx=Number.isInteger||function(e){return e<<0===e};var oce=Et(function(e,t){var n=e<0?t.length+e:e;return y0(t)?t.charAt(n):t[n]});const d8=oce;var ace=Et(function(e,t){return e.map(function(n){for(var r=t,i=0,o;i1){var o=!Wu(r)&&ui(i,r)?r[i]:Qx(t[1])?[]:{};n=e(Array.prototype.slice.call(t,1),n,o)}if(Qx(i)&&Qh(r)){var a=[].concat(r);return a[i]=n,a}else return mce(i,n,r)});const sc=vce;function yce(e){var t=Object.prototype.toString.call(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object AsyncGeneratorFunction]"}function _ce(e){return function t(n){for(var r,i,o,a=[],s=0,l=n.length;s=0;){if(n[o]===e)return r[o]===t;o-=1}switch(i){case"Map":return e.size!==t.size?!1:mM(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size!==t.size?!1:mM(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var a=ta(e);if(a.length!==ta(t).length)return!1;var s=n.concat([e]),l=r.concat([t]);for(o=a.length-1;o>=0;){var c=a[o];if(!(ui(c,t)&&sT(t[c],e[c],s,l)))return!1;o-=1}return!0}var Mce=Et(function(e,t){return sT(e,t,[],[])});const lT=Mce;function Nce(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 bb(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 Cd=function(e){return(e<10?"0":"")+e},Ace=typeof Date.prototype.toISOString=="function"?function(e){return e.toISOString()}:function(e){return e.getUTCFullYear()+"-"+Cd(e.getUTCMonth()+1)+"-"+Cd(e.getUTCDate())+"T"+Cd(e.getUTCHours())+":"+Cd(e.getUTCMinutes())+":"+Cd(e.getUTCSeconds())+"."+(e.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};const Dce=Ace;function Ice(e){return function(){return!e.apply(this,arguments)}}function Fce(e,t){for(var n=0,r=t.length,i=[];n":v8(o,a)},r=function(o,a){return gg(function(s){return bb(s)+": "+n(o[s])},a.slice().sort())};switch(Object.prototype.toString.call(e)){case"[object Arguments]":return"(function() { return arguments; }("+gg(n,e).join(", ")+"))";case"[object Array]":return"["+gg(n,e).concat(r(e,cT(function(o){return/^\d+$/.test(o)},ta(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):bb(Dce(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())+")":bb(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,ta(e)).join(", ")+"}"}}var Hce=zt(function(e){return v8(e,[])});const Wce=Hce;var Yce=zt(function(e){var t=f8(s8,0,u8(function(n){return n[0].length},e));return Kh(t,function(){for(var n=0;no?1:0})});const xue=wue;var Sue=Et(function(e,t){if(e<=0)throw new Error("First argument to splitEvery must be a positive integer");for(var n=[],r=0;r{const[i,,o,a]=Sn(),{domains:s}=n,l=!t,c=I.useCallback(()=>{r(""),a()},[r,a]),d=I.useCallback(()=>{r(""),o()},[r,o]);return I.useEffect(()=>{e()},[e]),i?g.jsxs(o0,{children:[g.jsx(bl,{value:t??"",placeholder:"Domain",onChange:f=>r(f.target.value)}),g.jsx(yt,{id:"backToDropdown",outline:!0,type:"button",className:"domains-dropdown__back-btn","aria-label":"Back to domains list",onClick:c,children:g.jsx(Ne,{icon:XW})}),g.jsx(Rr,{target:"backToDropdown",placement:"left",trigger:"hover",children:"Existing domains"})]}):g.jsxs(fa,{text:l?"Domain":`Domain: ${t}`,className:l?"domains-dropdown__toggle-btn":"domains-dropdown__toggle-btn--active",children:[s.map(({domain:f,isDefault:p})=>g.jsxs(Ue,{active:(t===f||p)&&l,onClick:()=>r(f),children:[f,p&&g.jsx("span",{className:"float-end text-muted",children:"default"})]},f)),g.jsx(Ue,{divider:!0}),g.jsx(Ue,{onClick:d,children:g.jsx("i",{children:"New domain"})})]})},Pue=e=>(e==null?void 0:e.type)===IE.INVALID_ARGUMENT||(e==null?void 0:e.type)===FE.INVALID_ARGUMENT,Lue=e=>(e==null?void 0:e.type)==="INVALID_SHORTCODE_DELETION"||(e==null?void 0:e.type)===IE.INVALID_SHORT_URL_DELETION||(e==null?void 0:e.type)===FE.INVALID_SHORT_URL_DELETION,jue=e=>!!e&&typeof e=="object"&&["type","detail","title","status"].every(t=>t in e),pa=e=>jue(e)?e:void 0,na=({errorData:e,fallbackMessage:t})=>g.jsxs(g.Fragment,{children:[(e==null?void 0:e.detail)??t,Pue(e)&&g.jsxs("p",{className:"mb-0",children:["Invalid elements: [",e.invalidElements.join(", "),"]"]})]}),Mue=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,yM=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(Mue);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},_M=e=>e==="*"||e==="x"||e==="X",bM=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},Nue=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],Rue=(e,t)=>{if(_M(e)||_M(t))return 0;const[n,r]=Nue(bM(e),bM(t));return n>r?1:n{for(let n=0;n{const n=yM(e),r=yM(t),i=n.pop(),o=r.pop(),a=wM(n,r);return a!==0?a:i&&o?wM(i.split("."),o.split(".")):i||o?i?-1:1:0},xM=(e,t,n)=>{Due(n);const r=Aue(e,t);return S8[n].includes(r)},S8={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},SM=Object.keys(S8),Due=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(SM.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${SM.join("|")}`)},Iue=(e,{maxVersion:t,minVersion:n})=>{const r=!n||xM(e,n,">=");return(!t||xM(e,t,"<="))&&r},E8={domainVisits:"3.1.0",excludeBotsOnShortUrls:"3.4.0",filterDisabledUrls:"3.4.0",deviceLongUrls:"3.5.0"};Object.freeze(E8);const Pm=(e,t)=>t==="latest"||Iue(t,{minVersion:E8[e]}),T8=e=>({domainVisits:Pm("domainVisits",e),excludeBotsOnShortUrls:Pm("excludeBotsOnShortUrls",e),filterDisabledUrls:Pm("filterDisabledUrls",e),deviceLongUrls:Pm("deviceLongUrls",e)}),Fue=e=>I.useMemo(()=>T8(e),[e]),O8=I.createContext(T8("0.0.0")),$ue=O8.Provider,Xh=e=>I.useContext(O8)[e],C8=I.createContext(""),Uue=C8.Provider,Fl=()=>I.useContext(C8),xf=(e,t,n)=>Wu(n)?e.shortCode===t&&!e.domain:e.shortCode===t&&e.domain===n,Bue=(e,t)=>!e.domain&&t===iF?!0:e.domain===t,zue=(e,t)=>{const n=(t==null?void 0:t.validateUrls)??!1;return e?{longUrl:e.longUrl,tags:e.tags,title:e.title??void 0,domain:e.domain??void 0,validSince:e.meta.validSince??void 0,validUntil:e.meta.validUntil??void 0,maxVisits:e.meta.maxVisits??void 0,crawlable:e.crawlable,forwardQuery:e.forwardQuery,deviceLongUrls:e.deviceLongUrls&&{android:e.deviceLongUrls.android??void 0,ios:e.deviceLongUrls.ios??void 0,desktop:e.deviceLongUrls.desktop??void 0},validateUrl:n}:{longUrl:"",validateUrl:n}},k8="__",Vue=e=>e.replaceAll("/",k8),vg=e=>e.replaceAll(k8,"/");function Zr(e){"@babel/helpers - typeof";return Zr=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},Zr(e)}function Ye(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function Oe(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function Pe(e){Oe(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||Zr(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){Oe(2,arguments);var n=Pe(e),r=Ye(t);return isNaN(r)?new Date(NaN):(r&&n.setDate(n.getDate()+r),n)}function bi(e,t){Oe(2,arguments);var n=Pe(e),r=Ye(t);if(isNaN(r))return new Date(NaN);if(!r)return n;var i=n.getDate(),o=new Date(n.getTime());o.setMonth(n.getMonth()+r+1,0);var a=o.getDate();return i>=a?o:(n.setFullYear(o.getFullYear(),o.getMonth(),i),n)}function Hue(e,t){if(Oe(2,arguments),!t||Zr(t)!=="object")return new Date(NaN);var n=t.years?Ye(t.years):0,r=t.months?Ye(t.months):0,i=t.weeks?Ye(t.weeks):0,o=t.days?Ye(t.days):0,a=t.hours?Ye(t.hours):0,s=t.minutes?Ye(t.minutes):0,l=t.seconds?Ye(t.seconds):0,c=Pe(e),d=r||n?bi(c,r+n*12):c,f=o||i?$l(d,o+i*7):d,p=s+a*60,m=l+p*60,v=m*1e3,y=new Date(f.getTime()+v);return y}function fT(e,t){Oe(2,arguments);var n=Pe(e).getTime(),r=Ye(t);return new Date(n+r)}var Wue=36e5;function Yue(e,t){Oe(2,arguments);var n=Ye(t);return fT(e,n*Wue)}var Gue={};function ma(){return Gue}function P8(e,t){var n,r,i,o,a,s,l,c;Oe(1,arguments);var d=ma(),f=Ye((n=(r=(i=(o=t==null?void 0:t.weekStartsOn)!==null&&o!==void 0?o:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:d.weekStartsOn)!==null&&r!==void 0?r:(l=d.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Pe(e),m=p.getDay(),v=(m=i.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function Zue(e){Oe(1,arguments);var t=que(e),n=new Date(0);n.setFullYear(t,0,4),n.setHours(0,0,0,0);var r=vh(n);return r}function xu(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 Hr(e){Oe(1,arguments);var t=Pe(e);return t.setHours(0,0,0,0),t}var Kue=864e5;function yh(e,t){Oe(2,arguments);var n=Hr(e),r=Hr(t),i=n.getTime()-xu(n),o=r.getTime()-xu(r);return Math.round((i-o)/Kue)}var Que=6e4;function Jx(e,t){Oe(2,arguments);var n=Ye(t);return fT(e,n*Que)}function L8(e,t){Oe(2,arguments);var n=Ye(t),r=n*3;return bi(e,r)}function hT(e,t){Oe(2,arguments);var n=Ye(t),r=n*7;return $l(e,r)}function Su(e,t){Oe(2,arguments);var n=Ye(t);return bi(e,n*12)}function EM(e){Oe(1,arguments);var t;if(e&&typeof e.forEach=="function")t=e;else if(Zr(e)==="object"&&e!==null)t=Array.prototype.slice.call(e);else return new Date(NaN);var n;return t.forEach(function(r){var i=Pe(r);(n===void 0||ni||isNaN(i.getDate()))&&(n=i)}),n||new Date(NaN)}function yg(e,t){Oe(2,arguments);var n=Pe(e),r=Pe(t),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}var pT=6e4,b0=36e5,Xue=1e3;function Jue(e,t){Oe(2,arguments);var n=Hr(e),r=Hr(t);return n.getTime()===r.getTime()}function w0(e){return Oe(1,arguments),e instanceof Date||Zr(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function _h(e){if(Oe(1,arguments),!w0(e)&&typeof e!="number")return!1;var t=Pe(e);return!isNaN(Number(t))}function bh(e,t){Oe(2,arguments);var n=Pe(e),r=Pe(t),i=n.getFullYear()-r.getFullYear(),o=n.getMonth()-r.getMonth();return i*12+o}function Nc(e){Oe(1,arguments);var t=Pe(e),n=Math.floor(t.getMonth()/3)+1;return n}function Zv(e,t){Oe(2,arguments);var n=Pe(e),r=Pe(t);return n.getFullYear()-r.getFullYear()}function OM(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 mT(e,t){Oe(2,arguments);var n=Pe(e),r=Pe(t),i=OM(n,r),o=Math.abs(yh(n,r));n.setDate(n.getDate()-i*o);var a=+(OM(n,r)===-i),s=i*(o-a);return s===0?0:s}function j8(e,t){return Oe(2,arguments),Pe(e).getTime()-Pe(t).getTime()}var CM={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}},ede="trunc";function gT(e){return e?CM[e]:CM[ede]}function tde(e,t,n){Oe(2,arguments);var r=j8(e,t)/b0;return gT(n==null?void 0:n.roundingMethod)(r)}function El(e){Oe(1,arguments);var t=Pe(e);return t.setHours(23,59,59,999),t}function M8(e){Oe(1,arguments);var t=Pe(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function nde(e){Oe(1,arguments);var t=Pe(e);return El(t).getTime()===M8(t).getTime()}function Kv(e,t){Oe(2,arguments);var n=Pe(e),r=Pe(t),i=yg(n,r),o=Math.abs(bh(n,r)),a;if(o<1)a=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-i*o);var s=yg(n,r)===-i;nde(Pe(e))&&o===1&&yg(e,r)===1&&(s=!1),a=i*(o-Number(s))}return a===0?0:a}function rde(e,t,n){Oe(2,arguments);var r=j8(e,t)/1e3;return gT(n==null?void 0:n.roundingMethod)(r)}function ide(e,t,n){Oe(2,arguments);var r=mT(e,t)/7;return gT(n==null?void 0:n.roundingMethod)(r)}function e2(e){Oe(1,arguments);var t=Pe(e),n=t.getMonth(),r=n-n%3;return t.setMonth(r,1),t.setHours(0,0,0,0),t}function N8(e){Oe(1,arguments);var t=Pe(e);return t.setDate(1),t.setHours(0,0,0,0),t}function ode(e){Oe(1,arguments);var t=Pe(e),n=t.getFullYear();return t.setFullYear(n+1,0,0),t.setHours(23,59,59,999),t}function R8(e){Oe(1,arguments);var t=Pe(e),n=new Date(0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function ade(e,t){var n,r,i,o,a,s,l,c;Oe(1,arguments);var d=ma(),f=Ye((n=(r=(i=(o=t==null?void 0:t.weekStartsOn)!==null&&o!==void 0?o:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:d.weekStartsOn)!==null&&r!==void 0?r:(l=d.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Pe(e),m=p.getDay(),v=(m=i.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function ude(e){Oe(1,arguments);var t=D8(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var r=Eu(n);return r}var dde=6048e5;function I8(e){Oe(1,arguments);var t=Pe(e),n=Eu(t).getTime()-ude(t).getTime();return Math.round(n/dde)+1}function Tl(e,t){var n,r,i,o,a,s,l,c;Oe(1,arguments);var d=ma(),f=Ye((n=(r=(i=(o=t==null?void 0:t.weekStartsOn)!==null&&o!==void 0?o:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:d.weekStartsOn)!==null&&r!==void 0?r:(l=d.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Pe(e),m=p.getUTCDay(),v=(m=1&&m<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var v=new Date(0);v.setUTCFullYear(f+1,0,m),v.setUTCHours(0,0,0,0);var y=Tl(v,t),x=new Date(0);x.setUTCFullYear(f,0,m),x.setUTCHours(0,0,0,0);var _=Tl(x,t);return d.getTime()>=y.getTime()?f+1:d.getTime()>=_.getTime()?f:f-1}function fde(e,t){var n,r,i,o,a,s,l,c;Oe(1,arguments);var d=ma(),f=Ye((n=(r=(i=(o=t==null?void 0:t.firstWeekContainsDate)!==null&&o!==void 0?o:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&i!==void 0?i:d.firstWeekContainsDate)!==null&&r!==void 0?r:(l=d.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&n!==void 0?n:1),p=vT(e,t),m=new Date(0);m.setUTCFullYear(p,0,f),m.setUTCHours(0,0,0,0);var v=Tl(m,t);return v}var hde=6048e5;function F8(e,t){Oe(1,arguments);var n=Pe(e),r=Tl(n,t).getTime()-fde(n,t).getTime();return Math.round(r/hde)+1}function nt(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length0?n:1-n;return nt(t==="yy"?r%100:r,t.length)},M:function(e,t){var n=e.getUTCMonth();return t==="M"?String(n+1):nt(n+1,2)},d:function(e,t){return nt(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(e,t){return nt(e.getUTCHours()%12||12,t.length)},H:function(e,t){return nt(e.getUTCHours(),t.length)},m:function(e,t){return nt(e.getUTCMinutes(),t.length)},s:function(e,t){return nt(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,r=e.getUTCMilliseconds(),i=Math.floor(r*Math.pow(10,n-3));return nt(i,t.length)}};const xa=pde;var lc={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},mde={G:function(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){var r=e.getUTCFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return xa.y(e,t)},Y:function(e,t,n,r){var i=vT(e,r),o=i>0?i:1-i;if(t==="YY"){var a=o%100;return nt(a,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):nt(o,t.length)},R:function(e,t){var n=D8(e);return nt(n,t.length)},u:function(e,t){var n=e.getUTCFullYear();return nt(n,t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return nt(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return nt(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return xa.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return nt(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){var i=F8(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):nt(i,t.length)},I:function(e,t,n){var r=I8(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):nt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):xa.d(e,t)},D:function(e,t,n){var r=cde(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):nt(r,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var i=e.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return nt(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var i=e.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return nt(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return nt(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=e.getUTCHours(),i=r/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){var r=e.getUTCHours(),i;switch(r===12?i=lc.noon:r===0?i=lc.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r=e.getUTCHours(),i;switch(r>=17?i=lc.evening:r>=12?i=lc.afternoon:r>=4?i=lc.morning:i=lc.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){var r=e.getUTCHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return xa.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):xa.H(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):nt(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):nt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):xa.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):xa.s(e,t)},S:function(e,t){return xa.S(e,t)},X:function(e,t,n,r){var i=r._originalDate||e,o=i.getTimezoneOffset();if(o===0)return"Z";switch(t){case"X":return PM(o);case"XXXX":case"XX":return Hs(o);case"XXXXX":case"XXX":default:return Hs(o,":")}},x:function(e,t,n,r){var i=r._originalDate||e,o=i.getTimezoneOffset();switch(t){case"x":return PM(o);case"xxxx":case"xx":return Hs(o);case"xxxxx":case"xxx":default:return Hs(o,":")}},O:function(e,t,n,r){var i=r._originalDate||e,o=i.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+kM(o,":");case"OOOO":default:return"GMT"+Hs(o,":")}},z:function(e,t,n,r){var i=r._originalDate||e,o=i.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+kM(o,":");case"zzzz":default:return"GMT"+Hs(o,":")}},t:function(e,t,n,r){var i=r._originalDate||e,o=Math.floor(i.getTime()/1e3);return nt(o,t.length)},T:function(e,t,n,r){var i=r._originalDate||e,o=i.getTime();return nt(o,t.length)}};function kM(e,t){var n=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),o=r%60;if(o===0)return n+String(i);var a=t||"";return n+String(i)+a+nt(o,2)}function PM(e,t){if(e%60===0){var n=e>0?"-":"+";return n+nt(Math.abs(e)/60,2)}return Hs(e,t)}function Hs(e,t){var n=t||"",r=e>0?"-":"+",i=Math.abs(e),o=nt(Math.floor(i/60),2),a=nt(i%60,2);return r+o+n+a}const gde=mde;var LM=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},$8=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},vde=function(e,t){var n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return LM(e,t);var o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",LM(r,t)).replace("{{time}}",$8(i,t))},yde={p:$8,P:vde};const t2=yde;var _de=["D","DD"],bde=["YY","YYYY"];function U8(e){return _de.indexOf(e)!==-1}function B8(e){return bde.indexOf(e)!==-1}function Qv(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 wde={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"}},xde=function(e,t,n){var r,i=wde[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};const Sde=xde;function wb(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 Ede={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Tde={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Ode={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Cde={date:wb({formats:Ede,defaultWidth:"full"}),time:wb({formats:Tde,defaultWidth:"full"}),dateTime:wb({formats:Ode,defaultWidth:"full"})};const kde=Cde;var Pde={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Lde=function(e,t,n,r){return Pde[e]};const jde=Lde;function kd(e){return function(t,n){var r=n!=null&&n.context?String(n.context):"standalone",i;if(r==="formatting"&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):o;i=e.formattingValues[a]||e.formattingValues[o]}else{var s=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[l]||e.values[s]}var c=e.argumentCallback?e.argumentCallback(t):t;return i[c]}}var Mde={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Nde={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Rde={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"]},Ade={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"]},Dde={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"}},Ide={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"}},Fde=function(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},$de={ordinalNumber:Fde,era:kd({values:Mde,defaultWidth:"wide"}),quarter:kd({values:Nde,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:kd({values:Rde,defaultWidth:"wide"}),day:kd({values:Ade,defaultWidth:"wide"}),dayPeriod:kd({values:Dde,defaultWidth:"wide",formattingValues:Ide,defaultFormattingWidth:"wide"})};const Ude=$de;function Pd(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;var a=o[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?zde(s,function(f){return f.test(a)}):Bde(s,function(f){return f.test(a)}),c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;var d=t.slice(a.length);return{value:c,rest:d}}}function Bde(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function zde(e,t){for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:{},r=t.match(e.matchPattern);if(!r)return null;var i=r[0],o=t.match(e.parsePattern);if(!o)return null;var a=e.valueCallback?e.valueCallback(o[0]):o[0];a=n.valueCallback?n.valueCallback(a):a;var s=t.slice(i.length);return{value:a,rest:s}}}var Hde=/^(\d+)(th|st|nd|rd)?/i,Wde=/\d+/i,Yde={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},Gde={any:[/^b/i,/^(a|c)/i]},qde={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Zde={any:[/1/i,/2/i,/3/i,/4/i]},Kde={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},Qde={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]},Xde={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},Jde={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]},efe={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},tfe={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}},nfe={ordinalNumber:Vde({matchPattern:Hde,parsePattern:Wde,valueCallback:function(e){return parseInt(e,10)}}),era:Pd({matchPatterns:Yde,defaultMatchWidth:"wide",parsePatterns:Gde,defaultParseWidth:"any"}),quarter:Pd({matchPatterns:qde,defaultMatchWidth:"wide",parsePatterns:Zde,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Pd({matchPatterns:Kde,defaultMatchWidth:"wide",parsePatterns:Qde,defaultParseWidth:"any"}),day:Pd({matchPatterns:Xde,defaultMatchWidth:"wide",parsePatterns:Jde,defaultParseWidth:"any"}),dayPeriod:Pd({matchPatterns:efe,defaultMatchWidth:"any",parsePatterns:tfe,defaultParseWidth:"any"})};const rfe=nfe;var ife={code:"en-US",formatDistance:Sde,formatLong:kde,formatRelative:jde,localize:Ude,match:rfe,options:{weekStartsOn:0,firstWeekContainsDate:1}};const yT=ife;var ofe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,afe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,sfe=/^'([^]*?)'?$/,lfe=/''/g,cfe=/[a-zA-Z]/;function Tu(e,t,n){var r,i,o,a,s,l,c,d,f,p,m,v,y,x,_,w,S,E;Oe(2,arguments);var O=String(t),k=ma(),j=(r=(i=n==null?void 0:n.locale)!==null&&i!==void 0?i:k.locale)!==null&&r!==void 0?r:yT,A=Ye((o=(a=(s=(l=n==null?void 0:n.firstWeekContainsDate)!==null&&l!==void 0?l:n==null||(c=n.locale)===null||c===void 0||(d=c.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&s!==void 0?s:k.firstWeekContainsDate)!==null&&a!==void 0?a:(f=k.locale)===null||f===void 0||(p=f.options)===null||p===void 0?void 0:p.firstWeekContainsDate)!==null&&o!==void 0?o:1);if(!(A>=1&&A<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var U=Ye((m=(v=(y=(x=n==null?void 0:n.weekStartsOn)!==null&&x!==void 0?x:n==null||(_=n.locale)===null||_===void 0||(w=_.options)===null||w===void 0?void 0:w.weekStartsOn)!==null&&y!==void 0?y:k.weekStartsOn)!==null&&v!==void 0?v:(S=k.locale)===null||S===void 0||(E=S.options)===null||E===void 0?void 0:E.weekStartsOn)!==null&&m!==void 0?m:0);if(!(U>=0&&U<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!j.localize)throw new RangeError("locale must contain localize property");if(!j.formatLong)throw new RangeError("locale must contain formatLong property");var R=Pe(e);if(!_h(R))throw new RangeError("Invalid time value");var V=xu(R),W=A8(R,V),X={firstWeekContainsDate:A,weekStartsOn:U,locale:j,_originalDate:R},G=O.match(afe).map(function(Z){var ne=Z[0];if(ne==="p"||ne==="P"){var le=t2[ne];return le(Z,j.formatLong)}return Z}).join("").match(ofe).map(function(Z){if(Z==="''")return"'";var ne=Z[0];if(ne==="'")return ufe(Z);var le=gde[ne];if(le)return!(n!=null&&n.useAdditionalWeekYearTokens)&&B8(Z)&&Qv(Z,t,String(e)),!(n!=null&&n.useAdditionalDayOfYearTokens)&&U8(Z)&&Qv(Z,t,String(e)),le(W,Z,j.localize,X);if(ne.match(cfe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+ne+"`");return Z}).join("");return G}function ufe(e){var t=e.match(sfe);return t?t[1].replace(lfe,"'"):e}function _T(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 dfe(e){return _T({},e)}var jM=1440,ffe=2520,xb=43200,hfe=86400;function pfe(e,t,n){var r,i;Oe(2,arguments);var o=ma(),a=(r=(i=n==null?void 0:n.locale)!==null&&i!==void 0?i:o.locale)!==null&&r!==void 0?r:yT;if(!a.formatDistance)throw new RangeError("locale must contain formatDistance property");var s=yg(e,t);if(isNaN(s))throw new RangeError("Invalid time value");var l=_T(dfe(n),{addSuffix:!!(n!=null&&n.addSuffix),comparison:s}),c,d;s>0?(c=Pe(t),d=Pe(e)):(c=Pe(e),d=Pe(t));var f=rde(d,c),p=(xu(d)-xu(c))/1e3,m=Math.round((f-p)/60),v;if(m<2)return n!=null&&n.includeSeconds?f<5?a.formatDistance("lessThanXSeconds",5,l):f<10?a.formatDistance("lessThanXSeconds",10,l):f<20?a.formatDistance("lessThanXSeconds",20,l):f<40?a.formatDistance("halfAMinute",0,l):f<60?a.formatDistance("lessThanXMinutes",1,l):a.formatDistance("xMinutes",1,l):m===0?a.formatDistance("lessThanXMinutes",1,l):a.formatDistance("xMinutes",m,l);if(m<45)return a.formatDistance("xMinutes",m,l);if(m<90)return a.formatDistance("aboutXHours",1,l);if(mr.getTime()}function Ui(e,t){Oe(2,arguments);var n=Pe(e),r=Pe(t);return n.getTime()e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,s;return{s:function(){n=n.call(e)},n:function(){var l=n.next();return o=l.done,l},e:function(l){a=!0,s=l},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(a)throw s}}}}function Fe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function n2(e,t){return n2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},n2(e,t)}function ft(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&n2(e,t)}function Jv(e){return Jv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Jv(e)}function xfe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Sfe(e,t){if(t&&(Zr(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Fe(e)}function ht(e){var t=xfe();return function(){var n=Jv(e),r;if(t){var i=Jv(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Sfe(this,r)}}function st(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Efe(e,t){if(Zr(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Zr(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function V8(e){var t=Efe(e,"string");return Zr(t)==="symbol"?t:String(t)}function AM(e,t){for(var n=0;n0,r=n?t:1-t,i;if(r<=50)i=e||100;else{var o=r+50,a=Math.floor(o/100)*100,s=e>=o%100;i=e+a-(s?100:0)}return n?i:1-i}function q8(e){return e%400===0||e%4===0&&e%100!==0}var Pfe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a0}},{key:"set",value:function(r,i,o){var a=r.getUTCFullYear();if(o.isTwoDigitYear){var s=G8(o.year,a);return r.setUTCFullYear(s,0,1),r.setUTCHours(0,0,0,0),r}var l=!("era"in i)||i.era===1?o.year:1-o.year;return r.setUTCFullYear(l,0,1),r.setUTCHours(0,0,0,0),r}}]),n}(gt),Lfe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a0}},{key:"set",value:function(r,i,o,a){var s=vT(r,a);if(o.isTwoDigitYear){var l=G8(o.year,s);return r.setUTCFullYear(l,0,a.firstWeekContainsDate),r.setUTCHours(0,0,0,0),Tl(r,a)}var c=!("era"in i)||i.era===1?o.year:1-o.year;return r.setUTCFullYear(c,0,a.firstWeekContainsDate),r.setUTCHours(0,0,0,0),Tl(r,a)}}]),n}(gt),jfe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=1&&i<=4}},{key:"set",value:function(r,i,o){return r.setUTCMonth((o-1)*3,1),r.setUTCHours(0,0,0,0),r}}]),n}(gt),Rfe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=1&&i<=4}},{key:"set",value:function(r,i,o){return r.setUTCMonth((o-1)*3,1),r.setUTCHours(0,0,0,0),r}}]),n}(gt),Afe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=0&&i<=11}},{key:"set",value:function(r,i,o){return r.setUTCMonth(o,1),r.setUTCHours(0,0,0,0),r}}]),n}(gt),Dfe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=0&&i<=11}},{key:"set",value:function(r,i,o){return r.setUTCMonth(o,1),r.setUTCHours(0,0,0,0),r}}]),n}(gt);function Ife(e,t,n){Oe(2,arguments);var r=Pe(e),i=Ye(t),o=F8(r,n)-i;return r.setUTCDate(r.getUTCDate()-o*7),r}var Ffe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=1&&i<=53}},{key:"set",value:function(r,i,o,a){return Tl(Ife(r,o,a),a)}}]),n}(gt);function $fe(e,t){Oe(2,arguments);var n=Pe(e),r=Ye(t),i=I8(n)-r;return n.setUTCDate(n.getUTCDate()-i*7),n}var Ufe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=1&&i<=53}},{key:"set",value:function(r,i,o){return Eu($fe(r,o))}}]),n}(gt),Bfe=[31,28,31,30,31,30,31,31,30,31,30,31],zfe=[31,29,31,30,31,30,31,31,30,31,30,31],Vfe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=1&&i<=zfe[s]:i>=1&&i<=Bfe[s]}},{key:"set",value:function(r,i,o){return r.setUTCDate(o),r.setUTCHours(0,0,0,0),r}}]),n}(gt),Hfe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=1&&i<=366:i>=1&&i<=365}},{key:"set",value:function(r,i,o){return r.setUTCMonth(0,o),r.setUTCHours(0,0,0,0),r}}]),n}(gt);function wT(e,t,n){var r,i,o,a,s,l,c,d;Oe(2,arguments);var f=ma(),p=Ye((r=(i=(o=(a=n==null?void 0:n.weekStartsOn)!==null&&a!==void 0?a:n==null||(s=n.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&o!==void 0?o:f.weekStartsOn)!==null&&i!==void 0?i:(c=f.locale)===null||c===void 0||(d=c.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&r!==void 0?r:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=Pe(e),v=Ye(t),y=m.getUTCDay(),x=v%7,_=(x+7)%7,w=(_=0&&i<=6}},{key:"set",value:function(r,i,o,a){return r=wT(r,o,a),r.setUTCHours(0,0,0,0),r}}]),n}(gt),Yfe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=0&&i<=6}},{key:"set",value:function(r,i,o,a){return r=wT(r,o,a),r.setUTCHours(0,0,0,0),r}}]),n}(gt),Gfe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=0&&i<=6}},{key:"set",value:function(r,i,o,a){return r=wT(r,o,a),r.setUTCHours(0,0,0,0),r}}]),n}(gt);function qfe(e,t){Oe(2,arguments);var n=Ye(t);n%7===0&&(n=n-7);var r=1,i=Pe(e),o=i.getUTCDay(),a=n%7,s=(a+7)%7,l=(s=1&&i<=7}},{key:"set",value:function(r,i,o){return r=qfe(r,o),r.setUTCHours(0,0,0,0),r}}]),n}(gt),Kfe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=1&&i<=12}},{key:"set",value:function(r,i,o){var a=r.getUTCHours()>=12;return a&&o<12?r.setUTCHours(o+12,0,0,0):!a&&o===12?r.setUTCHours(0,0,0,0):r.setUTCHours(o,0,0,0),r}}]),n}(gt),ehe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=0&&i<=23}},{key:"set",value:function(r,i,o){return r.setUTCHours(o,0,0,0),r}}]),n}(gt),the=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=0&&i<=11}},{key:"set",value:function(r,i,o){var a=r.getUTCHours()>=12;return a&&o<12?r.setUTCHours(o+12,0,0,0):r.setUTCHours(o,0,0,0),r}}]),n}(gt),nhe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=1&&i<=24}},{key:"set",value:function(r,i,o){var a=o<=24?o%24:o;return r.setUTCHours(a,0,0,0),r}}]),n}(gt),rhe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=0&&i<=59}},{key:"set",value:function(r,i,o){return r.setUTCMinutes(o,0,0),r}}]),n}(gt),ihe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=0&&i<=59}},{key:"set",value:function(r,i,o){return r.setUTCSeconds(o,0),r}}]),n}(gt),ohe=function(e){ft(n,e);var t=ht(n);function n(){var r;st(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=1&&R<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var V=Ye((v=(y=(x=(_=r==null?void 0:r.weekStartsOn)!==null&&_!==void 0?_:r==null||(w=r.locale)===null||w===void 0||(S=w.options)===null||S===void 0?void 0:S.weekStartsOn)!==null&&x!==void 0?x:A.weekStartsOn)!==null&&y!==void 0?y:(E=A.locale)===null||E===void 0||(O=E.options)===null||O===void 0?void 0:O.weekStartsOn)!==null&&v!==void 0?v:0);if(!(V>=0&&V<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(j==="")return k===""?Pe(n):new Date(NaN);var W={firstWeekContainsDate:R,weekStartsOn:V,locale:U},X=[new Cfe],G=j.match(fhe).map(function(C){var M=C[0];if(M in t2){var $=t2[M];return $(C,U.formatLong)}return C}).join("").match(dhe),Z=[],ne=RM(G),le;try{var K=function(){var C=le.value;!(r!=null&&r.useAdditionalWeekYearTokens)&&B8(C)&&Qv(C,j,e),!(r!=null&&r.useAdditionalDayOfYearTokens)&&U8(C)&&Qv(C,j,e);var M=C[0],$=uhe[M];if($){var J=$.incompatibleTokens;if(Array.isArray(J)){var ee=Z.find(function(ge){return J.includes(ge.token)||ge.token===M});if(ee)throw new RangeError("The format string mustn't contain `".concat(ee.fullToken,"` and `").concat(C,"` at the same time"))}else if($.incompatibleTokens==="*"&&Z.length>0)throw new RangeError("The format string mustn't contain `".concat(C,"` and any other token at the same time"));Z.push({token:M,fullToken:C});var se=$.run(k,C,U.match,W);if(!se)return{v:new Date(NaN)};X.push(se.setter),k=se.rest}else{if(M.match(ghe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+M+"`");if(C==="''"?C="'":M==="'"&&(C=vhe(C)),k.indexOf(C)===0)k=k.slice(C.length);else return{v:new Date(NaN)}}};for(ne.s();!(le=ne.n()).done;){var F=K();if(Zr(F)==="object")return F.v}}catch(C){ne.e(C)}finally{ne.f()}if(k.length>0&&mhe.test(k))return new Date(NaN);var D=X.map(function(C){return C.priority}).sort(function(C,M){return M-C}).filter(function(C,M,$){return $.indexOf(C)===M}).map(function(C){return X.filter(function(M){return M.priority===C}).sort(function(M,$){return $.subPriority-M.subPriority})}).map(function(C){return C[0]}),H=Pe(n);if(isNaN(H.getTime()))return new Date(NaN);var ie=A8(H,xu(H)),z={},q=RM(D),re;try{for(q.s();!(re=q.n()).done;){var ae=re.value;if(!ae.validate(ie,W))return new Date(NaN);var he=ae.set(ie,z,W);Array.isArray(he)?(ie=he[0],_T(z,he[1])):ie=he}}catch(C){q.e(C)}finally{q.f()}return ie}function vhe(e){return e.match(hhe)[1].replace(phe,"'")}function yhe(e,t){Oe(2,arguments);var n=Pe(e),r=Pe(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function _he(e,t){Oe(2,arguments);var n=e2(e),r=e2(t);return n.getTime()===r.getTime()}function bhe(e,t){Oe(2,arguments);var n=Pe(e),r=Pe(t);return n.getFullYear()===r.getFullYear()}function Ou(e,t){Oe(2,arguments);var n=Pe(e).getTime(),r=Pe(t.start).getTime(),i=Pe(t.end).getTime();if(!(r<=i))throw new RangeError("Invalid interval");return n>=r&&n<=i}function xT(e,t){Oe(2,arguments);var n=Ye(t);return $l(e,-n)}function ra(e,t){var n;Oe(1,arguments);var r=Ye((n=t==null?void 0:t.additionalDigits)!==null&&n!==void 0?n:2);if(r!==2&&r!==1&&r!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof e=="string"||Object.prototype.toString.call(e)==="[object String]"))return new Date(NaN);var i=Ehe(e),o;if(i.date){var a=The(i.date,r);o=Ohe(a.restDateString,a.year)}if(!o||isNaN(o.getTime()))return new Date(NaN);var s=o.getTime(),l=0,c;if(i.time&&(l=Che(i.time),isNaN(l)))return new Date(NaN);if(i.timezone){if(c=khe(i.timezone),isNaN(c))return new Date(NaN)}else{var d=new Date(s+l),f=new Date(0);return f.setFullYear(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()),f.setHours(d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds()),f}return new Date(s+l+c)}var Lm={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},whe=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,xhe=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,She=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Ehe(e){var t={},n=e.split(Lm.dateTimeDelimiter),r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],Lm.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Lm.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){var i=Lm.timezone.exec(r);i?(t.time=r.replace(i[1],""),t.timezone=i[1]):t.time=r}return t}function The(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 Ohe(e,t){if(t===null)return new Date(NaN);var n=e.match(whe);if(!n)return new Date(NaN);var r=!!n[4],i=Ld(n[1]),o=Ld(n[2])-1,a=Ld(n[3]),s=Ld(n[4]),l=Ld(n[5])-1;if(r)return Nhe(t,s,l)?Phe(t,s,l):new Date(NaN);var c=new Date(0);return!jhe(t,o,a)||!Mhe(t,i)?new Date(NaN):(c.setUTCFullYear(t,o,Math.max(i,a)),c)}function Ld(e){return e?parseInt(e):1}function Che(e){var t=e.match(xhe);if(!t)return NaN;var n=Tb(t[1]),r=Tb(t[2]),i=Tb(t[3]);return Rhe(n,r,i)?n*b0+r*pT+i*1e3:NaN}function Tb(e){return e&&parseFloat(e.replace(",","."))||0}function khe(e){if(e==="Z")return 0;var t=e.match(She);if(!t)return 0;var n=t[1]==="+"?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return Ahe(r,i)?n*(r*b0+i*pT):NaN}function Phe(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 Lhe=[31,null,31,30,31,30,31,31,30,31,30,31];function Z8(e){return e%400===0||e%4===0&&e%100!==0}function jhe(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(Lhe[t]||(Z8(e)?29:28))}function Mhe(e,t){return t>=1&&t<=(Z8(e)?366:365)}function Nhe(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function Rhe(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function Ahe(e,t){return t>=0&&t<=59}function pr(e,t){Oe(2,arguments);var n=Pe(e),r=Ye(t),i=n.getFullYear(),o=n.getDate(),a=new Date(0);a.setFullYear(i,r,15),a.setHours(0,0,0,0);var s=vfe(a);return n.setMonth(r,Math.min(o,s)),n}function Dhe(e,t){if(Oe(2,arguments),Zr(t)!=="object"||t===null)throw new RangeError("values parameter must be an object");var n=Pe(e);return isNaN(n.getTime())?new Date(NaN):(t.year!=null&&n.setFullYear(t.year),t.month!=null&&(n=pr(n,t.month)),t.date!=null&&n.setDate(Ye(t.date)),t.hours!=null&&n.setHours(Ye(t.hours)),t.minutes!=null&&n.setMinutes(Ye(t.minutes)),t.seconds!=null&&n.setSeconds(Ye(t.seconds)),t.milliseconds!=null&&n.setMilliseconds(Ye(t.milliseconds)),n)}function _g(e,t){Oe(2,arguments);var n=Pe(e),r=Ye(t);return n.setHours(r),n}function bg(e,t){Oe(2,arguments);var n=Pe(e),r=Ye(t);return n.setMinutes(r),n}function cc(e,t){Oe(2,arguments);var n=Pe(e),r=Ye(t),i=Math.floor(n.getMonth()/3)+1,o=r-i;return pr(n,n.getMonth()+o*3)}function Ihe(e,t){Oe(2,arguments);var n=Pe(e),r=Ye(t);return n.setSeconds(r),n}function Io(e,t){Oe(2,arguments);var n=Pe(e),r=Ye(t);return isNaN(n.getTime())?new Date(NaN):(n.setFullYear(r),n)}function Cu(e,t){Oe(2,arguments);var n=Ye(t);return bi(e,-n)}function Fhe(e,t){Oe(2,arguments);var n=Ye(t);return L8(e,-n)}function $he(e,t){Oe(2,arguments);var n=Ye(t);return hT(e,-n)}function wh(e,t){Oe(2,arguments);var n=Ye(t);return Su(e,-n)}const K8="yyyy-MM-dd",ST="yyyy-MM-dd HH:mm",ds=()=>new Date,ET=e=>typeof e!="string",TT=(e,t)=>!e||!ET(e)?e:t?Tu(e,t):mfe(e),fs=e=>TT(e,void 0),Xs=e=>TT(e,K8),ey=e=>TT(e,ST),Bi=e=>ET(e)?e:ra(e),Jh=(e,t,n)=>{try{return Ou(Bi(e),{start:Bi(t??e),end:Bi(n??e)})}catch{return!1}},Ns=(e,t)=>z8(e,t)||Ui(e,t),ep="all",Q8={today:"Today",yesterday:"Yesterday",last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",last180Days:"Last 180 days",last365Days:"Last 365 days",[ep]:void 0},X8=Object.keys(Q8),J8=e=>e===void 0||qi(g8(Boolean,e)),ty=e=>typeof e=="string"&&X8.includes(e),Uhe=X8.filter(e=>e!==ep),DM=e=>e?Bi(e):null,eF=(e,t)=>({startDate:DM(e),endDate:DM(t)}),Bhe=e=>{if(!(!e||J8(e)))return e.startDate&&!e.endDate?`Since ${Xs(e.startDate)}`:!e.startDate&&e.endDate?`Until ${Xs(e.endDate)}`:`${Xs(e.startDate)} - ${Xs(e.endDate)}`},tF=e=>{if(!(!e||e===ep))return ty(e)?Q8[e]:Bhe(e)},li=e=>Hr(xT(ds(),e)),uc=e=>({startDate:e,endDate:El(ds())}),Rs=e=>t=>e===t,nF=uT([[Rs("today"),()=>uc(Hr(ds()))],[Rs("yesterday"),()=>({startDate:li(1),endDate:El(xT(ds(),1))})],[Rs("last7Days"),()=>uc(li(7))],[Rs("last30Days"),()=>uc(li(30))],[Rs("last90Days"),()=>uc(li(90))],[Rs("last180Days"),()=>uc(li(180))],[Rs("last365Days"),()=>uc(li(365))],[o8,()=>({})]]),zhe=e=>{const t=Bi(e);return uT([[()=>Ns(Hr(ds()),t),()=>"today"],[()=>Ns(li(1),t),()=>"yesterday"],[()=>Ns(li(7),t),()=>"last7Days"],[()=>Ns(li(30),t),()=>"last30Days"],[()=>Ns(li(90),t),()=>"last90Days"],[()=>Ns(li(180),t),()=>"last180Days"],[()=>Ns(li(365),t),()=>"last365Days"],[o8,()=>ep]])()},Vhe=e=>ty(e)?nF(e):e,Nr=(e,t)=>Z6(e,t,{serializeError:Pce}),tp=Rn("shlink/visitCreation/createNewVisits",e=>({payload:{createdVisits:e}})),IM=5e3,FM=4,$M=2,Hhe=({currentPage:e,pagesCount:t})=>e>=t,Whe=(e,t)=>t*100/e,np=({typePrefix:e,createLoaders:t,getExtraFulfilledPayload:n,shouldCancel:r})=>{const i=Rn(`${e}/progressChanged`),o=Rn(`${e}/large`),a=Rn(`${e}/fallbackToInterval`),s=Nr(e,async(l,{getState:c,dispatch:d})=>{var f;const[p,m]=t(l),v=async S=>Promise.all(S.map(async E=>p(E,IM).then(mt("data")))).then(rue),y=async(S,E=0)=>{if(r(c))return[];const O=await v(S[E]);return d(i(Whe(S.length,E+$M))),E{const{pagination:E,data:O}=await p(S,IM);if(!E||Hhe(E))return O;const k=dT($M,E.pagesCount+1),j=gh(FM,k);return E.pagesCount-1>FM&&d(o()),O.concat(await y(j))},[_,w]=await Promise.all([x(),m((f=l.query)==null?void 0:f.excludeBots)]);return!_.length&&w&&d(a(zhe(w.date))),{...n(l),visits:_}});return Object.assign(s,{progressChanged:i,large:o,fallbackToInterval:a})},rp=(e,t)=>async n=>e?t({page:1,itemsPerPage:1,excludeBots:n}).then(({data:r})=>r[0]):Promise.resolve(void 0),ip=({name:e,asyncThunkCreator:t,initialState:n,filterCreatedVisits:r})=>{const{pending:i,rejected:o,fulfilled:a,large:s,progressChanged:l,fallbackToInterval:c}=t,{reducer:d,actions:f}=lr({name:e,initialState:n,reducers:{cancelGetVisits:m=>({...m,cancelLoad:!0})},extraReducers:m=>{m.addCase(i,()=>({...n,loading:!0})),m.addCase(o,(v,{error:y})=>({...n,error:!0,errorData:pa(y)})),m.addCase(a,(v,{payload:y})=>({...v,...y,loading:!1,loadingLarge:!1,error:!1})),m.addCase(s,v=>({...v,loadingLarge:!0})),m.addCase(l,(v,{payload:y})=>({...v,progress:y})),m.addCase(c,(v,{payload:y})=>({...v,fallbackInterval:y})),m.addCase(tp,(v,{payload:y})=>{const{visits:x}=v,_=r(v,y.createdVisits).map(({visit:w})=>w);return _.length?{...v,visits:[..._,...x]}:v})}}),{cancelGetVisits:p}=f;return{reducer:d,cancelGetVisits:p}},rF="shlink/domainVisits",iF="DEFAULT",Yhe={visits:[],domain:"",loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},Ghe=e=>np({typePrefix:`${rF}/getDomainVisits`,createLoaders:({domain:t,query:n={},doIntervalFallback:r=!1})=>{const i=e(),o=async(s,l)=>i.getDomainVisits(t,{...n,page:s,itemsPerPage:l}),a=rp(r,async s=>i.getDomainVisits(t,s));return[o,a]},getExtraFulfilledPayload:({domain:t,query:n={}})=>({domain:t,query:n}),shouldCancel:t=>t().domainVisits.cancelLoad}),qhe=e=>ip({name:rF,initialState:Yhe,asyncThunkCreator:e,filterCreatedVisits:({domain:t,query:n={}},r)=>{const{startDate:i,endDate:o}=n;return r.filter(({shortUrl:a,visit:s})=>a&&Bue(a,t)&&Jh(s.date,i,o))}}),wg=({className:e="",placement:t,children:n})=>{const r=ys();return g.jsxs(g.Fragment,{children:[g.jsx("span",{className:e,ref:r,children:g.jsx(Ne,{icon:BS})}),g.jsx(Rr,{target:r,placement:t,children:n})]})},OT=e=>Vr(t=>t.preventDefault(),e),CT=(e,t,n=1)=>dT(n,e+1).map(t),uo=e=>!Wu(e)&&!qi(e),Ob=e=>qi(e)?null:e,oF=e=>e?"true":"false",Cb=e=>e===void 0?void 0:oF(e),kb=({isLast:e,...t})=>g.jsx(ag,{...t,required:!1,type:"url",placeholder:"No redirect",className:e?"mb-0":""}),Zhe=({isOpen:e,toggle:t,domain:n,editDomainRedirects:r})=>{var i,o,a;const[s,l]=I.useState(((i=n.redirects)==null?void 0:i.baseUrlRedirect)??""),[c,d]=I.useState(((o=n.redirects)==null?void 0:o.regular404Redirect)??""),[f,p]=I.useState(((a=n.redirects)==null?void 0:a.invalidShortUrlRedirect)??""),m=OT(async()=>r({domain:n.domain,redirects:{baseUrlRedirect:Ob(s),regular404Redirect:Ob(c),invalidShortUrlRedirect:Ob(f)}}).then(t));return g.jsx(ua,{isOpen:e,toggle:t,centered:!0,children:g.jsxs("form",{name:"domainRedirectsModal",onSubmit:m,children:[g.jsxs(da,{toggle:t,children:["Edit redirects for ",g.jsx("b",{children:n.domain})]}),g.jsxs(Eo,{children:[g.jsxs(kb,{value:s,onChange:l,children:[g.jsxs(wg,{className:"me-2",placement:"bottom",children:["Visitors accessing the base url, as in ",g.jsxs("b",{children:["https://",n.domain,"/"]}),", will be redirected to this URL."]}),"Base URL"]}),g.jsxs(kb,{value:c,onChange:d,children:[g.jsxs(wg,{className:"me-2",placement:"bottom",children:["Visitors accessing a url not matching a short URL pattern, as in ",g.jsxs("b",{children:["https://",n.domain,"/???/[...]"]}),", will be redirected to this URL."]}),"Regular 404"]}),g.jsxs(kb,{value:f,isLast:!0,onChange:p,children:[g.jsx(wg,{className:"me-2",placement:"bottom",children:"Visitors accessing a url matching a short URL pattern, but not matching an existing short code, will be redirected to this URL."}),"Invalid short URL"]})]}),g.jsxs(Al,{children:[g.jsx(yt,{color:"link",type:"button",onClick:t,children:"Cancel"}),g.jsx(yt,{color:"primary",children:"Save"})]})]})})},Khe=({domain:e,editDomainRedirects:t})=>{const[n,r]=Sn(),i=Xh("domainVisits"),o=Fl();return g.jsxs(s0,{children:[i&&g.jsxs(Ue,{tag:It,to:`${o}/domain/${e.domain}${e.isDefault?`_${iF}`:""}/visits`,children:[g.jsx(Ne,{icon:US,fixedWidth:!0})," Visit stats"]}),g.jsxs(Ue,{onClick:r,children:[g.jsx(Ne,{fixedWidth:!0,icon:$S})," Edit redirects"]}),g.jsx(Zhe,{domain:e,isOpen:n,toggle:r,editDomainRedirects:t})]})},Wo=({href:e,children:t,rel:n,...r})=>g.jsx("a",{target:"_blank",rel:`noopener noreferrer${n?` ${n}`:""}`,href:e,...r,children:t??e}),Qhe="Left",Xhe="Right",Jhe="Up",epe="Down",Rc={delta:10,preventScrollOnSwipe:!1,rotationAngle:0,trackMouse:!1,trackTouch:!0,swipeDuration:1/0,touchEventOptions:{passive:!0}},r2={first:!0,initial:[0,0],start:0,swiping:!1,xy:[0,0]},UM="mousemove",BM="mouseup",tpe="touchend",npe="touchmove",rpe="touchstart";function ipe(e,t,n,r){return e>t?n>0?Xhe:Qhe:r>0?epe:Jhe}function zM(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 ope(e,t){const n=c=>{const d="touches"in c;d&&c.touches.length>1||e((f,p)=>{p.trackMouse&&!d&&(document.addEventListener(UM,r),document.addEventListener(BM,a));const{clientX:m,clientY:v}=d?c.touches[0]:c,y=zM([m,v],p.rotationAngle);return p.onTouchStartOrOnMouseDown&&p.onTouchStartOrOnMouseDown({event:c}),Object.assign(Object.assign(Object.assign({},f),r2),{initial:y.slice(),xy:y,start:c.timeStamp||0})})},r=c=>{e((d,f)=>{const p="touches"in c;if(p&&c.touches.length>1)return d;if(c.timeStamp-d.start>f.swipeDuration)return d.swiping?Object.assign(Object.assign({},d),{swiping:!1}):d;const{clientX:m,clientY:v}=p?c.touches[0]:c,[y,x]=zM([m,v],f.rotationAngle),_=y-d.xy[0],w=x-d.xy[1],S=Math.abs(_),E=Math.abs(w),O=(c.timeStamp||0)-d.start,k=Math.sqrt(S*S+E*E)/(O||1),j=[_/(O||1),w/(O||1)],A=ipe(S,E,_,w),U=typeof f.delta=="number"?f.delta:f.delta[A.toLowerCase()]||Rc.delta;if(S{e((d,f)=>{let p;if(d.swiping&&d.eventData){if(c.timeStamp-d.start{document.removeEventListener(UM,r),document.removeEventListener(BM,a)},a=c=>{o(),i(c)},s=(c,d)=>{let f=()=>{};if(c&&c.addEventListener){const p=Object.assign(Object.assign({},Rc.touchEventOptions),d.touchEventOptions),m=[[rpe,n,p],[npe,r,Object.assign(Object.assign({},p),d.preventScrollOnSwipe?{passive:!1}:{})],[tpe,i,p]];m.forEach(([v,y,x])=>c.addEventListener(v,y,x)),f=()=>m.forEach(([v,y])=>c.removeEventListener(v,y))}return f},l={ref:c=>{c!==null&&e((d,f)=>{if(d.el===c)return d;const p={};return d.el&&d.el!==c&&d.cleanUpTouch&&(d.cleanUpTouch(),p.cleanUpTouch=void 0),f.trackTouch&&c&&(p.cleanUpTouch=s(c,f)),Object.assign(Object.assign(Object.assign({},d),{el:c}),p)})}};return t.trackMouse&&(l.onMouseDown=n),[l,s]}function ape(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 spe(e){const{trackMouse:t}=e,n=I.useRef(Object.assign({},r2)),r=I.useRef(Object.assign({},Rc)),i=I.useRef(Object.assign({},r.current));i.current=Object.assign({},r.current),r.current=Object.assign(Object.assign({},Rc),e);let o;for(o in Rc)r.current[o]===void 0&&(r.current[o]=Rc[o]);const[a,s]=I.useMemo(()=>ope(l=>n.current=l(n.current,r.current),{trackMouse:t}),[t]);return n.current=ape(n.current,r.current,i.current,s),a}const lpe=(e,t)=>{const n=r=>i=>{i.event.composedPath().some(({classList:o})=>o==null?void 0:o.contains("visits-table"))||document.querySelector(".modal")||r()};return spe({delta:40,onSwipedLeft:n(t),onSwipedRight:n(e)})},cpe=(e,t)=>{const[n,r]=I.useState(t),i=I.useCallback(o=>{const{location:a,history:s}=window,l=zu(a.search);l[e]=o,s.pushState(null,"",`${a.pathname}?${c0(l)}`),r(o)},[e]);return[n,i]},upe=(e,t)=>{const n=I.useRef(!0);I.useEffect(()=>{!n.current&&e(),n.current=!1},t)},Yu=()=>{const e=So();return I.useCallback(()=>e(-1),[e])},aF=()=>{const{search:e}=En();return I.useMemo(()=>zu(e),[e])},sF=(e,t)=>{const n=I.useCallback(()=>t(`(max-width: ${e}px)`).matches,[t,e]),[r,i]=I.useState(n());return I.useEffect(()=>{const o=()=>i(n());return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[n]),r},dpe=({status:e,matchMedia:t=window.matchMedia})=>{const n=ys(),r=sF(991,t);return e==="validating"?g.jsx(Ne,{fixedWidth:!0,icon:DD,spin:!0}):g.jsxs(g.Fragment,{children:[g.jsx("span",{ref:n,children:e==="valid"?g.jsx(Ne,{fixedWidth:!0,icon:Yf,className:"text-muted"}):g.jsx(Ne,{fixedWidth:!0,icon:q1,className:"text-danger"})}),g.jsx(Rr,{target:n,placement:r?"right":"left",autohide:e==="valid",children:e==="valid"?"Congratulations! This domain is properly configured.":g.jsxs("span",{children:["Oops! There is some missing configuration, and short URLs shared with this domain will not work.",g.jsx("br",{}),"Check the ",g.jsx(Wo,{href:"https://slnk.to/multi-domain-docs",children:"documentation"})," in order to find out what is missing."]})})]})},Pb=({fallback:e})=>g.jsxs("span",{className:"text-muted",children:[!e&&g.jsx("small",{children:"No redirect"}),e&&g.jsxs(g.Fragment,{children:[e," ",g.jsx("small",{children:"(as fallback)"})]})]}),fpe=()=>g.jsxs(g.Fragment,{children:[g.jsx(Ne,{fixedWidth:!0,icon:RW,className:"text-primary",id:"defaultDomainIcon"}),g.jsx(Rr,{target:"defaultDomainIcon",placement:"right",children:"Default domain"})]}),hpe=({domain:e,editDomainRedirects:t,checkDomainHealth:n,defaultRedirects:r})=>{const{domain:i,isDefault:o,redirects:a,status:s}=e;return I.useEffect(()=>{n(e.domain)},[n,e.domain]),g.jsxs("tr",{className:"responsive-table__row",children:[g.jsx("td",{className:"responsive-table__cell","data-th":"Is default domain",children:o&&g.jsx(fpe,{})}),g.jsx("th",{className:"responsive-table__cell","data-th":"Domain",children:i}),g.jsx("td",{className:"responsive-table__cell","data-th":"Base path redirect",children:(a==null?void 0:a.baseUrlRedirect)??g.jsx(Pb,{fallback:r==null?void 0:r.baseUrlRedirect})}),g.jsx("td",{className:"responsive-table__cell","data-th":"Regular 404 redirect",children:(a==null?void 0:a.regular404Redirect)??g.jsx(Pb,{fallback:r==null?void 0:r.regular404Redirect})}),g.jsx("td",{className:"responsive-table__cell","data-th":"Invalid short URL redirect",children:(a==null?void 0:a.invalidShortUrlRedirect)??g.jsx(Pb,{fallback:r==null?void 0:r.invalidShortUrlRedirect})}),g.jsx("td",{className:"responsive-table__cell text-lg-center","data-th":"Status",children:g.jsx(dpe,{status:s})}),g.jsx("td",{className:"responsive-table__cell text-end",children:g.jsx(Khe,{domain:e,editDomainRedirects:t})})]})},VM=[{value:"Is default domain",isHidden:!0},{value:"Domain",isHidden:!1},{value:"Base path redirect",isHidden:!1},{value:"Regular 404 redirect",isHidden:!1},{value:"Invalid short URL redirect",isHidden:!1},{value:"Domain status",isHidden:!0},{value:"Options",isHidden:!0}],ppe=({listDomains:e,domainsList:t,filterDomains:n,editDomainRedirects:r,checkDomainHealth:i})=>{var o;const{filteredDomains:a,defaultRedirects:s,loading:l,error:c,errorData:d}=t,f=s??((o=a.find(({isDefault:p})=>p))==null?void 0:o.redirects);return I.useEffect(()=>{e()},[e]),l?g.jsx(Ho,{loading:!0}):g.jsxs(g.Fragment,{children:[g.jsx(Hh,{className:"mb-3",onChange:n}),(()=>c?g.jsx(zr,{type:"error",children:g.jsx(na,{errorData:d,fallbackMessage:"Error loading domains :("})}):g.jsx(mn,{children:g.jsxs("table",{className:"table table-hover responsive-table mb-0",children:[g.jsx("thead",{className:"responsive-table__header",children:g.jsx("tr",{children:VM.map((p,m)=>g.jsx("th",{children:g.jsx("span",{className:p.isHidden?"sr-only":void 0,children:p.value})},m))})}),g.jsxs("tbody",{children:[a.length<1&&g.jsx("tr",{children:g.jsx("td",{colSpan:VM.length,className:"text-center",children:"No results found"})}),a.map(p=>g.jsx(hpe,{domain:p,editDomainRedirects:r,checkDomainHealth:i,defaultRedirects:f},p.domain))]})]})}))()]})},mpe="shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS",gpe=e=>Nr(mpe,async({domain:t,redirects:n})=>{const r=await e().editDomainRedirects({domain:t,...n});return{domain:t,redirects:r}}),jm="shlink/domainsList",Mm={domains:[],filteredDomains:[],loading:!1,error:!1},HM=({domain:e,redirects:t})=>n=>n.domain!==e?n:{...n,redirects:t},WM=(e,t)=>n=>n.domain!==e?n:{...n,status:t},vpe=(e,t)=>{const n=Nr(`${jm}/listDomains`,async()=>{const{data:a,defaultRedirects:s}=await e().listDomains();return{domains:a.map(l=>({...l,status:"validating"})),defaultRedirects:s}}),r=Nr(`${jm}/checkDomainHealth`,async a=>{try{const{status:s}=await e().health(a);return{domain:a,status:s==="pass"?"valid":"invalid"}}catch{return{domain:a,status:"invalid"}}}),i=Rn(`${jm}/filterDomains`),{reducer:o}=lr({name:jm,initialState:Mm,reducers:{},extraReducers:a=>{a.addCase(n.pending,()=>({...Mm,loading:!0})),a.addCase(n.rejected,(s,{error:l})=>({...Mm,error:!0,errorData:pa(l)})),a.addCase(n.fulfilled,(s,{payload:l})=>({...Mm,...l,filteredDomains:l.domains})),a.addCase(r.fulfilled,({domains:s,filteredDomains:l,...c},{payload:d})=>({...c,domains:s.map(WM(d.domain,d.status)),filteredDomains:l.map(WM(d.domain,d.status))})),a.addCase(i,(s,{payload:l})=>({...s,filteredDomains:s.domains.filter(({domain:c})=>c.toLowerCase().match(l.toLowerCase()))})),a.addCase(t.fulfilled,(s,{payload:l})=>({...s,domains:s.domains.map(HM(l)),filteredDomains:s.filteredDomains.map(HM(l))}))}});return{reducer:o,listDomains:n,checkDomainHealth:r,filterDomains:i}},ype=(e,t)=>{e.serviceFactory("DomainSelector",()=>kue),e.decorator("DomainSelector",t(["domainsList"],["listDomains"])),e.serviceFactory("ManageDomains",()=>ppe),e.decorator("ManageDomains",t(["domainsList"],["listDomains","filterDomains","editDomainRedirects","checkDomainHealth"])),e.serviceFactory("domainsListReducerCreator",vpe,"apiClientFactory","editDomainRedirects"),e.serviceFactory("domainsListReducer",mt("reducer"),"domainsListReducerCreator"),e.serviceFactory("listDomains",mt("listDomains"),"domainsListReducerCreator"),e.serviceFactory("filterDomains",mt("filterDomains"),"domainsListReducerCreator"),e.serviceFactory("editDomainRedirects",gpe,"apiClientFactory"),e.serviceFactory("checkDomainHealth",mt("checkDomainHealth"),"domainsListReducerCreator")},YM="shlink/mercure",_pe={loading:!0,error:!1},bpe=e=>{const t=Nr(`${YM}/loadMercureInfo`,r=>{if(r&&r.realTimeUpdates&&!r.realTimeUpdates.enabled)throw new Error("Real time updates not enabled");return e().mercureInfo()}),{reducer:n}=lr({name:YM,initialState:_pe,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}},wpe=e=>{e.serviceFactory("mercureInfoReducerCreator",bpe,"apiClientFactory"),e.serviceFactory("mercureInfoReducer",mt("reducer"),"mercureInfoReducerCreator"),e.serviceFactory("loadMercureInfo",mt("loadMercureInfo"),"mercureInfoReducerCreator")};function Kt(e){return I.useRef(e).current}function Qt(e,t){return(n,r=globalThis.console)=>(t.forEach(i=>{const o=n[i];e[i]=o}),e)}var Ac=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Gu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var i2={exports:{}};/** @license * eventsource.js * Available under MIT License (MIT) * https://github.com/Yaffle/EventSource/ @@ -901,23 +901,23 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `.charCodeAt(0)||zn==="\r".charCodeAt(0))&&(on=ur)}var Vn=(on!==-1?Zi:"")+fn.slice(0,on+1);Zi=(on===-1?Zi:"")+fn.slice(on+1),fn!==""&&(ye=Date.now(),ve+=fn.length);for(var vn=0;vn"u"?typeof window<"u"?window:typeof self<"u"?self:Ac:globalThis)})(i2,i2.exports);var wpe=i2.exports;const xpe=(e,t,n,r)=>{const{mercureHubUrl:i,token:o,loading:a,error:s}=e;if(a||s||!i)return;const l=({data:f})=>n(JSON.parse(f)),c=({status:f})=>f===401&&r(),d=t.map(f=>{const p=new URL(i);p.searchParams.append("topic",f);const m=new wpe.EventSourcePolyfill(p,{headers:{Authorization:`Bearer ${o}`}});return m.onmessage=l,m.onerror=c,m});return()=>d.forEach(f=>f.close())};function ws(e,t){const n=new Set;return r=>{const{createNewVisits:i,loadMercureInfo:o,mercureInfo:a}=r,s=Rl();return I.useEffect(()=>{const{interval:l}=a,c=m=>l?n.add(m):i([m]),d=t(s),f=xpe(a,d,c,o);if(!l)return f;const p=setInterval(()=>{i([...n]),n.clear()},l*1e3*60);return Vr(()=>clearInterval(p),()=>f==null?void 0:f())},[i,o,a,s]),g.jsx(e,{...r})}}class pi{}Te(pi,"visits","https://shlink.io/new-visit"),Te(pi,"orphanVisits","https://shlink.io/new-orphan-visit"),Te(pi,"shortUrlVisits",e=>`https://shlink.io/new-visit/${e}`);const kT="shlink/shortUrlDeletion",GM={shortCode:"",loading:!1,deleted:!1,error:!1},Spe=e=>Nr(`${kT}/deleteShortUrl`,async({shortCode:t,domain:n})=>(await e().deleteShortUrl(t,n),{shortCode:t,domain:n})),lF=Rn(`${kT}/shortUrlDeleted`),Epe=e=>{const{actions:t,reducer:n}=lr({name:kT,initialState:GM,reducers:{resetDeleteShortUrl:()=>GM},extraReducers:i=>{i.addCase(e.pending,o=>({...o,loading:!0,error:!1,deleted:!1})),i.addCase(e.rejected,(o,{error:a})=>({...o,errorData:pa(a),loading:!1,error:!0,deleted:!1})),i.addCase(e.fulfilled,(o,{payload:a})=>({...o,shortCode:a.shortCode,loading:!1,error:!1,deleted:!0}))}}),{resetDeleteShortUrl:r}=t;return{reducer:n,resetDeleteShortUrl:r}},cF="shlink/shortUrlsList",uF=5,Tpe={loading:!0,error:!1},Ope=e=>Nr(`${cF}/listShortUrls`,t=>e().listShortUrls(t??{})),Cpe=(e,t,n)=>lr({name:cF,initialState:Tpe,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,Vr((i,{payload:o})=>i.shortUrls?sc(["shortUrls","data"],[o,...i.shortUrls.data.slice(0,uF-1)],i):i,i=>i.shortUrls?sc(["shortUrls","pagination","totalItems"],i.shortUrls.pagination.totalItems+1,i):i)),r.addCase(t.fulfilled,(i,{payload:o})=>i.shortUrls?sc(["shortUrls","data"],i.shortUrls.data.map(a=>{const{shortCode:s,domain:l}=o;return xf(a,s,l)?o:a}),i):i),r.addCase(lF,Vr((i,{payload:o})=>i.shortUrls?sc(["shortUrls","data"],cT(a=>xf(a,o.shortCode,o.domain),i.shortUrls.data),i):i,i=>i.shortUrls?sc(["shortUrls","pagination","totalItems"],i.shortUrls.pagination.totalItems-1,i):i)),r.addCase(tp,(i,{payload:o})=>{var a,s;return sc(["shortUrls","data"],(s=(a=i.shortUrls)==null?void 0:a.data)==null?void 0:s.map(l=>{var c;return((c=Xce(o.createdVisits.filter(({shortUrl:d})=>d&&xf(l,d.shortCode,d.domain))))==null?void 0:c.shortUrl)??l}),i)})}}),qM=10,{ceil:kpe}=Math,Ppe=new Intl.NumberFormat("en-US"),wn=e=>Ppe.format(Number(e)),Lpe=e=>kpe(e/qM)*qM,jpe={field:"dateCreated",dir:"DESC"},dF={realTimeUpdates:{enabled:!0},shortUrlCreation:{validateUrls:!1},visits:{defaultInterval:"last30Days"},shortUrlsList:{defaultOrdering:jpe}},fF=I.createContext(dF),Mpe=fF.Provider,PT=()=>I.useContext(fF)??dF,Ul=e=>PT()[e],o2=({children:e,title:t,link:n,tooltip:r})=>{const i=ys();return g.jsxs(g.Fragment,{children:[g.jsxs(Gr,{innerRef:i,className:"highlight-card",body:!0,tag:It,to:n,children:[g.jsx(Ne,{size:"3x",className:"highlight-card__link-icon",icon:cre}),g.jsx(JI,{className:"lh-sm fw-semibold text-uppercase fs-5 highlight-card__title",children:t}),g.jsx(XI,{className:"fs-2 fw-semibold lh-sm",children:e})]}),r&&g.jsx(Rr,{target:i,placement:"bottom",children:r})]})},ZM=({loading:e,excludeBots:t,visitsSummary:n,...r})=>g.jsx(o2,{tooltip:n.bots!==void 0?g.jsxs(g.Fragment,{children:[t?"Plus":"Including"," ",g.jsx("strong",{children:wn(n.bots)})," potential bot visits"]}):void 0,...r,children:e?"Loading...":wn(t&&n.nonBots?n.nonBots:n.total)}),hF=ws(({shortUrlsList:e,listShortUrls:t,tagsList:n,loadVisitsOverview:r,visitsOverview:i})=>{const{ShortUrlsTable:o,CreateShortUrl:a}=Kt(hF),{loading:s,shortUrls:l}=e,{loading:c}=n,{loading:d,nonOrphanVisits:f,orphanVisits:p}=i,m=Fl(),v=So(),y=Ul("visits");return I.useEffect(()=>{t({itemsPerPage:uF,orderBy:{field:"dateCreated",dir:"DESC"}}),r()},[t,r]),g.jsxs(g.Fragment,{children:[g.jsxs(gr,{children:[g.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:g.jsx(ZM,{title:"Visits",link:`${m}/non-orphan-visits`,excludeBots:(y==null?void 0:y.excludeBots)??!1,loading:d,visitsSummary:f})}),g.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:g.jsx(ZM,{title:"Orphan visits",link:`${m}/orphan-visits`,excludeBots:(y==null?void 0:y.excludeBots)??!1,loading:d,visitsSummary:p})}),g.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:g.jsx(o2,{title:"Short URLs",link:`${m}/list-short-urls/1`,children:s?"Loading...":wn((l==null?void 0:l.pagination.totalItems)??0)})}),g.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:g.jsx(o2,{title:"Tags",link:`${m}/manage-tags`,children:c?"Loading...":wn(n.tags.length)})})]}),g.jsxs(Gr,{className:"mb-3",children:[g.jsxs(hu,{children:[g.jsx("span",{className:"d-sm-none",children:"Create a short URL"}),g.jsx("h5",{className:"d-none d-sm-inline",children:"Create a short URL"}),g.jsx(It,{className:"float-end",to:`${m}/create-short-url`,children:"Advanced options »"})]}),g.jsx(fu,{children:g.jsx(a,{basicMode:!0})})]}),g.jsxs(Gr,{children:[g.jsxs(hu,{children:[g.jsx("span",{className:"d-sm-none",children:"Recently created URLs"}),g.jsx("h5",{className:"d-none d-sm-inline",children:"Recently created URLs"}),g.jsx(It,{className:"float-end",to:`${m}/list-short-urls/1`,children:"See all »"})]}),g.jsx(fu,{children:g.jsx(o,{shortUrlsList:e,className:"mb-0",onTagClick:x=>v(`${m}/list-short-urls/1?tags=${encodeURIComponent(x)}`)})})]})]})},()=>[pi.visits,pi.orphanVisits]),Npe=Qt(hF,["ShortUrlsTable","CreateShortUrl"]);function Rpe(e,t){e.factory("Overview",Npe),e.decorator("Overview",t(["shortUrlsList","tagsList","mercureInfo","visitsOverview"],["listShortUrls","createNewVisits","loadMercureInfo","loadVisitsOverview"]))}const Ape=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}),pF=({createShortUrl:e,shortUrlCreation:t,resetCreateShortUrl:n,basicMode:r=!1})=>{const{ShortUrlForm:i,CreateShortUrlResult:o}=Kt(pF),a=Ul("shortUrlCreation"),s=I.useMemo(()=>Ape(a),[a]);return g.jsxs(g.Fragment,{children:[g.jsx(i,{initialState:s,saving:t.saving,mode:r?"create-basic":"create",onSave:async l=>(n(),e(l))}),g.jsx(o,{creation:t,resetCreateShortUrl:n,canBeClosed:r})]})},Dpe=Qt(pF,["ShortUrlForm","CreateShortUrlResult"]),mF=({shortUrlDetail:e,getShortUrlDetail:t,shortUrlEdition:n,editShortUrl:r})=>{const{ShortUrlForm:i}=Kt(mF),{search:o}=En(),a=Rl(),s=Yu(),{loading:l,error:c,errorData:d,shortUrl:f}=e,{saving:p,saved:m,error:v,errorData:y}=n,{domain:x}=zu(o),_=Ul("shortUrlCreation"),w=I.useMemo(()=>Bue(f,_),[f,_]);return I.useEffect(()=>{a.shortCode&&t({shortCode:vg(a.shortCode),domain:x})},[x,t,a.shortCode]),l?g.jsx(Ho,{loading:!0}):c?g.jsx(zr,{type:"error",children:g.jsx(na,{errorData:d,fallbackMessage:"An error occurred while loading short URL detail :("})}):g.jsxs(g.Fragment,{children:[g.jsx("header",{className:"mb-3",children:g.jsx(Gr,{body:!0,children:g.jsxs("h2",{className:"d-sm-flex justify-content-between align-items-center mb-0",children:[g.jsx(yt,{color:"link",size:"lg",className:"p-0 me-3",onClick:s,"aria-label":"Go back",children:g.jsx(Ne,{icon:$D})}),g.jsx("span",{className:"text-center",children:g.jsxs("small",{children:["Edit ",g.jsx(Wo,{href:(f==null?void 0:f.shortUrl)??""})]})}),g.jsx("span",{})]})})}),g.jsx(i,{initialState:w,saving:p,mode:"edit",onSave:async S=>{f&&r({...f,data:S})}}),m&&v&&g.jsx(zr,{type:"error",className:"mt-3",children:g.jsx(na,{errorData:y,fallbackMessage:"An error occurred while updating short URL :("})}),m&&!v&&g.jsx(zr,{type:"success",className:"mt-3",children:"Short URL properly edited."})]})},Ipe=Qt(mF,["ShortUrlForm"]);var x0={},Fpe=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var f=KM[t.format]||KM.default;window.clipboardData.setData(f,e)}else d.clipboardData.clearData(),d.clipboardData.setData(t.format,e);t.onCopy&&(d.preventDefault(),t.onCopy(d.clipboardData))}),document.body.appendChild(s),o.selectNodeContents(s),a.addRange(o);var c=document.execCommand("copy");if(!c)throw new Error("copy command was unsuccessful");l=!0}catch(d){n&&console.error("unable to copy using execCommand: ",d),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),l=!0}catch(f){n&&console.error("unable to copy using clipboardData: ",f),n&&console.error("falling back to prompt"),r=Bpe("message"in t?t.message:Upe),window.prompt(r,e)}}finally{a&&(typeof a.removeRange=="function"?a.removeRange(o):a.removeAllRanges()),s&&document.body.removeChild(s),i()}return l}var Vpe=zpe;function a2(e){"@babel/helpers - typeof";return a2=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},a2(e)}Object.defineProperty(x0,"__esModule",{value:!0});x0.CopyToClipboard=void 0;var Nm=gF(Y),Hpe=gF(Vpe),Wpe=["text","onCopy","options","children"];function gF(e){return e&&e.__esModule?e:{default:e}}function QM(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 XM(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Gpe(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 qpe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function JM(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ny(e){return ny=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ny(e)}function LT(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var yF=function(e){Kpe(n,e);var t=Qpe(n);function n(){var r;qpe(this,n);for(var i=arguments.length,o=new Array(i),a=0;a{const{useTimeoutToggle:r}=Kt(bF),[i,o]=r(),{error:a,saved:s}=e;if(I.useEffect(()=>{t()},[t]),a)return g.jsxs(zr,{type:"error",className:"mt-3",children:[n&&g.jsx(Ne,{"data-testid":"error-close-button",icon:q1,className:"float-end pointer",onClick:t}),g.jsx(na,{errorData:e.errorData,fallbackMessage:"An error occurred while creating the URL :("})]});if(!s)return null;const{shortUrl:l}=e.result;return g.jsxs(zr,{type:"success",className:"mt-3",children:[n&&g.jsx(Ne,{"data-testid":"success-close-button",icon:q1,className:"float-end pointer",onClick:t}),g.jsxs("span",{children:[g.jsx("b",{children:"Great!"})," The short URL is ",g.jsx("b",{children:l})]}),g.jsx(_F,{text:l,onCopy:o,children:g.jsxs("button",{className:"btn btn-light btn-sm create-short-url-result__copy-btn",id:"copyBtn",type:"button",children:[g.jsx(Ne,{icon:K6})," Copy"]})}),g.jsx(zh,{placement:"left",isOpen:i,target:"copyBtn",children:"Copied!"})]})},nme=Qt(bF,["useTimeoutToggle"]),Lb="delete",rme=({shortUrl:e,toggle:t,isOpen:n,shortUrlDeletion:r,resetDeleteShortUrl:i,deleteShortUrl:o,shortUrlDeleted:a})=>{const[s,l]=I.useState("");I.useEffect(()=>i,[i]);const{loading:c,error:d,deleted:f,errorData:p}=r,m=Vr(i,t),v=I.useCallback(y=>(y.preventDefault(),o(e).then(t)),[o,e,t]);return g.jsx(ua,{isOpen:n,toggle:m,centered:!0,onClosed:()=>f&&a(e),children:g.jsxs("form",{onSubmit:v,children:[g.jsx(da,{toggle:m,children:g.jsx("span",{className:"text-danger",children:"Delete short URL"})}),g.jsxs(Eo,{children:[g.jsxs("p",{children:[g.jsx("b",{className:"text-danger",children:"Caution!"})," You are about to delete a short URL."]}),g.jsx("p",{children:"This action cannot be undone. Once you have deleted it, all the visits stats will be lost."}),g.jsxs("p",{children:["Write ",g.jsx("b",{children:Lb})," to confirm deletion."]}),g.jsx("input",{type:"text",className:"form-control",placeholder:`Insert ${Lb}`,value:s,onChange:y=>l(y.target.value)}),d&&g.jsx(zr,{type:Pue(p)?"warning":"error",small:!0,className:"mt-2",children:g.jsx(na,{errorData:p,fallbackMessage:"Something went wrong while deleting the URL :("})})]}),g.jsxs(Al,{children:[g.jsx("button",{type:"button",className:"btn btn-link",onClick:m,children:"Cancel"}),g.jsx("button",{type:"submit",className:"btn btn-danger",disabled:s!==Lb||c,children:c?"Deleting...":"Delete"})]})]})})},wF=({amount:e=0,loading:t=!1,...n})=>g.jsxs(yt,{...n,outline:!0,color:"primary",disabled:t,children:[g.jsx(Ne,{icon:kW})," ",t?"Exporting...":g.jsxs(g.Fragment,{children:["Export (",wn(e),")"]})]}),S0=()=>{const e=So(),t=Fl(),n=aF(),r=I.useMemo(()=>{const{orderBy:o,tags:a,excludeBots:s,excludeMaxVisitsReached:l,excludePastValidUntil:c,...d}=n,f=o?lee(o):void 0,p=(a==null?void 0:a.split(","))??[];return{...d,orderBy:f,tags:p,excludeBots:s!==void 0?s==="true":void 0,excludeMaxVisitsReached:l!==void 0?l==="true":void 0,excludePastValidUntil:c!==void 0?c==="true":void 0}},[n]),i=I.useCallback(o=>{const a={...r,...o},{orderBy:s,tags:l,excludeBots:c,excludeMaxVisitsReached:d,excludePastValidUntil:f,...p}=a,m={...p,orderBy:s&&see(s),tags:l.length>0?l.join(","):void 0,excludeBots:Cb(c),excludeMaxVisitsReached:Cb(d),excludePastValidUntil:Cb(f)},v=c0(m),y=qi(v)?"":`?${v}`;e(`${t}/list-short-urls/1${y}`)},[r,e,t]);return[r,i]},eN=20,xF=({amount:e=0})=>{const{apiClientFactory:t,ReportExporter:n}=Kt(xF),[{tags:r,search:i,startDate:o,endDate:a,orderBy:s,tagsMode:l}]=S0(),[c,,d,f]=Sn(),p=I.useCallback(async()=>{const m=e/eN,v=async(x=1)=>{const{data:_}=await t().listShortUrls({page:`${x}`,tags:r,searchTerm:i,startDate:o,endDate:a,orderBy:s,tagsMode:l,itemsPerPage:eN});return x>=m?_:_.concat(await v(x+1))};d();const y=await v();n.exportShortUrls(y.map(x=>{var _;const{hostname:w,pathname:S}=new URL(x.shortUrl),E=S.substring(1);return{createdAt:x.dateCreated,domain:w,shortCode:E,shortUrl:x.shortUrl,longUrl:x.longUrl,title:x.title??"",tags:x.tags.join("|"),visits:((_=x==null?void 0:x.visitsSummary)==null?void 0:_.total)??x.visitsCount}})),f()},[e,t,a,s,n,i,o,d,f,r,l]);return g.jsx(wF,{loading:c,className:"btn-md-block",amount:e,onClick:p})},ime=Qt(xF,["apiClientFactory","ReportExporter"]),SF=({text:e,onCopy:t})=>g.jsx(_F,{text:e,onCopy:t,children:g.jsx(Ne,{icon:K6,className:"ms-2 copy-to-clipboard-icon"})}),ome=(e,{margin:t,...n})=>{const r=`${e}/qr-code`,i=c0({...n,margin:t>0?t:void 0});return`${r}${qi(i)?"":`?${i}`}`},ame=({errorCorrection:e,setErrorCorrection:t})=>g.jsxs(fa,{text:`Error correction (${e})`,children:[g.jsxs(Ue,{active:e==="L",onClick:()=>t("L"),children:[g.jsx("b",{children:"L"}),"ow"]}),g.jsxs(Ue,{active:e==="M",onClick:()=>t("M"),children:[g.jsx("b",{children:"M"}),"edium"]}),g.jsxs(Ue,{active:e==="Q",onClick:()=>t("Q"),children:[g.jsx("b",{children:"Q"}),"uartile"]}),g.jsxs(Ue,{active:e==="H",onClick:()=>t("H"),children:[g.jsx("b",{children:"H"}),"igh"]})]}),sme=({format:e,setFormat:t})=>g.jsxs(fa,{text:`Format (${e})`,children:[g.jsx(Ue,{active:e==="png",onClick:()=>t("png"),children:"PNG"}),g.jsx(Ue,{active:e==="svg",onClick:()=>t("svg"),children:"SVG"})]}),EF=({shortUrl:{shortUrl:e,shortCode:t},toggle:n,isOpen:r})=>{const{ImageDownloader:i}=Kt(EF),[o,a]=I.useState(300),[s,l]=I.useState(0),[c,d]=I.useState("png"),[f,p]=I.useState("L"),m=I.useMemo(()=>ome(e,{size:o,format:c,margin:s,errorCorrection:f}),[e,o,c,s,f]),v=I.useMemo(()=>o+s,[o,s]),y=I.useMemo(()=>{if(!(v<500))return v<800?"lg":"xl"},[v]);return g.jsxs(ua,{isOpen:r,toggle:n,centered:!0,size:y,children:[g.jsxs(da,{toggle:n,children:["QR code for ",g.jsx(Wo,{href:e,children:e})]}),g.jsxs(Eo,{children:[g.jsxs(gr,{children:[g.jsxs(Ur,{className:"d-grid col-md-6",children:[g.jsxs("label",{htmlFor:"sizeControl",children:["Size: ",o,"px"]}),g.jsx("input",{id:"sizeControl",type:"range",className:"form-control-range",value:o,step:10,min:50,max:1e3,onChange:x=>a(Number(x.target.value))})]}),g.jsxs(Ur,{className:"d-grid col-md-6",children:[g.jsxs("label",{htmlFor:"marginControl",children:["Margin: ",s,"px"]}),g.jsx("input",{id:"marginControl",type:"range",className:"form-control-range",value:s,step:1,min:0,max:100,onChange:x=>l(Number(x.target.value))})]}),g.jsx(Ur,{className:"d-grid col-md-6",children:g.jsx(sme,{format:c,setFormat:d})}),g.jsx(Ur,{className:"col-md-6",children:g.jsx(ame,{errorCorrection:f,setErrorCorrection:p})})]}),g.jsxs("div",{className:"text-center",children:[g.jsxs("div",{className:"mb-3",children:[g.jsx(Wo,{href:m}),g.jsx(SF,{text:m})]}),g.jsx("img",{src:m,className:"qr-code-modal__img",alt:"QR code"}),g.jsx("div",{className:"mt-3",children:g.jsxs(yt,{block:!0,color:"primary",onClick:()=>{i.saveImage(m,`${t}-qr-code.${c}`).catch(()=>{})},children:["Download ",g.jsx(Ne,{icon:UD,className:"ms-1"})]})})]})]})]})},lme=Qt(EF,["ImageDownloader"]),ry=({date:e,format:t=ST,relative:n=!1})=>{const r=ET(e)?e:ra(e);return g.jsx("time",{dateTime:`${_fe(r)}000`,children:n?`${hfe(ds(),r)} ago`:Tu(r,t)})},cme=e=>{const{meta:t,visitsCount:n,visitsSummary:r}=e,{maxVisits:i,validSince:o,validUntil:a}=t,s=(r==null?void 0:r.total)??n;return i&&s>=i?{icon:_Y,className:"text-danger",description:g.jsxs(g.Fragment,{children:["This short URL cannot be currently visited because it has reached the maximum amount of ",g.jsx("b",{children:i})," visit",i>1?"s":"","."]})}:a&&Ui(Bi(a),ds())?{icon:Dk,className:"text-danger",description:g.jsxs(g.Fragment,{children:["This short URL cannot be visited since ",g.jsx("b",{className:"indivisible",children:ey(Bi(a))}),"."]})}:o&&Ui(ds(),Bi(o))?{icon:Dk,className:"text-warning",description:g.jsxs(g.Fragment,{children:["This short URL will start working on ",g.jsx("b",{className:"indivisible",children:ey(Bi(o))}),"."]})}:{icon:Yf,className:"text-primary",description:"This short URL can be visited normally."}},ume=({shortUrl:e})=>{const t=ys(),{icon:n,className:r,description:i}=cme(e);return g.jsxs(g.Fragment,{children:[g.jsx("span",{style:{cursor:i?"help":void 0},ref:t,children:g.jsx(Ne,{icon:n,className:r})}),g.jsx(Rr,{target:t,placement:"bottom",children:i})]})};var TF={exports:{}};/*! +`,Vt+=Ci):Oi==="id"?Tn=Ci:Oi==="event"?cr=Ci:Oi==="retry"?(Ce=C(Ci,Ce),fe=Ce):Oi==="heartbeatTimeout"&&(je=C(Ci,je),Ge!==0&&(i(Ge),Ge=r(function(){Ss()},je)))}if(Bn===H){if(Vt!==""){ce=Tn,cr===""&&(cr="message");var Hn=new X(cr,{data:Vt.slice(1),lastEventId:Tn});if(ue.dispatchEvent(Hn),cr==="open"?$(ue,ue.onopen,Hn):cr==="message"?$(ue,ue.onmessage,Hn):cr==="error"&&$(ue,ue.onerror,Hn),Xt===F)return}Vt="",cr=""}Bn=zn==="\r".charCodeAt(0)?D:H}else Bn===H&&(Qu=vn,Bn=ie),Bn===ie?zn===":".charCodeAt(0)&&(Ki=vn+1,Bn=z):Bn===z&&(Bn=q)}}},pp=function(fn){if(Xt===K||Xt===le){Xt=ne,Ge!==0&&(i(Ge),Ge=0),Ge=r(function(){Ss()},fe),fe=M(Math.min(Ce*16,fe*2)),ue.readyState=le;var on=new Z("error",{error:fn});ue.dispatchEvent(on),$(ue,ue.onerror,on),fn!=null&&console.error(fn)}},Xu=function(){Xt=F,tt!=null&&(tt.abort(),tt=void 0),Ge!==0&&(i(Ge),Ge=0),ue.readyState=F},Ss=function(){if(Ge=0,Xt!==ne){if(!ye&&tt!=null)pp(new Error("No activity within "+je+" milliseconds. "+(Xt===le?"No response received.":ve+" chars received.")+" Reconnecting.")),tt!=null&&(tt.abort(),tt=void 0);else{var fn=Math.max((ye||Date.now())+je-Date.now(),1);ye=!1,Ge=r(function(){Ss()},fn)}return}ye=!1,ve=0,Ge=r(function(){Ss()},je),Xt=le,Vt="",cr="",Tn=ce,Zi="",Qu=0,Ki=0,Bn=H;var on=me;if(me.slice(0,5)!=="data:"&&me.slice(0,5)!=="blob:"&&ce!==""){var ur=me.indexOf("?");on=ur===-1?me:me.slice(0,ur+1)+me.slice(ur+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(Ci,Hn){return Hn===ke?"":Ci}),on+=(me.indexOf("?")===-1?"?":"&")+ke+"="+encodeURIComponent(ce)}var zn=ue.withCredentials,Vn={};Vn.Accept="text/event-stream";var vn=ue.headers;if(vn!=null)for(var Oi in vn)Object.prototype.hasOwnProperty.call(vn,Oi)&&(Vn[Oi]=vn[Oi]);try{tt=Xe.open(Ae,fp,hp,pp,on,zn,Vn)}catch(Ci){throw Xu(),Ci}};ue.url=me,ue.readyState=le,ue.withCredentials=Se,ue.headers=xe,ue._close=Xu,Ss()}J.prototype=Object.create(R.prototype),J.prototype.CONNECTING=le,J.prototype.OPEN=K,J.prototype.CLOSED=F,J.prototype.close=function(){this._close()},J.CONNECTING=le,J.OPEN=K,J.CLOSED=F,J.prototype.withCredentials=void 0;var Me=l;o!=null&&(l==null||!("withCredentials"in l.prototype))&&(Me=J),function(ue){{var me=ue(t);me!==void 0&&(e.exports=me)}}(function(ue){ue.EventSourcePolyfill=J,ue.NativeEventSource=l,ue.EventSource=Me})})(typeof globalThis>"u"?typeof window<"u"?window:typeof self<"u"?self:Ac:globalThis)})(i2,i2.exports);var xpe=i2.exports;const Spe=(e,t,n,r)=>{const{mercureHubUrl:i,token:o,loading:a,error:s}=e;if(a||s||!i)return;const l=({data:f})=>n(JSON.parse(f)),c=({status:f})=>f===401&&r(),d=t.map(f=>{const p=new URL(i);p.searchParams.append("topic",f);const m=new xpe.EventSourcePolyfill(p,{headers:{Authorization:`Bearer ${o}`}});return m.onmessage=l,m.onerror=c,m});return()=>d.forEach(f=>f.close())};function ws(e,t){const n=new Set;return r=>{const{createNewVisits:i,loadMercureInfo:o,mercureInfo:a}=r,s=Rl();return I.useEffect(()=>{const{interval:l}=a,c=m=>l?n.add(m):i([m]),d=t(s),f=Spe(a,d,c,o);if(!l)return f;const p=setInterval(()=>{i([...n]),n.clear()},l*1e3*60);return Vr(()=>clearInterval(p),()=>f==null?void 0:f())},[i,o,a,s]),g.jsx(e,{...r})}}class pi{}Te(pi,"visits","https://shlink.io/new-visit"),Te(pi,"orphanVisits","https://shlink.io/new-orphan-visit"),Te(pi,"shortUrlVisits",e=>`https://shlink.io/new-visit/${e}`);const kT="shlink/shortUrlDeletion",GM={shortCode:"",loading:!1,deleted:!1,error:!1},Epe=e=>Nr(`${kT}/deleteShortUrl`,async({shortCode:t,domain:n})=>(await e().deleteShortUrl(t,n),{shortCode:t,domain:n})),lF=Rn(`${kT}/shortUrlDeleted`),Tpe=e=>{const{actions:t,reducer:n}=lr({name:kT,initialState:GM,reducers:{resetDeleteShortUrl:()=>GM},extraReducers:i=>{i.addCase(e.pending,o=>({...o,loading:!0,error:!1,deleted:!1})),i.addCase(e.rejected,(o,{error:a})=>({...o,errorData:pa(a),loading:!1,error:!0,deleted:!1})),i.addCase(e.fulfilled,(o,{payload:a})=>({...o,shortCode:a.shortCode,loading:!1,error:!1,deleted:!0}))}}),{resetDeleteShortUrl:r}=t;return{reducer:n,resetDeleteShortUrl:r}},cF="shlink/shortUrlsList",uF=5,Ope={loading:!0,error:!1},Cpe=e=>Nr(`${cF}/listShortUrls`,t=>e().listShortUrls(t??{})),kpe=(e,t,n)=>lr({name:cF,initialState:Ope,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,Vr((i,{payload:o})=>i.shortUrls?sc(["shortUrls","data"],[o,...i.shortUrls.data.slice(0,uF-1)],i):i,i=>i.shortUrls?sc(["shortUrls","pagination","totalItems"],i.shortUrls.pagination.totalItems+1,i):i)),r.addCase(t.fulfilled,(i,{payload:o})=>i.shortUrls?sc(["shortUrls","data"],i.shortUrls.data.map(a=>{const{shortCode:s,domain:l}=o;return xf(a,s,l)?o:a}),i):i),r.addCase(lF,Vr((i,{payload:o})=>i.shortUrls?sc(["shortUrls","data"],cT(a=>xf(a,o.shortCode,o.domain),i.shortUrls.data),i):i,i=>i.shortUrls?sc(["shortUrls","pagination","totalItems"],i.shortUrls.pagination.totalItems-1,i):i)),r.addCase(tp,(i,{payload:o})=>{var a,s;return sc(["shortUrls","data"],(s=(a=i.shortUrls)==null?void 0:a.data)==null?void 0:s.map(l=>{var c;return((c=Jce(o.createdVisits.filter(({shortUrl:d})=>d&&xf(l,d.shortCode,d.domain))))==null?void 0:c.shortUrl)??l}),i)})}}),qM=10,{ceil:Ppe}=Math,Lpe=new Intl.NumberFormat("en-US"),wn=e=>Lpe.format(Number(e)),jpe=e=>Ppe(e/qM)*qM,Mpe={field:"dateCreated",dir:"DESC"},dF={realTimeUpdates:{enabled:!0},shortUrlCreation:{validateUrls:!1},visits:{defaultInterval:"last30Days"},shortUrlsList:{defaultOrdering:Mpe}},fF=I.createContext(dF),Npe=fF.Provider,PT=()=>I.useContext(fF)??dF,Ul=e=>PT()[e],o2=({children:e,title:t,link:n,tooltip:r})=>{const i=ys();return g.jsxs(g.Fragment,{children:[g.jsxs(Gr,{innerRef:i,className:"highlight-card",body:!0,tag:It,to:n,children:[g.jsx(Ne,{size:"3x",className:"highlight-card__link-icon",icon:ure}),g.jsx(JI,{className:"lh-sm fw-semibold text-uppercase fs-5 highlight-card__title",children:t}),g.jsx(XI,{className:"fs-2 fw-semibold lh-sm",children:e})]}),r&&g.jsx(Rr,{target:i,placement:"bottom",children:r})]})},ZM=({loading:e,excludeBots:t,visitsSummary:n,...r})=>g.jsx(o2,{tooltip:n.bots!==void 0?g.jsxs(g.Fragment,{children:[t?"Plus":"Including"," ",g.jsx("strong",{children:wn(n.bots)})," potential bot visits"]}):void 0,...r,children:e?"Loading...":wn(t&&n.nonBots?n.nonBots:n.total)}),hF=ws(({shortUrlsList:e,listShortUrls:t,tagsList:n,loadVisitsOverview:r,visitsOverview:i})=>{const{ShortUrlsTable:o,CreateShortUrl:a}=Kt(hF),{loading:s,shortUrls:l}=e,{loading:c}=n,{loading:d,nonOrphanVisits:f,orphanVisits:p}=i,m=Fl(),v=So(),y=Ul("visits");return I.useEffect(()=>{t({itemsPerPage:uF,orderBy:{field:"dateCreated",dir:"DESC"}}),r()},[t,r]),g.jsxs(g.Fragment,{children:[g.jsxs(gr,{children:[g.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:g.jsx(ZM,{title:"Visits",link:`${m}/non-orphan-visits`,excludeBots:(y==null?void 0:y.excludeBots)??!1,loading:d,visitsSummary:f})}),g.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:g.jsx(ZM,{title:"Orphan visits",link:`${m}/orphan-visits`,excludeBots:(y==null?void 0:y.excludeBots)??!1,loading:d,visitsSummary:p})}),g.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:g.jsx(o2,{title:"Short URLs",link:`${m}/list-short-urls/1`,children:s?"Loading...":wn((l==null?void 0:l.pagination.totalItems)??0)})}),g.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:g.jsx(o2,{title:"Tags",link:`${m}/manage-tags`,children:c?"Loading...":wn(n.tags.length)})})]}),g.jsxs(Gr,{className:"mb-3",children:[g.jsxs(hu,{children:[g.jsx("span",{className:"d-sm-none",children:"Create a short URL"}),g.jsx("h5",{className:"d-none d-sm-inline",children:"Create a short URL"}),g.jsx(It,{className:"float-end",to:`${m}/create-short-url`,children:"Advanced options »"})]}),g.jsx(fu,{children:g.jsx(a,{basicMode:!0})})]}),g.jsxs(Gr,{children:[g.jsxs(hu,{children:[g.jsx("span",{className:"d-sm-none",children:"Recently created URLs"}),g.jsx("h5",{className:"d-none d-sm-inline",children:"Recently created URLs"}),g.jsx(It,{className:"float-end",to:`${m}/list-short-urls/1`,children:"See all »"})]}),g.jsx(fu,{children:g.jsx(o,{shortUrlsList:e,className:"mb-0",onTagClick:x=>v(`${m}/list-short-urls/1?tags=${encodeURIComponent(x)}`)})})]})]})},()=>[pi.visits,pi.orphanVisits]),Rpe=Qt(hF,["ShortUrlsTable","CreateShortUrl"]);function Ape(e,t){e.factory("Overview",Rpe),e.decorator("Overview",t(["shortUrlsList","tagsList","mercureInfo","visitsOverview"],["listShortUrls","createNewVisits","loadMercureInfo","loadVisitsOverview"]))}const Dpe=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}),pF=({createShortUrl:e,shortUrlCreation:t,resetCreateShortUrl:n,basicMode:r=!1})=>{const{ShortUrlForm:i,CreateShortUrlResult:o}=Kt(pF),a=Ul("shortUrlCreation"),s=I.useMemo(()=>Dpe(a),[a]);return g.jsxs(g.Fragment,{children:[g.jsx(i,{initialState:s,saving:t.saving,mode:r?"create-basic":"create",onSave:async l=>(n(),e(l))}),g.jsx(o,{creation:t,resetCreateShortUrl:n,canBeClosed:r})]})},Ipe=Qt(pF,["ShortUrlForm","CreateShortUrlResult"]),mF=({shortUrlDetail:e,getShortUrlDetail:t,shortUrlEdition:n,editShortUrl:r})=>{const{ShortUrlForm:i}=Kt(mF),{search:o}=En(),a=Rl(),s=Yu(),{loading:l,error:c,errorData:d,shortUrl:f}=e,{saving:p,saved:m,error:v,errorData:y}=n,{domain:x}=zu(o),_=Ul("shortUrlCreation"),w=I.useMemo(()=>zue(f,_),[f,_]);return I.useEffect(()=>{a.shortCode&&t({shortCode:vg(a.shortCode),domain:x})},[x,t,a.shortCode]),l?g.jsx(Ho,{loading:!0}):c?g.jsx(zr,{type:"error",children:g.jsx(na,{errorData:d,fallbackMessage:"An error occurred while loading short URL detail :("})}):g.jsxs(g.Fragment,{children:[g.jsx("header",{className:"mb-3",children:g.jsx(Gr,{body:!0,children:g.jsxs("h2",{className:"d-sm-flex justify-content-between align-items-center mb-0",children:[g.jsx(yt,{color:"link",size:"lg",className:"p-0 me-3",onClick:s,"aria-label":"Go back",children:g.jsx(Ne,{icon:$D})}),g.jsx("span",{className:"text-center",children:g.jsxs("small",{children:["Edit ",g.jsx(Wo,{href:(f==null?void 0:f.shortUrl)??""})]})}),g.jsx("span",{})]})})}),g.jsx(i,{initialState:w,saving:p,mode:"edit",onSave:async S=>{f&&r({...f,data:S})}}),m&&v&&g.jsx(zr,{type:"error",className:"mt-3",children:g.jsx(na,{errorData:y,fallbackMessage:"An error occurred while updating short URL :("})}),m&&!v&&g.jsx(zr,{type:"success",className:"mt-3",children:"Short URL properly edited."})]})},Fpe=Qt(mF,["ShortUrlForm"]);var x0={},$pe=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var f=KM[t.format]||KM.default;window.clipboardData.setData(f,e)}else d.clipboardData.clearData(),d.clipboardData.setData(t.format,e);t.onCopy&&(d.preventDefault(),t.onCopy(d.clipboardData))}),document.body.appendChild(s),o.selectNodeContents(s),a.addRange(o);var c=document.execCommand("copy");if(!c)throw new Error("copy command was unsuccessful");l=!0}catch(d){n&&console.error("unable to copy using execCommand: ",d),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),l=!0}catch(f){n&&console.error("unable to copy using clipboardData: ",f),n&&console.error("falling back to prompt"),r=zpe("message"in t?t.message:Bpe),window.prompt(r,e)}}finally{a&&(typeof a.removeRange=="function"?a.removeRange(o):a.removeAllRanges()),s&&document.body.removeChild(s),i()}return l}var Hpe=Vpe;function a2(e){"@babel/helpers - typeof";return a2=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},a2(e)}Object.defineProperty(x0,"__esModule",{value:!0});x0.CopyToClipboard=void 0;var Nm=gF(Y),Wpe=gF(Hpe),Ype=["text","onCopy","options","children"];function gF(e){return e&&e.__esModule?e:{default:e}}function QM(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 XM(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function qpe(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 Zpe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function JM(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ny(e){return ny=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ny(e)}function LT(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var yF=function(e){Qpe(n,e);var t=Xpe(n);function n(){var r;Zpe(this,n);for(var i=arguments.length,o=new Array(i),a=0;a{const{useTimeoutToggle:r}=Kt(bF),[i,o]=r(),{error:a,saved:s}=e;if(I.useEffect(()=>{t()},[t]),a)return g.jsxs(zr,{type:"error",className:"mt-3",children:[n&&g.jsx(Ne,{"data-testid":"error-close-button",icon:q1,className:"float-end pointer",onClick:t}),g.jsx(na,{errorData:e.errorData,fallbackMessage:"An error occurred while creating the URL :("})]});if(!s)return null;const{shortUrl:l}=e.result;return g.jsxs(zr,{type:"success",className:"mt-3",children:[n&&g.jsx(Ne,{"data-testid":"success-close-button",icon:q1,className:"float-end pointer",onClick:t}),g.jsxs("span",{children:[g.jsx("b",{children:"Great!"})," The short URL is ",g.jsx("b",{children:l})]}),g.jsx(_F,{text:l,onCopy:o,children:g.jsxs("button",{className:"btn btn-light btn-sm create-short-url-result__copy-btn",id:"copyBtn",type:"button",children:[g.jsx(Ne,{icon:K6})," Copy"]})}),g.jsx(zh,{placement:"left",isOpen:i,target:"copyBtn",children:"Copied!"})]})},rme=Qt(bF,["useTimeoutToggle"]),Lb="delete",ime=({shortUrl:e,toggle:t,isOpen:n,shortUrlDeletion:r,resetDeleteShortUrl:i,deleteShortUrl:o,shortUrlDeleted:a})=>{const[s,l]=I.useState("");I.useEffect(()=>i,[i]);const{loading:c,error:d,deleted:f,errorData:p}=r,m=Vr(i,t),v=I.useCallback(y=>(y.preventDefault(),o(e).then(t)),[o,e,t]);return g.jsx(ua,{isOpen:n,toggle:m,centered:!0,onClosed:()=>f&&a(e),children:g.jsxs("form",{onSubmit:v,children:[g.jsx(da,{toggle:m,children:g.jsx("span",{className:"text-danger",children:"Delete short URL"})}),g.jsxs(Eo,{children:[g.jsxs("p",{children:[g.jsx("b",{className:"text-danger",children:"Caution!"})," You are about to delete a short URL."]}),g.jsx("p",{children:"This action cannot be undone. Once you have deleted it, all the visits stats will be lost."}),g.jsxs("p",{children:["Write ",g.jsx("b",{children:Lb})," to confirm deletion."]}),g.jsx("input",{type:"text",className:"form-control",placeholder:`Insert ${Lb}`,value:s,onChange:y=>l(y.target.value)}),d&&g.jsx(zr,{type:Lue(p)?"warning":"error",small:!0,className:"mt-2",children:g.jsx(na,{errorData:p,fallbackMessage:"Something went wrong while deleting the URL :("})})]}),g.jsxs(Al,{children:[g.jsx("button",{type:"button",className:"btn btn-link",onClick:m,children:"Cancel"}),g.jsx("button",{type:"submit",className:"btn btn-danger",disabled:s!==Lb||c,children:c?"Deleting...":"Delete"})]})]})})},wF=({amount:e=0,loading:t=!1,...n})=>g.jsxs(yt,{...n,outline:!0,color:"primary",disabled:t,children:[g.jsx(Ne,{icon:PW})," ",t?"Exporting...":g.jsxs(g.Fragment,{children:["Export (",wn(e),")"]})]}),S0=()=>{const e=So(),t=Fl(),n=aF(),r=I.useMemo(()=>{const{orderBy:o,tags:a,excludeBots:s,excludeMaxVisitsReached:l,excludePastValidUntil:c,...d}=n,f=o?cee(o):void 0,p=(a==null?void 0:a.split(","))??[];return{...d,orderBy:f,tags:p,excludeBots:s!==void 0?s==="true":void 0,excludeMaxVisitsReached:l!==void 0?l==="true":void 0,excludePastValidUntil:c!==void 0?c==="true":void 0}},[n]),i=I.useCallback(o=>{const a={...r,...o},{orderBy:s,tags:l,excludeBots:c,excludeMaxVisitsReached:d,excludePastValidUntil:f,...p}=a,m={...p,orderBy:s&&lee(s),tags:l.length>0?l.join(","):void 0,excludeBots:Cb(c),excludeMaxVisitsReached:Cb(d),excludePastValidUntil:Cb(f)},v=c0(m),y=qi(v)?"":`?${v}`;e(`${t}/list-short-urls/1${y}`)},[r,e,t]);return[r,i]},eN=20,xF=({amount:e=0})=>{const{apiClientFactory:t,ReportExporter:n}=Kt(xF),[{tags:r,search:i,startDate:o,endDate:a,orderBy:s,tagsMode:l}]=S0(),[c,,d,f]=Sn(),p=I.useCallback(async()=>{const m=e/eN,v=async(x=1)=>{const{data:_}=await t().listShortUrls({page:`${x}`,tags:r,searchTerm:i,startDate:o,endDate:a,orderBy:s,tagsMode:l,itemsPerPage:eN});return x>=m?_:_.concat(await v(x+1))};d();const y=await v();n.exportShortUrls(y.map(x=>{var _;const{hostname:w,pathname:S}=new URL(x.shortUrl),E=S.substring(1);return{createdAt:x.dateCreated,domain:w,shortCode:E,shortUrl:x.shortUrl,longUrl:x.longUrl,title:x.title??"",tags:x.tags.join("|"),visits:((_=x==null?void 0:x.visitsSummary)==null?void 0:_.total)??x.visitsCount}})),f()},[e,t,a,s,n,i,o,d,f,r,l]);return g.jsx(wF,{loading:c,className:"btn-md-block",amount:e,onClick:p})},ome=Qt(xF,["apiClientFactory","ReportExporter"]),SF=({text:e,onCopy:t})=>g.jsx(_F,{text:e,onCopy:t,children:g.jsx(Ne,{icon:K6,className:"ms-2 copy-to-clipboard-icon"})}),ame=(e,{margin:t,...n})=>{const r=`${e}/qr-code`,i=c0({...n,margin:t>0?t:void 0});return`${r}${qi(i)?"":`?${i}`}`},sme=({errorCorrection:e,setErrorCorrection:t})=>g.jsxs(fa,{text:`Error correction (${e})`,children:[g.jsxs(Ue,{active:e==="L",onClick:()=>t("L"),children:[g.jsx("b",{children:"L"}),"ow"]}),g.jsxs(Ue,{active:e==="M",onClick:()=>t("M"),children:[g.jsx("b",{children:"M"}),"edium"]}),g.jsxs(Ue,{active:e==="Q",onClick:()=>t("Q"),children:[g.jsx("b",{children:"Q"}),"uartile"]}),g.jsxs(Ue,{active:e==="H",onClick:()=>t("H"),children:[g.jsx("b",{children:"H"}),"igh"]})]}),lme=({format:e,setFormat:t})=>g.jsxs(fa,{text:`Format (${e})`,children:[g.jsx(Ue,{active:e==="png",onClick:()=>t("png"),children:"PNG"}),g.jsx(Ue,{active:e==="svg",onClick:()=>t("svg"),children:"SVG"})]}),EF=({shortUrl:{shortUrl:e,shortCode:t},toggle:n,isOpen:r})=>{const{ImageDownloader:i}=Kt(EF),[o,a]=I.useState(300),[s,l]=I.useState(0),[c,d]=I.useState("png"),[f,p]=I.useState("L"),m=I.useMemo(()=>ame(e,{size:o,format:c,margin:s,errorCorrection:f}),[e,o,c,s,f]),v=I.useMemo(()=>o+s,[o,s]),y=I.useMemo(()=>{if(!(v<500))return v<800?"lg":"xl"},[v]);return g.jsxs(ua,{isOpen:r,toggle:n,centered:!0,size:y,children:[g.jsxs(da,{toggle:n,children:["QR code for ",g.jsx(Wo,{href:e,children:e})]}),g.jsxs(Eo,{children:[g.jsxs(gr,{children:[g.jsxs(Ur,{className:"d-grid col-md-6",children:[g.jsxs("label",{htmlFor:"sizeControl",children:["Size: ",o,"px"]}),g.jsx("input",{id:"sizeControl",type:"range",className:"form-control-range",value:o,step:10,min:50,max:1e3,onChange:x=>a(Number(x.target.value))})]}),g.jsxs(Ur,{className:"d-grid col-md-6",children:[g.jsxs("label",{htmlFor:"marginControl",children:["Margin: ",s,"px"]}),g.jsx("input",{id:"marginControl",type:"range",className:"form-control-range",value:s,step:1,min:0,max:100,onChange:x=>l(Number(x.target.value))})]}),g.jsx(Ur,{className:"d-grid col-md-6",children:g.jsx(lme,{format:c,setFormat:d})}),g.jsx(Ur,{className:"col-md-6",children:g.jsx(sme,{errorCorrection:f,setErrorCorrection:p})})]}),g.jsxs("div",{className:"text-center",children:[g.jsxs("div",{className:"mb-3",children:[g.jsx(Wo,{href:m}),g.jsx(SF,{text:m})]}),g.jsx("img",{src:m,className:"qr-code-modal__img",alt:"QR code"}),g.jsx("div",{className:"mt-3",children:g.jsxs(yt,{block:!0,color:"primary",onClick:()=>{i.saveImage(m,`${t}-qr-code.${c}`).catch(()=>{})},children:["Download ",g.jsx(Ne,{icon:UD,className:"ms-1"})]})})]})]})]})},cme=Qt(EF,["ImageDownloader"]),ry=({date:e,format:t=ST,relative:n=!1})=>{const r=ET(e)?e:ra(e);return g.jsx("time",{dateTime:`${bfe(r)}000`,children:n?`${pfe(ds(),r)} ago`:Tu(r,t)})},ume=e=>{const{meta:t,visitsCount:n,visitsSummary:r}=e,{maxVisits:i,validSince:o,validUntil:a}=t,s=(r==null?void 0:r.total)??n;return i&&s>=i?{icon:bY,className:"text-danger",description:g.jsxs(g.Fragment,{children:["This short URL cannot be currently visited because it has reached the maximum amount of ",g.jsx("b",{children:i})," visit",i>1?"s":"","."]})}:a&&Ui(Bi(a),ds())?{icon:Dk,className:"text-danger",description:g.jsxs(g.Fragment,{children:["This short URL cannot be visited since ",g.jsx("b",{className:"indivisible",children:ey(Bi(a))}),"."]})}:o&&Ui(ds(),Bi(o))?{icon:Dk,className:"text-warning",description:g.jsxs(g.Fragment,{children:["This short URL will start working on ",g.jsx("b",{className:"indivisible",children:ey(Bi(o))}),"."]})}:{icon:Yf,className:"text-primary",description:"This short URL can be visited normally."}},dme=({shortUrl:e})=>{const t=ys(),{icon:n,className:r,description:i}=ume(e);return g.jsxs(g.Fragment,{children:[g.jsx("span",{style:{cursor:i?"help":void 0},ref:t,children:g.jsx(Ne,{icon:n,className:r})}),g.jsx(Rr,{target:t,placement:"bottom",children:i})]})};var TF={exports:{}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames -*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i{const i=n?`?domain=${n}`:"";return`${e}/short-code/${zue(t)}/${r}${i}`},c2=({shortUrl:e,suffix:t,asLink:n,children:r,...i})=>{const o=Fl();return!n||!e?g.jsx("span",{...i,children:r}):g.jsx(It,{to:fme(o,e,t),...i,children:r})},OF=({visitsCount:e,shortUrl:t,active:n=!1,asLink:r=!1})=>{const i=ys(),{maxVisits:o,validSince:a,validUntil:s}=(t==null?void 0:t.meta)??{},l=!!o||!!a||!!s,c=g.jsx(c2,{shortUrl:t,suffix:"visits",asLink:r,children:g.jsx("strong",{className:Qe("short-url-visits-count__amount",{"short-url-visits-count__amount--big":n}),children:wn(e)})});return l?g.jsxs(g.Fragment,{children:[g.jsxs("span",{className:"indivisible",children:[c,g.jsxs("small",{className:"short-urls-visits-count__max-visits-control",ref:i,children:[o&&g.jsxs(g.Fragment,{children:[" / ",wn(o)]}),g.jsx("sup",{className:"ms-1",children:g.jsx(Ne,{icon:BS})})]})]}),g.jsx(Rr,{target:i,placement:"bottom",children:g.jsxs("ul",{className:"list-unstyled mb-0",children:[o&&g.jsxs("li",{className:"short-url-visits-count__tooltip-list-item",children:["This short URL will not accept more than ",g.jsx("b",{children:wn(o)})," visit",o===1?"":"s","."]}),a&&g.jsxs("li",{className:"short-url-visits-count__tooltip-list-item",children:["This short URL will not accept visits before ",g.jsx("b",{className:"indivisible",children:ey(Bi(a))}),"."]}),s&&g.jsxs("li",{className:"short-url-visits-count__tooltip-list-item",children:["This short URL will not accept visits after ",g.jsx("b",{className:"indivisible",children:ey(Bi(s))}),"."]})]})})]}):c},xh=({style:e,className:t,...n})=>g.jsx("button",{type:"button",className:Qe("border-0",t),style:{backgroundColor:"inherit",fontWeight:"inherit",...e},...n}),hme=e=>!!e.onClose,pme=e=>!!e.onClick,jT=e=>{const{text:t,children:n,className:r,colorGenerator:i}=e,o=pme(e),a=o?xh:"span",s=I.useMemo(()=>i.isColorLightForKey(t),[t,i]);return g.jsxs(a,{className:Qe("badge tag fw-bold",r,{"tag--light-bg":s,pointer:o}),style:{backgroundColor:i.getColorForKey(t)},onClick:o?e.onClick:void 0,children:[n??t,hme(e)&&g.jsx(xh,{"aria-label":`Remove ${t}`,className:Qe("bg-transparent ms-1 opacity-100 p-0 fw-bold tag__close",{"tag--light-bg":s}),onClick:e.onClose,children:"×"})]})},mme=({tags:e,onTagClick:t,colorGenerator:n})=>qi(e)?g.jsx("i",{className:"indivisible",children:g.jsx("small",{children:"No tags"})}):g.jsx(g.Fragment,{children:e.map(r=>g.jsx(jT,{text:r,colorGenerator:n,onClick:()=>t==null?void 0:t(r)},r))}),CF=({shortUrl:e,onTagClick:t})=>{var n,r,i,o;const{ShortUrlsRowMenu:a,ColorGenerator:s,useTimeoutToggle:l}=Kt(CF),[c,d]=l(),[f,p]=l(!1,500),m=I.useRef(!0),[{excludeBots:v}]=S0(),y=Ul("visits"),x=v??(y==null?void 0:y.excludeBots);return I.useEffect(()=>{!m.current&&p(),m.current=!1},[(n=e.visitsSummary)==null?void 0:n.total,(r=e.visitsSummary)==null?void 0:r.nonBots,e.visitsCount,p]),g.jsxs("tr",{className:"responsive-table__row",children:[g.jsx("td",{className:"indivisible short-urls-row__cell responsive-table__cell","data-th":"Created at",children:g.jsx(ry,{date:e.dateCreated})}),g.jsx("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Short URL",children:g.jsxs("span",{className:"position-relative short-urls-row__cell--indivisible",children:[g.jsx("span",{className:"short-urls-row__short-url-wrapper",children:g.jsx(Wo,{href:e.shortUrl})}),g.jsx(SF,{text:e.shortUrl,onCopy:d}),g.jsx("span",{className:"badge bg-warning text-black short-urls-row__copy-hint",hidden:!c,children:"Copied short URL!"})]})}),g.jsx("td",{className:"responsive-table__cell short-urls-row__cell short-urls-row__cell--break","data-th":`${e.title?"Title":"Long URL"}`,children:g.jsx(Wo,{href:e.longUrl,children:e.title??e.longUrl})}),e.title&&g.jsx("td",{className:"short-urls-row__cell responsive-table__cell short-urls-row__cell--break d-lg-none","data-th":"Long URL",children:g.jsx(Wo,{href:e.longUrl})}),g.jsx("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Tags",children:g.jsx(mme,{tags:e.tags,colorGenerator:s,onTagClick:t})}),g.jsx("td",{className:"responsive-table__cell short-urls-row__cell text-lg-end","data-th":"Visits",children:g.jsx(OF,{visitsCount:(x?(i=e.visitsSummary)==null?void 0:i.nonBots:(o=e.visitsSummary)==null?void 0:o.total)??e.visitsCount,shortUrl:e,active:f,asLink:!0})}),g.jsx("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Status",children:g.jsx(ume,{shortUrl:e})}),g.jsx("td",{className:"responsive-table__cell short-urls-row__cell text-end",children:g.jsx(a,{shortUrl:e})})]})},gme=Qt(CF,["ShortUrlsRowMenu","ColorGenerator","useTimeoutToggle"]),kF=({shortUrl:e})=>{const{DeleteShortUrlModal:t,QrCodeModal:n}=Kt(kF),[r,,i,o]=Sn(),[a,,s,l]=Sn();return g.jsxs(s0,{minWidth:190,children:[g.jsxs(Ue,{tag:c2,shortUrl:e,suffix:"visits",asLink:!0,children:[g.jsx(Ne,{icon:US,fixedWidth:!0})," Visit stats"]}),g.jsxs(Ue,{tag:c2,shortUrl:e,suffix:"edit",asLink:!0,children:[g.jsx(Ne,{icon:$S,fixedWidth:!0})," Edit short URL"]}),g.jsxs(Ue,{onClick:i,children:[g.jsx(Ne,{icon:vY,fixedWidth:!0})," QR code"]}),g.jsx(n,{shortUrl:e,isOpen:r,toggle:o}),g.jsx(Ue,{divider:!0,tag:"hr"}),g.jsxs(Ue,{className:"dropdown-item--danger",onClick:s,children:[g.jsx(Ne,{icon:FS,fixedWidth:!0})," Delete short URL"]}),g.jsx(t,{shortUrl:e,isOpen:a,toggle:l})]})},vme=Qt(kF,["DeleteShortUrlModal","QrCodeModal"]),PF="shlink/shortUrlCreation",tN={saving:!1,saved:!1,error:!1},yme=e=>Nr(`${PF}/createShortUrl`,t=>e().createShortUrl(t)),_me=e=>{const{reducer:t,actions:n}=lr({name:PF,initialState:tN,reducers:{resetCreateShortUrl:()=>tN},extraReducers:i=>{i.addCase(e.pending,()=>({saving:!0,saved:!1,error:!1})),i.addCase(e.rejected,(o,{error:a})=>({saving:!1,saved:!1,error:!0,errorData:pa(a)})),i.addCase(e.fulfilled,(o,{payload:a})=>({result:a,saving:!1,saved:!0,error:!1}))}}),{resetCreateShortUrl:r}=n;return{reducer:t,resetCreateShortUrl:r}},nN="shlink/shortUrlDetail",rN={loading:!1,error:!1},bme=e=>{const t=Nr(`${nN}/getShortUrlDetail`,async({shortCode:r,domain:i},{getState:o})=>{var a;const{shortUrlsList:s}=o();return((a=s==null?void 0:s.shortUrls)==null?void 0:a.data.find(l=>xf(l,r,i)))??await e().getShortUrl(r,i)}),{reducer:n}=lr({name:nN,initialState:rN,reducers:{},extraReducers:r=>{r.addCase(t.pending,()=>({loading:!0,error:!1})),r.addCase(t.rejected,(i,{error:o})=>({loading:!1,error:!0,errorData:pa(o)})),r.addCase(t.fulfilled,(i,{payload:o})=>({...rN,shortUrl:o}))}});return{reducer:n,getShortUrlDetail:t}},LF="shlink/shortUrlEdition",wme={saving:!1,saved:!1,error:!1},xme=e=>Nr(`${LF}/editShortUrl`,({shortCode:t,domain:n,data:r})=>e().updateShortUrl(t,n,r)),Sme=e=>lr({name:LF,initialState:wme,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:pa(r)})),t.addCase(e.fulfilled,(n,{payload:r})=>({shortUrl:r,saving:!1,error:!1,saved:!0}))}}),Eme=({icon:e,className:t,...n})=>{const r=ys(),i=Qe("icon-input-container__input",t);return g.jsxs("div",{className:"icon-input-container",children:[g.jsx(bl,{className:i,innerRef:r,...n}),g.jsx(Ne,{icon:e,fixedWidth:!0,className:"icon-input-container__icon",onClick:()=>{var o;return(o=r.current)==null?void 0:o.focus()}})]})};function Tme(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,u2(e,t)}function u2(e,t){return u2=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},u2(e,t)}function Ome(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 iN(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Cme(e,t,n){return e===t?!0:e.correspondingElement?e.correspondingElement.classList.contains(n):e.classList.contains(n)}function kme(e,t,n){if(e===t)return!0;for(;e.parentNode||e.host;){if(e.parentNode&&Cme(e,t,n))return!0;e=e.parentNode||e.host}return e}function Pme(e){return document.documentElement.clientWidth<=e.clientX||document.documentElement.clientHeight<=e.clientY}var Lme=function(){if(!(typeof window>"u"||typeof window.addEventListener!="function")){var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}}),n=function(){};return window.addEventListener("testPassiveEventSupport",n,t),window.removeEventListener("testPassiveEventSupport",n,t),e}};function jme(e){return e===void 0&&(e=0),function(){return++e}}var Mme=jme(),d2,Rm={},jb={},Nme=["touchstart","touchmove"],Rme="ignore-react-onclickoutside";function oN(e,t){var n={},r=Nme.indexOf(t)!==-1;return r&&d2&&(n.passive=!e.props.preventDefault),n}function E0(e,t){var n,r,i=e.displayName||e.name||"Component";return r=n=function(o){Tme(a,o);function a(l){var c;return c=o.call(this,l)||this,c.__outsideClickHandler=function(d){if(typeof c.__clickOutsideHandlerProp=="function"){c.__clickOutsideHandlerProp(d);return}var f=c.getInstance();if(typeof f.props.handleClickOutside=="function"){f.props.handleClickOutside(d);return}if(typeof f.handleClickOutside=="function"){f.handleClickOutside(d);return}throw new Error("WrappedComponent: "+i+" lacks a handleClickOutside(event) function for processing outside click events.")},c.__getComponentNode=function(){var d=c.getInstance();return t&&typeof t.setClickOutsideRef=="function"?t.setClickOutsideRef()(d):typeof d.setClickOutsideRef=="function"?d.setClickOutsideRef():jl.findDOMNode(d)},c.enableOnClickOutside=function(){if(!(typeof document>"u"||jb[c._uid])){typeof d2>"u"&&(d2=Lme()),jb[c._uid]=!0;var d=c.props.eventTypes;d.forEach||(d=[d]),Rm[c._uid]=function(f){if(c.componentNode!==null&&(c.props.preventDefault&&f.preventDefault(),c.props.stopPropagation&&f.stopPropagation(),!(c.props.excludeScrollbar&&Pme(f)))){var p=f.composed&&f.composedPath&&f.composedPath().shift()||f.target;kme(p,c.componentNode,c.props.outsideClickIgnoreClass)===document&&c.__outsideClickHandler(f)}},d.forEach(function(f){document.addEventListener(f,Rm[c._uid],oN(iN(c),f))})}},c.disableOnClickOutside=function(){delete jb[c._uid];var d=Rm[c._uid];if(d&&typeof document<"u"){var f=c.props.eventTypes;f.forEach||(f=[f]),f.forEach(function(p){return document.removeEventListener(p,d,oN(iN(c),p))}),delete Rm[c._uid]}},c.getRef=function(d){return c.instanceRef=d},c._uid=Mme(),c}var s=a.prototype;return s.getInstance=function(){if(e.prototype&&!e.prototype.isReactComponent)return this;var l=this.instanceRef;return l.getInstance?l.getInstance():l},s.componentDidMount=function(){if(!(typeof document>"u"||!document.createElement)){var l=this.getInstance();if(t&&typeof t.handleClickOutside=="function"&&(this.__clickOutsideHandlerProp=t.handleClickOutside(l),typeof this.__clickOutsideHandlerProp!="function"))throw new Error("WrappedComponent: "+i+" lacks a function for processing outside click events specified by the handleClickOutside config option.");this.componentNode=this.__getComponentNode(),!this.props.disableOnClickOutside&&this.enableOnClickOutside()}},s.componentDidUpdate=function(){this.componentNode=this.__getComponentNode()},s.componentWillUnmount=function(){this.disableOnClickOutside()},s.render=function(){var l=this.props;l.excludeScrollbar;var c=Ome(l,["excludeScrollbar"]);return e.prototype&&e.prototype.isReactComponent?c.ref=this.getRef:c.wrappedRef=this.getRef,c.disableOnClickOutside=this.disableOnClickOutside,c.enableOnClickOutside=this.enableOnClickOutside,I.createElement(e,c)},a}(I.Component),n.displayName="OnClickOutside("+i+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:Rme,preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},r}var jF=I.createContext(),MF=I.createContext();function Ame(e){var t=e.children,n=I.useState(null),r=n[0],i=n[1],o=I.useRef(!1);I.useEffect(function(){return function(){o.current=!0}},[]);var a=I.useCallback(function(s){o.current||i(s)},[]);return I.createElement(jF.Provider,{value:r},I.createElement(MF.Provider,{value:a},t))}var NF=function(e){return Array.isArray(e)?e[0]:e},RF=function(e){if(typeof e=="function"){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r"u")return!1;var t=Kr(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function qme(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];!mi(o)||!xo(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function Zme(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,c){return l[c]="",l},{});!mi(i)||!xo(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const Kme={name:"applyStyles",enabled:!0,phase:"write",fn:qme,effect:Zme,requires:["computeStyles"]};function yo(e){return e.split("-")[0]}var ul=Math.max,iy=Math.min,Pu=Math.round;function h2(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function IF(){return!/^((?!chrome|android).)*safari/i.test(h2())}function Lu(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&mi(e)&&(i=e.offsetWidth>0&&Pu(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Pu(r.height)/e.offsetHeight||1);var a=Ol(e)?Kr(e):window,s=a.visualViewport,l=!IF()&&n,c=(r.left+(l&&s?s.offsetLeft:0))/i,d=(r.top+(l&&s?s.offsetTop:0))/o,f=r.width/i,p=r.height/o;return{width:f,height:p,top:d,right:c+f,bottom:d+p,left:c,x:c,y:d}}function RT(e){var t=Lu(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 FF(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&NT(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function ia(e){return Kr(e).getComputedStyle(e)}function Qme(e){return["table","td","th"].indexOf(xo(e))>=0}function xs(e){return((Ol(e)?e.ownerDocument:e.document)||window.document).documentElement}function T0(e){return xo(e)==="html"?e:e.assignedSlot||e.parentNode||(NT(e)?e.host:null)||xs(e)}function cN(e){return!mi(e)||ia(e).position==="fixed"?null:e.offsetParent}function Xme(e){var t=/firefox/i.test(h2()),n=/Trident/i.test(h2());if(n&&mi(e)){var r=ia(e);if(r.position==="fixed")return null}var i=T0(e);for(NT(i)&&(i=i.host);mi(i)&&["html","body"].indexOf(xo(i))<0;){var o=ia(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 ap(e){for(var t=Kr(e),n=cN(e);n&&Qme(n)&&ia(n).position==="static";)n=cN(n);return n&&(xo(n)==="html"||xo(n)==="body"&&ia(n).position==="static")?t:n||Xme(e)||t}function AT(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Sf(e,t,n){return ul(e,iy(t,n))}function Jme(e,t,n){var r=Sf(e,t,n);return r>n?n:r}function $F(){return{top:0,right:0,bottom:0,left:0}}function UF(e){return Object.assign({},$F(),e)}function BF(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var ege=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,UF(typeof e!="number"?e:BF(e,op))};function tge(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=yo(n.placement),l=AT(s),c=[Mr,xi].indexOf(s)>=0,d=c?"height":"width";if(!(!o||!a)){var f=ege(i.padding,n),p=RT(o),m=l==="y"?jr:Mr,v=l==="y"?wi:xi,y=n.rects.reference[d]+n.rects.reference[l]-a[l]-n.rects.popper[d],x=a[l]-n.rects.reference[l],_=ap(o),w=_?l==="y"?_.clientHeight||0:_.clientWidth||0:0,S=y/2-x/2,E=f[m],O=w-p[d]-f[v],k=w/2-p[d]/2+S,j=Sf(E,k,O),A=l;n.modifiersData[r]=(t={},t[A]=j,t.centerOffset=j-k,t)}}function nge(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)||FF(t.elements.popper,i)&&(t.elements.arrow=i))}const rge={name:"arrow",enabled:!0,phase:"main",fn:tge,effect:nge,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ju(e){return e.split("-")[1]}var ige={top:"auto",right:"auto",bottom:"auto",left:"auto"};function oge(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:Pu(n*i)/i||0,y:Pu(r*i)/i||0}}function uN(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,f=e.isFixed,p=a.x,m=p===void 0?0:p,v=a.y,y=v===void 0?0:v,x=typeof d=="function"?d({x:m,y}):{x:m,y};m=x.x,y=x.y;var _=a.hasOwnProperty("x"),w=a.hasOwnProperty("y"),S=Mr,E=jr,O=window;if(c){var k=ap(n),j="clientHeight",A="clientWidth";if(k===Kr(n)&&(k=xs(n),ia(k).position!=="static"&&s==="absolute"&&(j="scrollHeight",A="scrollWidth")),k=k,i===jr||(i===Mr||i===xi)&&o===Sh){E=wi;var U=f&&k===O&&O.visualViewport?O.visualViewport.height:k[j];y-=U-r.height,y*=l?1:-1}if(i===Mr||(i===jr||i===wi)&&o===Sh){S=xi;var R=f&&k===O&&O.visualViewport?O.visualViewport.width:k[A];m-=R-r.width,m*=l?1:-1}}var V=Object.assign({position:s},c&&ige),W=d===!0?oge({x:m,y},Kr(n)):{x:m,y};if(m=W.x,y=W.y,l){var X;return Object.assign({},V,(X={},X[E]=w?"0":"",X[S]=_?"0":"",X.transform=(O.devicePixelRatio||1)<=1?"translate("+m+"px, "+y+"px)":"translate3d("+m+"px, "+y+"px, 0)",X))}return Object.assign({},V,(t={},t[E]=w?y+"px":"",t[S]=_?m+"px":"",t.transform="",t))}function age(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,c={placement:yo(t.placement),variation:ju(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,uN(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,uN(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 sge={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:age,data:{}};var Am={passive:!0};function lge(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=Kr(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(d){d.addEventListener("scroll",n.update,Am)}),s&&l.addEventListener("resize",n.update,Am),function(){o&&c.forEach(function(d){d.removeEventListener("scroll",n.update,Am)}),s&&l.removeEventListener("resize",n.update,Am)}}const cge={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:lge,data:{}};var uge={left:"right",right:"left",bottom:"top",top:"bottom"};function xg(e){return e.replace(/left|right|bottom|top/g,function(t){return uge[t]})}var dge={start:"end",end:"start"};function dN(e){return e.replace(/start|end/g,function(t){return dge[t]})}function DT(e){var t=Kr(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function IT(e){return Lu(xs(e)).left+DT(e).scrollLeft}function fge(e,t){var n=Kr(e),r=xs(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var c=IF();(c||!c&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+IT(e),y:l}}function hge(e){var t,n=xs(e),r=DT(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=ul(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=ul(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+IT(e),l=-r.scrollTop;return ia(i||n).direction==="rtl"&&(s+=ul(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function FT(e){var t=ia(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function zF(e){return["html","body","#document"].indexOf(xo(e))>=0?e.ownerDocument.body:mi(e)&&FT(e)?e:zF(T0(e))}function Ef(e,t){var n;t===void 0&&(t=[]);var r=zF(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Kr(r),a=i?[o].concat(o.visualViewport||[],FT(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(Ef(T0(a)))}function p2(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function pge(e,t){var n=Lu(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 fN(e,t,n){return t===AF?p2(fge(e,n)):Ol(t)?pge(t,n):p2(hge(xs(e)))}function mge(e){var t=Ef(T0(e)),n=["absolute","fixed"].indexOf(ia(e).position)>=0,r=n&&mi(e)?ap(e):e;return Ol(r)?t.filter(function(i){return Ol(i)&&FF(i,r)&&xo(i)!=="body"}):[]}function gge(e,t,n,r){var i=t==="clippingParents"?mge(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,c){var d=fN(e,c,r);return l.top=ul(d.top,l.top),l.right=iy(d.right,l.right),l.bottom=iy(d.bottom,l.bottom),l.left=ul(d.left,l.left),l},fN(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function VF(e){var t=e.reference,n=e.element,r=e.placement,i=r?yo(r):null,o=r?ju(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case jr:l={x:a,y:t.y-n.height};break;case wi:l={x:a,y:t.y+t.height};break;case xi:l={x:t.x+t.width,y:s};break;case Mr:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var c=i?AT(i):null;if(c!=null){var d=c==="y"?"height":"width";switch(o){case ku:l[c]=l[c]-(t[d]/2-n[d]/2);break;case Sh:l[c]=l[c]+(t[d]/2-n[d]/2);break}}return l}function Eh(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?Dme:s,c=n.rootBoundary,d=c===void 0?AF:c,f=n.elementContext,p=f===void 0?jd:f,m=n.altBoundary,v=m===void 0?!1:m,y=n.padding,x=y===void 0?0:y,_=UF(typeof x!="number"?x:BF(x,op)),w=p===jd?Ime:jd,S=e.rects.popper,E=e.elements[v?w:p],O=gge(Ol(E)?E:E.contextElement||xs(e.elements.popper),l,d,a),k=Lu(e.elements.reference),j=VF({reference:k,element:S,strategy:"absolute",placement:i}),A=p2(Object.assign({},S,j)),U=p===jd?A:k,R={top:O.top-U.top+_.top,bottom:U.bottom-O.bottom+_.bottom,left:O.left-U.left+_.left,right:U.right-O.right+_.right},V=e.modifiersData.offset;if(p===jd&&V){var W=V[i];Object.keys(R).forEach(function(X){var G=[xi,wi].indexOf(X)>=0?1:-1,Z=[jr,wi].indexOf(X)>=0?"y":"x";R[X]+=W[Z]*G})}return R}function vge(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?DF:l,d=ju(r),f=d?s?lN:lN.filter(function(v){return ju(v)===d}):op,p=f.filter(function(v){return c.indexOf(v)>=0});p.length===0&&(p=f);var m=p.reduce(function(v,y){return v[y]=Eh(e,{placement:y,boundary:i,rootBoundary:o,padding:a})[yo(y)],v},{});return Object.keys(m).sort(function(v,y){return m[v]-m[y]})}function yge(e){if(yo(e)===MT)return[];var t=xg(e);return[dN(e),t,dN(t)]}function _ge(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,c=n.padding,d=n.boundary,f=n.rootBoundary,p=n.altBoundary,m=n.flipVariations,v=m===void 0?!0:m,y=n.allowedAutoPlacements,x=t.options.placement,_=yo(x),w=_===x,S=l||(w||!v?[xg(x)]:yge(x)),E=[x].concat(S).reduce(function(q,re){return q.concat(yo(re)===MT?vge(t,{placement:re,boundary:d,rootBoundary:f,padding:c,flipVariations:v,allowedAutoPlacements:y}):re)},[]),O=t.rects.reference,k=t.rects.popper,j=new Map,A=!0,U=E[0],R=0;R=0,Z=G?"width":"height",ne=Eh(t,{placement:V,boundary:d,rootBoundary:f,altBoundary:p,padding:c}),le=G?X?xi:Mr:X?wi:jr;O[Z]>k[Z]&&(le=xg(le));var K=xg(le),F=[];if(o&&F.push(ne[W]<=0),s&&F.push(ne[le]<=0,ne[K]<=0),F.every(function(q){return q})){U=V,A=!1;break}j.set(V,F)}if(A)for(var D=v?3:1,H=function(q){var re=E.find(function(ae){var he=j.get(ae);if(he)return he.slice(0,q).every(function(C){return C})});if(re)return U=re,"break"},ie=D;ie>0;ie--){var z=H(ie);if(z==="break")break}t.placement!==U&&(t.modifiersData[r]._skip=!0,t.placement=U,t.reset=!0)}}const bge={name:"flip",enabled:!0,phase:"main",fn:_ge,requiresIfExists:["offset"],data:{_skip:!1}};function hN(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 pN(e){return[jr,xi,wi,Mr].some(function(t){return e[t]>=0})}function wge(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Eh(t,{elementContext:"reference"}),s=Eh(t,{altBoundary:!0}),l=hN(a,r),c=hN(s,i,o),d=pN(l),f=pN(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":f})}const xge={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:wge};function Sge(e,t,n){var r=yo(e),i=[Mr,jr].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Mr,xi].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function Ege(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=DF.reduce(function(d,f){return d[f]=Sge(f,t.rects,o),d},{}),s=a[t.placement],l=s.x,c=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}const Tge={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Ege};function Oge(e){var t=e.state,n=e.name;t.modifiersData[n]=VF({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Cge={name:"popperOffsets",enabled:!0,phase:"read",fn:Oge,data:{}};function kge(e){return e==="x"?"y":"x"}function Pge(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,c=n.rootBoundary,d=n.altBoundary,f=n.padding,p=n.tether,m=p===void 0?!0:p,v=n.tetherOffset,y=v===void 0?0:v,x=Eh(t,{boundary:l,rootBoundary:c,padding:f,altBoundary:d}),_=yo(t.placement),w=ju(t.placement),S=!w,E=AT(_),O=kge(E),k=t.modifiersData.popperOffsets,j=t.rects.reference,A=t.rects.popper,U=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,R=typeof U=="number"?{mainAxis:U,altAxis:U}:Object.assign({mainAxis:0,altAxis:0},U),V=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,W={x:0,y:0};if(k){if(o){var X,G=E==="y"?jr:Mr,Z=E==="y"?wi:xi,ne=E==="y"?"height":"width",le=k[E],K=le+x[G],F=le-x[Z],D=m?-A[ne]/2:0,H=w===ku?j[ne]:A[ne],ie=w===ku?-A[ne]:-j[ne],z=t.elements.arrow,q=m&&z?RT(z):{width:0,height:0},re=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:$F(),ae=re[G],he=re[Z],C=Sf(0,j[ne],q[ne]),M=S?j[ne]/2-D-C-ae-R.mainAxis:H-C-ae-R.mainAxis,$=S?-j[ne]/2+D+C+he+R.mainAxis:ie+C+he+R.mainAxis,J=t.elements.arrow&&ap(t.elements.arrow),ee=J?E==="y"?J.clientTop||0:J.clientLeft||0:0,se=(X=V==null?void 0:V[E])!=null?X:0,ge=le+M-se-ee,Me=le+$-se,ue=Sf(m?iy(K,ge):K,le,m?ul(F,Me):F);k[E]=ue,W[E]=ue-le}if(s){var me,_e=E==="x"?jr:Mr,Se=E==="x"?wi:xi,ke=k[O],Ce=O==="y"?"height":"width",je=ke+x[_e],ce=ke-x[Se],fe=[jr,Mr].indexOf(_)!==-1,ye=(me=V==null?void 0:V[O])!=null?me:0,ve=fe?je:ke-j[Ce]-A[Ce]-ye+R.altAxis,xe=fe?ke+j[Ce]+A[Ce]-ye-R.altAxis:ce,Le=m&&fe?Jme(ve,ke,xe):Sf(m?ve:je,ke,m?xe:ce);k[O]=Le,W[O]=Le-ke}t.modifiersData[r]=W}}const Lge={name:"preventOverflow",enabled:!0,phase:"main",fn:Pge,requiresIfExists:["offset"]};function jge(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Mge(e){return e===Kr(e)||!mi(e)?DT(e):jge(e)}function Nge(e){var t=e.getBoundingClientRect(),n=Pu(t.width)/e.offsetWidth||1,r=Pu(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Rge(e,t,n){n===void 0&&(n=!1);var r=mi(t),i=mi(t)&&Nge(t),o=xs(t),a=Lu(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((xo(t)!=="body"||FT(o))&&(s=Mge(t)),mi(t)?(l=Lu(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=IT(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Age(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function Dge(e){var t=Age(e);return Gme.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function Ige(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Fge(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 mN={placement:"bottom",modifiers:[],strategy:"absolute"};function gN(){for(var e=arguments.length,t=new Array(e),n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=ay(e);if(t){var i=ay(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(o,a){if(a&&(typeof a=="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return te(o)}(this,n)}}function Oh(e){return function(t){if(Array.isArray(t))return Mb(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 Mb(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 Mb(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 Mb(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate,i=t.excludeDates,o=t.excludeDateIntervals,a=t.includeDates,s=t.includeDateIntervals,l=t.filterDate;return C0(e,{minDate:n,maxDate:r})||i&&i.some(function(c){return mr(e,c)})||o&&o.some(function(c){var d=c.start,f=c.end;return Ou(e,{start:d,end:f})})||a&&!a.some(function(c){return mr(e,c)})||s&&!s.some(function(c){var d=c.start,f=c.end;return Ou(e,{start:d,end:f})})||l&&!l(Ot(e))||!1}function BT(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.excludeDates,r=t.excludeDateIntervals;return r&&r.length>0?r.some(function(i){var o=i.start,a=i.end;return Ou(e,{start:o,end:a})}):n&&n.some(function(i){return mr(e,i)})||!1}function YF(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate,i=t.excludeDates,o=t.includeDates,a=t.filterDate;return C0(e,{minDate:N8(n),maxDate:M8(r)})||i&&i.some(function(s){return Ri(e,s)})||o&&!o.some(function(s){return Ri(e,s)})||a&&!a(Ot(e))||!1}function Nb(e,t,n,r){var i=et(e),o=rr(e),a=et(t),s=rr(t),l=et(r);return i===a&&i===l?o<=n&&n<=s:i=n||li:void 0}function ave(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate,i=t.excludeDates,o=t.includeDates,a=t.filterDate;return C0(e,{minDate:n,maxDate:r})||i&&i.some(function(s){return sy(e,s)})||o&&!o.some(function(s){return sy(e,s)})||a&&!a(Ot(e))||!1}function Rb(e,t,n){if(!_h(t)||!_h(n))return!1;var r=et(t),i=et(n);return r<=e&&i>=e}function GF(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate,i=t.excludeDates,o=t.includeDates,a=t.filterDate,s=new Date(e,0,1);return C0(s,{minDate:R8(n),maxDate:ide(r)})||i&&i.some(function(l){return za(s,l)})||o&&!o.some(function(l){return za(s,l)})||a&&!a(Ot(s))||!1}function Ab(e,t,n,r){var i=et(e),o=Nc(e),a=et(t),s=Nc(t),l=et(r);return i===a&&i===l?o<=n&&n<=s:i=n||li:void 0}function C0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate;return n&&yh(e,n)<0||r&&yh(e,r)>0}function EN(e,t){return t.some(function(n){return Fi(n)===Fi(e)&&$i(n)===$i(e)})}function TN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.excludeTimes,r=t.includeTimes,i=t.filterTime;return n&&EN(e,n)||r&&!EN(e,r)||i&&!i(e)||!1}function ON(e,t){var n=t.minTime,r=t.maxTime;if(!n||!r)throw new Error("Both minTime and maxTime props required");var i,o=Ot(),a=_g(bg(o,$i(e)),Fi(e)),s=_g(bg(o,$i(n)),Fi(n)),l=_g(bg(o,$i(r)),Fi(r));try{i=!Ou(a,{start:s,end:l})}catch{i=!1}return i}function CN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.includeDates,i=Cu(e,1);return n&&bh(n,i)>0||r&&r.every(function(o){return bh(o,i)>0})||!1}function kN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.maxDate,r=t.includeDates,i=bi(e,1);return n&&bh(i,n)>0||r&&r.every(function(o){return bh(i,o)>0})||!1}function PN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.includeDates,i=wh(e,1);return n&&Zv(n,i)>0||r&&r.every(function(o){return Zv(o,i)>0})||!1}function LN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.maxDate,r=t.includeDates,i=Su(e,1);return n&&Zv(i,n)>0||r&&r.every(function(o){return Zv(i,o)>0})||!1}function qF(e){var t=e.minDate,n=e.includeDates;if(n&&t){var r=n.filter(function(i){return yh(i,t)>=0});return TM(r)}return n?TM(n):t}function ZF(e){var t=e.maxDate,n=e.includeDates;if(n&&t){var r=n.filter(function(i){return yh(i,t)<=0});return EM(r)}return n?EM(n):t}function jN(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"react-datepicker__day--highlighted",n=new Map,r=0,i=e.length;r0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"react-datepicker__day--holidays",n=new Map;return e.forEach(function(r){var i=r.date,o=r.holidayName;if(w0(i)){var a=Bt(i,"MM.dd.yyyy"),s=n.get(a)||{};if(!("className"in s)||s.className!==t||(l=s.holidayNames,c=[o],l.length!==c.length||!l.every(function(f,p){return f===c[p]}))){var l,c;s.className=t;var d=s.holidayNames;s.holidayNames=d?[].concat(Oh(d),[o]):[o],n.set(a,s)}}}),n}function lve(e,t,n,r,i){for(var o=i.length,a=[],s=0;s1&&arguments[1]!==void 0?arguments[1]:Tf,n=Math.ceil(et(e)/t)*t;return{startPeriod:n-(t-1),endPeriod:n}}function NN(e){var t=e.getSeconds(),n=e.getMilliseconds();return Pe(e.getTime()-1e3*t-n)}function cve(e,t,n,r){for(var i=[],o=0;o<2*t+1;o++){var a=e+t-o,s=!0;n&&(s=et(n)<=a),r&&s&&(s=et(r)>=a),s&&i.push(a)}return i}var uve=E0(function(e){Fn(n,Y.Component);var t=$n(n);function n(r){var i;Dn(this,n),Q(te(i=t.call(this,r)),"renderOptions",function(){var l=i.props.year,c=i.state.yearsList.map(function(p){return Y.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(te(i),p),"aria-selected":l===p?"true":void 0},l===p?Y.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",p)}),d=i.props.minDate?et(i.props.minDate):null,f=i.props.maxDate?et(i.props.maxDate):null;return f&&i.state.yearsList.find(function(p){return p===f})||c.unshift(Y.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:i.incrementYears},Y.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),d&&i.state.yearsList.find(function(p){return p===d})||c.push(Y.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:i.decrementYears},Y.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),c}),Q(te(i),"onChange",function(l){i.props.onChange(l)}),Q(te(i),"handleClickOutside",function(){i.props.onCancel()}),Q(te(i),"shiftYears",function(l){var c=i.state.yearsList.map(function(d){return d+l});i.setState({yearsList:c})}),Q(te(i),"incrementYears",function(){return i.shiftYears(1)}),Q(te(i),"decrementYears",function(){return i.shiftYears(-1)});var o=r.yearDropdownItemNumber,a=r.scrollableYearDropdown,s=o||(a?10:5);return i.state={yearsList:cve(i.props.year,s,i.props.minDate,i.props.maxDate)},i.dropdownRef=I.createRef(),i}return In(n,[{key:"componentDidMount",value:function(){var r=this.dropdownRef.current;if(r){var i=r.children?Array.from(r.children):null,o=i?i.find(function(a){return a.ariaSelected}):null;r.scrollTop=o?o.offsetTop+(o.clientHeight-r.clientHeight)/2:(r.scrollHeight-r.clientHeight)/2}}},{key:"render",value:function(){var r=Qe({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return Y.createElement("div",{className:r,ref:this.dropdownRef},this.renderOptions())}}]),n}()),dve=function(e){Fn(n,Y.Component);var t=$n(n);function n(){var r;Dn(this,n);for(var i=arguments.length,o=new Array(i),a=0;a0?d.get(f).holidayNames.join(", "):""}),Q(te(r),"getTabIndex",function(s,l){var c=s||r.props.selected,d=l||r.props.preSelection;return r.isKeyboardSelected()||r.isSameDay(c)&&mr(d,c)?0:-1}),Q(te(r),"handleFocusDay",function(){var s,l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=!1;r.getTabIndex()===0&&!l.isInputFocused&&r.isSameDay(r.props.preSelection)&&(document.activeElement&&document.activeElement!==document.body||(c=!0),r.props.inline&&!r.props.shouldFocusDayInline&&(c=!1),r.props.containerRef&&r.props.containerRef.current&&r.props.containerRef.current.contains(document.activeElement)&&document.activeElement.classList.contains("react-datepicker__day")&&(c=!0),r.props.monthShowsDuplicateDaysEnd&&r.isAfterMonth()&&(c=!1),r.props.monthShowsDuplicateDaysStart&&r.isBeforeMonth()&&(c=!1)),c&&((s=r.dayEl.current)===null||s===void 0||s.focus({preventScroll:!0}))}),Q(te(r),"renderDayContents",function(){return r.props.monthShowsDuplicateDaysEnd&&r.isAfterMonth()||r.props.monthShowsDuplicateDaysStart&&r.isBeforeMonth()?null:r.props.renderDayContents?r.props.renderDayContents(MM(r.props.day),r.props.day):MM(r.props.day)}),Q(te(r),"render",function(){return Y.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",title:r.getTitle(),"aria-disabled":r.isDisabled(),"aria-current":r.isCurrentDay()?"date":void 0,"aria-selected":r.isSelected()||r.isInRange()},r.renderDayContents(),r.getTitle()!==""&&Y.createElement("span",{className:"holiday-overlay"},r.getTitle()))}),r}return In(n,[{key:"componentDidMount",value:function(){this.handleFocusDay()}},{key:"componentDidUpdate",value:function(r){this.handleFocusDay(r)}}]),n}(),yve=function(e){Fn(n,Y.Component);var t=$n(n);function n(){var r;Dn(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=6,m=!l&&!r.isWeekInMonth(f);if(p||m){if(!r.props.peekNextMonth)break;d=!0}}return s}),Q(te(r),"onMonthClick",function(s,l){r.handleDayClick(es(pr(r.props.day,l)),s)}),Q(te(r),"onMonthMouseEnter",function(s){r.handleDayMouseEnter(es(pr(r.props.day,s)))}),Q(te(r),"handleMonthNavigation",function(s,l){r.isDisabled(l)||r.isExcluded(l)||(r.props.setPreSelection(l),r.MONTH_REFS[s].current&&r.MONTH_REFS[s].current.focus())}),Q(te(r),"onMonthKeyDown",function(s,l){var c=r.props,d=c.selected,f=c.preSelection,p=c.disabledKeyboardNavigation,m=c.showTwoColumnMonthYearPicker,v=c.showFourColumnMonthYearPicker,y=c.setPreSelection,x=s.key;if(x!=="Tab"&&s.preventDefault(),!p){var _=RN(v,m),w=Db[_].verticalNavigationOffset,S=Db[_].grid;switch(x){case"Enter":r.onMonthClick(s,l),y(d);break;case"ArrowRight":r.handleMonthNavigation(l===11?0:l+1,bi(f,1));break;case"ArrowLeft":r.handleMonthNavigation(l===0?11:l-1,Cu(f,1));break;case"ArrowUp":r.handleMonthNavigation(S[0].includes(l)?l+12-w:l-w,Cu(f,w));break;case"ArrowDown":r.handleMonthNavigation(S[S.length-1].includes(l)?l-12+w:l+w,bi(f,w))}}}),Q(te(r),"onQuarterClick",function(s,l){r.handleDayClick(xN(cc(r.props.day,l)),s)}),Q(te(r),"onQuarterMouseEnter",function(s){r.handleDayMouseEnter(xN(cc(r.props.day,s)))}),Q(te(r),"handleQuarterNavigation",function(s,l){r.isDisabled(l)||r.isExcluded(l)||(r.props.setPreSelection(l),r.QUARTER_REFS[s-1].current&&r.QUARTER_REFS[s-1].current.focus())}),Q(te(r),"onQuarterKeyDown",function(s,l){var c=s.key;if(!r.props.disabledKeyboardNavigation)switch(c){case"Enter":r.onQuarterClick(s,l),r.props.setPreSelection(r.props.selected);break;case"ArrowRight":r.handleQuarterNavigation(l===4?1:l+1,L8(r.props.preSelection,1));break;case"ArrowLeft":r.handleQuarterNavigation(l===1?4:l-1,Ihe(r.props.preSelection,1))}}),Q(te(r),"getMonthClassNames",function(s){var l=r.props,c=l.day,d=l.startDate,f=l.endDate,p=l.selected,m=l.minDate,v=l.maxDate,y=l.preSelection,x=l.monthClassName,_=l.excludeDates,w=l.includeDates,S=x?x(pr(c,s)):void 0,E=pr(c,s);return Qe("react-datepicker__month-text","react-datepicker__month-".concat(s),S,{"react-datepicker__month-text--disabled":(m||v||_||w)&&YF(E,r.props),"react-datepicker__month-text--selected":r.isSelectedMonth(c,s,p),"react-datepicker__month-text--keyboard-selected":!r.props.disabledKeyboardNavigation&&rr(y)===s,"react-datepicker__month-text--in-selecting-range":r.isInSelectingRangeMonth(s),"react-datepicker__month-text--in-range":Nb(d,f,s,c),"react-datepicker__month-text--range-start":r.isRangeStartMonth(s),"react-datepicker__month-text--range-end":r.isRangeEndMonth(s),"react-datepicker__month-text--selecting-range-start":r.isSelectingMonthRangeStart(s),"react-datepicker__month-text--selecting-range-end":r.isSelectingMonthRangeEnd(s),"react-datepicker__month-text--today":r.isCurrentMonth(c,s)})}),Q(te(r),"getTabIndex",function(s){var l=rr(r.props.preSelection);return r.props.disabledKeyboardNavigation||s!==l?"-1":"0"}),Q(te(r),"getQuarterTabIndex",function(s){var l=Nc(r.props.preSelection);return r.props.disabledKeyboardNavigation||s!==l?"-1":"0"}),Q(te(r),"getAriaLabel",function(s){var l=r.props,c=l.chooseDayAriaLabelPrefix,d=c===void 0?"Choose":c,f=l.disabledDayAriaLabelPrefix,p=f===void 0?"Not available":f,m=l.day,v=pr(m,s),y=r.isDisabled(v)||r.isExcluded(v)?p:d;return"".concat(y," ").concat(Bt(v,"MMMM yyyy"))}),Q(te(r),"getQuarterClassNames",function(s){var l=r.props,c=l.day,d=l.startDate,f=l.endDate,p=l.selected,m=l.minDate,v=l.maxDate,y=l.preSelection;return Qe("react-datepicker__quarter-text","react-datepicker__quarter-".concat(s),{"react-datepicker__quarter-text--disabled":(m||v)&&ave(cc(c,s),r.props),"react-datepicker__quarter-text--selected":r.isSelectedQuarter(c,s,p),"react-datepicker__quarter-text--keyboard-selected":Nc(y)===s,"react-datepicker__quarter-text--in-selecting-range":r.isInSelectingRangeQuarter(s),"react-datepicker__quarter-text--in-range":Ab(d,f,s,c),"react-datepicker__quarter-text--range-start":r.isRangeStartQuarter(s),"react-datepicker__quarter-text--range-end":r.isRangeEndQuarter(s)})}),Q(te(r),"getMonthContent",function(s){var l=r.props,c=l.showFullMonthYearPicker,d=l.renderMonthContent,f=l.locale,p=WF(s,f),m=UT(s,f);return d?d(s,p,m):c?m:p}),Q(te(r),"getQuarterContent",function(s){var l=r.props,c=l.renderQuarterContent,d=function(f,p){return Bt(cc(Ot(),f),"QQQ",p)}(s,l.locale);return c?c(s,d):d}),Q(te(r),"renderMonths",function(){var s=r.props,l=s.showTwoColumnMonthYearPicker,c=s.showFourColumnMonthYearPicker,d=s.day,f=s.selected;return Db[RN(c,l)].grid.map(function(p,m){return Y.createElement("div",{className:"react-datepicker__month-wrapper",key:m},p.map(function(v,y){return Y.createElement("div",{ref:r.MONTH_REFS[v],key:y,onClick:function(x){r.onMonthClick(x,v)},onKeyDown:function(x){r.onMonthKeyDown(x,v)},onMouseEnter:function(){return r.onMonthMouseEnter(v)},tabIndex:r.getTabIndex(v),className:r.getMonthClassNames(v),role:"option","aria-label":r.getAriaLabel(v),"aria-current":r.isCurrentMonth(d,v)?"date":void 0,"aria-selected":r.isSelectedMonth(d,v,f)},r.getMonthContent(v))}))})}),Q(te(r),"renderQuarters",function(){var s=r.props,l=s.day,c=s.selected;return Y.createElement("div",{className:"react-datepicker__quarter-wrapper"},[1,2,3,4].map(function(d,f){return Y.createElement("div",{key:f,ref:r.QUARTER_REFS[f],role:"option",onClick:function(p){r.onQuarterClick(p,d)},onKeyDown:function(p){r.onQuarterKeyDown(p,d)},onMouseEnter:function(){return r.onQuarterMouseEnter(d)},className:r.getQuarterClassNames(d),"aria-selected":r.isSelectedQuarter(l,d,c),tabIndex:r.getQuarterTabIndex(d),"aria-current":r.isCurrentQuarter(l,d)?"date":void 0},r.getQuarterContent(d))}))}),Q(te(r),"getClassNames",function(){var s=r.props,l=s.selectingDate,c=s.selectsStart,d=s.selectsEnd,f=s.showMonthYearPicker,p=s.showQuarterYearPicker;return Qe("react-datepicker__month",{"react-datepicker__month--selecting-range":l&&(c||d)},{"react-datepicker__monthPicker":f},{"react-datepicker__quarterPicker":p})}),r}return In(n,[{key:"render",value:function(){var r=this.props,i=r.showMonthYearPicker,o=r.showQuarterYearPicker,a=r.day,s=r.ariaLabelPrefix,l=s===void 0?"month ":s;return Y.createElement("div",{className:this.getClassNames(),onMouseLeave:this.handleMouseLeave,"aria-label":"".concat(l," ").concat(Bt(a,"yyyy-MM")),role:"listbox"},i?this.renderMonths():o?this.renderQuarters():this.renderWeeks())}}]),n}(),JF=function(e){Fn(n,Y.Component);var t=$n(n);function n(){var r;Dn(this,n);for(var i=arguments.length,o=new Array(i),a=0;a0&&arguments[0]!==void 0?arguments[0]:{}).className||"").split(/\s+/);return Eve.some(function(s){return a.indexOf(s)>=0})})(o.target)&&i.props.onDropdownFocus()}),Q(te(i),"getDateInView",function(){var o=i.props,a=o.preSelection,s=o.selected,l=o.openToDate,c=qF(i.props),d=ZF(i.props),f=Ot(),p=l||s||a;return p||(c&&Ui(f,c)?c:d&&us(f,d)?d:f)}),Q(te(i),"increaseMonth",function(){i.setState(function(o){var a=o.date;return{date:bi(a,1)}},function(){return i.handleMonthChange(i.state.date)})}),Q(te(i),"decreaseMonth",function(){i.setState(function(o){var a=o.date;return{date:Cu(a,1)}},function(){return i.handleMonthChange(i.state.date)})}),Q(te(i),"handleDayClick",function(o,a,s){i.props.onSelect(o,a,s),i.props.setPreSelection&&i.props.setPreSelection(o)}),Q(te(i),"handleDayMouseEnter",function(o){i.setState({selectingDate:o}),i.props.onDayMouseEnter&&i.props.onDayMouseEnter(o)}),Q(te(i),"handleMonthMouseLeave",function(){i.setState({selectingDate:null}),i.props.onMonthMouseLeave&&i.props.onMonthMouseLeave()}),Q(te(i),"handleYearMouseEnter",function(o,a){i.setState({selectingDate:Io(Ot(),a)}),i.props.onYearMouseEnter&&i.props.onYearMouseEnter(o,a)}),Q(te(i),"handleYearMouseLeave",function(o,a){i.props.onYearMouseLeave&&i.props.onYearMouseLeave(o,a)}),Q(te(i),"handleYearChange",function(o){i.props.onYearChange&&(i.props.onYearChange(o),i.setState({isRenderAriaLiveMessage:!0})),i.props.adjustDateOnChange&&(i.props.onSelect&&i.props.onSelect(o),i.props.setOpen&&i.props.setOpen(!0)),i.props.setPreSelection&&i.props.setPreSelection(o)}),Q(te(i),"handleMonthChange",function(o){i.handleCustomMonthChange(o),i.props.adjustDateOnChange&&(i.props.onSelect&&i.props.onSelect(o),i.props.setOpen&&i.props.setOpen(!0)),i.props.setPreSelection&&i.props.setPreSelection(o)}),Q(te(i),"handleCustomMonthChange",function(o){i.props.onMonthChange&&(i.props.onMonthChange(o),i.setState({isRenderAriaLiveMessage:!0}))}),Q(te(i),"handleMonthYearChange",function(o){i.handleYearChange(o),i.handleMonthChange(o)}),Q(te(i),"changeYear",function(o){i.setState(function(a){var s=a.date;return{date:Io(s,o)}},function(){return i.handleYearChange(i.state.date)})}),Q(te(i),"changeMonth",function(o){i.setState(function(a){var s=a.date;return{date:pr(s,o)}},function(){return i.handleMonthChange(i.state.date)})}),Q(te(i),"changeMonthYear",function(o){i.setState(function(a){var s=a.date;return{date:Io(pr(s,rr(o)),et(o))}},function(){return i.handleMonthYearChange(i.state.date)})}),Q(te(i),"header",function(){var o=$T(arguments.length>0&&arguments[0]!==void 0?arguments[0]:i.state.date,i.props.locale,i.props.calendarStartDay),a=[];return i.props.showWeekNumbers&&a.push(Y.createElement("div",{key:"W",className:"react-datepicker__day-name"},i.props.weekLabel||"#")),a.concat([0,1,2,3,4,5,6].map(function(s){var l=$l(o,s),c=i.formatWeekday(l,i.props.locale),d=i.props.weekDayClassName?i.props.weekDayClassName(l):void 0;return Y.createElement("div",{key:s,className:Qe("react-datepicker__day-name",d)},c)}))}),Q(te(i),"formatWeekday",function(o,a){return i.props.formatWeekDay?function(s,l,c){return l(Bt(s,"EEEE",c))}(o,i.props.formatWeekDay,a):i.props.useWeekdaysShort?function(s,l){return Bt(s,"EEE",l)}(o,a):function(s,l){return Bt(s,"EEEEEE",l)}(o,a)}),Q(te(i),"decreaseYear",function(){i.setState(function(o){var a=o.date;return{date:wh(a,i.props.showYearPicker?i.props.yearItemNumber:1)}},function(){return i.handleYearChange(i.state.date)})}),Q(te(i),"clearSelectingDate",function(){i.setState({selectingDate:null})}),Q(te(i),"renderPreviousButton",function(){if(!i.props.renderCustomHeader){var o;switch(!0){case i.props.showMonthYearPicker:o=PN(i.state.date,i.props);break;case i.props.showYearPicker:o=function(_){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},S=w.minDate,E=w.yearItemNumber,O=E===void 0?Tf:E,k=Dc(Yd(wh(_,O)),O).endPeriod,j=S&&et(S);return j&&j>k||!1}(i.state.date,i.props);break;default:o=CN(i.state.date,i.props)}if((i.props.forceShowMonthNavigation||i.props.showDisabledMonthNavigation||!o)&&!i.props.showTimeSelectOnly){var a=["react-datepicker__navigation","react-datepicker__navigation--previous"],s=i.decreaseMonth;(i.props.showMonthYearPicker||i.props.showQuarterYearPicker||i.props.showYearPicker)&&(s=i.decreaseYear),o&&i.props.showDisabledMonthNavigation&&(a.push("react-datepicker__navigation--previous--disabled"),s=null);var l=i.props.showMonthYearPicker||i.props.showQuarterYearPicker||i.props.showYearPicker,c=i.props,d=c.previousMonthButtonLabel,f=c.previousYearButtonLabel,p=i.props,m=p.previousMonthAriaLabel,v=m===void 0?typeof d=="string"?d:"Previous Month":m,y=p.previousYearAriaLabel,x=y===void 0?typeof f=="string"?f:"Previous Year":y;return Y.createElement("button",{type:"button",className:a.join(" "),onClick:s,onKeyDown:i.props.handleOnKeyDown,"aria-label":l?x:v},Y.createElement("span",{className:["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"].join(" ")},l?i.props.previousYearButtonLabel:i.props.previousMonthButtonLabel))}}}),Q(te(i),"increaseYear",function(){i.setState(function(o){var a=o.date;return{date:Su(a,i.props.showYearPicker?i.props.yearItemNumber:1)}},function(){return i.handleYearChange(i.state.date)})}),Q(te(i),"renderNextButton",function(){if(!i.props.renderCustomHeader){var o;switch(!0){case i.props.showMonthYearPicker:o=LN(i.state.date,i.props);break;case i.props.showYearPicker:o=function(_){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},S=w.maxDate,E=w.yearItemNumber,O=E===void 0?Tf:E,k=Dc(Su(_,O),O).startPeriod,j=S&&et(S);return j&&j0&&arguments[0]!==void 0?arguments[0]:i.state.date,a=["react-datepicker__current-month"];return i.props.showYearDropdown&&a.push("react-datepicker__current-month--hasYearDropdown"),i.props.showMonthDropdown&&a.push("react-datepicker__current-month--hasMonthDropdown"),i.props.showMonthYearDropdown&&a.push("react-datepicker__current-month--hasMonthYearDropdown"),Y.createElement("div",{className:a.join(" ")},Bt(o,i.props.dateFormat,i.props.locale))}),Q(te(i),"renderYearDropdown",function(){var o=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(i.props.showYearDropdown&&!o)return Y.createElement(dve,{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:et(i.state.date),scrollableYearDropdown:i.props.scrollableYearDropdown,yearDropdownItemNumber:i.props.yearDropdownItemNumber})}),Q(te(i),"renderMonthDropdown",function(){var o=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(i.props.showMonthDropdown&&!o)return Y.createElement(hve,{dropdownMode:i.props.dropdownMode,locale:i.props.locale,onChange:i.changeMonth,month:rr(i.state.date),useShortMonthInDropdown:i.props.useShortMonthInDropdown})}),Q(te(i),"renderMonthYearDropdown",function(){var o=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(i.props.showMonthYearDropdown&&!o)return Y.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})}),Q(te(i),"handleTodayButtonClick",function(o){i.props.onSelect(SN(),o),i.props.setPreSelection&&i.props.setPreSelection(SN())}),Q(te(i),"renderTodayButton",function(){if(i.props.todayButton&&!i.props.showTimeSelectOnly)return Y.createElement("div",{className:"react-datepicker__today-button",onClick:function(o){return i.handleTodayButtonClick(o)}},i.props.todayButton)}),Q(te(i),"renderDefaultHeader",function(o){var a=o.monthDate,s=o.i;return Y.createElement("div",{className:"react-datepicker__header ".concat(i.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},i.renderCurrentMonth(a),Y.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(i.props.dropdownMode),onFocus:i.handleDropdownFocus},i.renderMonthDropdown(s!==0),i.renderMonthYearDropdown(s!==0),i.renderYearDropdown(s!==0)),Y.createElement("div",{className:"react-datepicker__day-names"},i.header(a)))}),Q(te(i),"renderCustomHeader",function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=o.monthDate,s=o.i;if(i.props.showTimeSelect&&!i.state.monthContainer||i.props.showTimeSelectOnly)return null;var l=CN(i.state.date,i.props),c=kN(i.state.date,i.props),d=PN(i.state.date,i.props),f=LN(i.state.date,i.props),p=!i.props.showMonthYearPicker&&!i.props.showQuarterYearPicker&&!i.props.showYearPicker;return Y.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:i.props.onDropdownFocus},i.props.renderCustomHeader(oy(oy({},i.state),{},{customHeaderCount:s,monthDate:a,changeMonth:i.changeMonth,changeYear:i.changeYear,decreaseMonth:i.decreaseMonth,increaseMonth:i.increaseMonth,decreaseYear:i.decreaseYear,increaseYear:i.increaseYear,prevMonthButtonDisabled:l,nextMonthButtonDisabled:c,prevYearButtonDisabled:d,nextYearButtonDisabled:f})),p&&Y.createElement("div",{className:"react-datepicker__day-names"},i.header(a)))}),Q(te(i),"renderYearHeader",function(){var o=i.state.date,a=i.props,s=a.showYearPicker,l=Dc(o,a.yearItemNumber),c=l.startPeriod,d=l.endPeriod;return Y.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},s?"".concat(c," - ").concat(d):et(o))}),Q(te(i),"renderHeader",function(o){switch(!0){case i.props.renderCustomHeader!==void 0:return i.renderCustomHeader(o);case(i.props.showMonthYearPicker||i.props.showQuarterYearPicker||i.props.showYearPicker):return i.renderYearHeader(o);default:return i.renderDefaultHeader(o)}}),Q(te(i),"renderMonths",function(){var o;if(!i.props.showTimeSelectOnly&&!i.props.showYearPicker){for(var a=[],s=i.props.showPreviousMonths?i.props.monthsShown-1:0,l=Cu(i.state.date,s),c=(o=i.props.monthSelectedIn)!==null&&o!==void 0?o:s,d=0;d0;a.push(Y.createElement("div",{key:p,ref:function(y){i.monthContainer=y},className:"react-datepicker__month-container"},i.renderHeader({monthDate:f,i:d}),Y.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:d,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,holidays:i.props.holidays,selectingDate:i.state.selectingDate,includeDates:i.props.includeDates,includeDateIntervals:i.props.includeDateIntervals,inline:i.props.inline,shouldFocusDayInline:i.props.shouldFocusDayInline,fixedHeight:i.props.fixedHeight,filterDate:i.props.filterDate,preSelection:i.props.preSelection,setPreSelection:i.props.setPreSelection,selected:i.props.selected,selectsStart:i.props.selectsStart,selectsEnd:i.props.selectsEnd,selectsRange:i.props.selectsRange,selectsDisabledDaysInRange:i.props.selectsDisabledDaysInRange,showWeekNumbers:i.props.showWeekNumbers,startDate:i.props.startDate,endDate:i.props.endDate,peekNextMonth:i.props.peekNextMonth,setOpen:i.props.setOpen,shouldCloseOnSelect:i.props.shouldCloseOnSelect,renderDayContents:i.props.renderDayContents,renderMonthContent:i.props.renderMonthContent,renderQuarterContent:i.props.renderQuarterContent,renderYearContent:i.props.renderYearContent,disabledKeyboardNavigation:i.props.disabledKeyboardNavigation,showMonthYearPicker:i.props.showMonthYearPicker,showFullMonthYearPicker:i.props.showFullMonthYearPicker,showTwoColumnMonthYearPicker:i.props.showTwoColumnMonthYearPicker,showFourColumnMonthYearPicker:i.props.showFourColumnMonthYearPicker,showYearPicker:i.props.showYearPicker,showQuarterYearPicker:i.props.showQuarterYearPicker,isInputFocused:i.props.isInputFocused,containerRef:i.containerRef,monthShowsDuplicateDaysEnd:m,monthShowsDuplicateDaysStart:v})))}return a}}),Q(te(i),"renderYears",function(){if(!i.props.showTimeSelectOnly)return i.props.showYearPicker?Y.createElement("div",{className:"react-datepicker__year--container"},i.renderHeader(),Y.createElement(wve,Th({onDayClick:i.handleDayClick,selectingDate:i.state.selectingDate,clearSelectingDate:i.clearSelectingDate,date:i.state.date},i.props,{onYearMouseEnter:i.handleYearMouseEnter,onYearMouseLeave:i.handleYearMouseLeave}))):void 0}),Q(te(i),"renderTimeSection",function(){if(i.props.showTimeSelect&&(i.state.monthContainer||i.props.showTimeSelectOnly))return Y.createElement(JF,{selected:i.props.selected,openToDate:i.props.openToDate,onChange:i.props.onTimeChange,timeClassName:i.props.timeClassName,format:i.props.timeFormat,includeTimes:i.props.includeTimes,intervals:i.props.timeIntervals,minTime:i.props.minTime,maxTime:i.props.maxTime,excludeTimes:i.props.excludeTimes,filterTime:i.props.filterTime,timeCaption:i.props.timeCaption,todayButton:i.props.todayButton,showMonthDropdown:i.props.showMonthDropdown,showMonthYearDropdown:i.props.showMonthYearDropdown,showYearDropdown:i.props.showYearDropdown,withPortal:i.props.withPortal,monthRef:i.state.monthContainer,injectTimes:i.props.injectTimes,locale:i.props.locale,handleOnKeyDown:i.props.handleOnKeyDown,showTimeSelectOnly:i.props.showTimeSelectOnly})}),Q(te(i),"renderInputTimeSection",function(){var o=new Date(i.props.selected),a=ka(o)&&i.props.selected?"".concat(MN(o.getHours()),":").concat(MN(o.getMinutes())):"";if(i.props.showTimeInput)return Y.createElement(xve,{date:o,timeString:a,timeInputLabel:i.props.timeInputLabel,onChange:i.props.onTimeChange,customTimeInput:i.props.customTimeInput})}),Q(te(i),"renderAriaLiveRegion",function(){var o,a=Dc(i.state.date,i.props.yearItemNumber),s=a.startPeriod,l=a.endPeriod;return o=i.props.showYearPicker?"".concat(s," - ").concat(l):i.props.showMonthYearPicker||i.props.showQuarterYearPicker?et(i.state.date):"".concat(UT(rr(i.state.date),i.props.locale)," ").concat(et(i.state.date)),Y.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},i.state.isRenderAriaLiveMessage&&o)}),Q(te(i),"renderChildren",function(){if(i.props.children)return Y.createElement("div",{className:"react-datepicker__children-container"},i.props.children)}),i.containerRef=Y.createRef(),i.state={date:i.getDateInView(),selectingDate:null,monthContainer:null,isRenderAriaLiveMessage:!1},i}return In(n,[{key:"componentDidMount",value:function(){var r=this;this.props.showTimeSelect&&(this.assignMonthContainer=void r.setState({monthContainer:r.monthContainer}))}},{key:"componentDidUpdate",value:function(r){var i=this;if(!this.props.preSelection||mr(this.props.preSelection,r.preSelection)&&this.props.monthSelectedIn===r.monthSelectedIn)this.props.openToDate&&!mr(this.props.openToDate,r.openToDate)&&this.setState({date:this.props.openToDate});else{var o=!Ri(this.state.date,this.props.preSelection);this.setState({date:this.props.preSelection},function(){return o&&i.handleCustomMonthChange(i.state.date)})}}},{key:"render",value:function(){var r=this.props.container||Sve;return Y.createElement("div",{ref:this.containerRef},Y.createElement(r,{className:Qe("react-datepicker",this.props.className,{"react-datepicker--time-only":this.props.showTimeSelectOnly}),showPopperArrow:this.props.showPopperArrow,arrowProps:this.props.arrowProps},this.renderAriaLiveRegion(),this.renderPreviousButton(),this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.renderChildren()))}}],[{key:"defaultProps",get:function(){return{onDropdownFocus:function(){},monthsShown:1,forceShowMonthNavigation:!1,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",customTimeInput:null,yearItemNumber:Tf}}}]),n}(),e$=function(e){Fn(n,Y.Component);var t=$n(n);function n(r){var i;return Dn(this,n),(i=t.call(this,r)).el=document.createElement("div"),i}return In(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 nl.createPortal(this.props.children,this.el)}}]),n}(),Ove=function(e){return!e.disabled&&e.tabIndex!==-1},t$=function(e){Fn(n,Y.Component);var t=$n(n);function n(r){var i;return Dn(this,n),Q(te(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(Ove)}),Q(te(i),"handleFocusStart",function(){var o=i.getTabChildren();o&&o.length>1&&o[o.length-1].focus()}),Q(te(i),"handleFocusEnd",function(){var o=i.getTabChildren();o&&o.length>1&&o[0].focus()}),i.tabLoopRef=Y.createRef(),i}return In(n,[{key:"render",value:function(){return this.props.enableTabLoop?Y.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},Y.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:"0",onFocus:this.handleFocusStart}),this.props.children,Y.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:"0",onFocus:this.handleFocusEnd})):this.props.children}}],[{key:"defaultProps",get:function(){return{enableTabLoop:!0}}}]),n}(),Cve=function(e){Fn(n,Y.Component);var t=$n(n);function n(){return Dn(this,n),t.apply(this,arguments)}return In(n,[{key:"render",value:function(){var r,i=this.props,o=i.className,a=i.wrapperClassName,s=i.hidePopper,l=i.popperComponent,c=i.popperModifiers,d=i.popperPlacement,f=i.popperProps,p=i.targetComponent,m=i.enableTabLoop,v=i.popperOnKeyDown,y=i.portalId,x=i.portalHost;if(!s){var _=Qe("react-datepicker-popper",o);r=Y.createElement(Jge,Th({modifiers:c,placement:d},f),function(S){var E=S.ref,O=S.style,k=S.placement,j=S.arrowProps;return Y.createElement(t$,{enableTabLoop:m},Y.createElement("div",{ref:E,style:O,className:_,"data-placement":k,onKeyDown:v},Y.cloneElement(l,{arrowProps:j})))})}this.props.popperContainer&&(r=Y.createElement(this.props.popperContainer,{},r)),y&&!s&&(r=Y.createElement(e$,{portalId:y,portalHost:x},r));var w=Qe("react-datepicker-wrapper",a);return Y.createElement(Ame,{className:"react-datepicker-manager"},Y.createElement(rve,null,function(S){var E=S.ref;return Y.createElement("div",{ref:E,className:w},p)}),r)}}],[{key:"defaultProps",get:function(){return{hidePopper:!0,popperModifiers:[],popperProps:{},popperPlacement:"bottom-start"}}}]),n}(),AN="react-datepicker-ignore-onclickoutside",kve=E0(Tve),Ib="Date input not valid.",Pve=function(e){Fn(n,Y.Component);var t=$n(n);function n(r){var i;return Dn(this,n),Q(te(i=t.call(this,r)),"getPreSelection",function(){return i.props.openToDate?i.props.openToDate:i.props.selectsEnd&&i.props.startDate?i.props.startDate:i.props.selectsStart&&i.props.endDate?i.props.endDate:Ot()}),Q(te(i),"calcInitialState",function(){var o,a,s=(o=i.props.holidays)===null||o===void 0?void 0:o.reduce(function(p,m){var v=new Date(m.date);return _h(v)?[].concat(Oh(p),[oy(oy({},m),{},{date:v})]):p},[]),l=i.getPreSelection(),c=qF(i.props),d=ZF(i.props),f=c&&Ui(l,Hr(c))?c:d&&us(l,El(d))?d:l;return{open:i.props.startOpen||!1,preventFocus:!1,preSelection:(a=i.props.selectsRange?i.props.startDate:i.props.selected)!==null&&a!==void 0?a:f,highlightDates:jN(i.props.highlightDates),holidays:sve(s),focused:!1,shouldFocusDayInline:!1,isRenderAriaLiveMessage:!1}}),Q(te(i),"clearPreventFocusTimeout",function(){i.preventFocusTimeout&&clearTimeout(i.preventFocusTimeout)}),Q(te(i),"setFocus",function(){i.input&&i.input.focus&&i.input.focus({preventScroll:!0})}),Q(te(i),"setBlur",function(){i.input&&i.input.blur&&i.input.blur(),i.cancelFocusInput()}),Q(te(i),"setOpen",function(o){var a=arguments.length>1&&arguments[1]!==void 0&&arguments[1];i.setState({open:o,preSelection:o&&i.state.open?i.state.preSelection:i.calcInitialState().preSelection,lastPreSelectChange:Fb},function(){o||i.setState(function(s){return{focused:!!a&&s.focused}},function(){!a&&i.setBlur(),i.setState({inputValue:null})})})}),Q(te(i),"inputOk",function(){return w0(i.state.preSelection)}),Q(te(i),"isCalendarOpen",function(){return i.props.open===void 0?i.state.open&&!i.props.disabled&&!i.props.readOnly:i.props.open}),Q(te(i),"handleFocus",function(o){i.state.preventFocus||(i.props.onFocus(o),i.props.preventOpenOnFocus||i.props.readOnly||i.setOpen(!0)),i.setState({focused:!0})}),Q(te(i),"cancelFocusInput",function(){clearTimeout(i.inputFocusTimeout),i.inputFocusTimeout=null}),Q(te(i),"deferFocusInput",function(){i.cancelFocusInput(),i.inputFocusTimeout=setTimeout(function(){return i.setFocus()},1)}),Q(te(i),"handleDropdownFocus",function(){i.cancelFocusInput()}),Q(te(i),"handleBlur",function(o){(!i.state.open||i.props.withPortal||i.props.showTimeInput)&&i.props.onBlur(o),i.setState({focused:!1})}),Q(te(i),"handleCalendarClickOutside",function(o){i.props.inline||i.setOpen(!1),i.props.onClickOutside(o),i.props.withPortal&&o.preventDefault()}),Q(te(i),"handleChange",function(){for(var o=arguments.length,a=new Array(o),s=0;s0&&(v=Eb(c,d.slice(0,c.length),new Date)),ka(v)||(v=new Date(c))),ka(v)&&x?v:null));i.props.showTimeSelectOnly&&i.props.selected&&!mr(_,i.props.selected)&&(_=Ahe(i.props.selected,_==null?{hours:Fi(i.props.selected),minutes:$i(i.props.selected),seconds:Sb(i.props.selected)}:{hours:Fi(_),minutes:$i(_),seconds:Sb(_)})),!_&&l.target.value||i.setSelected(_,l,!0)}}),Q(te(i),"handleSelect",function(o,a,s){if(i.setState({preventFocus:!0},function(){return i.preventFocusTimeout=setTimeout(function(){return i.setState({preventFocus:!1})},50),i.preventFocusTimeout}),i.props.onChangeRaw&&i.props.onChangeRaw(a),i.setSelected(o,a,!1,s),i.props.showDateSelect&&i.setState({isRenderAriaLiveMessage:!0}),!i.props.shouldCloseOnSelect||i.props.showTimeSelect)i.setPreSelection(o);else if(!i.props.inline){i.props.selectsRange||i.setOpen(!1);var l=i.props,c=l.startDate,d=l.endDate;!c||d||Ui(o,c)||i.setOpen(!1)}}),Q(te(i),"setSelected",function(o,a,s,l){var c=o;if(i.props.showYearPicker){if(c!==null&&GF(et(c),i.props))return}else if(i.props.showMonthYearPicker){if(c!==null&&YF(c,i.props))return}else if(c!==null&&O0(c,i.props))return;var d=i.props,f=d.onChange,p=d.selectsRange,m=d.startDate,v=d.endDate;if(!Js(i.props.selected,c)||i.props.allowSameDay||p)if(c!==null&&(!i.props.selected||s&&(i.props.showTimeSelect||i.props.showTimeSelectOnly||i.props.showTimeInput)||(c=wN(c,{hour:Fi(i.props.selected),minute:$i(i.props.selected),second:Sb(i.props.selected)})),i.props.inline||i.setState({preSelection:c}),i.props.focusSelectedMonth||i.setState({monthSelectedIn:l})),p){var y=m&&!v,x=m&&v;!m&&!v?f([c,null],a):y&&(Ui(c,m)?f([c,null],a):f([m,c],a)),x&&f([c,null],a)}else f(c,a);s||(i.props.onSelect(c,a),i.setState({inputValue:null}))}),Q(te(i),"setPreSelection",function(o){var a=i.props.minDate!==void 0,s=i.props.maxDate!==void 0,l=!0;if(o){var c=Hr(o);if(a&&s)l=Eg(o,i.props.minDate,i.props.maxDate);else if(a){var d=Hr(i.props.minDate);l=us(o,d)||Js(c,d)}else if(s){var f=El(i.props.maxDate);l=Ui(o,f)||Js(c,f)}}l&&i.setState({preSelection:o})}),Q(te(i),"handleTimeChange",function(o){var a=i.props.selected?i.props.selected:i.getPreSelection(),s=i.props.selected?o:wN(a,{hour:Fi(o),minute:$i(o)});i.setState({preSelection:s}),i.props.onChange(s),i.props.shouldCloseOnSelect&&i.setOpen(!1),i.props.showTimeInput&&i.setOpen(!0),(i.props.showTimeSelectOnly||i.props.showTimeSelect)&&i.setState({isRenderAriaLiveMessage:!0}),i.setState({inputValue:null})}),Q(te(i),"onInputClick",function(){i.props.disabled||i.props.readOnly||i.setOpen(!0),i.props.onInputClick()}),Q(te(i),"onInputKeyDown",function(o){i.props.onKeyDown(o);var a=o.key;if(i.state.open||i.props.inline||i.props.preventOpenOnFocus){if(i.state.open){if(a==="ArrowDown"||a==="ArrowUp"){o.preventDefault();var s=i.calendar.componentNode&&i.calendar.componentNode.querySelector('.react-datepicker__day[tabindex="0"]');return void(s&&s.focus({preventScroll:!0}))}var l=Ot(i.state.preSelection);a==="Enter"?(o.preventDefault(),i.inputOk()&&i.state.lastPreSelectChange===Fb?(i.handleSelect(l,o),!i.props.shouldCloseOnSelect&&i.setPreSelection(l)):i.setOpen(!1)):a==="Escape"?(o.preventDefault(),i.setOpen(!1)):a==="Tab"&&i.setOpen(!1),i.inputOk()||i.props.onInputError({code:1,msg:Ib})}}else a!=="ArrowDown"&&a!=="ArrowUp"&&a!=="Enter"||i.onInputClick()}),Q(te(i),"onPortalKeyDown",function(o){o.key==="Escape"&&(o.preventDefault(),i.setState({preventFocus:!0},function(){i.setOpen(!1),setTimeout(function(){i.setFocus(),i.setState({preventFocus:!1})})}))}),Q(te(i),"onDayKeyDown",function(o){i.props.onKeyDown(o);var a=o.key,s=Ot(i.state.preSelection);if(a==="Enter")o.preventDefault(),i.handleSelect(s,o),!i.props.shouldCloseOnSelect&&i.setPreSelection(s);else if(a==="Escape")o.preventDefault(),i.setOpen(!1),i.inputOk()||i.props.onInputError({code:1,msg:Ib});else if(!i.props.disabledKeyboardNavigation){var l;switch(a){case"ArrowLeft":l=xT(s,1);break;case"ArrowRight":l=$l(s,1);break;case"ArrowUp":l=Fhe(s,1);break;case"ArrowDown":l=hT(s,1);break;case"PageUp":l=Cu(s,1);break;case"PageDown":l=bi(s,1);break;case"Home":l=wh(s,1);break;case"End":l=Su(s,1)}if(!l)return void(i.props.onInputError&&i.props.onInputError({code:1,msg:Ib}));if(o.preventDefault(),i.setState({lastPreSelectChange:Fb}),i.props.adjustDateOnChange&&i.setSelected(l),i.setPreSelection(l),i.props.inline){var c=rr(s),d=rr(l),f=et(s),p=et(l);c!==d||f!==p?i.setState({shouldFocusDayInline:!0}):i.setState({shouldFocusDayInline:!1})}}}),Q(te(i),"onPopperKeyDown",function(o){o.key==="Escape"&&(o.preventDefault(),i.setState({preventFocus:!0},function(){i.setOpen(!1),setTimeout(function(){i.setFocus(),i.setState({preventFocus:!1})})}))}),Q(te(i),"onClearClick",function(o){o&&o.preventDefault&&o.preventDefault(),i.props.selectsRange?i.props.onChange([null,null],o):i.props.onChange(null,o),i.setState({inputValue:null})}),Q(te(i),"clear",function(){i.onClearClick()}),Q(te(i),"onScroll",function(o){typeof i.props.closeOnScroll=="boolean"&&i.props.closeOnScroll?o.target!==document&&o.target!==document.documentElement&&o.target!==document.body||i.setOpen(!1):typeof i.props.closeOnScroll=="function"&&i.props.closeOnScroll(o)&&i.setOpen(!1)}),Q(te(i),"renderCalendar",function(){return i.props.inline||i.isCalendarOpen()?Y.createElement(kve,{ref:function(o){i.calendar=o},locale:i.props.locale,calendarStartDay:i.props.calendarStartDay,chooseDayAriaLabelPrefix:i.props.chooseDayAriaLabelPrefix,disabledDayAriaLabelPrefix:i.props.disabledDayAriaLabelPrefix,weekAriaLabelPrefix:i.props.weekAriaLabelPrefix,monthAriaLabelPrefix:i.props.monthAriaLabelPrefix,adjustDateOnChange:i.props.adjustDateOnChange,setOpen:i.setOpen,shouldCloseOnSelect:i.props.shouldCloseOnSelect,dateFormat:i.props.dateFormatCalendar,useWeekdaysShort:i.props.useWeekdaysShort,formatWeekDay:i.props.formatWeekDay,dropdownMode:i.props.dropdownMode,selected:i.props.selected,preSelection:i.state.preSelection,onSelect:i.handleSelect,onWeekSelect:i.props.onWeekSelect,openToDate:i.props.openToDate,minDate:i.props.minDate,maxDate:i.props.maxDate,selectsStart:i.props.selectsStart,selectsEnd:i.props.selectsEnd,selectsRange:i.props.selectsRange,startDate:i.props.startDate,endDate:i.props.endDate,excludeDates:i.props.excludeDates,excludeDateIntervals:i.props.excludeDateIntervals,filterDate:i.props.filterDate,onClickOutside:i.handleCalendarClickOutside,formatWeekNumber:i.props.formatWeekNumber,highlightDates:i.state.highlightDates,holidays:i.state.holidays,includeDates:i.props.includeDates,includeDateIntervals:i.props.includeDateIntervals,includeTimes:i.props.includeTimes,injectTimes:i.props.injectTimes,inline:i.props.inline,shouldFocusDayInline:i.state.shouldFocusDayInline,peekNextMonth:i.props.peekNextMonth,showMonthDropdown:i.props.showMonthDropdown,showPreviousMonths:i.props.showPreviousMonths,useShortMonthInDropdown:i.props.useShortMonthInDropdown,showMonthYearDropdown:i.props.showMonthYearDropdown,showWeekNumbers:i.props.showWeekNumbers,showYearDropdown:i.props.showYearDropdown,withPortal:i.props.withPortal,forceShowMonthNavigation:i.props.forceShowMonthNavigation,showDisabledMonthNavigation:i.props.showDisabledMonthNavigation,scrollableYearDropdown:i.props.scrollableYearDropdown,scrollableMonthYearDropdown:i.props.scrollableMonthYearDropdown,todayButton:i.props.todayButton,weekLabel:i.props.weekLabel,outsideClickIgnoreClass:AN,fixedHeight:i.props.fixedHeight,monthsShown:i.props.monthsShown,monthSelectedIn:i.state.monthSelectedIn,onDropdownFocus:i.handleDropdownFocus,onMonthChange:i.props.onMonthChange,onYearChange:i.props.onYearChange,dayClassName:i.props.dayClassName,weekDayClassName:i.props.weekDayClassName,monthClassName:i.props.monthClassName,timeClassName:i.props.timeClassName,showDateSelect:i.props.showDateSelect,showTimeSelect:i.props.showTimeSelect,showTimeSelectOnly:i.props.showTimeSelectOnly,onTimeChange:i.handleTimeChange,timeFormat:i.props.timeFormat,timeIntervals:i.props.timeIntervals,minTime:i.props.minTime,maxTime:i.props.maxTime,excludeTimes:i.props.excludeTimes,filterTime:i.props.filterTime,timeCaption:i.props.timeCaption,className:i.props.calendarClassName,container:i.props.calendarContainer,yearItemNumber:i.props.yearItemNumber,yearDropdownItemNumber:i.props.yearDropdownItemNumber,previousMonthAriaLabel:i.props.previousMonthAriaLabel,previousMonthButtonLabel:i.props.previousMonthButtonLabel,nextMonthAriaLabel:i.props.nextMonthAriaLabel,nextMonthButtonLabel:i.props.nextMonthButtonLabel,previousYearAriaLabel:i.props.previousYearAriaLabel,previousYearButtonLabel:i.props.previousYearButtonLabel,nextYearAriaLabel:i.props.nextYearAriaLabel,nextYearButtonLabel:i.props.nextYearButtonLabel,timeInputLabel:i.props.timeInputLabel,disabledKeyboardNavigation:i.props.disabledKeyboardNavigation,renderCustomHeader:i.props.renderCustomHeader,popperProps:i.props.popperProps,renderDayContents:i.props.renderDayContents,renderMonthContent:i.props.renderMonthContent,renderQuarterContent:i.props.renderQuarterContent,renderYearContent:i.props.renderYearContent,onDayMouseEnter:i.props.onDayMouseEnter,onMonthMouseLeave:i.props.onMonthMouseLeave,onYearMouseEnter:i.props.onYearMouseEnter,onYearMouseLeave:i.props.onYearMouseLeave,selectsDisabledDaysInRange:i.props.selectsDisabledDaysInRange,showTimeInput:i.props.showTimeInput,showMonthYearPicker:i.props.showMonthYearPicker,showFullMonthYearPicker:i.props.showFullMonthYearPicker,showTwoColumnMonthYearPicker:i.props.showTwoColumnMonthYearPicker,showFourColumnMonthYearPicker:i.props.showFourColumnMonthYearPicker,showYearPicker:i.props.showYearPicker,showQuarterYearPicker:i.props.showQuarterYearPicker,showPopperArrow:i.props.showPopperArrow,excludeScrollbar:i.props.excludeScrollbar,handleOnKeyDown:i.props.onKeyDown,handleOnDayKeyDown:i.onDayKeyDown,isInputFocused:i.state.focused,customTimeInput:i.props.customTimeInput,setPreSelection:i.setPreSelection},i.props.children):null}),Q(te(i),"renderAriaLiveRegion",function(){var o,a=i.props,s=a.dateFormat,l=a.locale,c=i.props.showTimeInput||i.props.showTimeSelect?"PPPPp":"PPPP";return o=i.props.selectsRange?"Selected start date: ".concat(no(i.props.startDate,{dateFormat:c,locale:l}),". ").concat(i.props.endDate?"End date: "+no(i.props.endDate,{dateFormat:c,locale:l}):""):i.props.showTimeSelectOnly?"Selected time: ".concat(no(i.props.selected,{dateFormat:s,locale:l})):i.props.showYearPicker?"Selected year: ".concat(no(i.props.selected,{dateFormat:"yyyy",locale:l})):i.props.showMonthYearPicker?"Selected month: ".concat(no(i.props.selected,{dateFormat:"MMMM yyyy",locale:l})):i.props.showQuarterYearPicker?"Selected quarter: ".concat(no(i.props.selected,{dateFormat:"yyyy, QQQ",locale:l})):"Selected date: ".concat(no(i.props.selected,{dateFormat:c,locale:l})),Y.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},o)}),Q(te(i),"renderDateInput",function(){var o,a=Qe(i.props.className,Q({},AN,i.state.open)),s=i.props.customInput||Y.createElement("input",{type:"text"}),l=i.props.customInputRef||"ref",c=typeof i.props.value=="string"?i.props.value:typeof i.state.inputValue=="string"?i.state.inputValue:i.props.selectsRange?function(d,f,p){if(!d)return"";var m=no(d,p),v=f?no(f,p):"";return"".concat(m," - ").concat(v)}(i.props.startDate,i.props.endDate,i.props):no(i.props.selected,i.props);return Y.cloneElement(s,(Q(o={},l,function(d){i.input=d}),Q(o,"value",c),Q(o,"onBlur",i.handleBlur),Q(o,"onChange",i.handleChange),Q(o,"onClick",i.onInputClick),Q(o,"onFocus",i.handleFocus),Q(o,"onKeyDown",i.onInputKeyDown),Q(o,"id",i.props.id),Q(o,"name",i.props.name),Q(o,"form",i.props.form),Q(o,"autoFocus",i.props.autoFocus),Q(o,"placeholder",i.props.placeholderText),Q(o,"disabled",i.props.disabled),Q(o,"autoComplete",i.props.autoComplete),Q(o,"className",Qe(s.props.className,a)),Q(o,"title",i.props.title),Q(o,"readOnly",i.props.readOnly),Q(o,"required",i.props.required),Q(o,"tabIndex",i.props.tabIndex),Q(o,"aria-describedby",i.props.ariaDescribedBy),Q(o,"aria-invalid",i.props.ariaInvalid),Q(o,"aria-labelledby",i.props.ariaLabelledBy),Q(o,"aria-required",i.props.ariaRequired),o))}),Q(te(i),"renderClearButton",function(){var o=i.props,a=o.isClearable,s=o.selected,l=o.startDate,c=o.endDate,d=o.clearButtonTitle,f=o.clearButtonClassName,p=f===void 0?"":f,m=o.ariaLabelClose,v=m===void 0?"Close":m;return!a||s==null&&l==null&&c==null?null:Y.createElement("button",{type:"button",className:"react-datepicker__close-icon ".concat(p).trim(),"aria-label":v,onClick:i.onClearClick,title:d,tabIndex:-1})}),i.state=i.calcInitialState(),i}return In(n,[{key:"componentDidMount",value:function(){window.addEventListener("scroll",this.onScroll,!0)}},{key:"componentDidUpdate",value:function(r,i){var o,a;r.inline&&(o=r.selected,a=this.props.selected,o&&a?rr(o)!==rr(a)||et(o)!==et(a):o!==a)&&this.setPreSelection(this.props.selected),this.state.monthSelectedIn!==void 0&&r.monthsShown!==this.props.monthsShown&&this.setState({monthSelectedIn:0}),r.highlightDates!==this.props.highlightDates&&this.setState({highlightDates:jN(this.props.highlightDates)}),i.focused||Js(r.selected,this.props.selected)||this.setState({inputValue:null}),i.open!==this.state.open&&(i.open===!1&&this.state.open===!0&&this.props.onCalendarOpen(),i.open===!0&&this.state.open===!1&&this.props.onCalendarClose())}},{key:"componentWillUnmount",value:function(){this.clearPreventFocusTimeout(),window.removeEventListener("scroll",this.onScroll,!0)}},{key:"renderInputContainer",value:function(){var r=this.props.showIcon;return Y.createElement("div",{className:"react-datepicker__input-container".concat(r?" react-datepicker__view-calendar-icon":"")},r&&Y.createElement("svg",{className:"react-datepicker__calendar-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},Y.createElement("path",{d:"M96 32V64H48C21.5 64 0 85.5 0 112v48H448V112c0-26.5-21.5-48-48-48H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V64H160V32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192H0V464c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V192z"})),this.state.isRenderAriaLiveMessage&&this.renderAriaLiveRegion(),this.renderDateInput(),this.renderClearButton())}},{key:"render",value:function(){var r=this.renderCalendar();if(this.props.inline)return r;if(this.props.withPortal){var i=this.state.open?Y.createElement(t$,{enableTabLoop:this.props.enableTabLoop},Y.createElement("div",{className:"react-datepicker__portal",tabIndex:-1,onKeyDown:this.onPortalKeyDown},r)):null;return this.state.open&&this.props.portalId&&(i=Y.createElement(e$,{portalId:this.props.portalId,portalHost:this.props.portalHost},i)),Y.createElement("div",null,this.renderInputContainer(),i)}return Y.createElement(Cve,{className:this.props.popperClassName,wrapperClassName:this.props.wrapperClassName,hidePopper:!this.isCalendarOpen(),portalId:this.props.portalId,portalHost:this.props.portalHost,popperModifiers:this.props.popperModifiers,targetComponent:this.renderInputContainer(),popperContainer:this.props.popperContainer,popperComponent:r,popperPlacement:this.props.popperPlacement,popperProps:this.props.popperProps,popperOnKeyDown:this.onPopperKeyDown,enableTabLoop:this.props.enableTabLoop})}}],[{key:"defaultProps",get:function(){return{allowSameDay:!1,dateFormat:"MM/dd/yyyy",dateFormatCalendar:"LLLL yyyy",onChange:function(){},disabled:!1,disabledKeyboardNavigation:!1,dropdownMode:"scroll",onFocus:function(){},onBlur:function(){},onKeyDown:function(){},onInputClick:function(){},onSelect:function(){},onClickOutside:function(){},onMonthChange:function(){},onCalendarOpen:function(){},onCalendarClose:function(){},preventOpenOnFocus:!1,onYearChange:function(){},onInputError:function(){},monthsShown:1,readOnly:!1,withPortal:!1,selectsDisabledDaysInRange:!1,shouldCloseOnSelect:!0,showTimeSelect:!1,showTimeInput:!1,showPreviousMonths:!1,showMonthYearPicker:!1,showFullMonthYearPicker:!1,showTwoColumnMonthYearPicker:!1,showFourColumnMonthYearPicker:!1,showYearPicker:!1,showQuarterYearPicker:!1,strictParsing:!1,timeIntervals:30,timeCaption:"Time",previousMonthAriaLabel:"Previous Month",previousMonthButtonLabel:"Previous Month",nextMonthAriaLabel:"Next Month",nextMonthButtonLabel:"Next Month",previousYearAriaLabel:"Previous Year",previousYearButtonLabel:"Previous Year",nextYearAriaLabel:"Next Year",nextYearButtonLabel:"Next Year",timeInputLabel:"Time",enableTabLoop:!0,yearItemNumber:Tf,focusSelectedMonth:!1,showPopperArrow:!0,excludeScrollbar:!0,customTimeInput:null,calendarStartDay:void 0}}}]),n}(),Lve="input",Fb="navigate";const v2=e=>{const{className:t,isClearable:n,selected:r,dateFormat:i}=e,o=!n||!r,a=I.useRef();return g.jsxs("div",{className:"icon-input-container",children:[g.jsx(Pve,{...e,popperModifiers:[{name:"arrow",options:{padding:24}}],dateFormat:i??K8,className:Qe("icon-input-container__input form-control",t),ref:a}),o&&g.jsx(Ne,{icon:sre,className:"icon-input-container__icon",onClick:()=>{var s;return(s=a.current)==null?void 0:s.input.focus()}})]})},jve=e=>g.jsx(v2,{...e,dateFormat:ST,showTimeSelect:!0,timeIntervals:10}),$b=({children:e,infoTooltip:t,checked:n,onChange:r})=>g.jsxs("p",{children:[g.jsx(m6,{inline:!0,checked:n,className:t?"me-2":"",onChange:r,children:e}),t&&g.jsx(wg,{placement:"right",children:t})]}),Mve=({isOpen:e,toggle:t})=>g.jsxs(ua,{isOpen:e,toggle:t,centered:!0,size:"lg",children:[g.jsx(da,{toggle:t,children:"Info"}),g.jsxs(Eo,{children:[g.jsxs("p",{children:["When the ",g.jsx("b",{children:g.jsx("i",{children:'"Use existing URL if found"'})})," checkbox is checked, the server will return an existing short URL if it matches provided params."]}),g.jsx("p",{children:"These are the checks performed by Shlink in order to determine if an existing short URL should be returned:"}),g.jsxs("ul",{children:[g.jsx("li",{children:"When only the long URL is provided: The most recent match will be returned, or a new short URL will be created if none is found."}),g.jsxs("li",{children:["When long URL and custom slug and/or domain are provided: Same as in previous case, but it will try to match the short URL using both the long URL and the slug, the long URL and the domain, or the three of them.",g.jsx("br",{}),"If the slug is being used by another long URL, an error will be returned."]}),g.jsx("li",{children:"When other params are provided: Same as in previous cases, but it will try to match existing short URLs with all provided data. If any of them does not match, a new short URL will be created"})]})]})]}),Nve=()=>{const[e,t]=Sn();return g.jsxs(g.Fragment,{children:[g.jsx(xh,{className:"p-0",title:"What does this mean?",onClick:t,children:g.jsx(Ne,{icon:BS})}),g.jsx(Mve,{isOpen:e,toggle:t})]})},Ub=e=>typeof e=="string"?ra(e):e,Rve=e=>"shortCodeLength"in e&&"customSlug"in e&&"domain"in e,n$=({mode:e,saving:t,onSave:n,initialState:r,tagsList:i})=>{const{TagsSelector:o,DomainSelector:a}=Kt(n$),[s,l]=I.useState(r),c=()=>l(r),d=Xh("deviceLongUrls"),f=e==="edit",p=Rve(s),m=e==="create-basic",v=O=>l(k=>({...k,tags:O})),y=(O,k)=>uo(O)?O:uo(k)?null:void 0,x=OT(async()=>n({...s,validSince:fs(s.validSince)??null,validUntil:fs(s.validUntil)??null,maxVisits:uo(s.maxVisits)?Number(s.maxVisits):null}).then(()=>!f&&c()).catch(()=>{}));I.useEffect(()=>{l(r)},[r]);const _=(O,k,j="text",A={},U={})=>g.jsx(Ur,{...U,children:g.jsx(bl,{name:O,id:O,type:j,placeholder:k,value:s[O]??"",onChange:A.onChange??(R=>l(V=>({...V,[O]:R.target.value}))),...A})}),w=(O,k,j)=>{var A;return g.jsx(Eme,{icon:j,name:O,id:O,type:"url",placeholder:k,value:((A=s.deviceLongUrls)==null?void 0:A[O])??"",onChange:U=>l(R=>{var V;return{...R,deviceLongUrls:{...R.deviceLongUrls??{},[O]:y(U.target.value,(V=r.deviceLongUrls)==null?void 0:V[O])}}})})},S=(O,k,j={})=>g.jsx(jve,{name:O,selected:s[O]?Ub(s[O]):null,placeholderText:k,isClearable:!0,onChange:A=>l(U=>({...U,[O]:A})),...j}),E=g.jsxs(g.Fragment,{children:[g.jsx(Ur,{children:g.jsx(bl,{name:"longUrl",bsSize:"lg",type:"url",placeholder:"URL to be shortened",required:!0,value:s.longUrl,onChange:O=>l(k=>({...k,longUrl:O.target.value}))})}),g.jsxs(gr,{children:[m&&_("customSlug","Custom slug","text",{bsSize:"lg"},{className:"col-lg-6"}),g.jsx("div",{className:m?"col-lg-6 mb-3":"col-12",children:g.jsx(o,{tags:i.tags,selectedTags:s.tags??[],onChange:v})})]})]});return g.jsxs("form",{name:"shortUrlForm",className:"short-url-form",onSubmit:x,children:[m&&E,!m&&g.jsxs(g.Fragment,{children:[g.jsxs(gr,{children:[g.jsx("div",{className:Qe("mb-3",{"col-sm-6":d,"col-12":!d}),children:g.jsx(mn,{title:"Main options",className:"mb-3",children:E})}),d&&g.jsx("div",{className:"col-sm-6 mb-3",children:g.jsxs(mn,{title:"Device-specific long URLs",children:[g.jsx(Ur,{children:w("android","Android-specific redirection",fre)}),g.jsx(Ur,{children:w("ios","iOS-specific redirection",dre)}),w("desktop","Desktop-specific redirection",bY)]})})]}),g.jsxs(gr,{children:[g.jsx("div",{className:"col-sm-6 mb-3",children:g.jsxs(mn,{title:"Customize the short URL",children:[_("title","Title","text",{onChange:({target:O})=>l(k=>({...k,title:y(O.value,r.title)}))}),!f&&p&&g.jsxs(g.Fragment,{children:[g.jsxs(gr,{children:[g.jsx("div",{className:"col-lg-6",children:_("customSlug","Custom slug","text",{disabled:uo(s.shortCodeLength)})}),g.jsx("div",{className:"col-lg-6",children:_("shortCodeLength","Short code length","number",{min:4,disabled:uo(s.customSlug)})})]}),g.jsx(a,{value:s.domain,onChange:O=>l(k=>({...k,domain:O}))})]})]})}),g.jsx("div",{className:"col-sm-6 mb-3",children:g.jsxs(mn,{title:"Limit access to the short URL",children:[_("maxVisits","Maximum number of visits allowed","number",{min:1}),g.jsx("div",{className:"mb-3",children:S("validSince","Enabled since...",{maxDate:s.validUntil?Ub(s.validUntil):void 0})}),S("validUntil","Enabled until...",{minDate:s.validSince?Ub(s.validSince):void 0})]})})]}),g.jsxs(gr,{children:[g.jsx("div",{className:"col-sm-6 mb-3",children:g.jsxs(mn,{title:"Extra checks",children:[g.jsx($b,{infoTooltip:"If checked, Shlink will try to reach the long URL, failing in case it's not publicly accessible.",checked:s.validateUrl,onChange:O=>l(k=>({...k,validateUrl:O})),children:"Validate URL"}),!f&&p&&g.jsxs("p",{children:[g.jsx(m6,{inline:!0,className:"me-2",checked:s.findIfExists,onChange:O=>l(k=>({...k,findIfExists:O})),children:"Use existing URL if found"}),g.jsx(Nve,{})]})]})}),g.jsx("div",{className:"col-sm-6 mb-3",children:g.jsxs(mn,{title:"Configure behavior",children:[g.jsx($b,{infoTooltip:"This short URL will be included in the robots.txt for your Shlink instance, allowing web crawlers (like Google) to index it.",checked:s.crawlable,onChange:O=>l(k=>({...k,crawlable:O})),children:"Make it crawlable"}),g.jsx($b,{infoTooltip:"When this short URL is visited, any query params appended to it will be forwarded to the long URL.",checked:s.forwardQuery,onChange:O=>l(k=>({...k,forwardQuery:O})),children:"Forward query params on redirect"})]})})]})]}),g.jsx("div",{className:"text-center",children:g.jsx(yt,{outline:!0,color:"primary",disabled:t||qi(s.longUrl),className:"btn-xs-block",children:t?"Saving...":"Save"})})]})},Ave=Qt(n$,["TagsSelector","DomainSelector"]),Dve=({active:e,allText:t,onChange:n})=>g.jsxs(g.Fragment,{children:[g.jsx(Ue,{active:e==="all",onClick:()=>n("all"),children:t}),g.jsx(Ue,{divider:!0,tag:"hr"}),$he.map(r=>g.jsx(Ue,{active:e===r,onClick:()=>n(r),children:tF(r)},r))]}),Ive=({startDate:e=null,endDate:t=null,disabled:n=!1,onStartDateChange:r,onEndDateChange:i})=>g.jsxs("div",{className:"row",children:[g.jsx("div",{className:"col-md-6",children:g.jsx(v2,{selected:e,placeholderText:"Since...",isClearable:!0,maxDate:t??void 0,disabled:n,onChange:r})}),g.jsx("div",{className:"col-md-6",children:g.jsx(v2,{className:"mt-2 mt-md-0",selected:t,placeholderText:"Until...",isClearable:!0,minDate:e??void 0,disabled:n,onChange:o=>i(o&&El(o))})})]}),r$=({onDatesChange:e,initialDateRange:t,defaultText:n,disabled:r,updatable:i=!1})=>{const o=ty(t),[a,s]=I.useState(o?t:void 0),[l,c]=I.useState(o?void 0:t),d=p=>{s(J8(p)?ep:void 0),c(p),e(p)},f=p=>{s(p),c(void 0),e(nF(p))};return cpe(()=>{if(!i)return;const p=ty(t);p&&f(t),t&&!p&&d(t)},[t,i]),g.jsxs(fa,{disabled:r,text:tF(a??l)??n,children:[g.jsx(Dve,{allText:n,active:a,onChange:f}),g.jsx(Ue,{divider:!0,tag:"hr"}),g.jsx(Ue,{header:!0,"aria-hidden":!0,children:"Custom:"}),g.jsx(Ue,{text:!0,children:g.jsx(Ive,{...l,onStartDateChange:p=>d({...l,startDate:p}),onEndDateChange:p=>d({...l,endDate:p})})})]})},Fve={dateCreated:"Created at",shortCode:"Short URL",longUrl:"Long URL",title:"Title",visits:"Visits"},$ve=({onChange:e,selected:t={},className:n,supportsDisabledFiltering:r})=>{const{excludeBots:i=!1,excludeMaxVisitsReached:o=!1,excludePastValidUntil:a=!1}=t,s=l=>()=>e({...t,[l]:!(t!=null&&t[l])});return g.jsxs(fa,{text:"Filters",dropdownClassName:n,inline:!0,end:!0,minWidth:250,children:[g.jsx(Ue,{header:!0,"aria-hidden":!0,children:"Visits:"}),g.jsx(Ue,{active:i,onClick:s("excludeBots"),children:"Ignore visits from bots"}),r&&g.jsxs(g.Fragment,{children:[g.jsx(Ue,{divider:!0,tag:"hr"}),g.jsx(Ue,{header:!0,"aria-hidden":!0,children:"Short URLs:"}),g.jsx(Ue,{active:o,onClick:s("excludeMaxVisitsReached"),children:"Exclude with visits reached"}),g.jsx(Ue,{active:a,onClick:s("excludePastValidUntil"),children:"Exclude enabled in the past"})]}),g.jsx(Ue,{divider:!0,tag:"hr"}),g.jsx(Ue,{disabled:!uo(t),onClick:()=>e({excludeBots:!1,excludeMaxVisitsReached:!1,excludePastValidUntil:!1}),children:g.jsx("i",{children:"Clear filters"})})]})},i$=({className:e,shortUrlsAmount:t,order:n,handleOrderBy:r,tagsList:i})=>{const{ExportShortUrlsBtn:o,TagsSelector:a}=Kt(i$),[s,l]=S0(),{search:c,tags:d,startDate:f,endDate:p,excludeBots:m,excludeMaxVisitsReached:v,excludePastValidUntil:y,tagsMode:x="any"}=s,_=Xh("filterDisabledUrls"),w=Ul("visits"),S=Vr(({startDate:j,endDate:A})=>({startDate:fs(j)??void 0,endDate:fs(A)??void 0}),l),E=Vr(j=>qi(j)?void 0:j,j=>l({search:j})),O=j=>l({tags:j}),k=Vr(()=>x==="any"?"all":"any",j=>l({tagsMode:j}));return g.jsxs("div",{className:Qe("short-urls-filtering-bar-container",e),children:[g.jsx(Hh,{initialValue:c,onChange:E}),g.jsxs(o0,{className:"mt-3",children:[g.jsx(a,{immutable:!0,placeholder:"With tags...",tags:i.tags,selectedTags:d,onChange:O}),d.length>1&&g.jsxs(g.Fragment,{children:[g.jsx(yt,{outline:!0,color:"secondary",onClick:k,id:"tagsModeBtn","aria-label":"Change tags mode",children:g.jsx(Ne,{className:"short-urls-filtering-bar__tags-icon",icon:x==="all"?FD:qW})}),g.jsx(Rr,{target:"tagsModeBtn",placement:"left",children:x==="all"?"With all the tags.":"With any of the tags."})]})]}),g.jsxs(gr,{className:"flex-lg-row-reverse",children:[g.jsx("div",{className:"col-lg-8 col-xl-6 mt-3",children:g.jsxs("div",{className:"d-md-flex",children:[g.jsx("div",{className:"flex-fill",children:g.jsx(r$,{defaultText:"All short URLs",initialDateRange:eF(f,p),onDatesChange:S})}),g.jsx($ve,{className:"ms-0 ms-md-2 mt-3 mt-md-0",selected:{excludeBots:m??(w==null?void 0:w.excludeBots),excludeMaxVisitsReached:v,excludePastValidUntil:y},onChange:l,supportsDisabledFiltering:_})]})}),g.jsx("div",{className:"col-6 col-lg-4 col-xl-6 mt-3",children:g.jsx(o,{amount:t})}),g.jsx("div",{className:"col-6 d-lg-none mt-3",children:g.jsx(Wh,{prefixed:!1,items:Fve,order:n,onChange:r})})]})]})},Uve=Qt(i$,["ExportShortUrlsBtn","TagsSelector"]);function Of({currentOrder:e,field:t,className:n="ms-1"}){return!e.dir||e.field!==t?null:g.jsx(Ne,{icon:e.dir==="ASC"?BW:XW,className:n})}const dc=2,y2="...",o$=(e,t)=>{const n=dT(s8(dc,e-dc),b8(t-1,e+dc)+1);return e-dc>dc&&n.unshift(y2),e+dce===y2,a$=e=>Ch(e)?e:wn(e),s$=(e,t)=>Ch(e)?`${e}_${t}`:`${e}`,Bve=({paginator:e,currentQueryString:t=""})=>{const{currentPage:n=0,pagesCount:r=0}=e??{},i=Fl(),o=s=>`${i}/list-short-urls/${s}${t}`;if(r<=1)return g.jsx("div",{className:"pb-3"});const a=()=>o$(n,r).map((s,l)=>g.jsx(il,{disabled:Ch(s),active:n===s,children:g.jsx(ol,{tag:It,to:o(s),children:a$(s)})},s$(s,l)));return g.jsxs(_E,{className:"sticky-card-paginator py-3",listClassName:"flex-wrap justify-content-center mb-0",children:[g.jsx(il,{disabled:n===1,children:g.jsx(ol,{previous:!0,tag:It,to:o(n-1)})}),a(),g.jsx(il,{disabled:n>=r,children:g.jsx(ol,{next:!0,tag:It,to:o(n+1)})})]})},zve={field:"dateCreated",dir:"DESC"},l$=ws(({listShortUrls:e,shortUrlsList:t})=>{var n,r,i;const{ShortUrlsTable:o,ShortUrlsFilteringBar:a}=Kt(l$),{page:s}=Rl(),l=En(),[c,d]=S0(),f=PT(),{tags:p,search:m,startDate:v,endDate:y,orderBy:x,tagsMode:_,excludeBots:w,excludePastValidUntil:S,excludeMaxVisitsReached:E}=c,[O,k]=I.useState(x??((n=f.shortUrlsList)==null?void 0:n.defaultOrdering)??zve),{pagination:j}=(t==null?void 0:t.shortUrls)??{},A=I.useMemo(()=>{var Z;return w??((Z=f.visits)==null?void 0:Z.excludeBots)},[w,(r=f.visits)==null?void 0:r.excludeBots]),U=Xh("excludeBotsOnShortUrls"),R=(Z,ne)=>{d({orderBy:{field:Z,dir:ne}}),k({field:Z,dir:ne})},V=Z=>()=>R(Z,l0(Z,O.field,O.dir)),W=Z=>g.jsx(Of,{currentOrder:O,field:Z}),X=Vr(Z=>[...new Set([...p,Z])],Z=>d({tags:Z})),G=I.useCallback(({field:Z,dir:ne})=>U&&A&&Z==="visits"?{field:"nonBotVisits",dir:ne}:{field:Z,dir:ne},[A,U]);return I.useEffect(()=>{e({page:s,searchTerm:m,tags:p,startDate:v,endDate:y,orderBy:G(O),tagsMode:_,excludePastValidUntil:S,excludeMaxVisitsReached:E})},[e,G,s,m,p,v,y,O,_,S,E]),g.jsxs(g.Fragment,{children:[g.jsx(a,{shortUrlsAmount:(i=t.shortUrls)==null?void 0:i.pagination.totalItems,order:O,handleOrderBy:R,className:"mb-3"}),g.jsxs(Gr,{body:!0,className:"pb-0",children:[g.jsx(o,{shortUrlsList:t,orderByColumn:V,renderOrderIcon:W,onTagClick:X}),g.jsx(Bve,{paginator:j,currentQueryString:l.search})]})]})},()=>[pi.visits]),Vve=Qt(l$,["ShortUrlsTable","ShortUrlsFilteringBar"]),c$=({orderByColumn:e,renderOrderIcon:t,shortUrlsList:n,onTagClick:r,className:i})=>{const{ShortUrlsRow:o}=Kt(c$),{error:a,loading:s,shortUrls:l}=n,c=Qe({"short-urls-table__header-cell--with-action":!!e}),d=Qe("short-urls-table__header-cell",c),f=Qe("table table-hover responsive-table short-urls-table",i),p=()=>a?g.jsx("tr",{children:g.jsx("td",{colSpan:6,className:"text-center table-danger text-dark",children:"Something went wrong while loading short URLs :("})}):s?g.jsx("tr",{children:g.jsx("td",{colSpan:6,className:"text-center",children:"Loading..."})}):!s&&qi(l==null?void 0:l.data)?g.jsx("tr",{children:g.jsx("td",{colSpan:6,className:"text-center",children:"No results found"})}):l==null?void 0:l.data.map(m=>g.jsx(o,{shortUrl:m,onTagClick:r},m.shortUrl));return g.jsxs("table",{className:f,children:[g.jsx("thead",{className:"responsive-table__header short-urls-table__header",children:g.jsxs("tr",{children:[g.jsxs("th",{className:d,onClick:e==null?void 0:e("dateCreated"),children:["Created at ",t==null?void 0:t("dateCreated")]}),g.jsxs("th",{className:d,onClick:e==null?void 0:e("shortCode"),children:["Short URL ",t==null?void 0:t("shortCode")]}),g.jsxs("th",{className:"short-urls-table__header-cell",children:[g.jsxs(xh,{className:Qe("p-0",c),onClick:e==null?void 0:e("title"),children:["Title ",t==null?void 0:t("title")]}),"  /  ",g.jsxs(xh,{className:Qe("p-0",c),onClick:e==null?void 0:e("longUrl"),children:[g.jsx("span",{className:"indivisible",children:"Long URL"})," ",t==null?void 0:t("longUrl")]})]}),g.jsx("th",{className:"short-urls-table__header-cell",children:"Tags"}),g.jsx("th",{className:d,onClick:e==null?void 0:e("visits"),children:g.jsxs("span",{className:"indivisible",children:["Visits ",t==null?void 0:t("visits")]})}),g.jsx("th",{className:"short-urls-table__header-cell",colSpan:2,"aria-hidden":!0})]})}),g.jsx("tbody",{children:p()})]})},Hve=Qt(c$,["ShortUrlsRow"]),Wve=(e,t)=>{e.factory("ShortUrlsList",Vve),e.decorator("ShortUrlsList",t(["mercureInfo","shortUrlsList"],["listShortUrls","createNewVisits","loadMercureInfo"])),e.factory("ShortUrlsTable",Hve),e.factory("ShortUrlsRow",gme),e.factory("ShortUrlsRowMenu",vme),e.factory("CreateShortUrlResult",nme),e.factory("ShortUrlForm",Ave),e.decorator("ShortUrlForm",t(["tagsList"])),e.factory("CreateShortUrl",Dpe),e.decorator("CreateShortUrl",t(["shortUrlCreation"],["createShortUrl","resetCreateShortUrl"])),e.factory("EditShortUrl",Ipe),e.decorator("EditShortUrl",t(["shortUrlDetail","shortUrlEdition"],["getShortUrlDetail","editShortUrl"])),e.serviceFactory("DeleteShortUrlModal",()=>rme),e.decorator("DeleteShortUrlModal",t(["shortUrlDeletion"],["deleteShortUrl","shortUrlDeleted","resetDeleteShortUrl"])),e.factory("QrCodeModal",lme),e.factory("ExportShortUrlsBtn",ime),e.factory("ShortUrlsFilteringBar",Uve),e.decorator("ShortUrlsFilteringBar",t(["tagsList"])),e.serviceFactory("shortUrlsListReducerCreator",Cpe,"listShortUrls","editShortUrl","createShortUrl"),e.serviceFactory("shortUrlsListReducer",mt("reducer"),"shortUrlsListReducerCreator"),e.serviceFactory("shortUrlCreationReducerCreator",_me,"createShortUrl"),e.serviceFactory("shortUrlCreationReducer",mt("reducer"),"shortUrlCreationReducerCreator"),e.serviceFactory("shortUrlEditionReducerCreator",Sme,"editShortUrl"),e.serviceFactory("shortUrlEditionReducer",mt("reducer"),"shortUrlEditionReducerCreator"),e.serviceFactory("shortUrlDeletionReducerCreator",Epe,"deleteShortUrl"),e.serviceFactory("shortUrlDeletionReducer",mt("reducer"),"shortUrlDeletionReducerCreator"),e.serviceFactory("shortUrlDetailReducerCreator",bme,"apiClientFactory"),e.serviceFactory("shortUrlDetailReducer",mt("reducer"),"shortUrlDetailReducerCreator"),e.serviceFactory("listShortUrls",Ope,"apiClientFactory"),e.serviceFactory("createShortUrl",yme,"apiClientFactory"),e.serviceFactory("resetCreateShortUrl",mt("resetCreateShortUrl"),"shortUrlCreationReducerCreator"),e.serviceFactory("deleteShortUrl",Spe,"apiClientFactory"),e.serviceFactory("resetDeleteShortUrl",mt("resetDeleteShortUrl"),"shortUrlDeletionReducerCreator"),e.serviceFactory("shortUrlDeleted",()=>lF),e.serviceFactory("getShortUrlDetail",mt("getShortUrlDetail"),"shortUrlDetailReducerCreator"),e.serviceFactory("editShortUrl",xme,"apiClientFactory")},Yve=({tag:e,toggle:t,isOpen:n,deleteTag:r,tagDelete:i,tagDeleted:o})=>{const{deleting:a,error:s,deleted:l,errorData:c}=i;return g.jsxs(ua,{toggle:t,isOpen:n,centered:!0,onClosed:()=>l&&o(e),children:[g.jsx(da,{toggle:t,className:"text-danger",children:"Delete tag"}),g.jsxs(Eo,{children:["Are you sure you want to delete tag ",g.jsx("b",{children:e}),"?",s&&g.jsx(zr,{type:"error",small:!0,className:"mt-2",children:g.jsx(na,{errorData:c,fallbackMessage:"Something went wrong while deleting the tag :("})})]}),g.jsxs(Al,{children:[g.jsx(yt,{color:"link",onClick:t,children:"Cancel"}),g.jsx(yt,{color:"danger",disabled:a,onClick:async()=>{await r(e),t()},children:a?"Deleting tag...":"Delete tag"})]})]})},u$=({tag:e,editTag:t,toggle:n,tagEdited:r,isOpen:i,tagEdit:o})=>{const{ColorGenerator:a}=Kt(u$),[s,l]=I.useState(e),[c,d]=I.useState(a.getColorForKey(e)),{editing:f,error:p,edited:m,errorData:v}=o,y=OT(async()=>{await t({oldName:e,newName:s,color:c}),n()}),x=I.useCallback(()=>m&&r({oldName:e,newName:s,color:c}),[c,m,s,e,r]);return g.jsx(ua,{isOpen:i,toggle:n,centered:!0,onClosed:x,children:g.jsxs("form",{name:"editTag",onSubmit:y,children:[g.jsx(da,{toggle:n,children:"Edit tag"}),g.jsxs(Eo,{children:[g.jsxs(o0,{children:[g.jsxs("div",{className:"input-group-text p-0 position-relative",style:{backgroundColor:c,borderColor:c},children:[g.jsx(Ne,{icon:zW,className:"position-absolute top-50 start-50 translate-middle text-white"}),g.jsx(bl,{className:"form-control-color opacity-0",type:"color",value:c,onChange:_=>d(_.target.value)})]}),g.jsx(bl,{value:s,placeholder:"Tag",required:!0,onChange:({target:_})=>l(_.value)})]}),p&&g.jsx(zr,{type:"error",small:!0,className:"mt-2",children:g.jsx(na,{errorData:v,fallbackMessage:"Something went wrong while editing the tag :("})})]}),g.jsxs(Al,{children:[g.jsx(yt,{type:"button",color:"link",onClick:n,children:"Cancel"}),g.jsx(yt,{color:"primary",disabled:f,children:f?"Saving...":"Save"})]})]})})},Gve=Qt(u$,["ColorGenerator"]),Ws={Enter:"Enter",Escape:"Escape",Tab:"Tab",Backspace:"Backspace",UpArrow:"ArrowUp",UpArrowCompat:"Up",DownArrow:"ArrowDown",DownArrowCompat:"Down",PageDown:"PageDown",PageUp:"PageUp"},zT=Symbol("Create new tag"),d$=Symbol("No options"),gc=()=>{},Un=Y.createContext(void 0);function DN(e,t){return e===t?[]:e.filter(n=>!t.includes(n))}function qve(e){return e.selectionStart===0&&e.selectionEnd===0}function Zve(e){const t=e.value.length;return e.selectionStart===t&&e.selectionEnd===t}function k0(e){return`${e}-label`}function Kve(e){return`${e}-combobox`}function Qve(e){return`${e}-input`}function f$(e){return`${e}-listbox`}function h$(e,t){return`${e}-option-${iye(t)}`}function Xve(e,t){if((e==null?void 0:e.value)===zT&&e.disabled===!1)return{value:t,label:t}}function Jve(e){const t=Xve(e.activeOption,e.value)||e.activeOption||lye(e.value,e.options);return t&&!t.disabled?t:void 0}function eye(e,t,n){const r=t-1;return e>r?n:en===e.value)}const oye=/[-\\^$*+?.()|[\]{}]/g;function p$(e){return e.replace(oye,"\\$&")}function m$(e){return new RegExp(p$(e),"i")}function aye(e){return new RegExp(`^${p$(e)}$`,"i")}function sye(e,t){if(e){const n=m$(e);return t.filter(r=>n.test(r.label))}else return[].concat(t)}function lye(e,t){const n=aye(e);return t.find(r=>n.test(r.label))||null}const cye={autoComplete:"off",autoCorrect:"off","data-form-type":"other",spellCheck:!1};function uye({allowBackspace:e,ariaDescribedBy:t,ariaErrorMessage:n,delimiterKeys:r}){const{id:i,comboBoxRef:o,inputRef:a,isDisabled:s,isInvalid:l,managerRef:c}=I.useContext(Un),d=I.useMemo(()=>{const v=U=>{const R=U.currentTarget.value;c.current.updateInputValue(R),document.activeElement===a.current&&c.current.listBoxExpand(R)},y=()=>{c.current.listBoxExpand()},x=U=>{var R;((R=o.current)==null?void 0:R.contains(U.relatedTarget))===!1&&c.current.listBoxCollapse()},_=()=>{c.current.listBoxExpand()},w=U=>{const{activeIndex:R,isExpanded:V}=c.current.state;V?(U.preventDefault(),c.current.updateActiveIndex(R+1)):(Zve(U.currentTarget)||U.altKey)&&(U.preventDefault(),c.current.listBoxExpand())},S=U=>{const{activeIndex:R,isExpanded:V}=c.current.state;V?(U.preventDefault(),c.current.updateActiveIndex(R-1)):qve(U.currentTarget)&&(U.preventDefault(),c.current.listBoxExpand())},E=U=>{const{isExpanded:R,options:V}=c.current.state;R&&(U.preventDefault(),c.current.updateActiveIndex(V.length-1))},O=U=>{c.current.state.isExpanded&&(U.preventDefault(),c.current.updateActiveIndex(0))},k=()=>{c.current.state.isExpanded?c.current.listBoxCollapse():c.current.updateInputValue("")},j=()=>{if(e){const{value:U,selected:R}=c.current.state,V=R[R.length-1];U===""&&V&&c.current.selectTag(V)}},A=U=>{c.current.state.isExpanded&&(U.preventDefault(),c.current.selectTag())};return{onBlur:x,onChange:v,onClick:_,onFocus:y,onKeyDown:U=>{if(U.key===Ws.UpArrow)return S(U);if(U.key===Ws.DownArrow)return w(U);if(U.key===Ws.PageUp)return O(U);if(U.key===Ws.PageDown)return E(U);if(U.key===Ws.Escape)return k();if(U.key===Ws.Backspace)return j();if(r.includes(U.key))return A(U)}}},[e,o,r,a,c]),{activeOption:f,isExpanded:p,value:m}=c.current.state;return{...cye,"aria-autocomplete":"list","aria-activedescendant":f?h$(i,f):void 0,"aria-controls":f$(i),"aria-describedby":t||void 0,"aria-disabled":s,"aria-errormessage":l&&n||void 0,"aria-invalid":l,"aria-labelledby":k0(i),"aria-expanded":p,id:Qve(i),onBlur:s?gc:d.onBlur,onChange:s?gc:d.onChange,onClick:s?gc:d.onClick,onFocus:s?gc:d.onFocus,onKeyDown:s?gc:d.onKeyDown,ref:a,role:"combobox",type:"text",value:m}}const dye={position:"absolute",width:0,height:0,visibility:"hidden",overflow:"scroll",whiteSpace:"pre"},fye=["font-family","font-size","font-style","font-weight","letter-spacing","text-transform"];function hye({allowResize:e=!0,text:t}){const n=I.useRef(null),{inputRef:r}=I.useContext(Un),[i,o]=I.useState(null);return I.useLayoutEffect(()=>{if(e&&r.current&&n.current&&window.getComputedStyle){const a=window.getComputedStyle(r.current);fye.forEach(s=>{const l=a.getPropertyValue(s);n.current.style.setProperty(s,l)})}},[e,r,n]),I.useLayoutEffect(()=>{var a;if(e){const s=Math.ceil(((a=n.current)==null?void 0:a.scrollWidth)??0)+2;i!==s&&o(s)}},[e,t,i]),{width:i,sizerProps:{ref:n,style:dye}}}function pye(){const{id:e,inputRef:t,listBoxRef:n,managerRef:r}=I.useContext(Un),i=r.current.state.activeIndex===-1,o=I.useCallback(a=>{var s;a.target!==t.current&&((s=t.current)==null||s.focus({preventScroll:!0}))},[t]);return I.useEffect(()=>{var a;i&&((a=n.current)==null||a.scrollTo({top:0}))},[n,i]),{"aria-labelledby":k0(e),id:f$(e),onFocus:o,ref:n,role:"listbox",tabIndex:-1}}function mye({activateFirstOption:e,allowNew:t,collapseOnSelect:n,newOptionText:r,noOptionsText:i,onAdd:o,onDelete:a,onCollapse:s,onExpand:l,onInput:c,onShouldCollapse:d,onShouldExpand:f,onValidate:p,selected:m,suggestions:v,suggestionsTransform:y}){const x=I.useRef(),[_,w]=I.useState(null),[S,E]=I.useState(!1),[O,k]=I.useState(""),j=I.useMemo(()=>{const G=y(O,v);return O&&(t&&G.push({disabled:p?!p(O):!1,label:r,value:zT}),G.length===0&&G.push({disabled:!0,label:i,value:d$})),G},[t,r,i,p,v,y,O]),A=_?b2(_,j):-1,U=e?Math.max(A,0):A,R=j[U],V={activeIndex:U,activeOption:R,isExpanded:S,options:j,selected:m,value:O},W={tagsAdded:x.current?DN(m,x.current.state.selected):[],tagsDeleted:x.current?DN(x.current.state.selected,m):[]},X={listBoxCollapse(G){S&&(!d||d(G??V.value))&&(E(!1),w(null),s==null||s())},listBoxExpand(G){S||(!f||f(G??V.value))&&(E(!0),w(j[U]),l==null||l())},updateActiveIndex(G){const Z=eye(G,j.length,e?0:-1);w(j[Z])},updateInputValue(G){O!==G&&(k(G),c==null||c(G))},selectTag(G){if(G??(G=Jve(V)),G){const Z=b2(G,V.selected);Z>-1?a(Z):o(G),n&&this.listBoxCollapse(),this.updateInputValue("")}}};return x.current={...X,flags:W,state:V},x}function gye(e){const{id:t,inputRef:n,listBoxRef:r,managerRef:i}=I.useContext(Un),o=I.useRef(null),a=i.current.state.options[e],s=e===i.current.state.activeIndex,l=a.disabled??!1,c=b2(a,i.current.state.selected)>-1,d=I.useCallback(()=>{var p;i.current.selectTag(),(p=n.current)==null||p.focus()},[n,i]),f=I.useCallback(()=>{e!==i.current.state.activeIndex&&i.current.updateActiveIndex(e)},[e,i]);return _ye(o,r,s),{option:{...a,active:s,disabled:l,index:e,selected:c},optionProps:{"aria-disabled":l,"aria-posinset":e+1,"aria-selected":l?void 0:c,"aria-setsize":i.current.state.options.length,id:h$(t,a),onClick:d,onMouseDown:f,ref:o,role:"option",tabIndex:-1}}}function vye({inputRef:e,managerRef:t}){return I.useRef({input:{blur(){var n;(n=e.current)==null||n.blur()},focus(){var n;(n=e.current)==null||n.focus()},get value(){return t.current.state.value},set value(n){typeof n!="string"&&(n=String(n)),t.current.updateInputValue(n)}},listBox:{collapse(){t.current.listBoxCollapse()},expand(){t.current.listBoxExpand()},get activeOption(){return t.current.state.activeOption},get isExpanded(){return t.current.state.isExpanded}},select(n){t.current.selectTag(n)}}).current}function yye({onBlur:e,onFocus:t}){const[n,r]=I.useState(!1),{id:i,inputRef:o}=I.useContext(Un),a=I.useRef(null),s=I.useMemo(()=>({"aria-describedby":k0(i),id:i,onFocus(){r(!0),t==null||t()},onBlur(){var l;(l=a.current)!=null&&l.contains(document.activeElement)||(r(!1),e==null||e())},onClick(){var l;document.activeElement===a.current&&((l=o.current)==null||l.focus())},ref:a,tabIndex:-1}),[o,i,e,t,a]);return{isActive:n,rootProps:s}}function _ye(e,t,n){I.useEffect(()=>{var r,i,o,a;if(n){const s=(r=e.current)==null?void 0:r.offsetHeight,l=(i=e.current)==null?void 0:i.offsetTop,c=(o=t.current)==null?void 0:o.offsetHeight,d=(a=t.current)==null?void 0:a.scrollTop;ld+c&&t.current.scrollTo(0,l+s-c)}},[n,t,e])}function bye(e,t){const{isDisabled:n,managerRef:r}=I.useContext(Un),i=r.current.state.selected[e],o=I.useCallback(()=>r.current.selectTag(i),[r,i]);return{tag:i,tagProps:{"aria-disabled":n,title:ly(t,i.label),onClick:n?gc:o}}}function wye(){var e;const{inputRef:t,managerRef:n}=I.useContext(Un),r=I.useRef(),i=n.current.flags.tagsDeleted.length,o=(e=r.current)==null?void 0:e.contains(document.activeElement);return I.useLayoutEffect(()=>{var a,s;if(i){const l=(a=r.current)==null?void 0:a.contains(document.activeElement);o&&!l&&((s=t.current)==null||s.focus({preventScroll:!0}))}},[t,o,r,i]),{listRef:r}}const xye={position:"absolute",width:1,height:1,left:-9999,overflow:"hidden",clip:"rect(0 0 0 0)"};function Sye({ariaAddedText:e,ariaDeletedText:t}){const{managerRef:n}=I.useContext(Un),r=I.useRef([]);return n.current.flags.tagsAdded.forEach(i=>{r.current.push(ly(e,i.label))}),n.current.flags.tagsDeleted.forEach(i=>{r.current.push(ly(t,i.label))}),Y.createElement("div",{"aria-live":"polite","aria-relevant":"additions",role:"status",style:xye},r.current.join(` -`))}function Eye({children:e}){const{classNames:t,comboBoxRef:n,id:r}=I.useContext(Un);return Y.createElement("div",{className:t.comboBox,id:Kve(r),ref:n},e)}const Tye=({classNames:e,text:t})=>Y.createElement("mark",{className:e.highlight},t);function Oye({option:e,query:t,render:n=Tye}){const{classNames:r}=I.useContext(Un);if(e.value===zT||e.value===d$)return Y.createElement(Y.Fragment,null,ly(e.label,t));if(t){const i=nye(e.label,t);if(i){const o=n({text:i[1],classNames:r});return Y.createElement(Y.Fragment,null,i[0],o,i[2])}}return Y.createElement(Y.Fragment,null,e.label)}const Cye=Y.memo(Oye),kye=({classNames:e,inputWidth:t,...n})=>Y.createElement("input",{className:e.input,style:{width:t},...n});function Pye({allowBackspace:e=!0,allowResize:t=!0,ariaDescribedBy:n,ariaErrorMessage:r,delimiterKeys:i,placeholderText:o,render:a=kye}){const{classNames:s}=I.useContext(Un),{value:l,...c}=uye({allowBackspace:e,ariaDescribedBy:n,ariaErrorMessage:r,delimiterKeys:i}),d=l.lengthY.createElement("div",{className:t.label,id:n},e);function jye({children:e,render:t=Lye}){const{classNames:n,id:r}=I.useContext(Un);return t({children:e,classNames:n,id:k0(r)})}const Mye=({children:e,classNames:t,...n})=>Y.createElement("div",{className:t.listBox,...n},e);function Nye({children:e,render:t=Mye}){const{classNames:n,managerRef:r}=I.useContext(Un),i=pye();return!r.current.state.isExpanded||Y.Children.count(e)===0?null:t({children:e,classNames:n,...i})}const Rye=({children:e,classNames:t,option:n,...r})=>{const i=[t.option];return n.active&&i.push(t.optionIsActive),Y.createElement("div",{className:i.join(" "),...r},e)};function Aye({children:e,index:t,render:n=Rye}){const{classNames:r}=I.useContext(Un),{option:i,optionProps:o}=gye(t);return n({classNames:r,children:e,option:i,...o})}const Dye=({children:e,classNames:t,isActive:n,isDisabled:r,isInvalid:i,...o})=>{const a=[t.root];return n&&a.push(t.rootIsActive),r&&a.push(t.rootIsDisabled),i&&a.push(t.rootIsInvalid),Y.createElement("div",{className:a.join(" "),...o},e)};function Iye({children:e,onBlur:t,onFocus:n,render:r=Dye}){const{classNames:i,isDisabled:o,isInvalid:a}=I.useContext(Un),{isActive:s,rootProps:l}=yye({onBlur:t,onFocus:n});return r({children:e,classNames:i,isActive:s,isDisabled:o,isInvalid:a,...l})}const Fye=({classNames:e,tag:t,...n})=>Y.createElement("button",{type:"button",className:e.tag,...n},Y.createElement("span",{className:e.tagName},t.label));function $ye({render:e=Fye,index:t,title:n}){const{classNames:r}=I.useContext(Un),{tag:i,tagProps:o}=bye(t,n);return e({classNames:r,tag:i,...o})}function Uye({children:e,label:t}){const{classNames:n}=I.useContext(Un),{listRef:r}=wye();return Y.createElement("ul",{className:n.tagList,"aria-label":t,ref:r,role:"list"},e.map(i=>Y.createElement("li",{className:n.tagListItem,key:i.key,role:"listitem"},i)))}const Bye={root:"react-tags",rootIsActive:"is-active",rootIsDisabled:"is-disabled",rootIsInvalid:"is-invalid",label:"react-tags__label",tagList:"react-tags__list",tagListItem:"react-tags__list-item",tag:"react-tags__tag",tagName:"react-tags__tag-name",comboBox:"react-tags__combobox",input:"react-tags__combobox-input",listBox:"react-tags__listbox",option:"react-tags__listbox-option",optionIsActive:"is-active",highlight:"react-tags__listbox-option-highlight"},zye=[Ws.Enter];function Vye({activateFirstOption:e=!1,allowBackspace:t=!0,allowNew:n=!1,allowResize:r=!0,ariaAddedText:i="Added tag %value%",ariaDescribedBy:o,ariaErrorMessage:a,ariaDeletedText:s="Removed tag %value%",classNames:l=Bye,collapseOnSelect:c=!1,deleteButtonText:d="Remove %value% from the list",delimiterKeys:f=zye,id:p="react-tags",isDisabled:m=!1,isInvalid:v=!1,labelText:y="Select tags",newOptionText:x="Add %value%",noOptionsText:_="No options found for %value%",onAdd:w,onBlur:S,onCollapse:E,onDelete:O,onExpand:k,onFocus:j,onInput:A,onShouldCollapse:U,onShouldExpand:R,onValidate:V,placeholderText:W="Add a tag",renderHighlight:X,renderInput:G,renderLabel:Z,renderListBox:ne,renderOption:le,renderRoot:K,renderTag:F,selected:D=[],suggestions:H=[],suggestionsTransform:ie=sye,tagListLabelText:z="Selected tags"},q){const re=I.useRef(null),ae=I.useRef(null),he=I.useRef(null),C=mye({activateFirstOption:e,allowNew:n,collapseOnSelect:c,newOptionText:x,noOptionsText:_,onAdd:w,onDelete:O,onCollapse:E,onExpand:k,onInput:A,onShouldCollapse:U,onShouldExpand:R,onValidate:V,selected:D,suggestions:H,suggestionsTransform:ie}),M=vye({inputRef:ae,managerRef:C});return q&&(typeof q=="function"?q(M):q.current=M),Y.createElement(Un.Provider,{value:{classNames:l,comboBoxRef:re,id:p,inputRef:ae,isDisabled:m,isInvalid:v,listBoxRef:he,managerRef:C}},Y.createElement(Iye,{onBlur:S,onFocus:j,render:K},Y.createElement(jye,{render:Z},y),Y.createElement(Uye,{label:z},C.current.state.selected.map(($,J)=>Y.createElement($ye,{key:_2($),index:J,render:F,title:d}))),Y.createElement(Eye,null,Y.createElement(Pye,{allowBackspace:t,allowResize:r,ariaDescribedBy:o,ariaErrorMessage:a,delimiterKeys:f,placeholderText:W,render:G}),Y.createElement(Nye,{render:ne},C.current.state.options.map(($,J)=>Y.createElement(Aye,{key:_2($),index:J,render:le},Y.createElement(Cye,{option:$,query:C.current.state.value,render:X}))))),Y.createElement(Sye,{ariaAddedText:i,ariaDeletedText:s})))}const Hye=Y.forwardRef(Vye),Wye=/\s+/g,g$=e=>e.trim().toLowerCase().replace(Wye,"-"),v$=({tag:e,colorGenerator:t})=>g.jsx("div",{style:{backgroundColor:t.getColorForKey(e)},className:"tag-bullet"});let IN=1;const y$="Tag not found",_$="Add tag",Yye=e=>e!==y$,Gye=e=>e===_$,FN=e=>(IN+=1,{label:e,value:`${e}${IN}`}),qye=e=>({tag:t,onClick:n})=>g.jsx(jT,{colorGenerator:e,text:t.label,className:"react-tags__tag",onClose:n}),Zye=(e,t)=>({option:n,classNames:r,...i})=>{var o;const a=Yye(n.label),s=Gye(n.label);return g.jsx("div",{className:Qe(r.option,{[r.optionIsActive]:a&&n.active,"react-tags__listbox-option--not-selectable":!a}),...i,children:a?g.jsxs(g.Fragment,{children:[!s&&g.jsx(v$,{tag:`${n.label}`,colorGenerator:e}),s?g.jsxs("i",{children:['Add "',g$(((o=t.current)==null?void 0:o.input.value)??""),'"']}):n.label]}):g.jsx("i",{children:n.label})})},b$=({selectedTags:e,onChange:t,placeholder:n,tags:r,immutable:i=!1})=>{const{ColorGenerator:o}=Kt(b$),a=Ul("shortUrlCreation"),s=(a==null?void 0:a.tagFilteringMode)??"startsWith",l=ys();return g.jsx(Hye,{ref:l,selected:e.map(FN),suggestions:r.filter(c=>!e.includes(c)).map(FN),renderTag:qye(o),renderOption:Zye(o,l),activateFirstOption:!0,allowNew:!i,newOptionText:_$,noOptionsText:y$,placeholderText:n??"Add tags to the URL",delimiterKeys:["Enter",","],suggestionsTransform:(c,d)=>{const f=c.toLowerCase().trim();return f.length<1?[]:[...d.filter(({label:p})=>s==="includes"?p.includes(f):p.startsWith(f))].slice(0,5)},onDelete:c=>{const d=[...e];d.splice(c,1),t(d)},onAdd:({label:c})=>t([...new Set([...e,...c.split(",").map(g$)])])})},Kye=Qt(b$,["ColorGenerator"]),w2="shlink/tagDelete",Qye={deleting:!1,deleted:!1,error:!1},w$=Rn(`${w2}/tagDeleted`),Xye=e=>{const t=Nr(`${w2}/deleteTag`,async r=>{await e().deleteTags([r])}),{reducer:n}=lr({name:w2,initialState:Qye,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:pa(o)})),r.addCase(t.fulfilled,()=>({deleting:!1,deleted:!0,error:!1}))}});return{reducer:n,deleteTag:t}},VT="shlink/tagEdit",Jye={editing:!1,edited:!1,error:!1},x$=Rn(`${VT}/tagEdited`),e0e=(e,t)=>Nr(`${VT}/editTag`,async({oldName:n,newName:r,color:i})=>(await e().editTag(n,r),t.setColorForKey(r,i),{oldName:n,newName:r,color:i})),t0e=e=>lr({name:VT,initialState:Jye,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:pa(r)})),t.addCase(e.fulfilled,(n,{payload:r})=>({...w8(["oldName","newName"],r),editing:!1,edited:!0,error:!1}))}}),HT="shlink/tagsList",Bb={tags:[],filteredTags:[],stats:{},loading:!1,error:!1},$N=(e,t)=>n=>n===e?t:n,UN=(e,t)=>cT(n=>n===t,e),n0e=(e,t)=>e.reduce((n,[r,i])=>{if(!n[r])return n;const{bots:o,nonBots:a}=i,s=n[r];return{...n,[r]:{...s,visitsSummary:s.visitsSummary&&{total:s.visitsSummary.total+o+a,bots:s.visitsSummary.bots+o,nonBots:s.visitsSummary.nonBots+a},visitsCount:s.visitsCount+o+a}}},{...t}),r0e=e=>Object.entries(e.reduce((t,{shortUrl:n,visit:r})=>(n==null||n.tags.forEach(i=>{t[i]||(t[i]={bots:0,nonBots:0}),r.potentialBot?t[i].bots+=1:t[i].nonBots+=1}),t),{})),i0e=e=>Nr(`${HT}/listTags`,async()=>{const{tags:t,stats:n}=await e().tagsStats(),r=n.reduce((i,{tag:o,...a})=>(i[o]=a,i),{});return{tags:t,stats:r}}),S$=Rn(`${HT}/filterTags`),o0e=(e,t)=>lr({name:HT,initialState:Bb,reducers:{},extraReducers:n=>{n.addCase(S$,(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})=>({...Bb,error:!0,errorData:pa(i)})),n.addCase(e.fulfilled,(r,{payload:i})=>({...Bb,stats:i.stats,tags:i.tags,filteredTags:i.tags})),n.addCase(w$,({tags:r,filteredTags:i,...o},{payload:a})=>({...o,tags:UN(r,a),filteredTags:UN(i,a)})),n.addCase(x$,({tags:r,filteredTags:i,stats:o,...a},{payload:s})=>({...a,stats:{...o,[s.newName]:o[s.oldName]},tags:r.map($N(s.oldName,s.newName)).sort(),filteredTags:i.map($N(s.oldName,s.newName)).sort()})),n.addCase(tp,(r,{payload:i})=>({...r,stats:n0e(r0e(i.createdVisits),r.stats)})),n.addCase(t.fulfilled,({tags:r,...i},{payload:o})=>({...i,tags:r.concat(o.tags.filter(a=>!r.includes(a)))}))}}),a0e={tag:"Tag",shortUrls:"Short URLs",visits:"Visits"},E$=ws(({filterTags:e,tagsList:t})=>{var n;const{TagsTable:r}=Kt(E$),i=PT(),[o,a]=I.useState(((n=i.tags)==null?void 0:n.defaultOrdering)??{}),s=Vr(()=>t.filteredTags.map(c=>{var d,f,p;const m=t.stats[c],v=((d=i.visits)!=null&&d.excludeBots?(f=m==null?void 0:m.visitsSummary)==null?void 0:f.nonBots:(p=m==null?void 0:m.visitsSummary)==null?void 0:p.total)??(m==null?void 0:m.visitsCount)??0;return{tag:c,visits:v,shortUrls:(m==null?void 0:m.shortUrlsCount)??0}}),c=>v6(c,o));if(t.loading)return g.jsx(Ho,{loading:!0});if(t.error)return g.jsx(zr,{type:"error",children:g.jsx(na,{errorData:t.errorData,fallbackMessage:"Error loading tags :("})});const l=c=>()=>{const d=l0(c,o.field,o.dir);a({field:d?c:void 0,dir:d})};return g.jsxs(g.Fragment,{children:[g.jsx(Hh,{className:"mb-3",onChange:e}),g.jsx(gr,{className:"mb-3",children:g.jsx("div",{className:"col-lg-6 offset-lg-6",children:g.jsx(Wh,{items:a0e,order:o,onChange:(c,d)=>a({field:c,dir:d})})})}),(()=>{if(t.filteredTags.length<1)return g.jsx(Ho,{children:"No tags found"});const c=s();return g.jsx(r,{sortedTags:c,currentOrder:o,orderByColumn:l})})()]})},()=>[pi.visits]),s0e=Qt(E$,["TagsTable"]),WT=({pagesCount:e,currentPage:t,setCurrentPage:n,centered:r=!0})=>{if(e<2)return null;const i=o=>()=>!Ch(o)&&n(o);return g.jsxs(_E,{listClassName:Qe("flex-wrap mb-0 simple-paginator",{"justify-content-center":r}),children:[g.jsx(il,{disabled:t<=1,children:g.jsx(ol,{previous:!0,tag:"span",onClick:i(t-1)})}),o$(t,e).map((o,a)=>g.jsx(il,{disabled:Ch(o),active:t===o,children:g.jsx(ol,{role:"link",tag:"span",onClick:i(o),children:a$(o)})},s$(o,a))),g.jsx(il,{disabled:t>=e,children:g.jsx(ol,{next:!0,tag:"span",onClick:i(t+1)})})]})},l0e=20,T$=({sortedTags:e,orderByColumn:t,currentOrder:n})=>{const{TagsTableRow:r}=Kt(T$),i=I.useRef(!0),{search:o}=En(),{page:a=1}=zu(o),[s,l]=lpe("page",Number(a)),c=gh(l0e,e),d=c.length>1,f=c[s-1]??[];return I.useEffect(()=>{!i.current&&l(1),i.current=!1},[l,e]),I.useEffect(()=>{scrollTo(0,0)},[s]),g.jsxs(mn,{bodyClassName:d?"pb-1":"",children:[g.jsxs("table",{className:"table table-hover responsive-table mb-0",children:[g.jsxs("thead",{className:"responsive-table__header",children:[g.jsxs("tr",{children:[g.jsxs("th",{className:"tags-table__header-cell",onClick:t("tag"),children:["Tag ",g.jsx(Of,{currentOrder:n,field:"tag"})]}),g.jsxs("th",{className:"tags-table__header-cell text-lg-end",onClick:t("shortUrls"),children:["Short URLs ",g.jsx(Of,{currentOrder:n,field:"shortUrls"})]}),g.jsxs("th",{className:"tags-table__header-cell text-lg-end",onClick:t("visits"),children:["Visits ",g.jsx(Of,{currentOrder:n,field:"visits"})]}),g.jsx("th",{className:"tags-table__header-cell",children:g.jsx("span",{className:"sr-only",children:"Options"})})]}),g.jsx("tr",{children:g.jsx("th",{"aria-hidden":!0,colSpan:4,className:"p-0 border-top-0"})})]}),g.jsxs("tbody",{children:[f.length===0&&g.jsx("tr",{children:g.jsx("td",{colSpan:4,className:"text-center",children:"No results found"})}),f.map(p=>g.jsx(r,{tag:p},p.tag))]})]}),d&&g.jsx("div",{className:"sticky-card-paginator",children:g.jsx(WT,{pagesCount:c.length,currentPage:s,setCurrentPage:l})})]},s)},c0e=Qt(T$,["TagsTableRow"]),O$=({tag:e})=>{const{DeleteTagConfirmModal:t,EditTagModal:n,ColorGenerator:r}=Kt(O$),[i,o]=Sn(),[a,s]=Sn(),l=Fl();return g.jsxs("tr",{className:"responsive-table__row",children:[g.jsxs("th",{className:"responsive-table__cell","data-th":"Tag",children:[g.jsx(v$,{tag:e.tag,colorGenerator:r})," ",e.tag]}),g.jsx("td",{className:"responsive-table__cell text-lg-end","data-th":"Short URLs",children:g.jsx(It,{to:`${l}/list-short-urls/1?tags=${encodeURIComponent(e.tag)}`,children:wn(e.shortUrls)})}),g.jsx("td",{className:"responsive-table__cell text-lg-end","data-th":"Visits",children:g.jsx(It,{to:`${l}/tag/${e.tag}/visits`,children:wn(e.visits)})}),g.jsx("td",{className:"responsive-table__cell text-lg-end",children:g.jsxs(s0,{children:[g.jsxs(Ue,{onClick:s,children:[g.jsx(Ne,{icon:LW,fixedWidth:!0,className:"me-1"})," Edit"]}),g.jsxs(Ue,{onClick:o,children:[g.jsx(Ne,{icon:WW,fixedWidth:!0,className:"me-1"})," Delete"]})]})}),g.jsx(n,{tag:e.tag,toggle:s,isOpen:a}),g.jsx(t,{tag:e.tag,toggle:o,isOpen:i})]})},u0e=Qt(O$,["DeleteTagConfirmModal","EditTagModal","ColorGenerator"]),d0e=(e,t)=>{e.factory("TagsSelector",Kye),e.serviceFactory("DeleteTagConfirmModal",()=>Yve),e.decorator("DeleteTagConfirmModal",t(["tagDelete"],["deleteTag","tagDeleted"])),e.factory("EditTagModal",Gve),e.decorator("EditTagModal",t(["tagEdit"],["editTag","tagEdited"])),e.factory("TagsTableRow",u0e),e.factory("TagsTable",c0e),e.factory("TagsList",s0e),e.decorator("TagsList",t(["tagsList","mercureInfo"],["filterTags","createNewVisits","loadMercureInfo"])),e.serviceFactory("tagEditReducerCreator",t0e,"editTag"),e.serviceFactory("tagEditReducer",mt("reducer"),"tagEditReducerCreator"),e.serviceFactory("tagDeleteReducerCreator",Xye,"apiClientFactory"),e.serviceFactory("tagDeleteReducer",mt("reducer"),"tagDeleteReducerCreator"),e.serviceFactory("tagsListReducerCreator",o0e,"listTags","createShortUrl"),e.serviceFactory("tagsListReducer",mt("reducer"),"tagsListReducerCreator"),e.serviceFactory("listTags",i0e,"apiClientFactory"),e.serviceFactory("filterTags",()=>S$),e.serviceFactory("deleteTag",mt("deleteTag"),"tagDeleteReducerCreator"),e.serviceFactory("tagDeleted",()=>w$),e.serviceFactory("editTag",e0e,"apiClientFactory","ColorGenerator"),e.serviceFactory("tagEdited",()=>x$)};var f0e="Expected a function",C$="__lodash_hash_undefined__",k$=1/0,h0e="[object Function]",p0e="[object GeneratorFunction]",m0e="[object Symbol]",g0e=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,v0e=/^\w*$/,y0e=/^\./,_0e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,b0e=/[\\^$.*+?()[\]{}|]/g,w0e=/\\(\\)?/g,x0e=/^\[object .+?Constructor\]$/,S0e=typeof Ac=="object"&&Ac&&Ac.Object===Object&&Ac,E0e=typeof self=="object"&&self&&self.Object===Object&&self,YT=S0e||E0e||Function("return this")();function T0e(e,t){return e==null?void 0:e[t]}function O0e(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var C0e=Array.prototype,k0e=Function.prototype,P$=Object.prototype,zb=YT["__core-js_shared__"],BN=function(){var e=/[^.]+$/.exec(zb&&zb.keys&&zb.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),L$=k0e.toString,GT=P$.hasOwnProperty,j$=P$.toString,P0e=RegExp("^"+L$.call(GT).replace(b0e,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),zN=YT.Symbol,L0e=C0e.splice,j0e=M$(YT,"Map"),kh=M$(Object,"create"),VN=zN?zN.prototype:void 0,HN=VN?VN.toString:void 0;function Cl(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1}function B0e(e,t){var n=this.__data__,r=P0(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}qu.prototype.clear=I0e;qu.prototype.delete=F0e;qu.prototype.get=$0e;qu.prototype.has=U0e;qu.prototype.set=B0e;function Bl(e){var t=-1,n=e?e.length:0;for(this.clear();++tr.toFixed(n).replace(".",t):r=>`${r}`.replace(".",t):n?r=>r.toFixed(n):r=>`${r}`}function KT(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 u_e(e={stringFormatter:KT()}){return t=>e.stringFormatter(t.toString().slice(7,-1))}function d_e(e={stringFormatter:KT()}){return t=>{if(t===null)return"";let n=JSON.stringify(t);return n===void 0?"":(n[0]==='"'&&(n=n.replace(/^"(.+)"$/,"$1")),e.stringFormatter(n))}}function YN(e,t,n){const r=e[t];return r===void 0?n:r}function A$(e,t){try{return Array.isArray(t)?e.push(...t):e.push(t),e}catch{return e.concat(t)}}function x2(e,t){let n=!0;return e.reduce((r,i)=>(i==null&&(i=""),n?(n=!1,`${i}`):`${r}${t}${i}`),"")}var GN;(function(e){e.header="header",e.undefined="undefined",e.boolean="boolean",e.number="number",e.bigint="bigint",e.string="string",e.symbol="symbol",e.function="function",e.object="object"})(GN||(GN={}));class f_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||KT(),i=d_e({stringFormatter:r}),o={header:r,undefined:Vb,boolean:Vb,number:c_e(),bigint:Vb,string:r,symbol:u_e({stringFormatter:r}),function:i,object:i};return n.formatters=Object.assign(Object.assign({},o),n.formatters),n.delimiter=n.delimiter||",",n.eol=n.eol||` -`,n.header=n.header!==!1,n.includeEmptyRows=n.includeEmptyRows||!1,n.withBOM=n.withBOM||!1,n}preprocessFieldsInfo(t,n){return t.map(r=>{if(typeof r=="string")return{label:r,value:r.includes(".")||r.includes("[")?i=>WN(i,r,n):i=>YN(i,r,n)};if(typeof r=="object"){const i="default"in r?r.default:n;if(typeof r.value=="string"){const o=r.value;return{label:r.label||r.value,value:r.value.includes(".")||r.value.includes("[")?a=>WN(a,o,i):a=>YN(a,o,i)}}if(typeof r.value=="function"){const o=r.label||r.value.name||"",a={label:o,default:i},s=r.value;return{label:o,value(l){const c=s(l,a);return c===void 0?i:c}}}}throw new Error("Invalid field info option. "+JSON.stringify(r))})}getHeader(){return x2(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(A$,[]),[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 x2(n,this.opts.delimiter)}processCell(t,n){return this.processValue(n.value(t))}processValue(t){const n=this.opts.formatters[typeof t];return n(t)}}class h_e extends f_e{constructor(t){super(t)}parse(t){const n=this.preprocessData(t);this.opts.fields=this.opts.fields||this.preprocessFieldsInfo(n.reduce((o,a)=>(Object.keys(a).forEach(s=>{o.includes(s)||o.push(s)}),o),[]),this.opts.defaultValue);const r=this.opts.header?this.getHeader():"",i=this.processData(n);return(this.opts.withBOM?"\uFEFF":"")+r+(r&&i?this.opts.eol:"")+i}preprocessData(t){const n=Array.isArray(t)?t:[t];if(!this.opts.fields){if(t==null||n.length===0)throw new Error('Data should not be empty or the "fields" option should be included');if(typeof n[0]!="object")throw new Error('Data items should be objects or the "fields" option should be included')}return this.opts.transforms.length===0?n:n.map(r=>this.preprocessRow(r)).reduce(A$,[])}processData(t){return x2(t.map(n=>this.processRow(n)).filter(n=>n),this.opts.eol)}}var Cn;(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"})(Cn||(Cn={}));Cn.QUOTATION_MARK+"",Cn.QUOTATION_MARK,Cn.REVERSE_SOLIDUS+"",Cn.REVERSE_SOLIDUS,Cn.SOLIDUS+"",Cn.SOLIDUS,Cn.LATIN_SMALL_LETTER_B+"",Cn.BACKSPACE,Cn.LATIN_SMALL_LETTER_F+"",Cn.FORM_FEED,Cn.LATIN_SMALL_LETTER_N+"",Cn.NEWLINE,Cn.LATIN_SMALL_LETTER_R+"",Cn.CARRIAGE_RETURN,Cn.LATIN_SMALL_LETTER_T+"",Cn.TAB;var qN;(function(e){e[e.LEFT_BRACE=0]="LEFT_BRACE",e[e.RIGHT_BRACE=1]="RIGHT_BRACE",e[e.LEFT_BRACKET=2]="LEFT_BRACKET",e[e.RIGHT_BRACKET=3]="RIGHT_BRACKET",e[e.COLON=4]="COLON",e[e.COMMA=5]="COMMA",e[e.TRUE=6]="TRUE",e[e.FALSE=7]="FALSE",e[e.NULL=8]="NULL",e[e.STRING=9]="STRING",e[e.NUMBER=10]="NUMBER",e[e.SEPARATOR=11]="SEPARATOR"})(qN||(qN={}));var ZN;(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"})(ZN||(ZN={}));var KN;(function(e){e[e.OBJECT=0]="OBJECT",e[e.ARRAY=1]="ARRAY"})(KN||(KN={}));var QN;(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"})(QN||(QN={}));const p_e=new h_e,m_e=e=>p_e.parse(e),g_e=6,XN="0123456789ABCDEF",v_e=128,{floor:y_e,random:__e,sqrt:b_e,round:w_e}=Math,x_e=()=>`#${CT(g_e,()=>XN[y_e(__e()*XN.length)]).join("")}`,JN=e=>e.toLowerCase().trim(),S_e=e=>(e.match(/../g)??[]).map(t=>parseInt(t,16)||0),E_e=(e=0,t=0,n=0)=>w_e(b_e(.299*e**2+.587*t**2+.114*n**2));class T_e{constructor(t){Te(this,"colors"),Te(this,"lights"),Te(this,"getColorForKey",r=>{const i=JN(r);return this.colors[i]||this.setColorForKey(i,x_e())}),Te(this,"setColorForKey",(r,i)=>{var o;const a=JN(r);return this.colors[a]=i,(o=this.storage)==null||o.storeTagColors(this.colors),i}),Te(this,"isColorLightForKey",r=>{const i=this.getColorForKey(r).substring(1);if(Wu(this.lights[i])){const o=S_e(i);this.lights[i]=E_e(...o)>=v_e}return this.lights[i]});var n;this.storage=t,this.colors=((n=this.storage)==null?void 0:n.getTagColors())??{},this.lights={}}}const D$=({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)},O_e=(e,t,n)=>{const r=new Blob([t],{type:"text/csv;charset=utf-8;"}),i=URL.createObjectURL(r);D$(e,i,n)};class C_e{constructor(t,n){this.fetch=t,this.window=n}async saveImage(t,n){const r=await this.fetch(t).then(o=>o.blob()),i=URL.createObjectURL(r);D$(this.window,i,n)}}class k_e{constructor(t,n){Te(this,"exportVisits",(r,i)=>{i.length&&this.exportCsv(r,i)}),Te(this,"exportShortUrls",r=>{r.length&&this.exportCsv("short_urls.csv",r)}),Te(this,"exportCsv",(r,i)=>{const o=this.jsonToCsv(i);O_e(this.window,o,r)}),this.window=t,this.jsonToCsv=n}}function P_e(e){e.constant("window",window),e.constant("fetch",window.fetch.bind(window)),e.service("ImageDownloader",C_e,"fetch","window"),e.service("ColorGenerator",T_e,"TagColorsStorage"),e.constant("jsonToCsv",m_e),e.service("ReportExporter",k_e,"window","jsonToCsv"),e.serviceFactory("useTimeoutToggle",()=>h6)}const QT=e=>e.visitedUrl!==void 0,L_e=e=>e.visitedUrl!==void 0,j_e=Vr(oue(e=>QT(e.visit)?"orphanVisits":"nonOrphanVisits"),e=>({orphanVisits:[],nonOrphanVisits:[],...e})),Im=(e,t)=>_8(mt(t),e),sp=({page:e,itemsPerPage:t,filter:n,dateRange:r})=>{const i=((r==null?void 0:r.startDate)&&fs(r==null?void 0:r.startDate))??void 0,o=((r==null?void 0:r.endDate)&&fs(r==null?void 0:r.endDate))??void 0,a=(n==null?void 0:n.excludeBots)||void 0;return{page:e,itemsPerPage:t,startDate:i,endDate:o,excludeBots:a}},lp=({visits:e,goBack:t,shortUrl:n,children:r,title:i})=>g.jsx("header",{children:g.jsxs(Gr,{body:!0,children:[g.jsxs("h2",{className:"d-flex justify-content-between align-items-center mb-0",children:[g.jsx(yt,{color:"link",size:"lg",className:"p-0 me-3",onClick:t,"aria-label":"Go back",children:g.jsx(Ne,{icon:$D})}),g.jsx("span",{className:"text-center d-none d-sm-block",children:g.jsx("small",{children:i})}),g.jsxs("span",{className:"badge badge-main ms-3",children:["Visits:"," ",g.jsx(OF,{visitsCount:e.length,shortUrl:n})]})]}),g.jsx("h3",{className:"text-center d-block d-sm-none mb-0 mt-3",children:g.jsx("small",{children:i})}),r&&g.jsx("div",{className:"mt-md-2",children:r})]})}),I$=({title:e,footer:t,children:n})=>g.jsxs(Gr,{role:"document",children:[g.jsx(hu,{className:"chart-card__header",children:typeof e=="function"?e():e}),g.jsx(fu,{children:n}),t&&g.jsx(QI,{className:"chart-card__footer--sticky",children:t})]}),F$="label";function eR(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function M_e(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function $$(e,t){e.labels=t}function U$(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:F$;const r=[];e.datasets=t.map(i=>{const o=e.datasets.find(a=>a[n]===i[n]);return!o||!i.data||r.includes(o)?{...i}:(r.push(o),Object.assign(o,i),o)})}function N_e(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:F$;const n={labels:[],datasets:[]};return $$(n,e.labels),U$(n,e.datasets,t),n}function B$(e,t){return e.getElementsAtEventForMode(t.nativeEvent,"nearest",{intersect:!0},!1)}function R_e(e,t){const{height:n=150,width:r=300,redraw:i=!1,datasetIdKey:o,type:a,data:s,options:l,plugins:c=[],fallbackContent:d,updateMode:f,...p}=e,m=I.useRef(null),v=I.useRef(),y=()=>{m.current&&(v.current=new p0(m.current,{type:a,data:N_e(s,o),options:l&&{...l},plugins:c}),eR(t,v.current))},x=()=>{eR(t,null),v.current&&(v.current.destroy(),v.current=null)};return I.useEffect(()=>{!i&&v.current&&l&&M_e(v.current,l)},[i,l]),I.useEffect(()=>{!i&&v.current&&$$(v.current.config.data,s.labels)},[i,s.labels]),I.useEffect(()=>{!i&&v.current&&s.datasets&&U$(v.current.config.data,s.datasets,o)},[i,s.datasets]),I.useEffect(()=>{v.current&&(i?(x(),setTimeout(y)):v.current.update(f))},[i,l,s.labels,s.datasets,f]),I.useEffect(()=>{v.current&&(x(),setTimeout(y))},[a]),I.useEffect(()=>(y(),()=>x()),[]),Y.createElement("canvas",Object.assign({ref:m,role:"img",height:n,width:r},p),d)}const A_e=I.forwardRef(R_e);function XT(e,t){return p0.register(t),I.forwardRef((n,r)=>Y.createElement(A_e,Object.assign({},n,{ref:r,type:e})))}const D_e=XT("line",_f),I_e=XT("bar",yf),F_e=XT("doughnut",$a),z$=({native:e},[t])=>{if(!(e!=null&&e.target))return;const n=e.target;n.style.cursor=t?"pointer":"default"},V$=({dataset:e,raw:t})=>`${e.label}: ${wn(`${t}`)}`,$_e=({label:e,raw:t})=>`${e}: ${wn(`${t}`)}`,U_e=({chart:e})=>{const{config:t}=e,{labels:n=[],datasets:r=[]}=t.data??{},[{backgroundColor:i}]=r,{defaultColor:o}=t.options??{};return g.jsx("ul",{className:"doughnut-chart-legend",children:n.map((a,s)=>g.jsxs("li",{className:"doughnut-chart-legend__item d-flex",children:[g.jsx("div",{className:"doughnut-chart-legend__item-color",style:{backgroundColor:i[s]??o}}),g.jsx("small",{className:"doughnut-chart-legend__item-text flex-fill",children:a})]},a))})},B_e=e=>[{data:e,backgroundColor:["#97BBCD","#F7464A","#46BFBD","#FDB45C","#949FB1","#57A773","#414066","#08B2E3","#B6C454","#DCDCDC","#463730"],borderColor:pee()?fee:dee,borderWidth:2}],z_e=(e,t)=>({labels:e,datasets:B_e(t)}),V_e=I.memo(({label:e,stats:t})=>{const[n,r]=I.useState(),i=Object.keys(t),o=Object.values(t),a={plugins:{legend:{display:!1},tooltip:{intersect:!0,callbacks:{label:$_e}}}},s=z_e(i,o);return g.jsxs("div",{className:"row",children:[g.jsx("div",{className:"col-sm-12 col-md-7",children:g.jsx(F_e,{"aria-label":e,height:300,data:s,options:a,ref:l=>{l&&r(l)}})}),g.jsx("div",{className:"col-sm-12 col-md-5",children:n&&g.jsx(U_e,{chart:n})})]})}),tR=({title:e,stats:t})=>g.jsx(I$,{title:e,children:g.jsx(V_e,{stats:t,label:e})}),H_e={"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"},H$={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"},sn={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},fr={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"},Ea={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class be{static getFirstMatch(t,n){const r=n.match(t);return r&&r.length>0&&r[1]||""}static getSecondMatch(t,n){const r=n.match(t);return r&&r.length>1&&r[2]||""}static matchAndReturnConst(t,n,r){if(t.test(n))return r}static getWindowsVersionName(t){switch(t){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(t){const n=t.split(".").splice(0,2).map(r=>parseInt(r,10)||0);if(n.push(0),n[0]===10)switch(n[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(t){const n=t.split(".").splice(0,2).map(r=>parseInt(r,10)||0);if(n.push(0),!(n[0]===1&&n[1]<5)){if(n[0]===1&&n[1]<6)return"Cupcake";if(n[0]===1&&n[1]>=6)return"Donut";if(n[0]===2&&n[1]<2)return"Eclair";if(n[0]===2&&n[1]===2)return"Froyo";if(n[0]===2&&n[1]>2)return"Gingerbread";if(n[0]===3)return"Honeycomb";if(n[0]===4&&n[1]<1)return"Ice Cream Sandwich";if(n[0]===4&&n[1]<4)return"Jelly Bean";if(n[0]===4&&n[1]>=4)return"KitKat";if(n[0]===5)return"Lollipop";if(n[0]===6)return"Marshmallow";if(n[0]===7)return"Nougat";if(n[0]===8)return"Oreo";if(n[0]===9)return"Pie"}}static getVersionPrecision(t){return t.split(".").length}static compareVersions(t,n,r=!1){const i=be.getVersionPrecision(t),o=be.getVersionPrecision(n);let a=Math.max(i,o),s=0;const l=be.map([t,n],c=>{const d=a-be.getVersionPrecision(c),f=c+new Array(d+1).join(".0");return be.map(f.split("."),p=>new Array(20-p.length).join("0")+p).reverse()});for(r&&(s=a-Math.min(i,o)),a-=1;a>=s;){if(l[0][a]>l[1][a])return 1;if(l[0][a]===l[1][a]){if(a===s)return 0;a-=1}else if(l[0][a]{r[s]=a[s]})}return t}static getBrowserAlias(t){return H_e[t]}static getBrowserTypeByAlias(t){return H$[t]||""}}const Tt=/version\/(\d+(\.?_?\d+)+)/i,W_e=[{test:[/googlebot/i],describe(e){const t={name:"Googlebot"},n=be.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||be.getFirstMatch(Tt,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){const t={name:"Opera"},n=be.getFirstMatch(Tt,e)||be.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){const t={name:"Opera"},n=be.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||be.getFirstMatch(Tt,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){const t={name:"Samsung Internet for Android"},n=be.getFirstMatch(Tt,e)||be.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe(e){const t={name:"NAVER Whale Browser"},n=be.getFirstMatch(Tt,e)||be.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){const t={name:"MZ Browser"},n=be.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||be.getFirstMatch(Tt,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){const t={name:"Focus"},n=be.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||be.getFirstMatch(Tt,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){const t={name:"Swing"},n=be.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||be.getFirstMatch(Tt,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){const t={name:"Opera Coast"},n=be.getFirstMatch(Tt,e)||be.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(e){const t={name:"Opera Touch"},n=be.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||be.getFirstMatch(Tt,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){const t={name:"Yandex Browser"},n=be.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||be.getFirstMatch(Tt,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){const t={name:"UC Browser"},n=be.getFirstMatch(Tt,e)||be.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){const t={name:"Maxthon"},n=be.getFirstMatch(Tt,e)||be.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){const t={name:"Epiphany"},n=be.getFirstMatch(Tt,e)||be.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){const t={name:"Puffin"},n=be.getFirstMatch(Tt,e)||be.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){const t={name:"Sleipnir"},n=be.getFirstMatch(Tt,e)||be.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe(e){const t={name:"K-Meleon"},n=be.getFirstMatch(Tt,e)||be.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){const t={name:"WeChat"},n=be.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||be.getFirstMatch(Tt,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe(e){const t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=be.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||be.getFirstMatch(Tt,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){const t={name:"Internet Explorer"},n=be.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){const t={name:"Microsoft Edge"},n=be.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe(e){const t={name:"Microsoft Edge"},n=be.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){const t={name:"Vivaldi"},n=be.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){const t={name:"SeaMonkey"},n=be.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){const t={name:"Sailfish"},n=be.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe(e){const t={name:"Amazon Silk"},n=be.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){const t={name:"PhantomJS"},n=be.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){const t={name:"SlimerJS"},n=be.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t={name:"BlackBerry"},n=be.getFirstMatch(Tt,e)||be.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe(e){const t={name:"WebOS Browser"},n=be.getFirstMatch(Tt,e)||be.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe(e){const t={name:"Bada"},n=be.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){const t={name:"Tizen"},n=be.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||be.getFirstMatch(Tt,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){const t={name:"QupZilla"},n=be.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||be.getFirstMatch(Tt,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){const t={name:"Firefox"},n=be.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe(e){const t={name:"Electron"},n=be.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe(e){const t={name:"Miui"},n=be.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe(e){const t={name:"Chromium"},n=be.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||be.getFirstMatch(Tt,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){const t={name:"Chrome"},n=be.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe(e){const t={name:"Google Search"},n=be.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t={name:"Android Browser"},n=be.getFirstMatch(Tt,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){const t={name:"PlayStation 4"},n=be.getFirstMatch(Tt,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){const t={name:"Safari"},n=be.getFirstMatch(Tt,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){const t=/^(.*)\/(.*) /,n=/^(.*)\/(.*)[ \t]\((.*)/,r=e.search("\\(")!==-1?n:t;return{name:be.getFirstMatch(r,e),version:be.getSecondMatch(r,e)}}}],Y_e=[{test:[/Roku\/DVP/],describe(e){const t=be.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:fr.Roku,version:t}}},{test:[/windows phone/i],describe(e){const t=be.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:fr.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){const t=be.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=be.getWindowsVersionName(t);return{name:fr.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){const t={name:fr.iOS},n=be.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){const t=be.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=be.getMacOSVersionName(t),r={name:fr.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){const t=be.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:fr.iOS,version:t}}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t=be.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=be.getAndroidVersionName(t),r={name:fr.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){const t=be.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:fr.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t=be.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||be.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||be.getFirstMatch(/\bbb(\d+)/i,e);return{name:fr.BlackBerry,version:t}}},{test:[/bada/i],describe(e){const t=be.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:fr.Bada,version:t}}},{test:[/tizen/i],describe(e){const t=be.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:fr.Tizen,version:t}}},{test:[/linux/i],describe(){return{name:fr.Linux}}},{test:[/CrOS/],describe(){return{name:fr.ChromeOS}}},{test:[/PlayStation 4/],describe(e){const t=be.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:fr.PlayStation4,version:t}}}],G_e=[{test:[/googlebot/i],describe(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe(e){const t=be.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:sn.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:sn.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:sn.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:sn.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:sn.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:sn.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:sn.tablet}}},{test(e){const t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){const t=be.getFirstMatch(/(ipod|iphone)/i,e);return{type:sn.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:sn.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe(){return{type:sn.mobile}}},{test(e){return e.getBrowserName(!0)==="blackberry"},describe(){return{type:sn.mobile,vendor:"BlackBerry"}}},{test(e){return e.getBrowserName(!0)==="bada"},describe(){return{type:sn.mobile}}},{test(e){return e.getBrowserName()==="windows phone"},describe(){return{type:sn.mobile,vendor:"Microsoft"}}},{test(e){const t=Number(String(e.getOSVersion()).split(".")[0]);return e.getOSName(!0)==="android"&&t>=3},describe(){return{type:sn.tablet}}},{test(e){return e.getOSName(!0)==="android"},describe(){return{type:sn.mobile}}},{test(e){return e.getOSName(!0)==="macos"},describe(){return{type:sn.desktop,vendor:"Apple"}}},{test(e){return e.getOSName(!0)==="windows"},describe(){return{type:sn.desktop}}},{test(e){return e.getOSName(!0)==="linux"},describe(){return{type:sn.desktop}}},{test(e){return e.getOSName(!0)==="playstation 4"},describe(){return{type:sn.tv}}},{test(e){return e.getOSName(!0)==="roku"},describe(){return{type:sn.tv}}}],q_e=[{test(e){return e.getBrowserName(!0)==="microsoft edge"},describe(e){if(/\sedg\//i.test(e))return{name:Ea.Blink};const t=be.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:Ea.EdgeHTML,version:t}}},{test:[/trident/i],describe(e){const t={name:Ea.Trident},n=be.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){return e.test(/presto/i)},describe(e){const t={name:Ea.Presto},n=be.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe(e){const t={name:Ea.Gecko},n=be.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:Ea.Blink}}},{test:[/(apple)?webkit/i],describe(e){const t={name:Ea.WebKit},n=be.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];class nR{constructor(t,n=!1){if(t==null||t==="")throw new Error("UserAgent parameter can't be empty");this._ua=t,this.parsedResult={},n!==!0&&this.parse()}getUA(){return this._ua}test(t){return t.test(this._ua)}parseBrowser(){this.parsedResult.browser={};const t=be.find(W_e,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(t){return t?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};const t=be.find(Y_e,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os}getOSName(t){const{name:n}=this.getOS();return t?String(n).toLowerCase()||"":n||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(t=!1){const{type:n}=this.getPlatform();return t?String(n).toLowerCase()||"":n||""}parsePlatform(){this.parsedResult.platform={};const t=be.find(G_e,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(t){return t?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};const t=be.find(q_e,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return be.assign({},this.parsedResult)}satisfies(t){const n={};let r=0;const i={};let o=0;if(Object.keys(t).forEach(a=>{const s=t[a];typeof s=="string"?(i[a]=s,o+=1):typeof s=="object"&&(n[a]=s,r+=1)}),r>0){const a=Object.keys(n),s=be.find(a,c=>this.isOS(c));if(s){const c=this.satisfies(n[s]);if(c!==void 0)return c}const l=be.find(a,c=>this.isPlatform(c));if(l){const c=this.satisfies(n[l]);if(c!==void 0)return c}}if(o>0){const a=Object.keys(i),s=be.find(a,l=>this.isBrowser(l,!0));if(s!==void 0)return this.compareVersion(i[s])}}isBrowser(t,n=!1){const r=this.getBrowserName().toLowerCase();let i=t.toLowerCase();const o=be.getBrowserTypeByAlias(i);return n&&o&&(i=o.toLowerCase()),i===r}compareVersion(t){let n=[0],r=t,i=!1;const o=this.getBrowserVersion();if(typeof o=="string")return t[0]===">"||t[0]==="<"?(r=t.substr(1),t[1]==="="?(i=!0,r=t.substr(2)):n=[],t[0]===">"?n.push(1):n.push(-1)):t[0]==="="?r=t.substr(1):t[0]==="~"&&(i=!0,r=t.substr(1)),n.indexOf(be.compareVersions(o,r,i))>-1}isOS(t){return this.getOSName(!0)===String(t).toLowerCase()}isPlatform(t){return this.getPlatformType(!0)===String(t).toLowerCase()}isEngine(t){return this.getEngineName(!0)===String(t).toLowerCase()}is(t,n=!1){return this.isBrowser(t,n)||this.isOS(t)||this.isPlatform(t)}some(t=[]){return t.some(n=>this.is(n))}}/*! +*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i{const i=n?`?domain=${n}`:"";return`${e}/short-code/${Vue(t)}/${r}${i}`},c2=({shortUrl:e,suffix:t,asLink:n,children:r,...i})=>{const o=Fl();return!n||!e?g.jsx("span",{...i,children:r}):g.jsx(It,{to:hme(o,e,t),...i,children:r})},OF=({visitsCount:e,shortUrl:t,active:n=!1,asLink:r=!1})=>{const i=ys(),{maxVisits:o,validSince:a,validUntil:s}=(t==null?void 0:t.meta)??{},l=!!o||!!a||!!s,c=g.jsx(c2,{shortUrl:t,suffix:"visits",asLink:r,children:g.jsx("strong",{className:Qe("short-url-visits-count__amount",{"short-url-visits-count__amount--big":n}),children:wn(e)})});return l?g.jsxs(g.Fragment,{children:[g.jsxs("span",{className:"indivisible",children:[c,g.jsxs("small",{className:"short-urls-visits-count__max-visits-control",ref:i,children:[o&&g.jsxs(g.Fragment,{children:[" / ",wn(o)]}),g.jsx("sup",{className:"ms-1",children:g.jsx(Ne,{icon:BS})})]})]}),g.jsx(Rr,{target:i,placement:"bottom",children:g.jsxs("ul",{className:"list-unstyled mb-0",children:[o&&g.jsxs("li",{className:"short-url-visits-count__tooltip-list-item",children:["This short URL will not accept more than ",g.jsx("b",{children:wn(o)})," visit",o===1?"":"s","."]}),a&&g.jsxs("li",{className:"short-url-visits-count__tooltip-list-item",children:["This short URL will not accept visits before ",g.jsx("b",{className:"indivisible",children:ey(Bi(a))}),"."]}),s&&g.jsxs("li",{className:"short-url-visits-count__tooltip-list-item",children:["This short URL will not accept visits after ",g.jsx("b",{className:"indivisible",children:ey(Bi(s))}),"."]})]})})]}):c},xh=({style:e,className:t,...n})=>g.jsx("button",{type:"button",className:Qe("border-0",t),style:{backgroundColor:"inherit",fontWeight:"inherit",...e},...n}),pme=e=>!!e.onClose,mme=e=>!!e.onClick,jT=e=>{const{text:t,children:n,className:r,colorGenerator:i}=e,o=mme(e),a=o?xh:"span",s=I.useMemo(()=>i.isColorLightForKey(t),[t,i]);return g.jsxs(a,{className:Qe("badge tag fw-bold",r,{"tag--light-bg":s,pointer:o}),style:{backgroundColor:i.getColorForKey(t)},onClick:o?e.onClick:void 0,children:[n??t,pme(e)&&g.jsx(xh,{"aria-label":`Remove ${t}`,className:Qe("bg-transparent ms-1 opacity-100 p-0 fw-bold tag__close",{"tag--light-bg":s}),onClick:e.onClose,children:"×"})]})},gme=({tags:e,onTagClick:t,colorGenerator:n})=>qi(e)?g.jsx("i",{className:"indivisible",children:g.jsx("small",{children:"No tags"})}):g.jsx(g.Fragment,{children:e.map(r=>g.jsx(jT,{text:r,colorGenerator:n,onClick:()=>t==null?void 0:t(r)},r))}),CF=({shortUrl:e,onTagClick:t})=>{var n,r,i,o;const{ShortUrlsRowMenu:a,ColorGenerator:s,useTimeoutToggle:l}=Kt(CF),[c,d]=l(),[f,p]=l(!1,500),m=I.useRef(!0),[{excludeBots:v}]=S0(),y=Ul("visits"),x=v??(y==null?void 0:y.excludeBots);return I.useEffect(()=>{!m.current&&p(),m.current=!1},[(n=e.visitsSummary)==null?void 0:n.total,(r=e.visitsSummary)==null?void 0:r.nonBots,e.visitsCount,p]),g.jsxs("tr",{className:"responsive-table__row",children:[g.jsx("td",{className:"indivisible short-urls-row__cell responsive-table__cell","data-th":"Created at",children:g.jsx(ry,{date:e.dateCreated})}),g.jsx("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Short URL",children:g.jsxs("span",{className:"position-relative short-urls-row__cell--indivisible",children:[g.jsx("span",{className:"short-urls-row__short-url-wrapper",children:g.jsx(Wo,{href:e.shortUrl})}),g.jsx(SF,{text:e.shortUrl,onCopy:d}),g.jsx("span",{className:"badge bg-warning text-black short-urls-row__copy-hint",hidden:!c,children:"Copied short URL!"})]})}),g.jsx("td",{className:"responsive-table__cell short-urls-row__cell short-urls-row__cell--break","data-th":`${e.title?"Title":"Long URL"}`,children:g.jsx(Wo,{href:e.longUrl,children:e.title??e.longUrl})}),e.title&&g.jsx("td",{className:"short-urls-row__cell responsive-table__cell short-urls-row__cell--break d-lg-none","data-th":"Long URL",children:g.jsx(Wo,{href:e.longUrl})}),g.jsx("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Tags",children:g.jsx(gme,{tags:e.tags,colorGenerator:s,onTagClick:t})}),g.jsx("td",{className:"responsive-table__cell short-urls-row__cell text-lg-end","data-th":"Visits",children:g.jsx(OF,{visitsCount:(x?(i=e.visitsSummary)==null?void 0:i.nonBots:(o=e.visitsSummary)==null?void 0:o.total)??e.visitsCount,shortUrl:e,active:f,asLink:!0})}),g.jsx("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Status",children:g.jsx(dme,{shortUrl:e})}),g.jsx("td",{className:"responsive-table__cell short-urls-row__cell text-end",children:g.jsx(a,{shortUrl:e})})]})},vme=Qt(CF,["ShortUrlsRowMenu","ColorGenerator","useTimeoutToggle"]),kF=({shortUrl:e})=>{const{DeleteShortUrlModal:t,QrCodeModal:n}=Kt(kF),[r,,i,o]=Sn(),[a,,s,l]=Sn();return g.jsxs(s0,{minWidth:190,children:[g.jsxs(Ue,{tag:c2,shortUrl:e,suffix:"visits",asLink:!0,children:[g.jsx(Ne,{icon:US,fixedWidth:!0})," Visit stats"]}),g.jsxs(Ue,{tag:c2,shortUrl:e,suffix:"edit",asLink:!0,children:[g.jsx(Ne,{icon:$S,fixedWidth:!0})," Edit short URL"]}),g.jsxs(Ue,{onClick:i,children:[g.jsx(Ne,{icon:yY,fixedWidth:!0})," QR code"]}),g.jsx(n,{shortUrl:e,isOpen:r,toggle:o}),g.jsx(Ue,{divider:!0,tag:"hr"}),g.jsxs(Ue,{className:"dropdown-item--danger",onClick:s,children:[g.jsx(Ne,{icon:FS,fixedWidth:!0})," Delete short URL"]}),g.jsx(t,{shortUrl:e,isOpen:a,toggle:l})]})},yme=Qt(kF,["DeleteShortUrlModal","QrCodeModal"]),PF="shlink/shortUrlCreation",tN={saving:!1,saved:!1,error:!1},_me=e=>Nr(`${PF}/createShortUrl`,t=>e().createShortUrl(t)),bme=e=>{const{reducer:t,actions:n}=lr({name:PF,initialState:tN,reducers:{resetCreateShortUrl:()=>tN},extraReducers:i=>{i.addCase(e.pending,()=>({saving:!0,saved:!1,error:!1})),i.addCase(e.rejected,(o,{error:a})=>({saving:!1,saved:!1,error:!0,errorData:pa(a)})),i.addCase(e.fulfilled,(o,{payload:a})=>({result:a,saving:!1,saved:!0,error:!1}))}}),{resetCreateShortUrl:r}=n;return{reducer:t,resetCreateShortUrl:r}},nN="shlink/shortUrlDetail",rN={loading:!1,error:!1},wme=e=>{const t=Nr(`${nN}/getShortUrlDetail`,async({shortCode:r,domain:i},{getState:o})=>{var a;const{shortUrlsList:s}=o();return((a=s==null?void 0:s.shortUrls)==null?void 0:a.data.find(l=>xf(l,r,i)))??await e().getShortUrl(r,i)}),{reducer:n}=lr({name:nN,initialState:rN,reducers:{},extraReducers:r=>{r.addCase(t.pending,()=>({loading:!0,error:!1})),r.addCase(t.rejected,(i,{error:o})=>({loading:!1,error:!0,errorData:pa(o)})),r.addCase(t.fulfilled,(i,{payload:o})=>({...rN,shortUrl:o}))}});return{reducer:n,getShortUrlDetail:t}},LF="shlink/shortUrlEdition",xme={saving:!1,saved:!1,error:!1},Sme=e=>Nr(`${LF}/editShortUrl`,({shortCode:t,domain:n,data:r})=>e().updateShortUrl(t,n,r)),Eme=e=>lr({name:LF,initialState:xme,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:pa(r)})),t.addCase(e.fulfilled,(n,{payload:r})=>({shortUrl:r,saving:!1,error:!1,saved:!0}))}}),Tme=({icon:e,className:t,...n})=>{const r=ys(),i=Qe("icon-input-container__input",t);return g.jsxs("div",{className:"icon-input-container",children:[g.jsx(bl,{className:i,innerRef:r,...n}),g.jsx(Ne,{icon:e,fixedWidth:!0,className:"icon-input-container__icon",onClick:()=>{var o;return(o=r.current)==null?void 0:o.focus()}})]})};function Ome(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,u2(e,t)}function u2(e,t){return u2=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},u2(e,t)}function Cme(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 iN(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kme(e,t,n){return e===t?!0:e.correspondingElement?e.correspondingElement.classList.contains(n):e.classList.contains(n)}function Pme(e,t,n){if(e===t)return!0;for(;e.parentNode||e.host;){if(e.parentNode&&kme(e,t,n))return!0;e=e.parentNode||e.host}return e}function Lme(e){return document.documentElement.clientWidth<=e.clientX||document.documentElement.clientHeight<=e.clientY}var jme=function(){if(!(typeof window>"u"||typeof window.addEventListener!="function")){var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}}),n=function(){};return window.addEventListener("testPassiveEventSupport",n,t),window.removeEventListener("testPassiveEventSupport",n,t),e}};function Mme(e){return e===void 0&&(e=0),function(){return++e}}var Nme=Mme(),d2,Rm={},jb={},Rme=["touchstart","touchmove"],Ame="ignore-react-onclickoutside";function oN(e,t){var n={},r=Rme.indexOf(t)!==-1;return r&&d2&&(n.passive=!e.props.preventDefault),n}function E0(e,t){var n,r,i=e.displayName||e.name||"Component";return r=n=function(o){Ome(a,o);function a(l){var c;return c=o.call(this,l)||this,c.__outsideClickHandler=function(d){if(typeof c.__clickOutsideHandlerProp=="function"){c.__clickOutsideHandlerProp(d);return}var f=c.getInstance();if(typeof f.props.handleClickOutside=="function"){f.props.handleClickOutside(d);return}if(typeof f.handleClickOutside=="function"){f.handleClickOutside(d);return}throw new Error("WrappedComponent: "+i+" lacks a handleClickOutside(event) function for processing outside click events.")},c.__getComponentNode=function(){var d=c.getInstance();return t&&typeof t.setClickOutsideRef=="function"?t.setClickOutsideRef()(d):typeof d.setClickOutsideRef=="function"?d.setClickOutsideRef():jl.findDOMNode(d)},c.enableOnClickOutside=function(){if(!(typeof document>"u"||jb[c._uid])){typeof d2>"u"&&(d2=jme()),jb[c._uid]=!0;var d=c.props.eventTypes;d.forEach||(d=[d]),Rm[c._uid]=function(f){if(c.componentNode!==null&&(c.props.preventDefault&&f.preventDefault(),c.props.stopPropagation&&f.stopPropagation(),!(c.props.excludeScrollbar&&Lme(f)))){var p=f.composed&&f.composedPath&&f.composedPath().shift()||f.target;Pme(p,c.componentNode,c.props.outsideClickIgnoreClass)===document&&c.__outsideClickHandler(f)}},d.forEach(function(f){document.addEventListener(f,Rm[c._uid],oN(iN(c),f))})}},c.disableOnClickOutside=function(){delete jb[c._uid];var d=Rm[c._uid];if(d&&typeof document<"u"){var f=c.props.eventTypes;f.forEach||(f=[f]),f.forEach(function(p){return document.removeEventListener(p,d,oN(iN(c),p))}),delete Rm[c._uid]}},c.getRef=function(d){return c.instanceRef=d},c._uid=Nme(),c}var s=a.prototype;return s.getInstance=function(){if(e.prototype&&!e.prototype.isReactComponent)return this;var l=this.instanceRef;return l.getInstance?l.getInstance():l},s.componentDidMount=function(){if(!(typeof document>"u"||!document.createElement)){var l=this.getInstance();if(t&&typeof t.handleClickOutside=="function"&&(this.__clickOutsideHandlerProp=t.handleClickOutside(l),typeof this.__clickOutsideHandlerProp!="function"))throw new Error("WrappedComponent: "+i+" lacks a function for processing outside click events specified by the handleClickOutside config option.");this.componentNode=this.__getComponentNode(),!this.props.disableOnClickOutside&&this.enableOnClickOutside()}},s.componentDidUpdate=function(){this.componentNode=this.__getComponentNode()},s.componentWillUnmount=function(){this.disableOnClickOutside()},s.render=function(){var l=this.props;l.excludeScrollbar;var c=Cme(l,["excludeScrollbar"]);return e.prototype&&e.prototype.isReactComponent?c.ref=this.getRef:c.wrappedRef=this.getRef,c.disableOnClickOutside=this.disableOnClickOutside,c.enableOnClickOutside=this.enableOnClickOutside,I.createElement(e,c)},a}(I.Component),n.displayName="OnClickOutside("+i+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:Ame,preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},r}var jF=I.createContext(),MF=I.createContext();function Dme(e){var t=e.children,n=I.useState(null),r=n[0],i=n[1],o=I.useRef(!1);I.useEffect(function(){return function(){o.current=!0}},[]);var a=I.useCallback(function(s){o.current||i(s)},[]);return I.createElement(jF.Provider,{value:r},I.createElement(MF.Provider,{value:a},t))}var NF=function(e){return Array.isArray(e)?e[0]:e},RF=function(e){if(typeof e=="function"){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r"u")return!1;var t=Kr(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Zme(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];!mi(o)||!xo(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function Kme(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,c){return l[c]="",l},{});!mi(i)||!xo(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const Qme={name:"applyStyles",enabled:!0,phase:"write",fn:Zme,effect:Kme,requires:["computeStyles"]};function yo(e){return e.split("-")[0]}var ul=Math.max,iy=Math.min,Pu=Math.round;function h2(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function IF(){return!/^((?!chrome|android).)*safari/i.test(h2())}function Lu(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&mi(e)&&(i=e.offsetWidth>0&&Pu(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Pu(r.height)/e.offsetHeight||1);var a=Ol(e)?Kr(e):window,s=a.visualViewport,l=!IF()&&n,c=(r.left+(l&&s?s.offsetLeft:0))/i,d=(r.top+(l&&s?s.offsetTop:0))/o,f=r.width/i,p=r.height/o;return{width:f,height:p,top:d,right:c+f,bottom:d+p,left:c,x:c,y:d}}function RT(e){var t=Lu(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 FF(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&NT(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function ia(e){return Kr(e).getComputedStyle(e)}function Xme(e){return["table","td","th"].indexOf(xo(e))>=0}function xs(e){return((Ol(e)?e.ownerDocument:e.document)||window.document).documentElement}function T0(e){return xo(e)==="html"?e:e.assignedSlot||e.parentNode||(NT(e)?e.host:null)||xs(e)}function cN(e){return!mi(e)||ia(e).position==="fixed"?null:e.offsetParent}function Jme(e){var t=/firefox/i.test(h2()),n=/Trident/i.test(h2());if(n&&mi(e)){var r=ia(e);if(r.position==="fixed")return null}var i=T0(e);for(NT(i)&&(i=i.host);mi(i)&&["html","body"].indexOf(xo(i))<0;){var o=ia(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 ap(e){for(var t=Kr(e),n=cN(e);n&&Xme(n)&&ia(n).position==="static";)n=cN(n);return n&&(xo(n)==="html"||xo(n)==="body"&&ia(n).position==="static")?t:n||Jme(e)||t}function AT(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Sf(e,t,n){return ul(e,iy(t,n))}function ege(e,t,n){var r=Sf(e,t,n);return r>n?n:r}function $F(){return{top:0,right:0,bottom:0,left:0}}function UF(e){return Object.assign({},$F(),e)}function BF(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var tge=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,UF(typeof e!="number"?e:BF(e,op))};function nge(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=yo(n.placement),l=AT(s),c=[Mr,xi].indexOf(s)>=0,d=c?"height":"width";if(!(!o||!a)){var f=tge(i.padding,n),p=RT(o),m=l==="y"?jr:Mr,v=l==="y"?wi:xi,y=n.rects.reference[d]+n.rects.reference[l]-a[l]-n.rects.popper[d],x=a[l]-n.rects.reference[l],_=ap(o),w=_?l==="y"?_.clientHeight||0:_.clientWidth||0:0,S=y/2-x/2,E=f[m],O=w-p[d]-f[v],k=w/2-p[d]/2+S,j=Sf(E,k,O),A=l;n.modifiersData[r]=(t={},t[A]=j,t.centerOffset=j-k,t)}}function rge(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)||FF(t.elements.popper,i)&&(t.elements.arrow=i))}const ige={name:"arrow",enabled:!0,phase:"main",fn:nge,effect:rge,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ju(e){return e.split("-")[1]}var oge={top:"auto",right:"auto",bottom:"auto",left:"auto"};function age(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:Pu(n*i)/i||0,y:Pu(r*i)/i||0}}function uN(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,f=e.isFixed,p=a.x,m=p===void 0?0:p,v=a.y,y=v===void 0?0:v,x=typeof d=="function"?d({x:m,y}):{x:m,y};m=x.x,y=x.y;var _=a.hasOwnProperty("x"),w=a.hasOwnProperty("y"),S=Mr,E=jr,O=window;if(c){var k=ap(n),j="clientHeight",A="clientWidth";if(k===Kr(n)&&(k=xs(n),ia(k).position!=="static"&&s==="absolute"&&(j="scrollHeight",A="scrollWidth")),k=k,i===jr||(i===Mr||i===xi)&&o===Sh){E=wi;var U=f&&k===O&&O.visualViewport?O.visualViewport.height:k[j];y-=U-r.height,y*=l?1:-1}if(i===Mr||(i===jr||i===wi)&&o===Sh){S=xi;var R=f&&k===O&&O.visualViewport?O.visualViewport.width:k[A];m-=R-r.width,m*=l?1:-1}}var V=Object.assign({position:s},c&&oge),W=d===!0?age({x:m,y},Kr(n)):{x:m,y};if(m=W.x,y=W.y,l){var X;return Object.assign({},V,(X={},X[E]=w?"0":"",X[S]=_?"0":"",X.transform=(O.devicePixelRatio||1)<=1?"translate("+m+"px, "+y+"px)":"translate3d("+m+"px, "+y+"px, 0)",X))}return Object.assign({},V,(t={},t[E]=w?y+"px":"",t[S]=_?m+"px":"",t.transform="",t))}function sge(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,c={placement:yo(t.placement),variation:ju(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,uN(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,uN(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 lge={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:sge,data:{}};var Am={passive:!0};function cge(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=Kr(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(d){d.addEventListener("scroll",n.update,Am)}),s&&l.addEventListener("resize",n.update,Am),function(){o&&c.forEach(function(d){d.removeEventListener("scroll",n.update,Am)}),s&&l.removeEventListener("resize",n.update,Am)}}const uge={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:cge,data:{}};var dge={left:"right",right:"left",bottom:"top",top:"bottom"};function xg(e){return e.replace(/left|right|bottom|top/g,function(t){return dge[t]})}var fge={start:"end",end:"start"};function dN(e){return e.replace(/start|end/g,function(t){return fge[t]})}function DT(e){var t=Kr(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function IT(e){return Lu(xs(e)).left+DT(e).scrollLeft}function hge(e,t){var n=Kr(e),r=xs(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var c=IF();(c||!c&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+IT(e),y:l}}function pge(e){var t,n=xs(e),r=DT(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=ul(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=ul(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+IT(e),l=-r.scrollTop;return ia(i||n).direction==="rtl"&&(s+=ul(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function FT(e){var t=ia(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function zF(e){return["html","body","#document"].indexOf(xo(e))>=0?e.ownerDocument.body:mi(e)&&FT(e)?e:zF(T0(e))}function Ef(e,t){var n;t===void 0&&(t=[]);var r=zF(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Kr(r),a=i?[o].concat(o.visualViewport||[],FT(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(Ef(T0(a)))}function p2(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function mge(e,t){var n=Lu(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 fN(e,t,n){return t===AF?p2(hge(e,n)):Ol(t)?mge(t,n):p2(pge(xs(e)))}function gge(e){var t=Ef(T0(e)),n=["absolute","fixed"].indexOf(ia(e).position)>=0,r=n&&mi(e)?ap(e):e;return Ol(r)?t.filter(function(i){return Ol(i)&&FF(i,r)&&xo(i)!=="body"}):[]}function vge(e,t,n,r){var i=t==="clippingParents"?gge(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,c){var d=fN(e,c,r);return l.top=ul(d.top,l.top),l.right=iy(d.right,l.right),l.bottom=iy(d.bottom,l.bottom),l.left=ul(d.left,l.left),l},fN(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function VF(e){var t=e.reference,n=e.element,r=e.placement,i=r?yo(r):null,o=r?ju(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case jr:l={x:a,y:t.y-n.height};break;case wi:l={x:a,y:t.y+t.height};break;case xi:l={x:t.x+t.width,y:s};break;case Mr:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var c=i?AT(i):null;if(c!=null){var d=c==="y"?"height":"width";switch(o){case ku:l[c]=l[c]-(t[d]/2-n[d]/2);break;case Sh:l[c]=l[c]+(t[d]/2-n[d]/2);break}}return l}function Eh(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?Ime:s,c=n.rootBoundary,d=c===void 0?AF:c,f=n.elementContext,p=f===void 0?jd:f,m=n.altBoundary,v=m===void 0?!1:m,y=n.padding,x=y===void 0?0:y,_=UF(typeof x!="number"?x:BF(x,op)),w=p===jd?Fme:jd,S=e.rects.popper,E=e.elements[v?w:p],O=vge(Ol(E)?E:E.contextElement||xs(e.elements.popper),l,d,a),k=Lu(e.elements.reference),j=VF({reference:k,element:S,strategy:"absolute",placement:i}),A=p2(Object.assign({},S,j)),U=p===jd?A:k,R={top:O.top-U.top+_.top,bottom:U.bottom-O.bottom+_.bottom,left:O.left-U.left+_.left,right:U.right-O.right+_.right},V=e.modifiersData.offset;if(p===jd&&V){var W=V[i];Object.keys(R).forEach(function(X){var G=[xi,wi].indexOf(X)>=0?1:-1,Z=[jr,wi].indexOf(X)>=0?"y":"x";R[X]+=W[Z]*G})}return R}function yge(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?DF:l,d=ju(r),f=d?s?lN:lN.filter(function(v){return ju(v)===d}):op,p=f.filter(function(v){return c.indexOf(v)>=0});p.length===0&&(p=f);var m=p.reduce(function(v,y){return v[y]=Eh(e,{placement:y,boundary:i,rootBoundary:o,padding:a})[yo(y)],v},{});return Object.keys(m).sort(function(v,y){return m[v]-m[y]})}function _ge(e){if(yo(e)===MT)return[];var t=xg(e);return[dN(e),t,dN(t)]}function bge(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,c=n.padding,d=n.boundary,f=n.rootBoundary,p=n.altBoundary,m=n.flipVariations,v=m===void 0?!0:m,y=n.allowedAutoPlacements,x=t.options.placement,_=yo(x),w=_===x,S=l||(w||!v?[xg(x)]:_ge(x)),E=[x].concat(S).reduce(function(q,re){return q.concat(yo(re)===MT?yge(t,{placement:re,boundary:d,rootBoundary:f,padding:c,flipVariations:v,allowedAutoPlacements:y}):re)},[]),O=t.rects.reference,k=t.rects.popper,j=new Map,A=!0,U=E[0],R=0;R=0,Z=G?"width":"height",ne=Eh(t,{placement:V,boundary:d,rootBoundary:f,altBoundary:p,padding:c}),le=G?X?xi:Mr:X?wi:jr;O[Z]>k[Z]&&(le=xg(le));var K=xg(le),F=[];if(o&&F.push(ne[W]<=0),s&&F.push(ne[le]<=0,ne[K]<=0),F.every(function(q){return q})){U=V,A=!1;break}j.set(V,F)}if(A)for(var D=v?3:1,H=function(q){var re=E.find(function(ae){var he=j.get(ae);if(he)return he.slice(0,q).every(function(C){return C})});if(re)return U=re,"break"},ie=D;ie>0;ie--){var z=H(ie);if(z==="break")break}t.placement!==U&&(t.modifiersData[r]._skip=!0,t.placement=U,t.reset=!0)}}const wge={name:"flip",enabled:!0,phase:"main",fn:bge,requiresIfExists:["offset"],data:{_skip:!1}};function hN(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 pN(e){return[jr,xi,wi,Mr].some(function(t){return e[t]>=0})}function xge(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Eh(t,{elementContext:"reference"}),s=Eh(t,{altBoundary:!0}),l=hN(a,r),c=hN(s,i,o),d=pN(l),f=pN(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":f})}const Sge={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:xge};function Ege(e,t,n){var r=yo(e),i=[Mr,jr].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Mr,xi].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function Tge(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=DF.reduce(function(d,f){return d[f]=Ege(f,t.rects,o),d},{}),s=a[t.placement],l=s.x,c=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}const Oge={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Tge};function Cge(e){var t=e.state,n=e.name;t.modifiersData[n]=VF({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const kge={name:"popperOffsets",enabled:!0,phase:"read",fn:Cge,data:{}};function Pge(e){return e==="x"?"y":"x"}function Lge(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,c=n.rootBoundary,d=n.altBoundary,f=n.padding,p=n.tether,m=p===void 0?!0:p,v=n.tetherOffset,y=v===void 0?0:v,x=Eh(t,{boundary:l,rootBoundary:c,padding:f,altBoundary:d}),_=yo(t.placement),w=ju(t.placement),S=!w,E=AT(_),O=Pge(E),k=t.modifiersData.popperOffsets,j=t.rects.reference,A=t.rects.popper,U=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,R=typeof U=="number"?{mainAxis:U,altAxis:U}:Object.assign({mainAxis:0,altAxis:0},U),V=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,W={x:0,y:0};if(k){if(o){var X,G=E==="y"?jr:Mr,Z=E==="y"?wi:xi,ne=E==="y"?"height":"width",le=k[E],K=le+x[G],F=le-x[Z],D=m?-A[ne]/2:0,H=w===ku?j[ne]:A[ne],ie=w===ku?-A[ne]:-j[ne],z=t.elements.arrow,q=m&&z?RT(z):{width:0,height:0},re=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:$F(),ae=re[G],he=re[Z],C=Sf(0,j[ne],q[ne]),M=S?j[ne]/2-D-C-ae-R.mainAxis:H-C-ae-R.mainAxis,$=S?-j[ne]/2+D+C+he+R.mainAxis:ie+C+he+R.mainAxis,J=t.elements.arrow&&ap(t.elements.arrow),ee=J?E==="y"?J.clientTop||0:J.clientLeft||0:0,se=(X=V==null?void 0:V[E])!=null?X:0,ge=le+M-se-ee,Me=le+$-se,ue=Sf(m?iy(K,ge):K,le,m?ul(F,Me):F);k[E]=ue,W[E]=ue-le}if(s){var me,_e=E==="x"?jr:Mr,Se=E==="x"?wi:xi,ke=k[O],Ce=O==="y"?"height":"width",je=ke+x[_e],ce=ke-x[Se],fe=[jr,Mr].indexOf(_)!==-1,ye=(me=V==null?void 0:V[O])!=null?me:0,ve=fe?je:ke-j[Ce]-A[Ce]-ye+R.altAxis,xe=fe?ke+j[Ce]+A[Ce]-ye-R.altAxis:ce,Le=m&&fe?ege(ve,ke,xe):Sf(m?ve:je,ke,m?xe:ce);k[O]=Le,W[O]=Le-ke}t.modifiersData[r]=W}}const jge={name:"preventOverflow",enabled:!0,phase:"main",fn:Lge,requiresIfExists:["offset"]};function Mge(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Nge(e){return e===Kr(e)||!mi(e)?DT(e):Mge(e)}function Rge(e){var t=e.getBoundingClientRect(),n=Pu(t.width)/e.offsetWidth||1,r=Pu(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Age(e,t,n){n===void 0&&(n=!1);var r=mi(t),i=mi(t)&&Rge(t),o=xs(t),a=Lu(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((xo(t)!=="body"||FT(o))&&(s=Nge(t)),mi(t)?(l=Lu(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=IT(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Dge(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function Ige(e){var t=Dge(e);return qme.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function Fge(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function $ge(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 mN={placement:"bottom",modifiers:[],strategy:"absolute"};function gN(){for(var e=arguments.length,t=new Array(e),n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=ay(e);if(t){var i=ay(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(o,a){if(a&&(typeof a=="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return te(o)}(this,n)}}function Oh(e){return function(t){if(Array.isArray(t))return Mb(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 Mb(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 Mb(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 Mb(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate,i=t.excludeDates,o=t.excludeDateIntervals,a=t.includeDates,s=t.includeDateIntervals,l=t.filterDate;return C0(e,{minDate:n,maxDate:r})||i&&i.some(function(c){return mr(e,c)})||o&&o.some(function(c){var d=c.start,f=c.end;return Ou(e,{start:d,end:f})})||a&&!a.some(function(c){return mr(e,c)})||s&&!s.some(function(c){var d=c.start,f=c.end;return Ou(e,{start:d,end:f})})||l&&!l(Ot(e))||!1}function BT(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.excludeDates,r=t.excludeDateIntervals;return r&&r.length>0?r.some(function(i){var o=i.start,a=i.end;return Ou(e,{start:o,end:a})}):n&&n.some(function(i){return mr(e,i)})||!1}function YF(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate,i=t.excludeDates,o=t.includeDates,a=t.filterDate;return C0(e,{minDate:N8(n),maxDate:M8(r)})||i&&i.some(function(s){return Ri(e,s)})||o&&!o.some(function(s){return Ri(e,s)})||a&&!a(Ot(e))||!1}function Nb(e,t,n,r){var i=et(e),o=rr(e),a=et(t),s=rr(t),l=et(r);return i===a&&i===l?o<=n&&n<=s:i=n||li:void 0}function sve(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate,i=t.excludeDates,o=t.includeDates,a=t.filterDate;return C0(e,{minDate:n,maxDate:r})||i&&i.some(function(s){return sy(e,s)})||o&&!o.some(function(s){return sy(e,s)})||a&&!a(Ot(e))||!1}function Rb(e,t,n){if(!_h(t)||!_h(n))return!1;var r=et(t),i=et(n);return r<=e&&i>=e}function GF(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate,i=t.excludeDates,o=t.includeDates,a=t.filterDate,s=new Date(e,0,1);return C0(s,{minDate:R8(n),maxDate:ode(r)})||i&&i.some(function(l){return za(s,l)})||o&&!o.some(function(l){return za(s,l)})||a&&!a(Ot(s))||!1}function Ab(e,t,n,r){var i=et(e),o=Nc(e),a=et(t),s=Nc(t),l=et(r);return i===a&&i===l?o<=n&&n<=s:i=n||li:void 0}function C0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate;return n&&yh(e,n)<0||r&&yh(e,r)>0}function EN(e,t){return t.some(function(n){return Fi(n)===Fi(e)&&$i(n)===$i(e)})}function TN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.excludeTimes,r=t.includeTimes,i=t.filterTime;return n&&EN(e,n)||r&&!EN(e,r)||i&&!i(e)||!1}function ON(e,t){var n=t.minTime,r=t.maxTime;if(!n||!r)throw new Error("Both minTime and maxTime props required");var i,o=Ot(),a=_g(bg(o,$i(e)),Fi(e)),s=_g(bg(o,$i(n)),Fi(n)),l=_g(bg(o,$i(r)),Fi(r));try{i=!Ou(a,{start:s,end:l})}catch{i=!1}return i}function CN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.includeDates,i=Cu(e,1);return n&&bh(n,i)>0||r&&r.every(function(o){return bh(o,i)>0})||!1}function kN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.maxDate,r=t.includeDates,i=bi(e,1);return n&&bh(i,n)>0||r&&r.every(function(o){return bh(i,o)>0})||!1}function PN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.includeDates,i=wh(e,1);return n&&Zv(n,i)>0||r&&r.every(function(o){return Zv(o,i)>0})||!1}function LN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.maxDate,r=t.includeDates,i=Su(e,1);return n&&Zv(i,n)>0||r&&r.every(function(o){return Zv(i,o)>0})||!1}function qF(e){var t=e.minDate,n=e.includeDates;if(n&&t){var r=n.filter(function(i){return yh(i,t)>=0});return TM(r)}return n?TM(n):t}function ZF(e){var t=e.maxDate,n=e.includeDates;if(n&&t){var r=n.filter(function(i){return yh(i,t)<=0});return EM(r)}return n?EM(n):t}function jN(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"react-datepicker__day--highlighted",n=new Map,r=0,i=e.length;r0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"react-datepicker__day--holidays",n=new Map;return e.forEach(function(r){var i=r.date,o=r.holidayName;if(w0(i)){var a=Bt(i,"MM.dd.yyyy"),s=n.get(a)||{};if(!("className"in s)||s.className!==t||(l=s.holidayNames,c=[o],l.length!==c.length||!l.every(function(f,p){return f===c[p]}))){var l,c;s.className=t;var d=s.holidayNames;s.holidayNames=d?[].concat(Oh(d),[o]):[o],n.set(a,s)}}}),n}function cve(e,t,n,r,i){for(var o=i.length,a=[],s=0;s1&&arguments[1]!==void 0?arguments[1]:Tf,n=Math.ceil(et(e)/t)*t;return{startPeriod:n-(t-1),endPeriod:n}}function NN(e){var t=e.getSeconds(),n=e.getMilliseconds();return Pe(e.getTime()-1e3*t-n)}function uve(e,t,n,r){for(var i=[],o=0;o<2*t+1;o++){var a=e+t-o,s=!0;n&&(s=et(n)<=a),r&&s&&(s=et(r)>=a),s&&i.push(a)}return i}var dve=E0(function(e){Fn(n,Y.Component);var t=$n(n);function n(r){var i;Dn(this,n),Q(te(i=t.call(this,r)),"renderOptions",function(){var l=i.props.year,c=i.state.yearsList.map(function(p){return Y.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(te(i),p),"aria-selected":l===p?"true":void 0},l===p?Y.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",p)}),d=i.props.minDate?et(i.props.minDate):null,f=i.props.maxDate?et(i.props.maxDate):null;return f&&i.state.yearsList.find(function(p){return p===f})||c.unshift(Y.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:i.incrementYears},Y.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),d&&i.state.yearsList.find(function(p){return p===d})||c.push(Y.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:i.decrementYears},Y.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),c}),Q(te(i),"onChange",function(l){i.props.onChange(l)}),Q(te(i),"handleClickOutside",function(){i.props.onCancel()}),Q(te(i),"shiftYears",function(l){var c=i.state.yearsList.map(function(d){return d+l});i.setState({yearsList:c})}),Q(te(i),"incrementYears",function(){return i.shiftYears(1)}),Q(te(i),"decrementYears",function(){return i.shiftYears(-1)});var o=r.yearDropdownItemNumber,a=r.scrollableYearDropdown,s=o||(a?10:5);return i.state={yearsList:uve(i.props.year,s,i.props.minDate,i.props.maxDate)},i.dropdownRef=I.createRef(),i}return In(n,[{key:"componentDidMount",value:function(){var r=this.dropdownRef.current;if(r){var i=r.children?Array.from(r.children):null,o=i?i.find(function(a){return a.ariaSelected}):null;r.scrollTop=o?o.offsetTop+(o.clientHeight-r.clientHeight)/2:(r.scrollHeight-r.clientHeight)/2}}},{key:"render",value:function(){var r=Qe({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return Y.createElement("div",{className:r,ref:this.dropdownRef},this.renderOptions())}}]),n}()),fve=function(e){Fn(n,Y.Component);var t=$n(n);function n(){var r;Dn(this,n);for(var i=arguments.length,o=new Array(i),a=0;a0?d.get(f).holidayNames.join(", "):""}),Q(te(r),"getTabIndex",function(s,l){var c=s||r.props.selected,d=l||r.props.preSelection;return r.isKeyboardSelected()||r.isSameDay(c)&&mr(d,c)?0:-1}),Q(te(r),"handleFocusDay",function(){var s,l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=!1;r.getTabIndex()===0&&!l.isInputFocused&&r.isSameDay(r.props.preSelection)&&(document.activeElement&&document.activeElement!==document.body||(c=!0),r.props.inline&&!r.props.shouldFocusDayInline&&(c=!1),r.props.containerRef&&r.props.containerRef.current&&r.props.containerRef.current.contains(document.activeElement)&&document.activeElement.classList.contains("react-datepicker__day")&&(c=!0),r.props.monthShowsDuplicateDaysEnd&&r.isAfterMonth()&&(c=!1),r.props.monthShowsDuplicateDaysStart&&r.isBeforeMonth()&&(c=!1)),c&&((s=r.dayEl.current)===null||s===void 0||s.focus({preventScroll:!0}))}),Q(te(r),"renderDayContents",function(){return r.props.monthShowsDuplicateDaysEnd&&r.isAfterMonth()||r.props.monthShowsDuplicateDaysStart&&r.isBeforeMonth()?null:r.props.renderDayContents?r.props.renderDayContents(MM(r.props.day),r.props.day):MM(r.props.day)}),Q(te(r),"render",function(){return Y.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",title:r.getTitle(),"aria-disabled":r.isDisabled(),"aria-current":r.isCurrentDay()?"date":void 0,"aria-selected":r.isSelected()||r.isInRange()},r.renderDayContents(),r.getTitle()!==""&&Y.createElement("span",{className:"holiday-overlay"},r.getTitle()))}),r}return In(n,[{key:"componentDidMount",value:function(){this.handleFocusDay()}},{key:"componentDidUpdate",value:function(r){this.handleFocusDay(r)}}]),n}(),_ve=function(e){Fn(n,Y.Component);var t=$n(n);function n(){var r;Dn(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=6,m=!l&&!r.isWeekInMonth(f);if(p||m){if(!r.props.peekNextMonth)break;d=!0}}return s}),Q(te(r),"onMonthClick",function(s,l){r.handleDayClick(es(pr(r.props.day,l)),s)}),Q(te(r),"onMonthMouseEnter",function(s){r.handleDayMouseEnter(es(pr(r.props.day,s)))}),Q(te(r),"handleMonthNavigation",function(s,l){r.isDisabled(l)||r.isExcluded(l)||(r.props.setPreSelection(l),r.MONTH_REFS[s].current&&r.MONTH_REFS[s].current.focus())}),Q(te(r),"onMonthKeyDown",function(s,l){var c=r.props,d=c.selected,f=c.preSelection,p=c.disabledKeyboardNavigation,m=c.showTwoColumnMonthYearPicker,v=c.showFourColumnMonthYearPicker,y=c.setPreSelection,x=s.key;if(x!=="Tab"&&s.preventDefault(),!p){var _=RN(v,m),w=Db[_].verticalNavigationOffset,S=Db[_].grid;switch(x){case"Enter":r.onMonthClick(s,l),y(d);break;case"ArrowRight":r.handleMonthNavigation(l===11?0:l+1,bi(f,1));break;case"ArrowLeft":r.handleMonthNavigation(l===0?11:l-1,Cu(f,1));break;case"ArrowUp":r.handleMonthNavigation(S[0].includes(l)?l+12-w:l-w,Cu(f,w));break;case"ArrowDown":r.handleMonthNavigation(S[S.length-1].includes(l)?l-12+w:l+w,bi(f,w))}}}),Q(te(r),"onQuarterClick",function(s,l){r.handleDayClick(xN(cc(r.props.day,l)),s)}),Q(te(r),"onQuarterMouseEnter",function(s){r.handleDayMouseEnter(xN(cc(r.props.day,s)))}),Q(te(r),"handleQuarterNavigation",function(s,l){r.isDisabled(l)||r.isExcluded(l)||(r.props.setPreSelection(l),r.QUARTER_REFS[s-1].current&&r.QUARTER_REFS[s-1].current.focus())}),Q(te(r),"onQuarterKeyDown",function(s,l){var c=s.key;if(!r.props.disabledKeyboardNavigation)switch(c){case"Enter":r.onQuarterClick(s,l),r.props.setPreSelection(r.props.selected);break;case"ArrowRight":r.handleQuarterNavigation(l===4?1:l+1,L8(r.props.preSelection,1));break;case"ArrowLeft":r.handleQuarterNavigation(l===1?4:l-1,Fhe(r.props.preSelection,1))}}),Q(te(r),"getMonthClassNames",function(s){var l=r.props,c=l.day,d=l.startDate,f=l.endDate,p=l.selected,m=l.minDate,v=l.maxDate,y=l.preSelection,x=l.monthClassName,_=l.excludeDates,w=l.includeDates,S=x?x(pr(c,s)):void 0,E=pr(c,s);return Qe("react-datepicker__month-text","react-datepicker__month-".concat(s),S,{"react-datepicker__month-text--disabled":(m||v||_||w)&&YF(E,r.props),"react-datepicker__month-text--selected":r.isSelectedMonth(c,s,p),"react-datepicker__month-text--keyboard-selected":!r.props.disabledKeyboardNavigation&&rr(y)===s,"react-datepicker__month-text--in-selecting-range":r.isInSelectingRangeMonth(s),"react-datepicker__month-text--in-range":Nb(d,f,s,c),"react-datepicker__month-text--range-start":r.isRangeStartMonth(s),"react-datepicker__month-text--range-end":r.isRangeEndMonth(s),"react-datepicker__month-text--selecting-range-start":r.isSelectingMonthRangeStart(s),"react-datepicker__month-text--selecting-range-end":r.isSelectingMonthRangeEnd(s),"react-datepicker__month-text--today":r.isCurrentMonth(c,s)})}),Q(te(r),"getTabIndex",function(s){var l=rr(r.props.preSelection);return r.props.disabledKeyboardNavigation||s!==l?"-1":"0"}),Q(te(r),"getQuarterTabIndex",function(s){var l=Nc(r.props.preSelection);return r.props.disabledKeyboardNavigation||s!==l?"-1":"0"}),Q(te(r),"getAriaLabel",function(s){var l=r.props,c=l.chooseDayAriaLabelPrefix,d=c===void 0?"Choose":c,f=l.disabledDayAriaLabelPrefix,p=f===void 0?"Not available":f,m=l.day,v=pr(m,s),y=r.isDisabled(v)||r.isExcluded(v)?p:d;return"".concat(y," ").concat(Bt(v,"MMMM yyyy"))}),Q(te(r),"getQuarterClassNames",function(s){var l=r.props,c=l.day,d=l.startDate,f=l.endDate,p=l.selected,m=l.minDate,v=l.maxDate,y=l.preSelection;return Qe("react-datepicker__quarter-text","react-datepicker__quarter-".concat(s),{"react-datepicker__quarter-text--disabled":(m||v)&&sve(cc(c,s),r.props),"react-datepicker__quarter-text--selected":r.isSelectedQuarter(c,s,p),"react-datepicker__quarter-text--keyboard-selected":Nc(y)===s,"react-datepicker__quarter-text--in-selecting-range":r.isInSelectingRangeQuarter(s),"react-datepicker__quarter-text--in-range":Ab(d,f,s,c),"react-datepicker__quarter-text--range-start":r.isRangeStartQuarter(s),"react-datepicker__quarter-text--range-end":r.isRangeEndQuarter(s)})}),Q(te(r),"getMonthContent",function(s){var l=r.props,c=l.showFullMonthYearPicker,d=l.renderMonthContent,f=l.locale,p=WF(s,f),m=UT(s,f);return d?d(s,p,m):c?m:p}),Q(te(r),"getQuarterContent",function(s){var l=r.props,c=l.renderQuarterContent,d=function(f,p){return Bt(cc(Ot(),f),"QQQ",p)}(s,l.locale);return c?c(s,d):d}),Q(te(r),"renderMonths",function(){var s=r.props,l=s.showTwoColumnMonthYearPicker,c=s.showFourColumnMonthYearPicker,d=s.day,f=s.selected;return Db[RN(c,l)].grid.map(function(p,m){return Y.createElement("div",{className:"react-datepicker__month-wrapper",key:m},p.map(function(v,y){return Y.createElement("div",{ref:r.MONTH_REFS[v],key:y,onClick:function(x){r.onMonthClick(x,v)},onKeyDown:function(x){r.onMonthKeyDown(x,v)},onMouseEnter:function(){return r.onMonthMouseEnter(v)},tabIndex:r.getTabIndex(v),className:r.getMonthClassNames(v),role:"option","aria-label":r.getAriaLabel(v),"aria-current":r.isCurrentMonth(d,v)?"date":void 0,"aria-selected":r.isSelectedMonth(d,v,f)},r.getMonthContent(v))}))})}),Q(te(r),"renderQuarters",function(){var s=r.props,l=s.day,c=s.selected;return Y.createElement("div",{className:"react-datepicker__quarter-wrapper"},[1,2,3,4].map(function(d,f){return Y.createElement("div",{key:f,ref:r.QUARTER_REFS[f],role:"option",onClick:function(p){r.onQuarterClick(p,d)},onKeyDown:function(p){r.onQuarterKeyDown(p,d)},onMouseEnter:function(){return r.onQuarterMouseEnter(d)},className:r.getQuarterClassNames(d),"aria-selected":r.isSelectedQuarter(l,d,c),tabIndex:r.getQuarterTabIndex(d),"aria-current":r.isCurrentQuarter(l,d)?"date":void 0},r.getQuarterContent(d))}))}),Q(te(r),"getClassNames",function(){var s=r.props,l=s.selectingDate,c=s.selectsStart,d=s.selectsEnd,f=s.showMonthYearPicker,p=s.showQuarterYearPicker;return Qe("react-datepicker__month",{"react-datepicker__month--selecting-range":l&&(c||d)},{"react-datepicker__monthPicker":f},{"react-datepicker__quarterPicker":p})}),r}return In(n,[{key:"render",value:function(){var r=this.props,i=r.showMonthYearPicker,o=r.showQuarterYearPicker,a=r.day,s=r.ariaLabelPrefix,l=s===void 0?"month ":s;return Y.createElement("div",{className:this.getClassNames(),onMouseLeave:this.handleMouseLeave,"aria-label":"".concat(l," ").concat(Bt(a,"yyyy-MM")),role:"listbox"},i?this.renderMonths():o?this.renderQuarters():this.renderWeeks())}}]),n}(),JF=function(e){Fn(n,Y.Component);var t=$n(n);function n(){var r;Dn(this,n);for(var i=arguments.length,o=new Array(i),a=0;a0&&arguments[0]!==void 0?arguments[0]:{}).className||"").split(/\s+/);return Tve.some(function(s){return a.indexOf(s)>=0})})(o.target)&&i.props.onDropdownFocus()}),Q(te(i),"getDateInView",function(){var o=i.props,a=o.preSelection,s=o.selected,l=o.openToDate,c=qF(i.props),d=ZF(i.props),f=Ot(),p=l||s||a;return p||(c&&Ui(f,c)?c:d&&us(f,d)?d:f)}),Q(te(i),"increaseMonth",function(){i.setState(function(o){var a=o.date;return{date:bi(a,1)}},function(){return i.handleMonthChange(i.state.date)})}),Q(te(i),"decreaseMonth",function(){i.setState(function(o){var a=o.date;return{date:Cu(a,1)}},function(){return i.handleMonthChange(i.state.date)})}),Q(te(i),"handleDayClick",function(o,a,s){i.props.onSelect(o,a,s),i.props.setPreSelection&&i.props.setPreSelection(o)}),Q(te(i),"handleDayMouseEnter",function(o){i.setState({selectingDate:o}),i.props.onDayMouseEnter&&i.props.onDayMouseEnter(o)}),Q(te(i),"handleMonthMouseLeave",function(){i.setState({selectingDate:null}),i.props.onMonthMouseLeave&&i.props.onMonthMouseLeave()}),Q(te(i),"handleYearMouseEnter",function(o,a){i.setState({selectingDate:Io(Ot(),a)}),i.props.onYearMouseEnter&&i.props.onYearMouseEnter(o,a)}),Q(te(i),"handleYearMouseLeave",function(o,a){i.props.onYearMouseLeave&&i.props.onYearMouseLeave(o,a)}),Q(te(i),"handleYearChange",function(o){i.props.onYearChange&&(i.props.onYearChange(o),i.setState({isRenderAriaLiveMessage:!0})),i.props.adjustDateOnChange&&(i.props.onSelect&&i.props.onSelect(o),i.props.setOpen&&i.props.setOpen(!0)),i.props.setPreSelection&&i.props.setPreSelection(o)}),Q(te(i),"handleMonthChange",function(o){i.handleCustomMonthChange(o),i.props.adjustDateOnChange&&(i.props.onSelect&&i.props.onSelect(o),i.props.setOpen&&i.props.setOpen(!0)),i.props.setPreSelection&&i.props.setPreSelection(o)}),Q(te(i),"handleCustomMonthChange",function(o){i.props.onMonthChange&&(i.props.onMonthChange(o),i.setState({isRenderAriaLiveMessage:!0}))}),Q(te(i),"handleMonthYearChange",function(o){i.handleYearChange(o),i.handleMonthChange(o)}),Q(te(i),"changeYear",function(o){i.setState(function(a){var s=a.date;return{date:Io(s,o)}},function(){return i.handleYearChange(i.state.date)})}),Q(te(i),"changeMonth",function(o){i.setState(function(a){var s=a.date;return{date:pr(s,o)}},function(){return i.handleMonthChange(i.state.date)})}),Q(te(i),"changeMonthYear",function(o){i.setState(function(a){var s=a.date;return{date:Io(pr(s,rr(o)),et(o))}},function(){return i.handleMonthYearChange(i.state.date)})}),Q(te(i),"header",function(){var o=$T(arguments.length>0&&arguments[0]!==void 0?arguments[0]:i.state.date,i.props.locale,i.props.calendarStartDay),a=[];return i.props.showWeekNumbers&&a.push(Y.createElement("div",{key:"W",className:"react-datepicker__day-name"},i.props.weekLabel||"#")),a.concat([0,1,2,3,4,5,6].map(function(s){var l=$l(o,s),c=i.formatWeekday(l,i.props.locale),d=i.props.weekDayClassName?i.props.weekDayClassName(l):void 0;return Y.createElement("div",{key:s,className:Qe("react-datepicker__day-name",d)},c)}))}),Q(te(i),"formatWeekday",function(o,a){return i.props.formatWeekDay?function(s,l,c){return l(Bt(s,"EEEE",c))}(o,i.props.formatWeekDay,a):i.props.useWeekdaysShort?function(s,l){return Bt(s,"EEE",l)}(o,a):function(s,l){return Bt(s,"EEEEEE",l)}(o,a)}),Q(te(i),"decreaseYear",function(){i.setState(function(o){var a=o.date;return{date:wh(a,i.props.showYearPicker?i.props.yearItemNumber:1)}},function(){return i.handleYearChange(i.state.date)})}),Q(te(i),"clearSelectingDate",function(){i.setState({selectingDate:null})}),Q(te(i),"renderPreviousButton",function(){if(!i.props.renderCustomHeader){var o;switch(!0){case i.props.showMonthYearPicker:o=PN(i.state.date,i.props);break;case i.props.showYearPicker:o=function(_){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},S=w.minDate,E=w.yearItemNumber,O=E===void 0?Tf:E,k=Dc(Yd(wh(_,O)),O).endPeriod,j=S&&et(S);return j&&j>k||!1}(i.state.date,i.props);break;default:o=CN(i.state.date,i.props)}if((i.props.forceShowMonthNavigation||i.props.showDisabledMonthNavigation||!o)&&!i.props.showTimeSelectOnly){var a=["react-datepicker__navigation","react-datepicker__navigation--previous"],s=i.decreaseMonth;(i.props.showMonthYearPicker||i.props.showQuarterYearPicker||i.props.showYearPicker)&&(s=i.decreaseYear),o&&i.props.showDisabledMonthNavigation&&(a.push("react-datepicker__navigation--previous--disabled"),s=null);var l=i.props.showMonthYearPicker||i.props.showQuarterYearPicker||i.props.showYearPicker,c=i.props,d=c.previousMonthButtonLabel,f=c.previousYearButtonLabel,p=i.props,m=p.previousMonthAriaLabel,v=m===void 0?typeof d=="string"?d:"Previous Month":m,y=p.previousYearAriaLabel,x=y===void 0?typeof f=="string"?f:"Previous Year":y;return Y.createElement("button",{type:"button",className:a.join(" "),onClick:s,onKeyDown:i.props.handleOnKeyDown,"aria-label":l?x:v},Y.createElement("span",{className:["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"].join(" ")},l?i.props.previousYearButtonLabel:i.props.previousMonthButtonLabel))}}}),Q(te(i),"increaseYear",function(){i.setState(function(o){var a=o.date;return{date:Su(a,i.props.showYearPicker?i.props.yearItemNumber:1)}},function(){return i.handleYearChange(i.state.date)})}),Q(te(i),"renderNextButton",function(){if(!i.props.renderCustomHeader){var o;switch(!0){case i.props.showMonthYearPicker:o=LN(i.state.date,i.props);break;case i.props.showYearPicker:o=function(_){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},S=w.maxDate,E=w.yearItemNumber,O=E===void 0?Tf:E,k=Dc(Su(_,O),O).startPeriod,j=S&&et(S);return j&&j0&&arguments[0]!==void 0?arguments[0]:i.state.date,a=["react-datepicker__current-month"];return i.props.showYearDropdown&&a.push("react-datepicker__current-month--hasYearDropdown"),i.props.showMonthDropdown&&a.push("react-datepicker__current-month--hasMonthDropdown"),i.props.showMonthYearDropdown&&a.push("react-datepicker__current-month--hasMonthYearDropdown"),Y.createElement("div",{className:a.join(" ")},Bt(o,i.props.dateFormat,i.props.locale))}),Q(te(i),"renderYearDropdown",function(){var o=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(i.props.showYearDropdown&&!o)return Y.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:et(i.state.date),scrollableYearDropdown:i.props.scrollableYearDropdown,yearDropdownItemNumber:i.props.yearDropdownItemNumber})}),Q(te(i),"renderMonthDropdown",function(){var o=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(i.props.showMonthDropdown&&!o)return Y.createElement(pve,{dropdownMode:i.props.dropdownMode,locale:i.props.locale,onChange:i.changeMonth,month:rr(i.state.date),useShortMonthInDropdown:i.props.useShortMonthInDropdown})}),Q(te(i),"renderMonthYearDropdown",function(){var o=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(i.props.showMonthYearDropdown&&!o)return Y.createElement(vve,{dropdownMode:i.props.dropdownMode,locale:i.props.locale,dateFormat:i.props.dateFormat,onChange:i.changeMonthYear,minDate:i.props.minDate,maxDate:i.props.maxDate,date:i.state.date,scrollableMonthYearDropdown:i.props.scrollableMonthYearDropdown})}),Q(te(i),"handleTodayButtonClick",function(o){i.props.onSelect(SN(),o),i.props.setPreSelection&&i.props.setPreSelection(SN())}),Q(te(i),"renderTodayButton",function(){if(i.props.todayButton&&!i.props.showTimeSelectOnly)return Y.createElement("div",{className:"react-datepicker__today-button",onClick:function(o){return i.handleTodayButtonClick(o)}},i.props.todayButton)}),Q(te(i),"renderDefaultHeader",function(o){var a=o.monthDate,s=o.i;return Y.createElement("div",{className:"react-datepicker__header ".concat(i.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},i.renderCurrentMonth(a),Y.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(i.props.dropdownMode),onFocus:i.handleDropdownFocus},i.renderMonthDropdown(s!==0),i.renderMonthYearDropdown(s!==0),i.renderYearDropdown(s!==0)),Y.createElement("div",{className:"react-datepicker__day-names"},i.header(a)))}),Q(te(i),"renderCustomHeader",function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=o.monthDate,s=o.i;if(i.props.showTimeSelect&&!i.state.monthContainer||i.props.showTimeSelectOnly)return null;var l=CN(i.state.date,i.props),c=kN(i.state.date,i.props),d=PN(i.state.date,i.props),f=LN(i.state.date,i.props),p=!i.props.showMonthYearPicker&&!i.props.showQuarterYearPicker&&!i.props.showYearPicker;return Y.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:i.props.onDropdownFocus},i.props.renderCustomHeader(oy(oy({},i.state),{},{customHeaderCount:s,monthDate:a,changeMonth:i.changeMonth,changeYear:i.changeYear,decreaseMonth:i.decreaseMonth,increaseMonth:i.increaseMonth,decreaseYear:i.decreaseYear,increaseYear:i.increaseYear,prevMonthButtonDisabled:l,nextMonthButtonDisabled:c,prevYearButtonDisabled:d,nextYearButtonDisabled:f})),p&&Y.createElement("div",{className:"react-datepicker__day-names"},i.header(a)))}),Q(te(i),"renderYearHeader",function(){var o=i.state.date,a=i.props,s=a.showYearPicker,l=Dc(o,a.yearItemNumber),c=l.startPeriod,d=l.endPeriod;return Y.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},s?"".concat(c," - ").concat(d):et(o))}),Q(te(i),"renderHeader",function(o){switch(!0){case i.props.renderCustomHeader!==void 0:return i.renderCustomHeader(o);case(i.props.showMonthYearPicker||i.props.showQuarterYearPicker||i.props.showYearPicker):return i.renderYearHeader(o);default:return i.renderDefaultHeader(o)}}),Q(te(i),"renderMonths",function(){var o;if(!i.props.showTimeSelectOnly&&!i.props.showYearPicker){for(var a=[],s=i.props.showPreviousMonths?i.props.monthsShown-1:0,l=Cu(i.state.date,s),c=(o=i.props.monthSelectedIn)!==null&&o!==void 0?o:s,d=0;d0;a.push(Y.createElement("div",{key:p,ref:function(y){i.monthContainer=y},className:"react-datepicker__month-container"},i.renderHeader({monthDate:f,i:d}),Y.createElement(wve,{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:d,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,holidays:i.props.holidays,selectingDate:i.state.selectingDate,includeDates:i.props.includeDates,includeDateIntervals:i.props.includeDateIntervals,inline:i.props.inline,shouldFocusDayInline:i.props.shouldFocusDayInline,fixedHeight:i.props.fixedHeight,filterDate:i.props.filterDate,preSelection:i.props.preSelection,setPreSelection:i.props.setPreSelection,selected:i.props.selected,selectsStart:i.props.selectsStart,selectsEnd:i.props.selectsEnd,selectsRange:i.props.selectsRange,selectsDisabledDaysInRange:i.props.selectsDisabledDaysInRange,showWeekNumbers:i.props.showWeekNumbers,startDate:i.props.startDate,endDate:i.props.endDate,peekNextMonth:i.props.peekNextMonth,setOpen:i.props.setOpen,shouldCloseOnSelect:i.props.shouldCloseOnSelect,renderDayContents:i.props.renderDayContents,renderMonthContent:i.props.renderMonthContent,renderQuarterContent:i.props.renderQuarterContent,renderYearContent:i.props.renderYearContent,disabledKeyboardNavigation:i.props.disabledKeyboardNavigation,showMonthYearPicker:i.props.showMonthYearPicker,showFullMonthYearPicker:i.props.showFullMonthYearPicker,showTwoColumnMonthYearPicker:i.props.showTwoColumnMonthYearPicker,showFourColumnMonthYearPicker:i.props.showFourColumnMonthYearPicker,showYearPicker:i.props.showYearPicker,showQuarterYearPicker:i.props.showQuarterYearPicker,isInputFocused:i.props.isInputFocused,containerRef:i.containerRef,monthShowsDuplicateDaysEnd:m,monthShowsDuplicateDaysStart:v})))}return a}}),Q(te(i),"renderYears",function(){if(!i.props.showTimeSelectOnly)return i.props.showYearPicker?Y.createElement("div",{className:"react-datepicker__year--container"},i.renderHeader(),Y.createElement(xve,Th({onDayClick:i.handleDayClick,selectingDate:i.state.selectingDate,clearSelectingDate:i.clearSelectingDate,date:i.state.date},i.props,{onYearMouseEnter:i.handleYearMouseEnter,onYearMouseLeave:i.handleYearMouseLeave}))):void 0}),Q(te(i),"renderTimeSection",function(){if(i.props.showTimeSelect&&(i.state.monthContainer||i.props.showTimeSelectOnly))return Y.createElement(JF,{selected:i.props.selected,openToDate:i.props.openToDate,onChange:i.props.onTimeChange,timeClassName:i.props.timeClassName,format:i.props.timeFormat,includeTimes:i.props.includeTimes,intervals:i.props.timeIntervals,minTime:i.props.minTime,maxTime:i.props.maxTime,excludeTimes:i.props.excludeTimes,filterTime:i.props.filterTime,timeCaption:i.props.timeCaption,todayButton:i.props.todayButton,showMonthDropdown:i.props.showMonthDropdown,showMonthYearDropdown:i.props.showMonthYearDropdown,showYearDropdown:i.props.showYearDropdown,withPortal:i.props.withPortal,monthRef:i.state.monthContainer,injectTimes:i.props.injectTimes,locale:i.props.locale,handleOnKeyDown:i.props.handleOnKeyDown,showTimeSelectOnly:i.props.showTimeSelectOnly})}),Q(te(i),"renderInputTimeSection",function(){var o=new Date(i.props.selected),a=ka(o)&&i.props.selected?"".concat(MN(o.getHours()),":").concat(MN(o.getMinutes())):"";if(i.props.showTimeInput)return Y.createElement(Sve,{date:o,timeString:a,timeInputLabel:i.props.timeInputLabel,onChange:i.props.onTimeChange,customTimeInput:i.props.customTimeInput})}),Q(te(i),"renderAriaLiveRegion",function(){var o,a=Dc(i.state.date,i.props.yearItemNumber),s=a.startPeriod,l=a.endPeriod;return o=i.props.showYearPicker?"".concat(s," - ").concat(l):i.props.showMonthYearPicker||i.props.showQuarterYearPicker?et(i.state.date):"".concat(UT(rr(i.state.date),i.props.locale)," ").concat(et(i.state.date)),Y.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},i.state.isRenderAriaLiveMessage&&o)}),Q(te(i),"renderChildren",function(){if(i.props.children)return Y.createElement("div",{className:"react-datepicker__children-container"},i.props.children)}),i.containerRef=Y.createRef(),i.state={date:i.getDateInView(),selectingDate:null,monthContainer:null,isRenderAriaLiveMessage:!1},i}return In(n,[{key:"componentDidMount",value:function(){var r=this;this.props.showTimeSelect&&(this.assignMonthContainer=void r.setState({monthContainer:r.monthContainer}))}},{key:"componentDidUpdate",value:function(r){var i=this;if(!this.props.preSelection||mr(this.props.preSelection,r.preSelection)&&this.props.monthSelectedIn===r.monthSelectedIn)this.props.openToDate&&!mr(this.props.openToDate,r.openToDate)&&this.setState({date:this.props.openToDate});else{var o=!Ri(this.state.date,this.props.preSelection);this.setState({date:this.props.preSelection},function(){return o&&i.handleCustomMonthChange(i.state.date)})}}},{key:"render",value:function(){var r=this.props.container||Eve;return Y.createElement("div",{ref:this.containerRef},Y.createElement(r,{className:Qe("react-datepicker",this.props.className,{"react-datepicker--time-only":this.props.showTimeSelectOnly}),showPopperArrow:this.props.showPopperArrow,arrowProps:this.props.arrowProps},this.renderAriaLiveRegion(),this.renderPreviousButton(),this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.renderChildren()))}}],[{key:"defaultProps",get:function(){return{onDropdownFocus:function(){},monthsShown:1,forceShowMonthNavigation:!1,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",customTimeInput:null,yearItemNumber:Tf}}}]),n}(),e$=function(e){Fn(n,Y.Component);var t=$n(n);function n(r){var i;return Dn(this,n),(i=t.call(this,r)).el=document.createElement("div"),i}return In(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 nl.createPortal(this.props.children,this.el)}}]),n}(),Cve=function(e){return!e.disabled&&e.tabIndex!==-1},t$=function(e){Fn(n,Y.Component);var t=$n(n);function n(r){var i;return Dn(this,n),Q(te(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(Cve)}),Q(te(i),"handleFocusStart",function(){var o=i.getTabChildren();o&&o.length>1&&o[o.length-1].focus()}),Q(te(i),"handleFocusEnd",function(){var o=i.getTabChildren();o&&o.length>1&&o[0].focus()}),i.tabLoopRef=Y.createRef(),i}return In(n,[{key:"render",value:function(){return this.props.enableTabLoop?Y.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},Y.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:"0",onFocus:this.handleFocusStart}),this.props.children,Y.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:"0",onFocus:this.handleFocusEnd})):this.props.children}}],[{key:"defaultProps",get:function(){return{enableTabLoop:!0}}}]),n}(),kve=function(e){Fn(n,Y.Component);var t=$n(n);function n(){return Dn(this,n),t.apply(this,arguments)}return In(n,[{key:"render",value:function(){var r,i=this.props,o=i.className,a=i.wrapperClassName,s=i.hidePopper,l=i.popperComponent,c=i.popperModifiers,d=i.popperPlacement,f=i.popperProps,p=i.targetComponent,m=i.enableTabLoop,v=i.popperOnKeyDown,y=i.portalId,x=i.portalHost;if(!s){var _=Qe("react-datepicker-popper",o);r=Y.createElement(eve,Th({modifiers:c,placement:d},f),function(S){var E=S.ref,O=S.style,k=S.placement,j=S.arrowProps;return Y.createElement(t$,{enableTabLoop:m},Y.createElement("div",{ref:E,style:O,className:_,"data-placement":k,onKeyDown:v},Y.cloneElement(l,{arrowProps:j})))})}this.props.popperContainer&&(r=Y.createElement(this.props.popperContainer,{},r)),y&&!s&&(r=Y.createElement(e$,{portalId:y,portalHost:x},r));var w=Qe("react-datepicker-wrapper",a);return Y.createElement(Dme,{className:"react-datepicker-manager"},Y.createElement(ive,null,function(S){var E=S.ref;return Y.createElement("div",{ref:E,className:w},p)}),r)}}],[{key:"defaultProps",get:function(){return{hidePopper:!0,popperModifiers:[],popperProps:{},popperPlacement:"bottom-start"}}}]),n}(),AN="react-datepicker-ignore-onclickoutside",Pve=E0(Ove),Ib="Date input not valid.",Lve=function(e){Fn(n,Y.Component);var t=$n(n);function n(r){var i;return Dn(this,n),Q(te(i=t.call(this,r)),"getPreSelection",function(){return i.props.openToDate?i.props.openToDate:i.props.selectsEnd&&i.props.startDate?i.props.startDate:i.props.selectsStart&&i.props.endDate?i.props.endDate:Ot()}),Q(te(i),"calcInitialState",function(){var o,a,s=(o=i.props.holidays)===null||o===void 0?void 0:o.reduce(function(p,m){var v=new Date(m.date);return _h(v)?[].concat(Oh(p),[oy(oy({},m),{},{date:v})]):p},[]),l=i.getPreSelection(),c=qF(i.props),d=ZF(i.props),f=c&&Ui(l,Hr(c))?c:d&&us(l,El(d))?d:l;return{open:i.props.startOpen||!1,preventFocus:!1,preSelection:(a=i.props.selectsRange?i.props.startDate:i.props.selected)!==null&&a!==void 0?a:f,highlightDates:jN(i.props.highlightDates),holidays:lve(s),focused:!1,shouldFocusDayInline:!1,isRenderAriaLiveMessage:!1}}),Q(te(i),"clearPreventFocusTimeout",function(){i.preventFocusTimeout&&clearTimeout(i.preventFocusTimeout)}),Q(te(i),"setFocus",function(){i.input&&i.input.focus&&i.input.focus({preventScroll:!0})}),Q(te(i),"setBlur",function(){i.input&&i.input.blur&&i.input.blur(),i.cancelFocusInput()}),Q(te(i),"setOpen",function(o){var a=arguments.length>1&&arguments[1]!==void 0&&arguments[1];i.setState({open:o,preSelection:o&&i.state.open?i.state.preSelection:i.calcInitialState().preSelection,lastPreSelectChange:Fb},function(){o||i.setState(function(s){return{focused:!!a&&s.focused}},function(){!a&&i.setBlur(),i.setState({inputValue:null})})})}),Q(te(i),"inputOk",function(){return w0(i.state.preSelection)}),Q(te(i),"isCalendarOpen",function(){return i.props.open===void 0?i.state.open&&!i.props.disabled&&!i.props.readOnly:i.props.open}),Q(te(i),"handleFocus",function(o){i.state.preventFocus||(i.props.onFocus(o),i.props.preventOpenOnFocus||i.props.readOnly||i.setOpen(!0)),i.setState({focused:!0})}),Q(te(i),"cancelFocusInput",function(){clearTimeout(i.inputFocusTimeout),i.inputFocusTimeout=null}),Q(te(i),"deferFocusInput",function(){i.cancelFocusInput(),i.inputFocusTimeout=setTimeout(function(){return i.setFocus()},1)}),Q(te(i),"handleDropdownFocus",function(){i.cancelFocusInput()}),Q(te(i),"handleBlur",function(o){(!i.state.open||i.props.withPortal||i.props.showTimeInput)&&i.props.onBlur(o),i.setState({focused:!1})}),Q(te(i),"handleCalendarClickOutside",function(o){i.props.inline||i.setOpen(!1),i.props.onClickOutside(o),i.props.withPortal&&o.preventDefault()}),Q(te(i),"handleChange",function(){for(var o=arguments.length,a=new Array(o),s=0;s0&&(v=Eb(c,d.slice(0,c.length),new Date)),ka(v)||(v=new Date(c))),ka(v)&&x?v:null));i.props.showTimeSelectOnly&&i.props.selected&&!mr(_,i.props.selected)&&(_=Dhe(i.props.selected,_==null?{hours:Fi(i.props.selected),minutes:$i(i.props.selected),seconds:Sb(i.props.selected)}:{hours:Fi(_),minutes:$i(_),seconds:Sb(_)})),!_&&l.target.value||i.setSelected(_,l,!0)}}),Q(te(i),"handleSelect",function(o,a,s){if(i.setState({preventFocus:!0},function(){return i.preventFocusTimeout=setTimeout(function(){return i.setState({preventFocus:!1})},50),i.preventFocusTimeout}),i.props.onChangeRaw&&i.props.onChangeRaw(a),i.setSelected(o,a,!1,s),i.props.showDateSelect&&i.setState({isRenderAriaLiveMessage:!0}),!i.props.shouldCloseOnSelect||i.props.showTimeSelect)i.setPreSelection(o);else if(!i.props.inline){i.props.selectsRange||i.setOpen(!1);var l=i.props,c=l.startDate,d=l.endDate;!c||d||Ui(o,c)||i.setOpen(!1)}}),Q(te(i),"setSelected",function(o,a,s,l){var c=o;if(i.props.showYearPicker){if(c!==null&&GF(et(c),i.props))return}else if(i.props.showMonthYearPicker){if(c!==null&&YF(c,i.props))return}else if(c!==null&&O0(c,i.props))return;var d=i.props,f=d.onChange,p=d.selectsRange,m=d.startDate,v=d.endDate;if(!Js(i.props.selected,c)||i.props.allowSameDay||p)if(c!==null&&(!i.props.selected||s&&(i.props.showTimeSelect||i.props.showTimeSelectOnly||i.props.showTimeInput)||(c=wN(c,{hour:Fi(i.props.selected),minute:$i(i.props.selected),second:Sb(i.props.selected)})),i.props.inline||i.setState({preSelection:c}),i.props.focusSelectedMonth||i.setState({monthSelectedIn:l})),p){var y=m&&!v,x=m&&v;!m&&!v?f([c,null],a):y&&(Ui(c,m)?f([c,null],a):f([m,c],a)),x&&f([c,null],a)}else f(c,a);s||(i.props.onSelect(c,a),i.setState({inputValue:null}))}),Q(te(i),"setPreSelection",function(o){var a=i.props.minDate!==void 0,s=i.props.maxDate!==void 0,l=!0;if(o){var c=Hr(o);if(a&&s)l=Eg(o,i.props.minDate,i.props.maxDate);else if(a){var d=Hr(i.props.minDate);l=us(o,d)||Js(c,d)}else if(s){var f=El(i.props.maxDate);l=Ui(o,f)||Js(c,f)}}l&&i.setState({preSelection:o})}),Q(te(i),"handleTimeChange",function(o){var a=i.props.selected?i.props.selected:i.getPreSelection(),s=i.props.selected?o:wN(a,{hour:Fi(o),minute:$i(o)});i.setState({preSelection:s}),i.props.onChange(s),i.props.shouldCloseOnSelect&&i.setOpen(!1),i.props.showTimeInput&&i.setOpen(!0),(i.props.showTimeSelectOnly||i.props.showTimeSelect)&&i.setState({isRenderAriaLiveMessage:!0}),i.setState({inputValue:null})}),Q(te(i),"onInputClick",function(){i.props.disabled||i.props.readOnly||i.setOpen(!0),i.props.onInputClick()}),Q(te(i),"onInputKeyDown",function(o){i.props.onKeyDown(o);var a=o.key;if(i.state.open||i.props.inline||i.props.preventOpenOnFocus){if(i.state.open){if(a==="ArrowDown"||a==="ArrowUp"){o.preventDefault();var s=i.calendar.componentNode&&i.calendar.componentNode.querySelector('.react-datepicker__day[tabindex="0"]');return void(s&&s.focus({preventScroll:!0}))}var l=Ot(i.state.preSelection);a==="Enter"?(o.preventDefault(),i.inputOk()&&i.state.lastPreSelectChange===Fb?(i.handleSelect(l,o),!i.props.shouldCloseOnSelect&&i.setPreSelection(l)):i.setOpen(!1)):a==="Escape"?(o.preventDefault(),i.setOpen(!1)):a==="Tab"&&i.setOpen(!1),i.inputOk()||i.props.onInputError({code:1,msg:Ib})}}else a!=="ArrowDown"&&a!=="ArrowUp"&&a!=="Enter"||i.onInputClick()}),Q(te(i),"onPortalKeyDown",function(o){o.key==="Escape"&&(o.preventDefault(),i.setState({preventFocus:!0},function(){i.setOpen(!1),setTimeout(function(){i.setFocus(),i.setState({preventFocus:!1})})}))}),Q(te(i),"onDayKeyDown",function(o){i.props.onKeyDown(o);var a=o.key,s=Ot(i.state.preSelection);if(a==="Enter")o.preventDefault(),i.handleSelect(s,o),!i.props.shouldCloseOnSelect&&i.setPreSelection(s);else if(a==="Escape")o.preventDefault(),i.setOpen(!1),i.inputOk()||i.props.onInputError({code:1,msg:Ib});else if(!i.props.disabledKeyboardNavigation){var l;switch(a){case"ArrowLeft":l=xT(s,1);break;case"ArrowRight":l=$l(s,1);break;case"ArrowUp":l=$he(s,1);break;case"ArrowDown":l=hT(s,1);break;case"PageUp":l=Cu(s,1);break;case"PageDown":l=bi(s,1);break;case"Home":l=wh(s,1);break;case"End":l=Su(s,1)}if(!l)return void(i.props.onInputError&&i.props.onInputError({code:1,msg:Ib}));if(o.preventDefault(),i.setState({lastPreSelectChange:Fb}),i.props.adjustDateOnChange&&i.setSelected(l),i.setPreSelection(l),i.props.inline){var c=rr(s),d=rr(l),f=et(s),p=et(l);c!==d||f!==p?i.setState({shouldFocusDayInline:!0}):i.setState({shouldFocusDayInline:!1})}}}),Q(te(i),"onPopperKeyDown",function(o){o.key==="Escape"&&(o.preventDefault(),i.setState({preventFocus:!0},function(){i.setOpen(!1),setTimeout(function(){i.setFocus(),i.setState({preventFocus:!1})})}))}),Q(te(i),"onClearClick",function(o){o&&o.preventDefault&&o.preventDefault(),i.props.selectsRange?i.props.onChange([null,null],o):i.props.onChange(null,o),i.setState({inputValue:null})}),Q(te(i),"clear",function(){i.onClearClick()}),Q(te(i),"onScroll",function(o){typeof i.props.closeOnScroll=="boolean"&&i.props.closeOnScroll?o.target!==document&&o.target!==document.documentElement&&o.target!==document.body||i.setOpen(!1):typeof i.props.closeOnScroll=="function"&&i.props.closeOnScroll(o)&&i.setOpen(!1)}),Q(te(i),"renderCalendar",function(){return i.props.inline||i.isCalendarOpen()?Y.createElement(Pve,{ref:function(o){i.calendar=o},locale:i.props.locale,calendarStartDay:i.props.calendarStartDay,chooseDayAriaLabelPrefix:i.props.chooseDayAriaLabelPrefix,disabledDayAriaLabelPrefix:i.props.disabledDayAriaLabelPrefix,weekAriaLabelPrefix:i.props.weekAriaLabelPrefix,monthAriaLabelPrefix:i.props.monthAriaLabelPrefix,adjustDateOnChange:i.props.adjustDateOnChange,setOpen:i.setOpen,shouldCloseOnSelect:i.props.shouldCloseOnSelect,dateFormat:i.props.dateFormatCalendar,useWeekdaysShort:i.props.useWeekdaysShort,formatWeekDay:i.props.formatWeekDay,dropdownMode:i.props.dropdownMode,selected:i.props.selected,preSelection:i.state.preSelection,onSelect:i.handleSelect,onWeekSelect:i.props.onWeekSelect,openToDate:i.props.openToDate,minDate:i.props.minDate,maxDate:i.props.maxDate,selectsStart:i.props.selectsStart,selectsEnd:i.props.selectsEnd,selectsRange:i.props.selectsRange,startDate:i.props.startDate,endDate:i.props.endDate,excludeDates:i.props.excludeDates,excludeDateIntervals:i.props.excludeDateIntervals,filterDate:i.props.filterDate,onClickOutside:i.handleCalendarClickOutside,formatWeekNumber:i.props.formatWeekNumber,highlightDates:i.state.highlightDates,holidays:i.state.holidays,includeDates:i.props.includeDates,includeDateIntervals:i.props.includeDateIntervals,includeTimes:i.props.includeTimes,injectTimes:i.props.injectTimes,inline:i.props.inline,shouldFocusDayInline:i.state.shouldFocusDayInline,peekNextMonth:i.props.peekNextMonth,showMonthDropdown:i.props.showMonthDropdown,showPreviousMonths:i.props.showPreviousMonths,useShortMonthInDropdown:i.props.useShortMonthInDropdown,showMonthYearDropdown:i.props.showMonthYearDropdown,showWeekNumbers:i.props.showWeekNumbers,showYearDropdown:i.props.showYearDropdown,withPortal:i.props.withPortal,forceShowMonthNavigation:i.props.forceShowMonthNavigation,showDisabledMonthNavigation:i.props.showDisabledMonthNavigation,scrollableYearDropdown:i.props.scrollableYearDropdown,scrollableMonthYearDropdown:i.props.scrollableMonthYearDropdown,todayButton:i.props.todayButton,weekLabel:i.props.weekLabel,outsideClickIgnoreClass:AN,fixedHeight:i.props.fixedHeight,monthsShown:i.props.monthsShown,monthSelectedIn:i.state.monthSelectedIn,onDropdownFocus:i.handleDropdownFocus,onMonthChange:i.props.onMonthChange,onYearChange:i.props.onYearChange,dayClassName:i.props.dayClassName,weekDayClassName:i.props.weekDayClassName,monthClassName:i.props.monthClassName,timeClassName:i.props.timeClassName,showDateSelect:i.props.showDateSelect,showTimeSelect:i.props.showTimeSelect,showTimeSelectOnly:i.props.showTimeSelectOnly,onTimeChange:i.handleTimeChange,timeFormat:i.props.timeFormat,timeIntervals:i.props.timeIntervals,minTime:i.props.minTime,maxTime:i.props.maxTime,excludeTimes:i.props.excludeTimes,filterTime:i.props.filterTime,timeCaption:i.props.timeCaption,className:i.props.calendarClassName,container:i.props.calendarContainer,yearItemNumber:i.props.yearItemNumber,yearDropdownItemNumber:i.props.yearDropdownItemNumber,previousMonthAriaLabel:i.props.previousMonthAriaLabel,previousMonthButtonLabel:i.props.previousMonthButtonLabel,nextMonthAriaLabel:i.props.nextMonthAriaLabel,nextMonthButtonLabel:i.props.nextMonthButtonLabel,previousYearAriaLabel:i.props.previousYearAriaLabel,previousYearButtonLabel:i.props.previousYearButtonLabel,nextYearAriaLabel:i.props.nextYearAriaLabel,nextYearButtonLabel:i.props.nextYearButtonLabel,timeInputLabel:i.props.timeInputLabel,disabledKeyboardNavigation:i.props.disabledKeyboardNavigation,renderCustomHeader:i.props.renderCustomHeader,popperProps:i.props.popperProps,renderDayContents:i.props.renderDayContents,renderMonthContent:i.props.renderMonthContent,renderQuarterContent:i.props.renderQuarterContent,renderYearContent:i.props.renderYearContent,onDayMouseEnter:i.props.onDayMouseEnter,onMonthMouseLeave:i.props.onMonthMouseLeave,onYearMouseEnter:i.props.onYearMouseEnter,onYearMouseLeave:i.props.onYearMouseLeave,selectsDisabledDaysInRange:i.props.selectsDisabledDaysInRange,showTimeInput:i.props.showTimeInput,showMonthYearPicker:i.props.showMonthYearPicker,showFullMonthYearPicker:i.props.showFullMonthYearPicker,showTwoColumnMonthYearPicker:i.props.showTwoColumnMonthYearPicker,showFourColumnMonthYearPicker:i.props.showFourColumnMonthYearPicker,showYearPicker:i.props.showYearPicker,showQuarterYearPicker:i.props.showQuarterYearPicker,showPopperArrow:i.props.showPopperArrow,excludeScrollbar:i.props.excludeScrollbar,handleOnKeyDown:i.props.onKeyDown,handleOnDayKeyDown:i.onDayKeyDown,isInputFocused:i.state.focused,customTimeInput:i.props.customTimeInput,setPreSelection:i.setPreSelection},i.props.children):null}),Q(te(i),"renderAriaLiveRegion",function(){var o,a=i.props,s=a.dateFormat,l=a.locale,c=i.props.showTimeInput||i.props.showTimeSelect?"PPPPp":"PPPP";return o=i.props.selectsRange?"Selected start date: ".concat(no(i.props.startDate,{dateFormat:c,locale:l}),". ").concat(i.props.endDate?"End date: "+no(i.props.endDate,{dateFormat:c,locale:l}):""):i.props.showTimeSelectOnly?"Selected time: ".concat(no(i.props.selected,{dateFormat:s,locale:l})):i.props.showYearPicker?"Selected year: ".concat(no(i.props.selected,{dateFormat:"yyyy",locale:l})):i.props.showMonthYearPicker?"Selected month: ".concat(no(i.props.selected,{dateFormat:"MMMM yyyy",locale:l})):i.props.showQuarterYearPicker?"Selected quarter: ".concat(no(i.props.selected,{dateFormat:"yyyy, QQQ",locale:l})):"Selected date: ".concat(no(i.props.selected,{dateFormat:c,locale:l})),Y.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},o)}),Q(te(i),"renderDateInput",function(){var o,a=Qe(i.props.className,Q({},AN,i.state.open)),s=i.props.customInput||Y.createElement("input",{type:"text"}),l=i.props.customInputRef||"ref",c=typeof i.props.value=="string"?i.props.value:typeof i.state.inputValue=="string"?i.state.inputValue:i.props.selectsRange?function(d,f,p){if(!d)return"";var m=no(d,p),v=f?no(f,p):"";return"".concat(m," - ").concat(v)}(i.props.startDate,i.props.endDate,i.props):no(i.props.selected,i.props);return Y.cloneElement(s,(Q(o={},l,function(d){i.input=d}),Q(o,"value",c),Q(o,"onBlur",i.handleBlur),Q(o,"onChange",i.handleChange),Q(o,"onClick",i.onInputClick),Q(o,"onFocus",i.handleFocus),Q(o,"onKeyDown",i.onInputKeyDown),Q(o,"id",i.props.id),Q(o,"name",i.props.name),Q(o,"form",i.props.form),Q(o,"autoFocus",i.props.autoFocus),Q(o,"placeholder",i.props.placeholderText),Q(o,"disabled",i.props.disabled),Q(o,"autoComplete",i.props.autoComplete),Q(o,"className",Qe(s.props.className,a)),Q(o,"title",i.props.title),Q(o,"readOnly",i.props.readOnly),Q(o,"required",i.props.required),Q(o,"tabIndex",i.props.tabIndex),Q(o,"aria-describedby",i.props.ariaDescribedBy),Q(o,"aria-invalid",i.props.ariaInvalid),Q(o,"aria-labelledby",i.props.ariaLabelledBy),Q(o,"aria-required",i.props.ariaRequired),o))}),Q(te(i),"renderClearButton",function(){var o=i.props,a=o.isClearable,s=o.selected,l=o.startDate,c=o.endDate,d=o.clearButtonTitle,f=o.clearButtonClassName,p=f===void 0?"":f,m=o.ariaLabelClose,v=m===void 0?"Close":m;return!a||s==null&&l==null&&c==null?null:Y.createElement("button",{type:"button",className:"react-datepicker__close-icon ".concat(p).trim(),"aria-label":v,onClick:i.onClearClick,title:d,tabIndex:-1})}),i.state=i.calcInitialState(),i}return In(n,[{key:"componentDidMount",value:function(){window.addEventListener("scroll",this.onScroll,!0)}},{key:"componentDidUpdate",value:function(r,i){var o,a;r.inline&&(o=r.selected,a=this.props.selected,o&&a?rr(o)!==rr(a)||et(o)!==et(a):o!==a)&&this.setPreSelection(this.props.selected),this.state.monthSelectedIn!==void 0&&r.monthsShown!==this.props.monthsShown&&this.setState({monthSelectedIn:0}),r.highlightDates!==this.props.highlightDates&&this.setState({highlightDates:jN(this.props.highlightDates)}),i.focused||Js(r.selected,this.props.selected)||this.setState({inputValue:null}),i.open!==this.state.open&&(i.open===!1&&this.state.open===!0&&this.props.onCalendarOpen(),i.open===!0&&this.state.open===!1&&this.props.onCalendarClose())}},{key:"componentWillUnmount",value:function(){this.clearPreventFocusTimeout(),window.removeEventListener("scroll",this.onScroll,!0)}},{key:"renderInputContainer",value:function(){var r=this.props.showIcon;return Y.createElement("div",{className:"react-datepicker__input-container".concat(r?" react-datepicker__view-calendar-icon":"")},r&&Y.createElement("svg",{className:"react-datepicker__calendar-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},Y.createElement("path",{d:"M96 32V64H48C21.5 64 0 85.5 0 112v48H448V112c0-26.5-21.5-48-48-48H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V64H160V32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192H0V464c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V192z"})),this.state.isRenderAriaLiveMessage&&this.renderAriaLiveRegion(),this.renderDateInput(),this.renderClearButton())}},{key:"render",value:function(){var r=this.renderCalendar();if(this.props.inline)return r;if(this.props.withPortal){var i=this.state.open?Y.createElement(t$,{enableTabLoop:this.props.enableTabLoop},Y.createElement("div",{className:"react-datepicker__portal",tabIndex:-1,onKeyDown:this.onPortalKeyDown},r)):null;return this.state.open&&this.props.portalId&&(i=Y.createElement(e$,{portalId:this.props.portalId,portalHost:this.props.portalHost},i)),Y.createElement("div",null,this.renderInputContainer(),i)}return Y.createElement(kve,{className:this.props.popperClassName,wrapperClassName:this.props.wrapperClassName,hidePopper:!this.isCalendarOpen(),portalId:this.props.portalId,portalHost:this.props.portalHost,popperModifiers:this.props.popperModifiers,targetComponent:this.renderInputContainer(),popperContainer:this.props.popperContainer,popperComponent:r,popperPlacement:this.props.popperPlacement,popperProps:this.props.popperProps,popperOnKeyDown:this.onPopperKeyDown,enableTabLoop:this.props.enableTabLoop})}}],[{key:"defaultProps",get:function(){return{allowSameDay:!1,dateFormat:"MM/dd/yyyy",dateFormatCalendar:"LLLL yyyy",onChange:function(){},disabled:!1,disabledKeyboardNavigation:!1,dropdownMode:"scroll",onFocus:function(){},onBlur:function(){},onKeyDown:function(){},onInputClick:function(){},onSelect:function(){},onClickOutside:function(){},onMonthChange:function(){},onCalendarOpen:function(){},onCalendarClose:function(){},preventOpenOnFocus:!1,onYearChange:function(){},onInputError:function(){},monthsShown:1,readOnly:!1,withPortal:!1,selectsDisabledDaysInRange:!1,shouldCloseOnSelect:!0,showTimeSelect:!1,showTimeInput:!1,showPreviousMonths:!1,showMonthYearPicker:!1,showFullMonthYearPicker:!1,showTwoColumnMonthYearPicker:!1,showFourColumnMonthYearPicker:!1,showYearPicker:!1,showQuarterYearPicker:!1,strictParsing:!1,timeIntervals:30,timeCaption:"Time",previousMonthAriaLabel:"Previous Month",previousMonthButtonLabel:"Previous Month",nextMonthAriaLabel:"Next Month",nextMonthButtonLabel:"Next Month",previousYearAriaLabel:"Previous Year",previousYearButtonLabel:"Previous Year",nextYearAriaLabel:"Next Year",nextYearButtonLabel:"Next Year",timeInputLabel:"Time",enableTabLoop:!0,yearItemNumber:Tf,focusSelectedMonth:!1,showPopperArrow:!0,excludeScrollbar:!0,customTimeInput:null,calendarStartDay:void 0}}}]),n}(),jve="input",Fb="navigate";const v2=e=>{const{className:t,isClearable:n,selected:r,dateFormat:i}=e,o=!n||!r,a=I.useRef();return g.jsxs("div",{className:"icon-input-container",children:[g.jsx(Lve,{...e,popperModifiers:[{name:"arrow",options:{padding:24}}],dateFormat:i??K8,className:Qe("icon-input-container__input form-control",t),ref:a}),o&&g.jsx(Ne,{icon:lre,className:"icon-input-container__icon",onClick:()=>{var s;return(s=a.current)==null?void 0:s.input.focus()}})]})},Mve=e=>g.jsx(v2,{...e,dateFormat:ST,showTimeSelect:!0,timeIntervals:10}),$b=({children:e,infoTooltip:t,checked:n,onChange:r})=>g.jsxs("p",{children:[g.jsx(m6,{inline:!0,checked:n,className:t?"me-2":"",onChange:r,children:e}),t&&g.jsx(wg,{placement:"right",children:t})]}),Nve=({isOpen:e,toggle:t})=>g.jsxs(ua,{isOpen:e,toggle:t,centered:!0,size:"lg",children:[g.jsx(da,{toggle:t,children:"Info"}),g.jsxs(Eo,{children:[g.jsxs("p",{children:["When the ",g.jsx("b",{children:g.jsx("i",{children:'"Use existing URL if found"'})})," checkbox is checked, the server will return an existing short URL if it matches provided params."]}),g.jsx("p",{children:"These are the checks performed by Shlink in order to determine if an existing short URL should be returned:"}),g.jsxs("ul",{children:[g.jsx("li",{children:"When only the long URL is provided: The most recent match will be returned, or a new short URL will be created if none is found."}),g.jsxs("li",{children:["When long URL and custom slug and/or domain are provided: Same as in previous case, but it will try to match the short URL using both the long URL and the slug, the long URL and the domain, or the three of them.",g.jsx("br",{}),"If the slug is being used by another long URL, an error will be returned."]}),g.jsx("li",{children:"When other params are provided: Same as in previous cases, but it will try to match existing short URLs with all provided data. If any of them does not match, a new short URL will be created"})]})]})]}),Rve=()=>{const[e,t]=Sn();return g.jsxs(g.Fragment,{children:[g.jsx(xh,{className:"p-0",title:"What does this mean?",onClick:t,children:g.jsx(Ne,{icon:BS})}),g.jsx(Nve,{isOpen:e,toggle:t})]})},Ub=e=>typeof e=="string"?ra(e):e,Ave=e=>"shortCodeLength"in e&&"customSlug"in e&&"domain"in e,n$=({mode:e,saving:t,onSave:n,initialState:r,tagsList:i})=>{const{TagsSelector:o,DomainSelector:a}=Kt(n$),[s,l]=I.useState(r),c=()=>l(r),d=Xh("deviceLongUrls"),f=e==="edit",p=Ave(s),m=e==="create-basic",v=O=>l(k=>({...k,tags:O})),y=(O,k)=>uo(O)?O:uo(k)?null:void 0,x=OT(async()=>n({...s,validSince:fs(s.validSince)??null,validUntil:fs(s.validUntil)??null,maxVisits:uo(s.maxVisits)?Number(s.maxVisits):null}).then(()=>!f&&c()).catch(()=>{}));I.useEffect(()=>{l(r)},[r]);const _=(O,k,j="text",A={},U={})=>g.jsx(Ur,{...U,children:g.jsx(bl,{name:O,id:O,type:j,placeholder:k,value:s[O]??"",onChange:A.onChange??(R=>l(V=>({...V,[O]:R.target.value}))),...A})}),w=(O,k,j)=>{var A;return g.jsx(Tme,{icon:j,name:O,id:O,type:"url",placeholder:k,value:((A=s.deviceLongUrls)==null?void 0:A[O])??"",onChange:U=>l(R=>{var V;return{...R,deviceLongUrls:{...R.deviceLongUrls??{},[O]:y(U.target.value,(V=r.deviceLongUrls)==null?void 0:V[O])}}})})},S=(O,k,j={})=>g.jsx(Mve,{name:O,selected:s[O]?Ub(s[O]):null,placeholderText:k,isClearable:!0,onChange:A=>l(U=>({...U,[O]:A})),...j}),E=g.jsxs(g.Fragment,{children:[g.jsx(Ur,{children:g.jsx(bl,{name:"longUrl",bsSize:"lg",type:"url",placeholder:"URL to be shortened",required:!0,value:s.longUrl,onChange:O=>l(k=>({...k,longUrl:O.target.value}))})}),g.jsxs(gr,{children:[m&&_("customSlug","Custom slug","text",{bsSize:"lg"},{className:"col-lg-6"}),g.jsx("div",{className:m?"col-lg-6 mb-3":"col-12",children:g.jsx(o,{tags:i.tags,selectedTags:s.tags??[],onChange:v})})]})]});return g.jsxs("form",{name:"shortUrlForm",className:"short-url-form",onSubmit:x,children:[m&&E,!m&&g.jsxs(g.Fragment,{children:[g.jsxs(gr,{children:[g.jsx("div",{className:Qe("mb-3",{"col-sm-6":d,"col-12":!d}),children:g.jsx(mn,{title:"Main options",className:"mb-3",children:E})}),d&&g.jsx("div",{className:"col-sm-6 mb-3",children:g.jsxs(mn,{title:"Device-specific long URLs",children:[g.jsx(Ur,{children:w("android","Android-specific redirection",hre)}),g.jsx(Ur,{children:w("ios","iOS-specific redirection",fre)}),w("desktop","Desktop-specific redirection",wY)]})})]}),g.jsxs(gr,{children:[g.jsx("div",{className:"col-sm-6 mb-3",children:g.jsxs(mn,{title:"Customize the short URL",children:[_("title","Title","text",{onChange:({target:O})=>l(k=>({...k,title:y(O.value,r.title)}))}),!f&&p&&g.jsxs(g.Fragment,{children:[g.jsxs(gr,{children:[g.jsx("div",{className:"col-lg-6",children:_("customSlug","Custom slug","text",{disabled:uo(s.shortCodeLength)})}),g.jsx("div",{className:"col-lg-6",children:_("shortCodeLength","Short code length","number",{min:4,disabled:uo(s.customSlug)})})]}),g.jsx(a,{value:s.domain,onChange:O=>l(k=>({...k,domain:O}))})]})]})}),g.jsx("div",{className:"col-sm-6 mb-3",children:g.jsxs(mn,{title:"Limit access to the short URL",children:[_("maxVisits","Maximum number of visits allowed","number",{min:1}),g.jsx("div",{className:"mb-3",children:S("validSince","Enabled since...",{maxDate:s.validUntil?Ub(s.validUntil):void 0})}),S("validUntil","Enabled until...",{minDate:s.validSince?Ub(s.validSince):void 0})]})})]}),g.jsxs(gr,{children:[g.jsx("div",{className:"col-sm-6 mb-3",children:g.jsxs(mn,{title:"Extra checks",children:[g.jsx($b,{infoTooltip:"If checked, Shlink will try to reach the long URL, failing in case it's not publicly accessible.",checked:s.validateUrl,onChange:O=>l(k=>({...k,validateUrl:O})),children:"Validate URL"}),!f&&p&&g.jsxs("p",{children:[g.jsx(m6,{inline:!0,className:"me-2",checked:s.findIfExists,onChange:O=>l(k=>({...k,findIfExists:O})),children:"Use existing URL if found"}),g.jsx(Rve,{})]})]})}),g.jsx("div",{className:"col-sm-6 mb-3",children:g.jsxs(mn,{title:"Configure behavior",children:[g.jsx($b,{infoTooltip:"This short URL will be included in the robots.txt for your Shlink instance, allowing web crawlers (like Google) to index it.",checked:s.crawlable,onChange:O=>l(k=>({...k,crawlable:O})),children:"Make it crawlable"}),g.jsx($b,{infoTooltip:"When this short URL is visited, any query params appended to it will be forwarded to the long URL.",checked:s.forwardQuery,onChange:O=>l(k=>({...k,forwardQuery:O})),children:"Forward query params on redirect"})]})})]})]}),g.jsx("div",{className:"text-center",children:g.jsx(yt,{outline:!0,color:"primary",disabled:t||qi(s.longUrl),className:"btn-xs-block",children:t?"Saving...":"Save"})})]})},Dve=Qt(n$,["TagsSelector","DomainSelector"]),Ive=({active:e,allText:t,onChange:n})=>g.jsxs(g.Fragment,{children:[g.jsx(Ue,{active:e==="all",onClick:()=>n("all"),children:t}),g.jsx(Ue,{divider:!0,tag:"hr"}),Uhe.map(r=>g.jsx(Ue,{active:e===r,onClick:()=>n(r),children:tF(r)},r))]}),Fve=({startDate:e=null,endDate:t=null,disabled:n=!1,onStartDateChange:r,onEndDateChange:i})=>g.jsxs("div",{className:"row",children:[g.jsx("div",{className:"col-md-6",children:g.jsx(v2,{selected:e,placeholderText:"Since...",isClearable:!0,maxDate:t??void 0,disabled:n,onChange:r})}),g.jsx("div",{className:"col-md-6",children:g.jsx(v2,{className:"mt-2 mt-md-0",selected:t,placeholderText:"Until...",isClearable:!0,minDate:e??void 0,disabled:n,onChange:o=>i(o&&El(o))})})]}),r$=({onDatesChange:e,initialDateRange:t,defaultText:n,disabled:r,updatable:i=!1})=>{const o=ty(t),[a,s]=I.useState(o?t:void 0),[l,c]=I.useState(o?void 0:t),d=p=>{s(J8(p)?ep:void 0),c(p),e(p)},f=p=>{s(p),c(void 0),e(nF(p))};return upe(()=>{if(!i)return;const p=ty(t);p&&f(t),t&&!p&&d(t)},[t,i]),g.jsxs(fa,{disabled:r,text:tF(a??l)??n,children:[g.jsx(Ive,{allText:n,active:a,onChange:f}),g.jsx(Ue,{divider:!0,tag:"hr"}),g.jsx(Ue,{header:!0,"aria-hidden":!0,children:"Custom:"}),g.jsx(Ue,{text:!0,children:g.jsx(Fve,{...l,onStartDateChange:p=>d({...l,startDate:p}),onEndDateChange:p=>d({...l,endDate:p})})})]})},$ve={dateCreated:"Created at",shortCode:"Short URL",longUrl:"Long URL",title:"Title",visits:"Visits"},Uve=({onChange:e,selected:t={},className:n,supportsDisabledFiltering:r})=>{const{excludeBots:i=!1,excludeMaxVisitsReached:o=!1,excludePastValidUntil:a=!1}=t,s=l=>()=>e({...t,[l]:!(t!=null&&t[l])});return g.jsxs(fa,{text:"Filters",dropdownClassName:n,inline:!0,end:!0,minWidth:250,children:[g.jsx(Ue,{header:!0,"aria-hidden":!0,children:"Visits:"}),g.jsx(Ue,{active:i,onClick:s("excludeBots"),children:"Ignore visits from bots"}),r&&g.jsxs(g.Fragment,{children:[g.jsx(Ue,{divider:!0,tag:"hr"}),g.jsx(Ue,{header:!0,"aria-hidden":!0,children:"Short URLs:"}),g.jsx(Ue,{active:o,onClick:s("excludeMaxVisitsReached"),children:"Exclude with visits reached"}),g.jsx(Ue,{active:a,onClick:s("excludePastValidUntil"),children:"Exclude enabled in the past"})]}),g.jsx(Ue,{divider:!0,tag:"hr"}),g.jsx(Ue,{disabled:!uo(t),onClick:()=>e({excludeBots:!1,excludeMaxVisitsReached:!1,excludePastValidUntil:!1}),children:g.jsx("i",{children:"Clear filters"})})]})},i$=({className:e,shortUrlsAmount:t,order:n,handleOrderBy:r,tagsList:i})=>{const{ExportShortUrlsBtn:o,TagsSelector:a}=Kt(i$),[s,l]=S0(),{search:c,tags:d,startDate:f,endDate:p,excludeBots:m,excludeMaxVisitsReached:v,excludePastValidUntil:y,tagsMode:x="any"}=s,_=Xh("filterDisabledUrls"),w=Ul("visits"),S=Vr(({startDate:j,endDate:A})=>({startDate:fs(j)??void 0,endDate:fs(A)??void 0}),l),E=Vr(j=>qi(j)?void 0:j,j=>l({search:j})),O=j=>l({tags:j}),k=Vr(()=>x==="any"?"all":"any",j=>l({tagsMode:j}));return g.jsxs("div",{className:Qe("short-urls-filtering-bar-container",e),children:[g.jsx(Hh,{initialValue:c,onChange:E}),g.jsxs(o0,{className:"mt-3",children:[g.jsx(a,{immutable:!0,placeholder:"With tags...",tags:i.tags,selectedTags:d,onChange:O}),d.length>1&&g.jsxs(g.Fragment,{children:[g.jsx(yt,{outline:!0,color:"secondary",onClick:k,id:"tagsModeBtn","aria-label":"Change tags mode",children:g.jsx(Ne,{className:"short-urls-filtering-bar__tags-icon",icon:x==="all"?FD:ZW})}),g.jsx(Rr,{target:"tagsModeBtn",placement:"left",children:x==="all"?"With all the tags.":"With any of the tags."})]})]}),g.jsxs(gr,{className:"flex-lg-row-reverse",children:[g.jsx("div",{className:"col-lg-8 col-xl-6 mt-3",children:g.jsxs("div",{className:"d-md-flex",children:[g.jsx("div",{className:"flex-fill",children:g.jsx(r$,{defaultText:"All short URLs",initialDateRange:eF(f,p),onDatesChange:S})}),g.jsx(Uve,{className:"ms-0 ms-md-2 mt-3 mt-md-0",selected:{excludeBots:m??(w==null?void 0:w.excludeBots),excludeMaxVisitsReached:v,excludePastValidUntil:y},onChange:l,supportsDisabledFiltering:_})]})}),g.jsx("div",{className:"col-6 col-lg-4 col-xl-6 mt-3",children:g.jsx(o,{amount:t})}),g.jsx("div",{className:"col-6 d-lg-none mt-3",children:g.jsx(Wh,{prefixed:!1,items:$ve,order:n,onChange:r})})]})]})},Bve=Qt(i$,["ExportShortUrlsBtn","TagsSelector"]);function Of({currentOrder:e,field:t,className:n="ms-1"}){return!e.dir||e.field!==t?null:g.jsx(Ne,{icon:e.dir==="ASC"?zW:JW,className:n})}const dc=2,y2="...",o$=(e,t)=>{const n=dT(s8(dc,e-dc),b8(t-1,e+dc)+1);return e-dc>dc&&n.unshift(y2),e+dce===y2,a$=e=>Ch(e)?e:wn(e),s$=(e,t)=>Ch(e)?`${e}_${t}`:`${e}`,zve=({paginator:e,currentQueryString:t=""})=>{const{currentPage:n=0,pagesCount:r=0}=e??{},i=Fl(),o=s=>`${i}/list-short-urls/${s}${t}`;if(r<=1)return g.jsx("div",{className:"pb-3"});const a=()=>o$(n,r).map((s,l)=>g.jsx(il,{disabled:Ch(s),active:n===s,children:g.jsx(ol,{tag:It,to:o(s),children:a$(s)})},s$(s,l)));return g.jsxs(_E,{className:"sticky-card-paginator py-3",listClassName:"flex-wrap justify-content-center mb-0",children:[g.jsx(il,{disabled:n===1,children:g.jsx(ol,{previous:!0,tag:It,to:o(n-1)})}),a(),g.jsx(il,{disabled:n>=r,children:g.jsx(ol,{next:!0,tag:It,to:o(n+1)})})]})},Vve={field:"dateCreated",dir:"DESC"},l$=ws(({listShortUrls:e,shortUrlsList:t})=>{var n,r,i;const{ShortUrlsTable:o,ShortUrlsFilteringBar:a}=Kt(l$),{page:s}=Rl(),l=En(),[c,d]=S0(),f=PT(),{tags:p,search:m,startDate:v,endDate:y,orderBy:x,tagsMode:_,excludeBots:w,excludePastValidUntil:S,excludeMaxVisitsReached:E}=c,[O,k]=I.useState(x??((n=f.shortUrlsList)==null?void 0:n.defaultOrdering)??Vve),{pagination:j}=(t==null?void 0:t.shortUrls)??{},A=I.useMemo(()=>{var Z;return w??((Z=f.visits)==null?void 0:Z.excludeBots)},[w,(r=f.visits)==null?void 0:r.excludeBots]),U=Xh("excludeBotsOnShortUrls"),R=(Z,ne)=>{d({orderBy:{field:Z,dir:ne}}),k({field:Z,dir:ne})},V=Z=>()=>R(Z,l0(Z,O.field,O.dir)),W=Z=>g.jsx(Of,{currentOrder:O,field:Z}),X=Vr(Z=>[...new Set([...p,Z])],Z=>d({tags:Z})),G=I.useCallback(({field:Z,dir:ne})=>U&&A&&Z==="visits"?{field:"nonBotVisits",dir:ne}:{field:Z,dir:ne},[A,U]);return I.useEffect(()=>{e({page:s,searchTerm:m,tags:p,startDate:v,endDate:y,orderBy:G(O),tagsMode:_,excludePastValidUntil:S,excludeMaxVisitsReached:E})},[e,G,s,m,p,v,y,O,_,S,E]),g.jsxs(g.Fragment,{children:[g.jsx(a,{shortUrlsAmount:(i=t.shortUrls)==null?void 0:i.pagination.totalItems,order:O,handleOrderBy:R,className:"mb-3"}),g.jsxs(Gr,{body:!0,className:"pb-0",children:[g.jsx(o,{shortUrlsList:t,orderByColumn:V,renderOrderIcon:W,onTagClick:X}),g.jsx(zve,{paginator:j,currentQueryString:l.search})]})]})},()=>[pi.visits]),Hve=Qt(l$,["ShortUrlsTable","ShortUrlsFilteringBar"]),c$=({orderByColumn:e,renderOrderIcon:t,shortUrlsList:n,onTagClick:r,className:i})=>{const{ShortUrlsRow:o}=Kt(c$),{error:a,loading:s,shortUrls:l}=n,c=Qe({"short-urls-table__header-cell--with-action":!!e}),d=Qe("short-urls-table__header-cell",c),f=Qe("table table-hover responsive-table short-urls-table",i),p=()=>a?g.jsx("tr",{children:g.jsx("td",{colSpan:6,className:"text-center table-danger text-dark",children:"Something went wrong while loading short URLs :("})}):s?g.jsx("tr",{children:g.jsx("td",{colSpan:6,className:"text-center",children:"Loading..."})}):!s&&qi(l==null?void 0:l.data)?g.jsx("tr",{children:g.jsx("td",{colSpan:6,className:"text-center",children:"No results found"})}):l==null?void 0:l.data.map(m=>g.jsx(o,{shortUrl:m,onTagClick:r},m.shortUrl));return g.jsxs("table",{className:f,children:[g.jsx("thead",{className:"responsive-table__header short-urls-table__header",children:g.jsxs("tr",{children:[g.jsxs("th",{className:d,onClick:e==null?void 0:e("dateCreated"),children:["Created at ",t==null?void 0:t("dateCreated")]}),g.jsxs("th",{className:d,onClick:e==null?void 0:e("shortCode"),children:["Short URL ",t==null?void 0:t("shortCode")]}),g.jsxs("th",{className:"short-urls-table__header-cell",children:[g.jsxs(xh,{className:Qe("p-0",c),onClick:e==null?void 0:e("title"),children:["Title ",t==null?void 0:t("title")]}),"  /  ",g.jsxs(xh,{className:Qe("p-0",c),onClick:e==null?void 0:e("longUrl"),children:[g.jsx("span",{className:"indivisible",children:"Long URL"})," ",t==null?void 0:t("longUrl")]})]}),g.jsx("th",{className:"short-urls-table__header-cell",children:"Tags"}),g.jsx("th",{className:d,onClick:e==null?void 0:e("visits"),children:g.jsxs("span",{className:"indivisible",children:["Visits ",t==null?void 0:t("visits")]})}),g.jsx("th",{className:"short-urls-table__header-cell",colSpan:2,"aria-hidden":!0})]})}),g.jsx("tbody",{children:p()})]})},Wve=Qt(c$,["ShortUrlsRow"]),Yve=(e,t)=>{e.factory("ShortUrlsList",Hve),e.decorator("ShortUrlsList",t(["mercureInfo","shortUrlsList"],["listShortUrls","createNewVisits","loadMercureInfo"])),e.factory("ShortUrlsTable",Wve),e.factory("ShortUrlsRow",vme),e.factory("ShortUrlsRowMenu",yme),e.factory("CreateShortUrlResult",rme),e.factory("ShortUrlForm",Dve),e.decorator("ShortUrlForm",t(["tagsList"])),e.factory("CreateShortUrl",Ipe),e.decorator("CreateShortUrl",t(["shortUrlCreation"],["createShortUrl","resetCreateShortUrl"])),e.factory("EditShortUrl",Fpe),e.decorator("EditShortUrl",t(["shortUrlDetail","shortUrlEdition"],["getShortUrlDetail","editShortUrl"])),e.serviceFactory("DeleteShortUrlModal",()=>ime),e.decorator("DeleteShortUrlModal",t(["shortUrlDeletion"],["deleteShortUrl","shortUrlDeleted","resetDeleteShortUrl"])),e.factory("QrCodeModal",cme),e.factory("ExportShortUrlsBtn",ome),e.factory("ShortUrlsFilteringBar",Bve),e.decorator("ShortUrlsFilteringBar",t(["tagsList"])),e.serviceFactory("shortUrlsListReducerCreator",kpe,"listShortUrls","editShortUrl","createShortUrl"),e.serviceFactory("shortUrlsListReducer",mt("reducer"),"shortUrlsListReducerCreator"),e.serviceFactory("shortUrlCreationReducerCreator",bme,"createShortUrl"),e.serviceFactory("shortUrlCreationReducer",mt("reducer"),"shortUrlCreationReducerCreator"),e.serviceFactory("shortUrlEditionReducerCreator",Eme,"editShortUrl"),e.serviceFactory("shortUrlEditionReducer",mt("reducer"),"shortUrlEditionReducerCreator"),e.serviceFactory("shortUrlDeletionReducerCreator",Tpe,"deleteShortUrl"),e.serviceFactory("shortUrlDeletionReducer",mt("reducer"),"shortUrlDeletionReducerCreator"),e.serviceFactory("shortUrlDetailReducerCreator",wme,"apiClientFactory"),e.serviceFactory("shortUrlDetailReducer",mt("reducer"),"shortUrlDetailReducerCreator"),e.serviceFactory("listShortUrls",Cpe,"apiClientFactory"),e.serviceFactory("createShortUrl",_me,"apiClientFactory"),e.serviceFactory("resetCreateShortUrl",mt("resetCreateShortUrl"),"shortUrlCreationReducerCreator"),e.serviceFactory("deleteShortUrl",Epe,"apiClientFactory"),e.serviceFactory("resetDeleteShortUrl",mt("resetDeleteShortUrl"),"shortUrlDeletionReducerCreator"),e.serviceFactory("shortUrlDeleted",()=>lF),e.serviceFactory("getShortUrlDetail",mt("getShortUrlDetail"),"shortUrlDetailReducerCreator"),e.serviceFactory("editShortUrl",Sme,"apiClientFactory")},Gve=({tag:e,toggle:t,isOpen:n,deleteTag:r,tagDelete:i,tagDeleted:o})=>{const{deleting:a,error:s,deleted:l,errorData:c}=i;return g.jsxs(ua,{toggle:t,isOpen:n,centered:!0,onClosed:()=>l&&o(e),children:[g.jsx(da,{toggle:t,className:"text-danger",children:"Delete tag"}),g.jsxs(Eo,{children:["Are you sure you want to delete tag ",g.jsx("b",{children:e}),"?",s&&g.jsx(zr,{type:"error",small:!0,className:"mt-2",children:g.jsx(na,{errorData:c,fallbackMessage:"Something went wrong while deleting the tag :("})})]}),g.jsxs(Al,{children:[g.jsx(yt,{color:"link",onClick:t,children:"Cancel"}),g.jsx(yt,{color:"danger",disabled:a,onClick:async()=>{await r(e),t()},children:a?"Deleting tag...":"Delete tag"})]})]})},u$=({tag:e,editTag:t,toggle:n,tagEdited:r,isOpen:i,tagEdit:o})=>{const{ColorGenerator:a}=Kt(u$),[s,l]=I.useState(e),[c,d]=I.useState(a.getColorForKey(e)),{editing:f,error:p,edited:m,errorData:v}=o,y=OT(async()=>{await t({oldName:e,newName:s,color:c}),n()}),x=I.useCallback(()=>m&&r({oldName:e,newName:s,color:c}),[c,m,s,e,r]);return g.jsx(ua,{isOpen:i,toggle:n,centered:!0,onClosed:x,children:g.jsxs("form",{name:"editTag",onSubmit:y,children:[g.jsx(da,{toggle:n,children:"Edit tag"}),g.jsxs(Eo,{children:[g.jsxs(o0,{children:[g.jsxs("div",{className:"input-group-text p-0 position-relative",style:{backgroundColor:c,borderColor:c},children:[g.jsx(Ne,{icon:VW,className:"position-absolute top-50 start-50 translate-middle text-white"}),g.jsx(bl,{className:"form-control-color opacity-0",type:"color",value:c,onChange:_=>d(_.target.value)})]}),g.jsx(bl,{value:s,placeholder:"Tag",required:!0,onChange:({target:_})=>l(_.value)})]}),p&&g.jsx(zr,{type:"error",small:!0,className:"mt-2",children:g.jsx(na,{errorData:v,fallbackMessage:"Something went wrong while editing the tag :("})})]}),g.jsxs(Al,{children:[g.jsx(yt,{type:"button",color:"link",onClick:n,children:"Cancel"}),g.jsx(yt,{color:"primary",disabled:f,children:f?"Saving...":"Save"})]})]})})},qve=Qt(u$,["ColorGenerator"]),Ws={Enter:"Enter",Escape:"Escape",Tab:"Tab",Backspace:"Backspace",UpArrow:"ArrowUp",UpArrowCompat:"Up",DownArrow:"ArrowDown",DownArrowCompat:"Down",PageDown:"PageDown",PageUp:"PageUp"},zT=Symbol("Create new tag"),d$=Symbol("No options"),gc=()=>{},Un=Y.createContext(void 0);function DN(e,t){return e===t?[]:e.filter(n=>!t.includes(n))}function Zve(e){return e.selectionStart===0&&e.selectionEnd===0}function Kve(e){const t=e.value.length;return e.selectionStart===t&&e.selectionEnd===t}function k0(e){return`${e}-label`}function Qve(e){return`${e}-combobox`}function Xve(e){return`${e}-input`}function f$(e){return`${e}-listbox`}function h$(e,t){return`${e}-option-${oye(t)}`}function Jve(e,t){if((e==null?void 0:e.value)===zT&&e.disabled===!1)return{value:t,label:t}}function eye(e){const t=Jve(e.activeOption,e.value)||e.activeOption||cye(e.value,e.options);return t&&!t.disabled?t:void 0}function tye(e,t,n){const r=t-1;return e>r?n:en===e.value)}const aye=/[-\\^$*+?.()|[\]{}]/g;function p$(e){return e.replace(aye,"\\$&")}function m$(e){return new RegExp(p$(e),"i")}function sye(e){return new RegExp(`^${p$(e)}$`,"i")}function lye(e,t){if(e){const n=m$(e);return t.filter(r=>n.test(r.label))}else return[].concat(t)}function cye(e,t){const n=sye(e);return t.find(r=>n.test(r.label))||null}const uye={autoComplete:"off",autoCorrect:"off","data-form-type":"other",spellCheck:!1};function dye({allowBackspace:e,ariaDescribedBy:t,ariaErrorMessage:n,delimiterKeys:r}){const{id:i,comboBoxRef:o,inputRef:a,isDisabled:s,isInvalid:l,managerRef:c}=I.useContext(Un),d=I.useMemo(()=>{const v=U=>{const R=U.currentTarget.value;c.current.updateInputValue(R),document.activeElement===a.current&&c.current.listBoxExpand(R)},y=()=>{c.current.listBoxExpand()},x=U=>{var R;((R=o.current)==null?void 0:R.contains(U.relatedTarget))===!1&&c.current.listBoxCollapse()},_=()=>{c.current.listBoxExpand()},w=U=>{const{activeIndex:R,isExpanded:V}=c.current.state;V?(U.preventDefault(),c.current.updateActiveIndex(R+1)):(Kve(U.currentTarget)||U.altKey)&&(U.preventDefault(),c.current.listBoxExpand())},S=U=>{const{activeIndex:R,isExpanded:V}=c.current.state;V?(U.preventDefault(),c.current.updateActiveIndex(R-1)):Zve(U.currentTarget)&&(U.preventDefault(),c.current.listBoxExpand())},E=U=>{const{isExpanded:R,options:V}=c.current.state;R&&(U.preventDefault(),c.current.updateActiveIndex(V.length-1))},O=U=>{c.current.state.isExpanded&&(U.preventDefault(),c.current.updateActiveIndex(0))},k=()=>{c.current.state.isExpanded?c.current.listBoxCollapse():c.current.updateInputValue("")},j=()=>{if(e){const{value:U,selected:R}=c.current.state,V=R[R.length-1];U===""&&V&&c.current.selectTag(V)}},A=U=>{c.current.state.isExpanded&&(U.preventDefault(),c.current.selectTag())};return{onBlur:x,onChange:v,onClick:_,onFocus:y,onKeyDown:U=>{if(U.key===Ws.UpArrow)return S(U);if(U.key===Ws.DownArrow)return w(U);if(U.key===Ws.PageUp)return O(U);if(U.key===Ws.PageDown)return E(U);if(U.key===Ws.Escape)return k();if(U.key===Ws.Backspace)return j();if(r.includes(U.key))return A(U)}}},[e,o,r,a,c]),{activeOption:f,isExpanded:p,value:m}=c.current.state;return{...uye,"aria-autocomplete":"list","aria-activedescendant":f?h$(i,f):void 0,"aria-controls":f$(i),"aria-describedby":t||void 0,"aria-disabled":s,"aria-errormessage":l&&n||void 0,"aria-invalid":l,"aria-labelledby":k0(i),"aria-expanded":p,id:Xve(i),onBlur:s?gc:d.onBlur,onChange:s?gc:d.onChange,onClick:s?gc:d.onClick,onFocus:s?gc:d.onFocus,onKeyDown:s?gc:d.onKeyDown,ref:a,role:"combobox",type:"text",value:m}}const fye={position:"absolute",width:0,height:0,visibility:"hidden",overflow:"scroll",whiteSpace:"pre"},hye=["font-family","font-size","font-style","font-weight","letter-spacing","text-transform"];function pye({allowResize:e=!0,text:t}){const n=I.useRef(null),{inputRef:r}=I.useContext(Un),[i,o]=I.useState(null);return I.useLayoutEffect(()=>{if(e&&r.current&&n.current&&window.getComputedStyle){const a=window.getComputedStyle(r.current);hye.forEach(s=>{const l=a.getPropertyValue(s);n.current.style.setProperty(s,l)})}},[e,r,n]),I.useLayoutEffect(()=>{var a;if(e){const s=Math.ceil(((a=n.current)==null?void 0:a.scrollWidth)??0)+2;i!==s&&o(s)}},[e,t,i]),{width:i,sizerProps:{ref:n,style:fye}}}function mye(){const{id:e,inputRef:t,listBoxRef:n,managerRef:r}=I.useContext(Un),i=r.current.state.activeIndex===-1,o=I.useCallback(a=>{var s;a.target!==t.current&&((s=t.current)==null||s.focus({preventScroll:!0}))},[t]);return I.useEffect(()=>{var a;i&&((a=n.current)==null||a.scrollTo({top:0}))},[n,i]),{"aria-labelledby":k0(e),id:f$(e),onFocus:o,ref:n,role:"listbox",tabIndex:-1}}function gye({activateFirstOption:e,allowNew:t,collapseOnSelect:n,newOptionText:r,noOptionsText:i,onAdd:o,onDelete:a,onCollapse:s,onExpand:l,onInput:c,onShouldCollapse:d,onShouldExpand:f,onValidate:p,selected:m,suggestions:v,suggestionsTransform:y}){const x=I.useRef(),[_,w]=I.useState(null),[S,E]=I.useState(!1),[O,k]=I.useState(""),j=I.useMemo(()=>{const G=y(O,v);return O&&(t&&G.push({disabled:p?!p(O):!1,label:r,value:zT}),G.length===0&&G.push({disabled:!0,label:i,value:d$})),G},[t,r,i,p,v,y,O]),A=_?b2(_,j):-1,U=e?Math.max(A,0):A,R=j[U],V={activeIndex:U,activeOption:R,isExpanded:S,options:j,selected:m,value:O},W={tagsAdded:x.current?DN(m,x.current.state.selected):[],tagsDeleted:x.current?DN(x.current.state.selected,m):[]},X={listBoxCollapse(G){S&&(!d||d(G??V.value))&&(E(!1),w(null),s==null||s())},listBoxExpand(G){S||(!f||f(G??V.value))&&(E(!0),w(j[U]),l==null||l())},updateActiveIndex(G){const Z=tye(G,j.length,e?0:-1);w(j[Z])},updateInputValue(G){O!==G&&(k(G),c==null||c(G))},selectTag(G){if(G??(G=eye(V)),G){const Z=b2(G,V.selected);Z>-1?a(Z):o(G),n&&this.listBoxCollapse(),this.updateInputValue("")}}};return x.current={...X,flags:W,state:V},x}function vye(e){const{id:t,inputRef:n,listBoxRef:r,managerRef:i}=I.useContext(Un),o=I.useRef(null),a=i.current.state.options[e],s=e===i.current.state.activeIndex,l=a.disabled??!1,c=b2(a,i.current.state.selected)>-1,d=I.useCallback(()=>{var p;i.current.selectTag(),(p=n.current)==null||p.focus()},[n,i]),f=I.useCallback(()=>{e!==i.current.state.activeIndex&&i.current.updateActiveIndex(e)},[e,i]);return bye(o,r,s),{option:{...a,active:s,disabled:l,index:e,selected:c},optionProps:{"aria-disabled":l,"aria-posinset":e+1,"aria-selected":l?void 0:c,"aria-setsize":i.current.state.options.length,id:h$(t,a),onClick:d,onMouseDown:f,ref:o,role:"option",tabIndex:-1}}}function yye({inputRef:e,managerRef:t}){return I.useRef({input:{blur(){var n;(n=e.current)==null||n.blur()},focus(){var n;(n=e.current)==null||n.focus()},get value(){return t.current.state.value},set value(n){typeof n!="string"&&(n=String(n)),t.current.updateInputValue(n)}},listBox:{collapse(){t.current.listBoxCollapse()},expand(){t.current.listBoxExpand()},get activeOption(){return t.current.state.activeOption},get isExpanded(){return t.current.state.isExpanded}},select(n){t.current.selectTag(n)}}).current}function _ye({onBlur:e,onFocus:t}){const[n,r]=I.useState(!1),{id:i,inputRef:o}=I.useContext(Un),a=I.useRef(null),s=I.useMemo(()=>({"aria-describedby":k0(i),id:i,onFocus(){r(!0),t==null||t()},onBlur(){var l;(l=a.current)!=null&&l.contains(document.activeElement)||(r(!1),e==null||e())},onClick(){var l;document.activeElement===a.current&&((l=o.current)==null||l.focus())},ref:a,tabIndex:-1}),[o,i,e,t,a]);return{isActive:n,rootProps:s}}function bye(e,t,n){I.useEffect(()=>{var r,i,o,a;if(n){const s=(r=e.current)==null?void 0:r.offsetHeight,l=(i=e.current)==null?void 0:i.offsetTop,c=(o=t.current)==null?void 0:o.offsetHeight,d=(a=t.current)==null?void 0:a.scrollTop;ld+c&&t.current.scrollTo(0,l+s-c)}},[n,t,e])}function wye(e,t){const{isDisabled:n,managerRef:r}=I.useContext(Un),i=r.current.state.selected[e],o=I.useCallback(()=>r.current.selectTag(i),[r,i]);return{tag:i,tagProps:{"aria-disabled":n,title:ly(t,i.label),onClick:n?gc:o}}}function xye(){var e;const{inputRef:t,managerRef:n}=I.useContext(Un),r=I.useRef(),i=n.current.flags.tagsDeleted.length,o=(e=r.current)==null?void 0:e.contains(document.activeElement);return I.useLayoutEffect(()=>{var a,s;if(i){const l=(a=r.current)==null?void 0:a.contains(document.activeElement);o&&!l&&((s=t.current)==null||s.focus({preventScroll:!0}))}},[t,o,r,i]),{listRef:r}}const Sye={position:"absolute",width:1,height:1,left:-9999,overflow:"hidden",clip:"rect(0 0 0 0)"};function Eye({ariaAddedText:e,ariaDeletedText:t}){const{managerRef:n}=I.useContext(Un),r=I.useRef([]);return n.current.flags.tagsAdded.forEach(i=>{r.current.push(ly(e,i.label))}),n.current.flags.tagsDeleted.forEach(i=>{r.current.push(ly(t,i.label))}),Y.createElement("div",{"aria-live":"polite","aria-relevant":"additions",role:"status",style:Sye},r.current.join(` +`))}function Tye({children:e}){const{classNames:t,comboBoxRef:n,id:r}=I.useContext(Un);return Y.createElement("div",{className:t.comboBox,id:Qve(r),ref:n},e)}const Oye=({classNames:e,text:t})=>Y.createElement("mark",{className:e.highlight},t);function Cye({option:e,query:t,render:n=Oye}){const{classNames:r}=I.useContext(Un);if(e.value===zT||e.value===d$)return Y.createElement(Y.Fragment,null,ly(e.label,t));if(t){const i=rye(e.label,t);if(i){const o=n({text:i[1],classNames:r});return Y.createElement(Y.Fragment,null,i[0],o,i[2])}}return Y.createElement(Y.Fragment,null,e.label)}const kye=Y.memo(Cye),Pye=({classNames:e,inputWidth:t,...n})=>Y.createElement("input",{className:e.input,style:{width:t},...n});function Lye({allowBackspace:e=!0,allowResize:t=!0,ariaDescribedBy:n,ariaErrorMessage:r,delimiterKeys:i,placeholderText:o,render:a=Pye}){const{classNames:s}=I.useContext(Un),{value:l,...c}=dye({allowBackspace:e,ariaDescribedBy:n,ariaErrorMessage:r,delimiterKeys:i}),d=l.lengthY.createElement("div",{className:t.label,id:n},e);function Mye({children:e,render:t=jye}){const{classNames:n,id:r}=I.useContext(Un);return t({children:e,classNames:n,id:k0(r)})}const Nye=({children:e,classNames:t,...n})=>Y.createElement("div",{className:t.listBox,...n},e);function Rye({children:e,render:t=Nye}){const{classNames:n,managerRef:r}=I.useContext(Un),i=mye();return!r.current.state.isExpanded||Y.Children.count(e)===0?null:t({children:e,classNames:n,...i})}const Aye=({children:e,classNames:t,option:n,...r})=>{const i=[t.option];return n.active&&i.push(t.optionIsActive),Y.createElement("div",{className:i.join(" "),...r},e)};function Dye({children:e,index:t,render:n=Aye}){const{classNames:r}=I.useContext(Un),{option:i,optionProps:o}=vye(t);return n({classNames:r,children:e,option:i,...o})}const Iye=({children:e,classNames:t,isActive:n,isDisabled:r,isInvalid:i,...o})=>{const a=[t.root];return n&&a.push(t.rootIsActive),r&&a.push(t.rootIsDisabled),i&&a.push(t.rootIsInvalid),Y.createElement("div",{className:a.join(" "),...o},e)};function Fye({children:e,onBlur:t,onFocus:n,render:r=Iye}){const{classNames:i,isDisabled:o,isInvalid:a}=I.useContext(Un),{isActive:s,rootProps:l}=_ye({onBlur:t,onFocus:n});return r({children:e,classNames:i,isActive:s,isDisabled:o,isInvalid:a,...l})}const $ye=({classNames:e,tag:t,...n})=>Y.createElement("button",{type:"button",className:e.tag,...n},Y.createElement("span",{className:e.tagName},t.label));function Uye({render:e=$ye,index:t,title:n}){const{classNames:r}=I.useContext(Un),{tag:i,tagProps:o}=wye(t,n);return e({classNames:r,tag:i,...o})}function Bye({children:e,label:t}){const{classNames:n}=I.useContext(Un),{listRef:r}=xye();return Y.createElement("ul",{className:n.tagList,"aria-label":t,ref:r,role:"list"},e.map(i=>Y.createElement("li",{className:n.tagListItem,key:i.key,role:"listitem"},i)))}const zye={root:"react-tags",rootIsActive:"is-active",rootIsDisabled:"is-disabled",rootIsInvalid:"is-invalid",label:"react-tags__label",tagList:"react-tags__list",tagListItem:"react-tags__list-item",tag:"react-tags__tag",tagName:"react-tags__tag-name",comboBox:"react-tags__combobox",input:"react-tags__combobox-input",listBox:"react-tags__listbox",option:"react-tags__listbox-option",optionIsActive:"is-active",highlight:"react-tags__listbox-option-highlight"},Vye=[Ws.Enter];function Hye({activateFirstOption:e=!1,allowBackspace:t=!0,allowNew:n=!1,allowResize:r=!0,ariaAddedText:i="Added tag %value%",ariaDescribedBy:o,ariaErrorMessage:a,ariaDeletedText:s="Removed tag %value%",classNames:l=zye,collapseOnSelect:c=!1,deleteButtonText:d="Remove %value% from the list",delimiterKeys:f=Vye,id:p="react-tags",isDisabled:m=!1,isInvalid:v=!1,labelText:y="Select tags",newOptionText:x="Add %value%",noOptionsText:_="No options found for %value%",onAdd:w,onBlur:S,onCollapse:E,onDelete:O,onExpand:k,onFocus:j,onInput:A,onShouldCollapse:U,onShouldExpand:R,onValidate:V,placeholderText:W="Add a tag",renderHighlight:X,renderInput:G,renderLabel:Z,renderListBox:ne,renderOption:le,renderRoot:K,renderTag:F,selected:D=[],suggestions:H=[],suggestionsTransform:ie=lye,tagListLabelText:z="Selected tags"},q){const re=I.useRef(null),ae=I.useRef(null),he=I.useRef(null),C=gye({activateFirstOption:e,allowNew:n,collapseOnSelect:c,newOptionText:x,noOptionsText:_,onAdd:w,onDelete:O,onCollapse:E,onExpand:k,onInput:A,onShouldCollapse:U,onShouldExpand:R,onValidate:V,selected:D,suggestions:H,suggestionsTransform:ie}),M=yye({inputRef:ae,managerRef:C});return q&&(typeof q=="function"?q(M):q.current=M),Y.createElement(Un.Provider,{value:{classNames:l,comboBoxRef:re,id:p,inputRef:ae,isDisabled:m,isInvalid:v,listBoxRef:he,managerRef:C}},Y.createElement(Fye,{onBlur:S,onFocus:j,render:K},Y.createElement(Mye,{render:Z},y),Y.createElement(Bye,{label:z},C.current.state.selected.map(($,J)=>Y.createElement(Uye,{key:_2($),index:J,render:F,title:d}))),Y.createElement(Tye,null,Y.createElement(Lye,{allowBackspace:t,allowResize:r,ariaDescribedBy:o,ariaErrorMessage:a,delimiterKeys:f,placeholderText:W,render:G}),Y.createElement(Rye,{render:ne},C.current.state.options.map(($,J)=>Y.createElement(Dye,{key:_2($),index:J,render:le},Y.createElement(kye,{option:$,query:C.current.state.value,render:X}))))),Y.createElement(Eye,{ariaAddedText:i,ariaDeletedText:s})))}const Wye=Y.forwardRef(Hye),Yye=/\s+/g,g$=e=>e.trim().toLowerCase().replace(Yye,"-"),v$=({tag:e,colorGenerator:t})=>g.jsx("div",{style:{backgroundColor:t.getColorForKey(e)},className:"tag-bullet"});let IN=1;const y$="Tag not found",_$="Add tag",Gye=e=>e!==y$,qye=e=>e===_$,FN=e=>(IN+=1,{label:e,value:`${e}${IN}`}),Zye=e=>({tag:t,onClick:n})=>g.jsx(jT,{colorGenerator:e,text:t.label,className:"react-tags__tag",onClose:n}),Kye=(e,t)=>({option:n,classNames:r,...i})=>{var o;const a=Gye(n.label),s=qye(n.label);return g.jsx("div",{className:Qe(r.option,{[r.optionIsActive]:a&&n.active,"react-tags__listbox-option--not-selectable":!a}),...i,children:a?g.jsxs(g.Fragment,{children:[!s&&g.jsx(v$,{tag:`${n.label}`,colorGenerator:e}),s?g.jsxs("i",{children:['Add "',g$(((o=t.current)==null?void 0:o.input.value)??""),'"']}):n.label]}):g.jsx("i",{children:n.label})})},b$=({selectedTags:e,onChange:t,placeholder:n,tags:r,immutable:i=!1})=>{const{ColorGenerator:o}=Kt(b$),a=Ul("shortUrlCreation"),s=(a==null?void 0:a.tagFilteringMode)??"startsWith",l=ys();return g.jsx(Wye,{ref:l,selected:e.map(FN),suggestions:r.filter(c=>!e.includes(c)).map(FN),renderTag:Zye(o),renderOption:Kye(o,l),activateFirstOption:!0,allowNew:!i,newOptionText:_$,noOptionsText:y$,placeholderText:n??"Add tags to the URL",delimiterKeys:["Enter",","],suggestionsTransform:(c,d)=>{const f=c.toLowerCase().trim();return f.length<1?[]:[...d.filter(({label:p})=>s==="includes"?p.includes(f):p.startsWith(f))].slice(0,5)},onDelete:c=>{const d=[...e];d.splice(c,1),t(d)},onAdd:({label:c})=>t([...new Set([...e,...c.split(",").map(g$)])])})},Qye=Qt(b$,["ColorGenerator"]),w2="shlink/tagDelete",Xye={deleting:!1,deleted:!1,error:!1},w$=Rn(`${w2}/tagDeleted`),Jye=e=>{const t=Nr(`${w2}/deleteTag`,async r=>{await e().deleteTags([r])}),{reducer:n}=lr({name:w2,initialState:Xye,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:pa(o)})),r.addCase(t.fulfilled,()=>({deleting:!1,deleted:!0,error:!1}))}});return{reducer:n,deleteTag:t}},VT="shlink/tagEdit",e0e={editing:!1,edited:!1,error:!1},x$=Rn(`${VT}/tagEdited`),t0e=(e,t)=>Nr(`${VT}/editTag`,async({oldName:n,newName:r,color:i})=>(await e().editTag(n,r),t.setColorForKey(r,i),{oldName:n,newName:r,color:i})),n0e=e=>lr({name:VT,initialState:e0e,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:pa(r)})),t.addCase(e.fulfilled,(n,{payload:r})=>({...w8(["oldName","newName"],r),editing:!1,edited:!0,error:!1}))}}),HT="shlink/tagsList",Bb={tags:[],filteredTags:[],stats:{},loading:!1,error:!1},$N=(e,t)=>n=>n===e?t:n,UN=(e,t)=>cT(n=>n===t,e),r0e=(e,t)=>e.reduce((n,[r,i])=>{if(!n[r])return n;const{bots:o,nonBots:a}=i,s=n[r];return{...n,[r]:{...s,visitsSummary:s.visitsSummary&&{total:s.visitsSummary.total+o+a,bots:s.visitsSummary.bots+o,nonBots:s.visitsSummary.nonBots+a},visitsCount:s.visitsCount+o+a}}},{...t}),i0e=e=>Object.entries(e.reduce((t,{shortUrl:n,visit:r})=>(n==null||n.tags.forEach(i=>{t[i]||(t[i]={bots:0,nonBots:0}),r.potentialBot?t[i].bots+=1:t[i].nonBots+=1}),t),{})),o0e=e=>Nr(`${HT}/listTags`,async()=>{const{tags:t,stats:n}=await e().tagsStats(),r=n.reduce((i,{tag:o,...a})=>(i[o]=a,i),{});return{tags:t,stats:r}}),S$=Rn(`${HT}/filterTags`),a0e=(e,t)=>lr({name:HT,initialState:Bb,reducers:{},extraReducers:n=>{n.addCase(S$,(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})=>({...Bb,error:!0,errorData:pa(i)})),n.addCase(e.fulfilled,(r,{payload:i})=>({...Bb,stats:i.stats,tags:i.tags,filteredTags:i.tags})),n.addCase(w$,({tags:r,filteredTags:i,...o},{payload:a})=>({...o,tags:UN(r,a),filteredTags:UN(i,a)})),n.addCase(x$,({tags:r,filteredTags:i,stats:o,...a},{payload:s})=>({...a,stats:{...o,[s.newName]:o[s.oldName]},tags:r.map($N(s.oldName,s.newName)).sort(),filteredTags:i.map($N(s.oldName,s.newName)).sort()})),n.addCase(tp,(r,{payload:i})=>({...r,stats:r0e(i0e(i.createdVisits),r.stats)})),n.addCase(t.fulfilled,({tags:r,...i},{payload:o})=>({...i,tags:r.concat(o.tags.filter(a=>!r.includes(a)))}))}}),s0e={tag:"Tag",shortUrls:"Short URLs",visits:"Visits"},E$=ws(({filterTags:e,tagsList:t})=>{var n;const{TagsTable:r}=Kt(E$),i=PT(),[o,a]=I.useState(((n=i.tags)==null?void 0:n.defaultOrdering)??{}),s=Vr(()=>t.filteredTags.map(c=>{var d,f,p;const m=t.stats[c],v=((d=i.visits)!=null&&d.excludeBots?(f=m==null?void 0:m.visitsSummary)==null?void 0:f.nonBots:(p=m==null?void 0:m.visitsSummary)==null?void 0:p.total)??(m==null?void 0:m.visitsCount)??0;return{tag:c,visits:v,shortUrls:(m==null?void 0:m.shortUrlsCount)??0}}),c=>v6(c,o));if(t.loading)return g.jsx(Ho,{loading:!0});if(t.error)return g.jsx(zr,{type:"error",children:g.jsx(na,{errorData:t.errorData,fallbackMessage:"Error loading tags :("})});const l=c=>()=>{const d=l0(c,o.field,o.dir);a({field:d?c:void 0,dir:d})};return g.jsxs(g.Fragment,{children:[g.jsx(Hh,{className:"mb-3",onChange:e}),g.jsx(gr,{className:"mb-3",children:g.jsx("div",{className:"col-lg-6 offset-lg-6",children:g.jsx(Wh,{items:s0e,order:o,onChange:(c,d)=>a({field:c,dir:d})})})}),(()=>{if(t.filteredTags.length<1)return g.jsx(Ho,{children:"No tags found"});const c=s();return g.jsx(r,{sortedTags:c,currentOrder:o,orderByColumn:l})})()]})},()=>[pi.visits]),l0e=Qt(E$,["TagsTable"]),WT=({pagesCount:e,currentPage:t,setCurrentPage:n,centered:r=!0})=>{if(e<2)return null;const i=o=>()=>!Ch(o)&&n(o);return g.jsxs(_E,{listClassName:Qe("flex-wrap mb-0 simple-paginator",{"justify-content-center":r}),children:[g.jsx(il,{disabled:t<=1,children:g.jsx(ol,{previous:!0,tag:"span",onClick:i(t-1)})}),o$(t,e).map((o,a)=>g.jsx(il,{disabled:Ch(o),active:t===o,children:g.jsx(ol,{role:"link",tag:"span",onClick:i(o),children:a$(o)})},s$(o,a))),g.jsx(il,{disabled:t>=e,children:g.jsx(ol,{next:!0,tag:"span",onClick:i(t+1)})})]})},c0e=20,T$=({sortedTags:e,orderByColumn:t,currentOrder:n})=>{const{TagsTableRow:r}=Kt(T$),i=I.useRef(!0),{search:o}=En(),{page:a=1}=zu(o),[s,l]=cpe("page",Number(a)),c=gh(c0e,e),d=c.length>1,f=c[s-1]??[];return I.useEffect(()=>{!i.current&&l(1),i.current=!1},[l,e]),I.useEffect(()=>{scrollTo(0,0)},[s]),g.jsxs(mn,{bodyClassName:d?"pb-1":"",children:[g.jsxs("table",{className:"table table-hover responsive-table mb-0",children:[g.jsxs("thead",{className:"responsive-table__header",children:[g.jsxs("tr",{children:[g.jsxs("th",{className:"tags-table__header-cell",onClick:t("tag"),children:["Tag ",g.jsx(Of,{currentOrder:n,field:"tag"})]}),g.jsxs("th",{className:"tags-table__header-cell text-lg-end",onClick:t("shortUrls"),children:["Short URLs ",g.jsx(Of,{currentOrder:n,field:"shortUrls"})]}),g.jsxs("th",{className:"tags-table__header-cell text-lg-end",onClick:t("visits"),children:["Visits ",g.jsx(Of,{currentOrder:n,field:"visits"})]}),g.jsx("th",{className:"tags-table__header-cell",children:g.jsx("span",{className:"sr-only",children:"Options"})})]}),g.jsx("tr",{children:g.jsx("th",{"aria-hidden":!0,colSpan:4,className:"p-0 border-top-0"})})]}),g.jsxs("tbody",{children:[f.length===0&&g.jsx("tr",{children:g.jsx("td",{colSpan:4,className:"text-center",children:"No results found"})}),f.map(p=>g.jsx(r,{tag:p},p.tag))]})]}),d&&g.jsx("div",{className:"sticky-card-paginator",children:g.jsx(WT,{pagesCount:c.length,currentPage:s,setCurrentPage:l})})]},s)},u0e=Qt(T$,["TagsTableRow"]),O$=({tag:e})=>{const{DeleteTagConfirmModal:t,EditTagModal:n,ColorGenerator:r}=Kt(O$),[i,o]=Sn(),[a,s]=Sn(),l=Fl();return g.jsxs("tr",{className:"responsive-table__row",children:[g.jsxs("th",{className:"responsive-table__cell","data-th":"Tag",children:[g.jsx(v$,{tag:e.tag,colorGenerator:r})," ",e.tag]}),g.jsx("td",{className:"responsive-table__cell text-lg-end","data-th":"Short URLs",children:g.jsx(It,{to:`${l}/list-short-urls/1?tags=${encodeURIComponent(e.tag)}`,children:wn(e.shortUrls)})}),g.jsx("td",{className:"responsive-table__cell text-lg-end","data-th":"Visits",children:g.jsx(It,{to:`${l}/tag/${e.tag}/visits`,children:wn(e.visits)})}),g.jsx("td",{className:"responsive-table__cell text-lg-end",children:g.jsxs(s0,{children:[g.jsxs(Ue,{onClick:s,children:[g.jsx(Ne,{icon:jW,fixedWidth:!0,className:"me-1"})," Edit"]}),g.jsxs(Ue,{onClick:o,children:[g.jsx(Ne,{icon:YW,fixedWidth:!0,className:"me-1"})," Delete"]})]})}),g.jsx(n,{tag:e.tag,toggle:s,isOpen:a}),g.jsx(t,{tag:e.tag,toggle:o,isOpen:i})]})},d0e=Qt(O$,["DeleteTagConfirmModal","EditTagModal","ColorGenerator"]),f0e=(e,t)=>{e.factory("TagsSelector",Qye),e.serviceFactory("DeleteTagConfirmModal",()=>Gve),e.decorator("DeleteTagConfirmModal",t(["tagDelete"],["deleteTag","tagDeleted"])),e.factory("EditTagModal",qve),e.decorator("EditTagModal",t(["tagEdit"],["editTag","tagEdited"])),e.factory("TagsTableRow",d0e),e.factory("TagsTable",u0e),e.factory("TagsList",l0e),e.decorator("TagsList",t(["tagsList","mercureInfo"],["filterTags","createNewVisits","loadMercureInfo"])),e.serviceFactory("tagEditReducerCreator",n0e,"editTag"),e.serviceFactory("tagEditReducer",mt("reducer"),"tagEditReducerCreator"),e.serviceFactory("tagDeleteReducerCreator",Jye,"apiClientFactory"),e.serviceFactory("tagDeleteReducer",mt("reducer"),"tagDeleteReducerCreator"),e.serviceFactory("tagsListReducerCreator",a0e,"listTags","createShortUrl"),e.serviceFactory("tagsListReducer",mt("reducer"),"tagsListReducerCreator"),e.serviceFactory("listTags",o0e,"apiClientFactory"),e.serviceFactory("filterTags",()=>S$),e.serviceFactory("deleteTag",mt("deleteTag"),"tagDeleteReducerCreator"),e.serviceFactory("tagDeleted",()=>w$),e.serviceFactory("editTag",t0e,"apiClientFactory","ColorGenerator"),e.serviceFactory("tagEdited",()=>x$)};var h0e="Expected a function",C$="__lodash_hash_undefined__",k$=1/0,p0e="[object Function]",m0e="[object GeneratorFunction]",g0e="[object Symbol]",v0e=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,y0e=/^\w*$/,_0e=/^\./,b0e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,w0e=/[\\^$.*+?()[\]{}|]/g,x0e=/\\(\\)?/g,S0e=/^\[object .+?Constructor\]$/,E0e=typeof Ac=="object"&&Ac&&Ac.Object===Object&&Ac,T0e=typeof self=="object"&&self&&self.Object===Object&&self,YT=E0e||T0e||Function("return this")();function O0e(e,t){return e==null?void 0:e[t]}function C0e(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var k0e=Array.prototype,P0e=Function.prototype,P$=Object.prototype,zb=YT["__core-js_shared__"],BN=function(){var e=/[^.]+$/.exec(zb&&zb.keys&&zb.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),L$=P0e.toString,GT=P$.hasOwnProperty,j$=P$.toString,L0e=RegExp("^"+L$.call(GT).replace(w0e,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),zN=YT.Symbol,j0e=k0e.splice,M0e=M$(YT,"Map"),kh=M$(Object,"create"),VN=zN?zN.prototype:void 0,HN=VN?VN.toString:void 0;function Cl(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1}function z0e(e,t){var n=this.__data__,r=P0(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}qu.prototype.clear=F0e;qu.prototype.delete=$0e;qu.prototype.get=U0e;qu.prototype.has=B0e;qu.prototype.set=z0e;function Bl(e){var t=-1,n=e?e.length:0;for(this.clear();++tr.toFixed(n).replace(".",t):r=>`${r}`.replace(".",t):n?r=>r.toFixed(n):r=>`${r}`}function KT(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 d_e(e={stringFormatter:KT()}){return t=>e.stringFormatter(t.toString().slice(7,-1))}function f_e(e={stringFormatter:KT()}){return t=>{if(t===null)return"";let n=JSON.stringify(t);return n===void 0?"":(n[0]==='"'&&(n=n.replace(/^"(.+)"$/,"$1")),e.stringFormatter(n))}}function YN(e,t,n){const r=e[t];return r===void 0?n:r}function A$(e,t){try{return Array.isArray(t)?e.push(...t):e.push(t),e}catch{return e.concat(t)}}function x2(e,t){let n=!0;return e.reduce((r,i)=>(i==null&&(i=""),n?(n=!1,`${i}`):`${r}${t}${i}`),"")}var GN;(function(e){e.header="header",e.undefined="undefined",e.boolean="boolean",e.number="number",e.bigint="bigint",e.string="string",e.symbol="symbol",e.function="function",e.object="object"})(GN||(GN={}));class h_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||KT(),i=f_e({stringFormatter:r}),o={header:r,undefined:Vb,boolean:Vb,number:u_e(),bigint:Vb,string:r,symbol:d_e({stringFormatter:r}),function:i,object:i};return n.formatters=Object.assign(Object.assign({},o),n.formatters),n.delimiter=n.delimiter||",",n.eol=n.eol||` +`,n.header=n.header!==!1,n.includeEmptyRows=n.includeEmptyRows||!1,n.withBOM=n.withBOM||!1,n}preprocessFieldsInfo(t,n){return t.map(r=>{if(typeof r=="string")return{label:r,value:r.includes(".")||r.includes("[")?i=>WN(i,r,n):i=>YN(i,r,n)};if(typeof r=="object"){const i="default"in r?r.default:n;if(typeof r.value=="string"){const o=r.value;return{label:r.label||r.value,value:r.value.includes(".")||r.value.includes("[")?a=>WN(a,o,i):a=>YN(a,o,i)}}if(typeof r.value=="function"){const o=r.label||r.value.name||"",a={label:o,default:i},s=r.value;return{label:o,value(l){const c=s(l,a);return c===void 0?i:c}}}}throw new Error("Invalid field info option. "+JSON.stringify(r))})}getHeader(){return x2(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(A$,[]),[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 x2(n,this.opts.delimiter)}processCell(t,n){return this.processValue(n.value(t))}processValue(t){const n=this.opts.formatters[typeof t];return n(t)}}class p_e extends h_e{constructor(t){super(t)}parse(t){const n=this.preprocessData(t);this.opts.fields=this.opts.fields||this.preprocessFieldsInfo(n.reduce((o,a)=>(Object.keys(a).forEach(s=>{o.includes(s)||o.push(s)}),o),[]),this.opts.defaultValue);const r=this.opts.header?this.getHeader():"",i=this.processData(n);return(this.opts.withBOM?"\uFEFF":"")+r+(r&&i?this.opts.eol:"")+i}preprocessData(t){const n=Array.isArray(t)?t:[t];if(!this.opts.fields){if(t==null||n.length===0)throw new Error('Data should not be empty or the "fields" option should be included');if(typeof n[0]!="object")throw new Error('Data items should be objects or the "fields" option should be included')}return this.opts.transforms.length===0?n:n.map(r=>this.preprocessRow(r)).reduce(A$,[])}processData(t){return x2(t.map(n=>this.processRow(n)).filter(n=>n),this.opts.eol)}}var Cn;(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"})(Cn||(Cn={}));Cn.QUOTATION_MARK+"",Cn.QUOTATION_MARK,Cn.REVERSE_SOLIDUS+"",Cn.REVERSE_SOLIDUS,Cn.SOLIDUS+"",Cn.SOLIDUS,Cn.LATIN_SMALL_LETTER_B+"",Cn.BACKSPACE,Cn.LATIN_SMALL_LETTER_F+"",Cn.FORM_FEED,Cn.LATIN_SMALL_LETTER_N+"",Cn.NEWLINE,Cn.LATIN_SMALL_LETTER_R+"",Cn.CARRIAGE_RETURN,Cn.LATIN_SMALL_LETTER_T+"",Cn.TAB;var qN;(function(e){e[e.LEFT_BRACE=0]="LEFT_BRACE",e[e.RIGHT_BRACE=1]="RIGHT_BRACE",e[e.LEFT_BRACKET=2]="LEFT_BRACKET",e[e.RIGHT_BRACKET=3]="RIGHT_BRACKET",e[e.COLON=4]="COLON",e[e.COMMA=5]="COMMA",e[e.TRUE=6]="TRUE",e[e.FALSE=7]="FALSE",e[e.NULL=8]="NULL",e[e.STRING=9]="STRING",e[e.NUMBER=10]="NUMBER",e[e.SEPARATOR=11]="SEPARATOR"})(qN||(qN={}));var ZN;(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"})(ZN||(ZN={}));var KN;(function(e){e[e.OBJECT=0]="OBJECT",e[e.ARRAY=1]="ARRAY"})(KN||(KN={}));var QN;(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"})(QN||(QN={}));const m_e=new p_e,g_e=e=>m_e.parse(e),v_e=6,XN="0123456789ABCDEF",y_e=128,{floor:__e,random:b_e,sqrt:w_e,round:x_e}=Math,S_e=()=>`#${CT(v_e,()=>XN[__e(b_e()*XN.length)]).join("")}`,JN=e=>e.toLowerCase().trim(),E_e=e=>(e.match(/../g)??[]).map(t=>parseInt(t,16)||0),T_e=(e=0,t=0,n=0)=>x_e(w_e(.299*e**2+.587*t**2+.114*n**2));class O_e{constructor(t){Te(this,"colors"),Te(this,"lights"),Te(this,"getColorForKey",r=>{const i=JN(r);return this.colors[i]||this.setColorForKey(i,S_e())}),Te(this,"setColorForKey",(r,i)=>{var o;const a=JN(r);return this.colors[a]=i,(o=this.storage)==null||o.storeTagColors(this.colors),i}),Te(this,"isColorLightForKey",r=>{const i=this.getColorForKey(r).substring(1);if(Wu(this.lights[i])){const o=E_e(i);this.lights[i]=T_e(...o)>=y_e}return this.lights[i]});var n;this.storage=t,this.colors=((n=this.storage)==null?void 0:n.getTagColors())??{},this.lights={}}}const D$=({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)},C_e=(e,t,n)=>{const r=new Blob([t],{type:"text/csv;charset=utf-8;"}),i=URL.createObjectURL(r);D$(e,i,n)};class k_e{constructor(t,n){this.fetch=t,this.window=n}async saveImage(t,n){const r=await this.fetch(t).then(o=>o.blob()),i=URL.createObjectURL(r);D$(this.window,i,n)}}class P_e{constructor(t,n){Te(this,"exportVisits",(r,i)=>{i.length&&this.exportCsv(r,i)}),Te(this,"exportShortUrls",r=>{r.length&&this.exportCsv("short_urls.csv",r)}),Te(this,"exportCsv",(r,i)=>{const o=this.jsonToCsv(i);C_e(this.window,o,r)}),this.window=t,this.jsonToCsv=n}}function L_e(e){e.constant("window",window),e.constant("fetch",window.fetch.bind(window)),e.service("ImageDownloader",k_e,"fetch","window"),e.service("ColorGenerator",O_e,"TagColorsStorage"),e.constant("jsonToCsv",g_e),e.service("ReportExporter",P_e,"window","jsonToCsv"),e.serviceFactory("useTimeoutToggle",()=>h6)}const QT=e=>e.visitedUrl!==void 0,j_e=e=>e.visitedUrl!==void 0,M_e=Vr(aue(e=>QT(e.visit)?"orphanVisits":"nonOrphanVisits"),e=>({orphanVisits:[],nonOrphanVisits:[],...e})),Im=(e,t)=>_8(mt(t),e),sp=({page:e,itemsPerPage:t,filter:n,dateRange:r})=>{const i=((r==null?void 0:r.startDate)&&fs(r==null?void 0:r.startDate))??void 0,o=((r==null?void 0:r.endDate)&&fs(r==null?void 0:r.endDate))??void 0,a=(n==null?void 0:n.excludeBots)||void 0;return{page:e,itemsPerPage:t,startDate:i,endDate:o,excludeBots:a}},lp=({visits:e,goBack:t,shortUrl:n,children:r,title:i})=>g.jsx("header",{children:g.jsxs(Gr,{body:!0,children:[g.jsxs("h2",{className:"d-flex justify-content-between align-items-center mb-0",children:[g.jsx(yt,{color:"link",size:"lg",className:"p-0 me-3",onClick:t,"aria-label":"Go back",children:g.jsx(Ne,{icon:$D})}),g.jsx("span",{className:"text-center d-none d-sm-block",children:g.jsx("small",{children:i})}),g.jsxs("span",{className:"badge badge-main ms-3",children:["Visits:"," ",g.jsx(OF,{visitsCount:e.length,shortUrl:n})]})]}),g.jsx("h3",{className:"text-center d-block d-sm-none mb-0 mt-3",children:g.jsx("small",{children:i})}),r&&g.jsx("div",{className:"mt-md-2",children:r})]})}),I$=({title:e,footer:t,children:n})=>g.jsxs(Gr,{role:"document",children:[g.jsx(hu,{className:"chart-card__header",children:typeof e=="function"?e():e}),g.jsx(fu,{children:n}),t&&g.jsx(QI,{className:"chart-card__footer--sticky",children:t})]}),F$="label";function eR(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function N_e(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function $$(e,t){e.labels=t}function U$(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:F$;const r=[];e.datasets=t.map(i=>{const o=e.datasets.find(a=>a[n]===i[n]);return!o||!i.data||r.includes(o)?{...i}:(r.push(o),Object.assign(o,i),o)})}function R_e(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:F$;const n={labels:[],datasets:[]};return $$(n,e.labels),U$(n,e.datasets,t),n}function B$(e,t){return e.getElementsAtEventForMode(t.nativeEvent,"nearest",{intersect:!0},!1)}function A_e(e,t){const{height:n=150,width:r=300,redraw:i=!1,datasetIdKey:o,type:a,data:s,options:l,plugins:c=[],fallbackContent:d,updateMode:f,...p}=e,m=I.useRef(null),v=I.useRef(),y=()=>{m.current&&(v.current=new p0(m.current,{type:a,data:R_e(s,o),options:l&&{...l},plugins:c}),eR(t,v.current))},x=()=>{eR(t,null),v.current&&(v.current.destroy(),v.current=null)};return I.useEffect(()=>{!i&&v.current&&l&&N_e(v.current,l)},[i,l]),I.useEffect(()=>{!i&&v.current&&$$(v.current.config.data,s.labels)},[i,s.labels]),I.useEffect(()=>{!i&&v.current&&s.datasets&&U$(v.current.config.data,s.datasets,o)},[i,s.datasets]),I.useEffect(()=>{v.current&&(i?(x(),setTimeout(y)):v.current.update(f))},[i,l,s.labels,s.datasets,f]),I.useEffect(()=>{v.current&&(x(),setTimeout(y))},[a]),I.useEffect(()=>(y(),()=>x()),[]),Y.createElement("canvas",Object.assign({ref:m,role:"img",height:n,width:r},p),d)}const D_e=I.forwardRef(A_e);function XT(e,t){return p0.register(t),I.forwardRef((n,r)=>Y.createElement(D_e,Object.assign({},n,{ref:r,type:e})))}const I_e=XT("line",_f),F_e=XT("bar",yf),$_e=XT("doughnut",$a),z$=({native:e},[t])=>{if(!(e!=null&&e.target))return;const n=e.target;n.style.cursor=t?"pointer":"default"},V$=({dataset:e,raw:t})=>`${e.label}: ${wn(`${t}`)}`,U_e=({label:e,raw:t})=>`${e}: ${wn(`${t}`)}`,B_e=({chart:e})=>{const{config:t}=e,{labels:n=[],datasets:r=[]}=t.data??{},[{backgroundColor:i}]=r,{defaultColor:o}=t.options??{};return g.jsx("ul",{className:"doughnut-chart-legend",children:n.map((a,s)=>g.jsxs("li",{className:"doughnut-chart-legend__item d-flex",children:[g.jsx("div",{className:"doughnut-chart-legend__item-color",style:{backgroundColor:i[s]??o}}),g.jsx("small",{className:"doughnut-chart-legend__item-text flex-fill",children:a})]},a))})},z_e=e=>[{data:e,backgroundColor:["#97BBCD","#F7464A","#46BFBD","#FDB45C","#949FB1","#57A773","#414066","#08B2E3","#B6C454","#DCDCDC","#463730"],borderColor:mee()?hee:fee,borderWidth:2}],V_e=(e,t)=>({labels:e,datasets:z_e(t)}),H_e=I.memo(({label:e,stats:t})=>{const[n,r]=I.useState(),i=Object.keys(t),o=Object.values(t),a={plugins:{legend:{display:!1},tooltip:{intersect:!0,callbacks:{label:U_e}}}},s=V_e(i,o);return g.jsxs("div",{className:"row",children:[g.jsx("div",{className:"col-sm-12 col-md-7",children:g.jsx($_e,{"aria-label":e,height:300,data:s,options:a,ref:l=>{l&&r(l)}})}),g.jsx("div",{className:"col-sm-12 col-md-5",children:n&&g.jsx(B_e,{chart:n})})]})}),tR=({title:e,stats:t})=>g.jsx(I$,{title:e,children:g.jsx(H_e,{stats:t,label:e})}),W_e={"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"},H$={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"},sn={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},fr={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"},Ea={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class be{static getFirstMatch(t,n){const r=n.match(t);return r&&r.length>0&&r[1]||""}static getSecondMatch(t,n){const r=n.match(t);return r&&r.length>1&&r[2]||""}static matchAndReturnConst(t,n,r){if(t.test(n))return r}static getWindowsVersionName(t){switch(t){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(t){const n=t.split(".").splice(0,2).map(r=>parseInt(r,10)||0);if(n.push(0),n[0]===10)switch(n[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(t){const n=t.split(".").splice(0,2).map(r=>parseInt(r,10)||0);if(n.push(0),!(n[0]===1&&n[1]<5)){if(n[0]===1&&n[1]<6)return"Cupcake";if(n[0]===1&&n[1]>=6)return"Donut";if(n[0]===2&&n[1]<2)return"Eclair";if(n[0]===2&&n[1]===2)return"Froyo";if(n[0]===2&&n[1]>2)return"Gingerbread";if(n[0]===3)return"Honeycomb";if(n[0]===4&&n[1]<1)return"Ice Cream Sandwich";if(n[0]===4&&n[1]<4)return"Jelly Bean";if(n[0]===4&&n[1]>=4)return"KitKat";if(n[0]===5)return"Lollipop";if(n[0]===6)return"Marshmallow";if(n[0]===7)return"Nougat";if(n[0]===8)return"Oreo";if(n[0]===9)return"Pie"}}static getVersionPrecision(t){return t.split(".").length}static compareVersions(t,n,r=!1){const i=be.getVersionPrecision(t),o=be.getVersionPrecision(n);let a=Math.max(i,o),s=0;const l=be.map([t,n],c=>{const d=a-be.getVersionPrecision(c),f=c+new Array(d+1).join(".0");return be.map(f.split("."),p=>new Array(20-p.length).join("0")+p).reverse()});for(r&&(s=a-Math.min(i,o)),a-=1;a>=s;){if(l[0][a]>l[1][a])return 1;if(l[0][a]===l[1][a]){if(a===s)return 0;a-=1}else if(l[0][a]{r[s]=a[s]})}return t}static getBrowserAlias(t){return W_e[t]}static getBrowserTypeByAlias(t){return H$[t]||""}}const Tt=/version\/(\d+(\.?_?\d+)+)/i,Y_e=[{test:[/googlebot/i],describe(e){const t={name:"Googlebot"},n=be.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||be.getFirstMatch(Tt,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){const t={name:"Opera"},n=be.getFirstMatch(Tt,e)||be.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){const t={name:"Opera"},n=be.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||be.getFirstMatch(Tt,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){const t={name:"Samsung Internet for Android"},n=be.getFirstMatch(Tt,e)||be.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe(e){const t={name:"NAVER Whale Browser"},n=be.getFirstMatch(Tt,e)||be.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){const t={name:"MZ Browser"},n=be.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||be.getFirstMatch(Tt,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){const t={name:"Focus"},n=be.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||be.getFirstMatch(Tt,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){const t={name:"Swing"},n=be.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||be.getFirstMatch(Tt,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){const t={name:"Opera Coast"},n=be.getFirstMatch(Tt,e)||be.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(e){const t={name:"Opera Touch"},n=be.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||be.getFirstMatch(Tt,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){const t={name:"Yandex Browser"},n=be.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||be.getFirstMatch(Tt,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){const t={name:"UC Browser"},n=be.getFirstMatch(Tt,e)||be.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){const t={name:"Maxthon"},n=be.getFirstMatch(Tt,e)||be.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){const t={name:"Epiphany"},n=be.getFirstMatch(Tt,e)||be.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){const t={name:"Puffin"},n=be.getFirstMatch(Tt,e)||be.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){const t={name:"Sleipnir"},n=be.getFirstMatch(Tt,e)||be.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe(e){const t={name:"K-Meleon"},n=be.getFirstMatch(Tt,e)||be.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){const t={name:"WeChat"},n=be.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||be.getFirstMatch(Tt,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe(e){const t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=be.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||be.getFirstMatch(Tt,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){const t={name:"Internet Explorer"},n=be.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){const t={name:"Microsoft Edge"},n=be.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe(e){const t={name:"Microsoft Edge"},n=be.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){const t={name:"Vivaldi"},n=be.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){const t={name:"SeaMonkey"},n=be.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){const t={name:"Sailfish"},n=be.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe(e){const t={name:"Amazon Silk"},n=be.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){const t={name:"PhantomJS"},n=be.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){const t={name:"SlimerJS"},n=be.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t={name:"BlackBerry"},n=be.getFirstMatch(Tt,e)||be.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe(e){const t={name:"WebOS Browser"},n=be.getFirstMatch(Tt,e)||be.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe(e){const t={name:"Bada"},n=be.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){const t={name:"Tizen"},n=be.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||be.getFirstMatch(Tt,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){const t={name:"QupZilla"},n=be.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||be.getFirstMatch(Tt,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){const t={name:"Firefox"},n=be.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe(e){const t={name:"Electron"},n=be.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe(e){const t={name:"Miui"},n=be.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe(e){const t={name:"Chromium"},n=be.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||be.getFirstMatch(Tt,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){const t={name:"Chrome"},n=be.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe(e){const t={name:"Google Search"},n=be.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t={name:"Android Browser"},n=be.getFirstMatch(Tt,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){const t={name:"PlayStation 4"},n=be.getFirstMatch(Tt,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){const t={name:"Safari"},n=be.getFirstMatch(Tt,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){const t=/^(.*)\/(.*) /,n=/^(.*)\/(.*)[ \t]\((.*)/,r=e.search("\\(")!==-1?n:t;return{name:be.getFirstMatch(r,e),version:be.getSecondMatch(r,e)}}}],G_e=[{test:[/Roku\/DVP/],describe(e){const t=be.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:fr.Roku,version:t}}},{test:[/windows phone/i],describe(e){const t=be.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:fr.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){const t=be.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=be.getWindowsVersionName(t);return{name:fr.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){const t={name:fr.iOS},n=be.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){const t=be.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=be.getMacOSVersionName(t),r={name:fr.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){const t=be.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:fr.iOS,version:t}}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t=be.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=be.getAndroidVersionName(t),r={name:fr.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){const t=be.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:fr.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t=be.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||be.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||be.getFirstMatch(/\bbb(\d+)/i,e);return{name:fr.BlackBerry,version:t}}},{test:[/bada/i],describe(e){const t=be.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:fr.Bada,version:t}}},{test:[/tizen/i],describe(e){const t=be.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:fr.Tizen,version:t}}},{test:[/linux/i],describe(){return{name:fr.Linux}}},{test:[/CrOS/],describe(){return{name:fr.ChromeOS}}},{test:[/PlayStation 4/],describe(e){const t=be.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:fr.PlayStation4,version:t}}}],q_e=[{test:[/googlebot/i],describe(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe(e){const t=be.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:sn.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:sn.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:sn.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:sn.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:sn.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:sn.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:sn.tablet}}},{test(e){const t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){const t=be.getFirstMatch(/(ipod|iphone)/i,e);return{type:sn.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:sn.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe(){return{type:sn.mobile}}},{test(e){return e.getBrowserName(!0)==="blackberry"},describe(){return{type:sn.mobile,vendor:"BlackBerry"}}},{test(e){return e.getBrowserName(!0)==="bada"},describe(){return{type:sn.mobile}}},{test(e){return e.getBrowserName()==="windows phone"},describe(){return{type:sn.mobile,vendor:"Microsoft"}}},{test(e){const t=Number(String(e.getOSVersion()).split(".")[0]);return e.getOSName(!0)==="android"&&t>=3},describe(){return{type:sn.tablet}}},{test(e){return e.getOSName(!0)==="android"},describe(){return{type:sn.mobile}}},{test(e){return e.getOSName(!0)==="macos"},describe(){return{type:sn.desktop,vendor:"Apple"}}},{test(e){return e.getOSName(!0)==="windows"},describe(){return{type:sn.desktop}}},{test(e){return e.getOSName(!0)==="linux"},describe(){return{type:sn.desktop}}},{test(e){return e.getOSName(!0)==="playstation 4"},describe(){return{type:sn.tv}}},{test(e){return e.getOSName(!0)==="roku"},describe(){return{type:sn.tv}}}],Z_e=[{test(e){return e.getBrowserName(!0)==="microsoft edge"},describe(e){if(/\sedg\//i.test(e))return{name:Ea.Blink};const t=be.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:Ea.EdgeHTML,version:t}}},{test:[/trident/i],describe(e){const t={name:Ea.Trident},n=be.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){return e.test(/presto/i)},describe(e){const t={name:Ea.Presto},n=be.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe(e){const t={name:Ea.Gecko},n=be.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:Ea.Blink}}},{test:[/(apple)?webkit/i],describe(e){const t={name:Ea.WebKit},n=be.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];class nR{constructor(t,n=!1){if(t==null||t==="")throw new Error("UserAgent parameter can't be empty");this._ua=t,this.parsedResult={},n!==!0&&this.parse()}getUA(){return this._ua}test(t){return t.test(this._ua)}parseBrowser(){this.parsedResult.browser={};const t=be.find(Y_e,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(t){return t?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};const t=be.find(G_e,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os}getOSName(t){const{name:n}=this.getOS();return t?String(n).toLowerCase()||"":n||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(t=!1){const{type:n}=this.getPlatform();return t?String(n).toLowerCase()||"":n||""}parsePlatform(){this.parsedResult.platform={};const t=be.find(q_e,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(t){return t?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};const t=be.find(Z_e,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return be.assign({},this.parsedResult)}satisfies(t){const n={};let r=0;const i={};let o=0;if(Object.keys(t).forEach(a=>{const s=t[a];typeof s=="string"?(i[a]=s,o+=1):typeof s=="object"&&(n[a]=s,r+=1)}),r>0){const a=Object.keys(n),s=be.find(a,c=>this.isOS(c));if(s){const c=this.satisfies(n[s]);if(c!==void 0)return c}const l=be.find(a,c=>this.isPlatform(c));if(l){const c=this.satisfies(n[l]);if(c!==void 0)return c}}if(o>0){const a=Object.keys(i),s=be.find(a,l=>this.isBrowser(l,!0));if(s!==void 0)return this.compareVersion(i[s])}}isBrowser(t,n=!1){const r=this.getBrowserName().toLowerCase();let i=t.toLowerCase();const o=be.getBrowserTypeByAlias(i);return n&&o&&(i=o.toLowerCase()),i===r}compareVersion(t){let n=[0],r=t,i=!1;const o=this.getBrowserVersion();if(typeof o=="string")return t[0]===">"||t[0]==="<"?(r=t.substr(1),t[1]==="="?(i=!0,r=t.substr(2)):n=[],t[0]===">"?n.push(1):n.push(-1)):t[0]==="="?r=t.substr(1):t[0]==="~"&&(i=!0,r=t.substr(1)),n.indexOf(be.compareVersions(o,r,i))>-1}isOS(t){return this.getOSName(!0)===String(t).toLowerCase()}isPlatform(t){return this.getPlatformType(!0)===String(t).toLowerCase()}isEngine(t){return this.getEngineName(!0)===String(t).toLowerCase()}is(t,n=!1){return this.isBrowser(t,n)||this.isOS(t)||this.isPlatform(t)}some(t=[]){return t.some(n=>this.is(n))}}/*! * Bowser - a browser detector * https://github.com/lancedikson/bowser * MIT License | (c) Dustin Diaz 2012-2015 * MIT License | (c) Denis Demchenko 2015-2019 - */class Z_e{static getParser(t,n=!1){if(typeof t!="string")throw new Error("UserAgent should be a string");return new nR(t,n)}static parse(t){return new nR(t).getResult()}static get BROWSER_MAP(){return H$}static get ENGINE_MAP(){return Ea}static get OS_MAP(){return fr}static get PLATFORMS_MAP(){return sn}}const Fm="Others",K_e=["Android Browser","Chrome","Chromium","Firefox","Internet Explorer","Microsoft Edge","Opera","Safari","Samsung Internet for Android","Vivaldi","WeChat"],Q_e=e=>{if(!uo(e))return{browser:Fm,os:Fm};const{browser:{name:t},os:{name:n}}=Z_e.parse(e);return{os:n??Fm,browser:t&&K_e.includes(t)?t:Fm}},X_e=e=>{var t;return uo(e)?((t=e.split("/")[e.includes("://")?2:0])==null?void 0:t.split(":")[0])??"":"Direct"},JT=(e,t)=>Object.values({...x8(t,t.map(()=>0)),...e}),rR={monthly:"Month",weekly:"Week",daily:"Day",hourly:"Hour"},J_e={hourly:e=>({hours:e}),daily:e=>({days:e}),weekly:e=>({weeks:e}),monthly:e=>({months:e})},ebe={hourly:ede,daily:mT,weekly:rde,monthly:Kv},eO={hourly:e=>Tu(e,"yyyy-MM-dd HH:00"),daily:e=>Xs(e),weekly(e){const t=Xs(vh(e)),n=Xs(ade(e));return`${t} - ${n}`},monthly:e=>Tu(e,"yyyy-MM")},tbe=e=>{const t=new Date,n=ra(e);return uT([[()=>mT(t,n)<=2,yb("hourly")],[()=>Kv(t,n)<=1,yb("daily")],[()=>Kv(t,n)<=6,yb("weekly")]])()??"monthly"},iR=(e,t)=>_8(n=>eO[e](ra(n.date)),t),nbe=(e,t)=>t.reduce((n,r)=>{const i=eO[e](ra(r.date));return n[i]=n[i]??[],n[i].push(r),n},{}),rbe=(e,t)=>{const n=ebe[e],r=eO[e],i=ra(t[0].date),o=ra(t[t.length-1].date),a=n(i,o),s=J_e[e];return[r(o),...CT(a,l=>r(Vue(o,s(l))))]},ibe=(e,t,n,r)=>{if(r)return[Object.keys(t),Object.values(t)];const i=rbe(n,e);return[i,JT(t,i)]},oR=(e,t,n)=>({label:t,data:e,fill:!1,tension:.2,borderColor:n,backgroundColor:n});let Hb=null;const obe=(e,t,[n],r)=>{if(!r||!n)return;const{index:i}=n;Hb===e[i]?(r([]),Hb=null):(r(e[i]&&t[e[i]]?t[e[i]]:[]),Hb=e[i]??null)},abe=({title:e,visits:t,highlightedVisits:n,highlightedLabel:r="Selected",setSelectedVisits:i})=>{const[o,a]=I.useState(t.length>0?tbe(t[t.length-1].date):"monthly"),[s,l]=Sn(!0),c=I.useRef(null),d=I.useRef(null),f=I.useMemo(()=>nbe(o,t),[o,t]),p=I.useMemo(()=>iR(o,Xx(t)),[o,t]),[m,v]=I.useMemo(()=>ibe(t,p,o,s),[t,p,o,s]),y=I.useMemo(()=>JT(iR(o,Xx(n)),m),[n,o,m]),x=()=>{const E=oR(v,"Visits",bE);if(n.length===0)return[E];const O=oR(y,r,y6);return[E,O]},_=()=>({labels:m,datasets:x()}),w={maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{intersect:!1,axis:"x",callbacks:{label:V$}}},scales:{y:{beginAtZero:!0,ticks:{precision:0,callback:wn}},x:{title:{display:!0,text:rR[o]}}},onHover:z$},S=E=>g.jsx(D_e,{"aria-label":e,ref:E,data:_(),options:w,onClick:O=>obe(m,f,B$(E.current,O),i)});return g.jsxs(Gr,{children:[g.jsxs(hu,{role:"heading","aria-level":4,children:[e,g.jsx("div",{className:"float-end",children:g.jsxs(Vh,{children:[g.jsx(Fu,{caret:!0,color:"link",className:"btn-sm p-0",children:"Group by"}),g.jsx(Iu,{end:!0,children:Object.entries(rR).map(([E,O])=>g.jsx(Ue,{active:o===E,onClick:()=>a(E),children:O},E))})]})}),g.jsx("div",{className:"float-end me-2",children:g.jsx(pu,{checked:s,onChange:l,children:g.jsx("small",{children:"Skip dates with no visits"})})})]}),g.jsxs(fu,{className:"line-chart-card__body",children:[n.length>0&&S(c),n.length===0&&S(d)]})]})},sbe=({toggleClassName:e,ranges:t,value:n,setValue:r})=>g.jsxs(Vh,{children:[g.jsx(Fu,{caret:!0,color:"link",className:e,children:"Paginate"}),g.jsxs(Iu,{end:!0,children:[t.map(i=>g.jsxs(Ue,{active:i===n,onClick:()=>r(i),children:[g.jsx("b",{children:i})," items per page"]},i)),g.jsx(Ue,{divider:!0,tag:"hr"}),g.jsx(Ue,{disabled:n===1/0,onClick:()=>r(1/0),children:g.jsx("i",{children:"Clear pagination"})})]})]}),lbe=e=>e.startsWith("hidden")?"":e,cbe=e=>!!e&&Object.keys(e).length>0,ube=e=>e.length>20?e.length*10:void 0,dbe=(e,t,n)=>{const r={data:e,label:n?"Non-selected":"Visits",backgroundColor:cee,borderColor:bE,borderWidth:2};return t.every(i=>i===0)?[r]:[r,{label:n??"Selected",data:t,backgroundColor:uee,borderColor:y6,borderWidth:2}]},fbe=(e,t,n,r)=>({labels:e,datasets:dbe(t,n,r)}),hbe=(e,[t],n)=>{!n||!t||n(e[t.index])},pbe=({label:e,stats:t,highlightedStats:n,highlightedLabel:r,onClick:i,max:o})=>{const a=ta(t).map(lbe),s=h8(cbe(n)?ta(n).reduce((y,x)=>(y[x]&&(y[x]-=n[x]),y),{...t}):t),l=JT(n??{},a),c=I.useRef(null),d=I.useRef(null),f={plugins:{legend:{display:!1},tooltip:{mode:"y",filter:({label:y})=>y!=="",callbacks:{label:V$}}},scales:{x:{beginAtZero:!0,stacked:!0,max:o,ticks:{precision:0,callback:wn}},y:{stacked:!0}},onHover:z$,indexAxis:"y"},p=fbe(a,s,l,r),m=ube(a),v=(y,x)=>g.jsx(I_e,{"aria-label":e,ref:x,data:p,options:f,height:m,onClick:_=>hbe(a,B$(x.current,_),i)},`${m}_${y}`);return g.jsxs(g.Fragment,{children:[n!==void 0&&v("with_stats",c),n===void 0&&v("without_stats",d)]})},mbe=e=>Gv(e)==="String"?Eue(e):e,aR=([e])=>e,sR=([,e])=>e,$m=({stats:e,highlightedStats:t,title:n,sortingItems:r,extraHeaderContent:i,withPagination:o=!0,...a})=>{const[s,l]=I.useState({}),[c,d]=I.useState(1),[f,p]=I.useState(50),m=(k,j)=>{const A=vM(k),U=s.field?wue(Vr(s.field===Object.keys(j)[0]?aR:sR,mbe),A):A;return!s.dir||s.dir==="ASC"?U:Xx(U)},v=k=>{const j=k[c-1];if(c[`hidden_${U}`,0])]},y=k=>g.jsx(WT,{currentPage:c,pagesCount:k,setCurrentPage:d}),x=(k,j,A)=>{const U=m(k,j),R=U.map(aR),V=A&&vM({...x8(R,R.map(()=>0)),...A});if(U.length<=f)return{currentPageStats:km(U),currentPageHighlightedStats:V&&km(V)};const W=gh(f,U),X=V&&gh(f,V);return{currentPageStats:km(v(W)),currentPageHighlightedStats:X&&km(v(X)),pagination:y(W.length),max:Lpe(Math.max(...U.map(sR)))}},{currentPageStats:_,currentPageHighlightedStats:w,pagination:S,max:E}=x(e,r,t&&Object.keys(t).length>0?t:void 0),O=Object.keys(_);return g.jsx(I$,{title:()=>g.jsxs(g.Fragment,{children:[n,g.jsx("div",{className:"float-end",children:g.jsx(Wh,{isButton:!1,right:!0,items:r,order:s,onChange:(k,j)=>{l({field:k,dir:j}),d(1)}})}),o&&Object.keys(e).length>50&&g.jsx("div",{className:"float-end",children:g.jsx(sbe,{toggleClassName:"btn-sm p-0 me-3",ranges:[50,100,200,500],value:f,setValue:k=>{p(k),d(1)}})}),i&&g.jsx("div",{className:"float-end",children:i(S?O:void 0)})]}),footer:S,children:g.jsx(pbe,{stats:_,highlightedStats:w,max:E,label:n,...a})})},gbe=()=>{const e=So(),t=aF(),{filtering:n,domain:r}=I.useMemo(()=>{const{startDate:o,endDate:a,orphanVisitsType:s,excludeBots:l,domain:c}=t;return{domain:c,filtering:{dateRange:o!=null||a!=null?eF(o,a):void 0,visitsFilter:{orphanVisitsType:s,excludeBots:Wu(l)?void 0:l==="true"}}}},[t]),i=I.useCallback(o=>{const{dateRange:a,visitsFilter:s}=pue(n,o),{excludeBots:l,orphanVisitsType:c}=s,d={startDate:(a==null?void 0:a.startDate)&&fs(a.startDate)||"",endDate:(a==null?void 0:a.endDate)&&fs(a.endDate)||"",excludeBots:l===void 0?void 0:oF(l),orphanVisitsType:c,domain:r},f=c0(d),p=qi(f)?"":`?${f}`;e(p,{replace:!0,relative:"route"})},[n,e,r]);return[n,i]};function W$(e,t){const n=I.useRef(t);I.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 vbe=1;function ybe(e){return Object.freeze({__version:vbe,map:e})}function _be(e,t){return Object.freeze({...e,...t})}const Y$=I.createContext(null),G$=Y$.Provider;function q$(){const e=I.useContext(Y$);if(e==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of ");return e}function bbe(e){function t(n,r){const{instance:i,context:o}=e(n).current;return I.useImperativeHandle(r,()=>i),n.children==null?null:Y.createElement(G$,{value:o},n.children)}return I.forwardRef(t)}function wbe(e){function t(n,r){const[i,o]=I.useState(!1),{instance:a}=e(n,o).current;I.useImperativeHandle(r,()=>a),I.useEffect(function(){i&&a.update()},[a,i,n.children]);const s=a._contentNode;return s?jl.createPortal(n.children,s):null}return I.forwardRef(t)}function xbe(e){function t(n,r){const{instance:i}=e(n).current;return I.useImperativeHandle(r,()=>i),null}return I.forwardRef(t)}function Z$(e,t){const n=I.useRef();I.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 tO(e,t){const n=e.pane??t.pane;return n?{...e,pane:n}:e}function Sbe(e,t){return function(n,r){const i=q$(),o=e(tO(n,i),i);return W$(i.map,n.attribution),Z$(o.current,n.eventHandlers),t(o.current,i,n,r),o}}var S2={exports:{}};/* @preserve + */class K_e{static getParser(t,n=!1){if(typeof t!="string")throw new Error("UserAgent should be a string");return new nR(t,n)}static parse(t){return new nR(t).getResult()}static get BROWSER_MAP(){return H$}static get ENGINE_MAP(){return Ea}static get OS_MAP(){return fr}static get PLATFORMS_MAP(){return sn}}const Fm="Others",Q_e=["Android Browser","Chrome","Chromium","Firefox","Internet Explorer","Microsoft Edge","Opera","Safari","Samsung Internet for Android","Vivaldi","WeChat"],X_e=e=>{if(!uo(e))return{browser:Fm,os:Fm};const{browser:{name:t},os:{name:n}}=K_e.parse(e);return{os:n??Fm,browser:t&&Q_e.includes(t)?t:Fm}},J_e=e=>{var t;return uo(e)?((t=e.split("/")[e.includes("://")?2:0])==null?void 0:t.split(":")[0])??"":"Direct"},JT=(e,t)=>Object.values({...x8(t,t.map(()=>0)),...e}),rR={monthly:"Month",weekly:"Week",daily:"Day",hourly:"Hour"},ebe={hourly:e=>({hours:e}),daily:e=>({days:e}),weekly:e=>({weeks:e}),monthly:e=>({months:e})},tbe={hourly:tde,daily:mT,weekly:ide,monthly:Kv},eO={hourly:e=>Tu(e,"yyyy-MM-dd HH:00"),daily:e=>Xs(e),weekly(e){const t=Xs(vh(e)),n=Xs(sde(e));return`${t} - ${n}`},monthly:e=>Tu(e,"yyyy-MM")},nbe=e=>{const t=new Date,n=ra(e);return uT([[()=>mT(t,n)<=2,yb("hourly")],[()=>Kv(t,n)<=1,yb("daily")],[()=>Kv(t,n)<=6,yb("weekly")]])()??"monthly"},iR=(e,t)=>_8(n=>eO[e](ra(n.date)),t),rbe=(e,t)=>t.reduce((n,r)=>{const i=eO[e](ra(r.date));return n[i]=n[i]??[],n[i].push(r),n},{}),ibe=(e,t)=>{const n=tbe[e],r=eO[e],i=ra(t[0].date),o=ra(t[t.length-1].date),a=n(i,o),s=ebe[e];return[r(o),...CT(a,l=>r(Hue(o,s(l))))]},obe=(e,t,n,r)=>{if(r)return[Object.keys(t),Object.values(t)];const i=ibe(n,e);return[i,JT(t,i)]},oR=(e,t,n)=>({label:t,data:e,fill:!1,tension:.2,borderColor:n,backgroundColor:n});let Hb=null;const abe=(e,t,[n],r)=>{if(!r||!n)return;const{index:i}=n;Hb===e[i]?(r([]),Hb=null):(r(e[i]&&t[e[i]]?t[e[i]]:[]),Hb=e[i]??null)},sbe=({title:e,visits:t,highlightedVisits:n,highlightedLabel:r="Selected",setSelectedVisits:i})=>{const[o,a]=I.useState(t.length>0?nbe(t[t.length-1].date):"monthly"),[s,l]=Sn(!0),c=I.useRef(null),d=I.useRef(null),f=I.useMemo(()=>rbe(o,t),[o,t]),p=I.useMemo(()=>iR(o,Xx(t)),[o,t]),[m,v]=I.useMemo(()=>obe(t,p,o,s),[t,p,o,s]),y=I.useMemo(()=>JT(iR(o,Xx(n)),m),[n,o,m]),x=()=>{const E=oR(v,"Visits",bE);if(n.length===0)return[E];const O=oR(y,r,y6);return[E,O]},_=()=>({labels:m,datasets:x()}),w={maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{intersect:!1,axis:"x",callbacks:{label:V$}}},scales:{y:{beginAtZero:!0,ticks:{precision:0,callback:wn}},x:{title:{display:!0,text:rR[o]}}},onHover:z$},S=E=>g.jsx(I_e,{"aria-label":e,ref:E,data:_(),options:w,onClick:O=>abe(m,f,B$(E.current,O),i)});return g.jsxs(Gr,{children:[g.jsxs(hu,{role:"heading","aria-level":4,children:[e,g.jsx("div",{className:"float-end",children:g.jsxs(Vh,{children:[g.jsx(Fu,{caret:!0,color:"link",className:"btn-sm p-0",children:"Group by"}),g.jsx(Iu,{end:!0,children:Object.entries(rR).map(([E,O])=>g.jsx(Ue,{active:o===E,onClick:()=>a(E),children:O},E))})]})}),g.jsx("div",{className:"float-end me-2",children:g.jsx(pu,{checked:s,onChange:l,children:g.jsx("small",{children:"Skip dates with no visits"})})})]}),g.jsxs(fu,{className:"line-chart-card__body",children:[n.length>0&&S(c),n.length===0&&S(d)]})]})},lbe=({toggleClassName:e,ranges:t,value:n,setValue:r})=>g.jsxs(Vh,{children:[g.jsx(Fu,{caret:!0,color:"link",className:e,children:"Paginate"}),g.jsxs(Iu,{end:!0,children:[t.map(i=>g.jsxs(Ue,{active:i===n,onClick:()=>r(i),children:[g.jsx("b",{children:i})," items per page"]},i)),g.jsx(Ue,{divider:!0,tag:"hr"}),g.jsx(Ue,{disabled:n===1/0,onClick:()=>r(1/0),children:g.jsx("i",{children:"Clear pagination"})})]})]}),cbe=e=>e.startsWith("hidden")?"":e,ube=e=>!!e&&Object.keys(e).length>0,dbe=e=>e.length>20?e.length*10:void 0,fbe=(e,t,n)=>{const r={data:e,label:n?"Non-selected":"Visits",backgroundColor:uee,borderColor:bE,borderWidth:2};return t.every(i=>i===0)?[r]:[r,{label:n??"Selected",data:t,backgroundColor:dee,borderColor:y6,borderWidth:2}]},hbe=(e,t,n,r)=>({labels:e,datasets:fbe(t,n,r)}),pbe=(e,[t],n)=>{!n||!t||n(e[t.index])},mbe=({label:e,stats:t,highlightedStats:n,highlightedLabel:r,onClick:i,max:o})=>{const a=ta(t).map(cbe),s=h8(ube(n)?ta(n).reduce((y,x)=>(y[x]&&(y[x]-=n[x]),y),{...t}):t),l=JT(n??{},a),c=I.useRef(null),d=I.useRef(null),f={plugins:{legend:{display:!1},tooltip:{mode:"y",filter:({label:y})=>y!=="",callbacks:{label:V$}}},scales:{x:{beginAtZero:!0,stacked:!0,max:o,ticks:{precision:0,callback:wn}},y:{stacked:!0}},onHover:z$,indexAxis:"y"},p=hbe(a,s,l,r),m=dbe(a),v=(y,x)=>g.jsx(F_e,{"aria-label":e,ref:x,data:p,options:f,height:m,onClick:_=>pbe(a,B$(x.current,_),i)},`${m}_${y}`);return g.jsxs(g.Fragment,{children:[n!==void 0&&v("with_stats",c),n===void 0&&v("without_stats",d)]})},gbe=e=>Gv(e)==="String"?Tue(e):e,aR=([e])=>e,sR=([,e])=>e,$m=({stats:e,highlightedStats:t,title:n,sortingItems:r,extraHeaderContent:i,withPagination:o=!0,...a})=>{const[s,l]=I.useState({}),[c,d]=I.useState(1),[f,p]=I.useState(50),m=(k,j)=>{const A=vM(k),U=s.field?xue(Vr(s.field===Object.keys(j)[0]?aR:sR,gbe),A):A;return!s.dir||s.dir==="ASC"?U:Xx(U)},v=k=>{const j=k[c-1];if(c[`hidden_${U}`,0])]},y=k=>g.jsx(WT,{currentPage:c,pagesCount:k,setCurrentPage:d}),x=(k,j,A)=>{const U=m(k,j),R=U.map(aR),V=A&&vM({...x8(R,R.map(()=>0)),...A});if(U.length<=f)return{currentPageStats:km(U),currentPageHighlightedStats:V&&km(V)};const W=gh(f,U),X=V&&gh(f,V);return{currentPageStats:km(v(W)),currentPageHighlightedStats:X&&km(v(X)),pagination:y(W.length),max:jpe(Math.max(...U.map(sR)))}},{currentPageStats:_,currentPageHighlightedStats:w,pagination:S,max:E}=x(e,r,t&&Object.keys(t).length>0?t:void 0),O=Object.keys(_);return g.jsx(I$,{title:()=>g.jsxs(g.Fragment,{children:[n,g.jsx("div",{className:"float-end",children:g.jsx(Wh,{isButton:!1,right:!0,items:r,order:s,onChange:(k,j)=>{l({field:k,dir:j}),d(1)}})}),o&&Object.keys(e).length>50&&g.jsx("div",{className:"float-end",children:g.jsx(lbe,{toggleClassName:"btn-sm p-0 me-3",ranges:[50,100,200,500],value:f,setValue:k=>{p(k),d(1)}})}),i&&g.jsx("div",{className:"float-end",children:i(S?O:void 0)})]}),footer:S,children:g.jsx(mbe,{stats:_,highlightedStats:w,max:E,label:n,...a})})},vbe=()=>{const e=So(),t=aF(),{filtering:n,domain:r}=I.useMemo(()=>{const{startDate:o,endDate:a,orphanVisitsType:s,excludeBots:l,domain:c}=t;return{domain:c,filtering:{dateRange:o!=null||a!=null?eF(o,a):void 0,visitsFilter:{orphanVisitsType:s,excludeBots:Wu(l)?void 0:l==="true"}}}},[t]),i=I.useCallback(o=>{const{dateRange:a,visitsFilter:s}=mue(n,o),{excludeBots:l,orphanVisitsType:c}=s,d={startDate:(a==null?void 0:a.startDate)&&fs(a.startDate)||"",endDate:(a==null?void 0:a.endDate)&&fs(a.endDate)||"",excludeBots:l===void 0?void 0:oF(l),orphanVisitsType:c,domain:r},f=c0(d),p=qi(f)?"":`?${f}`;e(p,{replace:!0,relative:"route"})},[n,e,r]);return[n,i]};function W$(e,t){const n=I.useRef(t);I.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 ybe=1;function _be(e){return Object.freeze({__version:ybe,map:e})}function bbe(e,t){return Object.freeze({...e,...t})}const Y$=I.createContext(null),G$=Y$.Provider;function q$(){const e=I.useContext(Y$);if(e==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of ");return e}function wbe(e){function t(n,r){const{instance:i,context:o}=e(n).current;return I.useImperativeHandle(r,()=>i),n.children==null?null:Y.createElement(G$,{value:o},n.children)}return I.forwardRef(t)}function xbe(e){function t(n,r){const[i,o]=I.useState(!1),{instance:a}=e(n,o).current;I.useImperativeHandle(r,()=>a),I.useEffect(function(){i&&a.update()},[a,i,n.children]);const s=a._contentNode;return s?jl.createPortal(n.children,s):null}return I.forwardRef(t)}function Sbe(e){function t(n,r){const{instance:i}=e(n).current;return I.useImperativeHandle(r,()=>i),null}return I.forwardRef(t)}function Z$(e,t){const n=I.useRef();I.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 tO(e,t){const n=e.pane??t.pane;return n?{...e,pane:n}:e}function Ebe(e,t){return function(n,r){const i=q$(),o=e(tO(n,i),i);return W$(i.map,n.attribution),Z$(o.current,n.eventHandlers),t(o.current,i,n,r),o}}var S2={exports:{}};/* @preserve * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade - */(function(e,t){(function(n,r){r(t)})(Ac,function(n){var r="1.9.4";function i(u){var h,b,T,P;for(b=1,T=arguments.length;b"u"||!L||!L.Mixin)){u=S(u)?u:[u];for(var h=0;h0?Math.floor(u):Math.ceil(u)};K.prototype={clone:function(){return new K(this.x,this.y)},add:function(u){return this.clone()._add(D(u))},_add:function(u){return this.x+=u.x,this.y+=u.y,this},subtract:function(u){return this.clone()._subtract(D(u))},_subtract:function(u){return this.x-=u.x,this.y-=u.y,this},divideBy:function(u){return this.clone()._divideBy(u)},_divideBy:function(u){return this.x/=u,this.y/=u,this},multiplyBy:function(u){return this.clone()._multiplyBy(u)},_multiplyBy:function(u){return this.x*=u,this.y*=u,this},scaleBy:function(u){return new K(this.x*u.x,this.y*u.y)},unscaleBy:function(u){return new K(this.x/u.x,this.y/u.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=F(this.x),this.y=F(this.y),this},distanceTo:function(u){u=D(u);var h=u.x-this.x,b=u.y-this.y;return Math.sqrt(h*h+b*b)},equals:function(u){return u=D(u),u.x===this.x&&u.y===this.y},contains:function(u){return u=D(u),Math.abs(u.x)<=Math.abs(this.x)&&Math.abs(u.y)<=Math.abs(this.y)},toString:function(){return"Point("+p(this.x)+", "+p(this.y)+")"}};function D(u,h,b){return u instanceof K?u:S(u)?new K(u[0],u[1]):u==null?u:typeof u=="object"&&"x"in u&&"y"in u?new K(u.x,u.y):new K(u,h,b)}function H(u,h){if(u)for(var b=h?[u,h]:u,T=0,P=b.length;T=this.min.x&&b.x<=this.max.x&&h.y>=this.min.y&&b.y<=this.max.y},intersects:function(u){u=ie(u);var h=this.min,b=this.max,T=u.min,P=u.max,B=P.x>=h.x&&T.x<=b.x,oe=P.y>=h.y&&T.y<=b.y;return B&&oe},overlaps:function(u){u=ie(u);var h=this.min,b=this.max,T=u.min,P=u.max,B=P.x>h.x&&T.xh.y&&T.y=h.lat&&P.lat<=b.lat&&T.lng>=h.lng&&P.lng<=b.lng},intersects:function(u){u=q(u);var h=this._southWest,b=this._northEast,T=u.getSouthWest(),P=u.getNorthEast(),B=P.lat>=h.lat&&T.lat<=b.lat,oe=P.lng>=h.lng&&T.lng<=b.lng;return B&&oe},overlaps:function(u){u=q(u);var h=this._southWest,b=this._northEast,T=u.getSouthWest(),P=u.getNorthEast(),B=P.lat>h.lat&&T.lath.lng&&T.lng1,on=function(){var u=!1;try{var h=Object.defineProperty({},"passive",{get:function(){u=!0}});window.addEventListener("testPassiveEventSupport",f,h),window.removeEventListener("testPassiveEventSupport",f,h)}catch{}return u}(),ur=function(){return!!document.createElement("canvas").getContext}(),zn=!!(document.createElementNS&&Me("svg").createSVGRect),Vn=!!zn&&function(){var u=document.createElement("div");return u.innerHTML="",(u.firstChild&&u.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),vn=!zn&&function(){try{var u=document.createElement("div");u.innerHTML='';var h=u.firstChild;return h.style.behavior="url(#default#VML)",h&&typeof h.adj=="object"}catch{return!1}}(),Oi=navigator.platform.indexOf("Mac")===0,Ci=navigator.platform.indexOf("Linux")===0;function Hn(u){return navigator.userAgent.toLowerCase().indexOf(u)>=0}var ze={ie:_e,ielt9:Se,edge:ke,webkit:Ce,android:je,android23:ce,androidStock:ye,opera:ve,chrome:xe,gecko:Le,safari:Ae,phantom:Xe,opera12:tt,win:Ge,ie3d:Xt,webkit3d:Vt,gecko3d:Tn,any3d:cr,mobile:Zi,mobileWebkit:Bn,mobileWebkit3d:Qu,msPointer:Ki,pointer:fp,touch:pp,touchNative:hp,mobileOpera:Xu,mobileGecko:Ss,retina:fn,passiveEvents:on,canvas:ur,svg:zn,vml:vn,inlineSvg:Vn,mac:Oi,linux:Ci},hO=ze.msPointer?"MSPointerDown":"pointerdown",pO=ze.msPointer?"MSPointerMove":"pointermove",mO=ze.msPointer?"MSPointerUp":"pointerup",gO=ze.msPointer?"MSPointerCancel":"pointercancel",R0={touchstart:hO,touchmove:pO,touchend:mO,touchcancel:gO},vO={touchstart:i7,touchmove:mp,touchend:mp,touchcancel:mp},Hl={},yO=!1;function JU(u,h,b){return h==="touchstart"&&r7(),vO[h]?(b=vO[h].bind(this,b),u.addEventListener(R0[h],b,!1),b):(console.warn("wrong event specified:",h),f)}function e7(u,h,b){if(!R0[h]){console.warn("wrong event specified:",h);return}u.removeEventListener(R0[h],b,!1)}function t7(u){Hl[u.pointerId]=u}function n7(u){Hl[u.pointerId]&&(Hl[u.pointerId]=u)}function _O(u){delete Hl[u.pointerId]}function r7(){yO||(document.addEventListener(hO,t7,!0),document.addEventListener(pO,n7,!0),document.addEventListener(mO,_O,!0),document.addEventListener(gO,_O,!0),yO=!0)}function mp(u,h){if(h.pointerType!==(h.MSPOINTER_TYPE_MOUSE||"mouse")){h.touches=[];for(var b in Hl)h.touches.push(Hl[b]);h.changedTouches=[h],u(h)}}function i7(u,h){h.MSPOINTER_TYPE_TOUCH&&h.pointerType===h.MSPOINTER_TYPE_TOUCH&&Wn(h),mp(u,h)}function o7(u){var h={},b,T;for(T in u)b=u[T],h[T]=b&&b.bind?b.bind(u):b;return u=h,h.type="dblclick",h.detail=2,h.isTrusted=!1,h._simulated=!0,h}var a7=200;function s7(u,h){u.addEventListener("dblclick",h);var b=0,T;function P(B){if(B.detail!==1){T=B.detail;return}if(!(B.pointerType==="mouse"||B.sourceCapabilities&&!B.sourceCapabilities.firesTouchEvents)){var oe=EO(B);if(!(oe.some(function(pe){return pe instanceof HTMLLabelElement&&pe.attributes.for})&&!oe.some(function(pe){return pe instanceof HTMLInputElement||pe instanceof HTMLSelectElement}))){var de=Date.now();de-b<=a7?(T++,T===2&&h(o7(B))):T=1,b=de}}}return u.addEventListener("click",P),{dblclick:h,simDblclick:P}}function l7(u,h){u.removeEventListener("dblclick",h.dblclick),u.removeEventListener("click",h.simDblclick)}var A0=yp(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Ju=yp(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),bO=Ju==="webkitTransition"||Ju==="OTransition"?Ju+"End":"transitionend";function wO(u){return typeof u=="string"?document.getElementById(u):u}function ed(u,h){var b=u.style[h]||u.currentStyle&&u.currentStyle[h];if((!b||b==="auto")&&document.defaultView){var T=document.defaultView.getComputedStyle(u,null);b=T?T[h]:null}return b==="auto"?null:b}function pt(u,h,b){var T=document.createElement(u);return T.className=h||"",b&&b.appendChild(T),T}function Ht(u){var h=u.parentNode;h&&h.removeChild(u)}function gp(u){for(;u.firstChild;)u.removeChild(u.firstChild)}function Wl(u){var h=u.parentNode;h&&h.lastChild!==u&&h.appendChild(u)}function Yl(u){var h=u.parentNode;h&&h.firstChild!==u&&h.insertBefore(u,h.firstChild)}function D0(u,h){if(u.classList!==void 0)return u.classList.contains(h);var b=vp(u);return b.length>0&&new RegExp("(^|\\s)"+h+"(\\s|$)").test(b)}function Ke(u,h){if(u.classList!==void 0)for(var b=v(h),T=0,P=b.length;T0?2*window.devicePixelRatio:1;function OO(u){return ze.edge?u.wheelDeltaY/2:u.deltaY&&u.deltaMode===0?-u.deltaY/d7: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 q0(u,h){var b=h.relatedTarget;if(!b)return!0;try{for(;b&&b!==u;)b=b.parentNode}catch{return!1}return b!==u}var f7={__proto__:null,on:qe,off:Ct,stopPropagation:Os,disableScrollPropagation:G0,disableClickPropagation:id,preventDefault:Wn,stop:Cs,getPropagationPath:EO,getMousePosition:TO,getWheelDelta:OO,isExternalTarget:q0,addListener:qe,removeListener:Ct},CO=le.extend({run:function(u,h,b,T){this.stop(),this._el=u,this._inProgress=!0,this._duration=b||.25,this._easeOutPower=1/Math.max(T||.5,.2),this._startPos=Ts(u),this._offset=h.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=V(this._animate,this),this._step()},_step:function(u){var h=+new Date-this._startTime,b=this._duration*1e3;hthis.options.maxZoom)?this.setZoom(u):this},panInsideBounds:function(u,h){this._enforcingBounds=!0;var b=this.getCenter(),T=this._limitCenter(b,this._zoom,q(u));return b.equals(T)||this.panTo(T,h),this._enforcingBounds=!1,this},panInside:function(u,h){h=h||{};var b=D(h.paddingTopLeft||h.padding||[0,0]),T=D(h.paddingBottomRight||h.padding||[0,0]),P=this.project(this.getCenter()),B=this.project(u),oe=this.getPixelBounds(),de=ie([oe.min.add(b),oe.max.subtract(T)]),pe=de.getSize();if(!de.contains(B)){this._enforcingBounds=!0;var we=B.subtract(de.getCenter()),De=de.extend(B).getSize().subtract(pe);P.x+=we.x<0?-De.x:De.x,P.y+=we.y<0?-De.y:De.y,this.panTo(this.unproject(P),h),this._enforcingBounds=!1}return this},invalidateSize:function(u){if(!this._loaded)return this;u=i({animate:!1,pan:!0},u===!0?{animate:!0}:u);var h=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var b=this.getSize(),T=h.divideBy(2).round(),P=b.divideBy(2).round(),B=T.subtract(P);return!B.x&&!B.y?this:(u.animate&&u.pan?this.panBy(B):(u.pan&&this._rawPanBy(B),this.fire("move"),u.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(a(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:h,newSize:b}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(u){if(u=this._locateOptions=i({timeout:1e4,watch:!1},u),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var h=a(this._handleGeolocationResponse,this),b=a(this._handleGeolocationError,this);return u.watch?this._locationWatchId=navigator.geolocation.watchPosition(h,b,u):navigator.geolocation.getCurrentPosition(h,b,u),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(u){if(this._container._leaflet_id){var h=u.code,b=u.message||(h===1?"permission denied":h===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:h,message:"Geolocation error: "+b+"."})}},_handleGeolocationResponse:function(u){if(this._container._leaflet_id){var h=u.coords.latitude,b=u.coords.longitude,T=new re(h,b),P=T.toBounds(u.coords.accuracy*2),B=this._locateOptions;if(B.setView){var oe=this.getBoundsZoom(P);this.setView(T,B.maxZoom?Math.min(oe,B.maxZoom):oe)}var de={latlng:T,bounds:P,timestamp:u.timestamp};for(var pe in u.coords)typeof u.coords[pe]=="number"&&(de[pe]=u.coords[pe]);this.fire("locationfound",de)}},addHandler:function(u,h){if(!h)return this;var b=this[u]=new h(this);return this._handlers.push(b),this.options[u]&&b.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),Ht(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(W(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)Ht(this._panes[u]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(u,h){var b="leaflet-pane"+(u?" leaflet-"+u.replace("Pane","")+"-pane":""),T=pt("div",b,h||this._mapPane);return u&&(this._panes[u]=T),T},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var u=this.getPixelBounds(),h=this.unproject(u.getBottomLeft()),b=this.unproject(u.getTopRight());return new z(h,b)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(u,h,b){u=q(u),b=D(b||[0,0]);var T=this.getZoom()||0,P=this.getMinZoom(),B=this.getMaxZoom(),oe=u.getNorthWest(),de=u.getSouthEast(),pe=this.getSize().subtract(b),we=ie(this.project(de,T),this.project(oe,T)).getSize(),De=ze.any3d?this.options.zoomSnap:1,He=pe.x/we.x,Je=pe.y/we.y,dr=h?Math.max(He,Je):Math.min(He,Je);return T=this.getScaleZoom(dr,T),De&&(T=Math.round(T/(De/100))*(De/100),T=h?Math.ceil(T/De)*De:Math.floor(T/De)*De),Math.max(P,Math.min(B,T))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new K(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(u,h){var b=this._getTopLeftPoint(u,h);return new H(b,b.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(u){return this.options.crs.getProjectedBounds(u===void 0?this.getZoom():u)},getPane:function(u){return typeof u=="string"?this._panes[u]:u},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(u,h){var b=this.options.crs;return h=h===void 0?this._zoom:h,b.scale(u)/b.scale(h)},getScaleZoom:function(u,h){var b=this.options.crs;h=h===void 0?this._zoom:h;var T=b.zoom(u*b.scale(h));return isNaN(T)?1/0:T},project:function(u,h){return h=h===void 0?this._zoom:h,this.options.crs.latLngToPoint(ae(u),h)},unproject:function(u,h){return h=h===void 0?this._zoom:h,this.options.crs.pointToLatLng(D(u),h)},layerPointToLatLng:function(u){var h=D(u).add(this.getPixelOrigin());return this.unproject(h)},latLngToLayerPoint:function(u){var h=this.project(ae(u))._round();return h._subtract(this.getPixelOrigin())},wrapLatLng:function(u){return this.options.crs.wrapLatLng(ae(u))},wrapLatLngBounds:function(u){return this.options.crs.wrapLatLngBounds(q(u))},distance:function(u,h){return this.options.crs.distance(ae(u),ae(h))},containerPointToLayerPoint:function(u){return D(u).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(u){return D(u).add(this._getMapPanePos())},containerPointToLatLng:function(u){var h=this.containerPointToLayerPoint(D(u));return this.layerPointToLatLng(h)},latLngToContainerPoint:function(u){return this.layerPointToContainerPoint(this.latLngToLayerPoint(ae(u)))},mouseEventToContainerPoint:function(u){return TO(u,this._container)},mouseEventToLayerPoint:function(u){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(u))},mouseEventToLatLng:function(u){return this.layerPointToLatLng(this.mouseEventToLayerPoint(u))},_initContainer:function(u){var h=this._container=wO(u);if(h){if(h._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");qe(h,"scroll",this._onScroll,this),this._containerId=l(h)},_initLayout:function(){var u=this._container;this._fadeAnimated=this.options.fadeAnimation&&ze.any3d,Ke(u,"leaflet-container"+(ze.touch?" leaflet-touch":"")+(ze.retina?" leaflet-retina":"")+(ze.ielt9?" leaflet-oldie":"")+(ze.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var h=ed(u,"position");h!=="absolute"&&h!=="relative"&&h!=="fixed"&&h!=="sticky"&&(u.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var u=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),hn(this._mapPane,new K(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Ke(u.markerPane,"leaflet-zoom-hide"),Ke(u.shadowPane,"leaflet-zoom-hide"))},_resetView:function(u,h,b){hn(this._mapPane,new K(0,0));var T=!this._loaded;this._loaded=!0,h=this._limitZoom(h),this.fire("viewprereset");var P=this._zoom!==h;this._moveStart(P,b)._move(u,h)._moveEnd(P),this.fire("viewreset"),T&&this.fire("load")},_moveStart:function(u,h){return u&&this.fire("zoomstart"),h||this.fire("movestart"),this},_move:function(u,h,b,T){h===void 0&&(h=this._zoom);var P=this._zoom!==h;return this._zoom=h,this._lastCenter=u,this._pixelOrigin=this._getNewPixelOrigin(u),T?b&&b.pinch&&this.fire("zoom",b):((P||b&&b.pinch)&&this.fire("zoom",b),this.fire("move",b)),this},_moveEnd:function(u){return u&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return W(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(u){hn(this._mapPane,this._getMapPanePos().subtract(u))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(u){this._targets={},this._targets[l(this._container)]=this;var h=u?Ct:qe;h(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&h(window,"resize",this._onResize,this),ze.any3d&&this.options.transform3DLimit&&(u?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){W(this._resizeRequest),this._resizeRequest=V(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var u=this._getMapPanePos();Math.max(Math.abs(u.x),Math.abs(u.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(u,h){for(var b=[],T,P=h==="mouseout"||h==="mouseover",B=u.target||u.srcElement,oe=!1;B;){if(T=this._targets[l(B)],T&&(h==="click"||h==="preclick")&&this._draggableMoved(T)){oe=!0;break}if(T&&T.listens(h,!0)&&(P&&!q0(B,u)||(b.push(T),P))||B===this._container)break;B=B.parentNode}return!b.length&&!oe&&!P&&this.listens(h,!0)&&(b=[this]),b},_isClickDisabled:function(u){for(;u&&u!==this._container;){if(u._leaflet_disable_click)return!0;u=u.parentNode}},_handleDOMEvent:function(u){var h=u.target||u.srcElement;if(!(!this._loaded||h._leaflet_disable_events||u.type==="click"&&this._isClickDisabled(h))){var b=u.type;b==="mousedown"&&z0(h),this._fireDOMEvent(u,b)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(u,h,b){if(u.type==="click"){var T=i({},u);T.type="preclick",this._fireDOMEvent(T,T.type,b)}var P=this._findEventTargets(u,h);if(b){for(var B=[],oe=0;oe0?Math.round(u-h)/2:Math.max(0,Math.ceil(u))-Math.max(0,Math.floor(h))},_limitZoom:function(u){var h=this.getMinZoom(),b=this.getMaxZoom(),T=ze.any3d?this.options.zoomSnap:1;return T&&(u=Math.round(u/T)*T),Math.max(h,Math.min(b,u))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){an(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(u,h){var b=this._getCenterOffset(u)._trunc();return(h&&h.animate)!==!0&&!this.getSize().contains(b)?!1:(this.panBy(b,h),!0)},_createAnimProxy:function(){var u=this._proxy=pt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(u),this.on("zoomanim",function(h){var b=A0,T=this._proxy.style[b];Es(this._proxy,this.project(h.center,h.zoom),this.getZoomScale(h.zoom,1)),T===this._proxy.style[b]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){Ht(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var u=this.getCenter(),h=this.getZoom();Es(this._proxy,this.project(u,h),this.getZoomScale(h,1))},_catchTransitionEnd:function(u){this._animatingZoom&&u.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(u,h,b){if(this._animatingZoom)return!0;if(b=b||{},!this._zoomAnimated||b.animate===!1||this._nothingToAnimate()||Math.abs(h-this._zoom)>this.options.zoomAnimationThreshold)return!1;var T=this.getZoomScale(h),P=this._getCenterOffset(u)._divideBy(1-1/T);return b.animate!==!0&&!this.getSize().contains(P)?!1:(V(function(){this._moveStart(!0,b.noMoveStart||!1)._animateZoom(u,h,!0)},this),!0)},_animateZoom:function(u,h,b,T){this._mapPane&&(b&&(this._animatingZoom=!0,this._animateToCenter=u,this._animateToZoom=h,Ke(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:u,zoom:h,noUpdate:T}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(a(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&an(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 h7(u,h){return new ct(u,h)}var ki=G.extend({options:{position:"topright"},initialize:function(u){y(this,u)},getPosition:function(){return this.options.position},setPosition:function(u){var h=this._map;return h&&h.removeControl(this),this.options.position=u,h&&h.addControl(this),this},getContainer:function(){return this._container},addTo:function(u){this.remove(),this._map=u;var h=this._container=this.onAdd(u),b=this.getPosition(),T=u._controlCorners[b];return Ke(h,"leaflet-control"),b.indexOf("bottom")!==-1?T.insertBefore(h,T.firstChild):T.appendChild(h),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(Ht(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()}}),od=function(u){return new ki(u)};ct.include({addControl:function(u){return u.addTo(this),this},removeControl:function(u){return u.remove(),this},_initControlPos:function(){var u=this._controlCorners={},h="leaflet-",b=this._controlContainer=pt("div",h+"control-container",this._container);function T(P,B){var oe=h+P+" "+h+B;u[P+B]=pt("div",oe,b)}T("top","left"),T("top","right"),T("bottom","left"),T("bottom","right")},_clearControlPos:function(){for(var u in this._controlCorners)Ht(this._controlCorners[u]);Ht(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var kO=ki.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(u,h,b,T){return b1,this._baseLayersList.style.display=u?"":"none"),this._separator.style.display=h&&u?"":"none",this},_onLayerChange:function(u){this._handlingClick||this._update();var h=this._getLayer(l(u.target)),b=h.overlay?u.type==="add"?"overlayadd":"overlayremove":u.type==="add"?"baselayerchange":null;b&&this._map.fire(b,h)},_createRadioElement:function(u,h){var b='",T=document.createElement("div");return T.innerHTML=b,T.firstChild},_addItem:function(u){var h=document.createElement("label"),b=this._map.hasLayer(u.layer),T;u.overlay?(T=document.createElement("input"),T.type="checkbox",T.className="leaflet-control-layers-selector",T.defaultChecked=b):T=this._createRadioElement("leaflet-base-layers_"+l(this),b),this._layerControlInputs.push(T),T.layerId=l(u.layer),qe(T,"click",this._onInputClick,this);var P=document.createElement("span");P.innerHTML=" "+u.name;var B=document.createElement("span");h.appendChild(B),B.appendChild(T),B.appendChild(P);var oe=u.overlay?this._overlaysList:this._baseLayersList;return oe.appendChild(h),this._checkDisabledLayers(),h},_onInputClick:function(){if(!this._preventClick){var u=this._layerControlInputs,h,b,T=[],P=[];this._handlingClick=!0;for(var B=u.length-1;B>=0;B--)h=u[B],b=this._getLayer(h.layerId).layer,h.checked?T.push(b):h.checked||P.push(b);for(B=0;B=0;P--)h=u[P],b=this._getLayer(h.layerId).layer,h.disabled=b.options.minZoom!==void 0&&Tb.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var u=this._section;this._preventClick=!0,qe(u,"click",Wn),this.expand();var h=this;setTimeout(function(){Ct(u,"click",Wn),h._preventClick=!1})}}),p7=function(u,h,b){return new kO(u,h,b)},Z0=ki.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(u){var h="leaflet-control-zoom",b=pt("div",h+" leaflet-bar"),T=this.options;return this._zoomInButton=this._createButton(T.zoomInText,T.zoomInTitle,h+"-in",b,this._zoomIn),this._zoomOutButton=this._createButton(T.zoomOutText,T.zoomOutTitle,h+"-out",b,this._zoomOut),this._updateDisabled(),u.on("zoomend zoomlevelschange",this._updateDisabled,this),b},onRemove:function(u){u.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(u){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(u.shiftKey?3:1))},_createButton:function(u,h,b,T,P){var B=pt("a",b,T);return B.innerHTML=u,B.href="#",B.title=h,B.setAttribute("role","button"),B.setAttribute("aria-label",h),id(B),qe(B,"click",Cs),qe(B,"click",P,this),qe(B,"click",this._refocusOnMap,this),B},_updateDisabled:function(){var u=this._map,h="leaflet-disabled";an(this._zoomInButton,h),an(this._zoomOutButton,h),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||u._zoom===u.getMinZoom())&&(Ke(this._zoomOutButton,h),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||u._zoom===u.getMaxZoom())&&(Ke(this._zoomInButton,h),this._zoomInButton.setAttribute("aria-disabled","true"))}});ct.mergeOptions({zoomControl:!0}),ct.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Z0,this.addControl(this.zoomControl))});var m7=function(u){return new Z0(u)},PO=ki.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(u){var h="leaflet-control-scale",b=pt("div",h),T=this.options;return this._addScales(T,h+"-line",b),u.on(T.updateWhenIdle?"moveend":"move",this._update,this),u.whenReady(this._update,this),b},onRemove:function(u){u.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(u,h,b){u.metric&&(this._mScale=pt("div",h,b)),u.imperial&&(this._iScale=pt("div",h,b))},_update:function(){var u=this._map,h=u.getSize().y/2,b=u.distance(u.containerPointToLatLng([0,h]),u.containerPointToLatLng([this.options.maxWidth,h]));this._updateScales(b)},_updateScales:function(u){this.options.metric&&u&&this._updateMetric(u),this.options.imperial&&u&&this._updateImperial(u)},_updateMetric:function(u){var h=this._getRoundNum(u),b=h<1e3?h+" m":h/1e3+" km";this._updateScale(this._mScale,b,h/u)},_updateImperial:function(u){var h=u*3.2808399,b,T,P;h>5280?(b=h/5280,T=this._getRoundNum(b),this._updateScale(this._iScale,T+" mi",T/b)):(P=this._getRoundNum(h),this._updateScale(this._iScale,P+" ft",P/h))},_updateScale:function(u,h,b){u.style.width=Math.round(this.options.maxWidth*b)+"px",u.innerHTML=h},_getRoundNum:function(u){var h=Math.pow(10,(Math.floor(u)+"").length-1),b=u/h;return b=b>=10?10:b>=5?5:b>=3?3:b>=2?2:1,h*b}}),g7=function(u){return new PO(u)},v7='',K0=ki.extend({options:{position:"bottomright",prefix:''+(ze.inlineSvg?v7+" ":"")+"Leaflet"},initialize:function(u){y(this,u),this._attributions={}},onAdd:function(u){u.attributionControl=this,this._container=pt("div","leaflet-control-attribution"),id(this._container);for(var h in u._layers)u._layers[h].getAttribution&&this.addAttribution(u._layers[h].getAttribution());return this._update(),u.on("layeradd",this._addAttribution,this),this._container},onRemove:function(u){u.off("layeradd",this._addAttribution,this)},_addAttribution:function(u){u.layer.getAttribution&&(this.addAttribution(u.layer.getAttribution()),u.layer.once("remove",function(){this.removeAttribution(u.layer.getAttribution())},this))},setPrefix:function(u){return this.options.prefix=u,this._update(),this},addAttribution:function(u){return u?(this._attributions[u]||(this._attributions[u]=0),this._attributions[u]++,this._update(),this):this},removeAttribution:function(u){return u?(this._attributions[u]&&(this._attributions[u]--,this._update()),this):this},_update:function(){if(this._map){var u=[];for(var h in this._attributions)this._attributions[h]&&u.push(h);var b=[];this.options.prefix&&b.push(this.options.prefix),u.length&&b.push(u.join(", ")),this._container.innerHTML=b.join(' ')}}});ct.mergeOptions({attributionControl:!0}),ct.addInitHook(function(){this.options.attributionControl&&new K0().addTo(this)});var y7=function(u){return new K0(u)};ki.Layers=kO,ki.Zoom=Z0,ki.Scale=PO,ki.Attribution=K0,od.layers=p7,od.zoom=m7,od.scale=g7,od.attribution=y7;var Xi=G.extend({initialize:function(u){this._map=u},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Xi.addTo=function(u,h){return u.addHandler(h,this),this};var _7={Events:ne},LO=ze.touch?"touchstart mousedown":"mousedown",ga=le.extend({options:{clickTolerance:3},initialize:function(u,h,b,T){y(this,T),this._element=u,this._dragStartTarget=h||u,this._preventOutline=b},enable:function(){this._enabled||(qe(this._dragStartTarget,LO,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(ga._dragging===this&&this.finishDrag(!0),Ct(this._dragStartTarget,LO,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(u){if(this._enabled&&(this._moved=!1,!D0(this._element,"leaflet-zoom-anim"))){if(u.touches&&u.touches.length!==1){ga._dragging===this&&this.finishDrag();return}if(!(ga._dragging||u.shiftKey||u.which!==1&&u.button!==1&&!u.touches)&&(ga._dragging=this,this._preventOutline&&z0(this._element),$0(),td(),!this._moving)){this.fire("down");var h=u.touches?u.touches[0]:u,b=xO(this._element);this._startPoint=new K(h.clientX,h.clientY),this._startPos=Ts(this._element),this._parentScale=V0(b);var T=u.type==="mousedown";qe(document,T?"mousemove":"touchmove",this._onMove,this),qe(document,T?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(u){if(this._enabled){if(u.touches&&u.touches.length>1){this._moved=!0;return}var h=u.touches&&u.touches.length===1?u.touches[0]:u,b=new K(h.clientX,h.clientY)._subtract(this._startPoint);!b.x&&!b.y||Math.abs(b.x)+Math.abs(b.y)B&&(oe=de,B=pe);B>b&&(h[oe]=1,X0(u,h,b,T,oe),X0(u,h,b,oe,P))}function S7(u,h){for(var b=[u[0]],T=1,P=0,B=u.length;Th&&(b.push(u[T]),P=T);return Ph.max.x&&(b|=2),u.yh.max.y&&(b|=8),b}function E7(u,h){var b=h.x-u.x,T=h.y-u.y;return b*b+T*T}function ad(u,h,b,T){var P=h.x,B=h.y,oe=b.x-P,de=b.y-B,pe=oe*oe+de*de,we;return pe>0&&(we=((u.x-P)*oe+(u.y-B)*de)/pe,we>1?(P=b.x,B=b.y):we>0&&(P+=oe*we,B+=de*we)),oe=u.x-P,de=u.y-B,T?oe*oe+de*de:new K(P,B)}function ni(u){return!S(u[0])||typeof u[0][0]!="object"&&typeof u[0][0]<"u"}function IO(u){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),ni(u)}function FO(u,h){var b,T,P,B,oe,de,pe,we;if(!u||u.length===0)throw new Error("latlngs not passed");ni(u)||(console.warn("latlngs are not flat! Only the first ring will be used"),u=u[0]);var De=ae([0,0]),He=q(u),Je=He.getNorthWest().distanceTo(He.getSouthWest())*He.getNorthEast().distanceTo(He.getNorthWest());Je<1700&&(De=Q0(u));var dr=u.length,On=[];for(b=0;bT){pe=(B-T)/P,we=[de.x-pe*(de.x-oe.x),de.y-pe*(de.y-oe.y)];break}var wr=h.unproject(D(we));return ae([wr.lat+De.lat,wr.lng+De.lng])}var T7={__proto__:null,simplify:NO,pointToSegmentDistance:RO,closestPointOnSegment:w7,clipSegment:DO,_getEdgeIntersection:wp,_getBitCode:ks,_sqClosestPointOnSegment:ad,isFlat:ni,_flat:IO,polylineCenter:FO},J0={project:function(u){return new K(u.lng,u.lat)},unproject:function(u){return new re(u.y,u.x)},bounds:new H([-180,-90],[180,90])},e_={R:6378137,R_MINOR:6356752314245179e-9,bounds:new H([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(u){var h=Math.PI/180,b=this.R,T=u.lat*h,P=this.R_MINOR/b,B=Math.sqrt(1-P*P),oe=B*Math.sin(T),de=Math.tan(Math.PI/4-T/2)/Math.pow((1-oe)/(1+oe),B/2);return T=-b*Math.log(Math.max(de,1e-10)),new K(u.lng*h*b,T)},unproject:function(u){for(var h=180/Math.PI,b=this.R,T=this.R_MINOR/b,P=Math.sqrt(1-T*T),B=Math.exp(-u.y/b),oe=Math.PI/2-2*Math.atan(B),de=0,pe=.1,we;de<15&&Math.abs(pe)>1e-7;de++)we=P*Math.sin(oe),we=Math.pow((1-we)/(1+we),P/2),pe=Math.PI/2-2*Math.atan(B*we)-oe,oe+=pe;return new re(oe*h,u.x*h/b)}},O7={__proto__:null,LonLat:J0,Mercator:e_,SphericalMercator:$},C7=i({},C,{code:"EPSG:3395",projection:e_,transformation:function(){var u=.5/(Math.PI*e_.R);return ee(u,.5,-u,.5)}()}),$O=i({},C,{code:"EPSG:4326",projection:J0,transformation:ee(1/180,1,-1/180,.5)}),k7=i({},he,{projection:J0,transformation:ee(1,0,-1,0),scale:function(u){return Math.pow(2,u)},zoom:function(u){return Math.log(u)/Math.LN2},distance:function(u,h){var b=h.lng-u.lng,T=h.lat-u.lat;return Math.sqrt(b*b+T*T)},infinite:!0});he.Earth=C,he.EPSG3395=C7,he.EPSG3857=se,he.EPSG900913=ge,he.EPSG4326=$O,he.Simple=k7;var Pi=le.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(u){return u.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(u){return u&&u.removeLayer(this),this},getPane:function(u){return this._map.getPane(u?this.options[u]||u:this.options.pane)},addInteractiveTarget:function(u){return this._map._targets[l(u)]=this,this},removeInteractiveTarget:function(u){return delete this._map._targets[l(u)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(u){var h=u.target;if(h.hasLayer(this)){if(this._map=h,this._zoomAnimated=h._zoomAnimated,this.getEvents){var b=this.getEvents();h.on(b,this),this.once("remove",function(){h.off(b,this)},this)}this.onAdd(h),this.fire("add"),h.fire("layeradd",{layer:this})}}});ct.include({addLayer:function(u){if(!u._layerAdd)throw new Error("The provided object is not a Layer.");var h=l(u);return this._layers[h]?this:(this._layers[h]=u,u._mapToAdd=this,u.beforeAdd&&u.beforeAdd(this),this.whenReady(u._layerAdd,u),this)},removeLayer:function(u){var h=l(u);return this._layers[h]?(this._loaded&&u.onRemove(this),delete this._layers[h],this._loaded&&(this.fire("layerremove",{layer:u}),u.fire("remove")),u._map=u._mapToAdd=null,this):this},hasLayer:function(u){return l(u)in this._layers},eachLayer:function(u,h){for(var b in this._layers)u.call(h,this._layers[b]);return this},_addLayers:function(u){u=u?S(u)?u:[u]:[];for(var h=0,b=u.length;hthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&h[0]instanceof re&&h[0].equals(h[b-1])&&h.pop(),h},_setLatLngs:function(u){Co.prototype._setLatLngs.call(this,u),ni(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return ni(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var u=this._renderer._bounds,h=this.options.weight,b=new K(h,h);if(u=new H(u.min.subtract(b),u.max.add(b)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(u))){if(this.options.noClip){this._parts=this._rings;return}for(var T=0,P=this._rings.length,B;Tu.y!=P.y>u.y&&u.x<(P.x-T.x)*(u.y-T.y)/(P.y-T.y)+T.x&&(h=!h);return h||Co.prototype._containsPoint.call(this,u,!0)}});function D7(u,h){return new Zl(u,h)}var ko=Oo.extend({initialize:function(u,h){y(this,h),this._layers={},u&&this.addData(u)},addData:function(u){var h=S(u)?u:u.features,b,T,P;if(h){for(b=0,T=h.length;b0&&P.push(P[0].slice()),P}function Kl(u,h){return u.feature?i({},u.feature,{geometry:h}):Cp(h)}function Cp(u){return u.type==="Feature"||u.type==="FeatureCollection"?u:{type:"Feature",properties:{},geometry:u}}var i_={toGeoJSON:function(u){return Kl(this,{type:"Point",coordinates:r_(this.getLatLng(),u)})}};xp.include(i_),t_.include(i_),Sp.include(i_),Co.include({toGeoJSON:function(u){var h=!ni(this._latlngs),b=Op(this._latlngs,h?1:0,!1,u);return Kl(this,{type:(h?"Multi":"")+"LineString",coordinates:b})}}),Zl.include({toGeoJSON:function(u){var h=!ni(this._latlngs),b=h&&!ni(this._latlngs[0]),T=Op(this._latlngs,b?2:h?1:0,!0,u);return h||(T=[T]),Kl(this,{type:(b?"Multi":"")+"Polygon",coordinates:T})}}),Gl.include({toMultiPoint:function(u){var h=[];return this.eachLayer(function(b){h.push(b.toGeoJSON(u).geometry.coordinates)}),Kl(this,{type:"MultiPoint",coordinates:h})},toGeoJSON:function(u){var h=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(h==="MultiPoint")return this.toMultiPoint(u);var b=h==="GeometryCollection",T=[];return this.eachLayer(function(P){if(P.toGeoJSON){var B=P.toGeoJSON(u);if(b)T.push(B.geometry);else{var oe=Cp(B);oe.type==="FeatureCollection"?T.push.apply(T,oe.features):T.push(oe)}}}),b?Kl(this,{geometries:T,type:"GeometryCollection"}):{type:"FeatureCollection",features:T}}});function zO(u,h){return new ko(u,h)}var I7=zO,kp=Pi.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(u,h,b){this._url=u,this._bounds=q(h),y(this,b)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(Ke(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){Ht(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(u){return this.options.opacity=u,this._image&&this._updateOpacity(),this},setStyle:function(u){return u.opacity&&this.setOpacity(u.opacity),this},bringToFront:function(){return this._map&&Wl(this._image),this},bringToBack:function(){return this._map&&Yl(this._image),this},setUrl:function(u){return this._url=u,this._image&&(this._image.src=u),this},setBounds:function(u){return this._bounds=q(u),this._map&&this._reset(),this},getEvents:function(){var u={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(u.zoomanim=this._animateZoom),u},setZIndex:function(u){return this.options.zIndex=u,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var u=this._url.tagName==="IMG",h=this._image=u?this._url:pt("img");if(Ke(h,"leaflet-image-layer"),this._zoomAnimated&&Ke(h,"leaflet-zoom-animated"),this.options.className&&Ke(h,this.options.className),h.onselectstart=f,h.onmousemove=f,h.onload=a(this.fire,this,"load"),h.onerror=a(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(h.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),u){this._url=h.src;return}h.src=this._url,h.alt=this.options.alt},_animateZoom:function(u){var h=this._map.getZoomScale(u.zoom),b=this._map._latLngBoundsToNewLayerBounds(this._bounds,u.zoom,u.center).min;Es(this._image,b,h)},_reset:function(){var u=this._image,h=new H(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),b=h.getSize();hn(u,h.min),u.style.width=b.x+"px",u.style.height=b.y+"px"},_updateOpacity:function(){ti(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var u=this.options.errorOverlayUrl;u&&this._url!==u&&(this._url=u,this._image.src=u)},getCenter:function(){return this._bounds.getCenter()}}),F7=function(u,h,b){return new kp(u,h,b)},VO=kp.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var u=this._url.tagName==="VIDEO",h=this._image=u?this._url:pt("video");if(Ke(h,"leaflet-image-layer"),this._zoomAnimated&&Ke(h,"leaflet-zoom-animated"),this.options.className&&Ke(h,this.options.className),h.onselectstart=f,h.onmousemove=f,h.onloadeddata=a(this.fire,this,"load"),u){for(var b=h.getElementsByTagName("source"),T=[],P=0;P0?T:[h.src];return}S(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(h.style,"objectFit")&&(h.style.objectFit="fill"),h.autoplay=!!this.options.autoplay,h.loop=!!this.options.loop,h.muted=!!this.options.muted,h.playsInline=!!this.options.playsInline;for(var B=0;BP?(h.height=P+"px",Ke(u,B)):an(u,B),this._containerWidth=this._container.offsetWidth},_animateZoom:function(u){var h=this._map._latLngToNewLayerPoint(this._latlng,u.zoom,u.center),b=this._getAnchor();hn(this._container,h.add(b))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var u=this._map,h=parseInt(ed(this._container,"marginBottom"),10)||0,b=this._container.offsetHeight+h,T=this._containerWidth,P=new K(this._containerLeft,-b-this._containerBottom);P._add(Ts(this._container));var B=u.layerPointToContainerPoint(P),oe=D(this.options.autoPanPadding),de=D(this.options.autoPanPaddingTopLeft||oe),pe=D(this.options.autoPanPaddingBottomRight||oe),we=u.getSize(),De=0,He=0;B.x+T+pe.x>we.x&&(De=B.x+T-we.x+pe.x),B.x-De-de.x<0&&(De=B.x-de.x),B.y+b+pe.y>we.y&&(He=B.y+b-we.y+pe.y),B.y-He-de.y<0&&(He=B.y-de.y),(De||He)&&(this.options.keepInView&&(this._autopanning=!0),u.fire("autopanstart").panBy([De,He]))}},_getAnchor:function(){return D(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),B7=function(u,h){return new Pp(u,h)};ct.mergeOptions({closePopupOnClick:!0}),ct.include({openPopup:function(u,h,b){return this._initOverlay(Pp,u,h,b).openOn(this),this},closePopup:function(u){return u=arguments.length?u:this._popup,u&&u.close(),this}}),Pi.include({bindPopup:function(u,h){return this._popup=this._initOverlay(Pp,this._popup,u,h),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(u){return this._popup&&(this instanceof Oo||(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)){Cs(u);var h=u.layer||u.target;if(this._popup._source===h&&!(h instanceof va)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(u.latlng);return}this._popup._source=h,this.openPopup(u.latlng)}},_movePopup:function(u){this._popup.setLatLng(u.latlng)},_onKeyPress:function(u){u.originalEvent.keyCode===13&&this._openPopup(u)}});var Lp=Ji.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(u){Ji.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){Ji.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=Ji.prototype.getEvents.call(this);return this.options.permanent||(u.preclick=this.close),u},_initLayout:function(){var u="leaflet-tooltip",h=u+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=pt("div",h),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+l(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(u){var h,b,T=this._map,P=this._container,B=T.latLngToContainerPoint(T.getCenter()),oe=T.layerPointToContainerPoint(u),de=this.options.direction,pe=P.offsetWidth,we=P.offsetHeight,De=D(this.options.offset),He=this._getAnchor();de==="top"?(h=pe/2,b=we):de==="bottom"?(h=pe/2,b=0):de==="center"?(h=pe/2,b=we/2):de==="right"?(h=0,b=we/2):de==="left"?(h=pe,b=we/2):oe.xthis.options.maxZoom||bT?this._retainParent(P,B,oe,T):!1)},_retainChildren:function(u,h,b,T){for(var P=2*u;P<2*u+2;P++)for(var B=2*h;B<2*h+2;B++){var oe=new K(P,B);oe.z=b+1;var de=this._tileCoordsToKey(oe),pe=this._tiles[de];if(pe&&pe.active){pe.retain=!0;continue}else pe&&pe.loaded&&(pe.retain=!0);b+1this.options.maxZoom||this.options.minZoom!==void 0&&P1){this._setView(u,b);return}for(var He=P.min.y;He<=P.max.y;He++)for(var Je=P.min.x;Je<=P.max.x;Je++){var dr=new K(Je,He);if(dr.z=this._tileZoom,!!this._isValidTile(dr)){var On=this._tiles[this._tileCoordsToKey(dr)];On?On.current=!0:oe.push(dr)}}if(oe.sort(function(wr,Xl){return wr.distanceTo(B)-Xl.distanceTo(B)}),oe.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var ri=document.createDocumentFragment();for(Je=0;Jeb.max.x)||!h.wrapLat&&(u.yb.max.y))return!1}if(!this.options.bounds)return!0;var T=this._tileCoordsToBounds(u);return q(this.options.bounds).overlaps(T)},_keyToBounds:function(u){return this._tileCoordsToBounds(this._keyToTileCoords(u))},_tileCoordsToNwSe:function(u){var h=this._map,b=this.getTileSize(),T=u.scaleBy(b),P=T.add(b),B=h.unproject(T,u.z),oe=h.unproject(P,u.z);return[B,oe]},_tileCoordsToBounds:function(u){var h=this._tileCoordsToNwSe(u),b=new z(h[0],h[1]);return this.options.noWrap||(b=this._map.wrapLatLngBounds(b)),b},_tileCoordsToKey:function(u){return u.x+":"+u.y+":"+u.z},_keyToTileCoords:function(u){var h=u.split(":"),b=new K(+h[0],+h[1]);return b.z=+h[2],b},_removeTile:function(u){var h=this._tiles[u];h&&(Ht(h.el),delete this._tiles[u],this.fire("tileunload",{tile:h.el,coords:this._keyToTileCoords(u)}))},_initTile:function(u){Ke(u,"leaflet-tile");var h=this.getTileSize();u.style.width=h.x+"px",u.style.height=h.y+"px",u.onselectstart=f,u.onmousemove=f,ze.ielt9&&this.options.opacity<1&&ti(u,this.options.opacity)},_addTile:function(u,h){var b=this._getTilePos(u),T=this._tileCoordsToKey(u),P=this.createTile(this._wrapCoords(u),a(this._tileReady,this,u));this._initTile(P),this.createTile.length<2&&V(a(this._tileReady,this,u,null,P)),hn(P,b),this._tiles[T]={el:P,coords:u,current:!0},h.appendChild(P),this.fire("tileloadstart",{tile:P,coords:u})},_tileReady:function(u,h,b){h&&this.fire("tileerror",{error:h,tile:b,coords:u});var T=this._tileCoordsToKey(u);b=this._tiles[T],b&&(b.loaded=+new Date,this._map._fadeAnimated?(ti(b.el,0),W(this._fadeFrame),this._fadeFrame=V(this._updateOpacity,this)):(b.active=!0,this._pruneTiles()),h||(Ke(b.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:b.el,coords:u})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),ze.ielt9||!this._map._fadeAnimated?V(this._pruneTiles,this):setTimeout(a(this._pruneTiles,this),250)))},_getTilePos:function(u){return u.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(u){var h=new K(this._wrapX?d(u.x,this._wrapX):u.x,this._wrapY?d(u.y,this._wrapY):u.y);return h.z=u.z,h},_pxBoundsToTileRange:function(u){var h=this.getTileSize();return new H(u.min.unscaleBy(h).floor(),u.max.unscaleBy(h).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var u in this._tiles)if(!this._tiles[u].loaded)return!1;return!0}});function H7(u){return new ld(u)}var Ql=ld.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(u,h){this._url=u,h=y(this,h),h.detectRetina&&ze.retina&&h.maxZoom>0?(h.tileSize=Math.floor(h.tileSize/2),h.zoomReverse?(h.zoomOffset--,h.minZoom=Math.min(h.maxZoom,h.minZoom+1)):(h.zoomOffset++,h.maxZoom=Math.max(h.minZoom,h.maxZoom-1)),h.minZoom=Math.max(0,h.minZoom)):h.zoomReverse?h.minZoom=Math.min(h.maxZoom,h.minZoom):h.maxZoom=Math.max(h.minZoom,h.maxZoom),typeof h.subdomains=="string"&&(h.subdomains=h.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(u,h){return this._url===u&&h===void 0&&(h=!0),this._url=u,h||this.redraw(),this},createTile:function(u,h){var b=document.createElement("img");return qe(b,"load",a(this._tileOnLoad,this,h,b)),qe(b,"error",a(this._tileOnError,this,h,b)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(b.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(b.referrerPolicy=this.options.referrerPolicy),b.alt="",b.src=this.getTileUrl(u),b},getTileUrl:function(u){var h={r:ze.retina?"@2x":"",s:this._getSubdomain(u),x:u.x,y:u.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var b=this._globalTileRange.max.y-u.y;this.options.tms&&(h.y=b),h["-y"]=b}return w(this._url,i(h,this.options))},_tileOnLoad:function(u,h){ze.ielt9?setTimeout(a(u,this,null,h),0):u(null,h)},_tileOnError:function(u,h,b){var T=this.options.errorTileUrl;T&&h.getAttribute("src")!==T&&(h.src=T),u(b,h)},_onTileRemove:function(u){u.tile.onload=null},_getZoomForUrl:function(){var u=this._tileZoom,h=this.options.maxZoom,b=this.options.zoomReverse,T=this.options.zoomOffset;return b&&(u=h-u),u+T},_getSubdomain:function(u){var h=Math.abs(u.x+u.y)%this.options.subdomains.length;return this.options.subdomains[h]},_abortLoading:function(){var u,h;for(u in this._tiles)if(this._tiles[u].coords.z!==this._tileZoom&&(h=this._tiles[u].el,h.onload=f,h.onerror=f,!h.complete)){h.src=O;var b=this._tiles[u].coords;Ht(h),delete this._tiles[u],this.fire("tileabort",{tile:h,coords:b})}},_removeTile:function(u){var h=this._tiles[u];if(h)return h.el.setAttribute("src",O),ld.prototype._removeTile.call(this,u)},_tileReady:function(u,h,b){if(!(!this._map||b&&b.getAttribute("src")===O))return ld.prototype._tileReady.call(this,u,h,b)}});function YO(u,h){return new Ql(u,h)}var GO=Ql.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(u,h){this._url=u;var b=i({},this.defaultWmsParams);for(var T in h)T in this.options||(b[T]=h[T]);h=y(this,h);var P=h.detectRetina&&ze.retina?2:1,B=this.getTileSize();b.width=B.x*P,b.height=B.y*P,this.wmsParams=b},onAdd:function(u){this._crs=this.options.crs||u.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var h=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[h]=this._crs.code,Ql.prototype.onAdd.call(this,u)},getTileUrl:function(u){var h=this._tileCoordsToNwSe(u),b=this._crs,T=ie(b.project(h[0]),b.project(h[1])),P=T.min,B=T.max,oe=(this._wmsVersion>=1.3&&this._crs===$O?[P.y,P.x,B.y,B.x]:[P.x,P.y,B.x,B.y]).join(","),de=Ql.prototype.getTileUrl.call(this,u);return de+x(this.wmsParams,de,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+oe},setParams:function(u,h){return i(this.wmsParams,u),h||this.redraw(),this}});function W7(u,h){return new GO(u,h)}Ql.WMS=GO,YO.wms=W7;var Po=Pi.extend({options:{padding:.1},initialize:function(u){y(this,u),l(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),Ke(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var u={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(u.zoomanim=this._onAnimZoom),u},_onAnimZoom:function(u){this._updateTransform(u.center,u.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(u,h){var b=this._map.getZoomScale(h,this._zoom),T=this._map.getSize().multiplyBy(.5+this.options.padding),P=this._map.project(this._center,h),B=T.multiplyBy(-b).add(P).subtract(this._map._getNewPixelOrigin(u,h));ze.any3d?Es(this._container,B,b):hn(this._container,B)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var u in this._layers)this._layers[u]._reset()},_onZoomEnd:function(){for(var u in this._layers)this._layers[u]._project()},_updatePaths:function(){for(var u in this._layers)this._layers[u]._update()},_update:function(){var u=this.options.padding,h=this._map.getSize(),b=this._map.containerPointToLayerPoint(h.multiplyBy(-u)).round();this._bounds=new H(b,b.add(h.multiplyBy(1+u*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),qO=Po.extend({options:{tolerance:0},getEvents:function(){var u=Po.prototype.getEvents.call(this);return u.viewprereset=this._onViewPreReset,u},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Po.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var u=this._container=document.createElement("canvas");qe(u,"mousemove",this._onMouseMove,this),qe(u,"click dblclick mousedown mouseup contextmenu",this._onClick,this),qe(u,"mouseout",this._handleMouseOut,this),u._leaflet_disable_events=!0,this._ctx=u.getContext("2d")},_destroyContainer:function(){W(this._redrawRequest),delete this._ctx,Ht(this._container),Ct(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var u;this._redrawBounds=null;for(var h in this._layers)u=this._layers[h],u._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Po.prototype._update.call(this);var u=this._bounds,h=this._container,b=u.getSize(),T=ze.retina?2:1;hn(h,u.min),h.width=T*b.x,h.height=T*b.y,h.style.width=b.x+"px",h.style.height=b.y+"px",ze.retina&&this._ctx.scale(2,2),this._ctx.translate(-u.min.x,-u.min.y),this.fire("update")}},_reset:function(){Po.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(u){this._updateDashArray(u),this._layers[l(u)]=u;var h=u._order={layer:u,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=h),this._drawLast=h,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(u){this._requestRedraw(u)},_removePath:function(u){var h=u._order,b=h.next,T=h.prev;b?b.prev=T:this._drawLast=T,T?T.next=b:this._drawFirst=b,delete u._order,delete this._layers[l(u)],this._requestRedraw(u)},_updatePath:function(u){this._extendRedrawBounds(u),u._project(),u._update(),this._requestRedraw(u)},_updateStyle:function(u){this._updateDashArray(u),this._requestRedraw(u)},_updateDashArray:function(u){if(typeof u.options.dashArray=="string"){var h=u.options.dashArray.split(/[, ]+/),b=[],T,P;for(P=0;P')}}catch{}return function(u){return document.createElement("<"+u+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),Y7={_initContainer:function(){this._container=pt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Po.prototype._update.call(this),this.fire("update"))},_initPath:function(u){var h=u._container=cd("shape");Ke(h,"leaflet-vml-shape "+(this.options.className||"")),h.coordsize="1 1",u._path=cd("path"),h.appendChild(u._path),this._updateStyle(u),this._layers[l(u)]=u},_addPath:function(u){var h=u._container;this._container.appendChild(h),u.options.interactive&&u.addInteractiveTarget(h)},_removePath:function(u){var h=u._container;Ht(h),u.removeInteractiveTarget(h),delete this._layers[l(u)]},_updateStyle:function(u){var h=u._stroke,b=u._fill,T=u.options,P=u._container;P.stroked=!!T.stroke,P.filled=!!T.fill,T.stroke?(h||(h=u._stroke=cd("stroke")),P.appendChild(h),h.weight=T.weight+"px",h.color=T.color,h.opacity=T.opacity,T.dashArray?h.dashStyle=S(T.dashArray)?T.dashArray.join(" "):T.dashArray.replace(/( *, *)/g," "):h.dashStyle="",h.endcap=T.lineCap.replace("butt","flat"),h.joinstyle=T.lineJoin):h&&(P.removeChild(h),u._stroke=null),T.fill?(b||(b=u._fill=cd("fill")),P.appendChild(b),b.color=T.fillColor||T.color,b.opacity=T.fillOpacity):b&&(P.removeChild(b),u._fill=null)},_updateCircle:function(u){var h=u._point.round(),b=Math.round(u._radius),T=Math.round(u._radiusY||b);this._setPath(u,u._empty()?"M0 0":"AL "+h.x+","+h.y+" "+b+","+T+" 0,"+65535*360)},_setPath:function(u,h){u._path.v=h},_bringToFront:function(u){Wl(u._container)},_bringToBack:function(u){Yl(u._container)}},jp=ze.vml?cd:Me,ud=Po.extend({_initContainer:function(){this._container=jp("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=jp("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Ht(this._container),Ct(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Po.prototype._update.call(this);var u=this._bounds,h=u.getSize(),b=this._container;(!this._svgSize||!this._svgSize.equals(h))&&(this._svgSize=h,b.setAttribute("width",h.x),b.setAttribute("height",h.y)),hn(b,u.min),b.setAttribute("viewBox",[u.min.x,u.min.y,h.x,h.y].join(" ")),this.fire("update")}},_initPath:function(u){var h=u._path=jp("path");u.options.className&&Ke(h,u.options.className),u.options.interactive&&Ke(h,"leaflet-interactive"),this._updateStyle(u),this._layers[l(u)]=u},_addPath:function(u){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(u._path),u.addInteractiveTarget(u._path)},_removePath:function(u){Ht(u._path),u.removeInteractiveTarget(u._path),delete this._layers[l(u)]},_updatePath:function(u){u._project(),u._update()},_updateStyle:function(u){var h=u._path,b=u.options;h&&(b.stroke?(h.setAttribute("stroke",b.color),h.setAttribute("stroke-opacity",b.opacity),h.setAttribute("stroke-width",b.weight),h.setAttribute("stroke-linecap",b.lineCap),h.setAttribute("stroke-linejoin",b.lineJoin),b.dashArray?h.setAttribute("stroke-dasharray",b.dashArray):h.removeAttribute("stroke-dasharray"),b.dashOffset?h.setAttribute("stroke-dashoffset",b.dashOffset):h.removeAttribute("stroke-dashoffset")):h.setAttribute("stroke","none"),b.fill?(h.setAttribute("fill",b.fillColor||b.color),h.setAttribute("fill-opacity",b.fillOpacity),h.setAttribute("fill-rule",b.fillRule||"evenodd")):h.setAttribute("fill","none"))},_updatePoly:function(u,h){this._setPath(u,ue(u._parts,h))},_updateCircle:function(u){var h=u._point,b=Math.max(Math.round(u._radius),1),T=Math.max(Math.round(u._radiusY),1)||b,P="a"+b+","+T+" 0 1,0 ",B=u._empty()?"M0 0":"M"+(h.x-b)+","+h.y+P+b*2+",0 "+P+-b*2+",0 ";this._setPath(u,B)},_setPath:function(u,h){u._path.setAttribute("d",h)},_bringToFront:function(u){Wl(u._path)},_bringToBack:function(u){Yl(u._path)}});ze.vml&&ud.include(Y7);function KO(u){return ze.svg||ze.vml?new ud(u):null}ct.include({getRenderer:function(u){var h=u.options.renderer||this._getPaneRenderer(u.options.pane)||this.options.renderer||this._renderer;return h||(h=this._renderer=this._createRenderer()),this.hasLayer(h)||this.addLayer(h),h},_getPaneRenderer:function(u){if(u==="overlayPane"||u===void 0)return!1;var h=this._paneRenderers[u];return h===void 0&&(h=this._createRenderer({pane:u}),this._paneRenderers[u]=h),h},_createRenderer:function(u){return this.options.preferCanvas&&ZO(u)||KO(u)}});var QO=Zl.extend({initialize:function(u,h){Zl.prototype.initialize.call(this,this._boundsToLatLngs(u),h)},setBounds:function(u){return this.setLatLngs(this._boundsToLatLngs(u))},_boundsToLatLngs:function(u){return u=q(u),[u.getSouthWest(),u.getNorthWest(),u.getNorthEast(),u.getSouthEast()]}});function G7(u,h){return new QO(u,h)}ud.create=jp,ud.pointsToPath=ue,ko.geometryToLayer=Ep,ko.coordsToLatLng=n_,ko.coordsToLatLngs=Tp,ko.latLngToCoords=r_,ko.latLngsToCoords=Op,ko.getFeature=Kl,ko.asFeature=Cp,ct.mergeOptions({boxZoom:!0});var XO=Xi.extend({initialize:function(u){this._map=u,this._container=u._container,this._pane=u._panes.overlayPane,this._resetStateTimeout=0,u.on("unload",this._destroy,this)},addHooks:function(){qe(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Ct(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Ht(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(),td(),$0(),this._startPoint=this._map.mouseEventToContainerPoint(u),qe(document,{contextmenu:Cs,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(u){this._moved||(this._moved=!0,this._box=pt("div","leaflet-zoom-box",this._container),Ke(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(u);var h=new H(this._point,this._startPoint),b=h.getSize();hn(this._box,h.min),this._box.style.width=b.x+"px",this._box.style.height=b.y+"px"},_finish:function(){this._moved&&(Ht(this._box),an(this._container,"leaflet-crosshair")),nd(),U0(),Ct(document,{contextmenu:Cs,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(u){if(!(u.which!==1&&u.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(a(this._resetState,this),0);var h=new z(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(h).fire("boxzoomend",{boxZoomBounds:h})}},_onKeyDown:function(u){u.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});ct.addInitHook("addHandler","boxZoom",XO),ct.mergeOptions({doubleClickZoom:!0});var JO=Xi.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(u){var h=this._map,b=h.getZoom(),T=h.options.zoomDelta,P=u.originalEvent.shiftKey?b-T:b+T;h.options.doubleClickZoom==="center"?h.setZoom(P):h.setZoomAround(u.containerPoint,P)}});ct.addInitHook("addHandler","doubleClickZoom",JO),ct.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var eC=Xi.extend({addHooks:function(){if(!this._draggable){var u=this._map;this._draggable=new ga(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))}Ke(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){an(this._map._container,"leaflet-grab"),an(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var u=this._map;if(u._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var h=q(this._map.options.maxBounds);this._offsetLimit=ie(this._map.latLngToContainerPoint(h.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(h.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;u.fire("movestart").fire("dragstart"),u.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(u){if(this._map.options.inertia){var h=this._lastTime=+new Date,b=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(b),this._times.push(h),this._prunePositions(h)}this._map.fire("move",u).fire("drag",u)},_prunePositions:function(u){for(;this._positions.length>1&&u-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var u=this._map.getSize().divideBy(2),h=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=h.subtract(u).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(u,h){return u-(u-h)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var u=this._draggable._newPos.subtract(this._draggable._startPos),h=this._offsetLimit;u.xh.max.x&&(u.x=this._viscousLimit(u.x,h.max.x)),u.y>h.max.y&&(u.y=this._viscousLimit(u.y,h.max.y)),this._draggable._newPos=this._draggable._startPos.add(u)}},_onPreDragWrap:function(){var u=this._worldWidth,h=Math.round(u/2),b=this._initialWorldOffset,T=this._draggable._newPos.x,P=(T-h+b)%u+h-b,B=(T+h+b)%u-h-b,oe=Math.abs(P+b)0?B:-B))-h;this._delta=0,this._startTime=null,oe&&(u.options.scrollWheelZoom==="center"?u.setZoom(h+oe):u.setZoomAround(this._lastMousePos,h+oe))}});ct.addInitHook("addHandler","scrollWheelZoom",nC);var q7=600;ct.mergeOptions({tapHold:ze.touchNative&&ze.safari&&ze.mobile,tapTolerance:15});var rC=Xi.extend({addHooks:function(){qe(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Ct(this._map._container,"touchstart",this._onDown,this)},_onDown:function(u){if(clearTimeout(this._holdTimeout),u.touches.length===1){var h=u.touches[0];this._startPos=this._newPos=new K(h.clientX,h.clientY),this._holdTimeout=setTimeout(a(function(){this._cancel(),this._isTapValid()&&(qe(document,"touchend",Wn),qe(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",h))},this),q7),qe(document,"touchend touchcancel contextmenu",this._cancel,this),qe(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function u(){Ct(document,"touchend",Wn),Ct(document,"touchend touchcancel",u)},_cancel:function(){clearTimeout(this._holdTimeout),Ct(document,"touchend touchcancel contextmenu",this._cancel,this),Ct(document,"touchmove",this._onMove,this)},_onMove:function(u){var h=u.touches[0];this._newPos=new K(h.clientX,h.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(u,h){var b=new MouseEvent(u,{bubbles:!0,cancelable:!0,view:window,screenX:h.screenX,screenY:h.screenY,clientX:h.clientX,clientY:h.clientY});b._simulated=!0,h.target.dispatchEvent(b)}});ct.addInitHook("addHandler","tapHold",rC),ct.mergeOptions({touchZoom:ze.touch,bounceAtZoomLimits:!0});var iC=Xi.extend({addHooks:function(){Ke(this._map._container,"leaflet-touch-zoom"),qe(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){an(this._map._container,"leaflet-touch-zoom"),Ct(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(u){var h=this._map;if(!(!u.touches||u.touches.length!==2||h._animatingZoom||this._zooming)){var b=h.mouseEventToContainerPoint(u.touches[0]),T=h.mouseEventToContainerPoint(u.touches[1]);this._centerPoint=h.getSize()._divideBy(2),this._startLatLng=h.containerPointToLatLng(this._centerPoint),h.options.touchZoom!=="center"&&(this._pinchStartLatLng=h.containerPointToLatLng(b.add(T)._divideBy(2))),this._startDist=b.distanceTo(T),this._startZoom=h.getZoom(),this._moved=!1,this._zooming=!0,h._stop(),qe(document,"touchmove",this._onTouchMove,this),qe(document,"touchend touchcancel",this._onTouchEnd,this),Wn(u)}},_onTouchMove:function(u){if(!(!u.touches||u.touches.length!==2||!this._zooming)){var h=this._map,b=h.mouseEventToContainerPoint(u.touches[0]),T=h.mouseEventToContainerPoint(u.touches[1]),P=b.distanceTo(T)/this._startDist;if(this._zoom=h.getScaleZoom(P,this._startZoom),!h.options.bounceAtZoomLimits&&(this._zoomh.getMaxZoom()&&P>1)&&(this._zoom=h._limitZoom(this._zoom)),h.options.touchZoom==="center"){if(this._center=this._startLatLng,P===1)return}else{var B=b._add(T)._divideBy(2)._subtract(this._centerPoint);if(P===1&&B.x===0&&B.y===0)return;this._center=h.unproject(h.project(this._pinchStartLatLng,this._zoom).subtract(B),this._zoom)}this._moved||(h._moveStart(!0,!1),this._moved=!0),W(this._animRequest);var oe=a(h._move,h,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=V(oe,this,!0),Wn(u)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,W(this._animRequest),Ct(document,"touchmove",this._onTouchMove,this),Ct(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});ct.addInitHook("addHandler","touchZoom",iC),ct.BoxZoom=XO,ct.DoubleClickZoom=JO,ct.Drag=eC,ct.Keyboard=tC,ct.ScrollWheelZoom=nC,ct.TapHold=rC,ct.TouchZoom=iC,n.Bounds=H,n.Browser=ze,n.CRS=he,n.Canvas=qO,n.Circle=t_,n.CircleMarker=Sp,n.Class=G,n.Control=ki,n.DivIcon=WO,n.DivOverlay=Ji,n.DomEvent=f7,n.DomUtil=u7,n.Draggable=ga,n.Evented=le,n.FeatureGroup=Oo,n.GeoJSON=ko,n.GridLayer=ld,n.Handler=Xi,n.Icon=ql,n.ImageOverlay=kp,n.LatLng=re,n.LatLngBounds=z,n.Layer=Pi,n.LayerGroup=Gl,n.LineUtil=T7,n.Map=ct,n.Marker=xp,n.Mixin=_7,n.Path=va,n.Point=K,n.PolyUtil=b7,n.Polygon=Zl,n.Polyline=Co,n.Popup=Pp,n.PosAnimation=CO,n.Projection=O7,n.Rectangle=QO,n.Renderer=Po,n.SVG=ud,n.SVGOverlay=HO,n.TileLayer=Ql,n.Tooltip=Lp,n.Transformation=J,n.Util=X,n.VideoOverlay=VO,n.bind=a,n.bounds=ie,n.canvas=ZO,n.circle=R7,n.circleMarker=N7,n.control=od,n.divIcon=V7,n.extend=i,n.featureGroup=L7,n.geoJSON=zO,n.geoJson=I7,n.gridLayer=H7,n.icon=j7,n.imageOverlay=F7,n.latLng=ae,n.latLngBounds=q,n.layerGroup=P7,n.map=h7,n.marker=M7,n.point=D,n.polygon=D7,n.polyline=A7,n.popup=B7,n.rectangle=G7,n.setOptions=y,n.stamp=l,n.svg=KO,n.svgOverlay=U7,n.tileLayer=YO,n.tooltip=z7,n.transformation=ee,n.version=r,n.videoOverlay=$7;var Z7=window.L;n.noConflict=function(){return window.L=Z7,this},window.L=n})})(S2,S2.exports);var cp=S2.exports;const lR=Gu(cp);function nO(e,t,n){return Object.freeze({instance:e,context:t,container:n})}function rO(e,t){return t==null?function(n,r){const i=I.useRef();return i.current||(i.current=e(n,r)),i}:function(n,r){const i=I.useRef();i.current||(i.current=e(n,r));const o=I.useRef(n),{instance:a}=i.current;return I.useEffect(function(){o.current!==n&&(t(a,n,o.current),o.current=n)},[a,n,r]),i}}function Ebe(e,t){I.useEffect(function(){return(t.layerContainer??t.map).addLayer(e.instance),function(){var n;(n=t.layerContainer)==null||n.removeLayer(e.instance),t.map.removeLayer(e.instance)}},[t,e])}function K$(e){return function(t){const n=q$(),r=e(tO(t,n),n);return W$(n.map,t.attribution),Z$(r.current,t.eventHandlers),Ebe(r.current,n),r}}function Tbe(e,t){const n=rO(e,t),r=K$(n);return bbe(r)}function Obe(e,t){const n=rO(e),r=Sbe(n,t);return wbe(r)}function Cbe(e,t){const n=rO(e,t),r=K$(n);return xbe(r)}function kbe(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 E2(){return E2=Object.assign||function(e){for(var t=1;t(m==null?void 0:m.map)??null,[m]);const y=I.useCallback(_=>{if(_!==null&&m===null){const w=new cp.Map(_,d);n!=null&&c!=null?w.setView(n,c):e!=null&&w.fitBounds(e,t),l!=null&&w.whenReady(l),v(ybe(w))}},[]);I.useEffect(()=>()=>{m==null||m.map.remove()},[m]);const x=m?Y.createElement(G$,{value:m},r):a??null;return Y.createElement("div",E2({},p,{ref:y}),x)}const Lbe=I.forwardRef(Pbe),jbe=Tbe(function({position:e,...t},n){const r=new cp.Marker(e,t);return nO(r,_be(n,{overlayContainer:r}))},function(e,t,n){t.position!==n.position&&e.setLatLng(t.position),t.icon!=null&&t.icon!==n.icon&&e.setIcon(t.icon),t.zIndexOffset!=null&&t.zIndexOffset!==n.zIndexOffset&&e.setZIndexOffset(t.zIndexOffset),t.opacity!=null&&t.opacity!==n.opacity&&e.setOpacity(t.opacity),e.dragging!=null&&t.draggable!==n.draggable&&(t.draggable===!0?e.dragging.enable():e.dragging.disable())}),Mbe=Obe(function(e,t){const n=new cp.Popup(e,t.overlayContainer);return nO(n,t)},function(e,t,{position:n},r){I.useEffect(function(){const{instance:i}=e;function o(s){s.popup===i&&(i.update(),r(!0))}function a(s){s.popup===i&&r(!1)}return t.map.on({popupopen:o,popupclose:a}),t.overlayContainer==null?(n!=null&&i.setLatLng(n),i.openOn(t.map)):t.overlayContainer.bindPopup(i),function(){var s;t.map.off({popupopen:o,popupclose:a}),(s=t.overlayContainer)==null||s.unbindPopup(),t.map.removeLayer(i)}},[e,t,r,n])}),Nbe=Cbe(function({url:e,...t},n){const r=new cp.TileLayer(e,tO(t,n));return nO(r,n)},function(e,t,n){kbe(e,t,n);const{url:r}=t;r!=null&&r!==n.url&&e.setUrl(r)}),Rbe=()=>g.jsx(Nbe,{attribution:'© OpenStreetMap contributors',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),Abe=e=>{if(e.length===0)return{};if(e.length>1)return{bounds:e.map(mt("latLong"))};const[{latLong:t}]=e;return{zoom:10,center:t}},Q$=({toggle:e,isOpen:t,title:n,locations:r=[]})=>g.jsx(ua,{toggle:e,isOpen:t,className:"map-modal__modal",contentClassName:"map-modal__modal-content",children:g.jsxs(Eo,{className:"map-modal__modal-body",children:[g.jsxs("h3",{className:"map-modal__modal-title",children:[n,g.jsx("button",{type:"button",className:"btn-close float-end","aria-label":"Close",onClick:e})]}),g.jsxs(Lbe,{...Abe(r),children:[g.jsx(Rbe,{}),r.map(({cityName:i,latLong:o,count:a},s)=>g.jsx(jbe,{position:o,children:g.jsxs(Mbe,{children:[g.jsx("b",{children:a})," visit",a>1?"s":""," from ",g.jsx("b",{children:i})]})},s))]})]})}),Dbe=({modalTitle:e,activeCities:t,locations:n=[]})=>{const[r,,i,o]=Sn(),[a,s]=Sn(),[l,c]=I.useState([]),d=a0(),f=I.useCallback(p=>{c(p?n.filter(p):n),i()},[n,i]);return g.jsxs(g.Fragment,{children:[!t&&g.jsx(yt,{color:"link",className:"open-map-modal-btn__btn",id:d,onClick:()=>f(),"aria-label":"Show in map",children:g.jsx(Ne,{icon:G1})}),t&&g.jsxs(Uh,{isOpen:a,toggle:s,children:[g.jsx(Fu,{color:"link",className:"open-map-modal-btn__btn",id:d,children:g.jsx(Ne,{icon:G1})}),g.jsxs(Iu,{end:!0,children:[g.jsx(Ue,{onClick:()=>f(),children:"Show all locations"}),g.jsx(Ue,{onClick:()=>f(({cityName:p})=>t.includes(p)),children:"Show locations in current page"})]})]}),g.jsx(Rr,{placement:"left",target:d,children:"Show in map"}),g.jsx(Q$,{toggle:o,isOpen:r,title:e,locations:l})]})},Ibe=({onChange:e,selected:t={},className:n,isOrphanVisits:r})=>{const{orphanVisitsType:i,excludeBots:o=!1}=t,a=s=>({active:i===s,onClick:()=>e({...t,orphanVisitsType:s===(t==null?void 0:t.orphanVisitsType)?void 0:s})});return g.jsxs(fa,{text:"Filters",dropdownClassName:n,inline:!0,end:!0,minWidth:250,children:[g.jsx(Ue,{header:!0,"aria-hidden":!0,children:"Bots:"}),g.jsx(Ue,{active:o,onClick:()=>e({...t,excludeBots:!(t!=null&&t.excludeBots)}),children:"Exclude potential bots"}),r&&g.jsxs(g.Fragment,{children:[g.jsx(Ue,{divider:!0,tag:"hr"}),g.jsx(Ue,{header:!0,"aria-hidden":!0,children:"Orphan visits type:"}),g.jsx(Ue,{...a("base_url"),children:"Base URL"}),g.jsx(Ue,{...a("invalid_short_url"),children:"Invalid short URL"}),g.jsx(Ue,{...a("regular_404"),children:"Regular 404"})]}),g.jsx(Ue,{divider:!0,tag:"hr"}),g.jsx(Ue,{disabled:!uo(t),onClick:()=>e({excludeBots:!1,orphanVisitsType:void 0}),children:g.jsx("i",{children:"Clear filters"})})]})},X$=(e,t)=>!Wu(e)&&uo(e[t]),cR=e=>typeof e=="number"?e:e?parseFloat(e):0,Fbe=(e,{os:t})=>{e[t]=(e[t]||0)+1},$be=(e,{browser:t})=>{e[t]=(e[t]||0)+1},Ube=(e,{referer:t})=>{e[t]=(e[t]||0)+1},J$=e=>(t,n)=>{const r=X$(n,e)?n[e]:"Unknown";t[r]=(t[r]||0)+1},Bbe=J$("country"),zbe=J$("city"),Vbe=(e,t)=>{if(!X$(t,"city")||t.city==="Unknown")return;const{city:n,latitude:r,longitude:i}=t,o=e[n]||{cityName:n,count:0,latLong:[cR(r),cR(i)]};o.count+=1,e[n]=o},Hbe=(e,t)=>{if(!L_e(t))return;const{visitedUrl:n}=t;e[n]=(e[n]||0)+1},eU=e=>e.reduce((t,n)=>(Fbe(t.os,n),$be(t.browsers,n),Ube(t.referrers,n),Bbe(t.countries,n),zbe(t.cities,n),Vbe(t.citiesForMap,n),Hbe(t.visitedUrls,n),t),{os:{},browsers:{},referrers:{},countries:{},cities:{},citiesForMap:{},visitedUrls:{}}),tU=u8(e=>{const{userAgent:t,date:n,referer:r,visitLocation:i,potentialBot:o}=e,a={date:n,potentialBot:o,...Q_e(t),referer:X_e(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 QT(e)?{...a,type:e.type,visitedUrl:e.visitedUrl}:a}),Wbe=Object.freeze(Object.defineProperty({__proto__:null,normalizeVisits:tU,processStatsFromVisits:eU},Symbol.toStringTag,{value:"Module"})),Gd=20,Ybe=({browser:e,os:t,referer:n,country:r,city:i,...o},a)=>`${e} ${t} ${n} ${r} ${i} ${o.visitedUrl}`.toLowerCase().includes(a.toLowerCase()),Gbe=(e,t)=>t.filter(n=>Ybe(n,e)),qbe=(e,t)=>v6(t,e),Zbe=(e,t,n)=>{const r=t?Gbe(t,e):[...e],i=qbe(n,r),o=i.length;return{visitsGroups:gh(Gd,i),total:o}},Kbe=({visits:e,selectedVisits:t=[],setSelectedVisits:n,matchMedia:r=window.matchMedia,isOrphanVisits:i=!1})=>{var o,a;const s="visits-table__header-cell visits-table__sticky",l=sF(767,r),[c,d]=I.useState(void 0),[f,p]=I.useState({}),m=I.useMemo(()=>Zbe(e,c,f),[e,c,f]),[v,y]=I.useState(1),x=v*Gd,_=x-Gd,w=8+Number(i),S=O=>()=>p({field:O,dir:l0(O,f.field,f.dir)}),E=O=>g.jsx(Of,{currentOrder:f,field:O,className:"visits-table__header-icon"});return I.useEffect(()=>{y(1),n([])},[c,n]),g.jsx("div",{className:"table-responsive-md",children:g.jsxs("table",{className:"table table-bordered table-hover table-sm visits-table",children:[g.jsxs("thead",{className:"visits-table__header",children:[g.jsxs("tr",{children:[g.jsxs("th",{className:`${s} text-center`,onClick:()=>n(t.length0})})]}),g.jsxs("th",{className:`${s} text-center`,onClick:S("potentialBot"),children:[g.jsx("span",{className:"sr-only",children:"Is bot"}),g.jsx(Ne,{icon:Ik}),E("potentialBot")]}),g.jsxs("th",{className:s,onClick:S("date"),children:["Date",E("date")]}),g.jsxs("th",{className:s,onClick:S("country"),children:["Country",E("country")]}),g.jsxs("th",{className:s,onClick:S("city"),children:["City",E("city")]}),g.jsxs("th",{className:s,onClick:S("browser"),children:["Browser",E("browser")]}),g.jsxs("th",{className:s,onClick:S("os"),children:["OS",E("os")]}),g.jsxs("th",{className:s,onClick:S("referer"),children:["Referrer",E("referer")]}),i&&g.jsxs("th",{className:s,onClick:S("visitedUrl"),children:["Visited URL",E("visitedUrl")]})]}),g.jsx("tr",{children:g.jsx("td",{colSpan:w,className:"p-0",children:g.jsx(Hh,{noBorder:!0,large:!1,onChange:d})})})]}),g.jsxs("tbody",{children:[!((o=m.visitsGroups[v-1])!=null&&o.length)&&g.jsx("tr",{children:g.jsx("td",{colSpan:w,className:"text-center",children:"No visits found with current filtering"})}),(a=m.visitsGroups[v-1])==null?void 0:a.map((O,k)=>{const j=t.includes(O);return g.jsxs("tr",{style:{cursor:"pointer"},className:Qe({"table-active":j}),onClick:()=>n(j?t.filter(A=>A!==O):[...t,O]),children:[g.jsx("td",{className:"text-center",children:j&&g.jsx(Ne,{icon:Yf,className:"text-primary"})}),g.jsx("td",{className:"text-center",children:O.potentialBot&&g.jsxs(g.Fragment,{children:[g.jsx(Ne,{icon:Ik,id:`botIcon${k}`}),g.jsx(Rr,{placement:"right",target:`botIcon${k}`,children:"Potentially a visit from a bot or crawler"})]})}),g.jsx("td",{children:g.jsx(ry,{date:O.date})}),g.jsx("td",{children:O.country}),g.jsx("td",{children:O.city}),g.jsx("td",{children:O.browser}),g.jsx("td",{children:O.os}),g.jsx("td",{children:O.referer}),i&&g.jsx("td",{children:O.visitedUrl})]},k)})]}),m.total>Gd&&g.jsx("tfoot",{children:g.jsx("tr",{children:g.jsx("td",{colSpan:w,className:"visits-table__footer-cell visits-table__sticky",children:g.jsxs("div",{className:"row",children:[g.jsx("div",{className:"col-md-6",children:g.jsx(WT,{pagesCount:Math.ceil(m.total/Gd),currentPage:v,setCurrentPage:y,centered:l})}),g.jsx("div",{className:Qe("col-md-6",{"d-flex align-items-center flex-row-reverse":!l,"text-center mt-3":l}),children:g.jsxs("div",{children:["Visits ",g.jsx("b",{children:wn(_+1)})," to"," ",g.jsx("b",{children:wn(b8(x,m.total))})," of"," ",g.jsx("b",{children:wn(m.total)})]})})]})})})})]})})},fc={byTime:{title:"By time",subPath:"by-time",icon:OW},byContext:{title:"By context",subPath:"by-context",icon:US},byLocation:{title:"By location",subPath:"by-location",icon:G1},list:{title:"List",subPath:"list",icon:ID}};let Um;const up=({children:e,visitsInfo:t,getVisits:n,cancelGetVisits:r,exportCsv:i,isOrphanVisits:o=!1})=>{const{visits:a,loading:s,loadingLarge:l,error:c,errorData:d,progress:f,fallbackInterval:p}=t,[{dateRange:m,visitsFilter:v},y]=gbe(),x=Ul("visits"),_=Vr(({startDate:z,endDate:q})=>({dateRange:{startDate:z??void 0,endDate:q??void 0}}),y),w=I.useRef(m??p??(x==null?void 0:x.defaultInterval)??"last30Days"),[S,E]=I.useState([]),[O,k]=I.useState(),j=I.useRef(!0),{search:A}=En(),U=z=>z?`${z}${A}`:A,R=I.useMemo(()=>tU(a),[a]),{os:V,browsers:W,referrers:X,countries:G,cities:Z,citiesForMap:ne,visitedUrls:le}=I.useMemo(()=>eU(R),[R]),K=I.useMemo(()=>({...v,excludeBots:v.excludeBots??(x==null?void 0:x.excludeBots)}),[v,x==null?void 0:x.excludeBots]),F=h8(ne),D=I.useCallback(z=>{Um=void 0,E(z)},[]),H=I.useCallback((z,q)=>{const re=`${z}_${q}`;Um===re?(E([]),k(void 0),Um=void 0):(E(R.filter(yue(z,q))),k(q),Um=re)},[R]);I.useEffect(()=>r,[r]),I.useEffect(()=>{const z=j.current?m??zhe(w.current):m;n({dateRange:z,filter:K},j.current),j.current=!1},[m,v]),I.useEffect(()=>{p&&w.current===((x==null?void 0:x.defaultInterval)??"last30Days")&&(w.current=p)},[p,x==null?void 0:x.defaultInterval]);const ie=()=>l?g.jsxs(Ho,{loading:!0,children:["This is going to take a while... :S",g.jsx(n6,{value:f,striped:f===100,className:"mt-3"})]}):s?g.jsx(Ho,{loading:!0}):c?g.jsx(zr,{type:"error",children:g.jsx(na,{errorData:d,fallbackMessage:"An error occurred while loading visits :("})}):qi(a)?g.jsx(Ho,{children:"There are no visits matching current filter"}):g.jsxs(g.Fragment,{children:[g.jsx(g6,{fill:!0,children:Object.values(fc).map(({title:z,icon:q,subPath:re},ae)=>g.jsxs(uf,{to:U(re),replace:!0,children:[g.jsx(Ne,{icon:q}),g.jsx("span",{className:"ms-2 d-none d-sm-inline",children:z})]},ae))}),g.jsx(gr,{children:g.jsxs(Ky,{children:[g.jsx(vt,{path:fc.byTime.subPath,element:g.jsx("div",{className:"col-12 mt-3",children:g.jsx(abe,{title:"Visits during time",visits:R,highlightedVisits:S,highlightedLabel:O,setSelectedVisits:D})})}),g.jsx(vt,{path:fc.byContext.subPath,element:g.jsxs(g.Fragment,{children:[g.jsx("div",{className:Qe("mt-3 col-lg-6",{"col-xl-4":!o}),children:g.jsx(tR,{title:"Operating systems",stats:V})}),g.jsx("div",{className:Qe("mt-3 col-lg-6",{"col-xl-4":!o}),children:g.jsx(tR,{title:"Browsers",stats:W})}),g.jsx("div",{className:Qe("mt-3",{"col-xl-4":!o,"col-lg-6":o}),children:g.jsx($m,{title:"Referrers",stats:X,withPagination:!1,highlightedStats:Im(S,"referer"),highlightedLabel:O,sortingItems:{name:"Referrer name",amount:"Visits amount"},onClick:z=>H("referer",z)})}),o&&g.jsx("div",{className:"mt-3 col-lg-6",children:g.jsx($m,{title:"Visited URLs",stats:le,highlightedLabel:O,highlightedStats:Im(S,"visitedUrl"),sortingItems:{visitedUrl:"Visited URL",amount:"Visits amount"},onClick:z=>H("visitedUrl",z)})})]})}),g.jsx(vt,{path:fc.byLocation.subPath,element:g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"col-lg-6 mt-3",children:g.jsx($m,{title:"Countries",stats:G,highlightedStats:Im(S,"country"),highlightedLabel:O,sortingItems:{name:"Country name",amount:"Visits amount"},onClick:z=>H("country",z)})}),g.jsx("div",{className:"col-lg-6 mt-3",children:g.jsx($m,{title:"Cities",stats:Z,highlightedStats:Im(S,"city"),highlightedLabel:O,extraHeaderContent:z=>F.length>0&&g.jsx(Dbe,{modalTitle:"Cities",locations:F,activeCities:z}),sortingItems:{name:"City name",amount:"Visits amount"},onClick:z=>H("city",z)})})]})}),g.jsx(vt,{path:fc.list.subPath,element:g.jsx("div",{className:"col-12",children:g.jsx(Kbe,{visits:R,selectedVisits:S,setSelectedVisits:D,isOrphanVisits:o})})}),g.jsx(vt,{path:"*",element:g.jsx(NS,{replace:!0,to:U(fc.byTime.subPath)})})]})})]});return g.jsxs(g.Fragment,{children:[e,g.jsx("section",{className:"mt-3",children:g.jsxs("div",{className:"row flex-md-row-reverse",children:[g.jsx("div",{className:"col-lg-7 col-xl-6",children:g.jsxs("div",{className:"d-md-flex",children:[g.jsx("div",{className:"flex-fill",children:g.jsx(r$,{updatable:!0,disabled:s,initialDateRange:w.current,defaultText:"All visits",onDatesChange:_})}),g.jsx(Ibe,{className:"ms-0 ms-md-2 mt-3 mt-md-0",isOrphanVisits:o,selected:K,onChange:z=>y({visitsFilter:z})})]})}),a.length>0&&g.jsx("div",{className:"col-lg-5 col-xl-6 mt-3 mt-lg-0",children:g.jsxs("div",{className:"d-flex",children:[g.jsx(wF,{className:"btn-md-block",amount:R.length,onClick:()=>i(R)}),g.jsxs(yt,{outline:!0,disabled:S.length===0,className:"btn-md-block ms-2",onClick:()=>D([]),children:["Clear selection ",S.length>0&&g.jsxs(g.Fragment,{children:["(",wn(S.length),")"]})]})]})})]})}),g.jsx("section",{className:"mt-3",children:ie()})]})},nU=ws(({getDomainVisits:e,domainVisits:t,cancelGetDomainVisits:n})=>{const{ReportExporter:r}=Kt(nU),i=Yu(),{domain:o=""}=Rl(),[a,s=a]=o.split("_");return g.jsx(up,{getVisits:(l,c)=>e({domain:s,query:sp(l),doIntervalFallback:c}),cancelGetVisits:n,visitsInfo:t,exportCsv:l=>r.exportVisits(`domain_${a}_visits.csv`,l),children:g.jsx(lp,{goBack:i,visits:t.visits,title:`"${a}" visits`})})},()=>[pi.visits]),Qbe=Qt(nU,["ReportExporter"]),rU=ws(({getNonOrphanVisits:e,nonOrphanVisits:t,cancelGetNonOrphanVisits:n})=>{const{ReportExporter:r}=Kt(rU),i=Yu();return g.jsx(up,{getVisits:(o,a)=>e({query:sp(o),doIntervalFallback:a}),cancelGetVisits:n,visitsInfo:t,exportCsv:o=>r.exportVisits("non_orphan_visits.csv",o),children:g.jsx(lp,{title:"Non-orphan visits",goBack:i,visits:t.visits})})},()=>[pi.visits]),Xbe=Qt(rU,["ReportExporter"]),iU=ws(({getOrphanVisits:e,orphanVisits:t,cancelGetOrphanVisits:n})=>{const{ReportExporter:r}=Kt(iU),i=Yu();return g.jsx(up,{getVisits:(o,a)=>{var s;return e({query:sp(o),orphanVisitsType:(s=o.filter)==null?void 0:s.orphanVisitsType,doIntervalFallback:a})},cancelGetVisits:n,visitsInfo:t,exportCsv:o=>r.exportVisits("orphan_visits.csv",o),isOrphanVisits:!0,children:g.jsx(lp,{title:"Orphan visits",goBack:i,visits:t.visits})})},()=>[pi.orphanVisits]),Jbe=Qt(iU,["ReportExporter"]),oU="shlink/orphanVisits",e1e={visits:[],loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},t1e=e=>np({typePrefix:`${oU}/getNonOrphanVisits`,createLoaders:({query:t={},doIntervalFallback:n=!1})=>{const r=e(),i=async(a,s)=>r.getNonOrphanVisits({...t,page:a,itemsPerPage:s}),o=rp(n,a=>r.getNonOrphanVisits(a));return[i,o]},getExtraFulfilledPayload:({query:t={}})=>({query:t}),shouldCancel:t=>t().orphanVisits.cancelLoad}),n1e=e=>ip({name:oU,initialState:e1e,asyncThunkCreator:e,filterCreatedVisits:({query:t={}},n)=>{const{startDate:r,endDate:i}=t;return n.filter(({visit:o})=>Jh(o.date,r,i))}}),aU="shlink/orphanVisits",r1e={visits:[],loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},i1e=(e,t)=>!t||t===e.type,o1e=e=>np({typePrefix:`${aU}/getOrphanVisits`,createLoaders:({orphanVisitsType:t,query:n={},doIntervalFallback:r=!1})=>{const i=e(),o=async(s,l)=>i.getOrphanVisits({...n,page:s,itemsPerPage:l}).then(c=>{const d=c.data.filter(f=>QT(f)&&i1e(f,t));return{...c,data:d}}),a=rp(r,s=>i.getOrphanVisits(s));return[o,a]},getExtraFulfilledPayload:({query:t={}})=>({query:t}),shouldCancel:t=>t().orphanVisits.cancelLoad}),a1e=e=>ip({name:aU,initialState:r1e,asyncThunkCreator:e,filterCreatedVisits:({query:t={}},n)=>{const{startDate:r,endDate:i}=t;return n.filter(({visit:o,shortUrl:a})=>!a&&Jh(o.date,r,i))}}),sU="shlink/shortUrlVisits",s1e={visits:[],shortCode:"",domain:void 0,loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},l1e=e=>np({typePrefix:`${sU}/getShortUrlVisits`,createLoaders:({shortCode:t,query:n={},doIntervalFallback:r=!1})=>{const i=e(),o=async(s,l)=>i.getShortUrlVisits(t,{...n,page:s,itemsPerPage:l}),a=rp(r,async s=>i.getShortUrlVisits(t,{...s,domain:n.domain}));return[o,a]},getExtraFulfilledPayload:({shortCode:t,query:n={}})=>({shortCode:t,query:n,domain:n.domain}),shouldCancel:t=>t().shortUrlVisits.cancelLoad}),c1e=e=>ip({name:sU,initialState:s1e,asyncThunkCreator:e,filterCreatedVisits:({shortCode:t,domain:n,query:r={}},i)=>{const{startDate:o,endDate:a}=r;return i.filter(({shortUrl:s,visit:l})=>s&&xf(s,t,n)&&Jh(l.date,o,a))}}),lU="shlink/tagVisits",u1e={visits:[],tag:"",loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},d1e=e=>np({typePrefix:`${lU}/getTagVisits`,createLoaders:({tag:t,query:n={},doIntervalFallback:r=!1})=>{const i=e(),o=async(s,l)=>i.getTagVisits(t,{...n,page:s,itemsPerPage:l}),a=rp(r,async s=>i.getTagVisits(t,s));return[o,a]},getExtraFulfilledPayload:({tag:t,query:n={}})=>({tag:t,query:n}),shouldCancel:t=>t().tagVisits.cancelLoad}),f1e=e=>ip({name:lU,initialState:u1e,asyncThunkCreator:e,filterCreatedVisits:({tag:t,query:n={}},r)=>{const{startDate:i,endDate:o}=n;return r.filter(({shortUrl:a,visit:s})=>(a==null?void 0:a.tags.includes(t))&&Jh(s.date,i,o))}}),cU="shlink/visitsOverview",Bm={nonOrphanVisits:{total:0},orphanVisits:{total:0},loading:!1,error:!1},uR=e=>e.filter(({visit:t})=>t.potentialBot).length,h1e=e=>Nr(`${cU}/loadVisitsOverview`,()=>e().getVisitsOverview().then(({nonOrphanVisits:t,visitsCount:n,orphanVisits:r,orphanVisitsCount:i})=>({nonOrphanVisits:{total:(t==null?void 0:t.total)??n,nonBots:t==null?void 0:t.nonBots,bots:t==null?void 0:t.bots},orphanVisits:{total:(r==null?void 0:r.total)??i,nonBots:r==null?void 0:r.nonBots,bots:r==null?void 0:r.bots}}))),p1e=e=>lr({name:cU,initialState:Bm,reducers:{},extraReducers:t=>{t.addCase(e.pending,()=>({...Bm,loading:!0})),t.addCase(e.rejected,()=>({...Bm,error:!0})),t.addCase(e.fulfilled,(n,{payload:r})=>({...Bm,...r})),t.addCase(tp,({nonOrphanVisits:n,orphanVisits:r,...i},{payload:o})=>{const{nonOrphanVisits:a,orphanVisits:s}=j_e(o.createdVisits),l=a.length,c=uR(a),d=l-c,f=s.length,p=uR(s),m=f-p;return{...i,nonOrphanVisits:{total:n.total+l,bots:n.bots&&n.bots+c,nonBots:n.nonBots&&n.nonBots+d},orphanVisits:{total:r.total+f,bots:r.bots&&r.bots+p,nonBots:r.nonBots&&r.nonBots+m}}})}}),m1e=({shortUrlDetail:e,shortUrlVisits:t,goBack:n})=>{const{shortUrl:r,loading:i}=e,{visits:o}=t,a=(r==null?void 0:r.shortUrl)??"",s=(r==null?void 0:r.longUrl)??"",l=r==null?void 0:r.title;return g.jsxs(lp,{title:g.jsxs(g.Fragment,{children:["Visits for ",g.jsx(Wo,{href:a})]}),goBack:n,visits:o,shortUrl:r,children:[g.jsx("hr",{}),g.jsxs("div",{children:["Created: ",(()=>r?g.jsxs("span",{children:[g.jsx("b",{id:"created",className:"short-url-visits-header__created-at",children:g.jsx(ry,{date:r.dateCreated,relative:!0})}),g.jsx(Rr,{placement:"bottom",target:"created",children:g.jsx(ry,{date:r.dateCreated})})]}):g.jsx("small",{children:"Loading..."}))()]}),g.jsxs("div",{className:"long-url-container",children:[`${l?"Title":"Long URL"}: `,i&&g.jsx("small",{children:"Loading..."}),!i&&g.jsx(Wo,{href:s,children:l??s})]})]})},uU=ws(({shortUrlVisits:e,shortUrlDetail:t,getShortUrlVisits:n,getShortUrlDetail:r,cancelGetShortUrlVisits:i})=>{const{ReportExporter:o}=Kt(uU),{shortCode:a=""}=Rl(),{search:s}=En(),l=Yu(),{domain:c}=zu(s),d=(p,m)=>n({shortCode:vg(a),query:{...sp(p),domain:c},doIntervalFallback:m}),f=p=>{var m;return o.exportVisits(`short-url_${(m=t.shortUrl)==null?void 0:m.shortUrl.replace(/https?:\/\//g,"")}_visits.csv`,p)};return I.useEffect(()=>{r({shortCode:vg(a),domain:c})},[c,r,a]),g.jsx(up,{getVisits:d,cancelGetVisits:i,visitsInfo:e,exportCsv:f,children:g.jsx(m1e,{shortUrlDetail:t,shortUrlVisits:e,goBack:l})})},e=>e.shortCode?[pi.shortUrlVisits(vg(e.shortCode))]:[]),g1e=Qt(uU,["ReportExporter"]),v1e=({tagVisits:e,goBack:t,colorGenerator:n})=>{const{visits:r,tag:i}=e;return g.jsx(lp,{title:g.jsxs("span",{className:"d-flex align-items-center justify-content-center",children:[g.jsx("span",{className:"me-2",children:"Visits for"}),g.jsx(jT,{text:i,colorGenerator:n})]}),goBack:t,visits:r})},dU=ws(({getTagVisits:e,tagVisits:t,cancelGetTagVisits:n})=>{const{ColorGenerator:r,ReportExporter:i}=Kt(dU),o=Yu(),{tag:a=""}=Rl();return g.jsx(up,{getVisits:(s,l)=>e({tag:a,query:sp(s),doIntervalFallback:l}),cancelGetVisits:n,visitsInfo:t,exportCsv:s=>i.exportVisits(`tag_${a}_visits.csv`,s),children:g.jsx(v1e,{tagVisits:t,goBack:o,colorGenerator:r})})},()=>[pi.visits]),y1e=Qt(dU,["ColorGenerator","ReportExporter"]),_1e=(e,t)=>{e.serviceFactory("MapModal",()=>Q$),e.factory("ShortUrlVisits",g1e),e.decorator("ShortUrlVisits",t(["shortUrlVisits","shortUrlDetail","mercureInfo"],["getShortUrlVisits","getShortUrlDetail","cancelGetShortUrlVisits","createNewVisits","loadMercureInfo"])),e.factory("TagVisits",y1e),e.decorator("TagVisits",t(["tagVisits","mercureInfo"],["getTagVisits","cancelGetTagVisits","createNewVisits","loadMercureInfo"])),e.factory("DomainVisits",Qbe),e.decorator("DomainVisits",t(["domainVisits","mercureInfo"],["getDomainVisits","cancelGetDomainVisits","createNewVisits","loadMercureInfo"])),e.factory("OrphanVisits",Jbe),e.decorator("OrphanVisits",t(["orphanVisits","mercureInfo"],["getOrphanVisits","cancelGetOrphanVisits","createNewVisits","loadMercureInfo"])),e.factory("NonOrphanVisits",Xbe),e.decorator("NonOrphanVisits",t(["nonOrphanVisits","mercureInfo"],["getNonOrphanVisits","cancelGetNonOrphanVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("VisitsParser",()=>Wbe),e.serviceFactory("getShortUrlVisits",l1e,"apiClientFactory"),e.serviceFactory("cancelGetShortUrlVisits",mt("cancelGetVisits"),"shortUrlVisitsReducerCreator"),e.serviceFactory("getTagVisits",d1e,"apiClientFactory"),e.serviceFactory("cancelGetTagVisits",mt("cancelGetVisits"),"tagVisitsReducerCreator"),e.serviceFactory("getDomainVisits",Yhe,"apiClientFactory"),e.serviceFactory("cancelGetDomainVisits",mt("cancelGetVisits"),"domainVisitsReducerCreator"),e.serviceFactory("getOrphanVisits",o1e,"apiClientFactory"),e.serviceFactory("cancelGetOrphanVisits",mt("cancelGetVisits"),"orphanVisitsReducerCreator"),e.serviceFactory("getNonOrphanVisits",t1e,"apiClientFactory"),e.serviceFactory("cancelGetNonOrphanVisits",mt("cancelGetVisits"),"nonOrphanVisitsReducerCreator"),e.serviceFactory("createNewVisits",()=>tp),e.serviceFactory("loadVisitsOverview",h1e,"apiClientFactory"),e.serviceFactory("visitsOverviewReducerCreator",p1e,"loadVisitsOverview"),e.serviceFactory("visitsOverviewReducer",mt("reducer"),"visitsOverviewReducerCreator"),e.serviceFactory("domainVisitsReducerCreator",Ghe,"getDomainVisits"),e.serviceFactory("domainVisitsReducer",mt("reducer"),"domainVisitsReducerCreator"),e.serviceFactory("nonOrphanVisitsReducerCreator",n1e,"getNonOrphanVisits"),e.serviceFactory("nonOrphanVisitsReducer",mt("reducer"),"nonOrphanVisitsReducerCreator"),e.serviceFactory("orphanVisitsReducerCreator",a1e,"getOrphanVisits"),e.serviceFactory("orphanVisitsReducer",mt("reducer"),"orphanVisitsReducerCreator"),e.serviceFactory("shortUrlVisitsReducerCreator",c1e,"getShortUrlVisits"),e.serviceFactory("shortUrlVisitsReducer",mt("reducer"),"shortUrlVisitsReducerCreator"),e.serviceFactory("tagVisitsReducerCreator",f1e,"getTagVisits"),e.serviceFactory("tagVisitsReducer",mt("reducer"),"tagVisitsReducerCreator")},Md=({children:e,to:t,className:n,...r})=>g.jsx(wD,{className:({isActive:i})=>Qe("aside-menu__item",n,{"aside-menu__item--selected":i}),to:t,...r,children:e}),b1e=({routePrefix:e,showOnMobile:t=!1})=>{const{pathname:n}=En(),r=Qe("aside-menu",{"aside-menu--hidden":!t}),i=o=>`${e}${o}`;return g.jsx("aside",{className:r,children:g.jsxs("nav",{className:"nav flex-column aside-menu__nav",children:[g.jsxs(Md,{to:i("/overview"),children:[g.jsx(Ne,{fixedWidth:!0,icon:nY}),g.jsx("span",{className:"aside-menu__item-text",children:"Overview"})]}),g.jsxs(Md,{to:i("/list-short-urls/1"),className:Qe({"aside-menu__item--selected":n.match("/list-short-urls")!==null}),children:[g.jsx(Ne,{fixedWidth:!0,icon:ID}),g.jsx("span",{className:"aside-menu__item-text",children:"List short URLs"})]}),g.jsxs(Md,{to:i("/create-short-url"),children:[g.jsx(Ne,{fixedWidth:!0,icon:sY,flip:"horizontal"}),g.jsx("span",{className:"aside-menu__item-text",children:"Create short URL"})]}),g.jsxs(Md,{to:i("/manage-tags"),children:[g.jsx(Ne,{fixedWidth:!0,icon:FD}),g.jsx("span",{className:"aside-menu__item-text",children:"Manage tags"})]}),g.jsxs(Md,{to:i("/manage-domains"),children:[g.jsx(Ne,{fixedWidth:!0,icon:DW}),g.jsx("span",{className:"aside-menu__item-text",children:"Manage domains"})]})]})})},fU=({createNotFound:e})=>{const{TagsList:t,ShortUrlsList:n,CreateShortUrl:r,ShortUrlVisits:i,TagVisits:o,DomainVisits:a,OrphanVisits:s,NonOrphanVisits:l,Overview:c,EditShortUrl:d,ManageDomains:f}=Kt(fU),p=En(),m=Fl(),[v,y,x,_]=Sn();I.useEffect(()=>_(),[p,_]);const w=Xh("domainVisits"),S=Qe("shlink-layout__burger-icon",{"shlink-layout__burger-icon--active":v}),E=spe(x,_);return g.jsxs(g.Fragment,{children:[g.jsx(Ne,{icon:jW,className:S,onClick:y}),g.jsx("div",{...E,className:"shlink-layout__swipeable",children:g.jsxs("div",{className:"shlink-layout__swipeable-inner",children:[g.jsx(b1e,{routePrefix:m,showOnMobile:v}),g.jsx("div",{className:"shlink-layout__container",onPointerDown:()=>_(),children:g.jsx("div",{className:"container-xl",children:g.jsxs(Ky,{children:[g.jsx(vt,{index:!0,element:g.jsx(NS,{replace:!0,to:"overview"})}),g.jsx(vt,{path:"/overview",element:g.jsx(c,{})}),g.jsx(vt,{path:"/list-short-urls/:page",element:g.jsx(n,{})}),g.jsx(vt,{path:"/create-short-url",element:g.jsx(r,{})}),g.jsx(vt,{path:"/short-code/:shortCode/visits/*",element:g.jsx(i,{})}),g.jsx(vt,{path:"/short-code/:shortCode/edit",element:g.jsx(d,{})}),g.jsx(vt,{path:"/tag/:tag/visits/*",element:g.jsx(o,{})}),w&&g.jsx(vt,{path:"/domain/:domain/visits/*",element:g.jsx(a,{})}),g.jsx(vt,{path:"/orphan-visits/*",element:g.jsx(s,{})}),g.jsx(vt,{path:"/non-orphan-visits/*",element:g.jsx(l,{})}),g.jsx(vt,{path:"/manage-tags",element:g.jsx(t,{})}),g.jsx(vt,{path:"/manage-domains",element:g.jsx(f,{})}),e&&g.jsx(vt,{path:"*",element:e("/list-short-urls/1")})]})})})]})})]})},w1e=Qt(fU,["TagsList","ShortUrlsList","CreateShortUrl","ShortUrlVisits","TagVisits","DomainVisits","OrphanVisits","NonOrphanVisits","Overview","EditShortUrl","ManageDomains"]),x1e=!0,S1e=e=>G6({devTools:!x1e,reducer:AE({mercureInfo:e.mercureInfoReducer,shortUrlsList:e.shortUrlsListReducer,shortUrlCreation:e.shortUrlCreationReducer,shortUrlDeletion:e.shortUrlDeletionReducer,shortUrlEdition:e.shortUrlEditionReducer,shortUrlDetail:e.shortUrlDetailReducer,shortUrlVisits:e.shortUrlVisitsReducer,tagVisits:e.tagVisitsReducer,domainVisits:e.domainVisitsReducer,orphanVisits:e.orphanVisitsReducer,nonOrphanVisits:e.nonOrphanVisitsReducer,tagsList:e.tagsListReducer,tagDelete:e.tagDeleteReducer,tagEdit:e.tagEditReducer,domainsList:e.domainsListReducer,visitsOverview:e.visitsOverviewReducer}),middleware:t=>t({immutableCheck:!1,serializableCheck:!1})}),E1e=e=>{e.factory("Main",w1e),e.factory("store",S1e)},To=new $le,{container:T1e}=To,O1e=(e,t)=>(...n)=>e[t](...n),C1e=(e,t)=>({...e,[t]:O1e(T1e,t)}),dp=(e,t=[])=>cD(e?w8(e):null,t.reduce(C1e,{}));E1e(To);Wve(To,dp);d0e(To,dp);_1e(To,dp);bpe(To);vpe(To,dp);Rpe(To,dp);P_e(To);let dR;const k1e=e=>({serverVersion:t,apiClient:n,settings:r,routesPrefix:i="",createNotFound:o,tagColorsStorage:a})=>{const s=Iue(t),l=I.useRef(),[c,d]=I.useState(),f=Nl(),[p,m]=I.useMemo(()=>f?[I.Fragment,{}]:[bD,{basename:i}],[f,i]);return I.useEffect(()=>{dR=n,e.value("apiClientFactory",()=>dR),a&&e.value("TagColorsStorage",a);const{container:v}=e,{Main:y,store:x,loadMercureInfo:_,listTags:w}=v;l.current=g.jsx(y,{createNotFound:o}),d(x),x.dispatch(_(r)),x.dispatch(w())},[n,o,r,a]),c?g.jsx(uD,{store:c,children:g.jsx(Mpe,{value:r,children:g.jsx(Fue,{value:s,children:g.jsx($ue,{value:i,children:g.jsx(p,{...m,children:l.current})})})})}):g.jsx(g.Fragment,{})},P1e="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=",L1e="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==",j1e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC",M1e=()=>{delete lR.Icon.Default.prototype._getIconUrl,lR.Icon.Default.mergeOptions({iconRetinaUrl:L1e,iconUrl:P1e,shadowUrl:j1e})};M1e();const N1e=k1e(To);function cy(e){return t=>{const{resetSelectedServer:n}=t;return I.useEffect(()=>{n()},[n]),g.jsx(e,{...t})}}let R1e=class extends I.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t){const{console:n=globalThis.console}=this.props;n.error(t)}render(){const{hasError:t}=this.state,{location:n=globalThis.location}=this.props;if(t)return g.jsx("div",{className:"home",children:g.jsxs(mn,{className:"p-4",children:[g.jsx("h1",{children:"Oops! This is awkward :S"}),g.jsx("p",{children:"It seems that something went wrong. Try refreshing the page or just click this button."}),g.jsx("br",{}),g.jsx(yt,{outline:!0,color:"primary",onClick:()=>n.reload(),children:"Take me back"})]})});const{children:r}=this.props;return r}};const hU=({href:e,children:t,rel:n,...r})=>g.jsx("a",{target:"_blank",rel:`noopener noreferrer${n?` ${n}`:""}`,href:e,...r,children:t??e}),A1e=({id:e,name:t})=>g.jsxs(l6,{tag:It,to:`/server/${e}`,className:"servers-list__server-item",children:[t,g.jsx(Ne,{icon:fY,className:"servers-list__server-item-icon"})]}),pU=({servers:e,children:t,embedded:n=!1})=>g.jsxs(g.Fragment,{children:[t&&g.jsx("div",{"data-testid":"title",className:"mb-0 fs-5 fw-normal lh-sm",children:t}),e.length>0&&g.jsx(o6,{"data-testid":"list",tag:"div",className:Vu("servers-list__list-group",{"servers-list__list-group--embedded":n}),children:e.map(({id:r,name:i})=>g.jsx(A1e,{id:r,name:i},r))})]}),mU=({color:e=bE,className:t})=>g.jsx("svg",{className:t,viewBox:"0 0 512 512",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:g.jsxs("g",{fill:e,children:[g.jsx("path",{d:" M 23.71 85.08 C 17.22 49.81 49.44 14.86 85.08 18.12 C 118.83 19.21 145.72 53.33 139.45 86.37 C 155.64 102.30 171.32 118.83 187.87 134.36 C 198.32 111.73 208.84 89.12 219.57 66.62 C 226.05 53.84 243.47 48.74 255.73 56.27 C 263.76 62.10 270.34 69.69 277.25 76.75 C 286.28 86.61 285.72 102.89 276.31 112.31 C 223.38 165.37 170.38 218.37 117.35 271.34 C 107.72 280.99 91.01 281.25 81.11 271.86 C 74.39 264.94 66.82 258.69 61.24 250.77 C 53.72 238.52 58.85 221.07 71.64 214.62 C 94.11 203.87 116.72 193.38 139.33 182.91 C 123.81 166.36 107.30 150.68 91.37 134.49 C 60.20 140.28 27.37 116.78 23.71 85.08 Z"}),g.jsx("path",{d:" M 205.21 201.23 C 225.32 181.36 260.88 181.11 281.14 200.86 C 299.25 218.75 317.37 236.65 335.10 254.93 C 356.73 278.01 352.01 318.70 326.03 336.56 C 320.07 330.47 313.73 324.65 308.12 318.28 C 323.86 309.39 328.76 286.18 316.63 272.39 C 301.73 256.95 286.30 242.03 271.24 226.75 C 264.49 219.65 256.80 212.00 246.37 211.52 C 224.65 208.64 205.52 233.36 214.49 253.58 C 221.09 266.81 234.22 275.12 243.62 286.24 C 240.43 295.96 238.09 306.13 238.29 316.46 C 225.55 304.29 213.16 291.73 200.89 279.09 C 180.97 257.57 183.10 220.45 205.21 201.23 Z"}),g.jsx("path",{d:" M 273.90 352.07 C 252.28 328.99 256.98 288.31 282.96 270.46 C 288.93 276.54 295.26 282.36 300.88 288.72 C 285.14 297.62 280.23 320.82 292.38 334.61 C 307.27 350.05 322.70 364.96 337.75 380.25 C 344.51 387.35 352.20 395.00 362.64 395.48 C 384.35 398.37 403.49 373.64 394.51 353.42 C 387.92 340.18 374.78 331.88 365.38 320.76 C 368.56 311.04 370.91 300.86 370.71 290.54 C 383.45 302.70 395.84 315.27 408.11 327.91 C 428.03 349.43 425.90 386.55 403.78 405.77 C 383.68 425.64 348.13 425.89 327.86 406.14 C 309.75 388.25 291.60 370.37 273.90 352.07 Z"}),g.jsx("path",{d:" M 422.11 403.83 C 431.96 394.07 441.60 384.06 451.66 374.51 C 460.90 383.74 471.89 392.70 474.89 406.11 C 480.16 429.97 484.08 454.13 488.76 478.12 C 490.00 483.41 484.47 488.29 479.35 486.63 C 454.66 481.52 429.55 478.12 405.14 471.84 C 393.17 467.97 385.20 457.75 376.55 449.27 C 386.39 439.49 396.13 429.60 406.06 419.91 C 416.37 433.45 435.74 414.00 422.11 403.83 Z"})]})}),D1e=({servers:e})=>{const t=So(),n=Object.values(e),r=n.length>0;return I.useEffect(()=>{const i=n.find(({autoConnect:o})=>o);i&&t(`/server/${i.id}`)},[n,t]),g.jsx("div",{className:"home",children:g.jsx(Gr,{className:"home__main-card",children:g.jsxs(gr,{className:"g-0",children:[g.jsx("div",{className:"col-md-5 d-none d-md-block",children:g.jsx("div",{className:"home__logo-wrapper",children:g.jsx("div",{className:"home__logo",children:g.jsx(mU,{})})})}),g.jsxs("div",{className:"col-md-7 home__servers-container",children:[g.jsx("div",{className:"home__title-wrapper",children:g.jsx("h1",{className:"home__title",children:"Welcome!"})}),g.jsx(pU,{embedded:!0,servers:n,children:!r&&g.jsxs("div",{className:"p-4 text-center",children:[g.jsx("p",{className:"mb-5",children:"This application will help you manage your Shlink servers."}),g.jsx("p",{children:g.jsxs(It,{to:"/server/create",className:"btn btn-outline-primary btn-lg me-2",children:[g.jsx(Ne,{icon:zS})," ",g.jsx("span",{className:"ms-1",children:"Add a server"})]})}),g.jsx("p",{className:"mb-0 mt-5",children:g.jsx(hU,{href:"https://shlink.io/documentation",children:g.jsxs("small",{children:[g.jsx("span",{className:"me-1",children:"Learn more about Shlink"})," ",g.jsx(Ne,{icon:GW})]})})})]})})]})]})})})},gU=()=>{const{ServersDropdown:e}=Ei(gU),[t,n,,r]=Sn(),i=En(),{pathname:o}=i;I.useEffect(r,[i,r]);const a="/settings",s=Vu("main-header__toggle-icon",{"main-header__toggle-icon--opened":t});return g.jsxs(TI,{color:"primary",dark:!0,fixed:"top",className:"main-header",expand:"md",children:[g.jsxs(OI,{tag:It,to:"/",children:[g.jsx(mU,{className:"main-header__brand-logo",color:"white"})," Shlink"]}),g.jsx(CI,{onClick:n,children:g.jsx(Ne,{icon:uY,className:s})}),g.jsx(cQ,{navbar:!0,isOpen:t,children:g.jsxs(iE,{navbar:!0,className:"ms-auto",children:[g.jsx(oE,{children:g.jsxs(LI,{tag:It,to:a,active:o.startsWith(a),children:[g.jsx(Ne,{icon:gY}),"  Settings"]})}),g.jsx(e,{})]})})]})},I1e=Ti(gU,["ServersDropdown"]),F1e=({children:e})=>{const t=En();return I.useEffect(()=>{scrollTo(0,0)},[t]),g.jsx(g.Fragment,{children:e})},Wb=e=>!!e&&typeof e=="object"&&!Array.isArray(e),vU=(e,t)=>{const n={};return(...r)=>{const i=e(...r);if(n[i])return n[i];const o=t(...r);return n[i]=o,o}},yU=(e,t)=>{const n={...e};return!Wb(e)||!Wb(t)||Object.keys(t).forEach(r=>{Wb(t[r])?n[r]=r in e?yU(e[r],t[r]):{...t[r]}:n[r]=t[r]}),n},$1e=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,fR=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match($1e);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},hR=e=>e==="*"||e==="x"||e==="X",pR=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},U1e=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],B1e=(e,t)=>{if(hR(e)||hR(t))return 0;const[n,r]=U1e(pR(e),pR(t));return n>r?1:n{for(let n=0;n{const n=fR(e),r=fR(t),i=n.pop(),o=r.pop(),a=mR(n,r);return a!==0?a:i&&o?mR(i.split("."),o.split(".")):i||o?i?-1:1:0},V1e=(e,t,n)=>{H1e(n);const r=z1e(e,t);return _U[n].includes(r)},_U={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},gR=Object.keys(_U),H1e=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(gR.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${gR.join("|")}`)},bU=vU(e=>e,e=>{try{return V1e(e,e,"=")}catch{return!1}}),wU=e=>bU(e)?`v${e}`:e,xU=(e,t="latest")=>bU(e)?e:t,W1e="%_VERSION_%",Y1e=e=>wU(xU(e)),vR=({project:e,version:t})=>g.jsx(hU,{href:`https://github.com/shlinkio/${e}/releases/${t}`,className:"text-muted",children:g.jsx("b",{children:t})}),G1e=({selectedServer:e,clientVersion:t=W1e})=>{const n=Y1e(t);return g.jsxs("small",{className:"text-muted",children:[AD(e)&&g.jsxs(g.Fragment,{children:["Server: ",g.jsx(vR,{project:"shlink",version:e.printableVersion})," - "]}),"Client: ",g.jsx(vR,{project:"shlink-web-client",version:n})]})},q1e=/^\/server\/[a-zA-Z0-9-]*\/(?!edit)/,Z1e=({selectedServer:e})=>{const{pathname:t}=En(),n=I.useMemo(()=>q1e.test(t),[t]),r=Vu("text-center",{"shlink-versions-container--with-sidebar":n});return g.jsx("div",{className:r,children:g.jsx(G1e,{selectedServer:e})})},Zu=({children:e})=>g.jsx("div",{className:"no-menu-wrapper container-xl",children:e});function SU(e){const t=n=>{const{ServerError:r}=Ei(t),i=Rl(),{selectServer:o,selectedServer:a}=n;return I.useEffect(()=>{i.serverId&&o(i.serverId)},[i.serverId,o]),a?yW(a)?g.jsx(r,{}):g.jsx(e,{...n}):g.jsx(Zu,{children:g.jsx(Ho,{loading:!0})})};return t}const EU=SU(({selectedServer:e,settings:t})=>{const{buildShlinkApiClient:n,TagColorsStorage:r,ShlinkWebComponent:i,ServerError:o}=Ei(EU),a=AD(e),s=a?`/server/${e.id}`:"";return a?g.jsx(i,{serverVersion:e.version,apiClient:n(e),settings:t,routesPrefix:s,tagColorsStorage:r,createNotFound:l=>g.jsx(D6,{to:`${s}${l}`,children:"List short URLs"})}):g.jsx(o,{})}),K1e=Ti(EU,["buildShlinkApiClient","TagColorsStorage","ShlinkWebComponent","ServerError"]),Q1e=(e,t)=>{e.constant("window",window),e.constant("console",console),e.constant("fetch",window.fetch.bind(window)),e.service("HttpClient",ore,"fetch"),e.serviceFactory("ScrollToTop",()=>F1e),e.factory("MainHeader",I1e),e.serviceFactory("Home",()=>D1e),e.decorator("Home",cy),e.decorator("Home",t(["servers"],["resetSelectedServer"])),e.serviceFactory("ShlinkWebComponent",()=>N1e),e.factory("ShlinkWebComponentContainer",K1e),e.decorator("ShlinkWebComponentContainer",t(["selectedServer","settings"],["selectServer"])),e.serviceFactory("ShlinkVersionsContainer",()=>Z1e),e.decorator("ShlinkVersionsContainer",t(["selectedServer"])),e.serviceFactory("ErrorHandler",()=>R1e)};let zm;const X1e=new Uint8Array(16);function J1e(){if(!zm&&(zm=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!zm))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return zm(X1e)}const Gn=[];for(let e=0;e<256;++e)Gn.push((e+256).toString(16).slice(1));function ewe(e,t=0){return Gn[e[t+0]]+Gn[e[t+1]]+Gn[e[t+2]]+Gn[e[t+3]]+"-"+Gn[e[t+4]]+Gn[e[t+5]]+"-"+Gn[e[t+6]]+Gn[e[t+7]]+"-"+Gn[e[t+8]]+Gn[e[t+9]]+"-"+Gn[e[t+10]]+Gn[e[t+11]]+Gn[e[t+12]]+Gn[e[t+13]]+Gn[e[t+14]]+Gn[e[t+15]]}const twe=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),yR={randomUUID:twe};function TU(e,t,n){if(yR.randomUUID&&!t&&!e)return yR.randomUUID();e=e||{};const r=e.random||(e.rng||J1e)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return ewe(r)}const OU=()=>{const e=So();return I.useCallback(()=>e(-1),[e])},nwe=()=>{const{search:e}=En();return I.useMemo(()=>zu(e),[e])},CU=({isOpen:e,duplicatedServers:t,onDiscard:n,onSave:r})=>{const i=t.length>1;return g.jsxs(ua,{centered:!0,isOpen:e,children:[g.jsxs(da,{children:["Duplicated server",i&&"s"]}),g.jsxs(Eo,{children:[g.jsx("p",{children:i?"The next servers already exist:":"There is already a server with:"}),g.jsx("ul",{children:t.map(({url:o,apiKey:a},s)=>i?g.jsxs("li",{children:[g.jsx("b",{children:o})," - ",g.jsx("b",{children:a})]},s):g.jsxs(I.Fragment,{children:[g.jsxs("li",{children:["URL: ",g.jsx("b",{children:o})]}),g.jsxs("li",{children:["API key: ",g.jsx("b",{children:a})]})]},s))}),g.jsxs("span",{children:[i?"Do you want to ignore duplicated servers":"Do you want to save this server anyway","?"]})]}),g.jsxs(Al,{children:[g.jsx(yt,{color:"link",onClick:n,children:i?"Ignore duplicates":"Discard"}),g.jsx(yt,{color:"primary",onClick:r,children:"Save anyway"})]})]})},rwe=e=>t=>{t.preventDefault(),e()},kU=({onSubmit:e,initialValues:t,children:n,title:r})=>{const[i,o]=I.useState(""),[a,s]=I.useState(""),[l,c]=I.useState(""),d=rwe(()=>e({name:i,url:a,apiKey:l}));return I.useEffect(()=>{t&&o(t.name),t&&s(t.url),t&&c(t.apiKey)},[t]),g.jsxs("form",{className:"server-form",name:"serverForm",onSubmit:d,children:[g.jsxs(mn,{className:"mb-3",title:r,children:[g.jsx(ag,{value:i,onChange:o,children:"Name"}),g.jsx(ag,{type:"url",value:a,onChange:s,children:"URL"}),g.jsx(ag,{value:l,onChange:c,children:"API key"})]}),g.jsx("div",{className:"text-end",children:n})]})},_R=4e3,bR=({type:e})=>g.jsx("div",{className:"mt-3",children:g.jsxs(zr,{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."]})}),PU=({servers:e,createServers:t})=>{const{ImportServersBtn:n,useTimeoutToggle:r}=Ei(PU),i=So(),o=OU(),a=!!Object.keys(e).length,[s,l]=r(!1,_R),[c,d]=r(!1,_R),[f,p]=Sn(),[m,v]=I.useState(),y=I.useCallback(x=>{const _=TU();t([{...x,id:_}]),i(`/server/${_}`)},[t,i]);return I.useEffect(()=>{if(!m)return;Object.values(e).some(({url:_,apiKey:w})=>(m==null?void 0:m.url)===_&&(m==null?void 0:m.apiKey)===w)?p():y(m)},[y,m,e,p]),g.jsxs(Zu,{children:[g.jsxs(kU,{title:g.jsx("h5",{className:"mb-0",children:"Add new server"}),onSubmit:v,children:[!a&&g.jsx(n,{tooltipPlacement:"top",onImport:l,onImportError:d}),a&&g.jsx(yt,{outline:!0,onClick:o,children:"Cancel"}),g.jsx(yt,{outline:!0,color:"primary",className:"ms-2",children:"Create server"})]}),s&&g.jsx(bR,{type:"success"}),c&&g.jsx(bR,{type:"error"}),g.jsx(CU,{isOpen:f,duplicatedServers:m?[m]:[],onDiscard:o,onSave:()=>m&&y(m)})]})},iwe=Ti(PU,["ImportServersBtn","useTimeoutToggle"]),LU=({server:e,className:t,children:n,textClassName:r})=>{const{DeleteServerModal:i}=Ei(LU),[o,,a,s]=Sn();return g.jsxs(g.Fragment,{children:[g.jsxs("button",{type:"button",className:Vu(t,"p-0 bg-transparent border-0"),onClick:a,children:[!n&&g.jsx(Ne,{fixedWidth:!0,icon:FS}),g.jsx("span",{className:r,children:n??"Remove this server"})]}),g.jsx(i,{server:e,isOpen:o,toggle:s})]})},owe=Ti(LU,["DeleteServerModal"]),awe=({server:e,toggle:t,isOpen:n,deleteServer:r,redirectHome:i=!0})=>{const o=So(),a=I.useRef(!1),s=()=>{a.current=!0,t()},l=()=>{a.current&&(r(e),i&&o("/"))};return g.jsxs(ua,{isOpen:n,toggle:t,centered:!0,onClosed:l,children:[g.jsx(da,{toggle:t,className:"text-danger",children:"Remove server"}),g.jsxs(Eo,{children:[g.jsxs("p",{children:["Are you sure you want to remove ",g.jsx("b",{children:e?e.name:""}),"?"]}),g.jsx("p",{children:g.jsx("i",{children:"No data will be deleted, only the access to this server will be removed from this device. You can create it again at any moment."})})]}),g.jsxs(Al,{children:[g.jsx(yt,{color:"link",onClick:t,children:"Cancel"}),g.jsx(yt,{color:"danger",onClick:s,children:"Delete"})]})]})},swe=SU(({editServer:e,selectedServer:t,selectServer:n})=>{const r=OU(),{reconnect:i}=nwe();if(!rf(t))return null;const o=a=>{e(t.id,a),i==="true"&&n(t.id),r()};return g.jsx(Zu,{children:g.jsxs(kU,{title:g.jsxs("h5",{className:"mb-0",children:['Edit "',t.name,'"']}),initialValues:t,onSubmit:o,children:[g.jsx(yt,{outline:!0,className:"me-2",onClick:r,children:"Cancel"}),g.jsx(yt,{outline:!0,color:"primary",children:"Save"})]})})}),lwe=Ti(swe,["ServerError"]),wR=(e,{url:t,apiKey:n})=>e.some(r=>r.url===t&&r.apiKey===n),jU=({createServers:e,servers:t,children:n,onImport:r=()=>{},onImportError:i=()=>{},tooltipPlacement:o="bottom",className:a=""})=>{const{ServersImporter:s}=Ei(jU),l=ys(),[c,d]=I.useState([]),[f,,p,m]=Sn(),v=I.useRef([]),y=I.useCallback(S=>{e(S),r()},[e,r]),x=I.useCallback(async({target:S})=>{var E;return s.importServersFromFile((E=S.files)==null?void 0:E[0]).then(O=>{v.current=O;const k=Object.values(t),j=O.filter(U=>wR(k,U)),A=!!j.length;A?d(j):y(O),A&&p()}).then(()=>{S.value=null}).catch(i)},[y,i,t,s,p]),_=I.useCallback(()=>{y(v.current),m()},[y,m,v]),w=I.useCallback(()=>{y(v.current.filter(S=>!wR(c,S))),m()},[y,c,m]);return g.jsxs(g.Fragment,{children:[g.jsxs(yt,{outline:!0,id:"importBtn",className:a,onClick:()=>{var S;return(S=l.current)==null?void 0:S.click()},children:[g.jsx(Ne,{icon:$W,fixedWidth:!0})," ",n??"Import from file"]}),g.jsxs(Rr,{placement:o,target:"importBtn",children:["You can create servers by importing a CSV file with ",g.jsx("b",{children:"name"}),", ",g.jsx("b",{children:"apiKey"})," and ",g.jsx("b",{children:"url"})," columns."]}),g.jsx("input",{type:"file",accept:"text/csv",className:"d-none",ref:l,onChange:x,"aria-hidden":!0}),g.jsx(CU,{isOpen:f,duplicatedServers:c,onDiscard:w,onSave:_})]})},cwe=Ti(jU,["ServersImporter"]),MU=({servers:e,selectedServer:t})=>{const{DeleteServerButton:n}=Ei(MU);return g.jsx(Zu,{children:g.jsxs("div",{className:"server-error__container flex-column",children:[g.jsxs(Ho,{className:"w-100 mb-3 mb-md-5",type:"error",fullWidth:!0,children:[!rf(t)&&"Could not find this Shlink server.",rf(t)&&g.jsxs(g.Fragment,{children:[g.jsx("p",{children:"Oops! Could not connect to this Shlink server."}),"Make sure you have internet connection, and the server is properly configured and on-line."]})]}),g.jsx(pU,{servers:Object.values(e),children:g.jsxs("p",{className:"mb-md-3",children:["These are the Shlink servers currently configured. Choose one of them or ",g.jsx(It,{to:"/server/create",children:"add a new one"}),"."]})}),rf(t)&&g.jsx("div",{className:"container mt-3 mt-md-5",children:g.jsxs("p",{className:"fs-5 fw-normal lh-sm",children:["Alternatively, if you think you may have miss-configured this server, you can ",g.jsx(n,{server:t,className:"server-error__delete-btn",children:"remove it"})," or ",g.jsx(It,{to:`/server/${t.id}/edit?reconnect=true`,children:"edit it"}),"."]})})]})})},uwe=Ti(MU,["DeleteServerButton"]),dwe=4e3,NU=({servers:e})=>{const{ServersExporter:t,ImportServersBtn:n,useTimeoutToggle:r,ManageServersRow:i}=Ei(NU),o=Object.values(e),[a,s]=I.useState(o),l=p=>s(o.filter(({name:m,url:v})=>`${m} ${v}`.toLowerCase().match(p.toLowerCase()))),c=a.some(({autoConnect:p})=>!!p),[d,f]=r(!1,dwe);return I.useEffect(()=>{s(Object.values(e))},[e]),g.jsxs(Zu,{children:[g.jsx(Hh,{className:"mb-3",onChange:l}),g.jsxs(gr,{className:"mb-3",children:[g.jsxs("div",{className:"col-md-6 d-flex d-md-block mb-2 mb-md-0",children:[g.jsx(n,{className:"flex-fill",onImportError:f,children:"Import servers"}),o.length>0&&g.jsxs(yt,{outline:!0,className:"ms-2 flex-fill",onClick:async()=>t.exportServers(),children:[g.jsx(Ne,{icon:UD,fixedWidth:!0})," Export servers"]})]}),g.jsx("div",{className:"col-md-6 text-md-end d-flex d-md-block",children:g.jsxs(yt,{outline:!0,color:"primary",className:"flex-fill",tag:It,to:"/server/create",children:[g.jsx(Ne,{icon:zS,fixedWidth:!0})," Add a server"]})})]}),g.jsx(mn,{children:g.jsxs("table",{className:"table table-hover responsive-table mb-0",children:[g.jsx("thead",{className:"responsive-table__header",children:g.jsxs("tr",{children:[c&&g.jsx("th",{style:{width:"50px"},children:g.jsx("span",{className:"sr-only",children:"Auto-connect"})}),g.jsx("th",{children:"Name"}),g.jsx("th",{children:"Base URL"}),g.jsx("th",{children:g.jsx("span",{className:"sr-only",children:"Options"})})]})}),g.jsxs("tbody",{children:[!a.length&&g.jsx("tr",{className:"text-center",children:g.jsx("td",{colSpan:4,children:"No servers found."})}),a.map(p=>g.jsx(i,{server:p,hasAutoConnect:c},p.id))]})]})}),d&&g.jsx("div",{className:"mt-3",children:g.jsx(zr,{type:"error",children:"The servers could not be imported. Make sure the format is correct."})})]})},fwe=Ti(NU,["ServersExporter","ImportServersBtn","useTimeoutToggle","ManageServersRow"]),RU=({server:e,hasAutoConnect:t})=>{const{ManageServersRowDropdown:n}=Ei(RU);return g.jsxs("tr",{className:"responsive-table__row",children:[t&&g.jsx("td",{className:"responsive-table__cell","data-th":"Auto-connect",children:e.autoConnect&&g.jsxs(g.Fragment,{children:[g.jsx(Ne,{icon:Yf,className:"text-primary",id:"autoConnectIcon"}),g.jsx(Rr,{target:"autoConnectIcon",placement:"right",children:"Auto-connect to this server"})]})}),g.jsx("th",{className:"responsive-table__cell","data-th":"Name",children:g.jsx(It,{to:`/server/${e.id}`,children:e.name})}),g.jsx("td",{className:"responsive-table__cell","data-th":"Base URL",children:e.url}),g.jsx("td",{className:"responsive-table__cell text-end",children:g.jsx(n,{server:e})})]})},hwe=Ti(RU,["ManageServersRowDropdown"]),AU=({server:e,setAutoConnect:t})=>{const{DeleteServerModal:n}=Ei(AU),[r,,i,o]=Sn(),a=`/server/${e.id}`,{autoConnect:s}=e,l=s?IW:ure;return g.jsxs(s0,{minWidth:170,children:[g.jsxs(Ue,{tag:It,to:a,children:[g.jsx(Ne,{icon:AW,fixedWidth:!0})," Connect"]}),g.jsxs(Ue,{tag:It,to:`${a}/edit`,children:[g.jsx(Ne,{icon:$S,fixedWidth:!0})," Edit server"]}),g.jsxs(Ue,{onClick:()=>t(e,!s),children:[g.jsx(Ne,{icon:l,fixedWidth:!0})," ",s?"Do not a":"A","uto-connect"]}),g.jsx(Ue,{divider:!0,tag:"hr"}),g.jsxs(Ue,{className:"dropdown-item--danger",onClick:i,children:[g.jsx(Ne,{icon:FS,fixedWidth:!0})," Remove server"]}),g.jsx(n,{redirectHome:!1,server:e,isOpen:r,toggle:o})]})},pwe=Ti(AU,["DeleteServerModal"]),DU=(e,t)=>Z6(e,t,{serializeError:n=>n}),mwe={},gwe=e=>"id"in e?e:{...e,id:TU()},vwe=e=>e.reduce((t,n)=>({...t,[n.id]:n}),{}),{actions:ywe,reducer:_we}=lr({name:"shlink/servers",initialState:mwe,reducers:{editServer:{prepare:(e,t)=>({payload:{serverId:e,serverData:t}}),reducer:(e,{payload:t})=>{const{serverId:n,serverData:r}=t;return e[n]?{...e,[n]:{...e[n],...r}}:e}},deleteServer:(e,{payload:t})=>{const{[t.id]:n,...r}=e;return r},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}])):{...e,[n]:{...e[n],autoConnect:r}}:e}},createServers:{prepare:e=>({payload:vwe(e.map(gwe))}),reducer:(e,{payload:t})=>({...e,...t})}}}),{editServer:bwe,deleteServer:wwe,setAutoConnect:xwe,createServers:IU}=ywe,Swe=_we,Ewe=e=>Array.isArray(e)?e.filter(RD):[],Twe=e=>DU("shlink/remoteServers/fetchServers",async(t,{dispatch:n})=>{const r=await e.jsonRequest(`${ev.homepage}/servers.json`),i=Ewe(r);n(IU(i))}),iO="shlink/selectedServer",Owe="1.0.0",Cwe="999.999.999",kwe="latest",Pwe=e=>xU(e===kwe?Cwe:e,Owe),Lwe=vU(e=>`${e.id}_${e.url}_${e.apiKey}`,async(e,t)=>t().then(({version:n})=>({version:Pwe(n),printableVersion:wU(n)}))),xR=null,oO=Rn(`${iO}/resetSelectedServer`),jwe=e=>DU(`${iO}/selectServer`,async(t,{dispatch:n,getState:r})=>{n(oO());const{servers:i}=r(),o=i[t];if(!o)return{serverNotFound:!0};try{const a=e(o),{version:s,printableVersion:l}=await Lwe(o,()=>a.health());return{...o,version:s,printableVersion:l}}catch{return{...o,serverNotReachable:!0}}}),Mwe=e=>lr({name:iO,initialState:xR,reducers:{},extraReducers:t=>{t.addCase(oO,()=>xR),t.addCase(e.fulfilled,(n,{payload:r})=>r)}}),Nwe=({servers:e,selectedServer:t})=>{const n=Object.values(e),r=()=>n.length===0?g.jsxs(Ue,{tag:It,to:"/server/create",children:[g.jsx(Ne,{icon:zS})," ",g.jsx("span",{className:"ms-1",children:"Add a server"})]}):g.jsxs(g.Fragment,{children:[n.map(({name:i,id:o})=>g.jsx(Ue,{tag:It,to:`/server/${o}`,active:_W(t)===o,children:i},o)),g.jsx(Ue,{divider:!0,tag:"hr"}),g.jsxs(Ue,{tag:It,to:"/manage-servers",children:[g.jsx(Ne,{icon:Ak})," ",g.jsx("span",{className:"ms-1",children:"Manage servers"})]})]});return g.jsxs(Vh,{nav:!0,inNavbar:!0,children:[g.jsxs(Fu,{nav:!0,caret:!0,children:[g.jsx(Ne,{icon:Ak})," ",g.jsx("span",{className:"ms-1",children:"Servers"})]}),g.jsx(Iu,{end:!0,style:{right:0},children:r()})]})},Rwe=({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)},Awe=(e,t,n)=>{const r=new Blob([t],{type:"text/csv;charset=utf-8;"}),i=URL.createObjectURL(r);Rwe(e,i,n)},Dwe="shlink-servers.csv";class Iwe{constructor(t,n,r){Np(this,"exportServers",async()=>{const t=Object.values(this.storage.get("servers")??{}).map(bW);try{const n=this.jsonToCsv(t);Awe(this.window,n,Dwe)}catch(n){console.error(n)}});this.storage=t,this.window=n,this.jsonToCsv=r}}const Fwe=e=>typeof e.url=="string"&&typeof e.apiKey=="string"&&typeof e.name=="string",$we=e=>Array.isArray(e)&&e.every(Fwe);class Uwe{constructor(t){this.csvToJson=t}async importServersFromFile(t){if(!t)throw new Error("No file provided");const n=await t.text(),r=await this.csvToJson(n);if(!$we(r))throw new Error("Provided file does not have the right format.");return r}}const Bwe=(e,t)=>{e.factory("ManageServers",fwe),e.decorator("ManageServers",cy),e.decorator("ManageServers",t(["selectedServer","servers"],["resetSelectedServer"])),e.factory("ManageServersRow",hwe),e.factory("ManageServersRowDropdown",pwe),e.decorator("ManageServersRowDropdown",t(null,["setAutoConnect"])),e.factory("CreateServer",iwe),e.decorator("CreateServer",cy),e.decorator("CreateServer",t(["selectedServer","servers"],["createServers","resetSelectedServer"])),e.factory("EditServer",lwe),e.decorator("EditServer",t(["selectedServer"],["editServer","selectServer","resetSelectedServer"])),e.serviceFactory("ServersDropdown",()=>Nwe),e.decorator("ServersDropdown",t(["servers","selectedServer"])),e.serviceFactory("DeleteServerModal",()=>awe),e.decorator("DeleteServerModal",t(null,["deleteServer"])),e.factory("DeleteServerButton",owe),e.factory("ImportServersBtn",cwe),e.decorator("ImportServersBtn",t(["servers"],["createServers"])),e.factory("ServerError",uwe),e.decorator("ServerError",t(["servers","selectedServer"])),e.service("ServersImporter",Uwe,"csvToJson"),e.service("ServersExporter",Iwe,"Storage","window","jsonToCsv"),e.serviceFactory("selectServer",jwe,"buildShlinkApiClient","loadMercureInfo"),e.serviceFactory("createServers",()=>IU),e.serviceFactory("deleteServer",()=>wwe),e.serviceFactory("editServer",()=>bwe),e.serviceFactory("setAutoConnect",()=>xwe),e.serviceFactory("fetchServers",Twe,"HttpClient"),e.serviceFactory("resetSelectedServer",()=>oO),e.serviceFactory("selectedServerReducerCreator",Mwe,"selectServer"),e.serviceFactory("selectedServerReducer",n=>n.reducer,"selectedServerReducerCreator")},Zc=({children:e})=>g.jsx("small",{className:"form-text text-muted d-block",children:e}),zwe=e=>e?`${e}`:"",Vwe=({settings:e,toggleRealTimeUpdates:t,setRealTimeUpdatesInterval:n})=>{const{realTimeUpdates:r={enabled:!0}}=e,i=a0();return g.jsxs(mn,{title:"Real-time updates",className:"h-100",children:[g.jsx(Ur,{children:g.jsxs(pu,{checked:r.enabled,onChange:t,children:["Enable or disable real-time updates.",g.jsxs(Zc,{children:["Real-time updates are currently being ",g.jsx("b",{children:r.enabled?"processed":"ignored"}),"."]})]})}),g.jsxs(Uu,{noMargin:!0,label:"Real-time updates frequency (in minutes):",labelClassName:Vu("form-label",{"text-muted":!r.enabled}),id:i,children:[g.jsx(bl,{type:"number",min:0,placeholder:"Immediate",disabled:!r.enabled,value:zwe(r.interval),id:i,onChange:({target:o})=>n(Number(o.value))}),r.enabled&&g.jsxs(Zc,{children:[r.interval!==void 0&&r.interval>0&&g.jsxs("span",{children:["Updates will be reflected in the UI every ",g.jsx("b",{children:r.interval})," minute",r.interval>1&&"s","."]}),!r.interval&&"Updates will be reflected in the UI as soon as they happen."]})]})]})},FU={field:"dateCreated",dir:"DESC"},Hwe={realTimeUpdates:{enabled:!0},shortUrlCreation:{validateUrls:!1},ui:{theme:"light"},visits:{defaultInterval:"last30Days"},shortUrlsList:{defaultOrdering:FU}},Wwe=(e,{payload:t})=>yU(e,t),As=e=>({reducer:Wwe,prepare:e}),Ds=e=>({payload:e}),{reducer:Ywe,actions:Gwe}=lr({name:"shlink/settings",initialState:Hwe,reducers:{toggleRealTimeUpdates:As(e=>Ds({realTimeUpdates:{enabled:e}})),setRealTimeUpdatesInterval:As(e=>Ds({realTimeUpdates:{interval:e}})),setShortUrlCreationSettings:As(e=>Ds({shortUrlCreation:e})),setShortUrlsListSettings:As(e=>Ds({shortUrlsList:e})),setUiSettings:As(e=>Ds({ui:e})),setVisitsSettings:As(e=>Ds({visits:e})),setTagsSettings:As(e=>Ds({tags:e}))}}),{toggleRealTimeUpdates:qwe,setRealTimeUpdatesInterval:Zwe,setShortUrlCreationSettings:Kwe,setShortUrlsListSettings:Qwe,setUiSettings:Xwe,setVisitsSettings:Jwe,setTagsSettings:exe}=Gwe,txe=Ywe,Yb=({items:e})=>g.jsx(g.Fragment,{children:e.map((t,n)=>g.jsx("div",{className:"mb-3",children:t},n))}),$U=()=>{const{RealTimeUpdatesSettings:e,ShortUrlCreationSettings:t,ShortUrlsListSettings:n,UserInterfaceSettings:r,VisitsSettings:i,TagsSettings:o}=Ei($U);return g.jsxs(Zu,{children:[g.jsxs(g6,{className:"mb-3",children:[g.jsx(uf,{to:"general",children:"General"}),g.jsx(uf,{to:"short-urls",children:"Short URLs"}),g.jsx(uf,{to:"other-items",children:"Other items"})]}),g.jsxs(Ky,{children:[g.jsx(vt,{path:"general",element:g.jsx(Yb,{items:[g.jsx(r,{}),g.jsx(e,{})]})}),g.jsx(vt,{path:"short-urls",element:g.jsx(Yb,{items:[g.jsx(t,{}),g.jsx(n,{})]})}),g.jsx(vt,{path:"other-items",element:g.jsx(Yb,{items:[g.jsx(o,{}),g.jsx(i,{})]})}),g.jsx(vt,{path:"*",element:g.jsx(NS,{replace:!0,to:"general"})})]})]})},nxe=Ti($U,["RealTimeUpdatesSettings","ShortUrlCreationSettings","ShortUrlsListSettings","UserInterfaceSettings","VisitsSettings","TagsSettings"]),Gb=e=>e==="includes"?"Suggest tags including input":"Suggest tags starting with input",rxe=e=>e==="includes"?g.jsxs(g.Fragment,{children:["The list of suggested tags will contain those ",g.jsx("b",{children:"including"})," provided input."]}):g.jsxs(g.Fragment,{children:["The list of suggested tags will contain those ",g.jsx("b",{children:"starting with"})," provided input."]}),ixe=({settings:e,setShortUrlCreationSettings:t})=>{const n=e.shortUrlCreation??{validateUrls:!1},r=i=>()=>t({...n??{validateUrls:!1},tagFilteringMode:i});return g.jsxs(mn,{title:"Short URLs form",className:"h-100",children:[g.jsx(Ur,{children:g.jsxs(pu,{checked:n.validateUrls??!1,onChange:i=>t({...n,validateUrls:i}),children:["Request validation on long URLs when creating new short URLs.",g.jsxs(Zc,{children:["The initial state of the ",g.jsx("b",{children:"Validate URL"})," checkbox will be ",g.jsx("b",{children:n.validateUrls?"checked":"unchecked"}),"."]})]})}),g.jsx(Ur,{children:g.jsxs(pu,{checked:n.forwardQuery??!0,onChange:i=>t({...n,forwardQuery:i}),children:["Make all new short URLs forward their query params to the long URL.",g.jsxs(Zc,{children:["The initial state of the ",g.jsx("b",{children:"Forward query params on redirect"})," checkbox will be ",g.jsx("b",{children:n.forwardQuery??!0?"checked":"unchecked"}),"."]})]})}),g.jsxs(Uu,{noMargin:!0,label:"Tag suggestions search mode:",children:[g.jsxs(fa,{text:Gb(n.tagFilteringMode),children:[g.jsx(Ue,{active:!n.tagFilteringMode||n.tagFilteringMode==="startsWith",onClick:r("startsWith"),children:Gb("startsWith")}),g.jsx(Ue,{active:n.tagFilteringMode==="includes",onClick:r("includes"),children:Gb("includes")})]}),g.jsx(Zc,{children:rxe(n.tagFilteringMode)})]})]})},oxe={dateCreated:"Created at",shortCode:"Short URL",longUrl:"Long URL",title:"Title",visits:"Visits"},axe=({settings:{shortUrlsList:e},setShortUrlsListSettings:t})=>g.jsx(mn,{title:"Short URLs list",className:"h-100",children:g.jsx(Uu,{noMargin:!0,label:"Default ordering for short URLs list:",children:g.jsx(Wh,{items:oxe,order:(e==null?void 0:e.defaultOrdering)??FU,onChange:(n,r)=>t({defaultOrdering:{field:n,dir:r}})})})}),sxe={tag:"Tag",shortUrls:"Short URLs",visits:"Visits"},lxe=({settings:{tags:e},setTagsSettings:t})=>g.jsx(mn,{title:"Tags",className:"h-100",children:g.jsx(Uu,{noMargin:!0,label:"Default ordering for tags list:",children:g.jsx(Wh,{items:sxe,order:(e==null?void 0:e.defaultOrdering)??{},onChange:(n,r)=>t({...e,defaultOrdering:{field:n,dir:r}})})})}),cxe=({settings:{ui:e},setUiSettings:t})=>g.jsxs(mn,{title:"User interface",className:"h-100",children:[g.jsx(Ne,{icon:(e==null?void 0:e.theme)==="dark"?yY:aY,className:"user-interface__theme-icon"}),g.jsx(pu,{checked:(e==null?void 0:e.theme)==="dark",onChange:n=>{t({...e,theme:n?"dark":"light"})},children:"Use dark theme."})]}),UU={today:"Today",yesterday:"Yesterday",last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",last180Days:"Last 180 days",last365Days:"Last 365 days"},uxe=(e,t)=>!e||e==="all"?t:UU[e],dxe=({onChange:e,active:t,allText:n})=>g.jsxs(fa,{text:uxe(t,n),children:[g.jsx(Ue,{active:t==="all",onClick:()=>e("all"),children:n}),g.jsx(Ue,{divider:!0}),Object.entries(UU).map(([r,i])=>g.jsx(Ue,{active:t===r,onClick:()=>e(r),children:i},r))]}),SR=e=>{var t;return((t=e.visits)==null?void 0:t.defaultInterval)??"last30Days"},fxe=({settings:e,setVisitsSettings:t})=>{var n,r;return g.jsxs(mn,{title:"Visits",className:"h-100",children:[g.jsx(Ur,{children:g.jsxs(pu,{checked:!!((n=e.visits)!=null&&n.excludeBots),onChange:i=>t({defaultInterval:SR(e),excludeBots:i}),children:["Exclude bots wherever possible (this option‘s effect might depend on Shlink server‘s version).",g.jsxs(Zc,{children:["The visits coming from potential bots will be ",g.jsx("b",{children:(r=e.visits)!=null&&r.excludeBots?"excluded":"included"}),"."]})]})}),g.jsx(Uu,{noMargin:!0,label:"Default interval to load on visits sections:",children:g.jsx(dxe,{allText:"All visits",active:SR(e),onChange:i=>t({defaultInterval:i})})})]})},hxe=(e,t)=>{e.factory("Settings",nxe),e.decorator("Settings",cy),e.decorator("Settings",t(null,["resetSelectedServer"])),e.serviceFactory("RealTimeUpdatesSettings",()=>Vwe),e.decorator("RealTimeUpdatesSettings",t(["settings"],["toggleRealTimeUpdates","setRealTimeUpdatesInterval"])),e.serviceFactory("ShortUrlCreationSettings",()=>ixe),e.decorator("ShortUrlCreationSettings",t(["settings"],["setShortUrlCreationSettings"])),e.serviceFactory("UserInterfaceSettings",()=>cxe),e.decorator("UserInterfaceSettings",t(["settings"],["setUiSettings"])),e.serviceFactory("VisitsSettings",()=>fxe),e.decorator("VisitsSettings",t(["settings"],["setVisitsSettings"])),e.serviceFactory("TagsSettings",()=>lxe),e.decorator("TagsSettings",t(["settings"],["setTagsSettings"])),e.serviceFactory("ShortUrlsListSettings",()=>axe),e.decorator("ShortUrlsListSettings",t(["settings"],["setShortUrlsListSettings"])),e.serviceFactory("toggleRealTimeUpdates",()=>qwe),e.serviceFactory("setRealTimeUpdatesInterval",()=>Zwe),e.serviceFactory("setShortUrlCreationSettings",()=>Kwe),e.serviceFactory("setShortUrlsListSettings",()=>Qwe),e.serviceFactory("setUiSettings",()=>Xwe),e.serviceFactory("setVisitsSettings",()=>Jwe),e.serviceFactory("setTagsSettings",()=>exe)};var pxe="Expected a function",BU="__lodash_hash_undefined__",zU=1/0,mxe="[object Function]",gxe="[object GeneratorFunction]",vxe="[object Symbol]",yxe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,_xe=/^\w*$/,bxe=/^\./,wxe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,xxe=/[\\^$.*+?()[\]{}|]/g,Sxe=/\\(\\)?/g,Exe=/^\[object .+?Constructor\]$/,Txe=typeof Rp=="object"&&Rp&&Rp.Object===Object&&Rp,Oxe=typeof self=="object"&&self&&self.Object===Object&&self,aO=Txe||Oxe||Function("return this")();function Cxe(e,t){return e==null?void 0:e[t]}function kxe(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var Pxe=Array.prototype,Lxe=Function.prototype,VU=Object.prototype,qb=aO["__core-js_shared__"],ER=function(){var e=/[^.]+$/.exec(qb&&qb.keys&&qb.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),HU=Lxe.toString,sO=VU.hasOwnProperty,WU=VU.toString,jxe=RegExp("^"+HU.call(sO).replace(xxe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),TR=aO.Symbol,Mxe=Pxe.splice,Nxe=YU(aO,"Map"),Ph=YU(Object,"create"),OR=TR?TR.prototype:void 0,CR=OR?OR.toString:void 0;function kl(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1}function Vxe(e,t){var n=this.__data__,r=j0(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}Ku.prototype.clear=$xe;Ku.prototype.delete=Uxe;Ku.prototype.get=Bxe;Ku.prototype.has=zxe;Ku.prototype.set=Vxe;function zl(e){var t=-1,n=e?e.length:0;for(this.clear();++tr.toFixed(n).replace(".",t):r=>`${r}`.replace(".",t):n?r=>r.toFixed(n):r=>`${r}`}function uO(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 f2e(e={stringFormatter:uO()}){return t=>e.stringFormatter(t.toString().slice(7,-1))}function h2e(e={stringFormatter:uO()}){return t=>{if(t===null)return"";let n=JSON.stringify(t);return n===void 0?"":(n[0]==='"'&&(n=n.replace(/^"(.+)"$/,"$1")),e.stringFormatter(n))}}function PR(e,t,n){const r=e[t];return r===void 0?n:r}function ZU(e,t){try{return Array.isArray(t)?e.push(...t):e.push(t),e}catch{return e.concat(t)}}function T2(e,t){let n=!0;return e.reduce((r,i)=>(i==null&&(i=""),n?(n=!1,`${i}`):`${r}${t}${i}`),"")}var LR;(function(e){e.header="header",e.undefined="undefined",e.boolean="boolean",e.number="number",e.bigint="bigint",e.string="string",e.symbol="symbol",e.function="function",e.object="object"})(LR||(LR={}));class p2e{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||uO(),i=h2e({stringFormatter:r}),o={header:r,undefined:Zb,boolean:Zb,number:d2e(),bigint:Zb,string:r,symbol:f2e({stringFormatter:r}),function:i,object:i};return n.formatters=Object.assign(Object.assign({},o),n.formatters),n.delimiter=n.delimiter||",",n.eol=n.eol||` -`,n.header=n.header!==!1,n.includeEmptyRows=n.includeEmptyRows||!1,n.withBOM=n.withBOM||!1,n}preprocessFieldsInfo(t,n){return t.map(r=>{if(typeof r=="string")return{label:r,value:r.includes(".")||r.includes("[")?i=>kR(i,r,n):i=>PR(i,r,n)};if(typeof r=="object"){const i="default"in r?r.default:n;if(typeof r.value=="string"){const o=r.value;return{label:r.label||r.value,value:r.value.includes(".")||r.value.includes("[")?a=>kR(a,o,i):a=>PR(a,o,i)}}if(typeof r.value=="function"){const o=r.label||r.value.name||"",a={label:o,default:i},s=r.value;return{label:o,value(l){const c=s(l,a);return c===void 0?i:c}}}}throw new Error("Invalid field info option. "+JSON.stringify(r))})}getHeader(){return T2(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(ZU,[]),[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 T2(n,this.opts.delimiter)}processCell(t,n){return this.processValue(n.value(t))}processValue(t){const n=this.opts.formatters[typeof t];return n(t)}}class m2e extends p2e{constructor(t){super(t)}parse(t){const n=this.preprocessData(t);this.opts.fields=this.opts.fields||this.preprocessFieldsInfo(n.reduce((a,s)=>(Object.keys(s).forEach(l=>{a.includes(l)||a.push(l)}),a),[]),this.opts.defaultValue);const r=this.opts.header?this.getHeader():"",i=this.processData(n);return(this.opts.withBOM?"\uFEFF":"")+r+(r&&i?this.opts.eol:"")+i}preprocessData(t){const n=Array.isArray(t)?t:[t];if(!this.opts.fields){if(t==null||n.length===0)throw new Error('Data should not be empty or the "fields" option should be included');if(typeof n[0]!="object")throw new Error('Data items should be objects or the "fields" option should be included')}return this.opts.transforms.length===0?n:n.map(r=>this.preprocessRow(r)).reduce(ZU,[])}processData(t){return T2(t.map(n=>this.processRow(n)).filter(n=>n),this.opts.eol)}}var kn;(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"})(kn||(kn={}));kn.QUOTATION_MARK+"",kn.QUOTATION_MARK,kn.REVERSE_SOLIDUS+"",kn.REVERSE_SOLIDUS,kn.SOLIDUS+"",kn.SOLIDUS,kn.LATIN_SMALL_LETTER_B+"",kn.BACKSPACE,kn.LATIN_SMALL_LETTER_F+"",kn.FORM_FEED,kn.LATIN_SMALL_LETTER_N+"",kn.NEWLINE,kn.LATIN_SMALL_LETTER_R+"",kn.CARRIAGE_RETURN,kn.LATIN_SMALL_LETTER_T+"",kn.TAB;var jR;(function(e){e[e.LEFT_BRACE=0]="LEFT_BRACE",e[e.RIGHT_BRACE=1]="RIGHT_BRACE",e[e.LEFT_BRACKET=2]="LEFT_BRACKET",e[e.RIGHT_BRACKET=3]="RIGHT_BRACKET",e[e.COLON=4]="COLON",e[e.COMMA=5]="COMMA",e[e.TRUE=6]="TRUE",e[e.FALSE=7]="FALSE",e[e.NULL=8]="NULL",e[e.STRING=9]="STRING",e[e.NUMBER=10]="NUMBER",e[e.SEPARATOR=11]="SEPARATOR"})(jR||(jR={}));var MR;(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"})(MR||(MR={}));var NR;(function(e){e[e.OBJECT=0]="OBJECT",e[e.ARRAY=1]="ARRAY"})(NR||(NR={}));var RR;(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"})(RR||(RR={}));var g2e=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(r,i,o){n.o(r,i)||Object.defineProperty(r,i,{enumerable:!0,get:o})},n.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n.t=function(r,i){if(1&i&&(r=n(r)),8&i||4&i&&typeof r=="object"&&r&&r.__esModule)return r;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:r}),2&i&&typeof r!="string")for(var a in r)n.d(o,a,(function(s){return r[s]}).bind(null,a));return o},n.n=function(r){var i=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(i,"a",i),i},n.o=function(r,i){return Object.prototype.hasOwnProperty.call(r,i)},n.p="",n(n.s=32)}([function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch{typeof window=="object"&&(n=window)}e.exports=n},function(e,t,n){var r=n(6),i=Object.keys||function(v){var y=[];for(var x in v)y.push(x);return y};e.exports=f;var o=n(5);o.inherits=n(2);var a=n(23),s=n(14);o.inherits(f,a);for(var l=i(s.prototype),c=0;c"u"||!L||!L.Mixin)){u=S(u)?u:[u];for(var h=0;h0?Math.floor(u):Math.ceil(u)};K.prototype={clone:function(){return new K(this.x,this.y)},add:function(u){return this.clone()._add(D(u))},_add:function(u){return this.x+=u.x,this.y+=u.y,this},subtract:function(u){return this.clone()._subtract(D(u))},_subtract:function(u){return this.x-=u.x,this.y-=u.y,this},divideBy:function(u){return this.clone()._divideBy(u)},_divideBy:function(u){return this.x/=u,this.y/=u,this},multiplyBy:function(u){return this.clone()._multiplyBy(u)},_multiplyBy:function(u){return this.x*=u,this.y*=u,this},scaleBy:function(u){return new K(this.x*u.x,this.y*u.y)},unscaleBy:function(u){return new K(this.x/u.x,this.y/u.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=F(this.x),this.y=F(this.y),this},distanceTo:function(u){u=D(u);var h=u.x-this.x,b=u.y-this.y;return Math.sqrt(h*h+b*b)},equals:function(u){return u=D(u),u.x===this.x&&u.y===this.y},contains:function(u){return u=D(u),Math.abs(u.x)<=Math.abs(this.x)&&Math.abs(u.y)<=Math.abs(this.y)},toString:function(){return"Point("+p(this.x)+", "+p(this.y)+")"}};function D(u,h,b){return u instanceof K?u:S(u)?new K(u[0],u[1]):u==null?u:typeof u=="object"&&"x"in u&&"y"in u?new K(u.x,u.y):new K(u,h,b)}function H(u,h){if(u)for(var b=h?[u,h]:u,T=0,P=b.length;T=this.min.x&&b.x<=this.max.x&&h.y>=this.min.y&&b.y<=this.max.y},intersects:function(u){u=ie(u);var h=this.min,b=this.max,T=u.min,P=u.max,B=P.x>=h.x&&T.x<=b.x,oe=P.y>=h.y&&T.y<=b.y;return B&&oe},overlaps:function(u){u=ie(u);var h=this.min,b=this.max,T=u.min,P=u.max,B=P.x>h.x&&T.xh.y&&T.y=h.lat&&P.lat<=b.lat&&T.lng>=h.lng&&P.lng<=b.lng},intersects:function(u){u=q(u);var h=this._southWest,b=this._northEast,T=u.getSouthWest(),P=u.getNorthEast(),B=P.lat>=h.lat&&T.lat<=b.lat,oe=P.lng>=h.lng&&T.lng<=b.lng;return B&&oe},overlaps:function(u){u=q(u);var h=this._southWest,b=this._northEast,T=u.getSouthWest(),P=u.getNorthEast(),B=P.lat>h.lat&&T.lath.lng&&T.lng1,on=function(){var u=!1;try{var h=Object.defineProperty({},"passive",{get:function(){u=!0}});window.addEventListener("testPassiveEventSupport",f,h),window.removeEventListener("testPassiveEventSupport",f,h)}catch{}return u}(),ur=function(){return!!document.createElement("canvas").getContext}(),zn=!!(document.createElementNS&&Me("svg").createSVGRect),Vn=!!zn&&function(){var u=document.createElement("div");return u.innerHTML="",(u.firstChild&&u.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),vn=!zn&&function(){try{var u=document.createElement("div");u.innerHTML='';var h=u.firstChild;return h.style.behavior="url(#default#VML)",h&&typeof h.adj=="object"}catch{return!1}}(),Oi=navigator.platform.indexOf("Mac")===0,Ci=navigator.platform.indexOf("Linux")===0;function Hn(u){return navigator.userAgent.toLowerCase().indexOf(u)>=0}var ze={ie:_e,ielt9:Se,edge:ke,webkit:Ce,android:je,android23:ce,androidStock:ye,opera:ve,chrome:xe,gecko:Le,safari:Ae,phantom:Xe,opera12:tt,win:Ge,ie3d:Xt,webkit3d:Vt,gecko3d:Tn,any3d:cr,mobile:Zi,mobileWebkit:Bn,mobileWebkit3d:Qu,msPointer:Ki,pointer:fp,touch:pp,touchNative:hp,mobileOpera:Xu,mobileGecko:Ss,retina:fn,passiveEvents:on,canvas:ur,svg:zn,vml:vn,inlineSvg:Vn,mac:Oi,linux:Ci},hO=ze.msPointer?"MSPointerDown":"pointerdown",pO=ze.msPointer?"MSPointerMove":"pointermove",mO=ze.msPointer?"MSPointerUp":"pointerup",gO=ze.msPointer?"MSPointerCancel":"pointercancel",R0={touchstart:hO,touchmove:pO,touchend:mO,touchcancel:gO},vO={touchstart:i7,touchmove:mp,touchend:mp,touchcancel:mp},Hl={},yO=!1;function JU(u,h,b){return h==="touchstart"&&r7(),vO[h]?(b=vO[h].bind(this,b),u.addEventListener(R0[h],b,!1),b):(console.warn("wrong event specified:",h),f)}function e7(u,h,b){if(!R0[h]){console.warn("wrong event specified:",h);return}u.removeEventListener(R0[h],b,!1)}function t7(u){Hl[u.pointerId]=u}function n7(u){Hl[u.pointerId]&&(Hl[u.pointerId]=u)}function _O(u){delete Hl[u.pointerId]}function r7(){yO||(document.addEventListener(hO,t7,!0),document.addEventListener(pO,n7,!0),document.addEventListener(mO,_O,!0),document.addEventListener(gO,_O,!0),yO=!0)}function mp(u,h){if(h.pointerType!==(h.MSPOINTER_TYPE_MOUSE||"mouse")){h.touches=[];for(var b in Hl)h.touches.push(Hl[b]);h.changedTouches=[h],u(h)}}function i7(u,h){h.MSPOINTER_TYPE_TOUCH&&h.pointerType===h.MSPOINTER_TYPE_TOUCH&&Wn(h),mp(u,h)}function o7(u){var h={},b,T;for(T in u)b=u[T],h[T]=b&&b.bind?b.bind(u):b;return u=h,h.type="dblclick",h.detail=2,h.isTrusted=!1,h._simulated=!0,h}var a7=200;function s7(u,h){u.addEventListener("dblclick",h);var b=0,T;function P(B){if(B.detail!==1){T=B.detail;return}if(!(B.pointerType==="mouse"||B.sourceCapabilities&&!B.sourceCapabilities.firesTouchEvents)){var oe=EO(B);if(!(oe.some(function(pe){return pe instanceof HTMLLabelElement&&pe.attributes.for})&&!oe.some(function(pe){return pe instanceof HTMLInputElement||pe instanceof HTMLSelectElement}))){var de=Date.now();de-b<=a7?(T++,T===2&&h(o7(B))):T=1,b=de}}}return u.addEventListener("click",P),{dblclick:h,simDblclick:P}}function l7(u,h){u.removeEventListener("dblclick",h.dblclick),u.removeEventListener("click",h.simDblclick)}var A0=yp(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Ju=yp(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),bO=Ju==="webkitTransition"||Ju==="OTransition"?Ju+"End":"transitionend";function wO(u){return typeof u=="string"?document.getElementById(u):u}function ed(u,h){var b=u.style[h]||u.currentStyle&&u.currentStyle[h];if((!b||b==="auto")&&document.defaultView){var T=document.defaultView.getComputedStyle(u,null);b=T?T[h]:null}return b==="auto"?null:b}function pt(u,h,b){var T=document.createElement(u);return T.className=h||"",b&&b.appendChild(T),T}function Ht(u){var h=u.parentNode;h&&h.removeChild(u)}function gp(u){for(;u.firstChild;)u.removeChild(u.firstChild)}function Wl(u){var h=u.parentNode;h&&h.lastChild!==u&&h.appendChild(u)}function Yl(u){var h=u.parentNode;h&&h.firstChild!==u&&h.insertBefore(u,h.firstChild)}function D0(u,h){if(u.classList!==void 0)return u.classList.contains(h);var b=vp(u);return b.length>0&&new RegExp("(^|\\s)"+h+"(\\s|$)").test(b)}function Ke(u,h){if(u.classList!==void 0)for(var b=v(h),T=0,P=b.length;T0?2*window.devicePixelRatio:1;function OO(u){return ze.edge?u.wheelDeltaY/2:u.deltaY&&u.deltaMode===0?-u.deltaY/d7: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 q0(u,h){var b=h.relatedTarget;if(!b)return!0;try{for(;b&&b!==u;)b=b.parentNode}catch{return!1}return b!==u}var f7={__proto__:null,on:qe,off:Ct,stopPropagation:Os,disableScrollPropagation:G0,disableClickPropagation:id,preventDefault:Wn,stop:Cs,getPropagationPath:EO,getMousePosition:TO,getWheelDelta:OO,isExternalTarget:q0,addListener:qe,removeListener:Ct},CO=le.extend({run:function(u,h,b,T){this.stop(),this._el=u,this._inProgress=!0,this._duration=b||.25,this._easeOutPower=1/Math.max(T||.5,.2),this._startPos=Ts(u),this._offset=h.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=V(this._animate,this),this._step()},_step:function(u){var h=+new Date-this._startTime,b=this._duration*1e3;hthis.options.maxZoom)?this.setZoom(u):this},panInsideBounds:function(u,h){this._enforcingBounds=!0;var b=this.getCenter(),T=this._limitCenter(b,this._zoom,q(u));return b.equals(T)||this.panTo(T,h),this._enforcingBounds=!1,this},panInside:function(u,h){h=h||{};var b=D(h.paddingTopLeft||h.padding||[0,0]),T=D(h.paddingBottomRight||h.padding||[0,0]),P=this.project(this.getCenter()),B=this.project(u),oe=this.getPixelBounds(),de=ie([oe.min.add(b),oe.max.subtract(T)]),pe=de.getSize();if(!de.contains(B)){this._enforcingBounds=!0;var we=B.subtract(de.getCenter()),De=de.extend(B).getSize().subtract(pe);P.x+=we.x<0?-De.x:De.x,P.y+=we.y<0?-De.y:De.y,this.panTo(this.unproject(P),h),this._enforcingBounds=!1}return this},invalidateSize:function(u){if(!this._loaded)return this;u=i({animate:!1,pan:!0},u===!0?{animate:!0}:u);var h=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var b=this.getSize(),T=h.divideBy(2).round(),P=b.divideBy(2).round(),B=T.subtract(P);return!B.x&&!B.y?this:(u.animate&&u.pan?this.panBy(B):(u.pan&&this._rawPanBy(B),this.fire("move"),u.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(a(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:h,newSize:b}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(u){if(u=this._locateOptions=i({timeout:1e4,watch:!1},u),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var h=a(this._handleGeolocationResponse,this),b=a(this._handleGeolocationError,this);return u.watch?this._locationWatchId=navigator.geolocation.watchPosition(h,b,u):navigator.geolocation.getCurrentPosition(h,b,u),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(u){if(this._container._leaflet_id){var h=u.code,b=u.message||(h===1?"permission denied":h===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:h,message:"Geolocation error: "+b+"."})}},_handleGeolocationResponse:function(u){if(this._container._leaflet_id){var h=u.coords.latitude,b=u.coords.longitude,T=new re(h,b),P=T.toBounds(u.coords.accuracy*2),B=this._locateOptions;if(B.setView){var oe=this.getBoundsZoom(P);this.setView(T,B.maxZoom?Math.min(oe,B.maxZoom):oe)}var de={latlng:T,bounds:P,timestamp:u.timestamp};for(var pe in u.coords)typeof u.coords[pe]=="number"&&(de[pe]=u.coords[pe]);this.fire("locationfound",de)}},addHandler:function(u,h){if(!h)return this;var b=this[u]=new h(this);return this._handlers.push(b),this.options[u]&&b.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),Ht(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(W(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)Ht(this._panes[u]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(u,h){var b="leaflet-pane"+(u?" leaflet-"+u.replace("Pane","")+"-pane":""),T=pt("div",b,h||this._mapPane);return u&&(this._panes[u]=T),T},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var u=this.getPixelBounds(),h=this.unproject(u.getBottomLeft()),b=this.unproject(u.getTopRight());return new z(h,b)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(u,h,b){u=q(u),b=D(b||[0,0]);var T=this.getZoom()||0,P=this.getMinZoom(),B=this.getMaxZoom(),oe=u.getNorthWest(),de=u.getSouthEast(),pe=this.getSize().subtract(b),we=ie(this.project(de,T),this.project(oe,T)).getSize(),De=ze.any3d?this.options.zoomSnap:1,He=pe.x/we.x,Je=pe.y/we.y,dr=h?Math.max(He,Je):Math.min(He,Je);return T=this.getScaleZoom(dr,T),De&&(T=Math.round(T/(De/100))*(De/100),T=h?Math.ceil(T/De)*De:Math.floor(T/De)*De),Math.max(P,Math.min(B,T))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new K(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(u,h){var b=this._getTopLeftPoint(u,h);return new H(b,b.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(u){return this.options.crs.getProjectedBounds(u===void 0?this.getZoom():u)},getPane:function(u){return typeof u=="string"?this._panes[u]:u},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(u,h){var b=this.options.crs;return h=h===void 0?this._zoom:h,b.scale(u)/b.scale(h)},getScaleZoom:function(u,h){var b=this.options.crs;h=h===void 0?this._zoom:h;var T=b.zoom(u*b.scale(h));return isNaN(T)?1/0:T},project:function(u,h){return h=h===void 0?this._zoom:h,this.options.crs.latLngToPoint(ae(u),h)},unproject:function(u,h){return h=h===void 0?this._zoom:h,this.options.crs.pointToLatLng(D(u),h)},layerPointToLatLng:function(u){var h=D(u).add(this.getPixelOrigin());return this.unproject(h)},latLngToLayerPoint:function(u){var h=this.project(ae(u))._round();return h._subtract(this.getPixelOrigin())},wrapLatLng:function(u){return this.options.crs.wrapLatLng(ae(u))},wrapLatLngBounds:function(u){return this.options.crs.wrapLatLngBounds(q(u))},distance:function(u,h){return this.options.crs.distance(ae(u),ae(h))},containerPointToLayerPoint:function(u){return D(u).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(u){return D(u).add(this._getMapPanePos())},containerPointToLatLng:function(u){var h=this.containerPointToLayerPoint(D(u));return this.layerPointToLatLng(h)},latLngToContainerPoint:function(u){return this.layerPointToContainerPoint(this.latLngToLayerPoint(ae(u)))},mouseEventToContainerPoint:function(u){return TO(u,this._container)},mouseEventToLayerPoint:function(u){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(u))},mouseEventToLatLng:function(u){return this.layerPointToLatLng(this.mouseEventToLayerPoint(u))},_initContainer:function(u){var h=this._container=wO(u);if(h){if(h._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");qe(h,"scroll",this._onScroll,this),this._containerId=l(h)},_initLayout:function(){var u=this._container;this._fadeAnimated=this.options.fadeAnimation&&ze.any3d,Ke(u,"leaflet-container"+(ze.touch?" leaflet-touch":"")+(ze.retina?" leaflet-retina":"")+(ze.ielt9?" leaflet-oldie":"")+(ze.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var h=ed(u,"position");h!=="absolute"&&h!=="relative"&&h!=="fixed"&&h!=="sticky"&&(u.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var u=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),hn(this._mapPane,new K(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Ke(u.markerPane,"leaflet-zoom-hide"),Ke(u.shadowPane,"leaflet-zoom-hide"))},_resetView:function(u,h,b){hn(this._mapPane,new K(0,0));var T=!this._loaded;this._loaded=!0,h=this._limitZoom(h),this.fire("viewprereset");var P=this._zoom!==h;this._moveStart(P,b)._move(u,h)._moveEnd(P),this.fire("viewreset"),T&&this.fire("load")},_moveStart:function(u,h){return u&&this.fire("zoomstart"),h||this.fire("movestart"),this},_move:function(u,h,b,T){h===void 0&&(h=this._zoom);var P=this._zoom!==h;return this._zoom=h,this._lastCenter=u,this._pixelOrigin=this._getNewPixelOrigin(u),T?b&&b.pinch&&this.fire("zoom",b):((P||b&&b.pinch)&&this.fire("zoom",b),this.fire("move",b)),this},_moveEnd:function(u){return u&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return W(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(u){hn(this._mapPane,this._getMapPanePos().subtract(u))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(u){this._targets={},this._targets[l(this._container)]=this;var h=u?Ct:qe;h(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&h(window,"resize",this._onResize,this),ze.any3d&&this.options.transform3DLimit&&(u?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){W(this._resizeRequest),this._resizeRequest=V(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var u=this._getMapPanePos();Math.max(Math.abs(u.x),Math.abs(u.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(u,h){for(var b=[],T,P=h==="mouseout"||h==="mouseover",B=u.target||u.srcElement,oe=!1;B;){if(T=this._targets[l(B)],T&&(h==="click"||h==="preclick")&&this._draggableMoved(T)){oe=!0;break}if(T&&T.listens(h,!0)&&(P&&!q0(B,u)||(b.push(T),P))||B===this._container)break;B=B.parentNode}return!b.length&&!oe&&!P&&this.listens(h,!0)&&(b=[this]),b},_isClickDisabled:function(u){for(;u&&u!==this._container;){if(u._leaflet_disable_click)return!0;u=u.parentNode}},_handleDOMEvent:function(u){var h=u.target||u.srcElement;if(!(!this._loaded||h._leaflet_disable_events||u.type==="click"&&this._isClickDisabled(h))){var b=u.type;b==="mousedown"&&z0(h),this._fireDOMEvent(u,b)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(u,h,b){if(u.type==="click"){var T=i({},u);T.type="preclick",this._fireDOMEvent(T,T.type,b)}var P=this._findEventTargets(u,h);if(b){for(var B=[],oe=0;oe0?Math.round(u-h)/2:Math.max(0,Math.ceil(u))-Math.max(0,Math.floor(h))},_limitZoom:function(u){var h=this.getMinZoom(),b=this.getMaxZoom(),T=ze.any3d?this.options.zoomSnap:1;return T&&(u=Math.round(u/T)*T),Math.max(h,Math.min(b,u))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){an(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(u,h){var b=this._getCenterOffset(u)._trunc();return(h&&h.animate)!==!0&&!this.getSize().contains(b)?!1:(this.panBy(b,h),!0)},_createAnimProxy:function(){var u=this._proxy=pt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(u),this.on("zoomanim",function(h){var b=A0,T=this._proxy.style[b];Es(this._proxy,this.project(h.center,h.zoom),this.getZoomScale(h.zoom,1)),T===this._proxy.style[b]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){Ht(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var u=this.getCenter(),h=this.getZoom();Es(this._proxy,this.project(u,h),this.getZoomScale(h,1))},_catchTransitionEnd:function(u){this._animatingZoom&&u.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(u,h,b){if(this._animatingZoom)return!0;if(b=b||{},!this._zoomAnimated||b.animate===!1||this._nothingToAnimate()||Math.abs(h-this._zoom)>this.options.zoomAnimationThreshold)return!1;var T=this.getZoomScale(h),P=this._getCenterOffset(u)._divideBy(1-1/T);return b.animate!==!0&&!this.getSize().contains(P)?!1:(V(function(){this._moveStart(!0,b.noMoveStart||!1)._animateZoom(u,h,!0)},this),!0)},_animateZoom:function(u,h,b,T){this._mapPane&&(b&&(this._animatingZoom=!0,this._animateToCenter=u,this._animateToZoom=h,Ke(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:u,zoom:h,noUpdate:T}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(a(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&an(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 h7(u,h){return new ct(u,h)}var ki=G.extend({options:{position:"topright"},initialize:function(u){y(this,u)},getPosition:function(){return this.options.position},setPosition:function(u){var h=this._map;return h&&h.removeControl(this),this.options.position=u,h&&h.addControl(this),this},getContainer:function(){return this._container},addTo:function(u){this.remove(),this._map=u;var h=this._container=this.onAdd(u),b=this.getPosition(),T=u._controlCorners[b];return Ke(h,"leaflet-control"),b.indexOf("bottom")!==-1?T.insertBefore(h,T.firstChild):T.appendChild(h),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(Ht(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()}}),od=function(u){return new ki(u)};ct.include({addControl:function(u){return u.addTo(this),this},removeControl:function(u){return u.remove(),this},_initControlPos:function(){var u=this._controlCorners={},h="leaflet-",b=this._controlContainer=pt("div",h+"control-container",this._container);function T(P,B){var oe=h+P+" "+h+B;u[P+B]=pt("div",oe,b)}T("top","left"),T("top","right"),T("bottom","left"),T("bottom","right")},_clearControlPos:function(){for(var u in this._controlCorners)Ht(this._controlCorners[u]);Ht(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var kO=ki.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(u,h,b,T){return b1,this._baseLayersList.style.display=u?"":"none"),this._separator.style.display=h&&u?"":"none",this},_onLayerChange:function(u){this._handlingClick||this._update();var h=this._getLayer(l(u.target)),b=h.overlay?u.type==="add"?"overlayadd":"overlayremove":u.type==="add"?"baselayerchange":null;b&&this._map.fire(b,h)},_createRadioElement:function(u,h){var b='",T=document.createElement("div");return T.innerHTML=b,T.firstChild},_addItem:function(u){var h=document.createElement("label"),b=this._map.hasLayer(u.layer),T;u.overlay?(T=document.createElement("input"),T.type="checkbox",T.className="leaflet-control-layers-selector",T.defaultChecked=b):T=this._createRadioElement("leaflet-base-layers_"+l(this),b),this._layerControlInputs.push(T),T.layerId=l(u.layer),qe(T,"click",this._onInputClick,this);var P=document.createElement("span");P.innerHTML=" "+u.name;var B=document.createElement("span");h.appendChild(B),B.appendChild(T),B.appendChild(P);var oe=u.overlay?this._overlaysList:this._baseLayersList;return oe.appendChild(h),this._checkDisabledLayers(),h},_onInputClick:function(){if(!this._preventClick){var u=this._layerControlInputs,h,b,T=[],P=[];this._handlingClick=!0;for(var B=u.length-1;B>=0;B--)h=u[B],b=this._getLayer(h.layerId).layer,h.checked?T.push(b):h.checked||P.push(b);for(B=0;B=0;P--)h=u[P],b=this._getLayer(h.layerId).layer,h.disabled=b.options.minZoom!==void 0&&Tb.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var u=this._section;this._preventClick=!0,qe(u,"click",Wn),this.expand();var h=this;setTimeout(function(){Ct(u,"click",Wn),h._preventClick=!1})}}),p7=function(u,h,b){return new kO(u,h,b)},Z0=ki.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(u){var h="leaflet-control-zoom",b=pt("div",h+" leaflet-bar"),T=this.options;return this._zoomInButton=this._createButton(T.zoomInText,T.zoomInTitle,h+"-in",b,this._zoomIn),this._zoomOutButton=this._createButton(T.zoomOutText,T.zoomOutTitle,h+"-out",b,this._zoomOut),this._updateDisabled(),u.on("zoomend zoomlevelschange",this._updateDisabled,this),b},onRemove:function(u){u.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(u){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(u.shiftKey?3:1))},_createButton:function(u,h,b,T,P){var B=pt("a",b,T);return B.innerHTML=u,B.href="#",B.title=h,B.setAttribute("role","button"),B.setAttribute("aria-label",h),id(B),qe(B,"click",Cs),qe(B,"click",P,this),qe(B,"click",this._refocusOnMap,this),B},_updateDisabled:function(){var u=this._map,h="leaflet-disabled";an(this._zoomInButton,h),an(this._zoomOutButton,h),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||u._zoom===u.getMinZoom())&&(Ke(this._zoomOutButton,h),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||u._zoom===u.getMaxZoom())&&(Ke(this._zoomInButton,h),this._zoomInButton.setAttribute("aria-disabled","true"))}});ct.mergeOptions({zoomControl:!0}),ct.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Z0,this.addControl(this.zoomControl))});var m7=function(u){return new Z0(u)},PO=ki.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(u){var h="leaflet-control-scale",b=pt("div",h),T=this.options;return this._addScales(T,h+"-line",b),u.on(T.updateWhenIdle?"moveend":"move",this._update,this),u.whenReady(this._update,this),b},onRemove:function(u){u.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(u,h,b){u.metric&&(this._mScale=pt("div",h,b)),u.imperial&&(this._iScale=pt("div",h,b))},_update:function(){var u=this._map,h=u.getSize().y/2,b=u.distance(u.containerPointToLatLng([0,h]),u.containerPointToLatLng([this.options.maxWidth,h]));this._updateScales(b)},_updateScales:function(u){this.options.metric&&u&&this._updateMetric(u),this.options.imperial&&u&&this._updateImperial(u)},_updateMetric:function(u){var h=this._getRoundNum(u),b=h<1e3?h+" m":h/1e3+" km";this._updateScale(this._mScale,b,h/u)},_updateImperial:function(u){var h=u*3.2808399,b,T,P;h>5280?(b=h/5280,T=this._getRoundNum(b),this._updateScale(this._iScale,T+" mi",T/b)):(P=this._getRoundNum(h),this._updateScale(this._iScale,P+" ft",P/h))},_updateScale:function(u,h,b){u.style.width=Math.round(this.options.maxWidth*b)+"px",u.innerHTML=h},_getRoundNum:function(u){var h=Math.pow(10,(Math.floor(u)+"").length-1),b=u/h;return b=b>=10?10:b>=5?5:b>=3?3:b>=2?2:1,h*b}}),g7=function(u){return new PO(u)},v7='',K0=ki.extend({options:{position:"bottomright",prefix:''+(ze.inlineSvg?v7+" ":"")+"Leaflet"},initialize:function(u){y(this,u),this._attributions={}},onAdd:function(u){u.attributionControl=this,this._container=pt("div","leaflet-control-attribution"),id(this._container);for(var h in u._layers)u._layers[h].getAttribution&&this.addAttribution(u._layers[h].getAttribution());return this._update(),u.on("layeradd",this._addAttribution,this),this._container},onRemove:function(u){u.off("layeradd",this._addAttribution,this)},_addAttribution:function(u){u.layer.getAttribution&&(this.addAttribution(u.layer.getAttribution()),u.layer.once("remove",function(){this.removeAttribution(u.layer.getAttribution())},this))},setPrefix:function(u){return this.options.prefix=u,this._update(),this},addAttribution:function(u){return u?(this._attributions[u]||(this._attributions[u]=0),this._attributions[u]++,this._update(),this):this},removeAttribution:function(u){return u?(this._attributions[u]&&(this._attributions[u]--,this._update()),this):this},_update:function(){if(this._map){var u=[];for(var h in this._attributions)this._attributions[h]&&u.push(h);var b=[];this.options.prefix&&b.push(this.options.prefix),u.length&&b.push(u.join(", ")),this._container.innerHTML=b.join(' ')}}});ct.mergeOptions({attributionControl:!0}),ct.addInitHook(function(){this.options.attributionControl&&new K0().addTo(this)});var y7=function(u){return new K0(u)};ki.Layers=kO,ki.Zoom=Z0,ki.Scale=PO,ki.Attribution=K0,od.layers=p7,od.zoom=m7,od.scale=g7,od.attribution=y7;var Xi=G.extend({initialize:function(u){this._map=u},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Xi.addTo=function(u,h){return u.addHandler(h,this),this};var _7={Events:ne},LO=ze.touch?"touchstart mousedown":"mousedown",ga=le.extend({options:{clickTolerance:3},initialize:function(u,h,b,T){y(this,T),this._element=u,this._dragStartTarget=h||u,this._preventOutline=b},enable:function(){this._enabled||(qe(this._dragStartTarget,LO,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(ga._dragging===this&&this.finishDrag(!0),Ct(this._dragStartTarget,LO,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(u){if(this._enabled&&(this._moved=!1,!D0(this._element,"leaflet-zoom-anim"))){if(u.touches&&u.touches.length!==1){ga._dragging===this&&this.finishDrag();return}if(!(ga._dragging||u.shiftKey||u.which!==1&&u.button!==1&&!u.touches)&&(ga._dragging=this,this._preventOutline&&z0(this._element),$0(),td(),!this._moving)){this.fire("down");var h=u.touches?u.touches[0]:u,b=xO(this._element);this._startPoint=new K(h.clientX,h.clientY),this._startPos=Ts(this._element),this._parentScale=V0(b);var T=u.type==="mousedown";qe(document,T?"mousemove":"touchmove",this._onMove,this),qe(document,T?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(u){if(this._enabled){if(u.touches&&u.touches.length>1){this._moved=!0;return}var h=u.touches&&u.touches.length===1?u.touches[0]:u,b=new K(h.clientX,h.clientY)._subtract(this._startPoint);!b.x&&!b.y||Math.abs(b.x)+Math.abs(b.y)B&&(oe=de,B=pe);B>b&&(h[oe]=1,X0(u,h,b,T,oe),X0(u,h,b,oe,P))}function S7(u,h){for(var b=[u[0]],T=1,P=0,B=u.length;Th&&(b.push(u[T]),P=T);return Ph.max.x&&(b|=2),u.yh.max.y&&(b|=8),b}function E7(u,h){var b=h.x-u.x,T=h.y-u.y;return b*b+T*T}function ad(u,h,b,T){var P=h.x,B=h.y,oe=b.x-P,de=b.y-B,pe=oe*oe+de*de,we;return pe>0&&(we=((u.x-P)*oe+(u.y-B)*de)/pe,we>1?(P=b.x,B=b.y):we>0&&(P+=oe*we,B+=de*we)),oe=u.x-P,de=u.y-B,T?oe*oe+de*de:new K(P,B)}function ni(u){return!S(u[0])||typeof u[0][0]!="object"&&typeof u[0][0]<"u"}function IO(u){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),ni(u)}function FO(u,h){var b,T,P,B,oe,de,pe,we;if(!u||u.length===0)throw new Error("latlngs not passed");ni(u)||(console.warn("latlngs are not flat! Only the first ring will be used"),u=u[0]);var De=ae([0,0]),He=q(u),Je=He.getNorthWest().distanceTo(He.getSouthWest())*He.getNorthEast().distanceTo(He.getNorthWest());Je<1700&&(De=Q0(u));var dr=u.length,On=[];for(b=0;bT){pe=(B-T)/P,we=[de.x-pe*(de.x-oe.x),de.y-pe*(de.y-oe.y)];break}var wr=h.unproject(D(we));return ae([wr.lat+De.lat,wr.lng+De.lng])}var T7={__proto__:null,simplify:NO,pointToSegmentDistance:RO,closestPointOnSegment:w7,clipSegment:DO,_getEdgeIntersection:wp,_getBitCode:ks,_sqClosestPointOnSegment:ad,isFlat:ni,_flat:IO,polylineCenter:FO},J0={project:function(u){return new K(u.lng,u.lat)},unproject:function(u){return new re(u.y,u.x)},bounds:new H([-180,-90],[180,90])},e_={R:6378137,R_MINOR:6356752314245179e-9,bounds:new H([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(u){var h=Math.PI/180,b=this.R,T=u.lat*h,P=this.R_MINOR/b,B=Math.sqrt(1-P*P),oe=B*Math.sin(T),de=Math.tan(Math.PI/4-T/2)/Math.pow((1-oe)/(1+oe),B/2);return T=-b*Math.log(Math.max(de,1e-10)),new K(u.lng*h*b,T)},unproject:function(u){for(var h=180/Math.PI,b=this.R,T=this.R_MINOR/b,P=Math.sqrt(1-T*T),B=Math.exp(-u.y/b),oe=Math.PI/2-2*Math.atan(B),de=0,pe=.1,we;de<15&&Math.abs(pe)>1e-7;de++)we=P*Math.sin(oe),we=Math.pow((1-we)/(1+we),P/2),pe=Math.PI/2-2*Math.atan(B*we)-oe,oe+=pe;return new re(oe*h,u.x*h/b)}},O7={__proto__:null,LonLat:J0,Mercator:e_,SphericalMercator:$},C7=i({},C,{code:"EPSG:3395",projection:e_,transformation:function(){var u=.5/(Math.PI*e_.R);return ee(u,.5,-u,.5)}()}),$O=i({},C,{code:"EPSG:4326",projection:J0,transformation:ee(1/180,1,-1/180,.5)}),k7=i({},he,{projection:J0,transformation:ee(1,0,-1,0),scale:function(u){return Math.pow(2,u)},zoom:function(u){return Math.log(u)/Math.LN2},distance:function(u,h){var b=h.lng-u.lng,T=h.lat-u.lat;return Math.sqrt(b*b+T*T)},infinite:!0});he.Earth=C,he.EPSG3395=C7,he.EPSG3857=se,he.EPSG900913=ge,he.EPSG4326=$O,he.Simple=k7;var Pi=le.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(u){return u.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(u){return u&&u.removeLayer(this),this},getPane:function(u){return this._map.getPane(u?this.options[u]||u:this.options.pane)},addInteractiveTarget:function(u){return this._map._targets[l(u)]=this,this},removeInteractiveTarget:function(u){return delete this._map._targets[l(u)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(u){var h=u.target;if(h.hasLayer(this)){if(this._map=h,this._zoomAnimated=h._zoomAnimated,this.getEvents){var b=this.getEvents();h.on(b,this),this.once("remove",function(){h.off(b,this)},this)}this.onAdd(h),this.fire("add"),h.fire("layeradd",{layer:this})}}});ct.include({addLayer:function(u){if(!u._layerAdd)throw new Error("The provided object is not a Layer.");var h=l(u);return this._layers[h]?this:(this._layers[h]=u,u._mapToAdd=this,u.beforeAdd&&u.beforeAdd(this),this.whenReady(u._layerAdd,u),this)},removeLayer:function(u){var h=l(u);return this._layers[h]?(this._loaded&&u.onRemove(this),delete this._layers[h],this._loaded&&(this.fire("layerremove",{layer:u}),u.fire("remove")),u._map=u._mapToAdd=null,this):this},hasLayer:function(u){return l(u)in this._layers},eachLayer:function(u,h){for(var b in this._layers)u.call(h,this._layers[b]);return this},_addLayers:function(u){u=u?S(u)?u:[u]:[];for(var h=0,b=u.length;hthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&h[0]instanceof re&&h[0].equals(h[b-1])&&h.pop(),h},_setLatLngs:function(u){Co.prototype._setLatLngs.call(this,u),ni(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return ni(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var u=this._renderer._bounds,h=this.options.weight,b=new K(h,h);if(u=new H(u.min.subtract(b),u.max.add(b)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(u))){if(this.options.noClip){this._parts=this._rings;return}for(var T=0,P=this._rings.length,B;Tu.y!=P.y>u.y&&u.x<(P.x-T.x)*(u.y-T.y)/(P.y-T.y)+T.x&&(h=!h);return h||Co.prototype._containsPoint.call(this,u,!0)}});function D7(u,h){return new Zl(u,h)}var ko=Oo.extend({initialize:function(u,h){y(this,h),this._layers={},u&&this.addData(u)},addData:function(u){var h=S(u)?u:u.features,b,T,P;if(h){for(b=0,T=h.length;b0&&P.push(P[0].slice()),P}function Kl(u,h){return u.feature?i({},u.feature,{geometry:h}):Cp(h)}function Cp(u){return u.type==="Feature"||u.type==="FeatureCollection"?u:{type:"Feature",properties:{},geometry:u}}var i_={toGeoJSON:function(u){return Kl(this,{type:"Point",coordinates:r_(this.getLatLng(),u)})}};xp.include(i_),t_.include(i_),Sp.include(i_),Co.include({toGeoJSON:function(u){var h=!ni(this._latlngs),b=Op(this._latlngs,h?1:0,!1,u);return Kl(this,{type:(h?"Multi":"")+"LineString",coordinates:b})}}),Zl.include({toGeoJSON:function(u){var h=!ni(this._latlngs),b=h&&!ni(this._latlngs[0]),T=Op(this._latlngs,b?2:h?1:0,!0,u);return h||(T=[T]),Kl(this,{type:(b?"Multi":"")+"Polygon",coordinates:T})}}),Gl.include({toMultiPoint:function(u){var h=[];return this.eachLayer(function(b){h.push(b.toGeoJSON(u).geometry.coordinates)}),Kl(this,{type:"MultiPoint",coordinates:h})},toGeoJSON:function(u){var h=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(h==="MultiPoint")return this.toMultiPoint(u);var b=h==="GeometryCollection",T=[];return this.eachLayer(function(P){if(P.toGeoJSON){var B=P.toGeoJSON(u);if(b)T.push(B.geometry);else{var oe=Cp(B);oe.type==="FeatureCollection"?T.push.apply(T,oe.features):T.push(oe)}}}),b?Kl(this,{geometries:T,type:"GeometryCollection"}):{type:"FeatureCollection",features:T}}});function zO(u,h){return new ko(u,h)}var I7=zO,kp=Pi.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(u,h,b){this._url=u,this._bounds=q(h),y(this,b)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(Ke(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){Ht(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(u){return this.options.opacity=u,this._image&&this._updateOpacity(),this},setStyle:function(u){return u.opacity&&this.setOpacity(u.opacity),this},bringToFront:function(){return this._map&&Wl(this._image),this},bringToBack:function(){return this._map&&Yl(this._image),this},setUrl:function(u){return this._url=u,this._image&&(this._image.src=u),this},setBounds:function(u){return this._bounds=q(u),this._map&&this._reset(),this},getEvents:function(){var u={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(u.zoomanim=this._animateZoom),u},setZIndex:function(u){return this.options.zIndex=u,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var u=this._url.tagName==="IMG",h=this._image=u?this._url:pt("img");if(Ke(h,"leaflet-image-layer"),this._zoomAnimated&&Ke(h,"leaflet-zoom-animated"),this.options.className&&Ke(h,this.options.className),h.onselectstart=f,h.onmousemove=f,h.onload=a(this.fire,this,"load"),h.onerror=a(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(h.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),u){this._url=h.src;return}h.src=this._url,h.alt=this.options.alt},_animateZoom:function(u){var h=this._map.getZoomScale(u.zoom),b=this._map._latLngBoundsToNewLayerBounds(this._bounds,u.zoom,u.center).min;Es(this._image,b,h)},_reset:function(){var u=this._image,h=new H(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),b=h.getSize();hn(u,h.min),u.style.width=b.x+"px",u.style.height=b.y+"px"},_updateOpacity:function(){ti(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var u=this.options.errorOverlayUrl;u&&this._url!==u&&(this._url=u,this._image.src=u)},getCenter:function(){return this._bounds.getCenter()}}),F7=function(u,h,b){return new kp(u,h,b)},VO=kp.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var u=this._url.tagName==="VIDEO",h=this._image=u?this._url:pt("video");if(Ke(h,"leaflet-image-layer"),this._zoomAnimated&&Ke(h,"leaflet-zoom-animated"),this.options.className&&Ke(h,this.options.className),h.onselectstart=f,h.onmousemove=f,h.onloadeddata=a(this.fire,this,"load"),u){for(var b=h.getElementsByTagName("source"),T=[],P=0;P0?T:[h.src];return}S(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(h.style,"objectFit")&&(h.style.objectFit="fill"),h.autoplay=!!this.options.autoplay,h.loop=!!this.options.loop,h.muted=!!this.options.muted,h.playsInline=!!this.options.playsInline;for(var B=0;BP?(h.height=P+"px",Ke(u,B)):an(u,B),this._containerWidth=this._container.offsetWidth},_animateZoom:function(u){var h=this._map._latLngToNewLayerPoint(this._latlng,u.zoom,u.center),b=this._getAnchor();hn(this._container,h.add(b))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var u=this._map,h=parseInt(ed(this._container,"marginBottom"),10)||0,b=this._container.offsetHeight+h,T=this._containerWidth,P=new K(this._containerLeft,-b-this._containerBottom);P._add(Ts(this._container));var B=u.layerPointToContainerPoint(P),oe=D(this.options.autoPanPadding),de=D(this.options.autoPanPaddingTopLeft||oe),pe=D(this.options.autoPanPaddingBottomRight||oe),we=u.getSize(),De=0,He=0;B.x+T+pe.x>we.x&&(De=B.x+T-we.x+pe.x),B.x-De-de.x<0&&(De=B.x-de.x),B.y+b+pe.y>we.y&&(He=B.y+b-we.y+pe.y),B.y-He-de.y<0&&(He=B.y-de.y),(De||He)&&(this.options.keepInView&&(this._autopanning=!0),u.fire("autopanstart").panBy([De,He]))}},_getAnchor:function(){return D(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),B7=function(u,h){return new Pp(u,h)};ct.mergeOptions({closePopupOnClick:!0}),ct.include({openPopup:function(u,h,b){return this._initOverlay(Pp,u,h,b).openOn(this),this},closePopup:function(u){return u=arguments.length?u:this._popup,u&&u.close(),this}}),Pi.include({bindPopup:function(u,h){return this._popup=this._initOverlay(Pp,this._popup,u,h),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(u){return this._popup&&(this instanceof Oo||(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)){Cs(u);var h=u.layer||u.target;if(this._popup._source===h&&!(h instanceof va)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(u.latlng);return}this._popup._source=h,this.openPopup(u.latlng)}},_movePopup:function(u){this._popup.setLatLng(u.latlng)},_onKeyPress:function(u){u.originalEvent.keyCode===13&&this._openPopup(u)}});var Lp=Ji.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(u){Ji.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){Ji.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=Ji.prototype.getEvents.call(this);return this.options.permanent||(u.preclick=this.close),u},_initLayout:function(){var u="leaflet-tooltip",h=u+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=pt("div",h),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+l(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(u){var h,b,T=this._map,P=this._container,B=T.latLngToContainerPoint(T.getCenter()),oe=T.layerPointToContainerPoint(u),de=this.options.direction,pe=P.offsetWidth,we=P.offsetHeight,De=D(this.options.offset),He=this._getAnchor();de==="top"?(h=pe/2,b=we):de==="bottom"?(h=pe/2,b=0):de==="center"?(h=pe/2,b=we/2):de==="right"?(h=0,b=we/2):de==="left"?(h=pe,b=we/2):oe.xthis.options.maxZoom||bT?this._retainParent(P,B,oe,T):!1)},_retainChildren:function(u,h,b,T){for(var P=2*u;P<2*u+2;P++)for(var B=2*h;B<2*h+2;B++){var oe=new K(P,B);oe.z=b+1;var de=this._tileCoordsToKey(oe),pe=this._tiles[de];if(pe&&pe.active){pe.retain=!0;continue}else pe&&pe.loaded&&(pe.retain=!0);b+1this.options.maxZoom||this.options.minZoom!==void 0&&P1){this._setView(u,b);return}for(var He=P.min.y;He<=P.max.y;He++)for(var Je=P.min.x;Je<=P.max.x;Je++){var dr=new K(Je,He);if(dr.z=this._tileZoom,!!this._isValidTile(dr)){var On=this._tiles[this._tileCoordsToKey(dr)];On?On.current=!0:oe.push(dr)}}if(oe.sort(function(wr,Xl){return wr.distanceTo(B)-Xl.distanceTo(B)}),oe.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var ri=document.createDocumentFragment();for(Je=0;Jeb.max.x)||!h.wrapLat&&(u.yb.max.y))return!1}if(!this.options.bounds)return!0;var T=this._tileCoordsToBounds(u);return q(this.options.bounds).overlaps(T)},_keyToBounds:function(u){return this._tileCoordsToBounds(this._keyToTileCoords(u))},_tileCoordsToNwSe:function(u){var h=this._map,b=this.getTileSize(),T=u.scaleBy(b),P=T.add(b),B=h.unproject(T,u.z),oe=h.unproject(P,u.z);return[B,oe]},_tileCoordsToBounds:function(u){var h=this._tileCoordsToNwSe(u),b=new z(h[0],h[1]);return this.options.noWrap||(b=this._map.wrapLatLngBounds(b)),b},_tileCoordsToKey:function(u){return u.x+":"+u.y+":"+u.z},_keyToTileCoords:function(u){var h=u.split(":"),b=new K(+h[0],+h[1]);return b.z=+h[2],b},_removeTile:function(u){var h=this._tiles[u];h&&(Ht(h.el),delete this._tiles[u],this.fire("tileunload",{tile:h.el,coords:this._keyToTileCoords(u)}))},_initTile:function(u){Ke(u,"leaflet-tile");var h=this.getTileSize();u.style.width=h.x+"px",u.style.height=h.y+"px",u.onselectstart=f,u.onmousemove=f,ze.ielt9&&this.options.opacity<1&&ti(u,this.options.opacity)},_addTile:function(u,h){var b=this._getTilePos(u),T=this._tileCoordsToKey(u),P=this.createTile(this._wrapCoords(u),a(this._tileReady,this,u));this._initTile(P),this.createTile.length<2&&V(a(this._tileReady,this,u,null,P)),hn(P,b),this._tiles[T]={el:P,coords:u,current:!0},h.appendChild(P),this.fire("tileloadstart",{tile:P,coords:u})},_tileReady:function(u,h,b){h&&this.fire("tileerror",{error:h,tile:b,coords:u});var T=this._tileCoordsToKey(u);b=this._tiles[T],b&&(b.loaded=+new Date,this._map._fadeAnimated?(ti(b.el,0),W(this._fadeFrame),this._fadeFrame=V(this._updateOpacity,this)):(b.active=!0,this._pruneTiles()),h||(Ke(b.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:b.el,coords:u})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),ze.ielt9||!this._map._fadeAnimated?V(this._pruneTiles,this):setTimeout(a(this._pruneTiles,this),250)))},_getTilePos:function(u){return u.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(u){var h=new K(this._wrapX?d(u.x,this._wrapX):u.x,this._wrapY?d(u.y,this._wrapY):u.y);return h.z=u.z,h},_pxBoundsToTileRange:function(u){var h=this.getTileSize();return new H(u.min.unscaleBy(h).floor(),u.max.unscaleBy(h).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var u in this._tiles)if(!this._tiles[u].loaded)return!1;return!0}});function H7(u){return new ld(u)}var Ql=ld.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(u,h){this._url=u,h=y(this,h),h.detectRetina&&ze.retina&&h.maxZoom>0?(h.tileSize=Math.floor(h.tileSize/2),h.zoomReverse?(h.zoomOffset--,h.minZoom=Math.min(h.maxZoom,h.minZoom+1)):(h.zoomOffset++,h.maxZoom=Math.max(h.minZoom,h.maxZoom-1)),h.minZoom=Math.max(0,h.minZoom)):h.zoomReverse?h.minZoom=Math.min(h.maxZoom,h.minZoom):h.maxZoom=Math.max(h.minZoom,h.maxZoom),typeof h.subdomains=="string"&&(h.subdomains=h.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(u,h){return this._url===u&&h===void 0&&(h=!0),this._url=u,h||this.redraw(),this},createTile:function(u,h){var b=document.createElement("img");return qe(b,"load",a(this._tileOnLoad,this,h,b)),qe(b,"error",a(this._tileOnError,this,h,b)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(b.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(b.referrerPolicy=this.options.referrerPolicy),b.alt="",b.src=this.getTileUrl(u),b},getTileUrl:function(u){var h={r:ze.retina?"@2x":"",s:this._getSubdomain(u),x:u.x,y:u.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var b=this._globalTileRange.max.y-u.y;this.options.tms&&(h.y=b),h["-y"]=b}return w(this._url,i(h,this.options))},_tileOnLoad:function(u,h){ze.ielt9?setTimeout(a(u,this,null,h),0):u(null,h)},_tileOnError:function(u,h,b){var T=this.options.errorTileUrl;T&&h.getAttribute("src")!==T&&(h.src=T),u(b,h)},_onTileRemove:function(u){u.tile.onload=null},_getZoomForUrl:function(){var u=this._tileZoom,h=this.options.maxZoom,b=this.options.zoomReverse,T=this.options.zoomOffset;return b&&(u=h-u),u+T},_getSubdomain:function(u){var h=Math.abs(u.x+u.y)%this.options.subdomains.length;return this.options.subdomains[h]},_abortLoading:function(){var u,h;for(u in this._tiles)if(this._tiles[u].coords.z!==this._tileZoom&&(h=this._tiles[u].el,h.onload=f,h.onerror=f,!h.complete)){h.src=O;var b=this._tiles[u].coords;Ht(h),delete this._tiles[u],this.fire("tileabort",{tile:h,coords:b})}},_removeTile:function(u){var h=this._tiles[u];if(h)return h.el.setAttribute("src",O),ld.prototype._removeTile.call(this,u)},_tileReady:function(u,h,b){if(!(!this._map||b&&b.getAttribute("src")===O))return ld.prototype._tileReady.call(this,u,h,b)}});function YO(u,h){return new Ql(u,h)}var GO=Ql.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(u,h){this._url=u;var b=i({},this.defaultWmsParams);for(var T in h)T in this.options||(b[T]=h[T]);h=y(this,h);var P=h.detectRetina&&ze.retina?2:1,B=this.getTileSize();b.width=B.x*P,b.height=B.y*P,this.wmsParams=b},onAdd:function(u){this._crs=this.options.crs||u.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var h=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[h]=this._crs.code,Ql.prototype.onAdd.call(this,u)},getTileUrl:function(u){var h=this._tileCoordsToNwSe(u),b=this._crs,T=ie(b.project(h[0]),b.project(h[1])),P=T.min,B=T.max,oe=(this._wmsVersion>=1.3&&this._crs===$O?[P.y,P.x,B.y,B.x]:[P.x,P.y,B.x,B.y]).join(","),de=Ql.prototype.getTileUrl.call(this,u);return de+x(this.wmsParams,de,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+oe},setParams:function(u,h){return i(this.wmsParams,u),h||this.redraw(),this}});function W7(u,h){return new GO(u,h)}Ql.WMS=GO,YO.wms=W7;var Po=Pi.extend({options:{padding:.1},initialize:function(u){y(this,u),l(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),Ke(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var u={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(u.zoomanim=this._onAnimZoom),u},_onAnimZoom:function(u){this._updateTransform(u.center,u.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(u,h){var b=this._map.getZoomScale(h,this._zoom),T=this._map.getSize().multiplyBy(.5+this.options.padding),P=this._map.project(this._center,h),B=T.multiplyBy(-b).add(P).subtract(this._map._getNewPixelOrigin(u,h));ze.any3d?Es(this._container,B,b):hn(this._container,B)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var u in this._layers)this._layers[u]._reset()},_onZoomEnd:function(){for(var u in this._layers)this._layers[u]._project()},_updatePaths:function(){for(var u in this._layers)this._layers[u]._update()},_update:function(){var u=this.options.padding,h=this._map.getSize(),b=this._map.containerPointToLayerPoint(h.multiplyBy(-u)).round();this._bounds=new H(b,b.add(h.multiplyBy(1+u*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),qO=Po.extend({options:{tolerance:0},getEvents:function(){var u=Po.prototype.getEvents.call(this);return u.viewprereset=this._onViewPreReset,u},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Po.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var u=this._container=document.createElement("canvas");qe(u,"mousemove",this._onMouseMove,this),qe(u,"click dblclick mousedown mouseup contextmenu",this._onClick,this),qe(u,"mouseout",this._handleMouseOut,this),u._leaflet_disable_events=!0,this._ctx=u.getContext("2d")},_destroyContainer:function(){W(this._redrawRequest),delete this._ctx,Ht(this._container),Ct(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var u;this._redrawBounds=null;for(var h in this._layers)u=this._layers[h],u._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Po.prototype._update.call(this);var u=this._bounds,h=this._container,b=u.getSize(),T=ze.retina?2:1;hn(h,u.min),h.width=T*b.x,h.height=T*b.y,h.style.width=b.x+"px",h.style.height=b.y+"px",ze.retina&&this._ctx.scale(2,2),this._ctx.translate(-u.min.x,-u.min.y),this.fire("update")}},_reset:function(){Po.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(u){this._updateDashArray(u),this._layers[l(u)]=u;var h=u._order={layer:u,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=h),this._drawLast=h,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(u){this._requestRedraw(u)},_removePath:function(u){var h=u._order,b=h.next,T=h.prev;b?b.prev=T:this._drawLast=T,T?T.next=b:this._drawFirst=b,delete u._order,delete this._layers[l(u)],this._requestRedraw(u)},_updatePath:function(u){this._extendRedrawBounds(u),u._project(),u._update(),this._requestRedraw(u)},_updateStyle:function(u){this._updateDashArray(u),this._requestRedraw(u)},_updateDashArray:function(u){if(typeof u.options.dashArray=="string"){var h=u.options.dashArray.split(/[, ]+/),b=[],T,P;for(P=0;P')}}catch{}return function(u){return document.createElement("<"+u+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),Y7={_initContainer:function(){this._container=pt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Po.prototype._update.call(this),this.fire("update"))},_initPath:function(u){var h=u._container=cd("shape");Ke(h,"leaflet-vml-shape "+(this.options.className||"")),h.coordsize="1 1",u._path=cd("path"),h.appendChild(u._path),this._updateStyle(u),this._layers[l(u)]=u},_addPath:function(u){var h=u._container;this._container.appendChild(h),u.options.interactive&&u.addInteractiveTarget(h)},_removePath:function(u){var h=u._container;Ht(h),u.removeInteractiveTarget(h),delete this._layers[l(u)]},_updateStyle:function(u){var h=u._stroke,b=u._fill,T=u.options,P=u._container;P.stroked=!!T.stroke,P.filled=!!T.fill,T.stroke?(h||(h=u._stroke=cd("stroke")),P.appendChild(h),h.weight=T.weight+"px",h.color=T.color,h.opacity=T.opacity,T.dashArray?h.dashStyle=S(T.dashArray)?T.dashArray.join(" "):T.dashArray.replace(/( *, *)/g," "):h.dashStyle="",h.endcap=T.lineCap.replace("butt","flat"),h.joinstyle=T.lineJoin):h&&(P.removeChild(h),u._stroke=null),T.fill?(b||(b=u._fill=cd("fill")),P.appendChild(b),b.color=T.fillColor||T.color,b.opacity=T.fillOpacity):b&&(P.removeChild(b),u._fill=null)},_updateCircle:function(u){var h=u._point.round(),b=Math.round(u._radius),T=Math.round(u._radiusY||b);this._setPath(u,u._empty()?"M0 0":"AL "+h.x+","+h.y+" "+b+","+T+" 0,"+65535*360)},_setPath:function(u,h){u._path.v=h},_bringToFront:function(u){Wl(u._container)},_bringToBack:function(u){Yl(u._container)}},jp=ze.vml?cd:Me,ud=Po.extend({_initContainer:function(){this._container=jp("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=jp("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Ht(this._container),Ct(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Po.prototype._update.call(this);var u=this._bounds,h=u.getSize(),b=this._container;(!this._svgSize||!this._svgSize.equals(h))&&(this._svgSize=h,b.setAttribute("width",h.x),b.setAttribute("height",h.y)),hn(b,u.min),b.setAttribute("viewBox",[u.min.x,u.min.y,h.x,h.y].join(" ")),this.fire("update")}},_initPath:function(u){var h=u._path=jp("path");u.options.className&&Ke(h,u.options.className),u.options.interactive&&Ke(h,"leaflet-interactive"),this._updateStyle(u),this._layers[l(u)]=u},_addPath:function(u){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(u._path),u.addInteractiveTarget(u._path)},_removePath:function(u){Ht(u._path),u.removeInteractiveTarget(u._path),delete this._layers[l(u)]},_updatePath:function(u){u._project(),u._update()},_updateStyle:function(u){var h=u._path,b=u.options;h&&(b.stroke?(h.setAttribute("stroke",b.color),h.setAttribute("stroke-opacity",b.opacity),h.setAttribute("stroke-width",b.weight),h.setAttribute("stroke-linecap",b.lineCap),h.setAttribute("stroke-linejoin",b.lineJoin),b.dashArray?h.setAttribute("stroke-dasharray",b.dashArray):h.removeAttribute("stroke-dasharray"),b.dashOffset?h.setAttribute("stroke-dashoffset",b.dashOffset):h.removeAttribute("stroke-dashoffset")):h.setAttribute("stroke","none"),b.fill?(h.setAttribute("fill",b.fillColor||b.color),h.setAttribute("fill-opacity",b.fillOpacity),h.setAttribute("fill-rule",b.fillRule||"evenodd")):h.setAttribute("fill","none"))},_updatePoly:function(u,h){this._setPath(u,ue(u._parts,h))},_updateCircle:function(u){var h=u._point,b=Math.max(Math.round(u._radius),1),T=Math.max(Math.round(u._radiusY),1)||b,P="a"+b+","+T+" 0 1,0 ",B=u._empty()?"M0 0":"M"+(h.x-b)+","+h.y+P+b*2+",0 "+P+-b*2+",0 ";this._setPath(u,B)},_setPath:function(u,h){u._path.setAttribute("d",h)},_bringToFront:function(u){Wl(u._path)},_bringToBack:function(u){Yl(u._path)}});ze.vml&&ud.include(Y7);function KO(u){return ze.svg||ze.vml?new ud(u):null}ct.include({getRenderer:function(u){var h=u.options.renderer||this._getPaneRenderer(u.options.pane)||this.options.renderer||this._renderer;return h||(h=this._renderer=this._createRenderer()),this.hasLayer(h)||this.addLayer(h),h},_getPaneRenderer:function(u){if(u==="overlayPane"||u===void 0)return!1;var h=this._paneRenderers[u];return h===void 0&&(h=this._createRenderer({pane:u}),this._paneRenderers[u]=h),h},_createRenderer:function(u){return this.options.preferCanvas&&ZO(u)||KO(u)}});var QO=Zl.extend({initialize:function(u,h){Zl.prototype.initialize.call(this,this._boundsToLatLngs(u),h)},setBounds:function(u){return this.setLatLngs(this._boundsToLatLngs(u))},_boundsToLatLngs:function(u){return u=q(u),[u.getSouthWest(),u.getNorthWest(),u.getNorthEast(),u.getSouthEast()]}});function G7(u,h){return new QO(u,h)}ud.create=jp,ud.pointsToPath=ue,ko.geometryToLayer=Ep,ko.coordsToLatLng=n_,ko.coordsToLatLngs=Tp,ko.latLngToCoords=r_,ko.latLngsToCoords=Op,ko.getFeature=Kl,ko.asFeature=Cp,ct.mergeOptions({boxZoom:!0});var XO=Xi.extend({initialize:function(u){this._map=u,this._container=u._container,this._pane=u._panes.overlayPane,this._resetStateTimeout=0,u.on("unload",this._destroy,this)},addHooks:function(){qe(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Ct(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Ht(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(),td(),$0(),this._startPoint=this._map.mouseEventToContainerPoint(u),qe(document,{contextmenu:Cs,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(u){this._moved||(this._moved=!0,this._box=pt("div","leaflet-zoom-box",this._container),Ke(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(u);var h=new H(this._point,this._startPoint),b=h.getSize();hn(this._box,h.min),this._box.style.width=b.x+"px",this._box.style.height=b.y+"px"},_finish:function(){this._moved&&(Ht(this._box),an(this._container,"leaflet-crosshair")),nd(),U0(),Ct(document,{contextmenu:Cs,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(u){if(!(u.which!==1&&u.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(a(this._resetState,this),0);var h=new z(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(h).fire("boxzoomend",{boxZoomBounds:h})}},_onKeyDown:function(u){u.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});ct.addInitHook("addHandler","boxZoom",XO),ct.mergeOptions({doubleClickZoom:!0});var JO=Xi.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(u){var h=this._map,b=h.getZoom(),T=h.options.zoomDelta,P=u.originalEvent.shiftKey?b-T:b+T;h.options.doubleClickZoom==="center"?h.setZoom(P):h.setZoomAround(u.containerPoint,P)}});ct.addInitHook("addHandler","doubleClickZoom",JO),ct.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var eC=Xi.extend({addHooks:function(){if(!this._draggable){var u=this._map;this._draggable=new ga(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))}Ke(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){an(this._map._container,"leaflet-grab"),an(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var u=this._map;if(u._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var h=q(this._map.options.maxBounds);this._offsetLimit=ie(this._map.latLngToContainerPoint(h.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(h.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;u.fire("movestart").fire("dragstart"),u.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(u){if(this._map.options.inertia){var h=this._lastTime=+new Date,b=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(b),this._times.push(h),this._prunePositions(h)}this._map.fire("move",u).fire("drag",u)},_prunePositions:function(u){for(;this._positions.length>1&&u-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var u=this._map.getSize().divideBy(2),h=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=h.subtract(u).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(u,h){return u-(u-h)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var u=this._draggable._newPos.subtract(this._draggable._startPos),h=this._offsetLimit;u.xh.max.x&&(u.x=this._viscousLimit(u.x,h.max.x)),u.y>h.max.y&&(u.y=this._viscousLimit(u.y,h.max.y)),this._draggable._newPos=this._draggable._startPos.add(u)}},_onPreDragWrap:function(){var u=this._worldWidth,h=Math.round(u/2),b=this._initialWorldOffset,T=this._draggable._newPos.x,P=(T-h+b)%u+h-b,B=(T+h+b)%u-h-b,oe=Math.abs(P+b)0?B:-B))-h;this._delta=0,this._startTime=null,oe&&(u.options.scrollWheelZoom==="center"?u.setZoom(h+oe):u.setZoomAround(this._lastMousePos,h+oe))}});ct.addInitHook("addHandler","scrollWheelZoom",nC);var q7=600;ct.mergeOptions({tapHold:ze.touchNative&&ze.safari&&ze.mobile,tapTolerance:15});var rC=Xi.extend({addHooks:function(){qe(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Ct(this._map._container,"touchstart",this._onDown,this)},_onDown:function(u){if(clearTimeout(this._holdTimeout),u.touches.length===1){var h=u.touches[0];this._startPos=this._newPos=new K(h.clientX,h.clientY),this._holdTimeout=setTimeout(a(function(){this._cancel(),this._isTapValid()&&(qe(document,"touchend",Wn),qe(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",h))},this),q7),qe(document,"touchend touchcancel contextmenu",this._cancel,this),qe(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function u(){Ct(document,"touchend",Wn),Ct(document,"touchend touchcancel",u)},_cancel:function(){clearTimeout(this._holdTimeout),Ct(document,"touchend touchcancel contextmenu",this._cancel,this),Ct(document,"touchmove",this._onMove,this)},_onMove:function(u){var h=u.touches[0];this._newPos=new K(h.clientX,h.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(u,h){var b=new MouseEvent(u,{bubbles:!0,cancelable:!0,view:window,screenX:h.screenX,screenY:h.screenY,clientX:h.clientX,clientY:h.clientY});b._simulated=!0,h.target.dispatchEvent(b)}});ct.addInitHook("addHandler","tapHold",rC),ct.mergeOptions({touchZoom:ze.touch,bounceAtZoomLimits:!0});var iC=Xi.extend({addHooks:function(){Ke(this._map._container,"leaflet-touch-zoom"),qe(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){an(this._map._container,"leaflet-touch-zoom"),Ct(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(u){var h=this._map;if(!(!u.touches||u.touches.length!==2||h._animatingZoom||this._zooming)){var b=h.mouseEventToContainerPoint(u.touches[0]),T=h.mouseEventToContainerPoint(u.touches[1]);this._centerPoint=h.getSize()._divideBy(2),this._startLatLng=h.containerPointToLatLng(this._centerPoint),h.options.touchZoom!=="center"&&(this._pinchStartLatLng=h.containerPointToLatLng(b.add(T)._divideBy(2))),this._startDist=b.distanceTo(T),this._startZoom=h.getZoom(),this._moved=!1,this._zooming=!0,h._stop(),qe(document,"touchmove",this._onTouchMove,this),qe(document,"touchend touchcancel",this._onTouchEnd,this),Wn(u)}},_onTouchMove:function(u){if(!(!u.touches||u.touches.length!==2||!this._zooming)){var h=this._map,b=h.mouseEventToContainerPoint(u.touches[0]),T=h.mouseEventToContainerPoint(u.touches[1]),P=b.distanceTo(T)/this._startDist;if(this._zoom=h.getScaleZoom(P,this._startZoom),!h.options.bounceAtZoomLimits&&(this._zoomh.getMaxZoom()&&P>1)&&(this._zoom=h._limitZoom(this._zoom)),h.options.touchZoom==="center"){if(this._center=this._startLatLng,P===1)return}else{var B=b._add(T)._divideBy(2)._subtract(this._centerPoint);if(P===1&&B.x===0&&B.y===0)return;this._center=h.unproject(h.project(this._pinchStartLatLng,this._zoom).subtract(B),this._zoom)}this._moved||(h._moveStart(!0,!1),this._moved=!0),W(this._animRequest);var oe=a(h._move,h,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=V(oe,this,!0),Wn(u)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,W(this._animRequest),Ct(document,"touchmove",this._onTouchMove,this),Ct(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});ct.addInitHook("addHandler","touchZoom",iC),ct.BoxZoom=XO,ct.DoubleClickZoom=JO,ct.Drag=eC,ct.Keyboard=tC,ct.ScrollWheelZoom=nC,ct.TapHold=rC,ct.TouchZoom=iC,n.Bounds=H,n.Browser=ze,n.CRS=he,n.Canvas=qO,n.Circle=t_,n.CircleMarker=Sp,n.Class=G,n.Control=ki,n.DivIcon=WO,n.DivOverlay=Ji,n.DomEvent=f7,n.DomUtil=u7,n.Draggable=ga,n.Evented=le,n.FeatureGroup=Oo,n.GeoJSON=ko,n.GridLayer=ld,n.Handler=Xi,n.Icon=ql,n.ImageOverlay=kp,n.LatLng=re,n.LatLngBounds=z,n.Layer=Pi,n.LayerGroup=Gl,n.LineUtil=T7,n.Map=ct,n.Marker=xp,n.Mixin=_7,n.Path=va,n.Point=K,n.PolyUtil=b7,n.Polygon=Zl,n.Polyline=Co,n.Popup=Pp,n.PosAnimation=CO,n.Projection=O7,n.Rectangle=QO,n.Renderer=Po,n.SVG=ud,n.SVGOverlay=HO,n.TileLayer=Ql,n.Tooltip=Lp,n.Transformation=J,n.Util=X,n.VideoOverlay=VO,n.bind=a,n.bounds=ie,n.canvas=ZO,n.circle=R7,n.circleMarker=N7,n.control=od,n.divIcon=V7,n.extend=i,n.featureGroup=L7,n.geoJSON=zO,n.geoJson=I7,n.gridLayer=H7,n.icon=j7,n.imageOverlay=F7,n.latLng=ae,n.latLngBounds=q,n.layerGroup=P7,n.map=h7,n.marker=M7,n.point=D,n.polygon=D7,n.polyline=A7,n.popup=B7,n.rectangle=G7,n.setOptions=y,n.stamp=l,n.svg=KO,n.svgOverlay=U7,n.tileLayer=YO,n.tooltip=z7,n.transformation=ee,n.version=r,n.videoOverlay=$7;var Z7=window.L;n.noConflict=function(){return window.L=Z7,this},window.L=n})})(S2,S2.exports);var cp=S2.exports;const lR=Gu(cp);function nO(e,t,n){return Object.freeze({instance:e,context:t,container:n})}function rO(e,t){return t==null?function(n,r){const i=I.useRef();return i.current||(i.current=e(n,r)),i}:function(n,r){const i=I.useRef();i.current||(i.current=e(n,r));const o=I.useRef(n),{instance:a}=i.current;return I.useEffect(function(){o.current!==n&&(t(a,n,o.current),o.current=n)},[a,n,r]),i}}function Tbe(e,t){I.useEffect(function(){return(t.layerContainer??t.map).addLayer(e.instance),function(){var n;(n=t.layerContainer)==null||n.removeLayer(e.instance),t.map.removeLayer(e.instance)}},[t,e])}function K$(e){return function(t){const n=q$(),r=e(tO(t,n),n);return W$(n.map,t.attribution),Z$(r.current,t.eventHandlers),Tbe(r.current,n),r}}function Obe(e,t){const n=rO(e,t),r=K$(n);return wbe(r)}function Cbe(e,t){const n=rO(e),r=Ebe(n,t);return xbe(r)}function kbe(e,t){const n=rO(e,t),r=K$(n);return Sbe(r)}function Pbe(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 E2(){return E2=Object.assign||function(e){for(var t=1;t(m==null?void 0:m.map)??null,[m]);const y=I.useCallback(_=>{if(_!==null&&m===null){const w=new cp.Map(_,d);n!=null&&c!=null?w.setView(n,c):e!=null&&w.fitBounds(e,t),l!=null&&w.whenReady(l),v(_be(w))}},[]);I.useEffect(()=>()=>{m==null||m.map.remove()},[m]);const x=m?Y.createElement(G$,{value:m},r):a??null;return Y.createElement("div",E2({},p,{ref:y}),x)}const jbe=I.forwardRef(Lbe),Mbe=Obe(function({position:e,...t},n){const r=new cp.Marker(e,t);return nO(r,bbe(n,{overlayContainer:r}))},function(e,t,n){t.position!==n.position&&e.setLatLng(t.position),t.icon!=null&&t.icon!==n.icon&&e.setIcon(t.icon),t.zIndexOffset!=null&&t.zIndexOffset!==n.zIndexOffset&&e.setZIndexOffset(t.zIndexOffset),t.opacity!=null&&t.opacity!==n.opacity&&e.setOpacity(t.opacity),e.dragging!=null&&t.draggable!==n.draggable&&(t.draggable===!0?e.dragging.enable():e.dragging.disable())}),Nbe=Cbe(function(e,t){const n=new cp.Popup(e,t.overlayContainer);return nO(n,t)},function(e,t,{position:n},r){I.useEffect(function(){const{instance:i}=e;function o(s){s.popup===i&&(i.update(),r(!0))}function a(s){s.popup===i&&r(!1)}return t.map.on({popupopen:o,popupclose:a}),t.overlayContainer==null?(n!=null&&i.setLatLng(n),i.openOn(t.map)):t.overlayContainer.bindPopup(i),function(){var s;t.map.off({popupopen:o,popupclose:a}),(s=t.overlayContainer)==null||s.unbindPopup(),t.map.removeLayer(i)}},[e,t,r,n])}),Rbe=kbe(function({url:e,...t},n){const r=new cp.TileLayer(e,tO(t,n));return nO(r,n)},function(e,t,n){Pbe(e,t,n);const{url:r}=t;r!=null&&r!==n.url&&e.setUrl(r)}),Abe=()=>g.jsx(Rbe,{attribution:'© OpenStreetMap contributors',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),Dbe=e=>{if(e.length===0)return{};if(e.length>1)return{bounds:e.map(mt("latLong"))};const[{latLong:t}]=e;return{zoom:10,center:t}},Q$=({toggle:e,isOpen:t,title:n,locations:r=[]})=>g.jsx(ua,{toggle:e,isOpen:t,className:"map-modal__modal",contentClassName:"map-modal__modal-content",children:g.jsxs(Eo,{className:"map-modal__modal-body",children:[g.jsxs("h3",{className:"map-modal__modal-title",children:[n,g.jsx("button",{type:"button",className:"btn-close float-end","aria-label":"Close",onClick:e})]}),g.jsxs(jbe,{...Dbe(r),children:[g.jsx(Abe,{}),r.map(({cityName:i,latLong:o,count:a},s)=>g.jsx(Mbe,{position:o,children:g.jsxs(Nbe,{children:[g.jsx("b",{children:a})," visit",a>1?"s":""," from ",g.jsx("b",{children:i})]})},s))]})]})}),Ibe=({modalTitle:e,activeCities:t,locations:n=[]})=>{const[r,,i,o]=Sn(),[a,s]=Sn(),[l,c]=I.useState([]),d=a0(),f=I.useCallback(p=>{c(p?n.filter(p):n),i()},[n,i]);return g.jsxs(g.Fragment,{children:[!t&&g.jsx(yt,{color:"link",className:"open-map-modal-btn__btn",id:d,onClick:()=>f(),"aria-label":"Show in map",children:g.jsx(Ne,{icon:G1})}),t&&g.jsxs(Uh,{isOpen:a,toggle:s,children:[g.jsx(Fu,{color:"link",className:"open-map-modal-btn__btn",id:d,children:g.jsx(Ne,{icon:G1})}),g.jsxs(Iu,{end:!0,children:[g.jsx(Ue,{onClick:()=>f(),children:"Show all locations"}),g.jsx(Ue,{onClick:()=>f(({cityName:p})=>t.includes(p)),children:"Show locations in current page"})]})]}),g.jsx(Rr,{placement:"left",target:d,children:"Show in map"}),g.jsx(Q$,{toggle:o,isOpen:r,title:e,locations:l})]})},Fbe=({onChange:e,selected:t={},className:n,isOrphanVisits:r})=>{const{orphanVisitsType:i,excludeBots:o=!1}=t,a=s=>({active:i===s,onClick:()=>e({...t,orphanVisitsType:s===(t==null?void 0:t.orphanVisitsType)?void 0:s})});return g.jsxs(fa,{text:"Filters",dropdownClassName:n,inline:!0,end:!0,minWidth:250,children:[g.jsx(Ue,{header:!0,"aria-hidden":!0,children:"Bots:"}),g.jsx(Ue,{active:o,onClick:()=>e({...t,excludeBots:!(t!=null&&t.excludeBots)}),children:"Exclude potential bots"}),r&&g.jsxs(g.Fragment,{children:[g.jsx(Ue,{divider:!0,tag:"hr"}),g.jsx(Ue,{header:!0,"aria-hidden":!0,children:"Orphan visits type:"}),g.jsx(Ue,{...a("base_url"),children:"Base URL"}),g.jsx(Ue,{...a("invalid_short_url"),children:"Invalid short URL"}),g.jsx(Ue,{...a("regular_404"),children:"Regular 404"})]}),g.jsx(Ue,{divider:!0,tag:"hr"}),g.jsx(Ue,{disabled:!uo(t),onClick:()=>e({excludeBots:!1,orphanVisitsType:void 0}),children:g.jsx("i",{children:"Clear filters"})})]})},X$=(e,t)=>!Wu(e)&&uo(e[t]),cR=e=>typeof e=="number"?e:e?parseFloat(e):0,$be=(e,{os:t})=>{e[t]=(e[t]||0)+1},Ube=(e,{browser:t})=>{e[t]=(e[t]||0)+1},Bbe=(e,{referer:t})=>{e[t]=(e[t]||0)+1},J$=e=>(t,n)=>{const r=X$(n,e)?n[e]:"Unknown";t[r]=(t[r]||0)+1},zbe=J$("country"),Vbe=J$("city"),Hbe=(e,t)=>{if(!X$(t,"city")||t.city==="Unknown")return;const{city:n,latitude:r,longitude:i}=t,o=e[n]||{cityName:n,count:0,latLong:[cR(r),cR(i)]};o.count+=1,e[n]=o},Wbe=(e,t)=>{if(!j_e(t))return;const{visitedUrl:n}=t;e[n]=(e[n]||0)+1},eU=e=>e.reduce((t,n)=>($be(t.os,n),Ube(t.browsers,n),Bbe(t.referrers,n),zbe(t.countries,n),Vbe(t.cities,n),Hbe(t.citiesForMap,n),Wbe(t.visitedUrls,n),t),{os:{},browsers:{},referrers:{},countries:{},cities:{},citiesForMap:{},visitedUrls:{}}),tU=u8(e=>{const{userAgent:t,date:n,referer:r,visitLocation:i,potentialBot:o}=e,a={date:n,potentialBot:o,...X_e(t),referer:J_e(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 QT(e)?{...a,type:e.type,visitedUrl:e.visitedUrl}:a}),Ybe=Object.freeze(Object.defineProperty({__proto__:null,normalizeVisits:tU,processStatsFromVisits:eU},Symbol.toStringTag,{value:"Module"})),Gd=20,Gbe=({browser:e,os:t,referer:n,country:r,city:i,...o},a)=>`${e} ${t} ${n} ${r} ${i} ${o.visitedUrl}`.toLowerCase().includes(a.toLowerCase()),qbe=(e,t)=>t.filter(n=>Gbe(n,e)),Zbe=(e,t)=>v6(t,e),Kbe=(e,t,n)=>{const r=t?qbe(t,e):[...e],i=Zbe(n,r),o=i.length;return{visitsGroups:gh(Gd,i),total:o}},Qbe=({visits:e,selectedVisits:t=[],setSelectedVisits:n,matchMedia:r=window.matchMedia,isOrphanVisits:i=!1})=>{var o,a;const s="visits-table__header-cell visits-table__sticky",l=sF(767,r),[c,d]=I.useState(void 0),[f,p]=I.useState({}),m=I.useMemo(()=>Kbe(e,c,f),[e,c,f]),[v,y]=I.useState(1),x=v*Gd,_=x-Gd,w=8+Number(i),S=O=>()=>p({field:O,dir:l0(O,f.field,f.dir)}),E=O=>g.jsx(Of,{currentOrder:f,field:O,className:"visits-table__header-icon"});return I.useEffect(()=>{y(1),n([])},[c,n]),g.jsx("div",{className:"table-responsive-md",children:g.jsxs("table",{className:"table table-bordered table-hover table-sm visits-table",children:[g.jsxs("thead",{className:"visits-table__header",children:[g.jsxs("tr",{children:[g.jsxs("th",{className:`${s} text-center`,onClick:()=>n(t.length0})})]}),g.jsxs("th",{className:`${s} text-center`,onClick:S("potentialBot"),children:[g.jsx("span",{className:"sr-only",children:"Is bot"}),g.jsx(Ne,{icon:Ik}),E("potentialBot")]}),g.jsxs("th",{className:s,onClick:S("date"),children:["Date",E("date")]}),g.jsxs("th",{className:s,onClick:S("country"),children:["Country",E("country")]}),g.jsxs("th",{className:s,onClick:S("city"),children:["City",E("city")]}),g.jsxs("th",{className:s,onClick:S("browser"),children:["Browser",E("browser")]}),g.jsxs("th",{className:s,onClick:S("os"),children:["OS",E("os")]}),g.jsxs("th",{className:s,onClick:S("referer"),children:["Referrer",E("referer")]}),i&&g.jsxs("th",{className:s,onClick:S("visitedUrl"),children:["Visited URL",E("visitedUrl")]})]}),g.jsx("tr",{children:g.jsx("td",{colSpan:w,className:"p-0",children:g.jsx(Hh,{noBorder:!0,large:!1,onChange:d})})})]}),g.jsxs("tbody",{children:[!((o=m.visitsGroups[v-1])!=null&&o.length)&&g.jsx("tr",{children:g.jsx("td",{colSpan:w,className:"text-center",children:"No visits found with current filtering"})}),(a=m.visitsGroups[v-1])==null?void 0:a.map((O,k)=>{const j=t.includes(O);return g.jsxs("tr",{style:{cursor:"pointer"},className:Qe({"table-active":j}),onClick:()=>n(j?t.filter(A=>A!==O):[...t,O]),children:[g.jsx("td",{className:"text-center",children:j&&g.jsx(Ne,{icon:Yf,className:"text-primary"})}),g.jsx("td",{className:"text-center",children:O.potentialBot&&g.jsxs(g.Fragment,{children:[g.jsx(Ne,{icon:Ik,id:`botIcon${k}`}),g.jsx(Rr,{placement:"right",target:`botIcon${k}`,children:"Potentially a visit from a bot or crawler"})]})}),g.jsx("td",{children:g.jsx(ry,{date:O.date})}),g.jsx("td",{children:O.country}),g.jsx("td",{children:O.city}),g.jsx("td",{children:O.browser}),g.jsx("td",{children:O.os}),g.jsx("td",{children:O.referer}),i&&g.jsx("td",{children:O.visitedUrl})]},k)})]}),m.total>Gd&&g.jsx("tfoot",{children:g.jsx("tr",{children:g.jsx("td",{colSpan:w,className:"visits-table__footer-cell visits-table__sticky",children:g.jsxs("div",{className:"row",children:[g.jsx("div",{className:"col-md-6",children:g.jsx(WT,{pagesCount:Math.ceil(m.total/Gd),currentPage:v,setCurrentPage:y,centered:l})}),g.jsx("div",{className:Qe("col-md-6",{"d-flex align-items-center flex-row-reverse":!l,"text-center mt-3":l}),children:g.jsxs("div",{children:["Visits ",g.jsx("b",{children:wn(_+1)})," to"," ",g.jsx("b",{children:wn(b8(x,m.total))})," of"," ",g.jsx("b",{children:wn(m.total)})]})})]})})})})]})})},fc={byTime:{title:"By time",subPath:"by-time",icon:CW},byContext:{title:"By context",subPath:"by-context",icon:US},byLocation:{title:"By location",subPath:"by-location",icon:G1},list:{title:"List",subPath:"list",icon:ID}};let Um;const up=({children:e,visitsInfo:t,getVisits:n,cancelGetVisits:r,exportCsv:i,isOrphanVisits:o=!1})=>{const{visits:a,loading:s,loadingLarge:l,error:c,errorData:d,progress:f,fallbackInterval:p}=t,[{dateRange:m,visitsFilter:v},y]=vbe(),x=Ul("visits"),_=Vr(({startDate:z,endDate:q})=>({dateRange:{startDate:z??void 0,endDate:q??void 0}}),y),w=I.useRef(m??p??(x==null?void 0:x.defaultInterval)??"last30Days"),[S,E]=I.useState([]),[O,k]=I.useState(),j=I.useRef(!0),{search:A}=En(),U=z=>z?`${z}${A}`:A,R=I.useMemo(()=>tU(a),[a]),{os:V,browsers:W,referrers:X,countries:G,cities:Z,citiesForMap:ne,visitedUrls:le}=I.useMemo(()=>eU(R),[R]),K=I.useMemo(()=>({...v,excludeBots:v.excludeBots??(x==null?void 0:x.excludeBots)}),[v,x==null?void 0:x.excludeBots]),F=h8(ne),D=I.useCallback(z=>{Um=void 0,E(z)},[]),H=I.useCallback((z,q)=>{const re=`${z}_${q}`;Um===re?(E([]),k(void 0),Um=void 0):(E(R.filter(_ue(z,q))),k(q),Um=re)},[R]);I.useEffect(()=>r,[r]),I.useEffect(()=>{const z=j.current?m??Vhe(w.current):m;n({dateRange:z,filter:K},j.current),j.current=!1},[m,v]),I.useEffect(()=>{p&&w.current===((x==null?void 0:x.defaultInterval)??"last30Days")&&(w.current=p)},[p,x==null?void 0:x.defaultInterval]);const ie=()=>l?g.jsxs(Ho,{loading:!0,children:["This is going to take a while... :S",g.jsx(n6,{value:f,striped:f===100,className:"mt-3"})]}):s?g.jsx(Ho,{loading:!0}):c?g.jsx(zr,{type:"error",children:g.jsx(na,{errorData:d,fallbackMessage:"An error occurred while loading visits :("})}):qi(a)?g.jsx(Ho,{children:"There are no visits matching current filter"}):g.jsxs(g.Fragment,{children:[g.jsx(g6,{fill:!0,children:Object.values(fc).map(({title:z,icon:q,subPath:re},ae)=>g.jsxs(uf,{to:U(re),replace:!0,children:[g.jsx(Ne,{icon:q}),g.jsx("span",{className:"ms-2 d-none d-sm-inline",children:z})]},ae))}),g.jsx(gr,{children:g.jsxs(Ky,{children:[g.jsx(vt,{path:fc.byTime.subPath,element:g.jsx("div",{className:"col-12 mt-3",children:g.jsx(sbe,{title:"Visits during time",visits:R,highlightedVisits:S,highlightedLabel:O,setSelectedVisits:D})})}),g.jsx(vt,{path:fc.byContext.subPath,element:g.jsxs(g.Fragment,{children:[g.jsx("div",{className:Qe("mt-3 col-lg-6",{"col-xl-4":!o}),children:g.jsx(tR,{title:"Operating systems",stats:V})}),g.jsx("div",{className:Qe("mt-3 col-lg-6",{"col-xl-4":!o}),children:g.jsx(tR,{title:"Browsers",stats:W})}),g.jsx("div",{className:Qe("mt-3",{"col-xl-4":!o,"col-lg-6":o}),children:g.jsx($m,{title:"Referrers",stats:X,withPagination:!1,highlightedStats:Im(S,"referer"),highlightedLabel:O,sortingItems:{name:"Referrer name",amount:"Visits amount"},onClick:z=>H("referer",z)})}),o&&g.jsx("div",{className:"mt-3 col-lg-6",children:g.jsx($m,{title:"Visited URLs",stats:le,highlightedLabel:O,highlightedStats:Im(S,"visitedUrl"),sortingItems:{visitedUrl:"Visited URL",amount:"Visits amount"},onClick:z=>H("visitedUrl",z)})})]})}),g.jsx(vt,{path:fc.byLocation.subPath,element:g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"col-lg-6 mt-3",children:g.jsx($m,{title:"Countries",stats:G,highlightedStats:Im(S,"country"),highlightedLabel:O,sortingItems:{name:"Country name",amount:"Visits amount"},onClick:z=>H("country",z)})}),g.jsx("div",{className:"col-lg-6 mt-3",children:g.jsx($m,{title:"Cities",stats:Z,highlightedStats:Im(S,"city"),highlightedLabel:O,extraHeaderContent:z=>F.length>0&&g.jsx(Ibe,{modalTitle:"Cities",locations:F,activeCities:z}),sortingItems:{name:"City name",amount:"Visits amount"},onClick:z=>H("city",z)})})]})}),g.jsx(vt,{path:fc.list.subPath,element:g.jsx("div",{className:"col-12",children:g.jsx(Qbe,{visits:R,selectedVisits:S,setSelectedVisits:D,isOrphanVisits:o})})}),g.jsx(vt,{path:"*",element:g.jsx(NS,{replace:!0,to:U(fc.byTime.subPath)})})]})})]});return g.jsxs(g.Fragment,{children:[e,g.jsx("section",{className:"mt-3",children:g.jsxs("div",{className:"row flex-md-row-reverse",children:[g.jsx("div",{className:"col-lg-7 col-xl-6",children:g.jsxs("div",{className:"d-md-flex",children:[g.jsx("div",{className:"flex-fill",children:g.jsx(r$,{updatable:!0,disabled:s,initialDateRange:w.current,defaultText:"All visits",onDatesChange:_})}),g.jsx(Fbe,{className:"ms-0 ms-md-2 mt-3 mt-md-0",isOrphanVisits:o,selected:K,onChange:z=>y({visitsFilter:z})})]})}),a.length>0&&g.jsx("div",{className:"col-lg-5 col-xl-6 mt-3 mt-lg-0",children:g.jsxs("div",{className:"d-flex",children:[g.jsx(wF,{className:"btn-md-block",amount:R.length,onClick:()=>i(R)}),g.jsxs(yt,{outline:!0,disabled:S.length===0,className:"btn-md-block ms-2",onClick:()=>D([]),children:["Clear selection ",S.length>0&&g.jsxs(g.Fragment,{children:["(",wn(S.length),")"]})]})]})})]})}),g.jsx("section",{className:"mt-3",children:ie()})]})},nU=ws(({getDomainVisits:e,domainVisits:t,cancelGetDomainVisits:n})=>{const{ReportExporter:r}=Kt(nU),i=Yu(),{domain:o=""}=Rl(),[a,s=a]=o.split("_");return g.jsx(up,{getVisits:(l,c)=>e({domain:s,query:sp(l),doIntervalFallback:c}),cancelGetVisits:n,visitsInfo:t,exportCsv:l=>r.exportVisits(`domain_${a}_visits.csv`,l),children:g.jsx(lp,{goBack:i,visits:t.visits,title:`"${a}" visits`})})},()=>[pi.visits]),Xbe=Qt(nU,["ReportExporter"]),rU=ws(({getNonOrphanVisits:e,nonOrphanVisits:t,cancelGetNonOrphanVisits:n})=>{const{ReportExporter:r}=Kt(rU),i=Yu();return g.jsx(up,{getVisits:(o,a)=>e({query:sp(o),doIntervalFallback:a}),cancelGetVisits:n,visitsInfo:t,exportCsv:o=>r.exportVisits("non_orphan_visits.csv",o),children:g.jsx(lp,{title:"Non-orphan visits",goBack:i,visits:t.visits})})},()=>[pi.visits]),Jbe=Qt(rU,["ReportExporter"]),iU=ws(({getOrphanVisits:e,orphanVisits:t,cancelGetOrphanVisits:n})=>{const{ReportExporter:r}=Kt(iU),i=Yu();return g.jsx(up,{getVisits:(o,a)=>{var s;return e({query:sp(o),orphanVisitsType:(s=o.filter)==null?void 0:s.orphanVisitsType,doIntervalFallback:a})},cancelGetVisits:n,visitsInfo:t,exportCsv:o=>r.exportVisits("orphan_visits.csv",o),isOrphanVisits:!0,children:g.jsx(lp,{title:"Orphan visits",goBack:i,visits:t.visits})})},()=>[pi.orphanVisits]),e1e=Qt(iU,["ReportExporter"]),oU="shlink/orphanVisits",t1e={visits:[],loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},n1e=e=>np({typePrefix:`${oU}/getNonOrphanVisits`,createLoaders:({query:t={},doIntervalFallback:n=!1})=>{const r=e(),i=async(a,s)=>r.getNonOrphanVisits({...t,page:a,itemsPerPage:s}),o=rp(n,a=>r.getNonOrphanVisits(a));return[i,o]},getExtraFulfilledPayload:({query:t={}})=>({query:t}),shouldCancel:t=>t().orphanVisits.cancelLoad}),r1e=e=>ip({name:oU,initialState:t1e,asyncThunkCreator:e,filterCreatedVisits:({query:t={}},n)=>{const{startDate:r,endDate:i}=t;return n.filter(({visit:o})=>Jh(o.date,r,i))}}),aU="shlink/orphanVisits",i1e={visits:[],loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},o1e=(e,t)=>!t||t===e.type,a1e=e=>np({typePrefix:`${aU}/getOrphanVisits`,createLoaders:({orphanVisitsType:t,query:n={},doIntervalFallback:r=!1})=>{const i=e(),o=async(s,l)=>i.getOrphanVisits({...n,page:s,itemsPerPage:l}).then(c=>{const d=c.data.filter(f=>QT(f)&&o1e(f,t));return{...c,data:d}}),a=rp(r,s=>i.getOrphanVisits(s));return[o,a]},getExtraFulfilledPayload:({query:t={}})=>({query:t}),shouldCancel:t=>t().orphanVisits.cancelLoad}),s1e=e=>ip({name:aU,initialState:i1e,asyncThunkCreator:e,filterCreatedVisits:({query:t={}},n)=>{const{startDate:r,endDate:i}=t;return n.filter(({visit:o,shortUrl:a})=>!a&&Jh(o.date,r,i))}}),sU="shlink/shortUrlVisits",l1e={visits:[],shortCode:"",domain:void 0,loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},c1e=e=>np({typePrefix:`${sU}/getShortUrlVisits`,createLoaders:({shortCode:t,query:n={},doIntervalFallback:r=!1})=>{const i=e(),o=async(s,l)=>i.getShortUrlVisits(t,{...n,page:s,itemsPerPage:l}),a=rp(r,async s=>i.getShortUrlVisits(t,{...s,domain:n.domain}));return[o,a]},getExtraFulfilledPayload:({shortCode:t,query:n={}})=>({shortCode:t,query:n,domain:n.domain}),shouldCancel:t=>t().shortUrlVisits.cancelLoad}),u1e=e=>ip({name:sU,initialState:l1e,asyncThunkCreator:e,filterCreatedVisits:({shortCode:t,domain:n,query:r={}},i)=>{const{startDate:o,endDate:a}=r;return i.filter(({shortUrl:s,visit:l})=>s&&xf(s,t,n)&&Jh(l.date,o,a))}}),lU="shlink/tagVisits",d1e={visits:[],tag:"",loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},f1e=e=>np({typePrefix:`${lU}/getTagVisits`,createLoaders:({tag:t,query:n={},doIntervalFallback:r=!1})=>{const i=e(),o=async(s,l)=>i.getTagVisits(t,{...n,page:s,itemsPerPage:l}),a=rp(r,async s=>i.getTagVisits(t,s));return[o,a]},getExtraFulfilledPayload:({tag:t,query:n={}})=>({tag:t,query:n}),shouldCancel:t=>t().tagVisits.cancelLoad}),h1e=e=>ip({name:lU,initialState:d1e,asyncThunkCreator:e,filterCreatedVisits:({tag:t,query:n={}},r)=>{const{startDate:i,endDate:o}=n;return r.filter(({shortUrl:a,visit:s})=>(a==null?void 0:a.tags.includes(t))&&Jh(s.date,i,o))}}),cU="shlink/visitsOverview",Bm={nonOrphanVisits:{total:0},orphanVisits:{total:0},loading:!1,error:!1},uR=e=>e.filter(({visit:t})=>t.potentialBot).length,p1e=e=>Nr(`${cU}/loadVisitsOverview`,()=>e().getVisitsOverview().then(({nonOrphanVisits:t,visitsCount:n,orphanVisits:r,orphanVisitsCount:i})=>({nonOrphanVisits:{total:(t==null?void 0:t.total)??n,nonBots:t==null?void 0:t.nonBots,bots:t==null?void 0:t.bots},orphanVisits:{total:(r==null?void 0:r.total)??i,nonBots:r==null?void 0:r.nonBots,bots:r==null?void 0:r.bots}}))),m1e=e=>lr({name:cU,initialState:Bm,reducers:{},extraReducers:t=>{t.addCase(e.pending,()=>({...Bm,loading:!0})),t.addCase(e.rejected,()=>({...Bm,error:!0})),t.addCase(e.fulfilled,(n,{payload:r})=>({...Bm,...r})),t.addCase(tp,({nonOrphanVisits:n,orphanVisits:r,...i},{payload:o})=>{const{nonOrphanVisits:a,orphanVisits:s}=M_e(o.createdVisits),l=a.length,c=uR(a),d=l-c,f=s.length,p=uR(s),m=f-p;return{...i,nonOrphanVisits:{total:n.total+l,bots:n.bots&&n.bots+c,nonBots:n.nonBots&&n.nonBots+d},orphanVisits:{total:r.total+f,bots:r.bots&&r.bots+p,nonBots:r.nonBots&&r.nonBots+m}}})}}),g1e=({shortUrlDetail:e,shortUrlVisits:t,goBack:n})=>{const{shortUrl:r,loading:i}=e,{visits:o}=t,a=(r==null?void 0:r.shortUrl)??"",s=(r==null?void 0:r.longUrl)??"",l=r==null?void 0:r.title;return g.jsxs(lp,{title:g.jsxs(g.Fragment,{children:["Visits for ",g.jsx(Wo,{href:a})]}),goBack:n,visits:o,shortUrl:r,children:[g.jsx("hr",{}),g.jsxs("div",{children:["Created: ",(()=>r?g.jsxs("span",{children:[g.jsx("b",{id:"created",className:"short-url-visits-header__created-at",children:g.jsx(ry,{date:r.dateCreated,relative:!0})}),g.jsx(Rr,{placement:"bottom",target:"created",children:g.jsx(ry,{date:r.dateCreated})})]}):g.jsx("small",{children:"Loading..."}))()]}),g.jsxs("div",{className:"long-url-container",children:[`${l?"Title":"Long URL"}: `,i&&g.jsx("small",{children:"Loading..."}),!i&&g.jsx(Wo,{href:s,children:l??s})]})]})},uU=ws(({shortUrlVisits:e,shortUrlDetail:t,getShortUrlVisits:n,getShortUrlDetail:r,cancelGetShortUrlVisits:i})=>{const{ReportExporter:o}=Kt(uU),{shortCode:a=""}=Rl(),{search:s}=En(),l=Yu(),{domain:c}=zu(s),d=(p,m)=>n({shortCode:vg(a),query:{...sp(p),domain:c},doIntervalFallback:m}),f=p=>{var m;return o.exportVisits(`short-url_${(m=t.shortUrl)==null?void 0:m.shortUrl.replace(/https?:\/\//g,"")}_visits.csv`,p)};return I.useEffect(()=>{r({shortCode:vg(a),domain:c})},[c,r,a]),g.jsx(up,{getVisits:d,cancelGetVisits:i,visitsInfo:e,exportCsv:f,children:g.jsx(g1e,{shortUrlDetail:t,shortUrlVisits:e,goBack:l})})},e=>e.shortCode?[pi.shortUrlVisits(vg(e.shortCode))]:[]),v1e=Qt(uU,["ReportExporter"]),y1e=({tagVisits:e,goBack:t,colorGenerator:n})=>{const{visits:r,tag:i}=e;return g.jsx(lp,{title:g.jsxs("span",{className:"d-flex align-items-center justify-content-center",children:[g.jsx("span",{className:"me-2",children:"Visits for"}),g.jsx(jT,{text:i,colorGenerator:n})]}),goBack:t,visits:r})},dU=ws(({getTagVisits:e,tagVisits:t,cancelGetTagVisits:n})=>{const{ColorGenerator:r,ReportExporter:i}=Kt(dU),o=Yu(),{tag:a=""}=Rl();return g.jsx(up,{getVisits:(s,l)=>e({tag:a,query:sp(s),doIntervalFallback:l}),cancelGetVisits:n,visitsInfo:t,exportCsv:s=>i.exportVisits(`tag_${a}_visits.csv`,s),children:g.jsx(y1e,{tagVisits:t,goBack:o,colorGenerator:r})})},()=>[pi.visits]),_1e=Qt(dU,["ColorGenerator","ReportExporter"]),b1e=(e,t)=>{e.serviceFactory("MapModal",()=>Q$),e.factory("ShortUrlVisits",v1e),e.decorator("ShortUrlVisits",t(["shortUrlVisits","shortUrlDetail","mercureInfo"],["getShortUrlVisits","getShortUrlDetail","cancelGetShortUrlVisits","createNewVisits","loadMercureInfo"])),e.factory("TagVisits",_1e),e.decorator("TagVisits",t(["tagVisits","mercureInfo"],["getTagVisits","cancelGetTagVisits","createNewVisits","loadMercureInfo"])),e.factory("DomainVisits",Xbe),e.decorator("DomainVisits",t(["domainVisits","mercureInfo"],["getDomainVisits","cancelGetDomainVisits","createNewVisits","loadMercureInfo"])),e.factory("OrphanVisits",e1e),e.decorator("OrphanVisits",t(["orphanVisits","mercureInfo"],["getOrphanVisits","cancelGetOrphanVisits","createNewVisits","loadMercureInfo"])),e.factory("NonOrphanVisits",Jbe),e.decorator("NonOrphanVisits",t(["nonOrphanVisits","mercureInfo"],["getNonOrphanVisits","cancelGetNonOrphanVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("VisitsParser",()=>Ybe),e.serviceFactory("getShortUrlVisits",c1e,"apiClientFactory"),e.serviceFactory("cancelGetShortUrlVisits",mt("cancelGetVisits"),"shortUrlVisitsReducerCreator"),e.serviceFactory("getTagVisits",f1e,"apiClientFactory"),e.serviceFactory("cancelGetTagVisits",mt("cancelGetVisits"),"tagVisitsReducerCreator"),e.serviceFactory("getDomainVisits",Ghe,"apiClientFactory"),e.serviceFactory("cancelGetDomainVisits",mt("cancelGetVisits"),"domainVisitsReducerCreator"),e.serviceFactory("getOrphanVisits",a1e,"apiClientFactory"),e.serviceFactory("cancelGetOrphanVisits",mt("cancelGetVisits"),"orphanVisitsReducerCreator"),e.serviceFactory("getNonOrphanVisits",n1e,"apiClientFactory"),e.serviceFactory("cancelGetNonOrphanVisits",mt("cancelGetVisits"),"nonOrphanVisitsReducerCreator"),e.serviceFactory("createNewVisits",()=>tp),e.serviceFactory("loadVisitsOverview",p1e,"apiClientFactory"),e.serviceFactory("visitsOverviewReducerCreator",m1e,"loadVisitsOverview"),e.serviceFactory("visitsOverviewReducer",mt("reducer"),"visitsOverviewReducerCreator"),e.serviceFactory("domainVisitsReducerCreator",qhe,"getDomainVisits"),e.serviceFactory("domainVisitsReducer",mt("reducer"),"domainVisitsReducerCreator"),e.serviceFactory("nonOrphanVisitsReducerCreator",r1e,"getNonOrphanVisits"),e.serviceFactory("nonOrphanVisitsReducer",mt("reducer"),"nonOrphanVisitsReducerCreator"),e.serviceFactory("orphanVisitsReducerCreator",s1e,"getOrphanVisits"),e.serviceFactory("orphanVisitsReducer",mt("reducer"),"orphanVisitsReducerCreator"),e.serviceFactory("shortUrlVisitsReducerCreator",u1e,"getShortUrlVisits"),e.serviceFactory("shortUrlVisitsReducer",mt("reducer"),"shortUrlVisitsReducerCreator"),e.serviceFactory("tagVisitsReducerCreator",h1e,"getTagVisits"),e.serviceFactory("tagVisitsReducer",mt("reducer"),"tagVisitsReducerCreator")},Md=({children:e,to:t,className:n,...r})=>g.jsx(wD,{className:({isActive:i})=>Qe("aside-menu__item",n,{"aside-menu__item--selected":i}),to:t,...r,children:e}),w1e=({routePrefix:e,showOnMobile:t=!1})=>{const{pathname:n}=En(),r=Qe("aside-menu",{"aside-menu--hidden":!t}),i=o=>`${e}${o}`;return g.jsx("aside",{className:r,children:g.jsxs("nav",{className:"nav flex-column aside-menu__nav",children:[g.jsxs(Md,{to:i("/overview"),children:[g.jsx(Ne,{fixedWidth:!0,icon:rY}),g.jsx("span",{className:"aside-menu__item-text",children:"Overview"})]}),g.jsxs(Md,{to:i("/list-short-urls/1"),className:Qe({"aside-menu__item--selected":n.match("/list-short-urls")!==null}),children:[g.jsx(Ne,{fixedWidth:!0,icon:ID}),g.jsx("span",{className:"aside-menu__item-text",children:"List short URLs"})]}),g.jsxs(Md,{to:i("/create-short-url"),children:[g.jsx(Ne,{fixedWidth:!0,icon:lY,flip:"horizontal"}),g.jsx("span",{className:"aside-menu__item-text",children:"Create short URL"})]}),g.jsxs(Md,{to:i("/manage-tags"),children:[g.jsx(Ne,{fixedWidth:!0,icon:FD}),g.jsx("span",{className:"aside-menu__item-text",children:"Manage tags"})]}),g.jsxs(Md,{to:i("/manage-domains"),children:[g.jsx(Ne,{fixedWidth:!0,icon:IW}),g.jsx("span",{className:"aside-menu__item-text",children:"Manage domains"})]})]})})},fU=({createNotFound:e})=>{const{TagsList:t,ShortUrlsList:n,CreateShortUrl:r,ShortUrlVisits:i,TagVisits:o,DomainVisits:a,OrphanVisits:s,NonOrphanVisits:l,Overview:c,EditShortUrl:d,ManageDomains:f}=Kt(fU),p=En(),m=Fl(),[v,y,x,_]=Sn();I.useEffect(()=>_(),[p,_]);const w=Xh("domainVisits"),S=Qe("shlink-layout__burger-icon",{"shlink-layout__burger-icon--active":v}),E=lpe(x,_);return g.jsxs(g.Fragment,{children:[g.jsx(Ne,{icon:MW,className:S,onClick:y}),g.jsx("div",{...E,className:"shlink-layout__swipeable",children:g.jsxs("div",{className:"shlink-layout__swipeable-inner",children:[g.jsx(w1e,{routePrefix:m,showOnMobile:v}),g.jsx("div",{className:"shlink-layout__container",onPointerDown:()=>_(),children:g.jsx("div",{className:"container-xl",children:g.jsxs(Ky,{children:[g.jsx(vt,{index:!0,element:g.jsx(NS,{replace:!0,to:"overview"})}),g.jsx(vt,{path:"/overview",element:g.jsx(c,{})}),g.jsx(vt,{path:"/list-short-urls/:page",element:g.jsx(n,{})}),g.jsx(vt,{path:"/create-short-url",element:g.jsx(r,{})}),g.jsx(vt,{path:"/short-code/:shortCode/visits/*",element:g.jsx(i,{})}),g.jsx(vt,{path:"/short-code/:shortCode/edit",element:g.jsx(d,{})}),g.jsx(vt,{path:"/tag/:tag/visits/*",element:g.jsx(o,{})}),w&&g.jsx(vt,{path:"/domain/:domain/visits/*",element:g.jsx(a,{})}),g.jsx(vt,{path:"/orphan-visits/*",element:g.jsx(s,{})}),g.jsx(vt,{path:"/non-orphan-visits/*",element:g.jsx(l,{})}),g.jsx(vt,{path:"/manage-tags",element:g.jsx(t,{})}),g.jsx(vt,{path:"/manage-domains",element:g.jsx(f,{})}),e&&g.jsx(vt,{path:"*",element:e("/list-short-urls/1")})]})})})]})})]})},x1e=Qt(fU,["TagsList","ShortUrlsList","CreateShortUrl","ShortUrlVisits","TagVisits","DomainVisits","OrphanVisits","NonOrphanVisits","Overview","EditShortUrl","ManageDomains"]),S1e=!0,E1e=e=>G6({devTools:!S1e,reducer:AE({mercureInfo:e.mercureInfoReducer,shortUrlsList:e.shortUrlsListReducer,shortUrlCreation:e.shortUrlCreationReducer,shortUrlDeletion:e.shortUrlDeletionReducer,shortUrlEdition:e.shortUrlEditionReducer,shortUrlDetail:e.shortUrlDetailReducer,shortUrlVisits:e.shortUrlVisitsReducer,tagVisits:e.tagVisitsReducer,domainVisits:e.domainVisitsReducer,orphanVisits:e.orphanVisitsReducer,nonOrphanVisits:e.nonOrphanVisitsReducer,tagsList:e.tagsListReducer,tagDelete:e.tagDeleteReducer,tagEdit:e.tagEditReducer,domainsList:e.domainsListReducer,visitsOverview:e.visitsOverviewReducer}),middleware:t=>t({immutableCheck:!1,serializableCheck:!1})}),T1e=e=>{e.factory("Main",x1e),e.factory("store",E1e)},To=new Ule,{container:O1e}=To,C1e=(e,t)=>(...n)=>e[t](...n),k1e=(e,t)=>({...e,[t]:C1e(O1e,t)}),dp=(e,t=[])=>cD(e?w8(e):null,t.reduce(k1e,{}));T1e(To);Yve(To,dp);f0e(To,dp);b1e(To,dp);wpe(To);ype(To,dp);Ape(To,dp);L_e(To);let dR;const P1e=e=>({serverVersion:t,apiClient:n,settings:r,routesPrefix:i="",createNotFound:o,tagColorsStorage:a})=>{const s=Fue(t),l=I.useRef(),[c,d]=I.useState(),f=Nl(),[p,m]=I.useMemo(()=>f?[I.Fragment,{}]:[bD,{basename:i}],[f,i]);return I.useEffect(()=>{dR=n,e.value("apiClientFactory",()=>dR),a&&e.value("TagColorsStorage",a);const{container:v}=e,{Main:y,store:x,loadMercureInfo:_,listTags:w}=v;l.current=g.jsx(y,{createNotFound:o}),d(x),x.dispatch(_(r)),x.dispatch(w())},[n,o,r,a]),c?g.jsx(uD,{store:c,children:g.jsx(Npe,{value:r,children:g.jsx($ue,{value:s,children:g.jsx(Uue,{value:i,children:g.jsx(p,{...m,children:l.current})})})})}):g.jsx(g.Fragment,{})},L1e="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=",j1e="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==",M1e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC",N1e=()=>{delete lR.Icon.Default.prototype._getIconUrl,lR.Icon.Default.mergeOptions({iconRetinaUrl:j1e,iconUrl:L1e,shadowUrl:M1e})};N1e();const R1e=P1e(To);function cy(e){return t=>{const{resetSelectedServer:n}=t;return I.useEffect(()=>{n()},[n]),g.jsx(e,{...t})}}let A1e=class extends I.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t){const{console:n=globalThis.console}=this.props;n.error(t)}render(){const{hasError:t}=this.state,{location:n=globalThis.location}=this.props;if(t)return g.jsx("div",{className:"home",children:g.jsxs(mn,{className:"p-4",children:[g.jsx("h1",{children:"Oops! This is awkward :S"}),g.jsx("p",{children:"It seems that something went wrong. Try refreshing the page or just click this button."}),g.jsx("br",{}),g.jsx(yt,{outline:!0,color:"primary",onClick:()=>n.reload(),children:"Take me back"})]})});const{children:r}=this.props;return r}};const hU=({href:e,children:t,rel:n,...r})=>g.jsx("a",{target:"_blank",rel:`noopener noreferrer${n?` ${n}`:""}`,href:e,...r,children:t??e}),D1e=({id:e,name:t})=>g.jsxs(l6,{tag:It,to:`/server/${e}`,className:"servers-list__server-item",children:[t,g.jsx(Ne,{icon:hY,className:"servers-list__server-item-icon"})]}),pU=({servers:e,children:t,embedded:n=!1})=>g.jsxs(g.Fragment,{children:[t&&g.jsx("div",{"data-testid":"title",className:"mb-0 fs-5 fw-normal lh-sm",children:t}),e.length>0&&g.jsx(o6,{"data-testid":"list",tag:"div",className:Vu("servers-list__list-group",{"servers-list__list-group--embedded":n}),children:e.map(({id:r,name:i})=>g.jsx(D1e,{id:r,name:i},r))})]}),mU=({color:e=bE,className:t})=>g.jsx("svg",{className:t,viewBox:"0 0 512 512",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:g.jsxs("g",{fill:e,children:[g.jsx("path",{d:" M 23.71 85.08 C 17.22 49.81 49.44 14.86 85.08 18.12 C 118.83 19.21 145.72 53.33 139.45 86.37 C 155.64 102.30 171.32 118.83 187.87 134.36 C 198.32 111.73 208.84 89.12 219.57 66.62 C 226.05 53.84 243.47 48.74 255.73 56.27 C 263.76 62.10 270.34 69.69 277.25 76.75 C 286.28 86.61 285.72 102.89 276.31 112.31 C 223.38 165.37 170.38 218.37 117.35 271.34 C 107.72 280.99 91.01 281.25 81.11 271.86 C 74.39 264.94 66.82 258.69 61.24 250.77 C 53.72 238.52 58.85 221.07 71.64 214.62 C 94.11 203.87 116.72 193.38 139.33 182.91 C 123.81 166.36 107.30 150.68 91.37 134.49 C 60.20 140.28 27.37 116.78 23.71 85.08 Z"}),g.jsx("path",{d:" M 205.21 201.23 C 225.32 181.36 260.88 181.11 281.14 200.86 C 299.25 218.75 317.37 236.65 335.10 254.93 C 356.73 278.01 352.01 318.70 326.03 336.56 C 320.07 330.47 313.73 324.65 308.12 318.28 C 323.86 309.39 328.76 286.18 316.63 272.39 C 301.73 256.95 286.30 242.03 271.24 226.75 C 264.49 219.65 256.80 212.00 246.37 211.52 C 224.65 208.64 205.52 233.36 214.49 253.58 C 221.09 266.81 234.22 275.12 243.62 286.24 C 240.43 295.96 238.09 306.13 238.29 316.46 C 225.55 304.29 213.16 291.73 200.89 279.09 C 180.97 257.57 183.10 220.45 205.21 201.23 Z"}),g.jsx("path",{d:" M 273.90 352.07 C 252.28 328.99 256.98 288.31 282.96 270.46 C 288.93 276.54 295.26 282.36 300.88 288.72 C 285.14 297.62 280.23 320.82 292.38 334.61 C 307.27 350.05 322.70 364.96 337.75 380.25 C 344.51 387.35 352.20 395.00 362.64 395.48 C 384.35 398.37 403.49 373.64 394.51 353.42 C 387.92 340.18 374.78 331.88 365.38 320.76 C 368.56 311.04 370.91 300.86 370.71 290.54 C 383.45 302.70 395.84 315.27 408.11 327.91 C 428.03 349.43 425.90 386.55 403.78 405.77 C 383.68 425.64 348.13 425.89 327.86 406.14 C 309.75 388.25 291.60 370.37 273.90 352.07 Z"}),g.jsx("path",{d:" M 422.11 403.83 C 431.96 394.07 441.60 384.06 451.66 374.51 C 460.90 383.74 471.89 392.70 474.89 406.11 C 480.16 429.97 484.08 454.13 488.76 478.12 C 490.00 483.41 484.47 488.29 479.35 486.63 C 454.66 481.52 429.55 478.12 405.14 471.84 C 393.17 467.97 385.20 457.75 376.55 449.27 C 386.39 439.49 396.13 429.60 406.06 419.91 C 416.37 433.45 435.74 414.00 422.11 403.83 Z"})]})}),I1e=({servers:e})=>{const t=So(),n=Object.values(e),r=n.length>0;return I.useEffect(()=>{const i=n.find(({autoConnect:o})=>o);i&&t(`/server/${i.id}`)},[n,t]),g.jsx("div",{className:"home",children:g.jsx(Gr,{className:"home__main-card",children:g.jsxs(gr,{className:"g-0",children:[g.jsx("div",{className:"col-md-5 d-none d-md-block",children:g.jsx("div",{className:"home__logo-wrapper",children:g.jsx("div",{className:"home__logo",children:g.jsx(mU,{})})})}),g.jsxs("div",{className:"col-md-7 home__servers-container",children:[g.jsx("div",{className:"home__title-wrapper",children:g.jsx("h1",{className:"home__title",children:"Welcome!"})}),g.jsx(pU,{embedded:!0,servers:n,children:!r&&g.jsxs("div",{className:"p-4 text-center",children:[g.jsx("p",{className:"mb-5",children:"This application will help you manage your Shlink servers."}),g.jsx("p",{children:g.jsxs(It,{to:"/server/create",className:"btn btn-outline-primary btn-lg me-2",children:[g.jsx(Ne,{icon:zS})," ",g.jsx("span",{className:"ms-1",children:"Add a server"})]})}),g.jsx("p",{className:"mb-0 mt-5",children:g.jsx(hU,{href:"https://shlink.io/documentation",children:g.jsxs("small",{children:[g.jsx("span",{className:"me-1",children:"Learn more about Shlink"})," ",g.jsx(Ne,{icon:qW})]})})})]})})]})]})})})},gU=()=>{const{ServersDropdown:e}=Ei(gU),[t,n,,r]=Sn(),i=En(),{pathname:o}=i;I.useEffect(r,[i,r]);const a="/settings",s=Vu("main-header__toggle-icon",{"main-header__toggle-icon--opened":t});return g.jsxs(TI,{color:"primary",dark:!0,fixed:"top",className:"main-header",expand:"md",children:[g.jsxs(OI,{tag:It,to:"/",children:[g.jsx(mU,{className:"main-header__brand-logo",color:"white"})," Shlink"]}),g.jsx(CI,{onClick:n,children:g.jsx(Ne,{icon:dY,className:s})}),g.jsx(uQ,{navbar:!0,isOpen:t,children:g.jsxs(iE,{navbar:!0,className:"ms-auto",children:[g.jsx(oE,{children:g.jsxs(LI,{tag:It,to:a,active:o.startsWith(a),children:[g.jsx(Ne,{icon:vY}),"  Settings"]})}),g.jsx(e,{})]})})]})},F1e=Ti(gU,["ServersDropdown"]),$1e=({children:e})=>{const t=En();return I.useEffect(()=>{scrollTo(0,0)},[t]),g.jsx(g.Fragment,{children:e})},Wb=e=>!!e&&typeof e=="object"&&!Array.isArray(e),vU=(e,t)=>{const n={};return(...r)=>{const i=e(...r);if(n[i])return n[i];const o=t(...r);return n[i]=o,o}},yU=(e,t)=>{const n={...e};return!Wb(e)||!Wb(t)||Object.keys(t).forEach(r=>{Wb(t[r])?n[r]=r in e?yU(e[r],t[r]):{...t[r]}:n[r]=t[r]}),n},U1e=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,fR=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(U1e);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},hR=e=>e==="*"||e==="x"||e==="X",pR=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},B1e=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],z1e=(e,t)=>{if(hR(e)||hR(t))return 0;const[n,r]=B1e(pR(e),pR(t));return n>r?1:n{for(let n=0;n{const n=fR(e),r=fR(t),i=n.pop(),o=r.pop(),a=mR(n,r);return a!==0?a:i&&o?mR(i.split("."),o.split(".")):i||o?i?-1:1:0},H1e=(e,t,n)=>{W1e(n);const r=V1e(e,t);return _U[n].includes(r)},_U={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},gR=Object.keys(_U),W1e=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(gR.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${gR.join("|")}`)},bU=vU(e=>e,e=>{try{return H1e(e,e,"=")}catch{return!1}}),wU=e=>bU(e)?`v${e}`:e,xU=(e,t="latest")=>bU(e)?e:t,Y1e="%_VERSION_%",G1e=e=>wU(xU(e)),vR=({project:e,version:t})=>g.jsx(hU,{href:`https://github.com/shlinkio/${e}/releases/${t}`,className:"text-muted",children:g.jsx("b",{children:t})}),q1e=({selectedServer:e,clientVersion:t=Y1e})=>{const n=G1e(t);return g.jsxs("small",{className:"text-muted",children:[AD(e)&&g.jsxs(g.Fragment,{children:["Server: ",g.jsx(vR,{project:"shlink",version:e.printableVersion})," - "]}),"Client: ",g.jsx(vR,{project:"shlink-web-client",version:n})]})},Z1e=/^\/server\/[a-zA-Z0-9-]*\/(?!edit)/,K1e=({selectedServer:e})=>{const{pathname:t}=En(),n=I.useMemo(()=>Z1e.test(t),[t]),r=Vu("text-center",{"shlink-versions-container--with-sidebar":n});return g.jsx("div",{className:r,children:g.jsx(q1e,{selectedServer:e})})},Zu=({children:e})=>g.jsx("div",{className:"no-menu-wrapper container-xl",children:e});function SU(e){const t=n=>{const{ServerError:r}=Ei(t),i=Rl(),{selectServer:o,selectedServer:a}=n;return I.useEffect(()=>{i.serverId&&o(i.serverId)},[i.serverId,o]),a?_W(a)?g.jsx(r,{}):g.jsx(e,{...n}):g.jsx(Zu,{children:g.jsx(Ho,{loading:!0})})};return t}const EU=SU(({selectedServer:e,settings:t})=>{const{buildShlinkApiClient:n,TagColorsStorage:r,ShlinkWebComponent:i,ServerError:o}=Ei(EU),a=AD(e),s=a?`/server/${e.id}`:"";return a?g.jsx(i,{serverVersion:e.version,apiClient:n(e),settings:t,routesPrefix:s,tagColorsStorage:r,createNotFound:l=>g.jsx(D6,{to:`${s}${l}`,children:"List short URLs"})}):g.jsx(o,{})}),Q1e=Ti(EU,["buildShlinkApiClient","TagColorsStorage","ShlinkWebComponent","ServerError"]),X1e=(e,t)=>{e.constant("window",window),e.constant("console",console),e.constant("fetch",window.fetch.bind(window)),e.service("HttpClient",are,"fetch"),e.serviceFactory("ScrollToTop",()=>$1e),e.factory("MainHeader",F1e),e.serviceFactory("Home",()=>I1e),e.decorator("Home",cy),e.decorator("Home",t(["servers"],["resetSelectedServer"])),e.serviceFactory("ShlinkWebComponent",()=>R1e),e.factory("ShlinkWebComponentContainer",Q1e),e.decorator("ShlinkWebComponentContainer",t(["selectedServer","settings"],["selectServer"])),e.serviceFactory("ShlinkVersionsContainer",()=>K1e),e.decorator("ShlinkVersionsContainer",t(["selectedServer"])),e.serviceFactory("ErrorHandler",()=>A1e)};let zm;const J1e=new Uint8Array(16);function ewe(){if(!zm&&(zm=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!zm))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return zm(J1e)}const Gn=[];for(let e=0;e<256;++e)Gn.push((e+256).toString(16).slice(1));function twe(e,t=0){return Gn[e[t+0]]+Gn[e[t+1]]+Gn[e[t+2]]+Gn[e[t+3]]+"-"+Gn[e[t+4]]+Gn[e[t+5]]+"-"+Gn[e[t+6]]+Gn[e[t+7]]+"-"+Gn[e[t+8]]+Gn[e[t+9]]+"-"+Gn[e[t+10]]+Gn[e[t+11]]+Gn[e[t+12]]+Gn[e[t+13]]+Gn[e[t+14]]+Gn[e[t+15]]}const nwe=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),yR={randomUUID:nwe};function TU(e,t,n){if(yR.randomUUID&&!t&&!e)return yR.randomUUID();e=e||{};const r=e.random||(e.rng||ewe)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return twe(r)}const OU=()=>{const e=So();return I.useCallback(()=>e(-1),[e])},rwe=()=>{const{search:e}=En();return I.useMemo(()=>zu(e),[e])},CU=({isOpen:e,duplicatedServers:t,onDiscard:n,onSave:r})=>{const i=t.length>1;return g.jsxs(ua,{centered:!0,isOpen:e,children:[g.jsxs(da,{children:["Duplicated server",i&&"s"]}),g.jsxs(Eo,{children:[g.jsx("p",{children:i?"The next servers already exist:":"There is already a server with:"}),g.jsx("ul",{children:t.map(({url:o,apiKey:a},s)=>i?g.jsxs("li",{children:[g.jsx("b",{children:o})," - ",g.jsx("b",{children:a})]},s):g.jsxs(I.Fragment,{children:[g.jsxs("li",{children:["URL: ",g.jsx("b",{children:o})]}),g.jsxs("li",{children:["API key: ",g.jsx("b",{children:a})]})]},s))}),g.jsxs("span",{children:[i?"Do you want to ignore duplicated servers":"Do you want to save this server anyway","?"]})]}),g.jsxs(Al,{children:[g.jsx(yt,{color:"link",onClick:n,children:i?"Ignore duplicates":"Discard"}),g.jsx(yt,{color:"primary",onClick:r,children:"Save anyway"})]})]})},iwe=e=>t=>{t.preventDefault(),e()},kU=({onSubmit:e,initialValues:t,children:n,title:r})=>{const[i,o]=I.useState(""),[a,s]=I.useState(""),[l,c]=I.useState(""),d=iwe(()=>e({name:i,url:a,apiKey:l}));return I.useEffect(()=>{t&&o(t.name),t&&s(t.url),t&&c(t.apiKey)},[t]),g.jsxs("form",{className:"server-form",name:"serverForm",onSubmit:d,children:[g.jsxs(mn,{className:"mb-3",title:r,children:[g.jsx(ag,{value:i,onChange:o,children:"Name"}),g.jsx(ag,{type:"url",value:a,onChange:s,children:"URL"}),g.jsx(ag,{value:l,onChange:c,children:"API key"})]}),g.jsx("div",{className:"text-end",children:n})]})},_R=4e3,bR=({type:e})=>g.jsx("div",{className:"mt-3",children:g.jsxs(zr,{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."]})}),PU=({servers:e,createServers:t})=>{const{ImportServersBtn:n,useTimeoutToggle:r}=Ei(PU),i=So(),o=OU(),a=!!Object.keys(e).length,[s,l]=r(!1,_R),[c,d]=r(!1,_R),[f,p]=Sn(),[m,v]=I.useState(),y=I.useCallback(x=>{const _=TU();t([{...x,id:_}]),i(`/server/${_}`)},[t,i]);return I.useEffect(()=>{if(!m)return;Object.values(e).some(({url:_,apiKey:w})=>(m==null?void 0:m.url)===_&&(m==null?void 0:m.apiKey)===w)?p():y(m)},[y,m,e,p]),g.jsxs(Zu,{children:[g.jsxs(kU,{title:g.jsx("h5",{className:"mb-0",children:"Add new server"}),onSubmit:v,children:[!a&&g.jsx(n,{tooltipPlacement:"top",onImport:l,onImportError:d}),a&&g.jsx(yt,{outline:!0,onClick:o,children:"Cancel"}),g.jsx(yt,{outline:!0,color:"primary",className:"ms-2",children:"Create server"})]}),s&&g.jsx(bR,{type:"success"}),c&&g.jsx(bR,{type:"error"}),g.jsx(CU,{isOpen:f,duplicatedServers:m?[m]:[],onDiscard:o,onSave:()=>m&&y(m)})]})},owe=Ti(PU,["ImportServersBtn","useTimeoutToggle"]),LU=({server:e,className:t,children:n,textClassName:r})=>{const{DeleteServerModal:i}=Ei(LU),[o,,a,s]=Sn();return g.jsxs(g.Fragment,{children:[g.jsxs("button",{type:"button",className:Vu(t,"p-0 bg-transparent border-0"),onClick:a,children:[!n&&g.jsx(Ne,{fixedWidth:!0,icon:FS}),g.jsx("span",{className:r,children:n??"Remove this server"})]}),g.jsx(i,{server:e,isOpen:o,toggle:s})]})},awe=Ti(LU,["DeleteServerModal"]),swe=({server:e,toggle:t,isOpen:n,deleteServer:r,redirectHome:i=!0})=>{const o=So(),a=I.useRef(!1),s=()=>{a.current=!0,t()},l=()=>{a.current&&(r(e),i&&o("/"))};return g.jsxs(ua,{isOpen:n,toggle:t,centered:!0,onClosed:l,children:[g.jsx(da,{toggle:t,className:"text-danger",children:"Remove server"}),g.jsxs(Eo,{children:[g.jsxs("p",{children:["Are you sure you want to remove ",g.jsx("b",{children:e?e.name:""}),"?"]}),g.jsx("p",{children:g.jsx("i",{children:"No data will be deleted, only the access to this server will be removed from this device. You can create it again at any moment."})})]}),g.jsxs(Al,{children:[g.jsx(yt,{color:"link",onClick:t,children:"Cancel"}),g.jsx(yt,{color:"danger",onClick:s,children:"Delete"})]})]})},lwe=SU(({editServer:e,selectedServer:t,selectServer:n})=>{const r=OU(),{reconnect:i}=rwe();if(!rf(t))return null;const o=a=>{e(t.id,a),i==="true"&&n(t.id),r()};return g.jsx(Zu,{children:g.jsxs(kU,{title:g.jsxs("h5",{className:"mb-0",children:['Edit "',t.name,'"']}),initialValues:t,onSubmit:o,children:[g.jsx(yt,{outline:!0,className:"me-2",onClick:r,children:"Cancel"}),g.jsx(yt,{outline:!0,color:"primary",children:"Save"})]})})}),cwe=Ti(lwe,["ServerError"]),wR=(e,{url:t,apiKey:n})=>e.some(r=>r.url===t&&r.apiKey===n),jU=({createServers:e,servers:t,children:n,onImport:r=()=>{},onImportError:i=()=>{},tooltipPlacement:o="bottom",className:a=""})=>{const{ServersImporter:s}=Ei(jU),l=ys(),[c,d]=I.useState([]),[f,,p,m]=Sn(),v=I.useRef([]),y=I.useCallback(S=>{e(S),r()},[e,r]),x=I.useCallback(async({target:S})=>{var E;return s.importServersFromFile((E=S.files)==null?void 0:E[0]).then(O=>{v.current=O;const k=Object.values(t),j=O.filter(U=>wR(k,U)),A=!!j.length;A?d(j):y(O),A&&p()}).then(()=>{S.value=null}).catch(i)},[y,i,t,s,p]),_=I.useCallback(()=>{y(v.current),m()},[y,m,v]),w=I.useCallback(()=>{y(v.current.filter(S=>!wR(c,S))),m()},[y,c,m]);return g.jsxs(g.Fragment,{children:[g.jsxs(yt,{outline:!0,id:"importBtn",className:a,onClick:()=>{var S;return(S=l.current)==null?void 0:S.click()},children:[g.jsx(Ne,{icon:UW,fixedWidth:!0})," ",n??"Import from file"]}),g.jsxs(Rr,{placement:o,target:"importBtn",children:["You can create servers by importing a CSV file with ",g.jsx("b",{children:"name"}),", ",g.jsx("b",{children:"apiKey"})," and ",g.jsx("b",{children:"url"})," columns."]}),g.jsx("input",{type:"file",accept:"text/csv",className:"d-none",ref:l,onChange:x,"aria-hidden":!0}),g.jsx(CU,{isOpen:f,duplicatedServers:c,onDiscard:w,onSave:_})]})},uwe=Ti(jU,["ServersImporter"]),MU=({servers:e,selectedServer:t})=>{const{DeleteServerButton:n}=Ei(MU);return g.jsx(Zu,{children:g.jsxs("div",{className:"server-error__container flex-column",children:[g.jsxs(Ho,{className:"w-100 mb-3 mb-md-5",type:"error",fullWidth:!0,children:[!rf(t)&&"Could not find this Shlink server.",rf(t)&&g.jsxs(g.Fragment,{children:[g.jsx("p",{children:"Oops! Could not connect to this Shlink server."}),"Make sure you have internet connection, and the server is properly configured and on-line."]})]}),g.jsx(pU,{servers:Object.values(e),children:g.jsxs("p",{className:"mb-md-3",children:["These are the Shlink servers currently configured. Choose one of them or ",g.jsx(It,{to:"/server/create",children:"add a new one"}),"."]})}),rf(t)&&g.jsx("div",{className:"container mt-3 mt-md-5",children:g.jsxs("p",{className:"fs-5 fw-normal lh-sm",children:["Alternatively, if you think you may have miss-configured this server, you can ",g.jsx(n,{server:t,className:"server-error__delete-btn",children:"remove it"})," or ",g.jsx(It,{to:`/server/${t.id}/edit?reconnect=true`,children:"edit it"}),"."]})})]})})},dwe=Ti(MU,["DeleteServerButton"]),fwe=4e3,NU=({servers:e})=>{const{ServersExporter:t,ImportServersBtn:n,useTimeoutToggle:r,ManageServersRow:i}=Ei(NU),o=Object.values(e),[a,s]=I.useState(o),l=p=>s(o.filter(({name:m,url:v})=>`${m} ${v}`.toLowerCase().match(p.toLowerCase()))),c=a.some(({autoConnect:p})=>!!p),[d,f]=r(!1,fwe);return I.useEffect(()=>{s(Object.values(e))},[e]),g.jsxs(Zu,{children:[g.jsx(Hh,{className:"mb-3",onChange:l}),g.jsxs(gr,{className:"mb-3",children:[g.jsxs("div",{className:"col-md-6 d-flex d-md-block mb-2 mb-md-0",children:[g.jsx(n,{className:"flex-fill",onImportError:f,children:"Import servers"}),o.length>0&&g.jsxs(yt,{outline:!0,className:"ms-2 flex-fill",onClick:async()=>t.exportServers(),children:[g.jsx(Ne,{icon:UD,fixedWidth:!0})," Export servers"]})]}),g.jsx("div",{className:"col-md-6 text-md-end d-flex d-md-block",children:g.jsxs(yt,{outline:!0,color:"primary",className:"flex-fill",tag:It,to:"/server/create",children:[g.jsx(Ne,{icon:zS,fixedWidth:!0})," Add a server"]})})]}),g.jsx(mn,{children:g.jsxs("table",{className:"table table-hover responsive-table mb-0",children:[g.jsx("thead",{className:"responsive-table__header",children:g.jsxs("tr",{children:[c&&g.jsx("th",{style:{width:"50px"},children:g.jsx("span",{className:"sr-only",children:"Auto-connect"})}),g.jsx("th",{children:"Name"}),g.jsx("th",{children:"Base URL"}),g.jsx("th",{children:g.jsx("span",{className:"sr-only",children:"Options"})})]})}),g.jsxs("tbody",{children:[!a.length&&g.jsx("tr",{className:"text-center",children:g.jsx("td",{colSpan:4,children:"No servers found."})}),a.map(p=>g.jsx(i,{server:p,hasAutoConnect:c},p.id))]})]})}),d&&g.jsx("div",{className:"mt-3",children:g.jsx(zr,{type:"error",children:"The servers could not be imported. Make sure the format is correct."})})]})},hwe=Ti(NU,["ServersExporter","ImportServersBtn","useTimeoutToggle","ManageServersRow"]),RU=({server:e,hasAutoConnect:t})=>{const{ManageServersRowDropdown:n}=Ei(RU);return g.jsxs("tr",{className:"responsive-table__row",children:[t&&g.jsx("td",{className:"responsive-table__cell","data-th":"Auto-connect",children:e.autoConnect&&g.jsxs(g.Fragment,{children:[g.jsx(Ne,{icon:Yf,className:"text-primary",id:"autoConnectIcon"}),g.jsx(Rr,{target:"autoConnectIcon",placement:"right",children:"Auto-connect to this server"})]})}),g.jsx("th",{className:"responsive-table__cell","data-th":"Name",children:g.jsx(It,{to:`/server/${e.id}`,children:e.name})}),g.jsx("td",{className:"responsive-table__cell","data-th":"Base URL",children:e.url}),g.jsx("td",{className:"responsive-table__cell text-end",children:g.jsx(n,{server:e})})]})},pwe=Ti(RU,["ManageServersRowDropdown"]),AU=({server:e,setAutoConnect:t})=>{const{DeleteServerModal:n}=Ei(AU),[r,,i,o]=Sn(),a=`/server/${e.id}`,{autoConnect:s}=e,l=s?FW:dre;return g.jsxs(s0,{minWidth:170,children:[g.jsxs(Ue,{tag:It,to:a,children:[g.jsx(Ne,{icon:DW,fixedWidth:!0})," Connect"]}),g.jsxs(Ue,{tag:It,to:`${a}/edit`,children:[g.jsx(Ne,{icon:$S,fixedWidth:!0})," Edit server"]}),g.jsxs(Ue,{onClick:()=>t(e,!s),children:[g.jsx(Ne,{icon:l,fixedWidth:!0})," ",s?"Do not a":"A","uto-connect"]}),g.jsx(Ue,{divider:!0,tag:"hr"}),g.jsxs(Ue,{className:"dropdown-item--danger",onClick:i,children:[g.jsx(Ne,{icon:FS,fixedWidth:!0})," Remove server"]}),g.jsx(n,{redirectHome:!1,server:e,isOpen:r,toggle:o})]})},mwe=Ti(AU,["DeleteServerModal"]),DU=(e,t)=>Z6(e,t,{serializeError:n=>n}),gwe={},vwe=e=>"id"in e?e:{...e,id:TU()},ywe=e=>e.reduce((t,n)=>({...t,[n.id]:n}),{}),{actions:_we,reducer:bwe}=lr({name:"shlink/servers",initialState:gwe,reducers:{editServer:{prepare:(e,t)=>({payload:{serverId:e,serverData:t}}),reducer:(e,{payload:t})=>{const{serverId:n,serverData:r}=t;return e[n]?{...e,[n]:{...e[n],...r}}:e}},deleteServer:(e,{payload:t})=>{const{[t.id]:n,...r}=e;return r},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}])):{...e,[n]:{...e[n],autoConnect:r}}:e}},createServers:{prepare:e=>({payload:ywe(e.map(vwe))}),reducer:(e,{payload:t})=>({...e,...t})}}}),{editServer:wwe,deleteServer:xwe,setAutoConnect:Swe,createServers:IU}=_we,Ewe=bwe,Twe=e=>Array.isArray(e)?e.filter(RD):[],Owe=e=>DU("shlink/remoteServers/fetchServers",async(t,{dispatch:n})=>{const r=await e.jsonRequest(`${ev.homepage}/servers.json`),i=Twe(r);n(IU(i))}),iO="shlink/selectedServer",Cwe="1.0.0",kwe="999.999.999",Pwe="latest",Lwe=e=>xU(e===Pwe?kwe:e,Cwe),jwe=vU(e=>`${e.id}_${e.url}_${e.apiKey}`,async(e,t)=>t().then(({version:n})=>({version:Lwe(n),printableVersion:wU(n)}))),xR=null,oO=Rn(`${iO}/resetSelectedServer`),Mwe=e=>DU(`${iO}/selectServer`,async(t,{dispatch:n,getState:r})=>{n(oO());const{servers:i}=r(),o=i[t];if(!o)return{serverNotFound:!0};try{const a=e(o),{version:s,printableVersion:l}=await jwe(o,()=>a.health());return{...o,version:s,printableVersion:l}}catch{return{...o,serverNotReachable:!0}}}),Nwe=e=>lr({name:iO,initialState:xR,reducers:{},extraReducers:t=>{t.addCase(oO,()=>xR),t.addCase(e.fulfilled,(n,{payload:r})=>r)}}),Rwe=({servers:e,selectedServer:t})=>{const n=Object.values(e),r=()=>n.length===0?g.jsxs(Ue,{tag:It,to:"/server/create",children:[g.jsx(Ne,{icon:zS})," ",g.jsx("span",{className:"ms-1",children:"Add a server"})]}):g.jsxs(g.Fragment,{children:[n.map(({name:i,id:o})=>g.jsx(Ue,{tag:It,to:`/server/${o}`,active:bW(t)===o,children:i},o)),g.jsx(Ue,{divider:!0,tag:"hr"}),g.jsxs(Ue,{tag:It,to:"/manage-servers",children:[g.jsx(Ne,{icon:Ak})," ",g.jsx("span",{className:"ms-1",children:"Manage servers"})]})]});return g.jsxs(Vh,{nav:!0,inNavbar:!0,children:[g.jsxs(Fu,{nav:!0,caret:!0,children:[g.jsx(Ne,{icon:Ak})," ",g.jsx("span",{className:"ms-1",children:"Servers"})]}),g.jsx(Iu,{end:!0,style:{right:0},children:r()})]})},Awe=({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)},Dwe=(e,t,n)=>{const r=new Blob([t],{type:"text/csv;charset=utf-8;"}),i=URL.createObjectURL(r);Awe(e,i,n)},Iwe="shlink-servers.csv";class Fwe{constructor(t,n,r){Np(this,"exportServers",async()=>{const t=Object.values(this.storage.get("servers")??{}).map(wW);try{const n=this.jsonToCsv(t);Dwe(this.window,n,Iwe)}catch(n){console.error(n)}});this.storage=t,this.window=n,this.jsonToCsv=r}}const $we=e=>typeof e.url=="string"&&typeof e.apiKey=="string"&&typeof e.name=="string",Uwe=e=>Array.isArray(e)&&e.every($we);class Bwe{constructor(t){this.csvToJson=t}async importServersFromFile(t){if(!t)throw new Error("No file provided");const n=await t.text(),r=await this.csvToJson(n);if(!Uwe(r))throw new Error("Provided file does not have the right format.");return r}}const zwe=(e,t)=>{e.factory("ManageServers",hwe),e.decorator("ManageServers",cy),e.decorator("ManageServers",t(["selectedServer","servers"],["resetSelectedServer"])),e.factory("ManageServersRow",pwe),e.factory("ManageServersRowDropdown",mwe),e.decorator("ManageServersRowDropdown",t(null,["setAutoConnect"])),e.factory("CreateServer",owe),e.decorator("CreateServer",cy),e.decorator("CreateServer",t(["selectedServer","servers"],["createServers","resetSelectedServer"])),e.factory("EditServer",cwe),e.decorator("EditServer",t(["selectedServer"],["editServer","selectServer","resetSelectedServer"])),e.serviceFactory("ServersDropdown",()=>Rwe),e.decorator("ServersDropdown",t(["servers","selectedServer"])),e.serviceFactory("DeleteServerModal",()=>swe),e.decorator("DeleteServerModal",t(null,["deleteServer"])),e.factory("DeleteServerButton",awe),e.factory("ImportServersBtn",uwe),e.decorator("ImportServersBtn",t(["servers"],["createServers"])),e.factory("ServerError",dwe),e.decorator("ServerError",t(["servers","selectedServer"])),e.service("ServersImporter",Bwe,"csvToJson"),e.service("ServersExporter",Fwe,"Storage","window","jsonToCsv"),e.serviceFactory("selectServer",Mwe,"buildShlinkApiClient","loadMercureInfo"),e.serviceFactory("createServers",()=>IU),e.serviceFactory("deleteServer",()=>xwe),e.serviceFactory("editServer",()=>wwe),e.serviceFactory("setAutoConnect",()=>Swe),e.serviceFactory("fetchServers",Owe,"HttpClient"),e.serviceFactory("resetSelectedServer",()=>oO),e.serviceFactory("selectedServerReducerCreator",Nwe,"selectServer"),e.serviceFactory("selectedServerReducer",n=>n.reducer,"selectedServerReducerCreator")},Zc=({children:e})=>g.jsx("small",{className:"form-text text-muted d-block",children:e}),Vwe=e=>e?`${e}`:"",Hwe=({settings:e,toggleRealTimeUpdates:t,setRealTimeUpdatesInterval:n})=>{const{realTimeUpdates:r={enabled:!0}}=e,i=a0();return g.jsxs(mn,{title:"Real-time updates",className:"h-100",children:[g.jsx(Ur,{children:g.jsxs(pu,{checked:r.enabled,onChange:t,children:["Enable or disable real-time updates.",g.jsxs(Zc,{children:["Real-time updates are currently being ",g.jsx("b",{children:r.enabled?"processed":"ignored"}),"."]})]})}),g.jsxs(Uu,{noMargin:!0,label:"Real-time updates frequency (in minutes):",labelClassName:Vu("form-label",{"text-muted":!r.enabled}),id:i,children:[g.jsx(bl,{type:"number",min:0,placeholder:"Immediate",disabled:!r.enabled,value:Vwe(r.interval),id:i,onChange:({target:o})=>n(Number(o.value))}),r.enabled&&g.jsxs(Zc,{children:[r.interval!==void 0&&r.interval>0&&g.jsxs("span",{children:["Updates will be reflected in the UI every ",g.jsx("b",{children:r.interval})," minute",r.interval>1&&"s","."]}),!r.interval&&"Updates will be reflected in the UI as soon as they happen."]})]})]})},FU={field:"dateCreated",dir:"DESC"},Wwe={realTimeUpdates:{enabled:!0},shortUrlCreation:{validateUrls:!1},ui:{theme:"light"},visits:{defaultInterval:"last30Days"},shortUrlsList:{defaultOrdering:FU}},Ywe=(e,{payload:t})=>yU(e,t),As=e=>({reducer:Ywe,prepare:e}),Ds=e=>({payload:e}),{reducer:Gwe,actions:qwe}=lr({name:"shlink/settings",initialState:Wwe,reducers:{toggleRealTimeUpdates:As(e=>Ds({realTimeUpdates:{enabled:e}})),setRealTimeUpdatesInterval:As(e=>Ds({realTimeUpdates:{interval:e}})),setShortUrlCreationSettings:As(e=>Ds({shortUrlCreation:e})),setShortUrlsListSettings:As(e=>Ds({shortUrlsList:e})),setUiSettings:As(e=>Ds({ui:e})),setVisitsSettings:As(e=>Ds({visits:e})),setTagsSettings:As(e=>Ds({tags:e}))}}),{toggleRealTimeUpdates:Zwe,setRealTimeUpdatesInterval:Kwe,setShortUrlCreationSettings:Qwe,setShortUrlsListSettings:Xwe,setUiSettings:Jwe,setVisitsSettings:exe,setTagsSettings:txe}=qwe,nxe=Gwe,Yb=({items:e})=>g.jsx(g.Fragment,{children:e.map((t,n)=>g.jsx("div",{className:"mb-3",children:t},n))}),$U=()=>{const{RealTimeUpdatesSettings:e,ShortUrlCreationSettings:t,ShortUrlsListSettings:n,UserInterfaceSettings:r,VisitsSettings:i,TagsSettings:o}=Ei($U);return g.jsxs(Zu,{children:[g.jsxs(g6,{className:"mb-3",children:[g.jsx(uf,{to:"general",children:"General"}),g.jsx(uf,{to:"short-urls",children:"Short URLs"}),g.jsx(uf,{to:"other-items",children:"Other items"})]}),g.jsxs(Ky,{children:[g.jsx(vt,{path:"general",element:g.jsx(Yb,{items:[g.jsx(r,{}),g.jsx(e,{})]})}),g.jsx(vt,{path:"short-urls",element:g.jsx(Yb,{items:[g.jsx(t,{}),g.jsx(n,{})]})}),g.jsx(vt,{path:"other-items",element:g.jsx(Yb,{items:[g.jsx(o,{}),g.jsx(i,{})]})}),g.jsx(vt,{path:"*",element:g.jsx(NS,{replace:!0,to:"general"})})]})]})},rxe=Ti($U,["RealTimeUpdatesSettings","ShortUrlCreationSettings","ShortUrlsListSettings","UserInterfaceSettings","VisitsSettings","TagsSettings"]),Gb=e=>e==="includes"?"Suggest tags including input":"Suggest tags starting with input",ixe=e=>e==="includes"?g.jsxs(g.Fragment,{children:["The list of suggested tags will contain those ",g.jsx("b",{children:"including"})," provided input."]}):g.jsxs(g.Fragment,{children:["The list of suggested tags will contain those ",g.jsx("b",{children:"starting with"})," provided input."]}),oxe=({settings:e,setShortUrlCreationSettings:t})=>{const n=e.shortUrlCreation??{validateUrls:!1},r=i=>()=>t({...n??{validateUrls:!1},tagFilteringMode:i});return g.jsxs(mn,{title:"Short URLs form",className:"h-100",children:[g.jsx(Ur,{children:g.jsxs(pu,{checked:n.validateUrls??!1,onChange:i=>t({...n,validateUrls:i}),children:["Request validation on long URLs when creating new short URLs.",g.jsxs(Zc,{children:["The initial state of the ",g.jsx("b",{children:"Validate URL"})," checkbox will be ",g.jsx("b",{children:n.validateUrls?"checked":"unchecked"}),"."]})]})}),g.jsx(Ur,{children:g.jsxs(pu,{checked:n.forwardQuery??!0,onChange:i=>t({...n,forwardQuery:i}),children:["Make all new short URLs forward their query params to the long URL.",g.jsxs(Zc,{children:["The initial state of the ",g.jsx("b",{children:"Forward query params on redirect"})," checkbox will be ",g.jsx("b",{children:n.forwardQuery??!0?"checked":"unchecked"}),"."]})]})}),g.jsxs(Uu,{noMargin:!0,label:"Tag suggestions search mode:",children:[g.jsxs(fa,{text:Gb(n.tagFilteringMode),children:[g.jsx(Ue,{active:!n.tagFilteringMode||n.tagFilteringMode==="startsWith",onClick:r("startsWith"),children:Gb("startsWith")}),g.jsx(Ue,{active:n.tagFilteringMode==="includes",onClick:r("includes"),children:Gb("includes")})]}),g.jsx(Zc,{children:ixe(n.tagFilteringMode)})]})]})},axe={dateCreated:"Created at",shortCode:"Short URL",longUrl:"Long URL",title:"Title",visits:"Visits"},sxe=({settings:{shortUrlsList:e},setShortUrlsListSettings:t})=>g.jsx(mn,{title:"Short URLs list",className:"h-100",children:g.jsx(Uu,{noMargin:!0,label:"Default ordering for short URLs list:",children:g.jsx(Wh,{items:axe,order:(e==null?void 0:e.defaultOrdering)??FU,onChange:(n,r)=>t({defaultOrdering:{field:n,dir:r}})})})}),lxe={tag:"Tag",shortUrls:"Short URLs",visits:"Visits"},cxe=({settings:{tags:e},setTagsSettings:t})=>g.jsx(mn,{title:"Tags",className:"h-100",children:g.jsx(Uu,{noMargin:!0,label:"Default ordering for tags list:",children:g.jsx(Wh,{items:lxe,order:(e==null?void 0:e.defaultOrdering)??{},onChange:(n,r)=>t({...e,defaultOrdering:{field:n,dir:r}})})})}),uxe=({settings:{ui:e},setUiSettings:t})=>g.jsxs(mn,{title:"User interface",className:"h-100",children:[g.jsx(Ne,{icon:(e==null?void 0:e.theme)==="dark"?_Y:sY,className:"user-interface__theme-icon"}),g.jsx(pu,{checked:(e==null?void 0:e.theme)==="dark",onChange:n=>{t({...e,theme:n?"dark":"light"})},children:"Use dark theme."})]}),UU={today:"Today",yesterday:"Yesterday",last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",last180Days:"Last 180 days",last365Days:"Last 365 days"},dxe=(e,t)=>!e||e==="all"?t:UU[e],fxe=({onChange:e,active:t,allText:n})=>g.jsxs(fa,{text:dxe(t,n),children:[g.jsx(Ue,{active:t==="all",onClick:()=>e("all"),children:n}),g.jsx(Ue,{divider:!0}),Object.entries(UU).map(([r,i])=>g.jsx(Ue,{active:t===r,onClick:()=>e(r),children:i},r))]}),SR=e=>{var t;return((t=e.visits)==null?void 0:t.defaultInterval)??"last30Days"},hxe=({settings:e,setVisitsSettings:t})=>{var n,r;return g.jsxs(mn,{title:"Visits",className:"h-100",children:[g.jsx(Ur,{children:g.jsxs(pu,{checked:!!((n=e.visits)!=null&&n.excludeBots),onChange:i=>t({defaultInterval:SR(e),excludeBots:i}),children:["Exclude bots wherever possible (this option‘s effect might depend on Shlink server‘s version).",g.jsxs(Zc,{children:["The visits coming from potential bots will be ",g.jsx("b",{children:(r=e.visits)!=null&&r.excludeBots?"excluded":"included"}),"."]})]})}),g.jsx(Uu,{noMargin:!0,label:"Default interval to load on visits sections:",children:g.jsx(fxe,{allText:"All visits",active:SR(e),onChange:i=>t({defaultInterval:i})})})]})},pxe=(e,t)=>{e.factory("Settings",rxe),e.decorator("Settings",cy),e.decorator("Settings",t(null,["resetSelectedServer"])),e.serviceFactory("RealTimeUpdatesSettings",()=>Hwe),e.decorator("RealTimeUpdatesSettings",t(["settings"],["toggleRealTimeUpdates","setRealTimeUpdatesInterval"])),e.serviceFactory("ShortUrlCreationSettings",()=>oxe),e.decorator("ShortUrlCreationSettings",t(["settings"],["setShortUrlCreationSettings"])),e.serviceFactory("UserInterfaceSettings",()=>uxe),e.decorator("UserInterfaceSettings",t(["settings"],["setUiSettings"])),e.serviceFactory("VisitsSettings",()=>hxe),e.decorator("VisitsSettings",t(["settings"],["setVisitsSettings"])),e.serviceFactory("TagsSettings",()=>cxe),e.decorator("TagsSettings",t(["settings"],["setTagsSettings"])),e.serviceFactory("ShortUrlsListSettings",()=>sxe),e.decorator("ShortUrlsListSettings",t(["settings"],["setShortUrlsListSettings"])),e.serviceFactory("toggleRealTimeUpdates",()=>Zwe),e.serviceFactory("setRealTimeUpdatesInterval",()=>Kwe),e.serviceFactory("setShortUrlCreationSettings",()=>Qwe),e.serviceFactory("setShortUrlsListSettings",()=>Xwe),e.serviceFactory("setUiSettings",()=>Jwe),e.serviceFactory("setVisitsSettings",()=>exe),e.serviceFactory("setTagsSettings",()=>txe)};var mxe="Expected a function",BU="__lodash_hash_undefined__",zU=1/0,gxe="[object Function]",vxe="[object GeneratorFunction]",yxe="[object Symbol]",_xe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,bxe=/^\w*$/,wxe=/^\./,xxe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Sxe=/[\\^$.*+?()[\]{}|]/g,Exe=/\\(\\)?/g,Txe=/^\[object .+?Constructor\]$/,Oxe=typeof Rp=="object"&&Rp&&Rp.Object===Object&&Rp,Cxe=typeof self=="object"&&self&&self.Object===Object&&self,aO=Oxe||Cxe||Function("return this")();function kxe(e,t){return e==null?void 0:e[t]}function Pxe(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var Lxe=Array.prototype,jxe=Function.prototype,VU=Object.prototype,qb=aO["__core-js_shared__"],ER=function(){var e=/[^.]+$/.exec(qb&&qb.keys&&qb.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),HU=jxe.toString,sO=VU.hasOwnProperty,WU=VU.toString,Mxe=RegExp("^"+HU.call(sO).replace(Sxe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),TR=aO.Symbol,Nxe=Lxe.splice,Rxe=YU(aO,"Map"),Ph=YU(Object,"create"),OR=TR?TR.prototype:void 0,CR=OR?OR.toString:void 0;function kl(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1}function Hxe(e,t){var n=this.__data__,r=j0(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}Ku.prototype.clear=Uxe;Ku.prototype.delete=Bxe;Ku.prototype.get=zxe;Ku.prototype.has=Vxe;Ku.prototype.set=Hxe;function zl(e){var t=-1,n=e?e.length:0;for(this.clear();++tr.toFixed(n).replace(".",t):r=>`${r}`.replace(".",t):n?r=>r.toFixed(n):r=>`${r}`}function uO(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 h2e(e={stringFormatter:uO()}){return t=>e.stringFormatter(t.toString().slice(7,-1))}function p2e(e={stringFormatter:uO()}){return t=>{if(t===null)return"";let n=JSON.stringify(t);return n===void 0?"":(n[0]==='"'&&(n=n.replace(/^"(.+)"$/,"$1")),e.stringFormatter(n))}}function PR(e,t,n){const r=e[t];return r===void 0?n:r}function ZU(e,t){try{return Array.isArray(t)?e.push(...t):e.push(t),e}catch{return e.concat(t)}}function T2(e,t){let n=!0;return e.reduce((r,i)=>(i==null&&(i=""),n?(n=!1,`${i}`):`${r}${t}${i}`),"")}var LR;(function(e){e.header="header",e.undefined="undefined",e.boolean="boolean",e.number="number",e.bigint="bigint",e.string="string",e.symbol="symbol",e.function="function",e.object="object"})(LR||(LR={}));class m2e{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||uO(),i=p2e({stringFormatter:r}),o={header:r,undefined:Zb,boolean:Zb,number:f2e(),bigint:Zb,string:r,symbol:h2e({stringFormatter:r}),function:i,object:i};return n.formatters=Object.assign(Object.assign({},o),n.formatters),n.delimiter=n.delimiter||",",n.eol=n.eol||` +`,n.header=n.header!==!1,n.includeEmptyRows=n.includeEmptyRows||!1,n.withBOM=n.withBOM||!1,n}preprocessFieldsInfo(t,n){return t.map(r=>{if(typeof r=="string")return{label:r,value:r.includes(".")||r.includes("[")?i=>kR(i,r,n):i=>PR(i,r,n)};if(typeof r=="object"){const i="default"in r?r.default:n;if(typeof r.value=="string"){const o=r.value;return{label:r.label||r.value,value:r.value.includes(".")||r.value.includes("[")?a=>kR(a,o,i):a=>PR(a,o,i)}}if(typeof r.value=="function"){const o=r.label||r.value.name||"",a={label:o,default:i},s=r.value;return{label:o,value(l){const c=s(l,a);return c===void 0?i:c}}}}throw new Error("Invalid field info option. "+JSON.stringify(r))})}getHeader(){return T2(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(ZU,[]),[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 T2(n,this.opts.delimiter)}processCell(t,n){return this.processValue(n.value(t))}processValue(t){const n=this.opts.formatters[typeof t];return n(t)}}class g2e extends m2e{constructor(t){super(t)}parse(t){const n=this.preprocessData(t);this.opts.fields=this.opts.fields||this.preprocessFieldsInfo(n.reduce((a,s)=>(Object.keys(s).forEach(l=>{a.includes(l)||a.push(l)}),a),[]),this.opts.defaultValue);const r=this.opts.header?this.getHeader():"",i=this.processData(n);return(this.opts.withBOM?"\uFEFF":"")+r+(r&&i?this.opts.eol:"")+i}preprocessData(t){const n=Array.isArray(t)?t:[t];if(!this.opts.fields){if(t==null||n.length===0)throw new Error('Data should not be empty or the "fields" option should be included');if(typeof n[0]!="object")throw new Error('Data items should be objects or the "fields" option should be included')}return this.opts.transforms.length===0?n:n.map(r=>this.preprocessRow(r)).reduce(ZU,[])}processData(t){return T2(t.map(n=>this.processRow(n)).filter(n=>n),this.opts.eol)}}var kn;(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"})(kn||(kn={}));kn.QUOTATION_MARK+"",kn.QUOTATION_MARK,kn.REVERSE_SOLIDUS+"",kn.REVERSE_SOLIDUS,kn.SOLIDUS+"",kn.SOLIDUS,kn.LATIN_SMALL_LETTER_B+"",kn.BACKSPACE,kn.LATIN_SMALL_LETTER_F+"",kn.FORM_FEED,kn.LATIN_SMALL_LETTER_N+"",kn.NEWLINE,kn.LATIN_SMALL_LETTER_R+"",kn.CARRIAGE_RETURN,kn.LATIN_SMALL_LETTER_T+"",kn.TAB;var jR;(function(e){e[e.LEFT_BRACE=0]="LEFT_BRACE",e[e.RIGHT_BRACE=1]="RIGHT_BRACE",e[e.LEFT_BRACKET=2]="LEFT_BRACKET",e[e.RIGHT_BRACKET=3]="RIGHT_BRACKET",e[e.COLON=4]="COLON",e[e.COMMA=5]="COMMA",e[e.TRUE=6]="TRUE",e[e.FALSE=7]="FALSE",e[e.NULL=8]="NULL",e[e.STRING=9]="STRING",e[e.NUMBER=10]="NUMBER",e[e.SEPARATOR=11]="SEPARATOR"})(jR||(jR={}));var MR;(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"})(MR||(MR={}));var NR;(function(e){e[e.OBJECT=0]="OBJECT",e[e.ARRAY=1]="ARRAY"})(NR||(NR={}));var RR;(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"})(RR||(RR={}));var v2e=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(r,i,o){n.o(r,i)||Object.defineProperty(r,i,{enumerable:!0,get:o})},n.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n.t=function(r,i){if(1&i&&(r=n(r)),8&i||4&i&&typeof r=="object"&&r&&r.__esModule)return r;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:r}),2&i&&typeof r!="string")for(var a in r)n.d(o,a,(function(s){return r[s]}).bind(null,a));return o},n.n=function(r){var i=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(i,"a",i),i},n.o=function(r,i){return Object.prototype.hasOwnProperty.call(r,i)},n.p="",n(n.s=32)}([function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch{typeof window=="object"&&(n=window)}e.exports=n},function(e,t,n){var r=n(6),i=Object.keys||function(v){var y=[];for(var x in v)y.push(x);return y};e.exports=f;var o=n(5);o.inherits=n(2);var a=n(23),s=n(14);o.inherits(f,a);for(var l=i(s.prototype),c=0;c @@ -1003,5 +1003,5 @@ 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,a){var s=i(o,a);return r(s)?s: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=E;var a,s=n(37);E.ReadableState=S,n(12).EventEmitter;var l=function(D,H){return D.listeners(H).length},c=n(24),d=n(7).Buffer,f=r.Uint8Array||function(){},p=n(5);p.inherits=n(2);var m=n(41),v=void 0;v=m&&m.debuglog?m.debuglog("stream"):function(){};var y,x=n(42),_=n(25);p.inherits(E,c);var w=["error","close","destroy","pause","resume"];function S(D,H){a=a||n(1),D=D||{};var ie=H instanceof a;this.objectMode=!!D.objectMode,ie&&(this.objectMode=this.objectMode||!!D.readableObjectMode);var z=D.highWaterMark,q=D.readableHighWaterMark,re=this.objectMode?16:16384;this.highWaterMark=z||z===0?z:ie&&(q||q===0)?q:re,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new x,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=D.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,D.encoding&&(y||(y=n(26).StringDecoder),this.decoder=new y(D.encoding),this.encoding=D.encoding)}function E(D){if(a=a||n(1),!(this instanceof E))return new E(D);this._readableState=new S(D,this),this.readable=!0,D&&(typeof D.read=="function"&&(this._read=D.read),typeof D.destroy=="function"&&(this._destroy=D.destroy)),c.call(this)}function O(D,H,ie,z,q){var re,ae=D._readableState;return H===null?(ae.reading=!1,function(he,C){if(!C.ended){if(C.decoder){var M=C.decoder.end();M&&M.length&&(C.buffer.push(M),C.length+=C.objectMode?1:M.length)}C.ended=!0,U(he)}}(D,ae)):(q||(re=function(he,C){var M;return function($){return d.isBuffer($)||$ instanceof f}(C)||typeof C=="string"||C===void 0||he.objectMode||(M=new TypeError("Invalid non-string/buffer chunk")),M}(ae,H)),re?D.emit("error",re):ae.objectMode||H&&H.length>0?(typeof H=="string"||ae.objectMode||Object.getPrototypeOf(H)===d.prototype||(H=function(he){return d.from(he)}(H)),z?ae.endEmitted?D.emit("error",new Error("stream.unshift() after end event")):k(D,ae,H,!0):ae.ended?D.emit("error",new Error("stream.push() after EOF")):(ae.reading=!1,ae.decoder&&!ie?(H=ae.decoder.write(H),ae.objectMode||H.length!==0?k(D,ae,H,!1):V(D,ae)):k(D,ae,H,!1))):z||(ae.reading=!1)),function(he){return!he.ended&&(he.needReadable||he.lengthH.highWaterMark&&(H.highWaterMark=function(ie){return ie>=j?ie=j:(ie--,ie|=ie>>>1,ie|=ie>>>2,ie|=ie>>>4,ie|=ie>>>8,ie|=ie>>>16,ie++),ie}(D)),D<=H.length?D:H.ended?H.length:(H.needReadable=!0,0))}function U(D){var H=D._readableState;H.needReadable=!1,H.emittedReadable||(v("emitReadable",H.flowing),H.emittedReadable=!0,H.sync?o.nextTick(R,D):R(D))}function R(D){v("emit readable"),D.emit("readable"),Z(D)}function V(D,H){H.readingMore||(H.readingMore=!0,o.nextTick(W,D,H))}function W(D,H){for(var ie=H.length;!H.reading&&!H.flowing&&!H.ended&&H.length=H.length?(ie=H.decoder?H.buffer.join(""):H.buffer.length===1?H.buffer.head.data:H.buffer.concat(H.length),H.buffer.clear()):ie=function(z,q,re){var ae;return zee.length?ee.length:he;if(se===ee.length?J+=ee:J+=ee.slice(0,he),(he-=se)==0){se===ee.length?(++$,M.next?C.head=M.next:C.head=C.tail=null):(C.head=M,M.data=ee.slice(se));break}++$}return C.length-=$,J}(z,q):function(he,C){var M=d.allocUnsafe(he),$=C.head,J=1;for($.data.copy(M),he-=$.data.length;$=$.next;){var ee=$.data,se=he>ee.length?ee.length:he;if(ee.copy(M,M.length-he,0,se),(he-=se)==0){se===ee.length?(++J,$.next?C.head=$.next:C.head=C.tail=null):(C.head=$,$.data=ee.slice(se));break}++J}return C.length-=J,M}(z,q),ae}(D,H.buffer,H.decoder),ie);var ie}function le(D){var H=D._readableState;if(H.length>0)throw new Error('"endReadable()" called on non-empty stream');H.endEmitted||(H.ended=!0,o.nextTick(K,H,D))}function K(D,H){D.endEmitted||D.length!==0||(D.endEmitted=!0,H.readable=!1,H.emit("end"))}function F(D,H){for(var ie=0,z=D.length;ie=H.highWaterMark||H.ended))return v("read: emitReadable",H.length,H.ended),H.length===0&&H.ended?le(this):U(this),null;if((D=A(D,H))===0&&H.ended)return H.length===0&&le(this),null;var z,q=H.needReadable;return v("need readable",q),(H.length===0||H.length-D0?ne(D,H):null)===null?(H.needReadable=!0,D=0):H.length-=D,H.length===0&&(H.ended||(H.needReadable=!0),ie!==D&&H.ended&&le(this)),z!==null&&this.emit("data",z),z},E.prototype._read=function(D){this.emit("error",new Error("_read() is not implemented"))},E.prototype.pipe=function(D,H){var ie=this,z=this._readableState;switch(z.pipesCount){case 0:z.pipes=D;break;case 1:z.pipes=[z.pipes,D];break;default:z.pipes.push(D)}z.pipesCount+=1,v("pipe count=%d opts=%j",z.pipesCount,H);var q=H&&H.end===!1||D===i.stdout||D===i.stderr?se:re;function re(){v("onend"),D.end()}z.endEmitted?o.nextTick(q):ie.once("end",q),D.on("unpipe",function ge(Me,ue){v("onunpipe"),Me===ie&&ue&&ue.hasUnpiped===!1&&(ue.hasUnpiped=!0,v("cleanup"),D.removeListener("close",J),D.removeListener("finish",ee),D.removeListener("drain",ae),D.removeListener("error",$),D.removeListener("unpipe",ge),ie.removeListener("end",re),ie.removeListener("end",se),ie.removeListener("data",M),he=!0,!z.awaitDrain||D._writableState&&!D._writableState.needDrain||ae())});var ae=function(ge){return function(){var Me=ge._readableState;v("pipeOnDrain",Me.awaitDrain),Me.awaitDrain&&Me.awaitDrain--,Me.awaitDrain===0&&l(ge,"data")&&(Me.flowing=!0,Z(ge))}}(ie);D.on("drain",ae);var he=!1,C=!1;function M(ge){v("ondata"),C=!1,D.write(ge)!==!1||C||((z.pipesCount===1&&z.pipes===D||z.pipesCount>1&&F(z.pipes,D)!==-1)&&!he&&(v("false write response, pause",ie._readableState.awaitDrain),ie._readableState.awaitDrain++,C=!0),ie.pause())}function $(ge){v("onerror",ge),se(),D.removeListener("error",$),l(D,"error")===0&&D.emit("error",ge)}function J(){D.removeListener("finish",ee),se()}function ee(){v("onfinish"),D.removeListener("close",J),se()}function se(){v("unpipe"),ie.unpipe(D)}return ie.on("data",M),function(ge,Me,ue){if(typeof ge.prependListener=="function")return ge.prependListener(Me,ue);ge._events&&ge._events[Me]?s(ge._events[Me])?ge._events[Me].unshift(ue):ge._events[Me]=[ue,ge._events[Me]]:ge.on(Me,ue)}(D,"error",$),D.once("close",J),D.once("finish",ee),D.emit("pipe",ie),z.flowing||(v("pipe resume"),ie.resume()),D},E.prototype.unpipe=function(D){var H=this._readableState,ie={hasUnpiped:!1};if(H.pipesCount===0)return this;if(H.pipesCount===1)return D&&D!==H.pipes?this:(D||(D=H.pipes),H.pipes=null,H.pipesCount=0,H.flowing=!1,D&&D.emit("unpipe",this,ie),this);if(!D){var z=H.pipes,q=H.pipesCount;H.pipes=null,H.pipesCount=0,H.flowing=!1;for(var re=0;re>5==6?2:v>>4==14?3:v>>3==30?4:v>>6==2?-1:-2}function s(v){var y=this.lastTotal-this.lastNeed,x=function(_,w,S){if((192&w[0])!=128)return _.lastNeed=0,"�";if(_.lastNeed>1&&w.length>1){if((192&w[1])!=128)return _.lastNeed=1,"�";if(_.lastNeed>2&&w.length>2&&(192&w[2])!=128)return _.lastNeed=2,"�"}}(this,v);return x!==void 0?x:this.lastNeed<=v.length?(v.copy(this.lastChar,y,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(v.copy(this.lastChar,y,0,v.length),void(this.lastNeed-=v.length))}function l(v,y){if((v.length-y)%2==0){var x=v.toString("utf16le",y);if(x){var _=x.charCodeAt(x.length-1);if(_>=55296&&_<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=v[v.length-2],this.lastChar[1]=v[v.length-1],x.slice(0,-1)}return x}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=v[v.length-1],v.toString("utf16le",y,v.length-1)}function c(v){var y=v&&v.length?this.write(v):"";if(this.lastNeed){var x=this.lastTotal-this.lastNeed;return y+this.lastChar.toString("utf16le",0,x)}return y}function d(v,y){var x=(v.length-y)%3;return x===0?v.toString("base64",y):(this.lastNeed=3-x,this.lastTotal=3,x===1?this.lastChar[0]=v[v.length-1]:(this.lastChar[0]=v[v.length-2],this.lastChar[1]=v[v.length-1]),v.toString("base64",y,v.length-x))}function f(v){var y=v&&v.length?this.write(v):"";return this.lastNeed?y+this.lastChar.toString("base64",0,3-this.lastNeed):y}function p(v){return v.toString(this.encoding)}function m(v){return v&&v.length?this.write(v):""}t.StringDecoder=o,o.prototype.write=function(v){if(v.length===0)return"";var y,x;if(this.lastNeed){if((y=this.fillLast(v))===void 0)return"";x=this.lastNeed,this.lastNeed=0}else x=0;return x=0?(k>0&&(w.lastNeed=k-1),k):--O=0?(k>0&&(w.lastNeed=k-2),k):--O=0?(k>0&&(k===2?k=0:w.lastNeed=k-3),k):0}(this,v,y);if(!this.lastNeed)return v.toString("utf8",y);this.lastTotal=x;var _=v.length-(x-this.lastNeed);return v.copy(this.lastChar,0,_),v.toString("utf8",y,_)},o.prototype.fillLast=function(v){if(this.lastNeed<=v.length)return v.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);v.copy(this.lastChar,this.lastTotal-this.lastNeed,0,v.length),this.lastNeed-=v.length}},function(e,t,n){e.exports=o;var r=n(1),i=n(5);function o(l){if(!(this instanceof o))return new o(l);r.call(this,l),this._transformState={afterTransform:(function(c,d){var f=this._transformState;f.transforming=!1;var p=f.writecb;if(!p)return this.emit("error",new Error("write callback called multiple times"));f.writechunk=null,f.writecb=null,d!=null&&this.push(d),p(c);var m=this._readableState;m.reading=!1,(m.needReadable||m.length-1&&a.push(i[s]);return a},t.trimLeft=String.prototype.trimLeft?function(i){return i.trimLeft()}:function(i){return i.replace(/^\s+/,"")},t.trimRight=String.prototype.trimRight?function(i){return i.trimRight()}:function(i){return i.replace(/\s+$/,"")}}).call(this,n(3).Buffer)},function(e,t,n){var r=this&&this.__extends||function(){var o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,s){a.__proto__=s}||function(a,s){for(var l in s)s.hasOwnProperty(l)&&(a[l]=s[l])};return function(a,s){function l(){this.constructor=a}o(a,s),a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(o){function a(s,l,c){var d=o.call(this,"Error: "+s+". JSON Line number: "+l+(c?" near: "+c:""))||this;return d.err=s,d.line=l,d.extra=c,d.name="CSV Parse Error",d}return r(a,o),a.column_mismatched=function(s,l){return new a("column_mismatched",s,l)},a.unclosed_quote=function(s,l){return new a("unclosed_quote",s,l)},a.fromJSON=function(s){return new a(s.err,s.line,s.extra)},a.prototype.toJSON=function(){return{err:this.err,line:this.line,extra:this.extra}},a}(Error);t.default=i},function(e,t,n){var r=n(18),i=n(68),o=n(69),a=r?r.toStringTag:void 0;e.exports=function(s){return s==null?s===void 0?"[object Undefined]":"[object Null]":a&&a in Object(s)?i(s):o(s)}},function(e,t){e.exports=function(n,r){return n===r||n!=n&&r!=r}},function(e,t,n){e.exports=n(33)},function(e,t,n){var r=n(34),i=function(o,a){return new r.Converter(o,a)};i.csv=i,i.Converter=r.Converter,e.exports=i},function(e,t,n){(function(r){var i=this&&this.__extends||function(){var m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,y){v.__proto__=y}||function(v,y){for(var x in y)y.hasOwnProperty(x)&&(v[x]=y[x])};return function(v,y){function x(){this.constructor=v}m(v,y),v.prototype=y===null?Object.create(y):(x.prototype=y.prototype,new x)}}(),o=this&&this.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(t,"__esModule",{value:!0});var a=n(36),s=n(50),l=n(51),c=o(n(15)),d=n(52),f=n(105),p=function(m){function v(y,x){x===void 0&&(x={});var _=m.call(this,x)||this;return _.options=x,_.params=s.mergeParams(y),_.runtime=l.initParseRuntime(_),_.result=new f.Result(_),_.processor=new d.ProcessorLocal(_),_.once("error",function(w){r(function(){_.result.processError(w),_.emit("done",w)})}),_.once("done",function(){_.processor.destroy()}),_}return i(v,m),v.prototype.preRawData=function(y){return this.runtime.preRawDataHook=y,this},v.prototype.preFileLine=function(y){return this.runtime.preFileLineHook=y,this},v.prototype.subscribe=function(y,x,_){return this.parseRuntime.subscribe={onNext:y,onError:x,onCompleted:_},this},v.prototype.fromFile=function(y,x){var _=this,w=n(!function(){var S=new Error("Cannot find module 'fs'");throw S.code="MODULE_NOT_FOUND",S}());return w.exists(y,function(S){S?w.createReadStream(y,x).pipe(_):_.emit("error",new Error("File does not exist. Check to make sure the file path to your csv is correct."))}),this},v.prototype.fromStream=function(y){return y.pipe(this),this},v.prototype.fromString=function(y){y.toString();var x=new a.Readable,_=0;return x._read=function(w){if(_>=y.length)this.push(null);else{var S=y.substr(_,w);this.push(S),_+=w}},this.fromStream(x)},v.prototype.then=function(y,x){var _=this;return new c.default(function(w,S){_.parseRuntime.then={onfulfilled:function(E){w(y?y(E):E)},onrejected:function(E){x?w(x(E)):S(E)}}})},Object.defineProperty(v.prototype,"parseParam",{get:function(){return this.params},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parseRuntime",{get:function(){return this.runtime},enumerable:!0,configurable:!0}),v.prototype._transform=function(y,x,_){var w=this;this.processor.process(y).then(function(S){if(S.length>0)return w.runtime.started=!0,w.result.processResult(S)}).then(function(){w.emit("drained"),_()},function(S){w.runtime.hasError=!0,w.runtime.error=S,w.emit("error",S),_()})},v.prototype._flush=function(y){var x=this;this.processor.flush().then(function(_){if(_.length>0)return x.result.processResult(_)}).then(function(){x.processEnd(y)},function(_){x.emit("error",_),y()})},v.prototype.processEnd=function(y){this.result.endProcess(),this.emit("done"),y()},Object.defineProperty(v.prototype,"parsedLineNumber",{get:function(){return this.runtime.parsedLineNumber},enumerable:!0,configurable:!0}),v}(a.Transform);t.Converter=p}).call(this,n(11).setImmediate)},function(e,t,n){(function(r,i){(function(o,a){if(!o.setImmediate){var s,l=1,c={},d=!1,f=o.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(o);p=p&&p.setTimeout?p:o,{}.toString.call(o.process)==="[object process]"?s=function(y){i.nextTick(function(){v(y)})}:function(){if(o.postMessage&&!o.importScripts){var y=!0,x=o.onmessage;return o.onmessage=function(){y=!1},o.postMessage("","*"),o.onmessage=x,y}}()?function(){var y="setImmediate$"+Math.random()+"$",x=function(_){_.source===o&&typeof _.data=="string"&&_.data.indexOf(y)===0&&v(+_.data.slice(y.length))};o.addEventListener?o.addEventListener("message",x,!1):o.attachEvent("onmessage",x),s=function(_){o.postMessage(y+_,"*")}}():o.MessageChannel?function(){var y=new MessageChannel;y.port1.onmessage=function(x){v(x.data)},s=function(x){y.port2.postMessage(x)}}():f&&"onreadystatechange"in f.createElement("script")?function(){var y=f.documentElement;s=function(x){var _=f.createElement("script");_.onreadystatechange=function(){v(x),_.onreadystatechange=null,y.removeChild(_),_=null},y.appendChild(_)}}():s=function(y){setTimeout(v,0,y)},p.setImmediate=function(y){typeof y!="function"&&(y=new Function(""+y));for(var x=new Array(arguments.length-1),_=0;_"u"?r===void 0?this:r:self)}).call(this,n(0),n(4))},function(e,t,n){e.exports=i;var r=n(12).EventEmitter;function i(){r.call(this)}n(2)(i,r),i.Readable=n(13),i.Writable=n(46),i.Duplex=n(47),i.Transform=n(48),i.PassThrough=n(49),i.Stream=i,i.prototype.pipe=function(o,a){var s=this;function l(y){o.writable&&o.write(y)===!1&&s.pause&&s.pause()}function c(){s.readable&&s.resume&&s.resume()}s.on("data",l),o.on("drain",c),o._isStdio||a&&a.end===!1||(s.on("end",f),s.on("close",p));var d=!1;function f(){d||(d=!0,o.end())}function p(){d||(d=!0,typeof o.destroy=="function"&&o.destroy())}function m(y){if(v(),r.listenerCount(this,"error")===0)throw y}function v(){s.removeListener("data",l),o.removeListener("drain",c),s.removeListener("end",f),s.removeListener("close",p),s.removeListener("error",m),o.removeListener("error",m),s.removeListener("end",v),s.removeListener("close",v),o.removeListener("close",v)}return s.on("error",m),o.on("error",m),s.on("end",v),s.on("close",v),o.on("close",v),o.emit("pipe",s),o}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(r){return n.call(r)=="[object Array]"}},function(e,t,n){t.byteLength=function(p){var m=c(p),v=m[0],y=m[1];return 3*(v+y)/4-y},t.toByteArray=function(p){for(var m,v=c(p),y=v[0],x=v[1],_=new o(3*(y+x)/4-x),w=0,S=x>0?y-4:y,E=0;E>16&255,_[w++]=m>>8&255,_[w++]=255&m;return x===2&&(m=i[p.charCodeAt(E)]<<2|i[p.charCodeAt(E+1)]>>4,_[w++]=255&m),x===1&&(m=i[p.charCodeAt(E)]<<10|i[p.charCodeAt(E+1)]<<4|i[p.charCodeAt(E+2)]>>2,_[w++]=m>>8&255,_[w++]=255&m),_},t.fromByteArray=function(p){for(var m,v=p.length,y=v%3,x=[],_=0,w=v-y;_w?w:_+16383));return y===1?(m=p[v-1],x.push(r[m>>2]+r[m<<4&63]+"==")):y===2&&(m=(p[v-2]<<8)+p[v-1],x.push(r[m>>10]+r[m>>4&63]+r[m<<2&63]+"=")),x.join("")};for(var r=[],i=[],o=typeof Uint8Array<"u"?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=a.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var v=p.indexOf("=");return v===-1&&(v=m),[v,v===m?0:4-v%4]}function d(p){return r[p>>18&63]+r[p>>12&63]+r[p>>6&63]+r[63&p]}function f(p,m,v){for(var y,x=[],_=m;_>1,p=-7,m=i?a-1:0,v=i?-1:1,y=n[r+m];for(m+=v,s=y&(1<<-p)-1,y>>=-p,p+=c;p>0;s=256*s+n[r+m],m+=v,p-=8);for(l=s&(1<<-p)-1,s>>=-p,p+=o;p>0;l=256*l+n[r+m],m+=v,p-=8);if(s===0)s=1-f;else{if(s===d)return l?NaN:1/0*(y?-1:1);l+=Math.pow(2,o),s-=f}return(y?-1:1)*l*Math.pow(2,s-o)},t.write=function(n,r,i,o,a,s){var l,c,d,f=8*s-a-1,p=(1<>1,v=a===23?Math.pow(2,-24)-Math.pow(2,-77):0,y=o?0:s-1,x=o?1:-1,_=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(c=isNaN(r)?1:0,l=p):(l=Math.floor(Math.log(r)/Math.LN2),r*(d=Math.pow(2,-l))<1&&(l--,d*=2),(r+=l+m>=1?v/d:v*Math.pow(2,1-m))*d>=2&&(l++,d/=2),l+m>=p?(c=0,l=p):l+m>=1?(c=(r*d-1)*Math.pow(2,a),l+=m):(c=r*Math.pow(2,m-1)*Math.pow(2,a),l=0));a>=8;n[i+y]=255&c,y+=x,c/=256,a-=8);for(l=l<0;n[i+y]=255&l,y+=x,l/=256,f-=8);n[i+y-x]|=128*_}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(r){return n.call(r)=="[object Array]"}},function(e,t){},function(e,t,n){var r=n(7).Buffer,i=n(43);function o(a,s,l){a.copy(s,l)}e.exports=function(){function a(){(function(s,l){if(!(s instanceof l))throw new TypeError("Cannot call a class as a function")})(this,a),this.head=null,this.tail=null,this.length=0}return a.prototype.push=function(s){var l={data:s,next:null};this.length>0?this.tail.next=l:this.head=l,this.tail=l,++this.length},a.prototype.unshift=function(s){var l={data:s,next:this.head};this.length===0&&(this.tail=l),this.head=l,++this.length},a.prototype.shift=function(){if(this.length!==0){var s=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,s}},a.prototype.clear=function(){this.head=this.tail=null,this.length=0},a.prototype.join=function(s){if(this.length===0)return"";for(var l=this.head,c=""+l.data;l=l.next;)c+=s+l.data;return c},a.prototype.concat=function(s){if(this.length===0)return r.alloc(0);if(this.length===1)return this.head.data;for(var l=r.allocUnsafe(s>>>0),c=this.head,d=0;c;)o(c.data,l,d),d+=c.data.length,c=c.next;return l},a}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var a=i.inspect({length:this.length});return this.constructor.name+" "+a})},function(e,t){},function(e,t,n){(function(r){function i(o){try{if(!r.localStorage)return!1}catch{return!1}var a=r.localStorage[o];return a!=null&&String(a).toLowerCase()==="true"}e.exports=function(o,a){if(i("noDeprecation"))return o;var s=!1;return function(){if(!s){if(i("throwDeprecation"))throw new Error(a);i("traceDeprecation")?console.trace(a):console.warn(a),s=!0}return o.apply(this,arguments)}}}).call(this,n(0))},function(e,t,n){e.exports=o;var r=n(27),i=n(5);function o(a){if(!(this instanceof o))return new o(a);r.call(this,a)}i.inherits=n(2),i.inherits(o,r),o.prototype._transform=function(a,s,l){l(null,a)}},function(e,t,n){e.exports=n(14)},function(e,t,n){e.exports=n(1)},function(e,t,n){e.exports=n(13).Transform},function(e,t,n){e.exports=n(13).PassThrough},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.mergeParams=function(r){var i={delimiter:",",ignoreColumns:void 0,includeColumns:void 0,quote:'"',trim:!0,checkType:!1,ignoreEmpty:!1,noheader:!1,headers:void 0,flatKeys:!1,maxRowLength:0,checkColumn:!1,escape:'"',colParser:{},eol:void 0,alwaysSplitAtEOL:!1,output:"json",nullObject:!1,downstreamFormat:"line",needEmitAll:!0};for(var o in r||(r={}),r)r.hasOwnProperty(o)&&(Array.isArray(r[o])?i[o]=[].concat(r[o]):i[o]=r[o]);return i}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.initParseRuntime=function(r){var i=r.parseParam,o={needProcessIgnoreColumn:!1,needProcessIncludeColumn:!1,selectedColumns:void 0,ended:!1,hasError:!1,error:void 0,delimiter:r.parseParam.delimiter,eol:r.parseParam.eol,columnConv:[],headerType:[],headerTitle:[],headerFlag:[],headers:void 0,started:!1,parsedLineNumber:0,columnValueSetter:[]};return i.ignoreColumns&&(o.needProcessIgnoreColumn=!0),i.includeColumns&&(o.needProcessIncludeColumn=!0),o}},function(e,t,n){(function(r){var i=this&&this.__extends||function(){var x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,w){_.__proto__=w}||function(_,w){for(var S in w)w.hasOwnProperty(S)&&(_[S]=w[S])};return function(_,w){function S(){this.constructor=_}x(_,w),_.prototype=w===null?Object.create(w):(S.prototype=w.prototype,new S)}}(),o=this&&this.__importDefault||function(x){return x&&x.__esModule?x:{default:x}};Object.defineProperty(t,"__esModule",{value:!0});var a=n(53),s=o(n(15)),l=n(54),c=o(n(16)),d=n(57),f=n(28),p=n(58),m=o(n(59)),v=o(n(29)),y=function(x){function _(){var w=x!==null&&x.apply(this,arguments)||this;return w.rowSplit=new p.RowSplit(w.converter),w.eolEmitted=!1,w._needEmitEol=void 0,w.headEmitted=!1,w._needEmitHead=void 0,w}return i(_,x),_.prototype.flush=function(){var w=this;if(this.runtime.csvLineBuffer&&this.runtime.csvLineBuffer.length>0){var S=this.runtime.csvLineBuffer;return this.runtime.csvLineBuffer=void 0,this.process(S,!0).then(function(E){return w.runtime.csvLineBuffer&&w.runtime.csvLineBuffer.length>0?s.default.reject(v.default.unclosed_quote(w.runtime.parsedLineNumber,w.runtime.csvLineBuffer.toString())):s.default.resolve(E)})}return s.default.resolve([])},_.prototype.destroy=function(){return s.default.resolve()},Object.defineProperty(_.prototype,"needEmitEol",{get:function(){return this._needEmitEol===void 0&&(this._needEmitEol=this.converter.listeners("eol").length>0),this._needEmitEol},enumerable:!0,configurable:!0}),Object.defineProperty(_.prototype,"needEmitHead",{get:function(){return this._needEmitHead===void 0&&(this._needEmitHead=this.converter.listeners("header").length>0),this._needEmitHead},enumerable:!0,configurable:!0}),_.prototype.process=function(w,S){var E,O=this;return S===void 0&&(S=!1),E=S?w.toString():l.prepareData(w,this.converter.parseRuntime),s.default.resolve().then(function(){return O.runtime.preRawDataHook?O.runtime.preRawDataHook(E):E}).then(function(k){return k&&k.length>0?O.processCSV(k,S):s.default.resolve([])})},_.prototype.processCSV=function(w,S){var E=this,O=this.params,k=this.runtime;k.eol||c.default(w,k),this.needEmitEol&&!this.eolEmitted&&k.eol&&(this.converter.emit("eol",k.eol),this.eolEmitted=!0),O.ignoreEmpty&&!k.started&&(w=f.trimLeft(w));var j=d.stringToLines(w,k);return S?(j.lines.push(j.partial),j.partial=""):this.prependLeftBuf(f.bufFromString(j.partial)),j.lines.length>0?(k.preFileLineHook?this.runPreLineHook(j.lines):s.default.resolve(j.lines)).then(function(A){return k.started||E.runtime.headers?E.processCSVBody(A):E.processDataWithHead(A)}):s.default.resolve([])},_.prototype.processDataWithHead=function(w){if(this.params.noheader)this.params.headers?this.runtime.headers=this.params.headers:this.runtime.headers=[];else{for(var S="",E=[];w.length;){var O=S+w.shift(),k=this.rowSplit.parse(O);if(k.closed){E=k.cells,S="";break}S=O+c.default(O,this.runtime)}if(this.prependLeftBuf(f.bufFromString(S)),E.length===0)return[];this.params.headers?this.runtime.headers=this.params.headers:this.runtime.headers=E}return(this.runtime.needProcessIgnoreColumn||this.runtime.needProcessIncludeColumn)&&this.filterHeader(),this.needEmitHead&&!this.headEmitted&&(this.converter.emit("header",this.runtime.headers),this.headEmitted=!0),this.processCSVBody(w)},_.prototype.filterHeader=function(){if(this.runtime.selectedColumns=[],this.runtime.headers){for(var w=this.runtime.headers,S=0;S=j.length)R();else if(A.preFileLineHook){var V=j[U],W=A.preFileLineHook(V,A.parsedLineNumber+U);if(U++,W&&W.then)W.then(function(X){j[U-1]=X,k(j,A,U,R)});else{for(j[U-1]=W;U0?r.concat([f.csvLineBuffer,d]):d}(a,s);s.csvLineBuffer=void 0;var c=function(d,f){var p=d.length-1;if(128&d[p]){for(;(192&d[p])==128;)p--;p--}return p!=d.length-1?(f.csvLineBuffer=d.slice(p+1),d.slice(0,p+1)):d}(l,s).toString("utf8");return s.started===!1?o.default(c):c}}).call(this,n(3).Buffer)},function(e,t,n){(function(r){var i=n(56);e.exports=function(o){return typeof o=="string"&&o.charCodeAt(0)===65279?o.slice(1):r.isBuffer(o)&&i(o)&&o[0]===239&&o[1]===187&&o[2]===191?o.slice(3):o}}).call(this,n(3).Buffer)},function(e,t){e.exports=function(n){for(var r=0;r0),this._needEmitDelimiter},enumerable:!0,configurable:!0}),l.prototype.parse=function(c){if(c.length===0||this.conv.parseParam.ignoreEmpty&&c.trim().length===0)return{cells:[],closed:!0};var d=this.quote,f=this.trim;this.escape,(this.conv.parseRuntime.delimiter instanceof Array||this.conv.parseRuntime.delimiter.toLowerCase()==="auto")&&(this.conv.parseRuntime.delimiter=this.getDelimiter(c)),this.needEmitDelimiter&&!this.delimiterEmitted&&(this.conv.emit("delimiter",this.conv.parseRuntime.delimiter),this.delimiterEmitted=!0);var p=this.conv.parseRuntime.delimiter,m=c.split(p);if(d==="off"){if(f)for(var v=0;vf&&(p=m,f=v)}),p},l.prototype.isQuoteOpen=function(c){var d=this.quote,f=this.escape;return c[0]===d&&(c[1]!==d||c[1]===f&&(c[2]===d||c.length===2))},l.prototype.isQuoteClose=function(c){var d=this.quote,f=this.escape;this.conv.parseParam.trim&&(c=o.trimRight(c));for(var p=0,m=c.length-1;c[m]===d||c[m]===f;)m--,p++;return p%2!=0},l.prototype.escapeQuote=function(c){var d="es|"+this.quote+"|"+this.escape;this.cachedRegExp[d]===void 0&&(this.cachedRegExp[d]=new RegExp("\\"+this.escape+"\\"+this.quote,"g"));var f=this.cachedRegExp[d];return c.replace(f,this.quote)},l.prototype.parseMultiLines=function(c){for(var d=[],f="";c.length;){var p=f+c.shift(),m=this.parse(p);m.cells.length===0&&this.conv.parseParam.ignoreEmpty||(m.closed||this.conv.parseParam.alwaysSplitAtEOL?(this.conv.parseRuntime.selectedColumns?d.push(o.filterArray(m.cells,this.conv.parseRuntime.selectedColumns)):d.push(m.cells),f=""):f=p+(i.default(p,this.conv.parseRuntime)||` `))}return{rowsCells:d,partial:f}},l}();t.RowSplit=s},function(e,t,n){var r=this&&this.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(29)),o=r(n(60)),a=/^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$/;function s(_,w,S){if(w.parseParam.checkColumn&&w.parseRuntime.headers&&_.length!==w.parseRuntime.headers.length)throw i.default.column_mismatched(w.parseRuntime.parsedLineNumber+S);return function(E,O,k){for(var j=!1,A={},U=0,R=E.length;U-1){for(var k=w.split("."),j=!0;k.length>0;)if(k.shift().length===0){j=!1;break}!j||E.parseParam.colParser[w]&&E.parseParam.colParser[w].flat?E.parseRuntime.columnValueSetter[O]=f:E.parseRuntime.columnValueSetter[O]=p}else E.parseRuntime.columnValueSetter[O]=f;E.parseParam.nullObject===!0&&S==="null"&&(S=null),E.parseRuntime.columnValueSetter[O](_,w,S)}function f(_,w,S){_[w]=S}function p(_,w,S){o.default(_,w,S)}function m(_,w,S,E){return E.parseRuntime.headerType[S]?E.parseRuntime.headerType[S]:w.indexOf("number#!")>-1?E.parseRuntime.headerType[S]=v:w.indexOf("string#!")>-1?E.parseRuntime.headerType[S]=y:E.parseParam.checkType?E.parseRuntime.headerType[S]=x:E.parseRuntime.headerType[S]=y}function v(_){var w=parseFloat(_);return isNaN(w)?_:w}function y(_){return _.toString()}function x(_){var w=_.trim();return w===""?y(_):a.test(w)?v(_):w.length===5&&w.toLowerCase()==="false"||w.length===4&&w.toLowerCase()==="true"?function(S){var E=S.trim();return E.length!==5||E.toLowerCase()!=="false"}(_):w[0]==="{"&&w[w.length-1]==="}"||w[0]==="["&&w[w.length-1]==="]"?function(S){try{return JSON.parse(S)}catch{return S}}(_):y(_)}},function(e,t,n){var r=n(61);e.exports=function(i,o,a){return i==null?i:r(i,o,a)}},function(e,t,n){var r=n(62),i=n(74),o=n(103),a=n(20),s=n(104);e.exports=function(l,c,d,f){if(!a(l))return l;for(var p=-1,m=(c=i(c,l)).length,v=m-1,y=l;y!=null&&++p-1}},function(e,t,n){var r=n(9);e.exports=function(i,o){var a=this.__data__,s=r(a,i);return s<0?(++this.size,a.push([i,o])):a[s][1]=o,this}},function(e,t,n){var r=n(17)(n(19),"Map");e.exports=r},function(e,t,n){var r=n(10);e.exports=function(i){var o=r(this,i).delete(i);return this.size-=o?1:0,o}},function(e,t){e.exports=function(n){var r=typeof n;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?n!=="__proto__":n===null}},function(e,t,n){var r=n(10);e.exports=function(i){return r(this,i).get(i)}},function(e,t,n){var r=n(10);e.exports=function(i){return r(this,i).has(i)}},function(e,t,n){var r=n(10);e.exports=function(i,o){var a=r(this,i),s=a.size;return a.set(i,o),this.size+=a.size==s?0:1,this}},function(e,t,n){var r=n(101);e.exports=function(i){return i==null?"":r(i)}},function(e,t,n){var r=n(18),i=n(102),o=n(21),a=n(22),s=r?r.prototype:void 0,l=s?s.toString:void 0;e.exports=function c(d){if(typeof d=="string")return d;if(o(d))return i(d,c)+"";if(a(d))return l?l.call(d):"";var f=d+"";return f=="0"&&1/d==-1/0?"-0":f}},function(e,t){e.exports=function(n,r){for(var i=-1,o=n==null?0:n.length,a=Array(o);++i-1&&r%1==0&&r0||this.converter.listeners("readable").length>0),this._needPushDownstream},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"needEmitAll",{get:function(){return!!this.converter.parseRuntime.then&&this.converter.parseParam.needEmitAll},enumerable:!0,configurable:!0}),l.prototype.processResult=function(c){var d=this,f=this.converter.parseRuntime.parsedLineNumber;return this.needPushDownstream&&this.converter.parseParam.downstreamFormat==="array"&&f===0&&s(this.converter,"["+o.EOL),new i.default(function(p,m){d.needEmitLine?function v(y,x,_,w,S){if(_>=y.length)S();else if(x.parseRuntime.subscribe&&x.parseRuntime.subscribe.onNext){var E=x.parseRuntime.subscribe.onNext,O=y[_],k=E(O,x.parseRuntime.parsedLineNumber+_);if(_++,k&&k.then)k.then(function(){(function(A,U,R,V,W,X,G){W&&s(R,G),v(A,R,V,W,X)})(y,0,x,_,w,S,O)},S);else{for(w&&s(x,O);_new Promise(t=>{v2e().fromString(e).then(t)}),_2e=new m2e,b2e=e=>_2e.parse(e),w2e="shlink",AR=e=>`${w2e}.${e}`;class x2e{constructor(t){Np(this,"get",t=>{const n=this.localStorage.getItem(AR(t));return n?JSON.parse(n):void 0});Np(this,"set",(t,n)=>this.localStorage.setItem(AR(t),JSON.stringify(n)));this.localStorage=t}}class S2e{constructor(t){this.storage=t}getTagColors(){return this.storage.get("colors")??{}}storeTagColors(t){this.storage.set("colors",t)}}const E2e=e=>{e.constant("localStorage",window.localStorage),e.service("Storage",x2e,"localStorage"),e.service("TagColorsStorage",S2e,"Storage"),e.constant("csvToJson",y2e),e.constant("jsonToCsv",b2e),e.serviceFactory("useTimeoutToggle",()=>h6)},Vl=new sW,{container:dO}=Vl,T2e=(e,t)=>(...n)=>e[t](...n),O2e=(e,t)=>({...e,[t]:T2e(dO,t)}),C2e=e=>t=>Object.fromEntries(e.map(n=>[n,t[n]])),N0=(e,t=[])=>cD(e?C2e(e):null,t.reduce(O2e,{}));ire(Vl,N0);Q1e(Vl,N0);EW(Vl);Bwe(Vl,N0);E2e(Vl);hxe(Vl,N0);var fO={},O2={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isPlainObject=t.clone=t.recursive=t.merge=t.main=void 0,e.exports=t=n,t.default=n;function n(){for(var c=[],d=0;dF.length)&&(D=F.length);for(var H=0,ie=Array(D);HAE({appUpdated:rre,servers:Swe,selectedServer:e.selectedServerReducer,settings:txe}),L2e=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},j2e=!0,KU={states:["settings","servers"],namespace:"shlink",namespaceSeparator:".",debounce:300},M2e=L2e(fO.load(KU)),N2e=e=>G6({devTools:!j2e,reducer:P2e(e),preloadedState:M2e,middleware:t=>t({immutableCheck:!1,serializableCheck:!1}).concat(fO.save(KU))}),R2e=!!(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 A2e(e){if("serviceWorker"in navigator){if(new URL(ev.homepage,window.location.href).origin!==window.location.origin)return;window.addEventListener("load",()=>{const n=`${ev.homepage}/service-worker.js`;R2e?(D2e(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")})):QU(n,e)})}}function QU(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 D2e(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()})}):QU(e,t)}).catch(()=>{console.log("No internet connection found. App is running in offline mode.")})}const XU=N2e(dO),{App:I2e,ScrollToTop:F2e,ErrorHandler:$2e,appUpdateAvailable:U2e}=dO;Z3(document.getElementById("root")).render(g.jsx(uD,{store:XU,children:g.jsx(bD,{basename:ev.homepage,children:g.jsx($2e,{children:g.jsx(F2e,{children:g.jsx(I2e,{})})})})}));A2e({onUpdate(){XU.dispatch(U2e())}}); +`,t.homedir=function(){return"/"}}]);const y2e=oa(v2e),_2e=e=>new Promise(t=>{y2e().fromString(e).then(t)}),b2e=new g2e,w2e=e=>b2e.parse(e),x2e="shlink",AR=e=>`${x2e}.${e}`;class S2e{constructor(t){Np(this,"get",t=>{const n=this.localStorage.getItem(AR(t));return n?JSON.parse(n):void 0});Np(this,"set",(t,n)=>this.localStorage.setItem(AR(t),JSON.stringify(n)));this.localStorage=t}}class E2e{constructor(t){this.storage=t}getTagColors(){return this.storage.get("colors")??{}}storeTagColors(t){this.storage.set("colors",t)}}const T2e=e=>{e.constant("localStorage",window.localStorage),e.service("Storage",S2e,"localStorage"),e.service("TagColorsStorage",E2e,"Storage"),e.constant("csvToJson",_2e),e.constant("jsonToCsv",w2e),e.serviceFactory("useTimeoutToggle",()=>h6)},Vl=new lW,{container:dO}=Vl,O2e=(e,t)=>(...n)=>e[t](...n),C2e=(e,t)=>({...e,[t]:O2e(dO,t)}),k2e=e=>t=>Object.fromEntries(e.map(n=>[n,t[n]])),N0=(e,t=[])=>cD(e?k2e(e):null,t.reduce(C2e,{}));ore(Vl,N0);X1e(Vl,N0);TW(Vl);zwe(Vl,N0);T2e(Vl);pxe(Vl,N0);var fO={},O2={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isPlainObject=t.clone=t.recursive=t.merge=t.main=void 0,e.exports=t=n,t.default=n;function n(){for(var c=[],d=0;dF.length)&&(D=F.length);for(var H=0,ie=Array(D);HAE({appUpdated:ire,servers:Ewe,selectedServer:e.selectedServerReducer,settings:nxe}),j2e=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},M2e=!0,KU={states:["settings","servers"],namespace:"shlink",namespaceSeparator:".",debounce:300},N2e=j2e(fO.load(KU)),R2e=e=>G6({devTools:!M2e,reducer:L2e(e),preloadedState:N2e,middleware:t=>t({immutableCheck:!1,serializableCheck:!1}).concat(fO.save(KU))}),A2e=!!(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 D2e(e){if("serviceWorker"in navigator){if(new URL(ev.homepage,window.location.href).origin!==window.location.origin)return;window.addEventListener("load",()=>{const n=`${ev.homepage}/service-worker.js`;A2e?(I2e(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")})):QU(n,e)})}}function QU(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 I2e(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()})}):QU(e,t)}).catch(()=>{console.log("No internet connection found. App is running in offline mode.")})}const XU=R2e(dO),{App:F2e,ScrollToTop:$2e,ErrorHandler:U2e,appUpdateAvailable:B2e}=dO;Z3(document.getElementById("root")).render(g.jsx(uD,{store:XU,children:g.jsx(bD,{basename:ev.homepage,children:g.jsx(U2e,{children:g.jsx($2e,{children:g.jsx(F2e,{})})})})}));D2e({onUpdate(){XU.dispatch(B2e())}}); diff --git a/dependabot/npm_and_yarn/vite-2b5f0a7cc8/index.html b/dependabot/npm_and_yarn/vite-2b5f0a7cc8/index.html index 00fde6d6..be2ffe0a 100644 --- a/dependabot/npm_and_yarn/vite-2b5f0a7cc8/index.html +++ b/dependabot/npm_and_yarn/vite-2b5f0a7cc8/index.html @@ -79,7 +79,7 @@ Shlink — The URL shortener - + diff --git a/dependabot/npm_and_yarn/vite-2b5f0a7cc8/service-worker.js b/dependabot/npm_and_yarn/vite-2b5f0a7cc8/service-worker.js index 2f4134ed..9d04909f 100644 --- a/dependabot/npm_and_yarn/vite-2b5f0a7cc8/service-worker.js +++ b/dependabot/npm_and_yarn/vite-2b5f0a7cc8/service-worker.js @@ -1744,7 +1744,7 @@ const Se = "shlink-web-client", We = "A React-based progressive web application "react-dom": "^18.2.0", "react-external-link": "^2.2.0", "react-redux": "^8.1.3", - "react-router-dom": "^6.19.0", + "react-router-dom": "^6.20.0", reactstrap: "^9.2.1", "redux-localstorage-simple": "^2.5.1", uuid: "^9.0.1", @@ -1773,9 +1773,9 @@ const Se = "shlink-web-client", We = "A React-based progressive web application jsdom: "^22.1.0", sass: "^1.69.5", stylelint: "^15.11.0", - typescript: "^5.2.2", + typescript: "^5.3.2", vite: "^5.0.2", - "vite-plugin-pwa": "^0.16.7", + "vite-plugin-pwa": "^0.17.0", vitest: "^0.34.6", "vitest-canvas-mock": "^0.3.3" }, Ge = [ @@ -1796,7 +1796,7 @@ const Se = "shlink-web-client", We = "A React-based progressive web application browserslist: Ge }; ae(); -Ae([{"revision":"e5a42a4fc5b90ccf509d2946566bc5a3","url":"assets/index-AKuYY0MK.css"},{"revision":"ad6dc691ca22b3d53e72c905a5d969fc","url":"assets/index-VCcTKu6M.js"},{"revision":"cd1c9f4fee94190b58b8da7991a2f0ca","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":"51162ab5a9fd03efd8db321dd5df7057","url":"manifest.json"}]); +Ae([{"revision":null,"url":"assets/index-AKuYY0MK.css"},{"revision":null,"url":"assets/index-x5d5FywD.js"},{"revision":"0d9bbff1f28233bd91df9ec42f1ebb9a","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":"51162ab5a9fd03efd8db321dd5df7057","url":"manifest.json"}]); const ze = new RegExp("/[^/?]+\\.[^/]+$"); M( // Return false to exempt requests from being fulfilled by index.html.